@cube-dev/ui-kit 0.212.0 → 0.214.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 (909) hide show
  1. package/dist/CHANGELOG.md +48 -0
  2. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  3. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  4. package/dist/_internal/hooks/use-event.js +1 -1
  5. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  6. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  7. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  8. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  9. package/dist/_internal/hooks/use-warn.js +1 -1
  10. package/dist/components/Block.js +1 -1
  11. package/dist/components/CollectionItem.js +1 -1
  12. package/dist/components/GlobalStyles.js +1 -1
  13. package/dist/components/GridProvider.d.ts +2 -1
  14. package/dist/components/GridProvider.js +6 -4
  15. package/dist/components/GridProvider.js.map +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/AutoCollapseObserver.js +1 -1
  21. package/dist/components/actions/Button/Button.js +1 -1
  22. package/dist/components/actions/Button/index.js +1 -1
  23. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  24. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  25. package/dist/components/actions/ButtonSplit/context.js +1 -1
  26. package/dist/components/actions/CommandMenu/CommandMenu.d.ts +3 -2
  27. package/dist/components/actions/CommandMenu/CommandMenu.js +128 -131
  28. package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
  29. package/dist/components/actions/CommandMenu/styled.js +1 -1
  30. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  31. package/dist/components/actions/ItemActionContext.js +1 -1
  32. package/dist/components/actions/ItemActionsWrapper.js +1 -1
  33. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  34. package/dist/components/actions/Link/Link.js +1 -1
  35. package/dist/components/actions/Menu/Menu.js +1 -1
  36. package/dist/components/actions/Menu/MenuCollectionItem.js +1 -1
  37. package/dist/components/actions/Menu/MenuItem.js +1 -1
  38. package/dist/components/actions/Menu/MenuSection.js +1 -1
  39. package/dist/components/actions/Menu/MenuTrigger.js +4 -3
  40. package/dist/components/actions/Menu/MenuTrigger.js.map +1 -1
  41. package/dist/components/actions/Menu/SubMenuTrigger.js +4 -3
  42. package/dist/components/actions/Menu/SubMenuTrigger.js.map +1 -1
  43. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  44. package/dist/components/actions/Menu/context.js +1 -1
  45. package/dist/components/actions/Menu/styled.js +1 -1
  46. package/dist/components/actions/actions-run.js +1 -1
  47. package/dist/components/actions/use-action.d.ts +1 -1
  48. package/dist/components/actions/use-action.js +2 -2
  49. package/dist/components/actions/use-action.js.map +1 -1
  50. package/dist/components/actions/use-anchored-menu.js +1 -1
  51. package/dist/components/actions/use-context-menu.js +1 -1
  52. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  53. package/dist/components/content/Alert/Alert.js +1 -1
  54. package/dist/components/content/Alert/use-alert.js +1 -1
  55. package/dist/components/content/Avatar/Avatar.js +1 -1
  56. package/dist/components/content/Badge/Badge.js +1 -1
  57. package/dist/components/content/Card/Card.js +1 -1
  58. package/dist/components/content/Content.js +1 -1
  59. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  60. package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
  61. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  62. package/dist/components/content/Divider/Divider.js +1 -1
  63. package/dist/components/content/Footer.js +1 -1
  64. package/dist/components/content/Header.js +1 -1
  65. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  66. package/dist/components/content/InfoBadge/InfoBadge.js +36 -4
  67. package/dist/components/content/InfoBadge/InfoBadge.js.map +1 -1
  68. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  69. package/dist/components/content/Item/Item.js +1 -1
  70. package/dist/components/content/Item/ItemWithNativeLinks.js +6 -10
  71. package/dist/components/content/Item/ItemWithNativeLinks.js.map +1 -1
  72. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  73. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  74. package/dist/components/content/Layout/GridLayout.js +1 -1
  75. package/dist/components/content/Layout/Layout.d.ts +3 -2
  76. package/dist/components/content/Layout/Layout.js +12 -5
  77. package/dist/components/content/Layout/Layout.js.map +1 -1
  78. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  79. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  80. package/dist/components/content/Layout/LayoutContainer.d.ts +3 -2
  81. package/dist/components/content/Layout/LayoutContainer.js +4 -3
  82. package/dist/components/content/Layout/LayoutContainer.js.map +1 -1
  83. package/dist/components/content/Layout/LayoutContent.d.ts +3 -2
  84. package/dist/components/content/Layout/LayoutContent.js +56 -45
  85. package/dist/components/content/Layout/LayoutContent.js.map +1 -1
  86. package/dist/components/content/Layout/LayoutContext.js +1 -1
  87. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  88. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  89. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  90. package/dist/components/content/Layout/LayoutHeader.js +3 -3
  91. package/dist/components/content/Layout/LayoutHeader.js.map +1 -1
  92. package/dist/components/content/Layout/LayoutPane.d.ts +3 -2
  93. package/dist/components/content/Layout/LayoutPane.js +66 -55
  94. package/dist/components/content/Layout/LayoutPane.js.map +1 -1
  95. package/dist/components/content/Layout/LayoutPanel.d.ts +3 -2
  96. package/dist/components/content/Layout/LayoutPanel.js +15 -8
  97. package/dist/components/content/Layout/LayoutPanel.js.map +1 -1
  98. package/dist/components/content/Layout/LayoutPanelHeader.d.ts +3 -2
  99. package/dist/components/content/Layout/LayoutPanelHeader.js +38 -68
  100. package/dist/components/content/Layout/LayoutPanelHeader.js.map +1 -1
  101. package/dist/components/content/Layout/LayoutPanelTransition.js +1 -1
  102. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  103. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  104. package/dist/components/content/Layout/index.js +1 -1
  105. package/dist/components/content/Layout/utils.js +1 -1
  106. package/dist/components/content/Paragraph.js +1 -1
  107. package/dist/components/content/Placeholder/Placeholder.d.ts +3 -2
  108. package/dist/components/content/Placeholder/Placeholder.js +16 -37
  109. package/dist/components/content/Placeholder/Placeholder.js.map +1 -1
  110. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  111. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  112. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  113. package/dist/components/content/Result/Result.js +1 -1
  114. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  115. package/dist/components/content/Tag/Tag.js +55 -29
  116. package/dist/components/content/Tag/Tag.js.map +1 -1
  117. package/dist/components/content/Text.js +1 -1
  118. package/dist/components/content/TextItem/TextItem.js +1 -1
  119. package/dist/components/content/Title.js +1 -1
  120. package/dist/components/content/Tree/Tree.js +11 -3
  121. package/dist/components/content/Tree/Tree.js.map +1 -1
  122. package/dist/components/content/Tree/TreeNode.js +1 -1
  123. package/dist/components/content/Tree/checked-keys.js +1 -1
  124. package/dist/components/content/Tree/rowId.js +1 -1
  125. package/dist/components/content/Tree/styled.js +1 -1
  126. package/dist/components/content/Tree/tree-index.js +1 -1
  127. package/dist/components/content/Tree/types.d.ts +3 -2
  128. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  129. package/dist/components/content/Tree/use-load-data.js +1 -1
  130. package/dist/components/content/highlightText.js +1 -1
  131. package/dist/components/content/use-auto-tooltip.js +1 -1
  132. package/dist/components/data/DataTable/DataTable.js +3 -1
  133. package/dist/components/data/DataTable/DataTable.js.map +1 -1
  134. package/dist/components/data/DataTable/types.d.ts +3 -2
  135. package/dist/components/data/ItemTable/ItemTable.js +3 -1
  136. package/dist/components/data/ItemTable/ItemTable.js.map +1 -1
  137. package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
  138. package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
  139. package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
  140. package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
  141. package/dist/components/data/ItemTable/item-table-sections.js +1 -1
  142. package/dist/components/data/ItemTable/types.d.ts +3 -2
  143. package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
  144. package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
  145. package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
  146. package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
  147. package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
  148. package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
  149. package/dist/components/data/TableBase/ColumnResizer.js +1 -1
  150. package/dist/components/data/TableBase/RowCollection.js +1 -1
  151. package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
  152. package/dist/components/data/TableBase/TableRow.js +1 -1
  153. package/dist/components/data/TableBase/TableRowLink.js +1 -1
  154. package/dist/components/data/TableBase/TableView.d.ts +1 -0
  155. package/dist/components/data/TableBase/TableView.js +7 -2
  156. package/dist/components/data/TableBase/TableView.js.map +1 -1
  157. package/dist/components/data/TableBase/TreeGridTable.js +1 -1
  158. package/dist/components/data/TableBase/column-header.js +1 -1
  159. package/dist/components/data/TableBase/column-menu.js +1 -1
  160. package/dist/components/data/TableBase/column-styles.js +1 -1
  161. package/dist/components/data/TableBase/column-tint.js +1 -1
  162. package/dist/components/data/TableBase/row-menu.js +1 -1
  163. package/dist/components/data/TableBase/styled.js +1 -1
  164. package/dist/components/data/TableBase/table-body-sections.js +1 -1
  165. package/dist/components/data/TableBase/table-tree.js +1 -1
  166. package/dist/components/data/TableBase/types.js +1 -1
  167. package/dist/components/data/TableBase/use-cell-selection.js +0 -0
  168. package/dist/components/data/TableBase/use-column-menu.js +1 -1
  169. package/dist/components/data/TableBase/use-column-order.js +1 -1
  170. package/dist/components/data/TableBase/use-column-window.js +1 -1
  171. package/dist/components/data/TableBase/use-container-width.js +1 -1
  172. package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
  173. package/dist/components/data/TableBase/use-scrollability.js +1 -1
  174. package/dist/components/data/TableBase/use-table-columns.js +1 -1
  175. package/dist/components/data/TableBase/use-table-search.js +1 -1
  176. package/dist/components/data/TableBase/use-table-selection.js +1 -1
  177. package/dist/components/data/TableBase/use-table-sort.js +1 -1
  178. package/dist/components/data/TableBase/use-table-sorts.js +1 -1
  179. package/dist/components/data/TableBase/use-table-storage.js +1 -1
  180. package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
  181. package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
  182. package/dist/components/fields/Checkbox/Checkbox.d.ts +3 -2
  183. package/dist/components/fields/Checkbox/Checkbox.js +5 -6
  184. package/dist/components/fields/Checkbox/Checkbox.js.map +1 -1
  185. package/dist/components/fields/Checkbox/CheckboxGroup.d.ts +3 -2
  186. package/dist/components/fields/Checkbox/CheckboxGroup.js +38 -31
  187. package/dist/components/fields/Checkbox/CheckboxGroup.js.map +1 -1
  188. package/dist/components/fields/Checkbox/context.js +1 -1
  189. package/dist/components/fields/ColorInput/ColorInput.d.ts +3 -2
  190. package/dist/components/fields/ColorInput/ColorInput.js +1 -1
  191. package/dist/components/fields/ColorInput/ColorInput.js.map +1 -1
  192. package/dist/components/fields/ColorPicker/ColorPicker.d.ts +3 -2
  193. package/dist/components/fields/ColorPicker/ColorPicker.js +150 -137
  194. package/dist/components/fields/ColorPicker/ColorPicker.js.map +1 -1
  195. package/dist/components/fields/ColorSwatch/ColorSwatch.d.ts +3 -2
  196. package/dist/components/fields/ColorSwatch/ColorSwatch.js +47 -28
  197. package/dist/components/fields/ColorSwatch/ColorSwatch.js.map +1 -1
  198. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.d.ts +3 -2
  199. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +157 -135
  200. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js.map +1 -1
  201. package/dist/components/fields/ComboBox/ComboBox.d.ts +3 -2
  202. package/dist/components/fields/ComboBox/ComboBox.js +240 -225
  203. package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
  204. package/dist/components/fields/ComboBox/comboBoxOptions.js +1 -1
  205. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  206. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  207. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  208. package/dist/components/fields/DatePicker/CalendarPopover.js +4 -3
  209. package/dist/components/fields/DatePicker/CalendarPopover.js.map +1 -1
  210. package/dist/components/fields/DatePicker/DateInput.d.ts +3 -2
  211. package/dist/components/fields/DatePicker/DateInput.js +4 -1
  212. package/dist/components/fields/DatePicker/DateInput.js.map +1 -1
  213. package/dist/components/fields/DatePicker/DateInputBase.js +108 -92
  214. package/dist/components/fields/DatePicker/DateInputBase.js.map +1 -1
  215. package/dist/components/fields/DatePicker/DatePicker.d.ts +3 -2
  216. package/dist/components/fields/DatePicker/DatePicker.js +42 -32
  217. package/dist/components/fields/DatePicker/DatePicker.js.map +1 -1
  218. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  219. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  220. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  221. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  222. package/dist/components/fields/DatePicker/DateRangePicker.d.ts +3 -2
  223. package/dist/components/fields/DatePicker/DateRangePicker.js +32 -27
  224. package/dist/components/fields/DatePicker/DateRangePicker.js.map +1 -1
  225. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.d.ts +3 -2
  226. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +185 -175
  227. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js.map +1 -1
  228. package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
  229. package/dist/components/fields/DatePicker/PeriodPicker.d.ts +3 -2
  230. package/dist/components/fields/DatePicker/PeriodPicker.js +97 -86
  231. package/dist/components/fields/DatePicker/PeriodPicker.js.map +1 -1
  232. package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
  233. package/dist/components/fields/DatePicker/TimeInput.d.ts +3 -2
  234. package/dist/components/fields/DatePicker/TimeInput.js +4 -1
  235. package/dist/components/fields/DatePicker/TimeInput.js.map +1 -1
  236. package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
  237. package/dist/components/fields/DatePicker/YearPicker.js +1 -1
  238. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  239. package/dist/components/fields/DatePicker/period.js +1 -1
  240. package/dist/components/fields/DatePicker/props.js +1 -1
  241. package/dist/components/fields/DatePicker/utils.js +1 -1
  242. package/dist/components/fields/FileInput/FileInput.d.ts +3 -2
  243. package/dist/components/fields/FileInput/FileInput.js +104 -87
  244. package/dist/components/fields/FileInput/FileInput.js.map +1 -1
  245. package/dist/components/fields/FilterListBox/FilterListBox.js +3 -1
  246. package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
  247. package/dist/components/fields/FilterListBox/styled.js +1 -1
  248. package/dist/components/fields/FilterPicker/FilterPicker.d.ts +2 -2
  249. package/dist/components/fields/FilterPicker/FilterPicker.js +4 -3
  250. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  251. package/dist/components/fields/FilterPicker/FilterTree.js +1 -1
  252. package/dist/components/fields/Input/Input.js +1 -1
  253. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  254. package/dist/components/fields/ListBox/ListBox.d.ts +3 -2
  255. package/dist/components/fields/ListBox/ListBox.js +15 -3
  256. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  257. package/dist/components/fields/ListBox/empty-row.js +1 -1
  258. package/dist/components/fields/ListBox/optionId.js +1 -1
  259. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +4 -3
  260. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +1 -1
  261. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  262. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  263. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  264. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  265. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  266. package/dist/components/fields/Picker/Picker.d.ts +2 -2
  267. package/dist/components/fields/Picker/Picker.js +4 -3
  268. package/dist/components/fields/Picker/Picker.js.map +1 -1
  269. package/dist/components/fields/RadioGroup/Radio.d.ts +6 -5
  270. package/dist/components/fields/RadioGroup/Radio.js +113 -137
  271. package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
  272. package/dist/components/fields/RadioGroup/RadioGroup.d.ts +3 -2
  273. package/dist/components/fields/RadioGroup/RadioGroup.js +67 -79
  274. package/dist/components/fields/RadioGroup/RadioGroup.js.map +1 -1
  275. package/dist/components/fields/RadioGroup/context.js +1 -1
  276. package/dist/components/fields/RadioGroup/joined-styles.js +100 -0
  277. package/dist/components/fields/RadioGroup/joined-styles.js.map +1 -0
  278. package/dist/components/fields/SearchComboBox/SearchComboBox.d.ts +3 -2
  279. package/dist/components/fields/SearchComboBox/SearchComboBox.js +7 -3
  280. package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
  281. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  282. package/dist/components/fields/Select/Select.d.ts +5 -3
  283. package/dist/components/fields/Select/Select.js +87 -69
  284. package/dist/components/fields/Select/Select.js.map +1 -1
  285. package/dist/components/fields/Slider/Gradation.js +1 -1
  286. package/dist/components/fields/Slider/HueSlider.js +1 -1
  287. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  288. package/dist/components/fields/Slider/Slider.js +1 -1
  289. package/dist/components/fields/Slider/SliderBase.js +44 -24
  290. package/dist/components/fields/Slider/SliderBase.js.map +1 -1
  291. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  292. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  293. package/dist/components/fields/Slider/elements.js +1 -1
  294. package/dist/components/fields/Slider/index.js +1 -1
  295. package/dist/components/fields/Slider/types.d.ts +3 -2
  296. package/dist/components/fields/Switch/Switch.d.ts +3 -2
  297. package/dist/components/fields/Switch/Switch.js +9 -3
  298. package/dist/components/fields/Switch/Switch.js.map +1 -1
  299. package/dist/components/fields/TagInput/TagInput.d.ts +29 -5
  300. package/dist/components/fields/TagInput/TagInput.js +343 -207
  301. package/dist/components/fields/TagInput/TagInput.js.map +1 -1
  302. package/dist/components/fields/TagInput/TagList.js +59 -34
  303. package/dist/components/fields/TagInput/TagList.js.map +1 -1
  304. package/dist/components/fields/TagInput/useActiveOption.js +1 -1
  305. package/dist/components/fields/TagInput/useSuffixSpace.js +62 -0
  306. package/dist/components/fields/TagInput/useSuffixSpace.js.map +1 -0
  307. package/dist/components/fields/TagInput/useTagError.js +1 -1
  308. package/dist/components/fields/TextArea/TextArea.js +1 -1
  309. package/dist/components/fields/TextInput/TextInput.js +1 -1
  310. package/dist/components/fields/TextInput/TextInputBase.d.ts +3 -2
  311. package/dist/components/fields/TextInput/TextInputBase.js +14 -3
  312. package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
  313. package/dist/components/fields/TextInput/displayed-validation.js +1 -1
  314. package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
  315. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  316. package/dist/components/fields/ToggleGroup/ToggleGroup.d.ts +53 -0
  317. package/dist/components/fields/ToggleGroup/ToggleGroup.js +237 -0
  318. package/dist/components/fields/ToggleGroup/ToggleGroup.js.map +1 -0
  319. package/dist/components/fields/ToggleGroup/ToggleGroupItem.d.ts +29 -0
  320. package/dist/components/fields/ToggleGroup/ToggleGroupItem.js +166 -0
  321. package/dist/components/fields/ToggleGroup/ToggleGroupItem.js.map +1 -0
  322. package/dist/components/fields/ToggleGroup/context.d.ts +8 -0
  323. package/dist/components/fields/ToggleGroup/context.js +13 -0
  324. package/dist/components/fields/ToggleGroup/context.js.map +1 -0
  325. package/dist/components/fields/ToggleGroup/index.d.ts +5 -0
  326. package/dist/components/fields/TriggerActions.js +1 -1
  327. package/dist/components/fields/color/ColorPanel.js +1 -1
  328. package/dist/components/fields/color/channels.js +1 -1
  329. package/dist/components/fields/color/color.js +1 -1
  330. package/dist/components/fields/color/context.js +1 -1
  331. package/dist/components/fields/index.d.ts +5 -1
  332. package/dist/components/fields/option-origin-press.js +1 -1
  333. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  334. package/dist/components/form/FieldWrapper/field-description.js +1 -1
  335. package/dist/components/form/Form/Field.js +1 -1
  336. package/dist/components/form/Form/Form.d.ts +3 -2
  337. package/dist/components/form/Form/Form.js +6 -4
  338. package/dist/components/form/Form/Form.js.map +1 -1
  339. package/dist/components/form/Form/FormContext.js +1 -1
  340. package/dist/components/form/Form/FormElement.js +1 -1
  341. package/dist/components/form/Form/ModernFormRoot.js +43 -40
  342. package/dist/components/form/Form/ModernFormRoot.js.map +1 -1
  343. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  344. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  345. package/dist/components/form/Form/SubmitError.js +1 -1
  346. package/dist/components/form/Form/backend.js +1 -1
  347. package/dist/components/form/Form/index.js +1 -1
  348. package/dist/components/form/Form/modern/actions.js +1 -1
  349. package/dist/components/form/Form/modern/context.js +1 -1
  350. package/dist/components/form/Form/modern/controller.js +1 -1
  351. package/dist/components/form/Form/modern/field-binding.js +1 -1
  352. package/dist/components/form/Form/modern/field.js +1 -1
  353. package/dist/components/form/Form/modern/react.js +1 -1
  354. package/dist/components/form/Form/modern/store.js +1 -1
  355. package/dist/components/form/Form/modern/validation.js +1 -1
  356. package/dist/components/form/Form/modern/values.js +1 -1
  357. package/dist/components/form/Form/reset-unbound-controls.js +1 -1
  358. package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
  359. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  360. package/dist/components/form/Form/use-field/use-field.js +1 -1
  361. package/dist/components/form/Form/use-form.js +1 -1
  362. package/dist/components/form/Form/validation.js +1 -1
  363. package/dist/components/form/Label.d.ts +3 -2
  364. package/dist/components/form/Label.js +31 -26
  365. package/dist/components/form/Label.js.map +1 -1
  366. package/dist/components/form/field-chrome.js +1 -1
  367. package/dist/components/form/field-layout.js +1 -1
  368. package/dist/components/form/legacy-tooltip.js +1 -1
  369. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  370. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  371. package/dist/components/form/validation/use-validation-props.js +1 -1
  372. package/dist/components/form/wrapper.js +1 -1
  373. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  374. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  375. package/dist/components/layout/Flex.js +1 -1
  376. package/dist/components/layout/Flow.js +1 -1
  377. package/dist/components/layout/Grid.js +1 -1
  378. package/dist/components/layout/Panel.js +1 -1
  379. package/dist/components/layout/Prefix.d.ts +3 -2
  380. package/dist/components/layout/Prefix.js +22 -17
  381. package/dist/components/layout/Prefix.js.map +1 -1
  382. package/dist/components/layout/ResizablePanel.js +1 -1
  383. package/dist/components/layout/Space.js +1 -1
  384. package/dist/components/layout/Suffix.d.ts +3 -2
  385. package/dist/components/layout/Suffix.js +22 -17
  386. package/dist/components/layout/Suffix.js.map +1 -1
  387. package/dist/components/navigation/NavTabs/NavTabs.d.ts +66 -0
  388. package/dist/components/navigation/NavTabs/NavTabs.js +369 -0
  389. package/dist/components/navigation/NavTabs/NavTabs.js.map +1 -0
  390. package/dist/components/navigation/NavTabs/index.d.ts +3 -0
  391. package/dist/components/navigation/Pagination/Pagination.js +1 -1
  392. package/dist/components/navigation/Pagination/use-pagination.js +1 -1
  393. package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +1 -1
  394. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  395. package/dist/components/navigation/Tabs/TabButton.js +147 -187
  396. package/dist/components/navigation/Tabs/TabButton.js.map +1 -1
  397. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  398. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  399. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  400. package/dist/components/navigation/Tabs/Tabs.js +15 -5
  401. package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
  402. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  403. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  404. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  405. package/dist/components/navigation/Tabs/scroll-tab-into-strip.js +60 -0
  406. package/dist/components/navigation/Tabs/scroll-tab-into-strip.js.map +1 -0
  407. package/dist/components/navigation/Tabs/segmented-styles.js +1 -1
  408. package/dist/components/navigation/Tabs/styled.js +66 -65
  409. package/dist/components/navigation/Tabs/styled.js.map +1 -1
  410. package/dist/components/navigation/Tabs/types.d.ts +4 -3
  411. package/dist/components/navigation/Tabs/types.js +1 -1
  412. package/dist/components/navigation/Tabs/types.js.map +1 -1
  413. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  414. package/dist/components/navigation/Tabs/use-tab-indicator.js +63 -101
  415. package/dist/components/navigation/Tabs/use-tab-indicator.js.map +1 -1
  416. package/dist/components/navigation/index.d.ts +3 -1
  417. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  418. package/dist/components/other/Calendar/Calendar.js +1 -1
  419. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  420. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  421. package/dist/components/other/Calendar/CalendarHeader.js +1 -1
  422. package/dist/components/other/Calendar/CalendarPanel.js +1 -1
  423. package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
  424. package/dist/components/other/Calendar/PeriodGrid.js +1 -1
  425. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  426. package/dist/components/other/Calendar/styled.js +1 -1
  427. package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
  428. package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
  429. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  430. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  431. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  432. package/dist/components/overlays/Dialog/Dialog.d.ts +3 -2
  433. package/dist/components/overlays/Dialog/Dialog.js +5 -2
  434. package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
  435. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  436. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  437. package/dist/components/overlays/Dialog/DialogTrigger.js +4 -3
  438. package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
  439. package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
  440. package/dist/components/overlays/Dialog/context.js +1 -1
  441. package/dist/components/overlays/Dialog/default-button-text.js +1 -1
  442. package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
  443. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  444. package/dist/components/overlays/Dialog/use-dialog-open-sync.js +1 -1
  445. package/dist/components/overlays/Dialog/use-dismiss-confirmation.js +1 -1
  446. package/dist/components/overlays/Dialog/use-retained-dialog-focus.js +1 -1
  447. package/dist/components/overlays/Dialog/use-retained-dialog-focus.js.map +1 -1
  448. package/dist/components/overlays/Modal/Modal.js +1 -1
  449. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  450. package/dist/components/overlays/Modal/Overlay.js +1 -1
  451. package/dist/components/overlays/Modal/Popover.js +1 -1
  452. package/dist/components/overlays/Modal/Tray.js +1 -1
  453. package/dist/components/overlays/Modal/Underlay.js +1 -1
  454. package/dist/components/overlays/Modal/modal-containment.js +1 -1
  455. package/dist/components/overlays/Notifications/Notification.js +1 -1
  456. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  457. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  458. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  459. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  460. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  461. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  462. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  463. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  464. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  465. package/dist/components/overlays/Notifications/index.js +1 -1
  466. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  467. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  468. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  469. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  470. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  471. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  472. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  473. package/dist/components/overlays/Toast/index.js +1 -1
  474. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  475. package/dist/components/overlays/Toast/useToast.js +1 -1
  476. package/dist/components/overlays/Tooltip/Tooltip.d.ts +3 -2
  477. package/dist/components/overlays/Tooltip/Tooltip.js +63 -28
  478. package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
  479. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  480. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  481. package/dist/components/overlays/Tooltip/TooltipTrigger.js.map +1 -1
  482. package/dist/components/overlays/Tooltip/context.js +1 -1
  483. package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
  484. package/dist/components/portal/Portal.js +1 -1
  485. package/dist/components/portal/PortalProvider.js +1 -1
  486. package/dist/components/portal/usePortal.js +1 -1
  487. package/dist/components/shared/DraggableCollection.js +1 -1
  488. package/dist/components/shared/InvalidIcon.js +1 -1
  489. package/dist/components/shared/ValidIcon.js +1 -1
  490. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  491. package/dist/components/status/Spin/Cube.js +1 -1
  492. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  493. package/dist/components/status/Spin/Spin.js +1 -1
  494. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  495. package/dist/data/item-themes.js +3 -3
  496. package/dist/data/item-themes.js.map +1 -1
  497. package/dist/data/themes.js +1 -1
  498. package/dist/eslint-plugin/defaults.generated.js +9 -1
  499. package/dist/eslint-plugin/defaults.generated.js.map +1 -1
  500. package/dist/eslint-plugin/index.js +1 -1
  501. package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
  502. package/dist/i18n/I18nProvider.js +1 -1
  503. package/dist/i18n/createFormatter.js +1 -1
  504. package/dist/i18n/index.js +1 -1
  505. package/dist/i18n/instance.js +1 -1
  506. package/dist/i18n/locales/de-DE/uikit.js +5 -3
  507. package/dist/i18n/locales/en-US/uikit.js +5 -3
  508. package/dist/i18n/locales/en-US/uikit.json.d.ts +8 -4
  509. package/dist/i18n/locales/es-ES/uikit.js +5 -3
  510. package/dist/i18n/locales/es-MX/uikit.js +5 -3
  511. package/dist/i18n/locales/fr-FR/uikit.js +5 -3
  512. package/dist/i18n/locales/it-IT/uikit.js +5 -3
  513. package/dist/i18n/locales/ja-JP/uikit.js +5 -3
  514. package/dist/i18n/locales/nb-NO/uikit.js +5 -3
  515. package/dist/i18n/locales/pt-BR/uikit.js +5 -3
  516. package/dist/i18n/locales/pt-PT/uikit.js +5 -3
  517. package/dist/i18n/locales/sv-SE/uikit.js +5 -3
  518. package/dist/i18n/locales/vi-VN/uikit.js +5 -3
  519. package/dist/i18n/locales.js +1 -1
  520. package/dist/i18n/namespace.js +1 -1
  521. package/dist/i18n/useFormatter.js +1 -1
  522. package/dist/i18n/useI18n.js +1 -1
  523. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  524. package/dist/icons/AdjustmentsIcon.js +1 -1
  525. package/dist/icons/AiIcon.js +1 -1
  526. package/dist/icons/AreaChartIcon.js +1 -1
  527. package/dist/icons/ArrowNarrowDownIcon.js +1 -1
  528. package/dist/icons/ArrowNarrowUpIcon.js +1 -1
  529. package/dist/icons/BackwardIcon.js +1 -1
  530. package/dist/icons/BarChartIcon.js +1 -1
  531. package/dist/icons/BellFilledIcon.js +1 -1
  532. package/dist/icons/BellIcon.js +1 -1
  533. package/dist/icons/BooleanIcon.js +1 -1
  534. package/dist/icons/CalendarEditIcon.js +1 -1
  535. package/dist/icons/CalendarIcon.js +1 -1
  536. package/dist/icons/CaretDownIcon.js +1 -1
  537. package/dist/icons/CaretUpIcon.js +1 -1
  538. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  539. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  540. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  541. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  542. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  543. package/dist/icons/ChartBarLineIcon.js +1 -1
  544. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  545. package/dist/icons/ChartBarStackedIcon.js +1 -1
  546. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  547. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  548. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  549. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  550. package/dist/icons/ChartBubbleIcon.js +1 -1
  551. package/dist/icons/ChartDonut2Icon.js +1 -1
  552. package/dist/icons/ChartFunnelIcon.js +1 -1
  553. package/dist/icons/ChartHeatmapIcon.js +1 -1
  554. package/dist/icons/ChartKPIIcon.js +1 -1
  555. package/dist/icons/ChartPie2Icon.js +1 -1
  556. package/dist/icons/ChartScatterIcon.js +1 -1
  557. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  558. package/dist/icons/CheckCircleIcon.js +1 -1
  559. package/dist/icons/CheckIcon.js +1 -1
  560. package/dist/icons/CircleFilledIcon.js +1 -1
  561. package/dist/icons/ClearIcon.js +1 -1
  562. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  563. package/dist/icons/CloseCircleIcon.js +1 -1
  564. package/dist/icons/CloseIcon.js +1 -1
  565. package/dist/icons/CodeIcon.js +1 -1
  566. package/dist/icons/ColumnTotalIcon.js +1 -1
  567. package/dist/icons/CopyIcon.js +1 -1
  568. package/dist/icons/CountIcon.js +1 -1
  569. package/dist/icons/CubeIcon.js +1 -1
  570. package/dist/icons/CubePauseIcon.js +1 -1
  571. package/dist/icons/CubePlayIcon.js +1 -1
  572. package/dist/icons/CurrencyDollarIcon.js +1 -1
  573. package/dist/icons/DangerIcon.js +1 -1
  574. package/dist/icons/DashboardIcon.js +1 -1
  575. package/dist/icons/DatabaseIcon.js +1 -1
  576. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  577. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  578. package/dist/icons/DirectionIcon.js +1 -1
  579. package/dist/icons/DonutIcon.js +1 -1
  580. package/dist/icons/DownIcon.js +1 -1
  581. package/dist/icons/EditIcon.js +1 -1
  582. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  583. package/dist/icons/ExclamationCircleIcon.js +1 -1
  584. package/dist/icons/ExclamationIcon.js +1 -1
  585. package/dist/icons/EyeIcon.js +1 -1
  586. package/dist/icons/EyeInvisibleIcon.js +1 -1
  587. package/dist/icons/FilterIcon.js +1 -1
  588. package/dist/icons/FolderFilledIcon.js +1 -1
  589. package/dist/icons/FolderIcon.js +1 -1
  590. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  591. package/dist/icons/FolderOpenIcon.js +1 -1
  592. package/dist/icons/ForwardIcon.js +1 -1
  593. package/dist/icons/GripVerticalIcon.js +1 -1
  594. package/dist/icons/HierarchyIcon.js +1 -1
  595. package/dist/icons/HierarchyOpenIcon.js +1 -1
  596. package/dist/icons/Icon.js +1 -1
  597. package/dist/icons/InfoCircleIcon.js +1 -1
  598. package/dist/icons/InfoIcon.js +1 -1
  599. package/dist/icons/KeyIcon.js +1 -1
  600. package/dist/icons/LeftIcon.js +1 -1
  601. package/dist/icons/LineChartIcon.js +1 -1
  602. package/dist/icons/LoadingIcon.js +1 -1
  603. package/dist/icons/LockFilledIcon.js +1 -1
  604. package/dist/icons/LockIcon.js +1 -1
  605. package/dist/icons/MoreIcon.js +1 -1
  606. package/dist/icons/NotAllowedIcon.js +1 -1
  607. package/dist/icons/Number123Icon.js +1 -1
  608. package/dist/icons/NumberIcon.js +1 -1
  609. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  610. package/dist/icons/PauseCircleIcon.js +1 -1
  611. package/dist/icons/PauseIcon.js +1 -1
  612. package/dist/icons/PercentageIcon.js +1 -1
  613. package/dist/icons/PieChartIcon.js +1 -1
  614. package/dist/icons/PipetteIcon.js +1 -1
  615. package/dist/icons/PlayCircleIcon.js +1 -1
  616. package/dist/icons/PlayIcon.js +1 -1
  617. package/dist/icons/PlusIcon.js +1 -1
  618. package/dist/icons/ProgressBarIcon.js +1 -1
  619. package/dist/icons/ReloadIcon.js +1 -1
  620. package/dist/icons/ReportIcon.js +1 -1
  621. package/dist/icons/ReturnIcon.js +1 -1
  622. package/dist/icons/RightIcon.js +1 -1
  623. package/dist/icons/RowTotalsIcon.js +1 -1
  624. package/dist/icons/SchemeIcon.js +1 -1
  625. package/dist/icons/SearchIcon.js +1 -1
  626. package/dist/icons/SemanticQueryIcon.js +1 -1
  627. package/dist/icons/SettingsIcon.js +1 -1
  628. package/dist/icons/ShieldFilledIcon.js +1 -1
  629. package/dist/icons/ShieldIcon.js +1 -1
  630. package/dist/icons/SlashIcon.js +1 -1
  631. package/dist/icons/SparklesIcon.js +1 -1
  632. package/dist/icons/SqlIcon.js +1 -1
  633. package/dist/icons/StatsIcon.js +1 -1
  634. package/dist/icons/StopIcon.js +1 -1
  635. package/dist/icons/StringIcon.js +1 -1
  636. package/dist/icons/SubtotalsIcon.js +1 -1
  637. package/dist/icons/SwitchIcon.js +1 -1
  638. package/dist/icons/TableIcon.js +1 -1
  639. package/dist/icons/ThumbsDownIcon.js +1 -1
  640. package/dist/icons/ThumbsUpIcon.js +1 -1
  641. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  642. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  643. package/dist/icons/ThunderboltIcon.js +1 -1
  644. package/dist/icons/TimeIcon.js +1 -1
  645. package/dist/icons/TrashIcon.js +1 -1
  646. package/dist/icons/UnlockIcon.js +1 -1
  647. package/dist/icons/UpIcon.js +1 -1
  648. package/dist/icons/UserGroupIcon.js +1 -1
  649. package/dist/icons/UserIcon.js +1 -1
  650. package/dist/icons/UserLockIcon.js +1 -1
  651. package/dist/icons/ViewIcon.js +1 -1
  652. package/dist/icons/WarningFilledIcon.js +1 -1
  653. package/dist/icons/WarningIcon.js +1 -1
  654. package/dist/icons/wrap-icon.js +1 -1
  655. package/dist/index.d.ts +5 -1
  656. package/dist/index.js +5 -3
  657. package/dist/index.js.map +1 -1
  658. package/dist/probe/canonicalize.js +1 -1
  659. package/dist/probe/css.js +1 -1
  660. package/dist/probe/index.js +1 -1
  661. package/dist/provider.js +1 -1
  662. package/dist/providers/TrackingProvider.js +1 -1
  663. package/dist/providers/navigation-url.js +1 -1
  664. package/dist/providers/navigationAdapter.default.js +1 -1
  665. package/dist/providers/use-navigation.js +1 -1
  666. package/dist/tokens/all-tokens.js +1 -1
  667. package/dist/tokens/base.js +1 -1
  668. package/dist/tokens/color-seed.js +1 -1
  669. package/dist/tokens/color-theme.js +1 -1
  670. package/dist/tokens/colors.js +1 -1
  671. package/dist/tokens/layout.js +1 -1
  672. package/dist/tokens/lazy-styles.js +1 -1
  673. package/dist/tokens/legacy-color.js +1 -1
  674. package/dist/tokens/palette-config.js +1 -1
  675. package/dist/tokens/palette.js +12 -3
  676. package/dist/tokens/palette.js.map +1 -1
  677. package/dist/tokens/resolve.js +1 -1
  678. package/dist/tokens/shadows.js +1 -1
  679. package/dist/tokens/sizes.js +1 -1
  680. package/dist/tokens/spacing.js +1 -1
  681. package/dist/tokens/typography.js +1 -1
  682. package/dist/utils/ResizeSensor.js +1 -1
  683. package/dist/utils/colors.js +1 -1
  684. package/dist/utils/dotize.js +1 -1
  685. package/dist/utils/is-dev-env.js +1 -1
  686. package/dist/utils/layout-scale.js +25 -0
  687. package/dist/utils/layout-scale.js.map +1 -0
  688. package/dist/utils/modules.js +1 -1
  689. package/dist/utils/promise.js +1 -1
  690. package/dist/utils/raf.js +1 -1
  691. package/dist/utils/random.js +1 -1
  692. package/dist/utils/range.js +1 -1
  693. package/dist/utils/react/RenderCache.js +1 -1
  694. package/dist/utils/react/Slots.js +1 -1
  695. package/dist/utils/react/chain.js +1 -1
  696. package/dist/utils/react/componentBaseProps.d.ts +9 -0
  697. package/dist/utils/react/componentBaseProps.js +15 -0
  698. package/dist/utils/react/componentBaseProps.js.map +1 -0
  699. package/dist/utils/react/disabledProps.js +1 -1
  700. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  701. package/dist/utils/react/index.js +1 -1
  702. package/dist/utils/react/interactions.js +1 -1
  703. package/dist/utils/react/isTextOnly.js +1 -1
  704. package/dist/utils/react/mapProps.js +1 -1
  705. package/dist/utils/react/mergeProps.js +1 -1
  706. package/dist/utils/react/nullableValue.js +1 -1
  707. package/dist/utils/react/overlayKeyPropagation.js +1 -1
  708. package/dist/utils/react/pickBaseCustomizationProps.d.ts +2 -0
  709. package/dist/utils/react/pickBaseCustomizationProps.js +16 -0
  710. package/dist/utils/react/pickBaseCustomizationProps.js.map +1 -0
  711. package/dist/utils/react/programmaticFocus.js +1 -1
  712. package/dist/utils/react/resolveIcon.js +1 -1
  713. package/dist/utils/react/sharedStore.js +1 -1
  714. package/dist/utils/react/useBufferedValue.js +1 -1
  715. package/dist/utils/react/useCombinedRefs.js +1 -1
  716. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  717. package/dist/utils/react/useEventBus.js +1 -1
  718. package/dist/utils/react/useId.js +1 -1
  719. package/dist/utils/react/useIsDarwin.js +1 -1
  720. package/dist/utils/react/useKeySymbols.js +1 -1
  721. package/dist/utils/react/useLayoutEffect.js +1 -1
  722. package/dist/utils/react/useLocalStorage.js +1 -1
  723. package/dist/utils/react/useMergeStyles.js +1 -1
  724. package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
  725. package/dist/utils/react/useOverlayPosition.js +75 -0
  726. package/dist/utils/react/useOverlayPosition.js.map +1 -0
  727. package/dist/utils/react/usePopoverSync.js +1 -1
  728. package/dist/utils/react/useQaProps.js +1 -1
  729. package/dist/utils/react/useScheme.js +1 -1
  730. package/dist/utils/react/useViewportSize.js +1 -1
  731. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  732. package/dist/utils/selection.js +1 -1
  733. package/dist/utils/styles.js +1 -1
  734. package/dist/utils/tree.js +1 -1
  735. package/dist/utils/warnings.js +1 -1
  736. package/dist/version.js +3 -3
  737. package/harness/dev.harnesspm/patches/glaze-colors.patch.md +4 -0
  738. package/harness/dev.harnesspm/patches/tasty-usage.patch.md +3 -0
  739. package/harness/dev.harnesspm/rules/usage.md +12 -0
  740. package/harness/dev.harnesspm/scripts/colors.mjs +445 -0
  741. package/harness/plugin.json +29 -0
  742. package/package.json +17 -10
  743. package/{docs/components/Block.md → src/components/Block.docs.mdx} +7 -1
  744. package/{docs/components/CollectionItem.md → src/components/CollectionItem.docs.mdx} +12 -8
  745. package/{docs/components/GridProvider.md → src/components/GridProvider.docs.mdx} +5 -1
  746. package/{docs/components/Root.md → src/components/Root.docs.mdx} +6 -2
  747. package/{docs/components/actions/Action.md → src/components/actions/Action/Action.docs.mdx} +7 -1
  748. package/{docs/components/actions/Banner.md → src/components/actions/Banner/Banner.docs.mdx} +17 -3
  749. package/{docs/components/actions/Button.md → src/components/actions/Button/Button.docs.mdx} +19 -4
  750. package/{docs/components/actions/ButtonGroup.md → src/components/actions/ButtonGroup/ButtonGroup.docs.mdx} +6 -2
  751. package/{docs/components/actions/ButtonSplit.md → src/components/actions/ButtonSplit/ButtonSplit.docs.mdx} +18 -3
  752. package/{docs/components/actions/CommandMenu.md → src/components/actions/CommandMenu/CommandMenu.docs.mdx} +29 -17
  753. package/{docs/components/actions/ItemAction.md → src/components/actions/ItemAction/ItemAction.docs.mdx} +8 -1
  754. package/{docs/components/actions/ItemButton.md → src/components/actions/ItemButton/ItemButton.docs.mdx} +18 -9
  755. package/{docs/components/actions/Link.md → src/components/actions/Link/Link.docs.mdx} +11 -3
  756. package/{docs/components/actions/Menu.md → src/components/actions/Menu/Menu.docs.mdx} +27 -15
  757. package/{docs/components/actions/MenuTrigger.md → src/components/actions/Menu/MenuTrigger.docs.mdx} +5 -1
  758. package/{docs/components/actions/SubMenuTrigger.md → src/components/actions/Menu/SubMenuTrigger.docs.mdx} +5 -1
  759. package/{docs/components/actions/use-anchored-menu.md → src/components/actions/use-anchored-menu.docs.mdx} +9 -5
  760. package/{docs/components/actions/use-context-menu.md → src/components/actions/use-context-menu.docs.mdx} +9 -5
  761. package/{docs/components/content/ActiveZone.md → src/components/content/ActiveZone/ActiveZone.docs.mdx} +7 -1
  762. package/{docs/components/content/Alert.md → src/components/content/Alert/Alert.docs.mdx} +14 -1
  763. package/{docs/components/content/Avatar.md → src/components/content/Avatar/Avatar.docs.mdx} +7 -1
  764. package/{docs/components/content/Badge.md → src/components/content/Badge/Badge.docs.mdx} +23 -2
  765. package/{docs/components/content/Card.md → src/components/content/Card/Card.docs.mdx} +7 -1
  766. package/{docs/components/content/Content.md → src/components/content/Content.docs.mdx} +5 -1
  767. package/{docs/components/content/CopyPasteBlock.md → src/components/content/CopyPasteBlock/CopyPasteBlock.docs.mdx} +7 -1
  768. package/{docs/components/content/CopySnippet.md → src/components/content/CopySnippet/CopySnippet.docs.mdx} +7 -1
  769. package/{docs/components/content/Disclosure.md → src/components/content/Disclosure/Disclosure.docs.mdx} +34 -3
  770. package/{docs/components/content/Divider.md → src/components/content/Divider/Divider.docs.mdx} +12 -2
  771. package/{docs/components/content/Footer.md → src/components/content/Footer.docs.mdx} +5 -1
  772. package/{docs/components/content/Header.md → src/components/content/Header.docs.mdx} +5 -1
  773. package/{docs/components/content/HotKeys.md → src/components/content/HotKeys/HotKeys.docs.mdx} +41 -5
  774. package/{docs/components/content/InfoBadge.md → src/components/content/InfoBadge/InfoBadge.docs.mdx} +8 -2
  775. package/{docs/components/content/InlineInput.md → src/components/content/InlineInput/InlineInput.docs.mdx} +36 -3
  776. package/{docs/components/content/Item.md → src/components/content/Item/Item.docs.mdx} +31 -15
  777. package/{docs/components/content/ItemBadge.md → src/components/content/ItemBadge/ItemBadge.docs.mdx} +7 -1
  778. package/{docs/components/content/ItemCard.md → src/components/content/ItemCard/ItemCard.docs.mdx} +19 -6
  779. package/{docs/components/content/Layout.md → src/components/content/Layout/Layout.docs.mdx} +40 -6
  780. package/{docs/components/content/Paragraph.md → src/components/content/Paragraph.docs.mdx} +8 -2
  781. package/{docs/components/content/Placeholder.md → src/components/content/Placeholder/Placeholder.docs.mdx} +7 -1
  782. package/{docs/components/content/PrismCode.md → src/components/content/PrismCode/PrismCode.docs.mdx} +7 -1
  783. package/{docs/components/content/PrismDiffCode.md → src/components/content/PrismDiffCode/PrismDiffCode.docs.mdx} +7 -1
  784. package/{docs/components/content/Result.md → src/components/content/Result/Result.docs.mdx} +35 -4
  785. package/{docs/components/content/Skeleton.md → src/components/content/Skeleton/Skeleton.docs.mdx} +8 -2
  786. package/{docs/components/content/Tag.md → src/components/content/Tag/Tag.docs.mdx} +23 -2
  787. package/{docs/components/content/Text.md → src/components/content/Text.docs.mdx} +7 -1
  788. package/{docs/components/content/TextItem.md → src/components/content/TextItem/TextItem.docs.mdx} +30 -4
  789. package/{docs/components/content/Title.md → src/components/content/Title.docs.mdx} +5 -1
  790. package/{docs/components/content/Tree.md → src/components/content/Tree/Tree.docs.mdx} +28 -1
  791. package/{docs/components/data/DataTable.md → src/components/data/DataTable/DataTable.docs.mdx} +38 -6
  792. package/{docs/components/data/ItemTable.md → src/components/data/ItemTable/ItemTable.docs.mdx} +66 -5
  793. package/{docs/components/fields/Checkbox.md → src/components/fields/Checkbox/Checkbox.docs.mdx} +14 -6
  794. package/{docs/components/fields/ColorInput.md → src/components/fields/ColorInput/ColorInput.docs.mdx} +19 -7
  795. package/{docs/components/fields/ColorPicker.md → src/components/fields/ColorPicker/ColorPicker.docs.mdx} +22 -10
  796. package/{docs/components/fields/ColorSwatch.md → src/components/fields/ColorSwatch/ColorSwatch.docs.mdx} +17 -5
  797. package/{docs/components/fields/ColorSwatchGroup.md → src/components/fields/ColorSwatchGroup/ColorSwatchGroup.docs.mdx} +32 -12
  798. package/{docs/components/fields/ComboBox.md → src/components/fields/ComboBox/ComboBox.docs.mdx} +64 -7
  799. package/{docs/components/fields/CommandTextArea.md → src/components/fields/CommandTextArea/CommandTextArea.docs.mdx} +21 -13
  800. package/{docs/components/fields/DatePicker.md → src/components/fields/DatePicker/DatePicker.docs.mdx} +13 -5
  801. package/{docs/components/fields/PeriodPicker.md → src/components/fields/DatePicker/PeriodPicker.docs.mdx} +24 -5
  802. package/{docs/components/fields/FileInput.md → src/components/fields/FileInput/FileInput.docs.mdx} +16 -6
  803. package/{docs/components/fields/FilterListBox.md → src/components/fields/FilterListBox/FilterListBox.docs.mdx} +46 -10
  804. package/{docs/components/fields/FilterPicker.md → src/components/fields/FilterPicker/FilterPicker.docs.mdx} +57 -19
  805. package/{docs/components/fields/ListBox.md → src/components/fields/ListBox/ListBox.docs.mdx} +61 -11
  806. package/{docs/components/fields/NumberInput.md → src/components/fields/NumberInput/NumberInput.docs.mdx} +15 -7
  807. package/{docs/components/fields/PasswordInput.md → src/components/fields/PasswordInput/PasswordInput.docs.mdx} +15 -7
  808. package/{docs/components/fields/Picker.md → src/components/fields/Picker/Picker.docs.mdx} +53 -21
  809. package/{docs/components/fields/RadioGroup.md → src/components/fields/RadioGroup/RadioGroup.docs.mdx} +33 -10
  810. package/{docs/components/fields/SearchComboBox.md → src/components/fields/SearchComboBox/SearchComboBox.docs.mdx} +33 -14
  811. package/{docs/components/fields/SearchInput.md → src/components/fields/SearchInput/SearchInput.docs.mdx} +17 -7
  812. package/{docs/components/fields/Select.md → src/components/fields/Select/Select.docs.mdx} +55 -20
  813. package/{docs/components/fields/HueSlider.md → src/components/fields/Slider/HueSlider.docs.mdx} +24 -6
  814. package/{docs/components/fields/Slider.md → src/components/fields/Slider/Slider.docs.mdx} +22 -2
  815. package/{docs/components/fields/Switch.md → src/components/fields/Switch/Switch.docs.mdx} +26 -6
  816. package/{docs/components/fields/TagInput.md → src/components/fields/TagInput/TagInput.docs.mdx} +102 -19
  817. package/{docs/components/fields/TextArea.md → src/components/fields/TextArea/TextArea.docs.mdx} +19 -3
  818. package/{docs/components/fields/TextInput.md → src/components/fields/TextInput/TextInput.docs.mdx} +18 -8
  819. package/{docs/components/fields/TextInputMapper.md → src/components/fields/TextInputMapper/TextInputMapper.docs.mdx} +11 -2
  820. package/src/components/fields/ToggleGroup/ToggleGroup.docs.mdx +244 -0
  821. package/{docs/components/form/Field.md → src/components/form/Form/Field.docs.mdx} +16 -6
  822. package/{docs/components/form/Form.md → src/components/form/Form/Form.docs.mdx} +19 -6
  823. package/{docs/components/form/FormInstance.md → src/components/form/Form/FormInstance.docs.mdx} +9 -1
  824. package/src/components/form/Form/ModernForm.docs.mdx +6 -0
  825. package/{docs → src/components/form/Form}/modern-form-migration.md +1 -1
  826. package/{docs → src/components/form/Form}/modern-form-typecheck.md +1 -1
  827. package/{docs/components/helpers/DisplayTransition.md → src/components/helpers/DisplayTransition/DisplayTransition.docs.mdx} +15 -0
  828. package/{docs/components/helpers/IconSwitch.md → src/components/helpers/IconSwitch/IconSwitch.docs.mdx} +16 -1
  829. package/{docs/components/layout/Flex.md → src/components/layout/Flex.docs.mdx} +5 -1
  830. package/{docs/components/layout/Flow.md → src/components/layout/Flow.docs.mdx} +5 -1
  831. package/{docs/components/layout/Grid.md → src/components/layout/Grid.docs.mdx} +5 -1
  832. package/{docs/components/layout/Panel.md → src/components/layout/Panel.docs.mdx} +6 -2
  833. package/{docs/components/layout/Prefix.md → src/components/layout/Prefix.docs.mdx} +5 -1
  834. package/{docs/components/layout/ResizablePanel.md → src/components/layout/ResizablePanel.docs.mdx} +9 -2
  835. package/{docs/components/layout/Space.md → src/components/layout/Space.docs.mdx} +5 -1
  836. package/{docs/components/layout/Suffix.md → src/components/layout/Suffix.docs.mdx} +5 -1
  837. package/src/components/navigation/NavTabs/NavTabs.docs.mdx +217 -0
  838. package/{docs/components/navigation/Pagination.md → src/components/navigation/Pagination/Pagination.docs.mdx} +25 -4
  839. package/{docs/components/navigation/Tabs.md → src/components/navigation/Tabs/Tabs.docs.mdx} +94 -10
  840. package/{docs/components/organisms/StatsCard.md → src/components/organisms/StatsCard/StatsCard.docs.mdx} +6 -2
  841. package/{docs/components/other/Calendar.md → src/components/other/Calendar/Calendar.docs.mdx} +23 -5
  842. package/{docs/components/other/CubeLogo.md → src/components/other/CubeLogo/CubeLogo.docs.mdx} +7 -1
  843. package/{docs/components/other/NoDataIcon.md → src/components/other/NoDataIcon/NoDataIcon.docs.mdx} +9 -3
  844. package/{docs/components/overlays/AlertDialog.md → src/components/overlays/AlertDialog/AlertDialog.docs.mdx} +8 -2
  845. package/{docs/components/overlays/Dialog.md → src/components/overlays/Dialog/Dialog.docs.mdx} +11 -3
  846. package/{docs/components/overlays/DialogContainer.md → src/components/overlays/Dialog/DialogContainer.docs.mdx} +12 -5
  847. package/{docs/components/overlays/DialogForm.md → src/components/overlays/Dialog/DialogForm.docs.mdx} +21 -14
  848. package/{docs/components/overlays/DialogTrigger.md → src/components/overlays/Dialog/DialogTrigger.docs.mdx} +10 -5
  849. package/{docs/components/overlays/UseDialogContainer.md → src/components/overlays/Dialog/UseDialogContainer.docs.mdx} +7 -3
  850. package/{docs/components/overlays/Notifications.md → src/components/overlays/Notifications/Notifications.docs.mdx} +29 -6
  851. package/{docs/components/overlays/Toast.md → src/components/overlays/Toast/Toast.docs.mdx} +18 -2
  852. package/{docs/components/overlays/Tooltip.md → src/components/overlays/Tooltip/Tooltip.docs.mdx} +23 -6
  853. package/{docs/components/overlays/TooltipProvider.md → src/components/overlays/Tooltip/TooltipProvider.docs.mdx} +6 -2
  854. package/{docs/components/overlays/TooltipTrigger.md → src/components/overlays/Tooltip/TooltipTrigger.docs.mdx} +6 -2
  855. package/{docs/components/portal/Portal.md → src/components/portal/Portal.docs.mdx} +7 -1
  856. package/{docs/components/status/LoadingAnimation.md → src/components/status/LoadingAnimation/LoadingAnimation.docs.mdx} +8 -2
  857. package/{docs/components/status/Spin.md → src/components/status/Spin/Spin.docs.mdx} +7 -1
  858. package/{docs/BaseProperties.md → src/stories/BaseProperties.docs.mdx} +15 -6
  859. package/{docs/Colors.md → src/stories/Colors.docs.mdx} +23 -1
  860. package/{docs/ComplexLayout.md → src/stories/ComplexLayout.docs.mdx} +34 -1
  861. package/{docs/CreateComponent.md → src/stories/CreateComponent.docs.mdx} +21 -10
  862. package/{docs/FieldProperties.md → src/stories/FieldProperties.docs.mdx} +10 -6
  863. package/{docs/Introduction.md → src/stories/Introduction.docs.mdx} +10 -6
  864. package/{docs/RenderCache.md → src/stories/RenderCache.docs.mdx} +7 -0
  865. package/{docs/SimpleLayout.md → src/stories/SimpleLayout.docs.mdx} +26 -0
  866. package/{docs/Theming.md → src/stories/Theming.docs.mdx} +19 -3
  867. package/{docs/Typography.md → src/stories/Typography.docs.mdx} +15 -0
  868. package/{docs/Usage.md → src/stories/Usage.docs.mdx} +47 -36
  869. package/{docs/Utilities.md → src/stories/Utilities.docs.mdx} +4 -0
  870. package/docs/components/form/ModernForm.md +0 -294
  871. package/docs/glaze/contrast.mdx +0 -751
  872. package/docs/glaze/exporting.mdx +0 -635
  873. package/docs/glaze/getting-started.mdx +0 -487
  874. package/docs/glaze/hdr.mdx +0 -523
  875. package/docs/glaze/methodology.mdx +0 -979
  876. package/docs/glaze/migration.md +0 -542
  877. package/docs/glaze/mixes.mdx +0 -348
  878. package/docs/glaze/okhst.mdx +0 -692
  879. package/docs/glaze/reference/color-definitions.md +0 -552
  880. package/docs/glaze/reference/color-tokens.md +0 -421
  881. package/docs/glaze/reference/configuration.md +0 -532
  882. package/docs/glaze/reference/contrast.md +0 -279
  883. package/docs/glaze/reference/index.md +0 -225
  884. package/docs/glaze/reference/output.md +0 -714
  885. package/docs/glaze/reference/palette.md +0 -435
  886. package/docs/glaze/reference/theme.md +0 -332
  887. package/docs/glaze/reference/utilities.md +0 -646
  888. package/docs/glaze/schemes.mdx +0 -644
  889. package/docs/glaze/shadows-and-glows.mdx +0 -550
  890. package/docs/tasty/README.md +0 -42
  891. package/docs/tasty/adoption.md +0 -331
  892. package/docs/tasty/ai-agents.md +0 -259
  893. package/docs/tasty/comparison.md +0 -449
  894. package/docs/tasty/configuration.md +0 -957
  895. package/docs/tasty/debug.md +0 -333
  896. package/docs/tasty/design-system.md +0 -569
  897. package/docs/tasty/dsl.md +0 -1231
  898. package/docs/tasty/getting-started.md +0 -297
  899. package/docs/tasty/injector.md +0 -635
  900. package/docs/tasty/methodology.md +0 -673
  901. package/docs/tasty/migration-v3.md +0 -285
  902. package/docs/tasty/pipeline.md +0 -768
  903. package/docs/tasty/plugins.md +0 -333
  904. package/docs/tasty/react-api.md +0 -746
  905. package/docs/tasty/runtime-benchmarks.md +0 -388
  906. package/docs/tasty/ssr.md +0 -636
  907. package/docs/tasty/styles.md +0 -781
  908. package/docs/tasty/tasty-static.md +0 -700
  909. /package/{docs → src/components/form/Form}/modern-form-guide.md +0 -0
@@ -1,957 +0,0 @@
1
- # Configuration
2
-
3
- Tasty works without upfront configuration. Use `configure()` when your app or design system is ready to define shared tokens, state aliases, units, recipes, presets, or extension points.
4
-
5
- Call it **before any styles are generated** (before first render). For a guided setup, see [Getting Started](getting-started.md). For the higher-level docs map, see the [Docs Hub](README.md).
6
-
7
- ```jsx
8
- import { configure } from '@tenphi/tasty';
9
-
10
- configure({
11
- // CSP nonce for style elements
12
- nonce: 'abc123',
13
-
14
- // Global state aliases
15
- states: {
16
- '@mobile': '@media(w < 768px)',
17
- '@tablet': '@media(768px <= w < 1024px)',
18
- '@dark': '@root(schema=dark)',
19
- },
20
-
21
- // Parser configuration
22
- parserCacheSize: 2000, // LRU cache size (default: 1000)
23
-
24
- // Custom units (merged with built-in units)
25
- units: {
26
- gu: '4px', // `2gu` → `8px`
27
- cols: (n) => `calc(${n} * var(--col-width))`, // function-based unit
28
- },
29
-
30
- // Custom functions — a single map for both flavors, discriminated by value type:
31
- functions: {
32
- // Bare key + function value → parse-time function, called as `double(...)`
33
- double: (groups) => {
34
- const value = parseFloat(groups[0]?.output || '0');
35
- return `${value * 2}px`;
36
- },
37
- // `$$name` key + object value → declarative CSS @function, called as `$$negative(...)`
38
- $$negative: { args: ['$value'], result: '(-1 * $value)' },
39
- },
40
- });
41
- ```
42
-
43
- These docs use `data-schema="dark"` in examples. If your app already standardizes on a different attribute such as `data-theme`, keep the same pattern and swap the attribute name consistently everywhere you define root-state aliases.
44
-
45
- ---
46
-
47
- ## Options
48
-
49
- | Option | Type | Default | Description |
50
- | -------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51
- | `nonce` | `string` | - | CSP nonce for style elements |
52
- | `maxRulesPerSheet` | `number` | `8192` | Maximum rules per injected stylesheet |
53
- | `forceTextInjection` | `boolean` | `false` (`true` in test environments only while `configure()` has never been called) | Force text-node CSS injection instead of constructable stylesheets. Set it explicitly in test setup |
54
- | `devMode` | `boolean` | auto | Enable development-mode features: performance metrics and debug info. Does not turn on dev warnings; those follow `NODE_ENV` (or `localStorage.TASTY_DEBUG = 'true'` in a browser) |
55
- | `states` | `Record<string, string>` | - | Global state aliases for advanced state mapping |
56
- | `parserCacheSize` | `number` | `1000` | Parser LRU cache size |
57
- | `units` | `Record<string, string \| UnitHandler>` | Built-in | Custom units (merged with built-in). See [built-in units](dsl.md#built-in-units) |
58
- | `functions` | `Record<string, FunctionDefinition \| Function>` | - | Custom functions (merged). Bare keys → parse functions; `$$name` keys → declarative CSS `@function` definitions |
59
- | `handlers` | `Record<string, StyleHandlerDefinition>` | Built-in | Custom style handlers (replace built-in). See [Custom Style Handlers](#custom-style-handlers) |
60
- | `propHandlers` | `Record<string, PropHandlerDefinition>` | - | Props middleware for every component — props in, props out. See [Props Middleware](#props-middleware) |
61
- | `baseStyleProps` | `readonly string[]` | - | Style names exposed as props on **every** component. See [Base Style Props](#base-style-props) |
62
- | `tokens` | `Record<string, value \| stateMap>` | - | Design tokens injected as `:root` CSS custom properties |
63
- | `replaceTokens` | `Record<string, string \| number \| boolean>` | `{ '#clear': 'transparent' }` | Parse-time token substitution (inline replacement). `boolean` is allowed for `#` color tokens |
64
- | `keyframes` | `Record<string, KeyframesSteps>` | - | Global keyframes for animations |
65
- | `properties` | `Record<string, PropertyDefinition>` | - | Global CSS @property definitions |
66
- | `fontFaces` | `Record<string, FontFaceInput>` | - | Global @font-face definitions |
67
- | `counterStyles` | `Record<string, CounterStyleDescriptors>` | - | Global @counter-style definitions |
68
- | `polyfills` | `{ functions?: boolean }` | `{}` | Opt-in polyfills for not-yet-baseline features. `functions: true` inlines `@function` calls into plain CSS at parse time |
69
- | `autoPropertyTypes` | `boolean` | `true` | Auto-infer and register `@property` types from values |
70
- | `recipes` | `Record<string, RecipeStyles>` | - | Predefined style recipes (named style bundles) |
71
- | `presets` | `Record<string, TypographyPreset>` | - | Typography presets — shorthand for `generateTypographyTokens()` |
72
- | `globalStyles` | `Record<string, Styles>` | - | Global Tasty styles keyed by CSS selector |
73
- | `plugins` | `TastyPlugin[]` | - | Plugins that bundle `functions`, `units`, `states`, `handlers`, `propHandlers`, `baseStyleProps`, `tokens`, `replaceTokens`, `recipes`, `presets`, `globalStyles`, `properties`, `keyframes`, `fontFaces`, and `counterStyles` (processed in order; later override earlier, and direct config wins over all). See [Plugins](plugins.md) |
74
- | `gc` | `GCConfig` | - | Turns on automatic collection of unused styles: `{ touchInterval?, capacity?, grace? }` (defaults `1000`, `1000`, `10000` ms). Without it nothing is collected automatically; call `gc()` yourself |
75
- | `batchInjection` | `boolean \| 'always'` | `false` | Defer stylesheet writes and apply them in one batch. See [Batched injection](#batched-injection) |
76
- | `colorSpace` | `'rgb' \| 'hsl' \| 'oklch'` | - | **Deprecated** — no longer has any effect. See [Color space](#color-space) |
77
- | `namePrefix` | `string` | `'t'` (`tasty`) / `'ts'` (build-time) | Prefix prepended to every generated identifier (class, keyframe, counter-style names). Must match `^[a-zA-Z_][a-zA-Z0-9_-]{0,31}$`. See [Name prefix](#name-prefix). |
78
-
79
- ---
80
-
81
- ## Batched Injection
82
-
83
- Every `insertRule()` on a live stylesheet invalidates style for that sheet's
84
- scope. Components inject during React's render phase, and if anything else reads
85
- layout in the same pass, the two interleave:
86
-
87
- ```
88
- inject -> read (forced style recalc) -> inject -> read (forced recalc) -> ...
89
- ```
90
-
91
- A UI kit that measures during render — popovers, autosizing inputs, virtualized
92
- lists — can turn one mount into a dozen full-tree recalculations. `batchInjection`
93
- queues the writes instead and applies them together, so the tree is invalidated
94
- once per flush.
95
-
96
- ```tsx
97
- import { configure, TastyBatchProvider } from '@tenphi/tasty';
98
-
99
- configure({ batchInjection: true });
100
-
101
- createRoot(el).render(
102
- <TastyBatchProvider>
103
- <App />
104
- </TastyBatchProvider>,
105
- );
106
- ```
107
-
108
- ### Why the provider is required
109
-
110
- Deferring a write past React's layout phase would let a `useLayoutEffect`
111
- measure an element whose rules are not in the sheet yet and read its _unstyled_
112
- box — a wrong number, not a stale one, so it never self-corrects.
113
-
114
- `TastyBatchProvider` closes that hole. It opens a _batch window_ during its
115
- render and closes it — flushing — in `useInsertionEffect`, which React runs in
116
- the mutation phase, before any layout effect:
117
-
118
- ```
119
- provider renders -> window OPEN
120
- children render -> injections queued
121
- provider insertionEffect -> FLUSH, window CLOSED
122
- layout effects run -> rules are in the sheet
123
- ```
124
-
125
- With `batchInjection: true` a write is only ever queued inside such a window, so
126
- turning the flag on can make injection cheaper but can never make a measurement
127
- wrong. Injections outside a window are written straight through, exactly as with
128
- batching off:
129
-
130
- - a deep update that did not re-render the provider
131
- - an injection from a layout effect, an event handler or an async callback
132
- - SSR and RSC, where there is no live sheet at all
133
-
134
- Mount the provider as high in the tree as you can: batching applies to the
135
- commits it takes part in.
136
-
137
- ### Modes
138
-
139
- | Value | Behaviour |
140
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
141
- | `false` (default) | One `insertRule()` per component, synchronously. |
142
- | `true` | Batch inside a provider window only. Cannot affect measurement. Without the provider nothing is batched, and dev mode says so once. |
143
- | `'always'` | Batch every injection, flushing on a microtask when no window is open. Covers more commits; a `useLayoutEffect` measuring a freshly mounted element can read its unstyled box. Paint is unaffected — microtasks always drain before the browser paints. |
144
-
145
- ### Ordering
146
-
147
- All writes share one FIFO queue — component rules, global rules, raw CSS,
148
- `@property`, `@keyframes`, `@font-face`, `@counter-style` and `@function`.
149
- Draining it in insertion order keeps the sheet byte-identical to unbatched
150
- output, which matters because equal-specificity rules resolve by document order.
151
-
152
- ### Client rendering, server rendering, and build-time extraction
153
-
154
- **Server render — nothing to batch, safe to leave enabled.** SSR and RSC collect
155
- CSS as text through `ServerStyleCollector`; the runtime injector never runs
156
- there, so `batchInjection` changes nothing either way. `<TastyBatchProvider>`
157
- renders its children and does nothing else: the window it opens is a no-op
158
- without a `document`, and the `useInsertionEffect` that would close it never
159
- fires on the server. Configure the flag once in shared code — no environment
160
- branching needed.
161
-
162
- **Hydration — the better your SSR coverage, the less there is to batch.**
163
- `hydrateTastyClasses()` (wired up for you by `@tenphi/tasty/ssr/next` and the
164
- Astro integration) pre-populates the injector from `window.__TASTY__`, so
165
- hydrating a server-rendered class is a cache hit that produces no sheet write at
166
- all. Batching pays off on what SSR could not cover: client-only routes, styles
167
- that first appear after hydration (a `styles` prop that changes on interaction, a
168
- modal or popover mounting), and dynamic tokens.
169
-
170
- **Astro islands — one provider per island, or `'always'`.** Every island is its
171
- own React root, so a provider inside one island does not open a window for
172
- another. With `batchInjection: true`, wrap each island root that renders enough
173
- tasty components to be worth it. `'always'` needs no provider and covers every
174
- island, at the cost of the measurement hazard above. Either way, an island that
175
- only re-hydrates server-rendered classes has nothing to batch.
176
-
177
- **Build-time extraction (`tastyStatic`) — unaffected.** The Babel plugin never
178
- touches the injector: the babel plugin emits either a CSS file import or an
179
- `injectCSS()` call from `@tenphi/tasty/static/inject`, which appends text to a
180
- single `<style data-tasty-static>` element. `batchInjection` only defers CSSOM
181
- writes made by the browser injector, so extracted styles are unchanged. In an app
182
- that mixes both, it still applies to the `tasty()` half.
183
-
184
- ### `flushStyles()`
185
-
186
- Applies every pending write immediately. Every injector read API calls it for
187
- you — `getCSSText`, `getCSSTextForClasses`, `getCSSTextForNode`,
188
- `getRawCSSText`, `isPropertyDefined`, `getMetrics`, `cleanup`, `gc` and
189
- `destroy` — so a read never observes a partial sheet.
190
- Call it directly before measuring in code that runs outside a batch window under
191
- `'always'`:
192
-
193
- ```tsx
194
- import { flushStyles } from '@tenphi/tasty';
195
-
196
- useLayoutEffect(() => {
197
- flushStyles();
198
- const { width } = ref.current.getBoundingClientRect();
199
- }, []);
200
- ```
201
-
202
- `hasPendingStyleWrites()` reports whether anything is queued, and
203
- `resetStyleBatch()` drops the queue without applying it (tests only).
204
-
205
- ---
206
-
207
- ## Color Space
208
-
209
- > **Deprecated.** `configure({ colorSpace })` no longer has any effect and will
210
- > be removed in the next major. Setting it warns in development.
211
-
212
- A `#name` token's value used to be rewritten into a configured color space, so
213
- `#brand: '#ff8800'` declared `--brand-color: oklch(0.75 0.16 55)`. That existed
214
- to serve the opacity suffix, which needed numeric channels to write an alpha
215
- into. Opacity now mixes the token with `transparent` —
216
- `color-mix(in oklab, var(--brand-color) 50%, transparent)` — which the browser
217
- resolves against any color, so there is nothing left for the setting to decide.
218
-
219
- A color is emitted exactly as authored:
220
-
221
- ```jsx
222
- configure({ tokens: { '#brand': '#ff8800' } });
223
- // → --brand-color: #ff8800
224
- ```
225
-
226
- That holds for every form: a hex literal, a native color function, a bare CSS
227
- color name, a `color-mix()`, a `light-dark()`, a fallback chain. A `#token`
228
- reference still resolves to its `var()` chain, and a plugin color function such
229
- as `okhsl()` is still resolved by the parser to the color it denotes.
230
-
231
- To address a token's channels, use relative color syntax against the token:
232
-
233
- ```css
234
- background: oklch(from var(--brand-color) calc(l * 1.2) c h);
235
- ```
236
-
237
- This works on any `<color>`, including the ones no build-time conversion could
238
- have evaluated, and `oklch` is unbounded, so a wide-gamut color survives a round
239
- trip a narrower space would clamp. Relative color syntax is Baseline 2024 (Chrome
240
- 125, Firefox 128, Safari 18), so the [opacity suffix](dsl.md#color-tokens--opacity)
241
- uses the widely available `color-mix()` instead.
242
-
243
- ### Migrating off `colorSpace`
244
-
245
- Drop the option. If you relied on the uniform output format, nothing in Tasty
246
- needs it — author your tokens in the space you want them emitted in, since the
247
- value now passes through untouched:
248
-
249
- ```jsx
250
- // before: any input, normalized to the configured space on the way out
251
- configure({ colorSpace: 'oklch', tokens: { '#brand': '#ff8800' } });
252
-
253
- // after: author it in the space you want
254
- configure({ tokens: { '#brand': 'oklch(0.75 0.16 55)' } });
255
- ```
256
-
257
- ### Migrating off the channel companions
258
-
259
- A `#name` token used to declare a second variable beside `--name-color` holding
260
- its channels decomposed, suffixed with the configured space —
261
- `--brand-color-oklch: 0.75 0.16 55` — and a `color` style emitted
262
- `--current-color-{space}` beside `--current-color`. Both are gone, for the same
263
- reason: they existed so an opacity suffix had channels to write an alpha into.
264
-
265
- These were never part of the public API, but they were visible in the emitted
266
- CSS, so hand-authored CSS may reference one. Address the token itself instead:
267
-
268
- ```css
269
- /* before */
270
- color: oklch(var(--brand-color-oklch) / 0.5);
271
- background: oklch(var(--brand-color-oklch));
272
-
273
- /* after */
274
- color: color-mix(in oklab, var(--brand-color) 50%, transparent);
275
- background: var(--brand-color);
276
- ```
277
-
278
- The replacement is strictly more capable — the companion could only be
279
- decomposed for a color the engine could evaluate at build time, while
280
- `color-mix()` works on every `<color>`, including a `color-mix()`, a
281
- `light-dark()`, and a variable Tasty never defined. It is also what
282
- `#brand.5` emits.
283
-
284
- ---
285
-
286
- ## Name Prefix
287
-
288
- Every identifier Tasty generates — class names, keyframe names, counter-style names — starts with a configurable prefix. The `tasty()` client, SSR, and RSC paths default to `'t'`; the build-time extraction path (`tastyStatic` via the Babel plugin) defaults to `'ts'` so extracted classes can never collide with `tasty()` classes when both are loaded on the same page.
289
-
290
- ```jsx
291
- configure({
292
- namePrefix: 'mb',
293
- });
294
- ```
295
-
296
- The prefix is prepended verbatim to the hash, so include any separator inside the prefix string itself:
297
-
298
- | Setting | Class | Keyframe | Counter-style |
299
- | --------------------------- | ------------- | -------------- | -------------- |
300
- | `'t'` (`tasty` default) | `t1a2b3` | `tk1a2b3` | `tc1a2b3` |
301
- | `'ts'` (build-time default) | `ts1a2b3` | `tsk1a2b3` | `tsc1a2b3` |
302
- | `'mb'` | `mb1a2b3` | `mbk1a2b3` | `mbc1a2b3` |
303
- | `'myapp-'` | `myapp-1a2b3` | `myapp-k1a2b3` | `myapp-c1a2b3` |
304
-
305
- The single-letter discriminators (`k` for keyframes, `c` for counter-styles) keep the three kinds visually distinct in devtools — they are not required for correctness because CSS keeps these in separate namespaces.
306
-
307
- ### Rules
308
-
309
- - Must match `^[a-zA-Z_][a-zA-Z0-9_-]{0,31}$`. Examples that pass: `'t'`, `'ts'`, `'app'`, `'myapp-'`, `'_foo'`. Examples that fail: `''`, `'1foo'`, `'my app'`.
310
- - Validated at `configure()` time; an invalid prefix throws synchronously rather than silently producing broken hydration.
311
- - Locked once styles have been generated, like all other config.
312
-
313
- ### Coexistence with build-time extraction
314
-
315
- The `tasty()` and `tastyStatic()` paths **must use different prefixes** when both are loaded on the same page. Defaults already guarantee this; if you customize one, customize the other accordingly:
316
-
317
- ```jsx
318
- // app config (client / SSR / RSC)
319
- configure({ namePrefix: 'mb' });
320
-
321
- // tasty-zero.config.ts (Babel plugin)
322
- export default { namePrefix: 'mbs' };
323
- ```
324
-
325
- If you only use one of the two builds, you only need to set `namePrefix` on that path.
326
-
327
- ---
328
-
329
- ## Design Tokens
330
-
331
- Design tokens define CSS custom properties on `:root`. They are injected automatically when the first style is rendered. Values are parsed through the Tasty DSL, so you can use units, color syntax, and other DSL features.
332
-
333
- Tokens support state maps for responsive or theme-aware values:
334
-
335
- ```jsx
336
- configure({
337
- tokens: {
338
- '$sidebar-width': '280px',
339
- '#primary': {
340
- '': '#purple',
341
- '@dark': '#light-purple',
342
- },
343
- '$font-size': {
344
- '': '14px',
345
- '@mobile': '12px',
346
- },
347
- },
348
- });
349
- ```
350
-
351
- - `$name` keys become `--name` CSS custom properties
352
- - `#name` keys become `--name-color` custom properties
353
- - Tokens do not change units: `2x` stays `16px` whatever `$gap` is. To drive a unit from a token, point the unit at it: `units: { x: 'var(--gap)' }` makes `2x` compile to `calc(2 * var(--gap))`
354
- - Names keep their case, since CSS custom properties are case-sensitive: `$myVar` is `--myVar` and is referenced as `$myVar`. A leading capital is not supported and folds — `$Foo` and `#Purple` become `--foo` and `--purple-color` — so start names lowercase. Kebab-case (`$my-var`) remains the convention.
355
-
356
- Tokens are emitted by the client injector, by the SSR collector (`TastyRegistry`, `tastyIntegration()`, `runWithCollector()`), by the `withTastyNext()` shared stylesheet, and by the Babel plugin. The inline React Server Component path without a collector does not emit them — see [Server-Side Rendering](ssr.md).
357
-
358
- ---
359
-
360
- ## Replace Tokens (Parse-Time Substitution)
361
-
362
- Replace tokens are **substituted inline at parse time** — they are baked into the generated CSS, not resolved via CSS custom properties at runtime. This makes them ideal for value aliases and shorthand references.
363
-
364
- Use `$name` for value tokens and `#name` for color token aliases:
365
-
366
- ```jsx
367
- configure({
368
- replaceTokens: {
369
- $spacing: '2x',
370
- '$card-padding': '4x',
371
- '#accent': '#purple',
372
- '#surface-hover': '#gray.05',
373
- },
374
- });
375
- ```
376
-
377
- When a component uses `padding: '$card-padding'`, the parser replaces it with `'4x'` before generating CSS. When a component uses `fill: '#accent'`, it is replaced with `'#purple'`, which in turn resolves to `var(--purple-color)`.
378
-
379
- Tasty includes `'#clear': 'transparent'` as a default replace token, available
380
- without calling `configure()`. It survives `resetConfig()`, and explicit
381
- `replaceTokens` entries can override it. A replace token resolving to the literal
382
- `transparent` ignores numeric and custom-property opacity suffixes:
383
- `#clear`, `#clear.5`, and `#clear.$opacity` all emit `transparent`.
384
-
385
- `#clear` no longer reads `--clear-color`, and Tasty no longer registers that
386
- property by default. If you previously customized `#clear` through `tokens`,
387
- local token definitions, or CSS, use a different color token or explicitly
388
- override `replaceTokens['#clear']` instead.
389
-
390
- See [Replace Tokens](dsl.md#replace-tokens) in the Style DSL reference.
391
-
392
- ---
393
-
394
- ## Font Face
395
-
396
- Register custom fonts globally so every component can reference them by family name. Values are descriptor objects or arrays (for multiple weights/styles). Rules are injected eagerly when styles are first generated.
397
-
398
- ```ts
399
- configure({
400
- fontFaces: {
401
- 'Brand Sans': [
402
- {
403
- src: 'url("/fonts/brand-regular.woff2") format("woff2")',
404
- fontWeight: 400,
405
- fontDisplay: 'swap',
406
- },
407
- {
408
- src: 'url("/fonts/brand-bold.woff2") format("woff2")',
409
- fontWeight: 700,
410
- fontDisplay: 'swap',
411
- },
412
- ],
413
- Icons: {
414
- src: 'url("/fonts/icons.woff2") format("woff2")',
415
- fontDisplay: 'block',
416
- },
417
- },
418
- });
419
- ```
420
-
421
- Now any component can use `font: '"Brand Sans", sans-serif'` and the browser will already have the `@font-face` rules in the stylesheet.
422
-
423
- See [Font Face (`@font-face`)](dsl.md#font-face-font-face) for inline usage inside component styles and the full list of supported descriptors.
424
-
425
- ---
426
-
427
- ## Counter Style
428
-
429
- Define custom list-marker algorithms globally. Rules are injected eagerly when styles are first generated.
430
-
431
- ```ts
432
- configure({
433
- counterStyles: {
434
- thumbs: {
435
- system: 'cyclic',
436
- symbols: '"👍"',
437
- suffix: '" "',
438
- },
439
- 'lower-roman-parens': {
440
- system: 'extends lower-roman',
441
- suffix: '") "',
442
- },
443
- },
444
- });
445
- ```
446
-
447
- Components can then reference `listStyleType: 'thumbs'` directly.
448
-
449
- See [Counter Style (`@counter-style`)](dsl.md#counter-style-counter-style) for inline usage inside component styles and the full list of supported descriptors.
450
-
451
- ---
452
-
453
- ## Functions
454
-
455
- The single `functions` map holds both kinds of custom functions, discriminated by the value type:
456
-
457
- - **Parse functions** — a **bare key** with a **function value** `(groups) => string`. Runs at parse time and is called as `name(...)`. Use these for computed/derived CSS that JavaScript produces (e.g. color-space conversions).
458
- - **CSS `@function` definitions** — a **`$$name` key** with an **object value** (a [`FunctionDefinition`](https://developer.mozilla.org/en-US/docs/Web/CSS/@function)). Injected eagerly as a native `@function` rule and called as `$$name(...)` (→ `--name(...)`).
459
-
460
- ```ts
461
- configure({
462
- functions: {
463
- // Parse function — bare key, function value
464
- double: (groups) => `calc(2 * ${groups[0]?.output ?? '0'})`,
465
-
466
- // CSS @function — `$$` key, object value
467
- $$negative: { args: ['$value'], result: '(-1 * $value)' },
468
- $$shadow: {
469
- args: { '$shadow-color': { syntax: '<color>', default: 'inherit' } },
470
- returns: '<color>',
471
- $offset: '2px',
472
- result: '$offset $offset ($shadow-color, black)',
473
- },
474
- },
475
- });
476
- ```
477
-
478
- Components then invoke parse functions as `double(...)` and CSS functions with the `$$name(...)` sugar, e.g. `margin: '$$negative(10px) top'`.
479
-
480
- > A key whose prefix doesn't match its value type (an object under a bare key, or a function under a `$$` key) is **ignored with a dev-mode warning**.
481
-
482
- See [Functions (`@function`)](dsl.md#functions-function) for inline usage inside component styles, the full descriptor shape, and token conventions. `@function` is an experimental CSS feature — unsupported browsers safely ignore the native rule (see the polyfill below).
483
-
484
- ### Custom color functions
485
-
486
- A parse function whose output is an already-supported color (`rgb`, `hsl`, `#…`, `oklch`, …) is treated as a **color function**: it works everywhere a color is accepted — style values, `parseColor`, and the `#token.alpha` opacity suffix, which calls the function with a `/ alpha` part appended (read `groups[0].parts[1]`, as below) — with no extra registration. This is the same mechanism the built-in `okhsl`/`okhst` plugins use; they are ordinary plugins registered by default.
487
-
488
- ```ts
489
- import { configure, createColorFunc } from '@tenphi/tasty';
490
-
491
- // A custom color space is just a `functions` entry.
492
- const myColorPlugin = () => ({
493
- name: 'mycolor',
494
- functions: {
495
- // Hand-written parse function:
496
- mycolor: (groups) => {
497
- // `mycolor(255 0 0 / .5)` and `#brand.5` both arrive as two parts
498
- const [main, alpha] = groups[0].parts;
499
- const [r, g, b] = main.all;
500
- return alpha?.all.length
501
- ? `rgb(${r} ${g} ${b} / ${alpha.output})`
502
- : `rgb(${r} ${g} ${b})`;
503
- },
504
- },
505
- });
506
-
507
- configure({ plugins: [myColorPlugin()] });
508
-
509
- // Now `mycolor(...)` is a color in every context:
510
- // fill: 'mycolor(255 0 0)'
511
- // fill: '#brand.5' (with replaceTokens: { '#brand': 'mycolor(255 0 0)' })
512
- ```
513
-
514
- For HSL-style color spaces (a hue angle plus two percentages), the exported `createColorFunc(name, convert, label?)` helper handles angle/percentage parsing, clamping, alpha, and caching. `convert` returns sRGB `[r, g, b]` in 0-1; `label` is an optional string used only in dev warnings (e.g. `'H S L'`) and has no effect on output. This is exactly how `okhslPlugin`/`okhstPlugin` are implemented.
515
-
516
- ---
517
-
518
- ## Polyfills
519
-
520
- `@function` only ships natively in Chromium 139+. To use CSS functions in browsers that don't support the at-rule yet (Firefox, Safari), enable the **functions polyfill**, which expands every `$$name(...)` call into plain CSS (`calc()`/`var()`/`color-mix()`) at parse time instead of emitting the native `@function` rule:
521
-
522
- ```ts
523
- configure({
524
- polyfills: {
525
- functions: true, // default: false
526
- },
527
- functions: {
528
- $$negative: { args: ['$value'], result: '(-1 * $value)' },
529
- },
530
- });
531
-
532
- // Now `margin: '$$negative(10px) top'` renders `margin: calc(-1 * 10px) 0 0 0`
533
- // — no native @function rule is emitted.
534
- ```
535
-
536
- This works across all rendering modes (client, SSR/RSC, and `tastyStatic`) because expansion happens in the parser. Note `polyfills.functions` (the feature toggle) is distinct from the top-level `functions` (the definitions map).
537
-
538
- **Decided limitations when the polyfill is on:**
539
-
540
- - **No native fallback** — functions are always inlined; we do exactly what is configured.
541
- - **Conditional results** (`@media`/`@supports`/`if()` inside `result`) are inlined verbatim; the conditional nuance is not resolved per-element.
542
- - **Typed params / `returns`** are dropped (inlining is purely lexical substitution).
543
- - **Param name collisions** are avoided by fully inlining argument values (no function-internal custom properties are emitted) and by namespacing the function's own variables.
544
- - **Recursion** — self/mutually-recursive functions are not expanded; the cycle guard bails and leaves the call untouched.
545
-
546
- ---
547
-
548
- ## Recipes
549
-
550
- Recipes are predefined, named style bundles. Define them globally via `configure()`:
551
-
552
- ```jsx
553
- configure({
554
- recipes: {
555
- card: {
556
- padding: '4x',
557
- fill: '#surface',
558
- radius: '1r',
559
- border: true,
560
- },
561
- elevated: {
562
- shadow: '2x 2x 4x #shadow',
563
- },
564
- },
565
- });
566
- ```
567
-
568
- Recipe values are flat tasty styles (no sub-element keys). They may contain base styles, tokens, local states, `@keyframes`, and `@property`.
569
-
570
- **Recipes cannot reference other recipes.** A `recipe` key inside a configured recipe's value is not recursively resolved:
571
-
572
- ```jsx
573
- // Unsupported: applying 'elevatedCard' does not expand 'card elevated'.
574
- configure({
575
- recipes: {
576
- elevatedCard: {
577
- recipe: 'card elevated',
578
- padding: '6x',
579
- },
580
- },
581
- });
582
- ```
583
-
584
- Instead, compose the names where you apply the styles: `styles: { recipe: 'card elevated', padding: '6x' }`. Recipe references are resolved on the component root and independently inside each sub-element's styles (for example, `styles: { Panel: { recipe: 'card elevated' } }`). This sub-element support does not allow one recipe definition to inherit another. Tasty warns in development when a recipe definition contains a `recipe` key.
585
-
586
- For how to apply, compose, and override recipes in components, see [Recipes](dsl.md#recipes) in the Style DSL reference.
587
-
588
- ---
589
-
590
- ## Typography Presets
591
-
592
- Typography presets are a shorthand for `generateTypographyTokens()`. Instead of calling the function manually and spreading the result into `tokens`, pass the presets directly:
593
-
594
- ```jsx
595
- configure({
596
- presets: {
597
- h1: { fontSize: '32px', lineHeight: '1.2', fontWeight: '700' },
598
- t2: { fontSize: '16px', lineHeight: '1.5', fontWeight: '400' },
599
- tag: {
600
- fontSize: '10px',
601
- lineHeight: '1.4',
602
- letterSpacing: '0.04em',
603
- fontWeight: '600',
604
- },
605
- },
606
- });
607
- ```
608
-
609
- Each preset generates `$name-font-size`, `$name-line-height`, `$name-letter-spacing`, `$name-font-weight`, and optional `$name-bold-font-weight`, `$name-icon-size`, `$name-text-transform`, `$name-font-family`, `$name-font-style` tokens.
610
-
611
- Preset values support state maps for responsive or theme-aware typography:
612
-
613
- ```jsx
614
- configure({
615
- presets: {
616
- t2: {
617
- fontSize: '16px',
618
- lineHeight: '1.5',
619
- fontWeight: { '': '400', '@dark': '300' },
620
- },
621
- },
622
- });
623
- ```
624
-
625
- The generated tokens are merged **under** explicit `tokens` — if both `presets` and `tokens` define `$t2-font-weight`, the `tokens` value wins. Plugins can also provide `presets`; plugin presets are merged first, then config presets, then explicit tokens on top.
626
-
627
- ---
628
-
629
- ## Global Styles
630
-
631
- Apply Tasty styles to any selector via configuration, without needing `useGlobalStyles(selector, ...)` at runtime:
632
-
633
- ```jsx
634
- configure({
635
- globalStyles: {
636
- body: {
637
- fill: '#surface',
638
- color: '#text',
639
- preset: 't2',
640
- margin: 0,
641
- font: 'system-ui, sans-serif',
642
- },
643
- html: {
644
- overflow: 'hidden',
645
- },
646
- },
647
- });
648
- ```
649
-
650
- Each key is a CSS selector (a list such as `'.uni-checkbox, uni-checkbox'` styles every item), and each value is a Tasty `Styles` object supporting the full style syntax including style properties, tokens, state maps, `@keyframes`, and selector-based sub-styling (e.g. `$: '> .app'` for elements outside React scope). Global styles are injected alongside `:root` tokens when the first style is rendered.
651
-
652
- Global styles are automatically emitted in all delivery modes: client rendering, server rendering, and build-time extraction with the Babel plugin. Plugins can also provide `globalStyles`; they are merged per selector with config global styles (config wins on conflict).
653
-
654
- ---
655
-
656
- ## Auto Property Types
657
-
658
- CSS cannot transition or animate custom properties unless their type is declared via [`@property`](https://developer.mozilla.org/en-US/docs/Web/CSS/@property). Tasty handles this automatically — when a custom property is assigned a concrete value (e.g. `'$scale': 1`, `'$gap': '10px'`, `'#accent': 'purple'`), the type is inferred and a `@property` rule is registered.
659
-
660
- This works across all declaration contexts: component styles, `@keyframes`, global config, and build-time extraction with the Babel plugin. It also resolves `var()` chains — if `$a` references `var(--b)`, the type propagates once `--b` is resolved.
661
-
662
- Supported types:
663
-
664
- | Detection | Inferred syntax |
665
- | -------------------------------------- | --------------- |
666
- | `1`, `0.5`, `-3` (bare numbers) | `<number>` |
667
- | `10px`, `2rem`, `100vw` (length units) | `<length>` |
668
- | `50%` | `<percentage>` |
669
- | `45deg`, `0.5turn` (angle units) | `<angle>` |
670
- | `300ms`, `1s` (time units) | `<time>` |
671
- | `#name` tokens (by naming convention) | `<color>` |
672
-
673
- Auto-inferred properties use `inherits: true` (the CSS default). Use explicit `@property` when you need different settings:
674
-
675
- ```jsx
676
- // In component styles
677
- styles: {
678
- '@property': {
679
- '$scale': { syntax: '<number>', inherits: false, initialValue: 1 },
680
- },
681
- }
682
-
683
- // Or globally
684
- configure({
685
- properties: {
686
- '$scale': { syntax: '<number>', inherits: false, initialValue: 1 },
687
- },
688
- });
689
- ```
690
-
691
- To disable auto-inference entirely (only explicit `@property` will be used):
692
-
693
- ```jsx
694
- configure({ autoPropertyTypes: false });
695
- ```
696
-
697
- ---
698
-
699
- ## Custom Style Handlers
700
-
701
- Override or extend the built-in style property handlers. A handler definition can take three forms:
702
-
703
- | Form | Syntax | Description |
704
- | ------------- | ---------------------------------- | --------------------------------------------------------------- |
705
- | Function only | `handler` | Triggered by its key name; receives only that property |
706
- | Single dep | `['styleName', handler]` | Triggered by the specified style property |
707
- | Multi dep | `[['dep1', 'dep2', ...], handler]` | Triggered by any of the listed properties; receives all of them |
708
-
709
- The multi-dep form is useful when output depends on several style properties together (e.g., `gap` needs to know `display` and `flow` to decide the CSS strategy). A handler whose dependencies include a built-in style takes over that style's whole group — see [Replacing a built-in handler](#replacing-a-built-in-handler). Use `defineHandler` for it and the dependency types are inferred from the dependency list, so a typo in the destructure is a type error instead of a silent `undefined`.
710
-
711
- ```jsx
712
- import {
713
- configure,
714
- defineHandler,
715
- parseColor,
716
- parseStyle,
717
- styleHandlers,
718
- } from '@tenphi/tasty';
719
-
720
- configure({
721
- handlers: {
722
- // Function only — new single-prop handler
723
- elevation: ({ elevation }) => {
724
- const level = parseInt(elevation) || 1;
725
- return {
726
- 'box-shadow': `0 ${level * 2}px ${level * 4}px rgba(0,0,0,0.1)`,
727
- 'z-index': String(level * 100),
728
- };
729
- },
730
-
731
- // Overriding a built-in: declare every style the built-in handled and pass
732
- // them all through, or the ones you leave out stop working (see below).
733
- fill: defineHandler(
734
- [
735
- 'fill',
736
- 'backgroundColor',
737
- 'image',
738
- 'backgroundImage',
739
- 'backgroundPosition',
740
- 'backgroundSize',
741
- 'backgroundRepeat',
742
- 'backgroundAttachment',
743
- 'backgroundOrigin',
744
- 'backgroundClip',
745
- 'background',
746
- ],
747
- (props) => {
748
- if (
749
- typeof props.fill === 'string' &&
750
- props.fill.startsWith('gradient:')
751
- ) {
752
- return { background: props.fill.slice(9) };
753
- }
754
- return styleHandlers.fill(props);
755
- },
756
- ),
757
-
758
- // Multi dep — triggered by either name, receives both
759
- stripe: defineHandler(
760
- ['stripe', 'stripeColor'],
761
- ({ stripe, stripeColor }) => {
762
- if (!stripe) return;
763
- const width = parseStyle(String(stripe)).output;
764
- const color = stripeColor
765
- ? parseColor(String(stripeColor)).color
766
- : 'currentcolor';
767
- return { 'border-left': `${width} solid ${color}` };
768
- },
769
- ),
770
- },
771
- });
772
- ```
773
-
774
- ### Return shape
775
-
776
- A handler returns a `CSSMap`, an array of them, or nothing:
777
-
778
- - Keys are **kebab-case** CSS property names (`'background-color'`, not `backgroundColor`) or `--custom-property` names. A camelCase key warns in development and is emitted verbatim, which the browser ignores.
779
- - Values are stringified, so numbers are fine (`{ '-webkit-line-clamp': 3 }`).
780
- - An array value emits one declaration per entry, in order, so the browser keeps the last one it supports: `{ width: ['-webkit-fill-available', '-moz-available', 'stretch'] }` emits three `width` declarations.
781
- - The reserved `$` key is a **selector suffix**: `{ $: '& > *:not(:last-child)', 'margin-right': gap }` applies the declarations to a nested selector. It accepts an array to fan out over several.
782
- - Return an array of maps to emit several declaration sets, each with its own `$`.
783
-
784
- Values arrive **state-resolved but unparsed** — the raw authored DSL string (`'2x'`, `'#purple.5'`, `true`, `4`). Call the exported `parseStyle()` / `parseColor()` yourself; nothing parses them for you.
785
-
786
- ### Replacing a built-in handler
787
-
788
- Built-in handlers are shared across several style names. Registering a handler for one of those names unregisters the built-in from **all** of them, and the displaced names then fall back to auto-generated CSS aliases — so `hide: true` starts emitting a literal `hide: true` declaration. A development-mode warning lists exactly what was displaced.
789
-
790
- The shared groups worth knowing:
791
-
792
- | Registering a handler for | Also takes over |
793
- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
794
- | `fill` | `backgroundColor`, `image`, `backgroundImage`, `backgroundPosition`, `backgroundSize`, `backgroundRepeat`, `backgroundAttachment`, `backgroundOrigin`, `backgroundClip`, `background` |
795
- | `display` | `hide`, `whiteSpace`, `textOverflow`, `flow`, `gap` |
796
- | `flow` | `gap` |
797
- | `preset` | `font`, `fontFamily`, `fontSize`, `fontWeight`, `fontStyle`, `lineHeight`, `letterSpacing`, `textTransform` |
798
- | `padding` / `margin` | their `Top`/`Right`/`Bottom`/`Left` longhands (`paddingTop`, `marginLeft`, …) |
799
- | `inset` | `top`, `right`, `bottom`, `left` |
800
- | `width` / `height` | `minWidth`/`maxWidth`, `minHeight`/`maxHeight` |
801
-
802
- A multi-dep handler takes over every group its dependencies touch: `defineHandler(['display', 'flow', 'gap'], …)` takes over `display`, `flow`, and `gap` together, so it must emit `display` and `flex-flow` itself.
803
-
804
- Either declare the whole group and delegate the rest to `styleHandlers.*`, or pick a name that isn't shared.
805
-
806
- ### Chunk membership
807
-
808
- Tasty renders and caches CSS in independent chunks, and a chunk's cache key covers only its own style values. All of a handler's dependencies must therefore live in one chunk. Custom style names are pulled into their handler's chunk automatically at registration; a handler whose dependencies span two _built-in_ chunks (say `fill` and `padding`) warns, because it would be invoked once per chunk with a subset of its inputs.
809
-
810
- `configure({ handlers })` must run before the first render, like every other config option.
811
-
812
- ---
813
-
814
- ## Props Middleware
815
-
816
- `propHandlers` are middleware over a component's props — props in, props out. Where a style _handler_ turns a style property into CSS declarations, a prop handler turns a **component prop** into other props, including `styles`. It is the extension point for props whose value isn't a style value.
817
-
818
- ```jsx
819
- import { configure, mergeStyles } from '@tenphi/tasty';
820
-
821
- configure({
822
- propHandlers: {
823
- glaze: (props) => {
824
- const { glaze, ...rest } = props;
825
- if (!glaze) return rest;
826
-
827
- return { ...rest, styles: mergeStyles(glazeStyles(glaze), rest.styles) };
828
- },
829
- },
830
- });
831
-
832
- <Element glaze="purple" />;
833
- ```
834
-
835
- The map key is the handler's name and, by default, the prop that triggers it, so an absent prop costs one property check rather than a call. A tuple overrides that: `['glaze', fn]`, `[['glaze', 'tint'], fn]`, or `['*', fn]` for unconditional.
836
-
837
- Handlers run at the very top of every component's render, before any prop is destructured, so one can rewrite `styles`, `mods`, `tokens`, `variant`, `as`, `element`, and `qa`. They run in registration order — plugins first, then direct config — each receiving the previous one's output.
838
-
839
- Handlers must be **pure** and must not mutate their input, and should memoize the styles they build per input value: style values are cached by object identity, so mutating one in place yields stale CSS, and a reference-stable object avoids re-serializing on every render.
840
-
841
- Injected styles occupy the `styles` slot, so they beat a component's own default styles and lose to a style prop at the call site. Prop handlers do not apply to sub-elements or to build-time `tastyStatic()`, which has no props.
842
-
843
- See [Plugins → Props middleware](plugins.md#props-middleware) for the full contract and a worked example.
844
-
845
- ---
846
-
847
- ## Base Style Props
848
-
849
- `baseStyleProps` exposes style properties as props on **every** `tasty()` component, on top of the built-in base styles (`display`, `font`, `preset`, `hide`, `whiteSpace`, `opacity`, `transition`):
850
-
851
- ```jsx
852
- configure({ baseStyleProps: ['radius', 'shadow'] });
853
-
854
- <Card radius="1r" shadow />;
855
- ```
856
-
857
- `configure()` may run after your components are defined — each factory resolves its prop list lazily.
858
-
859
- Each name costs one property check per render of every component, and the effect is app-global, so keep the list short and use a factory's own `styleProps` for anything narrower. Avoid names that collide with real DOM or component props (`width`, `size`, `color`), since every component will then swallow them as styles.
860
-
861
- ---
862
-
863
- ## TypeScript
864
-
865
- Component props are typed from the `tasty()` definition with no setup. Module augmentation adds the names your design system defines and the extensions your plugins add.
866
-
867
- ### Component props
868
-
869
- | In `tasty({ … })` | Adds the props |
870
- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
871
- | `styleProps: ['gap', 'padding'] as const` | `gap`, `padding`, each typed like the style: a value or a state map |
872
- | `modProps: { isLoading: Boolean, size: ['sm', 'md', 'lg'] as const }` | `isLoading?: boolean`, `size?: 'sm' \| 'md' \| 'lg'` (`String` gives `string`, `Number` gives `number`) |
873
- | `modProps: ['isLoading'] as const` | `isLoading?: ModValue` |
874
- | `tokenProps: ['progress', 'accentColor'] as const` | `progress?: TokenValue`, `accentColor?: TokenValue` |
875
- | `variants: { default: {…}, danger: {…} }` | `variant?: 'default' \| 'danger'` |
876
- | `elements: { Title: 'h3' }` | `Card.Title`, with the `h3` props plus `qa`, `qaVal`, `mods`, `tokens`, `isDisabled`, `isHidden`, `isChecked`, and a `ref` typed as `HTMLHeadingElement`; no `styles` |
877
- | `as: SomeComponent` | `SomeComponent`'s own props, required ones still required |
878
-
879
- Write the array forms with `as const`. Without it, `modProps: ['isLoading']` widens to `string[]` and every prop on the component is typed `ModValue`, so an `onClick` handler no longer type-checks. A `modProps` value list without `as const` widens to `string`.
880
-
881
- `tasty(Base, { … })` keeps `Base`'s prop types and sub-elements, and adds the props and sub-elements its own options above declare. Its `variant` accepts both its own variant names and `Base`'s. See [Extend an existing component](react-api.md#extend-an-existing-component).
882
-
883
- ### Registering your names and extensions
884
-
885
- ```ts
886
- // tasty.d.ts — keep the import: it makes this file a module, so the block
887
- // below extends '@tenphi/tasty' instead of replacing it.
888
- import '@tenphi/tasty';
889
-
890
- declare module '@tenphi/tasty' {
891
- interface TastyNamedColors {
892
- surface: true;
893
- text: true;
894
- primary: true;
895
- }
896
- interface TastyPresetNames {
897
- h1: true;
898
- t2: true;
899
- }
900
- interface TastyThemeNames {
901
- danger: true;
902
- success: true;
903
- }
904
- interface StylesInterface {
905
- stripe?: string;
906
- }
907
- interface TastyCustomProps {
908
- glaze: 'soft' | 'strong' | { tone: string; intensity?: number };
909
- }
910
- interface TastyBaseStylePropNames {
911
- radius: true;
912
- stripe: true;
913
- }
914
- }
915
- ```
916
-
917
- | Interface | Register | What it types |
918
- | ------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------ |
919
- | `TastyNamedColors` | Color token names from `tokens` and `replaceTokens`, without the `#` | Suggestions for `#name` and `#name.50` in `fill`, `color`, and `svgFill` |
920
- | `TastyPresetNames` | `presets` names | The `preset` style and prop |
921
- | `TastyThemeNames` | Theme names | The `theme` prop (rendered as `data-theme`) |
922
- | `StylesInterface` | Style properties added with `handlers` | Their value type in `styles`, `styleProps`, and base style props |
923
- | `TastyCustomProps` | Props added with `propHandlers` | An optional prop on every `tasty()` component (not on sub-elements) |
924
- | `TastyBaseStylePropNames` | Names passed to `baseStyleProps` | A prop on every component, typed like the style it names |
925
-
926
- - The first three add autocomplete, not checking: any other string still type-checks (`preset: 'h9'` compiles). The ESLint plugin is what reports unknown names.
927
- - In `StylesInterface`, declare the plain value type (`stripe?: string`). Tasty adds state-map support itself, as it does for built-in styles.
928
- - A custom style name in `styles` type-checks without augmentation, but `styleProps` and `TastyBaseStylePropNames` accept only names in `StylesInterface`. A base style prop name missing from it adds no prop.
929
- - `TastyCustomProps` types the component prop, not the handler. A prop handler receives `Record<string, unknown>`, so cast inside it (`rest.styles as Styles`).
930
- - State keys, `$` value tokens, units, and recipe names have no TypeScript types. The ESLint plugin checks them against `tasty.config.ts`.
931
-
932
- ### `tasty.config.ts`
933
-
934
- TypeScript augmentation does not reach the linter or the editor. [`@tenphi/eslint-plugin-tasty`](https://github.com/tenphi/eslint-plugin-tasty) and the Tasty VS Code extension read a `tasty.config.ts` (or `.js`, `.json`) at the project root instead. It only lists names: it is not passed to `configure()`, and it is unrelated to the Babel plugin's `configFile` (such as `tasty-zero.config.ts`).
935
-
936
- ```ts
937
- // tasty.config.ts
938
- import type { TastyExtensionConfig } from '@tenphi/tasty';
939
- import type { TastyValidationConfig } from '@tenphi/eslint-plugin-tasty';
940
-
941
- export default {
942
- tokens: ['#surface', '#text', '#primary', '$sidebar-width'],
943
- units: ['cols'],
944
- states: ['@mobile', '@dark'],
945
- presets: ['h1', 't2'],
946
- recipes: ['card', 'elevated'],
947
- styles: ['stripe'],
948
- importSources: ['@my-org/ui'],
949
- presetDescriptions: { h1: 'Heading 1 (32px, bold)' },
950
- } satisfies TastyExtensionConfig & TastyValidationConfig;
951
- ```
952
-
953
- `TastyExtensionConfig` from `@tenphi/tasty` types the fields the VS Code extension reads: `extends`, `tokens`, `units`, `functions`, `states`, `presets`, `styles`, `presetDescriptions`, and `stateDescriptions`. It has no `recipes`, `importSources`, `ownedSources`, or `styleFunctions`, so annotating the file with it alone rejects those ESLint fields; intersect it with the plugin's `TastyValidationConfig`, as above. An omitted list is not checked; `tokens: false`, `units: false`, or `functions: false` turns a check off even when an `extends` parent sets it.
954
-
955
- Keep it in step with `configure()`: token names with their `#` or `$`, custom units, parse-function names, state aliases, presets, recipes, and custom style names.
956
-
957
- See [Style DSL](dsl.md) for state maps, tokens, units, and extending semantics, and [React API](react-api.md) for `tasty()`, style functions, and component props.