@vitus-labs/elements 0.79.0 → 0.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/lib/analysis/vitus-labs-elements.browser.js.html +1 -1
  2. package/lib/analysis/vitus-labs-elements.js.html +1 -1
  3. package/lib/analysis/vitus-labs-elements.module.js.html +1 -1
  4. package/lib/analysis/vitus-labs-elements.native.js.html +1 -1
  5. package/lib/index.d.ts +550 -6
  6. package/lib/types/Element/types.d.ts +388 -1
  7. package/lib/types/Element/types.d.ts.map +1 -1
  8. package/lib/types/Element/utils.d.ts.map +1 -1
  9. package/lib/types/List/component.d.ts +19 -7
  10. package/lib/types/List/component.d.ts.map +1 -1
  11. package/lib/types/Overlay/component.d.ts +23 -0
  12. package/lib/types/Overlay/component.d.ts.map +1 -1
  13. package/lib/types/Overlay/useOverlay.d.ts +59 -0
  14. package/lib/types/Overlay/useOverlay.d.ts.map +1 -1
  15. package/lib/types/Portal/component.d.ts +10 -0
  16. package/lib/types/Portal/component.d.ts.map +1 -1
  17. package/lib/types/Text/component.d.ts +19 -4
  18. package/lib/types/Text/component.d.ts.map +1 -1
  19. package/lib/types/Util/component.d.ts +9 -0
  20. package/lib/types/Util/component.d.ts.map +1 -1
  21. package/lib/types/helpers/Iterator/types.d.ts +28 -0
  22. package/lib/types/helpers/Iterator/types.d.ts.map +1 -1
  23. package/lib/types/helpers/Wrapper/component.d.ts +2 -2
  24. package/lib/vitus-labs-elements.browser.js +45 -41
  25. package/lib/vitus-labs-elements.browser.js.map +1 -1
  26. package/lib/vitus-labs-elements.js +50 -46
  27. package/lib/vitus-labs-elements.js.map +1 -1
  28. package/lib/vitus-labs-elements.module.js +44 -40
  29. package/lib/vitus-labs-elements.module.js.map +1 -1
  30. package/lib/vitus-labs-elements.native.js +44 -40
  31. package/lib/vitus-labs-elements.native.js.map +1 -1
  32. package/package.json +9 -9
  33. package/lib/types/Overlay/useOverlay.backup.d.ts +0 -36
  34. package/lib/types/Overlay/useOverlay.backup.d.ts.map +0 -1
package/lib/index.d.ts CHANGED
@@ -63,34 +63,421 @@ declare const Element_2: VLElement;
63
63
  export { Element_2 as Element }
64
64
 
65
65
  export declare type ElementProps = Partial<{
66
+ /**
67
+ * Valid HTML Tag
68
+ */
66
69
  tag: HTMLTags;
70
+ /**
71
+ * React `ref`, the prop is alternative to `ref` prop without need to wrap component to `forwardRef`
72
+ */
67
73
  innerRef: InnerRef;
74
+ /**
75
+ * Valid React `children`
76
+ */
68
77
  children: Content;
78
+ /**
79
+ * Alternative prop to React `children`
80
+ * It is recommended to pass only one of `children`, `content` or `label` props
81
+ *
82
+ * The prioritization of rendering is following: `children` → `content` → `label`
83
+ */
69
84
  content: Content;
85
+ /**
86
+ * Alternative prop to React `children`
87
+ * It is recommended to pass only one of `children`, `content` or `label` props
88
+ *
89
+ * The prioritization of rendering is following: `children` → `content` → `label`
90
+ */
70
91
  label: Content;
92
+ /**
93
+ * Valid React `children` to be rendered inside _beforeContent_ wrapper
94
+ *
95
+ * In a case, where at least one of `beforeContent` or `afterContent` is defined,
96
+ * **Element** component will render additional inner wrapper helpers to
97
+ * attach `beforeContent` **before** any of `children`, `context` or `label`
98
+ * props.
99
+ *
100
+ * Together with prop `direction` can be the **Element** component aligned
101
+ * vertically or horizontally.
102
+ *
103
+ * To attach any react node _after_, use `afterContent`
104
+ */
71
105
  beforeContent: Content;
106
+ /**
107
+ * Valid React `children` to be rendered inside _afterContent_ wrapper
108
+ *
109
+ * In a case, where at least one of `beforeContent` or `afterContent` is defined,
110
+ * **Element** component will render additional inner wrapper helpers to
111
+ * attach `afterContent` **after** any of `children`, `context` or `label`
112
+ * props.
113
+ *
114
+ * Together with prop `direction` can be the **Element** component aligned
115
+ * vertically or horizontally.
116
+ *
117
+ * To attach any react node _before_, use `beforeContent`
118
+ */
72
119
  afterContent: Content;
120
+ /**
121
+ * A boolean type to define wheather **Element** should behave
122
+ * as an inline or block element (`flex` vs. `inline-flex`)
123
+ */
73
124
  block: ResponsiveBooltype;
125
+ /**
126
+ * A boolean type to define wheather inner wrappers should be equal
127
+ * (have the same width or height)
128
+ */
74
129
  equalCols: ResponsiveBooltype;
130
+ /**
131
+ * Defines a `gap` spacing between inner wrappers between `beforeContent` and `children`
132
+ * and `children` and `afterContent`
133
+ */
75
134
  gap: Responsive;
135
+ /**
136
+ * Defines a `gap` spacing between inner wrappers between `beforeContent`,
137
+ * `children` and `afterContent`
138
+ */
76
139
  direction: Direction;
140
+ /**
141
+ * Defines flow of `children` elements within it's inner wrapper.
142
+ *
143
+ * Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
144
+ */
77
145
  contentDirection: Direction;
146
+ /**
147
+ * Defines flow of `beforeContent` elements within it's inner wrapper.
148
+ *
149
+ * Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
150
+ */
78
151
  beforeContentDirection: Direction;
152
+ /**
153
+ * Defines flow of `afterContent` elements within it's inner wrapper.
154
+ *
155
+ * Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
156
+ */
79
157
  afterContentDirection: Direction;
158
+ /**
159
+ * Define alignment of `beforeContent`, `content`, and `afterContent`
160
+ * with respect to root element **horizontally**.
161
+ *
162
+ * Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
163
+ * `spaceAround` | `block`
164
+ */
80
165
  alignX: AlignX;
166
+ /**
167
+ * Defines how `content` children (`children`, `content` or `label` props)
168
+ * are aligned within it's inner wrapper **horizontally**.
169
+ *
170
+ * Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
171
+ * `spaceAround` | `block`
172
+ */
81
173
  contentAlignX: AlignX;
174
+ /**
175
+ * Defines how `beforeContent` children are aligned within it's inner wrapper **horizontally**.
176
+ *
177
+ * Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
178
+ * `spaceAround` | `block`
179
+ */
82
180
  beforeContentAlignX: AlignX;
181
+ /**
182
+ * Defines how `afterContent` children are aligned within it's inner wrapper **horizontally**.
183
+ *
184
+ * Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
185
+ * `spaceAround` | `block`
186
+ */
83
187
  afterContentAlignX: AlignX;
188
+ /**
189
+ * Define alignment of `beforeContent`, `content`, and `afterContent`
190
+ * with respect to root element **vertically**.
191
+ *
192
+ * Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
193
+ * `spaceAround` | `block`
194
+ */
84
195
  alignY: AlignY;
196
+ /**
197
+ * Defines how `content` children (`children`, `content` or `label` props)
198
+ * are aligned within it's inner wrapper **vertically**.
199
+ *
200
+ * Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
201
+ * `spaceAround` | `block`
202
+ */
85
203
  contentAlignY: AlignY;
204
+ /**
205
+ * Defines how `beforeContent` children are aligned within it's inner wrapper **vertically**.
206
+ *
207
+ * Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
208
+ * `spaceAround` | `block`
209
+ */
86
210
  beforeContentAlignY: AlignY;
211
+ /**
212
+ * Defines how `afterContent` children are aligned within it's inner wrapper **vertically**.
213
+ *
214
+ * Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
215
+ * `spaceAround` | `block`
216
+ */
87
217
  afterContentAlignY: AlignY;
218
+ /**
219
+ * React `dangerouslySetInnerHTML` prop. For more details follow the link:
220
+ *
221
+ * https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
222
+ */
88
223
  dangerouslySetInnerHTML: {
89
224
  __html: string;
90
225
  };
226
+ /**
227
+ * An additional prop for extending styling of the **root** wrapper element
228
+ *
229
+ * #### [A] Template literals
230
+ *
231
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
232
+ *
233
+ * ```jsx
234
+ * export default () => (
235
+ * <Element
236
+ * label="This is an element"
237
+ * css={`
238
+ * text-color: red;
239
+ * `}
240
+ * />
241
+ * )
242
+ * ```
243
+ *
244
+ * #### [B] String
245
+ *
246
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
247
+ *
248
+ * ```jsx
249
+ * export default () => (
250
+ * <Element
251
+ * label="This is an element"
252
+ * css="text-color: red;"
253
+ * />
254
+ * )
255
+ * ```
256
+ *
257
+ * #### [C] Css Function
258
+ *
259
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
260
+ *
261
+ * ```jsx
262
+ * import { css } from 'styled-components'
263
+ *
264
+ * export default () => (
265
+ * <Element
266
+ * label="This is an element"
267
+ * css={css`
268
+ * text-color: red;
269
+ * `}
270
+ * />
271
+ * )
272
+ * ```
273
+ *
274
+ * #### [D] Css Callback
275
+ *
276
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
277
+ *
278
+ * ```jsx
279
+ * export default () => (
280
+ * <Element
281
+ * label="This is an element"
282
+ * css={css => css`
283
+ * text-color: red;
284
+ * `}
285
+ * />
286
+ * )
287
+ * ```
288
+ */
91
289
  css: ExtendCss;
290
+ /**
291
+ * An additional prop for extending styling of the **content** wrapper element
292
+ *
293
+ * #### [A] Template literals
294
+ *
295
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
296
+ *
297
+ * ```jsx
298
+ * export default () => (
299
+ * <Element
300
+ * label="This is an element"
301
+ * css={`
302
+ * text-color: red;
303
+ * `}
304
+ * />
305
+ * )
306
+ * ```
307
+ *
308
+ * #### [B] String
309
+ *
310
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
311
+ *
312
+ * ```jsx
313
+ * export default () => (
314
+ * <Element
315
+ * label="This is an element"
316
+ * css="text-color: red;"
317
+ * />
318
+ * )
319
+ * ```
320
+ *
321
+ * #### [C] Css Function
322
+ *
323
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
324
+ *
325
+ * ```jsx
326
+ * import { css } from 'styled-components'
327
+ *
328
+ * export default () => (
329
+ * <Element
330
+ * label="This is an element"
331
+ * css={css`
332
+ * text-color: red;
333
+ * `}
334
+ * />
335
+ * )
336
+ * ```
337
+ *
338
+ * #### [D] Css Callback
339
+ *
340
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
341
+ *
342
+ * ```jsx
343
+ * export default () => (
344
+ * <Element
345
+ * label="This is an element"
346
+ * css={css => css`
347
+ * text-color: red;
348
+ * `}
349
+ * />
350
+ * )
351
+ * ```
352
+ */
92
353
  contentCss: ExtendCss;
354
+ /**
355
+ * An additional prop for extending styling of the **beforeContent** wrapper element
356
+ *
357
+ * #### [A] Template literals
358
+ *
359
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
360
+ *
361
+ * ```jsx
362
+ * export default () => (
363
+ * <Element
364
+ * label="This is an element"
365
+ * css={`
366
+ * text-color: red;
367
+ * `}
368
+ * />
369
+ * )
370
+ * ```
371
+ *
372
+ * #### [B] String
373
+ *
374
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
375
+ *
376
+ * ```jsx
377
+ * export default () => (
378
+ * <Element
379
+ * label="This is an element"
380
+ * css="text-color: red;"
381
+ * />
382
+ * )
383
+ * ```
384
+ *
385
+ * #### [C] Css Function
386
+ *
387
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
388
+ *
389
+ * ```jsx
390
+ * import { css } from 'styled-components'
391
+ *
392
+ * export default () => (
393
+ * <Element
394
+ * label="This is an element"
395
+ * css={css`
396
+ * text-color: red;
397
+ * `}
398
+ * />
399
+ * )
400
+ * ```
401
+ *
402
+ * #### [D] Css Callback
403
+ *
404
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
405
+ *
406
+ * ```jsx
407
+ * export default () => (
408
+ * <Element
409
+ * label="This is an element"
410
+ * css={css => css`
411
+ * text-color: red;
412
+ * `}
413
+ * />
414
+ * )
415
+ * ```
416
+ */
93
417
  beforeContentCss: ExtendCss;
418
+ /**
419
+ * An additional prop for extending styling of the **afterContent** wrapper element
420
+ *
421
+ * #### [A] Template literals
422
+ *
423
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
424
+ *
425
+ * ```jsx
426
+ * export default () => (
427
+ * <Element
428
+ * label="This is an element"
429
+ * css={`
430
+ * text-color: red;
431
+ * `}
432
+ * />
433
+ * )
434
+ * ```
435
+ *
436
+ * #### [B] String
437
+ *
438
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
439
+ *
440
+ * ```jsx
441
+ * export default () => (
442
+ * <Element
443
+ * label="This is an element"
444
+ * css="text-color: red;"
445
+ * />
446
+ * )
447
+ * ```
448
+ *
449
+ * #### [C] Css Function
450
+ *
451
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
452
+ *
453
+ * ```jsx
454
+ * import { css } from 'styled-components'
455
+ *
456
+ * export default () => (
457
+ * <Element
458
+ * label="This is an element"
459
+ * css={css`
460
+ * text-color: red;
461
+ * `}
462
+ * />
463
+ * )
464
+ * ```
465
+ *
466
+ * #### [D] Css Callback
467
+ *
468
+ * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
469
+ *
470
+ * ```jsx
471
+ * export default () => (
472
+ * <Element
473
+ * label="This is an element"
474
+ * css={css => css`
475
+ * text-color: red;
476
+ * `}
477
+ * />
478
+ * )
479
+ * ```
480
+ */
94
481
  afterContentCss: ExtendCss;
95
482
  }>;
96
483
 
@@ -128,13 +515,41 @@ export declare type InnerRef = ForwardedRef<any>;
128
515
  declare type isEmpty = null | undefined;
129
516
 
130
517
  export declare type IteratorProps = Partial<{
518
+ /**
519
+ * Valid React `children`
520
+ */
131
521
  children: ReactNode;
522
+ /**
523
+ * Array of data passed to `component` prop
524
+ */
132
525
  data: Array<SimpleValue | ObjectValue | MaybeNull>;
526
+ /**
527
+ * A React component to be rendred within list
528
+ */
133
529
  component: ElementType;
530
+ /**
531
+ * Defines name of the prop to be passed to the iteration component
532
+ * when **data** prop is type of `string[]`, `number[]` or combination
533
+ * of both. Otherwise ignored.
534
+ */
134
535
  valueName: string;
536
+ /**
537
+ * A React component to be rendred within list. `wrapComponent`
538
+ * wraps `component`. Therefore it can be used to enhance the behavior
539
+ * of the list component
540
+ */
135
541
  wrapComponent: ElementType;
542
+ /**
543
+ * Extension of **item** `component` props to be passed
544
+ */
136
545
  itemProps: PropsCallback;
546
+ /**
547
+ * Extension of **item** `wrapComponent` props to be passed
548
+ */
137
549
  wrapProps?: PropsCallback;
550
+ /**
551
+ * Extension of **item** `wrapComponent` props to be passed
552
+ */
138
553
  itemKey?: keyof ObjectValue | ((item: SimpleValue | Omit<ObjectValue, 'component'>, index: number) => SimpleValue);
139
554
  }>;
140
555
 
@@ -144,12 +559,25 @@ export declare const List: VLElement<ListProps>;
144
559
 
145
560
  export declare type ListProps = MergeTypes<[
146
561
  IteratorProps,
147
- {
562
+ ListProps_2
563
+ ]>;
564
+
565
+ declare type ListProps_2 = {
566
+ /**
567
+ * A boolean value. When set to `false`, component returns `React.Fragment`
568
+ * When set to `true`, component returns as the **root** element `Element`
569
+ * component.
570
+ */
148
571
  rootElement?: boolean;
572
+ /**
573
+ * Label prop frol `Element` component is being ignored.
574
+ */
149
575
  label: never;
576
+ /**
577
+ * Content prop frol `Element` component is being ignored.
578
+ */
150
579
  content: never;
151
- }
152
- ]>;
580
+ };
153
581
 
154
582
  declare type MaybeNull = undefined | null;
155
583
 
@@ -165,10 +593,33 @@ export declare type ObjectValue = Partial<{
165
593
  export declare const Overlay: VLComponent<OverlayProps>;
166
594
 
167
595
  export declare type OverlayProps = {
596
+ /**
597
+ * Children to be rendered within **Overlay** component when Overlay is active.
598
+ */
168
599
  children: Content | TriggerRenderer;
600
+ /**
601
+ * React component to be used as a trigger (e.g. `Button` for opening
602
+ * dropdowns). Component must acept accept `ref` or any other prop name
603
+ * defined in `triggerRefName` prop.
604
+ */
169
605
  trigger: Content | ContentRenderer;
606
+ /**
607
+ * Defines a HTML DOM where children to be appended. Component uses JavaScript
608
+ * [`Node.appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)
609
+ *
610
+ * For more information follow [Portal](https://vitus-labs.com/docs/ui-system/elements/portal)
611
+ * component.
612
+ */
170
613
  DOMLocation?: HTMLElement;
614
+ /**
615
+ * Defines a prop name to be used for passing `ref` for **trigger**. By default,
616
+ * the value is `ref`.
617
+ */
171
618
  triggerRefName?: string;
619
+ /**
620
+ * Defines a prop name to be used for passing `ref` for **content** (passed `children`).
621
+ * By default, the value is `ref`.
622
+ */
172
623
  contentRefName?: string;
173
624
  } & UseOverlayProps;
174
625
 
@@ -179,8 +630,18 @@ export declare const OverlayProvider: FC<Context & {
179
630
  export declare const Portal: VLComponent<PortalProps>;
180
631
 
181
632
  export declare type PortalProps = {
633
+ /**
634
+ * Defines a HTML DOM where children to be appended. Component uses JavaScript
635
+ * [`Node.appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)
636
+ */
182
637
  DOMLocation?: HTMLElement;
638
+ /**
639
+ * Children to be rendered within **Portal** component.
640
+ */
183
641
  children: ReactNode;
642
+ /**
643
+ * Valid HTML Tag
644
+ */
184
645
  tag?: string;
185
646
  };
186
647
 
@@ -220,11 +681,26 @@ declare const Text_2: VLForwardedComponent<TextProps> & {
220
681
  export { Text_2 as Text }
221
682
 
222
683
  export declare type TextProps = Partial<{
223
- paragraph: boolean;
684
+ /**
685
+ * Label can be used instead of children for inline syntax. But **children** prop takes a precedence
686
+ */
224
687
  label: ReactNode;
688
+ /**
689
+ * Children to be rendered within **Text** component.
690
+ */
225
691
  children: ReactNode;
692
+ /**
693
+ * Defines whether should behave as a block text element. Automatically adds **p** HTML tag
694
+ */
695
+ paragraph: boolean;
696
+ /**
697
+ * Defines what kind of HTML tag should be rendered
698
+ */
226
699
  tag: HTMLTextTags;
227
- extendCss: ExtendCss;
700
+ /**
701
+ * If an additional styling needs to be added, it can be do so via injecting styles using this property.
702
+ */
703
+ css: ExtendCss;
228
704
  }>;
229
705
 
230
706
  declare type TObj = Record<string, unknown>;
@@ -257,36 +733,104 @@ export declare const useOverlay: ({ isOpen, openOn, closeOn, type, position, ali
257
733
  };
258
734
 
259
735
  export declare type UseOverlayProps = Partial<{
736
+ /**
737
+ * Defines default state whather **Overlay** component should be active.
738
+ * Default value is `false`.
739
+ */
260
740
  isOpen: boolean;
741
+ /**
742
+ * Defines `event` when **Overlay** is supposed to be open.
743
+ *
744
+ * When `manual` is set, callbacks needs to be applied to make it working.
745
+ */
261
746
  openOn: 'click' | 'hover' | 'manual';
747
+ /**
748
+ * Defines `event` when **Overlay** is supposed to be closed.
749
+ */
262
750
  closeOn: 'click' | 'clickOnTrigger' | 'clickOutsideContent' | 'hover' | 'manual';
751
+ /**
752
+ * Defines what type of **Overlay** will be created. Type `modal`
753
+ * has different positioning calculations than others.
754
+ */
263
755
  type: 'dropdown' | 'tooltip' | 'popover' | 'modal';
756
+ /**
757
+ * Defines how `content` is treated regarding CSS positioning.
758
+ */
264
759
  position: 'absolute' | 'fixed' | 'relative' | 'static';
760
+ /**
761
+ * Defines from which side is `content` aligned to `trigger` (top, left, bottom, right).
762
+ * For more specific alignment configuration can be used `alignX` and/or `alignY` prop.
763
+ */
265
764
  align: Align;
765
+ /**
766
+ * Defines how `content` is aligned to `trigger` on axis X
767
+ */
266
768
  alignX: AlignX_2;
769
+ /**
770
+ * Defines how `content` is aligned to `trigger` on axis Y
771
+ */
267
772
  alignY: AlignY_2;
773
+ /**
774
+ * Defines `margin` from trigger on axis X.
775
+ */
268
776
  offsetX: number;
777
+ /**
778
+ * Defines `margin` from trigger on axis Y.
779
+ */
269
780
  offsetY: number;
781
+ /**
782
+ * Performance helper. Value defined in miliseconds for `throttling`
783
+ * recalculations
784
+ */
270
785
  throttleDelay: number;
786
+ /**
787
+ * A valid HTML element. Prop can be used for ability to handle properly
788
+ * scrolling inside custom scrollable HTML element.
789
+ */
271
790
  parentContainer: HTMLElement | null;
791
+ /**
792
+ * Defines wheather active **Overlay** is supposed to be closed on pressing
793
+ * `ESC` key.
794
+ */
272
795
  closeOnEsc: boolean;
796
+ /**
797
+ * When set to `true`, **Overlay** is automatically closed and is blocked for
798
+ * being opened.
799
+ */
273
800
  disabled: boolean;
801
+ /**
802
+ * A callback hook to be called when **Overlay** is being opened. Does not
803
+ * accept any arguments.
804
+ */
274
805
  onOpen: () => void;
806
+ /**
807
+ * A callback hook to be called when **Overlay** is being closed. Does not
808
+ * accept any arguments.
809
+ */
275
810
  onClose: () => void;
276
811
  }>;
277
812
 
278
813
  export declare const Util: VLComponent<UtilProps>;
279
814
 
280
815
  export declare type UtilProps = {
816
+ /**
817
+ * Children to be rendered within **Util** component.
818
+ */
281
819
  children: ReactNode;
820
+ /**
821
+ * Class name(s) to be added to children component.
822
+ */
282
823
  className?: string | string[];
824
+ /**
825
+ * Style property to extend children component inline styles
826
+ */
283
827
  style?: Record<string, unknown>;
284
828
  };
285
829
 
286
830
  declare type VLComponent<P = Record<string, unknown>> = FC<P> & VLStatic;
287
831
 
288
832
  declare type VLElement<P extends Record<string, unknown> = {}> = {
289
- (props: ElementProps & P & {
833
+ <T extends Record<string, unknown> = {}>(props: ElementProps & P & T & {
290
834
  ref?: ForwardedRef<any>;
291
835
  }): ReactElement | null;
292
836
  } & VLStatic;