@vitus-labs/elements 1.2.1 → 1.2.3-alpha.56
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 +1 -1
- package/lib/analysis/vitus-labs-elements.native.js.html +1 -1
- package/lib/index.d.ts +835 -850
- 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 +24 -24
- 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
package/lib/index.d.ts
CHANGED
|
@@ -1,850 +1,835 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
/**
|
|
837
|
-
* package name
|
|
838
|
-
*/
|
|
839
|
-
pkgName?: string;
|
|
840
|
-
/**
|
|
841
|
-
* component name
|
|
842
|
-
*/
|
|
843
|
-
VITUS_LABS__COMPONENT?: `@vitus-labs/${string}`;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
export declare const withActiveState: SimpleHoc<Props_2>;
|
|
847
|
-
|
|
848
|
-
export declare const withEqualSizeBeforeAfter: SimpleHoc<Props>;
|
|
849
|
-
|
|
850
|
-
export { }
|
|
1
|
+
import { Provider } from "@vitus-labs/unistyle";
|
|
2
|
+
import { BreakpointKeys, HTMLTags, HTMLTextTags, config, render } from "@vitus-labs/core";
|
|
3
|
+
import * as react0 from "react";
|
|
4
|
+
import { ComponentType, FC, ForwardRefExoticComponent, ForwardedRef, PropsWithoutRef, ReactNode, Ref, RefAttributes } from "react";
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/types.d.ts
|
|
8
|
+
|
|
9
|
+
type ExtractNullableKeys<T> = { [P in keyof T as T[P] extends null | undefined ? never : P]: T[P] };
|
|
10
|
+
type Id<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;
|
|
11
|
+
type SpreadTwo<L, R> = Id<Pick<L, Exclude<keyof L, keyof R>> & R>;
|
|
12
|
+
type Spread<A extends readonly [...any]> = A extends [infer L, ...infer R] ? SpreadTwo<L, Spread<R>> : unknown;
|
|
13
|
+
type MergeTypes<A extends readonly [...any]> = ExtractNullableKeys<Spread<A>>;
|
|
14
|
+
type SimpleHoc<P extends Record<string, unknown> = {}> = (WrappedComponent: ComponentType<P>) => ComponentType<P>;
|
|
15
|
+
type InnerRef = ForwardedRef<any>;
|
|
16
|
+
type CssCallback = (css: typeof config.css) => ReturnType<typeof css>;
|
|
17
|
+
type Css = CssCallback | ReturnType<typeof config.css> | string;
|
|
18
|
+
type Content = Parameters<typeof render>['0'];
|
|
19
|
+
type ContentAlignX = 'left' | 'center' | 'right' | 'spaceBetween' | 'spaceAround' | 'block';
|
|
20
|
+
type ContentAlignY = 'top' | 'center' | 'bottom' | 'spaceBetween' | 'spaceAround' | 'block';
|
|
21
|
+
type ContentDirection = 'inline' | 'rows' | 'reverseInline' | 'reverseRows';
|
|
22
|
+
type ContentBoolean = boolean;
|
|
23
|
+
type ContentSimpleValue = string | number;
|
|
24
|
+
type AlignY = ContentAlignY | ContentAlignY[] | Partial<Record<BreakpointKeys, ContentAlignY>>;
|
|
25
|
+
type AlignX = ContentAlignX | ContentAlignX[] | Partial<Record<BreakpointKeys, ContentAlignX>>;
|
|
26
|
+
type Direction = ContentDirection | ContentDirection[] | Partial<Record<BreakpointKeys, ContentDirection>>;
|
|
27
|
+
type ResponsiveBoolType = ContentBoolean | ContentBoolean[] | Partial<Record<BreakpointKeys, ContentBoolean>>;
|
|
28
|
+
type Responsive = ContentSimpleValue | ContentSimpleValue[] | Partial<Record<BreakpointKeys, number | string>>;
|
|
29
|
+
type ExtendCss = Css | Css[] | Partial<Record<BreakpointKeys, Css>>;
|
|
30
|
+
type VLForwardedComponent<P extends Record<string, unknown> = {}> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<any>> & VLStatic;
|
|
31
|
+
type VLComponent<P extends Record<string, any> = {}> = FC<P> & VLStatic;
|
|
32
|
+
interface VLStatic {
|
|
33
|
+
/**
|
|
34
|
+
* React displayName
|
|
35
|
+
*/
|
|
36
|
+
displayName?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* package name
|
|
39
|
+
*/
|
|
40
|
+
pkgName?: string;
|
|
41
|
+
/**
|
|
42
|
+
* component name
|
|
43
|
+
*/
|
|
44
|
+
VITUS_LABS__COMPONENT?: `@vitus-labs/${string}`;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/Element/types.d.ts
|
|
48
|
+
type Props = Partial<{
|
|
49
|
+
/**
|
|
50
|
+
* Valid HTML Tag
|
|
51
|
+
*/
|
|
52
|
+
tag: HTMLTags;
|
|
53
|
+
/**
|
|
54
|
+
* React `ref`, the prop is alternative to `ref` prop without need to wrap component to `forwardRef`
|
|
55
|
+
*/
|
|
56
|
+
innerRef: InnerRef;
|
|
57
|
+
/**
|
|
58
|
+
* Valid React `children`
|
|
59
|
+
*/
|
|
60
|
+
children: Content;
|
|
61
|
+
/**
|
|
62
|
+
* Alternative prop to React `children`
|
|
63
|
+
* It is recommended to pass only one of `children`, `content` or `label` props
|
|
64
|
+
*
|
|
65
|
+
* The prioritization of rendering is following: `children` → `content` → `label`
|
|
66
|
+
*/
|
|
67
|
+
content: Content;
|
|
68
|
+
/**
|
|
69
|
+
* Alternative prop to React `children`
|
|
70
|
+
* It is recommended to pass only one of `children`, `content` or `label` props
|
|
71
|
+
*
|
|
72
|
+
* The prioritization of rendering is following: `children` → `content` → `label`
|
|
73
|
+
*/
|
|
74
|
+
label: Content;
|
|
75
|
+
/**
|
|
76
|
+
* Valid React `children` to be rendered inside _beforeContent_ wrapper
|
|
77
|
+
*
|
|
78
|
+
* In a case, where at least one of `beforeContent` or `afterContent` is defined,
|
|
79
|
+
* **Element** component will render additional inner wrapper helpers to
|
|
80
|
+
* attach `beforeContent` **before** any of `children`, `context` or `label`
|
|
81
|
+
* props.
|
|
82
|
+
*
|
|
83
|
+
* Together with prop `direction` can be the **Element** component aligned
|
|
84
|
+
* vertically or horizontally.
|
|
85
|
+
*
|
|
86
|
+
* To attach any react node _after_, use `afterContent`
|
|
87
|
+
*/
|
|
88
|
+
beforeContent: Content;
|
|
89
|
+
/**
|
|
90
|
+
* Valid React `children` to be rendered inside _afterContent_ wrapper
|
|
91
|
+
*
|
|
92
|
+
* In a case, where at least one of `beforeContent` or `afterContent` is defined,
|
|
93
|
+
* **Element** component will render additional inner wrapper helpers to
|
|
94
|
+
* attach `afterContent` **after** any of `children`, `context` or `label`
|
|
95
|
+
* props.
|
|
96
|
+
*
|
|
97
|
+
* Together with prop `direction` can be the **Element** component aligned
|
|
98
|
+
* vertically or horizontally.
|
|
99
|
+
*
|
|
100
|
+
* To attach any react node _before_, use `beforeContent`
|
|
101
|
+
*/
|
|
102
|
+
afterContent: Content;
|
|
103
|
+
/**
|
|
104
|
+
* A boolean type to define whether **Element** should behave
|
|
105
|
+
* as an inline or block element (`flex` vs. `inline-flex`)
|
|
106
|
+
*/
|
|
107
|
+
block: ResponsiveBoolType;
|
|
108
|
+
/**
|
|
109
|
+
* A boolean type to define whether inner wrappers should be equal
|
|
110
|
+
* (have the same width or height)
|
|
111
|
+
*/
|
|
112
|
+
equalCols: ResponsiveBoolType;
|
|
113
|
+
/**
|
|
114
|
+
* Defines a `gap` spacing between inner wrappers between `beforeContent` and `children`
|
|
115
|
+
* and `children` and `afterContent`
|
|
116
|
+
*/
|
|
117
|
+
gap: Responsive;
|
|
118
|
+
/**
|
|
119
|
+
* Defines a `gap` spacing between inner wrappers between `beforeContent`,
|
|
120
|
+
* `children` and `afterContent`
|
|
121
|
+
*/
|
|
122
|
+
direction: Direction;
|
|
123
|
+
/**
|
|
124
|
+
* Defines flow of `children` elements within it's inner wrapper.
|
|
125
|
+
*
|
|
126
|
+
* Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
|
|
127
|
+
*/
|
|
128
|
+
contentDirection: Direction;
|
|
129
|
+
/**
|
|
130
|
+
* Defines flow of `beforeContent` elements within it's inner wrapper.
|
|
131
|
+
*
|
|
132
|
+
* Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
|
|
133
|
+
*/
|
|
134
|
+
beforeContentDirection: Direction;
|
|
135
|
+
/**
|
|
136
|
+
* Defines flow of `afterContent` elements within it's inner wrapper.
|
|
137
|
+
*
|
|
138
|
+
* Can be one of the following **flex** values `inline` | `rows` | `reverseInline` | `reverseRows`
|
|
139
|
+
*/
|
|
140
|
+
afterContentDirection: Direction;
|
|
141
|
+
/**
|
|
142
|
+
* Define alignment of `beforeContent`, `content`, and `afterContent`
|
|
143
|
+
* with respect to root element **horizontally**.
|
|
144
|
+
*
|
|
145
|
+
* Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
|
|
146
|
+
* `spaceAround` | `block`
|
|
147
|
+
*/
|
|
148
|
+
alignX: AlignX;
|
|
149
|
+
/**
|
|
150
|
+
* Defines how `content` children (`children`, `content` or `label` props)
|
|
151
|
+
* are aligned within it's inner wrapper **horizontally**.
|
|
152
|
+
*
|
|
153
|
+
* Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
|
|
154
|
+
* `spaceAround` | `block`
|
|
155
|
+
*/
|
|
156
|
+
contentAlignX: AlignX;
|
|
157
|
+
/**
|
|
158
|
+
* Defines how `beforeContent` children are aligned within it's inner wrapper **horizontally**.
|
|
159
|
+
*
|
|
160
|
+
* Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
|
|
161
|
+
* `spaceAround` | `block`
|
|
162
|
+
*/
|
|
163
|
+
beforeContentAlignX: AlignX;
|
|
164
|
+
/**
|
|
165
|
+
* Defines how `afterContent` children are aligned within it's inner wrapper **horizontally**.
|
|
166
|
+
*
|
|
167
|
+
* Can be one of the following **flex** values `left` | `center` | `right` | `spaceBetween` |
|
|
168
|
+
* `spaceAround` | `block`
|
|
169
|
+
*/
|
|
170
|
+
afterContentAlignX: AlignX;
|
|
171
|
+
/**
|
|
172
|
+
* Define alignment of `beforeContent`, `content`, and `afterContent`
|
|
173
|
+
* with respect to root element **vertically**.
|
|
174
|
+
*
|
|
175
|
+
* Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
|
|
176
|
+
* `spaceAround` | `block`
|
|
177
|
+
*/
|
|
178
|
+
alignY: AlignY;
|
|
179
|
+
/**
|
|
180
|
+
* Defines how `content` children (`children`, `content` or `label` props)
|
|
181
|
+
* are aligned within it's inner wrapper **vertically**.
|
|
182
|
+
*
|
|
183
|
+
* Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
|
|
184
|
+
* `spaceAround` | `block`
|
|
185
|
+
*/
|
|
186
|
+
contentAlignY: AlignY;
|
|
187
|
+
/**
|
|
188
|
+
* Defines how `beforeContent` children are aligned within it's inner wrapper **vertically**.
|
|
189
|
+
*
|
|
190
|
+
* Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
|
|
191
|
+
* `spaceAround` | `block`
|
|
192
|
+
*/
|
|
193
|
+
beforeContentAlignY: AlignY;
|
|
194
|
+
/**
|
|
195
|
+
* Defines how `afterContent` children are aligned within it's inner wrapper **vertically**.
|
|
196
|
+
*
|
|
197
|
+
* Can be one of the following **flex** values `top` | `center` | `bottom` | `spaceBetween` |
|
|
198
|
+
* `spaceAround` | `block`
|
|
199
|
+
*/
|
|
200
|
+
afterContentAlignY: AlignY;
|
|
201
|
+
/**
|
|
202
|
+
* React `dangerouslySetInnerHTML` prop. For more details follow the link:
|
|
203
|
+
*
|
|
204
|
+
* https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
|
|
205
|
+
*/
|
|
206
|
+
dangerouslySetInnerHTML: {
|
|
207
|
+
__html: string;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* An additional prop for extending styling of the **root** wrapper element
|
|
211
|
+
*
|
|
212
|
+
* #### [A] Template literals
|
|
213
|
+
*
|
|
214
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
215
|
+
*
|
|
216
|
+
* ```jsx
|
|
217
|
+
* export default () => (
|
|
218
|
+
* <Element
|
|
219
|
+
* label="This is an element"
|
|
220
|
+
* css={`
|
|
221
|
+
* text-color: red;
|
|
222
|
+
* `}
|
|
223
|
+
* />
|
|
224
|
+
* )
|
|
225
|
+
* ```
|
|
226
|
+
*
|
|
227
|
+
* #### [B] String
|
|
228
|
+
*
|
|
229
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
230
|
+
*
|
|
231
|
+
* ```jsx
|
|
232
|
+
* export default () => (
|
|
233
|
+
* <Element
|
|
234
|
+
* label="This is an element"
|
|
235
|
+
* css="text-color: red;"
|
|
236
|
+
* />
|
|
237
|
+
* )
|
|
238
|
+
* ```
|
|
239
|
+
*
|
|
240
|
+
* #### [C] Css Function
|
|
241
|
+
*
|
|
242
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
243
|
+
*
|
|
244
|
+
* ```jsx
|
|
245
|
+
* import { css } from 'styled-components'
|
|
246
|
+
*
|
|
247
|
+
* export default () => (
|
|
248
|
+
* <Element
|
|
249
|
+
* label="This is an element"
|
|
250
|
+
* css={css`
|
|
251
|
+
* text-color: red;
|
|
252
|
+
* `}
|
|
253
|
+
* />
|
|
254
|
+
* )
|
|
255
|
+
* ```
|
|
256
|
+
*
|
|
257
|
+
* #### [D] Css Callback
|
|
258
|
+
*
|
|
259
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
260
|
+
*
|
|
261
|
+
* ```jsx
|
|
262
|
+
* export default () => (
|
|
263
|
+
* <Element
|
|
264
|
+
* label="This is an element"
|
|
265
|
+
* css={css => css`
|
|
266
|
+
* text-color: red;
|
|
267
|
+
* `}
|
|
268
|
+
* />
|
|
269
|
+
* )
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
css: ExtendCss;
|
|
273
|
+
/**
|
|
274
|
+
* An additional prop for extending styling of the **content** wrapper element
|
|
275
|
+
*
|
|
276
|
+
* #### [A] Template literals
|
|
277
|
+
*
|
|
278
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
279
|
+
*
|
|
280
|
+
* ```jsx
|
|
281
|
+
* export default () => (
|
|
282
|
+
* <Element
|
|
283
|
+
* label="This is an element"
|
|
284
|
+
* css={`
|
|
285
|
+
* text-color: red;
|
|
286
|
+
* `}
|
|
287
|
+
* />
|
|
288
|
+
* )
|
|
289
|
+
* ```
|
|
290
|
+
*
|
|
291
|
+
* #### [B] String
|
|
292
|
+
*
|
|
293
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
294
|
+
*
|
|
295
|
+
* ```jsx
|
|
296
|
+
* export default () => (
|
|
297
|
+
* <Element
|
|
298
|
+
* label="This is an element"
|
|
299
|
+
* css="text-color: red;"
|
|
300
|
+
* />
|
|
301
|
+
* )
|
|
302
|
+
* ```
|
|
303
|
+
*
|
|
304
|
+
* #### [C] Css Function
|
|
305
|
+
*
|
|
306
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
307
|
+
*
|
|
308
|
+
* ```jsx
|
|
309
|
+
* import { css } from 'styled-components'
|
|
310
|
+
*
|
|
311
|
+
* export default () => (
|
|
312
|
+
* <Element
|
|
313
|
+
* label="This is an element"
|
|
314
|
+
* css={css`
|
|
315
|
+
* text-color: red;
|
|
316
|
+
* `}
|
|
317
|
+
* />
|
|
318
|
+
* )
|
|
319
|
+
* ```
|
|
320
|
+
*
|
|
321
|
+
* #### [D] Css Callback
|
|
322
|
+
*
|
|
323
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
324
|
+
*
|
|
325
|
+
* ```jsx
|
|
326
|
+
* export default () => (
|
|
327
|
+
* <Element
|
|
328
|
+
* label="This is an element"
|
|
329
|
+
* css={css => css`
|
|
330
|
+
* text-color: red;
|
|
331
|
+
* `}
|
|
332
|
+
* />
|
|
333
|
+
* )
|
|
334
|
+
* ```
|
|
335
|
+
*/
|
|
336
|
+
contentCss: ExtendCss;
|
|
337
|
+
/**
|
|
338
|
+
* An additional prop for extending styling of the **beforeContent** wrapper element
|
|
339
|
+
*
|
|
340
|
+
* #### [A] Template literals
|
|
341
|
+
*
|
|
342
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
343
|
+
*
|
|
344
|
+
* ```jsx
|
|
345
|
+
* export default () => (
|
|
346
|
+
* <Element
|
|
347
|
+
* label="This is an element"
|
|
348
|
+
* css={`
|
|
349
|
+
* text-color: red;
|
|
350
|
+
* `}
|
|
351
|
+
* />
|
|
352
|
+
* )
|
|
353
|
+
* ```
|
|
354
|
+
*
|
|
355
|
+
* #### [B] String
|
|
356
|
+
*
|
|
357
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
358
|
+
*
|
|
359
|
+
* ```jsx
|
|
360
|
+
* export default () => (
|
|
361
|
+
* <Element
|
|
362
|
+
* label="This is an element"
|
|
363
|
+
* css="text-color: red;"
|
|
364
|
+
* />
|
|
365
|
+
* )
|
|
366
|
+
* ```
|
|
367
|
+
*
|
|
368
|
+
* #### [C] Css Function
|
|
369
|
+
*
|
|
370
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
371
|
+
*
|
|
372
|
+
* ```jsx
|
|
373
|
+
* import { css } from 'styled-components'
|
|
374
|
+
*
|
|
375
|
+
* export default () => (
|
|
376
|
+
* <Element
|
|
377
|
+
* label="This is an element"
|
|
378
|
+
* css={css`
|
|
379
|
+
* text-color: red;
|
|
380
|
+
* `}
|
|
381
|
+
* />
|
|
382
|
+
* )
|
|
383
|
+
* ```
|
|
384
|
+
*
|
|
385
|
+
* #### [D] Css Callback
|
|
386
|
+
*
|
|
387
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
388
|
+
*
|
|
389
|
+
* ```jsx
|
|
390
|
+
* export default () => (
|
|
391
|
+
* <Element
|
|
392
|
+
* label="This is an element"
|
|
393
|
+
* css={css => css`
|
|
394
|
+
* text-color: red;
|
|
395
|
+
* `}
|
|
396
|
+
* />
|
|
397
|
+
* )
|
|
398
|
+
* ```
|
|
399
|
+
*/
|
|
400
|
+
beforeContentCss: ExtendCss;
|
|
401
|
+
/**
|
|
402
|
+
* An additional prop for extending styling of the **afterContent** wrapper element
|
|
403
|
+
*
|
|
404
|
+
* #### [A] Template literals
|
|
405
|
+
*
|
|
406
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
407
|
+
*
|
|
408
|
+
* ```jsx
|
|
409
|
+
* export default () => (
|
|
410
|
+
* <Element
|
|
411
|
+
* label="This is an element"
|
|
412
|
+
* css={`
|
|
413
|
+
* text-color: red;
|
|
414
|
+
* `}
|
|
415
|
+
* />
|
|
416
|
+
* )
|
|
417
|
+
* ```
|
|
418
|
+
*
|
|
419
|
+
* #### [B] String
|
|
420
|
+
*
|
|
421
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
422
|
+
*
|
|
423
|
+
* ```jsx
|
|
424
|
+
* export default () => (
|
|
425
|
+
* <Element
|
|
426
|
+
* label="This is an element"
|
|
427
|
+
* css="text-color: red;"
|
|
428
|
+
* />
|
|
429
|
+
* )
|
|
430
|
+
* ```
|
|
431
|
+
*
|
|
432
|
+
* #### [C] Css Function
|
|
433
|
+
*
|
|
434
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
435
|
+
*
|
|
436
|
+
* ```jsx
|
|
437
|
+
* import { css } from 'styled-components'
|
|
438
|
+
*
|
|
439
|
+
* export default () => (
|
|
440
|
+
* <Element
|
|
441
|
+
* label="This is an element"
|
|
442
|
+
* css={css`
|
|
443
|
+
* text-color: red;
|
|
444
|
+
* `}
|
|
445
|
+
* />
|
|
446
|
+
* )
|
|
447
|
+
* ```
|
|
448
|
+
*
|
|
449
|
+
* #### [D] Css Callback
|
|
450
|
+
*
|
|
451
|
+
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
|
|
452
|
+
*
|
|
453
|
+
* ```jsx
|
|
454
|
+
* export default () => (
|
|
455
|
+
* <Element
|
|
456
|
+
* label="This is an element"
|
|
457
|
+
* css={css => css`
|
|
458
|
+
* text-color: red;
|
|
459
|
+
* `}
|
|
460
|
+
* />
|
|
461
|
+
* )
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
464
|
+
afterContentCss: ExtendCss;
|
|
465
|
+
}>;
|
|
466
|
+
type VLElement<P extends Record<string, unknown> = {}> = ForwardRefExoticComponent<PropsWithoutRef<Props & P> & RefAttributes<any>> & VLStatic;
|
|
467
|
+
//# sourceMappingURL=types.d.ts.map
|
|
468
|
+
//#endregion
|
|
469
|
+
//#region src/Element/component.d.ts
|
|
470
|
+
declare const Component: VLElement;
|
|
471
|
+
//#endregion
|
|
472
|
+
//#region src/Element/withEqualSizeBeforeAfter.d.ts
|
|
473
|
+
type Props$8 = Props & Partial<{
|
|
474
|
+
equalBeforeAfter: boolean;
|
|
475
|
+
ref: Ref<HTMLElement>;
|
|
476
|
+
}>;
|
|
477
|
+
declare const withEqualBeforeAfter: (WrappedComponent: any) => {
|
|
478
|
+
({
|
|
479
|
+
equalBeforeAfter,
|
|
480
|
+
direction,
|
|
481
|
+
afterContent,
|
|
482
|
+
beforeContent,
|
|
483
|
+
ref,
|
|
484
|
+
...rest
|
|
485
|
+
}: Props$8): react_jsx_runtime0.JSX.Element;
|
|
486
|
+
displayName: string;
|
|
487
|
+
};
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/helpers/Iterator/types.d.ts
|
|
490
|
+
type MaybeNull = undefined | null;
|
|
491
|
+
type TObj = Record<string, unknown>;
|
|
492
|
+
type SimpleValue = string | number;
|
|
493
|
+
type ObjectValue = Partial<{
|
|
494
|
+
id: SimpleValue;
|
|
495
|
+
key: SimpleValue;
|
|
496
|
+
itemId: SimpleValue;
|
|
497
|
+
component: ElementType;
|
|
498
|
+
}> & Record<string, unknown>;
|
|
499
|
+
type ElementType<T extends Record<string, unknown> = any> = ComponentType<T> | ForwardRefExoticComponent<T> | HTMLTags;
|
|
500
|
+
type ExtendedProps = {
|
|
501
|
+
index: number;
|
|
502
|
+
first: boolean;
|
|
503
|
+
last: boolean;
|
|
504
|
+
odd: boolean;
|
|
505
|
+
even: boolean;
|
|
506
|
+
position: number;
|
|
507
|
+
};
|
|
508
|
+
type PropsCallback = TObj | ((itemProps: Record<string, never> | Record<string, SimpleValue> | ObjectValue, extendedProps: ExtendedProps) => TObj);
|
|
509
|
+
type Props$1 = Partial<{
|
|
510
|
+
/**
|
|
511
|
+
* Valid React `children`
|
|
512
|
+
*/
|
|
513
|
+
children: ReactNode;
|
|
514
|
+
/**
|
|
515
|
+
* Array of data passed to `component` prop
|
|
516
|
+
*/
|
|
517
|
+
data: Array<SimpleValue | ObjectValue | MaybeNull>;
|
|
518
|
+
/**
|
|
519
|
+
* A React component to be rendered within list
|
|
520
|
+
*/
|
|
521
|
+
component: ElementType;
|
|
522
|
+
/**
|
|
523
|
+
* Defines name of the prop to be passed to the iteration component
|
|
524
|
+
* when **data** prop is type of `string[]`, `number[]` or combination
|
|
525
|
+
* of both. Otherwise ignored.
|
|
526
|
+
*/
|
|
527
|
+
valueName: string;
|
|
528
|
+
/**
|
|
529
|
+
* A React component to be rendered within list. `wrapComponent`
|
|
530
|
+
* wraps `component`. Therefore it can be used to enhance the behavior
|
|
531
|
+
* of the list component
|
|
532
|
+
*/
|
|
533
|
+
wrapComponent: ElementType;
|
|
534
|
+
/**
|
|
535
|
+
* Extension of **item** `component` props to be passed
|
|
536
|
+
*/
|
|
537
|
+
itemProps: PropsCallback;
|
|
538
|
+
/**
|
|
539
|
+
* Extension of **item** `wrapComponent` props to be passed
|
|
540
|
+
*/
|
|
541
|
+
wrapProps?: PropsCallback;
|
|
542
|
+
/**
|
|
543
|
+
* Extension of **item** `wrapComponent` props to be passed
|
|
544
|
+
*/
|
|
545
|
+
itemKey?: keyof ObjectValue | ((item: SimpleValue | Omit<ObjectValue, 'component'>, index: number) => SimpleValue);
|
|
546
|
+
}>;
|
|
547
|
+
//# sourceMappingURL=types.d.ts.map
|
|
548
|
+
//#endregion
|
|
549
|
+
//#region src/List/component.d.ts
|
|
550
|
+
type ListProps = {
|
|
551
|
+
/**
|
|
552
|
+
* A boolean value. When set to `false`, component returns `React.Fragment`
|
|
553
|
+
* When set to `true`, component returns as the **root** element `Element`
|
|
554
|
+
* component.
|
|
555
|
+
*/
|
|
556
|
+
rootElement?: boolean;
|
|
557
|
+
/**
|
|
558
|
+
* Label prop from `Element` component is being ignored.
|
|
559
|
+
*/
|
|
560
|
+
label: never;
|
|
561
|
+
/**
|
|
562
|
+
* Content prop from `Element` component is being ignored.
|
|
563
|
+
*/
|
|
564
|
+
content: never;
|
|
565
|
+
};
|
|
566
|
+
type Props$2 = MergeTypes<[Props$1, ListProps]>;
|
|
567
|
+
declare const Component$1: VLElement<Props$2>;
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region src/List/withActiveState.d.ts
|
|
570
|
+
type Key = string | number;
|
|
571
|
+
interface Props$7 {
|
|
572
|
+
type?: 'single' | 'multi';
|
|
573
|
+
activeItemRequired?: boolean;
|
|
574
|
+
activeItems?: Key | (string | number)[];
|
|
575
|
+
itemProps?: Record<string, unknown> | ((props: Record<string, unknown>) => Record<string, unknown>);
|
|
576
|
+
}
|
|
577
|
+
declare const component: SimpleHoc<Props$7>;
|
|
578
|
+
//#endregion
|
|
579
|
+
//#region src/Overlay/context.d.ts
|
|
580
|
+
interface Context {
|
|
581
|
+
blocked: boolean;
|
|
582
|
+
setBlocked: () => void;
|
|
583
|
+
setUnblocked: () => void;
|
|
584
|
+
}
|
|
585
|
+
declare const Component$3: FC<Context & {
|
|
586
|
+
children: ReactNode;
|
|
587
|
+
}>;
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region src/Overlay/useOverlay.d.ts
|
|
590
|
+
/**
|
|
591
|
+
* Core hook powering the Overlay component. Manages open/close state, DOM
|
|
592
|
+
* event listeners (click, hover, scroll, resize, ESC key), and dynamic
|
|
593
|
+
* positioning of overlay content relative to its trigger. Supports dropdown,
|
|
594
|
+
* tooltip, popover, and modal types with automatic edge-of-viewport flipping.
|
|
595
|
+
* Event handlers are throttled for performance, and nested overlay blocking
|
|
596
|
+
* is coordinated through the overlay context.
|
|
597
|
+
*/
|
|
598
|
+
type Align$1 = 'bottom' | 'top' | 'left' | 'right';
|
|
599
|
+
type AlignX$2 = 'left' | 'center' | 'right';
|
|
600
|
+
type AlignY$2 = 'bottom' | 'top' | 'center';
|
|
601
|
+
type UseOverlayProps = Partial<{
|
|
602
|
+
/**
|
|
603
|
+
* Defines default state whether **Overlay** component should be active.
|
|
604
|
+
* @defaultValue `false`
|
|
605
|
+
*/
|
|
606
|
+
isOpen: boolean;
|
|
607
|
+
/**
|
|
608
|
+
* Defines `event` when **Overlay** is supposed to be open.
|
|
609
|
+
*
|
|
610
|
+
* When `manual` is set, callbacks needs to be applied to make it working.
|
|
611
|
+
* @defaultValue `click`
|
|
612
|
+
*/
|
|
613
|
+
openOn: 'click' | 'hover' | 'manual';
|
|
614
|
+
/**
|
|
615
|
+
* Defines `event` when **Overlay** is supposed to be closed.
|
|
616
|
+
* @defaultValue `click`
|
|
617
|
+
*/
|
|
618
|
+
closeOn: 'click' | 'clickOnTrigger' | 'clickOutsideContent' | 'hover' | 'manual';
|
|
619
|
+
/**
|
|
620
|
+
* Defines what type of **Overlay** will be created. Type `modal`
|
|
621
|
+
* has different positioning calculations than others.
|
|
622
|
+
* @defaultValue `dropdown`
|
|
623
|
+
*/
|
|
624
|
+
type: 'dropdown' | 'tooltip' | 'popover' | 'modal' | 'custom';
|
|
625
|
+
/**
|
|
626
|
+
* Defines how `content` is treated regarding CSS positioning.
|
|
627
|
+
* @defaultValue `fixed`
|
|
628
|
+
*/
|
|
629
|
+
position: 'absolute' | 'fixed' | 'relative' | 'static';
|
|
630
|
+
/**
|
|
631
|
+
* Defines from which side is `content` aligned to `trigger` (top, left, bottom, right).
|
|
632
|
+
* For more specific alignment configuration can be used `alignX` and/or `alignY` prop.
|
|
633
|
+
* @defaultValue `bottom`
|
|
634
|
+
*/
|
|
635
|
+
align: Align$1;
|
|
636
|
+
/**
|
|
637
|
+
* Defines how `content` is aligned to `trigger` on axis X
|
|
638
|
+
* @defaultValue `left`
|
|
639
|
+
*/
|
|
640
|
+
alignX: AlignX$2;
|
|
641
|
+
/**
|
|
642
|
+
* Defines how `content` is aligned to `trigger` on axis Y
|
|
643
|
+
* @defaultValue `bottom`
|
|
644
|
+
*/
|
|
645
|
+
alignY: AlignY$2;
|
|
646
|
+
/**
|
|
647
|
+
* Defines `margin` from trigger on axis X.
|
|
648
|
+
* @defaultValue `0`
|
|
649
|
+
*/
|
|
650
|
+
offsetX: number;
|
|
651
|
+
/**
|
|
652
|
+
* Defines `margin` from trigger on axis Y.
|
|
653
|
+
* @defaultValue `0`
|
|
654
|
+
*/
|
|
655
|
+
offsetY: number;
|
|
656
|
+
/**
|
|
657
|
+
* Performance helper. Value defined in milliseconds for `throttling`
|
|
658
|
+
* recalculations
|
|
659
|
+
* @defaultValue `200`
|
|
660
|
+
*/
|
|
661
|
+
throttleDelay: number;
|
|
662
|
+
/**
|
|
663
|
+
* A valid HTML element. Prop can be used for ability to handle properly
|
|
664
|
+
* scrolling inside custom scrollable HTML element.
|
|
665
|
+
*/
|
|
666
|
+
parentContainer: HTMLElement | null;
|
|
667
|
+
/**
|
|
668
|
+
* Defines whether active **Overlay** is supposed to be closed on pressing
|
|
669
|
+
* `ESC` key.
|
|
670
|
+
* @defaultValue `true`
|
|
671
|
+
*/
|
|
672
|
+
closeOnEsc: boolean;
|
|
673
|
+
/**
|
|
674
|
+
* When set to `true`, **Overlay** is automatically closed and is blocked for
|
|
675
|
+
* being opened.
|
|
676
|
+
*/
|
|
677
|
+
disabled: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* A callback hook to be called when **Overlay** is being opened. Does not
|
|
680
|
+
* accept any arguments.
|
|
681
|
+
*/
|
|
682
|
+
onOpen: () => void;
|
|
683
|
+
/**
|
|
684
|
+
* A callback hook to be called when **Overlay** is being closed. Does not
|
|
685
|
+
* accept any arguments.
|
|
686
|
+
*/
|
|
687
|
+
onClose: () => void;
|
|
688
|
+
}>;
|
|
689
|
+
declare const useOverlay: ({
|
|
690
|
+
isOpen,
|
|
691
|
+
openOn,
|
|
692
|
+
closeOn,
|
|
693
|
+
type,
|
|
694
|
+
position,
|
|
695
|
+
align,
|
|
696
|
+
alignX,
|
|
697
|
+
alignY,
|
|
698
|
+
offsetX,
|
|
699
|
+
offsetY,
|
|
700
|
+
throttleDelay,
|
|
701
|
+
parentContainer,
|
|
702
|
+
closeOnEsc,
|
|
703
|
+
disabled,
|
|
704
|
+
onOpen,
|
|
705
|
+
onClose
|
|
706
|
+
}?: Partial<UseOverlayProps>) => {
|
|
707
|
+
triggerRef: react0.RefObject<HTMLElement | null>;
|
|
708
|
+
contentRef: (node: HTMLElement) => void;
|
|
709
|
+
active: boolean;
|
|
710
|
+
align: Align$1;
|
|
711
|
+
alignX: "left" | "right" | "center";
|
|
712
|
+
alignY: "bottom" | "top" | "center";
|
|
713
|
+
showContent: () => void;
|
|
714
|
+
hideContent: () => void;
|
|
715
|
+
blocked: boolean;
|
|
716
|
+
setBlocked: () => void;
|
|
717
|
+
setUnblocked: () => void;
|
|
718
|
+
Provider: react0.FC<Context & {
|
|
719
|
+
children: react0.ReactNode;
|
|
720
|
+
}>;
|
|
721
|
+
};
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region src/Overlay/component.d.ts
|
|
724
|
+
type Align = 'bottom' | 'top' | 'left' | 'right';
|
|
725
|
+
type AlignX$1 = 'left' | 'center' | 'right';
|
|
726
|
+
type AlignY$1 = 'bottom' | 'top' | 'center';
|
|
727
|
+
type TriggerRenderer = (props: Partial<{
|
|
728
|
+
active: boolean;
|
|
729
|
+
showContent: () => void;
|
|
730
|
+
hideContent: () => void;
|
|
731
|
+
}>) => ReactNode;
|
|
732
|
+
type ContentRenderer = (props: Partial<{
|
|
733
|
+
active: boolean;
|
|
734
|
+
showContent: () => void;
|
|
735
|
+
hideContent: () => void;
|
|
736
|
+
align: Align;
|
|
737
|
+
alignX: AlignX$1;
|
|
738
|
+
alignY: AlignY$1;
|
|
739
|
+
}>) => ReactNode;
|
|
740
|
+
type Props$3 = {
|
|
741
|
+
/**
|
|
742
|
+
* Children to be rendered within **Overlay** component when Overlay is active.
|
|
743
|
+
*/
|
|
744
|
+
children: ContentRenderer | Content;
|
|
745
|
+
/**
|
|
746
|
+
* React component to be used as a trigger (e.g. `Button` for opening
|
|
747
|
+
* dropdowns). Component must acept accept `ref` or any other prop name
|
|
748
|
+
* defined in `triggerRefName` prop.
|
|
749
|
+
*/
|
|
750
|
+
trigger: TriggerRenderer | Content;
|
|
751
|
+
/**
|
|
752
|
+
* Defines a HTML DOM where children to be appended. Component uses JavaScript
|
|
753
|
+
* [`Node.appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)
|
|
754
|
+
*
|
|
755
|
+
* For more information follow [Portal](https://vitus-labs.com/docs/ui-system/elements/portal)
|
|
756
|
+
* component.
|
|
757
|
+
*/
|
|
758
|
+
DOMLocation?: HTMLElement;
|
|
759
|
+
/**
|
|
760
|
+
* Defines a prop name to be used for passing `ref` for **trigger**. By default,
|
|
761
|
+
* the value is `ref`.
|
|
762
|
+
*/
|
|
763
|
+
triggerRefName?: string;
|
|
764
|
+
/**
|
|
765
|
+
* Defines a prop name to be used for passing `ref` for **content** (passed `children`).
|
|
766
|
+
* By default, the value is `ref`.
|
|
767
|
+
*/
|
|
768
|
+
contentRefName?: string;
|
|
769
|
+
} & UseOverlayProps;
|
|
770
|
+
declare const Component$2: VLComponent<Props$3>;
|
|
771
|
+
//#endregion
|
|
772
|
+
//#region src/Portal/component.d.ts
|
|
773
|
+
interface Props$4 {
|
|
774
|
+
/**
|
|
775
|
+
* Defines a HTML DOM where children to be appended. Component uses JavaScript
|
|
776
|
+
* [`Node.appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)
|
|
777
|
+
*/
|
|
778
|
+
DOMLocation?: HTMLElement;
|
|
779
|
+
/**
|
|
780
|
+
* Children to be rendered within **Portal** component.
|
|
781
|
+
*/
|
|
782
|
+
children: ReactNode;
|
|
783
|
+
/**
|
|
784
|
+
* Valid HTML Tag
|
|
785
|
+
*/
|
|
786
|
+
tag?: string;
|
|
787
|
+
}
|
|
788
|
+
declare const Component$4: VLComponent<Props$4>;
|
|
789
|
+
//#endregion
|
|
790
|
+
//#region src/Text/component.d.ts
|
|
791
|
+
type Props$5 = Partial<{
|
|
792
|
+
/**
|
|
793
|
+
* Label can be used instead of children for inline syntax. But **children** prop takes a precedence
|
|
794
|
+
*/
|
|
795
|
+
label: ReactNode;
|
|
796
|
+
/**
|
|
797
|
+
* Children to be rendered within **Text** component.
|
|
798
|
+
*/
|
|
799
|
+
children: ReactNode;
|
|
800
|
+
/**
|
|
801
|
+
* Defines whether should behave as a block text element. Automatically adds **p** HTML tag
|
|
802
|
+
*/
|
|
803
|
+
paragraph: boolean;
|
|
804
|
+
/**
|
|
805
|
+
* Defines what kind of HTML tag should be rendered
|
|
806
|
+
*/
|
|
807
|
+
tag: HTMLTextTags;
|
|
808
|
+
/**
|
|
809
|
+
* If an additional styling needs to be added, it can be do so via injecting styles using this property.
|
|
810
|
+
*/
|
|
811
|
+
css: ExtendCss;
|
|
812
|
+
}>;
|
|
813
|
+
declare const Component$5: VLForwardedComponent<Props$5> & {
|
|
814
|
+
isText?: true;
|
|
815
|
+
};
|
|
816
|
+
//#endregion
|
|
817
|
+
//#region src/Util/component.d.ts
|
|
818
|
+
interface Props$6 {
|
|
819
|
+
/**
|
|
820
|
+
* Children to be rendered within **Util** component.
|
|
821
|
+
*/
|
|
822
|
+
children: ReactNode;
|
|
823
|
+
/**
|
|
824
|
+
* Class name(s) to be added to children component.
|
|
825
|
+
*/
|
|
826
|
+
className?: string | string[];
|
|
827
|
+
/**
|
|
828
|
+
* Style property to extend children component inline styles
|
|
829
|
+
*/
|
|
830
|
+
style?: Record<string, unknown>;
|
|
831
|
+
}
|
|
832
|
+
declare const Component$6: VLComponent<Props$6>;
|
|
833
|
+
//#endregion
|
|
834
|
+
export { type AlignX, type AlignY, type Content, type ContentBoolean, type Direction, Component as Element, type Props as ElementProps, type ElementType, type ExtendCss, type ExtendedProps, type InnerRef, type Props$1 as IteratorProps, Component$1 as List, type Props$2 as ListProps, type ObjectValue, Component$2 as Overlay, type Props$3 as OverlayProps, Component$3 as OverlayProvider, Component$4 as Portal, type Props$4 as PortalProps, type PropsCallback, Provider, type Responsive, type ResponsiveBoolType, Component$5 as Text, type Props$5 as TextProps, type UseOverlayProps, Component$6 as Util, type Props$6 as UtilProps, type VLStatic, useOverlay, component as withActiveState, withEqualBeforeAfter as withEqualSizeBeforeAfter };
|
|
835
|
+
//# sourceMappingURL=index.d.d.ts.map
|