• 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 * Provides the method of switching the cursor position.
23 *
24 * @extends TextContentControllerBase
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 8
27 */
28/**
29 * Provides the method of switching the cursor position.
30 *
31 * @extends TextContentControllerBase
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @crossplatform
34 * @since 10
35 */
36/**
37 * Provides the method of switching the cursor position.
38 *
39 * @extends TextContentControllerBase
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @atomicservice
43 * @since 11
44 */
45declare class SearchController extends TextContentControllerBase {
46  /**
47   * constructor.
48   *
49   * @syscap SystemCapability.ArkUI.ArkUI.Full
50   * @since 8
51   */
52  /**
53   * constructor.
54   *
55   * @syscap SystemCapability.ArkUI.ArkUI.Full
56   * @crossplatform
57   * @since 10
58   */
59  /**
60   * constructor.
61   *
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @atomicservice
65   * @since 11
66   */
67  constructor();
68
69  /**
70   * Called when the position of the insertion cursor is set.
71   *
72   * @param { number } value
73   * @syscap SystemCapability.ArkUI.ArkUI.Full
74   * @since 8
75   */
76  /**
77   * Called when the position of the insertion cursor is set.
78   *
79   * @param { number } value
80   * @syscap SystemCapability.ArkUI.ArkUI.Full
81   * @crossplatform
82   * @since 10
83   */
84  /**
85   * Called when the position of the insertion cursor is set.
86   *
87   * @param { number } value
88   * @syscap SystemCapability.ArkUI.ArkUI.Full
89   * @crossplatform
90   * @atomicservice
91   * @since 11
92   */
93  caretPosition(value: number): void;
94
95  /**
96   * Exit edit state.
97   *
98   * @syscap SystemCapability.ArkUI.ArkUI.Full
99   * @crossplatform
100   * @since 10
101   */
102  /**
103   * Exit edit state.
104   *
105   * @syscap SystemCapability.ArkUI.ArkUI.Full
106   * @crossplatform
107   * @atomicservice
108   * @since 11
109   */
110  stopEditing(): void;
111
112  /**
113   * Text selection is achieved by specifying the start and end positions of the text.
114   *
115   * @param { number } selectionStart - The start position of the selected text.
116   * @param { number } selectionEnd - The end position of the selected text.
117   * @param { SelectionOptions } [options] - Indicates the options of the text selection.
118   * @syscap SystemCapability.ArkUI.ArkUI.Full
119   * @crossplatform
120   * @atomicservice
121   * @since 12
122   */
123  setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void;
124}
125
126/**
127 * Enum for the style of cancel button
128 *
129 * @enum { number }
130 * @syscap SystemCapability.ArkUI.ArkUI.Full
131 * @crossplatform
132 * @since 10
133 */
134/**
135 * Enum for the style of cancel button
136 *
137 * @enum { number }
138 * @syscap SystemCapability.ArkUI.ArkUI.Full
139 * @crossplatform
140 * @atomicservice
141 * @since 11
142 */
143declare enum CancelButtonStyle {
144  /**
145   * The value of button style constant
146   *
147   * @syscap SystemCapability.ArkUI.ArkUI.Full
148   * @crossplatform
149   * @since 10
150   */
151  /**
152   * The value of button style constant
153   *
154   * @syscap SystemCapability.ArkUI.ArkUI.Full
155   * @crossplatform
156   * @atomicservice
157   * @since 11
158   */
159  CONSTANT,
160
161  /**
162   * The value of button style invisible
163   *
164   * @syscap SystemCapability.ArkUI.ArkUI.Full
165   * @crossplatform
166   * @since 10
167   */
168  /**
169   * The value of button style invisible
170   *
171   * @syscap SystemCapability.ArkUI.ArkUI.Full
172   * @crossplatform
173   * @atomicservice
174   * @since 11
175   */
176  INVISIBLE,
177
178  /**
179   * The value of button style input
180   *
181   * @syscap SystemCapability.ArkUI.ArkUI.Full
182   * @crossplatform
183   * @since 10
184   */
185  /**
186   * The value of button style input
187   *
188   * @syscap SystemCapability.ArkUI.ArkUI.Full
189   * @crossplatform
190   * @atomicservice
191   * @since 11
192   */
193  INPUT
194}
195
196/**
197 * Declare the type of search input box
198 *
199 * @enum { number }
200 * @syscap SystemCapability.ArkUI.ArkUI.Full
201 * @crossplatform
202 * @since 11
203 */
204/**
205 * Declare the type of search input box
206 *
207 * @enum { number }
208 * @syscap SystemCapability.ArkUI.ArkUI.Full
209 * @crossplatform
210 * @atomicservice
211 * @since 12
212 */
213declare enum SearchType {
214  /**
215   * Basic input mode.
216   *
217   * @syscap SystemCapability.ArkUI.ArkUI.Full
218   * @crossplatform
219   * @since 11
220   */
221  /**
222   * Basic input mode.
223   *
224   * @syscap SystemCapability.ArkUI.ArkUI.Full
225   * @crossplatform
226   * @atomicservice
227   * @since 12
228   */
229  NORMAL = 0,
230
231  /**
232   * Pure digital input mode.
233   *
234   * @syscap SystemCapability.ArkUI.ArkUI.Full
235   * @crossplatform
236   * @since 11
237   */
238  /**
239   * Pure digital input mode.
240   *
241   * @syscap SystemCapability.ArkUI.ArkUI.Full
242   * @crossplatform
243   * @atomicservice
244   * @since 12
245   */
246  NUMBER = 2,
247
248  /**
249   * Phone number entry mode.
250   *
251   * @syscap SystemCapability.ArkUI.ArkUI.Full
252   * @crossplatform
253   * @since 11
254   */
255  /**
256   * Phone number entry mode.
257   *
258   * @syscap SystemCapability.ArkUI.ArkUI.Full
259   * @crossplatform
260   * @atomicservice
261   * @since 12
262   */
263  PHONE_NUMBER = 3,
264
265  /**
266   * E-mail address input mode.
267   *
268   * @syscap SystemCapability.ArkUI.ArkUI.Full
269   * @crossplatform
270   * @since 11
271   */
272  /**
273   * E-mail address input mode.
274   *
275   * @syscap SystemCapability.ArkUI.ArkUI.Full
276   * @crossplatform
277   * @atomicservice
278   * @since 12
279   */
280  EMAIL = 5,
281
282  /**
283   * Number decimal entry mode.
284   *
285   * @syscap SystemCapability.ArkUI.ArkUI.Full
286   * @crossplatform
287   * @atomicservice
288   * @since 12
289   */
290  NUMBER_DECIMAL = 12,
291
292  /**
293   * URL entry mode.
294   *
295   * @syscap SystemCapability.ArkUI.ArkUI.Full
296   * @crossplatform
297   * @atomicservice
298   * @since 12
299   */
300  URL = 13,
301}
302
303/**
304 * The construct function of search
305 *
306 * @interface SearchInterface
307 * @syscap SystemCapability.ArkUI.ArkUI.Full
308 * @since 8
309 */
310/**
311 * The construct function of search
312 *
313 * @interface SearchInterface
314 * @syscap SystemCapability.ArkUI.ArkUI.Full
315 * @crossplatform
316 * @since 10
317 */
318/**
319 * The construct function of search
320 *
321 * @interface SearchInterface
322 * @syscap SystemCapability.ArkUI.ArkUI.Full
323 * @crossplatform
324 * @atomicservice
325 * @since 11
326 */
327interface SearchInterface {
328  /**
329   * The options of SearchInterface
330   *
331   * @param { object } options
332   * @returns { SearchAttribute }
333   * @syscap SystemCapability.ArkUI.ArkUI.Full
334   * @since 8
335   */
336  /**
337   * The options of SearchInterface
338   *
339   * @param { object } options
340   * @returns { SearchAttribute }
341   * @syscap SystemCapability.ArkUI.ArkUI.Full
342   * @crossplatform
343   * @since 10
344   */
345  /**
346   * The options of SearchInterface
347   *
348   * @param { object } options
349   * @returns { SearchAttribute }
350   * @syscap SystemCapability.ArkUI.ArkUI.Full
351   * @crossplatform
352   * @atomicservice
353   * @since 11
354   */
355  (options?: {
356    /**
357     * Text input in the search text box
358     *
359     * @type { ?string }
360     * @syscap SystemCapability.ArkUI.ArkUI.Full
361     * @since 8
362     */
363    /**
364     * Text input in the search text box
365     *
366     * @type { ?string }
367     * @syscap SystemCapability.ArkUI.ArkUI.Full
368     * @atomicservice
369     * @since 11
370     */
371    value?: string;
372
373    /**
374     * Text displayed when there is no input
375     *
376     * @type { string }
377     * @syscap SystemCapability.ArkUI.ArkUI.Full
378     * @since 8
379     */
380    /**
381     * Text displayed when there is no input
382     *
383     * @type { ?ResourceStr }
384     * @syscap SystemCapability.ArkUI.ArkUI.Full
385     * @since 10
386     */
387    /**
388     * Text displayed when there is no input
389     *
390     * @type { ?ResourceStr }
391     * @syscap SystemCapability.ArkUI.ArkUI.Full
392     * @atomicservice
393     * @since 11
394     */
395    placeholder?: ResourceStr;
396
397    /**
398     * Path to the search icon
399     *
400     * @type { ?string }
401     * @syscap SystemCapability.ArkUI.ArkUI.Full
402     * @since 8
403     */
404    /**
405     * Path to the search icon
406     *
407     * @type { ?string }
408     * @syscap SystemCapability.ArkUI.ArkUI.Full
409     * @atomicservice
410     * @since 11
411     */
412    icon?: string;
413
414    /**
415     * Controller of the <Search> component
416     *
417     * @type { ?SearchController }
418     * @syscap SystemCapability.ArkUI.ArkUI.Full
419     * @since 8
420     */
421    /**
422     * Controller of the <Search> component
423     *
424     * @type { ?SearchController }
425     * @syscap SystemCapability.ArkUI.ArkUI.Full
426     * @atomicservice
427     * @since 11
428     */
429    controller?: SearchController
430  }): SearchAttribute;
431}
432
433/**
434 * Defines the icon options
435 *
436 * @interface IconOptions
437 * @syscap SystemCapability.ArkUI.ArkUI.Full
438 * @crossplatform
439 * @since 10
440 */
441/**
442 * Defines the icon options
443 *
444 * @interface IconOptions
445 * @syscap SystemCapability.ArkUI.ArkUI.Full
446 * @crossplatform
447 * @atomicservice
448 * @since 11
449 */
450interface IconOptions {
451  /**
452   * Set the icon size
453   *
454   * @type { ?Length }
455   * @syscap SystemCapability.ArkUI.ArkUI.Full
456   * @crossplatform
457   * @since 10
458   */
459  /**
460   * Set the icon size
461   *
462   * @type { ?Length }
463   * @syscap SystemCapability.ArkUI.ArkUI.Full
464   * @crossplatform
465   * @atomicservice
466   * @since 11
467   */
468  size?: Length;
469
470  /**
471   * Set the icon color
472   *
473   * @type { ?ResourceColor }
474   * @syscap SystemCapability.ArkUI.ArkUI.Full
475   * @crossplatform
476   * @since 10
477   */
478  /**
479   * Set the icon color
480   *
481   * @type { ?ResourceColor }
482   * @syscap SystemCapability.ArkUI.ArkUI.Full
483   * @crossplatform
484   * @atomicservice
485   * @since 11
486   */
487  color?: ResourceColor;
488
489  /**
490   * Set the icon resource
491   *
492   * @type { ?ResourceStr }
493   * @syscap SystemCapability.ArkUI.ArkUI.Full
494   * @crossplatform
495   * @since 10
496   */
497  /**
498   * Set the icon resource
499   *
500   * @type { ?ResourceStr }
501   * @syscap SystemCapability.ArkUI.ArkUI.Full
502   * @crossplatform
503   * @atomicservice
504   * @since 11
505   */
506  src?: ResourceStr;
507}
508
509/**
510 * Defines the SearchButton options
511 *
512 * @interface SearchButtonOptions
513 * @syscap SystemCapability.ArkUI.ArkUI.Full
514 * @crossplatform
515 * @since 10
516 */
517/**
518 * Defines the SearchButton options
519 *
520 * @interface SearchButtonOptions
521 * @syscap SystemCapability.ArkUI.ArkUI.Full
522 * @crossplatform
523 * @atomicservice
524 * @since 11
525 */
526interface SearchButtonOptions {
527  /**
528   * Set the SearchButton fontSize
529   *
530   * @type { ?Length }
531   * @syscap SystemCapability.ArkUI.ArkUI.Full
532   * @crossplatform
533   * @since 10
534   */
535  /**
536   * Set the SearchButton fontSize
537   *
538   * @type { ?Length }
539   * @syscap SystemCapability.ArkUI.ArkUI.Full
540   * @crossplatform
541   * @atomicservice
542   * @since 11
543   */
544  fontSize?: Length;
545
546  /**
547   * Set the SearchButton fontColor
548   *
549   * @type { ?ResourceColor }
550   * @syscap SystemCapability.ArkUI.ArkUI.Full
551   * @crossplatform
552   * @since 10
553   */
554  /**
555   * Set the SearchButton fontColor
556   *
557   * @type { ?ResourceColor }
558   * @syscap SystemCapability.ArkUI.ArkUI.Full
559   * @crossplatform
560   * @atomicservice
561   * @since 11
562   */
563  fontColor?: ResourceColor;
564}
565
566/**
567 * Defines the CancelButton options
568 *
569 * @interface CancelButtonOptions
570 * @syscap SystemCapability.ArkUI.ArkUI.Full
571 * @crossplatform
572 * @atomicservice
573 * @since 12
574 */
575interface CancelButtonOptions {
576  /**
577   * Set the CancelButton style
578   *
579   * @type { ?CancelButtonStyle }
580   * @syscap SystemCapability.ArkUI.ArkUI.Full
581   * @crossplatform
582   * @atomicservice
583   * @since 12
584   */
585  style?: CancelButtonStyle;
586
587  /**
588   * Set the CancelButton icon
589   *
590   * @type { ?IconOptions }
591   * @syscap SystemCapability.ArkUI.ArkUI.Full
592   * @crossplatform
593   * @atomicservice
594   * @since 12
595   */
596  icon?: IconOptions;
597}
598
599/**
600 * Defines the CancelButton symbol options
601 *
602 * @interface CancelButtonSymbolOptions
603 * @syscap SystemCapability.ArkUI.ArkUI.Full
604 * @atomicservice
605 * @since 12
606 */
607interface CancelButtonSymbolOptions {
608  /**
609   * Set the CancelButton style
610   *
611   * @type { ?CancelButtonStyle }
612   * @syscap SystemCapability.ArkUI.ArkUI.Full
613   * @atomicservice
614   * @since 12
615   */
616  style?: CancelButtonStyle;
617
618  /**
619   * Set the CancelButton symbol icon
620   *
621   * @type { ?SymbolGlyphModifier }
622   * @syscap SystemCapability.ArkUI.ArkUI.Full
623   * @atomicservice
624   * @since 12
625   */
626  icon?: SymbolGlyphModifier;
627}
628
629/**
630 * Declare the event listener callback of the enter key.
631 *
632 * @typedef { function } SearchSubmitCallback
633 * @param { string } searchContent - The submitted content of search.
634 * @param { SubmitEvent } [event] - Provides the method of keeping Search editable state when submitted.
635 * @syscap SystemCapability.ArkUI.ArkUI.Full
636 * @crossplatform
637 * @atomicservice
638 * @since 14
639 */
640declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void;
641
642/**
643 * The attribute function of search
644 *
645 * @extends CommonMethod<SearchAttribute>
646 * @syscap SystemCapability.ArkUI.ArkUI.Full
647 * @since 8
648 */
649/**
650 * The attribute function of search
651 *
652 * @extends CommonMethod<SearchAttribute>
653 * @syscap SystemCapability.ArkUI.ArkUI.Full
654 * @crossplatform
655 * @since 10
656 */
657/**
658 * The attribute function of search
659 *
660 * @extends CommonMethod<SearchAttribute>
661 * @syscap SystemCapability.ArkUI.ArkUI.Full
662 * @crossplatform
663 * @atomicservice
664 * @since 11
665 */
666declare class SearchAttribute extends CommonMethod<SearchAttribute> {
667  /**
668   * Set the search button text
669   *
670   * @param { string } value - indicates the text of the search button.
671   * @param { SearchButtonOption } option
672   * @returns { SearchAttribute }
673   * @syscap SystemCapability.ArkUI.ArkUI.Full
674   * @since 8
675   */
676  /**
677   * Set the search button text, fontSize and fontColor
678   *
679   * @param { string } value - indicates the text of the search button.
680   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
681   * @returns { SearchAttribute }
682   * @syscap SystemCapability.ArkUI.ArkUI.Full
683   * @crossplatform
684   * @since 10
685   */
686  /**
687   * Set the search button text, fontSize and fontColor
688   *
689   * @param { string } value - indicates the text of the search button.
690   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
691   * @returns { SearchAttribute }
692   * @syscap SystemCapability.ArkUI.ArkUI.Full
693   * @crossplatform
694   * @atomicservice
695   * @since 11
696   */
697  searchButton(value: string, option?: SearchButtonOptions): SearchAttribute;
698
699  /**
700   * Set the text Color
701   *
702   * @param { ResourceColor } value - indicates the color of the text.
703   * @returns { SearchAttribute }
704   * @syscap SystemCapability.ArkUI.ArkUI.Full
705   * @crossplatform
706   * @since 10
707   */
708  /**
709   * Set the text Color
710   *
711   * @param { ResourceColor } value - indicates the color of the text.
712   * @returns { SearchAttribute }
713   * @syscap SystemCapability.ArkUI.ArkUI.Full
714   * @crossplatform
715   * @atomicservice
716   * @since 11
717   */
718  fontColor(value: ResourceColor): SearchAttribute;
719
720  /**
721   * Set the search icon style
722   *
723   * @param { IconOptions } value - indicates the style of the search icon.
724   * @returns { SearchAttribute }
725   * @syscap SystemCapability.ArkUI.ArkUI.Full
726   * @crossplatform
727   * @since 10
728   */
729  /**
730   * Set the search icon style
731   *
732   * @param { IconOptions } value - indicates the style of the search icon.
733   * @returns { SearchAttribute }
734   * @syscap SystemCapability.ArkUI.ArkUI.Full
735   * @crossplatform
736   * @atomicservice
737   * @since 11
738   */
739  /**
740   * Set the search icon style
741   *
742   * @param { IconOptions | SymbolGlyphModifier } value - indicates the style of the search icon.
743   * @returns { SearchAttribute }
744   * @syscap SystemCapability.ArkUI.ArkUI.Full
745   * @crossplatform
746   * @atomicservice
747   * @since 12
748   */
749  searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute;
750
751  /**
752   * Set the cancel button style
753   *
754   * @param { object } value - indicates the style of the cancel button.
755   * @returns { SearchAttribute }
756   * @syscap SystemCapability.ArkUI.ArkUI.Full
757   * @crossplatform
758   * @since 10
759   */
760  /**
761   * Set the cancel button style
762   *
763   * @param { object } value - indicates the style of the cancel button.
764   * @returns { SearchAttribute }
765   * @syscap SystemCapability.ArkUI.ArkUI.Full
766   * @crossplatform
767   * @atomicservice
768   * @since 11
769   */
770  /**
771   * Set the cancel button style
772   *
773   * @param { CancelButtonOptions | CancelButtonSymbolOptions } value - indicates the style of the cancel button.
774   * @returns { SearchAttribute }
775   * @syscap SystemCapability.ArkUI.ArkUI.Full
776   * @crossplatform
777   * @atomicservice
778   * @since 12
779   */
780  cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute;
781
782  /**
783   * Specify the indentation of the first line in a text-block.
784   *
785   * @param { Dimension } value - The length of text indent.
786   * @returns { SearchAttribute } The attribute of the text.
787   * @syscap SystemCapability.ArkUI.ArkUI.Full
788   * @crossplatform
789   * @atomicservice
790   * @since 12
791   */
792  textIndent(value: Dimension): SearchAttribute;
793
794  /**
795   * Called when the inputFilter of text is set.
796   *
797   * @param { ResourceStr } value
798   * @param { Callback<string> } error
799   * @returns { SearchAttribute }
800   * @syscap SystemCapability.ArkUI.ArkUI.Full
801   * @crossplatform
802   * @atomicservice
803   * @since 12
804   */
805  inputFilter(value: ResourceStr, error?: Callback<string>): SearchAttribute;
806
807  /**
808   * Called when judging whether the text editing change finished.
809   *
810   * @param { Callback<boolean> } callback
811   * @returns { SearchAttribute }
812   * @syscap SystemCapability.ArkUI.ArkUI.Full
813   * @crossplatform
814   * @atomicservice
815   * @since 12
816   */
817  onEditChange(callback: Callback<boolean>): SearchAttribute;
818
819  /**
820   * Define the text selected background color of the text input.
821   *
822   * @param { ResourceColor } value
823   * @returns { SearchAttribute }
824   * @syscap SystemCapability.ArkUI.ArkUI.Full
825   * @crossplatform
826   * @atomicservice
827   * @since 12
828   */
829  selectedBackgroundColor(value: ResourceColor): SearchAttribute;
830
831  /**
832   * Set the cursor style
833   *
834   * @param { CaretStyle } value - indicates the style of the cursor.
835   * @returns { SearchAttribute }
836   * @syscap SystemCapability.ArkUI.ArkUI.Full
837   * @crossplatform
838   * @since 10
839   */
840  /**
841   * Set the cursor style
842   *
843   * @param { CaretStyle } value - indicates the style of the cursor.
844   * @returns { SearchAttribute }
845   * @syscap SystemCapability.ArkUI.ArkUI.Full
846   * @crossplatform
847   * @atomicservice
848   * @since 11
849   */
850  caretStyle(value: CaretStyle): SearchAttribute;
851
852  /**
853   * Set the place hold text color
854   *
855   * @param { ResourceColor } value
856   * @returns { SearchAttribute }
857   * @syscap SystemCapability.ArkUI.ArkUI.Full
858   * @since 8
859   */
860  /**
861   * Set the place hold text color
862   *
863   * @param { ResourceColor } value
864   * @returns { SearchAttribute }
865   * @syscap SystemCapability.ArkUI.ArkUI.Full
866   * @crossplatform
867   * @since 10
868   */
869  /**
870   * Set the place hold text color
871   *
872   * @param { ResourceColor } value
873   * @returns { SearchAttribute }
874   * @syscap SystemCapability.ArkUI.ArkUI.Full
875   * @crossplatform
876   * @atomicservice
877   * @since 11
878   */
879  placeholderColor(value: ResourceColor): SearchAttribute;
880
881  /**
882   * Set the font used for place holder text
883   *
884   * @param { Font } value
885   * @returns { SearchAttribute }
886   * @syscap SystemCapability.ArkUI.ArkUI.Full
887   * @since 8
888   */
889  /**
890   * Set the font used for place holder text
891   *
892   * @param { Font } value
893   * @returns { SearchAttribute }
894   * @syscap SystemCapability.ArkUI.ArkUI.Full
895   * @crossplatform
896   * @since 10
897   */
898  /**
899   * Set the font used for place holder text
900   *
901   * @param { Font } value
902   * @returns { SearchAttribute }
903   * @syscap SystemCapability.ArkUI.ArkUI.Full
904   * @crossplatform
905   * @atomicservice
906   * @since 11
907   */
908  placeholderFont(value?: Font): SearchAttribute;
909
910  /**
911   * Set the font used for input text
912   *
913   * @param { Font } value
914   * @returns { SearchAttribute }
915   * @syscap SystemCapability.ArkUI.ArkUI.Full
916   * @since 8
917   */
918  /**
919   * Set the font used for input text
920   *
921   * @param { Font } value
922   * @returns { SearchAttribute }
923   * @syscap SystemCapability.ArkUI.ArkUI.Full
924   * @crossplatform
925   * @since 10
926   */
927  /**
928   * Set the font used for input text
929   *
930   * @param { Font } value
931   * @returns { SearchAttribute }
932   * @syscap SystemCapability.ArkUI.ArkUI.Full
933   * @crossplatform
934   * @atomicservice
935   * @since 11
936   */
937  textFont(value?: Font): SearchAttribute;
938
939  /**
940   * Set enter key type of soft keyboard
941   *
942   * @param { EnterKeyType } value
943   * @returns { SearchAttribute }
944   * @syscap SystemCapability.ArkUI.ArkUI.Full
945   * @crossplatform
946   * @atomicservice
947   * @since 12
948   */
949  enterKeyType(value: EnterKeyType): SearchAttribute;
950
951  /**
952   * Call the function when clicked the search button
953   *
954   * @param { function } callback
955   * @returns { SearchAttribute }
956   * @syscap SystemCapability.ArkUI.ArkUI.Full
957   * @since 8
958   */
959  /**
960   * Call the function when clicked the search button
961   *
962   * @param { function } callback
963   * @returns { SearchAttribute }
964   * @syscap SystemCapability.ArkUI.ArkUI.Full
965   * @crossplatform
966   * @since 10
967   */
968  /**
969   * Call the function when clicked the search button
970   *
971   * @param { function } callback
972   * @returns { SearchAttribute }
973   * @syscap SystemCapability.ArkUI.ArkUI.Full
974   * @crossplatform
975   * @atomicservice
976   * @since 11
977   */
978  onSubmit(callback: (value: string) => void): SearchAttribute;
979  /**
980   * Call the function when clicked the search button.
981   *
982   * @param { SearchSubmitCallback } callback - callback of the listened event.
983   * @returns { SearchAttribute }
984   * @syscap SystemCapability.ArkUI.ArkUI.Full
985   * @crossplatform
986   * @atomicservice
987   * @since 14
988   */
989  onSubmit(callback: SearchSubmitCallback): SearchAttribute;
990
991  /**
992   * Call the function when editing the input text
993   *
994   * @param { function } callback
995   * @returns { SearchAttribute }
996   * @syscap SystemCapability.ArkUI.ArkUI.Full
997   * @since 8
998   */
999  /**
1000   * Call the function when editing the input text
1001   *
1002   * @param { function } callback
1003   * @returns { SearchAttribute }
1004   * @syscap SystemCapability.ArkUI.ArkUI.Full
1005   * @crossplatform
1006   * @since 10
1007   */
1008  /**
1009   * Call the function when editing the input text
1010   *
1011   * @param { function } callback
1012   * @returns { SearchAttribute }
1013   * @syscap SystemCapability.ArkUI.ArkUI.Full
1014   * @crossplatform
1015   * @atomicservice
1016   * @since 11
1017   */
1018  /**
1019   * Call the function when editing the input text
1020   *
1021   * @param { EditableTextOnChangeCallback } callback
1022   * @returns { SearchAttribute }
1023   * @syscap SystemCapability.ArkUI.ArkUI.Full
1024   * @crossplatform
1025   * @atomicservice
1026   * @since 12
1027   */
1028  onChange(callback: EditableTextOnChangeCallback): SearchAttribute;
1029
1030  /**
1031   * Called when the text selection changes.
1032   *
1033   * @param { function } callback - callback of the listened event.
1034   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1035   * @syscap SystemCapability.ArkUI.ArkUI.Full
1036   * @crossplatform
1037   * @since 10
1038   */
1039  /**
1040   * Called when the text selection changes.
1041   *
1042   * @param { function } callback - callback of the listened event.
1043   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1044   * @syscap SystemCapability.ArkUI.ArkUI.Full
1045   * @crossplatform
1046   * @atomicservice
1047   * @since 11
1048   */
1049  onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): SearchAttribute;
1050
1051  /**
1052   * Called when the content scrolls.
1053   *
1054   * @param { function } callback - callback of the listened event.
1055   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1056   * @syscap SystemCapability.ArkUI.ArkUI.Full
1057   * @crossplatform
1058   * @since 10
1059   */
1060  /**
1061   * Called when the content scrolls.
1062   *
1063   * @param { function } callback - callback of the listened event.
1064   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1065   * @syscap SystemCapability.ArkUI.ArkUI.Full
1066   * @crossplatform
1067   * @atomicservice
1068   * @since 11
1069   */
1070  onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): SearchAttribute;
1071
1072  /**
1073   * Called when using the Clipboard menu
1074   *
1075   * @param { function } callback
1076   * @returns { SearchAttribute }
1077   * @syscap SystemCapability.ArkUI.ArkUI.Full
1078   * @since 8
1079   */
1080  /**
1081   * Called when using the Clipboard menu
1082   *
1083   * @param { function } callback
1084   * @returns { SearchAttribute }
1085   * @syscap SystemCapability.ArkUI.ArkUI.Full
1086   * @crossplatform
1087   * @since 10
1088   */
1089  /**
1090   * Called when using the Clipboard menu
1091   *
1092   * @param { function } callback
1093   * @returns { SearchAttribute }
1094   * @syscap SystemCapability.ArkUI.ArkUI.Full
1095   * @crossplatform
1096   * @atomicservice
1097   * @since 11
1098   */
1099  onCopy(callback: (value: string) => void): SearchAttribute;
1100
1101  /**
1102   * Called when using the Clipboard menu
1103   *
1104   * @param { function } callback
1105   * @returns { SearchAttribute }
1106   * @syscap SystemCapability.ArkUI.ArkUI.Full
1107   * @since 8
1108   */
1109  /**
1110   * Called when using the Clipboard menu
1111   *
1112   * @param { function } callback
1113   * @returns { SearchAttribute }
1114   * @syscap SystemCapability.ArkUI.ArkUI.Full
1115   * @crossplatform
1116   * @since 10
1117   */
1118  /**
1119   * Called when using the Clipboard menu
1120   *
1121   * @param { function } callback
1122   * @returns { SearchAttribute }
1123   * @syscap SystemCapability.ArkUI.ArkUI.Full
1124   * @crossplatform
1125   * @atomicservice
1126   * @since 11
1127   */
1128  onCut(callback: (value: string) => void): SearchAttribute;
1129
1130  /**
1131   * Called when using the Clipboard menu
1132   *
1133   * @param { function } callback
1134   * @returns { SearchAttribute }
1135   * @syscap SystemCapability.ArkUI.ArkUI.Full
1136   * @since 8
1137   */
1138  /**
1139   * Called when using the Clipboard menu
1140   *
1141   * @param { function } callback
1142   * @returns { SearchAttribute }
1143   * @syscap SystemCapability.ArkUI.ArkUI.Full
1144   * @crossplatform
1145   * @since 10
1146   */
1147  /**
1148   * Called when using the Clipboard menu
1149   *
1150   * @param { function } callback
1151   *          Executed when a paste operation is performed.
1152   *          { string } value - The text content to be pasted.
1153   *          { PasteEvent } event - The user-defined paste event.
1154   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1155   * @syscap SystemCapability.ArkUI.ArkUI.Full
1156   * @crossplatform
1157   * @atomicservice
1158   * @since 11
1159   */
1160  onPaste(callback: (value: string, event: PasteEvent) => void): SearchAttribute;
1161
1162  /**
1163   * Called when the copy option is set.
1164   *
1165   * @param { CopyOptions } value
1166   * @returns { SearchAttribute }
1167   * @syscap SystemCapability.ArkUI.ArkUI.Full
1168   * @since 9
1169   */
1170  /**
1171   * Called when the copy option is set.
1172   *
1173   * @param { CopyOptions } value
1174   * @returns { SearchAttribute }
1175   * @syscap SystemCapability.ArkUI.ArkUI.Full
1176   * @crossplatform
1177   * @since 10
1178   */
1179  /**
1180   * Called when the copy option is set.
1181   *
1182   * @param { CopyOptions } value
1183   * @returns { SearchAttribute }
1184   * @syscap SystemCapability.ArkUI.ArkUI.Full
1185   * @crossplatform
1186   * @atomicservice
1187   * @since 11
1188   */
1189  copyOption(value: CopyOptions): SearchAttribute;
1190
1191  /**
1192   * Called when the input of maximum text length is set.
1193   *
1194   * @param { number } value
1195   * @returns { SearchAttribute }
1196   * @syscap SystemCapability.ArkUI.ArkUI.Full
1197   * crossplatform
1198   * @since 11
1199   */
1200  /**
1201   * Called when the input of maximum text length is set.
1202   *
1203   * @param { number } value
1204   * @returns { SearchAttribute }
1205   * @syscap SystemCapability.ArkUI.ArkUI.Full
1206   * crossplatform
1207   * @atomicservice
1208   * @since 12
1209   */
1210  maxLength(value: number): SearchAttribute;
1211
1212  /**
1213   * Called when the text align is set.
1214   *
1215   * @param { TextAlign } value
1216   * @returns { SearchAttribute }
1217   * @syscap SystemCapability.ArkUI.ArkUI.Full
1218   * @since 9
1219   */
1220  /**
1221   * Called when the text align is set.
1222   *
1223   * @param { TextAlign } value
1224   * @returns { SearchAttribute }
1225   * @syscap SystemCapability.ArkUI.ArkUI.Full
1226   * @crossplatform
1227   * @since 10
1228   */
1229  /**
1230   * Called when the text align is set.
1231   *
1232   * @param { TextAlign } value
1233   * @returns { SearchAttribute }
1234   * @syscap SystemCapability.ArkUI.ArkUI.Full
1235   * @crossplatform
1236   * @atomicservice
1237   * @since 11
1238   */
1239  textAlign(value: TextAlign): SearchAttribute;
1240
1241  /**
1242   * Sets whether request keyboard or not when on focus.
1243   *
1244   * @param { boolean } value
1245   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1246   * @syscap SystemCapability.ArkUI.ArkUI.Full
1247   * @crossplatform
1248   * @since 10
1249   */
1250  /**
1251   * Sets whether request keyboard or not when on focus.
1252   *
1253   * @param { boolean } value
1254   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1255   * @syscap SystemCapability.ArkUI.ArkUI.Full
1256   * @crossplatform
1257   * @atomicservice
1258   * @since 11
1259   */
1260  enableKeyboardOnFocus(value: boolean): SearchAttribute;
1261
1262  /**
1263   * Controls whether the selection menu pops up.
1264   *
1265   * @param { boolean } value
1266   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1267   * @syscap SystemCapability.ArkUI.ArkUI.Full
1268   * @crossplatform
1269   * @since 10
1270   */
1271  /**
1272   * Controls whether the selection menu pops up.
1273   *
1274   * @param { boolean } value
1275   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1276   * @syscap SystemCapability.ArkUI.ArkUI.Full
1277   * @crossplatform
1278   * @atomicservice
1279   * @since 11
1280   */
1281  selectionMenuHidden(value: boolean): SearchAttribute;
1282
1283  /**
1284   * Called when the minimum font size of the font is set.
1285   *
1286   * @param { number | string | Resource } value
1287   * @returns { SearchAttribute }
1288   * @syscap SystemCapability.ArkUI.ArkUI.Full
1289   * @crossplatform
1290   * @atomicservice
1291   * @since 12
1292   */
1293  minFontSize(value: number | string | Resource): SearchAttribute;
1294
1295  /**
1296   * Called when the maximum font size of the font is set.
1297   *
1298   * @param { number | string | Resource } value
1299   * @returns { SearchAttribute }
1300   * @syscap SystemCapability.ArkUI.ArkUI.Full
1301   * @crossplatform
1302   * @atomicservice
1303   * @since 12
1304   */
1305  maxFontSize(value: number | string | Resource): SearchAttribute;
1306
1307  /**
1308   * Define custom keyboard.
1309   *
1310   * @param { CustomBuilder } value
1311   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1312   * @syscap SystemCapability.ArkUI.ArkUI.Full
1313   * @since 10
1314   */
1315  /**
1316   * Define custom keyboard.
1317   *
1318   * @param { CustomBuilder } value
1319   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1320   * @syscap SystemCapability.ArkUI.ArkUI.Full
1321   * @crossplatform
1322   * @atomicservice
1323   * @since 11
1324   */
1325  /**
1326   * Define custom keyboard.
1327   *
1328   * @param { CustomBuilder } value - Set up a custom keyboard of Search
1329   * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of Search
1330   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1331   * @syscap SystemCapability.ArkUI.ArkUI.Full
1332   * @crossplatform
1333   * @atomicservice
1334   * @since 12
1335   */
1336  customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute;
1337
1338  /**
1339   * Called when the text decoration of the text is set.
1340   *
1341   * @param { TextDecorationOptions } value
1342   * @returns { SearchAttribute }
1343   * @syscap SystemCapability.ArkUI.ArkUI.Full
1344   * @crossplatform
1345   * @atomicservice
1346   * @since 12
1347   */
1348  decoration(value: TextDecorationOptions): SearchAttribute;
1349
1350  /**
1351   * Called when the distance between text fonts is set.
1352   *
1353   * @param { number | string | Resource } value
1354   * @returns { SearchAttribute }
1355   * @syscap SystemCapability.ArkUI.ArkUI.Full
1356   * @crossplatform
1357   * @atomicservice
1358   * @since 12
1359   */
1360  letterSpacing(value: number | string | Resource): SearchAttribute;
1361
1362  /**
1363   * Called when the line height of the font is set.
1364   *
1365   * @param { number | string | Resource } value
1366   * @returns { SearchAttribute }
1367   * @syscap SystemCapability.ArkUI.ArkUI.Full
1368   * @crossplatform
1369   * @atomicservice
1370   * @since 12
1371   */
1372  lineHeight(value: number | string | Resource): SearchAttribute;
1373
1374  /**
1375   * Called when the search type is set.
1376   *
1377   * @param { SearchType } value
1378   * @returns { SearchAttribute }
1379   * @syscap SystemCapability.ArkUI.ArkUI.Full
1380   * @crossplatform
1381   * @since 11
1382   */
1383  /**
1384   * Called when the search type is set.
1385   *
1386   * @param { SearchType } value
1387   * @returns { SearchAttribute }
1388   * @syscap SystemCapability.ArkUI.ArkUI.Full
1389   * @crossplatform
1390   * @atomicservice
1391   * @since 12
1392   */
1393  type(value: SearchType): SearchAttribute;
1394
1395  /**
1396   * Set font feature.
1397   *
1398   * @param { string } value - The fontFeature.
1399   * normal | <feature-tag-value>,
1400   * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0
1401   * the values of <feature-tag-value> reference to doc of search component
1402   * number of <feature-tag-value> can be single or multiple, and separated by comma ','.
1403   * @returns { SearchAttribute }
1404   * @syscap SystemCapability.ArkUI.ArkUI.Full
1405   * @crossplatform
1406   * @atomicservice
1407   * @since 12
1408   */
1409  fontFeature(value: string): SearchAttribute;
1410
1411  /**
1412   * Get text value information when about to input.
1413   *
1414   * @param { Callback<InsertValue, boolean> } callback - The triggered function when text content is about to insert.
1415   * @returns { SearchAttribute }
1416   * @syscap SystemCapability.ArkUI.ArkUI.Full
1417   * @crossplatform
1418   * @atomicservice
1419   * @since 12
1420   */
1421  onWillInsert(callback: Callback<InsertValue, boolean>): SearchAttribute;
1422
1423  /**
1424   * Get text value information when completed input.
1425   *
1426   * @param { Callback<InsertValue> } callback - The triggered function when text content has been inserted.
1427   * @returns { SearchAttribute }
1428   * @syscap SystemCapability.ArkUI.ArkUI.Full
1429   * @crossplatform
1430   * @atomicservice
1431   * @since 12
1432   */
1433  onDidInsert(callback: Callback<InsertValue>): SearchAttribute;
1434
1435  /**
1436   * Get text value information when about to delete.
1437   *
1438   * @param { Callback<DeleteValue, boolean> } callback - The triggered function when text content is about to delete.
1439   * @returns { SearchAttribute }
1440   * @syscap SystemCapability.ArkUI.ArkUI.Full
1441   * @crossplatform
1442   * @atomicservice
1443   * @since 12
1444   */
1445  onWillDelete(callback: Callback<DeleteValue, boolean>): SearchAttribute;
1446
1447  /**
1448   * Get text value information when the deletion has been completed
1449   *
1450   * @param { Callback<DeleteValue> } callback - The triggered function when text content has been deleted.
1451   * @returns { SearchAttribute }
1452   * @syscap SystemCapability.ArkUI.ArkUI.Full
1453   * @crossplatform
1454   * @atomicservice
1455   * @since 12
1456   */
1457  onDidDelete(callback: Callback<DeleteValue>): SearchAttribute;
1458
1459  /**
1460   * Set the custom text menu.
1461   *
1462   * @param { EditMenuOptions } editMenu - Customize text menu options.
1463   * @returns { SearchAttribute }
1464   * @syscap SystemCapability.ArkUI.ArkUI.Full
1465   * @crossplatform
1466   * @atomicservice
1467   * @since 12
1468   */
1469  editMenuOptions(editMenu: EditMenuOptions): SearchAttribute;
1470
1471  /**
1472   * Define the preview text mode of the text input.
1473   *
1474   * @param { boolean } enable - Indicates the preview text mode.
1475   * @returns { SearchAttribute }
1476   * @syscap SystemCapability.ArkUI.ArkUI.Full
1477   * @crossplatform
1478   * @atomicservice
1479   * @since 12
1480   */
1481  enablePreviewText(enable: boolean): SearchAttribute;
1482
1483  /**
1484   * Enable or disable haptic feedback.
1485   *
1486   * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback.
1487   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1488   * @syscap SystemCapability.ArkUI.ArkUI.Full
1489   * @crossplatform
1490   * @atomicservice
1491   * @since 13
1492   */
1493  enableHapticFeedback(isEnabled: boolean): SearchAttribute;
1494
1495  /**
1496   * Set whether stop backPressed callback event or not.
1497   *
1498   * @param { Optional<boolean> } isStopped - Default value is true, set false to trigger the latest callback event.
1499   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1500   * @syscap SystemCapability.ArkUI.ArkUI.Full
1501   * @atomicservice
1502   * @since 15
1503   */
1504  stopBackPress(isStopped: Optional<boolean>): SearchAttribute;
1505
1506  /**
1507   * Set the keyboard appearance.
1508   *
1509   * @param { Optional<KeyboardAppearance> } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE
1510   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1511   * @syscap SystemCapability.ArkUI.ArkUI.Full
1512   * @atomicservice
1513   * @since 15
1514   */
1515  keyboardAppearance(appearance: Optional<KeyboardAppearance>): SearchAttribute;
1516
1517  /**
1518   * Get text value information when about to change.
1519   *
1520   * @param { Callback<EditableTextChangeValue, boolean> } callback - The triggered function when text content is about to change.
1521   * @returns { SearchAttribute }
1522   * @syscap SystemCapability.ArkUI.ArkUI.Full
1523   * @crossplatform
1524   * @atomicservice
1525   * @since 15
1526   */
1527  onWillChange(callback: Callback<EditableTextChangeValue, boolean>): SearchAttribute;
1528}
1529
1530/**
1531 * Defines Search Component.
1532 *
1533 * @syscap SystemCapability.ArkUI.ArkUI.Full
1534 * @since 8
1535 */
1536/**
1537 * Defines Search Component.
1538 *
1539 * @syscap SystemCapability.ArkUI.ArkUI.Full
1540 * @crossplatform
1541 * @since 10
1542 */
1543/**
1544 * Defines Search Component.
1545 *
1546 * @syscap SystemCapability.ArkUI.ArkUI.Full
1547 * @crossplatform
1548 * @atomicservice
1549 * @since 11
1550 */
1551declare const Search: SearchInterface;
1552
1553/**
1554 * Defines Search Component instance.
1555 *
1556 * @syscap SystemCapability.ArkUI.ArkUI.Full
1557 * @since 8
1558 */
1559/**
1560 * Defines Search Component instance.
1561 *
1562 * @syscap SystemCapability.ArkUI.ArkUI.Full
1563 * @crossplatform
1564 * @since 10
1565 */
1566/**
1567 * Defines Search Component instance.
1568 *
1569 * @syscap SystemCapability.ArkUI.ArkUI.Full
1570 * @crossplatform
1571 * @atomicservice
1572 * @since 11
1573 */
1574declare const SearchInstance: SearchAttribute;
1575