@vitus-labs/elements 0.79.0 → 0.81.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.
- package/lib/analysis/vitus-labs-elements.browser.js.html +1 -1
- package/lib/analysis/vitus-labs-elements.js.html +1 -1
- package/lib/analysis/vitus-labs-elements.module.js.html +1 -1
- package/lib/analysis/vitus-labs-elements.native.js.html +1 -1
- package/lib/index.d.ts +550 -6
- package/lib/types/Element/types.d.ts +388 -1
- package/lib/types/Element/types.d.ts.map +1 -1
- package/lib/types/Element/utils.d.ts.map +1 -1
- package/lib/types/List/component.d.ts +19 -7
- package/lib/types/List/component.d.ts.map +1 -1
- package/lib/types/Overlay/component.d.ts +23 -0
- package/lib/types/Overlay/component.d.ts.map +1 -1
- package/lib/types/Overlay/useOverlay.d.ts +59 -0
- package/lib/types/Overlay/useOverlay.d.ts.map +1 -1
- package/lib/types/Portal/component.d.ts +10 -0
- package/lib/types/Portal/component.d.ts.map +1 -1
- package/lib/types/Text/component.d.ts +19 -4
- package/lib/types/Text/component.d.ts.map +1 -1
- package/lib/types/Util/component.d.ts +9 -0
- package/lib/types/Util/component.d.ts.map +1 -1
- package/lib/types/helpers/Iterator/types.d.ts +28 -0
- package/lib/types/helpers/Iterator/types.d.ts.map +1 -1
- package/lib/types/helpers/Wrapper/component.d.ts +2 -2
- package/lib/vitus-labs-elements.browser.js +46 -42
- package/lib/vitus-labs-elements.browser.js.map +1 -1
- package/lib/vitus-labs-elements.js +51 -47
- package/lib/vitus-labs-elements.js.map +1 -1
- package/lib/vitus-labs-elements.module.js +45 -41
- package/lib/vitus-labs-elements.module.js.map +1 -1
- package/lib/vitus-labs-elements.native.js +45 -41
- package/lib/vitus-labs-elements.native.js.map +1 -1
- package/package.json +9 -9
- package/lib/types/Overlay/useOverlay.backup.d.ts +0 -36
- package/lib/types/Overlay/useOverlay.backup.d.ts.map +0 -1
|
@@ -2,38 +2,425 @@ import type { ReactElement, ForwardedRef } from 'react';
|
|
|
2
2
|
import type { HTMLTags } from '@vitus-labs/core';
|
|
3
3
|
import type { AlignX, AlignY, Content, Direction, ResponsiveBooltype, Responsive, ExtendCss, InnerRef, VLStatic } from "../types";
|
|
4
4
|
export type Props = Partial<{
|
|
5
|
+
/**
|
|
6
|
+
* Valid HTML Tag
|
|
7
|
+
*/
|
|
5
8
|
tag: HTMLTags;
|
|
9
|
+
/**
|
|
10
|
+
* React `ref`, the prop is alternative to `ref` prop without need to wrap component to `forwardRef`
|
|
11
|
+
*/
|
|
6
12
|
innerRef: InnerRef;
|
|
13
|
+
/**
|
|
14
|
+
* Valid React `children`
|
|
15
|
+
*/
|
|
7
16
|
children: Content;
|
|
17
|
+
/**
|
|
18
|
+
* Alternative prop to React `children`
|
|
19
|
+
* It is recommended to pass only one of `children`, `content` or `label` props
|
|
20
|
+
*
|
|
21
|
+
* The prioritization of rendering is following: `children` → `content` → `label`
|
|
22
|
+
*/
|
|
8
23
|
content: Content;
|
|
24
|
+
/**
|
|
25
|
+
* Alternative prop to React `children`
|
|
26
|
+
* It is recommended to pass only one of `children`, `content` or `label` props
|
|
27
|
+
*
|
|
28
|
+
* The prioritization of rendering is following: `children` → `content` → `label`
|
|
29
|
+
*/
|
|
9
30
|
label: Content;
|
|
31
|
+
/**
|
|
32
|
+
* Valid React `children` to be rendered inside _beforeContent_ wrapper
|
|
33
|
+
*
|
|
34
|
+
* In a case, where at least one of `beforeContent` or `afterContent` is defined,
|
|
35
|
+
* **Element** component will render additional inner wrapper helpers to
|
|
36
|
+
* attach `beforeContent` **before** any of `children`, `context` or `label`
|
|
37
|
+
* props.
|
|
38
|
+
*
|
|
39
|
+
* Together with prop `direction` can be the **Element** component aligned
|
|
40
|
+
* vertically or horizontally.
|
|
41
|
+
*
|
|
42
|
+
* To attach any react node _after_, use `afterContent`
|
|
43
|
+
*/
|
|
10
44
|
beforeContent: Content;
|
|
45
|
+
/**
|
|
46
|
+
* Valid React `children` to be rendered inside _afterContent_ wrapper
|
|
47
|
+
*
|
|
48
|
+
* In a case, where at least one of `beforeContent` or `afterContent` is defined,
|
|
49
|
+
* **Element** component will render additional inner wrapper helpers to
|
|
50
|
+
* attach `afterContent` **after** any of `children`, `context` or `label`
|
|
51
|
+
* props.
|
|
52
|
+
*
|
|
53
|
+
* Together with prop `direction` can be the **Element** component aligned
|
|
54
|
+
* vertically or horizontally.
|
|
55
|
+
*
|
|
56
|
+
* To attach any react node _before_, use `beforeContent`
|
|
57
|
+
*/
|
|
11
58
|
afterContent: Content;
|
|
59
|
+
/**
|
|
60
|
+
* A boolean type to define wheather **Element** should behave
|
|
61
|
+
* as an inline or block element (`flex` vs. `inline-flex`)
|
|
62
|
+
*/
|
|
12
63
|
block: ResponsiveBooltype;
|
|
64
|
+
/**
|
|
65
|
+
* A boolean type to define wheather inner wrappers should be equal
|
|
66
|
+
* (have the same width or height)
|
|
67
|
+
*/
|
|
13
68
|
equalCols: ResponsiveBooltype;
|
|
69
|
+
/**
|
|
70
|
+
* Defines a `gap` spacing between inner wrappers between `beforeContent` and `children`
|
|
71
|
+
* and `children` and `afterContent`
|
|
72
|
+
*/
|
|
14
73
|
gap: Responsive;
|
|
74
|
+
/**
|
|
75
|
+
* Defines a `gap` spacing between inner wrappers between `beforeContent`,
|
|
76
|
+
* `children` and `afterContent`
|
|
77
|
+
*/
|
|
15
78
|
direction: Direction;
|
|
79
|
+
/**
|
|
80
|
+
* Defines flow of `children` elements within it's inner wrapper.
|
|
81
|
+
*
|
|
82
|
+
* Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
|
|
83
|
+
*/
|
|
16
84
|
contentDirection: Direction;
|
|
85
|
+
/**
|
|
86
|
+
* Defines flow of `beforeContent` elements within it's inner wrapper.
|
|
87
|
+
*
|
|
88
|
+
* Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
|
|
89
|
+
*/
|
|
17
90
|
beforeContentDirection: Direction;
|
|
91
|
+
/**
|
|
92
|
+
* Defines flow of `afterContent` elements within it's inner wrapper.
|
|
93
|
+
*
|
|
94
|
+
* Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
|
|
95
|
+
*/
|
|
18
96
|
afterContentDirection: Direction;
|
|
97
|
+
/**
|
|
98
|
+
* Define alignment of `beforeContent`, `content`, and `afterContent`
|
|
99
|
+
* with respect to root element **horizontally**.
|
|
100
|
+
*
|
|
101
|
+
* Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
|
|
102
|
+
* `spaceAround` | `block`
|
|
103
|
+
*/
|
|
19
104
|
alignX: AlignX;
|
|
105
|
+
/**
|
|
106
|
+
* Defines how `content` children (`children`, `content` or `label` props)
|
|
107
|
+
* are aligned within it's inner wrapper **horizontally**.
|
|
108
|
+
*
|
|
109
|
+
* Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
|
|
110
|
+
* `spaceAround` | `block`
|
|
111
|
+
*/
|
|
20
112
|
contentAlignX: AlignX;
|
|
113
|
+
/**
|
|
114
|
+
* Defines how `beforeContent` children are aligned within it's inner wrapper **horizontally**.
|
|
115
|
+
*
|
|
116
|
+
* Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
|
|
117
|
+
* `spaceAround` | `block`
|
|
118
|
+
*/
|
|
21
119
|
beforeContentAlignX: AlignX;
|
|
120
|
+
/**
|
|
121
|
+
* Defines how `afterContent` children are aligned within it's inner wrapper **horizontally**.
|
|
122
|
+
*
|
|
123
|
+
* Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
|
|
124
|
+
* `spaceAround` | `block`
|
|
125
|
+
*/
|
|
22
126
|
afterContentAlignX: AlignX;
|
|
127
|
+
/**
|
|
128
|
+
* Define alignment of `beforeContent`, `content`, and `afterContent`
|
|
129
|
+
* with respect to root element **vertically**.
|
|
130
|
+
*
|
|
131
|
+
* Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
|
|
132
|
+
* `spaceAround` | `block`
|
|
133
|
+
*/
|
|
23
134
|
alignY: AlignY;
|
|
135
|
+
/**
|
|
136
|
+
* Defines how `content` children (`children`, `content` or `label` props)
|
|
137
|
+
* are aligned within it's inner wrapper **vertically**.
|
|
138
|
+
*
|
|
139
|
+
* Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
|
|
140
|
+
* `spaceAround` | `block`
|
|
141
|
+
*/
|
|
24
142
|
contentAlignY: AlignY;
|
|
143
|
+
/**
|
|
144
|
+
* Defines how `beforeContent` children are aligned within it's inner wrapper **vertically**.
|
|
145
|
+
*
|
|
146
|
+
* Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
|
|
147
|
+
* `spaceAround` | `block`
|
|
148
|
+
*/
|
|
25
149
|
beforeContentAlignY: AlignY;
|
|
150
|
+
/**
|
|
151
|
+
* Defines how `afterContent` children are aligned within it's inner wrapper **vertically**.
|
|
152
|
+
*
|
|
153
|
+
* Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
|
|
154
|
+
* `spaceAround` | `block`
|
|
155
|
+
*/
|
|
26
156
|
afterContentAlignY: AlignY;
|
|
157
|
+
/**
|
|
158
|
+
* React `dangerouslySetInnerHTML` prop. For more details follow the link:
|
|
159
|
+
*
|
|
160
|
+
* https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
|
|
161
|
+
*/
|
|
27
162
|
dangerouslySetInnerHTML: {
|
|
28
163
|
__html: string;
|
|
29
164
|
};
|
|
165
|
+
/**
|
|
166
|
+
* An additional prop for extending styling of the **root** wrapper element
|
|
167
|
+
*
|
|
168
|
+
* #### [A] Template literals
|
|
169
|
+
*
|
|
170
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
171
|
+
*
|
|
172
|
+
* ```jsx
|
|
173
|
+
* export default () => (
|
|
174
|
+
* <Element
|
|
175
|
+
* label="This is an element"
|
|
176
|
+
* css={`
|
|
177
|
+
* text-color: red;
|
|
178
|
+
* `}
|
|
179
|
+
* />
|
|
180
|
+
* )
|
|
181
|
+
* ```
|
|
182
|
+
*
|
|
183
|
+
* #### [B] String
|
|
184
|
+
*
|
|
185
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
186
|
+
*
|
|
187
|
+
* ```jsx
|
|
188
|
+
* export default () => (
|
|
189
|
+
* <Element
|
|
190
|
+
* label="This is an element"
|
|
191
|
+
* css="text-color: red;"
|
|
192
|
+
* />
|
|
193
|
+
* )
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* #### [C] Css Function
|
|
197
|
+
*
|
|
198
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
199
|
+
*
|
|
200
|
+
* ```jsx
|
|
201
|
+
* import { css } from 'styled-components'
|
|
202
|
+
*
|
|
203
|
+
* export default () => (
|
|
204
|
+
* <Element
|
|
205
|
+
* label="This is an element"
|
|
206
|
+
* css={css`
|
|
207
|
+
* text-color: red;
|
|
208
|
+
* `}
|
|
209
|
+
* />
|
|
210
|
+
* )
|
|
211
|
+
* ```
|
|
212
|
+
*
|
|
213
|
+
* #### [D] Css Callback
|
|
214
|
+
*
|
|
215
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
216
|
+
*
|
|
217
|
+
* ```jsx
|
|
218
|
+
* export default () => (
|
|
219
|
+
* <Element
|
|
220
|
+
* label="This is an element"
|
|
221
|
+
* css={css => css`
|
|
222
|
+
* text-color: red;
|
|
223
|
+
* `}
|
|
224
|
+
* />
|
|
225
|
+
* )
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
30
228
|
css: ExtendCss;
|
|
229
|
+
/**
|
|
230
|
+
* An additional prop for extending styling of the **content** wrapper element
|
|
231
|
+
*
|
|
232
|
+
* #### [A] Template literals
|
|
233
|
+
*
|
|
234
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
235
|
+
*
|
|
236
|
+
* ```jsx
|
|
237
|
+
* export default () => (
|
|
238
|
+
* <Element
|
|
239
|
+
* label="This is an element"
|
|
240
|
+
* css={`
|
|
241
|
+
* text-color: red;
|
|
242
|
+
* `}
|
|
243
|
+
* />
|
|
244
|
+
* )
|
|
245
|
+
* ```
|
|
246
|
+
*
|
|
247
|
+
* #### [B] String
|
|
248
|
+
*
|
|
249
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
250
|
+
*
|
|
251
|
+
* ```jsx
|
|
252
|
+
* export default () => (
|
|
253
|
+
* <Element
|
|
254
|
+
* label="This is an element"
|
|
255
|
+
* css="text-color: red;"
|
|
256
|
+
* />
|
|
257
|
+
* )
|
|
258
|
+
* ```
|
|
259
|
+
*
|
|
260
|
+
* #### [C] Css Function
|
|
261
|
+
*
|
|
262
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
263
|
+
*
|
|
264
|
+
* ```jsx
|
|
265
|
+
* import { css } from 'styled-components'
|
|
266
|
+
*
|
|
267
|
+
* export default () => (
|
|
268
|
+
* <Element
|
|
269
|
+
* label="This is an element"
|
|
270
|
+
* css={css`
|
|
271
|
+
* text-color: red;
|
|
272
|
+
* `}
|
|
273
|
+
* />
|
|
274
|
+
* )
|
|
275
|
+
* ```
|
|
276
|
+
*
|
|
277
|
+
* #### [D] Css Callback
|
|
278
|
+
*
|
|
279
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
280
|
+
*
|
|
281
|
+
* ```jsx
|
|
282
|
+
* export default () => (
|
|
283
|
+
* <Element
|
|
284
|
+
* label="This is an element"
|
|
285
|
+
* css={css => css`
|
|
286
|
+
* text-color: red;
|
|
287
|
+
* `}
|
|
288
|
+
* />
|
|
289
|
+
* )
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
31
292
|
contentCss: ExtendCss;
|
|
293
|
+
/**
|
|
294
|
+
* An additional prop for extending styling of the **beforeContent** wrapper element
|
|
295
|
+
*
|
|
296
|
+
* #### [A] Template literals
|
|
297
|
+
*
|
|
298
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
299
|
+
*
|
|
300
|
+
* ```jsx
|
|
301
|
+
* export default () => (
|
|
302
|
+
* <Element
|
|
303
|
+
* label="This is an element"
|
|
304
|
+
* css={`
|
|
305
|
+
* text-color: red;
|
|
306
|
+
* `}
|
|
307
|
+
* />
|
|
308
|
+
* )
|
|
309
|
+
* ```
|
|
310
|
+
*
|
|
311
|
+
* #### [B] String
|
|
312
|
+
*
|
|
313
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
314
|
+
*
|
|
315
|
+
* ```jsx
|
|
316
|
+
* export default () => (
|
|
317
|
+
* <Element
|
|
318
|
+
* label="This is an element"
|
|
319
|
+
* css="text-color: red;"
|
|
320
|
+
* />
|
|
321
|
+
* )
|
|
322
|
+
* ```
|
|
323
|
+
*
|
|
324
|
+
* #### [C] Css Function
|
|
325
|
+
*
|
|
326
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
327
|
+
*
|
|
328
|
+
* ```jsx
|
|
329
|
+
* import { css } from 'styled-components'
|
|
330
|
+
*
|
|
331
|
+
* export default () => (
|
|
332
|
+
* <Element
|
|
333
|
+
* label="This is an element"
|
|
334
|
+
* css={css`
|
|
335
|
+
* text-color: red;
|
|
336
|
+
* `}
|
|
337
|
+
* />
|
|
338
|
+
* )
|
|
339
|
+
* ```
|
|
340
|
+
*
|
|
341
|
+
* #### [D] Css Callback
|
|
342
|
+
*
|
|
343
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
344
|
+
*
|
|
345
|
+
* ```jsx
|
|
346
|
+
* export default () => (
|
|
347
|
+
* <Element
|
|
348
|
+
* label="This is an element"
|
|
349
|
+
* css={css => css`
|
|
350
|
+
* text-color: red;
|
|
351
|
+
* `}
|
|
352
|
+
* />
|
|
353
|
+
* )
|
|
354
|
+
* ```
|
|
355
|
+
*/
|
|
32
356
|
beforeContentCss: ExtendCss;
|
|
357
|
+
/**
|
|
358
|
+
* An additional prop for extending styling of the **afterContent** wrapper element
|
|
359
|
+
*
|
|
360
|
+
* #### [A] Template literals
|
|
361
|
+
*
|
|
362
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
363
|
+
*
|
|
364
|
+
* ```jsx
|
|
365
|
+
* export default () => (
|
|
366
|
+
* <Element
|
|
367
|
+
* label="This is an element"
|
|
368
|
+
* css={`
|
|
369
|
+
* text-color: red;
|
|
370
|
+
* `}
|
|
371
|
+
* />
|
|
372
|
+
* )
|
|
373
|
+
* ```
|
|
374
|
+
*
|
|
375
|
+
* #### [B] String
|
|
376
|
+
*
|
|
377
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
378
|
+
*
|
|
379
|
+
* ```jsx
|
|
380
|
+
* export default () => (
|
|
381
|
+
* <Element
|
|
382
|
+
* label="This is an element"
|
|
383
|
+
* css="text-color: red;"
|
|
384
|
+
* />
|
|
385
|
+
* )
|
|
386
|
+
* ```
|
|
387
|
+
*
|
|
388
|
+
* #### [C] Css Function
|
|
389
|
+
*
|
|
390
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
391
|
+
*
|
|
392
|
+
* ```jsx
|
|
393
|
+
* import { css } from 'styled-components'
|
|
394
|
+
*
|
|
395
|
+
* export default () => (
|
|
396
|
+
* <Element
|
|
397
|
+
* label="This is an element"
|
|
398
|
+
* css={css`
|
|
399
|
+
* text-color: red;
|
|
400
|
+
* `}
|
|
401
|
+
* />
|
|
402
|
+
* )
|
|
403
|
+
* ```
|
|
404
|
+
*
|
|
405
|
+
* #### [D] Css Callback
|
|
406
|
+
*
|
|
407
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
408
|
+
*
|
|
409
|
+
* ```jsx
|
|
410
|
+
* export default () => (
|
|
411
|
+
* <Element
|
|
412
|
+
* label="This is an element"
|
|
413
|
+
* css={css => css`
|
|
414
|
+
* text-color: red;
|
|
415
|
+
* `}
|
|
416
|
+
* />
|
|
417
|
+
* )
|
|
418
|
+
* ```
|
|
419
|
+
*/
|
|
33
420
|
afterContentCss: ExtendCss;
|
|
34
421
|
}>;
|
|
35
422
|
export type VLElement<P extends Record<string, unknown> = {}> = {
|
|
36
|
-
(props: Props & P & {
|
|
423
|
+
<T extends Record<string, unknown> = {}>(props: Props & P & T & {
|
|
37
424
|
ref?: ForwardedRef<any>;
|
|
38
425
|
}): ReactElement | null;
|
|
39
426
|
} & VLStatic;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Element/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,QAAQ,EACT,iBAAe;AAEhB,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC;IAC1B,GAAG,EAAE,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Element/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,QAAQ,EACT,iBAAe;AAEhB,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;;;;;;;OA8DG;IACH,GAAG,EAAE,SAAS,CAAA;IAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8DG;IACH,UAAU,EAAE,SAAS,CAAA;IAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8DG;IACH,gBAAgB,EAAE,SAAS,CAAA;IAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8DG;IACH,eAAe,EAAE,SAAS,CAAA;CAC3B,CAAC,CAAA;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI;IAC9D,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,EACrC,KAAK,EAAE,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;KAAE,GACjD,YAAY,GAAG,IAAI,CAAA;CACvB,GAAG,QAAQ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/Element/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/Element/utils.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,OAAO,CAAA;AAEzC,eAAO,MAAM,eAAe,EAAE,QAG7B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,QAG9B,CAAA"}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { VLElement } from "../Element";
|
|
2
2
|
import { Props as IteratorProps } from "../helpers/Iterator";
|
|
3
3
|
import type { MergeTypes } from "../types";
|
|
4
|
+
type ListProps = {
|
|
5
|
+
/**
|
|
6
|
+
* A boolean value. When set to `false`, component returns `React.Fragment`
|
|
7
|
+
* When set to `true`, component returns as the **root** element `Element`
|
|
8
|
+
* component.
|
|
9
|
+
*/
|
|
10
|
+
rootElement?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Label prop frol `Element` component is being ignored.
|
|
13
|
+
*/
|
|
14
|
+
label: never;
|
|
15
|
+
/**
|
|
16
|
+
* Content prop frol `Element` component is being ignored.
|
|
17
|
+
*/
|
|
18
|
+
content: never;
|
|
19
|
+
};
|
|
4
20
|
export type Props = MergeTypes<[
|
|
5
21
|
IteratorProps,
|
|
6
|
-
|
|
7
|
-
rootElement?: boolean;
|
|
8
|
-
label: never;
|
|
9
|
-
content: never;
|
|
10
|
-
}
|
|
22
|
+
ListProps
|
|
11
23
|
]>;
|
|
12
|
-
declare const
|
|
13
|
-
export default
|
|
24
|
+
declare const Component: VLElement<Props>;
|
|
25
|
+
export default Component;
|
|
14
26
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/List/component.tsx"],"names":[],"mappings":"AAGA,OAAgB,EAAE,SAAS,EAAE,mBAAiB;AAC9C,OAAiB,EAAE,KAAK,IAAI,aAAa,EAAE,4BAA0B;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAe;AAEzC,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/List/component.tsx"],"names":[],"mappings":"AAGA,OAAgB,EAAE,SAAS,EAAE,mBAAiB;AAC9C,OAAiB,EAAE,KAAK,IAAI,aAAa,EAAE,4BAA0B;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAe;AAEzC,KAAK,SAAS,GAAG;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAA;IACZ;;OAEG;IACH,OAAO,EAAE,KAAK,CAAA;CACf,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,CAC5B;IACE,aAAa;IACb,SAAS;CACV,CACF,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,SAAS,CAAC,KAAK,CAY/B,CAAA;AAQD,eAAe,SAAS,CAAA"}
|
|
@@ -18,10 +18,33 @@ type ContentRenderer = (props: Partial<{
|
|
|
18
18
|
alignY: AlignY;
|
|
19
19
|
}>) => ReactNode;
|
|
20
20
|
export type Props = {
|
|
21
|
+
/**
|
|
22
|
+
* Children to be rendered within **Overlay** component when Overlay is active.
|
|
23
|
+
*/
|
|
21
24
|
children: Content | TriggerRenderer;
|
|
25
|
+
/**
|
|
26
|
+
* React component to be used as a trigger (e.g. `Button` for opening
|
|
27
|
+
* dropdowns). Component must acept accept `ref` or any other prop name
|
|
28
|
+
* defined in `triggerRefName` prop.
|
|
29
|
+
*/
|
|
22
30
|
trigger: Content | ContentRenderer;
|
|
31
|
+
/**
|
|
32
|
+
* Defines a HTML DOM where children to be appended. Component uses JavaScript
|
|
33
|
+
* [`Node.appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)
|
|
34
|
+
*
|
|
35
|
+
* For more information follow [Portal](https://vitus-labs.com/docs/ui-system/elements/portal)
|
|
36
|
+
* component.
|
|
37
|
+
*/
|
|
23
38
|
DOMLocation?: HTMLElement;
|
|
39
|
+
/**
|
|
40
|
+
* Defines a prop name to be used for passing `ref` for **trigger**. By default,
|
|
41
|
+
* the value is `ref`.
|
|
42
|
+
*/
|
|
24
43
|
triggerRefName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Defines a prop name to be used for passing `ref` for **content** (passed `children`).
|
|
46
|
+
* By default, the value is `ref`.
|
|
47
|
+
*/
|
|
25
48
|
contentRefName?: string;
|
|
26
49
|
} & UseOverlayProps;
|
|
27
50
|
declare const Component: VLComponent<Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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,SAAS,EAAE,WAAW,CAAC,KAAK,CAuDjC,CAAA;AAQD,eAAe,SAAS,CAAA"}
|
|
@@ -2,21 +2,80 @@ type Align = 'bottom' | 'top' | 'left' | 'bottom' | 'right';
|
|
|
2
2
|
type AlignX = 'left' | 'center' | 'right';
|
|
3
3
|
type AlignY = 'bottom' | 'top' | 'center';
|
|
4
4
|
export type UseOverlayProps = Partial<{
|
|
5
|
+
/**
|
|
6
|
+
* Defines default state whather **Overlay** component should be active.
|
|
7
|
+
* Default value is `false`.
|
|
8
|
+
*/
|
|
5
9
|
isOpen: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Defines `event` when **Overlay** is supposed to be open.
|
|
12
|
+
*
|
|
13
|
+
* When `manual` is set, callbacks needs to be applied to make it working.
|
|
14
|
+
*/
|
|
6
15
|
openOn: 'click' | 'hover' | 'manual';
|
|
16
|
+
/**
|
|
17
|
+
* Defines `event` when **Overlay** is supposed to be closed.
|
|
18
|
+
*/
|
|
7
19
|
closeOn: 'click' | 'clickOnTrigger' | 'clickOutsideContent' | 'hover' | 'manual';
|
|
20
|
+
/**
|
|
21
|
+
* Defines what type of **Overlay** will be created. Type `modal`
|
|
22
|
+
* has different positioning calculations than others.
|
|
23
|
+
*/
|
|
8
24
|
type: 'dropdown' | 'tooltip' | 'popover' | 'modal';
|
|
25
|
+
/**
|
|
26
|
+
* Defines how `content` is treated regarding CSS positioning.
|
|
27
|
+
*/
|
|
9
28
|
position: 'absolute' | 'fixed' | 'relative' | 'static';
|
|
29
|
+
/**
|
|
30
|
+
* Defines from which side is `content` aligned to `trigger` (top, left, bottom, right).
|
|
31
|
+
* For more specific alignment configuration can be used `alignX` and/or `alignY` prop.
|
|
32
|
+
*/
|
|
10
33
|
align: Align;
|
|
34
|
+
/**
|
|
35
|
+
* Defines how `content` is aligned to `trigger` on axis X
|
|
36
|
+
*/
|
|
11
37
|
alignX: AlignX;
|
|
38
|
+
/**
|
|
39
|
+
* Defines how `content` is aligned to `trigger` on axis Y
|
|
40
|
+
*/
|
|
12
41
|
alignY: AlignY;
|
|
42
|
+
/**
|
|
43
|
+
* Defines `margin` from trigger on axis X.
|
|
44
|
+
*/
|
|
13
45
|
offsetX: number;
|
|
46
|
+
/**
|
|
47
|
+
* Defines `margin` from trigger on axis Y.
|
|
48
|
+
*/
|
|
14
49
|
offsetY: number;
|
|
50
|
+
/**
|
|
51
|
+
* Performance helper. Value defined in miliseconds for `throttling`
|
|
52
|
+
* recalculations
|
|
53
|
+
*/
|
|
15
54
|
throttleDelay: number;
|
|
55
|
+
/**
|
|
56
|
+
* A valid HTML element. Prop can be used for ability to handle properly
|
|
57
|
+
* scrolling inside custom scrollable HTML element.
|
|
58
|
+
*/
|
|
16
59
|
parentContainer: HTMLElement | null;
|
|
60
|
+
/**
|
|
61
|
+
* Defines wheather active **Overlay** is supposed to be closed on pressing
|
|
62
|
+
* `ESC` key.
|
|
63
|
+
*/
|
|
17
64
|
closeOnEsc: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* When set to `true`, **Overlay** is automatically closed and is blocked for
|
|
67
|
+
* being opened.
|
|
68
|
+
*/
|
|
18
69
|
disabled: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* A callback hook to be called when **Overlay** is being opened. Does not
|
|
72
|
+
* accept any arguments.
|
|
73
|
+
*/
|
|
19
74
|
onOpen: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* A callback hook to be called when **Overlay** is being closed. Does not
|
|
77
|
+
* accept any arguments.
|
|
78
|
+
*/
|
|
20
79
|
onClose: () => void;
|
|
21
80
|
}>;
|
|
22
81
|
declare const useOverlay: ({ isOpen, openOn, closeOn, type, position, align, alignX, alignY, offsetX, offsetY, throttleDelay, parentContainer, closeOnEsc, disabled, onOpen, onClose, }?: Partial<UseOverlayProps>) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOverlay.d.ts","sourceRoot":"","sources":["../../../src/Overlay/useOverlay.tsx"],"names":[],"mappings":"AAaA,KAAK,K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E,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,eAAe,EAAE,WAAW,GAAG,IAAI,CAAA;IACnC;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAC,CAAA;AAEF,QAAA,MAAM,UAAU,kKAiBb,QAAQ,eAAe,CAAC;;uBAgdqB,WAAW;;;;;;;;;;;;;;;;;CAqB1D,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import type { VLComponent } from "../types";
|
|
3
3
|
export type Props = {
|
|
4
|
+
/**
|
|
5
|
+
* Defines a HTML DOM where children to be appended. Component uses JavaScript
|
|
6
|
+
* [`Node.appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)
|
|
7
|
+
*/
|
|
4
8
|
DOMLocation?: HTMLElement;
|
|
9
|
+
/**
|
|
10
|
+
* Children to be rendered within **Portal** component.
|
|
11
|
+
*/
|
|
5
12
|
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Valid HTML Tag
|
|
15
|
+
*/
|
|
6
16
|
tag?: string;
|
|
7
17
|
};
|
|
8
18
|
declare const Component: VLComponent<Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/Portal/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAe;AAE1C,MAAM,MAAM,KAAK,GAAG;IAClB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,QAAQ,EAAE,SAAS,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,WAAW,CAAC,KAAK,CAwBjC,CAAA;AAQD,eAAe,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/Portal/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAe;AAE1C,MAAM,MAAM,KAAK,GAAG;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,WAAW,CAAC,KAAK,CAwBjC,CAAA;AAQD,eAAe,SAAS,CAAA"}
|
|
@@ -2,14 +2,29 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import type { HTMLTextTags } from '@vitus-labs/core';
|
|
3
3
|
import type { VLForwardedComponent, ExtendCss } from "../types";
|
|
4
4
|
export type Props = Partial<{
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Label can be used instead of children for inline syntax. But **children** prop takes a precedence
|
|
7
|
+
*/
|
|
6
8
|
label: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Children to be rendered within **Text** component.
|
|
11
|
+
*/
|
|
7
12
|
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Defines whether should behave as a block text element. Automatically adds **p** HTML tag
|
|
15
|
+
*/
|
|
16
|
+
paragraph: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Defines what kind of HTML tag should be rendered
|
|
19
|
+
*/
|
|
8
20
|
tag: HTMLTextTags;
|
|
9
|
-
|
|
21
|
+
/**
|
|
22
|
+
* If an additional styling needs to be added, it can be do so via injecting styles using this property.
|
|
23
|
+
*/
|
|
24
|
+
css: ExtendCss;
|
|
10
25
|
}>;
|
|
11
|
-
declare const
|
|
26
|
+
declare const Component: VLForwardedComponent<Props> & {
|
|
12
27
|
isText?: true;
|
|
13
28
|
};
|
|
14
|
-
export default
|
|
29
|
+
export default Component;
|
|
15
30
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/Text/component.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAwC,SAAS,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,iBAAe;AAG9D,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC;IAC1B,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/Text/component.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAwC,SAAS,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,iBAAe;AAG9D,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,GAAG,EAAE,YAAY,CAAA;IACjB;;OAEG;IACH,GAAG,EAAE,SAAS,CAAA;CACf,CAAC,CAAA;AAIF,QAAA,MAAM,SAAS,EAAE,oBAAoB,CAAC,KAAK,CAAC,GAAG;IAC7C,MAAM,CAAC,EAAE,IAAI,CAAA;CAkBb,CAAA;AASF,eAAe,SAAS,CAAA"}
|