@choice-ui/react 1.6.1 → 1.6.3

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 (32) hide show
  1. package/dist/components/dialog/dist/index.d.ts +2 -1
  2. package/dist/components/dialog/dist/index.js +5 -1
  3. package/dist/components/dialog/src/dialog.d.ts +2 -1
  4. package/dist/components/dialog/src/dialog.js +5 -1
  5. package/dist/components/list/dist/index.d.ts +8 -3
  6. package/dist/components/list/src/components/list-content.d.ts +3 -2
  7. package/dist/components/list/src/components/list-content.js +2 -2
  8. package/dist/components/list/src/components/list-item.d.ts +3 -0
  9. package/dist/components/list/src/list.d.ts +2 -1
  10. package/dist/components/list/src/list.js +4 -2
  11. package/dist/components/md-render/dist/index.js +1 -1
  12. package/dist/components/md-render/src/tv.js +1 -1
  13. package/dist/components/modal/dist/index.d.ts +2 -1
  14. package/dist/components/modal/dist/index.js +2 -2
  15. package/dist/components/modal/src/modal.d.ts +2 -1
  16. package/dist/components/modal/src/modal.js +2 -2
  17. package/dist/components/popover/dist/index.d.ts +11 -10
  18. package/dist/components/popover/dist/index.js +5 -1
  19. package/dist/components/popover/src/popover.d.ts +2 -1
  20. package/dist/components/popover/src/popover.js +5 -1
  21. package/dist/components/scroll-area/dist/index.d.ts +6 -1
  22. package/dist/components/scroll-area/dist/index.js +2 -2
  23. package/dist/components/scroll-area/src/components/scroll-area-content.d.ts +4 -1
  24. package/dist/components/scroll-area/src/components/scroll-area-content.js +2 -2
  25. package/dist/components/scroll-area/src/scroll-area.d.ts +1 -1
  26. package/dist/components/virtual-select/dist/index.d.ts +48 -0
  27. package/dist/styles/components.css +220 -193
  28. package/dist/styles/markdown.css +362 -360
  29. package/package.json +1 -1
  30. package/dist/styles/preflight.css +0 -97
  31. package/dist/styles/stories.css +0 -5
  32. package/dist/styles/theme.css +0 -597
@@ -1,22 +1,156 @@
1
+ @theme {
2
+ --sash-size: 8px;
3
+ --sash-hover-size: 4px;
4
+ --focus-border: var(--color-accent-background);
5
+ --sash-hover-transition-duration: 0.1s;
6
+ --separator-border: var(--color-default-boundary);
7
+
8
+ --shadow-border-white: 0 0 0 1px var(--color-white);
9
+ --shadow-border-white-inset: inset 0 0 0 1px var(--color-white);
10
+
11
+ --shadow-range-thumb:
12
+ 0 0 0 2px rgb(255 255 255), 0 1px 4px 2px rgba(0 0 0 / 0.1), 0 4px 8px 2px rgba(0 0 0 / 0.1),
13
+ 0 0 1px 2px rgba(0 0 0 / 0.3);
14
+
15
+ --shadow-checked-focused:
16
+ inset 0 0 0 1px var(--color-default-background), inset 0 0 0 8px var(--color-accent-background);
17
+
18
+ --shadow-switch-focused:
19
+ inset 0 0 0 1px var(--color-default-background), inset 0 0 0 8px var(--color-default-foreground);
20
+
21
+ --animate-spinner-spin-shape1: spinner-spin-shape1 2s linear 0s infinite normal;
22
+ --animate-spinner-spin-shape2: spinner-spin-shape2 2s linear 0s infinite normal;
23
+ --animate-spinner-spin-shape3: spinner-spin-shape3 2s linear 0s infinite normal;
24
+ --animate-spinner-spin-shape4: spinner-spin-shape4 2s linear 0s infinite normal;
25
+ --animate-spinner-bounce-left: spinner-bounce-left 0.5s infinite alternate ease;
26
+ --animate-spinner-bounce-right: spinner-bounce-right 0.5s infinite alternate ease;
27
+ --animate-indeterminate-bar: indeterminate-bar 1.5s cubic-bezier(0.65, 0.815, 0.735, 0.395)
28
+ infinite normal none running;
29
+ }
30
+
31
+ /* Base styles */
1
32
  @layer components {
2
- .skeleton {
3
- transition: all 0.2s ease-in-out !important;
4
- outline: none !important;
5
- box-shadow: none !important;
6
- border-color: transparent !important;
7
- border-radius: var(--radius-md);
8
- background-color: var(--color-secondary-background) !important;
9
- resize: none !important;
10
- pointer-events: none !important;
11
- color: transparent !important;
12
- &::placeholder,
13
- &:placeholder-shown {
14
- color: transparent !important;
33
+ .scrollbar-hide {
34
+ /* IE and Edge */
35
+ -ms-overflow-style: none;
36
+ /* Firefox */
37
+ scrollbar-width: none;
38
+ /* Safari and Chrome */
39
+ &::-webkit-scrollbar {
40
+ display: none;
15
41
  }
16
- & * {
17
- visibility: hidden !important;
42
+ }
43
+
44
+ .press-move-cursor {
45
+ position: fixed;
46
+ top: 0;
47
+ left: 0;
48
+ z-index: 10000001;
49
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='24' fill='none'%3E%3Cg filter='url(%23a)'%3E%3Cpath fill='%23fff' d='M5.41 12 9 8.41V11h16V8.42L28.58 12 25 15.59V13H9v2.59L5.41 12ZM4 12l6 6v-4h14v4l6-6-6-6v4H10V6l-6 6Z'/%3E%3Cpath fill='%23202125' d='M12.5 13h12.52v2.59L28.58 12l-3.56-3.58v2.6H9v-2.6L5.41 12 9 15.59V13h3.5Z'/%3E%3C/g%3E%3Cdefs%3E%3Cfilter id='a' width='29.6' height='15.6' x='2.2' y='5.2' color-interpolation-filters='sRGB' filterUnits='userSpaceOnUse'%3E%3CfeFlood flood-opacity='0' result='BackgroundImageFix'/%3E%3CfeColorMatrix in='SourceAlpha' result='hardAlpha' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0'/%3E%3CfeOffset dy='1'/%3E%3CfeGaussianBlur stdDeviation='.9'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.65 0'/%3E%3CfeBlend in2='BackgroundImageFix' result='effect1_dropShadow_504_477'/%3E%3CfeBlend in='SourceGraphic' in2='effect1_dropShadow_504_477' result='shape'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E");
50
+ background-size: contain;
51
+ background-repeat: no-repeat;
52
+ width: 34px;
53
+ height: 24px;
54
+ pointer-events: none;
55
+ }
56
+ }
57
+
58
+ /* Animations */
59
+ @layer components {
60
+ @keyframes spinner-spin-shape1 {
61
+ 0% {
62
+ transform: translate(0, 0);
63
+ }
64
+ 25% {
65
+ transform: translate(0, var(--bounce));
66
+ }
67
+ 50% {
68
+ transform: translate(var(--bounce), var(--bounce));
69
+ }
70
+ 75% {
71
+ transform: translate(var(--bounce), 0);
72
+ }
73
+ }
74
+ @keyframes spinner-spin-shape2 {
75
+ 0% {
76
+ transform: translate(0, 0);
77
+ }
78
+ 25% {
79
+ transform: translate(calc(var(--bounce) * -1), 0);
80
+ }
81
+ 50% {
82
+ transform: translate(calc(var(--bounce) * -1), var(--bounce));
83
+ }
84
+ 75% {
85
+ transform: translate(0, var(--bounce));
86
+ }
87
+ }
88
+ @keyframes spinner-spin-shape3 {
89
+ 0% {
90
+ transform: translate(0, 0);
91
+ }
92
+ 25% {
93
+ transform: translate(var(--bounce), 0);
94
+ }
95
+ 50% {
96
+ transform: translate(var(--bounce), calc(var(--bounce) * -1));
97
+ }
98
+ 75% {
99
+ transform: translate(0, calc(var(--bounce) * -1));
100
+ }
101
+ }
102
+ @keyframes spinner-spin-shape4 {
103
+ 0% {
104
+ transform: translate(0, 0);
105
+ }
106
+ 25% {
107
+ transform: translate(0, calc(var(--bounce) * -1));
108
+ }
109
+ 50% {
110
+ transform: translate(calc(var(--bounce) * -1), calc(var(--bounce) * -1));
111
+ }
112
+ 75% {
113
+ transform: translate(calc(var(--bounce) * -1), 0);
18
114
  }
19
115
  }
116
+
117
+ @keyframes spinner-bounce-left {
118
+ 0% {
119
+ transform: translate3d(0, 0, 0) scale(1);
120
+ }
121
+ 25% {
122
+ background-color: currentColor;
123
+ }
124
+ 100% {
125
+ transform: translate3d(calc(var(--shape) / -1), 0, 0) scale(0.64);
126
+ background-color: transparent;
127
+ }
128
+ }
129
+ @keyframes spinner-bounce-right {
130
+ 0% {
131
+ transform: translate3d(0, 0, 0) scale(1);
132
+ }
133
+ 25% {
134
+ background-color: currentColor;
135
+ }
136
+ 100% {
137
+ transform: translate3d(var(--shape), 0, 0) scale(0.64);
138
+ background-color: transparent;
139
+ }
140
+ }
141
+
142
+ @keyframes indeterminate-bar {
143
+ 0% {
144
+ transform: translateX(-50%) scaleX(0.2);
145
+ }
146
+ 100% {
147
+ transform: translateX(100%) scaleX(1);
148
+ }
149
+ }
150
+ }
151
+
152
+ /* Allotment styles */
153
+ @layer components {
20
154
  .allotment-module_splitView__L-yRc {
21
155
  position: relative;
22
156
  width: 100%;
@@ -228,31 +362,8 @@
228
362
  }
229
363
  }
230
364
 
365
+ /* Panel row styles */
231
366
  @layer components {
232
- .scrollbar-hide {
233
- /* IE and Edge */
234
- -ms-overflow-style: none;
235
- /* Firefox */
236
- scrollbar-width: none;
237
- /* Safari and Chrome */
238
- &::-webkit-scrollbar {
239
- display: none;
240
- }
241
- }
242
-
243
- .press-move-cursor {
244
- position: fixed;
245
- top: 0;
246
- left: 0;
247
- z-index: 10000001;
248
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='24' fill='none'%3E%3Cg filter='url(%23a)'%3E%3Cpath fill='%23fff' d='M5.41 12 9 8.41V11h16V8.42L28.58 12 25 15.59V13H9v2.59L5.41 12ZM4 12l6 6v-4h14v4l6-6-6-6v4H10V6l-6 6Z'/%3E%3Cpath fill='%23202125' d='M12.5 13h12.52v2.59L28.58 12l-3.56-3.58v2.6H9v-2.6L5.41 12 9 15.59V13h3.5Z'/%3E%3C/g%3E%3Cdefs%3E%3Cfilter id='a' width='29.6' height='15.6' x='2.2' y='5.2' color-interpolation-filters='sRGB' filterUnits='userSpaceOnUse'%3E%3CfeFlood flood-opacity='0' result='BackgroundImageFix'/%3E%3CfeColorMatrix in='SourceAlpha' result='hardAlpha' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0'/%3E%3CfeOffset dy='1'/%3E%3CfeGaussianBlur stdDeviation='.9'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.65 0'/%3E%3CfeBlend in2='BackgroundImageFix' result='effect1_dropShadow_504_477'/%3E%3CfeBlend in='SourceGraphic' in2='effect1_dropShadow_504_477' result='shape'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E");
249
- background-size: contain;
250
- background-repeat: no-repeat;
251
- width: 34px;
252
- height: 24px;
253
- pointer-events: none;
254
- }
255
-
256
367
  .properties-panel {
257
368
  @apply relative flex min-w-0 flex-col;
258
369
  &:not(:last-child) {
@@ -341,42 +452,10 @@
341
452
  grid-template-columns: 1fr 1fr 1.5rem;
342
453
  grid-template-areas: "label-1 label-2 ." "input-1 input-3 icon-1" "input-2 input-3 icon-2";
343
454
  }
455
+ }
344
456
 
345
- .fields__text-field {
346
- grid-template-columns: auto 1fr auto;
347
- grid-template-areas: "prefix input suffix";
348
- &::before {
349
- @apply pointer-events-none z-2 h-full border transform-3d;
350
- grid-row: 1 / 2;
351
- grid-column: 1 / 4;
352
- border-radius: inherit;
353
- content: "";
354
- }
355
- }
356
-
357
- .input__number {
358
- grid-template-rows: 1.5rem;
359
- grid-template-columns: auto auto 1fr auto auto;
360
- grid-template-areas: "prefix-handler variable input action suffix-handler";
361
- &::before {
362
- @apply pointer-events-none z-3 h-6 rounded-md border;
363
- grid-row: 1 / 2;
364
- grid-column: 1 / 6;
365
- content: "";
366
- }
367
- }
368
-
369
- .input-search {
370
- @apply relative grid;
371
- grid-template-columns: 1.5rem 1fr auto;
372
- grid-template-areas: "icon input action";
373
- &::before {
374
- @apply pointer-events-none z-2 h-full rounded-md border border-transparent;
375
- grid-row: 1 / 2;
376
- grid-column: 1 / 4;
377
- }
378
- }
379
-
457
+ /* Condition styles */
458
+ @layer components {
380
459
  .condition__group {
381
460
  grid-template-rows: repeat(auto-fill, minmax(0, 1fr));
382
461
  grid-template-columns: 1fr 1.5rem;
@@ -402,7 +481,10 @@
402
481
  bottom: 2.25rem;
403
482
  }
404
483
  }
484
+ }
405
485
 
486
+ /* Tree list styles */
487
+ @layer components {
406
488
  .tree-list {
407
489
  &[data-has-horizontal-scroll="true"] {
408
490
  & .tree-list_node::after {
@@ -422,7 +504,32 @@
422
504
  width: var(--tree-node-width);
423
505
  height: var(--tree-list-height);
424
506
  }
507
+ }
425
508
 
509
+ /* Skeleton styles */
510
+ @layer components {
511
+ .skeleton {
512
+ transition: all 0.2s ease-in-out !important;
513
+ outline: none !important;
514
+ box-shadow: none !important;
515
+ border-color: transparent !important;
516
+ border-radius: var(--radius-md);
517
+ background-color: var(--color-secondary-background) !important;
518
+ resize: none !important;
519
+ pointer-events: none !important;
520
+ color: transparent !important;
521
+ &::placeholder,
522
+ &:placeholder-shown {
523
+ color: transparent !important;
524
+ }
525
+ & * {
526
+ visibility: hidden !important;
527
+ }
528
+ }
529
+ }
530
+
531
+ /* Comments styles */
532
+ @layer components {
426
533
  .comments__input {
427
534
  grid-template-columns: calc(var(--spacing) * 6) 1fr;
428
535
  }
@@ -434,135 +541,55 @@
434
541
  grid-template-areas: "avatar meta action" ". content reaction" ". reactions .";
435
542
  column-gap: calc(var(--spacing) * 2);
436
543
  }
544
+ }
437
545
 
438
- .modal__header {
439
- @apply grid;
440
- grid-template-rows: minmax(2.5rem, auto);
441
- grid-template-areas: "title . close" "input input input";
442
- }
443
-
444
- .modal__header--action {
445
- grid-template-columns: auto 1fr 2.5rem;
446
- }
447
-
448
- @keyframes spinner-spin-shape1 {
449
- 0% {
450
- transform: translate(0, 0);
451
- }
452
- 25% {
453
- transform: translate(0, var(--bounce));
454
- }
455
- 50% {
456
- transform: translate(var(--bounce), var(--bounce));
457
- }
458
- 75% {
459
- transform: translate(var(--bounce), 0);
460
- }
461
- }
462
- @keyframes spinner-spin-shape2 {
463
- 0% {
464
- transform: translate(0, 0);
465
- }
466
- 25% {
467
- transform: translate(calc(var(--bounce) * -1), 0);
468
- }
469
- 50% {
470
- transform: translate(calc(var(--bounce) * -1), var(--bounce));
471
- }
472
- 75% {
473
- transform: translate(0, var(--bounce));
474
- }
475
- }
476
- @keyframes spinner-spin-shape3 {
477
- 0% {
478
- transform: translate(0, 0);
479
- }
480
- 25% {
481
- transform: translate(var(--bounce), 0);
482
- }
483
- 50% {
484
- transform: translate(var(--bounce), calc(var(--bounce) * -1));
485
- }
486
- 75% {
487
- transform: translate(0, calc(var(--bounce) * -1));
488
- }
489
- }
490
- @keyframes spinner-spin-shape4 {
491
- 0% {
492
- transform: translate(0, 0);
493
- }
494
- 25% {
495
- transform: translate(0, calc(var(--bounce) * -1));
496
- }
497
- 50% {
498
- transform: translate(calc(var(--bounce) * -1), calc(var(--bounce) * -1));
499
- }
500
- 75% {
501
- transform: translate(calc(var(--bounce) * -1), 0);
546
+ /* Fields styles */
547
+ @layer components {
548
+ .fields__text-field {
549
+ grid-template-columns: auto 1fr auto;
550
+ grid-template-areas: "prefix input suffix";
551
+ &::before {
552
+ @apply pointer-events-none z-2 h-full border transform-3d;
553
+ grid-row: 1 / 2;
554
+ grid-column: 1 / 4;
555
+ border-radius: inherit;
556
+ content: "";
502
557
  }
503
558
  }
504
559
 
505
- @keyframes spinner-bounce-left {
506
- 0% {
507
- transform: translate3d(0, 0, 0) scale(1);
508
- }
509
- 25% {
510
- background-color: currentColor;
511
- }
512
- 100% {
513
- transform: translate3d(calc(var(--shape) / -1), 0, 0) scale(0.64);
514
- background-color: transparent;
515
- }
516
- }
517
- @keyframes spinner-bounce-right {
518
- 0% {
519
- transform: translate3d(0, 0, 0) scale(1);
520
- }
521
- 25% {
522
- background-color: currentColor;
523
- }
524
- 100% {
525
- transform: translate3d(var(--shape), 0, 0) scale(0.64);
526
- background-color: transparent;
560
+ .input__number {
561
+ grid-template-rows: 1.5rem;
562
+ grid-template-columns: auto auto 1fr auto auto;
563
+ grid-template-areas: "prefix-handler variable input action suffix-handler";
564
+ &::before {
565
+ @apply pointer-events-none z-3 h-6 rounded-md border;
566
+ grid-row: 1 / 2;
567
+ grid-column: 1 / 6;
568
+ content: "";
527
569
  }
528
570
  }
529
571
 
530
- @keyframes indeterminate-bar {
531
- 0% {
532
- transform: translateX(-50%) scaleX(0.2);
533
- }
534
- 100% {
535
- transform: translateX(100%) scaleX(1);
572
+ .input-search {
573
+ @apply relative grid;
574
+ grid-template-columns: 1.5rem 1fr auto;
575
+ grid-template-areas: "icon input action";
576
+ &::before {
577
+ @apply pointer-events-none z-2 h-full rounded-md border border-transparent;
578
+ grid-row: 1 / 2;
579
+ grid-column: 1 / 4;
536
580
  }
537
581
  }
538
582
  }
539
583
 
540
- @theme {
541
- --sash-size: 8px;
542
- --sash-hover-size: 4px;
543
- --focus-border: var(--color-accent-background);
544
- --sash-hover-transition-duration: 0.1s;
545
- --separator-border: var(--color-default-boundary);
546
-
547
- --shadow-border-white: 0 0 0 1px var(--color-white);
548
- --shadow-border-white-inset: inset 0 0 0 1px var(--color-white);
549
-
550
- --shadow-range-thumb:
551
- 0 0 0 2px rgb(255 255 255), 0 1px 4px 2px rgba(0 0 0 / 0.1), 0 4px 8px 2px rgba(0 0 0 / 0.1),
552
- 0 0 1px 2px rgba(0 0 0 / 0.3);
553
-
554
- --shadow-checked-focused:
555
- inset 0 0 0 1px var(--color-default-background), inset 0 0 0 8px var(--color-accent-background);
556
-
557
- --shadow-switch-focused:
558
- inset 0 0 0 1px var(--color-default-background), inset 0 0 0 8px var(--color-default-foreground);
584
+ /* Modal styles */
585
+ @layer components {
586
+ .modal__header {
587
+ @apply grid;
588
+ grid-template-rows: minmax(2.5rem, auto);
589
+ grid-template-areas: "title . close" "input input input";
590
+ }
559
591
 
560
- --animate-spinner-spin-shape1: spinner-spin-shape1 2s linear 0s infinite normal;
561
- --animate-spinner-spin-shape2: spinner-spin-shape2 2s linear 0s infinite normal;
562
- --animate-spinner-spin-shape3: spinner-spin-shape3 2s linear 0s infinite normal;
563
- --animate-spinner-spin-shape4: spinner-spin-shape4 2s linear 0s infinite normal;
564
- --animate-spinner-bounce-left: spinner-bounce-left 0.5s infinite alternate ease;
565
- --animate-spinner-bounce-right: spinner-bounce-right 0.5s infinite alternate ease;
566
- --animate-indeterminate-bar: indeterminate-bar 1.5s cubic-bezier(0.65, 0.815, 0.735, 0.395)
567
- infinite normal none running;
592
+ .modal__header--action {
593
+ grid-template-columns: auto 1fr 2.5rem;
594
+ }
568
595
  }