• 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 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Define the contents of each selector item.
23 *
24 * @interface TextPickerRangeContent
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @crossplatform
27 * @since 10
28 */
29/**
30 * Define the contents of each selector item.
31 *
32 * @interface TextPickerRangeContent
33 * @syscap SystemCapability.ArkUI.ArkUI.Full
34 * @crossplatform
35 * @atomicservice
36 * @since 11
37 */
38declare interface TextPickerRangeContent {
39  /**
40   * Specifies the icon content.
41   *
42   * @type { string | Resource }
43   * @syscap SystemCapability.ArkUI.ArkUI.Full
44   * @crossplatform
45   * @since 10
46   */
47  /**
48   * Specifies the icon content.
49   *
50   * @type { string | Resource }
51   * @syscap SystemCapability.ArkUI.ArkUI.Full
52   * @crossplatform
53   * @atomicservice
54   * @since 11
55   */
56  icon: string | Resource;
57
58  /**
59   * Specifies the text content.
60   *
61   * @type { ?(string | Resource) }
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @since 10
65   */
66  /**
67   * Specifies the text content.
68   *
69   * @type { ?(string | Resource) }
70   * @syscap SystemCapability.ArkUI.ArkUI.Full
71   * @crossplatform
72   * @atomicservice
73   * @since 11
74   */
75  text?: string | Resource;
76}
77
78/**
79 * Define the contents of text cascade picker.
80 *
81 * @interface TextCascadePickerRangeContent
82 * @syscap SystemCapability.ArkUI.ArkUI.Full
83 * @since 10
84 */
85/**
86 * Define the contents of text cascade picker.
87 *
88 * @interface TextCascadePickerRangeContent
89 * @syscap SystemCapability.ArkUI.ArkUI.Full
90 * @crossplatform
91 * @atomicservice
92 * @since 11
93 */
94declare interface TextCascadePickerRangeContent {
95  /**
96   * Specifies the text content.
97   *
98   * @type { string | Resource }
99   * @syscap SystemCapability.ArkUI.ArkUI.Full
100   * @since 10
101   */
102  /**
103   * Specifies the text content.
104   *
105   * @type { string | Resource }
106   * @syscap SystemCapability.ArkUI.ArkUI.Full
107   * @crossplatform
108   * @atomicservice
109   * @since 11
110   */
111  text: string | Resource;
112
113  /**
114   * Defines the text cascade picker children.
115   *
116   * @type { ?TextCascadePickerRangeContent[] }
117   * @syscap SystemCapability.ArkUI.ArkUI.Full
118   * @since 10
119   */
120  /**
121   * Defines the text cascade picker children.
122   *
123   * @type { ?TextCascadePickerRangeContent[] }
124   * @syscap SystemCapability.ArkUI.ArkUI.Full
125   * @crossplatform
126   * @atomicservice
127   * @since 11
128   */
129  children?: TextCascadePickerRangeContent[];
130}
131
132/**
133 * Defines the options of TextPicker.
134 *
135 * @interface TextPickerOptions
136 * @syscap SystemCapability.ArkUI.ArkUI.Full
137 * @since 8
138 */
139/**
140 * Defines the options of TextPicker.
141 *
142 * @interface TextPickerOptions
143 * @syscap SystemCapability.ArkUI.ArkUI.Full
144 * @crossplatform
145 * @since 10
146 */
147/**
148 * Defines the options of TextPicker.
149 *
150 * @interface TextPickerOptions
151 * @syscap SystemCapability.ArkUI.ArkUI.Full
152 * @crossplatform
153 * @atomicservice
154 * @since 11
155 */
156declare interface TextPickerOptions {
157  /**
158   * Specifies the range of the text selector.
159   *
160   * @type {string[] | Resource}
161   * @syscap SystemCapability.ArkUI.ArkUI.Full
162   * @since 8
163   */
164  /**
165   * Specifies the range of the selector.
166   * Support the display of pictures, text and pictures plus text, or multi column plain text.
167   *
168   * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]}
169   * @syscap SystemCapability.ArkUI.ArkUI.Full
170   * @crossplatform
171   * @since 10
172   */
173  /**
174   * Specifies the range of the selector.
175   * Support the display of pictures, text and pictures plus text, or multi column plain text.
176   *
177   * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]}
178   * @syscap SystemCapability.ArkUI.ArkUI.Full
179   * @crossplatform
180   * @atomicservice
181   * @since 11
182   */
183  range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[];
184
185  /**
186   * Value of the current selection.
187   *
188   * @type { ?string }
189   * @syscap SystemCapability.ArkUI.ArkUI.Full
190   * @since 8
191   */
192  /**
193   * Value of the current selection.
194   * Only valid when only text is displayed.
195   *
196   * @type { ?(string | string[]) }
197   * @syscap SystemCapability.ArkUI.ArkUI.Full
198   * @crossplatform
199   * @since 10
200   */
201  /**
202   * Value of the current selection.
203   * Only valid when only text is displayed.
204   *
205   * @type { ?(string | string[]) }
206   * @syscap SystemCapability.ArkUI.ArkUI.Full
207   * @crossplatform
208   * @atomicservice
209   * @since 11
210   */
211  value?: string | string[];
212
213  /**
214   * Current selected subscript.
215   *
216   * @type { ?number }
217   * @syscap SystemCapability.ArkUI.ArkUI.Full
218   * @since 8
219   */
220  /**
221   * Current selected subscript.
222   *
223   * @type { ?(number | number[]) }
224   * @syscap SystemCapability.ArkUI.ArkUI.Full
225   * @crossplatform
226   * @since 10
227   */
228  /**
229   * Current selected subscript.
230   *
231   * @type { ?(number | number[]) }
232   * @syscap SystemCapability.ArkUI.ArkUI.Full
233   * @crossplatform
234   * @atomicservice
235   * @since 11
236   */
237  selected?: number | number[];
238}
239
240/**
241 * TextPickerInterface
242 *
243 * @interface TextPickerInterface
244 * @syscap SystemCapability.ArkUI.ArkUI.Full
245 * @since 8
246 */
247/**
248 * TextPickerInterface
249 *
250 * @interface TextPickerInterface
251 * @syscap SystemCapability.ArkUI.ArkUI.Full
252 * @crossplatform
253 * @since 10
254 */
255/**
256 * TextPickerInterface
257 *
258 * @interface TextPickerInterface
259 * @syscap SystemCapability.ArkUI.ArkUI.Full
260 * @crossplatform
261 * @atomicservice
262 * @since 11
263 */
264interface TextPickerInterface {
265  /**
266   * Defines the TextPicker constructor.
267   *
268   * @param { TextPickerOptions } options
269   * @returns { TextPickerAttribute }
270   * @syscap SystemCapability.ArkUI.ArkUI.Full
271   * @since 8
272   */
273  /**
274   * Defines the TextPicker constructor.
275   *
276   * @param { TextPickerOptions } options
277   * @returns { TextPickerAttribute }
278   * @syscap SystemCapability.ArkUI.ArkUI.Full
279   * @crossplatform
280   * @since 10
281   */
282  /**
283   * Defines the TextPicker constructor.
284   *
285   * @param { TextPickerOptions } options
286   * @returns { TextPickerAttribute }
287   * @syscap SystemCapability.ArkUI.ArkUI.Full
288   * @crossplatform
289   * @atomicservice
290   * @since 11
291   */
292  (options?: TextPickerOptions): TextPickerAttribute;
293}
294
295/**
296 * Defines the struct of DividerOptions.
297 *
298 * @interface DividerOptions
299 * @syscap SystemCapability.ArkUI.ArkUI.Full
300 * @crossplatform
301 * @atomicservice
302 * @since 12
303 */
304declare interface DividerOptions {
305  /**
306   * The strokeWidth of Divider.
307   *
308   * @type { ?Dimension }
309   * @syscap SystemCapability.ArkUI.ArkUI.Full
310   * @crossplatform
311   * @atomicservice
312   * @since 12
313   */
314  strokeWidth?: Dimension;
315
316  /**
317   * The color of Divider.
318   *
319   * @type { ?ResourceColor }
320   * @syscap SystemCapability.ArkUI.ArkUI.Full
321   * @crossplatform
322   * @atomicservice
323   * @since 12
324   */
325  color?: ResourceColor;
326
327  /**
328   * The startMargin of Divider.
329   *
330   * @type { ?Dimension }
331   * @syscap SystemCapability.ArkUI.ArkUI.Full
332   * @crossplatform
333   * @atomicservice
334   * @since 12
335   */
336  startMargin?: Dimension;
337
338  /**
339   * The endMargin of Divider.
340   *
341   * @type { ?Dimension }
342   * @syscap SystemCapability.ArkUI.ArkUI.Full
343   * @crossplatform
344   * @atomicservice
345   * @since 12
346   */
347  endMargin?: Dimension;
348}
349
350/**
351 * Style the text selector.
352 *
353 * @extends CommonMethod<TextPickerAttribute>
354 * @syscap SystemCapability.ArkUI.ArkUI.Full
355 * @since 8
356 */
357/**
358 * Style the text selector.
359 *
360 * @extends CommonMethod<TextPickerAttribute>
361 * @syscap SystemCapability.ArkUI.ArkUI.Full
362 * @crossplatform
363 * @since 10
364 */
365/**
366 * Style the text selector.
367 *
368 * @extends CommonMethod<TextPickerAttribute>
369 * @syscap SystemCapability.ArkUI.ArkUI.Full
370 * @crossplatform
371 * @atomicservice
372 * @since 11
373 */
374declare class TextPickerAttribute extends CommonMethod<TextPickerAttribute> {
375  /**
376   * Called when the default height of the selected element is set.
377   *
378   * @param { number | string } value
379   * @returns { TextPickerAttribute }
380   * @syscap SystemCapability.ArkUI.ArkUI.Full
381   * @since 8
382   */
383  /**
384   * Called when the default height of the selected element is set.
385   *
386   * @param { number | string } value
387   * @returns { TextPickerAttribute }
388   * @syscap SystemCapability.ArkUI.ArkUI.Full
389   * @crossplatform
390   * @since 10
391   */
392  /**
393   * Called when the default height of the selected element is set.
394   *
395   * @param { number | string } value
396   * @returns { TextPickerAttribute }
397   * @syscap SystemCapability.ArkUI.ArkUI.Full
398   * @crossplatform
399   * @atomicservice
400   * @since 11
401   */
402  defaultPickerItemHeight(value: number | string): TextPickerAttribute;
403
404  /**
405   * Can scroll loop if true is set, on the contrary it can not.
406   *
407   * @param { boolean } value
408   * @returns { TextPickerAttribute }
409   * @syscap SystemCapability.ArkUI.ArkUI.Full
410   * @since 10
411   */
412  /**
413   * Can scroll loop if true is set, on the contrary it can not.
414   *
415   * @param { boolean } value
416   * @returns { TextPickerAttribute }
417   * @syscap SystemCapability.ArkUI.ArkUI.Full
418   * @crossplatform
419   * @atomicservice
420   * @since 11
421   */
422  canLoop(value: boolean): TextPickerAttribute;
423
424  /**
425   * Sets the text style of disappearing items
426   *
427   * @param { PickerTextStyle } value - indicates the text style of disappearing items.
428   * @returns { TextPickerAttribute }
429   * @syscap SystemCapability.ArkUI.ArkUI.Full
430   * @crossplatform
431   * @since 10
432   */
433  /**
434   * Sets the text style of disappearing items
435   *
436   * @param { PickerTextStyle } value - indicates the text style of disappearing items.
437   * @returns { TextPickerAttribute }
438   * @syscap SystemCapability.ArkUI.ArkUI.Full
439   * @crossplatform
440   * @atomicservice
441   * @since 11
442   */
443  disappearTextStyle(value: PickerTextStyle): TextPickerAttribute;
444
445  /**
446   * Sets the text style of normal items
447   *
448   * @param { PickerTextStyle } value - indicates the text style of normal items.
449   * @returns { TextPickerAttribute }
450   * @syscap SystemCapability.ArkUI.ArkUI.Full
451   * @crossplatform
452   * @since 10
453   */
454  /**
455   * Sets the text style of normal items
456   *
457   * @param { PickerTextStyle } value - indicates the text style of normal items.
458   * @returns { TextPickerAttribute }
459   * @syscap SystemCapability.ArkUI.ArkUI.Full
460   * @crossplatform
461   * @atomicservice
462   * @since 11
463   */
464  textStyle(value: PickerTextStyle): TextPickerAttribute;
465
466  /**
467   * Sets the text style of selected items
468   *
469   * @param { PickerTextStyle } value - indicates the text style of selected items.
470   * @returns { TextPickerAttribute }
471   * @syscap SystemCapability.ArkUI.ArkUI.Full
472   * @crossplatform
473   * @since 10
474   */
475  /**
476   * Sets the text style of selected items
477   *
478   * @param { PickerTextStyle } value - indicates the text style of selected items.
479   * @returns { TextPickerAttribute }
480   * @syscap SystemCapability.ArkUI.ArkUI.Full
481   * @crossplatform
482   * @atomicservice
483   * @since 11
484   */
485  selectedTextStyle(value: PickerTextStyle): TextPickerAttribute;
486
487  /**
488   * Called when the pop-up value is returned.
489   *
490   * @param { function } callback
491   * @returns { TextPickerAttribute }
492   * @syscap SystemCapability.ArkUI.ArkUI.Full
493   * @since 8
494   * @deprecated since 10
495   */
496  onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
497
498  /**
499   * Called when the Cancel button in the pop-up window is clicked.
500   *
501   * @param { function } callback
502   * @returns { TextPickerAttribute }
503   * @syscap SystemCapability.ArkUI.ArkUI.Full
504   * @since 8
505   * @deprecated since 10
506   */
507  onCancel(callback: () => void): TextPickerAttribute;
508
509  /**
510   * Called when the OK button in the pop-up window is clicked.
511   *
512   * @param { function } callback - the callback of onChange.
513   * @returns { TextPickerAttribute }
514   * @syscap SystemCapability.ArkUI.ArkUI.Full
515   * @since 8
516   */
517  /**
518   * This event is triggered when a TextPicker item is selected.
519   * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "".
520   *
521   * @param { function } callback - the callback of onChange.
522   * @returns { TextPickerAttribute }
523   * @syscap SystemCapability.ArkUI.ArkUI.Full
524   * @crossplatform
525   * @since 10
526   */
527  /**
528   * This event is triggered when a TextPicker item is selected.
529   * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "".
530   *
531   * @param { function } callback - the callback of onChange.
532   * @returns { TextPickerAttribute }
533   * @syscap SystemCapability.ArkUI.ArkUI.Full
534   * @crossplatform
535   * @atomicservice
536   * @since 11
537   */
538  onChange(callback: (value: string | string[], index: number | number[]) => void): TextPickerAttribute;
539
540  /**
541   * Set the selected indices.
542   * The array size is the total number of columns.
543   *
544   * @param { number | number[] } value - the selected indices.
545   * @returns { TextPickerAttribute }
546   * @syscap SystemCapability.ArkUI.ArkUI.Full
547   * @crossplatform
548   * @since 10
549   */
550  /**
551   * Set the selected indices.
552   * The array size is the total number of columns.
553   *
554   * @param { number | number[] } value - the selected indices.
555   * @returns { TextPickerAttribute }
556   * @syscap SystemCapability.ArkUI.ArkUI.Full
557   * @crossplatform
558   * @atomicservice
559   * @since 11
560   */
561  selectedIndex(value: number | number[]): TextPickerAttribute;
562
563  /**
564   * Set the divider of TextPicker
565   *
566   * @param { DividerOptions | null } value
567   * @returns { TextPickerAttribute }
568   * @syscap SystemCapability.ArkUI.ArkUI.Full
569   * @crossplatform
570   * @atomicservice
571   * @since 12
572   */
573  divider(value: DividerOptions | null): TextPickerAttribute;
574
575  /**
576   * Called when set the height of gradient
577   *
578   * @param { Dimension } value - The value the gradient height
579   * @returns { TextPickerAttribute }
580   * @syscap SystemCapability.ArkUI.ArkUI.Full
581   * @crossplatform
582   * @atomicservice
583   * @since 12
584   */
585  gradientHeight(value: Dimension): TextPickerAttribute;
586}
587
588/**
589 * Defines the struct of TextPickerResult.
590 *
591 * @interface TextPickerResult
592 * @syscap SystemCapability.ArkUI.ArkUI.Full
593 * @since 8
594 */
595/**
596 * Defines the struct of TextPickerResult.
597 *
598 * @interface TextPickerResult
599 * @syscap SystemCapability.ArkUI.ArkUI.Full
600 * @crossplatform
601 * @since 10
602 */
603/**
604 * Defines the struct of TextPickerResult.
605 *
606 * @interface TextPickerResult
607 * @syscap SystemCapability.ArkUI.ArkUI.Full
608 * @crossplatform
609 * @atomicservice
610 * @since 11
611 */
612declare interface TextPickerResult {
613  /**
614   * The currently selected value.
615   *
616   * @type { string }
617   * @syscap SystemCapability.ArkUI.ArkUI.Full
618   * @since 8
619   */
620  /**
621   * The currently selected value.
622   * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "".
623   *
624   * @type { string | string[] }
625   * @syscap SystemCapability.ArkUI.ArkUI.Full
626   * @crossplatform
627   * @since 10
628   */
629  /**
630   * The currently selected value.
631   * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "".
632   *
633   * @type { string | string[] }
634   * @syscap SystemCapability.ArkUI.ArkUI.Full
635   * @crossplatform
636   * @atomicservice
637   * @since 11
638   */
639  value: string | string[];
640
641  /**
642   * The subscript of the current selection.
643   *
644   * @type { number }
645   * @syscap SystemCapability.ArkUI.ArkUI.Full
646   * @since 8
647   */
648  /**
649   * The subscript of the current selection.
650   *
651   * @type { number | number[] }
652   * @syscap SystemCapability.ArkUI.ArkUI.Full
653   * @crossplatform
654   * @since 10
655   */
656  /**
657   * The subscript of the current selection.
658   *
659   * @type { number | number[] }
660   * @syscap SystemCapability.ArkUI.ArkUI.Full
661   * @crossplatform
662   * @atomicservice
663   * @since 11
664   */
665  index: number | number[];
666}
667
668/**
669 * Defines the TextPickerDialogOptions for Text Picker Dialog.
670 *
671 * @interface TextPickerDialogOptions
672 * @syscap SystemCapability.ArkUI.ArkUI.Full
673 * @since 8
674 */
675/**
676 * Defines the TextPickerDialogOptions for Text Picker Dialog.
677 *
678 * @interface TextPickerDialogOptions
679 * @syscap SystemCapability.ArkUI.ArkUI.Full
680 * @crossplatform
681 * @since 10
682 */
683/**
684 * Defines the TextPickerDialogOptions for Text Picker Dialog.
685 *
686 * @interface TextPickerDialogOptions
687 * @syscap SystemCapability.ArkUI.ArkUI.Full
688 * @crossplatform
689 * @atomicservice
690 * @since 11
691 */
692declare interface TextPickerDialogOptions extends TextPickerOptions {
693  /**
694   * Called when the default height of the selected element is set.
695   *
696   * @type { ?(number | string) }
697   * @syscap SystemCapability.ArkUI.ArkUI.Full
698   * @since 8
699   */
700  /**
701   * Called when the default height of the selected element is set.
702   *
703   * @type { ?(number | string) }
704   * @syscap SystemCapability.ArkUI.ArkUI.Full
705   * @crossplatform
706   * @since 10
707   */
708  /**
709   * Called when the default height of the selected element is set.
710   *
711   * @type { ?(number | string) }
712   * @syscap SystemCapability.ArkUI.ArkUI.Full
713   * @crossplatform
714   * @atomicservice
715   * @since 11
716   */
717  defaultPickerItemHeight?: number | string;
718
719  /**
720   * Can scroll loop if true is set, on the contrary it can not.
721   *
722   * @type { ?boolean }
723   * @default true
724   * @syscap SystemCapability.ArkUI.ArkUI.Full
725   * @since 10
726   */
727  /**
728   * Can scroll loop if true is set, on the contrary it can not.
729   *
730   * @type { ?boolean }
731   * @default true
732   * @syscap SystemCapability.ArkUI.ArkUI.Full
733   * @crossplatform
734   * @atomicservice
735   * @since 11
736   */
737  canLoop?: boolean;
738
739  /**
740   * Text style of disappearing items
741   *
742   * @type { ?PickerTextStyle }
743   * @syscap SystemCapability.ArkUI.ArkUI.Full
744   * @crossplatform
745   * @since 10
746   */
747  /**
748   * Text style of disappearing items
749   *
750   * @type { ?PickerTextStyle }
751   * @syscap SystemCapability.ArkUI.ArkUI.Full
752   * @crossplatform
753   * @atomicservice
754   * @since 11
755   */
756  disappearTextStyle?: PickerTextStyle;
757
758  /**
759   * Text style of normal items
760   *
761   * @type { ?PickerTextStyle }
762   * @syscap SystemCapability.ArkUI.ArkUI.Full
763   * @crossplatform
764   * @since 10
765   */
766  /**
767   * Text style of normal items
768   *
769   * @type { ?PickerTextStyle }
770   * @syscap SystemCapability.ArkUI.ArkUI.Full
771   * @crossplatform
772   * @atomicservice
773   * @since 11
774   */
775  textStyle?: PickerTextStyle;
776
777  /**
778   * Style of accept button.
779   *
780   * @type { ?PickerDialogButtonStyle }
781   * @syscap SystemCapability.ArkUI.ArkUI.Full
782   * @crossplatform
783   * @atomicservice
784   * @since 12
785   */
786  acceptButtonStyle?: PickerDialogButtonStyle;
787
788  /**
789   * Style of cancel button.
790   *
791   * @type { ?PickerDialogButtonStyle }
792   * @syscap SystemCapability.ArkUI.ArkUI.Full
793   * @crossplatform
794   * @atomicservice
795   * @since 12
796   */
797  cancelButtonStyle?: PickerDialogButtonStyle;
798
799  /**
800   * Text style of selected items
801   *
802   * @type { ?PickerTextStyle }
803   * @syscap SystemCapability.ArkUI.ArkUI.Full
804   * @crossplatform
805   * @since 10
806   */
807  /**
808   * Text style of selected items
809   *
810   * @type { ?PickerTextStyle }
811   * @syscap SystemCapability.ArkUI.ArkUI.Full
812   * @crossplatform
813   * @atomicservice
814   * @since 11
815   */
816  selectedTextStyle?: PickerTextStyle;
817  /**
818   * Called when the OK button in the dialog is clicked.
819   *
820   * @type { ?function }
821   * @syscap SystemCapability.ArkUI.ArkUI.Full
822   * @since 8
823   */
824  /**
825   * Called when the OK button in the dialog is clicked.
826   *
827   * @type { ?function }
828   * @syscap SystemCapability.ArkUI.ArkUI.Full
829   * @crossplatform
830   * @since 10
831   */
832  /**
833   * Called when the OK button in the dialog is clicked.
834   *
835   * @type { ?function }
836   * @syscap SystemCapability.ArkUI.ArkUI.Full
837   * @crossplatform
838   * @atomicservice
839   * @since 11
840   */
841  onAccept?: (value: TextPickerResult) => void;
842
843  /**
844   * Called when the Cancel button in the dialog is clicked.
845   *
846   * @type { ?function }
847   * @syscap SystemCapability.ArkUI.ArkUI.Full
848   * @since 8
849   */
850  /**
851   * Called when the Cancel button in the dialog is clicked.
852   *
853   * @type { ?function }
854   * @syscap SystemCapability.ArkUI.ArkUI.Full
855   * @crossplatform
856   * @since 10
857   */
858  /**
859   * Called when the Cancel button in the dialog is clicked.
860   *
861   * @type { ?function }
862   * @syscap SystemCapability.ArkUI.ArkUI.Full
863   * @crossplatform
864   * @atomicservice
865   * @since 11
866   */
867  onCancel?: () => void;
868
869  /**
870   * This event is triggered when a TextPicker text is selected in dialog.
871   *
872   * @type { ?function }
873   * @syscap SystemCapability.ArkUI.ArkUI.Full
874   * @since 8
875   */
876  /**
877   * This event is triggered when a TextPicker text is selected in dialog.
878   *
879   * @type { ?function }
880   * @syscap SystemCapability.ArkUI.ArkUI.Full
881   * @crossplatform
882   * @since 10
883   */
884  /**
885   * This event is triggered when a TextPicker text is selected in dialog.
886   *
887   * @type { ?function }
888   * @syscap SystemCapability.ArkUI.ArkUI.Full
889   * @crossplatform
890   * @atomicservice
891   * @since 11
892   */
893  onChange?: (value: TextPickerResult) => void;
894
895  /**
896   * Mask Region of dialog. The size cannot exceed the main window.
897   *
898   * @type { ?Rectangle }
899   * @syscap SystemCapability.ArkUI.ArkUI.Full
900   * @crossplatform
901   * @since 10
902   */
903  /**
904   * Mask Region of dialog. The size cannot exceed the main window.
905   *
906   * @type { ?Rectangle }
907   * @syscap SystemCapability.ArkUI.ArkUI.Full
908   * @crossplatform
909   * @atomicservice
910   * @since 11
911   */
912  maskRect?: Rectangle;
913
914  /**
915   * Defines the dialog alignment of the screen.
916   *
917   * @type { ?DialogAlignment }
918   * @syscap SystemCapability.ArkUI.ArkUI.Full
919   * @crossplatform
920   * @since 10
921   */
922  /**
923   * Defines the dialog alignment of the screen.
924   *
925   * @type { ?DialogAlignment }
926   * @syscap SystemCapability.ArkUI.ArkUI.Full
927   * @crossplatform
928   * @atomicservice
929   * @since 11
930   */
931  alignment?: DialogAlignment;
932
933  /**
934   * Defines the dialog offset.
935   *
936   * @type { ?Offset }
937   * @syscap SystemCapability.ArkUI.ArkUI.Full
938   * @crossplatform
939   * @since 10
940   */
941  /**
942   * Defines the dialog offset.
943   *
944   * @type { ?Offset }
945   * @syscap SystemCapability.ArkUI.ArkUI.Full
946   * @crossplatform
947   * @atomicservice
948   * @since 11
949   */
950  offset?: Offset;
951
952  /**
953   * Defines the textPickerDialog's background color
954   *
955   * @type { ?ResourceColor }
956   * @default Color.Transparent
957   * @syscap SystemCapability.ArkUI.ArkUI.Full
958   * @crossplatform
959   * @since 11
960   */
961  /**
962   * Defines the textPickerDialog's background color
963   *
964   * @type { ?ResourceColor }
965   * @default Color.Transparent
966   * @syscap SystemCapability.ArkUI.ArkUI.Full
967   * @crossplatform
968   * @atomicservice
969   * @since 12
970   */
971  backgroundColor?: ResourceColor;
972
973  /**
974   * Defines the textPickerDialog's background blur Style
975   *
976   * @type { ?BlurStyle }
977   * @default BlurStyle.COMPONENT_ULTRA_THICK
978   * @syscap SystemCapability.ArkUI.ArkUI.Full
979   * @crossplatform
980   * @since 11
981   */
982  /**
983   * Defines the textPickerDialog's background blur Style
984   *
985   * @type { ?BlurStyle }
986   * @default BlurStyle.COMPONENT_ULTRA_THICK
987   * @syscap SystemCapability.ArkUI.ArkUI.Full
988   * @crossplatform
989   * @atomicservice
990   * @since 12
991   */
992  backgroundBlurStyle?: BlurStyle;
993
994  /**
995   * Callback function when the dialog appears.
996   *
997   * @type { ?function }
998   * @syscap SystemCapability.ArkUI.ArkUI.Full
999   * @crossplatform
1000   * @atomicservice
1001   * @since 12
1002   */
1003  onDidAppear?: () => void;
1004
1005  /**
1006   * Callback function when the dialog disappears.
1007   *
1008   * @type { ?function }
1009   * @syscap SystemCapability.ArkUI.ArkUI.Full
1010   * @crossplatform
1011   * @atomicservice
1012   * @since 12
1013   */
1014  onDidDisappear?: () => void;
1015
1016  /**
1017   * Callback function before the dialog openAnimation starts.
1018   *
1019   * @type { ?function }
1020   * @syscap SystemCapability.ArkUI.ArkUI.Full
1021   * @crossplatform
1022   * @atomicservice
1023   * @since 12
1024   */
1025  onWillAppear?: () => void;
1026
1027  /**
1028   * Callback function before the dialog closeAnimation starts.
1029   *
1030   * @type { ?function }
1031   * @syscap SystemCapability.ArkUI.ArkUI.Full
1032   * @crossplatform
1033   * @atomicservice
1034   * @since 12
1035   */
1036  onWillDisappear?: () => void;
1037
1038  /**
1039   * Defines the dialog's shadow.
1040   *
1041   * @type { ?(ShadowOptions | ShadowStyle) }
1042   * @syscap SystemCapability.ArkUI.ArkUI.Full
1043   * @crossplatform
1044   * @atomicservice
1045   * @since 12
1046   */
1047  shadow?: ShadowOptions | ShadowStyle;
1048}
1049
1050/**
1051 * Defines TextPickerDialog which uses show method to show TextPicker dialog.
1052 *
1053 * @syscap SystemCapability.ArkUI.ArkUI.Full
1054 * @since 8
1055 */
1056/**
1057 * Defines TextPickerDialog which uses show method to show TextPicker dialog.
1058 *
1059 * @syscap SystemCapability.ArkUI.ArkUI.Full
1060 * @crossplatform
1061 * @since 10
1062 */
1063/**
1064 * Defines TextPickerDialog which uses show method to show TextPicker dialog.
1065 *
1066 * @syscap SystemCapability.ArkUI.ArkUI.Full
1067 * @crossplatform
1068 * @atomicservice
1069 * @since 11
1070 */
1071declare class TextPickerDialog {
1072  /**
1073   * Invoking method display.
1074   *
1075   * @param { TextPickerDialogOptions } options
1076   * @syscap SystemCapability.ArkUI.ArkUI.Full
1077   * @since 8
1078   */
1079  /**
1080   * Invoking method display.
1081   *
1082   * @param { TextPickerDialogOptions } options
1083   * @syscap SystemCapability.ArkUI.ArkUI.Full
1084   * @crossplatform
1085   * @since 10
1086   */
1087  /**
1088   * Invoking method display.
1089   *
1090   * @param { TextPickerDialogOptions } options
1091   * @syscap SystemCapability.ArkUI.ArkUI.Full
1092   * @crossplatform
1093   * @atomicservice
1094   * @since 11
1095   */
1096  static show(options?: TextPickerDialogOptions);
1097}
1098
1099/**
1100 * Defines TextPicker Component.
1101 *
1102 * @syscap SystemCapability.ArkUI.ArkUI.Full
1103 * @since 8
1104 */
1105/**
1106 * Defines TextPicker Component.
1107 *
1108 * @syscap SystemCapability.ArkUI.ArkUI.Full
1109 * @crossplatform
1110 * @since 10
1111 */
1112/**
1113 * Defines TextPicker Component.
1114 *
1115 * @syscap SystemCapability.ArkUI.ArkUI.Full
1116 * @crossplatform
1117 * @atomicservice
1118 * @since 11
1119 */
1120declare const TextPicker: TextPickerInterface;
1121
1122/**
1123 * Defines TextPicker Component instance.
1124 *
1125 * @syscap SystemCapability.ArkUI.ArkUI.Full
1126 * @since 8
1127 */
1128/**
1129 * Defines TextPicker Component instance.
1130 *
1131 * @syscap SystemCapability.ArkUI.ArkUI.Full
1132 * @crossplatform
1133 * @since 10
1134 */
1135/**
1136 * Defines TextPicker Component instance.
1137 *
1138 * @syscap SystemCapability.ArkUI.ArkUI.Full
1139 * @crossplatform
1140 * @atomicservice
1141 * @since 11
1142 */
1143declare const TextPickerInstance: TextPickerAttribute;
1144
1145