@vitus-labs/elements 1.2.2 → 1.2.3-alpha.58
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/LICENSE +1 -1
- package/README.md +279 -66
- package/lib/analysis/index.js.html +18 -18
- package/lib/analysis/vitus-labs-elements.native.js.html +18 -18
- package/lib/index.d.ts +832 -849
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +1290 -1160
- package/lib/index.js.map +1 -1
- package/lib/vitus-labs-elements.native.js +1176 -1060
- package/lib/vitus-labs-elements.native.js.map +1 -1
- package/package.json +23 -23
- package/lib/types/Element/component.d.ts +0 -4
- package/lib/types/Element/component.d.ts.map +0 -1
- package/lib/types/Element/constants.d.ts +0 -51
- package/lib/types/Element/constants.d.ts.map +0 -1
- package/lib/types/Element/index.d.ts +0 -7
- package/lib/types/Element/index.d.ts.map +0 -1
- package/lib/types/Element/types.d.ts +0 -423
- package/lib/types/Element/types.d.ts.map +0 -1
- package/lib/types/Element/utils.d.ts +0 -5
- package/lib/types/Element/utils.d.ts.map +0 -1
- package/lib/types/Element/withEqualSizeBeforeAfter.d.ts +0 -8
- package/lib/types/Element/withEqualSizeBeforeAfter.d.ts.map +0 -1
- package/lib/types/List/component.d.ts +0 -23
- package/lib/types/List/component.d.ts.map +0 -1
- package/lib/types/List/index.d.ts +0 -7
- package/lib/types/List/index.d.ts.map +0 -1
- package/lib/types/List/withActiveState.d.ts +0 -11
- package/lib/types/List/withActiveState.d.ts.map +0 -1
- package/lib/types/Overlay/component.d.ts +0 -52
- package/lib/types/Overlay/component.d.ts.map +0 -1
- package/lib/types/Overlay/context.d.ts +0 -12
- package/lib/types/Overlay/context.d.ts.map +0 -1
- package/lib/types/Overlay/index.d.ts +0 -7
- package/lib/types/Overlay/index.d.ts.map +0 -1
- package/lib/types/Overlay/useOverlay.d.ts +0 -109
- package/lib/types/Overlay/useOverlay.d.ts.map +0 -1
- package/lib/types/Portal/component.d.ts +0 -20
- package/lib/types/Portal/component.d.ts.map +0 -1
- package/lib/types/Portal/index.d.ts +0 -5
- package/lib/types/Portal/index.d.ts.map +0 -1
- package/lib/types/Text/component.d.ts +0 -30
- package/lib/types/Text/component.d.ts.map +0 -1
- package/lib/types/Text/index.d.ts +0 -5
- package/lib/types/Text/index.d.ts.map +0 -1
- package/lib/types/Text/styled.d.ts +0 -3
- package/lib/types/Text/styled.d.ts.map +0 -1
- package/lib/types/Util/component.d.ts +0 -19
- package/lib/types/Util/component.d.ts.map +0 -1
- package/lib/types/Util/index.d.ts +0 -5
- package/lib/types/Util/index.d.ts.map +0 -1
- package/lib/types/constants.d.ts +0 -2
- package/lib/types/constants.d.ts.map +0 -1
- package/lib/types/helpers/Content/component.d.ts +0 -5
- package/lib/types/helpers/Content/component.d.ts.map +0 -1
- package/lib/types/helpers/Content/index.d.ts +0 -3
- package/lib/types/helpers/Content/index.d.ts.map +0 -1
- package/lib/types/helpers/Content/styled.d.ts +0 -3
- package/lib/types/helpers/Content/styled.d.ts.map +0 -1
- package/lib/types/helpers/Content/types.d.ts +0 -31
- package/lib/types/helpers/Content/types.d.ts.map +0 -1
- package/lib/types/helpers/Iterator/component.d.ts +0 -10
- package/lib/types/helpers/Iterator/component.d.ts.map +0 -1
- package/lib/types/helpers/Iterator/index.d.ts +0 -5
- package/lib/types/helpers/Iterator/index.d.ts.map +0 -1
- package/lib/types/helpers/Iterator/types.d.ts +0 -60
- package/lib/types/helpers/Iterator/types.d.ts.map +0 -1
- package/lib/types/helpers/Wrapper/component.d.ts +0 -5
- package/lib/types/helpers/Wrapper/component.d.ts.map +0 -1
- package/lib/types/helpers/Wrapper/constants.d.ts +0 -6
- package/lib/types/helpers/Wrapper/constants.d.ts.map +0 -1
- package/lib/types/helpers/Wrapper/index.d.ts +0 -3
- package/lib/types/helpers/Wrapper/index.d.ts.map +0 -1
- package/lib/types/helpers/Wrapper/styled.d.ts +0 -3
- package/lib/types/helpers/Wrapper/styled.d.ts.map +0 -1
- package/lib/types/helpers/Wrapper/types.d.ts +0 -42
- package/lib/types/helpers/Wrapper/types.d.ts.map +0 -1
- package/lib/types/helpers/Wrapper/utils.d.ts +0 -4
- package/lib/types/helpers/Wrapper/utils.d.ts.map +0 -1
- package/lib/types/helpers/index.d.ts +0 -4
- package/lib/types/helpers/index.d.ts.map +0 -1
- package/lib/types/index.d.ts +0 -18
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/types.d.ts +0 -51
- package/lib/types/types.d.ts.map +0 -1
- package/lib/types/utils.d.ts +0 -2
- package/lib/types/utils.d.ts.map +0 -1
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
|
|
2
|
-
import type { HTMLTags } from '@vitus-labs/core';
|
|
3
|
-
import type { AlignX, AlignY, Content, Direction, ResponsiveBoolType, Responsive, ExtendCss, InnerRef, VLStatic } from "../types";
|
|
4
|
-
export type Props = Partial<{
|
|
5
|
-
/**
|
|
6
|
-
* Valid HTML Tag
|
|
7
|
-
*/
|
|
8
|
-
tag: HTMLTags;
|
|
9
|
-
/**
|
|
10
|
-
* React `ref`, the prop is alternative to `ref` prop without need to wrap component to `forwardRef`
|
|
11
|
-
*/
|
|
12
|
-
innerRef: InnerRef;
|
|
13
|
-
/**
|
|
14
|
-
* Valid React `children`
|
|
15
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
58
|
-
afterContent: Content;
|
|
59
|
-
/**
|
|
60
|
-
* A boolean type to define whether **Element** should behave
|
|
61
|
-
* as an inline or block element (`flex` vs. `inline-flex`)
|
|
62
|
-
*/
|
|
63
|
-
block: ResponsiveBoolType;
|
|
64
|
-
/**
|
|
65
|
-
* A boolean type to define whether inner wrappers should be equal
|
|
66
|
-
* (have the same width or height)
|
|
67
|
-
*/
|
|
68
|
-
equalCols: ResponsiveBoolType;
|
|
69
|
-
/**
|
|
70
|
-
* Defines a `gap` spacing between inner wrappers between `beforeContent` and `children`
|
|
71
|
-
* and `children` and `afterContent`
|
|
72
|
-
*/
|
|
73
|
-
gap: Responsive;
|
|
74
|
-
/**
|
|
75
|
-
* Defines a `gap` spacing between inner wrappers between `beforeContent`,
|
|
76
|
-
* `children` and `afterContent`
|
|
77
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
162
|
-
dangerouslySetInnerHTML: {
|
|
163
|
-
__html: string;
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
420
|
-
afterContentCss: ExtendCss;
|
|
421
|
-
}>;
|
|
422
|
-
export type VLElement<P extends Record<string, unknown> = {}> = ForwardRefExoticComponent<PropsWithoutRef<Props & P> & RefAttributes<any>> & VLStatic;
|
|
423
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Element/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,eAAe,EACf,aAAa,EACd,MAAM,OAAO,CAAA;AACd,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;;OAEG;IACH,GAAG,EAAE,QAAQ,CAAA;IAEb;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAA;IAElB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAA;IAEjB;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAA;IAEhB;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAA;IAEd;;;;;;;;;;;;OAYG;IACH,aAAa,EAAE,OAAO,CAAA;IAEtB;;;;;;;;;;;;OAYG;IACH,YAAY,EAAE,OAAO,CAAA;IAErB;;;OAGG;IACH,KAAK,EAAE,kBAAkB,CAAA;IAEzB;;;OAGG;IACH,SAAS,EAAE,kBAAkB,CAAA;IAE7B;;;OAGG;IACH,GAAG,EAAE,UAAU,CAAA;IAEf;;;OAGG;IACH,SAAS,EAAE,SAAS,CAAA;IAEpB;;;;OAIG;IACH,gBAAgB,EAAE,SAAS,CAAA;IAE3B;;;;OAIG;IACH,sBAAsB,EAAE,SAAS,CAAA;IAEjC;;;;OAIG;IACH,qBAAqB,EAAE,SAAS,CAAA;IAEhC;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAE3B;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAE1B;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAE3B;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAE1B;;;;OAIG;IACH,uBAAuB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,IAC1D,yBAAyB,CAAC,eAAe,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,GACxE,QAAQ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
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,8 +0,0 @@
|
|
|
1
|
-
import type { SimpleHoc } from "../types";
|
|
2
|
-
import type { Props as ElementProps } from './types';
|
|
3
|
-
type Props = ElementProps & Partial<{
|
|
4
|
-
equalBeforeAfter: boolean;
|
|
5
|
-
}>;
|
|
6
|
-
declare const withEqualBeforeAfter: SimpleHoc<Props>;
|
|
7
|
-
export default withEqualBeforeAfter;
|
|
8
|
-
//# sourceMappingURL=withEqualSizeBeforeAfter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withEqualSizeBeforeAfter.d.ts","sourceRoot":"","sources":["../../../src/Element/withEqualSizeBeforeAfter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAe;AACxC,OAAO,KAAK,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,SAAS,CAAA;AAmCpD,KAAK,KAAK,GAAG,YAAY,GACvB,OAAO,CAAC;IACN,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAC,CAAA;AAEJ,QAAA,MAAM,oBAAoB,EAAE,SAAS,CAAC,KAAK,CA0C1C,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { VLElement } from "../Element";
|
|
2
|
-
import type { Props as IteratorProps } from "../helpers/Iterator";
|
|
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 from `Element` component is being ignored.
|
|
13
|
-
*/
|
|
14
|
-
label: never;
|
|
15
|
-
/**
|
|
16
|
-
* Content prop from `Element` component is being ignored.
|
|
17
|
-
*/
|
|
18
|
-
content: never;
|
|
19
|
-
};
|
|
20
|
-
export type Props = MergeTypes<[IteratorProps, ListProps]>;
|
|
21
|
-
declare const Component: VLElement<Props>;
|
|
22
|
-
export default Component;
|
|
23
|
-
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/List/component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAiB;AAC1C,OAAO,KAAK,EAAE,KAAK,IAAI,aAAa,EAAE,4BAA0B;AAChE,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,CAAC,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAA;AAE1D,QAAA,MAAM,SAAS,EAAE,SAAS,CAAC,KAAK,CAY/B,CAAA;AAQD,eAAe,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC,YAAY,EAAE,KAAK,EAAE,CAAA;AACrB,OAAO,EAAE,eAAe,EAAE,CAAA;AAE1B,eAAe,SAAS,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { SimpleHoc } from "../types";
|
|
2
|
-
type Key = string | number;
|
|
3
|
-
interface Props {
|
|
4
|
-
type?: 'single' | 'multi';
|
|
5
|
-
activeItemRequired?: boolean;
|
|
6
|
-
activeItems?: Key | (string | number)[];
|
|
7
|
-
itemProps?: Record<string, unknown> | ((props: Record<string, unknown>) => Record<string, unknown>);
|
|
8
|
-
}
|
|
9
|
-
declare const component: SimpleHoc<Props>;
|
|
10
|
-
export default component;
|
|
11
|
-
//# sourceMappingURL=withActiveState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withActiveState.d.ts","sourceRoot":"","sources":["../../../src/List/withActiveState.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAe;AASxC,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,CAAA;AAY1B,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,GAAG,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IACvC,SAAS,CAAC,EACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CAClE;AAED,QAAA,MAAM,SAAS,EAAE,SAAS,CAAC,KAAK,CA2J/B,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import type { VLComponent, Content } from "../types";
|
|
3
|
-
import { type UseOverlayProps } from './useOverlay';
|
|
4
|
-
type Align = 'bottom' | 'top' | 'left' | 'right';
|
|
5
|
-
type AlignX = 'left' | 'center' | 'right';
|
|
6
|
-
type AlignY = 'bottom' | 'top' | 'center';
|
|
7
|
-
type TriggerRenderer = (props: Partial<{
|
|
8
|
-
active: boolean;
|
|
9
|
-
showContent: () => void;
|
|
10
|
-
hideContent: () => void;
|
|
11
|
-
}>) => ReactNode;
|
|
12
|
-
type ContentRenderer = (props: Partial<{
|
|
13
|
-
active: boolean;
|
|
14
|
-
showContent: () => void;
|
|
15
|
-
hideContent: () => void;
|
|
16
|
-
align: Align;
|
|
17
|
-
alignX: AlignX;
|
|
18
|
-
alignY: AlignY;
|
|
19
|
-
}>) => ReactNode;
|
|
20
|
-
export type Props = {
|
|
21
|
-
/**
|
|
22
|
-
* Children to be rendered within **Overlay** component when Overlay is active.
|
|
23
|
-
*/
|
|
24
|
-
children: ContentRenderer | Content;
|
|
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
|
-
*/
|
|
30
|
-
trigger: TriggerRenderer | Content;
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
48
|
-
contentRefName?: string;
|
|
49
|
-
} & UseOverlayProps;
|
|
50
|
-
declare const Component: VLComponent<Props>;
|
|
51
|
-
export default Component;
|
|
52
|
-
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/Overlay/component.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAe;AACnD,OAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AAI/D,KAAK,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;AAChD,KAAK,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;AACzC,KAAK,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAA;AAEzC,KAAK,eAAe,GAAG,CACrB,KAAK,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,CAAC,KACC,SAAS,CAAA;AAEd,KAAK,eAAe,GAAG,CACrB,KAAK,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,KAAK,EAAE,KAAK,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf,CAAC,KACC,SAAS,CAAA;AAEd,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAA;IACnC;;;;OAIG;IACH,OAAO,EAAE,eAAe,GAAG,OAAO,CAAA;IAClC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,GAAG,eAAe,CAAA;AAEnB,QAAA,MAAM,SAAS,EAAE,WAAW,CAAC,KAAK,CAuDjC,CAAA;AAQD,eAAe,SAAS,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type FC, type ReactNode } from 'react';
|
|
2
|
-
export interface Context {
|
|
3
|
-
blocked: boolean;
|
|
4
|
-
setBlocked: () => void;
|
|
5
|
-
setUnblocked: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const useOverlayContext: () => Context;
|
|
8
|
-
declare const Component: FC<Context & {
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}>;
|
|
11
|
-
export default Component;
|
|
12
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/Overlay/context.tsx"],"names":[],"mappings":"AAAA,OAAc,EACZ,KAAK,EAAE,EAGP,KAAK,SAAS,EAEf,MAAM,OAAO,CAAA;AAEd,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,YAAY,EAAE,MAAM,IAAI,CAAA;CACzB;AAMD,eAAO,MAAM,iBAAiB,eAA4B,CAAA;AAE1D,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,OAAO,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAgBpD,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import component, { type Props } from './component';
|
|
2
|
-
import useOverlay, { type UseOverlayProps } from './useOverlay';
|
|
3
|
-
import OverlayProvider from './context';
|
|
4
|
-
export type { Props, UseOverlayProps };
|
|
5
|
-
export { useOverlay, OverlayProvider };
|
|
6
|
-
export default component;
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,UAAU,EAAE,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,eAAe,MAAM,WAAW,CAAA;AAEvC,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,CAAA;AAEtC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAA;AAEtC,eAAe,SAAS,CAAA"}
|