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