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 * @file 18 * @kit ArkUI 19 */ 20 21/*** if arkts 1.2 */ 22import { Bindable, CommonMethod } from './common' 23/*** endif */ 24 25/** 26 * Declare the StepperOptions. 27 * 28 * @interface StepperOptions 29 * @syscap SystemCapability.ArkUI.ArkUI.Full 30 * @crossplatform 31 * @atomicservice 32 * @since 20 33 * @arkts 1.1&1.2 34 */ 35interface StepperOptions { 36 /** 37 * Set the stepper index. 38 * 39 * @type { ?number } 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @atomicservice 43 * @since 20 44 */ 45 index?: number; 46 47 /** 48 * Set the stepper index. 49 * 50 * @type { ?(number | Bindable<number>) } 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @crossplatform 53 * @atomicservice 54 * @since 20 55 * @arkts 1.2 56 */ 57 index?: number | Bindable<number>; 58} 59 60/** 61 * Declare the stepper. 62 * 63 * @interface StepperInterface 64 * @syscap SystemCapability.ArkUI.ArkUI.Full 65 * @since 8 66 */ 67/** 68 * Declare the stepper. 69 * 70 * @interface StepperInterface 71 * @syscap SystemCapability.ArkUI.ArkUI.Full 72 * @crossplatform 73 * @since 10 74 */ 75/** 76 * Declare the stepper. 77 * 78 * @interface StepperInterface 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @crossplatform 81 * @atomicservice 82 * @since arkts {'1.1':'11','1.2':'20'} 83 * @arkts 1.1&1.2 84 */ 85interface StepperInterface { 86 /** 87 * Called when the stepper component is used. 88 * 89 * @param { object } value 90 * @returns { StepperAttribute } 91 * @syscap SystemCapability.ArkUI.ArkUI.Full 92 * @since 8 93 */ 94 /** 95 * Called when the stepper component is used. 96 * 97 * @param { object } value 98 * @returns { StepperAttribute } 99 * @syscap SystemCapability.ArkUI.ArkUI.Full 100 * @crossplatform 101 * @since 10 102 */ 103 /** 104 * Called when the stepper component is used. 105 * 106 * @param { object } value 107 * @returns { StepperAttribute } 108 * @syscap SystemCapability.ArkUI.ArkUI.Full 109 * @crossplatform 110 * @atomicservice 111 * @since 11 112 */ 113 (value?: { index?: number }): StepperAttribute; 114 /** 115 * Called when the stepper component is used. 116 * 117 * Anonymous Object Rectification. 118 * @param { StepperOptions } value 119 * @returns { StepperAttribute } 120 * @syscap SystemCapability.ArkUI.ArkUI.Full 121 * @crossplatform 122 * @atomicservice 123 * @since 20 124 * @arkts 1.1&1.2 125 */ 126 (value?: StepperOptions): StepperAttribute; 127} 128 129/** 130 * Defines the stepper attribute functions 131 * 132 * @extends CommonMethod<StepperAttribute> 133 * @syscap SystemCapability.ArkUI.ArkUI.Full 134 * @since 8 135 */ 136/** 137 * Defines the stepper attribute functions 138 * 139 * @extends CommonMethod<StepperAttribute> 140 * @syscap SystemCapability.ArkUI.ArkUI.Full 141 * @crossplatform 142 * @since 10 143 */ 144/** 145 * Defines the stepper attribute functions 146 * 147 * @extends CommonMethod<StepperAttribute> 148 * @syscap SystemCapability.ArkUI.ArkUI.Full 149 * @crossplatform 150 * @atomicservice 151 * @since arkts {'1.1':'11','1.2':'20'} 152 * @arkts 1.1&1.2 153 */ 154declare class StepperAttribute extends CommonMethod<StepperAttribute> { 155 /** 156 * Callback when the finish label is clicked. 157 * 158 * @param { function } callback 159 * @returns { StepperAttribute } 160 * @syscap SystemCapability.ArkUI.ArkUI.Full 161 * @since 8 162 */ 163 /** 164 * Callback when the finish label is clicked. 165 * 166 * @param { function } callback 167 * @returns { StepperAttribute } 168 * @syscap SystemCapability.ArkUI.ArkUI.Full 169 * @crossplatform 170 * @since 10 171 */ 172 /** 173 * Callback when the finish label is clicked. 174 * 175 * @param { function } callback 176 * @returns { StepperAttribute } 177 * @syscap SystemCapability.ArkUI.ArkUI.Full 178 * @crossplatform 179 * @atomicservice 180 * @since arkts {'1.1':'11','1.2':'20'} 181 * @arkts 1.1&1.2 182 */ 183 onFinish(callback: () => void): StepperAttribute; 184 185 /** 186 * Callback when the skip label is clicked. 187 * 188 * @param { function } callback 189 * @returns { StepperAttribute } 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @since 8 192 */ 193 /** 194 * Callback when the skip label is clicked. 195 * 196 * @param { function } callback 197 * @returns { StepperAttribute } 198 * @syscap SystemCapability.ArkUI.ArkUI.Full 199 * @crossplatform 200 * @since 10 201 */ 202 /** 203 * Callback when the skip label is clicked. 204 * 205 * @param { function } callback 206 * @returns { StepperAttribute } 207 * @syscap SystemCapability.ArkUI.ArkUI.Full 208 * @crossplatform 209 * @atomicservice 210 * @since arkts {'1.1':'11','1.2':'20'} 211 * @arkts 1.1&1.2 212 */ 213 onSkip(callback: () => void): StepperAttribute; 214 215 /** 216 * Callback when the change label is clicked. 217 * 218 * @param { function } callback 219 * @returns { StepperAttribute } 220 * @syscap SystemCapability.ArkUI.ArkUI.Full 221 * @since 8 222 */ 223 /** 224 * Callback when the change label is clicked. 225 * 226 * @param { function } callback 227 * @returns { StepperAttribute } 228 * @syscap SystemCapability.ArkUI.ArkUI.Full 229 * @crossplatform 230 * @since 10 231 */ 232 /** 233 * Callback when the change label is clicked. 234 * 235 * @param { function } callback 236 * @returns { StepperAttribute } 237 * @syscap SystemCapability.ArkUI.ArkUI.Full 238 * @crossplatform 239 * @atomicservice 240 * @since arkts {'1.1':'11','1.2':'20'} 241 * @arkts 1.1&1.2 242 */ 243 onChange(callback: (prevIndex: number, index: number) => void): StepperAttribute; 244 245 /** 246 * Callback when the next label is clicked. 247 * 248 * @param { function } callback 249 * @returns { StepperAttribute } 250 * @syscap SystemCapability.ArkUI.ArkUI.Full 251 * @since 8 252 */ 253 /** 254 * Callback when the next label is clicked. 255 * 256 * @param { function } callback 257 * @returns { StepperAttribute } 258 * @syscap SystemCapability.ArkUI.ArkUI.Full 259 * @crossplatform 260 * @since 10 261 */ 262 /** 263 * Callback when the next label is clicked. 264 * 265 * @param { function } callback 266 * @returns { StepperAttribute } 267 * @syscap SystemCapability.ArkUI.ArkUI.Full 268 * @crossplatform 269 * @atomicservice 270 * @since arkts {'1.1':'11','1.2':'20'} 271 * @arkts 1.1&1.2 272 */ 273 onNext(callback: (index: number, pendingIndex: number) => void): StepperAttribute; 274 275 /** 276 * Callback when the previous label is clicked. 277 * 278 * @param { function } callback 279 * @returns { StepperAttribute } 280 * @syscap SystemCapability.ArkUI.ArkUI.Full 281 * @since 8 282 */ 283 /** 284 * Callback when the previous label is clicked. 285 * 286 * @param { function } callback 287 * @returns { StepperAttribute } 288 * @syscap SystemCapability.ArkUI.ArkUI.Full 289 * @crossplatform 290 * @since 10 291 */ 292 /** 293 * Callback when the previous label is clicked. 294 * 295 * @param { function } callback 296 * @returns { StepperAttribute } 297 * @syscap SystemCapability.ArkUI.ArkUI.Full 298 * @crossplatform 299 * @atomicservice 300 * @since arkts {'1.1':'11','1.2':'20'} 301 * @arkts 1.1&1.2 302 */ 303 onPrevious(callback: (index: number, pendingIndex: number) => void): StepperAttribute; 304} 305 306/** 307 * Defines Stepper Component. 308 * 309 * @syscap SystemCapability.ArkUI.ArkUI.Full 310 * @since 8 311 */ 312/** 313 * Defines Stepper Component. 314 * 315 * @syscap SystemCapability.ArkUI.ArkUI.Full 316 * @crossplatform 317 * @since 10 318 */ 319/** 320 * Defines Stepper Component. 321 * 322 * @syscap SystemCapability.ArkUI.ArkUI.Full 323 * @crossplatform 324 * @atomicservice 325 * @since 11 326 */ 327declare const Stepper: StepperInterface; 328 329/** 330 * Defines Stepper Component instance. 331 * 332 * @syscap SystemCapability.ArkUI.ArkUI.Full 333 * @since 8 334 */ 335/** 336 * Defines Stepper Component instance. 337 * 338 * @syscap SystemCapability.ArkUI.ArkUI.Full 339 * @crossplatform 340 * @since 10 341 */ 342/** 343 * Defines Stepper Component instance. 344 * 345 * @syscap SystemCapability.ArkUI.ArkUI.Full 346 * @crossplatform 347 * @atomicservice 348 * @since 11 349 */ 350declare const StepperInstance: StepperAttribute; 351