• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2* Copyright (C) 2023-2024 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/// <reference path="../component/units.d.ts" />
22
23import { ResourceStr } from 'GlobalResource';
24import { Theme, CustomTheme } from '@ohos.arkui.theme';
25
26/**
27 * Declare ButtonOptions
28 * @syscap SystemCapability.ArkUI.ArkUI.Full
29 * @since 10
30 */
31
32
33/**
34 * Declare ButtonOptions
35 * @syscap SystemCapability.ArkUI.ArkUI.Full
36 * @atomicservice
37 * @since 11
38 */
39export declare class ButtonOptions {
40  /**
41   * Sets the Display Content of a Button.
42   * @type { ResourceStr }.
43   * @syscap SystemCapability.ArkUI.ArkUI.Full
44   * @since 10
45   */
46  /**
47   * Sets the Display Content of a Button.
48   * @type { ResourceStr }.
49   * @syscap SystemCapability.ArkUI.ArkUI.Full
50   * @atomicservice
51   * @since 11
52   */
53  value: ResourceStr;
54  /**
55   * Sets the Button Callback.
56   * @type { ?() => void }.
57   * @syscap SystemCapability.ArkUI.ArkUI.Full
58   * @since 10
59   */
60  /**
61   * Sets the Button Callback.
62   * @type { ?() => void }.
63   * @syscap SystemCapability.ArkUI.ArkUI.Full
64   * @atomicservice
65   * @since 11
66   */
67  action?: () => void;
68  /**
69   * Sets the background color of a button.
70   * @type { ?ResourceStr }.
71   * @syscap SystemCapability.ArkUI.ArkUI.Full
72   * @since 10
73   */
74  /**
75   * Sets the background color of a button.
76   * @type { ?ResourceStr }.
77   * @syscap SystemCapability.ArkUI.ArkUI.Full
78   * @atomicservice
79   * @since 11
80   */
81  background?: ResourceColor;
82  /**
83   * Sets the Button Text Color.
84   * @type { ?ResourceStr }.
85   * @syscap SystemCapability.ArkUI.ArkUI.Full
86   * @since 10
87   */
88  /**
89   * Sets the Button Text Color.
90   * @type { ?ResourceStr }.
91   * @syscap SystemCapability.ArkUI.ArkUI.Full
92   * @atomicservice
93   * @since 11
94   */
95  fontColor?: ResourceColor;
96  /**
97   * Describes the Button style.
98   * @type { ?ButtonStyleMode }
99   * @default ButtonStyleMode.TEXTUAL
100   * @syscap SystemCapability.ArkUI.ArkUI.Full
101   * @crossplatform
102   * @since 12
103   */
104  buttonStyle?: ButtonStyleMode;
105  /**
106   * Describes the Button role.
107   * @type { ?ButtonRole }
108   * @default ButtonRole.NORMAL
109   * @syscap SystemCapability.ArkUI.ArkUI.Full
110   * @crossplatform
111   * @since 12
112   */
113  role?: ButtonRole;
114}
115/**
116 * Declare CustomDialog TipsDialog
117 * @syscap SystemCapability.ArkUI.ArkUI.Full
118 * @since 10
119 */
120/**
121 * Declare CustomDialog TipsDialog
122 * @syscap SystemCapability.ArkUI.ArkUI.Full
123 * @atomicservice
124 * @since 11
125 */
126@CustomDialog
127export declare struct TipsDialog {
128  /**
129   * Sets the TipsDialog Controller.
130   * @type { CustomDialogController }.
131   * @syscap SystemCapability.ArkUI.ArkUI.Full
132   * @since 10
133   */
134  /**
135   * Sets the TipsDialog Controller.
136   * @type { CustomDialogController }.
137   * @syscap SystemCapability.ArkUI.ArkUI.Full
138   * @atomicservice
139   * @since 11
140   */
141  controller: CustomDialogController;
142  /**
143   * Sets the TipsDialog imageRes.
144   * @type { Resource }.
145   * @syscap SystemCapability.ArkUI.ArkUI.Full
146   * @since 10
147   */
148  /**
149   * Sets the TipsDialog imageRes.
150   * @type { Resource }.
151   * @syscap SystemCapability.ArkUI.ArkUI.Full
152   * @atomicservice
153   * @since 11
154   */
155  imageRes: Resource;
156  /**
157   * Sets the TipsDialog image size.
158   * @type { SizeOptions }.
159   * @syscap SystemCapability.ArkUI.ArkUI.Full
160   * @since 10
161   */
162  /**
163   * Sets the TipsDialog image size.
164   * @type { SizeOptions }.
165   * @syscap SystemCapability.ArkUI.ArkUI.Full
166   * @atomicservice
167   * @since 11
168   */
169  /**
170   * Sets the TipsDialog image size.
171   * @type { ?SizeOptions }.
172   * @syscap SystemCapability.ArkUI.ArkUI.Full
173   * @atomicservice
174   * @since 12
175   */
176  imageSize?: SizeOptions;
177  /**
178   * Sets the TipsDialog title.
179   * @type { ResourceStr }.
180   * @syscap SystemCapability.ArkUI.ArkUI.Full
181   * @since 10
182   */
183  /**
184   * Sets the TipsDialog title.
185   * @type { ResourceStr }.
186   * @syscap SystemCapability.ArkUI.ArkUI.Full
187   * @atomicservice
188   * @since 11
189   */
190  /**
191   * Sets the TipsDialog title.
192   * @type { ?ResourceStr }.
193   * @syscap SystemCapability.ArkUI.ArkUI.Full
194   * @atomicservice
195   * @since 12
196   */
197  title?: ResourceStr;
198  /**
199   * Sets the TipsDialog content.
200   * @type { ?ResourceStr }.
201   * @syscap SystemCapability.ArkUI.ArkUI.Full
202   * @since 10
203   */
204  /**
205   * Sets the TipsDialog content.
206   * @type { ?ResourceStr }.
207   * @syscap SystemCapability.ArkUI.ArkUI.Full
208   * @atomicservice
209   * @since 11
210   */
211  content?: ResourceStr;
212  /**
213   * Sets the TipsDialog checkbox tips.
214   * @type { ?ResourceStr }.
215   * @syscap SystemCapability.ArkUI.ArkUI.Full
216   * @since 10
217   */
218  /**
219   * Sets the TipsDialog checkbox tips.
220   * @type { ?ResourceStr }.
221   * @syscap SystemCapability.ArkUI.ArkUI.Full
222   * @atomicservice
223   * @since 11
224   */
225  checkTips?: ResourceStr;
226  /**
227   * Sets the TipsDialog checkbox check state.
228   * @type { ?boolean }.
229   * @syscap SystemCapability.ArkUI.ArkUI.Full
230   * @since 10
231   */
232  /**
233   * Sets the TipsDialog checkbox check state.
234   * @type { ?boolean }.
235   * @syscap SystemCapability.ArkUI.ArkUI.Full
236   * @atomicservice
237   * @since 11
238   */
239  @Prop isChecked?: boolean;
240  /**
241   * Sets the TipsDialog CheckBox Callback.
242   * @type { ?(isChecked: boolean) => void }.
243   * @syscap SystemCapability.ArkUI.ArkUI.Full
244   * @since 12
245   */
246  checkAction?: (isChecked: boolean) => void;
247  /**
248   * Sets the TipsDialog primary button.
249   * @type { ?ButtonOptions }.
250   * @syscap SystemCapability.ArkUI.ArkUI.Full
251   * @since 10
252   */
253  /**
254   * Sets the TipsDialog primary button.
255   * @type { ?ButtonOptions }.
256   * @syscap SystemCapability.ArkUI.ArkUI.Full
257   * @atomicservice
258   * @since 11
259   */
260  primaryButton?: ButtonOptions;
261  /**
262   * Sets the TipsDialog secondary button.
263   * @type { ?ButtonOptions }.
264   * @syscap SystemCapability.ArkUI.ArkUI.Full
265   * @since 10
266   */
267  /**
268   * Sets the TipsDialog secondary button.
269   * @type { ?ButtonOptions }.
270   * @syscap SystemCapability.ArkUI.ArkUI.Full
271   * @atomicservice
272   * @since 11
273   */
274  secondaryButton?: ButtonOptions;
275  /**
276   * Custom Theme.
277   *
278   * @type { ?(Theme | CustomTheme) }
279   * @syscap SystemCapability.ArkUI.ArkUI.Full
280   * @crossplatform
281   * @atomicservice
282   * @since 12
283   */
284  theme?: Theme | CustomTheme;
285}
286
287/**
288 * Declare CustomDialog SelectDialog
289 * @syscap SystemCapability.ArkUI.ArkUI.Full
290 * @since 10
291 */
292/**
293 * Declare CustomDialog SelectDialog
294 * @syscap SystemCapability.ArkUI.ArkUI.Full
295 * @atomicservice
296 * @since 11
297 */
298@CustomDialog
299export declare struct SelectDialog {
300  /**
301   * Sets the SelectDialog Controller.
302   * @type { CustomDialogController }.
303   * @syscap SystemCapability.ArkUI.ArkUI.Full
304   * @since 10
305   */
306  /**
307   * Sets the SelectDialog Controller.
308   * @type { CustomDialogController }.
309   * @syscap SystemCapability.ArkUI.ArkUI.Full
310   * @atomicservice
311   * @since 11
312   */
313  controller: CustomDialogController;
314  /**
315   * Sets the SelectDialog title.
316   * @type { ResourceStr }.
317   * @syscap SystemCapability.ArkUI.ArkUI.Full
318   * @since 10
319   */
320  /**
321   * Sets the SelectDialog title.
322   * @type { ResourceStr }.
323   * @syscap SystemCapability.ArkUI.ArkUI.Full
324   * @atomicservice
325   * @since 11
326   */
327  title: ResourceStr;
328  /**
329   * Sets the SelectDialog content.
330   * @type { ?ResourceStr }.
331   * @syscap SystemCapability.ArkUI.ArkUI.Full
332   * @since 10
333   */
334  /**
335   * Sets the SelectDialog content.
336   * @type { ?ResourceStr }.
337   * @syscap SystemCapability.ArkUI.ArkUI.Full
338   * @atomicservice
339   * @since 11
340   */
341  content?: ResourceStr;
342  /**
343   * Sets the SelectDialog selected index.
344   * @type { ?number }.
345   * @syscap SystemCapability.ArkUI.ArkUI.Full
346   * @since 10
347   */
348  /**
349   * Sets the SelectDialog selected index.
350   * @type { ?number }.
351   * @syscap SystemCapability.ArkUI.ArkUI.Full
352   * @atomicservice
353   * @since 11
354   */
355  selectedIndex?: number;
356  /**
357   * Sets the SelectDialog confirm button.
358   * @type { ?ButtonOptions }.
359   * @syscap SystemCapability.ArkUI.ArkUI.Full
360   * @since 10
361   */
362  /**
363   * Sets the SelectDialog confirm button.
364   * @type { ?ButtonOptions }.
365   * @syscap SystemCapability.ArkUI.ArkUI.Full
366   * @atomicservice
367   * @since 11
368   */
369  confirm?: ButtonOptions;
370  /**
371   * Sets the SelectDialog sheets.
372   * @type { Array<SheetInfo> }.
373   * @syscap SystemCapability.ArkUI.ArkUI.Full
374   * @since 10
375   */
376  /**
377   * Sets the SelectDialog sheets.
378   * @type { Array<SheetInfo> }.
379   * @syscap SystemCapability.ArkUI.ArkUI.Full
380   * @atomicservice
381   * @since 11
382   */
383  radioContent: Array<SheetInfo>;
384  /**
385   * Custom Theme.
386   *
387   * @type { ?(Theme | CustomTheme) }
388   * @syscap SystemCapability.ArkUI.ArkUI.Full
389   * @crossplatform
390   * @atomicservice
391   * @since 12
392   */
393  theme?: Theme | CustomTheme;
394}
395
396/**
397 * Declare CustomDialog ConfirmDialog
398 * @syscap SystemCapability.ArkUI.ArkUI.Full
399 * @since 10
400 */
401/**
402 * Declare CustomDialog ConfirmDialog
403 * @syscap SystemCapability.ArkUI.ArkUI.Full
404 * @atomicservice
405 * @since 11
406 */
407@CustomDialog
408export declare struct ConfirmDialog {
409  /**
410   * Sets the ConfirmDialog Controller.
411   * @type { CustomDialogController }.
412   * @syscap SystemCapability.ArkUI.ArkUI.Full
413   * @since 10
414   */
415  /**
416   * Sets the ConfirmDialog Controller.
417   * @type { CustomDialogController }.
418   * @syscap SystemCapability.ArkUI.ArkUI.Full
419   * @atomicservice
420   * @since 11
421   */
422  controller: CustomDialogController;
423  /**
424   * Sets the ConfirmDialog title.
425   * @type { ResourceStr }.
426   * @syscap SystemCapability.ArkUI.ArkUI.Full
427   * @since 10
428   */
429  /**
430   * Sets the ConfirmDialog title.
431   * @type { ResourceStr }.
432   * @syscap SystemCapability.ArkUI.ArkUI.Full
433   * @atomicservice
434   * @since 11
435   */
436  title: ResourceStr;
437  /**
438   * Sets the ConfirmDialog content.
439   * @type { ?ResourceStr }.
440   * @syscap SystemCapability.ArkUI.ArkUI.Full
441   * @since 10
442   */
443  /**
444   * Sets the ConfirmDialog content.
445   * @type { ?ResourceStr }.
446   * @syscap SystemCapability.ArkUI.ArkUI.Full
447   * @atomicservice
448   * @since 11
449   */
450  content?: ResourceStr;
451  /**
452   * Sets the ConfirmDialog checkbox tips.
453   * @type { ?ResourceStr }.
454   * @syscap SystemCapability.ArkUI.ArkUI.Full
455   * @since 10
456   */
457  /**
458   * Sets the ConfirmDialog checkbox tips.
459   * @type { ?ResourceStr }.
460   * @syscap SystemCapability.ArkUI.ArkUI.Full
461   * @atomicservice
462   * @since 11
463   */
464  checkTips?: ResourceStr;
465  /**
466   * Sets the ConfirmDialog checkbox state.
467   * @type { ?boolean }.
468   * @syscap SystemCapability.ArkUI.ArkUI.Full
469   * @since 10
470   */
471  /**
472   * Sets the ConfirmDialog checkbox state.
473   * @type { ?boolean }.
474   * @syscap SystemCapability.ArkUI.ArkUI.Full
475   * @atomicservice
476   * @since 11
477   */
478  @Prop isChecked?: boolean;
479  /**
480   * Sets the ConfirmDialog primary button.
481   * @type { ?ButtonOptions }.
482   * @syscap SystemCapability.ArkUI.ArkUI.Full
483   * @since 10
484   */
485  /**
486   * Sets the ConfirmDialog primary button.
487   * @type { ?ButtonOptions }.
488   * @syscap SystemCapability.ArkUI.ArkUI.Full
489   * @atomicservice
490   * @since 11
491   */
492  primaryButton?: ButtonOptions;
493  /**
494   * Sets the ConfirmDialog secondary button.
495   * @type { ?ButtonOptions }.
496   * @syscap SystemCapability.ArkUI.ArkUI.Full
497   * @since 10
498   */
499  /**
500   * Sets the ConfirmDialog secondary button.
501   * @type { ?ButtonOptions }.
502   * @syscap SystemCapability.ArkUI.ArkUI.Full
503   * @atomicservice
504   * @since 11
505   */
506  secondaryButton?: ButtonOptions;
507  /**
508   * Custom Theme.
509   *
510   * @type { ?(Theme | CustomTheme) }
511   * @syscap SystemCapability.ArkUI.ArkUI.Full
512   * @crossplatform
513   * @atomicservice
514   * @since 12
515   */
516  theme?: Theme | CustomTheme;
517}
518
519/**
520 * Declare CustomDialog AlertDialog
521 * @syscap SystemCapability.ArkUI.ArkUI.Full
522 * @since 10
523 */
524/**
525 * Declare CustomDialog AlertDialog
526 * @syscap SystemCapability.ArkUI.ArkUI.Full
527 * @atomicservice
528 * @since 11
529 */
530@CustomDialog
531export declare struct AlertDialog {
532  /**
533   * Sets the AlertDialog Controller.
534   * @type { CustomDialogController }.
535   * @syscap SystemCapability.ArkUI.ArkUI.Full
536   * @since 10
537   */
538  /**
539   * Sets the AlertDialog Controller.
540   * @type { CustomDialogController }.
541   * @syscap SystemCapability.ArkUI.ArkUI.Full
542   * @atomicservice
543   * @since 11
544   */
545  controller: CustomDialogController;
546  /**
547   * Sets the AlertDialog title.
548   * @type { ?ResourceStr }
549   * @syscap SystemCapability.ArkUI.ArkUI.Full
550   * @crossplatform
551   * @since 12
552   */
553  primaryTitle?: ResourceStr;
554  /**
555   * Sets the AlertDialog secondary title.
556   * @type { ?ResourceStr }
557   * @syscap SystemCapability.ArkUI.ArkUI.Full
558   * @crossplatform
559   * @since 12
560   */
561  secondaryTitle?: ResourceStr;
562  /**
563   * Sets the AlertDialog content.
564   * @type { ResourceStr }.
565   * @syscap SystemCapability.ArkUI.ArkUI.Full
566   * @since 10
567   */
568  /**
569   * Sets the AlertDialog content.
570   * @type { ResourceStr }.
571   * @syscap SystemCapability.ArkUI.ArkUI.Full
572   * @atomicservice
573   * @since 11
574   */
575  content: ResourceStr;
576  /**
577   * Sets the AlertDialog primary button.
578   * @type { ?ButtonOptions }.
579   * @syscap SystemCapability.ArkUI.ArkUI.Full
580   * @since 10
581   */
582  /**
583   * Sets the AlertDialog primary button.
584   * @type { ?ButtonOptions }.
585   * @syscap SystemCapability.ArkUI.ArkUI.Full
586   * @atomicservice
587   * @since 11
588   */
589  primaryButton?: ButtonOptions;
590  /**
591   * Sets the AlertDialog secondary button.
592   * @type { ?ButtonOptions }.
593   * @syscap SystemCapability.ArkUI.ArkUI.Full
594   * @since 10
595   */
596  /**
597   * Sets the AlertDialog secondary button.
598   * @type { ?ButtonOptions }.
599   * @syscap SystemCapability.ArkUI.ArkUI.Full
600   * @atomicservice
601   * @since 11
602   */
603  secondaryButton?: ButtonOptions;
604  /**
605   * Custom Theme.
606   *
607   * @type { ?(Theme | CustomTheme) }
608   * @syscap SystemCapability.ArkUI.ArkUI.Full
609   * @crossplatform
610   * @atomicservice
611   * @since 12
612   */
613  theme?: Theme | CustomTheme;
614}
615
616/**
617 * Declare CustomDialog LoadingDialog
618 * @syscap SystemCapability.ArkUI.ArkUI.Full
619 * @since 10
620 */
621/**
622 * Declare CustomDialog LoadingDialog
623 * @syscap SystemCapability.ArkUI.ArkUI.Full
624 * @atomicservice
625 * @since 11
626 */
627@CustomDialog
628export declare struct LoadingDialog {
629  /**
630   * Sets the LoadingDialog Controller.
631   * @type { CustomDialogController }.
632   * @syscap SystemCapability.ArkUI.ArkUI.Full
633   * @since 10
634   */
635  /**
636   * Sets the LoadingDialog Controller.
637   * @type { CustomDialogController }.
638   * @syscap SystemCapability.ArkUI.ArkUI.Full
639   * @atomicservice
640   * @since 11
641   */
642  Controller: CustomDialogController;
643  /**
644   * Sets the LoadingDialog content.
645   * @type { ?ResourceStr }.
646   * @syscap SystemCapability.ArkUI.ArkUI.Full
647   * @since 10
648   */
649  /**
650   * Sets the LoadingDialog content.
651   * @type { ?ResourceStr }.
652   * @syscap SystemCapability.ArkUI.ArkUI.Full
653   * @atomicservice
654   * @since 11
655   */
656  content?: ResourceStr;
657  /**
658   * Custom Theme.
659   *
660   * @type { ?(Theme | CustomTheme) }
661   * @syscap SystemCapability.ArkUI.ArkUI.Full
662   * @crossplatform
663   * @atomicservice
664   * @since 12
665   */
666  theme?: Theme | CustomTheme;
667}
668
669/**
670 * Declare custom content dialog
671 * @syscap SystemCapability.ArkUI.ArkUI.Full
672 * @crossplatform
673 * @since 12
674 */
675@CustomDialog
676export declare struct CustomContentDialog {
677  /**
678   * Sets the CustomContentDialog Controller.
679   * @type { CustomDialogController }.
680   * @syscap SystemCapability.ArkUI.ArkUI.Full
681   * @crossplatform
682   * @since 12
683   */
684  controller: CustomDialogController;
685  /**
686   * Sets the CustomContentDialog title.
687   * @type { ?ResourceStr }
688   * @syscap SystemCapability.ArkUI.ArkUI.Full
689   * @crossplatform
690   * @since 12
691   */
692  primaryTitle?: ResourceStr;
693  /**
694   * Sets the CustomContentDialog secondary title.
695   * @type { ?ResourceStr }
696   * @syscap SystemCapability.ArkUI.ArkUI.Full
697   * @crossplatform
698   * @since 12
699   */
700  secondaryTitle?: ResourceStr;
701  /**
702   * Sets the CustomContentDialog content.
703   * @type { () => void }
704   * @syscap SystemCapability.ArkUI.ArkUI.Full
705   * @crossplatform
706   * @since 12
707   */
708  @BuilderParam contentBuilder: () => void;
709  /**
710   * Sets the CustomContentDialog content area padding.
711   * @type { ?Padding }
712   * @syscap SystemCapability.ArkUI.ArkUI.Full
713   * @crossplatform
714   * @since 12
715   */
716  contentAreaPadding?: Padding;
717  /**
718   * Sets the CustomContentDialog buttons.
719   * @type { ?ButtonOptions[] }
720   * @syscap SystemCapability.ArkUI.ArkUI.Full
721   * @crossplatform
722   * @since 12
723   */
724  buttons?: ButtonOptions[];
725  /**
726   * Custom Theme.
727   *
728   * @type { ?(Theme | CustomTheme) }
729   * @syscap SystemCapability.ArkUI.ArkUI.Full
730   * @crossplatform
731   * @atomicservice
732   * @since 12
733   */
734  theme?: Theme | CustomTheme;
735}