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

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 (37) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +14 -14
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-es/_visual-editing.mjs +14 -14
  4. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/css.d.mts +196 -184
  7. package/dist/css.d.ts +196 -184
  8. package/dist/css.js +293 -238
  9. package/dist/css.js.map +1 -1
  10. package/dist/css.mjs +293 -238
  11. package/dist/css.mjs.map +1 -1
  12. package/dist/sanity-theme.css +1 -1
  13. package/dist/system.css +1105 -904
  14. package/dist/theme.d.mts +84 -76
  15. package/dist/theme.d.ts +84 -76
  16. package/dist/theme.js +147 -123
  17. package/dist/theme.js.map +1 -1
  18. package/dist/theme.mjs +147 -123
  19. package/dist/theme.mjs.map +1 -1
  20. package/package.json +1 -1
  21. package/src/css/compile/compileTheme_v3.ts +46 -37
  22. package/src/css/primitives/badge/badge.style.ts +1 -1
  23. package/src/css/primitives/button/button.style.ts +20 -0
  24. package/src/css/primitives/card/card.style.ts +47 -41
  25. package/src/css/primitives/kbd/kbd.style.ts +1 -1
  26. package/src/css/primitives/text/text.style.ts +11 -3
  27. package/src/css/types.ts +200 -188
  28. package/src/css/varNames.ts +86 -76
  29. package/src/css/vars.ts +85 -76
  30. package/src/theme/v3/color/buildColor_v3.ts +43 -38
  31. package/src/theme/v3/color/card.ts +43 -38
  32. package/src/theme/v3/color/color.ts +42 -38
  33. package/src/theme/v3/defaults.ts +62 -46
  34. package/src/theme/v3/resolveTokens.ts +43 -38
  35. package/src/theme/versioning/themeColor_v3_v2.ts +1 -1
  36. package/src/ui/components/autocomplete/__workshop__/async.tsx +0 -1
  37. package/src/ui/primitives/box/box.tsx +2 -2
@@ -97,6 +97,48 @@ function resolveCardColorTokens(
97
97
  },
98
98
  },
99
99
  backdrop: tokens?.backdrop ?? ['900', '100'],
100
+ code: {
101
+ bg: tokens?.code?.bg ?? ['950', '50'],
102
+ fg: tokens?.code?.fg ?? ['400', '600'],
103
+ token: {
104
+ atrule: tokens?.code?.token?.atrule ?? ['400', '600'],
105
+ attribute: tokens?.code?.token?.attribute ?? ['400', '600'],
106
+ attrName: tokens?.code?.token?.attrName ?? ['400', '600'],
107
+ attrValue: tokens?.code?.token?.attrValue ?? ['400', '600'],
108
+ boolean: tokens?.code?.token?.boolean ?? ['400', '600'],
109
+ builtin: tokens?.code?.token?.builtin ?? ['400', '600'],
110
+ cdata: tokens?.code?.token?.cdata ?? ['400', '600'],
111
+ char: tokens?.code?.token?.char ?? ['400', '600'],
112
+ class: tokens?.code?.token?.class ?? ['400', '600'],
113
+ className: tokens?.code?.token?.className ?? ['400', '600'],
114
+ comment: tokens?.code?.token?.comment ?? ['600', '400'],
115
+ constant: tokens?.code?.token?.constant ?? ['400', '600'],
116
+ deleted: tokens?.code?.token?.deleted ?? ['400', '600'],
117
+ doctype: tokens?.code?.token?.doctype ?? ['400', '600'],
118
+ entity: tokens?.code?.token?.entity ?? ['400', '600'],
119
+ function: tokens?.code?.token?.function ?? ['400', '600'],
120
+ hexcode: tokens?.code?.token?.hexcode ?? ['400', '600'],
121
+ id: tokens?.code?.token?.id ?? ['400', '600'],
122
+ important: tokens?.code?.token?.important ?? ['400', '600'],
123
+ inserted: tokens?.code?.token?.inserted ?? ['400', '600'],
124
+ keyword: tokens?.code?.token?.keyword ?? ['400', '600'],
125
+ number: tokens?.code?.token?.number ?? ['400', '600'],
126
+ operator: tokens?.code?.token?.operator ?? ['400', '600'],
127
+ prolog: tokens?.code?.token?.prolog ?? ['400', '600'],
128
+ property: tokens?.code?.token?.property ?? ['400', '600'],
129
+ pseudoClass: tokens?.code?.token?.pseudoClass ?? ['400', '600'],
130
+ pseudoElement: tokens?.code?.token?.pseudoElement ?? ['400', '600'],
131
+ punctuation: tokens?.code?.token?.punctuation ?? ['400', '600'],
132
+ regex: tokens?.code?.token?.regex ?? ['400', '600'],
133
+ selector: tokens?.code?.token?.selector ?? ['400', '600'],
134
+ string: tokens?.code?.token?.string ?? ['400', '600'],
135
+ symbol: tokens?.code?.token?.symbol ?? ['400', '600'],
136
+ tag: tokens?.code?.token?.tag ?? ['400', '600'],
137
+ unit: tokens?.code?.token?.unit ?? ['400', '600'],
138
+ url: tokens?.code?.token?.url ?? ['400', '600'],
139
+ variable: tokens?.code?.token?.variable ?? ['400', '600'],
140
+ },
141
+ },
100
142
  focusRing: tokens?.focusRing ?? ['500', '500'],
101
143
  link: {
102
144
  fg: tokens?.link?.fg ?? ['400', '600'],
@@ -111,44 +153,7 @@ function resolveCardColorTokens(
111
153
  from: tokens?.skeleton?.from ?? ['900', '100'],
112
154
  to: tokens?.skeleton?.to ?? ['950', '50'],
113
155
  },
114
- token: {
115
- atrule: tokens?.token?.atrule ?? ['400', '600'],
116
- attribute: tokens?.token?.attribute ?? ['400', '600'],
117
- attrName: tokens?.token?.attrName ?? ['400', '600'],
118
- attrValue: tokens?.token?.attrValue ?? ['400', '600'],
119
- boolean: tokens?.token?.boolean ?? ['400', '600'],
120
- builtin: tokens?.token?.builtin ?? ['400', '600'],
121
- cdata: tokens?.token?.cdata ?? ['400', '600'],
122
- char: tokens?.token?.char ?? ['400', '600'],
123
- class: tokens?.token?.class ?? ['400', '600'],
124
- className: tokens?.token?.className ?? ['400', '600'],
125
- comment: tokens?.token?.comment ?? ['600', '400'],
126
- constant: tokens?.token?.constant ?? ['400', '600'],
127
- deleted: tokens?.token?.deleted ?? ['400', '600'],
128
- doctype: tokens?.token?.doctype ?? ['400', '600'],
129
- entity: tokens?.token?.entity ?? ['400', '600'],
130
- function: tokens?.token?.function ?? ['400', '600'],
131
- hexcode: tokens?.token?.hexcode ?? ['400', '600'],
132
- id: tokens?.token?.id ?? ['400', '600'],
133
- important: tokens?.token?.important ?? ['400', '600'],
134
- inserted: tokens?.token?.inserted ?? ['400', '600'],
135
- keyword: tokens?.token?.keyword ?? ['400', '600'],
136
- number: tokens?.token?.number ?? ['400', '600'],
137
- operator: tokens?.token?.operator ?? ['400', '600'],
138
- prolog: tokens?.token?.prolog ?? ['400', '600'],
139
- property: tokens?.token?.property ?? ['400', '600'],
140
- pseudoClass: tokens?.token?.pseudoClass ?? ['400', '600'],
141
- pseudoElement: tokens?.token?.pseudoElement ?? ['400', '600'],
142
- punctuation: tokens?.token?.punctuation ?? ['400', '600'],
143
- regex: tokens?.token?.regex ?? ['400', '600'],
144
- selector: tokens?.token?.selector ?? ['400', '600'],
145
- string: tokens?.token?.string ?? ['400', '600'],
146
- symbol: tokens?.token?.symbol ?? ['400', '600'],
147
- tag: tokens?.token?.tag ?? ['400', '600'],
148
- unit: tokens?.token?.unit ?? ['400', '600'],
149
- url: tokens?.token?.url ?? ['400', '600'],
150
- variable: tokens?.token?.variable ?? ['400', '600'],
151
- },
156
+
152
157
  variant: {
153
158
  solid: {
154
159
  '*': resolveElementTokens(tokens?.variant?.solid?.['*']),
@@ -84,7 +84,7 @@ export function themeColor_v3_v2(options: {
84
84
  return tones
85
85
  }, {} as ThemeColorSelectable_v2),
86
86
  shadow: color.shadow,
87
- syntax: color.token,
87
+ syntax: color.code.token,
88
88
  }
89
89
  }
90
90
 
@@ -135,7 +135,6 @@ function AsyncOption(props: {
135
135
  disabled={disabled}
136
136
  padding={3}
137
137
  radius={1}
138
- selectable
139
138
  selected={selected}
140
139
  tabIndex={tabIndex}
141
140
  >
@@ -35,7 +35,7 @@ export const Box = forwardRef(function Box(
35
35
  autoCols,
36
36
  autoFlow,
37
37
  autoRows,
38
- border,
38
+ border = false,
39
39
  borderTop,
40
40
  borderRight,
41
41
  borderBottom,
@@ -83,7 +83,7 @@ export const Box = forwardRef(function Box(
83
83
  rows,
84
84
  rowStart,
85
85
  rowEnd,
86
- sizing = 'content',
86
+ sizing = 'border',
87
87
  width,
88
88
  wrap,
89
89
  ...restProps