@uxf/ui 1.0.1 → 10.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/_select-base/_select-base.js +3 -2
  2. package/chip/chip.d.ts +3 -1
  3. package/chip/chip.js +6 -5
  4. package/chip/chip.stories.js +27 -10
  5. package/chip/theme.d.ts +7 -0
  6. package/css/avatar-file-input.css +82 -0
  7. package/css/avatar.css +15 -0
  8. package/css/badge.css +23 -0
  9. package/css/button-group.css +22 -0
  10. package/css/button-list.css +61 -0
  11. package/css/button.css +335 -0
  12. package/css/calendar.css +215 -0
  13. package/css/checkbox-button.css +98 -0
  14. package/css/checkbox-input.css +24 -0
  15. package/css/checkbox.css +120 -0
  16. package/css/chip.css +591 -0
  17. package/css/color-radio-group.css +21 -0
  18. package/css/color-radio.css +33 -0
  19. package/css/component-structure-analyzer.css +31 -0
  20. package/css/date-picker.css +22 -0
  21. package/css/datetime-picker.css +11 -0
  22. package/css/dropdown.css +70 -0
  23. package/css/dropzone.css +85 -0
  24. package/css/error-message.css +3 -0
  25. package/css/file-input.css +80 -0
  26. package/css/flash-messages.css +28 -0
  27. package/css/form-component.css +7 -0
  28. package/css/icon.css +7 -0
  29. package/css/image-gallery.css +63 -0
  30. package/css/input-basic.css +18 -0
  31. package/css/input-with-popover.css +35 -0
  32. package/css/input.css +270 -0
  33. package/css/label.css +15 -0
  34. package/css/layout.css +47 -0
  35. package/css/list-item.css +29 -0
  36. package/css/loader.css +23 -0
  37. package/css/modal.css +65 -0
  38. package/css/multi-combobox.css +110 -0
  39. package/css/multi-select.css +27 -0
  40. package/css/pagination.css +93 -0
  41. package/css/paper.css +3 -0
  42. package/css/radio-group.css +169 -0
  43. package/css/radio.css +101 -0
  44. package/css/raster-image.css +20 -0
  45. package/css/select-base.css +50 -0
  46. package/css/tabs.css +131 -0
  47. package/css/text-link.css +12 -0
  48. package/css/textarea.css +124 -0
  49. package/css/time-picker.css +32 -0
  50. package/css/toggle.css +80 -0
  51. package/css/tooltip.css +7 -0
  52. package/css/typography.css +51 -0
  53. package/hooks/use-dropdown.d.ts +1 -1
  54. package/image-gallery/components/gallery.d.ts +2 -2
  55. package/image-gallery/components/gallery.js +12 -5
  56. package/image-gallery/image-gallery.d.ts +2 -0
  57. package/image-gallery/image-gallery.js +1 -1
  58. package/multi-combobox/_multi-combobox-base.js +2 -1
  59. package/multi-combobox/types.d.ts +3 -0
  60. package/multi-select/_multi-select-base.js +2 -1
  61. package/multi-select/types.d.ts +3 -2
  62. package/package.json +5 -3
  63. package/tooltip/use-tooltip.d.ts +1 -1
  64. package/tw-tokens/tw-z-index.d.ts +1 -0
  65. package/tw-tokens/tw-z-index.js +1 -0
  66. package/utils/storybook-config.js +1 -1
  67. package/utils/tailwind-config.js +1 -0
  68. package/select/theme.d.ts +0 -5
  69. package/select/theme.js +0 -2
package/css/chip.css ADDED
@@ -0,0 +1,591 @@
1
+ .uxf-chip {
2
+ @apply inline-flex items-center rounded-lg px-2 max-w-full;
3
+
4
+ &.has-button {
5
+ @apply pr-1;
6
+ }
7
+
8
+ &--size-default {
9
+ @apply text-sm h-6;
10
+
11
+ .uxf-chip__button {
12
+ @apply h-4 w-4;
13
+ }
14
+ }
15
+
16
+ &--size-small {
17
+ @apply text-xs h-5;
18
+
19
+ .uxf-chip__button {
20
+ @apply h-4 w-4;
21
+ }
22
+ }
23
+
24
+ &--size-large {
25
+ @apply text-base h-7;
26
+
27
+ .uxf-chip__button {
28
+ @apply h-4 w-4;
29
+ }
30
+ }
31
+
32
+ &__text {
33
+ @apply truncate;
34
+ }
35
+
36
+ &__button {
37
+ @apply ml-1 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded;
38
+
39
+ svg {
40
+ @apply h-2 w-2;
41
+ }
42
+ }
43
+
44
+ &--variant-default {
45
+ &.uxf-chip--color-orange {
46
+ :root .light & {
47
+ @apply text-white bg-orange-500;
48
+
49
+ .uxf-chip__button {
50
+ @apply hover:bg-orange-200;
51
+ }
52
+ }
53
+
54
+ :root .dark & {
55
+ @apply text-lightHigh bg-orange-400;
56
+
57
+ .uxf-chip__button {
58
+ @apply hover:bg-orange-800;
59
+ }
60
+ }
61
+ }
62
+
63
+ &.uxf-chip--color-red {
64
+ :root .light & {
65
+ @apply text-white bg-red-500;
66
+
67
+ .uxf-chip__button {
68
+ @apply hover:bg-red-200;
69
+ }
70
+ }
71
+
72
+ :root .dark & {
73
+ @apply text-lightHigh bg-red-400;
74
+
75
+ .uxf-chip__button {
76
+ @apply hover:bg-red-800;
77
+ }
78
+ }
79
+ }
80
+
81
+ &.uxf-chip--color-yellow {
82
+ :root .light & {
83
+ @apply text-white bg-yellow-500;
84
+
85
+ .uxf-chip__button {
86
+ @apply hover:bg-yellow-200;
87
+ }
88
+ }
89
+
90
+ :root .dark & {
91
+ @apply text-lightHigh bg-yellow-400;
92
+
93
+ .uxf-chip__button {
94
+ @apply hover:bg-yellow-800;
95
+ }
96
+ }
97
+ }
98
+
99
+ &.uxf-chip--color-pink {
100
+ :root .light & {
101
+ @apply text-white bg-pink-500;
102
+
103
+ .uxf-chip__button {
104
+ @apply hover:bg-pink-200;
105
+ }
106
+ }
107
+
108
+ :root .dark & {
109
+ @apply text-lightHigh bg-pink-400;
110
+
111
+ .uxf-chip__button {
112
+ @apply hover:bg-pink-800;
113
+ }
114
+ }
115
+ }
116
+
117
+ &.uxf-chip--color-purple {
118
+ :root .light & {
119
+ @apply text-white bg-purple-500;
120
+
121
+ .uxf-chip__button {
122
+ @apply hover:bg-purple-200;
123
+ }
124
+ }
125
+
126
+ :root .dark & {
127
+ @apply text-lightHigh bg-purple-400;
128
+
129
+ .uxf-chip__button {
130
+ @apply hover:bg-purple-800;
131
+ }
132
+ }
133
+ }
134
+
135
+ &.uxf-chip--color-indigo {
136
+ :root .light & {
137
+ @apply text-white bg-indigo-500;
138
+
139
+ .uxf-chip__button {
140
+ @apply hover:bg-indigo-200;
141
+ }
142
+ }
143
+
144
+ :root .dark & {
145
+ @apply text-lightHigh bg-indigo-400;
146
+
147
+ .uxf-chip__button {
148
+ @apply hover:bg-indigo-800;
149
+ }
150
+ }
151
+ }
152
+
153
+ &.uxf-chip--color-green {
154
+ :root .light & {
155
+ @apply text-white bg-green-500;
156
+
157
+ .uxf-chip__button {
158
+ @apply hover:bg-green-200;
159
+ }
160
+ }
161
+
162
+ :root .dark & {
163
+ @apply text-lightHigh bg-green-400;
164
+
165
+ .uxf-chip__button {
166
+ @apply hover:bg-green-800;
167
+ }
168
+ }
169
+ }
170
+
171
+ &.uxf-chip--color-blue {
172
+ :root .light & {
173
+ @apply text-white bg-blue-500;
174
+
175
+ .uxf-chip__button {
176
+ @apply hover:bg-blue-200;
177
+ }
178
+ }
179
+
180
+ :root .dark & {
181
+ @apply text-lightHigh bg-blue-400;
182
+
183
+ .uxf-chip__button {
184
+ @apply hover:bg-blue-800;
185
+ }
186
+ }
187
+ }
188
+
189
+ &.uxf-chip--color-default {
190
+ :root .light & {
191
+ @apply text-white bg-gray-500;
192
+
193
+ .uxf-chip__button {
194
+ @apply hover:bg-gray-200;
195
+ }
196
+ }
197
+
198
+ :root .dark & {
199
+ @apply text-lightHigh bg-gray-400;
200
+
201
+ .uxf-chip__button {
202
+ @apply hover:bg-gray-800;
203
+ }
204
+ }
205
+ }
206
+
207
+ &.uxf-chip--color-primary {
208
+ :root .light & {
209
+ @apply text-white bg-primary-500;
210
+
211
+ .uxf-chip__button {
212
+ @apply hover:bg-primary-200;
213
+ }
214
+ }
215
+
216
+ :root .dark & {
217
+ @apply text-lightHigh bg-primary-500;
218
+
219
+ .uxf-chip__button {
220
+ @apply hover:bg-primary-800;
221
+ }
222
+ }
223
+ }
224
+ }
225
+
226
+ &--variant-medium {
227
+ &.uxf-chip--color-orange {
228
+ :root .light & {
229
+ @apply text-orange-700 bg-orange-100;
230
+
231
+ .uxf-chip__button {
232
+ @apply hover:bg-orange-200;
233
+ }
234
+ }
235
+
236
+ :root .dark & {
237
+ @apply text-orange-100 bg-orange-700;
238
+
239
+ .uxf-chip__button {
240
+ @apply hover:bg-orange-800;
241
+ }
242
+ }
243
+ }
244
+
245
+ &.uxf-chip--color-red {
246
+ :root .light & {
247
+ @apply text-red-700 bg-red-100;
248
+
249
+ .uxf-chip__button {
250
+ @apply hover:bg-red-200;
251
+ }
252
+ }
253
+
254
+ :root .dark & {
255
+ @apply text-red-100 bg-red-700;
256
+
257
+ .uxf-chip__button {
258
+ @apply hover:bg-red-800;
259
+ }
260
+ }
261
+ }
262
+
263
+ &.uxf-chip--color-yellow {
264
+ :root .light & {
265
+ @apply text-yellow-700 bg-yellow-100;
266
+
267
+ .uxf-chip__button {
268
+ @apply hover:bg-yellow-200;
269
+ }
270
+ }
271
+
272
+ :root .dark & {
273
+ @apply text-yellow-100 bg-yellow-700;
274
+
275
+ .uxf-chip__button {
276
+ @apply hover:bg-yellow-800;
277
+ }
278
+ }
279
+ }
280
+
281
+ &.uxf-chip--color-pink {
282
+ :root .light & {
283
+ @apply text-pink-700 bg-pink-100;
284
+
285
+ .uxf-chip__button {
286
+ @apply hover:bg-pink-200;
287
+ }
288
+ }
289
+
290
+ :root .dark & {
291
+ @apply text-pink-100 bg-pink-700;
292
+
293
+ .uxf-chip__button {
294
+ @apply hover:bg-pink-800;
295
+ }
296
+ }
297
+ }
298
+
299
+ &.uxf-chip--color-purple {
300
+ :root .light & {
301
+ @apply text-purple-700 bg-purple-100;
302
+
303
+ .uxf-chip__button {
304
+ @apply hover:bg-purple-200;
305
+ }
306
+ }
307
+
308
+ :root .dark & {
309
+ @apply text-purple-100 bg-purple-700;
310
+
311
+ .uxf-chip__button {
312
+ @apply hover:bg-purple-800;
313
+ }
314
+ }
315
+ }
316
+
317
+ &.uxf-chip--color-indigo {
318
+ :root .light & {
319
+ @apply text-indigo-700 bg-indigo-100;
320
+
321
+ .uxf-chip__button {
322
+ @apply hover:bg-indigo-200;
323
+ }
324
+ }
325
+
326
+ :root .dark & {
327
+ @apply text-indigo-100 bg-indigo-700;
328
+
329
+ .uxf-chip__button {
330
+ @apply hover:bg-indigo-800;
331
+ }
332
+ }
333
+ }
334
+
335
+ &.uxf-chip--color-green {
336
+ :root .light & {
337
+ @apply text-green-700 bg-green-100;
338
+
339
+ .uxf-chip__button {
340
+ @apply hover:bg-green-200;
341
+ }
342
+ }
343
+
344
+ :root .dark & {
345
+ @apply text-green-100 bg-green-700;
346
+
347
+ .uxf-chip__button {
348
+ @apply hover:bg-green-800;
349
+ }
350
+ }
351
+ }
352
+
353
+ &.uxf-chip--color-blue {
354
+ :root .light & {
355
+ @apply text-blue-700 bg-blue-100;
356
+
357
+ .uxf-chip__button {
358
+ @apply hover:bg-blue-200;
359
+ }
360
+ }
361
+
362
+ :root .dark & {
363
+ @apply text-blue-100 bg-blue-700;
364
+
365
+ .uxf-chip__button {
366
+ @apply hover:bg-blue-800;
367
+ }
368
+ }
369
+ }
370
+
371
+ &.uxf-chip--color-default {
372
+ :root .light & {
373
+ @apply text-gray-700 bg-gray-100;
374
+
375
+ .uxf-chip__button {
376
+ @apply hover:bg-gray-200;
377
+ }
378
+ }
379
+
380
+ :root .dark & {
381
+ @apply text-gray-100 bg-gray-700;
382
+
383
+ .uxf-chip__button {
384
+ @apply hover:bg-gray-800;
385
+ }
386
+ }
387
+ }
388
+
389
+ &.uxf-chip--color-primary {
390
+ :root .light & {
391
+ @apply text-primary-700 bg-primary-100;
392
+
393
+ .uxf-chip__button {
394
+ @apply hover:bg-primary-200;
395
+ }
396
+ }
397
+
398
+ :root .dark & {
399
+ @apply text-lightHigh bg-primary-500;
400
+
401
+ .uxf-chip__button {
402
+ @apply hover:bg-primary-800;
403
+ }
404
+ }
405
+ }
406
+ }
407
+
408
+ &--variant-low {
409
+ @apply border;
410
+
411
+ &.uxf-chip--color-orange {
412
+ :root .light & {
413
+ @apply text-orange-500 border-orange-500;
414
+
415
+ .uxf-chip__button {
416
+ @apply hover:bg-orange-200;
417
+ }
418
+ }
419
+
420
+ :root .dark & {
421
+ @apply text-orange-400 border-orange-400;
422
+
423
+ .uxf-chip__button {
424
+ @apply hover:bg-orange-800;
425
+ }
426
+ }
427
+ }
428
+
429
+ &.uxf-chip--color-red {
430
+ :root .light & {
431
+ @apply text-red-500 border-red-500;
432
+
433
+ .uxf-chip__button {
434
+ @apply hover:bg-red-200;
435
+ }
436
+ }
437
+
438
+ :root .dark & {
439
+ @apply text-red-400 border-red-400;
440
+
441
+ .uxf-chip__button {
442
+ @apply hover:bg-red-800;
443
+ }
444
+ }
445
+ }
446
+
447
+ &.uxf-chip--color-yellow {
448
+ :root .light & {
449
+ @apply text-yellow-500 border-yellow-500;
450
+
451
+ .uxf-chip__button {
452
+ @apply hover:bg-yellow-200;
453
+ }
454
+ }
455
+
456
+ :root .dark & {
457
+ @apply text-yellow-400 outline-yellow-400;
458
+
459
+ .uxf-chip__button {
460
+ @apply hover:bg-yellow-800;
461
+ }
462
+ }
463
+ }
464
+
465
+ &.uxf-chip--color-pink {
466
+ :root .light & {
467
+ @apply text-pink-500 border-pink-500;
468
+
469
+ .uxf-chip__button {
470
+ @apply hover:bg-pink-200;
471
+ }
472
+ }
473
+
474
+ :root .dark & {
475
+ @apply text-pink-400 border-pink-400;
476
+
477
+ .uxf-chip__button {
478
+ @apply hover:bg-pink-800;
479
+ }
480
+ }
481
+ }
482
+
483
+ &.uxf-chip--color-purple {
484
+ :root .light & {
485
+ @apply text-purple-500 border-purple-500;
486
+
487
+ .uxf-chip__button {
488
+ @apply hover:bg-purple-200;
489
+ }
490
+ }
491
+
492
+ :root .dark & {
493
+ @apply text-purple-400 border-purple-400;
494
+
495
+ .uxf-chip__button {
496
+ @apply hover:bg-purple-800;
497
+ }
498
+ }
499
+ }
500
+
501
+ &.uxf-chip--color-indigo {
502
+ :root .light & {
503
+ @apply text-indigo-500 border-indigo-500;
504
+
505
+ .uxf-chip__button {
506
+ @apply hover:bg-indigo-200;
507
+ }
508
+ }
509
+
510
+ :root .dark & {
511
+ @apply text-indigo-400 border-indigo-400;
512
+
513
+ .uxf-chip__button {
514
+ @apply hover:bg-indigo-800;
515
+ }
516
+ }
517
+ }
518
+
519
+ &.uxf-chip--color-green {
520
+ :root .light & {
521
+ @apply text-green-500 border-green-500;
522
+
523
+ .uxf-chip__button {
524
+ @apply hover:bg-green-200;
525
+ }
526
+ }
527
+
528
+ :root .dark & {
529
+ @apply text-green-400 border-green-400;
530
+
531
+ .uxf-chip__button {
532
+ @apply hover:bg-green-800;
533
+ }
534
+ }
535
+ }
536
+
537
+ &.uxf-chip--color-blue {
538
+ :root .light & {
539
+ @apply text-blue-500 border-blue-500;
540
+
541
+ .uxf-chip__button {
542
+ @apply hover:bg-blue-200;
543
+ }
544
+ }
545
+
546
+ :root .dark & {
547
+ @apply text-blue-400 border-blue-400;
548
+
549
+ .uxf-chip__button {
550
+ @apply hover:bg-blue-800;
551
+ }
552
+ }
553
+ }
554
+
555
+ &.uxf-chip--color-default {
556
+ :root .light & {
557
+ @apply text-gray-500 border-gray-500;
558
+
559
+ .uxf-chip__button {
560
+ @apply hover:bg-gray-200;
561
+ }
562
+ }
563
+
564
+ :root .dark & {
565
+ @apply text-gray-400 border-gray-400;
566
+
567
+ .uxf-chip__button {
568
+ @apply hover:bg-gray-800;
569
+ }
570
+ }
571
+ }
572
+
573
+ &.uxf-chip--color-primary {
574
+ :root .light & {
575
+ @apply text-primary-500 border-primary-500;
576
+
577
+ .uxf-chip__button {
578
+ @apply hover:bg-primary-200;
579
+ }
580
+ }
581
+
582
+ :root .dark & {
583
+ @apply text-lightHigh bg-primary-500;
584
+
585
+ .uxf-chip__button {
586
+ @apply hover:bg-primary-800;
587
+ }
588
+ }
589
+ }
590
+ }
591
+ }
@@ -0,0 +1,21 @@
1
+ .uxf-color-radio-group {
2
+ &__option {
3
+ @apply rounded-full outline-none focus-visible:ring-offset-2 focus-visible:ring-2 is-disabled:pointer-events-none;
4
+
5
+ :root .light & {
6
+ @apply focus-visible:ring-[color:var(--option-color)] focus-visible:ring-offset-white;
7
+ }
8
+
9
+ :root .dark & {
10
+ @apply focus-visible:ring-[color:var(--option-color)] focus-visible:ring-offset-gray-900;
11
+ }
12
+ }
13
+
14
+ &__label {
15
+ @apply mb-2;
16
+ }
17
+
18
+ &__options-wrapper {
19
+ @apply flex flex-wrap gap-3.5;
20
+ }
21
+ }
@@ -0,0 +1,33 @@
1
+ .uxf-color-radio {
2
+ @apply relative shrink-0 inline-flex items-center justify-center rounded-full h-7 w-7 bg-[color:var(--bg-color)];
3
+
4
+ &__color-label {
5
+ @apply sr-only;
6
+ }
7
+
8
+ &__inner {
9
+ @apply w-4 h-4 text-white opacity-0 transition-opacity;
10
+ }
11
+
12
+ &__inner--dark {
13
+ @apply text-gray-900;
14
+ }
15
+
16
+ &.is-selected {
17
+ .uxf-color-radio__inner {
18
+ @apply opacity-100;
19
+ }
20
+ }
21
+
22
+ &.is-disabled {
23
+ @apply after:absolute after:inset-0 after:rounded-inherit pointer-events-none;
24
+
25
+ :root .light & {
26
+ @apply after:bg-white/50;
27
+ }
28
+
29
+ :root .dark & {
30
+ @apply after:bg-black/50;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,31 @@
1
+ .uxf-component-structure-analyzer {
2
+ padding-bottom: 32px;
3
+
4
+ * {
5
+ padding: 32px !important;
6
+ border: 2px solid black !important;
7
+ position: relative !important;
8
+ color: lightgray !important;
9
+ background-color: white !important;
10
+ border-radius: initial !important;
11
+ margin: 4px !important;
12
+ font-family: monospace;
13
+ font-size: 12px;
14
+ min-width: 200px;
15
+ height: auto !important;
16
+ top: initial !important;
17
+ left: initial !important;
18
+ right: initial !important;
19
+
20
+ &::before {
21
+ position: absolute;
22
+ left: 4px;
23
+ top: 2px;
24
+ content: attr(class);
25
+ font-size: 12px;
26
+ line-height: 14px;
27
+ color: black;
28
+ font-weight: 500;
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,22 @@
1
+ .uxf-date-picker {
2
+ @apply w-[296px] sm:w-[340px] mx-auto;
3
+
4
+ &__navigation {
5
+ @apply flex items-center justify-between mb-4;
6
+
7
+ &-title {
8
+ font-size: 14px;
9
+ font-weight: theme("fontWeight.medium");
10
+ text-align: center;
11
+
12
+ :root .light & {
13
+ @apply text-lightMedium is-hoverable:text-lightHigh;
14
+ }
15
+
16
+ :root .dark & {
17
+ @apply text-darkMedium is-hoverable:text-darkHigh;
18
+ }
19
+
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,11 @@
1
+ .uxf-datetime-picker {
2
+ &__tabs {
3
+ @apply mx-auto w-fit mb-4;
4
+ }
5
+
6
+ &__tab {
7
+ @apply py-0 text-body2 px-3;
8
+
9
+ height: theme("inputSize.xs");
10
+ }
11
+ }