@cube-dev/ui-kit 0.149.1 → 0.150.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 (492) hide show
  1. package/dist/CHANGELOG.md +36 -0
  2. package/dist/_internal/hooks/use-chained-callback.js +1 -1
  3. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  4. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  5. package/dist/_internal/hooks/use-event.js +1 -1
  6. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  7. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  8. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  9. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  10. package/dist/_internal/hooks/use-warn.js +1 -1
  11. package/dist/components/Block.js +1 -1
  12. package/dist/components/CollectionItem.js +1 -1
  13. package/dist/components/GlobalStyles.js +7 -7
  14. package/dist/components/GlobalStyles.js.map +1 -1
  15. package/dist/components/GridProvider.js +1 -1
  16. package/dist/components/HiddenInput.js +1 -1
  17. package/dist/components/Root.js +1 -1
  18. package/dist/components/actions/Action/Action.js +1 -1
  19. package/dist/components/actions/Banner/Banner.js +1 -1
  20. package/dist/components/actions/Button/Button.js +1 -1
  21. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  22. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  23. package/dist/components/actions/ButtonSplit/context.js +1 -1
  24. package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
  25. package/dist/components/actions/CommandMenu/styled.js +1 -1
  26. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  27. package/dist/components/actions/ItemActionContext.js +1 -1
  28. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  29. package/dist/components/actions/Link/Link.js +1 -1
  30. package/dist/components/actions/Menu/Menu.js +1 -1
  31. package/dist/components/actions/Menu/MenuItem.js +1 -1
  32. package/dist/components/actions/Menu/MenuSection.js +1 -1
  33. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  34. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  35. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  36. package/dist/components/actions/Menu/context.js +1 -1
  37. package/dist/components/actions/Menu/styled.js +1 -1
  38. package/dist/components/actions/index.js +1 -1
  39. package/dist/components/actions/use-action.js +1 -1
  40. package/dist/components/actions/use-action.js.map +1 -1
  41. package/dist/components/actions/use-anchored-menu.js +1 -1
  42. package/dist/components/actions/use-context-menu.js +1 -1
  43. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  44. package/dist/components/content/Alert/Alert.js +1 -1
  45. package/dist/components/content/Alert/use-alert.js +1 -1
  46. package/dist/components/content/Avatar/Avatar.js +1 -1
  47. package/dist/components/content/Badge/Badge.js +1 -1
  48. package/dist/components/content/Card/Card.js +1 -1
  49. package/dist/components/content/Content.js +1 -1
  50. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  51. package/dist/components/content/CopySnippet/CopySnippet.js +5 -1
  52. package/dist/components/content/CopySnippet/CopySnippet.js.map +1 -1
  53. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  54. package/dist/components/content/Divider.js +1 -1
  55. package/dist/components/content/Footer.js +1 -1
  56. package/dist/components/content/Header.js +1 -1
  57. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  58. package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
  59. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  60. package/dist/components/content/Item/Item.js +1 -1
  61. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  62. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  63. package/dist/components/content/Layout/GridLayout.js +1 -1
  64. package/dist/components/content/Layout/Layout.js +1 -1
  65. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  66. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  67. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  68. package/dist/components/content/Layout/LayoutContent.js +1 -1
  69. package/dist/components/content/Layout/LayoutContext.js +1 -1
  70. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  71. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  72. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  73. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  74. package/dist/components/content/Layout/LayoutPane.js +1 -1
  75. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  76. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  77. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  78. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  79. package/dist/components/content/Layout/index.js +1 -1
  80. package/dist/components/content/Layout/utils.js +1 -1
  81. package/dist/components/content/Paragraph.js +1 -1
  82. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  83. package/dist/components/content/PrismCode/PrismCode.js +6 -2
  84. package/dist/components/content/PrismCode/PrismCode.js.map +1 -1
  85. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  86. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  87. package/dist/components/content/Result/Result.js +1 -1
  88. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  89. package/dist/components/content/Tag/Tag.js +1 -1
  90. package/dist/components/content/Text.js +1 -1
  91. package/dist/components/content/TextItem/TextItem.js +1 -1
  92. package/dist/components/content/Title.js +1 -1
  93. package/dist/components/content/Tree/Tree.js +1 -1
  94. package/dist/components/content/Tree/TreeNode.js +1 -1
  95. package/dist/components/content/Tree/styled.js +1 -1
  96. package/dist/components/content/Tree/tree-index.js +1 -1
  97. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  98. package/dist/components/content/Tree/use-load-data.js +1 -1
  99. package/dist/components/content/highlightText.js +1 -1
  100. package/dist/components/content/use-auto-tooltip.js +1 -1
  101. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  102. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  103. package/dist/components/fields/Checkbox/context.js +1 -1
  104. package/dist/components/fields/ComboBox/ComboBox.js +1 -1
  105. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  106. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  107. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  108. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  109. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  110. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  111. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  112. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  113. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  114. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  115. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  116. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  117. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  118. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  119. package/dist/components/fields/DatePicker/props.js +1 -1
  120. package/dist/components/fields/DatePicker/utils.js +1 -1
  121. package/dist/components/fields/FileInput/FileInput.js +1 -1
  122. package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
  123. package/dist/components/fields/FilterPicker/FilterPicker.js +2 -1
  124. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  125. package/dist/components/fields/Input/Input.js +1 -1
  126. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  127. package/dist/components/fields/ListBox/ListBox.js +1 -1
  128. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
  129. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  130. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  131. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  132. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  133. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  134. package/dist/components/fields/Picker/Picker.js +1 -1
  135. package/dist/components/fields/RadioGroup/Radio.js +1 -1
  136. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  137. package/dist/components/fields/RadioGroup/context.js +1 -1
  138. package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
  139. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  140. package/dist/components/fields/Select/Select.js +1 -1
  141. package/dist/components/fields/Slider/Gradation.js +1 -1
  142. package/dist/components/fields/Slider/HueSlider.js +1 -1
  143. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  144. package/dist/components/fields/Slider/Slider.js +1 -1
  145. package/dist/components/fields/Slider/SliderBase.js +1 -1
  146. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  147. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  148. package/dist/components/fields/Slider/elements.js +1 -1
  149. package/dist/components/fields/Slider/index.js +1 -1
  150. package/dist/components/fields/Switch/Switch.js +1 -1
  151. package/dist/components/fields/TextArea/TextArea.js +1 -1
  152. package/dist/components/fields/TextInput/TextInput.js +1 -1
  153. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  154. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  155. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  156. package/dist/components/form/Form/Field.js +1 -1
  157. package/dist/components/form/Form/Form.js +1 -1
  158. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  159. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  160. package/dist/components/form/Form/SubmitError.js +1 -1
  161. package/dist/components/form/Form/index.js +1 -1
  162. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  163. package/dist/components/form/Form/use-field/use-field.js +1 -1
  164. package/dist/components/form/Form/use-form.js +1 -1
  165. package/dist/components/form/Form/validation.js +1 -1
  166. package/dist/components/form/Label.js +1 -1
  167. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  168. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  169. package/dist/components/form/validation/use-validation-props.js +1 -1
  170. package/dist/components/form/wrapper.js +1 -1
  171. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  172. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  173. package/dist/components/layout/Board/Board.js +1 -1
  174. package/dist/components/layout/Board/BoardProvider.js +1 -1
  175. package/dist/components/layout/Board/BoardResponsive.js +1 -1
  176. package/dist/components/layout/Board/Widget.js +1 -1
  177. package/dist/components/layout/Board/WidgetHost.js +1 -1
  178. package/dist/components/layout/Board/board-context.js +1 -1
  179. package/dist/components/layout/Board/board-store.js +1 -1
  180. package/dist/components/layout/Board/grid-core/calculate.js +1 -1
  181. package/dist/components/layout/Board/grid-core/collision.js +1 -1
  182. package/dist/components/layout/Board/grid-core/compactors.js +1 -1
  183. package/dist/components/layout/Board/grid-core/constraints.js +1 -1
  184. package/dist/components/layout/Board/grid-core/layout.js +1 -1
  185. package/dist/components/layout/Board/grid-core/sort.js +1 -1
  186. package/dist/components/layout/Board/index.js +1 -1
  187. package/dist/components/layout/Board/responsive-utils.js +1 -1
  188. package/dist/components/layout/Board/use-board-layout.js +1 -1
  189. package/dist/components/layout/Board/use-board-registry.js +1 -1
  190. package/dist/components/layout/Flex.js +1 -1
  191. package/dist/components/layout/Flow.js +1 -1
  192. package/dist/components/layout/Grid.js +1 -1
  193. package/dist/components/layout/Panel.js +1 -1
  194. package/dist/components/layout/Prefix.js +1 -1
  195. package/dist/components/layout/ResizablePanel.js +1 -1
  196. package/dist/components/layout/Space.js +1 -1
  197. package/dist/components/layout/Suffix.js +1 -1
  198. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  199. package/dist/components/navigation/Tabs/TabButton.js +1 -1
  200. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  201. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  202. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  203. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  204. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  205. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  206. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  207. package/dist/components/navigation/Tabs/styled.js +1 -1
  208. package/dist/components/navigation/Tabs/types.js +1 -1
  209. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  210. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  211. package/dist/components/organisms/FileTabs/FileTabs.js +1 -1
  212. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  213. package/dist/components/other/Calendar/Calendar.js +1 -1
  214. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  215. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  216. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  217. package/dist/components/other/CloudLogo/CloudLogo.js +1 -1
  218. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  219. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  220. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  221. package/dist/components/overlays/Dialog/Dialog.js +1 -1
  222. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  223. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  224. package/dist/components/overlays/Dialog/DialogTrigger.js +2 -2
  225. package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
  226. package/dist/components/overlays/Dialog/context.js +1 -1
  227. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  228. package/dist/components/overlays/Modal/Modal.js +1 -1
  229. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  230. package/dist/components/overlays/Modal/Overlay.js +1 -1
  231. package/dist/components/overlays/Modal/Popover.js +1 -1
  232. package/dist/components/overlays/Modal/Tray.js +1 -1
  233. package/dist/components/overlays/Modal/Underlay.js +1 -1
  234. package/dist/components/overlays/Notifications/Notification.js +1 -1
  235. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  236. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  237. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  238. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  239. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  240. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  241. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  242. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  243. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  244. package/dist/components/overlays/Notifications/index.js +1 -1
  245. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  246. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  247. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  248. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  249. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  250. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  251. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  252. package/dist/components/overlays/Toast/index.js +1 -1
  253. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  254. package/dist/components/overlays/Toast/useToast.js +1 -1
  255. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  256. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  257. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  258. package/dist/components/overlays/Tooltip/context.js +1 -1
  259. package/dist/components/portal/Portal.js +1 -1
  260. package/dist/components/portal/PortalProvider.js +1 -1
  261. package/dist/components/portal/usePortal.js +1 -1
  262. package/dist/components/shared/DraggableCollection.js +1 -1
  263. package/dist/components/shared/InvalidIcon.js +1 -1
  264. package/dist/components/shared/ValidIcon.js +1 -1
  265. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  266. package/dist/components/status/Spin/Cube.js +1 -1
  267. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  268. package/dist/components/status/Spin/Spin.js +1 -1
  269. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  270. package/dist/data/item-themes.js +5 -3
  271. package/dist/data/item-themes.js.map +1 -1
  272. package/dist/data/themes.js +1 -1
  273. package/dist/i18n/I18nProvider.js +1 -1
  274. package/dist/i18n/createFormatter.js +1 -1
  275. package/dist/i18n/index.js +1 -1
  276. package/dist/i18n/instance.js +1 -1
  277. package/dist/i18n/locales/de-DE/uikit.js +1 -1
  278. package/dist/i18n/locales/en-US/uikit.js +1 -1
  279. package/dist/i18n/locales/es-ES/uikit.js +1 -1
  280. package/dist/i18n/locales/es-MX/uikit.js +1 -1
  281. package/dist/i18n/locales/fr-FR/uikit.js +1 -1
  282. package/dist/i18n/locales/it-IT/uikit.js +1 -1
  283. package/dist/i18n/locales/ja-JP/uikit.js +1 -1
  284. package/dist/i18n/locales/nb-NO/uikit.js +1 -1
  285. package/dist/i18n/locales/pt-BR/uikit.js +1 -1
  286. package/dist/i18n/locales/pt-PT/uikit.js +1 -1
  287. package/dist/i18n/locales/sv-SE/uikit.js +1 -1
  288. package/dist/i18n/locales/vi-VN/uikit.js +1 -1
  289. package/dist/i18n/locales.js +1 -1
  290. package/dist/i18n/useFormatter.js +1 -1
  291. package/dist/i18n/useI18n.js +1 -1
  292. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  293. package/dist/icons/AdjustmentsIcon.js +1 -1
  294. package/dist/icons/AiIcon.js +1 -1
  295. package/dist/icons/AreaChartIcon.js +1 -1
  296. package/dist/icons/BackwardIcon.js +1 -1
  297. package/dist/icons/BarChartIcon.js +1 -1
  298. package/dist/icons/BellFilledIcon.js +1 -1
  299. package/dist/icons/BellIcon.js +1 -1
  300. package/dist/icons/BooleanIcon.js +1 -1
  301. package/dist/icons/CalendarEditIcon.js +1 -1
  302. package/dist/icons/CalendarIcon.js +1 -1
  303. package/dist/icons/CaretDownIcon.js +1 -1
  304. package/dist/icons/CaretUpIcon.js +1 -1
  305. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  306. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  307. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  308. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  309. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  310. package/dist/icons/ChartBarLineIcon.js +1 -1
  311. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  312. package/dist/icons/ChartBarStackedIcon.js +1 -1
  313. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  314. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  315. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  316. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  317. package/dist/icons/ChartBubbleIcon.js +1 -1
  318. package/dist/icons/ChartDonut2Icon.js +1 -1
  319. package/dist/icons/ChartFunnelIcon.js +1 -1
  320. package/dist/icons/ChartHeatmapIcon.js +1 -1
  321. package/dist/icons/ChartKPIIcon.js +1 -1
  322. package/dist/icons/ChartPie2Icon.js +1 -1
  323. package/dist/icons/ChartScatterIcon.js +1 -1
  324. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  325. package/dist/icons/CheckCircleIcon.js +1 -1
  326. package/dist/icons/CheckIcon.js +1 -1
  327. package/dist/icons/CircleFilledIcon.js +1 -1
  328. package/dist/icons/ClearIcon.js +1 -1
  329. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  330. package/dist/icons/CloseCircleIcon.js +1 -1
  331. package/dist/icons/CloseIcon.js +1 -1
  332. package/dist/icons/CodeIcon.js +1 -1
  333. package/dist/icons/ColumnTotalIcon.js +1 -1
  334. package/dist/icons/CopyIcon.js +1 -1
  335. package/dist/icons/CountIcon.js +1 -1
  336. package/dist/icons/CubeIcon.js +1 -1
  337. package/dist/icons/CubePauseIcon.js +1 -1
  338. package/dist/icons/CubePlayIcon.js +1 -1
  339. package/dist/icons/CurrencyDollarIcon.js +1 -1
  340. package/dist/icons/DangerIcon.js +1 -1
  341. package/dist/icons/DashboardIcon.js +1 -1
  342. package/dist/icons/DatabaseIcon.js +1 -1
  343. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  344. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  345. package/dist/icons/DirectionIcon.js +1 -1
  346. package/dist/icons/DonutIcon.js +1 -1
  347. package/dist/icons/DownIcon.js +1 -1
  348. package/dist/icons/EditIcon.js +1 -1
  349. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  350. package/dist/icons/ExclamationCircleIcon.js +1 -1
  351. package/dist/icons/ExclamationIcon.js +1 -1
  352. package/dist/icons/EyeIcon.js +1 -1
  353. package/dist/icons/EyeInvisibleIcon.js +1 -1
  354. package/dist/icons/FilterIcon.js +1 -1
  355. package/dist/icons/FolderFilledIcon.js +1 -1
  356. package/dist/icons/FolderIcon.js +1 -1
  357. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  358. package/dist/icons/FolderOpenIcon.js +1 -1
  359. package/dist/icons/ForwardIcon.js +1 -1
  360. package/dist/icons/GripVerticalIcon.js +1 -1
  361. package/dist/icons/HierarchyIcon.js +1 -1
  362. package/dist/icons/HierarchyOpenIcon.js +1 -1
  363. package/dist/icons/Icon.js +1 -1
  364. package/dist/icons/InfoCircleIcon.js +1 -1
  365. package/dist/icons/InfoIcon.js +1 -1
  366. package/dist/icons/KeyIcon.js +1 -1
  367. package/dist/icons/LeftIcon.js +1 -1
  368. package/dist/icons/LineChartIcon.js +1 -1
  369. package/dist/icons/LoadingIcon.js +1 -1
  370. package/dist/icons/LockFilledIcon.js +1 -1
  371. package/dist/icons/LockIcon.js +1 -1
  372. package/dist/icons/MoreIcon.js +1 -1
  373. package/dist/icons/NotAllowedIcon.js +1 -1
  374. package/dist/icons/Number123Icon.js +1 -1
  375. package/dist/icons/NumberIcon.js +1 -1
  376. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  377. package/dist/icons/PauseCircleIcon.js +1 -1
  378. package/dist/icons/PauseIcon.js +1 -1
  379. package/dist/icons/PercentageIcon.js +1 -1
  380. package/dist/icons/PieChartIcon.js +1 -1
  381. package/dist/icons/PlayCircleIcon.js +1 -1
  382. package/dist/icons/PlayIcon.js +1 -1
  383. package/dist/icons/PlusIcon.js +1 -1
  384. package/dist/icons/ProgressBarIcon.js +1 -1
  385. package/dist/icons/ReloadIcon.js +1 -1
  386. package/dist/icons/ReportIcon.js +1 -1
  387. package/dist/icons/ReturnIcon.js +1 -1
  388. package/dist/icons/RightIcon.js +1 -1
  389. package/dist/icons/RowTotalsIcon.js +1 -1
  390. package/dist/icons/SchemeIcon.js +1 -1
  391. package/dist/icons/SearchIcon.js +1 -1
  392. package/dist/icons/SemanticQueryIcon.js +1 -1
  393. package/dist/icons/SettingsIcon.js +1 -1
  394. package/dist/icons/ShieldFilledIcon.js +1 -1
  395. package/dist/icons/ShieldIcon.js +1 -1
  396. package/dist/icons/SlashIcon.js +1 -1
  397. package/dist/icons/SparklesIcon.js +1 -1
  398. package/dist/icons/SqlIcon.js +1 -1
  399. package/dist/icons/StatsIcon.js +1 -1
  400. package/dist/icons/StopIcon.js +1 -1
  401. package/dist/icons/StringIcon.js +1 -1
  402. package/dist/icons/SubtotalsIcon.js +1 -1
  403. package/dist/icons/SwitchIcon.js +1 -1
  404. package/dist/icons/TableIcon.js +1 -1
  405. package/dist/icons/ThumbsDownIcon.js +1 -1
  406. package/dist/icons/ThumbsUpIcon.js +1 -1
  407. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  408. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  409. package/dist/icons/ThunderboltIcon.js +1 -1
  410. package/dist/icons/TimeIcon.js +1 -1
  411. package/dist/icons/TrashIcon.js +1 -1
  412. package/dist/icons/UnlockIcon.js +1 -1
  413. package/dist/icons/UpIcon.js +1 -1
  414. package/dist/icons/UserGroupIcon.js +1 -1
  415. package/dist/icons/UserIcon.js +1 -1
  416. package/dist/icons/UserLockIcon.js +1 -1
  417. package/dist/icons/ViewIcon.js +1 -1
  418. package/dist/icons/WarningFilledIcon.js +1 -1
  419. package/dist/icons/WarningIcon.js +1 -1
  420. package/dist/icons/wrap-icon.js +1 -1
  421. package/dist/index.d.ts +4 -3
  422. package/dist/index.js +5 -4
  423. package/dist/index.js.map +1 -1
  424. package/dist/provider.js +1 -1
  425. package/dist/providers/TrackingProvider.js +1 -1
  426. package/dist/providers/navigationAdapter.default.js +1 -1
  427. package/dist/tokens/base.js +1 -1
  428. package/dist/tokens/colors.d.ts +2 -7
  429. package/dist/tokens/colors.js +16 -7
  430. package/dist/tokens/colors.js.map +1 -1
  431. package/dist/tokens/index.d.ts +5 -17
  432. package/dist/tokens/index.js +23 -13
  433. package/dist/tokens/index.js.map +1 -1
  434. package/dist/tokens/layout.js +1 -1
  435. package/dist/tokens/lazy-styles.js +33 -0
  436. package/dist/tokens/lazy-styles.js.map +1 -0
  437. package/dist/tokens/palette.d.ts +15 -0
  438. package/dist/tokens/palette.js +166 -123
  439. package/dist/tokens/palette.js.map +1 -1
  440. package/dist/tokens/shadows.js +1 -1
  441. package/dist/tokens/sizes.js +1 -1
  442. package/dist/tokens/spacing.js +1 -1
  443. package/dist/tokens/typography.d.ts +1 -0
  444. package/dist/tokens/typography.js +29 -1
  445. package/dist/tokens/typography.js.map +1 -1
  446. package/dist/utils/ResizeSensor.js +1 -1
  447. package/dist/utils/is-dev-env.js +1 -1
  448. package/dist/utils/modules.js +1 -1
  449. package/dist/utils/promise.js +1 -1
  450. package/dist/utils/raf.js +1 -1
  451. package/dist/utils/random.js +1 -1
  452. package/dist/utils/range.js +1 -1
  453. package/dist/utils/react/RenderCache.js +1 -1
  454. package/dist/utils/react/Slots.js +1 -1
  455. package/dist/utils/react/chain.js +1 -1
  456. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  457. package/dist/utils/react/index.js +1 -1
  458. package/dist/utils/react/interactions.js +1 -1
  459. package/dist/utils/react/isTextOnly.js +1 -1
  460. package/dist/utils/react/mapProps.js +1 -1
  461. package/dist/utils/react/mergeProps.js +1 -1
  462. package/dist/utils/react/nullableValue.js +1 -1
  463. package/dist/utils/react/resolveIcon.js +1 -1
  464. package/dist/utils/react/sharedStore.js +1 -1
  465. package/dist/utils/react/useCombinedRefs.js +1 -1
  466. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  467. package/dist/utils/react/useEventBus.js +1 -1
  468. package/dist/utils/react/useId.js +1 -1
  469. package/dist/utils/react/useIsDarwin.js +1 -1
  470. package/dist/utils/react/useKeySymbols.js +1 -1
  471. package/dist/utils/react/useLayoutEffect.js +1 -1
  472. package/dist/utils/react/useLocalStorage.js +1 -1
  473. package/dist/utils/react/useMergeStyles.js +1 -1
  474. package/dist/utils/react/usePopoverSync.js +1 -1
  475. package/dist/utils/react/useQaProps.js +1 -1
  476. package/dist/utils/react/useViewportSize.js +1 -1
  477. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  478. package/dist/utils/selection.js +1 -1
  479. package/dist/utils/styles.js +1 -1
  480. package/dist/utils/tree.js +1 -1
  481. package/dist/utils/warnings.js +1 -1
  482. package/dist/version.js +2 -2
  483. package/docs/Colors.md +77 -0
  484. package/docs/Typography.md +1 -1
  485. package/docs/Usage.md +10 -0
  486. package/docs/components/content/CopySnippet.md +1 -1
  487. package/docs/components/content/PrismCode.md +1 -0
  488. package/docs/glaze/api.md +1033 -414
  489. package/docs/glaze/methodology.md +536 -208
  490. package/docs/glaze/migration.md +127 -49
  491. package/docs/glaze/okhst.md +190 -0
  492. package/package.json +2 -2
@@ -1,25 +1,44 @@
1
1
  # Migration & Integration
2
2
 
3
- How to plug a Glaze palette into an existing app — exporting tokens in the right shape, mapping prefixes to the names your components already consume, and migrating off a legacy color system without breaking layout, dark-mode wiring, or muscle-memory tokens.
3
+ How to move an existing CSS, design-token, or application color system to
4
+ Glaze, then export the resulting palette in the shape your app and design tools
5
+ consume.
4
6
 
5
- If you're starting from scratch, see [methodology.md](methodology.md) first — that's about *designing* the palette. This doc is about *consuming* it.
7
+ If you're starting from scratch, see [methodology.md](methodology.md) first — that's about _designing_ the palette. This doc is about _consuming_ it.
8
+
9
+ ## Contents
10
+
11
+ - [Choosing an export](#choosing-an-export)
12
+ - [Wiring exports into the app](#wiring-exports-into-the-app)
13
+ - [Prefix map strategies](#prefix-map-strategies)
14
+ - [Migrating an existing color system](#migrating-from-an-existing-color-system)
15
+ - [Common pitfalls](#common-pitfalls)
6
16
 
7
17
  ## Choosing an export
8
18
 
9
- Glaze emits the same resolved colors in four shapes. Pick one based on your renderer.
19
+ Glaze has two layers of “export”:
20
+
21
+ 1. **Authoring snapshots** — `theme.export(override?)` / `token.export(override?)` / `palette.export(override?)`, restored with `glaze.themeFrom` / `colorFrom` / `paletteFrom`. These carry definitions, relations, and a config freeze taken at export time (`kind` + `version`). Live instances keep only a sparse local override; omitted global fields track `configure()` until export.
22
+ 2. **Resolved output** — the seven shapes below. These are color strings / design-token documents for apps and tools, **not** restorable as authoring config.
23
+
24
+ Glaze emits the same resolved colors in seven shapes. Pick one based on your
25
+ renderer or tooling.
10
26
 
11
- | Method | Output shape | Use it for |
12
- |---|---|---|
13
- | `palette.tasty(options?)` | `{ '#name': { '': value, '@dark': value, '@hc': value } }` | The [Tasty](https://tasty.style/docs) style system. Single object, state aliases keyed inside each token. |
14
- | `palette.tokens(options?)` | `{ light: { name: value }, dark: { name: value }, ... }` | Most CSS-in-JS systems. Per-variant flat maps, easy to feed into a `:root { ... }` selector via your framework's globals. |
15
- | `palette.css(options?)` | `{ light: '--name-color: rgb(...);', dark: '...', ... }` | Framework-free CSS / static stylesheets. Variant-grouped CSS custom property strings ready to wrap in `:root` and `prefers-color-scheme` queries. |
16
- | `palette.json(options?)` | `{ themeName: { name: { light, dark, ... } } }` | Tooling, JSON pipelines, design-token exporters (Style Dictionary, etc.). |
27
+ | Method | Output shape | Use it for |
28
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | `palette.tasty(options?)` | `{ '#name': { '': value, '@media(prefers-color-scheme: dark)': value, '@media(prefers-contrast: more)': value } }` | The [Tasty](https://tasty.style) style system. Single object, state aliases keyed inside each token. |
30
+ | `palette.tokens(options?)` | `{ light: { name: value }, dark: { name: value }, ... }` | Most CSS-in-JS systems. Per-variant flat maps, easy to feed into a `:root { ... }` selector via your framework's globals. |
31
+ | `palette.css(options?)` | `{ light: '--name-color: rgb(...);', dark: '...', ... }` | Framework-free CSS / static stylesheets. Variant-grouped CSS custom property strings ready to wrap in `:root` and `prefers-color-scheme` queries. |
32
+ | `palette.json(options?)` | `{ themeName: { name: { light, dark, ... } } }` | Tooling, JSON pipelines. |
33
+ | `palette.dtcg(options?)` | `{ light: { name: { $type, $value } }, dark: { ... }, ... }` | W3C [DTCG 2025.10](https://www.designtokens.org/) `.tokens.json` — Figma, Tokens Studio, Style Dictionary, Terrazzo, Penpot. One document per scheme. |
34
+ | `palette.dtcgResolver(options?)` | `{ version, sets, modifiers, resolutionOrder }` | W3C DTCG **Resolver-Module** — a single document describing every scheme variant as `sets` + a `scheme` modifier with a context per variant. For resolver tools such as Dispersa. |
35
+ | `palette.tailwind(options?)` | `'@theme { --color-*: ... } .dark { ... } ...'` | Tailwind CSS v4. A single ready-to-paste `@theme` block plus dark / high-contrast overrides. |
17
36
 
18
- All four accept `format` (`'okhsl' \| 'rgb' \| 'hsl' \| 'oklch'`). `tokens()`, `tasty()`, and `json()` also accept `modes` (`{ dark, highContrast }`). `css()` always returns all four strings (`light`, `dark`, `lightContrast`, `darkContrast`). See [api.md → Palette](api.md#palette) for full options.
37
+ `tasty()`, `tokens()`, `json()`, `dtcg()`, `dtcgResolver()`, and `tailwind()` accept `modes` (`{ dark, highContrast }`). `css()` always returns all four strings (`light`, `dark`, `lightContrast`, `darkContrast`). CSS-string exports accept `format` and default to `'oklch'` (`tokens`/`json`/`css`/`tailwind`/`tasty`; `'rgb'` and `'hsl'` also available). `'okhsl'` and `'okhst'` are supported only on [Tasty](https://tasty.style)-shaped exports (`tasty()`, standalone `token()` / `.tasty()`). `dtcg()` and `dtcgResolver()` ignore `format` and use `colorSpace` instead (`'srgb'` default, `'oklch'` opt-in). See [api.md → Palette](api.md#palette) for full options.
19
38
 
20
39
  ## Wiring exports into the app
21
40
 
22
- ### Tasty
41
+ ### [Tasty](https://tasty.style)
23
42
 
24
43
  Spread the result of `palette.tasty()` into a global style call:
25
44
 
@@ -28,7 +47,9 @@ import type { Styles } from '@tenphi/tasty';
28
47
  import { useGlobalStyles } from '@tenphi/tasty';
29
48
  import { tastyStatic } from '@tenphi/tasty/static';
30
49
 
31
- export const PALETTE_TOKENS = palette.tasty({ /* prefix map */ }) as Styles;
50
+ export const PALETTE_TOKENS = palette.tasty({
51
+ /* prefix map */
52
+ }) as Styles;
32
53
 
33
54
  // In your root component:
34
55
  useGlobalStyles('body', PALETTE_TOKENS);
@@ -37,11 +58,14 @@ useGlobalStyles('body', PALETTE_TOKENS);
37
58
  tastyStatic('body', PALETTE_TOKENS);
38
59
  ```
39
60
 
40
- For the `@dark` / `@hc` state aliases to do anything, your app needs to register what those states *mean*:
61
+ By default the dark / high-contrast variants are keyed by media-query states — `'@media(prefers-color-scheme: dark)'` and `'@media(prefers-contrast: more)'` so the tokens react to the OS preference out of the box, with no extra [Tasty](https://tasty.style) setup.
62
+
63
+ If you'd rather drive the schemes from custom aliases (e.g. a manual toggle that also falls back to the OS preference), set your own [`glaze.configure({ states })`](api.md#configuration) and register what those states _mean_:
41
64
 
42
65
  ```ts
43
66
  import { setGlobalPredefinedStates } from '@tenphi/tasty';
44
67
 
68
+ // glaze.configure({ states: { dark: '@dark', highContrast: '@hc' } });
45
69
  setGlobalPredefinedStates({
46
70
  '@dark':
47
71
  '@root(schema=dark) | (!@root(schema) & @media(prefers-color-scheme: dark))',
@@ -52,7 +76,7 @@ setGlobalPredefinedStates({
52
76
 
53
77
  The state names here must match the `states` you set in [`glaze.configure({ states })`](api.md#configuration).
54
78
 
55
- You can also register the tokens as a Tasty recipe instead of spreading them globally:
79
+ You can also register the tokens as a [Tasty](https://tasty.style) recipe instead of spreading them globally:
56
80
 
57
81
  ```ts
58
82
  import { configure, tasty } from '@tenphi/tasty';
@@ -81,27 +105,65 @@ const stylesheet = `
81
105
  Each property name is `--<prefix><name>-color` by default. Override the suffix:
82
106
 
83
107
  ```ts
84
- palette.css({ suffix: '' }); // → '--surface: rgb(...);'
85
- palette.css({ format: 'oklch' }); // → '--surface-color: oklch(...);'
108
+ palette.css({ suffix: '' }); // → '--surface: rgb(...);'
109
+ palette.css({ format: 'oklch' }); // → '--surface-color: oklch(...);'
86
110
  ```
87
111
 
88
112
  ### Framework-agnostic JSON
89
113
 
90
114
  ```ts
91
115
  const data = palette.json();
92
- // → { primary: { surface: { light: 'okhsl(...)', dark: 'okhsl(...)' } }, ... }
116
+ // → { primary: { surface: { light: 'oklch(...)', dark: 'oklch(...)' } }, ... }
93
117
  ```
94
118
 
95
119
  Feed into your tooling pipeline. Each color is grouped by theme name, then by token name, then by variant — no prefix logic to undo.
96
120
 
121
+ ### W3C DTCG (`.tokens.json`)
122
+
123
+ ```ts
124
+ import { writeFileSync } from 'node:fs';
125
+ const dtcg = palette.dtcg();
126
+
127
+ writeFileSync('tokens.light.tokens.json', JSON.stringify(dtcg.light, null, 2));
128
+ if (dtcg.dark) {
129
+ writeFileSync('tokens.dark.tokens.json', JSON.stringify(dtcg.dark, null, 2));
130
+ }
131
+ ```
132
+
133
+ Each document is a spec-conformant token tree. One file per scheme is the most tool-compatible convention — Style Dictionary treats them as themes, Tokens Studio as sets, and Figma as variable modes. Use `colorSpace: 'oklch'` for wide-gamut, Glaze-native values (no `hex`); the default `'srgb'` emits components plus a `hex` hint that every reader understands. Feed the files straight into Style Dictionary v4+, Tokens Studio, or any DTCG-compatible tool — no Glaze-specific transform needed.
134
+
135
+ ### W3C DTCG Resolver-Module (single document)
136
+
137
+ When you want **one file** describing every scheme variant — for a resolver tool such as [Dispersa](https://github.com/dispersa-core/dispersa) — use `dtcgResolver()` instead of `dtcg()`:
138
+
139
+ ```ts
140
+ import { writeFileSync } from 'node:fs';
141
+ const resolver = palette.dtcgResolver({ modes: { highContrast: true } });
142
+
143
+ writeFileSync('resolver.json', JSON.stringify(resolver, null, 2));
144
+ ```
145
+
146
+ The document places the light tokens in `sets.base.sources[0]` (the default context) and emits a single `scheme` modifier with a context per variant (`light` / `dark` / `lightContrast` / `darkContrast`). Each non-default context holds that variant's exact resolved tokens — Glaze resolves `darkContrast` independently, so the four-context shape keeps every value correct (two independent modifiers would compose additively and produce wrong dark + high-contrast values). Rename the set, modifier, or contexts via `setName` / `modifierName` / `contextNames` if your resolver expects different labels. Prefer `dtcg()` when you need maximum per-file tool compatibility; prefer `dtcgResolver()` when a resolver tool consumes the document for you.
147
+
148
+ ### Tailwind CSS v4
149
+
150
+ ```ts
151
+ const css = palette.tailwind();
152
+ // Write to your CSS entry, or paste into a `@import "tailwindcss"` stylesheet:
153
+ // @theme { --color-primary-surface: oklch(...); ... }
154
+ // .dark { --color-primary-surface: oklch(...); ... }
155
+ ```
156
+
157
+ The `--color-*` namespace makes every color available as `bg-*` / `text-*` / `border-*`. Drive dark mode from the OS preference instead of a class with `darkSelector: '@media (prefers-color-scheme: dark)'` (it nests `:root` automatically). High-contrast overrides land under `.high-contrast` and `.dark.high-contrast` by default; both are omitted unless `modes.highContrast` is enabled.
158
+
97
159
  ## Prefix map strategies
98
160
 
99
- `palette.tokens()` / `tasty()` / `css()` accept a `prefix` option:
161
+ `palette.tokens()` / `tasty()` / `css()` / `dtcg()` / `tailwind()` accept a `prefix` option:
100
162
 
101
- | Value | Result |
102
- |---|---|
103
- | `true` (default) | Every theme prefixes its tokens with `<themeName>-`. |
104
- | `false` | No prefixes. Colliding keys produce a `console.warn`; first-write wins. |
163
+ | Value | Result |
164
+ | ------------------------ | -------------------------------------------------------------------------- |
165
+ | `true` (default) | Every theme prefixes its tokens with `<themeName>-`. |
166
+ | `false` | No prefixes. Colliding keys produce a `console.warn`; first-write wins. |
105
167
  | `Record<string, string>` | Per-theme prefix overrides. Themes not listed fall back to `<themeName>-`. |
106
168
 
107
169
  The most common production pattern: **default theme unprefixed, every other theme prefixed with its name**:
@@ -112,15 +174,20 @@ palette.tasty({
112
174
  default: '',
113
175
  primary: 'primary-',
114
176
  success: 'success-',
115
- danger: 'danger-',
177
+ danger: 'danger-',
116
178
  warning: 'warning-',
117
- note: 'note-',
179
+ note: 'note-',
118
180
  },
119
181
  });
120
182
  ```
121
183
 
122
184
  This makes neutral tokens consume as `#surface`, `#border`, `#disabled-surface` (no theme namespace) while status colors live under `#danger-surface`, `#success-accent-text`, etc.
123
185
 
186
+ This explicit map is usually clearer for a neutral `default` theme. The
187
+ separate `primary` palette option below solves a different namespace problem:
188
+ it duplicates one named theme without a prefix while retaining that theme's
189
+ prefixed tokens.
190
+
124
191
  ### Alias themes for legacy names
125
192
 
126
193
  Two aliases for the same theme instance produce identical token values under different prefixes — useful when you want to support a legacy token name without duplicating definitions:
@@ -129,7 +196,7 @@ Two aliases for the same theme instance produce identical token values under dif
129
196
  const palette = glaze.palette({
130
197
  default: defaultTheme,
131
198
  primary: primaryTheme,
132
- purple: primaryTheme, // legacy alias — same theme, different prefix
199
+ purple: primaryTheme, // legacy alias — same theme, different prefix
133
200
  // ...
134
201
  });
135
202
 
@@ -137,7 +204,7 @@ palette.tasty({
137
204
  prefix: {
138
205
  default: '',
139
206
  primary: 'primary-',
140
- purple: 'purple-', // emits #purple-surface alongside #primary-surface
207
+ purple: 'purple-', // emits #purple-surface alongside #primary-surface
141
208
  },
142
209
  });
143
210
  ```
@@ -146,13 +213,10 @@ Both `#primary-surface` and `#purple-surface` resolve to the exact same color. D
146
213
 
147
214
  ### `primary` (the unprefixed alias)
148
215
 
149
- `glaze.palette(themes, { primary })` and the per-export `primary` option duplicate one theme's tokens *without* prefix on top of any prefix map. Equivalent to listing that theme twice with different prefixes; useful when the "primary" theme is conceptually distinct from `default` and you want both sets of unprefixed tokens.
216
+ `glaze.palette(themes, { primary })` and the per-export `primary` option duplicate one theme's tokens _without_ prefix on top of any prefix map. Equivalent to listing that theme twice with different prefixes; useful when the "primary" theme is conceptually distinct from `default` and you want both sets of unprefixed tokens.
150
217
 
151
218
  ```ts
152
- const palette = glaze.palette(
153
- { brand, accent },
154
- { primary: 'brand' },
155
- );
219
+ const palette = glaze.palette({ brand, accent }, { primary: 'brand' });
156
220
  palette.tokens();
157
221
  // → { light: { 'brand-surface': '...', 'surface': '...', 'accent-surface': '...' } }
158
222
  ```
@@ -176,16 +240,19 @@ Walk your current color system and bucket every token into one of these categori
176
240
  - **Shadows / overlays** — elevation, scrims.
177
241
  - **One-off colors** — syntax highlighting, charts, illustrations.
178
242
 
179
- Each bucket maps cleanly to one of the patterns in [methodology.md](methodology.md). The bucket determines the *shape* of the Glaze definition (root vs dependent, `mode: 'auto'` vs `'fixed'`, contrast-floor vs absolute lightness), not the value.
243
+ Each bucket maps cleanly to one of the patterns in [methodology.md](methodology.md). The bucket determines the _shape_ of the Glaze definition (root vs dependent, `mode: 'auto'` vs `'fixed'`, contrast-floor vs absolute tone), not the value.
180
244
 
181
245
  ### 2. Reproduce the existing values
182
246
 
183
- Pick a Glaze definition shape that lands the new color *close to* the legacy hex in light mode. The methodology doc explains the shape per bucket; the API doc covers the levers (`lightness`, `saturation`, `contrast`, `mode`, `hue`).
247
+ Pick a Glaze definition shape that lands the new color _close to_ the legacy hex in light mode. The methodology doc explains the shape per bucket; the API doc covers the levers (`tone`, `saturation`, `contrast`, `mode`, `hue`).
184
248
 
185
249
  Two tactics that make matching easier:
186
250
 
187
- - **Anchor strong text at the edge** instead of solving for `'AAA'`. The contrast solver stops at the floor (cr=7), which usually leaves text noticeably softer than a legacy hex like `#1a1a1a`. An absolute `lightness: 2` (or wherever the legacy token sits in OKHSL) preserves the look.
188
- - **Use numeric `contrast` ratios** for soft / accent / disabled tokens. Presets give you the WCAG floor and nothing more — for matching a designed palette you usually want a specific perceived weight, not the floor.
251
+ - **Anchor strong text at the edge** instead of solving for `'AAA'`. The contrast solver stops at the floor (cr=7), which usually leaves text noticeably softer than a legacy hex like `#1a1a1a`. An absolute `tone: 2` (or wherever the legacy token sits) preserves the look.
252
+ - **Match the metric the old system actually used.** Numeric WCAG ratios are
253
+ useful when reproducing a measured legacy ratio. For new content roles,
254
+ prefer the APCA presets from the methodology. For low-stakes spacing, use a
255
+ tone delta instead of inventing a contrast target.
189
256
 
190
257
  ### 3. Keep the old token names
191
258
 
@@ -196,9 +263,19 @@ Use a custom `prefix` map (and theme aliases if needed) so the names your compon
196
263
  // New: define them in Glaze, map the prefix so they emit unchanged.
197
264
 
198
265
  defaultTheme.colors({
199
- dark: { base: 'surface', lightness: 2, saturation: 0.475 },
200
- 'dark-02': { base: 'surface', lightness: '-1', saturation: 0.375, contrast: [9, 11] },
201
- 'dark-03': { base: 'surface', lightness: '-1', saturation: 0.24, contrast: [4.5, 5.5] },
266
+ dark: { base: 'surface', tone: 2, saturation: 0.475 },
267
+ 'dark-02': {
268
+ base: 'surface',
269
+ tone: '-1',
270
+ saturation: 0.375,
271
+ contrast: [9, 11],
272
+ },
273
+ 'dark-03': {
274
+ base: 'surface',
275
+ tone: '-1',
276
+ saturation: 0.24,
277
+ contrast: [4.5, 5.5],
278
+ },
202
279
  });
203
280
 
204
281
  palette.tasty({ prefix: { default: '' } });
@@ -211,8 +288,8 @@ Once consumers are off the legacy names, rename the Glaze tokens to match your c
211
288
 
212
289
  Glaze gives you light/dark/HC for free, but only the light mode is matched against the legacy palette. Before promoting the migration:
213
290
 
214
- - Spot-check every surface, text, accent, and disabled pair in dark mode. The Möbius dark inversion plus per-color `mode` choices may produce results that *look right* in light but feel off in dark (typical fix: switch a brand color to `mode: 'fixed'`, or anchor a foreground to `surface` instead of the brand fill — see [methodology.md](methodology.md)).
215
- - If the legacy system had no high-contrast mode, audit the HC variants Glaze emits. Anywhere the resolved cr is too low or the color blows out, add an HC pair (`lightness: ['-7', '-20']`, `contrast: [4.5, 7]`, etc.).
291
+ - Spot-check every surface, text, accent, and disabled pair in dark mode. The tone inversion plus per-color `mode` choices may produce results that _look right_ in light but feel off in dark (typical fix: switch a brand color to `mode: 'fixed'`, or anchor a foreground to `surface` instead of the brand fill — see [methodology.md](methodology.md)).
292
+ - If the legacy system had no high-contrast mode, audit the HC variants Glaze emits. Anywhere the resolved cr is too low or the color blows out, add an HC pair (`tone: ['-7', '-20']`, `contrast: [4.5, 7]`, etc.).
216
293
  - Run real screens, not just the token grid. The interaction of multiple Glaze tokens against each other (text on chip, hover bg vs. fill, disabled label on disabled chip) is where mismatches show up.
217
294
 
218
295
  ### 5. Trim what `extend()` doesn't need
@@ -221,15 +298,16 @@ After migration, mark every default-only token (borders, shadows, disabled chip,
221
298
 
222
299
  ## Common pitfalls
223
300
 
224
- | Symptom | Cause | Fix |
225
- |---|---|---|
226
- | Disabled state stops looking disabled in dark mode. | Alpha-tinted overlay on `surface-text` (which inverts), giving asymmetric perceived contrast. | Replace with a `mode: 'auto'` color anchored to `surface` with a numeric `contrast` (see [methodology.md Disabled chip](methodology.md#disabled-chip-contrast-driven-for-scheme-symmetry)). |
227
- | Brand color flips to its complement in dark mode. | Default `mode: 'auto'` runs the Möbius inversion. | Set `mode: 'fixed'` so the lightness is mapped (not inverted). |
228
- | Brand text washes out against the dark surface. | Foreground was anchored to `accent-surface` (the brand fill), so contrast was only enforced against that fill — not the actual surface. | Anchor `accent-text` etc. to `surface` with `mode: 'auto'`. |
229
- | Tokens look right in light, broken in HC. | The HC pass bypasses the lightness window — solver runs over the full `[0, 100]` range. | Add explicit `[normal, hc]` pairs to `lightness` / `contrast` for the affected tokens. |
230
- | `palette.tokens()` emits unexpected unprefixed names. | A `primary` was set on the palette (or per-call) and is duplicating the theme's tokens without prefix. | Pass `primary: false` to disable for that export, or rename `glaze.palette(themes, { primary })`. |
231
- | `console.warn: token "foo" collides with theme "bar"`. | Two themes resolved to the same output key under your prefix config. | Adjust the prefix map so each token is unique, or accept the first-write-wins behavior. |
232
- | `console.warn: color "X" cannot meet contrast`. | The requested contrast target is physically unreachable for the color's hue/saturation against its base. | Lower the floor, change the base, or accept the closest passing variant. Use the `name` override on standalone colors to make the warning identifiable. |
301
+ | Symptom | Cause | Fix |
302
+ | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
303
+ | Disabled state stops looking disabled in dark mode. | Alpha-tinted overlay on `surface-text` (which inverts), giving asymmetric perceived contrast. | Replace it with an adaptive color anchored to `surface`; use a tone delta for visual spacing or a contrast floor when required. See [Chips and disabled states](methodology.md#chips-and-disabled-states). |
304
+ | Brand color flips to its complement in dark mode. | Default `mode: 'auto'` inverts the tone. | Set `mode: 'fixed'` so the tone is remapped (not inverted). |
305
+ | Brand text washes out against the dark surface. | Foreground was anchored to `accent-surface` (the brand fill), so contrast was only enforced against that fill — not the actual surface. | Anchor `accent-text` etc. to `surface` with `mode: 'auto'`. |
306
+ | Tokens look right in light, broken in HC. | The HC pass bypasses the tone window — solver runs over the full `[0, 100]` range. | Add explicit `[normal, hc]` pairs to `tone` / `contrast` for the affected tokens. |
307
+ | A relative `tone` like `'+48'` lands on the _wrong_ (darker) side of its base. | Overshooting offsets now mirror to the other side of the base by default (`autoFlip` inherits `autoFlip`). | Set `autoFlip: false` on the color to clamp to the boundary instead, or use `tone: 'max'`/`'min'` to force the extreme. |
308
+ | `palette.tokens()` emits unexpected unprefixed names. | A `primary` was set on the palette (or per-call) and is duplicating the theme's tokens without prefix. | Pass `primary: false` to disable for that export, or rename `glaze.palette(themes, { primary })`. |
309
+ | `console.warn: token "foo" collides with theme "bar"`. | Two themes resolved to the same output key under your prefix config. | Adjust the prefix map so each token is unique, or accept the first-write-wins behavior. |
310
+ | `console.warn: color "X" cannot meet contrast`. | The requested contrast target is physically unreachable for the color's hue/saturation against its base. | Lower the floor, change the base, or accept the closest passing variant. Use the `name` override on standalone colors to make the warning identifiable. |
233
311
 
234
312
  ## See also
235
313
 
@@ -0,0 +1,190 @@
1
+ # OKHST in Glaze
2
+
3
+ Glaze uses [OKHST](https://github.com/tenphi/okhst), an OKHSL-derived color
4
+ space with a tone axis for stable palette authoring. This page explains how
5
+ Glaze applies the model. The standalone repository is the canonical
6
+ specification for the transfer functions, derivation, and color-model
7
+ invariants.
8
+
9
+ For practical palette design, continue to [methodology.md](methodology.md). For
10
+ every related option and utility, see [api.md](api.md).
11
+
12
+ ## What tone means
13
+
14
+ OKHST keeps OKHSL hue and saturation and replaces authored lightness with
15
+ **tone**:
16
+
17
+ | Space | Coordinates | Third coordinate |
18
+ | ----- | ----------- | -------------------- |
19
+ | OKHSL | `h, s, l` | Perceptual lightness |
20
+ | OKHST | `h, s, t` | Contrast-shaped tone |
21
+
22
+ Tone uses a `0–100` authoring scale. Its primary invariant is:
23
+
24
+ > The same tone maps to the same OKHSL lightness for every hue and saturation.
25
+
26
+ For neutral colors, equal tone differences produce equal WCAG contrast ratios.
27
+ For chromatic colors, they remain a useful progression but are not exact:
28
+ hue, saturation, and gamut mapping can change the final sRGB luminance.
29
+
30
+ This distinction informs two authoring rules:
31
+
32
+ - Use **tone deltas** for visual spacing within ramps and related UI colors.
33
+ - Use `contrast` when a rendered color must meet a measured WCAG or APCA floor.
34
+
35
+ ## Tone vocabulary
36
+
37
+ ### Absolute tone
38
+
39
+ A numeric `tone` places a color independently on the `0–100` authoring scale:
40
+
41
+ ```ts
42
+ surface: {
43
+ tone: 97;
44
+ }
45
+ ```
46
+
47
+ `'max'` and `'min'` select the corresponding end of the active scheme. With a
48
+ `base`, they instead preserve their distance from that base across schemes —
49
+ see [Scheme adaptation](#scheme-adaptation).
50
+
51
+ ### Tone delta
52
+
53
+ A **tone delta** is the signed difference between a dependent color and its
54
+ base. It is authored as a string:
55
+
56
+ ```ts
57
+ border: { base: 'surface', tone: '-8' }
58
+ ```
59
+
60
+ Here, `-8` is the tone delta. The base is resolved separately for every scheme,
61
+ then the delta is applied to that resolved base. This keeps related colors
62
+ visually ordered across light, dark, and high-contrast variants.
63
+
64
+ ### Tone window
65
+
66
+ A **tone window** is the scheme-specific render range configured by
67
+ `lightTone` or `darkTone`:
68
+
69
+ ```ts
70
+ glaze.configure({
71
+ lightTone: [10, 100],
72
+ darkTone: [15, 95],
73
+ });
74
+ ```
75
+
76
+ In Glaze, `lo` and `hi` are OKHSL-lightness boundaries. Authored tone is
77
+ positioned within the corresponding tone interval, then converted back to
78
+ OKHSL lightness for rendering. The object form adds an advanced render
79
+ curvature:
80
+
81
+ ```ts
82
+ lightTone: { lo: 10, hi: 100, eps: 0.05 }
83
+ ```
84
+
85
+ Pass `false` to use the full range. High-contrast variants always bypass the
86
+ ordinary boundaries and use the full range.
87
+
88
+ ## Scheme adaptation
89
+
90
+ Each regular color has an adaptation `mode`:
91
+
92
+ | Mode | Light scheme | Dark scheme |
93
+ | ---------- | ------------------------------ | -------------------------------------------------------------------- |
94
+ | `'auto'` | Map into the light tone window | Apply dark tone inversion (`100 - t`), then map into the dark window |
95
+ | `'fixed'` | Map into the light tone window | Map into the dark window without inversion |
96
+ | `'static'` | Keep the authored tone | Keep the authored tone |
97
+
98
+ Use `auto` for surfaces and foregrounds that should exchange light/dark
99
+ positions. Use `fixed` for brand fills and inverse surfaces that should stay on
100
+ the same side of the scale. Reserve `static` for colors that must not adapt.
101
+
102
+ **Dark tone inversion** is different from `autoFlip`. Inversion is normal
103
+ scheme adaptation controlled by `mode`. `autoFlip` handles a different local
104
+ problem: it may reverse an overshooting tone delta or let the contrast solver
105
+ try the opposite side of a base.
106
+
107
+ The regular pipeline is:
108
+
109
+ ```text
110
+ authored tone
111
+ -> choose the color's adaptation mode
112
+ -> invert for dark + auto
113
+ -> map through the active tone window
114
+ -> store canonical tone
115
+ -> convert to OKHSL at the rendering edge
116
+ ```
117
+
118
+ Dark schemes also apply `darkDesaturation` unless the color is `static`.
119
+
120
+ **Hue and saturation are authoring inputs, not part of the tone transfer.** The
121
+ tone axis is the only channel OKHST adapts across schemes; `h` and `s` pass
122
+ through verbatim, with `darkDesaturation` as the one automatic adjustment.
123
+ A theme (or a single color) can seed a different hue and saturation for the
124
+ dark schemes via `darkHue` / `darkSaturation` — see
125
+ [api.md](api.md#dark-seed-darkhue--darksaturation). Those pick the `h` and `s`
126
+ that enter the pipeline above; they never change how tone is transferred.
127
+ Authoring a dark saturation replaces the `darkDesaturation` step rather than
128
+ stacking with it, and `static` colors ignore both.
129
+
130
+ **Extremes with a base** take a different dark path. Because the light and dark
131
+ windows are asymmetric, running an extreme through the dark window compresses
132
+ the span between it and its base, which lowers contrast. For a color with both
133
+ `base` and `tone: 'max'` / `'min'`, Glaze measures the tone shift the light
134
+ scheme produced between the two, then replays it against the base's resolved
135
+ dark tone (mirrored under `auto`, same-signed under `fixed`). Only `[0, 100]`
136
+ clamping applies, so such a color may render past the `darkTone` boundary.
137
+
138
+ ## Reference and render epsilon
139
+
140
+ `REF_EPS = 0.05` defines Glaze's canonical tone scale. It is used for OKHST
141
+ input, stored resolved tone, tone deltas, and contrast search.
142
+
143
+ An object tone window may supply another `eps` as a scheme-specific rendering
144
+ control. Glaze still converts the result back to the reference scale so tone
145
+ deltas and contrast calculations remain comparable between schemes. Most
146
+ palettes should use the default.
147
+
148
+ ## Contrast verification
149
+
150
+ Tone provides an efficient starting point for contrast solving, but Glaze does
151
+ not assume a chromatic tone has the neutral color's luminance. For a color with
152
+ `base` and `contrast`, Glaze:
153
+
154
+ 1. resolves both colors for the active scheme;
155
+ 2. measures the requested WCAG ratio or APCA Lc;
156
+ 3. searches tone when the requested position misses the floor; and
157
+ 4. warns when the target is physically unreachable or rendered chroma drifts
158
+ below the expected result.
159
+
160
+ `contrast` is therefore a floor, not a replacement for tone relationships.
161
+ Detailed presets, HC promotion, polarity, and role inference are documented
162
+ under [`contrast`](api.md#contrast-floor) and [roles](api.md#roles).
163
+
164
+ ## Input and output
165
+
166
+ Glaze accepts OKHST through:
167
+
168
+ ```ts
169
+ glaze.color('okhst(152 95% 70%)');
170
+ glaze.color({ h: 152, s: 0.95, t: 0.7 });
171
+ glaze.color({ hue: 152, saturation: 95, tone: 70 });
172
+ ```
173
+
174
+ There is no native CSS `okhst()` function. Native exports use `oklch`, `rgb`,
175
+ or `hsl`. [Tasty](https://tasty.style) integrations may request `format: 'okhst'` because it can
176
+ consume Glaze's custom serialization:
177
+
178
+ ```ts
179
+ theme.tasty({ format: 'okhst' });
180
+ ```
181
+
182
+ ## Bringing existing colors into Glaze
183
+
184
+ When moving raw CSS colors or design tokens into Glaze, use `fromHex()`,
185
+ `fromRgb()`, or `glaze.color()` to preserve the source color while you establish
186
+ theme seeds and semantic relationships. Then replace one-off values with roots,
187
+ tone deltas, and contrast floors as appropriate.
188
+
189
+ See [migration.md](migration.md#migrating-from-an-existing-color-system) for
190
+ the implementation workflow.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cube-dev/ui-kit",
3
- "version": "0.149.1",
3
+ "version": "0.150.0",
4
4
  "type": "module",
5
5
  "description": "UIKit for Cube Projects",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  "@react-types/shared": "^3.32.1",
49
49
  "@tabler/icons-react": "^3.31.0",
50
50
  "@tanstack/react-virtual": "^3.13.12",
51
- "@tenphi/glaze": "0.13.0",
51
+ "@tenphi/glaze": "1.2.0",
52
52
  "@tenphi/tasty": "2.11.0",
53
53
  "clipboard-copy": "^4.0.1",
54
54
  "clsx": "^1.1.1",