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 * Options used to construct the search.
305 *
306 * @typedef SearchOptions
307 * @syscap SystemCapability.ArkUI.ArkUI.Full
308 * @crossplatform
309 * @atomicservice
310 * @since 14
311 */
312declare interface SearchOptions {
313  /**
314   * Text input in the search text box.
315   *
316   * @type { ?string }
317   * @syscap SystemCapability.ArkUI.ArkUI.Full
318   * @since 8
319   */
320  /**
321   * Text input in the search text box.
322   *
323   * @type { ?string }
324   * @syscap SystemCapability.ArkUI.ArkUI.Full
325   * @atomicservice
326   * @since 11
327   */
328  value?: string;
329
330  /**
331   * Text displayed when there is no input.
332   *
333   * @type { string }
334   * @syscap SystemCapability.ArkUI.ArkUI.Full
335   * @since 8
336   */
337  /**
338   * Text displayed when there is no input.
339   *
340   * @type { ?ResourceStr }
341   * @syscap SystemCapability.ArkUI.ArkUI.Full
342   * @since 10
343   */
344  /**
345   * Text displayed when there is no input.
346   *
347   * @type { ?ResourceStr }
348   * @syscap SystemCapability.ArkUI.ArkUI.Full
349   * @atomicservice
350   * @since 11
351   */
352  placeholder?: ResourceStr;
353
354  /**
355   * Path to the search icon.
356   *
357   * @type { ?string }
358   * @syscap SystemCapability.ArkUI.ArkUI.Full
359   * @since 8
360   */
361  /**
362   * Path to the search icon.
363   *
364   * @type { ?string }
365   * @syscap SystemCapability.ArkUI.ArkUI.Full
366   * @atomicservice
367   * @since 11
368   */
369  icon?: string;
370
371  /**
372   * Controller of the <Search> component.
373   *
374   * @type { ?SearchController }
375   * @syscap SystemCapability.ArkUI.ArkUI.Full
376   * @since 8
377   */
378  /**
379   * Controller of the <Search> component.
380   *
381   * @type { ?SearchController }
382   * @syscap SystemCapability.ArkUI.ArkUI.Full
383   * @atomicservice
384   * @since 11
385   */
386  controller?: SearchController;
387}
388
389/**
390 * The construct function of search
391 *
392 * @interface SearchInterface
393 * @syscap SystemCapability.ArkUI.ArkUI.Full
394 * @since 8
395 */
396/**
397 * The construct function of search
398 *
399 * @interface SearchInterface
400 * @syscap SystemCapability.ArkUI.ArkUI.Full
401 * @crossplatform
402 * @since 10
403 */
404/**
405 * The construct function of search
406 *
407 * @interface SearchInterface
408 * @syscap SystemCapability.ArkUI.ArkUI.Full
409 * @crossplatform
410 * @atomicservice
411 * @since 11
412 */
413interface SearchInterface {
414  /**
415   * The options of SearchInterface
416   *
417   * @param { object } options
418   * @returns { SearchAttribute }
419   * @syscap SystemCapability.ArkUI.ArkUI.Full
420   * @since 8
421   */
422  /**
423   * The options of SearchInterface
424   *
425   * @param { object } options
426   * @returns { SearchAttribute }
427   * @syscap SystemCapability.ArkUI.ArkUI.Full
428   * @crossplatform
429   * @since 10
430   */
431  /**
432   * The options of SearchInterface
433   *
434   * @param { object } options
435   * @returns { SearchAttribute }
436   * @syscap SystemCapability.ArkUI.ArkUI.Full
437   * @crossplatform
438   * @atomicservice
439   * @since 11
440   */
441  /**
442   * The options of SearchInterface.
443   *
444   * @param { SearchOptions } [options] - Search options.
445   * @returns { SearchAttribute }
446   * @syscap SystemCapability.ArkUI.ArkUI.Full
447   * @crossplatform
448   * @atomicservice
449   * @since 14
450   */
451  (options?: SearchOptions): SearchAttribute;
452}
453
454/**
455 * Defines the icon options
456 *
457 * @interface IconOptions
458 * @syscap SystemCapability.ArkUI.ArkUI.Full
459 * @crossplatform
460 * @since 10
461 */
462/**
463 * Defines the icon options
464 *
465 * @interface IconOptions
466 * @syscap SystemCapability.ArkUI.ArkUI.Full
467 * @crossplatform
468 * @atomicservice
469 * @since 11
470 */
471interface IconOptions {
472  /**
473   * Set the icon size
474   *
475   * @type { ?Length }
476   * @syscap SystemCapability.ArkUI.ArkUI.Full
477   * @crossplatform
478   * @since 10
479   */
480  /**
481   * Set the icon size
482   *
483   * @type { ?Length }
484   * @syscap SystemCapability.ArkUI.ArkUI.Full
485   * @crossplatform
486   * @atomicservice
487   * @since 11
488   */
489  size?: Length;
490
491  /**
492   * Set the icon color
493   *
494   * @type { ?ResourceColor }
495   * @syscap SystemCapability.ArkUI.ArkUI.Full
496   * @crossplatform
497   * @since 10
498   */
499  /**
500   * Set the icon color
501   *
502   * @type { ?ResourceColor }
503   * @syscap SystemCapability.ArkUI.ArkUI.Full
504   * @crossplatform
505   * @atomicservice
506   * @since 11
507   */
508  color?: ResourceColor;
509
510  /**
511   * Set the icon resource
512   *
513   * @type { ?ResourceStr }
514   * @syscap SystemCapability.ArkUI.ArkUI.Full
515   * @crossplatform
516   * @since 10
517   */
518  /**
519   * Set the icon resource
520   *
521   * @type { ?ResourceStr }
522   * @syscap SystemCapability.ArkUI.ArkUI.Full
523   * @crossplatform
524   * @atomicservice
525   * @since 11
526   */
527  src?: ResourceStr;
528}
529
530/**
531 * Defines the SearchButton options
532 *
533 * @interface SearchButtonOptions
534 * @syscap SystemCapability.ArkUI.ArkUI.Full
535 * @crossplatform
536 * @since 10
537 */
538/**
539 * Defines the SearchButton options
540 *
541 * @interface SearchButtonOptions
542 * @syscap SystemCapability.ArkUI.ArkUI.Full
543 * @crossplatform
544 * @atomicservice
545 * @since 11
546 */
547interface SearchButtonOptions {
548  /**
549   * Set the SearchButton fontSize
550   *
551   * @type { ?Length }
552   * @syscap SystemCapability.ArkUI.ArkUI.Full
553   * @crossplatform
554   * @since 10
555   */
556  /**
557   * Set the SearchButton fontSize
558   *
559   * @type { ?Length }
560   * @syscap SystemCapability.ArkUI.ArkUI.Full
561   * @crossplatform
562   * @atomicservice
563   * @since 11
564   */
565  fontSize?: Length;
566
567  /**
568   * Set the SearchButton fontColor
569   *
570   * @type { ?ResourceColor }
571   * @syscap SystemCapability.ArkUI.ArkUI.Full
572   * @crossplatform
573   * @since 10
574   */
575  /**
576   * Set the SearchButton fontColor
577   *
578   * @type { ?ResourceColor }
579   * @syscap SystemCapability.ArkUI.ArkUI.Full
580   * @crossplatform
581   * @atomicservice
582   * @since 11
583   */
584  fontColor?: ResourceColor;
585
586  /**
587   * Automatically disables the search button before the user enters text
588   *
589   * @type { ?Boolean }
590   * @syscap SystemCapability.ArkUI.ArkUI.Full
591   * @crossplatform
592   * @atomicservice
593   * @since 14
594   */
595  autoDisable?: Boolean;
596}
597
598/**
599 * Defines the CancelButton options
600 *
601 * @interface CancelButtonOptions
602 * @syscap SystemCapability.ArkUI.ArkUI.Full
603 * @crossplatform
604 * @atomicservice
605 * @since 12
606 */
607interface CancelButtonOptions {
608  /**
609   * Set the CancelButton style
610   *
611   * @type { ?CancelButtonStyle }
612   * @syscap SystemCapability.ArkUI.ArkUI.Full
613   * @crossplatform
614   * @atomicservice
615   * @since 12
616   */
617  style?: CancelButtonStyle;
618
619  /**
620   * Set the CancelButton icon
621   *
622   * @type { ?IconOptions }
623   * @syscap SystemCapability.ArkUI.ArkUI.Full
624   * @crossplatform
625   * @atomicservice
626   * @since 12
627   */
628  icon?: IconOptions;
629}
630
631/**
632 * Defines the CancelButton symbol options
633 *
634 * @interface CancelButtonSymbolOptions
635 * @syscap SystemCapability.ArkUI.ArkUI.Full
636 * @crossplatform
637 * @atomicservice
638 * @since 12
639 */
640interface CancelButtonSymbolOptions {
641  /**
642   * Set the CancelButton style
643   *
644   * @type { ?CancelButtonStyle }
645   * @syscap SystemCapability.ArkUI.ArkUI.Full
646   * @crossplatform
647   * @atomicservice
648   * @since 12
649   */
650  style?: CancelButtonStyle;
651
652  /**
653   * Set the CancelButton symbol icon
654   *
655   * @type { ?SymbolGlyphModifier }
656   * @syscap SystemCapability.ArkUI.ArkUI.Full
657   * @crossplatform
658   * @atomicservice
659   * @since 12
660   */
661  icon?: SymbolGlyphModifier;
662}
663
664/**
665 * The attribute function of search
666 *
667 * @extends CommonMethod<SearchAttribute>
668 * @syscap SystemCapability.ArkUI.ArkUI.Full
669 * @since 8
670 */
671/**
672 * The attribute function of search
673 *
674 * @extends CommonMethod<SearchAttribute>
675 * @syscap SystemCapability.ArkUI.ArkUI.Full
676 * @crossplatform
677 * @since 10
678 */
679/**
680 * The attribute function of search
681 *
682 * @extends CommonMethod<SearchAttribute>
683 * @syscap SystemCapability.ArkUI.ArkUI.Full
684 * @crossplatform
685 * @atomicservice
686 * @since 11
687 */
688declare class SearchAttribute extends CommonMethod<SearchAttribute> {
689  /**
690   * Set the search button text
691   *
692   * @param { string } value - indicates the text of the search button.
693   * @param { SearchButtonOption } option
694   * @returns { SearchAttribute }
695   * @syscap SystemCapability.ArkUI.ArkUI.Full
696   * @since 8
697   */
698  /**
699   * Set the search button text, fontSize and fontColor
700   *
701   * @param { string } value - indicates the text of the search button.
702   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
703   * @returns { SearchAttribute }
704   * @syscap SystemCapability.ArkUI.ArkUI.Full
705   * @crossplatform
706   * @since 10
707   */
708  /**
709   * Set the search button text, fontSize and fontColor
710   *
711   * @param { string } value - indicates the text of the search button.
712   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
713   * @returns { SearchAttribute }
714   * @syscap SystemCapability.ArkUI.ArkUI.Full
715   * @crossplatform
716   * @atomicservice
717   * @since 11
718   */
719  searchButton(value: string, option?: SearchButtonOptions): SearchAttribute;
720
721  /**
722   * Set the text Color
723   *
724   * @param { ResourceColor } value - indicates the color of the text.
725   * @returns { SearchAttribute }
726   * @syscap SystemCapability.ArkUI.ArkUI.Full
727   * @crossplatform
728   * @since 10
729   */
730  /**
731   * Set the text Color
732   *
733   * @param { ResourceColor } value - indicates the color of the text.
734   * @returns { SearchAttribute }
735   * @syscap SystemCapability.ArkUI.ArkUI.Full
736   * @crossplatform
737   * @atomicservice
738   * @since 11
739   */
740  fontColor(value: ResourceColor): SearchAttribute;
741
742  /**
743   * Set the search icon style
744   *
745   * @param { IconOptions } value - indicates the style of the search icon.
746   * @returns { SearchAttribute }
747   * @syscap SystemCapability.ArkUI.ArkUI.Full
748   * @crossplatform
749   * @since 10
750   */
751  /**
752   * Set the search icon style
753   *
754   * @param { IconOptions } value - indicates the style of the search icon.
755   * @returns { SearchAttribute }
756   * @syscap SystemCapability.ArkUI.ArkUI.Full
757   * @crossplatform
758   * @atomicservice
759   * @since 11
760   */
761  /**
762   * Set the search icon style
763   *
764   * @param { IconOptions | SymbolGlyphModifier } value - indicates the style of the search icon.
765   * @returns { SearchAttribute }
766   * @syscap SystemCapability.ArkUI.ArkUI.Full
767   * @crossplatform
768   * @atomicservice
769   * @since 12
770   */
771  searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute;
772
773  /**
774   * Set the cancel button style
775   *
776   * @param { object } value - indicates the style of the cancel button.
777   * @returns { SearchAttribute }
778   * @syscap SystemCapability.ArkUI.ArkUI.Full
779   * @crossplatform
780   * @since 10
781   */
782  /**
783   * Set the cancel button style
784   *
785   * @param { object } value - indicates the style of the cancel button.
786   * @returns { SearchAttribute }
787   * @syscap SystemCapability.ArkUI.ArkUI.Full
788   * @crossplatform
789   * @atomicservice
790   * @since 11
791   */
792  /**
793   * Set the cancel button style
794   *
795   * @param { CancelButtonOptions | CancelButtonSymbolOptions } value - indicates the style of the cancel button.
796   * @returns { SearchAttribute }
797   * @syscap SystemCapability.ArkUI.ArkUI.Full
798   * @crossplatform
799   * @atomicservice
800   * @since 12
801   */
802  cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute;
803
804  /**
805   * Specify the indentation of the first line in a text-block.
806   *
807   * @param { Dimension } value - The length of text indent.
808   * @returns { SearchAttribute } The attribute of the text.
809   * @syscap SystemCapability.ArkUI.ArkUI.Full
810   * @crossplatform
811   * @atomicservice
812   * @since 12
813   */
814  textIndent(value: Dimension): SearchAttribute;
815
816  /**
817   * Called when the inputFilter of text is set.
818   *
819   * @param { ResourceStr } value
820   * @param { Callback<string> } error
821   * @returns { SearchAttribute }
822   * @syscap SystemCapability.ArkUI.ArkUI.Full
823   * @crossplatform
824   * @atomicservice
825   * @since 12
826   */
827  inputFilter(value: ResourceStr, error?: Callback<string>): SearchAttribute;
828
829  /**
830   * Called when judging whether the text editing change finished.
831   *
832   * @param { Callback<boolean> } callback
833   * @returns { SearchAttribute }
834   * @syscap SystemCapability.ArkUI.ArkUI.Full
835   * @crossplatform
836   * @atomicservice
837   * @since 12
838   */
839  onEditChange(callback: Callback<boolean>): SearchAttribute;
840
841  /**
842   * Define the text selected background color of the text input.
843   *
844   * @param { ResourceColor } value
845   * @returns { SearchAttribute }
846   * @syscap SystemCapability.ArkUI.ArkUI.Full
847   * @crossplatform
848   * @atomicservice
849   * @since 12
850   */
851  selectedBackgroundColor(value: ResourceColor): SearchAttribute;
852
853  /**
854   * Set the cursor style
855   *
856   * @param { CaretStyle } value - indicates the style of the cursor.
857   * @returns { SearchAttribute }
858   * @syscap SystemCapability.ArkUI.ArkUI.Full
859   * @crossplatform
860   * @since 10
861   */
862  /**
863   * Set the cursor style
864   *
865   * @param { CaretStyle } value - indicates the style of the cursor.
866   * @returns { SearchAttribute }
867   * @syscap SystemCapability.ArkUI.ArkUI.Full
868   * @crossplatform
869   * @atomicservice
870   * @since 11
871   */
872  caretStyle(value: CaretStyle): SearchAttribute;
873
874  /**
875   * Set the place hold text color
876   *
877   * @param { ResourceColor } value
878   * @returns { SearchAttribute }
879   * @syscap SystemCapability.ArkUI.ArkUI.Full
880   * @since 8
881   */
882  /**
883   * Set the place hold text color
884   *
885   * @param { ResourceColor } value
886   * @returns { SearchAttribute }
887   * @syscap SystemCapability.ArkUI.ArkUI.Full
888   * @crossplatform
889   * @since 10
890   */
891  /**
892   * Set the place hold text color
893   *
894   * @param { ResourceColor } value
895   * @returns { SearchAttribute }
896   * @syscap SystemCapability.ArkUI.ArkUI.Full
897   * @crossplatform
898   * @atomicservice
899   * @since 11
900   */
901  placeholderColor(value: ResourceColor): SearchAttribute;
902
903  /**
904   * Set the font used for place holder text
905   *
906   * @param { Font } value
907   * @returns { SearchAttribute }
908   * @syscap SystemCapability.ArkUI.ArkUI.Full
909   * @since 8
910   */
911  /**
912   * Set the font used for place holder text
913   *
914   * @param { Font } value
915   * @returns { SearchAttribute }
916   * @syscap SystemCapability.ArkUI.ArkUI.Full
917   * @crossplatform
918   * @since 10
919   */
920  /**
921   * Set the font used for place holder text
922   *
923   * @param { Font } value
924   * @returns { SearchAttribute }
925   * @syscap SystemCapability.ArkUI.ArkUI.Full
926   * @crossplatform
927   * @atomicservice
928   * @since 11
929   */
930  placeholderFont(value?: Font): SearchAttribute;
931
932  /**
933   * Set the font used for input text
934   *
935   * @param { Font } value
936   * @returns { SearchAttribute }
937   * @syscap SystemCapability.ArkUI.ArkUI.Full
938   * @since 8
939   */
940  /**
941   * Set the font used for input text
942   *
943   * @param { Font } value
944   * @returns { SearchAttribute }
945   * @syscap SystemCapability.ArkUI.ArkUI.Full
946   * @crossplatform
947   * @since 10
948   */
949  /**
950   * Set the font used for input text
951   *
952   * @param { Font } value
953   * @returns { SearchAttribute }
954   * @syscap SystemCapability.ArkUI.ArkUI.Full
955   * @crossplatform
956   * @atomicservice
957   * @since 11
958   */
959  textFont(value?: Font): SearchAttribute;
960
961  /**
962   * Set enter key type of soft keyboard
963   *
964   * @param { EnterKeyType } value
965   * @returns { SearchAttribute }
966   * @syscap SystemCapability.ArkUI.ArkUI.Full
967   * @crossplatform
968   * @atomicservice
969   * @since 12
970   */
971  enterKeyType(value: EnterKeyType): SearchAttribute;
972
973  /**
974   * Call the function when clicked the search button
975   *
976   * @param { function } callback
977   * @returns { SearchAttribute }
978   * @syscap SystemCapability.ArkUI.ArkUI.Full
979   * @since 8
980   */
981  /**
982   * Call the function when clicked the search button
983   *
984   * @param { function } callback
985   * @returns { SearchAttribute }
986   * @syscap SystemCapability.ArkUI.ArkUI.Full
987   * @crossplatform
988   * @since 10
989   */
990  /**
991   * Call the function when clicked the search button
992   *
993   * @param { function } callback
994   * @returns { SearchAttribute }
995   * @syscap SystemCapability.ArkUI.ArkUI.Full
996   * @crossplatform
997   * @atomicservice
998   * @since 11
999   */
1000  /**
1001   * Call the function when clicked the search button.
1002   *
1003   * @param { Callback<string> } callback
1004   * @returns { SearchAttribute }
1005   * @syscap SystemCapability.ArkUI.ArkUI.Full
1006   * @crossplatform
1007   * @atomicservice
1008   * @since 14
1009   */
1010  onSubmit(callback: Callback<string>): SearchAttribute;
1011
1012  /**
1013   * Call the function when editing the input text
1014   *
1015   * @param { function } callback
1016   * @returns { SearchAttribute }
1017   * @syscap SystemCapability.ArkUI.ArkUI.Full
1018   * @since 8
1019   */
1020  /**
1021   * Call the function when editing the input text
1022   *
1023   * @param { function } callback
1024   * @returns { SearchAttribute }
1025   * @syscap SystemCapability.ArkUI.ArkUI.Full
1026   * @crossplatform
1027   * @since 10
1028   */
1029  /**
1030   * Call the function when editing the input text
1031   *
1032   * @param { function } callback
1033   * @returns { SearchAttribute }
1034   * @syscap SystemCapability.ArkUI.ArkUI.Full
1035   * @crossplatform
1036   * @atomicservice
1037   * @since 11
1038   */
1039  /**
1040   * Call the function when editing the input text
1041   *
1042   * @param { EditableTextOnChangeCallback } callback
1043   * @returns { SearchAttribute }
1044   * @syscap SystemCapability.ArkUI.ArkUI.Full
1045   * @crossplatform
1046   * @atomicservice
1047   * @since 12
1048   */
1049  onChange(callback: EditableTextOnChangeCallback): SearchAttribute;
1050
1051  /**
1052   * Called when the text selection changes.
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 text selection changes.
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  /**
1071   * Called when the text selection changes.
1072   *
1073   * @param { OnTextSelectionChangeCallback } callback - Callback of the listened event.
1074   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1075   * @syscap SystemCapability.ArkUI.ArkUI.Full
1076   * @crossplatform
1077   * @atomicservice
1078   * @since 14
1079   */
1080  onTextSelectionChange(callback: OnTextSelectionChangeCallback): SearchAttribute;
1081
1082  /**
1083   * Called when the content scrolls.
1084   *
1085   * @param { function } callback - callback of the listened event.
1086   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1087   * @syscap SystemCapability.ArkUI.ArkUI.Full
1088   * @crossplatform
1089   * @since 10
1090   */
1091  /**
1092   * Called when the content scrolls.
1093   *
1094   * @param { function } callback - callback of the listened event.
1095   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1096   * @syscap SystemCapability.ArkUI.ArkUI.Full
1097   * @crossplatform
1098   * @atomicservice
1099   * @since 11
1100   */
1101  /**
1102   * Called when the content scrolls.
1103   *
1104   * @param { OnContentScrollCallback } callback - Callback of the listened event.
1105   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1106   * @syscap SystemCapability.ArkUI.ArkUI.Full
1107   * @crossplatform
1108   * @atomicservice
1109   * @since 14
1110   */
1111  onContentScroll(callback: OnContentScrollCallback): SearchAttribute;
1112
1113  /**
1114   * Called when using the Clipboard menu
1115   *
1116   * @param { function } callback
1117   * @returns { SearchAttribute }
1118   * @syscap SystemCapability.ArkUI.ArkUI.Full
1119   * @since 8
1120   */
1121  /**
1122   * Called when using the Clipboard menu
1123   *
1124   * @param { function } callback
1125   * @returns { SearchAttribute }
1126   * @syscap SystemCapability.ArkUI.ArkUI.Full
1127   * @crossplatform
1128   * @since 10
1129   */
1130  /**
1131   * Called when using the Clipboard menu
1132   *
1133   * @param { function } callback
1134   * @returns { SearchAttribute }
1135   * @syscap SystemCapability.ArkUI.ArkUI.Full
1136   * @crossplatform
1137   * @atomicservice
1138   * @since 11
1139   */
1140  /**
1141   * Called when using the Clipboard menu.
1142   *
1143   * @param { Callback<string> } callback
1144   * @returns { SearchAttribute }
1145   * @syscap SystemCapability.ArkUI.ArkUI.Full
1146   * @crossplatform
1147   * @atomicservice
1148   * @since 14
1149   */
1150  onCopy(callback: Callback<string>): SearchAttribute;
1151
1152  /**
1153   * Called when using the Clipboard menu
1154   *
1155   * @param { function } callback
1156   * @returns { SearchAttribute }
1157   * @syscap SystemCapability.ArkUI.ArkUI.Full
1158   * @since 8
1159   */
1160  /**
1161   * Called when using the Clipboard menu
1162   *
1163   * @param { function } callback
1164   * @returns { SearchAttribute }
1165   * @syscap SystemCapability.ArkUI.ArkUI.Full
1166   * @crossplatform
1167   * @since 10
1168   */
1169  /**
1170   * Called when using the Clipboard menu
1171   *
1172   * @param { function } callback
1173   * @returns { SearchAttribute }
1174   * @syscap SystemCapability.ArkUI.ArkUI.Full
1175   * @crossplatform
1176   * @atomicservice
1177   * @since 11
1178   */
1179  /**
1180   * Called when using the Clipboard menu.
1181   *
1182   * @param { Callback<string> } callback
1183   * @returns { SearchAttribute }
1184   * @syscap SystemCapability.ArkUI.ArkUI.Full
1185   * @crossplatform
1186   * @atomicservice
1187   * @since 14
1188   */
1189  onCut(callback: Callback<string>): SearchAttribute;
1190
1191  /**
1192   * Called when using the Clipboard menu
1193   *
1194   * @param { function } callback
1195   * @returns { SearchAttribute }
1196   * @syscap SystemCapability.ArkUI.ArkUI.Full
1197   * @since 8
1198   */
1199  /**
1200   * Called when using the Clipboard menu
1201   *
1202   * @param { function } callback
1203   * @returns { SearchAttribute }
1204   * @syscap SystemCapability.ArkUI.ArkUI.Full
1205   * @crossplatform
1206   * @since 10
1207   */
1208  /**
1209   * Called when using the Clipboard menu
1210   *
1211   * @param { function } callback
1212   *          Executed when a paste operation is performed.
1213   *          { string } value - The text content to be pasted.
1214   *          { PasteEvent } event - The user-defined paste event.
1215   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1216   * @syscap SystemCapability.ArkUI.ArkUI.Full
1217   * @crossplatform
1218   * @atomicservice
1219   * @since 11
1220   */
1221  /**
1222   * Called when using the Clipboard menu.
1223   *
1224   * @param { OnPasteCallback } callback - Executed when a paste operation is performed.
1225   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1226   * @syscap SystemCapability.ArkUI.ArkUI.Full
1227   * @crossplatform
1228   * @atomicservice
1229   * @since 14
1230   */
1231  onPaste(callback: OnPasteCallback): SearchAttribute;
1232
1233  /**
1234   * Called when the copy option is set.
1235   *
1236   * @param { CopyOptions } value
1237   * @returns { SearchAttribute }
1238   * @syscap SystemCapability.ArkUI.ArkUI.Full
1239   * @since 9
1240   */
1241  /**
1242   * Called when the copy option is set.
1243   *
1244   * @param { CopyOptions } value
1245   * @returns { SearchAttribute }
1246   * @syscap SystemCapability.ArkUI.ArkUI.Full
1247   * @crossplatform
1248   * @since 10
1249   */
1250  /**
1251   * Called when the copy option is set.
1252   *
1253   * @param { CopyOptions } value
1254   * @returns { SearchAttribute }
1255   * @syscap SystemCapability.ArkUI.ArkUI.Full
1256   * @crossplatform
1257   * @atomicservice
1258   * @since 11
1259   */
1260  copyOption(value: CopyOptions): SearchAttribute;
1261
1262  /**
1263   * Called when the input of maximum text length is set.
1264   *
1265   * @param { number } value
1266   * @returns { SearchAttribute }
1267   * @syscap SystemCapability.ArkUI.ArkUI.Full
1268   * crossplatform
1269   * @since 11
1270   */
1271  /**
1272   * Called when the input of maximum text length is set.
1273   *
1274   * @param { number } value
1275   * @returns { SearchAttribute }
1276   * @syscap SystemCapability.ArkUI.ArkUI.Full
1277   * crossplatform
1278   * @atomicservice
1279   * @since 12
1280   */
1281  maxLength(value: number): SearchAttribute;
1282
1283  /**
1284   * Called when the text align is set.
1285   *
1286   * @param { TextAlign } value
1287   * @returns { SearchAttribute }
1288   * @syscap SystemCapability.ArkUI.ArkUI.Full
1289   * @since 9
1290   */
1291  /**
1292   * Called when the text align is set.
1293   *
1294   * @param { TextAlign } value
1295   * @returns { SearchAttribute }
1296   * @syscap SystemCapability.ArkUI.ArkUI.Full
1297   * @crossplatform
1298   * @since 10
1299   */
1300  /**
1301   * Called when the text align is set.
1302   *
1303   * @param { TextAlign } value
1304   * @returns { SearchAttribute }
1305   * @syscap SystemCapability.ArkUI.ArkUI.Full
1306   * @crossplatform
1307   * @atomicservice
1308   * @since 11
1309   */
1310  textAlign(value: TextAlign): SearchAttribute;
1311
1312  /**
1313   * Sets whether request keyboard or not when on focus.
1314   *
1315   * @param { boolean } value
1316   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1317   * @syscap SystemCapability.ArkUI.ArkUI.Full
1318   * @crossplatform
1319   * @since 10
1320   */
1321  /**
1322   * Sets whether request keyboard or not when on focus.
1323   *
1324   * @param { boolean } value
1325   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1326   * @syscap SystemCapability.ArkUI.ArkUI.Full
1327   * @crossplatform
1328   * @atomicservice
1329   * @since 11
1330   */
1331  enableKeyboardOnFocus(value: boolean): SearchAttribute;
1332
1333  /**
1334   * Controls whether the selection menu pops up.
1335   *
1336   * @param { boolean } value
1337   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1338   * @syscap SystemCapability.ArkUI.ArkUI.Full
1339   * @crossplatform
1340   * @since 10
1341   */
1342  /**
1343   * Controls whether the selection menu pops up.
1344   *
1345   * @param { boolean } value
1346   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1347   * @syscap SystemCapability.ArkUI.ArkUI.Full
1348   * @crossplatform
1349   * @atomicservice
1350   * @since 11
1351   */
1352  selectionMenuHidden(value: boolean): SearchAttribute;
1353
1354  /**
1355   * Called when the minimum font size of the font is set.
1356   *
1357   * @param { number | string | Resource } value
1358   * @returns { SearchAttribute }
1359   * @syscap SystemCapability.ArkUI.ArkUI.Full
1360   * @crossplatform
1361   * @atomicservice
1362   * @since 12
1363   */
1364  minFontSize(value: number | string | Resource): SearchAttribute;
1365
1366  /**
1367   * Called when the maximum font size of the font is set.
1368   *
1369   * @param { number | string | Resource } value
1370   * @returns { SearchAttribute }
1371   * @syscap SystemCapability.ArkUI.ArkUI.Full
1372   * @crossplatform
1373   * @atomicservice
1374   * @since 12
1375   */
1376  maxFontSize(value: number | string | Resource): SearchAttribute;
1377
1378  /**
1379   * Define custom keyboard.
1380   *
1381   * @param { CustomBuilder } value
1382   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1383   * @syscap SystemCapability.ArkUI.ArkUI.Full
1384   * @since 10
1385   */
1386  /**
1387   * Define custom keyboard.
1388   *
1389   * @param { CustomBuilder } value
1390   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1391   * @syscap SystemCapability.ArkUI.ArkUI.Full
1392   * @crossplatform
1393   * @atomicservice
1394   * @since 11
1395   */
1396  /**
1397   * Define custom keyboard.
1398   *
1399   * @param { CustomBuilder } value - Set up a custom keyboard of Search
1400   * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of Search
1401   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1402   * @syscap SystemCapability.ArkUI.ArkUI.Full
1403   * @crossplatform
1404   * @atomicservice
1405   * @since 12
1406   */
1407  customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute;
1408
1409  /**
1410   * Called when the text decoration of the text is set.
1411   *
1412   * @param { TextDecorationOptions } value
1413   * @returns { SearchAttribute }
1414   * @syscap SystemCapability.ArkUI.ArkUI.Full
1415   * @crossplatform
1416   * @atomicservice
1417   * @since 12
1418   */
1419  decoration(value: TextDecorationOptions): SearchAttribute;
1420
1421  /**
1422   * Called when the distance between text fonts is set.
1423   *
1424   * @param { number | string | Resource } value
1425   * @returns { SearchAttribute }
1426   * @syscap SystemCapability.ArkUI.ArkUI.Full
1427   * @crossplatform
1428   * @atomicservice
1429   * @since 12
1430   */
1431  letterSpacing(value: number | string | Resource): SearchAttribute;
1432
1433  /**
1434   * Called when the line height of the font is set.
1435   *
1436   * @param { number | string | Resource } value
1437   * @returns { SearchAttribute }
1438   * @syscap SystemCapability.ArkUI.ArkUI.Full
1439   * @crossplatform
1440   * @atomicservice
1441   * @since 12
1442   */
1443  lineHeight(value: number | string | Resource): SearchAttribute;
1444
1445  /**
1446   * Called when the search type is set.
1447   *
1448   * @param { SearchType } value
1449   * @returns { SearchAttribute }
1450   * @syscap SystemCapability.ArkUI.ArkUI.Full
1451   * @crossplatform
1452   * @since 11
1453   */
1454  /**
1455   * Called when the search type is set.
1456   *
1457   * @param { SearchType } value
1458   * @returns { SearchAttribute }
1459   * @syscap SystemCapability.ArkUI.ArkUI.Full
1460   * @crossplatform
1461   * @atomicservice
1462   * @since 12
1463   */
1464  type(value: SearchType): SearchAttribute;
1465
1466  /**
1467   * Set font feature.
1468   *
1469   * @param { string } value - The fontFeature.
1470   * normal | <feature-tag-value>, 
1471   * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0
1472   * the values of <feature-tag-value> reference to doc of search component
1473   * number of <feature-tag-value> can be single or multiple, and separated by comma ','.
1474   * @returns { SearchAttribute }
1475   * @syscap SystemCapability.ArkUI.ArkUI.Full
1476   * @crossplatform
1477   * @atomicservice
1478   * @since 12
1479   */
1480  fontFeature(value: string): SearchAttribute;
1481
1482  /**
1483   * Get text value information when about to input.
1484   *
1485   * @param { Callback<InsertValue, boolean> } callback - The triggered function when text content is about to insert.
1486   * @returns { SearchAttribute }
1487   * @syscap SystemCapability.ArkUI.ArkUI.Full
1488   * @crossplatform
1489   * @atomicservice
1490   * @since 12
1491   */
1492  onWillInsert(callback: Callback<InsertValue, boolean>): SearchAttribute;
1493
1494  /**
1495   * Get text value information when completed input.
1496   *
1497   * @param { Callback<InsertValue> } callback - The triggered function when text content has been inserted.
1498   * @returns { SearchAttribute }
1499   * @syscap SystemCapability.ArkUI.ArkUI.Full
1500   * @crossplatform
1501   * @atomicservice
1502   * @since 12
1503   */
1504  onDidInsert(callback: Callback<InsertValue>): SearchAttribute;
1505
1506  /**
1507   * Get text value information when about to delete.
1508   *
1509   * @param { Callback<DeleteValue, boolean> } callback - The triggered function when text content is about to delete.
1510   * @returns { SearchAttribute }
1511   * @syscap SystemCapability.ArkUI.ArkUI.Full
1512   * @crossplatform
1513   * @atomicservice
1514   * @since 12
1515   */
1516  onWillDelete(callback: Callback<DeleteValue, boolean>): SearchAttribute;
1517
1518  /**
1519   * Get text value information when the deletion has been completed
1520   *
1521   * @param { Callback<DeleteValue> } callback - The triggered function when text content has been deleted.
1522   * @returns { SearchAttribute }
1523   * @syscap SystemCapability.ArkUI.ArkUI.Full
1524   * @crossplatform
1525   * @atomicservice
1526   * @since 12
1527   */
1528  onDidDelete(callback: Callback<DeleteValue>): SearchAttribute;
1529
1530  /**
1531   * Set the custom text menu.
1532   *
1533   * @param { EditMenuOptions } editMenu - Customize text menu options.
1534   * @returns { SearchAttribute }
1535   * @syscap SystemCapability.ArkUI.ArkUI.Full
1536   * @crossplatform
1537   * @atomicservice
1538   * @since 12
1539   */
1540  editMenuOptions(editMenu: EditMenuOptions): SearchAttribute;
1541
1542  /**
1543   * Define the preview text mode of the text input.
1544   *
1545   * @param { boolean } enable - Indicates the preview text mode.
1546   * @returns { SearchAttribute }
1547   * @syscap SystemCapability.ArkUI.ArkUI.Full
1548   * @crossplatform
1549   * @atomicservice
1550   * @since 12
1551   */
1552  enablePreviewText(enable: boolean): SearchAttribute;
1553
1554  /**
1555   * Enable or disable haptic feedback.
1556   *
1557   * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback.
1558   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1559   * @syscap SystemCapability.ArkUI.ArkUI.Full
1560   * @crossplatform
1561   * @atomicservice
1562   * @since 13
1563   */
1564  enableHapticFeedback(isEnabled: boolean): SearchAttribute;
1565}
1566
1567/**
1568 * Defines Search Component.
1569 *
1570 * @syscap SystemCapability.ArkUI.ArkUI.Full
1571 * @since 8
1572 */
1573/**
1574 * Defines Search Component.
1575 *
1576 * @syscap SystemCapability.ArkUI.ArkUI.Full
1577 * @crossplatform
1578 * @since 10
1579 */
1580/**
1581 * Defines Search Component.
1582 *
1583 * @syscap SystemCapability.ArkUI.ArkUI.Full
1584 * @crossplatform
1585 * @atomicservice
1586 * @since 11
1587 */
1588declare const Search: SearchInterface;
1589
1590/**
1591 * Defines Search Component instance.
1592 *
1593 * @syscap SystemCapability.ArkUI.ArkUI.Full
1594 * @since 8
1595 */
1596/**
1597 * Defines Search Component instance.
1598 *
1599 * @syscap SystemCapability.ArkUI.ArkUI.Full
1600 * @crossplatform
1601 * @since 10
1602 */
1603/**
1604 * Defines Search Component instance.
1605 *
1606 * @syscap SystemCapability.ArkUI.ArkUI.Full
1607 * @crossplatform
1608 * @atomicservice
1609 * @since 11
1610 */
1611declare const SearchInstance: SearchAttribute;
1612