• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Sets the initial state of the slidable panel.
23 *
24 * @enum { number }
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 7
27 */
28/**
29 * Sets the initial state of the slidable panel.
30 *
31 * @enum { number }
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @crossplatform
34 * @since 10
35 */
36/**
37 * Sets the initial state of the slidable panel.
38 *
39 * @enum { number }
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @atomicservice
43 * @since 11
44 * @deprecated since 12
45 */
46declare enum PanelMode {
47  /**
48   * Minimum state.
49   *
50   * @syscap SystemCapability.ArkUI.ArkUI.Full
51   * @since 7
52   */
53  /**
54   * Minimum state.
55   *
56   * @syscap SystemCapability.ArkUI.ArkUI.Full
57   * @crossplatform
58   * @since 10
59   */
60  /**
61   * Minimum state.
62   *
63   * @syscap SystemCapability.ArkUI.ArkUI.Full
64   * @crossplatform
65   * @atomicservice
66   * @since 11
67   * @deprecated since 12
68   */
69  Mini,
70
71  /**
72   * SHalf-screen-like status
73   *
74   * @syscap SystemCapability.ArkUI.ArkUI.Full
75   * @since 7
76   */
77  /**
78   * SHalf-screen-like status
79   *
80   * @syscap SystemCapability.ArkUI.ArkUI.Full
81   * @crossplatform
82   * @since 10
83   */
84  /**
85   * SHalf-screen-like status
86   *
87   * @syscap SystemCapability.ArkUI.ArkUI.Full
88   * @crossplatform
89   * @atomicservice
90   * @since 11
91   * @deprecated since 12
92   */
93  Half,
94
95  /**
96   * Class Full Screen Status.
97   *
98   * @syscap SystemCapability.ArkUI.ArkUI.Full
99   * @since 7
100   */
101  /**
102   * Class Full Screen Status.
103   *
104   * @syscap SystemCapability.ArkUI.ArkUI.Full
105   * @crossplatform
106   * @since 10
107   */
108  /**
109   * Class Full Screen Status.
110   *
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @crossplatform
113   * @atomicservice
114   * @since 11
115   * @deprecated since 12
116   */
117  Full,
118}
119
120/**
121 * Sets the type of sliding panel.
122 *
123 * @enum { number }
124 * @syscap SystemCapability.ArkUI.ArkUI.Full
125 * @since 7
126 */
127/**
128 * Sets the type of sliding panel.
129 *
130 * @enum { number }
131 * @syscap SystemCapability.ArkUI.ArkUI.Full
132 * @crossplatform
133 * @since 10
134 */
135/**
136 * Sets the type of sliding panel.
137 *
138 * @enum { number }
139 * @syscap SystemCapability.ArkUI.ArkUI.Full
140 * @crossplatform
141 * @atomicservice
142 * @since 11
143 * @deprecated since 12
144 */
145declare enum PanelType {
146  /**
147   * The switch between the minibar and full-screen display is provided.
148   *
149   * @syscap SystemCapability.ArkUI.ArkUI.Full
150   * @since 7
151   */
152  /**
153   * The switch between the minibar and full-screen display is provided.
154   *
155   * @syscap SystemCapability.ArkUI.ArkUI.Full
156   * @crossplatform
157   * @since 10
158   */
159  /**
160   * The switch between the minibar and full-screen display is provided.
161   *
162   * @syscap SystemCapability.ArkUI.ArkUI.Full
163   * @crossplatform
164   * @atomicservice
165   * @since 11
166   * @deprecated since 12
167   */
168  Minibar = 0,
169
170  /**
171   * Permanent content display class.
172   * The switchover effect is provided in three sizes: large (full-screen), medium (half-screen), and small.
173   *
174   * @syscap SystemCapability.ArkUI.ArkUI.Full
175   * @since 7
176   */
177  /**
178   * Permanent content display class.
179   * The switchover effect is provided in three sizes: large (full-screen), medium (half-screen), and small.
180   *
181   * @syscap SystemCapability.ArkUI.ArkUI.Full
182   * @crossplatform
183   * @since 10
184   */
185  /**
186   * Permanent content display class.
187   * The switchover effect is provided in three sizes: large (full-screen), medium (half-screen), and small.
188   *
189   * @syscap SystemCapability.ArkUI.ArkUI.Full
190   * @crossplatform
191   * @atomicservice
192   * @since 11
193   * @deprecated since 12
194   */
195  Foldable = 1,
196
197  /**
198   * Temporary content display area.
199   * The switchover effect is provided in three sizes: large (full-screen), medium (half-screen), and small.
200   *
201   * @syscap SystemCapability.ArkUI.ArkUI.Full
202   * @since 7
203   */
204  /**
205   * Temporary content display area.
206   * The switchover effect is provided in three sizes: large (full-screen), medium (half-screen), and small.
207   *
208   * @syscap SystemCapability.ArkUI.ArkUI.Full
209   * @crossplatform
210   * @since 10
211   */
212  /**
213   * Temporary content display area.
214   * The switchover effect is provided in three sizes: large (full-screen), medium (half-screen), and small.
215   *
216   * @syscap SystemCapability.ArkUI.ArkUI.Full
217   * @crossplatform
218   * @atomicservice
219   * @since 11
220   * @deprecated since 12
221   */
222  Temporary = 2,
223
224  /**
225   * Custom content display area.
226   * The switchover effect is provided in three sizes: large (full-screen), medium (half-screen), and small.
227   * @syscap SystemCapability.ArkUI.ArkUI.Full
228   * @crossplatform
229   * @since 10
230   */
231  /**
232   * Custom content display area.
233   * The switchover effect is provided in three sizes: large (full-screen), medium (half-screen), and small.
234   * @syscap SystemCapability.ArkUI.ArkUI.Full
235   * @crossplatform
236   * @atomicservice
237   * @since 11
238   * @deprecated since 12
239   */
240  CUSTOM = 3,
241}
242
243/**
244 * Enum for custom content display area.
245 *
246 * @enum { string }
247 * @syscap SystemCapability.ArkUI.ArkUI.Full
248 * @crossplatform
249 * @since 10
250 */
251/**
252 * Enum for custom content display area.
253 *
254 * @enum { string }
255 * @syscap SystemCapability.ArkUI.ArkUI.Full
256 * @crossplatform
257 * @atomicservice
258 * @since 11
259 * @deprecated since 12
260 */
261declare enum PanelHeight {
262  /**
263   * The Panel adapts to the content height.
264   *
265   * @syscap SystemCapability.ArkUI.ArkUI.Full
266   * @crossplatform
267   * @since 10
268   */
269  /**
270   * The Panel adapts to the content height.
271   *
272   * @syscap SystemCapability.ArkUI.ArkUI.Full
273   * @crossplatform
274   * @atomicservice
275   * @since 11
276   * @deprecated since 12
277   */
278  WRAP_CONTENT = 'wrapContent',
279}
280
281/**
282 * Provides a sliding panel interface.
283 *
284 * @interface PanelInterface
285 * @syscap SystemCapability.ArkUI.ArkUI.Full
286 * @since 7
287 */
288/**
289 * Provides a sliding panel interface.
290 *
291 * @interface PanelInterface
292 * @syscap SystemCapability.ArkUI.ArkUI.Full
293 * @crossplatform
294 * @since 10
295 */
296/**
297 * Provides a sliding panel interface.
298 *
299 * @interface PanelInterface
300 * @syscap SystemCapability.ArkUI.ArkUI.Full
301 * @crossplatform
302 * @atomicservice
303 * @since 11
304 * @deprecated since 12
305 */
306interface PanelInterface {
307  /**
308   * Called when the panel slidable panel pops up.
309   *
310   * @param { boolean } show
311   * @returns { PanelAttribute }
312   * @syscap SystemCapability.ArkUI.ArkUI.Full
313   * @since 7
314   */
315  /**
316   * Called when the panel slidable panel pops up.
317   *
318   * @param { boolean } show
319   * @returns { PanelAttribute }
320   * @syscap SystemCapability.ArkUI.ArkUI.Full
321   * @crossplatform
322   * @since 10
323   */
324  /**
325   * Called when the panel slidable panel pops up.
326   *
327   * @param { boolean } show
328   * @returns { PanelAttribute }
329   * @syscap SystemCapability.ArkUI.ArkUI.Full
330   * @crossplatform
331   * @atomicservice
332   * @since 11
333   * @deprecated since 12
334   */
335  (show: boolean): PanelAttribute;
336}
337
338/**
339 * @extends CommonMethod<PanelAttribute>
340 * @syscap SystemCapability.ArkUI.ArkUI.Full
341 * @since 7
342 */
343/**
344 * Pane Attribute.
345 *
346 * @extends CommonMethod<PanelAttribute>
347 * @syscap SystemCapability.ArkUI.ArkUI.Full
348 * @crossplatform
349 * @since 10
350 */
351/**
352 * Pane Attribute.
353 *
354 * @extends CommonMethod<PanelAttribute>
355 * @syscap SystemCapability.ArkUI.ArkUI.Full
356 * @crossplatform
357 * @atomicservice
358 * @since 11
359 * @deprecated since 12
360 */
361declare class PanelAttribute extends CommonMethod<PanelAttribute> {
362  /**
363   * Called when the initial state of the slidable panel is set.
364   *
365   * @param { PanelMode } value
366   * @returns { PanelAttribute }
367   * @syscap SystemCapability.ArkUI.ArkUI.Full
368   * @since 7
369   */
370  /**
371   * Called when the initial state of the slidable panel is set.
372   *
373   * @param { PanelMode } value
374   * @returns { PanelAttribute }
375   * @syscap SystemCapability.ArkUI.ArkUI.Full
376   * @crossplatform
377   * @since 10
378   */
379  /**
380   * Called when the initial state of the slidable panel is set.
381   *
382   * @param { PanelMode } value
383   * @returns { PanelAttribute }
384   * @syscap SystemCapability.ArkUI.ArkUI.Full
385   * @crossplatform
386   * @atomicservice
387   * @since 11
388   * @deprecated since 12
389   */
390  mode(value: PanelMode): PanelAttribute;
391
392  /**
393   * Called when the slidable panel type is set.
394   *
395   * @param { PanelType } value
396   * @returns { PanelAttribute }
397   * @syscap SystemCapability.ArkUI.ArkUI.Full
398   * @since 7
399   */
400  /**
401   * Called when the slidable panel type is set.
402   *
403   * @param { PanelType } value
404   * @returns { PanelAttribute }
405   * @syscap SystemCapability.ArkUI.ArkUI.Full
406   * @crossplatform
407   * @since 10
408   */
409  /**
410   * Called when the slidable panel type is set.
411   *
412   * @param { PanelType } value
413   * @returns { PanelAttribute }
414   * @syscap SystemCapability.ArkUI.ArkUI.Full
415   * @crossplatform
416   * @atomicservice
417   * @since 11
418   * @deprecated since 12
419   */
420  type(value: PanelType): PanelAttribute;
421
422  /**
423   * Called when determining whether dragbar exists.
424   *
425   * @param { boolean } value
426   * @returns { PanelAttribute }
427   * @syscap SystemCapability.ArkUI.ArkUI.Full
428   * @since 7
429   */
430  /**
431   * Called when determining whether dragbar exists.
432   *
433   * @param { boolean } value
434   * @returns { PanelAttribute }
435   * @syscap SystemCapability.ArkUI.ArkUI.Full
436   * @crossplatform
437   * @since 10
438   */
439  /**
440   * Called when determining whether dragbar exists.
441   *
442   * @param { boolean } value
443   * @returns { PanelAttribute }
444   * @syscap SystemCapability.ArkUI.ArkUI.Full
445   * @crossplatform
446   * @atomicservice
447   * @since 11
448   * @deprecated since 12
449   */
450  dragBar(value: boolean): PanelAttribute;
451
452  /**
453   * Sets the height. It is valid only when PanelType is set to Custom.
454   * @param {Dimension | PanelHeight} value - value - Content height to set.
455   * @returns { PanelAttribute } Returns the component attribute.
456   * @syscap SystemCapability.ArkUI.ArkUI.Full
457   * @crossplatform
458   * @since 10
459   */
460  /**
461   * Sets the height. It is valid only when PanelType is set to Custom.
462   * @param {Dimension | PanelHeight} value - value - Content height to set.
463   * @returns { PanelAttribute } Returns the component attribute.
464   * @syscap SystemCapability.ArkUI.ArkUI.Full
465   * @crossplatform
466   * @atomicservice
467   * @since 11
468   * @deprecated since 12
469   */
470  customHeight(value: Dimension | PanelHeight): PanelAttribute;
471
472  /**
473   * Called when the height in the full state is specified.
474   *
475   * @param { number | string } value
476   * @returns { PanelAttribute }
477   * @syscap SystemCapability.ArkUI.ArkUI.Full
478   * @since 7
479   */
480  /**
481   * Called when the height in the full state is specified.
482   *
483   * @param { number | string } value
484   * @returns { PanelAttribute }
485   * @syscap SystemCapability.ArkUI.ArkUI.Full
486   * @crossplatform
487   * @since 10
488   */
489  /**
490   * Called when the height in the full state is specified.
491   *
492   * @param { number | string } value
493   * @returns { PanelAttribute }
494   * @syscap SystemCapability.ArkUI.ArkUI.Full
495   * @crossplatform
496   * @atomicservice
497   * @since 11
498   * @deprecated since 12
499   */
500  fullHeight(value: number | string): PanelAttribute;
501
502  /**
503   * Called when the height in the half state is specified.
504   *
505   * @param { number | string } value
506   * @returns { PanelAttribute }
507   * @syscap SystemCapability.ArkUI.ArkUI.Full
508   * @since 7
509   */
510  /**
511   * Called when the height in the half state is specified.
512   *
513   * @param { number | string } value
514   * @returns { PanelAttribute }
515   * @syscap SystemCapability.ArkUI.ArkUI.Full
516   * @crossplatform
517   * @since 10
518   */
519  /**
520   * Called when the height in the half state is specified.
521   *
522   * @param { number | string } value
523   * @returns { PanelAttribute }
524   * @syscap SystemCapability.ArkUI.ArkUI.Full
525   * @crossplatform
526   * @atomicservice
527   * @since 11
528   * @deprecated since 12
529   */
530  halfHeight(value: number | string): PanelAttribute;
531
532  /**
533   * Called when the height in the mini state is specified.
534   *
535   * @param { number | string } value
536   * @returns { PanelAttribute }
537   * @syscap SystemCapability.ArkUI.ArkUI.Full
538   * @since 7
539   */
540  /**
541   * Called when the height in the mini state is specified.
542   *
543   * @param { number | string } value
544   * @returns { PanelAttribute }
545   * @syscap SystemCapability.ArkUI.ArkUI.Full
546   * @crossplatform
547   * @since 10
548   */
549  /**
550   * Called when the height in the mini state is specified.
551   *
552   * @param { number | string } value
553   * @returns { PanelAttribute }
554   * @syscap SystemCapability.ArkUI.ArkUI.Full
555   * @crossplatform
556   * @atomicservice
557   * @since 11
558   * @deprecated since 12
559   */
560  miniHeight(value: number | string): PanelAttribute;
561
562  /**
563   * Called when the panel slidable panel pops up.
564   *
565   * @param { boolean } value
566   * @returns { PanelAttribute }
567   * @syscap SystemCapability.ArkUI.ArkUI.Full
568   * @since 7
569   */
570  /**
571   * Called when the panel slidable panel pops up.
572   *
573   * @param { boolean } value
574   * @returns { PanelAttribute }
575   * @syscap SystemCapability.ArkUI.ArkUI.Full
576   * @crossplatform
577   * @since 10
578   */
579  /**
580   * Called when the panel slidable panel pops up.
581   *
582   * @param { boolean } value
583   * @returns { PanelAttribute }
584   * @syscap SystemCapability.ArkUI.ArkUI.Full
585   * @crossplatform
586   * @atomicservice
587   * @since 11
588   * @deprecated since 12
589   */
590  show(value: boolean): PanelAttribute;
591
592  /**
593   * Called when the panel background mask is requested.
594   *
595   * @param { ResourceColor } color
596   * @returns { PanelAttribute }
597   * @syscap SystemCapability.ArkUI.ArkUI.Full
598   * @since 9
599   */
600  /**
601   * Called when the panel background mask is requested.
602   *
603   * @param { ResourceColor } color
604   * @returns { PanelAttribute }
605   * @syscap SystemCapability.ArkUI.ArkUI.Full
606   * @crossplatform
607   * @since 10
608   */
609  /**
610   * Called when the panel background mask is requested.
611   *
612   * @param { ResourceColor } color
613   * @returns { PanelAttribute }
614   * @syscap SystemCapability.ArkUI.ArkUI.Full
615   * @crossplatform
616   * @atomicservice
617   * @since 11
618   * @deprecated since 12
619   */
620  backgroundMask(color: ResourceColor): PanelAttribute;
621
622  /**
623   * Called when the panel show close icon.
624   *
625   * @param { boolean } value - used to set whether to display the close icon.
626   * @returns { PanelAttribute } return the component attribute.
627   * @syscap SystemCapability.ArkUI.ArkUI.Full
628   * @since 10
629   */
630  /**
631   * Called when the panel show close icon.
632   *
633   * @param { boolean } value - used to set whether to display the close icon.
634   * @returns { PanelAttribute } return the component attribute.
635   * @syscap SystemCapability.ArkUI.ArkUI.Full
636   * @atomicservice
637   * @since 11
638   * @deprecated since 12
639   */
640  showCloseIcon(value: boolean): PanelAttribute;
641
642  /**
643   * Called when the state of the slidable panel changes.
644   *
645   * @param { function } event
646   * @returns { PanelAttribute }
647   * @syscap SystemCapability.ArkUI.ArkUI.Full
648   * @since 7
649   */
650  /**
651   * Called when the state of the slidable panel changes.
652   *
653   * @param { function } event
654   * @returns { PanelAttribute }
655   * @syscap SystemCapability.ArkUI.ArkUI.Full
656   * @crossplatform
657   * @since 10
658   */
659  /**
660   * Called when the state of the slidable panel changes.
661   *
662   * @param { function } event
663   * @returns { PanelAttribute }
664   * @syscap SystemCapability.ArkUI.ArkUI.Full
665   * @crossplatform
666   * @atomicservice
667   * @since 11
668   * @deprecated since 12
669   */
670  onChange(
671    event: (
672    /**
673     * Width of content area.
674     *
675     * @syscap SystemCapability.ArkUI.ArkUI.Full
676     * @since 7
677     */
678    /**
679     * Width of content area.
680     *
681     * @syscap SystemCapability.ArkUI.ArkUI.Full
682     * @atomicservice
683     * @since 11
684     * @deprecated since 12
685     */
686      width: number,
687
688    /**
689     * Height of content area.
690     *
691     * @syscap SystemCapability.ArkUI.ArkUI.Full
692     * @since 7
693     */
694    /**
695     * Height of content area.
696     *
697     * @syscap SystemCapability.ArkUI.ArkUI.Full
698     * @atomicservice
699     * @since 11
700     * @deprecated since 12
701     */
702      height: number,
703
704    /**
705     * Initial state.
706     *
707     * @syscap SystemCapability.ArkUI.ArkUI.Full
708     * @since 7
709     */
710    /**
711     * Initial state.
712     *
713     * @syscap SystemCapability.ArkUI.ArkUI.Full
714     * @atomicservice
715     * @since 11
716     * @deprecated since 12
717     */
718      mode: PanelMode,
719    ) => void,
720  ): PanelAttribute;
721
722  /**
723   * Called when height of the panel is changed
724   *
725   * @param { function } callback
726   * @returns { PanelAttribute }
727   * @syscap SystemCapability.ArkUI.ArkUI.Full
728   * @since 9
729   */
730  /**
731   * Called when height of the panel is changed
732   *
733   * @param { function } callback
734   * @returns { PanelAttribute }
735   * @syscap SystemCapability.ArkUI.ArkUI.Full
736   * @crossplatform
737   * @since 10
738   */
739  /**
740   * Called when height of the panel is changed
741   *
742   * @param { function } callback
743   * @returns { PanelAttribute }
744   * @syscap SystemCapability.ArkUI.ArkUI.Full
745   * @crossplatform
746   * @atomicservice
747   * @since 11
748   * @deprecated since 12
749   */
750  onHeightChange(callback: (value: number) => void): PanelAttribute;
751}
752
753/**
754 * Defines Panel Component.
755 *
756 * @syscap SystemCapability.ArkUI.ArkUI.Full
757 * @since 7
758 */
759/**
760 * Defines Panel Component.
761 *
762 * @syscap SystemCapability.ArkUI.ArkUI.Full
763 * @crossplatform
764 * @since 10
765 */
766/**
767 * Defines Panel Component.
768 *
769 * @syscap SystemCapability.ArkUI.ArkUI.Full
770 * @crossplatform
771 * @atomicservice
772 * @since 11
773 * @deprecated since 12
774 * @useinstead bindSheet
775 */
776declare const Panel: PanelInterface;
777
778/**
779 * Defines Panel Component instance.
780 *
781 * @syscap SystemCapability.ArkUI.ArkUI.Full
782 * @since 7
783 */
784/**
785 * Defines Panel Component instance.
786 *
787 * @syscap SystemCapability.ArkUI.ArkUI.Full
788 * @crossplatform
789 * @since 10
790 */
791/**
792 * Defines Panel Component instance.
793 *
794 * @syscap SystemCapability.ArkUI.ArkUI.Full
795 * @crossplatform
796 * @atomicservice
797 * @since 11
798 * @deprecated since 12
799 */
800declare const PanelInstance: PanelAttribute;
801