• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2025 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/*** if arkts 1.2 */
22import { TextContentControllerBase, SelectionOptions,Callback,CommonMethod,Optional,TextDecorationOptions, Bindable } from './common';
23import { CustomBuilder } from './builder';
24import { ResourceStr,Length,ResourceColor ,Dimension,Font} from './units';
25import { CaretStyle, EditableTextOnChangeCallback, InsertValue, DeleteValue, EditMenuOptions,KeyboardAppearance,EditableTextChangeValue,AutoCapitalizationMode } from './textCommon';
26import { EnterKeyType, OnTextSelectionChangeCallback, OnContentScrollCallback, OnPasteCallback, SubmitEvent } from './textInput';
27import { CopyOptions,TextAlign } from './enums';
28import { KeyboardOptions } from './richEditor';
29import { Resource } from '../../global/resource';
30import { SymbolGlyphModifier } from '../SymbolGlyphModifier';
31/*** endif */
32
33/**
34 * Provides the method of switching the cursor position.
35 *
36 * @extends TextContentControllerBase
37 * @syscap SystemCapability.ArkUI.ArkUI.Full
38 * @since 8
39 */
40/**
41 * Provides the method of switching the cursor position.
42 *
43 * @extends TextContentControllerBase
44 * @syscap SystemCapability.ArkUI.ArkUI.Full
45 * @crossplatform
46 * @since 10
47 */
48/**
49 * Provides the method of switching the cursor position.
50 *
51 * @extends TextContentControllerBase
52 * @syscap SystemCapability.ArkUI.ArkUI.Full
53 * @crossplatform
54 * @atomicservice
55 * @since arkts {'1.1':'11', '1.2':'20'}
56 * @arkts 1.1&1.2
57 */
58declare class SearchController extends TextContentControllerBase {
59  /**
60   * constructor.
61   *
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @since 8
64   */
65  /**
66   * constructor.
67   *
68   * @syscap SystemCapability.ArkUI.ArkUI.Full
69   * @crossplatform
70   * @since 10
71   */
72  /**
73   * constructor.
74   * A constructor used to create a SearchController object.
75   *
76   * @syscap SystemCapability.ArkUI.ArkUI.Full
77   * @crossplatform
78   * @atomicservice
79   * @since arkts {'1.1':'11', '1.2':'20'}
80   * @arkts 1.1&1.2
81   */
82  constructor();
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   * @since 8
90   */
91  /**
92   * Called when the position of the insertion cursor is set.
93   *
94   * @param { number } value
95   * @syscap SystemCapability.ArkUI.ArkUI.Full
96   * @crossplatform
97   * @since 10
98   */
99  /**
100   * Called when the position of the insertion cursor is set.
101   *
102   * @param { number } value - Length from the start of the character string to the position where the caret is located.
103   * @syscap SystemCapability.ArkUI.ArkUI.Full
104   * @crossplatform
105   * @atomicservice
106   * @since arkts {'1.1':'11', '1.2':'20'}
107   * @arkts 1.1&1.2
108   */
109  caretPosition(value: number): void;
110
111  /**
112   * Exit edit state.
113   *
114   * @syscap SystemCapability.ArkUI.ArkUI.Full
115   * @crossplatform
116   * @since 10
117   */
118  /**
119   * Exit edit state.
120   *
121   * @syscap SystemCapability.ArkUI.ArkUI.Full
122   * @crossplatform
123   * @atomicservice
124   * @since arkts {'1.1':'11', '1.2':'20'}
125   * @arkts 1.1&1.2
126   */
127  stopEditing(): void;
128
129  /**
130   * Text selection is achieved by specifying the start and end positions of the text.
131   *
132   * <p><strong>NOTE</strong>:
133   * <br>If selectionStart or selectionEnd is set to undefined, the value 0 will be used.
134   * <br>If <em>selectionMenuHidden</em> is set to <em>true</em> or a 2-in-1 device is used,
135   * calling setTextSelection does not display the context menu even when options is set to <em>MenuPolicy.SHOW</em>.
136   * <br>If the selected text contains an emoji, the emoji is selected when its start position is within the text selection range.
137   * <br>Sets the text selection range and highlights the selected text when the component is focused.
138   * <br>This API works only when the value of selectionStart is less than that of selectionEnd.
139   * </p>
140   *
141   * @param { number } selectionStart - The start position of the selected text.
142   * The start position of text in the text box is 0.
143   * A value less than 0 is handled as 0.
144   * A value greater than the maximum text length is handled as the maximum text length.
145   * @param { number } selectionEnd - The end position of the selected text.
146   * A value less than 0 is handled as the value 0.
147   * A value greater than the maximum text length is handled as the maximum text length.
148   * @param { SelectionOptions } [options] - Indicates the options of the text selection.Default value is MenuPolicy.DEFAULT.
149   * @syscap SystemCapability.ArkUI.ArkUI.Full
150   * @crossplatform
151   * @atomicservice
152   * @since arkts {'1.1':'12', '1.2':'20'}
153   * @arkts 1.1&1.2
154   */
155  setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void;
156}
157
158/**
159 * Enum for the style of cancel button
160 *
161 * @enum { number }
162 * @syscap SystemCapability.ArkUI.ArkUI.Full
163 * @crossplatform
164 * @since 10
165 */
166/**
167 * Enum for the style of cancel button
168 *
169 * @enum { number }
170 * @syscap SystemCapability.ArkUI.ArkUI.Full
171 * @crossplatform
172 * @atomicservice
173 * @since arkts {'1.1':'11', '1.2':'20'}
174 * @arkts 1.1&1.2
175 */
176declare enum CancelButtonStyle {
177  /**
178   * The value of button style constant
179   *
180   * @syscap SystemCapability.ArkUI.ArkUI.Full
181   * @crossplatform
182   * @since 10
183   */
184  /**
185   * The value of button style constant
186   *
187   * @syscap SystemCapability.ArkUI.ArkUI.Full
188   * @crossplatform
189   * @atomicservice
190   * @since arkts {'1.1':'11', '1.2':'20'}
191   * @arkts 1.1&1.2
192   */
193  CONSTANT,
194
195  /**
196   * The value of button style invisible
197   *
198   * @syscap SystemCapability.ArkUI.ArkUI.Full
199   * @crossplatform
200   * @since 10
201   */
202  /**
203   * The value of button style invisible
204   *
205   * @syscap SystemCapability.ArkUI.ArkUI.Full
206   * @crossplatform
207   * @atomicservice
208   * @since arkts {'1.1':'11', '1.2':'20'}
209   * @arkts 1.1&1.2
210   */
211  INVISIBLE,
212
213  /**
214   * The value of button style input
215   *
216   * @syscap SystemCapability.ArkUI.ArkUI.Full
217   * @crossplatform
218   * @since 10
219   */
220  /**
221   * The value of button style input
222   *
223   * @syscap SystemCapability.ArkUI.ArkUI.Full
224   * @crossplatform
225   * @atomicservice
226   * @since arkts {'1.1':'11', '1.2':'20'}
227   * @arkts 1.1&1.2
228   */
229  INPUT
230}
231
232/**
233 * Declare the type of search input box
234 *
235 * @enum { number }
236 * @syscap SystemCapability.ArkUI.ArkUI.Full
237 * @crossplatform
238 * @since 11
239 */
240/**
241 * Declare the type of search input box
242 *
243 * @enum { number }
244 * @syscap SystemCapability.ArkUI.ArkUI.Full
245 * @crossplatform
246 * @atomicservice
247 * @since arkts {'1.1':'12', '1.2':'20'}
248 * @arkts 1.1&1.2
249 */
250declare enum SearchType {
251  /**
252   * Basic input mode.
253   *
254   * @syscap SystemCapability.ArkUI.ArkUI.Full
255   * @crossplatform
256   * @since 11
257   */
258  /**
259   * Basic input mode.
260   * The value can contain digits, letters, underscores (_), spaces, and special characters.
261   * @syscap SystemCapability.ArkUI.ArkUI.Full
262   * @crossplatform
263   * @atomicservice
264   * @since arkts {'1.1':'12', '1.2':'20'}
265   * @arkts 1.1&1.2
266   */
267  NORMAL = 0,
268
269  /**
270   * Pure digital input mode.
271   *
272   * @syscap SystemCapability.ArkUI.ArkUI.Full
273   * @crossplatform
274   * @since 11
275   */
276  /**
277   * Pure digital input mode.
278   *
279   * @syscap SystemCapability.ArkUI.ArkUI.Full
280   * @crossplatform
281   * @atomicservice
282   * @since arkts {'1.1':'12', '1.2':'20'}
283   * @arkts 1.1&1.2
284   */
285  NUMBER = 2,
286
287  /**
288   * Phone number entry mode.
289   *
290   * @syscap SystemCapability.ArkUI.ArkUI.Full
291   * @crossplatform
292   * @since 11
293   */
294  /**
295   * Phone number entry mode.
296   * In this mode, the following are allowed: digits, spaces, plus signs (+), hyphens (-), asterisks (*), and number signs (#);
297   * the length is not limited.
298   * @syscap SystemCapability.ArkUI.ArkUI.Full
299   * @crossplatform
300   * @atomicservice
301   * @since arkts {'1.1':'12', '1.2':'20'}
302   * @arkts 1.1&1.2
303   */
304  PHONE_NUMBER = 3,
305
306  /**
307   * E-mail address input mode.
308   *
309   * @syscap SystemCapability.ArkUI.ArkUI.Full
310   * @crossplatform
311   * @since 11
312   */
313  /**
314   * E-mail address input mode.
315   * This mode accepts only digits, letters, underscores (_), dots (.),
316   * and the following special characters: ! # $ % & ' * + - / = ? ^ ` { | } ~ @ (which can only appear once)
317   * @syscap SystemCapability.ArkUI.ArkUI.Full
318   * @crossplatform
319   * @atomicservice
320   * @since arkts {'1.1':'12', '1.2':'20'}
321   * @arkts 1.1&1.2
322   */
323  EMAIL = 5,
324
325  /**
326   * Number decimal entry mode.
327   * The value can contain digits and one decimal point.
328   * @syscap SystemCapability.ArkUI.ArkUI.Full
329   * @crossplatform
330   * @atomicservice
331   * @since arkts {'1.1':'12', '1.2':'20'}
332   * @arkts 1.1&1.2
333   */
334  NUMBER_DECIMAL = 12,
335
336  /**
337   * URL entry mode.
338   *
339   * @syscap SystemCapability.ArkUI.ArkUI.Full
340   * @crossplatform
341   * @atomicservice
342   * @since arkts {'1.1':'12', '1.2':'20'}
343   * @arkts 1.1&1.2
344   */
345  URL = 13,
346
347  /**
348   * One time code mode.
349   *
350   * @syscap SystemCapability.ArkUI.ArkUI.Full
351   * @atomicservice
352   * @since 20
353   */
354  ONE_TIME_CODE = 14,
355}
356
357/**
358 * Options used to construct the search.
359 *
360 * Anonymous Object Rectification.
361 * @typedef SearchOptions
362 * @syscap SystemCapability.ArkUI.ArkUI.Full
363 * @crossplatform
364 * @atomicservice
365 * @since arkts {'1.1':'18', '1.2':'20'}
366 * @arkts 1.1&1.2
367 */
368declare interface SearchOptions {
369  /**
370   * Text input in the search text box.
371   *
372   * @type { ?string }
373   * @syscap SystemCapability.ArkUI.ArkUI.Full
374   * @since 8
375   */
376  /**
377   * Text input in the search text box.
378   *
379   * @type { ?string }
380   * @syscap SystemCapability.ArkUI.ArkUI.Full
381   * @atomicservice
382   * @since 11
383   */
384  /**
385   * Text input in the search text box.
386   *
387   * Anonymous Object Rectification.
388   *
389   * <p><strong>NOTE</strong>:
390   * <br>Since API version 10, this parameter supports two-way binding through $$.
391   * <br>Since API version 18, this parameter supports two-way binding through !!.
392   * </p>
393   *
394   * @type { ?string }
395   * @syscap SystemCapability.ArkUI.ArkUI.Full
396   * @atomicservice
397   * @since 18
398   */
399  /**
400   * Text input in the search text box.
401   *
402   * @type { ?ResourceStr }
403   * @syscap SystemCapability.ArkUI.ArkUI.Full
404   * @atomicservice
405   * @since 20
406   */
407  value?: ResourceStr;
408
409  /**
410   * Text input in the search text box.
411   *
412   * @type { ?string}
413   * @syscap SystemCapability.ArkUI.ArkUI.Full
414   * @atomicservice
415   * @since 20
416   * @arkts 1.2
417   */
418  value?: string;
419
420  /**
421   * Text displayed when there is no input.
422   *
423   * @type { string }
424   * @syscap SystemCapability.ArkUI.ArkUI.Full
425   * @since 8
426   */
427  /**
428   * Text displayed when there is no input.
429   *
430   * @type { ?ResourceStr }
431   * @syscap SystemCapability.ArkUI.ArkUI.Full
432   * @since 10
433   */
434  /**
435   * Text displayed when there is no input.
436   *
437   * @type { ?ResourceStr }
438   * @syscap SystemCapability.ArkUI.ArkUI.Full
439   * @atomicservice
440   * @since 11
441   */
442  /**
443   * Text displayed when there is no input.
444   *
445   * Anonymous Object Rectification.
446   * @type { ?ResourceStr }
447   * @syscap SystemCapability.ArkUI.ArkUI.Full
448   * @atomicservice
449   * @since arkts {'1.1':'18', '1.2':'20'}
450   * @arkts 1.1&1.2
451   */
452  placeholder?: ResourceStr;
453
454  /**
455   * Path to the search icon.
456   *
457   * @type { ?string }
458   * @syscap SystemCapability.ArkUI.ArkUI.Full
459   * @since 8
460   */
461  /**
462   * Path to the search icon.
463   *
464   * @type { ?string }
465   * @syscap SystemCapability.ArkUI.ArkUI.Full
466   * @atomicservice
467   * @since 11
468   */
469  /**
470   * Path to the search icon.
471   *
472   * Anonymous Object Rectification.
473   *
474   * <p><strong>NOTE</strong>:
475   * <br>The icon data source can be a local or online image.
476   * <ul>
477   * <li>The supported formats include PNG, JPG, BMP, SVG, GIF, pixelmap, and HEIF.</li>
478   * <li>The Base64 string is supported in the following format:
479   * data:image/[png|jpeg|bmp|webp|heif];base64,[base64 data], where [base64 data] is a Base64 string.</li>
480   * </ul>
481   * <br>If this attribute and the searchIcon attribute are both set, the searchIcon attribute takes precedence.
482   * </p>
483   *
484   * @type { ?string }
485   * @syscap SystemCapability.ArkUI.ArkUI.Full
486   * @atomicservice
487   * @since arkts {'1.1':'18', '1.2':'20'}
488   * @arkts 1.1&1.2
489   */
490  icon?: string;
491
492  /**
493   * Controller of the <Search> component.
494   *
495   * @type { ?SearchController }
496   * @syscap SystemCapability.ArkUI.ArkUI.Full
497   * @since 8
498   */
499  /**
500   * Controller of the <Search> component.
501   *
502   * @type { ?SearchController }
503   * @syscap SystemCapability.ArkUI.ArkUI.Full
504   * @atomicservice
505   * @since 11
506   */
507  /**
508   * Controller of the <Search> component.
509   *
510   * Anonymous Object Rectification.
511   * @type { ?SearchController }
512   * @syscap SystemCapability.ArkUI.ArkUI.Full
513   * @atomicservice
514   * @since arkts {'1.1':'18', '1.2':'20'}
515   * @arkts 1.1&1.2
516   */
517  controller?: SearchController;
518}
519
520/**
521 * The construct function of search
522 *
523 * @interface SearchInterface
524 * @syscap SystemCapability.ArkUI.ArkUI.Full
525 * @since 8
526 */
527/**
528 * The construct function of search
529 *
530 * @interface SearchInterface
531 * @syscap SystemCapability.ArkUI.ArkUI.Full
532 * @crossplatform
533 * @since 10
534 */
535/**
536 * The construct function of search
537 *
538 * @interface SearchInterface
539 * @syscap SystemCapability.ArkUI.ArkUI.Full
540 * @crossplatform
541 * @atomicservice
542 * @since arkts {'1.1':'11', '1.2':'20'}
543 * @arkts 1.1&1.2
544 */
545interface SearchInterface {
546  /**
547   * The options of SearchInterface
548   *
549   * @param { object } options
550   * @returns { SearchAttribute }
551   * @syscap SystemCapability.ArkUI.ArkUI.Full
552   * @since 8
553   */
554  /**
555   * The options of SearchInterface
556   *
557   * @param { object } options
558   * @returns { SearchAttribute }
559   * @syscap SystemCapability.ArkUI.ArkUI.Full
560   * @crossplatform
561   * @since 10
562   */
563  /**
564   * The options of SearchInterface
565   *
566   * @param { object } options
567   * @returns { SearchAttribute }
568   * @syscap SystemCapability.ArkUI.ArkUI.Full
569   * @crossplatform
570   * @atomicservice
571   * @since 11
572   */
573  /**
574   * The options of SearchInterface.
575   *
576   * Anonymous Object Rectification.
577   * @param { SearchOptions } [options] - Search options.
578   * @returns { SearchAttribute }
579   * @syscap SystemCapability.ArkUI.ArkUI.Full
580   * @crossplatform
581   * @atomicservice
582   * @since arkts {'1.1':'18', '1.2':'20'}
583   * @arkts 1.1&1.2
584   */
585  (options?: SearchOptions): SearchAttribute;
586}
587
588/**
589 * Defines the icon options
590 *
591 * @interface IconOptions
592 * @syscap SystemCapability.ArkUI.ArkUI.Full
593 * @crossplatform
594 * @since 10
595 */
596/**
597 * Defines the icon options
598 *
599 * @interface IconOptions
600 * @syscap SystemCapability.ArkUI.ArkUI.Full
601 * @crossplatform
602 * @atomicservice
603 * @since arkts {'1.1':'11', '1.2':'20'}
604 * @arkts 1.1&1.2
605 */
606interface IconOptions {
607  /**
608   * Set the icon size
609   *
610   * @type { ?Length }
611   * @syscap SystemCapability.ArkUI.ArkUI.Full
612   * @crossplatform
613   * @since 10
614   */
615  /**
616   * Set the icon size
617   *
618   * <p><strong>NOTE</strong>:
619   * <br>It cannot be set in percentage.
620   * </p>
621   *
622   * @type { ?Length }
623   * @syscap SystemCapability.ArkUI.ArkUI.Full
624   * @crossplatform
625   * @atomicservice
626   * @since arkts {'1.1':'11', '1.2':'20'}
627   * @arkts 1.1&1.2
628   */
629  size?: Length;
630
631  /**
632   * Set the icon color
633   *
634   * @type { ?ResourceColor }
635   * @syscap SystemCapability.ArkUI.ArkUI.Full
636   * @crossplatform
637   * @since 10
638   */
639  /**
640   * Set the icon color
641   *
642   * @type { ?ResourceColor }
643   * @syscap SystemCapability.ArkUI.ArkUI.Full
644   * @crossplatform
645   * @atomicservice
646   * @since arkts {'1.1':'11', '1.2':'20'}
647   * @arkts 1.1&1.2
648   */
649  color?: ResourceColor;
650
651  /**
652   * Set the icon resource
653   *
654   * @type { ?ResourceStr }
655   * @syscap SystemCapability.ArkUI.ArkUI.Full
656   * @crossplatform
657   * @since 10
658   */
659  /**
660   * Set the icon resource
661   *
662   * @type { ?ResourceStr }
663   * @syscap SystemCapability.ArkUI.ArkUI.Full
664   * @crossplatform
665   * @atomicservice
666   * @since arkts {'1.1':'11', '1.2':'20'}
667   * @arkts 1.1&1.2
668   */
669  src?: ResourceStr;
670}
671
672/**
673 * Defines the SearchButton options
674 *
675 * @interface SearchButtonOptions
676 * @syscap SystemCapability.ArkUI.ArkUI.Full
677 * @crossplatform
678 * @since 10
679 */
680/**
681 * Defines the SearchButton options
682 *
683 * @interface SearchButtonOptions
684 * @syscap SystemCapability.ArkUI.ArkUI.Full
685 * @crossplatform
686 * @atomicservice
687 * @since arkts {'1.1':'11', '1.2':'20'}
688 * @arkts 1.1&1.2
689 */
690interface SearchButtonOptions {
691  /**
692   * Set the SearchButton fontSize
693   *
694   * @type { ?Length }
695   * @syscap SystemCapability.ArkUI.ArkUI.Full
696   * @crossplatform
697   * @since 10
698   */
699  /**
700   * Set the SearchButton fontSize
701   *
702   * <p><strong>NOTE</strong>:
703   * <br>It cannot be set in percentage.
704   * </p>
705   *
706   * @type { ?Length }
707   * @syscap SystemCapability.ArkUI.ArkUI.Full
708   * @crossplatform
709   * @atomicservice
710   * @since arkts {'1.1':'11', '1.2':'20'}
711   * @arkts 1.1&1.2
712   */
713  fontSize?: Length;
714
715  /**
716   * Set the SearchButton fontColor
717   *
718   * @type { ?ResourceColor }
719   * @syscap SystemCapability.ArkUI.ArkUI.Full
720   * @crossplatform
721   * @since 10
722   */
723  /**
724   * Set the SearchButton fontColor
725   *
726   * @type { ?ResourceColor }
727   * @syscap SystemCapability.ArkUI.ArkUI.Full
728   * @crossplatform
729   * @atomicservice
730   * @since arkts {'1.1':'11', '1.2':'20'}
731   * @arkts 1.1&1.2
732   */
733  fontColor?: ResourceColor;
734
735  /**
736   * Automatically disables the search button before the user enters text
737   *
738   * <p><strong>NOTE</strong>:
739   * <br><em>true</em>: The search button is disabled when there is no text input.
740   * <br><em>false</em>: The search button remains enabled regardless of the text input.
741   * </p>
742   *
743   * @type { ?Boolean }
744   * @default false
745   * @syscap SystemCapability.ArkUI.ArkUI.Full
746   * @crossplatform
747   * @atomicservice
748   * @since arkts {'1.1':'18', '1.2':'20'}
749   * @arkts 1.1&1.2
750   */
751  autoDisable?: Boolean;
752}
753
754/**
755 * Defines the CancelButton options
756 *
757 * @interface CancelButtonOptions
758 * @syscap SystemCapability.ArkUI.ArkUI.Full
759 * @crossplatform
760 * @atomicservice
761 * @since arkts {'1.1':'12', '1.2':'20'}
762 * @arkts 1.1&1.2
763 */
764interface CancelButtonOptions {
765  /**
766   * Set the CancelButton style
767   * Display state of the Cancel button on the right.
768   *
769   * @type { ?CancelButtonStyle }
770   * @syscap SystemCapability.ArkUI.ArkUI.Full
771   * @crossplatform
772   * @atomicservice
773   * @since arkts {'1.1':'12', '1.2':'20'}
774   * @arkts 1.1&1.2
775   */
776  style?: CancelButtonStyle;
777
778  /**
779   * Set the CancelButton icon
780   * Icon of the Cancel button on the right.
781   *
782   * @type { ?IconOptions }
783   * @syscap SystemCapability.ArkUI.ArkUI.Full
784   * @crossplatform
785   * @atomicservice
786   * @since arkts {'1.1':'12', '1.2':'20'}
787   * @arkts 1.1&1.2
788   */
789  icon?: IconOptions;
790}
791
792/**
793 * Defines the CancelButton symbol options
794 *
795 * @interface CancelButtonSymbolOptions
796 * @syscap SystemCapability.ArkUI.ArkUI.Full
797 * @atomicservice
798 * @since 12
799 */
800/**
801 * Defines the CancelButton symbol options
802 *
803 * @interface CancelButtonSymbolOptions
804 * @syscap SystemCapability.ArkUI.ArkUI.Full
805 * @crossplatform
806 * @atomicservice
807 * @since 20
808 * @arkts 1.1&1.2
809 */
810interface CancelButtonSymbolOptions {
811  /**
812   * Set the CancelButton style.
813   * Display state of the Cancel button on the right.
814   *
815   * @type { ?CancelButtonStyle }
816   * @syscap SystemCapability.ArkUI.ArkUI.Full
817   * @atomicservice
818   * @since arkts {'1.1':'12', '1.2':'20'}
819   * @arkts 1.1&1.2
820   */
821  style?: CancelButtonStyle;
822
823  /**
824   * Set the CancelButton symbol icon.
825   * Symbol icon of the Cancel button on the right.
826   *
827   * @type { ?SymbolGlyphModifier }
828   * @syscap SystemCapability.ArkUI.ArkUI.Full
829   * @atomicservice
830   * @since 12
831   */
832  /**
833   * Set the CancelButton symbol icon.
834   * Symbol icon of the Cancel button on the right.
835   *
836   * @type { ?SymbolGlyphModifier }
837   * @syscap SystemCapability.ArkUI.ArkUI.Full
838   * @crossplatform
839   * @atomicservice
840   * @since 20
841   * @arkts 1.1&1.2
842   */
843  icon?: SymbolGlyphModifier;
844}
845
846/**
847 * Declare the event listener callback of the enter key.
848 *
849 * @typedef { function } SearchSubmitCallback
850 * @param { string } searchContent - The submitted content of search.
851 * @param { SubmitEvent } [event] - Provides the method of keeping Search editable state when submitted.
852 * @syscap SystemCapability.ArkUI.ArkUI.Full
853 * @crossplatform
854 * @atomicservice
855 * @since arkts {'1.1':'14', '1.2':'20'}
856 * @arkts 1.1&1.2
857 */
858declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void;
859
860/**
861 * The attribute function of search
862 *
863 * @extends CommonMethod<SearchAttribute>
864 * @syscap SystemCapability.ArkUI.ArkUI.Full
865 * @since 8
866 */
867/**
868 * The attribute function of search
869 *
870 * @extends CommonMethod<SearchAttribute>
871 * @syscap SystemCapability.ArkUI.ArkUI.Full
872 * @crossplatform
873 * @since 10
874 */
875/**
876 * The attribute function of search
877 *
878 * @extends CommonMethod<SearchAttribute>
879 * @syscap SystemCapability.ArkUI.ArkUI.Full
880 * @crossplatform
881 * @atomicservice
882 * @since arkts {'1.1':'11', '1.2':'20'}
883 * @arkts 1.1&1.2
884 */
885declare class SearchAttribute extends CommonMethod<SearchAttribute> {
886  /**
887   * Set the search button text
888   *
889   * @param { string } value - indicates the text of the search button.
890   * @param { SearchButtonOption } option
891   * @returns { SearchAttribute }
892   * @syscap SystemCapability.ArkUI.ArkUI.Full
893   * @since 8
894   */
895  /**
896   * Set the search button text, fontSize and fontColor
897   *
898   * @param { string } value - indicates the text of the search button.
899   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
900   * @returns { SearchAttribute }
901   * @syscap SystemCapability.ArkUI.ArkUI.Full
902   * @crossplatform
903   * @since 10
904   */
905  /**
906   * Set the search button text, fontSize and fontColor
907   *
908   * <p><strong>NOTE</strong>:
909   * <br>Clicking the search button triggers both onSubmit and onClick callbacks.
910   * <br>The default font size on wearable devices is 18 fp.
911   * </p>
912   *
913   *
914   * @param { string } value - indicates the text of the search button.
915   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
916   *                                         Default value is { fontSize: '16fp', fontColor: '#ff3f97e9' }
917   * @returns { SearchAttribute }
918   * @syscap SystemCapability.ArkUI.ArkUI.Full
919   * @crossplatform
920   * @atomicservice
921   * @since 11
922   */
923  /**
924   * Set the search button text, fontSize and fontColor
925   *
926   * @param { ResourceStr } value - indicates the text of the search button.
927   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
928   * @returns { SearchAttribute }
929   * @syscap SystemCapability.ArkUI.ArkUI.Full
930   * @crossplatform
931   * @atomicservice
932   * @since 20
933   */
934  searchButton(value: ResourceStr, option?: SearchButtonOptions): SearchAttribute;
935  /**
936   * Set the search button text, fontSize and fontColor
937   *
938   * @param { string } value - indicates the text of the search button.
939   * @param { SearchButtonOptions } [option] - indicates the fontSize and fontColor of the search button.
940   * @returns { SearchAttribute }
941   * @syscap SystemCapability.ArkUI.ArkUI.Full
942   * @crossplatform
943   * @atomicservice
944   * @since 20
945   * @arkts 1.2
946   */
947  searchButton(value: string, option?: SearchButtonOptions): SearchAttribute;
948  /**
949   * Set the text Color
950   *
951   * @param { ResourceColor } value - indicates the color of the text.
952   * @returns { SearchAttribute }
953   * @syscap SystemCapability.ArkUI.ArkUI.Full
954   * @crossplatform
955   * @since 10
956   */
957  /**
958   * Set the text Color
959   *
960   * <p><strong>NOTE</strong>:
961   * <br>Universal text attributes fontSize, fontStyle, fontWeight, and fontFamily are set in the textFont attribute.
962   * </p>
963   *
964   * @param { ResourceColor } value - indicates the color of the text.Default value is '#FF182431'.The default value on wearable devices is '#dbffffff'.
965   * @returns { SearchAttribute }
966   * @syscap SystemCapability.ArkUI.ArkUI.Full
967   * @crossplatform
968   * @atomicservice
969   * @since arkts {'1.1':'11', '1.2':'20'}
970   * @arkts 1.1&1.2
971   */
972  fontColor(value: ResourceColor): SearchAttribute;
973
974  /**
975   * Set the search icon style
976   *
977   * @param { IconOptions } value - indicates the style of the search icon.
978   * @returns { SearchAttribute }
979   * @syscap SystemCapability.ArkUI.ArkUI.Full
980   * @crossplatform
981   * @since 10
982   */
983  /**
984   * Set the search icon style
985   *
986   * @param { IconOptions } value - indicates the style of the search icon.
987   * @returns { SearchAttribute }
988   * @syscap SystemCapability.ArkUI.ArkUI.Full
989   * @crossplatform
990   * @atomicservice
991   * @since 11
992   */
993  /**
994   * Set the search icon style
995   *
996   * <p><strong>NOTE</strong>:
997   * <br>The default icon size on wearable devices is 16 vp.
998   * <br>Default value in light mode:
999   * <code>
1000   * {
1001   *    size: '16vp',
1002   *    color: '#99182431',
1003   *    src: ' '
1004   * }
1005   * </code>
1006   * <br>Default value in dark mode:
1007   * <code>
1008   * {
1009   *    size: '16vp',
1010   *    color: '#99ffffff',
1011   *    src: ' '
1012   * }
1013   * </code>
1014   * </p>
1015   *
1016   * @param { IconOptions | SymbolGlyphModifier } value - indicates the style of the search icon.
1017   * @returns { SearchAttribute }
1018   * @syscap SystemCapability.ArkUI.ArkUI.Full
1019   * @crossplatform
1020   * @atomicservice
1021   * @since arkts {'1.1':'12', '1.2':'20'}
1022   * @arkts 1.1&1.2
1023   */
1024  searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute;
1025
1026  /**
1027   * Set the cancel button style
1028   *
1029   * @param { object } value - indicates the style of the cancel button.
1030   * @returns { SearchAttribute }
1031   * @syscap SystemCapability.ArkUI.ArkUI.Full
1032   * @crossplatform
1033   * @since 10
1034   */
1035  /**
1036   * Set the cancel button style
1037   *
1038   * @param { object } value - indicates the style of the cancel button.
1039   * @returns { SearchAttribute }
1040   * @syscap SystemCapability.ArkUI.ArkUI.Full
1041   * @crossplatform
1042   * @atomicservice
1043   * @since 11
1044   */
1045  /**
1046   * Set the cancel button style
1047   *
1048   * <p><strong>NOTE</strong>:
1049   * <br>The default icon size on wearable devices is 18 vp.
1050   * <br>When style is set to CancelButtonStyle.CONSTANT, the Cancel button is always displayed.
1051   * <br>Default value:
1052   * <code>
1053   * {
1054   *    style: CancelButtonStyle.INPUT,
1055   *    icon: {
1056   *    size: '16vp',
1057   *    color: '#99ffffff',
1058   *    src: ' '
1059   *    }
1060   * }
1061   * </code>
1062   * </p>
1063   *
1064   * @param { CancelButtonOptions | CancelButtonSymbolOptions } value - indicates the style of the cancel button.
1065   * @returns { SearchAttribute }
1066   * @syscap SystemCapability.ArkUI.ArkUI.Full
1067   * @crossplatform
1068   * @atomicservice
1069   * @since arkts {'1.1':'12', '1.2':'20'}
1070   * @arkts 1.1&1.2
1071   */
1072  cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute;
1073
1074  /**
1075   * Specify the indentation of the first line in a text-block.
1076   *
1077   * @param { Dimension } value - The length of text indent.Default value is 0.
1078   * @returns { SearchAttribute } The attribute of the text.
1079   * @syscap SystemCapability.ArkUI.ArkUI.Full
1080   * @crossplatform
1081   * @atomicservice
1082   * @since arkts {'1.1':'12', '1.2':'20'}
1083   * @arkts 1.1&1.2
1084   */
1085  textIndent(value: Dimension): SearchAttribute;
1086
1087  /**
1088   * Called when the inputFilter of text is set.
1089   *
1090   * <p><strong>NOTE</strong>:
1091   * <br>Only inputs that comply with the regular expression can be displayed.
1092   * <br>Other inputs are filtered out.
1093   * <br>The specified regular expression can match single characters, but not strings.
1094   * <br>If inputFilter is set and the entered characters are not null,
1095   * the filtering effect attached to the text box type (specified through the type attribute) does not take effect.
1096   * </p>
1097   *
1098   * @param { ResourceStr } value - Regular expression.
1099   * @param { Callback<string> } error - Filtered-out content to return when regular expression matching fails.
1100   * @returns { SearchAttribute }
1101   * @syscap SystemCapability.ArkUI.ArkUI.Full
1102   * @crossplatform
1103   * @atomicservice
1104   * @since arkts {'1.1':'12', '1.2':'20'}
1105   * @arkts 1.1&1.2
1106   */
1107  inputFilter(value: ResourceStr, error?: Callback<string>): SearchAttribute;
1108
1109  /**
1110   * Called when judging whether the text editing change finished.
1111   * The text box is in the editing state when it has the caret placed in it, and is in the non-editing state otherwise.
1112   *
1113   * @param { Callback<boolean> } callback - Returns true if the component is in an editing state.
1114   * @returns { SearchAttribute }
1115   * @syscap SystemCapability.ArkUI.ArkUI.Full
1116   * @crossplatform
1117   * @atomicservice
1118   * @since arkts {'1.1':'12', '1.2':'20'}
1119   * @arkts 1.1&1.2
1120   */
1121  onEditChange(callback: Callback<boolean>): SearchAttribute;
1122
1123  /**
1124   * Define the text selected background color of the text input.
1125   *
1126   * <p><strong>NOTE</strong>:
1127   * <br>If the opacity is not set, a 20% opacity will be used.
1128   * </p>
1129   *
1130   * @param { ResourceColor } value
1131   * @returns { SearchAttribute }
1132   * @syscap SystemCapability.ArkUI.ArkUI.Full
1133   * @crossplatform
1134   * @atomicservice
1135   * @since arkts {'1.1':'12', '1.2':'20'}
1136   * @arkts 1.1&1.2
1137   */
1138  selectedBackgroundColor(value: ResourceColor): SearchAttribute;
1139
1140  /**
1141   * Set the cursor style
1142   *
1143   * @param { CaretStyle } value - indicates the style of the cursor.
1144   * @returns { SearchAttribute }
1145   * @syscap SystemCapability.ArkUI.ArkUI.Full
1146   * @crossplatform
1147   * @since 10
1148   */
1149  /**
1150   * Set the cursor style
1151   *
1152   * <p><strong>NOTE</strong>:
1153   * <br>Since API version 12, this API can be used to set the text handle color, which is the same as the caret color.
1154   * <br>Default value:
1155   * <code>
1156   * {
1157   *    width: '1.5vp',
1158   *    color: '#007DFF'
1159   * }
1160   * </code>
1161   * </p>
1162   *
1163   * @param { CaretStyle } value - indicates the style of the cursor.
1164   * @returns { SearchAttribute }
1165   * @syscap SystemCapability.ArkUI.ArkUI.Full
1166   * @crossplatform
1167   * @atomicservice
1168   * @since arkts {'1.1':'11', '1.2':'20'}
1169   * @arkts 1.1&1.2
1170   */
1171  caretStyle(value: CaretStyle): SearchAttribute;
1172
1173  /**
1174   * Set the place hold text color
1175   *
1176   * @param { ResourceColor } value
1177   * @returns { SearchAttribute }
1178   * @syscap SystemCapability.ArkUI.ArkUI.Full
1179   * @since 8
1180   */
1181  /**
1182   * Set the place hold text color
1183   *
1184   * @param { ResourceColor } value
1185   * @returns { SearchAttribute }
1186   * @syscap SystemCapability.ArkUI.ArkUI.Full
1187   * @crossplatform
1188   * @since 10
1189   */
1190  /**
1191   * Set the place hold text color
1192   *
1193   * @param { ResourceColor } value - Default value is '#99182431'.The default value on wearable devices is '#99ffffff'.
1194   * @returns { SearchAttribute }
1195   * @syscap SystemCapability.ArkUI.ArkUI.Full
1196   * @crossplatform
1197   * @atomicservice
1198   * @since arkts {'1.1':'11', '1.2':'20'}
1199   * @arkts 1.1&1.2
1200   */
1201  placeholderColor(value: ResourceColor): SearchAttribute;
1202
1203  /**
1204   * Set the font used for place holder text
1205   *
1206   * @param { Font } value
1207   * @returns { SearchAttribute }
1208   * @syscap SystemCapability.ArkUI.ArkUI.Full
1209   * @since 8
1210   */
1211  /**
1212   * Set the font used for place holder text
1213   *
1214   * @param { Font } value
1215   * @returns { SearchAttribute }
1216   * @syscap SystemCapability.ArkUI.ArkUI.Full
1217   * @crossplatform
1218   * @since 10
1219   */
1220  /**
1221   * Set the font used for place holder text
1222   *
1223   * <p><strong>NOTE</strong>:
1224   * <br>The 'HarmonyOS Sans' font and registered custom fonts are supported.
1225   * <br>The default font size on wearable devices is 18 px.
1226   * </p>
1227   *
1228   * @param { Font } value
1229   * @returns { SearchAttribute }
1230   * @syscap SystemCapability.ArkUI.ArkUI.Full
1231   * @crossplatform
1232   * @atomicservice
1233   * @since arkts {'1.1':'11', '1.2':'20'}
1234   * @arkts 1.1&1.2
1235   */
1236  placeholderFont(value?: Font): SearchAttribute;
1237
1238  /**
1239   * Set the font used for input text
1240   *
1241   * @param { Font } value
1242   * @returns { SearchAttribute }
1243   * @syscap SystemCapability.ArkUI.ArkUI.Full
1244   * @since 8
1245   */
1246  /**
1247   * Set the font used for input text
1248   *
1249   * @param { Font } value
1250   * @returns { SearchAttribute }
1251   * @syscap SystemCapability.ArkUI.ArkUI.Full
1252   * @crossplatform
1253   * @since 10
1254   */
1255  /**
1256   * Set the font used for input text
1257   *
1258   * <p><strong>NOTE</strong>:
1259   * <br>Currently, only the default font family is supported.
1260   * <br>The default font size on wearable devices is 18 fp.
1261   * </p>
1262   *
1263   * @param { Font } value
1264   * @returns { SearchAttribute }
1265   * @syscap SystemCapability.ArkUI.ArkUI.Full
1266   * @crossplatform
1267   * @atomicservice
1268   * @since arkts {'1.1':'11', '1.2':'20'}
1269   * @arkts 1.1&1.2
1270   */
1271  textFont(value?: Font): SearchAttribute;
1272
1273  /**
1274   * Set enter key type of soft keyboard
1275   *
1276   * @param { EnterKeyType } value - Default value is EnterKeyType.Search.
1277   * @returns { SearchAttribute }
1278   * @syscap SystemCapability.ArkUI.ArkUI.Full
1279   * @crossplatform
1280   * @atomicservice
1281   * @since arkts {'1.1':'12', '1.2':'20'}
1282   * @arkts 1.1&1.2
1283   */
1284  enterKeyType(value: EnterKeyType): SearchAttribute;
1285
1286  /**
1287   * Call the function when clicked the search button
1288   *
1289   * @param { function } callback
1290   * @returns { SearchAttribute }
1291   * @syscap SystemCapability.ArkUI.ArkUI.Full
1292   * @since 8
1293   */
1294  /**
1295   * Call the function when clicked the search button
1296   *
1297   * @param { function } callback
1298   * @returns { SearchAttribute }
1299   * @syscap SystemCapability.ArkUI.ArkUI.Full
1300   * @crossplatform
1301   * @since 10
1302   */
1303  /**
1304   * Call the function when clicked the search button
1305   *
1306   * @param { function } callback
1307   * @returns { SearchAttribute }
1308   * @syscap SystemCapability.ArkUI.ArkUI.Full
1309   * @crossplatform
1310   * @atomicservice
1311   * @since 11
1312   */
1313  /**
1314   * Call the function when clicked the search button.
1315   *
1316   * Anonymous Object Rectification.
1317   * @param { Callback<string> } callback - Search submission callback, which returns the text content currently in the search box.
1318   * @returns { SearchAttribute }
1319   * @syscap SystemCapability.ArkUI.ArkUI.Full
1320   * @crossplatform
1321   * @atomicservice
1322   * @since 18
1323   */
1324  onSubmit(callback: Callback<string>): SearchAttribute;
1325  /**
1326   * Call the function when clicked the search button.
1327   * The submission event provides a method to maintain the edit state of the Search component.
1328   *
1329   * @param { SearchSubmitCallback } callback - callback of the listened event.
1330   * @returns { SearchAttribute }
1331   * @syscap SystemCapability.ArkUI.ArkUI.Full
1332   * @crossplatform
1333   * @atomicservice
1334   * @since 14
1335   */
1336  onSubmit(callback: SearchSubmitCallback): SearchAttribute;
1337
1338  /**
1339   * Call the function when clicked the search button.
1340   *
1341   * @param { Callback<string> | SearchSubmitCallback } callback - callback of the listened event.
1342   * @returns { SearchAttribute }
1343   * @syscap SystemCapability.ArkUI.ArkUI.Full
1344   * @crossplatform
1345   * @atomicservice
1346   * @since 20
1347   * @arkts 1.2
1348   */
1349  onSubmit(callback: Callback<string> | SearchSubmitCallback): SearchAttribute;
1350
1351  /**
1352   * Call the function when editing the input text
1353   *
1354   * @param { function } callback
1355   * @returns { SearchAttribute }
1356   * @syscap SystemCapability.ArkUI.ArkUI.Full
1357   * @since 8
1358   */
1359  /**
1360   * Call the function when editing the input text
1361   *
1362   * @param { function } callback
1363   * @returns { SearchAttribute }
1364   * @syscap SystemCapability.ArkUI.ArkUI.Full
1365   * @crossplatform
1366   * @since 10
1367   */
1368  /**
1369   * Call the function when editing the input text
1370   *
1371   * @param { function } callback
1372   * @returns { SearchAttribute }
1373   * @syscap SystemCapability.ArkUI.ArkUI.Full
1374   * @crossplatform
1375   * @atomicservice
1376   * @since 11
1377   */
1378  /**
1379   * Call the function when editing the input text
1380   *
1381   * <p><strong>NOTE</strong>:
1382   * <br>In this callback, if cursor operations are performed,
1383   * developers need to adjust the cursor logic based on the previewText parameter to ensure it works seamlessly within the preview display scenario.
1384   * </p>
1385   *
1386   * @param { EditableTextOnChangeCallback } callback
1387   * @returns { SearchAttribute }
1388   * @syscap SystemCapability.ArkUI.ArkUI.Full
1389   * @crossplatform
1390   * @atomicservice
1391   * @since arkts {'1.1':'12', '1.2':'20'}
1392   * @arkts 1.1&1.2
1393   */
1394  onChange(callback: EditableTextOnChangeCallback): SearchAttribute;
1395
1396  /**
1397   * Called when the text selection changes.
1398   *
1399   * @param { function } callback - callback of the listened event.
1400   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1401   * @syscap SystemCapability.ArkUI.ArkUI.Full
1402   * @crossplatform
1403   * @since 10
1404   */
1405  /**
1406   * Called when the text selection changes.
1407   *
1408   * @param { function } callback - callback of the listened event.
1409   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1410   * @syscap SystemCapability.ArkUI.ArkUI.Full
1411   * @crossplatform
1412   * @atomicservice
1413   * @since 11
1414   */
1415  /**
1416   * Called when the text selection changes.
1417   *
1418   * Anonymous Object Rectification.
1419   * @param { OnTextSelectionChangeCallback } callback - Callback of the listened event.
1420   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1421   * @syscap SystemCapability.ArkUI.ArkUI.Full
1422   * @crossplatform
1423   * @atomicservice
1424   * @since arkts {'1.1':'18', '1.2':'20'}
1425   * @arkts 1.1&1.2
1426   */
1427  onTextSelectionChange(callback: OnTextSelectionChangeCallback): SearchAttribute;
1428
1429  /**
1430   * Called when the content scrolls.
1431   *
1432   * @param { function } callback - callback of the listened event.
1433   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1434   * @syscap SystemCapability.ArkUI.ArkUI.Full
1435   * @crossplatform
1436   * @since 10
1437   */
1438  /**
1439   * Called when the content scrolls.
1440   *
1441   * @param { function } callback - callback of the listened event.
1442   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1443   * @syscap SystemCapability.ArkUI.ArkUI.Full
1444   * @crossplatform
1445   * @atomicservice
1446   * @since 11
1447   */
1448  /**
1449   * Called when the content scrolls.
1450   *
1451   * Anonymous Object Rectification.
1452   * @param { OnContentScrollCallback } callback - Callback of the listened event.
1453   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1454   * @syscap SystemCapability.ArkUI.ArkUI.Full
1455   * @crossplatform
1456   * @atomicservice
1457   * @since arkts {'1.1':'18', '1.2':'20'}
1458   * @arkts 1.1&1.2
1459   */
1460  onContentScroll(callback: OnContentScrollCallback): SearchAttribute;
1461
1462  /**
1463   * Called when using the Clipboard menu
1464   *
1465   * @param { function } callback
1466   * @returns { SearchAttribute }
1467   * @syscap SystemCapability.ArkUI.ArkUI.Full
1468   * @since 8
1469   */
1470  /**
1471   * Called when using the Clipboard menu
1472   *
1473   * @param { function } callback
1474   * @returns { SearchAttribute }
1475   * @syscap SystemCapability.ArkUI.ArkUI.Full
1476   * @crossplatform
1477   * @since 10
1478   */
1479  /**
1480   * Called when using the Clipboard menu
1481   *
1482   * @param { function } callback
1483   * @returns { SearchAttribute }
1484   * @syscap SystemCapability.ArkUI.ArkUI.Full
1485   * @crossplatform
1486   * @atomicservice
1487   * @since 11
1488   */
1489  /**
1490   * Called when using the Clipboard menu.
1491   *
1492   * Anonymous Object Rectification.
1493   * @param { Callback<string> } callback - Callback used to return the copied text content.
1494   * @returns { SearchAttribute }
1495   * @syscap SystemCapability.ArkUI.ArkUI.Full
1496   * @crossplatform
1497   * @atomicservice
1498   * @since arkts {'1.1':'18', '1.2':'20'}
1499   * @arkts 1.1&1.2
1500   */
1501  onCopy(callback: Callback<string>): SearchAttribute;
1502
1503  /**
1504   * Called when using the Clipboard menu
1505   *
1506   * @param { function } callback
1507   * @returns { SearchAttribute }
1508   * @syscap SystemCapability.ArkUI.ArkUI.Full
1509   * @since 8
1510   */
1511  /**
1512   * Called when using the Clipboard menu
1513   *
1514   * @param { function } callback
1515   * @returns { SearchAttribute }
1516   * @syscap SystemCapability.ArkUI.ArkUI.Full
1517   * @crossplatform
1518   * @since 10
1519   */
1520  /**
1521   * Called when using the Clipboard menu
1522   *
1523   * @param { function } callback
1524   * @returns { SearchAttribute }
1525   * @syscap SystemCapability.ArkUI.ArkUI.Full
1526   * @crossplatform
1527   * @atomicservice
1528   * @since 11
1529   */
1530  /**
1531   * Called when using the Clipboard menu.
1532   *
1533   * Anonymous Object Rectification.
1534   * @param { Callback<string> } callback - Callback used to return the cut text content.
1535   * @returns { SearchAttribute }
1536   * @syscap SystemCapability.ArkUI.ArkUI.Full
1537   * @crossplatform
1538   * @atomicservice
1539   * @since arkts {'1.1':'18', '1.2':'20'}
1540   * @arkts 1.1&1.2
1541   */
1542  onCut(callback: Callback<string>): SearchAttribute;
1543
1544  /**
1545   * Called when using the Clipboard menu
1546   *
1547   * @param { function } callback
1548   * @returns { SearchAttribute }
1549   * @syscap SystemCapability.ArkUI.ArkUI.Full
1550   * @since 8
1551   */
1552  /**
1553   * Called when using the Clipboard menu
1554   *
1555   * @param { function } callback
1556   * @returns { SearchAttribute }
1557   * @syscap SystemCapability.ArkUI.ArkUI.Full
1558   * @crossplatform
1559   * @since 10
1560   */
1561  /**
1562   * Called when using the Clipboard menu
1563   *
1564   * @param { function } callback
1565   *          Executed when a paste operation is performed.
1566   *          { string } value - The text content to be pasted.
1567   *          { PasteEvent } event - The user-defined paste event.
1568   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1569   * @syscap SystemCapability.ArkUI.ArkUI.Full
1570   * @crossplatform
1571   * @atomicservice
1572   * @since 11
1573   */
1574  /**
1575   * Called when using the Clipboard menu.
1576   *
1577   * Anonymous Object Rectification.
1578   * @param { OnPasteCallback } callback - Executed when a paste operation is performed.Callback used to return the pasted text content.
1579   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1580   * @syscap SystemCapability.ArkUI.ArkUI.Full
1581   * @crossplatform
1582   * @atomicservice
1583   * @since arkts {'1.1':'18', '1.2':'20'}
1584   * @arkts 1.1&1.2
1585   */
1586  onPaste(callback: OnPasteCallback): SearchAttribute;
1587
1588  /**
1589   * Called when the copy option is set.
1590   *
1591   * @param { CopyOptions } value
1592   * @returns { SearchAttribute }
1593   * @syscap SystemCapability.ArkUI.ArkUI.Full
1594   * @since 9
1595   */
1596  /**
1597   * Called when the copy option is set.
1598   *
1599   * @param { CopyOptions } value
1600   * @returns { SearchAttribute }
1601   * @syscap SystemCapability.ArkUI.ArkUI.Full
1602   * @crossplatform
1603   * @since 10
1604   */
1605  /**
1606   * Called when the copy option is set.
1607   *
1608   * <p><strong>NOTE</strong>:
1609   * <br>If this attribute is set to CopyOptions.None, the text can only be pasted;
1610   * all other actions, such as copying, cutting, and sharing, are disabled.
1611   * <br>Dragging is not allowed when CopyOptions.None is set.
1612   * </p>
1613   *
1614   * @param { CopyOptions } value - Default value is CopyOptions.LocalDevice.
1615   * @returns { SearchAttribute }
1616   * @syscap SystemCapability.ArkUI.ArkUI.Full
1617   * @crossplatform
1618   * @atomicservice
1619   * @since arkts {'1.1':'11', '1.2':'20'}
1620   * @arkts 1.1&1.2
1621   */
1622  copyOption(value: CopyOptions): SearchAttribute;
1623
1624  /**
1625   * Called when the input of maximum text length is set.
1626   *
1627   * @param { number } value
1628   * @returns { SearchAttribute }
1629   * @syscap SystemCapability.ArkUI.ArkUI.Full
1630   * @since 11
1631   */
1632  /**
1633   * Called when the input of maximum text length is set.
1634   *
1635   * <p><strong>NOTE</strong>:
1636   * <br>By default, there is no maximum number of characters.
1637   * <br>When the maximum number is reached, no more characters can be entered.
1638   * </p>
1639   *
1640   * @param { number } value
1641   * @returns { SearchAttribute }
1642   * @syscap SystemCapability.ArkUI.ArkUI.Full
1643   * @atomicservice
1644   * @since 12
1645   */
1646  /**
1647   * Called when the input of maximum text length is set.
1648   *
1649   * <p><strong>NOTE</strong>:
1650   * <br>By default, there is no maximum number of characters.
1651   * <br>When the maximum number is reached, no more characters can be entered.
1652   * </p>
1653   *
1654   * @param { number } value
1655   * @returns { SearchAttribute }
1656   * @syscap SystemCapability.ArkUI.ArkUI.Full
1657   * @crossplatform
1658   * @atomicservice
1659   * @since 20
1660   * @arkts 1.1&1.2
1661   */
1662  maxLength(value: number): SearchAttribute;
1663
1664  /**
1665   * Called when the text align is set.
1666   *
1667   * @param { TextAlign } value
1668   * @returns { SearchAttribute }
1669   * @syscap SystemCapability.ArkUI.ArkUI.Full
1670   * @since 9
1671   */
1672  /**
1673   * Called when the text align is set.
1674   *
1675   * @param { TextAlign } value
1676   * @returns { SearchAttribute }
1677   * @syscap SystemCapability.ArkUI.ArkUI.Full
1678   * @crossplatform
1679   * @since 10
1680   */
1681  /**
1682   * Called when the text align is set.
1683   *
1684   * <p><strong>NOTE</strong>:
1685   * <br>Currently, the following alignment modes are supported: Start, Center, and End.
1686   * </p>
1687   *
1688   * @param { TextAlign } value - Default value is TextAlign.Start.
1689   * @returns { SearchAttribute }
1690   * @syscap SystemCapability.ArkUI.ArkUI.Full
1691   * @crossplatform
1692   * @atomicservice
1693   * @since arkts {'1.1':'11', '1.2':'20'}
1694   * @arkts 1.1&1.2
1695   */
1696  textAlign(value: TextAlign): SearchAttribute;
1697
1698  /**
1699   * Sets whether request keyboard or not when on focus.
1700   *
1701   * @param { boolean } value
1702   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1703   * @syscap SystemCapability.ArkUI.ArkUI.Full
1704   * @crossplatform
1705   * @since 10
1706   */
1707  /**
1708   * Sets whether request keyboard or not when on focus.
1709   *
1710   * <p><strong>NOTE</strong>:
1711   * <br>Since API version 10, the Search component brings up the keyboard by default when it obtains focus.
1712   * </p>
1713   *
1714   * @param { boolean } value - Default value is true.
1715   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1716   * @syscap SystemCapability.ArkUI.ArkUI.Full
1717   * @crossplatform
1718   * @atomicservice
1719   * @since arkts {'1.1':'11', '1.2':'20'}
1720   * @arkts 1.1&1.2
1721   */
1722  enableKeyboardOnFocus(value: boolean): SearchAttribute;
1723
1724  /**
1725   * Controls whether the selection menu pops up.
1726   *
1727   * @param { boolean } value
1728   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1729   * @syscap SystemCapability.ArkUI.ArkUI.Full
1730   * @crossplatform
1731   * @since 10
1732   */
1733  /**
1734   * Controls whether the selection menu pops up.
1735   *
1736   * <p><strong>NOTE</strong>:
1737   * <br><em>true</em>: Tapping, long-pressing, double-tapping, triple-tapping,
1738   * or right-clicking the text box will not trigger the system text selection menu.
1739   * <br><em>false</em>: Tapping, long-pressing, double-tapping, triple-tapping,
1740   * or right-clicking the text box will trigger the system text selection menu.
1741   * </p>
1742   *
1743   * @param { boolean } value - Default value is false.
1744   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1745   * @syscap SystemCapability.ArkUI.ArkUI.Full
1746   * @crossplatform
1747   * @atomicservice
1748   * @since arkts {'1.1':'11', '1.2':'20'}
1749   * @arkts 1.1&1.2
1750   */
1751  selectionMenuHidden(value: boolean): SearchAttribute;
1752
1753  /**
1754   * Called when the minimum font size of the font is set.
1755   *
1756   * <p><strong>NOTE</strong>:
1757   * <br>For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported.
1758   * <br>For the setting to take effect, this attribute must be used together with maxFontSize or layout constraint settings.
1759   * <br>When the adaptive font size is used, the fontSize settings do not take effect.
1760   * </p>
1761   *
1762   * @param { number | string | Resource } value - The unit is fp.
1763   * @returns { SearchAttribute }
1764   * @syscap SystemCapability.ArkUI.ArkUI.Full
1765   * @crossplatform
1766   * @atomicservice
1767   * @since arkts {'1.1':'12', '1.2':'20'}
1768   * @arkts 1.1&1.2
1769   */
1770  minFontSize(value: number | string | Resource): SearchAttribute;
1771
1772  /**
1773   * Called when the maximum font size of the font is set.
1774   *
1775   * <p><strong>NOTE</strong>:
1776   * <br>For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported.
1777   * <br>For the setting to take effect, this attribute must be used together with minFontSize or layout constraint settings.
1778   * <br>When the adaptive font size is used, the fontSize settings do not take effect.
1779   * </p>
1780   *
1781   * @param { number | string | Resource } value - The unit is fp.
1782   * @returns { SearchAttribute }
1783   * @syscap SystemCapability.ArkUI.ArkUI.Full
1784   * @crossplatform
1785   * @atomicservice
1786   * @since arkts {'1.1':'12', '1.2':'20'}
1787   * @arkts 1.1&1.2
1788   */
1789  maxFontSize(value: number | string | Resource): SearchAttribute;
1790
1791  /**
1792   * Called when the minimum font scale of the font is set.
1793   * Value range: [0, 1]
1794   *
1795   * <p><strong>NOTE</strong>:
1796   * <br>The undefined type is supported.
1797   * <br>A value less than 0 is handled as 0.
1798   * <br>A value greater than 1 is handled as 1.
1799   * <br>Abnormal values are ineffective by default.
1800   * </p>
1801   *
1802   * @param { Optional<number | Resource> } scale
1803   * @returns { SearchAttribute }
1804   * @syscap SystemCapability.ArkUI.ArkUI.Full
1805   * @atomicservice
1806   * @since 18
1807   */
1808  /**
1809   * Called when the minimum font scale of the font is set.
1810   * Value range: [0, 1]
1811   *
1812   * <p><strong>NOTE</strong>:
1813   * <br>The undefined type is supported.
1814   * <br>A value less than 0 is handled as 0.
1815   * <br>A value greater than 1 is handled as 1.
1816   * <br>Abnormal values are ineffective by default.
1817   * </p>
1818   *
1819   * @param { Optional<number | Resource> } scale
1820   * @returns { SearchAttribute }
1821   * @syscap SystemCapability.ArkUI.ArkUI.Full
1822   * @crossplatform
1823   * @atomicservice
1824   * @since 20
1825   * @arkts 1.1&1.2
1826   */
1827  minFontScale(scale: Optional<number | Resource>): SearchAttribute;
1828
1829   /**
1830    * Called when the maximum font scale of the font is set.
1831    * Value range: [1, +∞)
1832    *
1833    * <p><strong>NOTE</strong>:
1834    * <br>The undefined type is supported.
1835    * <br>A value less than 1 is handled as 1.
1836    * <br>Abnormal values are ineffective by default.
1837    * </p>
1838    *
1839    * @param { Optional<number | Resource> } scale
1840    * @returns { SearchAttribute }
1841    * @syscap SystemCapability.ArkUI.ArkUI.Full
1842    * @atomicservice
1843    * @since 18
1844    */
1845   /**
1846    * Called when the maximum font scale of the font is set.
1847    * Value range: [1, +∞)
1848    *
1849    * <p><strong>NOTE</strong>:
1850    * <br>The undefined type is supported.
1851    * <br>A value less than 1 is handled as 1.
1852    * <br>Abnormal values are ineffective by default.
1853    * </p>
1854    *
1855    * @param { Optional<number | Resource> } scale
1856    * @returns { SearchAttribute }
1857    * @syscap SystemCapability.ArkUI.ArkUI.Full
1858    * @crossplatform
1859    * @atomicservice
1860    * @since 20
1861    * @arkts 1.1&1.2
1862    */
1863   maxFontScale(scale: Optional<number | Resource>): SearchAttribute;
1864
1865  /**
1866   * Define custom keyboard.
1867   *
1868   * @param { CustomBuilder } value
1869   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1870   * @syscap SystemCapability.ArkUI.ArkUI.Full
1871   * @since 10
1872   */
1873  /**
1874   * Define custom keyboard.
1875   *
1876   * @param { CustomBuilder } value
1877   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1878   * @syscap SystemCapability.ArkUI.ArkUI.Full
1879   * @crossplatform
1880   * @atomicservice
1881   * @since 11
1882   */
1883  /**
1884   * Define custom keyboard.
1885   *
1886   * <p><strong>NOTE</strong>:
1887   * <br>When a custom keyboard is set, activating the text box opens the specified custom component,
1888   * instead of the system input method.
1889   * <br>The custom keyboard's height can be set through the height attribute of the custom component's root node,
1890   * and its width is fixed at the default value.
1891   * <br>The custom keyboard is presented by overlaying the original screen.
1892   * <br>It is not compressed or lifted if avoid mode is not enabled or avoidance is not needed for the text box.
1893   * <br>The custom keyboard cannot obtain the focus, but it blocks gesture events.
1894   * <br>By default, the custom keyboard is closed when the input component loses the focus.
1895   * <br>You can also use the stopEditing API to close the keyboard.
1896   * <br>When a custom keyboard is set, the text box does not support camera input, even when the device supports.
1897   * <br>When setting a custom keyboard, you can bind the onKeyPrelme event to prevent input from the physical keyboard.
1898   * </p>
1899   *
1900   * @param { CustomBuilder } value - Set up a custom keyboard of Search
1901   * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of Search
1902   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1903   * @syscap SystemCapability.ArkUI.ArkUI.Full
1904   * @crossplatform
1905   * @atomicservice
1906   * @since arkts {'1.1':'12', '1.2':'20'}
1907   * @arkts 1.1&1.2
1908   */
1909  customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute;
1910
1911  /**
1912   * Called when the text decoration of the text is set.
1913   *
1914   * @param { TextDecorationOptions } value - Default value is { type: TextDecorationType.None, color: Color.Black, style: TextDecorationStyle.SOLID }.
1915   * @returns { SearchAttribute }
1916   * @syscap SystemCapability.ArkUI.ArkUI.Full
1917   * @crossplatform
1918   * @atomicservice
1919   * @since arkts {'1.1':'12', '1.2':'20'}
1920   * @arkts 1.1&1.2
1921   */
1922  decoration(value: TextDecorationOptions): SearchAttribute;
1923
1924  /**
1925   * Called when the distance between text fonts is set.
1926   *
1927   * <p><strong>NOTE</strong>:
1928   * <br>If the value specified is a percentage or 0, the default value is used.
1929   * <br>For the string type, numeric string values with optional units, for example, "10" or "10fp", are supported.
1930   * <br>If the value specified is a negative value, the text is compressed.
1931   * <br>A negative value too small may result in the text being compressed to 0 and no content being displayed.
1932   * </p>
1933   *
1934   * @param { number | string | Resource } value - The unit is fp.
1935   * @returns { SearchAttribute }
1936   * @syscap SystemCapability.ArkUI.ArkUI.Full
1937   * @crossplatform
1938   * @atomicservice
1939   * @since arkts {'1.1':'12', '1.2':'20'}
1940   * @arkts 1.1&1.2
1941   */
1942  letterSpacing(value: number | string | Resource): SearchAttribute;
1943
1944  /**
1945   * Called when the line height of the font is set.
1946   *
1947   * <p><strong>NOTE</strong>:
1948   * <br>If the value is less than or equal to 0, the line height is not limited and the font size is adaptive.
1949   * <br>If the value is of the number type, the unit fp is used.
1950   * </p>
1951   *
1952   * @param { number | string | Resource } value
1953   * @returns { SearchAttribute }
1954   * @syscap SystemCapability.ArkUI.ArkUI.Full
1955   * @crossplatform
1956   * @atomicservice
1957   * @since arkts {'1.1':'12', '1.2':'20'}
1958   * @arkts 1.1&1.2
1959   */
1960  lineHeight(value: number | string | Resource): SearchAttribute;
1961
1962  /**
1963   * Called when the search type is set.
1964   *
1965   * @param { SearchType } value
1966   * @returns { SearchAttribute }
1967   * @syscap SystemCapability.ArkUI.ArkUI.Full
1968   * @crossplatform
1969   * @since 11
1970   */
1971  /**
1972   * Called when the search type is set.
1973   *
1974   * @param { SearchType } value - Default value is SearchType.Normal.
1975   * @returns { SearchAttribute }
1976   * @syscap SystemCapability.ArkUI.ArkUI.Full
1977   * @crossplatform
1978   * @atomicservice
1979   * @since arkts {'1.1':'12', '1.2':'20'}
1980   * @arkts 1.1&1.2
1981   */
1982  type(value: SearchType): SearchAttribute;
1983
1984  /**
1985   * Set font feature.
1986   *
1987   * @param { string } value - The fontFeature.
1988   * normal | <feature-tag-value>,
1989   * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0
1990   * the values of <feature-tag-value> reference to doc of search component
1991   * number of <feature-tag-value> can be single or multiple, and separated by comma ','.
1992   * @returns { SearchAttribute }
1993   * @syscap SystemCapability.ArkUI.ArkUI.Full
1994   * @crossplatform
1995   * @atomicservice
1996   * @since arkts {'1.1':'12', '1.2':'20'}
1997   * @arkts 1.1&1.2
1998   */
1999  fontFeature(value: string): SearchAttribute;
2000
2001  /**
2002   * Get text value information when about to input.
2003   *
2004   * <p><strong>NOTE</strong>:
2005   * <br>It returns true if the text is inserted; returns false otherwise.
2006   * <br>This callback is not triggered for pre-edit or candidate word operations.
2007   * <br>It is available only for system input methods.
2008   * </p>
2009   *
2010   * @param { Callback<InsertValue, boolean> } callback - The triggered function when text content is about to insert.
2011   * @returns { SearchAttribute }
2012   * @syscap SystemCapability.ArkUI.ArkUI.Full
2013   * @crossplatform
2014   * @atomicservice
2015   * @since arkts {'1.1':'12', '1.2':'20'}
2016   * @arkts 1.1&1.2
2017   */
2018  onWillInsert(callback: Callback<InsertValue, boolean>): SearchAttribute;
2019
2020  /**
2021   * Get text value information when completed input.
2022   *
2023   * <p><strong>NOTE</strong>:
2024   * <br>It is available only for system input methods.
2025   * </p>
2026   *
2027   * @param { Callback<InsertValue> } callback - The triggered function when text content has been inserted.
2028   * @returns { SearchAttribute }
2029   * @syscap SystemCapability.ArkUI.ArkUI.Full
2030   * @crossplatform
2031   * @atomicservice
2032   * @since arkts {'1.1':'12', '1.2':'20'}
2033   * @arkts 1.1&1.2
2034   */
2035  onDidInsert(callback: Callback<InsertValue>): SearchAttribute;
2036
2037  /**
2038   * Get text value information when about to delete.
2039   *
2040   * <p><strong>NOTE</strong>:
2041   * <br>It returns true if the text is deleted; returns false otherwise.
2042   * <br>This callback is not invoked for text preview.
2043   * <br>It is available only for system input methods.
2044   * </p>
2045   *
2046   * @param { Callback<DeleteValue, boolean> } callback - The triggered function when text content is about to delete.
2047   * @returns { SearchAttribute }
2048   * @syscap SystemCapability.ArkUI.ArkUI.Full
2049   * @crossplatform
2050   * @atomicservice
2051   * @since arkts {'1.1':'12', '1.2':'20'}
2052   * @arkts 1.1&1.2
2053   */
2054  onWillDelete(callback: Callback<DeleteValue, boolean>): SearchAttribute;
2055
2056  /**
2057   * Get text value information when the deletion has been completed
2058   *
2059   * <p><strong>NOTE</strong>:
2060   * <br>It is available only for system input methods.
2061   * </p>
2062   *
2063   * @param { Callback<DeleteValue> } callback - The triggered function when text content has been deleted.
2064   * @returns { SearchAttribute }
2065   * @syscap SystemCapability.ArkUI.ArkUI.Full
2066   * @crossplatform
2067   * @atomicservice
2068   * @since arkts {'1.1':'12', '1.2':'20'}
2069   * @arkts 1.1&1.2
2070   */
2071  onDidDelete(callback: Callback<DeleteValue>): SearchAttribute;
2072
2073  /**
2074   * Called before the search component attach the InputMethod.
2075   *
2076   * @param { Callback<IMEClient> } callback - The triggered function before attach the InputMethod.
2077   * @returns { SearchAttribute }
2078   * @syscap SystemCapability.ArkUI.ArkUI.Full
2079   * @crossplatform
2080   * @atomicservice
2081   * @since 20
2082   */
2083  onWillAttachIME(callback: Callback<IMEClient>): SearchAttribute;
2084
2085  /**
2086   * Set the custom text menu.
2087   * Sets the extended options of the custom context menu on selection,
2088   * including the text content, icon, and callback.
2089   *
2090   * @param { EditMenuOptions } editMenu - Customize text menu options.
2091   * @returns { SearchAttribute }
2092   * @syscap SystemCapability.ArkUI.ArkUI.Full
2093   * @crossplatform
2094   * @atomicservice
2095   * @since arkts {'1.1':'12', '1.2':'20'}
2096   * @arkts 1.1&1.2
2097   */
2098  editMenuOptions(editMenu: EditMenuOptions): SearchAttribute;
2099
2100  /**
2101   * Define the preview text mode of the text input.
2102   *
2103   * <p><strong>NOTE</strong>:
2104   * <br>Preview text is in a temporary state and does not support text interception.
2105   * <br>As such, it does not trigger onWillInsert, onDidInsert, onWillDelete, or onDidDelete callbacks.
2106   * </p>
2107   *
2108   * @param { boolean } enable - Indicates the preview text mode.Default value is true.
2109   * @returns { SearchAttribute }
2110   * @syscap SystemCapability.ArkUI.ArkUI.Full
2111   * @crossplatform
2112   * @atomicservice
2113   * @since arkts {'1.1':'12', '1.2':'20'}
2114   * @arkts 1.1&1.2
2115   */
2116  enablePreviewText(enable: boolean): SearchAttribute;
2117
2118  /**
2119   * Enable or disable haptic feedback.
2120   *
2121   * <p><strong>NOTE</strong>:
2122   * <br>To enable haptic feedback,
2123   * you must declare the ohos.permission.VIBRATE permission under requestPermissions in the module.json5 file of the project.
2124   * <code>
2125   * "requestPermissions": [
2126   *   {
2127   *       "name": "ohos.permission.VIBRATE",
2128   *   }
2129   * ]
2130   * </code>
2131   * </p>
2132   *
2133   * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback.
2134   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
2135   * @syscap SystemCapability.ArkUI.ArkUI.Full
2136   * @crossplatform
2137   * @atomicservice
2138   * @since arkts {'1.1':'13', '1.2':'20'}
2139   * @arkts 1.1&1.2
2140   */
2141  enableHapticFeedback(isEnabled: boolean): SearchAttribute;
2142
2143  /**
2144   * Set text mode of automatic case mode switching.
2145   *
2146   * @param { AutoCapitalizationMode } mode - Automatic case mode switching.
2147   * @returns { SearchAttribute }
2148   * @syscap SystemCapability.ArkUI.ArkUI.Full
2149   * @crossplatform
2150   * @atomicservice
2151   * @since arkts {'1.1':'20', '1.2':'20'}
2152   * @arkts 1.1&1.2
2153   */
2154  autoCapitalizationMode(mode: AutoCapitalizationMode): SearchAttribute;
2155
2156  /**
2157   * Set the text with half leading.
2158   *
2159   * @param { Optional<boolean> } halfLeading - Default value is false.The value true means that half leading is enabled, and false means the opposite.
2160   * @returns { SearchAttribute }
2161   * @syscap SystemCapability.ArkUI.ArkUI.Full
2162   * @crossplatform
2163   * @atomicservice
2164   * @since arkts {'1.1':'18', '1.2':'20'}
2165   * @arkts 1.1&1.2
2166   */
2167  halfLeading(halfLeading: Optional<boolean>): SearchAttribute;
2168
2169  /**
2170   * Set whether stop backPressed callback event or not.
2171   *
2172   * @param { Optional<boolean> } isStopped - Default value is true, set false to trigger the latest callback event.
2173   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
2174   * @syscap SystemCapability.ArkUI.ArkUI.Full
2175   * @atomicservice
2176   * @since arkts {'1.1':'15', '1.2':'20'}
2177   * @arkts 1.1&1.2
2178   */
2179  stopBackPress(isStopped: Optional<boolean>): SearchAttribute;
2180
2181  /**
2182   * Get text value information when about to change.
2183   *
2184   * <p><strong>NOTE</strong>:
2185   * <br>This callback is triggered after onWillInsert and onWillDelete, but before onDidInsert and onDidDelete.
2186   * </p>
2187   *
2188   * @param { Callback<EditableTextChangeValue, boolean> } callback - The triggered function when text content is about to change.
2189   * Returning true allows the change to proceed, while returning false cancels the change.
2190   * @returns { SearchAttribute }
2191   * @syscap SystemCapability.ArkUI.ArkUI.Full
2192   * @crossplatform
2193   * @atomicservice
2194   * @since arkts {'1.1':'15', '1.2':'20'}
2195   * @arkts 1.1&1.2
2196   */
2197  onWillChange(callback: Callback<EditableTextChangeValue, boolean>): SearchAttribute;
2198
2199  /**
2200   * Set the keyboard appearance.
2201   *
2202   * @param { Optional<KeyboardAppearance> } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE
2203   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
2204   * @syscap SystemCapability.ArkUI.ArkUI.Full
2205   * @atomicservice
2206   * @since arkts {'1.1':'15', '1.2':'20'}
2207   * @arkts 1.1&1.2
2208   */
2209  keyboardAppearance(appearance: Optional<KeyboardAppearance>): SearchAttribute;
2210
2211  /**
2212   * Set the stroke width.
2213   *
2214   * @param { Optional<LengthMetrics> } width - indicates the stroke width.
2215   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
2216   * @syscap SystemCapability.ArkUI.ArkUI.Full
2217   * @crossplatform
2218   * @atomicservice
2219   * @since 20
2220   */
2221  strokeWidth(width: Optional<LengthMetrics>): SearchAttribute;
2222
2223  /**
2224   * Set the stroke color.
2225   *
2226   * @param { Optional<ResourceColor> } color - indicates the stroke color.
2227   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
2228   * @syscap SystemCapability.ArkUI.ArkUI.Full
2229   * @crossplatform
2230   * @atomicservice
2231   * @since 20
2232   */
2233  strokeColor(color: Optional<ResourceColor>): SearchAttribute;
2234
2235  /**
2236   * Whether to enable automatic spacing between Chinese and Latin characters.
2237   *
2238   * @param { Optional<boolean> } enabled - The default value is false, indicates the flag whether to enable automatic spacing.
2239   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
2240   * @syscap SystemCapability.ArkUI.ArkUI.Full
2241   * @crossplatform
2242   * @atomicservice
2243   * @since 20
2244   */
2245  enableAutoSpacing(enabled: Optional<boolean>): SearchAttribute;
2246}
2247
2248/**
2249 * Defines Search Component.
2250 *
2251 * @syscap SystemCapability.ArkUI.ArkUI.Full
2252 * @since 8
2253 */
2254/**
2255 * Defines Search Component.
2256 *
2257 * @syscap SystemCapability.ArkUI.ArkUI.Full
2258 * @crossplatform
2259 * @since 10
2260 */
2261/**
2262 * Defines Search Component.
2263 *
2264 * @syscap SystemCapability.ArkUI.ArkUI.Full
2265 * @crossplatform
2266 * @atomicservice
2267 * @since 11
2268 */
2269declare const Search: SearchInterface;
2270
2271/**
2272 * Defines Search Component instance.
2273 *
2274 * @syscap SystemCapability.ArkUI.ArkUI.Full
2275 * @since 8
2276 */
2277/**
2278 * Defines Search Component instance.
2279 *
2280 * @syscap SystemCapability.ArkUI.ArkUI.Full
2281 * @crossplatform
2282 * @since 10
2283 */
2284/**
2285 * Defines Search Component instance.
2286 *
2287 * @syscap SystemCapability.ArkUI.ArkUI.Full
2288 * @crossplatform
2289 * @atomicservice
2290 * @since 11
2291 */
2292declare const SearchInstance: SearchAttribute;
2293