• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * Declare the stepper.
18 *
19 * @interface StepperInterface
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @since 8
22 */
23/**
24 * Declare the stepper.
25 *
26 * @interface StepperInterface
27 * @syscap SystemCapability.ArkUI.ArkUI.Full
28 * @crossplatform
29 * @since 10
30 */
31interface StepperInterface {
32  /**
33   * Called when the stepper component is used.
34   *
35   * @param { object } value
36   * @returns { StepperAttribute }
37   * @syscap SystemCapability.ArkUI.ArkUI.Full
38   * @since 8
39   */
40  /**
41   * Called when the stepper component is used.
42   *
43   * @param { object } value
44   * @returns { StepperAttribute }
45   * @syscap SystemCapability.ArkUI.ArkUI.Full
46   * @crossplatform
47   * @since 10
48   */
49  (value?: { index?: number }): StepperAttribute;
50}
51
52/**
53 * Defines the stepper attribute functions
54 *
55 * @extends CommonMethod
56 * @syscap SystemCapability.ArkUI.ArkUI.Full
57 * @since 8
58 */
59/**
60 * Defines the stepper attribute functions
61 *
62 * @extends CommonMethod
63 * @syscap SystemCapability.ArkUI.ArkUI.Full
64 * @crossplatform
65 * @since 10
66 */
67declare class StepperAttribute extends CommonMethod<StepperAttribute> {
68  /**
69   * Callback when the finish label is clicked.
70   *
71   * @param { function } callback
72   * @returns { StepperAttribute }
73   * @syscap SystemCapability.ArkUI.ArkUI.Full
74   * @since 8
75   */
76  /**
77   * Callback when the finish label is clicked.
78   *
79   * @param { function } callback
80   * @returns { StepperAttribute }
81   * @syscap SystemCapability.ArkUI.ArkUI.Full
82   * @crossplatform
83   * @since 10
84   */
85  onFinish(callback: () => void): StepperAttribute;
86
87  /**
88   * Callback when the skip label is clicked.
89   *
90   * @param { function } callback
91   * @returns { StepperAttribute }
92   * @syscap SystemCapability.ArkUI.ArkUI.Full
93   * @since 8
94   */
95  /**
96   * Callback when the skip label is clicked.
97   *
98   * @param { function } callback
99   * @returns { StepperAttribute }
100   * @syscap SystemCapability.ArkUI.ArkUI.Full
101   * @crossplatform
102   * @since 10
103   */
104  onSkip(callback: () => void): StepperAttribute;
105
106  /**
107   * Callback when the change label is clicked.
108   *
109   * @param { function } callback
110   * @returns { StepperAttribute }
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @since 8
113   */
114  /**
115   * Callback when the change label is clicked.
116   *
117   * @param { function } callback
118   * @returns { StepperAttribute }
119   * @syscap SystemCapability.ArkUI.ArkUI.Full
120   * @crossplatform
121   * @since 10
122   */
123  onChange(callback: (prevIndex: number, index: number) => void): StepperAttribute;
124
125  /**
126   * Callback when the next label is clicked.
127   *
128   * @param { function } callback
129   * @returns { StepperAttribute }
130   * @syscap SystemCapability.ArkUI.ArkUI.Full
131   * @since 8
132   */
133  /**
134   * Callback when the next label is clicked.
135   *
136   * @param { function } callback
137   * @returns { StepperAttribute }
138   * @syscap SystemCapability.ArkUI.ArkUI.Full
139   * @crossplatform
140   * @since 10
141   */
142  onNext(callback: (index: number, pendingIndex: number) => void): StepperAttribute;
143
144  /**
145   * Callback when the previous label is clicked.
146   *
147   * @param { function } callback
148   * @returns { StepperAttribute }
149   * @syscap SystemCapability.ArkUI.ArkUI.Full
150   * @since 8
151   */
152  /**
153   * Callback when the previous label is clicked.
154   *
155   * @param { function } callback
156   * @returns { StepperAttribute }
157   * @syscap SystemCapability.ArkUI.ArkUI.Full
158   * @crossplatform
159   * @since 10
160   */
161  onPrevious(callback: (index: number, pendingIndex: number) => void): StepperAttribute;
162}
163
164/**
165 * Defines Stepper Component.
166 *
167 * @syscap SystemCapability.ArkUI.ArkUI.Full
168 * @since 8
169 */
170/**
171 * Defines Stepper Component.
172 *
173 * @syscap SystemCapability.ArkUI.ArkUI.Full
174 * @crossplatform
175 * @since 10
176 */
177declare const Stepper: StepperInterface;
178
179/**
180 * Defines Stepper Component instance.
181 *
182 * @syscap SystemCapability.ArkUI.ArkUI.Full
183 * @since 8
184 */
185/**
186 * Defines Stepper Component instance.
187 *
188 * @syscap SystemCapability.ArkUI.ArkUI.Full
189 * @crossplatform
190 * @since 10
191 */
192declare const StepperInstance: StepperAttribute;
193