@sanity/ui 3.0.0-static.11 → 3.0.0-static.13

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 (251) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +1293 -1215
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-cjs/buildCommand.js +28 -10
  4. package/dist/_chunks-cjs/buildCommand.js.map +1 -1
  5. package/dist/_chunks-es/_visual-editing.mjs +1284 -1202
  6. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  7. package/dist/_visual-editing.d.mts +528 -358
  8. package/dist/_visual-editing.d.ts +528 -358
  9. package/dist/cli.js +1 -1
  10. package/dist/css.d.mts +143 -73
  11. package/dist/css.d.ts +143 -73
  12. package/dist/css.js +329 -472
  13. package/dist/css.js.map +1 -1
  14. package/dist/css.mjs +330 -473
  15. package/dist/css.mjs.map +1 -1
  16. package/dist/index.d.mts +1362 -869
  17. package/dist/index.d.ts +1362 -869
  18. package/dist/index.js +383 -308
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +387 -312
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/sanity-palette.css +105 -1
  23. package/dist/sanity-palette.min.css +1 -0
  24. package/dist/sanity-theme.css +4571 -1
  25. package/dist/sanity-theme.min.css +1 -0
  26. package/dist/system.css +22053 -21946
  27. package/dist/system.min.css +1 -0
  28. package/dist/theme.d.mts +51 -106
  29. package/dist/theme.d.ts +51 -106
  30. package/dist/theme.js +9 -9
  31. package/dist/theme.js.map +1 -1
  32. package/dist/theme.mjs +9 -9
  33. package/dist/theme.mjs.map +1 -1
  34. package/package.json +10 -5
  35. package/src/cli/buildCommand.ts +46 -19
  36. package/src/css/_comp.ts +2 -2
  37. package/src/css/{compile/compileStyle.ts → _compileStyle.ts} +7 -7
  38. package/src/css/{system.style.ts → _system.style.ts} +3 -2
  39. package/src/css/aspects/display/display.ts +1 -0
  40. package/src/css/aspects/display/types.ts +2 -3
  41. package/src/css/aspects/flex/types.ts +4 -12
  42. package/src/css/aspects/flexItem/types.ts +1 -3
  43. package/src/css/aspects/font/types.ts +1 -3
  44. package/src/css/aspects/grid/grid.ts +1 -0
  45. package/src/css/aspects/grid/types.ts +5 -9
  46. package/src/css/aspects/gridItem/gridItem.ts +1 -1
  47. package/src/css/aspects/gridItem/types.ts +7 -18
  48. package/src/css/aspects/height/height.ts +3 -4
  49. package/src/css/aspects/inset/inset.ts +1 -0
  50. package/src/css/aspects/margin/margin.ts +1 -0
  51. package/src/css/aspects/margin/types.ts +1 -0
  52. package/src/css/aspects/maxWidth/maxWidth.ts +1 -0
  53. package/src/css/aspects/maxWidth/types.ts +1 -0
  54. package/src/css/aspects/minWidth/minWidth.ts +1 -0
  55. package/src/css/aspects/minWidth/types.ts +2 -0
  56. package/src/css/aspects/overflow/overflow.ts +1 -0
  57. package/src/css/aspects/padding/padding.ts +1 -0
  58. package/src/css/aspects/pointerEvents/pointerEvents.ts +1 -0
  59. package/src/css/aspects/position/position.ts +1 -0
  60. package/src/css/aspects/shadow/shadow.ts +1 -0
  61. package/src/css/aspects/textOverflow/textOverflow.ts +1 -0
  62. package/src/css/aspects/textOverflow/types.ts +1 -0
  63. package/src/css/aspects/width/types.ts +2 -0
  64. package/src/css/aspects/width/width.ts +1 -0
  65. package/src/css/{compile/compilePalette.ts → compilePalette.ts} +14 -10
  66. package/src/css/compileSystem.ts +7 -0
  67. package/src/css/{compile/compileTheme.ts → compileTheme.ts} +1 -0
  68. package/src/css/{compile/compileTheme_v3.ts → compileTheme_v3.ts} +123 -104
  69. package/src/css/components/breadcrumbs/breadcrumbs.ts +1 -0
  70. package/src/css/components/dialog/dialog.ts +7 -0
  71. package/src/css/components/menu/menu.ts +2 -0
  72. package/src/css/components/skeleton/skeleton.ts +4 -0
  73. package/src/css/components/skeleton/types.ts +4 -0
  74. package/src/css/components/toast/toast.ts +5 -0
  75. package/src/css/components/tree/tree.ts +1 -0
  76. package/src/css/composeClassNames.ts +4 -2
  77. package/src/css/constants.ts +2 -0
  78. package/src/css/index.ts +3 -3
  79. package/src/css/primitives/_arrow/_arrow.ts +3 -0
  80. package/src/css/primitives/_input/input.ts +2 -0
  81. package/src/css/primitives/_selectable/_selectable.style.ts +1 -2
  82. package/src/css/primitives/_selectable/selectable.ts +1 -2
  83. package/src/css/primitives/avatar/avatar.style.ts +5 -8
  84. package/src/css/primitives/avatar/avatar.ts +6 -0
  85. package/src/css/primitives/avatar/types.ts +1 -0
  86. package/src/css/primitives/box/types.ts +1 -3
  87. package/src/css/primitives/button/button.ts +4 -21
  88. package/src/css/primitives/button/index.ts +1 -0
  89. package/src/css/primitives/button/types.ts +18 -0
  90. package/src/css/primitives/card/card.style.ts +3 -6
  91. package/src/css/primitives/card/card.ts +2 -2
  92. package/src/css/primitives/card/types.ts +2 -2
  93. package/src/css/primitives/checkbox/checkbox.ts +2 -0
  94. package/src/css/primitives/container/container.ts +1 -0
  95. package/src/css/primitives/container/types.ts +1 -0
  96. package/src/css/primitives/kbd/kbd.ts +1 -0
  97. package/src/css/primitives/label/types.ts +7 -2
  98. package/src/css/primitives/popover/popover.ts +2 -0
  99. package/src/css/primitives/radio/radio.ts +1 -0
  100. package/src/css/primitives/select/select.ts +2 -0
  101. package/src/css/primitives/spinner/spinner.ts +2 -0
  102. package/src/css/primitives/switch/switch.ts +5 -0
  103. package/src/css/primitives/text/types.ts +4 -0
  104. package/src/css/primitives/textArea/textArea.ts +1 -0
  105. package/src/css/primitives/textInput/textInput.ts +1 -0
  106. package/src/css/primitives/tooltip/tooltip.ts +2 -0
  107. package/src/css/scopeClassName.ts +1 -0
  108. package/src/css/types.ts +9 -12
  109. package/src/css/util.ts +5 -0
  110. package/src/css/utils/srOnly/srOnly.ts +3 -1
  111. package/src/css/varNames.ts +131 -141
  112. package/src/css/vars.ts +1 -6
  113. package/src/theme/palette/constants.ts +2 -0
  114. package/src/theme/palette/types.ts +3 -0
  115. package/src/theme/types.ts +2 -6
  116. package/src/theme/v0/focusRing.ts +1 -3
  117. package/src/theme/v0/font.ts +6 -18
  118. package/src/theme/v0/layer.ts +1 -3
  119. package/src/theme/v0/shadow.ts +2 -6
  120. package/src/theme/v2/avatar.ts +1 -3
  121. package/src/theme/v2/color/_system.ts +1 -3
  122. package/src/theme/v2/color/avatar.ts +2 -6
  123. package/src/theme/v2/color/badge.ts +2 -6
  124. package/src/theme/v2/color/button.ts +3 -9
  125. package/src/theme/v2/color/color.ts +3 -9
  126. package/src/theme/v2/color/input.ts +3 -9
  127. package/src/theme/v2/color/kbd.ts +1 -3
  128. package/src/theme/v2/color/selectable.ts +2 -6
  129. package/src/theme/v2/color/state.ts +1 -3
  130. package/src/theme/v2/color/syntax.ts +1 -3
  131. package/src/theme/v2/input.ts +1 -3
  132. package/src/theme/v2/theme.ts +2 -6
  133. package/src/theme/v3/buildTheme_v3.ts +1 -0
  134. package/src/theme/v3/color/color.ts +6 -4
  135. package/src/theme/v3/color/renderColor.ts +4 -1
  136. package/src/theme/v3/defaultTokens.ts +1 -0
  137. package/src/theme/v3/resolveTokens.ts +9 -9
  138. package/src/ui/RootClassNames.tsx +3 -0
  139. package/src/ui/StyleTags.tsx +3 -1
  140. package/src/ui/_compat/theme/themeColorProvider.tsx +2 -6
  141. package/src/ui/_compat/theme/themeProvider.tsx +2 -6
  142. package/src/ui/_compat/theme/types.ts +1 -3
  143. package/src/ui/_compat/theme/useRootTheme.ts +1 -3
  144. package/src/ui/_compat/theme/useTheme.ts +2 -6
  145. package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
  146. package/src/ui/components/autocomplete/autocomplete.tsx +86 -114
  147. package/src/ui/components/autocomplete/autocompleteOption.tsx +2 -0
  148. package/src/ui/components/autocomplete/types.ts +3 -8
  149. package/src/ui/components/breadcrumbs/breadcrumbs.tsx +27 -21
  150. package/src/ui/components/dialog/dialog.tsx +89 -291
  151. package/src/ui/components/dialog/dialogCard.tsx +183 -0
  152. package/src/ui/components/dialog/isTargetWithinScope.ts +14 -0
  153. package/src/ui/components/hotkeys/hotkeys.tsx +33 -15
  154. package/src/ui/components/menu/__workshop__/asComponent.tsx +6 -6
  155. package/src/ui/components/menu/menu.tsx +27 -33
  156. package/src/ui/components/menu/menuButton.tsx +10 -14
  157. package/src/ui/components/menu/menuDivider.tsx +25 -13
  158. package/src/ui/components/menu/menuGroup.tsx +34 -26
  159. package/src/ui/components/menu/menuItem.tsx +51 -40
  160. package/src/ui/components/skeleton/codeSkeleton.tsx +53 -0
  161. package/src/ui/components/skeleton/headingSkeleton.tsx +52 -0
  162. package/src/ui/components/skeleton/index.ts +3 -0
  163. package/src/ui/components/skeleton/labelSkeleton.tsx +51 -0
  164. package/src/ui/components/skeleton/skeleton.tsx +39 -16
  165. package/src/ui/components/skeleton/textSkeleton.tsx +31 -110
  166. package/src/ui/components/tab/tab.tsx +23 -19
  167. package/src/ui/components/tab/tabList.tsx +34 -33
  168. package/src/ui/components/tab/tabPanel.tsx +25 -19
  169. package/src/ui/components/toast/toast.tsx +21 -16
  170. package/src/ui/components/toast/toastLayer.tsx +28 -10
  171. package/src/ui/components/toast/toastProvider.tsx +2 -6
  172. package/src/ui/components/toast/types.ts +2 -6
  173. package/src/ui/components/toast/useToast.ts +1 -3
  174. package/src/ui/components/tree/tree.tsx +194 -187
  175. package/src/ui/components/tree/treeGroup.tsx +25 -5
  176. package/src/ui/components/tree/treeItem.tsx +35 -23
  177. package/src/ui/hooks/useClickOutside.ts +2 -6
  178. package/src/ui/hooks/useClickOutsideEvent.ts +3 -9
  179. package/src/ui/primitives/_selectable/selectable.tsx +33 -20
  180. package/src/ui/primitives/avatar/avatar.tsx +28 -31
  181. package/src/ui/primitives/avatar/avatarCounter.tsx +33 -25
  182. package/src/ui/primitives/avatar/avatarStack.tsx +31 -24
  183. package/src/ui/primitives/avatar/types.ts +2 -0
  184. package/src/ui/primitives/badge/__workshop__/props.tsx +1 -9
  185. package/src/ui/primitives/badge/__workshop__/tones.tsx +1 -6
  186. package/src/ui/primitives/badge/badge.tsx +33 -32
  187. package/src/ui/primitives/badge/types.ts +2 -1
  188. package/src/ui/primitives/box/box.tsx +59 -29
  189. package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +3 -3
  190. package/src/ui/primitives/button/__workshop__/uploadButton.tsx +2 -1
  191. package/src/ui/primitives/button/button.test.tsx +1 -15
  192. package/src/ui/primitives/button/button.tsx +64 -70
  193. package/src/ui/primitives/card/__workshop__/asComponent.tsx +3 -3
  194. package/src/ui/primitives/card/card.tsx +22 -22
  195. package/src/ui/primitives/card/cardProvider.tsx +2 -0
  196. package/src/ui/primitives/checkbox/checkbox.tsx +26 -15
  197. package/src/ui/primitives/code/code.tsx +24 -22
  198. package/src/ui/primitives/container/container.tsx +26 -15
  199. package/src/ui/primitives/flex/flex.tsx +21 -19
  200. package/src/ui/primitives/grid/grid.tsx +21 -16
  201. package/src/ui/primitives/heading/heading.tsx +42 -19
  202. package/src/ui/primitives/inline/inline.tsx +26 -23
  203. package/src/ui/primitives/kbd/kbd.tsx +25 -23
  204. package/src/ui/primitives/label/label.tsx +41 -26
  205. package/src/ui/primitives/popover/popover.tsx +281 -277
  206. package/src/ui/primitives/popover/popoverCard.tsx +119 -118
  207. package/src/ui/primitives/radio/radio.tsx +30 -14
  208. package/src/ui/primitives/select/select.tsx +24 -16
  209. package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +4 -2
  210. package/src/ui/primitives/spinner/spinner.tsx +24 -12
  211. package/src/ui/primitives/stack/stack.tsx +27 -18
  212. package/src/ui/primitives/switch/switch.tsx +31 -14
  213. package/src/ui/primitives/text/text.tsx +42 -24
  214. package/src/ui/primitives/textArea/textArea.tsx +33 -18
  215. package/src/ui/primitives/textInput/textInput.tsx +28 -40
  216. package/src/ui/primitives/tooltip/constants.ts +1 -1
  217. package/src/ui/primitives/tooltip/tooltip.tsx +76 -59
  218. package/src/ui/primitives/tooltip/tooltipCard.tsx +89 -82
  219. package/src/ui/primitives/types.ts +1 -3
  220. package/src/ui/types/avatar.ts +3 -6
  221. package/src/ui/types/badge.ts +1 -3
  222. package/src/ui/types/button.ts +1 -3
  223. package/src/ui/types/card.ts +1 -3
  224. package/src/ui/types/dialog.ts +1 -3
  225. package/src/ui/types/props.ts +20 -10
  226. package/src/ui/utils/arrow/arrow.tsx +40 -14
  227. package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +2 -6
  228. package/src/ui/utils/boundaryElement/types.ts +1 -3
  229. package/src/ui/utils/boundaryElement/useBoundaryElement.ts +1 -3
  230. package/src/ui/utils/elementQuery/elementQuery.tsx +36 -14
  231. package/src/ui/utils/errorBoundary.tsx +2 -0
  232. package/src/ui/utils/index.ts +0 -1
  233. package/src/ui/utils/layer/layer.tsx +23 -93
  234. package/src/ui/utils/layer/layerCard.tsx +92 -0
  235. package/src/ui/utils/layer/layerProvider.tsx +2 -6
  236. package/src/ui/utils/layer/useLayer.ts +1 -3
  237. package/src/ui/utils/portal/portal.ts +2 -6
  238. package/src/ui/utils/portal/portalProvider.tsx +2 -6
  239. package/src/ui/utils/portal/types.ts +1 -3
  240. package/src/ui/utils/portal/usePortal.ts +1 -3
  241. package/src/ui/utils/srOnly/srOnly.tsx +25 -20
  242. package/src/ui/utils/virtualList/virtualList.tsx +36 -24
  243. package/src/css/compile/compileRule.ts +0 -97
  244. package/src/css/compile/compileRules.test.ts +0 -36
  245. package/src/css/compile/compileRules.ts +0 -43
  246. package/src/css/compile/compileSystem.ts +0 -7
  247. package/src/css/compile/types.ts +0 -6
  248. package/src/css/primitives/_selectable/_contants.ts +0 -11
  249. package/src/css/primitives/card/_constants.ts +0 -13
  250. package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
  251. package/src/ui/utils/conditionalWrapper/index.ts +0 -1
package/dist/css.js CHANGED
@@ -9,11 +9,11 @@ function _resp(prefix, prop) {
9
9
  return index === 0 ? className : `${index}:${className}`;
10
10
  }).filter(Boolean).join(" ") : (typeof prop == "boolean" ? [prefix] : [prefix, prop]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
11
11
  }
12
- function getClassNames(...classNames) {
12
+ function _getClassNames(...classNames) {
13
13
  return classNames.map((n) => typeof n == "string" && n.trim()).filter(Boolean).join(" ").split(" ");
14
14
  }
15
15
  function composeClassNames(...classNames) {
16
- return unique(getClassNames(...classNames)).join(" ") || void 0;
16
+ return unique(_getClassNames(...classNames)).join(" ") || void 0;
17
17
  }
18
18
  function unique(array) {
19
19
  return Array.from(new Set(array));
@@ -88,7 +88,7 @@ function scopeClassName(className) {
88
88
  return `${PREFIX}${className.trim()}`;
89
89
  }
90
90
  function _comp(...classNames) {
91
- return getClassNames(...classNames).filter(Boolean).map(scopeClassName).join(" ") || void 0;
91
+ return _getClassNames(...classNames).filter(Boolean).map(scopeClassName).join(" ") || void 0;
92
92
  }
93
93
  function textOverflow(props) {
94
94
  return _comp(props.textOverflow && `text-overflow-${props.textOverflow}`);
@@ -96,6 +96,109 @@ function textOverflow(props) {
96
96
  function width(props) {
97
97
  return _resp("w", props.width) ?? "";
98
98
  }
99
+ function isRecord(value) {
100
+ return value !== null && typeof value == "object" && !Array.isArray(value);
101
+ }
102
+ function isArray(value) {
103
+ return Array.isArray(value);
104
+ }
105
+ function rem(value) {
106
+ return value === 0 ? "0" : `${value / 16}rem`;
107
+ }
108
+ function px(value) {
109
+ return value === 0 ? "0" : `${value}px`;
110
+ }
111
+ function toBoxShadow(value) {
112
+ return value ? value.map((n) => px(n)).join(" ") : "none";
113
+ }
114
+ function _compileStyle(style) {
115
+ let css = "";
116
+ if (style.rules && (css += compileStyleRules(style.rules)), style.keyframes && Object.keys(style.keyframes).length > 0)
117
+ for (const [name, value] of Object.entries(style.keyframes)) {
118
+ let keyframesCss = `@keyframes ${name} {
119
+ `;
120
+ for (const [key, props] of Object.entries(value))
121
+ keyframesCss += ` ${key} {
122
+ `, keyframesCss += compileProperties(props), keyframesCss += `}
123
+ `;
124
+ keyframesCss += `
125
+ }
126
+
127
+ `, css += keyframesCss;
128
+ }
129
+ if (style.layers && Object.keys(style.layers).length > 0)
130
+ for (const [layerName, layerRules] of Object.entries(style.layers))
131
+ Object.keys(layerRules).length > 0 && (css += `@layer ${PREFIX}${layerName} {
132
+ `, css += compileStyleRules(layerRules), css += `}
133
+
134
+ `);
135
+ return css;
136
+ }
137
+ function compileStyleRules(rules2) {
138
+ let css = "";
139
+ const mediaMap = /* @__PURE__ */ new Map();
140
+ for (const [selector, properties] of Object.entries(rules2))
141
+ if (properties) {
142
+ if (properties["@media"])
143
+ for (const [mediaQuery, mediaProps] of Object.entries(properties["@media"])) {
144
+ const arr = mediaMap.get(mediaQuery) ?? [];
145
+ arr.push({
146
+ selector,
147
+ props: mediaProps
148
+ }), mediaMap.set(mediaQuery, arr);
149
+ }
150
+ css += compileStyleRule(selector, properties);
151
+ }
152
+ for (const [mediaQuery, mediaRules] of mediaMap) {
153
+ css += `@media ${mediaQuery} {
154
+ `;
155
+ for (const rule of mediaRules)
156
+ css += compileStyleRule(rule.selector, rule.props);
157
+ css += `}
158
+
159
+ `;
160
+ }
161
+ return css;
162
+ }
163
+ function compileStyleRule(_selector, properties) {
164
+ let css = "";
165
+ const {
166
+ _prefix = !0,
167
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
168
+ "@media": _mediaProps,
169
+ "@nest": nestedProps,
170
+ ...restProperties
171
+ } = properties, selector = _prefix ? `${_selector.replace(/\./g, `.${PREFIX}`)}` : _selector;
172
+ if (Object.entries(restProperties).length && (css += `${selector} {
173
+ `, css += compileProperties(restProperties), css += `}
174
+
175
+ `), nestedProps)
176
+ for (const [_nestedSelector, nestedProperties] of Object.entries(nestedProps)) {
177
+ const nestedSelector = _prefix && (nestedProperties._prefix ?? !0) ? _nestedSelector.replace(/\./g, `.${PREFIX}`) : _nestedSelector;
178
+ css += `${nestedSelector.replace(/&/g, selector)} {
179
+ `, css += compileProperties(nestedProperties), css += `}
180
+
181
+ `;
182
+ }
183
+ return css;
184
+ }
185
+ function compileProperties(props) {
186
+ let css = "";
187
+ const propEntries = Object.entries(props);
188
+ for (const [key, value] of propEntries)
189
+ if (!key.startsWith("@"))
190
+ if (isArray(value))
191
+ for (const item of value)
192
+ css += ` ${toSnakeCase(key)}: ${item};
193
+ `;
194
+ else
195
+ css += ` ${toSnakeCase(key)}: ${value};
196
+ `;
197
+ return css;
198
+ }
199
+ function toSnakeCase(str) {
200
+ return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
201
+ }
99
202
  const varNames = {
100
203
  avatar: {
101
204
  distance: "--avatar-distance",
@@ -128,9 +231,6 @@ const varNames = {
128
231
  },
129
232
  color: {
130
233
  // card scope
131
- accent: {
132
- fg: "--color-accent-fg"
133
- },
134
234
  avatar: {
135
235
  bg: "--color-avatar-bg",
136
236
  fg: "--color-avatar-fg",
@@ -248,99 +348,18 @@ const varNames = {
248
348
  variant: "tinted"
249
349
  }),
250
350
  // tone scopes
251
- transparent: buildColorCardVarNames({
252
- tone: "transparent"
253
- }),
254
- default: buildColorCardVarNames({
255
- tone: "default"
256
- }),
257
- neutral: buildColorCardVarNames({
258
- tone: "neutral"
259
- }),
260
- primary: buildColorCardVarNames({
261
- tone: "primary"
262
- }),
263
- suggest: buildColorCardVarNames({
264
- tone: "suggest"
265
- }),
266
- positive: buildColorCardVarNames({
267
- tone: "positive"
268
- }),
269
- caution: buildColorCardVarNames({
270
- tone: "caution"
271
- }),
272
- critical: buildColorCardVarNames({
273
- tone: "critical"
274
- }),
275
- // scheme scope
276
- dark: {
277
- transparent: buildColorCardVarNames({
278
- scheme: "dark",
279
- tone: "transparent"
280
- }),
281
- default: buildColorCardVarNames({
282
- scheme: "dark",
283
- tone: "default"
284
- }),
285
- neutral: buildColorCardVarNames({
286
- scheme: "dark",
287
- tone: "neutral"
288
- }),
289
- primary: buildColorCardVarNames({
290
- scheme: "dark",
291
- tone: "primary"
292
- }),
293
- suggest: buildColorCardVarNames({
294
- scheme: "dark",
295
- tone: "neutral"
296
- }),
297
- positive: buildColorCardVarNames({
298
- scheme: "dark",
299
- tone: "positive"
300
- }),
301
- caution: buildColorCardVarNames({
302
- scheme: "dark",
303
- tone: "caution"
304
- }),
305
- critical: buildColorCardVarNames({
306
- scheme: "dark",
307
- tone: "critical"
308
- })
309
- },
310
- light: {
311
- transparent: buildColorCardVarNames({
312
- scheme: "light",
313
- tone: "transparent"
314
- }),
315
- default: buildColorCardVarNames({
316
- scheme: "light",
317
- tone: "default"
318
- }),
319
- neutral: buildColorCardVarNames({
320
- scheme: "light",
321
- tone: "neutral"
322
- }),
323
- primary: buildColorCardVarNames({
324
- scheme: "light",
325
- tone: "primary"
326
- }),
327
- suggest: buildColorCardVarNames({
328
- scheme: "light",
329
- tone: "suggest"
330
- }),
331
- positive: buildColorCardVarNames({
332
- scheme: "light",
333
- tone: "positive"
334
- }),
335
- caution: buildColorCardVarNames({
336
- scheme: "light",
337
- tone: "caution"
338
- }),
339
- critical: buildColorCardVarNames({
340
- scheme: "light",
341
- tone: "critical"
342
- })
343
- }
351
+ ...theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
352
+ tone
353
+ }), acc), {}),
354
+ // scheme scopes
355
+ dark: theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
356
+ scheme: "dark",
357
+ tone
358
+ }), acc), {}),
359
+ light: theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
360
+ scheme: "light",
361
+ tone
362
+ }), acc), {})
344
363
  },
345
364
  container: {
346
365
  0: "--container-0",
@@ -483,7 +502,6 @@ const varNames = {
483
502
  letterSpacing: "--input-letter-spacing",
484
503
  ascenderHeight: "--input-ascender-height",
485
504
  descenderHeight: "--input-descender-height",
486
- // capHeight: `--input-cap-height`,
487
505
  gap: "--input-gap",
488
506
  padding: "--input-padding"
489
507
  },
@@ -508,109 +526,106 @@ function buildColorCardVarNames(props) {
508
526
  const {
509
527
  scheme,
510
528
  tone
511
- } = props, sourcePrefix = scheme ? `--color-${scheme}-${tone}` : `--color-${tone}`;
529
+ } = props, prefix = scheme ? `--color-${scheme}-${tone}` : `--color-${tone}`;
512
530
  return {
513
- accent: {
514
- fg: `${sourcePrefix}-accent-fg`
515
- },
516
531
  avatar: {
517
532
  gray: {
518
- bg: `${sourcePrefix}-avatar-gray-bg`,
519
- fg: `${sourcePrefix}-avatar-gray-fg`
533
+ bg: `${prefix}-avatar-gray-bg`,
534
+ fg: `${prefix}-avatar-gray-fg`
520
535
  },
521
536
  blue: {
522
- bg: `${sourcePrefix}-avatar-blue-bg`,
523
- fg: `${sourcePrefix}-avatar-blue-fg`
537
+ bg: `${prefix}-avatar-blue-bg`,
538
+ fg: `${prefix}-avatar-blue-fg`
524
539
  },
525
540
  purple: {
526
- bg: `${sourcePrefix}-avatar-purple-bg`,
527
- fg: `${sourcePrefix}-avatar-purple-fg`
541
+ bg: `${prefix}-avatar-purple-bg`,
542
+ fg: `${prefix}-avatar-purple-fg`
528
543
  },
529
544
  magenta: {
530
- bg: `${sourcePrefix}-avatar-magenta-bg`,
531
- fg: `${sourcePrefix}-avatar-magenta-fg`
545
+ bg: `${prefix}-avatar-magenta-bg`,
546
+ fg: `${prefix}-avatar-magenta-fg`
532
547
  },
533
548
  red: {
534
- bg: `${sourcePrefix}-avatar-red-bg`,
535
- fg: `${sourcePrefix}-avatar-red-fg`
549
+ bg: `${prefix}-avatar-red-bg`,
550
+ fg: `${prefix}-avatar-red-fg`
536
551
  },
537
552
  orange: {
538
- bg: `${sourcePrefix}-avatar-orange-bg`,
539
- fg: `${sourcePrefix}-avatar-gray-fg`
553
+ bg: `${prefix}-avatar-orange-bg`,
554
+ fg: `${prefix}-avatar-gray-fg`
540
555
  },
541
556
  yellow: {
542
- bg: `${sourcePrefix}-avatar-yellow-bg`,
543
- fg: `${sourcePrefix}-avatar-yellow-fg`
557
+ bg: `${prefix}-avatar-yellow-bg`,
558
+ fg: `${prefix}-avatar-yellow-fg`
544
559
  },
545
560
  green: {
546
- bg: `${sourcePrefix}-avatar-green-bg`,
547
- fg: `${sourcePrefix}-avatar-green-fg`
561
+ bg: `${prefix}-avatar-green-bg`,
562
+ fg: `${prefix}-avatar-green-fg`
548
563
  },
549
564
  cyan: {
550
- bg: `${sourcePrefix}-avatar-cyan-bg`,
551
- fg: `${sourcePrefix}-avatar-yellow-fg`
565
+ bg: `${prefix}-avatar-cyan-bg`,
566
+ fg: `${prefix}-avatar-yellow-fg`
552
567
  }
553
568
  },
554
- backdrop: `${sourcePrefix}-backdrop`,
569
+ backdrop: `${prefix}-backdrop`,
555
570
  code: {
556
- bg: `${sourcePrefix}-code-bg`,
557
- fg: `${sourcePrefix}-code-fg`,
571
+ bg: `${prefix}-code-bg`,
572
+ fg: `${prefix}-code-fg`,
558
573
  token: {
559
- atrule: `${sourcePrefix}-code-token-atrule`,
560
- attrName: `${sourcePrefix}-code-token-attr-name`,
561
- attrValue: `${sourcePrefix}-code-token-attr-value`,
562
- attribute: `${sourcePrefix}-code-token-attribute`,
563
- boolean: `${sourcePrefix}-code-token-boolean`,
564
- builtin: `${sourcePrefix}-code-token-builtin`,
565
- cdata: `${sourcePrefix}-code-token-cdata`,
566
- char: `${sourcePrefix}-code-token-char`,
567
- class: `${sourcePrefix}-code-token-class`,
568
- className: `${sourcePrefix}-code-token-class-name`,
569
- comment: `${sourcePrefix}-code-token-comment`,
570
- constant: `${sourcePrefix}-code-token-constant`,
571
- deleted: `${sourcePrefix}-code-token-deleted`,
572
- doctype: `${sourcePrefix}-code-token-doctype`,
573
- entity: `${sourcePrefix}-code-token-entity`,
574
- function: `${sourcePrefix}-code-token-function`,
575
- hexcode: `${sourcePrefix}-code-token-hexcode`,
576
- id: `${sourcePrefix}-code-token-id`,
577
- important: `${sourcePrefix}-code-token-important`,
578
- inserted: `${sourcePrefix}-code-token-inserted`,
579
- keyword: `${sourcePrefix}-code-token-keyword`,
580
- number: `${sourcePrefix}-code-token-number`,
581
- operator: `${sourcePrefix}-code-token-operator`,
582
- prolog: `${sourcePrefix}-code-token-prolog`,
583
- property: `${sourcePrefix}-code-token-property`,
584
- pseudoClass: `${sourcePrefix}-code-token-pseudo-class`,
585
- pseudoElement: `${sourcePrefix}-code-token-pseudo-element`,
586
- punctuation: `${sourcePrefix}-code-token-punctuation`,
587
- regex: `${sourcePrefix}-code-token-regex`,
588
- selector: `${sourcePrefix}-code-token-selector`,
589
- string: `${sourcePrefix}-code-token-string`,
590
- symbol: `${sourcePrefix}-code-token-symbol`,
591
- tag: `${sourcePrefix}-code-token-tag`,
592
- unit: `${sourcePrefix}-code-token-unit`,
593
- url: `${sourcePrefix}-code-token-url`,
594
- variable: `${sourcePrefix}-code-token-variable`
574
+ atrule: `${prefix}-code-token-atrule`,
575
+ attrName: `${prefix}-code-token-attr-name`,
576
+ attrValue: `${prefix}-code-token-attr-value`,
577
+ attribute: `${prefix}-code-token-attribute`,
578
+ boolean: `${prefix}-code-token-boolean`,
579
+ builtin: `${prefix}-code-token-builtin`,
580
+ cdata: `${prefix}-code-token-cdata`,
581
+ char: `${prefix}-code-token-char`,
582
+ class: `${prefix}-code-token-class`,
583
+ className: `${prefix}-code-token-class-name`,
584
+ comment: `${prefix}-code-token-comment`,
585
+ constant: `${prefix}-code-token-constant`,
586
+ deleted: `${prefix}-code-token-deleted`,
587
+ doctype: `${prefix}-code-token-doctype`,
588
+ entity: `${prefix}-code-token-entity`,
589
+ function: `${prefix}-code-token-function`,
590
+ hexcode: `${prefix}-code-token-hexcode`,
591
+ id: `${prefix}-code-token-id`,
592
+ important: `${prefix}-code-token-important`,
593
+ inserted: `${prefix}-code-token-inserted`,
594
+ keyword: `${prefix}-code-token-keyword`,
595
+ number: `${prefix}-code-token-number`,
596
+ operator: `${prefix}-code-token-operator`,
597
+ prolog: `${prefix}-code-token-prolog`,
598
+ property: `${prefix}-code-token-property`,
599
+ pseudoClass: `${prefix}-code-token-pseudo-class`,
600
+ pseudoElement: `${prefix}-code-token-pseudo-element`,
601
+ punctuation: `${prefix}-code-token-punctuation`,
602
+ regex: `${prefix}-code-token-regex`,
603
+ selector: `${prefix}-code-token-selector`,
604
+ string: `${prefix}-code-token-string`,
605
+ symbol: `${prefix}-code-token-symbol`,
606
+ tag: `${prefix}-code-token-tag`,
607
+ unit: `${prefix}-code-token-unit`,
608
+ url: `${prefix}-code-token-url`,
609
+ variable: `${prefix}-code-token-variable`
595
610
  }
596
611
  },
597
- focusRing: `${sourcePrefix}-focus-ring`,
612
+ focusRing: `${prefix}-focus-ring`,
598
613
  link: {
599
- fg: `${sourcePrefix}-link-fg`
614
+ fg: `${prefix}-link-fg`
600
615
  },
601
616
  muted: {
602
- bg: `${sourcePrefix}-muted-bg`,
603
- fg: `${sourcePrefix}-muted-fg`
617
+ bg: `${prefix}-muted-bg`,
618
+ fg: `${prefix}-muted-fg`
604
619
  },
605
620
  shadow: {
606
- outline: `${sourcePrefix}-shadow-outline`,
607
- umbra: `${sourcePrefix}-shadow-umbra`,
608
- penumbra: `${sourcePrefix}-shadow-penumbra`,
609
- ambient: `${sourcePrefix}-shadow-ambient`
621
+ outline: `${prefix}-shadow-outline`,
622
+ umbra: `${prefix}-shadow-umbra`,
623
+ penumbra: `${prefix}-shadow-penumbra`,
624
+ ambient: `${prefix}-shadow-ambient`
610
625
  },
611
626
  skeleton: {
612
- from: `${sourcePrefix}-skeleton-from`,
613
- to: `${sourcePrefix}-skeleton-to`
627
+ from: `${prefix}-skeleton-from`,
628
+ to: `${prefix}-skeleton-to`
614
629
  },
615
630
  solid: buildColorVariantVarNames({
616
631
  scheme,
@@ -629,101 +644,71 @@ function buildColorVariantVarNames(options) {
629
644
  scheme,
630
645
  tone,
631
646
  variant
632
- } = options, _prefix = scheme && tone ? `--color-${scheme}-${tone}-${variant}` : tone ? `--color-${tone}-${variant}` : `--color-${variant}`, vars2 = {
647
+ } = options, prefix = scheme && tone ? `--color-${scheme}-${tone}-${variant}` : tone ? `--color-${tone}-${variant}` : `--color-${variant}`, vars2 = {
633
648
  bg: {
634
- 0: `${_prefix}-bg-0`,
635
- 1: `${_prefix}-bg-1`,
636
- 2: `${_prefix}-bg-2`,
637
- 3: `${_prefix}-bg-3`,
638
- 4: `${_prefix}-bg-4`
649
+ 0: `${prefix}-bg-0`,
650
+ 1: `${prefix}-bg-1`,
651
+ 2: `${prefix}-bg-2`,
652
+ 3: `${prefix}-bg-3`,
653
+ 4: `${prefix}-bg-4`
639
654
  },
640
655
  border: {
641
- 0: `${_prefix}-border-0`,
642
- 1: `${_prefix}-border-1`,
643
- 2: `${_prefix}-border-2`,
644
- 3: `${_prefix}-border-3`,
645
- 4: `${_prefix}-border-4`
656
+ 0: `${prefix}-border-0`,
657
+ 1: `${prefix}-border-1`,
658
+ 2: `${prefix}-border-2`,
659
+ 3: `${prefix}-border-3`,
660
+ 4: `${prefix}-border-4`
646
661
  },
647
662
  fg: {
648
- 0: `${_prefix}-fg-0`,
649
- 1: `${_prefix}-fg-1`,
650
- 2: `${_prefix}-fg-2`,
651
- 3: `${_prefix}-fg-3`,
652
- 4: `${_prefix}-fg-4`
663
+ 0: `${prefix}-fg-0`,
664
+ 1: `${prefix}-fg-1`,
665
+ 2: `${prefix}-fg-2`,
666
+ 3: `${prefix}-fg-3`,
667
+ 4: `${prefix}-fg-4`
653
668
  }
654
669
  };
655
670
  for (const elementTone of theme.THEME_COLOR_STATE_TONES) {
656
- const prefix = scheme && tone ? `--color-${scheme}-${tone}-${variant}-${elementTone}` : tone ? `--color-${tone}-${variant}-${elementTone}` : `--color-${variant}-${elementTone}`;
671
+ const _prefix = scheme && tone ? `--color-${scheme}-${tone}-${variant}-${elementTone}` : tone ? `--color-${tone}-${variant}-${elementTone}` : `--color-${variant}-${elementTone}`;
657
672
  vars2[elementTone] = {
658
673
  bg: {
659
- 0: `${prefix}-bg-0`,
660
- 1: `${prefix}-bg-1`,
661
- 2: `${prefix}-bg-2`,
662
- 3: `${prefix}-bg-3`,
663
- 4: `${prefix}-bg-4`
674
+ 0: `${_prefix}-bg-0`,
675
+ 1: `${_prefix}-bg-1`,
676
+ 2: `${_prefix}-bg-2`,
677
+ 3: `${_prefix}-bg-3`,
678
+ 4: `${_prefix}-bg-4`
664
679
  },
665
680
  border: {
666
- 0: `${prefix}-border-0`,
667
- 1: `${prefix}-border-1`,
668
- 2: `${prefix}-border-2`,
669
- 3: `${prefix}-border-3`,
670
- 4: `${prefix}-border-4`
681
+ 0: `${_prefix}-border-0`,
682
+ 1: `${_prefix}-border-1`,
683
+ 2: `${_prefix}-border-2`,
684
+ 3: `${_prefix}-border-3`,
685
+ 4: `${_prefix}-border-4`
671
686
  },
672
687
  fg: {
673
- 0: `${prefix}-fg-0`,
674
- 1: `${prefix}-fg-1`,
675
- 2: `${prefix}-fg-2`,
676
- 3: `${prefix}-fg-3`,
677
- 4: `${prefix}-fg-4`
688
+ 0: `${_prefix}-fg-0`,
689
+ 1: `${_prefix}-fg-1`,
690
+ 2: `${_prefix}-fg-2`,
691
+ 3: `${_prefix}-fg-3`,
692
+ 4: `${_prefix}-fg-4`
678
693
  }
679
694
  };
680
695
  }
681
696
  return vars2;
682
697
  }
683
- function compileRule(selector, props, context) {
684
- let css = compileProperties$1(selector, props);
685
- if (props["@nest"] && (css += compileNestedRules(selector, props["@nest"], context)), props["@keyframes"])
686
- for (const name in props["@keyframes"])
687
- context.keyframes[name] = props["@keyframes"][name];
688
- if (props["@media"])
689
- for (const key in props["@media"])
690
- context.media[key] || (context.media[key] = {}), context.media[key][selector] = props["@media"][key];
691
- return css;
692
- }
693
- function compileProperties$1(selector, props) {
694
- let css = "{";
695
- for (const key in props) {
696
- if (key === "@keyframes" || key === "@media" || key === "@nest") continue;
697
- const value = props[key], valueArr = Array.isArray(value) ? value : [value];
698
- for (const v of valueArr)
699
- css += toSnakeCase$1(key) + ":" + v + ";";
700
- }
701
- return css === "{" ? "" : selector + css + "}";
702
- }
703
- function compileNestedRules(selector, props, context) {
704
- if (!props) return "";
705
- let css = "";
706
- for (const [_selector, _props] of Object.entries(props))
707
- css += `
708
- ` + compileRule(_selector.replace(/\./g, `.${PREFIX}`).replace(/&/g, selector), _props, context);
709
- return css;
710
- }
711
- function toSnakeCase$1(value) {
712
- return value.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
713
- }
714
698
  function compilePalette() {
715
- const props = {
716
- ...compileHues(),
699
+ return _compileStyle({
700
+ layers: {
701
+ theme: {
702
+ ":root": compilePaletteProperties()
703
+ }
704
+ }
705
+ });
706
+ }
707
+ function compilePaletteProperties() {
708
+ const rules2 = {
717
709
  [varNames.black]: color.color.black.hex,
718
710
  [varNames.white]: color.color.white.hex
719
711
  };
720
- return compileRule(":root", props, {
721
- keyframes: {},
722
- media: {}
723
- });
724
- }
725
- function compileHues() {
726
- const rules2 = {};
727
712
  for (const hue of theme.HUES)
728
713
  for (const tint of theme.TINTS)
729
714
  rules2[varNames[hue][tint]] = color.color[hue][tint].hex;
@@ -785,9 +770,6 @@ for (const tone of theme.THEME_COLOR_CARD_TONES)
785
770
  tone
786
771
  });
787
772
  const colorVars = {
788
- accent: {
789
- fg: `var(${varNames.color.accent.fg})`
790
- },
791
773
  avatar: {
792
774
  bg: `var(${varNames.color.avatar.bg})`,
793
775
  fg: `var(${varNames.color.avatar.fg})`,
@@ -1059,9 +1041,6 @@ function buildColorCardVars(props) {
1059
1041
  tone
1060
1042
  } = props, prefix = scheme ? varNames.color[scheme][tone] : varNames.color[tone];
1061
1043
  return {
1062
- accent: {
1063
- fg: `var(${prefix.accent.fg})`
1064
- },
1065
1044
  avatar: {
1066
1045
  ...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color2) => ({
1067
1046
  ...acc,
@@ -2560,14 +2539,6 @@ const _inputStyle = {
2560
2539
  layers: {
2561
2540
  primitive: primitive$o
2562
2541
  }
2563
- }, toneMap$2 = {
2564
- default: "default",
2565
- neutral: "neutral",
2566
- suggest: "suggest",
2567
- primary: "accent",
2568
- positive: "positive",
2569
- caution: "caution",
2570
- critical: "critical"
2571
2542
  }, primitive$n = {
2572
2543
  ".selectable": {
2573
2544
  backgroundColor: vars.color.bg,
@@ -2640,7 +2611,7 @@ function buildSelectableTones() {
2640
2611
  const rules2 = {};
2641
2612
  for (const tone of theme.THEME_COLOR_STATE_TONES) {
2642
2613
  const target = varNames.color, source = vars.color;
2643
- rules2[`&.${toneMap$2[tone]}`] = {
2614
+ rules2[`&.${tone}`] = {
2644
2615
  [target.tinted.bg[0]]: source.tinted[tone].bg[0],
2645
2616
  [target.tinted.bg[1]]: source.tinted[tone].bg[1],
2646
2617
  [target.tinted.bg[2]]: source.tinted[tone].bg[2],
@@ -2677,6 +2648,7 @@ function buildSelectableTones() {
2677
2648
  }
2678
2649
  const primitive$m = {
2679
2650
  ".avatar": {
2651
+ [varNames.color.fg]: vars.color.avatar.fg,
2680
2652
  backgroundColor: vars.color.avatar.bg,
2681
2653
  position: "relative",
2682
2654
  boxSizing: "border-box",
@@ -2687,11 +2659,7 @@ const primitive$m = {
2687
2659
  height: vars.avatar.size,
2688
2660
  borderRadius: vars.avatar.size,
2689
2661
  "@nest": {
2690
- '&[data-status="inactive"]': {
2691
- opacity: 0.5
2692
- },
2693
- // &:is(button)
2694
- "&:is(button)": {
2662
+ "button&": {
2695
2663
  WebkitFontSmoothing: "inherit",
2696
2664
  appearance: "none",
2697
2665
  margin: 0,
@@ -2701,11 +2669,11 @@ const primitive$m = {
2701
2669
  color: "inherit",
2702
2670
  outline: "none"
2703
2671
  },
2704
- "&:is(button):focus": {
2672
+ "button&:focus": {
2705
2673
  outline: "var(--avatar-focus-ring-width) solid var(--color-focus-ring)",
2706
2674
  outlineOffset: "var(--avatar-focus-ring-offset)"
2707
2675
  },
2708
- "&:is(button):focus:not(:focus-visible)": {
2676
+ "button&:focus:not(:focus-visible)": {
2709
2677
  boxShadow: "none"
2710
2678
  },
2711
2679
  ":disabled &, [data-disabled] &": {
@@ -2855,7 +2823,7 @@ const badgeStyle = {
2855
2823
  layers: {
2856
2824
  primitive: primitive$k
2857
2825
  }
2858
- }, toneMap$1 = {
2826
+ }, toneMap = {
2859
2827
  default: "default",
2860
2828
  neutral: "neutral",
2861
2829
  suggest: "suggest",
@@ -2916,7 +2884,7 @@ const badgeStyle = {
2916
2884
  };
2917
2885
  for (const tone of theme.THEME_COLOR_STATE_TONES) {
2918
2886
  const solid = vars.color.solid[tone], tinted = vars.color.tinted[tone];
2919
- primitive$j[`.button.${variantMap.default}.${toneMap$1[tone]}`] = {
2887
+ primitive$j[`.button.${variantMap.default}.${toneMap[tone]}`] = {
2920
2888
  [varNames.color.bg]: solid.bg[0],
2921
2889
  [varNames.color.border]: solid.border[1],
2922
2890
  [varNames.color.fg]: solid.fg[0],
@@ -2964,7 +2932,7 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
2964
2932
  [varNames.color.muted.fg]: vars.color.tinted.default.border[4]
2965
2933
  }
2966
2934
  }
2967
- }, primitive$j[`.button.${variantMap.ghost}.${toneMap$1[tone]}`] = {
2935
+ }, primitive$j[`.button.${variantMap.ghost}.${toneMap[tone]}`] = {
2968
2936
  [varNames.color.bg]: tinted.bg[1],
2969
2937
  [varNames.color.border]: tinted.border[0],
2970
2938
  [varNames.color.fg]: tinted.fg[2],
@@ -3015,7 +2983,7 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
3015
2983
  [varNames.color.muted.fg]: vars.color.tinted.default.border[3]
3016
2984
  }
3017
2985
  }
3018
- }, primitive$j[`.button.${variantMap.bleed}.${toneMap$1[tone]}`] = {
2986
+ }, primitive$j[`.button.${variantMap.bleed}.${toneMap[tone]}`] = {
3019
2987
  boxShadow: "none",
3020
2988
  [varNames.color.bg]: tinted.bg[0],
3021
2989
  [varNames.color.border]: tinted.border[1],
@@ -3070,16 +3038,6 @@ const buttonStyle = {
3070
3038
  layers: {
3071
3039
  primitive: primitive$j
3072
3040
  }
3073
- }, toneMap = {
3074
- transparent: "transparent",
3075
- default: "default",
3076
- neutral: "neutral",
3077
- suggest: "suggest",
3078
- primary: "accent",
3079
- positive: "positive",
3080
- caution: "caution",
3081
- critical: "critical",
3082
- inherit: void 0
3083
3041
  }, primitive$i = {
3084
3042
  ".card": {
3085
3043
  backgroundColor: vars.color.bg,
@@ -3205,9 +3163,10 @@ for (const tone of theme.THEME_COLOR_CARD_TONES) {
3205
3163
  "--card-shadow-umbra-color": vars.color.shadow.umbra,
3206
3164
  "--card-shadow-penumbra-color": vars.color.shadow.penumbra,
3207
3165
  "--card-shadow-ambient-color": vars.color.shadow.ambient
3166
+ // todo
3208
3167
  // '--card-skeleton-from-color': 'var(--color-skeleton-from)',
3209
3168
  // '--card-skeleton-to-color': 'var(--color-skeleton-to)',
3210
- }), primitive$i[`.card.${toneMap[tone]}`] = toneProps;
3169
+ }), primitive$i[`.card.${tone}`] = toneProps;
3211
3170
  }
3212
3171
  const cardStyle = {
3213
3172
  layers: {
@@ -3215,9 +3174,6 @@ const cardStyle = {
3215
3174
  }
3216
3175
  };
3217
3176
  function _assignToneProps(toneProps, _varNames, _vars) {
3218
- Object.assign(toneProps, {
3219
- [_varNames.accent.fg]: _vars.accent.fg
3220
- });
3221
3177
  for (const hue of theme.THEME_COLOR_AVATAR_COLORS)
3222
3178
  toneProps[`${_varNames.avatar[hue].bg}`] = _vars.avatar[hue].bg, toneProps[`${_varNames.avatar[hue].fg}`] = _vars.avatar[hue].fg;
3223
3179
  Object.assign(toneProps, {
@@ -4180,8 +4136,8 @@ const textStyle = {
4180
4136
  layers: {
4181
4137
  primitive
4182
4138
  }
4183
- }, systemStyle = _mergeStyles([
4184
- // NOTE: order matters in CSS
4139
+ }, _systemStyle = _mergeStyles([
4140
+ // NOTE: Order matters in CSS!
4185
4141
  {
4186
4142
  // define order of layers
4187
4143
  layers: {
@@ -4264,116 +4220,17 @@ const textStyle = {
4264
4220
  toastStyle,
4265
4221
  treeStyle
4266
4222
  ]);
4267
- function isRecord(value) {
4268
- return value !== null && typeof value == "object" && !Array.isArray(value);
4269
- }
4270
- function isArray(value) {
4271
- return Array.isArray(value);
4272
- }
4273
- function rem(value) {
4274
- return value === 0 ? "0" : `${value / 16}rem`;
4275
- }
4276
- function px(value) {
4277
- return value === 0 ? "0" : `${value}px`;
4278
- }
4279
- function toBoxShadow(value) {
4280
- return value ? value.map((n) => px(n)).join(" ") : "none";
4281
- }
4282
- function compileStyle(style) {
4283
- let css = "";
4284
- if (style.rules && (css += compileStyleRules(style.rules)), style.keyframes && Object.keys(style.keyframes).length > 0)
4285
- for (const [name, value] of Object.entries(style.keyframes)) {
4286
- let keyframesCss = `@keyframes ${name} {
4287
- `;
4288
- for (const [key, props] of Object.entries(value))
4289
- keyframesCss += ` ${key} {
4290
- `, keyframesCss += compileProperties(props), keyframesCss += `}
4291
- `;
4292
- keyframesCss += `
4293
- }
4294
- `, css += keyframesCss;
4295
- }
4296
- if (style.layers && Object.keys(style.layers).length > 0)
4297
- for (const [layerName, layerRules] of Object.entries(style.layers))
4298
- Object.keys(layerRules).length > 0 && (css += `@layer ${PREFIX}${layerName} {
4299
- `, css += compileStyleRules(layerRules), css += `}
4300
-
4301
- `);
4302
- return css;
4303
- }
4304
- function compileStyleRules(rules2) {
4305
- let css = "";
4306
- const mediaMap = /* @__PURE__ */ new Map();
4307
- for (const [selector, properties] of Object.entries(rules2))
4308
- if (properties) {
4309
- if (properties["@media"])
4310
- for (const [mediaQuery, mediaProps] of Object.entries(properties["@media"])) {
4311
- const arr = mediaMap.get(mediaQuery) ?? [];
4312
- arr.push({
4313
- selector,
4314
- props: mediaProps
4315
- }), mediaMap.set(mediaQuery, arr);
4316
- }
4317
- css += compileStyleRule(selector, properties);
4318
- }
4319
- for (const [mediaQuery, mediaRules] of mediaMap) {
4320
- css += `@media ${mediaQuery} {
4321
- `;
4322
- for (const rule of mediaRules)
4323
- css += compileStyleRule(rule.selector, rule.props);
4324
- css += `}
4325
-
4326
- `;
4327
- }
4328
- return css;
4329
- }
4330
- function compileStyleRule(_selector, properties) {
4331
- let css = "";
4332
- const {
4333
- _prefix = !0,
4334
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4335
- "@media": _mediaProps,
4336
- "@nest": nestedProps,
4337
- ...restProperties
4338
- } = properties, selector = _prefix ? `${_selector.replace(/\./g, `.${PREFIX}`)}` : _selector;
4339
- if (Object.entries(restProperties).length && (css += `${selector} {
4340
- `, css += compileProperties(restProperties), css += `}
4341
-
4342
- `), nestedProps)
4343
- for (const [_nestedSelector, nestedProperties] of Object.entries(nestedProps)) {
4344
- const nestedSelector = _prefix && (nestedProperties._prefix ?? !0) ? _nestedSelector.replace(/\./g, `.${PREFIX}`) : _nestedSelector;
4345
- css += `${nestedSelector.replace(/&/g, selector)} {
4346
- `, css += compileProperties(nestedProperties), css += `}
4347
-
4348
- `;
4349
- }
4350
- return css;
4351
- }
4352
- function compileProperties(props) {
4353
- let css = "";
4354
- const propEntries = Object.entries(props);
4355
- for (const [key, value] of propEntries)
4356
- if (!key.startsWith("@"))
4357
- if (isArray(value))
4358
- for (const item of value)
4359
- css += ` ${toSnakeCase(key)}: ${item};
4360
- `;
4361
- else
4362
- css += ` ${toSnakeCase(key)}: ${value};
4363
- `;
4364
- return css;
4365
- }
4366
- function toSnakeCase(str) {
4367
- return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
4368
- }
4369
4223
  function compileSystem() {
4370
- return compileStyle(systemStyle);
4224
+ return _compileStyle(_systemStyle);
4371
4225
  }
4372
4226
  const THEME_COLOR_SCHEMES = ["dark", "light"], THEME_COLOR_VARIANTS = ["tinted", "solid"];
4373
4227
  function compileTheme_v3(theme2) {
4374
- return compileRule(":root", compileThemeProperties(theme2), {
4375
- keyframes: {},
4376
- media: {}
4228
+ return _compileStyle({
4229
+ layers: {
4230
+ theme: {
4231
+ ":root": compileThemeProperties(theme2)
4232
+ }
4233
+ }
4377
4234
  });
4378
4235
  }
4379
4236
  function compileThemeProperties(theme2) {
@@ -4381,6 +4238,7 @@ function compileThemeProperties(theme2) {
4381
4238
  ...buildAvatarThemeProperties(theme2),
4382
4239
  ...buildButtonThemeProperties(theme2),
4383
4240
  [varNames.card.shadow.outline]: px(theme2.card.shadow.outline),
4241
+ ...buildColorThemeProperties(theme2),
4384
4242
  ...buildContainerThemeProperties(theme2),
4385
4243
  ...buildFontCodeThemeProperties(theme2),
4386
4244
  ...buildFontHeadingThemeProperties(theme2),
@@ -4389,22 +4247,21 @@ function compileThemeProperties(theme2) {
4389
4247
  ...buildInputThemeProperties(theme2),
4390
4248
  ...buildRadiusThemeProperties(theme2),
4391
4249
  ...buildShadowThemeProperties(theme2),
4392
- ...buildSpaceThemeProperties(theme2),
4393
- ...buildColorThemeProperties(theme2)
4250
+ ...buildSpaceThemeProperties(theme2)
4394
4251
  };
4395
4252
  }
4396
4253
  function buildAvatarThemeProperties(theme2) {
4397
4254
  return {
4398
4255
  [varNames.avatar.focusRing.offset]: px(theme2.avatar.focusRing.offset),
4399
4256
  [varNames.avatar.focusRing.width]: px(theme2.avatar.focusRing.width),
4400
- [varNames.avatar.sizes[0].distance]: px(theme2.avatar.sizes[0].distance),
4401
- [varNames.avatar.sizes[0].size]: px(theme2.avatar.sizes[0].size),
4402
- [varNames.avatar.sizes[1].distance]: px(theme2.avatar.sizes[1].distance),
4403
- [varNames.avatar.sizes[1].size]: px(theme2.avatar.sizes[1].size),
4404
- [varNames.avatar.sizes[2].distance]: px(theme2.avatar.sizes[2].distance),
4405
- [varNames.avatar.sizes[2].size]: px(theme2.avatar.sizes[2].size),
4406
- [varNames.avatar.sizes[3].distance]: px(theme2.avatar.sizes[3].distance),
4407
- [varNames.avatar.sizes[3].size]: px(theme2.avatar.sizes[3].size)
4257
+ [varNames.avatar.sizes[0].distance]: rem(theme2.avatar.sizes[0].distance),
4258
+ [varNames.avatar.sizes[0].size]: rem(theme2.avatar.sizes[0].size),
4259
+ [varNames.avatar.sizes[1].distance]: rem(theme2.avatar.sizes[1].distance),
4260
+ [varNames.avatar.sizes[1].size]: rem(theme2.avatar.sizes[1].size),
4261
+ [varNames.avatar.sizes[2].distance]: rem(theme2.avatar.sizes[2].distance),
4262
+ [varNames.avatar.sizes[2].size]: rem(theme2.avatar.sizes[2].size),
4263
+ [varNames.avatar.sizes[3].distance]: rem(theme2.avatar.sizes[3].distance),
4264
+ [varNames.avatar.sizes[3].size]: rem(theme2.avatar.sizes[3].size)
4408
4265
  };
4409
4266
  }
4410
4267
  function buildButtonThemeProperties(theme2) {
@@ -4416,71 +4273,71 @@ function buildButtonThemeProperties(theme2) {
4416
4273
  }
4417
4274
  function buildContainerThemeProperties(theme2) {
4418
4275
  return {
4419
- [varNames.container[0]]: px(theme2.container[0]),
4420
- [varNames.container[1]]: px(theme2.container[1]),
4421
- [varNames.container[2]]: px(theme2.container[2]),
4422
- [varNames.container[3]]: px(theme2.container[3]),
4423
- [varNames.container[4]]: px(theme2.container[4]),
4424
- [varNames.container[5]]: px(theme2.container[5])
4276
+ [varNames.container[0]]: rem(theme2.container[0]),
4277
+ [varNames.container[1]]: rem(theme2.container[1]),
4278
+ [varNames.container[2]]: rem(theme2.container[2]),
4279
+ [varNames.container[3]]: rem(theme2.container[3]),
4280
+ [varNames.container[4]]: rem(theme2.container[4]),
4281
+ [varNames.container[5]]: rem(theme2.container[5])
4425
4282
  };
4426
4283
  }
4427
4284
  function buildFontCodeThemeProperties(theme$1) {
4428
- const props = {
4429
- [varNames.font.code.family]: theme$1.font.code.family,
4430
- [varNames.font.code.featureSettings]: theme$1.font.code.featureSettings,
4431
- [varNames.font.code.weights.regular]: `${theme$1.font.code.weights.regular}`,
4432
- [varNames.font.code.weights.medium]: `${theme$1.font.code.weights.medium}`,
4433
- [varNames.font.code.weights.semibold]: `${theme$1.font.code.weights.semibold}`,
4434
- [varNames.font.code.weights.bold]: `${theme$1.font.code.weights.bold}`
4285
+ const v = varNames.font.code, t = theme$1.font.code, props = {
4286
+ [v.family]: t.family,
4287
+ [v.featureSettings]: t.featureSettings || "normal",
4288
+ [v.weights.regular]: t.weights.regular,
4289
+ [v.weights.medium]: t.weights.medium,
4290
+ [v.weights.semibold]: t.weights.semibold,
4291
+ [v.weights.bold]: t.weights.bold
4435
4292
  };
4436
4293
  for (const size of theme.FONT_CODE_SIZE) {
4437
- const v = varNames.font.code.sizes[size], t = theme$1.font.code.sizes[size];
4438
- props[v.fontSize] = rem(t.fontSize), props[v.lineHeight] = rem(t.lineHeight), props[v.ascenderHeight] = px(t.ascenderHeight), props[v.descenderHeight] = px(t.descenderHeight), props[v.letterSpacing] = px(t.letterSpacing), props[v.iconSize] = px(t.iconSize);
4294
+ const _v = varNames.font.code.sizes[size], _t = theme$1.font.code.sizes[size];
4295
+ props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
4439
4296
  }
4440
4297
  return props;
4441
4298
  }
4442
4299
  function buildFontHeadingThemeProperties(theme$1) {
4443
- const props = {
4444
- [varNames.font.heading.family]: theme$1.font.heading.family,
4445
- [varNames.font.heading.featureSettings]: theme$1.font.heading.featureSettings,
4446
- [varNames.font.heading.weights.regular]: `${theme$1.font.heading.weights.regular}`,
4447
- [varNames.font.heading.weights.medium]: `${theme$1.font.heading.weights.medium}`,
4448
- [varNames.font.heading.weights.semibold]: `${theme$1.font.heading.weights.semibold}`,
4449
- [varNames.font.heading.weights.bold]: `${theme$1.font.heading.weights.bold}`
4300
+ const v = varNames.font.heading, t = theme$1.font.heading, props = {
4301
+ [v.family]: t.family,
4302
+ [v.featureSettings]: t.featureSettings,
4303
+ [v.weights.regular]: t.weights.regular,
4304
+ [v.weights.medium]: t.weights.medium,
4305
+ [v.weights.semibold]: t.weights.semibold,
4306
+ [v.weights.bold]: t.weights.bold
4450
4307
  };
4451
4308
  for (const size of theme.FONT_HEADING_SIZE) {
4452
- const v = varNames.font.heading.sizes[size], t = theme$1.font.heading.sizes[size];
4453
- props[v.fontSize] = rem(t.fontSize), props[v.lineHeight] = rem(t.lineHeight), props[v.ascenderHeight] = px(t.ascenderHeight), props[v.descenderHeight] = px(t.descenderHeight), props[v.letterSpacing] = px(t.letterSpacing), props[v.iconSize] = px(t.iconSize);
4309
+ const _v = v.sizes[size], _t = t.sizes[size];
4310
+ props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
4454
4311
  }
4455
4312
  return props;
4456
4313
  }
4457
4314
  function buildFontLabelThemeProperties(theme$1) {
4458
- const props = {
4459
- [varNames.font.label.family]: theme$1.font.label.family,
4460
- [varNames.font.label.featureSettings]: theme$1.font.label.featureSettings,
4461
- [varNames.font.label.weights.regular]: `${theme$1.font.label.weights.regular}`,
4462
- [varNames.font.label.weights.medium]: `${theme$1.font.label.weights.medium}`,
4463
- [varNames.font.label.weights.semibold]: `${theme$1.font.label.weights.semibold}`,
4464
- [varNames.font.label.weights.bold]: `${theme$1.font.label.weights.bold}`
4315
+ const v = varNames.font.label, t = theme$1.font.label, props = {
4316
+ [v.family]: t.family,
4317
+ [v.featureSettings]: t.featureSettings,
4318
+ [v.weights.regular]: t.weights.regular,
4319
+ [v.weights.medium]: t.weights.medium,
4320
+ [v.weights.semibold]: t.weights.semibold,
4321
+ [v.weights.bold]: t.weights.bold
4465
4322
  };
4466
4323
  for (const size of theme.FONT_LABEL_SIZE) {
4467
- const v = varNames.font.label.sizes[size], t = theme$1.font.label.sizes[size];
4468
- props[v.fontSize] = rem(t.fontSize), props[v.lineHeight] = rem(t.lineHeight), props[v.ascenderHeight] = px(t.ascenderHeight), props[v.descenderHeight] = px(t.descenderHeight), props[v.letterSpacing] = px(t.letterSpacing), props[v.iconSize] = px(t.iconSize);
4324
+ const _v = v.sizes[size], _t = t.sizes[size];
4325
+ props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
4469
4326
  }
4470
4327
  return props;
4471
4328
  }
4472
4329
  function buildFontTextThemeProperties(theme$1) {
4473
- const props = {
4474
- [varNames.font.text.family]: theme$1.font.text.family,
4475
- [varNames.font.text.featureSettings]: theme$1.font.text.featureSettings,
4476
- [varNames.font.text.weights.regular]: `${theme$1.font.text.weights.regular}`,
4477
- [varNames.font.text.weights.medium]: `${theme$1.font.text.weights.medium}`,
4478
- [varNames.font.text.weights.semibold]: `${theme$1.font.text.weights.semibold}`,
4479
- [varNames.font.text.weights.bold]: `${theme$1.font.text.weights.bold}`
4330
+ const v = varNames.font.text, t = theme$1.font.text, props = {
4331
+ [v.family]: t.family,
4332
+ [v.featureSettings]: t.featureSettings,
4333
+ [v.weights.regular]: t.weights.regular,
4334
+ [v.weights.medium]: t.weights.medium,
4335
+ [v.weights.semibold]: t.weights.semibold,
4336
+ [v.weights.bold]: t.weights.bold
4480
4337
  };
4481
4338
  for (const size of theme.FONT_TEXT_SIZE) {
4482
- const v = varNames.font.text.sizes[size], t = theme$1.font.text.sizes[size];
4483
- props[v.fontSize] = rem(t.fontSize), props[v.lineHeight] = rem(t.lineHeight), props[v.ascenderHeight] = px(t.ascenderHeight), props[v.descenderHeight] = px(t.descenderHeight), props[v.letterSpacing] = px(t.letterSpacing), props[v.iconSize] = px(t.iconSize);
4339
+ const _v = v.sizes[size], _t = t.sizes[size];
4340
+ props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
4484
4341
  }
4485
4342
  return props;
4486
4343
  }
@@ -4489,33 +4346,33 @@ function buildInputThemeProperties(theme2) {
4489
4346
  [varNames.input.border.width]: px(theme2.input.border.width),
4490
4347
  [varNames.input.checkbox.focusRing.offset]: px(theme2.input.checkbox.focusRing.offset),
4491
4348
  [varNames.input.checkbox.focusRing.width]: px(theme2.input.checkbox.focusRing.width),
4492
- [varNames.input.checkbox.size]: px(theme2.input.checkbox.size),
4349
+ [varNames.input.checkbox.size]: rem(theme2.input.checkbox.size),
4493
4350
  [varNames.input.radio.focusRing.offset]: px(theme2.input.radio.focusRing.offset),
4494
4351
  [varNames.input.radio.focusRing.width]: px(theme2.input.radio.focusRing.width),
4495
- [varNames.input.radio.markSize]: px(theme2.input.radio.markSize),
4496
- [varNames.input.radio.size]: px(theme2.input.radio.size),
4352
+ [varNames.input.radio.markSize]: rem(theme2.input.radio.markSize),
4353
+ [varNames.input.radio.size]: rem(theme2.input.radio.size),
4497
4354
  [varNames.input.select.focusRing.offset]: px(theme2.input.select.focusRing.offset),
4498
4355
  [varNames.input.select.focusRing.width]: px(theme2.input.select.focusRing.width),
4499
4356
  [varNames.input.switch.focusRing.offset]: px(theme2.input.switch.focusRing.offset),
4500
4357
  [varNames.input.switch.focusRing.width]: px(theme2.input.switch.focusRing.width),
4501
- [varNames.input.switch.height]: px(theme2.input.switch.height),
4502
- [varNames.input.switch.padding]: px(theme2.input.switch.padding),
4358
+ [varNames.input.switch.height]: rem(theme2.input.switch.height),
4359
+ [varNames.input.switch.padding]: rem(theme2.input.switch.padding),
4503
4360
  [varNames.input.switch.transitionDurationMs]: `${theme2.input.switch.transitionDurationMs}ms`,
4504
4361
  [varNames.input.switch.transitionTimingFunction]: theme2.input.switch.transitionTimingFunction,
4505
- [varNames.input.switch.width]: px(theme2.input.switch.width),
4362
+ [varNames.input.switch.width]: rem(theme2.input.switch.width),
4506
4363
  [varNames.input.text.focusRing.offset]: px(theme2.input.text.focusRing.offset),
4507
4364
  [varNames.input.text.focusRing.width]: px(theme2.input.text.focusRing.width)
4508
4365
  };
4509
4366
  }
4510
4367
  function buildRadiusThemeProperties(theme2) {
4511
4368
  return {
4512
- [varNames.radius[0]]: rem(theme2.radius[0]),
4513
- [varNames.radius[1]]: rem(theme2.radius[1]),
4514
- [varNames.radius[2]]: rem(theme2.radius[2]),
4515
- [varNames.radius[3]]: rem(theme2.radius[3]),
4516
- [varNames.radius[4]]: rem(theme2.radius[4]),
4517
- [varNames.radius[5]]: rem(theme2.radius[5]),
4518
- [varNames.radius[6]]: rem(theme2.radius[6])
4369
+ [varNames.radius[0]]: px(theme2.radius[0]),
4370
+ [varNames.radius[1]]: px(theme2.radius[1]),
4371
+ [varNames.radius[2]]: px(theme2.radius[2]),
4372
+ [varNames.radius[3]]: px(theme2.radius[3]),
4373
+ [varNames.radius[4]]: px(theme2.radius[4]),
4374
+ [varNames.radius[5]]: px(theme2.radius[5]),
4375
+ [varNames.radius[6]]: px(theme2.radius[6])
4519
4376
  };
4520
4377
  }
4521
4378
  function buildShadowThemeProperties(theme2) {
@@ -4542,17 +4399,17 @@ function buildShadowThemeProperties(theme2) {
4542
4399
  }
4543
4400
  function buildSpaceThemeProperties(theme2) {
4544
4401
  return {
4545
- [varNames.space[0]]: rem(theme2.space[0]),
4546
- [varNames.space[0.5]]: rem(theme2.space[1] / 2),
4547
- [varNames.space[1]]: rem(theme2.space[1]),
4548
- [varNames.space[2]]: rem(theme2.space[2]),
4549
- [varNames.space[3]]: rem(theme2.space[3]),
4550
- [varNames.space[4]]: rem(theme2.space[4]),
4551
- [varNames.space[5]]: rem(theme2.space[5]),
4552
- [varNames.space[6]]: rem(theme2.space[6]),
4553
- [varNames.space[7]]: rem(theme2.space[7]),
4554
- [varNames.space[8]]: rem(theme2.space[8]),
4555
- [varNames.space[9]]: rem(theme2.space[9])
4402
+ [varNames.space[0]]: px(theme2.space[0]),
4403
+ [varNames.space[0.5]]: px(theme2.space[1] / 2),
4404
+ [varNames.space[1]]: px(theme2.space[1]),
4405
+ [varNames.space[2]]: px(theme2.space[2]),
4406
+ [varNames.space[3]]: px(theme2.space[3]),
4407
+ [varNames.space[4]]: px(theme2.space[4]),
4408
+ [varNames.space[5]]: px(theme2.space[5]),
4409
+ [varNames.space[6]]: px(theme2.space[6]),
4410
+ [varNames.space[7]]: px(theme2.space[7]),
4411
+ [varNames.space[8]]: px(theme2.space[8]),
4412
+ [varNames.space[9]]: px(theme2.space[9])
4556
4413
  };
4557
4414
  }
4558
4415
  function buildColorThemeProperties(theme$1) {
@@ -4767,7 +4624,7 @@ function _inputPresentation() {
4767
4624
  return _comp("input-presentation");
4768
4625
  }
4769
4626
  function _selectable(props) {
4770
- return _comp("selectable", toneMap$2[props.tone ?? "default"], radius(props));
4627
+ return _comp("selectable", props.tone ?? "default", radius(props));
4771
4628
  }
4772
4629
  function avatar(props) {
4773
4630
  return _comp("avatar", props.color || "gray", _resp("avatar", props.size));
@@ -4822,13 +4679,13 @@ function button(props) {
4822
4679
  mode,
4823
4680
  tone
4824
4681
  } = props;
4825
- return _comp("button", variantMap[mode ?? "default"], toneMap$1[tone ?? "default"], display(props), flexItem(props), radius(props), width(props));
4682
+ return _comp("button", variantMap[mode ?? "default"], toneMap[tone ?? "default"], display(props), flexItem(props), radius(props), width(props));
4826
4683
  }
4827
4684
  function buttonLoadingBox() {
4828
4685
  return "button-loading-box";
4829
4686
  }
4830
4687
  function card(props) {
4831
- return _comp(props.scheme, toneMap[props.tone ?? "default"], "card", props.checkered && "card-checkered", shadow(props));
4688
+ return _comp(props.scheme, props.tone ?? "default", "card", props.checkered && "card-checkered", shadow(props));
4832
4689
  }
4833
4690
  function checkbox() {
4834
4691
  return _comp("checkbox");
@@ -4908,7 +4765,7 @@ function tooltipCard() {
4908
4765
  return _comp("tooltip-card");
4909
4766
  }
4910
4767
  function srOnly() {
4911
- return composeClassNames("sr-only");
4768
+ return _comp(composeClassNames("sr-only"));
4912
4769
  }
4913
4770
  exports.BREAKPOINTS = BREAKPOINTS;
4914
4771
  exports.PREFIX = PREFIX;
@@ -4916,6 +4773,7 @@ exports._arrow = _arrow;
4916
4773
  exports._arrowShape = _arrowShape;
4917
4774
  exports._arrowStroke = _arrowStroke;
4918
4775
  exports._arrowStrokeMask = _arrowStrokeMask;
4776
+ exports._getClassNames = _getClassNames;
4919
4777
  exports._input = _input;
4920
4778
  exports._inputElement = _inputElement;
4921
4779
  exports._inputPresentation = _inputPresentation;
@@ -4960,7 +4818,6 @@ exports.flex = flex;
4960
4818
  exports.flexItem = flexItem;
4961
4819
  exports.font = font;
4962
4820
  exports.gap = gap;
4963
- exports.getClassNames = getClassNames;
4964
4821
  exports.grid = grid;
4965
4822
  exports.gridItem = gridItem;
4966
4823
  exports.heading = heading;