@sanity/ui 3.0.0-static.6 → 3.0.0-static.7

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 (44) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +50 -50
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-es/_visual-editing.mjs +51 -51
  4. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/css.d.mts +11 -1
  7. package/dist/css.d.ts +11 -1
  8. package/dist/css.js +324 -309
  9. package/dist/css.js.map +1 -1
  10. package/dist/css.mjs +324 -309
  11. package/dist/css.mjs.map +1 -1
  12. package/dist/index.js +3 -13
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +3 -13
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/sanity-theme.css +1 -1
  17. package/dist/system.css +229 -10
  18. package/dist/theme.js +1 -1
  19. package/dist/theme.js.map +1 -1
  20. package/dist/theme.mjs +1 -1
  21. package/dist/theme.mjs.map +1 -1
  22. package/package.json +1 -1
  23. package/src/css/aspects/index.ts +1 -0
  24. package/src/css/aspects/minWidth/index.ts +2 -0
  25. package/src/css/aspects/minWidth/minWidth.style.ts +13 -0
  26. package/src/css/aspects/minWidth/minWidth.ts +6 -0
  27. package/src/css/aspects/minWidth/types.ts +7 -0
  28. package/src/css/compile/compileRule.ts +1 -0
  29. package/src/css/compile/compileStyle.ts +1 -1
  30. package/src/css/primitives/box/box.style.ts +1 -1
  31. package/src/css/primitives/box/box.ts +2 -3
  32. package/src/css/primitives/box/types.ts +2 -0
  33. package/src/css/primitives/card/card.style.ts +69 -3
  34. package/src/css/primitives/card/types.ts +0 -1
  35. package/src/css/primitives/popover/popover.ts +4 -0
  36. package/src/css/primitives/switch/switch.style.ts +8 -83
  37. package/src/css/system.style.ts +2 -0
  38. package/src/theme/v3/defaults.ts +1 -1
  39. package/src/ui/components/autocomplete/autocomplete.tsx +2 -11
  40. package/src/ui/primitives/box/box.tsx +3 -2
  41. package/src/ui/primitives/card/card.tsx +2 -6
  42. package/src/ui/primitives/kbd/kbd.tsx +2 -2
  43. package/src/ui/primitives/popover/popoverCard.tsx +45 -39
  44. package/src/css/primitives/card/rules.ts +0 -473
package/dist/system.css CHANGED
@@ -1182,6 +1182,30 @@
1182
1182
  max-width: 100%;
1183
1183
  }
1184
1184
 
1185
+ .s-min-w-0 {
1186
+ min-width: 0;
1187
+ }
1188
+
1189
+ .s-min-w-auto {
1190
+ min-width: auto;
1191
+ }
1192
+
1193
+ .s-min-w-full {
1194
+ min-width: 100%;
1195
+ }
1196
+
1197
+ .s-min-w-min {
1198
+ min-width: min-content;
1199
+ }
1200
+
1201
+ .s-min-w-max {
1202
+ min-width: max-content;
1203
+ }
1204
+
1205
+ .s-min-w-fit {
1206
+ min-width: fit-content;
1207
+ }
1208
+
1185
1209
  .s-outline-none {
1186
1210
  outline: none;
1187
1211
  }
@@ -2784,6 +2808,30 @@
2784
2808
  max-width: 100%;
2785
2809
  }
2786
2810
 
2811
+ .s-1\:min-w-0 {
2812
+ min-width: 0;
2813
+ }
2814
+
2815
+ .s-1\:min-w-auto {
2816
+ min-width: auto;
2817
+ }
2818
+
2819
+ .s-1\:min-w-full {
2820
+ min-width: 100%;
2821
+ }
2822
+
2823
+ .s-1\:min-w-min {
2824
+ min-width: min-content;
2825
+ }
2826
+
2827
+ .s-1\:min-w-max {
2828
+ min-width: max-content;
2829
+ }
2830
+
2831
+ .s-1\:min-w-fit {
2832
+ min-width: fit-content;
2833
+ }
2834
+
2787
2835
  .s-1\:overflow-visible {
2788
2836
  overflow: visible;
2789
2837
  }
@@ -4360,6 +4408,30 @@
4360
4408
  max-width: 100%;
4361
4409
  }
4362
4410
 
4411
+ .s-2\:min-w-0 {
4412
+ min-width: 0;
4413
+ }
4414
+
4415
+ .s-2\:min-w-auto {
4416
+ min-width: auto;
4417
+ }
4418
+
4419
+ .s-2\:min-w-full {
4420
+ min-width: 100%;
4421
+ }
4422
+
4423
+ .s-2\:min-w-min {
4424
+ min-width: min-content;
4425
+ }
4426
+
4427
+ .s-2\:min-w-max {
4428
+ min-width: max-content;
4429
+ }
4430
+
4431
+ .s-2\:min-w-fit {
4432
+ min-width: fit-content;
4433
+ }
4434
+
4363
4435
  .s-2\:overflow-visible {
4364
4436
  overflow: visible;
4365
4437
  }
@@ -5936,6 +6008,30 @@
5936
6008
  max-width: 100%;
5937
6009
  }
5938
6010
 
6011
+ .s-3\:min-w-0 {
6012
+ min-width: 0;
6013
+ }
6014
+
6015
+ .s-3\:min-w-auto {
6016
+ min-width: auto;
6017
+ }
6018
+
6019
+ .s-3\:min-w-full {
6020
+ min-width: 100%;
6021
+ }
6022
+
6023
+ .s-3\:min-w-min {
6024
+ min-width: min-content;
6025
+ }
6026
+
6027
+ .s-3\:min-w-max {
6028
+ min-width: max-content;
6029
+ }
6030
+
6031
+ .s-3\:min-w-fit {
6032
+ min-width: fit-content;
6033
+ }
6034
+
5939
6035
  .s-3\:overflow-visible {
5940
6036
  overflow: visible;
5941
6037
  }
@@ -7512,6 +7608,30 @@
7512
7608
  max-width: 100%;
7513
7609
  }
7514
7610
 
7611
+ .s-4\:min-w-0 {
7612
+ min-width: 0;
7613
+ }
7614
+
7615
+ .s-4\:min-w-auto {
7616
+ min-width: auto;
7617
+ }
7618
+
7619
+ .s-4\:min-w-full {
7620
+ min-width: 100%;
7621
+ }
7622
+
7623
+ .s-4\:min-w-min {
7624
+ min-width: min-content;
7625
+ }
7626
+
7627
+ .s-4\:min-w-max {
7628
+ min-width: max-content;
7629
+ }
7630
+
7631
+ .s-4\:min-w-fit {
7632
+ min-width: fit-content;
7633
+ }
7634
+
7515
7635
  .s-4\:overflow-visible {
7516
7636
  overflow: visible;
7517
7637
  }
@@ -9088,6 +9208,30 @@
9088
9208
  max-width: 100%;
9089
9209
  }
9090
9210
 
9211
+ .s-5\:min-w-0 {
9212
+ min-width: 0;
9213
+ }
9214
+
9215
+ .s-5\:min-w-auto {
9216
+ min-width: auto;
9217
+ }
9218
+
9219
+ .s-5\:min-w-full {
9220
+ min-width: 100%;
9221
+ }
9222
+
9223
+ .s-5\:min-w-min {
9224
+ min-width: min-content;
9225
+ }
9226
+
9227
+ .s-5\:min-w-max {
9228
+ min-width: max-content;
9229
+ }
9230
+
9231
+ .s-5\:min-w-fit {
9232
+ min-width: fit-content;
9233
+ }
9234
+
9091
9235
  .s-5\:overflow-visible {
9092
9236
  overflow: visible;
9093
9237
  }
@@ -10664,6 +10808,30 @@
10664
10808
  max-width: 100%;
10665
10809
  }
10666
10810
 
10811
+ .s-6\:min-w-0 {
10812
+ min-width: 0;
10813
+ }
10814
+
10815
+ .s-6\:min-w-auto {
10816
+ min-width: auto;
10817
+ }
10818
+
10819
+ .s-6\:min-w-full {
10820
+ min-width: 100%;
10821
+ }
10822
+
10823
+ .s-6\:min-w-min {
10824
+ min-width: min-content;
10825
+ }
10826
+
10827
+ .s-6\:min-w-max {
10828
+ min-width: max-content;
10829
+ }
10830
+
10831
+ .s-6\:min-w-fit {
10832
+ min-width: fit-content;
10833
+ }
10834
+
10667
10835
  .s-6\:overflow-visible {
10668
10836
  overflow: visible;
10669
10837
  }
@@ -11764,7 +11932,7 @@
11764
11932
  box-shadow: none;
11765
11933
  }
11766
11934
 
11767
- :disabled .s-avatar, [data-disabled] & {
11935
+ :disabled .s-avatar, [data-disabled] .s-avatar {
11768
11936
  --color-avatar-bg: var(--color-border);
11769
11937
  --color-avatar-fg: var(--color-bg);
11770
11938
  }
@@ -11887,7 +12055,7 @@
11887
12055
  height: var(--avatar-size);
11888
12056
  }
11889
12057
 
11890
- .s-avatar-counter& {
12058
+ .s-avatar-counter.s-avatar-counter {
11891
12059
  min-width: var(--avatar-size);
11892
12060
  }
11893
12061
 
@@ -11961,11 +12129,10 @@
11961
12129
  }
11962
12130
 
11963
12131
  .s-box {
11964
- min-width: 0;
11965
12132
  min-height: 0;
11966
12133
  }
11967
12134
 
11968
- .s-box:is(ul), &:is(ol) {
12135
+ .s-box:is(ul), .s-box:is(ol) {
11969
12136
  list-style: none;
11970
12137
  }
11971
12138
 
@@ -12780,7 +12947,7 @@
12780
12947
  --color-muted-fg: var(--color-tinted-default-fg-4);
12781
12948
  }
12782
12949
 
12783
- .s-card:is(button) {
12950
+ button.s-card {
12784
12951
  -webkit-font-smoothing: inherit;
12785
12952
  appearance: none;
12786
12953
  outline: none;
@@ -12792,16 +12959,64 @@
12792
12959
  width: fill-available;
12793
12960
  }
12794
12961
 
12795
- .s-card:is(a) {
12962
+ a.s-card {
12796
12963
  outline: none;
12797
12964
  text-decoration: none;
12798
12965
  }
12799
12966
 
12800
- .s-card:is(pre) {
12967
+ pre.s-card {
12801
12968
  font: inherit;
12802
12969
  white-space: inherit;
12803
12970
  }
12804
12971
 
12972
+ a.s-card:not([data-disabled]):hover, button.s-card:not([data-disabled]):hover {
12973
+ --color-bg: var(--color-tinted-default-bg-1);
12974
+ --color-border: var(--color-tinted-default-border-3);
12975
+ --color-fg: var(--color-tinted-default-fg-1);
12976
+ --color-muted-bg: var(--color-tinted-default-bg-2);
12977
+ --color-muted-fg: var(--color-tinted-default-fg-4);
12978
+ }
12979
+
12980
+ a.s-card:not([data-disabled]):active, button.s-card:not([data-disabled]):active {
12981
+ --color-bg: var(--color-tinted-default-bg-2);
12982
+ --color-border: var(--color-tinted-default-border-4);
12983
+ --color-fg: var(--color-tinted-default-fg-0);
12984
+ --color-muted-bg: var(--color-tinted-default-bg-3);
12985
+ --color-muted-fg: var(--color-tinted-default-fg-4);
12986
+ }
12987
+
12988
+ a.s-card:not([data-disabled])[aria-pressed="true"], button.s-card:not([data-disabled])[aria-pressed="true"] {
12989
+ --color-bg: var(--color-tinted-default-bg-2);
12990
+ --color-border: var(--color-tinted-default-border-4);
12991
+ --color-fg: var(--color-tinted-default-fg-0);
12992
+ --color-muted-bg: var(--color-tinted-default-bg-3);
12993
+ --color-muted-fg: var(--color-tinted-default-fg-4);
12994
+ }
12995
+
12996
+ a.s-card:not([data-disabled])[data-pressed], button.s-card:not([data-disabled])[data-pressed] {
12997
+ --color-bg: var(--color-tinted-default-bg-2);
12998
+ --color-border: var(--color-tinted-default-border-4);
12999
+ --color-fg: var(--color-tinted-default-fg-0);
13000
+ --color-muted-bg: var(--color-tinted-default-bg-3);
13001
+ --color-muted-fg: var(--color-tinted-default-fg-4);
13002
+ }
13003
+
13004
+ a.s-card:not([data-disabled])[data-selected], button.s-card:not([data-disabled])[data-selected] {
13005
+ --color-bg: var(--color-solid-primary-bg-0);
13006
+ --color-border: var(--color-solid-primary-border-1);
13007
+ --color-fg: var(--color-solid-primary-fg-0);
13008
+ --color-muted-bg: var(--color-solid-primary-bg-1);
13009
+ --color-muted-fg: var(--color-solid-primary-fg-3);
13010
+ }
13011
+
13012
+ a.s-card[data-disabled]), button.s-card[data-disabled] {
13013
+ --color-bg: var(--color-tinted-default-bg-2);
13014
+ --color-border: var(--color-tinted-default-border-4);
13015
+ --color-fg: var(--color-tinted-default-fg-0);
13016
+ --color-muted-bg: var(--color-tinted-default-bg-3);
13017
+ --color-muted-fg: var(--color-tinted-default-fg-4);
13018
+ }
13019
+
12805
13020
  .s-card.s-light {
12806
13021
  color-scheme: light;
12807
13022
  --color-transparent-accent-fg: var(--color-light-transparent-accent-fg);
@@ -19548,7 +19763,7 @@
19548
19763
  .s-checkbox-input:not(:disabled):focus:focus-visible + span {
19549
19764
  }
19550
19765
 
19551
- .s-checkbox-input:not(:disabled):focus:focus-visible&:checked + span {
19766
+ .s-checkbox-input:not(:disabled):focus:focus-visible.s-checkbox-input:checked + span {
19552
19767
  }
19553
19768
 
19554
19769
  .s-checkbox-input[data-error] + span {
@@ -19961,6 +20176,10 @@ input:checked + .s-switch-presentation {
19961
20176
  --switch-thumb-offset: calc(var(--input-switch-width) - (var(--input-switch-padding) * 2) - var(--switch-thumb-size));
19962
20177
  }
19963
20178
 
20179
+ [data-indeterminate] > .s-switch-element + .s-switch-presentation {
20180
+ --switch-thumb-offset: calc(var(--input-switch-width) / 2 - var(--switch-thumb-size) / 2 - var(--input-switch-padding));
20181
+ }
20182
+
19964
20183
  .s-switch-track {
19965
20184
  display: block;
19966
20185
  background-color: var(--switch-bg-color);
@@ -20201,7 +20420,7 @@ input:checked + .s-switch-presentation {
20201
20420
  color: var(--color-token-punctuation);
20202
20421
  }
20203
20422
 
20204
- .token.attr-value &:not(.attr-equals).punctuation {
20423
+ .token.attr-value .token:not(.attr-equals).punctuation {
20205
20424
  color: inherit;
20206
20425
  }
20207
20426
 
@@ -21708,7 +21927,7 @@ input:checked + .s-switch-presentation {
21708
21927
  --color-muted-fg: var(--color-tinted-fg-4);
21709
21928
  }
21710
21929
 
21711
- .s-selectable:not([data-disabled]):active, &:not([data-disabled])[aria-pressed="true"], &:not([data-disabled])[data-pressed] {
21930
+ .s-selectable:not([data-disabled]):active, .s-selectable:not([data-disabled])[aria-pressed="true"], .s-selectable:not([data-disabled])[data-pressed] {
21712
21931
  --color-bg: var(--color-tinted-bg-2);
21713
21932
  --color-border: var(--color-tinted-border-4);
21714
21933
  --color-fg: var(--color-tinted-fg-0);
package/dist/theme.js CHANGED
@@ -1695,7 +1695,7 @@ const defaultTokens = {
1695
1695
  "*": {
1696
1696
  // backdrop: ['black/0.2', '200/0.2'],
1697
1697
  backdrop: ["black/0.5", "gray/100/0.5"],
1698
- focusRing: ["blue/500", "blue/300"],
1698
+ focusRing: ["blue/500", "blue/500"],
1699
1699
  link: {
1700
1700
  fg: ["blue/400", "blue/600"]
1701
1701
  },