• 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 * Defines the options of Flex.
23 *
24 * @interface FlexOptions
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 7
27 */
28/**
29 * Defines the options of Flex.
30 *
31 * @interface FlexOptions
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @form
34 * @since 9
35 */
36/**
37 * Defines the options of Flex.
38 *
39 * @interface FlexOptions
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @form
43 * @since 10
44 */
45/**
46 * Defines the options of Flex.
47 *
48 * @interface FlexOptions
49 * @syscap SystemCapability.ArkUI.ArkUI.Full
50 * @crossplatform
51 * @form
52 * @atomicservice
53 * @since 11
54 */
55declare interface FlexOptions {
56  /**
57   * Sets the horizontal layout of elements.
58   *
59   * @type { ?FlexDirection }
60   * @syscap SystemCapability.ArkUI.ArkUI.Full
61   * @since 7
62   */
63  /**
64   * Sets the horizontal layout of elements.
65   *
66   * @type { ?FlexDirection }
67   * @syscap SystemCapability.ArkUI.ArkUI.Full
68   * @form
69   * @since 9
70   */
71  /**
72   * Sets the horizontal layout of elements.
73   *
74   * @type { ?FlexDirection }
75   * @syscap SystemCapability.ArkUI.ArkUI.Full
76   * @crossplatform
77   * @form
78   * @since 10
79   */
80  /**
81   * Sets the horizontal layout of elements.
82   *
83   * @type { ?FlexDirection }
84   * @syscap SystemCapability.ArkUI.ArkUI.Full
85   * @crossplatform
86   * @form
87   * @atomicservice
88   * @since 11
89   */
90  direction?: FlexDirection;
91
92  /**
93   * Whether the Flex container is a single row/column arrangement or a multi-row/column arrangement.
94   *
95   * @type { ?FlexWrap }
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @since 7
98   */
99  /**
100   * Whether the Flex container is a single row/column arrangement or a multi-row/column arrangement.
101   *
102   * @type { ?FlexWrap }
103   * @syscap SystemCapability.ArkUI.ArkUI.Full
104   * @form
105   * @since 9
106   */
107  /**
108   * Whether the Flex container is a single row/column arrangement or a multi-row/column arrangement.
109   *
110   * @type { ?FlexWrap }
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @crossplatform
113   * @form
114   * @since 10
115   */
116  /**
117   * Whether the Flex container is a single row/column arrangement or a multi-row/column arrangement.
118   *
119   * @type { ?FlexWrap }
120   * @syscap SystemCapability.ArkUI.ArkUI.Full
121   * @crossplatform
122   * @form
123   * @atomicservice
124   * @since 11
125   */
126  wrap?: FlexWrap;
127
128  /**
129   * The alignment format of the subassembly on the Flex container spindle.
130   *
131   * @type { ?FlexAlign }
132   * @syscap SystemCapability.ArkUI.ArkUI.Full
133   * @since 7
134   */
135  /**
136   * The alignment format of the subassembly on the Flex container spindle.
137   *
138   * @type { ?FlexAlign }
139   * @syscap SystemCapability.ArkUI.ArkUI.Full
140   * @form
141   * @since 9
142   */
143  /**
144   * The alignment format of the subassembly on the Flex container spindle.
145   *
146   * @type { ?FlexAlign }
147   * @syscap SystemCapability.ArkUI.ArkUI.Full
148   * @crossplatform
149   * @form
150   * @since 10
151   */
152  /**
153   * The alignment format of the subassembly on the Flex container spindle.
154   *
155   * @type { ?FlexAlign }
156   * @syscap SystemCapability.ArkUI.ArkUI.Full
157   * @crossplatform
158   * @form
159   * @atomicservice
160   * @since 11
161   */
162  justifyContent?: FlexAlign;
163
164  /**
165   * Alignment Format for Subassembly on Flex Container Cross Axis.
166   *
167   * @type { ?ItemAlign }
168   * @syscap SystemCapability.ArkUI.ArkUI.Full
169   * @since 7
170   */
171  /**
172   * Alignment Format for Subassembly on Flex Container Cross Axis.
173   *
174   * @type { ?ItemAlign }
175   * @syscap SystemCapability.ArkUI.ArkUI.Full
176   * @form
177   * @since 9
178   */
179  /**
180   * Alignment Format for Subassembly on Flex Container Cross Axis.
181   *
182   * @type { ?ItemAlign }
183   * @syscap SystemCapability.ArkUI.ArkUI.Full
184   * @crossplatform
185   * @form
186   * @since 10
187   */
188  /**
189   * Alignment Format for Subassembly on Flex Container Cross Axis.
190   *
191   * @type { ?ItemAlign }
192   * @syscap SystemCapability.ArkUI.ArkUI.Full
193   * @crossplatform
194   * @form
195   * @atomicservice
196   * @since 11
197   */
198  alignItems?: ItemAlign;
199
200  /**
201   * The alignment of multiple lines of content when there is extra space in the cross axis.
202   *
203   * @type { ?FlexAlign }
204   * @syscap SystemCapability.ArkUI.ArkUI.Full
205   * @since 7
206   */
207  /**
208   * The alignment of multiple lines of content when there is extra space in the cross axis.
209   *
210   * @type { ?FlexAlign }
211   * @syscap SystemCapability.ArkUI.ArkUI.Full
212   * @form
213   * @since 9
214   */
215  /**
216   * The alignment of multiple lines of content when there is extra space in the cross axis.
217   *
218   * @type { ?FlexAlign }
219   * @syscap SystemCapability.ArkUI.ArkUI.Full
220   * @crossplatform
221   * @form
222   * @since 10
223   */
224  /**
225   * The alignment of multiple lines of content when there is extra space in the cross axis.
226   *
227   * @type { ?FlexAlign }
228   * @syscap SystemCapability.ArkUI.ArkUI.Full
229   * @crossplatform
230   * @form
231   * @atomicservice
232   * @since 11
233   */
234  alignContent?: FlexAlign;
235
236  /**
237   * The space to be inserted, either horizontally or vertically,
238   * between two adjacent components in the Flex container.
239   *
240   * @type { ?FlexSpaceOptions }
241   * @syscap SystemCapability.ArkUI.ArkUI.Full
242   * @crossplatform
243   * @atomicservice
244   * @since 12
245   */
246  space?: FlexSpaceOptions;
247}
248
249/**
250 * The space to be inserted, either horizontally or vertically,
251 * between two adjacent components in the Flex container.
252 *
253 * @interface FlexSpaceOptions
254 * @syscap SystemCapability.ArkUI.ArkUI.Full
255 * @crossplatform
256 * @atomicservice
257 * @since 12
258 */
259
260declare interface FlexSpaceOptions {
261  /**
262   * Defines the main space property.
263   *
264   * @type { ?LengthMetrics }
265   * @syscap SystemCapability.ArkUI.ArkUI.Full
266   * @crossplatform
267   * @atomicservice
268   * @since 12
269   */
270  main?: LengthMetrics;
271
272  /**
273   * Defines the cross space property.
274   *
275   * @type { ?LengthMetrics }
276   * @syscap SystemCapability.ArkUI.ArkUI.Full
277   * @crossplatform
278   * @atomicservice
279   * @since 12
280   */
281  cross?: LengthMetrics;
282}
283
284/**
285 * Provides a monthly view component to display information such as date, shift break, and schedule.
286 *
287 * @interface FlexInterface
288 * @syscap SystemCapability.ArkUI.ArkUI.Full
289 * @since 7
290 */
291/**
292 * Provides a monthly view component to display information such as date, shift break, and schedule.
293 *
294 * @interface FlexInterface
295 * @syscap SystemCapability.ArkUI.ArkUI.Full
296 * @form
297 * @since 9
298 */
299/**
300 * Provides a monthly view component to display information such as date, shift break, and schedule.
301 *
302 * @interface FlexInterface
303 * @syscap SystemCapability.ArkUI.ArkUI.Full
304 * @crossplatform
305 * @form
306 * @since 10
307 */
308/**
309 * Provides a monthly view component to display information such as date, shift break, and schedule.
310 *
311 * @interface FlexInterface
312 * @syscap SystemCapability.ArkUI.ArkUI.Full
313 * @crossplatform
314 * @form
315 * @atomicservice
316 * @since 11
317 */
318interface FlexInterface {
319  /**
320   * Defines the constructor of Flex.
321   *
322   * @param { FlexOptions } value
323   * @returns { FlexAttribute }
324   * @syscap SystemCapability.ArkUI.ArkUI.Full
325   * @since 7
326   */
327  /**
328   * Defines the constructor of Flex.
329   *
330   * @param { FlexOptions } value
331   * @returns { FlexAttribute }
332   * @syscap SystemCapability.ArkUI.ArkUI.Full
333   * @form
334   * @since 9
335   */
336  /**
337   * Defines the constructor of Flex.
338   *
339   * @param { FlexOptions } value
340   * @returns { FlexAttribute }
341   * @syscap SystemCapability.ArkUI.ArkUI.Full
342   * @crossplatform
343   * @form
344   * @since 10
345   */
346  /**
347   * Defines the constructor of Flex.
348   *
349   * @param { FlexOptions } value
350   * @returns { FlexAttribute }
351   * @syscap SystemCapability.ArkUI.ArkUI.Full
352   * @crossplatform
353   * @form
354   * @atomicservice
355   * @since 11
356   */
357  (value?: FlexOptions): FlexAttribute;
358}
359
360/**
361 * Defines the Flex attribute functions.
362 *
363 * @extends CommonMethod<FlexAttribute>
364 * @syscap SystemCapability.ArkUI.ArkUI.Full
365 * @since 7
366 */
367/**
368 * Defines the Flex attribute functions.
369 *
370 * @extends CommonMethod<FlexAttribute>
371 * @syscap SystemCapability.ArkUI.ArkUI.Full
372 * @form
373 * @since 9
374 */
375/**
376 * Defines the Flex attribute functions.
377 *
378 * @extends CommonMethod<FlexAttribute>
379 * @syscap SystemCapability.ArkUI.ArkUI.Full
380 * @crossplatform
381 * @form
382 * @since 10
383 */
384/**
385 * Defines the Flex attribute functions.
386 *
387 * @extends CommonMethod<FlexAttribute>
388 * @syscap SystemCapability.ArkUI.ArkUI.Full
389 * @crossplatform
390 * @form
391 * @atomicservice
392 * @since 11
393 */
394declare class FlexAttribute extends CommonMethod<FlexAttribute> {
395  /**
396   * Defines the PointLight
397   *
398   * @param { PointLightStyle } value - The point light style.
399   * @returns { FlexAttribute } The attribute of the flex.
400   * @syscap SystemCapability.ArkUI.ArkUI.Full
401   * @systemapi
402   * @since 11
403   */
404  pointLight(value: PointLightStyle): FlexAttribute;
405}
406
407/**
408 * Defines Flex Component.
409 *
410 * @syscap SystemCapability.ArkUI.ArkUI.Full
411 * @since 7
412 */
413/**
414 * Defines Flex Component.
415 *
416 * @syscap SystemCapability.ArkUI.ArkUI.Full
417 * @form
418 * @since 9
419 */
420/**
421 * Defines Flex Component.
422 *
423 * @syscap SystemCapability.ArkUI.ArkUI.Full
424 * @crossplatform
425 * @form
426 * @since 10
427 */
428/**
429 * Defines Flex Component.
430 *
431 * @syscap SystemCapability.ArkUI.ArkUI.Full
432 * @crossplatform
433 * @form
434 * @atomicservice
435 * @since 11
436 */
437declare const Flex: FlexInterface;
438
439/**
440 * Defines Flex Component instance.
441 *
442 * @syscap SystemCapability.ArkUI.ArkUI.Full
443 * @since 7
444 */
445/**
446 * Defines Flex Component instance.
447 *
448 * @syscap SystemCapability.ArkUI.ArkUI.Full
449 * @form
450 * @since 9
451 */
452/**
453 * Defines Flex Component instance.
454 *
455 * @syscap SystemCapability.ArkUI.ArkUI.Full
456 * @crossplatform
457 * @form
458 * @since 10
459 */
460/**
461 * Defines Flex Component instance.
462 *
463 * @syscap SystemCapability.ArkUI.ArkUI.Full
464 * @crossplatform
465 * @form
466 * @atomicservice
467 * @since 11
468 */
469declare const FlexInstance: FlexAttribute;
470