@techsio/ui-kit 0.60.0 → 0.62.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.
Files changed (218) hide show
  1. package/README.md +59 -0
  2. package/dist/atoms/action-icon.js +9 -4
  3. package/dist/atoms/badge.js +59 -33
  4. package/dist/atoms/button.js +73 -54
  5. package/dist/atoms/checkbox.js +5 -1
  6. package/dist/atoms/hotkeys.js +5 -1
  7. package/dist/atoms/icon.js +9 -4
  8. package/dist/atoms/image.js +9 -2
  9. package/dist/atoms/input.js +10 -6
  10. package/dist/atoms/label.js +6 -1
  11. package/dist/atoms/link-button.js +9 -4
  12. package/dist/atoms/link.js +6 -1
  13. package/dist/atoms/numeric-input.js +11 -7
  14. package/dist/atoms/rating.js +5 -1
  15. package/dist/atoms/skeleton.js +22 -15
  16. package/dist/atoms/status-text.js +6 -1
  17. package/dist/atoms/textarea.js +23 -12
  18. package/dist/atoms/tooltip.js +10 -5
  19. package/dist/internal/molecules/vertical-navigation.styles.js +7 -7
  20. package/dist/molecules/accordion.js +20 -14
  21. package/dist/molecules/availability-status.js +2 -1
  22. package/dist/molecules/breadcrumb.js +9 -4
  23. package/dist/molecules/carousel.js +5 -1
  24. package/dist/molecules/cascade-select.js +8 -4
  25. package/dist/molecules/color-select.js +5 -1
  26. package/dist/molecules/combobox.js +8 -4
  27. package/dist/molecules/date-picker.js +26 -22
  28. package/dist/molecules/dialog.js +7 -3
  29. package/dist/molecules/drawer.js +9 -5
  30. package/dist/molecules/file-upload.js +9 -5
  31. package/dist/molecules/form-checkbox.js +5 -1
  32. package/dist/molecules/form-input.js +12 -2
  33. package/dist/molecules/form-numeric-input.js +11 -1
  34. package/dist/molecules/form-textarea.js +12 -2
  35. package/dist/molecules/menu.js +17 -7
  36. package/dist/molecules/pagination.js +13 -8
  37. package/dist/molecules/phone-input.js +5 -1
  38. package/dist/molecules/popover.js +10 -6
  39. package/dist/molecules/price-block.js +1 -1
  40. package/dist/molecules/product-card.js +5 -5
  41. package/dist/molecules/quantity-field.js +5 -1
  42. package/dist/molecules/radio-card.js +26 -21
  43. package/dist/molecules/radio-group.js +24 -19
  44. package/dist/molecules/search-form.js +8 -4
  45. package/dist/molecules/select.js +8 -4
  46. package/dist/molecules/slider.js +5 -1
  47. package/dist/molecules/steps.js +24 -14
  48. package/dist/molecules/switch.js +5 -1
  49. package/dist/molecules/tabs.js +13 -8
  50. package/dist/molecules/toast.js +3 -3
  51. package/dist/molecules/totals-summary.js +5 -5
  52. package/dist/molecules/tree-view.js +7 -2
  53. package/dist/molecules/vertical-navigation.js +23 -13
  54. package/dist/organisms/data-table.fields.js +2 -2
  55. package/dist/organisms/data-table.js +39 -23
  56. package/dist/organisms/footer.js +5 -1
  57. package/dist/organisms/gallery.js +1 -1
  58. package/dist/organisms/header.js +7 -3
  59. package/dist/organisms/line-item.js +2 -2
  60. package/dist/organisms/sidebar.js +5 -6
  61. package/dist/organisms/table.js +10 -5
  62. package/dist/src/atoms/action-icon.d.ts +5 -5
  63. package/dist/src/atoms/action-icon.d.ts.map +1 -1
  64. package/dist/src/atoms/badge.d.ts +55 -40
  65. package/dist/src/atoms/badge.d.ts.map +1 -1
  66. package/dist/src/atoms/button.d.ts +29 -18
  67. package/dist/src/atoms/button.d.ts.map +1 -1
  68. package/dist/src/atoms/checkbox.d.ts +2 -2
  69. package/dist/src/atoms/checkbox.d.ts.map +1 -1
  70. package/dist/src/atoms/hotkeys.d.ts +2 -2
  71. package/dist/src/atoms/hotkeys.d.ts.map +1 -1
  72. package/dist/src/atoms/icon.d.ts +5 -5
  73. package/dist/src/atoms/icon.d.ts.map +1 -1
  74. package/dist/src/atoms/image.d.ts +2 -2
  75. package/dist/src/atoms/image.d.ts.map +1 -1
  76. package/dist/src/atoms/input.d.ts +5 -5
  77. package/dist/src/atoms/input.d.ts.map +1 -1
  78. package/dist/src/atoms/label.d.ts +2 -2
  79. package/dist/src/atoms/label.d.ts.map +1 -1
  80. package/dist/src/atoms/link-button.d.ts +34 -29
  81. package/dist/src/atoms/link-button.d.ts.map +1 -1
  82. package/dist/src/atoms/link.d.ts +2 -2
  83. package/dist/src/atoms/link.d.ts.map +1 -1
  84. package/dist/src/atoms/numeric-input.d.ts +9 -8
  85. package/dist/src/atoms/numeric-input.d.ts.map +1 -1
  86. package/dist/src/atoms/rating.d.ts +2 -2
  87. package/dist/src/atoms/rating.d.ts.map +1 -1
  88. package/dist/src/atoms/skeleton.d.ts +9 -9
  89. package/dist/src/atoms/skeleton.d.ts.map +1 -1
  90. package/dist/src/atoms/status-text.d.ts +2 -2
  91. package/dist/src/atoms/status-text.d.ts.map +1 -1
  92. package/dist/src/atoms/textarea.d.ts +17 -8
  93. package/dist/src/atoms/textarea.d.ts.map +1 -1
  94. package/dist/src/atoms/tooltip.d.ts +7 -7
  95. package/dist/src/atoms/tooltip.d.ts.map +1 -1
  96. package/dist/src/internal/molecules/vertical-navigation.context.d.ts +2 -2
  97. package/dist/src/internal/molecules/vertical-navigation.context.d.ts.map +1 -1
  98. package/dist/src/internal/molecules/vertical-navigation.styles.d.ts +9 -9
  99. package/dist/src/internal/molecules/vertical-navigation.styles.d.ts.map +1 -1
  100. package/dist/src/molecules/accordion.d.ts +25 -14
  101. package/dist/src/molecules/accordion.d.ts.map +1 -1
  102. package/dist/src/molecules/availability-status.d.ts +1 -1
  103. package/dist/src/molecules/availability-status.d.ts.map +1 -1
  104. package/dist/src/molecules/breadcrumb.d.ts +6 -6
  105. package/dist/src/molecules/breadcrumb.d.ts.map +1 -1
  106. package/dist/src/molecules/carousel.d.ts +2 -2
  107. package/dist/src/molecules/carousel.d.ts.map +1 -1
  108. package/dist/src/molecules/cascade-select.d.ts +3 -3
  109. package/dist/src/molecules/cascade-select.d.ts.map +1 -1
  110. package/dist/src/molecules/color-select.d.ts +2 -2
  111. package/dist/src/molecules/color-select.d.ts.map +1 -1
  112. package/dist/src/molecules/combobox.d.ts +2 -2
  113. package/dist/src/molecules/combobox.d.ts.map +1 -1
  114. package/dist/src/molecules/command.d.ts +1 -1
  115. package/dist/src/molecules/date-picker.d.ts +5 -5
  116. package/dist/src/molecules/date-picker.d.ts.map +1 -1
  117. package/dist/src/molecules/dialog.d.ts +1 -1
  118. package/dist/src/molecules/dialog.d.ts.map +1 -1
  119. package/dist/src/molecules/drawer.d.ts +1 -1
  120. package/dist/src/molecules/drawer.d.ts.map +1 -1
  121. package/dist/src/molecules/file-upload.d.ts +2 -2
  122. package/dist/src/molecules/file-upload.d.ts.map +1 -1
  123. package/dist/src/molecules/form-checkbox.d.ts +1 -1
  124. package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
  125. package/dist/src/molecules/form-input.d.ts +2 -2
  126. package/dist/src/molecules/form-input.d.ts.map +1 -1
  127. package/dist/src/molecules/form-numeric-input.d.ts +2 -2
  128. package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
  129. package/dist/src/molecules/form-textarea.d.ts +2 -2
  130. package/dist/src/molecules/form-textarea.d.ts.map +1 -1
  131. package/dist/src/molecules/menu.d.ts +2 -2
  132. package/dist/src/molecules/menu.d.ts.map +1 -1
  133. package/dist/src/molecules/pagination.d.ts +15 -15
  134. package/dist/src/molecules/pagination.d.ts.map +1 -1
  135. package/dist/src/molecules/phone-input.d.ts +2 -2
  136. package/dist/src/molecules/phone-input.d.ts.map +1 -1
  137. package/dist/src/molecules/popover.d.ts +4 -4
  138. package/dist/src/molecules/popover.d.ts.map +1 -1
  139. package/dist/src/molecules/price-block.d.ts +1 -1
  140. package/dist/src/molecules/product-card.d.ts +7 -7
  141. package/dist/src/molecules/product-card.d.ts.map +1 -1
  142. package/dist/src/molecules/quantity-field.d.ts +2 -2
  143. package/dist/src/molecules/quantity-field.d.ts.map +1 -1
  144. package/dist/src/molecules/radio-card.d.ts +7 -7
  145. package/dist/src/molecules/radio-card.d.ts.map +1 -1
  146. package/dist/src/molecules/radio-group.d.ts +7 -7
  147. package/dist/src/molecules/radio-group.d.ts.map +1 -1
  148. package/dist/src/molecules/search-form.d.ts +3 -3
  149. package/dist/src/molecules/search-form.d.ts.map +1 -1
  150. package/dist/src/molecules/select.d.ts +1 -1
  151. package/dist/src/molecules/select.d.ts.map +1 -1
  152. package/dist/src/molecules/slider.d.ts +1 -1
  153. package/dist/src/molecules/slider.d.ts.map +1 -1
  154. package/dist/src/molecules/steps.d.ts +7 -7
  155. package/dist/src/molecules/steps.d.ts.map +1 -1
  156. package/dist/src/molecules/switch.d.ts +1 -1
  157. package/dist/src/molecules/switch.d.ts.map +1 -1
  158. package/dist/src/molecules/tabs.d.ts +8 -8
  159. package/dist/src/molecules/tabs.d.ts.map +1 -1
  160. package/dist/src/molecules/totals-summary.d.ts +2 -2
  161. package/dist/src/molecules/tour.d.ts +1 -1
  162. package/dist/src/molecules/tree-view.d.ts +1 -1
  163. package/dist/src/molecules/tree-view.d.ts.map +1 -1
  164. package/dist/src/molecules/vertical-navigation.d.ts +13 -11
  165. package/dist/src/molecules/vertical-navigation.d.ts.map +1 -1
  166. package/dist/src/organisms/data-table.d.ts +5 -5
  167. package/dist/src/organisms/data-table.d.ts.map +1 -1
  168. package/dist/src/organisms/footer.d.ts +2 -2
  169. package/dist/src/organisms/footer.d.ts.map +1 -1
  170. package/dist/src/organisms/gallery.d.ts +1 -1
  171. package/dist/src/organisms/header.d.ts +2 -2
  172. package/dist/src/organisms/header.d.ts.map +1 -1
  173. package/dist/src/organisms/line-item.d.ts +2 -2
  174. package/dist/src/organisms/line-item.d.ts.map +1 -1
  175. package/dist/src/organisms/sidebar.d.ts +4 -3
  176. package/dist/src/organisms/sidebar.d.ts.map +1 -1
  177. package/dist/src/organisms/table.d.ts +5 -5
  178. package/dist/src/organisms/table.d.ts.map +1 -1
  179. package/dist/src/templates/accordion.d.ts +2 -2
  180. package/dist/src/templates/accordion.d.ts.map +1 -1
  181. package/dist/src/templates/breadcrumb.d.ts +1 -1
  182. package/dist/src/templates/carousel.d.ts +1 -1
  183. package/dist/src/templates/facet-filter-panel.d.ts +1 -1
  184. package/dist/src/templates/facet-filter-panel.d.ts.map +1 -1
  185. package/dist/src/templates/gallery.d.ts +1 -1
  186. package/dist/src/templates/numeric-input.d.ts +1 -1
  187. package/dist/src/templates/popover.d.ts +1 -1
  188. package/dist/src/templates/product-card.d.ts +1 -1
  189. package/dist/src/templates/select.d.ts +1 -1
  190. package/dist/src/templates/tabs.d.ts +2 -2
  191. package/dist/src/templates/tabs.d.ts.map +1 -1
  192. package/dist/src/theme/theme-config.d.ts +11 -0
  193. package/dist/src/theme/theme-config.d.ts.map +1 -1
  194. package/dist/src/theme/theme-provider.d.ts.map +1 -1
  195. package/dist/src/theme/ui-provider.d.ts +48 -0
  196. package/dist/src/theme/ui-provider.d.ts.map +1 -0
  197. package/dist/templates/accordion.js +1 -3
  198. package/dist/templates/facet-filter-panel.js +20 -9
  199. package/dist/templates/product-card.js +3 -3
  200. package/dist/templates/tabs.js +1 -3
  201. package/dist/theme/theme-config.js +12 -1
  202. package/dist/theme/theme-provider.js +6 -2
  203. package/dist/theme/theme-toggle.js +4 -4
  204. package/dist/theme/ui-provider.js +53 -0
  205. package/package.json +1 -1
  206. package/src/tokens/_foundation-overrides.css +1 -1
  207. package/src/tokens/_scheme-scopes.css +8 -0
  208. package/src/tokens/_semantic.css +1 -1
  209. package/src/tokens/components/atoms/_action-icon.css +1 -1
  210. package/src/tokens/components/atoms/_badge.css +13 -0
  211. package/src/tokens/components/atoms/_icon.css +1 -1
  212. package/src/tokens/components/molecules/_chart.css +1 -1
  213. package/src/tokens/components/molecules/_combobox.css +1 -1
  214. package/src/tokens/figma/akros/variables.css +1 -1
  215. package/src/tokens/figma/business/variables.css +1 -1
  216. package/src/tokens/figma/dark/variables.css +1 -1
  217. package/src/tokens/figma/light/variables.css +1 -1
  218. package/src/tokens/figma/n1/variables.css +1 -1
@@ -11,6 +11,7 @@ import { joinDescribedBy, useDescribedBy, useRegisterDescription } from "../inte
11
11
  import { subscribeOwnerFormReset } from "../internal/form-control-lifecycle.js";
12
12
  import { useEffectiveDisabled } from "../internal/use-effective-disabled.js";
13
13
  import { useUiMessages } from "../messages/ui-messages-provider.js";
14
+ import { useUIDefaults } from "../theme/ui-provider.js";
14
15
  import { tv } from "../utils.js";
15
16
  const searchFormVariants = tv({
16
17
  slots: {
@@ -77,7 +78,10 @@ function useSearchFormContext() {
77
78
  if (!context) throw new Error("SearchForm components must be used within SearchForm");
78
79
  return context;
79
80
  }
80
- function SearchForm({ size = "md", gapped = false, readOnly = false, disabled: explicitDisabled = false, validateStatus = "default", children, defaultValue = "", value, onValueChange, className, ref, onSubmit, ...props }) {
81
+ function SearchForm({ size: sizeProp, gapped = false, readOnly = false, disabled: explicitDisabled = false, validateStatus = "default", children, defaultValue = "", value, onValueChange, className, ref, onSubmit, ...props }) {
82
+ const { size = "md" } = useUIDefaults("SearchForm", {
83
+ size: sizeProp
84
+ }, searchFormVariants);
81
85
  const generatedId = useId();
82
86
  const inputId = `search-input-${generatedId}`;
83
87
  const [formElement, setFormElement] = useState(null);
@@ -249,7 +253,7 @@ SearchForm.Input = function({ className, placeholder, ref, ...props }) {
249
253
  "data-readonly": readOnly ? "" : void 0,
250
254
  disabled: disabled || props.disabled,
251
255
  readOnly: readOnly || props.readOnly,
252
- variant: "default" === validateStatus ? props.variant : validateStatus
256
+ validateStatus: "default" === validateStatus ? props.validateStatus : validateStatus
253
257
  })
254
258
  });
255
259
  };
@@ -281,7 +285,7 @@ SearchForm.Button = function({ className, children, showSearchIcon = false, icon
281
285
  children: children
282
286
  });
283
287
  };
284
- SearchForm.ClearButton = function({ className, icon = "token-icon-close", tone = "neutral", ...props }) {
288
+ SearchForm.ClearButton = function({ className, icon = "token-icon-close", severity = "neutral", ...props }) {
285
289
  const messages = useUiMessages();
286
290
  const { size, gapped, clearInput, hasValue, inputValue, clearSlot, setHasClearButton, readOnly, disabled } = useSearchFormContext();
287
291
  const styles = searchFormVariants({
@@ -302,8 +306,8 @@ SearchForm.ClearButton = function({ className, icon = "token-icon-close", tone =
302
306
  }),
303
307
  icon: icon,
304
308
  onClick: clearInput,
309
+ severity: severity,
305
310
  size: size,
306
- tone: tone,
307
311
  ...props
308
312
  }), clearSlot);
309
313
  };
@@ -14,6 +14,7 @@ import { OverlayPortal } from "../internal/overlay-portal.js";
14
14
  import { useEffectiveDisabled } from "../internal/use-effective-disabled.js";
15
15
  import { definedEntries } from "../messages/ui-messages.js";
16
16
  import { useUiMessages } from "../messages/ui-messages-provider.js";
17
+ import { useUIDefaults } from "../theme/ui-provider.js";
17
18
  import { tv } from "../utils.js";
18
19
  const selectResetValues = new WeakMap();
19
20
  const nativeSelectMachine = {
@@ -166,7 +167,10 @@ function useSelectItemContext() {
166
167
  if (!context) throw new Error("Select.Item components must be used within Select.Item");
167
168
  return context;
168
169
  }
169
- function Select({ items, id: providedId, size = "md", value, defaultValue, multiple = false, disabled: explicitDisabled = false, validateStatus = "default", required = false, readOnly = false, closeOnSelect = true, loopFocus = true, name, form, onValueChange, onOpenChange, onHighlightChange, className, children, ref, translations, ...machineProps }) {
170
+ function Select({ items, id: providedId, size: sizeProp, value, defaultValue, multiple = false, disabled: explicitDisabled = false, validateStatus = "default", required = false, readOnly = false, closeOnSelect = true, loopFocus = true, name, form, onValueChange, onOpenChange, onHighlightChange, className, children, ref, translations, ...machineProps }) {
171
+ const { size = "md" } = useUIDefaults("Select", {
172
+ size: sizeProp
173
+ }, selectVariants);
170
174
  const messages = useUiMessages();
171
175
  const generatedId = useId();
172
176
  const [disabledElement, setDisabledElement] = useState(null);
@@ -381,7 +385,7 @@ Select.Trigger = function({ children, className, size: sizeProp, iconSize, ref,
381
385
  }),
382
386
  ref: ref,
383
387
  size: "current",
384
- theme: "unstyled",
388
+ unstyled: true,
385
389
  ...mergeProps(api.getTriggerProps(), props),
386
390
  "aria-labelledby": props["aria-labelledby"] ?? (props["aria-label"] ? void 0 : api.getTriggerProps()["aria-labelledby"]),
387
391
  disabled: disabled || props.disabled,
@@ -444,8 +448,8 @@ Select.ClearTrigger = function({ className, ref, ...props }) {
444
448
  }),
445
449
  icon: "token-icon-select-clear",
446
450
  ref: ref,
451
+ severity: "neutral",
447
452
  size: toControlSize(size),
448
- tone: "neutral",
449
453
  ...mergeProps(api.getClearTriggerProps(), props),
450
454
  "aria-label": props["aria-label"] ?? messages.select.clear,
451
455
  disabled: disabled || props.disabled,
@@ -575,7 +579,7 @@ Select.ItemIndicator = function({ className, iconSize, ref, ...props }) {
575
579
  }), props),
576
580
  children: /*#__PURE__*/ jsx(Icon, {
577
581
  icon: "token-icon-select-check",
578
- size: iconSize
582
+ size: iconSize ?? "current"
579
583
  })
580
584
  });
581
585
  };
@@ -8,6 +8,7 @@ import { StatusText } from "../atoms/status-text.js";
8
8
  import { joinDescribedBy } from "../internal/described-by.js";
9
9
  import { subscribeOwnerFormReset } from "../internal/form-control-lifecycle.js";
10
10
  import { useEffectiveDisabled } from "../internal/use-effective-disabled.js";
11
+ import { useUIDefaults } from "../theme/ui-provider.js";
11
12
  import { slugify, tv } from "../utils.js";
12
13
  const sliderResetValues = new WeakMap();
13
14
  const nativeSliderMachine = {
@@ -247,7 +248,10 @@ const apiValueFallback = (value, defaultValue, fallbackValues)=>{
247
248
  function Slider({ id, name, form, label, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, validateStatus, helpText, showHelpTextIcon = true, value, origin, thumbAlignment = "center", defaultValue = [
248
249
  25,
249
250
  75
250
- ], min = 0, max = 100, step = 1, minStepsBetweenThumbs = 0, disabled: explicitDisabled = false, readOnly = false, dir = "ltr", orientation = "horizontal", size = "md", showMarkers = false, markerCount = 5, showValueText = false, formatRangeText, getAriaValueText, getThumbProps, formatValue = (val)=>val.toString(), className, onChange, onChangeEnd }) {
251
+ ], min = 0, max = 100, step = 1, minStepsBetweenThumbs = 0, disabled: explicitDisabled = false, readOnly = false, dir = "ltr", orientation = "horizontal", size: sizeProp, showMarkers = false, markerCount = 5, showValueText = false, formatRangeText, getAriaValueText, getThumbProps, formatValue = (val)=>val.toString(), className, onChange, onChangeEnd }) {
252
+ const { size = "md" } = useUIDefaults("Slider", {
253
+ size: sizeProp
254
+ }, sliderVariants);
251
255
  const generatedId = useId();
252
256
  const disabledProbeRef = useRef(null);
253
257
  const resetting = useRef(false);
@@ -7,6 +7,7 @@ import { flushSync } from "react-dom";
7
7
  import { Button } from "../atoms/button.js";
8
8
  import { Icon } from "../atoms/icon.js";
9
9
  import { useUiMessages } from "../messages/ui-messages-provider.js";
10
+ import { useUIDefaults } from "../theme/ui-provider.js";
10
11
  import { tv } from "../utils.js";
11
12
  const stepsVariants = tv({
12
13
  slots: {
@@ -113,7 +114,7 @@ const stepsVariants = tv({
113
114
  nextTrigger: ""
114
115
  },
115
116
  variants: {
116
- variant: {
117
+ appearance: {
117
118
  subtle: {
118
119
  item: "steps-connector-subtle"
119
120
  },
@@ -168,7 +169,7 @@ const stepsVariants = tv({
168
169
  }
169
170
  },
170
171
  defaultVariants: {
171
- variant: "subtle",
172
+ appearance: "subtle",
172
173
  size: "md"
173
174
  }
174
175
  });
@@ -338,7 +339,11 @@ function useNavigationFocus(api) {
338
339
  });
339
340
  };
340
341
  }
341
- function Steps({ size, variant, children, className, ref, ...props }) {
342
+ function Steps({ size: sizeProp, appearance: appearanceProp, children, className, ref, ...props }) {
343
+ const { size, appearance } = useUIDefaults("Steps", {
344
+ size: sizeProp,
345
+ appearance: appearanceProp
346
+ }, stepsVariants);
342
347
  const [machineProps, elementProps] = splitProps(props);
343
348
  const api = useSteps({
344
349
  count: 1,
@@ -351,7 +356,7 @@ function Steps({ size, variant, children, className, ref, ...props }) {
351
356
  const requestNavigationFocus = useNavigationFocus(api);
352
357
  const styles = stepsVariants({
353
358
  size,
354
- variant
359
+ appearance
355
360
  });
356
361
  const rootProps = mergeProps(elementProps, api.getRootProps());
357
362
  const contentRegistry = useStepsContentRegistry();
@@ -374,10 +379,14 @@ function Steps({ size, variant, children, className, ref, ...props }) {
374
379
  })
375
380
  });
376
381
  }
377
- Steps.RootProvider = function({ value, size, variant, children, className, ref, ...props }) {
382
+ Steps.RootProvider = function({ value, size: sizeProp, appearance: appearanceProp, children, className, ref, ...props }) {
383
+ const { size, appearance } = useUIDefaults("Steps", {
384
+ size: sizeProp,
385
+ appearance: appearanceProp
386
+ }, stepsVariants);
378
387
  const styles = stepsVariants({
379
388
  size,
380
- variant
389
+ appearance
381
390
  });
382
391
  const requestNavigationFocus = useNavigationFocus(value);
383
392
  const resolvedOrientation = getOrientationFromApi(value);
@@ -482,8 +491,8 @@ Steps.Trigger = function({ children, className, disabled, ref, ...props }) {
482
491
  }),
483
492
  ref: ref,
484
493
  size: "current",
485
- theme: "unstyled",
486
494
  type: "button",
495
+ unstyled: true,
487
496
  ...buttonProps,
488
497
  "aria-controls": contentIndexes.has(index) ? buttonProps["aria-controls"] : void 0,
489
498
  "aria-current": props["aria-current"] ?? ariaCurrent,
@@ -524,7 +533,8 @@ Steps.Indicator = function({ children, className, ref, ...props }) {
524
533
  children: children ?? /*#__PURE__*/ jsx(Steps.Status, {
525
534
  complete: /*#__PURE__*/ jsx(Icon, {
526
535
  className: styles.indicatorIcon(),
527
- icon: "token-icon-steps-check"
536
+ icon: "token-icon-steps-check",
537
+ size: "current"
528
538
  }),
529
539
  current: /*#__PURE__*/ jsx(Steps.Number, {}),
530
540
  incomplete: /*#__PURE__*/ jsx(Steps.Number, {})
@@ -658,20 +668,20 @@ Steps.CompletedContent = function({ children, className, ref, ...props }) {
658
668
  children: children
659
669
  });
660
670
  };
661
- Steps.PrevTrigger = function({ className, ref, size, theme = "outlined", variant = "secondary", ...props }) {
671
+ Steps.PrevTrigger = function({ className, ref, size, appearance = "outline", severity = "secondary", ...props }) {
662
672
  const { api, styles, size: rootSize, requestNavigationFocus } = useStepsContext();
663
673
  const { onClick: onPrevTriggerClick, disabled: prevTriggerDisabled, ...restPrevTriggerProps } = api.getPrevTriggerProps();
664
674
  const { onClick, disabled, ...restProps } = props;
665
675
  const buttonProps = mergeProps(restProps, restPrevTriggerProps);
666
676
  const isDisabled = Boolean(disabled || prevTriggerDisabled);
667
677
  return /*#__PURE__*/ jsx(Button, {
678
+ appearance: appearance,
668
679
  className: styles.prevTrigger({
669
680
  className
670
681
  }),
671
682
  ref: ref,
683
+ severity: severity,
672
684
  size: size ?? getControlSize(rootSize),
673
- theme: theme,
674
- variant: variant,
675
685
  ...buttonProps,
676
686
  disabled: isDisabled,
677
687
  onClick: (event)=>{
@@ -682,20 +692,20 @@ Steps.PrevTrigger = function({ className, ref, size, theme = "outlined", variant
682
692
  }
683
693
  });
684
694
  };
685
- Steps.NextTrigger = function({ className, ref, size, theme = "solid", variant = "primary", ...props }) {
695
+ Steps.NextTrigger = function({ className, ref, size, appearance = "solid", severity = "primary", ...props }) {
686
696
  const { api, styles, size: rootSize, requestNavigationFocus } = useStepsContext();
687
697
  const { onClick: onNextTriggerClick, disabled: nextTriggerDisabled, ...restNextTriggerProps } = api.getNextTriggerProps();
688
698
  const { onClick, disabled, ...restProps } = props;
689
699
  const buttonProps = mergeProps(restProps, restNextTriggerProps);
690
700
  const isDisabled = Boolean(disabled || nextTriggerDisabled);
691
701
  return /*#__PURE__*/ jsx(Button, {
702
+ appearance: appearance,
692
703
  className: styles.nextTrigger({
693
704
  className
694
705
  }),
695
706
  ref: ref,
707
+ severity: severity,
696
708
  size: size ?? getControlSize(rootSize),
697
- theme: theme,
698
- variant: variant,
699
709
  ...buttonProps,
700
710
  disabled: isDisabled,
701
711
  onClick: (event)=>{
@@ -7,6 +7,7 @@ import { Label } from "../atoms/label.js";
7
7
  import { StatusText } from "../atoms/status-text.js";
8
8
  import { commitChoiceClick, getControlledChoiceInputProps, isSilentChoiceReset, mergeChoiceInputProps, runSilentChoiceReset, trackChoiceFormControl, useChoiceInputRef } from "../internal/choice-control.js";
9
9
  import { joinDescribedBy } from "../internal/described-by.js";
10
+ import { useUIDefaults } from "../theme/ui-provider.js";
10
11
  import { tv } from "../utils.js";
11
12
  const switchChoiceMachine = {
12
13
  ...machine,
@@ -90,7 +91,10 @@ const switchVariants = tv({
90
91
  size: "md"
91
92
  }
92
93
  });
93
- function Switch({ ref, inputProps: nativeInputProps = {}, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, id, "aria-describedby": ariaDescribedBy, size = "md", name, value, checked, defaultChecked, disabled = false, readOnly = false, required = false, requiredLabel, dir = "ltr", children, className, onCheckedChange, validateStatus = "default", helpText, showHelpTextIcon = true }) {
94
+ function Switch({ ref, inputProps: nativeInputProps = {}, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, id, "aria-describedby": ariaDescribedBy, size: sizeProp, name, value, checked, defaultChecked, disabled = false, readOnly = false, required = false, requiredLabel, dir = "ltr", children, className, onCheckedChange, validateStatus = "default", helpText, showHelpTextIcon = true }) {
95
+ const { size = "md" } = useUIDefaults("Switch", {
96
+ size: sizeProp
97
+ }, switchVariants);
94
98
  const generatedId = useId();
95
99
  const uniqueId = id || generatedId;
96
100
  const helpTextId = useId();
@@ -4,6 +4,7 @@ import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
4
4
  import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
5
5
  import { Button } from "../atoms/button.js";
6
6
  import { useUiMessages } from "../messages/ui-messages-provider.js";
7
+ import { useUIDefaults } from "../theme/ui-provider.js";
7
8
  import { tv } from "../utils.js";
8
9
  import * as __rspack_external__zag_js_tabs_b98983a9 from "@zag-js/tabs";
9
10
  const tabsVariants = tv({
@@ -50,8 +51,8 @@ const tabsVariants = tv({
50
51
  ]
51
52
  },
52
53
  variants: {
53
- variant: {
54
- default: {
54
+ appearance: {
55
+ underline: {
55
56
  trigger: "tabs-trigger-selected",
56
57
  indicator: "hidden"
57
58
  },
@@ -105,7 +106,7 @@ const tabsVariants = tv({
105
106
  }
106
107
  },
107
108
  defaultVariants: {
108
- variant: "default",
109
+ appearance: "underline",
109
110
  size: "md",
110
111
  fitted: false,
111
112
  justify: "start"
@@ -162,7 +163,11 @@ function reconcileTabFocus(root, triggers, enabled, previous, api, target, lastF
162
163
  for (const trigger of triggers)trigger.tabIndex = trigger === entryTarget ? 0 : -1;
163
164
  if (restoreOwnedTabFocus(root, lastFocused.current, replacement)) lastFocused.current = null;
164
165
  }
165
- function Tabs({ id, defaultValue, value, orientation = "horizontal", dir = "ltr", activationMode = "automatic", loopFocus = true, onValueChange, variant, size, fitted, justify, children, ref, className, ...props }) {
166
+ function Tabs({ id, defaultValue, value, orientation = "horizontal", dir = "ltr", activationMode = "automatic", loopFocus = true, onValueChange, appearance: appearanceProp, size: sizeProp, fitted, justify, children, ref, className, ...props }) {
167
+ const { size, appearance } = useUIDefaults("Tabs", {
168
+ size: sizeProp,
169
+ appearance: appearanceProp
170
+ }, tabsVariants);
166
171
  const generatedId = useId();
167
172
  const uniqueId = id || generatedId;
168
173
  const rootElement = useRef(null);
@@ -185,7 +190,7 @@ function Tabs({ id, defaultValue, value, orientation = "horizontal", dir = "ltr"
185
190
  });
186
191
  const api = __rspack_external__zag_js_tabs_b98983a9.connect(service, normalizeProps);
187
192
  const styles = tabsVariants({
188
- variant,
193
+ appearance,
189
194
  size,
190
195
  fitted,
191
196
  justify
@@ -221,7 +226,7 @@ function Tabs({ id, defaultValue, value, orientation = "horizontal", dir = "ltr"
221
226
  return /*#__PURE__*/ jsx(TabsContext.Provider, {
222
227
  value: {
223
228
  api,
224
- variant,
229
+ appearance,
225
230
  size,
226
231
  fitted,
227
232
  justify,
@@ -263,7 +268,7 @@ Tabs.List = function({ children, ref, className, ...props }) {
263
268
  children: children
264
269
  });
265
270
  };
266
- Tabs.Trigger = function({ value, disabled, children, ref, className, size = "current", theme = "unstyled", type = "button", ...props }) {
271
+ Tabs.Trigger = function({ value, disabled, children, ref, className, size = "current", unstyled, type = "button", ...props }) {
267
272
  const { api, contentValues, styles } = useTabsContext();
268
273
  const triggerProps = mergeProps(api.getTriggerProps({
269
274
  value,
@@ -299,8 +304,8 @@ Tabs.Trigger = function({ value, disabled, children, ref, className, size = "cur
299
304
  if (ref) ref.current = node;
300
305
  },
301
306
  size: size,
302
- theme: theme,
303
307
  type: type,
308
+ unstyled: unstyled ?? (void 0 === props.appearance && void 0 === props.severity),
304
309
  children: children
305
310
  });
306
311
  };
@@ -96,8 +96,8 @@ function Toast({ actor, index, parent, placement, closeLabel, loadingLabel }) {
96
96
  api.closable && /*#__PURE__*/ jsx(ActionIcon, {
97
97
  className: closeButton(),
98
98
  icon: "token-icon-toast-close",
99
+ severity: "neutral",
99
100
  size: "sm",
100
- tone: "neutral",
101
101
  ...api.getCloseTriggerProps(),
102
102
  "aria-label": closeLabel ?? messages.toast.close
103
103
  })
@@ -110,10 +110,10 @@ function Toast({ actor, index, parent, placement, closeLabel, loadingLabel }) {
110
110
  children: api.description
111
111
  }),
112
112
  actor.action && /*#__PURE__*/ jsx(Button, {
113
+ appearance: "outline",
113
114
  className: "mt-toast-description self-start",
115
+ severity: "secondary",
114
116
  size: "sm",
115
- theme: "outlined",
116
- variant: "secondary",
117
117
  ...api.getActionTriggerProps(),
118
118
  children: actor.action.label
119
119
  }),
@@ -16,8 +16,8 @@ const totalsSummaryVariants = tv({
16
16
  pending: "text-totals-summary-note-fg text-totals-summary-note-size"
17
17
  },
18
18
  variants: {
19
- emphasis: {
20
- default: {
19
+ severity: {
20
+ neutral: {
21
21
  row: ""
22
22
  },
23
23
  discount: {
@@ -26,7 +26,7 @@ const totalsSummaryVariants = tv({
26
26
  }
27
27
  },
28
28
  defaultVariants: {
29
- emphasis: "default"
29
+ severity: "neutral"
30
30
  }
31
31
  });
32
32
  function TotalsSummary({ rows, totalLabel, totalValue, footer, actions, pending, pendingLabel, className, "aria-describedby": describedBy, ...props }) {
@@ -48,9 +48,9 @@ function TotalsSummary({ rows, totalLabel, totalValue, footer, actions, pending,
48
48
  /*#__PURE__*/ jsxs("dl", {
49
49
  className: styles.list(),
50
50
  children: [
51
- rows.map(({ id, label, value, emphasis, note })=>/*#__PURE__*/ jsxs("div", {
51
+ rows.map(({ id, label, value, severity, note })=>/*#__PURE__*/ jsxs("div", {
52
52
  className: totalsSummaryVariants({
53
- emphasis
53
+ severity
54
54
  }).row(),
55
55
  children: [
56
56
  /*#__PURE__*/ jsx("dt", {
@@ -6,6 +6,7 @@ import { createContext, useContext, useEffect, useId, useMemo, useRef, useState
6
6
  import { Icon } from "../atoms/icon.js";
7
7
  import { definedEntries } from "../messages/ui-messages.js";
8
8
  import { useUiMessages } from "../messages/ui-messages-provider.js";
9
+ import { useUIDefaults } from "../theme/ui-provider.js";
9
10
  import { tv } from "../utils.js";
10
11
  function inheritDisabledState(nodes, parentDisabled = false) {
11
12
  return nodes.map((node)=>{
@@ -166,7 +167,10 @@ function useTreeViewNodeContext() {
166
167
  if (!context) throw new Error("TreeView node components must be used within a node provider");
167
168
  return context;
168
169
  }
169
- function TreeView({ data, size, selectionBehavior = "all", children, className, ...props }) {
170
+ function TreeView({ data, size: sizeProp, selectionBehavior = "all", children, className, ...props }) {
171
+ const { size } = useUIDefaults("TreeView", {
172
+ size: sizeProp
173
+ }, treeViewVariants);
170
174
  const messages = useUiMessages();
171
175
  const generatedId = useId();
172
176
  const [machineProps, rootProps] = splitProps(props);
@@ -551,7 +555,8 @@ TreeView.NodeIcon = function({ icon, className, ...props }) {
551
555
  "data-state": nodeState.expanded ? "open" : "closed",
552
556
  ...props,
553
557
  children: /*#__PURE__*/ jsx(Icon, {
554
- icon: iconToShow
558
+ icon: iconToShow,
559
+ size: "current"
555
560
  })
556
561
  });
557
562
  };
@@ -9,7 +9,11 @@ import { Icon } from "../atoms/icon.js";
9
9
  import { LinkButton } from "../atoms/link-button.js";
10
10
  import { VerticalNavigationBranchContext, VerticalNavigationContext, VerticalNavigationDepthContext, useVerticalNavigationBranchContext, useVerticalNavigationContext } from "../internal/molecules/vertical-navigation.context.js";
11
11
  import { verticalNavigationStyles } from "../internal/molecules/vertical-navigation.styles.js";
12
- function VerticalNavigation({ size = "md", maxIndentDepth = 3, dir, className, children, ...props }) {
12
+ import { useUIDefaults } from "../theme/ui-provider.js";
13
+ function VerticalNavigation({ size: sizeProp, maxIndentDepth = 3, dir, className, children, ...props }) {
14
+ const { size = "md" } = useUIDefaults("VerticalNavigation", {
15
+ size: sizeProp
16
+ }, verticalNavigationStyles);
13
17
  return /*#__PURE__*/ jsx(VerticalNavigationContext.Provider, {
14
18
  value: {
15
19
  size,
@@ -98,7 +102,7 @@ VerticalNavigation.Link = function({ current = false, className, ...props }) {
98
102
  "data-part": "link",
99
103
  "data-scope": "vertical-navigation",
100
104
  size: "current",
101
- theme: "unstyled"
105
+ unstyled: true
102
106
  });
103
107
  };
104
108
  VerticalNavigation.Branch = function({ id, open, defaultOpen, onOpenChange, disabled, getRootNode, containsCurrent = false, children, className, ...props }) {
@@ -147,7 +151,7 @@ VerticalNavigation.BranchTrigger = function({ className, disabled, ...props }) {
147
151
  "data-scope": "vertical-navigation",
148
152
  disabled: disabled || api.disabled,
149
153
  size: "current",
150
- theme: "unstyled"
154
+ unstyled: true
151
155
  });
152
156
  };
153
157
  VerticalNavigation.BranchIndicator = function({ className, ...props }) {
@@ -169,40 +173,46 @@ VerticalNavigation.BranchIndicator = function({ className, ...props }) {
169
173
  })
170
174
  });
171
175
  };
172
- VerticalNavigation.BranchContent = function({ tone = "plain", variant = "primary", indent = true, showGuide = false, className, ...props }) {
176
+ VerticalNavigation.BranchContent = function({ appearance: appearanceProp, severity = "primary", indent = true, showGuide = false, className, ...props }) {
177
+ const { appearance = "plain" } = useUIDefaults("VerticalNavigation", {
178
+ appearance: appearanceProp
179
+ }, verticalNavigationStyles);
173
180
  const { maxIndentDepth } = useVerticalNavigationContext();
174
181
  const { api } = useVerticalNavigationBranchContext();
175
182
  const depth = useContext(VerticalNavigationDepthContext);
176
183
  return /*#__PURE__*/ jsx("div", {
177
184
  ...mergeProps(props, api.getContentProps()),
178
185
  className: verticalNavigationStyles({
179
- tone,
180
- variant
186
+ appearance,
187
+ severity
181
188
  }).content({
182
189
  className
183
190
  }),
191
+ "data-appearance": appearance,
184
192
  "data-guide": showGuide || void 0,
185
193
  "data-indented": indent && depth <= maxIndentDepth || void 0,
186
194
  "data-part": "branch-content",
187
195
  "data-scope": "vertical-navigation",
188
- "data-tone": tone,
189
- "data-variant": variant
196
+ "data-severity": severity
190
197
  });
191
198
  };
192
- VerticalNavigation.Group = function({ tone = "plain", variant = "primary", className, ...props }) {
199
+ VerticalNavigation.Group = function({ appearance: appearanceProp, severity = "primary", className, ...props }) {
193
200
  useVerticalNavigationContext();
201
+ const { appearance = "plain" } = useUIDefaults("VerticalNavigation", {
202
+ appearance: appearanceProp
203
+ }, verticalNavigationStyles);
194
204
  return /*#__PURE__*/ jsx("div", {
195
205
  ...props,
196
206
  className: verticalNavigationStyles({
197
- tone,
198
- variant
207
+ appearance,
208
+ severity
199
209
  }).group({
200
210
  className
201
211
  }),
212
+ "data-appearance": appearance,
202
213
  "data-part": "group",
203
214
  "data-scope": "vertical-navigation",
204
- "data-tone": tone,
205
- "data-variant": variant
215
+ "data-severity": severity
206
216
  });
207
217
  };
208
218
  VerticalNavigation.GroupLabel = function({ className, ...props }) {
@@ -179,8 +179,8 @@ function FilterConditionMenu({ operators, operatorLabels, value, onChange, disab
179
179
  }),
180
180
  disabled: disabled,
181
181
  icon: "icon-[mdi--filter-variant]",
182
- size: size,
183
- tone: "neutral"
182
+ severity: "neutral",
183
+ size: size
184
184
  }),
185
185
  items: labelled.map((o)=>({
186
186
  type: "radio",