@casinogate/ui 1.10.18 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/css/root.css +175 -0
- package/dist/assets/css/tailwind/theme.css +1 -0
- package/dist/assets/css/theme.css +4 -0
- package/dist/assets/css/tokens/primitives.css +1 -0
- package/dist/components/field/components/field.description.svelte +2 -4
- package/dist/components/field/components/field.error.svelte +9 -12
- package/dist/components/field/components/field.label.svelte +2 -4
- package/dist/components/field/components/field.root.svelte +2 -6
- package/dist/components/field/components/field.svelte.d.ts +1 -0
- package/dist/components/field/components/field.svelte.js +2 -1
- package/dist/components/field/components/index.d.ts +5 -0
- package/dist/components/field/components/index.js +5 -0
- package/dist/components/field/composed/basic/basic.svelte +40 -0
- package/dist/components/field/composed/basic/basic.svelte.d.ts +4 -0
- package/dist/components/field/composed/basic/index.d.ts +1 -0
- package/dist/components/field/composed/basic/index.js +1 -0
- package/dist/components/field/composed/index.d.ts +1 -0
- package/dist/components/field/composed/index.js +1 -0
- package/dist/components/field/field.svelte +6 -6
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/styles.d.ts +8 -49
- package/dist/components/field/styles.js +21 -15
- package/dist/components/field/types.d.ts +7 -5
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/navigation/components/index.d.ts +7 -0
- package/dist/components/navigation/components/index.js +7 -0
- package/dist/components/navigation/components/navigation.sub-trigger.svelte +2 -0
- package/dist/components/navigation/components/navigation.svelte.d.ts +4 -0
- package/dist/components/navigation/components/navigation.svelte.js +2 -0
- package/dist/components/navigation/components/navigation.trigger.svelte +2 -0
- package/dist/components/navigation/{navigation.svelte → composed/basic/basic.svelte} +11 -25
- package/dist/components/navigation/composed/basic/basic.svelte.d.ts +4 -0
- package/dist/components/navigation/composed/basic/index.d.ts +1 -0
- package/dist/components/navigation/composed/basic/index.js +1 -0
- package/dist/components/navigation/composed/index.d.ts +1 -0
- package/dist/components/navigation/composed/index.js +1 -0
- package/dist/components/navigation/index.d.ts +4 -4
- package/dist/components/navigation/index.js +3 -3
- package/dist/components/navigation/model/create-nav-collection.d.ts +3 -0
- package/dist/components/navigation/model/create-nav-collection.js +14 -0
- package/dist/components/navigation/model/index.d.ts +1 -0
- package/dist/components/navigation/model/index.js +1 -0
- package/dist/components/navigation/styles.js +8 -2
- package/dist/components/navigation/types.d.ts +4 -0
- package/dist/components/slider/components/index.d.ts +5 -0
- package/dist/components/slider/components/index.js +5 -0
- package/dist/components/slider/components/slider.range.svelte +12 -0
- package/dist/components/slider/components/slider.range.svelte.d.ts +4 -0
- package/dist/components/slider/components/slider.root.svelte +35 -0
- package/dist/components/slider/components/slider.root.svelte.d.ts +4 -0
- package/dist/components/slider/components/slider.thumb.svelte +25 -0
- package/dist/components/slider/components/slider.thumb.svelte.d.ts +4 -0
- package/dist/components/slider/components/slider.tick.svelte +24 -0
- package/dist/components/slider/components/slider.tick.svelte.d.ts +4 -0
- package/dist/components/slider/components/slider.track.svelte +32 -0
- package/dist/components/slider/components/slider.track.svelte.d.ts +4 -0
- package/dist/components/slider/components/state.svelte.d.ts +15 -0
- package/dist/components/slider/components/state.svelte.js +11 -0
- package/dist/components/slider/composed/index.d.ts +1 -0
- package/dist/components/slider/composed/index.js +1 -0
- package/dist/components/slider/composed/root/index.d.ts +1 -0
- package/dist/components/slider/composed/root/index.js +1 -0
- package/dist/components/slider/composed/root/slider.root.svelte +41 -0
- package/dist/components/slider/composed/root/slider.root.svelte.d.ts +4 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/index.js +3 -0
- package/dist/components/slider/styles.d.ts +107 -0
- package/dist/components/slider/styles.js +103 -0
- package/dist/components/slider/types.d.ts +16 -0
- package/dist/components/slider/types.js +1 -0
- package/dist/internal/constants/stories-namespace.d.ts +3 -0
- package/dist/internal/constants/stories-namespace.js +3 -0
- package/dist/internal/types/composition.d.ts +2 -2
- package/package.json +164 -9
- package/dist/components/field/exports-primitive.d.ts +0 -5
- package/dist/components/field/exports-primitive.js +0 -5
- package/dist/components/field/exports.d.ts +0 -1
- package/dist/components/field/exports.js +0 -1
- package/dist/components/navigation/exports-primitive.d.ts +0 -7
- package/dist/components/navigation/exports-primitive.js +0 -7
- package/dist/components/navigation/exports.d.ts +0 -1
- package/dist/components/navigation/exports.js +0 -1
- package/dist/components/navigation/navigation.svelte.d.ts +0 -7
package/dist/assets/css/root.css
CHANGED
|
@@ -182,6 +182,9 @@
|
|
|
182
182
|
.cgui\:pointer-events-none {
|
|
183
183
|
pointer-events: none;
|
|
184
184
|
}
|
|
185
|
+
.cgui\:invisible {
|
|
186
|
+
visibility: hidden;
|
|
187
|
+
}
|
|
185
188
|
.cgui\:absolute {
|
|
186
189
|
position: absolute;
|
|
187
190
|
}
|
|
@@ -239,6 +242,9 @@
|
|
|
239
242
|
.cgui\:z-1 {
|
|
240
243
|
z-index: 1;
|
|
241
244
|
}
|
|
245
|
+
.cgui\:z-5 {
|
|
246
|
+
z-index: 5;
|
|
247
|
+
}
|
|
242
248
|
.cgui\:\!m-0 {
|
|
243
249
|
margin: calc(var(--cgui-spacing) * 0) !important;
|
|
244
250
|
}
|
|
@@ -311,6 +317,9 @@
|
|
|
311
317
|
display: none;
|
|
312
318
|
}
|
|
313
319
|
}
|
|
320
|
+
.cgui\:block {
|
|
321
|
+
display: block;
|
|
322
|
+
}
|
|
314
323
|
.cgui\:flex {
|
|
315
324
|
display: flex;
|
|
316
325
|
}
|
|
@@ -323,6 +332,9 @@
|
|
|
323
332
|
.cgui\:inline-flex {
|
|
324
333
|
display: inline-flex;
|
|
325
334
|
}
|
|
335
|
+
.cgui\:aspect-square {
|
|
336
|
+
aspect-ratio: 1 / 1;
|
|
337
|
+
}
|
|
326
338
|
.cgui\:size-1\/2 {
|
|
327
339
|
width: calc(1 / 2 * 100%);
|
|
328
340
|
height: calc(1 / 2 * 100%);
|
|
@@ -382,6 +394,12 @@
|
|
|
382
394
|
.cgui\:h-1\.5 {
|
|
383
395
|
height: calc(var(--cgui-spacing) * 1.5);
|
|
384
396
|
}
|
|
397
|
+
.cgui\:h-2 {
|
|
398
|
+
height: calc(var(--cgui-spacing) * 2);
|
|
399
|
+
}
|
|
400
|
+
.cgui\:h-2\.5 {
|
|
401
|
+
height: calc(var(--cgui-spacing) * 2.5);
|
|
402
|
+
}
|
|
385
403
|
.cgui\:h-3 {
|
|
386
404
|
height: calc(var(--cgui-spacing) * 3);
|
|
387
405
|
}
|
|
@@ -436,6 +454,9 @@
|
|
|
436
454
|
.cgui\:h-34 {
|
|
437
455
|
height: calc(var(--cgui-spacing) * 34);
|
|
438
456
|
}
|
|
457
|
+
.cgui\:h-100 {
|
|
458
|
+
height: calc(var(--cgui-spacing) * 100);
|
|
459
|
+
}
|
|
439
460
|
.cgui\:h-120 {
|
|
440
461
|
height: calc(var(--cgui-spacing) * 120);
|
|
441
462
|
}
|
|
@@ -478,18 +499,27 @@
|
|
|
478
499
|
.cgui\:min-h-11 {
|
|
479
500
|
min-height: calc(var(--cgui-spacing) * 11);
|
|
480
501
|
}
|
|
502
|
+
.cgui\:min-h-\[1lh\] {
|
|
503
|
+
min-height: 1lh;
|
|
504
|
+
}
|
|
481
505
|
.cgui\:w-\(--app-shell-sidebar-width\) {
|
|
482
506
|
width: var(--app-shell-sidebar-width);
|
|
483
507
|
}
|
|
484
508
|
.cgui\:w-1\.5 {
|
|
485
509
|
width: calc(var(--cgui-spacing) * 1.5);
|
|
486
510
|
}
|
|
511
|
+
.cgui\:w-2 {
|
|
512
|
+
width: calc(var(--cgui-spacing) * 2);
|
|
513
|
+
}
|
|
487
514
|
.cgui\:w-2\.5 {
|
|
488
515
|
width: calc(var(--cgui-spacing) * 2.5);
|
|
489
516
|
}
|
|
490
517
|
.cgui\:w-3 {
|
|
491
518
|
width: calc(var(--cgui-spacing) * 3);
|
|
492
519
|
}
|
|
520
|
+
.cgui\:w-3\.5 {
|
|
521
|
+
width: calc(var(--cgui-spacing) * 3.5);
|
|
522
|
+
}
|
|
493
523
|
.cgui\:w-4 {
|
|
494
524
|
width: calc(var(--cgui-spacing) * 4);
|
|
495
525
|
}
|
|
@@ -559,6 +589,9 @@
|
|
|
559
589
|
.cgui\:max-w-80 {
|
|
560
590
|
max-width: calc(var(--cgui-spacing) * 80);
|
|
561
591
|
}
|
|
592
|
+
.cgui\:max-w-84 {
|
|
593
|
+
max-width: calc(var(--cgui-spacing) * 84);
|
|
594
|
+
}
|
|
562
595
|
.cgui\:max-w-100 {
|
|
563
596
|
max-width: calc(var(--cgui-spacing) * 100);
|
|
564
597
|
}
|
|
@@ -616,6 +649,9 @@
|
|
|
616
649
|
.cgui\:grow {
|
|
617
650
|
flex-grow: 1;
|
|
618
651
|
}
|
|
652
|
+
.cgui\:basis-1\/2 {
|
|
653
|
+
flex-basis: calc(1 / 2 * 100%);
|
|
654
|
+
}
|
|
619
655
|
.cgui\:origin-\(--bits-dropdown-menu-content-transform-origin\) {
|
|
620
656
|
transform-origin: var(--bits-dropdown-menu-content-transform-origin);
|
|
621
657
|
}
|
|
@@ -742,6 +778,12 @@
|
|
|
742
778
|
margin-block-end: calc(calc(var(--cgui-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));
|
|
743
779
|
}
|
|
744
780
|
}
|
|
781
|
+
.cgui\:gap-x-3 {
|
|
782
|
+
column-gap: calc(var(--cgui-spacing) * 3);
|
|
783
|
+
}
|
|
784
|
+
.cgui\:gap-x-4 {
|
|
785
|
+
column-gap: calc(var(--cgui-spacing) * 4);
|
|
786
|
+
}
|
|
745
787
|
.cgui\:space-x-4 {
|
|
746
788
|
:where(& > :not(:last-child)) {
|
|
747
789
|
--tw-space-x-reverse: 0;
|
|
@@ -810,6 +852,14 @@
|
|
|
810
852
|
border-style: var(--tw-border-style);
|
|
811
853
|
border-width: 2px;
|
|
812
854
|
}
|
|
855
|
+
.cgui\:border-4 {
|
|
856
|
+
border-style: var(--tw-border-style);
|
|
857
|
+
border-width: 4px;
|
|
858
|
+
}
|
|
859
|
+
.cgui\:border-5 {
|
|
860
|
+
border-style: var(--tw-border-style);
|
|
861
|
+
border-width: 5px;
|
|
862
|
+
}
|
|
813
863
|
.cgui\:border-t {
|
|
814
864
|
border-top-style: var(--tw-border-style);
|
|
815
865
|
border-top-width: 1px;
|
|
@@ -847,6 +897,9 @@
|
|
|
847
897
|
.cgui\:border-stroke-error {
|
|
848
898
|
border-color: var(--cg-ui-color-stroke-error);
|
|
849
899
|
}
|
|
900
|
+
.cgui\:border-stroke-focus {
|
|
901
|
+
border-color: var(--cg-ui-color-stroke-focus);
|
|
902
|
+
}
|
|
850
903
|
.cgui\:border-stroke-primary {
|
|
851
904
|
border-color: var(--cg-ui-color-stroke-primary);
|
|
852
905
|
}
|
|
@@ -922,6 +975,12 @@
|
|
|
922
975
|
.cgui\:bg-surface-darkest {
|
|
923
976
|
background-color: var(--cg-ui-color-surface-darkest);
|
|
924
977
|
}
|
|
978
|
+
.cgui\:bg-surface-darkest\/50 {
|
|
979
|
+
background-color: var(--cg-ui-color-surface-darkest);
|
|
980
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
981
|
+
background-color: color-mix(in oklab, var(--cg-ui-color-surface-darkest) 50%, transparent);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
925
984
|
.cgui\:bg-surface-hover {
|
|
926
985
|
background-color: var(--cg-ui-color-surface-hover);
|
|
927
986
|
}
|
|
@@ -946,6 +1005,12 @@
|
|
|
946
1005
|
.cgui\:bg-surface-primary {
|
|
947
1006
|
background-color: var(--cg-ui-color-surface-primary);
|
|
948
1007
|
}
|
|
1008
|
+
.cgui\:bg-surface-primary-active {
|
|
1009
|
+
background-color: var(--cg-ui-color-surface-primary-active);
|
|
1010
|
+
}
|
|
1011
|
+
.cgui\:bg-surface-primary-light {
|
|
1012
|
+
background-color: var(--cg-ui-color-surface-primary-light);
|
|
1013
|
+
}
|
|
949
1014
|
.cgui\:bg-surface-primary-light-active {
|
|
950
1015
|
background-color: var(--cg-ui-color-surface-primary-light-active);
|
|
951
1016
|
}
|
|
@@ -1231,6 +1296,9 @@
|
|
|
1231
1296
|
.cgui\:underline {
|
|
1232
1297
|
text-decoration-line: underline;
|
|
1233
1298
|
}
|
|
1299
|
+
.cgui\:opacity-0 {
|
|
1300
|
+
opacity: 0%;
|
|
1301
|
+
}
|
|
1234
1302
|
.cgui\:opacity-50 {
|
|
1235
1303
|
opacity: 50%;
|
|
1236
1304
|
}
|
|
@@ -1258,6 +1326,10 @@
|
|
|
1258
1326
|
--tw-shadow: var(--cg-ui-shadow-select);
|
|
1259
1327
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1260
1328
|
}
|
|
1329
|
+
.cgui\:shadow-thumb {
|
|
1330
|
+
--tw-shadow: var(--cg-ui-shadow-thumb);
|
|
1331
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1332
|
+
}
|
|
1261
1333
|
.cgui\:shadow-toast {
|
|
1262
1334
|
--tw-shadow: var(--cg-ui-shadow-toast);
|
|
1263
1335
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -1293,6 +1365,11 @@
|
|
|
1293
1365
|
transition-timing-function: var(--tw-ease, var(--cgui-default-transition-timing-function));
|
|
1294
1366
|
transition-duration: var(--tw-duration, var(--cgui-default-transition-duration));
|
|
1295
1367
|
}
|
|
1368
|
+
.cgui\:transition-opacity {
|
|
1369
|
+
transition-property: opacity;
|
|
1370
|
+
transition-timing-function: var(--tw-ease, var(--cgui-default-transition-timing-function));
|
|
1371
|
+
transition-duration: var(--tw-duration, var(--cgui-default-transition-duration));
|
|
1372
|
+
}
|
|
1296
1373
|
.cgui\:transition-transform {
|
|
1297
1374
|
transition-property: transform, translate, scale, rotate;
|
|
1298
1375
|
transition-timing-function: var(--tw-ease, var(--cgui-default-transition-timing-function));
|
|
@@ -1522,6 +1599,13 @@
|
|
|
1522
1599
|
}
|
|
1523
1600
|
}
|
|
1524
1601
|
}
|
|
1602
|
+
.cgui\:hover\:text-fg-white {
|
|
1603
|
+
&:hover {
|
|
1604
|
+
@media (hover: hover) {
|
|
1605
|
+
color: var(--cg-ui-color-fg-white);
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1525
1609
|
.cgui\:hover\:text-primary-60 {
|
|
1526
1610
|
&:hover {
|
|
1527
1611
|
@media (hover: hover) {
|
|
@@ -1563,6 +1647,16 @@
|
|
|
1563
1647
|
--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
1564
1648
|
}
|
|
1565
1649
|
}
|
|
1650
|
+
.cgui\:focus-visible\:outline-hidden {
|
|
1651
|
+
&:focus-visible {
|
|
1652
|
+
--tw-outline-style: none;
|
|
1653
|
+
outline-style: none;
|
|
1654
|
+
@media (forced-colors: active) {
|
|
1655
|
+
outline: 2px solid transparent;
|
|
1656
|
+
outline-offset: 2px;
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1566
1660
|
.cgui\:active\:scale-95 {
|
|
1567
1661
|
&:active {
|
|
1568
1662
|
--tw-scale-x: 95%;
|
|
@@ -1626,6 +1720,11 @@
|
|
|
1626
1720
|
color: var(--cg-ui-color-fg-primary);
|
|
1627
1721
|
}
|
|
1628
1722
|
}
|
|
1723
|
+
.cgui\:data-active\:scale-\[0\.98\] {
|
|
1724
|
+
&[data-active] {
|
|
1725
|
+
scale: 0.98;
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1629
1728
|
.cgui\:data-highlighted\:bg-surface-lightest {
|
|
1630
1729
|
&[data-highlighted] {
|
|
1631
1730
|
background-color: var(--cg-ui-color-surface-lightest);
|
|
@@ -1636,6 +1735,16 @@
|
|
|
1636
1735
|
color: var(--cg-ui-color-fg-primary);
|
|
1637
1736
|
}
|
|
1638
1737
|
}
|
|
1738
|
+
.cgui\:data-\[active\]\:bg-surface-dark {
|
|
1739
|
+
&[data-active] {
|
|
1740
|
+
background-color: var(--cg-ui-color-surface-dark);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
.cgui\:data-\[active\]\:text-fg-white {
|
|
1744
|
+
&[data-active] {
|
|
1745
|
+
color: var(--cg-ui-color-fg-white);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1639
1748
|
.cgui\:data-\[active\=\"\"\]\:bg-surface-white {
|
|
1640
1749
|
&[data-active=""] {
|
|
1641
1750
|
background-color: var(--cg-ui-color-surface-white);
|
|
@@ -1727,11 +1836,71 @@
|
|
|
1727
1836
|
padding-inline-start: calc(var(--cgui-spacing) * 8);
|
|
1728
1837
|
}
|
|
1729
1838
|
}
|
|
1839
|
+
.cgui\:data-\[invalid\]\:visible {
|
|
1840
|
+
&[data-invalid] {
|
|
1841
|
+
visibility: visible;
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
.cgui\:data-\[invalid\]\:opacity-100 {
|
|
1845
|
+
&[data-invalid] {
|
|
1846
|
+
opacity: 100%;
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
.cgui\:data-\[orientation\=horizontal\]\:h-2 {
|
|
1850
|
+
&[data-orientation="horizontal"] {
|
|
1851
|
+
height: calc(var(--cgui-spacing) * 2);
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
.cgui\:data-\[orientation\=horizontal\]\:h-2\.5 {
|
|
1855
|
+
&[data-orientation="horizontal"] {
|
|
1856
|
+
height: calc(var(--cgui-spacing) * 2.5);
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
.cgui\:data-\[orientation\=horizontal\]\:h-3\.5 {
|
|
1860
|
+
&[data-orientation="horizontal"] {
|
|
1861
|
+
height: calc(var(--cgui-spacing) * 3.5);
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
.cgui\:data-\[orientation\=horizontal\]\:h-full {
|
|
1865
|
+
&[data-orientation="horizontal"] {
|
|
1866
|
+
height: 100%;
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
.cgui\:data-\[orientation\=horizontal\]\:w-\[1px\] {
|
|
1870
|
+
&[data-orientation="horizontal"] {
|
|
1871
|
+
width: 1px;
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
.cgui\:data-\[orientation\=vertical\]\:h-\[1px\] {
|
|
1875
|
+
&[data-orientation="vertical"] {
|
|
1876
|
+
height: 1px;
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1730
1879
|
.cgui\:data-\[orientation\=vertical\]\:h-auto {
|
|
1731
1880
|
&[data-orientation="vertical"] {
|
|
1732
1881
|
height: auto;
|
|
1733
1882
|
}
|
|
1734
1883
|
}
|
|
1884
|
+
.cgui\:data-\[orientation\=vertical\]\:w-2 {
|
|
1885
|
+
&[data-orientation="vertical"] {
|
|
1886
|
+
width: calc(var(--cgui-spacing) * 2);
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
.cgui\:data-\[orientation\=vertical\]\:w-2\.5 {
|
|
1890
|
+
&[data-orientation="vertical"] {
|
|
1891
|
+
width: calc(var(--cgui-spacing) * 2.5);
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
.cgui\:data-\[orientation\=vertical\]\:w-3\.5 {
|
|
1895
|
+
&[data-orientation="vertical"] {
|
|
1896
|
+
width: calc(var(--cgui-spacing) * 3.5);
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
.cgui\:data-\[orientation\=vertical\]\:w-full {
|
|
1900
|
+
&[data-orientation="vertical"] {
|
|
1901
|
+
width: 100%;
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1735
1904
|
.cgui\:data-\[placeholder\]\:text-fg-regular {
|
|
1736
1905
|
&[data-placeholder] {
|
|
1737
1906
|
color: var(--cg-ui-color-fg-regular);
|
|
@@ -2097,6 +2266,11 @@
|
|
|
2097
2266
|
height: calc(var(--cgui-spacing) * 4);
|
|
2098
2267
|
}
|
|
2099
2268
|
}
|
|
2269
|
+
.cgui\:\[\&_\[data-slot\=\"trigger\"\]\[data-active\]\]\:bg-transparent {
|
|
2270
|
+
& [data-slot="trigger"][data-active] {
|
|
2271
|
+
background-color: transparent;
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2100
2274
|
.cgui\:hover\:\[\&_\[data-slot\=icon\]\]\:text-icon-focus {
|
|
2101
2275
|
&:hover {
|
|
2102
2276
|
@media (hover: hover) {
|
|
@@ -2513,6 +2687,7 @@
|
|
|
2513
2687
|
--cg-ui-shadow-dropdown: var(--cg-ui-shadow-base);
|
|
2514
2688
|
--cg-ui-shadow-select: var(--cg-ui-shadow-base);
|
|
2515
2689
|
--cg-ui-shadow-dialog: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
2690
|
+
--cg-ui-shadow-thumb: 0px 1px 3px rgba(0, 0, 0, 0.4), 0px 2px 8px rgba(0, 0, 0, 0.25);
|
|
2516
2691
|
--cg-ui-fz-base: 16;
|
|
2517
2692
|
--cg-ui-fz-heading: calc(16 / var(--cg-ui-fz-base) * 1rem);
|
|
2518
2693
|
--cg-ui-lh-heading: calc(22 / var(--cg-ui-fz-base) * 1rem);
|
|
@@ -135,6 +135,7 @@
|
|
|
135
135
|
--shadow-select: var(--cg-ui-shadow-select);
|
|
136
136
|
--shadow-dialog: var(--cg-ui-shadow-dialog);
|
|
137
137
|
--shadow-dropdown: var(--cg-ui-shadow-dropdown);
|
|
138
|
+
--shadow-thumb: var(--cg-ui-shadow-thumb);
|
|
138
139
|
|
|
139
140
|
/* -------------------------------------------------------------------------
|
|
140
141
|
Typography
|
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
--cg-ui-shadow-select: var(--cg-ui-shadow-base);
|
|
63
63
|
--cg-ui-shadow-command: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
64
64
|
--cg-ui-shadow-dialog: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
65
|
+
--cg-ui-shadow-thumb:
|
|
66
|
+
rgba(0, 0, 0, 0.25) 0px 0.0625em 0.0625em, rgba(0, 0, 0, 0.25) 0px 0.125em 0.5em,
|
|
67
|
+
rgba(255, 255, 255, 0.1) 0px 0px 0px 1px inset;
|
|
65
68
|
|
|
66
69
|
/* Font sizes, Line heights */
|
|
67
70
|
--cg-ui-fz-base: 16;
|
|
@@ -311,6 +314,7 @@
|
|
|
311
314
|
--shadow-select: var(--cg-ui-shadow-select);
|
|
312
315
|
--shadow-dialog: var(--cg-ui-shadow-dialog);
|
|
313
316
|
--shadow-dropdown: var(--cg-ui-shadow-dropdown);
|
|
317
|
+
--shadow-thumb: var(--cg-ui-shadow-thumb);
|
|
314
318
|
|
|
315
319
|
/* Font sizes, Line heights */
|
|
316
320
|
--text-heading: var(--cg-ui-fz-heading);
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
--cg-ui-shadow-dropdown: var(--cg-ui-shadow-base);
|
|
77
77
|
--cg-ui-shadow-select: var(--cg-ui-shadow-base);
|
|
78
78
|
--cg-ui-shadow-dialog: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
79
|
+
--cg-ui-shadow-thumb: 0px 1px 3px rgba(0, 0, 0, 0.4), 0px 2px 8px rgba(0, 0, 0, 0.25);
|
|
79
80
|
|
|
80
81
|
/* -------------------------------------------------------------------------
|
|
81
82
|
Typography
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn, useId } from '../../../internal/utils/common.js';
|
|
3
3
|
|
|
4
4
|
import { box, mergeProps } from 'svelte-toolbelt';
|
|
5
|
-
import {
|
|
5
|
+
import { fieldDescriptionVariants } from '../styles.js';
|
|
6
6
|
import type { FieldDescriptionProps } from '../types.js';
|
|
7
7
|
import { FieldDescriptionState } from './field.svelte.js';
|
|
8
8
|
|
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
...restProps
|
|
18
18
|
}: FieldDescriptionProps = $props();
|
|
19
19
|
|
|
20
|
-
const styles = FieldStylesContext.get();
|
|
21
|
-
|
|
22
20
|
const descriptionState = FieldDescriptionState.create({
|
|
23
21
|
ref: box.with(
|
|
24
22
|
() => ref,
|
|
@@ -28,7 +26,7 @@
|
|
|
28
26
|
});
|
|
29
27
|
|
|
30
28
|
const mergedProps = $derived(
|
|
31
|
-
mergeProps(restProps, descriptionState.props, { class: cn(
|
|
29
|
+
mergeProps(restProps, descriptionState.props, { class: cn(fieldDescriptionVariants({}), className) })
|
|
32
30
|
);
|
|
33
31
|
</script>
|
|
34
32
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { cn, useId } from '../../../internal/utils/common.js';
|
|
3
|
-
import { FieldStylesContext } from '../styles.js';
|
|
4
3
|
import type { FieldErrorProps } from '../types.js';
|
|
5
4
|
import { FieldErrorState } from './field.svelte.js';
|
|
6
5
|
|
|
6
|
+
import { fieldErrorVariants } from '../styles.js';
|
|
7
|
+
|
|
7
8
|
import { box, mergeProps } from 'svelte-toolbelt';
|
|
8
9
|
|
|
9
10
|
const uid = $props.id();
|
|
@@ -17,8 +18,6 @@
|
|
|
17
18
|
...restProps
|
|
18
19
|
}: FieldErrorProps = $props();
|
|
19
20
|
|
|
20
|
-
const styles = FieldStylesContext.get();
|
|
21
|
-
|
|
22
21
|
const errorState = FieldErrorState.create({
|
|
23
22
|
ref: box.with(
|
|
24
23
|
() => ref,
|
|
@@ -28,16 +27,14 @@
|
|
|
28
27
|
});
|
|
29
28
|
|
|
30
29
|
const mergedProps = $derived(
|
|
31
|
-
mergeProps(restProps, errorState.props, { class: cn(
|
|
30
|
+
mergeProps(restProps, errorState.props, { class: cn(fieldErrorVariants({}), className) })
|
|
32
31
|
);
|
|
33
32
|
</script>
|
|
34
33
|
|
|
35
|
-
{#if
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</span>
|
|
42
|
-
{/if}
|
|
34
|
+
{#if child}
|
|
35
|
+
{@render child({ props: mergedProps })}
|
|
36
|
+
{:else}
|
|
37
|
+
<span {...mergedProps}>
|
|
38
|
+
{@render children?.()}
|
|
39
|
+
</span>
|
|
43
40
|
{/if}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { FieldLabelProps } from '../types.js';
|
|
3
3
|
import { FieldLabelState } from './field.svelte.js';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { fieldLabelVariants } from '../styles.js';
|
|
6
6
|
|
|
7
7
|
import { cn, useId } from '../../../internal/utils/common.js';
|
|
8
8
|
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
...restProps
|
|
20
20
|
}: FieldLabelProps = $props();
|
|
21
21
|
|
|
22
|
-
const styles = FieldStylesContext.get();
|
|
23
|
-
|
|
24
22
|
const labelState = FieldLabelState.create({
|
|
25
23
|
ref: box.with(
|
|
26
24
|
() => ref,
|
|
@@ -30,7 +28,7 @@
|
|
|
30
28
|
});
|
|
31
29
|
|
|
32
30
|
const mergedProps = $derived(
|
|
33
|
-
mergeProps(restProps, labelState.props, { class: cn(
|
|
31
|
+
mergeProps(restProps, labelState.props, { class: cn(fieldLabelVariants({}), className) })
|
|
34
32
|
);
|
|
35
33
|
</script>
|
|
36
34
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { cn, useId } from '../../../internal/utils/common.js';
|
|
3
3
|
import { box, mergeProps } from 'svelte-toolbelt';
|
|
4
|
-
import {
|
|
4
|
+
import { fieldRootVariants } from '../styles.js';
|
|
5
5
|
import type { FieldRootProps } from '../types.js';
|
|
6
6
|
import { FieldRootState } from './field.svelte.js';
|
|
7
7
|
|
|
@@ -32,11 +32,7 @@
|
|
|
32
32
|
required: box.with(() => required),
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
FieldStylesContext.set(box.with(() => variants));
|
|
38
|
-
|
|
39
|
-
const mergedProps = $derived(mergeProps(restProps, rootState.props, { class: cn(variants.root(), className) }));
|
|
35
|
+
const mergedProps = $derived(mergeProps(restProps, rootState.props, { class: cn(fieldRootVariants({}), className) }));
|
|
40
36
|
|
|
41
37
|
const attrStates = $derived({
|
|
42
38
|
invalid: rootState.opts.invalid.current,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
|
|
2
|
-
import { getDataActive, getDataDisabled } from '../../../internal/utils/attrs.js';
|
|
2
|
+
import { boolAttr, getDataActive, getDataDisabled } from '../../../internal/utils/attrs.js';
|
|
3
3
|
import { Context } from 'runed';
|
|
4
4
|
import { untrack } from 'svelte';
|
|
5
5
|
import { attachRef } from 'svelte-toolbelt';
|
|
@@ -81,6 +81,7 @@ export class FieldErrorState {
|
|
|
81
81
|
}
|
|
82
82
|
props = $derived.by(() => ({
|
|
83
83
|
id: this.opts.id.current,
|
|
84
|
+
'data-invalid': boolAttr(this.root.opts.invalid.current),
|
|
84
85
|
[SLOT_ATTR_NAME]: SLOT_ATTR_VALUES.error,
|
|
85
86
|
...this.attachment,
|
|
86
87
|
}));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Control } from './field.control.svelte';
|
|
2
|
+
export { default as Description } from './field.description.svelte';
|
|
3
|
+
export { default as Error } from './field.error.svelte';
|
|
4
|
+
export { default as Label } from './field.label.svelte';
|
|
5
|
+
export { default as Root } from './field.root.svelte';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Control } from './field.control.svelte';
|
|
2
|
+
export { default as Description } from './field.description.svelte';
|
|
3
|
+
export { default as Error } from './field.error.svelte';
|
|
4
|
+
export { default as Label } from './field.label.svelte';
|
|
5
|
+
export { default as Root } from './field.root.svelte';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as Primitive from '../../components/index.js';
|
|
3
|
+
|
|
4
|
+
import type { FieldProps } from '../../types.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
label,
|
|
8
|
+
error,
|
|
9
|
+
description,
|
|
10
|
+
ref = $bindable(null),
|
|
11
|
+
children: childrenSnippet,
|
|
12
|
+
...restProps
|
|
13
|
+
}: FieldProps = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<Primitive.Root bind:ref {...restProps}>
|
|
17
|
+
{#if typeof label === 'string'}
|
|
18
|
+
<Primitive.Label>{label}</Primitive.Label>
|
|
19
|
+
{:else}
|
|
20
|
+
{@render label?.()}
|
|
21
|
+
{/if}
|
|
22
|
+
|
|
23
|
+
<Primitive.Control>
|
|
24
|
+
{#snippet children({ props })}
|
|
25
|
+
{@render childrenSnippet?.({ props })}
|
|
26
|
+
{/snippet}
|
|
27
|
+
</Primitive.Control>
|
|
28
|
+
|
|
29
|
+
{#if typeof description === 'string'}
|
|
30
|
+
<Primitive.Description>{description}</Primitive.Description>
|
|
31
|
+
{:else}
|
|
32
|
+
{@render description?.()}
|
|
33
|
+
{/if}
|
|
34
|
+
|
|
35
|
+
{#if typeof error === 'string'}
|
|
36
|
+
<Primitive.Error>{error}</Primitive.Error>
|
|
37
|
+
{:else}
|
|
38
|
+
{@render error?.()}
|
|
39
|
+
{/if}
|
|
40
|
+
</Primitive.Root>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Basic } from './basic.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Basic } from './basic.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './basic/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './basic/index.js';
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
{/snippet}
|
|
31
31
|
</FieldControl>
|
|
32
32
|
|
|
33
|
-
{#if typeof error === 'string'}
|
|
34
|
-
<FieldError>{error}</FieldError>
|
|
35
|
-
{:else}
|
|
36
|
-
{@render error?.()}
|
|
37
|
-
{/if}
|
|
38
|
-
|
|
39
33
|
{#if typeof description === 'string'}
|
|
40
34
|
<FieldDescription>{description}</FieldDescription>
|
|
41
35
|
{:else}
|
|
42
36
|
{@render description?.()}
|
|
43
37
|
{/if}
|
|
38
|
+
|
|
39
|
+
{#if typeof error === 'string'}
|
|
40
|
+
<FieldError>{error}</FieldError>
|
|
41
|
+
{:else}
|
|
42
|
+
{@render error?.()}
|
|
43
|
+
{/if}
|
|
44
44
|
</FieldRoot>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * as FieldPrimitive from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * as FieldPrimitive from './components/index.js';
|
|
2
|
+
export * as Field from './composed/index.js';
|
|
3
3
|
export type { FieldControlProps, FieldDescriptionProps, FieldErrorProps, FieldLabelProps, FieldProps, FieldRootProps, } from './types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as FieldPrimitive from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * as FieldPrimitive from './components/index.js';
|
|
2
|
+
export * as Field from './composed/index.js';
|