@knitui/components 0.14.0 → 1.0.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 (956) hide show
  1. package/README.md +2 -2
  2. package/lib/commonjs/Accordion/Accordion.js +78 -96
  3. package/lib/commonjs/Accordion/Accordion.js.map +1 -1
  4. package/lib/commonjs/ActionIcon/ActionIcon.js +127 -61
  5. package/lib/commonjs/ActionIcon/ActionIcon.js.map +1 -1
  6. package/lib/commonjs/Affix/Affix.js +16 -20
  7. package/lib/commonjs/Affix/Affix.js.map +1 -1
  8. package/lib/commonjs/Alert/Alert.js +53 -53
  9. package/lib/commonjs/Alert/Alert.js.map +1 -1
  10. package/lib/commonjs/Anchor/Anchor.js +12 -15
  11. package/lib/commonjs/Anchor/Anchor.js.map +1 -1
  12. package/lib/commonjs/AngleSlider/AngleSlider.js +65 -37
  13. package/lib/commonjs/AngleSlider/AngleSlider.js.map +1 -1
  14. package/lib/commonjs/AspectRatio/AspectRatio.js +12 -15
  15. package/lib/commonjs/AspectRatio/AspectRatio.js.map +1 -1
  16. package/lib/commonjs/Autocomplete/Autocomplete.js +7 -3
  17. package/lib/commonjs/Autocomplete/Autocomplete.js.map +1 -1
  18. package/lib/commonjs/Avatar/Avatar.js +27 -24
  19. package/lib/commonjs/Avatar/Avatar.js.map +1 -1
  20. package/lib/commonjs/BackgroundImage/BackgroundImage.js +15 -6
  21. package/lib/commonjs/BackgroundImage/BackgroundImage.js.map +1 -1
  22. package/lib/commonjs/Badge/Badge.js +59 -48
  23. package/lib/commonjs/Badge/Badge.js.map +1 -1
  24. package/lib/commonjs/Blockquote/Blockquote.js +80 -79
  25. package/lib/commonjs/Blockquote/Blockquote.js.map +1 -1
  26. package/lib/commonjs/Box/Box.js +2 -2
  27. package/lib/commonjs/Box/Box.js.map +1 -1
  28. package/lib/commonjs/Breadcrumbs/Breadcrumbs.js +9 -9
  29. package/lib/commonjs/Breadcrumbs/Breadcrumbs.js.map +1 -1
  30. package/lib/commonjs/Burger/Burger.js +31 -20
  31. package/lib/commonjs/Burger/Burger.js.map +1 -1
  32. package/lib/commonjs/Button/Button.js +104 -62
  33. package/lib/commonjs/Button/Button.js.map +1 -1
  34. package/lib/commonjs/Card/Card.js +49 -37
  35. package/lib/commonjs/Card/Card.js.map +1 -1
  36. package/lib/commonjs/Center/Center.js +2 -2
  37. package/lib/commonjs/Center/Center.js.map +1 -1
  38. package/lib/commonjs/Checkbox/CheckIcon.js +5 -4
  39. package/lib/commonjs/Checkbox/CheckIcon.js.map +1 -1
  40. package/lib/commonjs/Checkbox/Checkbox.js +98 -68
  41. package/lib/commonjs/Checkbox/Checkbox.js.map +1 -1
  42. package/lib/commonjs/Chip/Chip.js +34 -67
  43. package/lib/commonjs/Chip/Chip.js.map +1 -1
  44. package/lib/commonjs/CloseButton/CloseButton.js +11 -4
  45. package/lib/commonjs/CloseButton/CloseButton.js.map +1 -1
  46. package/lib/commonjs/Code/Code.js +14 -10
  47. package/lib/commonjs/Code/Code.js.map +1 -1
  48. package/lib/commonjs/Collapse/Collapse.js +10 -4
  49. package/lib/commonjs/Collapse/Collapse.js.map +1 -1
  50. package/lib/commonjs/ColorInput/ColorInput.js +25 -20
  51. package/lib/commonjs/ColorInput/ColorInput.js.map +1 -1
  52. package/lib/commonjs/ColorPicker/ColorPicker.js +95 -83
  53. package/lib/commonjs/ColorPicker/ColorPicker.js.map +1 -1
  54. package/lib/commonjs/ColorSwatch/ColorSwatch.js +12 -14
  55. package/lib/commonjs/ColorSwatch/ColorSwatch.js.map +1 -1
  56. package/lib/commonjs/Combobox/Combobox.js +194 -187
  57. package/lib/commonjs/Combobox/Combobox.js.map +1 -1
  58. package/lib/commonjs/Combobox/OptionsDropdown.js +12 -6
  59. package/lib/commonjs/Combobox/OptionsDropdown.js.map +1 -1
  60. package/lib/commonjs/Combobox/index.js +6 -0
  61. package/lib/commonjs/Combobox/index.js.map +1 -1
  62. package/lib/commonjs/Container/Container.js +12 -19
  63. package/lib/commonjs/Container/Container.js.map +1 -1
  64. package/lib/commonjs/Dialog/Dialog.js +15 -14
  65. package/lib/commonjs/Dialog/Dialog.js.map +1 -1
  66. package/lib/commonjs/Drawer/Drawer.js +51 -32
  67. package/lib/commonjs/Drawer/Drawer.js.map +1 -1
  68. package/lib/commonjs/Fieldset/Fieldset.js +26 -18
  69. package/lib/commonjs/Fieldset/Fieldset.js.map +1 -1
  70. package/lib/commonjs/FileButton/FileButton.js +5 -3
  71. package/lib/commonjs/FileButton/FileButton.js.map +1 -1
  72. package/lib/commonjs/Flex/Flex.js +24 -27
  73. package/lib/commonjs/Flex/Flex.js.map +1 -1
  74. package/lib/commonjs/FocusTrap/FocusTrap.js +4 -3
  75. package/lib/commonjs/FocusTrap/FocusTrap.js.map +1 -1
  76. package/lib/commonjs/Grid/Grid.js +21 -18
  77. package/lib/commonjs/Grid/Grid.js.map +1 -1
  78. package/lib/commonjs/Group/Group.js +3 -3
  79. package/lib/commonjs/Group/Group.js.map +1 -1
  80. package/lib/commonjs/Highlight/Highlight.js +2 -1
  81. package/lib/commonjs/Highlight/Highlight.js.map +1 -1
  82. package/lib/commonjs/HoverCard/HoverCard.js +6 -23
  83. package/lib/commonjs/HoverCard/HoverCard.js.map +1 -1
  84. package/lib/commonjs/Image/Image.native.js +1 -1
  85. package/lib/commonjs/Image/createImage.js +88 -56
  86. package/lib/commonjs/Image/createImage.js.map +1 -1
  87. package/lib/commonjs/Indicator/Indicator.js +36 -29
  88. package/lib/commonjs/Indicator/Indicator.js.map +1 -1
  89. package/lib/commonjs/Input/Input.js +87 -119
  90. package/lib/commonjs/Input/Input.js.map +1 -1
  91. package/lib/commonjs/Input/Input.native.js +40 -30
  92. package/lib/commonjs/Input/Input.native.js.map +1 -1
  93. package/lib/commonjs/Input/shared.js +148 -225
  94. package/lib/commonjs/Input/shared.js.map +1 -1
  95. package/lib/commonjs/InputBase/InputBase.js +2 -1
  96. package/lib/commonjs/InputBase/InputBase.js.map +1 -1
  97. package/lib/commonjs/Kbd/Kbd.js +12 -18
  98. package/lib/commonjs/Kbd/Kbd.js.map +1 -1
  99. package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
  100. package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
  101. package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
  102. package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
  103. package/lib/commonjs/List/List.js +10 -10
  104. package/lib/commonjs/List/List.js.map +1 -1
  105. package/lib/commonjs/Loader/Loader.js +31 -37
  106. package/lib/commonjs/Loader/Loader.js.map +1 -1
  107. package/lib/commonjs/LoadingOverlay/LoadingOverlay.js +2 -1
  108. package/lib/commonjs/LoadingOverlay/LoadingOverlay.js.map +1 -1
  109. package/lib/commonjs/Mark/Mark.js +12 -15
  110. package/lib/commonjs/Mark/Mark.js.map +1 -1
  111. package/lib/commonjs/Marquee/Marquee.js +66 -48
  112. package/lib/commonjs/Marquee/Marquee.js.map +1 -1
  113. package/lib/commonjs/MaskInput/MaskInput.js +2 -1
  114. package/lib/commonjs/MaskInput/MaskInput.js.map +1 -1
  115. package/lib/commonjs/Menu/Menu.js +84 -48
  116. package/lib/commonjs/Menu/Menu.js.map +1 -1
  117. package/lib/commonjs/Modal/Modal.js +34 -30
  118. package/lib/commonjs/Modal/Modal.js.map +1 -1
  119. package/lib/commonjs/Modal/drag/DragDismissHost.web.js +10 -6
  120. package/lib/commonjs/Modal/drag/DragDismissHost.web.js.map +1 -1
  121. package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js +6 -8
  122. package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js.map +1 -1
  123. package/lib/commonjs/Modal/drag/index.js.map +1 -1
  124. package/lib/commonjs/Modal/modal-base-inner.js +1 -1
  125. package/lib/commonjs/Modal/modal-base-inner.js.map +1 -1
  126. package/lib/commonjs/Modal/modal-base-inner.native.js +3 -2
  127. package/lib/commonjs/Modal/modal-base-inner.native.js.map +1 -1
  128. package/lib/commonjs/Modal/modal-base.js +22 -9
  129. package/lib/commonjs/Modal/modal-base.js.map +1 -1
  130. package/lib/commonjs/MultiSelect/MultiSelect.js +6 -2
  131. package/lib/commonjs/MultiSelect/MultiSelect.js.map +1 -1
  132. package/lib/commonjs/NativeSelect/NativeSelect.js +25 -30
  133. package/lib/commonjs/NativeSelect/NativeSelect.js.map +1 -1
  134. package/lib/commonjs/NavLink/NavLink.js +63 -58
  135. package/lib/commonjs/NavLink/NavLink.js.map +1 -1
  136. package/lib/commonjs/Notification/Notification.js +28 -28
  137. package/lib/commonjs/Notification/Notification.js.map +1 -1
  138. package/lib/commonjs/NumberFormatter/NumberFormatter.js +2 -2
  139. package/lib/commonjs/NumberFormatter/NumberFormatter.js.map +1 -1
  140. package/lib/commonjs/NumberInput/NumberInput.js +46 -43
  141. package/lib/commonjs/NumberInput/NumberInput.js.map +1 -1
  142. package/lib/commonjs/Overlay/Overlay.js +18 -11
  143. package/lib/commonjs/Overlay/Overlay.js.map +1 -1
  144. package/lib/commonjs/Pagination/Pagination.js +125 -120
  145. package/lib/commonjs/Pagination/Pagination.js.map +1 -1
  146. package/lib/commonjs/Paper/Paper.js +7 -8
  147. package/lib/commonjs/Paper/Paper.js.map +1 -1
  148. package/lib/commonjs/Paragraph/Paragraph.js +7 -10
  149. package/lib/commonjs/Paragraph/Paragraph.js.map +1 -1
  150. package/lib/commonjs/PasswordInput/PasswordInput.js +3 -3
  151. package/lib/commonjs/PasswordInput/PasswordInput.js.map +1 -1
  152. package/lib/commonjs/Pill/Pill.js +39 -33
  153. package/lib/commonjs/Pill/Pill.js.map +1 -1
  154. package/lib/commonjs/PillsInput/PillsInput.js +58 -31
  155. package/lib/commonjs/PillsInput/PillsInput.js.map +1 -1
  156. package/lib/commonjs/PinInput/PinInput.js +26 -20
  157. package/lib/commonjs/PinInput/PinInput.js.map +1 -1
  158. package/lib/commonjs/Popover/Popover.native.js +6 -2
  159. package/lib/commonjs/Popover/Popover.native.js.map +1 -1
  160. package/lib/commonjs/Popover/Popover.shared.js +33 -22
  161. package/lib/commonjs/Popover/Popover.shared.js.map +1 -1
  162. package/lib/commonjs/Progress/Progress.js +37 -26
  163. package/lib/commonjs/Progress/Progress.js.map +1 -1
  164. package/lib/commonjs/Radio/Radio.js +81 -93
  165. package/lib/commonjs/Radio/Radio.js.map +1 -1
  166. package/lib/commonjs/Radio/RadioIcon.js +4 -6
  167. package/lib/commonjs/Radio/RadioIcon.js.map +1 -1
  168. package/lib/commonjs/Rating/Rating.js +48 -38
  169. package/lib/commonjs/Rating/Rating.js.map +1 -1
  170. package/lib/commonjs/RollingNumber/RollingNumber.js +48 -24
  171. package/lib/commonjs/RollingNumber/RollingNumber.js.map +1 -1
  172. package/lib/commonjs/ScrollArea/ScrollArea.js +40 -37
  173. package/lib/commonjs/ScrollArea/ScrollArea.js.map +1 -1
  174. package/lib/commonjs/ScrollArea/ScrollArea.native.js +21 -26
  175. package/lib/commonjs/ScrollArea/ScrollArea.native.js.map +1 -1
  176. package/lib/commonjs/SegmentedControl/SegmentedControl.js +106 -55
  177. package/lib/commonjs/SegmentedControl/SegmentedControl.js.map +1 -1
  178. package/lib/commonjs/Select/Select.js +7 -3
  179. package/lib/commonjs/Select/Select.js.map +1 -1
  180. package/lib/commonjs/Separator/Separator.js +47 -39
  181. package/lib/commonjs/Separator/Separator.js.map +1 -1
  182. package/lib/commonjs/SimpleGrid/SimpleGrid.js +12 -14
  183. package/lib/commonjs/SimpleGrid/SimpleGrid.js.map +1 -1
  184. package/lib/commonjs/Skeleton/Skeleton.js +39 -24
  185. package/lib/commonjs/Skeleton/Skeleton.js.map +1 -1
  186. package/lib/commonjs/Slider/Slider.js +308 -257
  187. package/lib/commonjs/Slider/Slider.js.map +1 -1
  188. package/lib/commonjs/Spacer/Spacer.js +15 -29
  189. package/lib/commonjs/Spacer/Spacer.js.map +1 -1
  190. package/lib/commonjs/Spoiler/Spoiler.js +16 -16
  191. package/lib/commonjs/Spoiler/Spoiler.js.map +1 -1
  192. package/lib/commonjs/Stack/Stack.js +3 -3
  193. package/lib/commonjs/Stack/Stack.js.map +1 -1
  194. package/lib/commonjs/Stepper/Stepper.js +96 -71
  195. package/lib/commonjs/Stepper/Stepper.js.map +1 -1
  196. package/lib/commonjs/Switch/Switch.js +71 -67
  197. package/lib/commonjs/Switch/Switch.js.map +1 -1
  198. package/lib/commonjs/Table/Table.js +96 -82
  199. package/lib/commonjs/Table/Table.js.map +1 -1
  200. package/lib/commonjs/TableOfContents/TableOfContents.js +94 -95
  201. package/lib/commonjs/TableOfContents/TableOfContents.js.map +1 -1
  202. package/lib/commonjs/Tabs/Tabs.js +71 -73
  203. package/lib/commonjs/Tabs/Tabs.js.map +1 -1
  204. package/lib/commonjs/TagsInput/TagsInput.js +19 -3
  205. package/lib/commonjs/TagsInput/TagsInput.js.map +1 -1
  206. package/lib/commonjs/Text/Text.js +29 -14
  207. package/lib/commonjs/Text/Text.js.map +1 -1
  208. package/lib/commonjs/TextInput/TextInput.js +2 -1
  209. package/lib/commonjs/TextInput/TextInput.js.map +1 -1
  210. package/lib/commonjs/Textarea/Textarea.js +1 -1
  211. package/lib/commonjs/Textarea/Textarea.js.map +1 -1
  212. package/lib/commonjs/ThemeIcon/ThemeIcon.js +9 -5
  213. package/lib/commonjs/ThemeIcon/ThemeIcon.js.map +1 -1
  214. package/lib/commonjs/Title/Title.js +49 -32
  215. package/lib/commonjs/Title/Title.js.map +1 -1
  216. package/lib/commonjs/Tooltip/Tooltip.js +43 -27
  217. package/lib/commonjs/Tooltip/Tooltip.js.map +1 -1
  218. package/lib/commonjs/Transition/Transition.native.js +11 -10
  219. package/lib/commonjs/Transition/Transition.native.js.map +1 -1
  220. package/lib/commonjs/Transition/use-overlay-transition.native.js +2 -5
  221. package/lib/commonjs/Transition/use-overlay-transition.native.js.map +1 -1
  222. package/lib/commonjs/Tree/Tree.js +30 -34
  223. package/lib/commonjs/Tree/Tree.js.map +1 -1
  224. package/lib/commonjs/TreeSelect/TreeSelect.js +50 -26
  225. package/lib/commonjs/TreeSelect/TreeSelect.js.map +1 -1
  226. package/lib/commonjs/Typography/Typography.js +5 -7
  227. package/lib/commonjs/Typography/Typography.js.map +1 -1
  228. package/lib/commonjs/UnstyledButton/UnstyledButton.js +4 -4
  229. package/lib/commonjs/UnstyledButton/UnstyledButton.js.map +1 -1
  230. package/lib/commonjs/VirtualList/VirtualList.js +23 -7
  231. package/lib/commonjs/VirtualList/VirtualList.js.map +1 -1
  232. package/lib/commonjs/VisuallyHidden/VisuallyHidden.js +7 -10
  233. package/lib/commonjs/VisuallyHidden/VisuallyHidden.js.map +1 -1
  234. package/lib/commonjs/control-system.js +7 -0
  235. package/lib/commonjs/control-system.js.map +1 -1
  236. package/lib/commonjs/index.js +6 -0
  237. package/lib/commonjs/index.js.map +1 -1
  238. package/lib/commonjs/internal/ControlIconProvider.js +1 -1
  239. package/lib/commonjs/internal/ControlIconProvider.js.map +1 -1
  240. package/lib/commonjs/internal/InlineControl.js +24 -29
  241. package/lib/commonjs/internal/InlineControl.js.map +1 -1
  242. package/lib/commonjs/internal/collapse-box.js +12 -10
  243. package/lib/commonjs/internal/collapse-box.js.map +1 -1
  244. package/lib/commonjs/internal/control-icon-size.js +5 -8
  245. package/lib/commonjs/internal/control-icon-size.js.map +1 -1
  246. package/lib/commonjs/internal/control-metrics.js +51 -51
  247. package/lib/commonjs/internal/control-metrics.js.map +1 -1
  248. package/lib/commonjs/internal/floating-arrow.js +43 -29
  249. package/lib/commonjs/internal/floating-arrow.js.map +1 -1
  250. package/lib/commonjs/internal/focus-ring.js +99 -0
  251. package/lib/commonjs/internal/focus-ring.js.map +1 -0
  252. package/lib/commonjs/internal/gradient-shared.js +7 -7
  253. package/lib/commonjs/internal/gradient-shared.js.map +1 -1
  254. package/lib/commonjs/internal/gradient.native.js +1 -1
  255. package/lib/commonjs/internal/motion.js +247 -359
  256. package/lib/commonjs/internal/motion.js.map +1 -1
  257. package/lib/commonjs/internal/resolve-theme-color.js +10 -10
  258. package/lib/commonjs/internal/resolve-theme-color.js.map +1 -1
  259. package/lib/commonjs/internal/style-props.js +510 -464
  260. package/lib/commonjs/internal/style-props.js.map +1 -1
  261. package/lib/commonjs/internal/theme-color-web.js +44 -26
  262. package/lib/commonjs/internal/theme-color-web.js.map +1 -1
  263. package/lib/commonjs/internal/use-icon-color.js +1 -1
  264. package/lib/commonjs/internal/use-icon-color.native.js +1 -1
  265. package/lib/commonjs/internal/use-slot-text-wrapper.js +1 -1
  266. package/lib/commonjs/internal/variant-colors.js +163 -229
  267. package/lib/commonjs/internal/variant-colors.js.map +1 -1
  268. package/lib/module/Accordion/Accordion.js +80 -98
  269. package/lib/module/Accordion/Accordion.js.map +1 -1
  270. package/lib/module/ActionIcon/ActionIcon.js +128 -62
  271. package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
  272. package/lib/module/Affix/Affix.js +17 -21
  273. package/lib/module/Affix/Affix.js.map +1 -1
  274. package/lib/module/Alert/Alert.js +54 -54
  275. package/lib/module/Alert/Alert.js.map +1 -1
  276. package/lib/module/Anchor/Anchor.js +13 -16
  277. package/lib/module/Anchor/Anchor.js.map +1 -1
  278. package/lib/module/AngleSlider/AngleSlider.js +66 -38
  279. package/lib/module/AngleSlider/AngleSlider.js.map +1 -1
  280. package/lib/module/AspectRatio/AspectRatio.js +10 -14
  281. package/lib/module/AspectRatio/AspectRatio.js.map +1 -1
  282. package/lib/module/Autocomplete/Autocomplete.js +8 -4
  283. package/lib/module/Autocomplete/Autocomplete.js.map +1 -1
  284. package/lib/module/Avatar/Avatar.js +29 -26
  285. package/lib/module/Avatar/Avatar.js.map +1 -1
  286. package/lib/module/BackgroundImage/BackgroundImage.js +16 -7
  287. package/lib/module/BackgroundImage/BackgroundImage.js.map +1 -1
  288. package/lib/module/Badge/Badge.js +61 -50
  289. package/lib/module/Badge/Badge.js.map +1 -1
  290. package/lib/module/Blockquote/Blockquote.js +82 -81
  291. package/lib/module/Blockquote/Blockquote.js.map +1 -1
  292. package/lib/module/Box/Box.js +2 -2
  293. package/lib/module/Box/Box.js.map +1 -1
  294. package/lib/module/Breadcrumbs/Breadcrumbs.js +10 -10
  295. package/lib/module/Breadcrumbs/Breadcrumbs.js.map +1 -1
  296. package/lib/module/Burger/Burger.js +32 -21
  297. package/lib/module/Burger/Burger.js.map +1 -1
  298. package/lib/module/Button/Button.js +105 -63
  299. package/lib/module/Button/Button.js.map +1 -1
  300. package/lib/module/Card/Card.js +51 -39
  301. package/lib/module/Card/Card.js.map +1 -1
  302. package/lib/module/Center/Center.js +3 -3
  303. package/lib/module/Center/Center.js.map +1 -1
  304. package/lib/module/Checkbox/CheckIcon.js +5 -4
  305. package/lib/module/Checkbox/CheckIcon.js.map +1 -1
  306. package/lib/module/Checkbox/Checkbox.js +100 -70
  307. package/lib/module/Checkbox/Checkbox.js.map +1 -1
  308. package/lib/module/Chip/Chip.js +35 -68
  309. package/lib/module/Chip/Chip.js.map +1 -1
  310. package/lib/module/CloseButton/CloseButton.js +12 -5
  311. package/lib/module/CloseButton/CloseButton.js.map +1 -1
  312. package/lib/module/Code/Code.js +15 -11
  313. package/lib/module/Code/Code.js.map +1 -1
  314. package/lib/module/Collapse/Collapse.js +11 -5
  315. package/lib/module/Collapse/Collapse.js.map +1 -1
  316. package/lib/module/ColorInput/ColorInput.js +26 -21
  317. package/lib/module/ColorInput/ColorInput.js.map +1 -1
  318. package/lib/module/ColorPicker/ColorPicker.js +96 -84
  319. package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
  320. package/lib/module/ColorSwatch/ColorSwatch.js +13 -15
  321. package/lib/module/ColorSwatch/ColorSwatch.js.map +1 -1
  322. package/lib/module/Combobox/Combobox.js +194 -188
  323. package/lib/module/Combobox/Combobox.js.map +1 -1
  324. package/lib/module/Combobox/OptionsDropdown.js +13 -7
  325. package/lib/module/Combobox/OptionsDropdown.js.map +1 -1
  326. package/lib/module/Combobox/index.js +1 -1
  327. package/lib/module/Combobox/index.js.map +1 -1
  328. package/lib/module/Container/Container.js +12 -19
  329. package/lib/module/Container/Container.js.map +1 -1
  330. package/lib/module/Dialog/Dialog.js +16 -15
  331. package/lib/module/Dialog/Dialog.js.map +1 -1
  332. package/lib/module/Drawer/Drawer.js +53 -34
  333. package/lib/module/Drawer/Drawer.js.map +1 -1
  334. package/lib/module/Fieldset/Fieldset.js +27 -19
  335. package/lib/module/Fieldset/Fieldset.js.map +1 -1
  336. package/lib/module/FileButton/FileButton.js +5 -3
  337. package/lib/module/FileButton/FileButton.js.map +1 -1
  338. package/lib/module/Flex/Flex.js +24 -28
  339. package/lib/module/Flex/Flex.js.map +1 -1
  340. package/lib/module/FocusTrap/FocusTrap.js +4 -3
  341. package/lib/module/FocusTrap/FocusTrap.js.map +1 -1
  342. package/lib/module/Grid/Grid.js +22 -19
  343. package/lib/module/Grid/Grid.js.map +1 -1
  344. package/lib/module/Group/Group.js +4 -4
  345. package/lib/module/Group/Group.js.map +1 -1
  346. package/lib/module/Highlight/Highlight.js +2 -1
  347. package/lib/module/Highlight/Highlight.js.map +1 -1
  348. package/lib/module/HoverCard/HoverCard.js +8 -25
  349. package/lib/module/HoverCard/HoverCard.js.map +1 -1
  350. package/lib/module/Image/Image.native.js +1 -1
  351. package/lib/module/Image/createImage.js +88 -56
  352. package/lib/module/Image/createImage.js.map +1 -1
  353. package/lib/module/Indicator/Indicator.js +37 -30
  354. package/lib/module/Indicator/Indicator.js.map +1 -1
  355. package/lib/module/Input/Input.js +89 -121
  356. package/lib/module/Input/Input.js.map +1 -1
  357. package/lib/module/Input/Input.native.js +42 -32
  358. package/lib/module/Input/Input.native.js.map +1 -1
  359. package/lib/module/Input/shared.js +148 -225
  360. package/lib/module/Input/shared.js.map +1 -1
  361. package/lib/module/InputBase/InputBase.js +2 -1
  362. package/lib/module/InputBase/InputBase.js.map +1 -1
  363. package/lib/module/Kbd/Kbd.js +12 -18
  364. package/lib/module/Kbd/Kbd.js.map +1 -1
  365. package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
  366. package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
  367. package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
  368. package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
  369. package/lib/module/List/List.js +11 -11
  370. package/lib/module/List/List.js.map +1 -1
  371. package/lib/module/Loader/Loader.js +33 -39
  372. package/lib/module/Loader/Loader.js.map +1 -1
  373. package/lib/module/LoadingOverlay/LoadingOverlay.js +2 -1
  374. package/lib/module/LoadingOverlay/LoadingOverlay.js.map +1 -1
  375. package/lib/module/Mark/Mark.js +11 -15
  376. package/lib/module/Mark/Mark.js.map +1 -1
  377. package/lib/module/Marquee/Marquee.js +66 -48
  378. package/lib/module/Marquee/Marquee.js.map +1 -1
  379. package/lib/module/MaskInput/MaskInput.js +2 -1
  380. package/lib/module/MaskInput/MaskInput.js.map +1 -1
  381. package/lib/module/Menu/Menu.js +86 -50
  382. package/lib/module/Menu/Menu.js.map +1 -1
  383. package/lib/module/Modal/Modal.js +35 -31
  384. package/lib/module/Modal/Modal.js.map +1 -1
  385. package/lib/module/Modal/drag/DragDismissHost.web.js +10 -6
  386. package/lib/module/Modal/drag/DragDismissHost.web.js.map +1 -1
  387. package/lib/module/Modal/drag/DragDismissOverlay.web.js +6 -8
  388. package/lib/module/Modal/drag/DragDismissOverlay.web.js.map +1 -1
  389. package/lib/module/Modal/drag/index.js +1 -1
  390. package/lib/module/Modal/drag/index.js.map +1 -1
  391. package/lib/module/Modal/modal-base-inner.js +1 -1
  392. package/lib/module/Modal/modal-base-inner.js.map +1 -1
  393. package/lib/module/Modal/modal-base-inner.native.js +3 -2
  394. package/lib/module/Modal/modal-base-inner.native.js.map +1 -1
  395. package/lib/module/Modal/modal-base.js +22 -9
  396. package/lib/module/Modal/modal-base.js.map +1 -1
  397. package/lib/module/MultiSelect/MultiSelect.js +7 -3
  398. package/lib/module/MultiSelect/MultiSelect.js.map +1 -1
  399. package/lib/module/NativeSelect/NativeSelect.js +26 -31
  400. package/lib/module/NativeSelect/NativeSelect.js.map +1 -1
  401. package/lib/module/NavLink/NavLink.js +64 -59
  402. package/lib/module/NavLink/NavLink.js.map +1 -1
  403. package/lib/module/Notification/Notification.js +29 -29
  404. package/lib/module/Notification/Notification.js.map +1 -1
  405. package/lib/module/NumberFormatter/NumberFormatter.js +3 -3
  406. package/lib/module/NumberFormatter/NumberFormatter.js.map +1 -1
  407. package/lib/module/NumberInput/NumberInput.js +49 -46
  408. package/lib/module/NumberInput/NumberInput.js.map +1 -1
  409. package/lib/module/Overlay/Overlay.js +19 -12
  410. package/lib/module/Overlay/Overlay.js.map +1 -1
  411. package/lib/module/Pagination/Pagination.js +127 -122
  412. package/lib/module/Pagination/Pagination.js.map +1 -1
  413. package/lib/module/Paper/Paper.js +8 -9
  414. package/lib/module/Paper/Paper.js.map +1 -1
  415. package/lib/module/Paragraph/Paragraph.js +6 -10
  416. package/lib/module/Paragraph/Paragraph.js.map +1 -1
  417. package/lib/module/PasswordInput/PasswordInput.js +4 -4
  418. package/lib/module/PasswordInput/PasswordInput.js.map +1 -1
  419. package/lib/module/Pill/Pill.js +40 -34
  420. package/lib/module/Pill/Pill.js.map +1 -1
  421. package/lib/module/PillsInput/PillsInput.js +59 -32
  422. package/lib/module/PillsInput/PillsInput.js.map +1 -1
  423. package/lib/module/PinInput/PinInput.js +27 -21
  424. package/lib/module/PinInput/PinInput.js.map +1 -1
  425. package/lib/module/Popover/Popover.native.js +6 -2
  426. package/lib/module/Popover/Popover.native.js.map +1 -1
  427. package/lib/module/Popover/Popover.shared.js +34 -23
  428. package/lib/module/Popover/Popover.shared.js.map +1 -1
  429. package/lib/module/Progress/Progress.js +39 -28
  430. package/lib/module/Progress/Progress.js.map +1 -1
  431. package/lib/module/Radio/Radio.js +83 -95
  432. package/lib/module/Radio/Radio.js.map +1 -1
  433. package/lib/module/Radio/RadioIcon.js +4 -6
  434. package/lib/module/Radio/RadioIcon.js.map +1 -1
  435. package/lib/module/Rating/Rating.js +50 -40
  436. package/lib/module/Rating/Rating.js.map +1 -1
  437. package/lib/module/RollingNumber/RollingNumber.js +49 -25
  438. package/lib/module/RollingNumber/RollingNumber.js.map +1 -1
  439. package/lib/module/ScrollArea/ScrollArea.js +41 -38
  440. package/lib/module/ScrollArea/ScrollArea.js.map +1 -1
  441. package/lib/module/ScrollArea/ScrollArea.native.js +22 -27
  442. package/lib/module/ScrollArea/ScrollArea.native.js.map +1 -1
  443. package/lib/module/SegmentedControl/SegmentedControl.js +108 -57
  444. package/lib/module/SegmentedControl/SegmentedControl.js.map +1 -1
  445. package/lib/module/Select/Select.js +8 -4
  446. package/lib/module/Select/Select.js.map +1 -1
  447. package/lib/module/Separator/Separator.js +49 -41
  448. package/lib/module/Separator/Separator.js.map +1 -1
  449. package/lib/module/SimpleGrid/SimpleGrid.js +14 -16
  450. package/lib/module/SimpleGrid/SimpleGrid.js.map +1 -1
  451. package/lib/module/Skeleton/Skeleton.js +40 -25
  452. package/lib/module/Skeleton/Skeleton.js.map +1 -1
  453. package/lib/module/Slider/Slider.js +309 -258
  454. package/lib/module/Slider/Slider.js.map +1 -1
  455. package/lib/module/Spacer/Spacer.js +16 -29
  456. package/lib/module/Spacer/Spacer.js.map +1 -1
  457. package/lib/module/Spoiler/Spoiler.js +17 -17
  458. package/lib/module/Spoiler/Spoiler.js.map +1 -1
  459. package/lib/module/Stack/Stack.js +3 -3
  460. package/lib/module/Stack/Stack.js.map +1 -1
  461. package/lib/module/Stepper/Stepper.js +97 -72
  462. package/lib/module/Stepper/Stepper.js.map +1 -1
  463. package/lib/module/Switch/Switch.js +73 -69
  464. package/lib/module/Switch/Switch.js.map +1 -1
  465. package/lib/module/Table/Table.js +99 -85
  466. package/lib/module/Table/Table.js.map +1 -1
  467. package/lib/module/TableOfContents/TableOfContents.js +96 -97
  468. package/lib/module/TableOfContents/TableOfContents.js.map +1 -1
  469. package/lib/module/Tabs/Tabs.js +72 -74
  470. package/lib/module/Tabs/Tabs.js.map +1 -1
  471. package/lib/module/TagsInput/TagsInput.js +21 -5
  472. package/lib/module/TagsInput/TagsInput.js.map +1 -1
  473. package/lib/module/Text/Text.js +29 -14
  474. package/lib/module/Text/Text.js.map +1 -1
  475. package/lib/module/TextInput/TextInput.js +2 -1
  476. package/lib/module/TextInput/TextInput.js.map +1 -1
  477. package/lib/module/Textarea/Textarea.js +2 -2
  478. package/lib/module/Textarea/Textarea.js.map +1 -1
  479. package/lib/module/ThemeIcon/ThemeIcon.js +10 -6
  480. package/lib/module/ThemeIcon/ThemeIcon.js.map +1 -1
  481. package/lib/module/Title/Title.js +51 -34
  482. package/lib/module/Title/Title.js.map +1 -1
  483. package/lib/module/Tooltip/Tooltip.js +44 -28
  484. package/lib/module/Tooltip/Tooltip.js.map +1 -1
  485. package/lib/module/Transition/Transition.native.js +12 -11
  486. package/lib/module/Transition/Transition.native.js.map +1 -1
  487. package/lib/module/Transition/use-overlay-transition.native.js +3 -6
  488. package/lib/module/Transition/use-overlay-transition.native.js.map +1 -1
  489. package/lib/module/Tree/Tree.js +31 -35
  490. package/lib/module/Tree/Tree.js.map +1 -1
  491. package/lib/module/TreeSelect/TreeSelect.js +52 -28
  492. package/lib/module/TreeSelect/TreeSelect.js.map +1 -1
  493. package/lib/module/Typography/Typography.js +5 -7
  494. package/lib/module/Typography/Typography.js.map +1 -1
  495. package/lib/module/UnstyledButton/UnstyledButton.js +5 -5
  496. package/lib/module/UnstyledButton/UnstyledButton.js.map +1 -1
  497. package/lib/module/VirtualList/VirtualList.js +23 -7
  498. package/lib/module/VirtualList/VirtualList.js.map +1 -1
  499. package/lib/module/VisuallyHidden/VisuallyHidden.js +6 -10
  500. package/lib/module/VisuallyHidden/VisuallyHidden.js.map +1 -1
  501. package/lib/module/control-system.js +5 -0
  502. package/lib/module/control-system.js.map +1 -1
  503. package/lib/module/index.js +8 -4
  504. package/lib/module/index.js.map +1 -1
  505. package/lib/module/internal/ControlIconProvider.js +1 -1
  506. package/lib/module/internal/ControlIconProvider.js.map +1 -1
  507. package/lib/module/internal/InlineControl.js +25 -30
  508. package/lib/module/internal/InlineControl.js.map +1 -1
  509. package/lib/module/internal/collapse-box.js +13 -11
  510. package/lib/module/internal/collapse-box.js.map +1 -1
  511. package/lib/module/internal/control-icon-size.js +5 -8
  512. package/lib/module/internal/control-icon-size.js.map +1 -1
  513. package/lib/module/internal/control-metrics.js +52 -52
  514. package/lib/module/internal/control-metrics.js.map +1 -1
  515. package/lib/module/internal/floating-arrow.js +44 -30
  516. package/lib/module/internal/floating-arrow.js.map +1 -1
  517. package/lib/module/internal/focus-ring.js +95 -0
  518. package/lib/module/internal/focus-ring.js.map +1 -0
  519. package/lib/module/internal/gradient-shared.js +7 -7
  520. package/lib/module/internal/gradient-shared.js.map +1 -1
  521. package/lib/module/internal/gradient.native.js +1 -1
  522. package/lib/module/internal/motion.js +245 -359
  523. package/lib/module/internal/motion.js.map +1 -1
  524. package/lib/module/internal/resolve-theme-color.js +10 -10
  525. package/lib/module/internal/resolve-theme-color.js.map +1 -1
  526. package/lib/module/internal/style-props.js +471 -459
  527. package/lib/module/internal/style-props.js.map +1 -1
  528. package/lib/module/internal/theme-color-web.js +45 -27
  529. package/lib/module/internal/theme-color-web.js.map +1 -1
  530. package/lib/module/internal/use-icon-color.js +1 -1
  531. package/lib/module/internal/use-icon-color.native.js +1 -1
  532. package/lib/module/internal/use-slot-text-wrapper.js +1 -1
  533. package/lib/module/internal/variant-colors.js +150 -228
  534. package/lib/module/internal/variant-colors.js.map +1 -1
  535. package/lib/typescript/Accordion/Accordion.d.ts +120 -74
  536. package/lib/typescript/Accordion/Accordion.d.ts.map +1 -1
  537. package/lib/typescript/ActionIcon/ActionIcon.d.ts +236 -94
  538. package/lib/typescript/ActionIcon/ActionIcon.d.ts.map +1 -1
  539. package/lib/typescript/Affix/Affix.d.ts +12 -7
  540. package/lib/typescript/Affix/Affix.d.ts.map +1 -1
  541. package/lib/typescript/Alert/Alert.d.ts +228 -68
  542. package/lib/typescript/Alert/Alert.d.ts.map +1 -1
  543. package/lib/typescript/Anchor/Anchor.d.ts +33 -24
  544. package/lib/typescript/Anchor/Anchor.d.ts.map +1 -1
  545. package/lib/typescript/AngleSlider/AngleSlider.d.ts +224 -66
  546. package/lib/typescript/AngleSlider/AngleSlider.d.ts.map +1 -1
  547. package/lib/typescript/AspectRatio/AspectRatio.d.ts +34 -14
  548. package/lib/typescript/AspectRatio/AspectRatio.d.ts.map +1 -1
  549. package/lib/typescript/Autocomplete/Autocomplete.d.ts +30 -42
  550. package/lib/typescript/Autocomplete/Autocomplete.d.ts.map +1 -1
  551. package/lib/typescript/Avatar/Avatar.d.ts +167 -191
  552. package/lib/typescript/Avatar/Avatar.d.ts.map +1 -1
  553. package/lib/typescript/BackgroundImage/BackgroundImage.d.ts +15 -10
  554. package/lib/typescript/BackgroundImage/BackgroundImage.d.ts.map +1 -1
  555. package/lib/typescript/Badge/Badge.d.ts +138 -62
  556. package/lib/typescript/Badge/Badge.d.ts.map +1 -1
  557. package/lib/typescript/Blockquote/Blockquote.d.ts +148 -50
  558. package/lib/typescript/Blockquote/Blockquote.d.ts.map +1 -1
  559. package/lib/typescript/Box/Box.d.ts +11 -3
  560. package/lib/typescript/Box/Box.d.ts.map +1 -1
  561. package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts +115 -35
  562. package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  563. package/lib/typescript/Burger/Burger.d.ts +124 -41
  564. package/lib/typescript/Burger/Burger.d.ts.map +1 -1
  565. package/lib/typescript/Button/Button.d.ts +236 -107
  566. package/lib/typescript/Button/Button.d.ts.map +1 -1
  567. package/lib/typescript/Card/Card.d.ts +79 -47
  568. package/lib/typescript/Card/Card.d.ts.map +1 -1
  569. package/lib/typescript/Center/Center.d.ts +13 -9
  570. package/lib/typescript/Center/Center.d.ts.map +1 -1
  571. package/lib/typescript/Checkbox/CheckIcon.d.ts +7 -3
  572. package/lib/typescript/Checkbox/CheckIcon.d.ts.map +1 -1
  573. package/lib/typescript/Checkbox/Checkbox.d.ts +79 -60
  574. package/lib/typescript/Checkbox/Checkbox.d.ts.map +1 -1
  575. package/lib/typescript/Chip/Chip.d.ts +140 -57
  576. package/lib/typescript/Chip/Chip.d.ts.map +1 -1
  577. package/lib/typescript/CloseButton/CloseButton.d.ts +85 -50
  578. package/lib/typescript/CloseButton/CloseButton.d.ts.map +1 -1
  579. package/lib/typescript/Code/Code.d.ts +31 -23
  580. package/lib/typescript/Code/Code.d.ts.map +1 -1
  581. package/lib/typescript/Collapse/Collapse.d.ts +44 -20
  582. package/lib/typescript/Collapse/Collapse.d.ts.map +1 -1
  583. package/lib/typescript/ColorInput/ColorInput.d.ts +15 -5
  584. package/lib/typescript/ColorInput/ColorInput.d.ts.map +1 -1
  585. package/lib/typescript/ColorPicker/ColorPicker.d.ts +72 -16
  586. package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
  587. package/lib/typescript/ColorSwatch/ColorSwatch.d.ts +59 -38
  588. package/lib/typescript/ColorSwatch/ColorSwatch.d.ts.map +1 -1
  589. package/lib/typescript/Combobox/Combobox.d.ts +183 -100
  590. package/lib/typescript/Combobox/Combobox.d.ts.map +1 -1
  591. package/lib/typescript/Combobox/OptionsDropdown.d.ts +6 -0
  592. package/lib/typescript/Combobox/OptionsDropdown.d.ts.map +1 -1
  593. package/lib/typescript/Combobox/index.d.ts +66 -86
  594. package/lib/typescript/Combobox/index.d.ts.map +1 -1
  595. package/lib/typescript/Container/Container.d.ts +3 -41
  596. package/lib/typescript/Container/Container.d.ts.map +1 -1
  597. package/lib/typescript/Dialog/Dialog.d.ts +79 -76
  598. package/lib/typescript/Dialog/Dialog.d.ts.map +1 -1
  599. package/lib/typescript/Drawer/Drawer.d.ts +115 -40
  600. package/lib/typescript/Drawer/Drawer.d.ts.map +1 -1
  601. package/lib/typescript/Fieldset/Fieldset.d.ts +91 -46
  602. package/lib/typescript/Fieldset/Fieldset.d.ts.map +1 -1
  603. package/lib/typescript/FileButton/FileButton.d.ts.map +1 -1
  604. package/lib/typescript/FileInput/FileInput.d.ts +1 -1
  605. package/lib/typescript/FileInput/FileInput.d.ts.map +1 -1
  606. package/lib/typescript/Flex/Flex.d.ts +28 -26
  607. package/lib/typescript/Flex/Flex.d.ts.map +1 -1
  608. package/lib/typescript/FocusTrap/FocusTrap.d.ts.map +1 -1
  609. package/lib/typescript/Grid/Grid.d.ts +56 -48
  610. package/lib/typescript/Grid/Grid.d.ts.map +1 -1
  611. package/lib/typescript/Group/Group.d.ts +21 -16
  612. package/lib/typescript/Group/Group.d.ts.map +1 -1
  613. package/lib/typescript/Highlight/Highlight.d.ts +1 -15
  614. package/lib/typescript/Highlight/Highlight.d.ts.map +1 -1
  615. package/lib/typescript/HoverCard/HoverCard.d.ts +9 -9
  616. package/lib/typescript/HoverCard/HoverCard.d.ts.map +1 -1
  617. package/lib/typescript/Image/Image.d.ts +46 -114
  618. package/lib/typescript/Image/Image.d.ts.map +1 -1
  619. package/lib/typescript/Image/Image.native.d.ts +47 -115
  620. package/lib/typescript/Image/Image.native.d.ts.map +1 -1
  621. package/lib/typescript/Image/createImage.d.ts +49 -357
  622. package/lib/typescript/Image/createImage.d.ts.map +1 -1
  623. package/lib/typescript/Image/types.d.ts +4 -1
  624. package/lib/typescript/Image/types.d.ts.map +1 -1
  625. package/lib/typescript/Indicator/Indicator.d.ts +122 -43
  626. package/lib/typescript/Indicator/Indicator.d.ts.map +1 -1
  627. package/lib/typescript/Input/Input.d.ts +131 -328
  628. package/lib/typescript/Input/Input.d.ts.map +1 -1
  629. package/lib/typescript/Input/Input.native.d.ts +150 -472
  630. package/lib/typescript/Input/Input.native.d.ts.map +1 -1
  631. package/lib/typescript/Input/shared.d.ts +290 -490
  632. package/lib/typescript/Input/shared.d.ts.map +1 -1
  633. package/lib/typescript/Input/types.d.ts +14 -1
  634. package/lib/typescript/Input/types.d.ts.map +1 -1
  635. package/lib/typescript/InputBase/InputBase.d.ts +1 -52
  636. package/lib/typescript/InputBase/InputBase.d.ts.map +1 -1
  637. package/lib/typescript/Kbd/Kbd.d.ts +21 -65
  638. package/lib/typescript/Kbd/Kbd.d.ts.map +1 -1
  639. package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +2 -6
  640. package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts.map +1 -1
  641. package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +7 -3
  642. package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts.map +1 -1
  643. package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +2 -6
  644. package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts.map +1 -1
  645. package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts +6 -2
  646. package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts.map +1 -1
  647. package/lib/typescript/List/List.d.ts +165 -63
  648. package/lib/typescript/List/List.d.ts.map +1 -1
  649. package/lib/typescript/Loader/Loader.d.ts +58 -28
  650. package/lib/typescript/Loader/Loader.d.ts.map +1 -1
  651. package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts +1 -9
  652. package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
  653. package/lib/typescript/Mark/Mark.d.ts +21 -65
  654. package/lib/typescript/Mark/Mark.d.ts.map +1 -1
  655. package/lib/typescript/Marquee/Marquee.d.ts +127 -44
  656. package/lib/typescript/Marquee/Marquee.d.ts.map +1 -1
  657. package/lib/typescript/MaskInput/MaskInput.d.ts +1 -51
  658. package/lib/typescript/MaskInput/MaskInput.d.ts.map +1 -1
  659. package/lib/typescript/Menu/Menu.d.ts +93 -105
  660. package/lib/typescript/Menu/Menu.d.ts.map +1 -1
  661. package/lib/typescript/Modal/Modal.d.ts +166 -91
  662. package/lib/typescript/Modal/Modal.d.ts.map +1 -1
  663. package/lib/typescript/Modal/drag/DragDismissHost.web.d.ts.map +1 -1
  664. package/lib/typescript/Modal/drag/DragDismissOverlay.web.d.ts.map +1 -1
  665. package/lib/typescript/Modal/drag/index.d.ts +2 -2
  666. package/lib/typescript/Modal/drag/index.d.ts.map +1 -1
  667. package/lib/typescript/Modal/drag/types.d.ts +14 -2
  668. package/lib/typescript/Modal/drag/types.d.ts.map +1 -1
  669. package/lib/typescript/Modal/modal-base-inner.d.ts +6 -2
  670. package/lib/typescript/Modal/modal-base-inner.d.ts.map +1 -1
  671. package/lib/typescript/Modal/modal-base-inner.native.d.ts +7 -3
  672. package/lib/typescript/Modal/modal-base-inner.native.d.ts.map +1 -1
  673. package/lib/typescript/Modal/modal-base.d.ts +2 -2
  674. package/lib/typescript/Modal/modal-base.d.ts.map +1 -1
  675. package/lib/typescript/MultiSelect/MultiSelect.d.ts +30 -50
  676. package/lib/typescript/MultiSelect/MultiSelect.d.ts.map +1 -1
  677. package/lib/typescript/NativeSelect/NativeSelect.d.ts.map +1 -1
  678. package/lib/typescript/NativeSelect/NativeSelect.native.d.ts +1 -1
  679. package/lib/typescript/NativeSelect/NativeSelect.native.d.ts.map +1 -1
  680. package/lib/typescript/NavLink/NavLink.d.ts +245 -72
  681. package/lib/typescript/NavLink/NavLink.d.ts.map +1 -1
  682. package/lib/typescript/Notification/Notification.d.ts +230 -69
  683. package/lib/typescript/Notification/Notification.d.ts.map +1 -1
  684. package/lib/typescript/NumberFormatter/NumberFormatter.d.ts +24 -19
  685. package/lib/typescript/NumberFormatter/NumberFormatter.d.ts.map +1 -1
  686. package/lib/typescript/NumberInput/NumberInput.d.ts +91 -150
  687. package/lib/typescript/NumberInput/NumberInput.d.ts.map +1 -1
  688. package/lib/typescript/Overlay/Overlay.d.ts +17 -12
  689. package/lib/typescript/Overlay/Overlay.d.ts.map +1 -1
  690. package/lib/typescript/Pagination/Pagination.d.ts +43 -65
  691. package/lib/typescript/Pagination/Pagination.d.ts.map +1 -1
  692. package/lib/typescript/Paper/Paper.d.ts +19 -7
  693. package/lib/typescript/Paper/Paper.d.ts.map +1 -1
  694. package/lib/typescript/Paragraph/Paragraph.d.ts +23 -19
  695. package/lib/typescript/Paragraph/Paragraph.d.ts.map +1 -1
  696. package/lib/typescript/PasswordInput/PasswordInput.d.ts +110 -207
  697. package/lib/typescript/PasswordInput/PasswordInput.d.ts.map +1 -1
  698. package/lib/typescript/Pill/Pill.d.ts +133 -95
  699. package/lib/typescript/Pill/Pill.d.ts.map +1 -1
  700. package/lib/typescript/PillsInput/PillsInput.d.ts +2 -2
  701. package/lib/typescript/PillsInput/PillsInput.d.ts.map +1 -1
  702. package/lib/typescript/PinInput/PinInput.d.ts +148 -297
  703. package/lib/typescript/PinInput/PinInput.d.ts.map +1 -1
  704. package/lib/typescript/Popover/Popover.native.d.ts.map +1 -1
  705. package/lib/typescript/Popover/Popover.shared.d.ts +15 -11
  706. package/lib/typescript/Popover/Popover.shared.d.ts.map +1 -1
  707. package/lib/typescript/Progress/Progress.d.ts +114 -65
  708. package/lib/typescript/Progress/Progress.d.ts.map +1 -1
  709. package/lib/typescript/Radio/Radio.d.ts +69 -80
  710. package/lib/typescript/Radio/Radio.d.ts.map +1 -1
  711. package/lib/typescript/Radio/RadioIcon.d.ts +5 -0
  712. package/lib/typescript/Radio/RadioIcon.d.ts.map +1 -1
  713. package/lib/typescript/Rating/Rating.d.ts +94 -44
  714. package/lib/typescript/Rating/Rating.d.ts.map +1 -1
  715. package/lib/typescript/RollingNumber/RollingNumber.d.ts +112 -32
  716. package/lib/typescript/RollingNumber/RollingNumber.d.ts.map +1 -1
  717. package/lib/typescript/ScrollArea/ScrollArea.d.ts +50 -10
  718. package/lib/typescript/ScrollArea/ScrollArea.d.ts.map +1 -1
  719. package/lib/typescript/ScrollArea/ScrollArea.native.d.ts +40 -8
  720. package/lib/typescript/ScrollArea/ScrollArea.native.d.ts.map +1 -1
  721. package/lib/typescript/ScrollArea/ScrollArea.shared.d.ts +2 -2
  722. package/lib/typescript/SegmentedControl/SegmentedControl.d.ts +148 -56
  723. package/lib/typescript/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  724. package/lib/typescript/Select/Select.d.ts +31 -51
  725. package/lib/typescript/Select/Select.d.ts.map +1 -1
  726. package/lib/typescript/Separator/Separator.d.ts +124 -61
  727. package/lib/typescript/Separator/Separator.d.ts.map +1 -1
  728. package/lib/typescript/SimpleGrid/SimpleGrid.d.ts +15 -13
  729. package/lib/typescript/SimpleGrid/SimpleGrid.d.ts.map +1 -1
  730. package/lib/typescript/Skeleton/Skeleton.d.ts +18 -14
  731. package/lib/typescript/Skeleton/Skeleton.d.ts.map +1 -1
  732. package/lib/typescript/Slider/Slider.d.ts +425 -129
  733. package/lib/typescript/Slider/Slider.d.ts.map +1 -1
  734. package/lib/typescript/Spacer/Spacer.d.ts +10 -17
  735. package/lib/typescript/Spacer/Spacer.d.ts.map +1 -1
  736. package/lib/typescript/Spoiler/Spoiler.d.ts +88 -28
  737. package/lib/typescript/Spoiler/Spoiler.d.ts.map +1 -1
  738. package/lib/typescript/Stack/Stack.d.ts +17 -5
  739. package/lib/typescript/Stack/Stack.d.ts.map +1 -1
  740. package/lib/typescript/Stepper/Stepper.d.ts +433 -101
  741. package/lib/typescript/Stepper/Stepper.d.ts.map +1 -1
  742. package/lib/typescript/Switch/Switch.d.ts +157 -69
  743. package/lib/typescript/Switch/Switch.d.ts.map +1 -1
  744. package/lib/typescript/Table/Table.d.ts +151 -201
  745. package/lib/typescript/Table/Table.d.ts.map +1 -1
  746. package/lib/typescript/TableOfContents/TableOfContents.d.ts +116 -46
  747. package/lib/typescript/TableOfContents/TableOfContents.d.ts.map +1 -1
  748. package/lib/typescript/Tabs/Tabs.d.ts +138 -88
  749. package/lib/typescript/Tabs/Tabs.d.ts.map +1 -1
  750. package/lib/typescript/TagsInput/TagsInput.d.ts +30 -42
  751. package/lib/typescript/TagsInput/TagsInput.d.ts.map +1 -1
  752. package/lib/typescript/Text/Text.d.ts +22 -4
  753. package/lib/typescript/Text/Text.d.ts.map +1 -1
  754. package/lib/typescript/TextInput/TextInput.d.ts +1 -51
  755. package/lib/typescript/TextInput/TextInput.d.ts.map +1 -1
  756. package/lib/typescript/Textarea/Textarea.d.ts +1 -51
  757. package/lib/typescript/Textarea/Textarea.d.ts.map +1 -1
  758. package/lib/typescript/ThemeIcon/ThemeIcon.d.ts +52 -39
  759. package/lib/typescript/ThemeIcon/ThemeIcon.d.ts.map +1 -1
  760. package/lib/typescript/Title/Title.d.ts +40 -25
  761. package/lib/typescript/Title/Title.d.ts.map +1 -1
  762. package/lib/typescript/Tooltip/Tooltip.d.ts +97 -41
  763. package/lib/typescript/Tooltip/Tooltip.d.ts.map +1 -1
  764. package/lib/typescript/Transition/Transition.native.d.ts.map +1 -1
  765. package/lib/typescript/Transition/use-overlay-transition.d.ts +1 -2
  766. package/lib/typescript/Transition/use-overlay-transition.d.ts.map +1 -1
  767. package/lib/typescript/Transition/use-overlay-transition.native.d.ts +3 -4
  768. package/lib/typescript/Transition/use-overlay-transition.native.d.ts.map +1 -1
  769. package/lib/typescript/Tree/Tree.d.ts +180 -50
  770. package/lib/typescript/Tree/Tree.d.ts.map +1 -1
  771. package/lib/typescript/TreeSelect/TreeSelect.d.ts +141 -182
  772. package/lib/typescript/TreeSelect/TreeSelect.d.ts.map +1 -1
  773. package/lib/typescript/Typography/Typography.d.ts +13 -7
  774. package/lib/typescript/Typography/Typography.d.ts.map +1 -1
  775. package/lib/typescript/UnstyledButton/UnstyledButton.d.ts +27 -20
  776. package/lib/typescript/UnstyledButton/UnstyledButton.d.ts.map +1 -1
  777. package/lib/typescript/VirtualList/VirtualList.d.ts.map +1 -1
  778. package/lib/typescript/VirtualList/VirtualList.shared.d.ts +1 -1
  779. package/lib/typescript/VirtualList/VirtualList.shared.d.ts.map +1 -1
  780. package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts +23 -19
  781. package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
  782. package/lib/typescript/control-system.d.ts +3 -0
  783. package/lib/typescript/control-system.d.ts.map +1 -1
  784. package/lib/typescript/index.d.ts +2 -1
  785. package/lib/typescript/index.d.ts.map +1 -1
  786. package/lib/typescript/internal/InlineControl.d.ts +80 -22
  787. package/lib/typescript/internal/InlineControl.d.ts.map +1 -1
  788. package/lib/typescript/internal/collapse-box.d.ts +3 -3
  789. package/lib/typescript/internal/collapse-box.d.ts.map +1 -1
  790. package/lib/typescript/internal/collapse-box.shared.d.ts +1 -1
  791. package/lib/typescript/internal/control-icon-size.d.ts +4 -3
  792. package/lib/typescript/internal/control-icon-size.d.ts.map +1 -1
  793. package/lib/typescript/internal/control-metrics.d.ts +50 -50
  794. package/lib/typescript/internal/floating-arrow.d.ts +6 -7
  795. package/lib/typescript/internal/floating-arrow.d.ts.map +1 -1
  796. package/lib/typescript/internal/focus-ring.d.ts +94 -0
  797. package/lib/typescript/internal/focus-ring.d.ts.map +1 -0
  798. package/lib/typescript/internal/gradient-shared.d.ts +8 -8
  799. package/lib/typescript/internal/gradient-shared.d.ts.map +1 -1
  800. package/lib/typescript/internal/motion.d.ts +77 -67
  801. package/lib/typescript/internal/motion.d.ts.map +1 -1
  802. package/lib/typescript/internal/resolve-theme-color.d.ts +9 -8
  803. package/lib/typescript/internal/resolve-theme-color.d.ts.map +1 -1
  804. package/lib/typescript/internal/style-props.d.ts +490 -664
  805. package/lib/typescript/internal/style-props.d.ts.map +1 -1
  806. package/lib/typescript/internal/theme-color-web.d.ts.map +1 -1
  807. package/lib/typescript/internal/use-icon-color.d.ts +1 -1
  808. package/lib/typescript/internal/use-icon-color.native.d.ts +1 -1
  809. package/lib/typescript/internal/use-looping-animation.d.ts +10 -2
  810. package/lib/typescript/internal/use-looping-animation.d.ts.map +1 -1
  811. package/lib/typescript/internal/variant-colors.d.ts +191 -199
  812. package/lib/typescript/internal/variant-colors.d.ts.map +1 -1
  813. package/package.json +7 -6
  814. package/src/Accordion/Accordion.tsx +55 -47
  815. package/src/ActionIcon/ActionIcon.tsx +114 -57
  816. package/src/Affix/Affix.tsx +14 -25
  817. package/src/Alert/Alert.tsx +55 -42
  818. package/src/Anchor/Anchor.tsx +13 -12
  819. package/src/AngleSlider/AngleSlider.tsx +87 -63
  820. package/src/AspectRatio/AspectRatio.tsx +9 -12
  821. package/src/Autocomplete/Autocomplete.tsx +7 -2
  822. package/src/Avatar/Avatar.tsx +42 -34
  823. package/src/BackgroundImage/BackgroundImage.tsx +9 -6
  824. package/src/Badge/Badge.tsx +53 -28
  825. package/src/Blockquote/Blockquote.tsx +55 -45
  826. package/src/Box/Box.tsx +2 -2
  827. package/src/Breadcrumbs/Breadcrumbs.tsx +13 -11
  828. package/src/Burger/Burger.tsx +33 -24
  829. package/src/Button/Button.tsx +104 -78
  830. package/src/Card/Card.tsx +52 -44
  831. package/src/Center/Center.tsx +3 -3
  832. package/src/Checkbox/CheckIcon.tsx +8 -5
  833. package/src/Checkbox/Checkbox.tsx +97 -62
  834. package/src/Chip/Chip.tsx +50 -45
  835. package/src/CloseButton/CloseButton.tsx +30 -11
  836. package/src/Code/Code.tsx +15 -11
  837. package/src/Collapse/Collapse.tsx +11 -6
  838. package/src/ColorInput/ColorInput.tsx +30 -24
  839. package/src/ColorPicker/ColorPicker.tsx +78 -79
  840. package/src/ColorSwatch/ColorSwatch.tsx +11 -14
  841. package/src/Combobox/Combobox.tsx +174 -153
  842. package/src/Combobox/OptionsDropdown.tsx +15 -2
  843. package/src/Combobox/index.ts +1 -0
  844. package/src/Container/Container.tsx +11 -15
  845. package/src/Dialog/Dialog.tsx +26 -16
  846. package/src/Drawer/Drawer.tsx +51 -33
  847. package/src/Fieldset/Fieldset.tsx +25 -17
  848. package/src/FileButton/FileButton.tsx +4 -1
  849. package/src/Flex/Flex.tsx +24 -21
  850. package/src/FocusTrap/FocusTrap.tsx +4 -3
  851. package/src/Grid/Grid.tsx +24 -27
  852. package/src/Group/Group.tsx +4 -4
  853. package/src/Highlight/Highlight.tsx +2 -2
  854. package/src/HoverCard/HoverCard.tsx +17 -32
  855. package/src/Image/Image.native.tsx +1 -1
  856. package/src/Image/createImage.tsx +96 -63
  857. package/src/Image/types.ts +5 -1
  858. package/src/Indicator/Indicator.tsx +41 -32
  859. package/src/Input/Input.native.tsx +521 -501
  860. package/src/Input/Input.tsx +110 -156
  861. package/src/Input/shared.tsx +198 -291
  862. package/src/Input/types.ts +15 -0
  863. package/src/InputBase/InputBase.tsx +3 -1
  864. package/src/Kbd/Kbd.tsx +13 -15
  865. package/src/KeyboardAvoidingView/KeyboardAvoidingView.native.tsx +2 -2
  866. package/src/KeyboardAwareScrollView/KeyboardAwareScrollView.native.tsx +1 -1
  867. package/src/List/List.tsx +17 -11
  868. package/src/Loader/Loader.tsx +33 -37
  869. package/src/LoadingOverlay/LoadingOverlay.tsx +3 -2
  870. package/src/Mark/Mark.tsx +12 -12
  871. package/src/Marquee/Marquee.tsx +58 -46
  872. package/src/MaskInput/MaskInput.tsx +2 -1
  873. package/src/Menu/Menu.tsx +110 -45
  874. package/src/Modal/Modal.tsx +38 -31
  875. package/src/Modal/drag/DragDismissHost.web.tsx +2 -1
  876. package/src/Modal/drag/DragDismissOverlay.web.tsx +6 -1
  877. package/src/Modal/drag/index.ts +7 -2
  878. package/src/Modal/drag/types.ts +15 -3
  879. package/src/Modal/modal-base-inner.native.tsx +3 -2
  880. package/src/Modal/modal-base-inner.tsx +1 -1
  881. package/src/Modal/modal-base.tsx +10 -8
  882. package/src/MultiSelect/MultiSelect.tsx +6 -1
  883. package/src/NativeSelect/NativeSelect.tsx +21 -32
  884. package/src/NavLink/NavLink.tsx +54 -47
  885. package/src/Notification/Notification.tsx +31 -30
  886. package/src/NumberFormatter/NumberFormatter.tsx +4 -3
  887. package/src/NumberInput/NumberInput.tsx +52 -42
  888. package/src/Overlay/Overlay.tsx +18 -14
  889. package/src/Pagination/Pagination.tsx +142 -123
  890. package/src/Paper/Paper.tsx +8 -9
  891. package/src/Paragraph/Paragraph.tsx +7 -7
  892. package/src/PasswordInput/PasswordInput.tsx +67 -67
  893. package/src/Pill/Pill.tsx +42 -30
  894. package/src/PillsInput/PillsInput.tsx +60 -31
  895. package/src/PinInput/PinInput.tsx +31 -23
  896. package/src/Popover/Popover.native.tsx +3 -4
  897. package/src/Popover/Popover.shared.tsx +29 -24
  898. package/src/Progress/Progress.tsx +77 -64
  899. package/src/Radio/Radio.tsx +128 -122
  900. package/src/Radio/RadioIcon.tsx +4 -10
  901. package/src/Rating/Rating.tsx +63 -42
  902. package/src/RollingNumber/RollingNumber.tsx +60 -28
  903. package/src/ScrollArea/ScrollArea.native.tsx +28 -27
  904. package/src/ScrollArea/ScrollArea.shared.ts +2 -2
  905. package/src/ScrollArea/ScrollArea.tsx +35 -33
  906. package/src/SegmentedControl/SegmentedControl.tsx +98 -53
  907. package/src/Select/Select.tsx +7 -2
  908. package/src/Separator/Separator.tsx +43 -36
  909. package/src/SimpleGrid/SimpleGrid.tsx +23 -24
  910. package/src/Skeleton/Skeleton.tsx +35 -16
  911. package/src/Slider/Slider.tsx +303 -227
  912. package/src/Spacer/Spacer.tsx +17 -41
  913. package/src/Spoiler/Spoiler.tsx +19 -13
  914. package/src/Stack/Stack.tsx +3 -3
  915. package/src/Stepper/Stepper.tsx +89 -73
  916. package/src/Switch/Switch.tsx +87 -73
  917. package/src/Table/Table.tsx +100 -77
  918. package/src/TableOfContents/TableOfContents.tsx +80 -74
  919. package/src/Tabs/Tabs.tsx +78 -66
  920. package/src/TagsInput/TagsInput.tsx +35 -4
  921. package/src/Text/Text.tsx +25 -10
  922. package/src/TextInput/TextInput.tsx +3 -1
  923. package/src/Textarea/Textarea.tsx +2 -2
  924. package/src/ThemeIcon/ThemeIcon.tsx +37 -22
  925. package/src/Title/Title.tsx +48 -23
  926. package/src/Tooltip/Tooltip.tsx +50 -29
  927. package/src/Transition/Transition.native.tsx +16 -19
  928. package/src/Transition/use-overlay-transition.native.ts +6 -12
  929. package/src/Transition/use-overlay-transition.ts +2 -2
  930. package/src/Tree/Tree.tsx +39 -44
  931. package/src/TreeSelect/TreeSelect.tsx +49 -24
  932. package/src/Typography/Typography.tsx +5 -7
  933. package/src/UnstyledButton/UnstyledButton.tsx +6 -5
  934. package/src/VirtualList/VirtualList.shared.ts +1 -1
  935. package/src/VirtualList/VirtualList.tsx +18 -6
  936. package/src/VisuallyHidden/VisuallyHidden.tsx +7 -9
  937. package/src/control-system.ts +5 -0
  938. package/src/index.ts +30 -12
  939. package/src/internal/ControlIconProvider.tsx +1 -1
  940. package/src/internal/InlineControl.tsx +23 -27
  941. package/src/internal/collapse-box.shared.ts +1 -1
  942. package/src/internal/collapse-box.tsx +15 -11
  943. package/src/internal/control-icon-size.ts +5 -8
  944. package/src/internal/control-metrics.ts +52 -52
  945. package/src/internal/floating-arrow.tsx +48 -40
  946. package/src/internal/focus-ring.ts +92 -0
  947. package/src/internal/gradient-shared.ts +10 -10
  948. package/src/internal/gradient.native.tsx +1 -1
  949. package/src/internal/motion.ts +204 -244
  950. package/src/internal/resolve-theme-color.ts +10 -10
  951. package/src/internal/style-props.ts +545 -390
  952. package/src/internal/theme-color-web.ts +47 -27
  953. package/src/internal/use-icon-color.native.ts +1 -1
  954. package/src/internal/use-icon-color.ts +1 -1
  955. package/src/internal/use-slot-text-wrapper.tsx +1 -1
  956. package/src/internal/variant-colors.ts +187 -151
@@ -1,15 +1,31 @@
1
1
  "use strict";
2
2
 
3
3
  /**
4
- * Shared functional-variant helpers that map Mantine's NAMED props onto Tamagui
5
- * style props. Tamagui's `':string'`/`':number'` catch-all variants let a
6
- * component accept an open-ended value (`<Group justify="space-between" />`)
7
- * while still resolving tokens. The open-ended `string` is narrowed locally to
8
- * the exact style-prop type each value targets (never `any`).
4
+ * Shared variant helpers that map Mantine's NAMED props onto Tamagui style props
5
+ * — the kit's v3 variant vocabulary (docs/v3/conventions.md §5, "Internal helpers").
6
+ *
7
+ * Two shapes, picked by what the prop accepts:
8
+ *
9
+ * - **Static exact-key maps** (`controlVariant`, `controlFontVariant`,
10
+ * `squareSizeVariant`, `fontSizeVariant`, `shadowVariant`, the colour ladders):
11
+ * plain literal objects generated from `controlMetrics` / `variant-colors`.
12
+ * Compiler-extractable, and they still work per clause (`size="sm md:lg"`).
13
+ * Spread them at MODULE scope only (`{ ...controlVariant.md, gap: "xs" }`).
14
+ * - **`styled.dynamic` variants** for an OPEN domain — a size key OR a raw
15
+ * number / CSS value (`radiusVariant`, `squareSizeVariantFallthrough`,
16
+ * `fontSizePassthroughVariant`, …). v3 runs a dynamic once per clause payload,
17
+ * so `radius="sm md:lg"` works. Use them AS the variant (`radius: radiusVariant`),
18
+ * NEVER spread them: spreading a dynamic copies only its brand symbol and turns
19
+ * the variant into a style-less "bare" dynamic. To extend a table with extra
20
+ * keys, build a new one with {@link tableVariant}.
21
+ *
22
+ * v2's `":string"` / `":number"` / `"...size"` catch-all keys are gone (v3 treats
23
+ * them as literal keys that never match), and so are the `$`-sigil helpers
24
+ * (`toRadius` & co.): a string is a token lookup, a number a raw value.
9
25
  */
10
- import { isWeb } from "@knitui/core";
26
+ import { isWeb, MOTION_PRESETS, styled } from "@knitui/core";
11
27
  import { controlMetrics as M } from "./control-metrics";
12
- import { VARIANT_FILL, VARIANT_FOREGROUND_EMPHASIS, VARIANT_FOREGROUND_MUTED, VARIANT_INTERACTION } from "./variant-colors";
28
+ import { VARIANT_CONTROL, VARIANT_FILL, VARIANT_FOREGROUND_EMPHASIS, VARIANT_FOREGROUND_MUTED } from "./variant-colors";
13
29
 
14
30
  /**
15
31
  * Re-export the canonical size scale so the 70+ components that already import
@@ -18,100 +34,157 @@ import { VARIANT_FILL, VARIANT_FOREGROUND_EMPHASIS, VARIANT_FOREGROUND_MUTED, VA
18
34
  * `DEFAULT_SIZE` live in `control-metrics.ts` next to the table they describe.
19
35
  */
20
36
  export { DEFAULT_SIZE } from "./control-metrics";
21
- export { FOCUS_RING, focusRingStyle, VARIANT_FILL, VARIANT_FOREGROUND_EMPHASIS, VARIANT_FOREGROUND_MUTED, VARIANT_INTERACTION, VARIANT_KEYS } from "./variant-colors";
22
- const SIZE_KEYS = new Set(["xxs", "xs", "sm", "md", "lg", "xl", "xxl"]);
37
+ export { FOCUS_RING, FOCUS_WITHIN_RING, focusRingResetStyle, focusRingStyle } from "./focus-ring";
38
+ export { VARIANT_COLOR_LADDER, VARIANT_CONTROL, VARIANT_FILL, VARIANT_FOREGROUND_EMPHASIS, VARIANT_FOREGROUND_MUTED, VARIANT_INTERACTION, VARIANT_KEYS } from "./variant-colors";
39
+
40
+ /* -------------------------------------------------------------------------- */
41
+ /* Dynamic-variant infrastructure */
42
+ /* -------------------------------------------------------------------------- */
43
+
44
+ /** A style fragment a variant emits (style props, token names, clause strings). */
45
+
46
+ /** An open-ended CSS string (`"10px"`, `"50%"`) that keeps literal autocomplete. */
47
+
48
+ /**
49
+ * A v3 `styled.dynamic` variant accepting `V` — the type every open-domain helper
50
+ * below returns. `GetProps` of the frame widens it to `FlatStyleValue<V>`, so the
51
+ * prop also takes clause programs (`"sm md:lg"`).
52
+ *
53
+ * The brand intersection is load-bearing for the lib build: v3 does not export its
54
+ * `StyledDynamicFn` interface, so a bare `ReturnType<…>` resolves to a type the
55
+ * declaration emitter cannot name (TS2883). An intersection keeps THIS alias as the
56
+ * printed name, so every exported variant emits as `DynamicVariant<…>`.
57
+ */
58
+
59
+ const makeDynamic = fn => styled.dynamic(fn);
23
60
 
24
- /** `"md"` → `"$md"`; a `$`-token or arbitrary CSS value passes through. */
25
- const toRadius = val => SIZE_KEYS.has(val) ? `$${val}` : val;
61
+ /** Output cache cap per dynamic: open domains (arbitrary px) must not grow forever. */
62
+ const CACHE_LIMIT = 256;
26
63
 
27
64
  /**
28
- * Mantine-style `radius` prop. Accepts a size key (`"md"`), a `$`-token
29
- * (`"$md"`), an arbitrary CSS value (`"10px"`), or a number.
65
+ * Memoise a value → fragment mapping per primitive value, so a re-render with the
66
+ * same prop hands Tamagui the SAME fragment object (no per-render allocation, and
67
+ * Tamagui's own identity caches hit). Bounded by {@link CACHE_LIMIT}.
30
68
  */
31
- export const radiusVariant = {
32
- ":string": val => ({
33
- borderRadius: toRadius(val)
34
- }),
35
- ":number": val => ({
36
- borderRadius: val
37
- })
69
+ const memoFragment = build => {
70
+ const cache = new Map();
71
+ return value => {
72
+ const primitive = typeof value === "string" || typeof value === "number";
73
+ if (primitive) {
74
+ const hit = cache.get(value);
75
+ if (hit !== undefined || cache.has(value)) return hit;
76
+ }
77
+ const out = build(value);
78
+ if (primitive) {
79
+ if (cache.size >= CACHE_LIMIT) cache.clear();
80
+ cache.set(value, out);
81
+ }
82
+ return out;
83
+ };
38
84
  };
39
85
 
86
+ /**
87
+ * A `styled.dynamic` variant that maps one value straight onto one or more style
88
+ * props (`passthroughVariant<RadiusValue>("borderRadius")` →
89
+ * `radius="md"` ⇒ `{ borderRadius: "md" }`, `radius={6}` ⇒ `{ borderRadius: 6 }`).
90
+ * Token names resolve per property at the style layer; numbers are px.
91
+ */
92
+ export function passthroughVariant(...props) {
93
+ const fragment = memoFragment(value => {
94
+ const out = {};
95
+ for (const prop of props) out[prop] = value;
96
+ return out;
97
+ });
98
+ return makeDynamic(fragment);
99
+ }
100
+
101
+ /**
102
+ * Build a `styled.dynamic` variant from a STATIC key table plus an optional
103
+ * fallthrough for any other value — the v3 replacement for v2's
104
+ * `{ xs: {...}, md: {...}, ":number": fn, ":string": fn }` maps. A table hit
105
+ * returns the table's own (static, shared) fragment; anything else goes to
106
+ * `fallback` (memoised per value). Runs per clause, so `size="sm md:lg"` works.
107
+ *
108
+ * ```ts
109
+ * size: tableVariant(
110
+ * { ...fontSizeVariant, h1: { fontSize: "xxl" } },
111
+ * (value: number | CssString) => ({ fontSize: value }),
112
+ * )
113
+ * ```
114
+ */
115
+
116
+ export function tableVariant(table, fallback) {
117
+ const fall = fallback ? memoFragment(fallback) : undefined;
118
+ return makeDynamic(value => {
119
+ if (typeof value === "string" && Object.prototype.hasOwnProperty.call(table, value)) {
120
+ return table[value];
121
+ }
122
+ return fall?.(value);
123
+ });
124
+ }
125
+
126
+ /* -------------------------------------------------------------------------- */
127
+ /* Shape / layout variants */
128
+ /* -------------------------------------------------------------------------- */
129
+
130
+ /** What a `radius` prop accepts: a radius token, a number (px), or a CSS length. */
131
+
132
+ /**
133
+ * Mantine-style `radius` prop. Accepts a size key (`"md"`, a radius token), a
134
+ * number (px), or an arbitrary CSS value (`"10px"`). Use as the variant
135
+ * (`radius: radiusVariant`), never spread it.
136
+ */
137
+ export const radiusVariant = passthroughVariant("borderRadius");
138
+
40
139
  /**
41
140
  * Like `radiusVariant`, but rounds only the two INLINE-END corners (top-right +
42
141
  * bottom-right). Used where one edge carries a solid border that should stay
43
142
  * square — e.g. `Blockquote`'s start border.
44
143
  */
45
- export const endRadiusVariant = {
46
- ":string": val => ({
47
- borderTopRightRadius: toRadius(val),
48
- borderBottomRightRadius: toRadius(val)
49
- }),
50
- ":number": val => ({
51
- borderTopRightRadius: val,
52
- borderBottomRightRadius: val
53
- })
54
- };
144
+ export const endRadiusVariant = passthroughVariant("borderTopRightRadius", "borderBottomRightRadius");
145
+
146
+ /** Flexbox cross-axis alignment values. */
147
+
148
+ /** Flexbox main-axis distribution values. */
55
149
 
56
150
  /** Map a flexbox alignment prop name onto its Tamagui style prop. */
57
- export const alignVariant = {
58
- ":string": val => ({
59
- alignItems: val
60
- })
61
- };
62
- export const justifyVariant = {
63
- ":string": val => ({
64
- justifyContent: val
65
- })
66
- };
67
- export const wrapVariant = {
68
- ":string": val => ({
69
- flexWrap: val
70
- })
71
- };
151
+ export const alignVariant = passthroughVariant("alignItems");
152
+ export const justifyVariant = passthroughVariant("justifyContent");
153
+ export const wrapVariant = passthroughVariant("flexWrap");
72
154
 
73
155
  /**
74
- * Mantine-style `spacing`/`gap` prop. A space token (`"$sm"`), arbitrary CSS
75
- * value, or number maps onto `gap`. Used by `List`'s `spacing`.
156
+ * Mantine-style `spacing`/`gap` prop. A space token (`"sm"`), arbitrary CSS
157
+ * value, or number maps onto `gap`. Used by `List`'s `spacing`, `PinInput`'s `gap`.
76
158
  */
77
- export const gapVariant = {
78
- ":number": val => ({
79
- gap: val
80
- }),
81
- ":string": val => ({
82
- gap: val
83
- })
84
- };
159
+ export const gapVariant = passthroughVariant("gap");
85
160
 
86
161
  /** Open-ended `overflow` prop (`"hidden"`, `"scroll"`, …). Used by `Grid`. */
87
- export const overflowVariant = {
88
- ":string": val => ({
89
- overflow: val
90
- })
91
- };
162
+ export const overflowVariant = passthroughVariant("overflow");
92
163
 
93
164
  /**
94
- * Mantine-style `maxWidth`/`size` cap. A number is a raw pixel width; a string
95
- * is a `$`-token or arbitrary CSS value. Used by `Container`'s `size`.
165
+ * Mantine-style `maxWidth` cap. A number is a raw pixel width; a string is a
166
+ * token or arbitrary CSS value.
96
167
  */
97
- export const maxWidthVariant = {
98
- ":number": val => ({
99
- maxWidth: val
100
- }),
101
- ":string": val => ({
102
- maxWidth: val
103
- })
104
- };
168
+ export const maxWidthVariant = passthroughVariant("maxWidth");
169
+
170
+ /** A raw width / height escape hatch: px number or CSS length. */
171
+
172
+ const maxWidthOf = value => ({
173
+ maxWidth: value
174
+ });
175
+ const widthOf = value => ({
176
+ width: value
177
+ });
178
+ const heightOf = value => ({
179
+ height: value
180
+ });
105
181
 
106
182
  /**
107
- * Named content-width scale for overlay panels (`Modal`, etc.). Each key maps to
108
- * a sensible `maxWidth` (px) for a centred dialog card; a raw `:number`/`:string`
109
- * passes an arbitrary width through. UNLIKE `maxWidthVariant` (number/string
110
- * only, so named keys silently fall through to an invalid `maxWidth: "md"`) and
111
- * UNLIKE `Container`'s viewport-`breakpoints` caps, these are dialog-scale widths
112
- * tuned after Mantine's modal sizes (xs 320 → xl 780).
183
+ * Named content-width scale for overlay panels (`Modal`, etc.): dialog-scale
184
+ * `maxWidth`s tuned after Mantine's modal sizes (xs 320 → xl 780). Any other
185
+ * number / CSS value passes through as the `maxWidth`.
113
186
  */
114
- export const modalSizeVariant = {
187
+ export const MODAL_SIZES = {
115
188
  xxs: {
116
189
  maxWidth: 240
117
190
  },
@@ -132,25 +205,16 @@ export const modalSizeVariant = {
132
205
  },
133
206
  xxl: {
134
207
  maxWidth: 1040
135
- },
136
- ":number": val => ({
137
- maxWidth: val
138
- }),
139
- ":string": val => ({
140
- maxWidth: val
141
- })
208
+ }
142
209
  };
210
+ export const modalSizeVariant = tableVariant(MODAL_SIZES, maxWidthOf);
143
211
 
144
212
  /**
145
- * Named content-width scale for `Container`. Each key maps to a sensible
146
- * `maxWidth` (px) for a centred page-content column; a raw `:number`/`:string`
147
- * passes an arbitrary width through. UNLIKE `maxWidthVariant` (number/string
148
- * only — named keys would silently fall through to an invalid `maxWidth: "md"`),
149
- * and UNLIKE `modalSizeVariant` (dialog-card scale), these are page-column
150
- * widths tuned after Mantine's container sizes (xs 540 → xl 1320), extended to
151
- * the kit's full seven-step scale.
213
+ * Named content-width scale for `Container`: page-column `maxWidth`s tuned after
214
+ * Mantine's container sizes (xs 540 → xl 1320), on the kit's seven-step scale.
215
+ * Any other number / CSS value passes through as the `maxWidth`.
152
216
  */
153
- export const containerSizeVariant = {
217
+ export const CONTAINER_SIZES = {
154
218
  xxs: {
155
219
  maxWidth: 420
156
220
  },
@@ -171,26 +235,16 @@ export const containerSizeVariant = {
171
235
  },
172
236
  xxl: {
173
237
  maxWidth: 1608
174
- },
175
- ":number": val => ({
176
- maxWidth: val
177
- }),
178
- ":string": val => ({
179
- maxWidth: val
180
- })
238
+ }
181
239
  };
240
+ export const containerSizeVariant = tableVariant(CONTAINER_SIZES, maxWidthOf);
182
241
 
183
242
  /**
184
- * Square `size` prop — maps a single value onto BOTH `width` and `height`. A
185
- * number is raw pixels; a string is a `$`-token or arbitrary CSS value. Pair it
186
- * with named `$size`-token keys for the standard scale and spread this for the
187
- * arbitrary escape hatch:
188
- *
189
- * ```ts
190
- * size: { xs: { width: "$xs", height: "$xs" }, …, ...squareSizeVariant }
191
- * ```
192
- *
193
- * Used by `ActionIcon`, `AngleSlider`, `Avatar`, and `ColorSwatch`.
243
+ * Square `size` ladder — maps a size key onto BOTH `width` and `height` (+
244
+ * `minWidth`) from the canonical control heights. A static exact-key map; use
245
+ * {@link squareSizeVariantFallthrough} when the prop also takes a number / CSS
246
+ * value. Used by `Radio`, `Stepper` (spread into their own size map) and read as
247
+ * data by `PinInput` / `ColorPicker`.
194
248
  */
195
249
  export const squareSizeVariant = {
196
250
  xxs: {
@@ -230,86 +284,76 @@ export const squareSizeVariant = {
230
284
  }
231
285
  };
232
286
 
287
+ /**
288
+ * The square fallthrough body — a raw px / CSS size onto `minWidth` + `width` +
289
+ * `height`. Exported for frames that build their own {@link tableVariant} on top
290
+ * of it (Pagination).
291
+ */
292
+ export const squareSizeOf = value => ({
293
+ minWidth: value,
294
+ width: value,
295
+ height: value
296
+ });
297
+
298
+ /**
299
+ * {@link squareSizeVariant} plus the raw escape hatch: `size={44}` / `size="3rem"`
300
+ * size the square directly. Used by `ActionIcon`-likes, `Avatar`, `ColorSwatch`,
301
+ * `Loader`, `Burger`, `Rating`, `AngleSlider`, `Indicator`.
302
+ */
303
+ export const squareSizeVariantFallthrough = tableVariant(squareSizeVariant, squareSizeOf);
304
+
233
305
  /**
234
306
  * The corner a square control (`ActionIcon`, `ThemeIcon`) takes from `sm` to `xl`
235
- * — `$md` (8), the SAME corner `Button` uses at every size. They used to read
236
- * `controlMetrics.borderRadius` (4 at sm/md), so an icon button beside a labelled
237
- * one at the same height was visibly squarer than it. The tiny steps keep the
307
+ * — `md` (8), the SAME corner `Button` uses at every size. The tiny steps keep the
238
308
  * table's 2px (an 8px corner on an 18–24px square reads as a circle); `xxl` keeps
239
309
  * its 16.
240
310
  */
241
- const SQUARE_CONTROL_RADIUS = "$md";
242
- export const squareSizeRoundedVariant = {
311
+ const SQUARE_CONTROL_RADIUS = "md";
312
+
313
+ /** Square control sizes WITH the matching corner, per size key. */
314
+ export const SQUARE_ROUNDED_SIZES = {
243
315
  xxs: {
244
- minWidth: M.xxs.height,
245
- width: M.xxs.height,
246
- height: M.xxs.height,
316
+ ...squareSizeVariant.xxs,
247
317
  borderRadius: M.xxs.borderRadius
248
318
  },
249
319
  xs: {
250
- minWidth: M.xs.height,
251
- width: M.xs.height,
252
- height: M.xs.height,
320
+ ...squareSizeVariant.xs,
253
321
  borderRadius: M.xs.borderRadius
254
322
  },
255
323
  sm: {
256
- minWidth: M.sm.height,
257
- width: M.sm.height,
258
- height: M.sm.height,
324
+ ...squareSizeVariant.sm,
259
325
  borderRadius: SQUARE_CONTROL_RADIUS
260
326
  },
261
327
  md: {
262
- minWidth: M.md.height,
263
- width: M.md.height,
264
- height: M.md.height,
328
+ ...squareSizeVariant.md,
265
329
  borderRadius: SQUARE_CONTROL_RADIUS
266
330
  },
267
331
  lg: {
268
- minWidth: M.lg.height,
269
- width: M.lg.height,
270
- height: M.lg.height,
332
+ ...squareSizeVariant.lg,
271
333
  borderRadius: SQUARE_CONTROL_RADIUS
272
334
  },
273
335
  xl: {
274
- minWidth: M.xl.height,
275
- width: M.xl.height,
276
- height: M.xl.height,
336
+ ...squareSizeVariant.xl,
277
337
  borderRadius: SQUARE_CONTROL_RADIUS
278
338
  },
279
339
  xxl: {
280
- minWidth: M.xxl.height,
281
- width: M.xxl.height,
282
- height: M.xxl.height,
340
+ ...squareSizeVariant.xxl,
283
341
  borderRadius: M.xxl.borderRadius
284
- },
285
- ":string": val => ({
286
- borderRadius: toRadius(val)
287
- }),
288
- ":number": val => ({
289
- borderRadius: val
290
- })
291
- };
292
- export const squareSizeVariantFallthrough = {
293
- ...squareSizeVariant,
294
- ":string": val => ({
295
- minWidth: val,
296
- width: val,
297
- height: val
298
- }),
299
- ":number": val => ({
300
- minWidth: val,
301
- width: val,
302
- height: val
303
- })
342
+ }
304
343
  };
305
344
 
345
+ /**
346
+ * Square control `size` (ActionIcon, ThemeIcon): a size key sizes the square AND
347
+ * picks its corner; a raw number / CSS value sizes the square only (the corner
348
+ * comes from the frame's `radius`).
349
+ */
350
+ export const squareSizeRoundedVariant = tableVariant(SQUARE_ROUNDED_SIZES, squareSizeOf);
351
+
306
352
  /**
307
353
  * Mantine-style `size` prop for a text-bearing control (Button, etc.): each key
308
- * maps to a `height` (from the `size` token scale), `paddingHorizontal` (from
309
- * the `space` scale), and `borderRadius` (from the `radius` scale). This is the
310
- * single source of truth for control metrics — spread it instead of re-declaring
311
- * the ladder inline. Token groups resolve by property: `$md` is size.md on
312
- * `height`, space.md on `paddingHorizontal`, radius.md on `borderRadius`.
354
+ * maps to a `height` (from the `size` token scale) and `paddingHorizontal` (from
355
+ * the `space` scale). Token names resolve by property: `md` is size.md on
356
+ * `height`, space.md on `paddingHorizontal`. Static exact-key map.
313
357
  *
314
358
  * Used by `Button`, `Button.GroupSection`, `SegmentedControl.Control`.
315
359
  */
@@ -347,10 +391,8 @@ export const controlVariant = {
347
391
  /**
348
392
  * Balanced control-text font ladder — the `fontSize` column of `controlMetrics`.
349
393
  * UNLIKE `fontSizeVariant` (which maps each key to its same-key font token), this
350
- * CLAMPS the two smallest steps (xxs/xs → `$xxs`) so a tiny control isn't
351
- * dominated by its label. Text-BEARING controls (Button, SegmentedControl, Tabs,
352
- * input hosts) should size their label/value text with this so control text stays
353
- * proportional to control height; standalone typography keeps `fontSizeVariant`.
394
+ * CLAMPS the two smallest steps (xxs/xs → `xxs`) so a tiny control isn't
395
+ * dominated by its label. Static exact-key map.
354
396
  */
355
397
  export const controlFontVariant = {
356
398
  xxs: {
@@ -376,16 +418,8 @@ export const controlFontVariant = {
376
418
  }
377
419
  };
378
420
 
379
- /**
380
- * Like `controlVariant`, but for a pill-shaped control that pins its own
381
- * `borderRadius` (e.g. `borderRadius: 9999`) and lays out inline children with a
382
- * `gap`: each key maps `height` + `paddingHorizontal` (identical to
383
- * `controlVariant`) + `gap` (from the `space` scale), with NO `borderRadius`. A
384
- * `:number` passes a raw pixel size through to a proportional height/padding/gap.
385
- *
386
- * Used by `Badge`, `Chip`, `Pill` so the three stay in lockstep.
387
- */
388
- export const controlGapVariant = {
421
+ /** Pill-control sizes: height + pill padding + gap, NO borderRadius. */
422
+ export const CONTROL_GAP_SIZES = {
389
423
  xxs: {
390
424
  height: M.xxs.height,
391
425
  paddingHorizontal: M.xxs.paddingHorizontalPill,
@@ -420,26 +454,33 @@ export const controlGapVariant = {
420
454
  height: M.xxl.height,
421
455
  paddingHorizontal: M.xxl.paddingHorizontalPill,
422
456
  gap: M.xxl.gap
423
- },
424
- ":number": val => ({
425
- height: val,
426
- paddingHorizontal: Math.round(val * 0.5),
427
- gap: Math.max(4, Math.round(val * 0.25))
428
- })
457
+ }
429
458
  };
430
459
 
460
+ /**
461
+ * Like `controlVariant`, but for a pill-shaped control that pins its own
462
+ * `borderRadius` and lays out inline children with a `gap`. A number passes a raw
463
+ * pixel height through to a proportional height/padding/gap.
464
+ *
465
+ * Used by `Badge`, `Chip`, `Pill` so the three stay in lockstep.
466
+ */
467
+ export const controlGapVariant = tableVariant(CONTROL_GAP_SIZES, value => ({
468
+ height: value,
469
+ paddingHorizontal: Math.round(value * 0.5),
470
+ gap: Math.max(4, Math.round(value * 0.25))
471
+ }));
472
+
431
473
  /* -------------------------------------------------------------------------- */
432
- /* Variant COLOR builders — the color twin of the size builders above. Each is */
433
- /* a ready-to-spread `variant:` map sourced from `variant-colors.ts`, so a */
434
- /* component spreads one of these instead of re-declaring the palette ladder */
435
- /* inline. Re-tune a ramp token in `variant-colors.ts` and every consumer moves */
436
- /* together (the same contract `controlMetrics` gives the size builders). */
474
+ /* Variant COLOR builders — the color twin of the size builders above. Static */
475
+ /* exact-key maps generated from `variant-colors.ts`, so a component puts one */
476
+ /* in its `variant` variant instead of re-declaring the palette ladder inline. */
437
477
  /* -------------------------------------------------------------------------- */
438
478
 
439
479
  /**
440
- * Keep only `keys` from a variant-color map — lets a component expose a SUBSET
441
- * of the canonical vocabulary (e.g. Badge wants `dot` but not `subtle`) while
442
- * still sourcing every value from the shared ladder. Unknown keys are ignored.
480
+ * Keep only `keys` from a variant map — lets a component expose a SUBSET of the
481
+ * canonical vocabulary (e.g. Badge wants `dot` but not `subtle`) while still
482
+ * sourcing every value from the shared ladder. Module-scope use only (it
483
+ * allocates). Unknown keys are ignored.
443
484
  */
444
485
  export const pickVariants = (map, keys) => {
445
486
  const out = {};
@@ -448,85 +489,45 @@ export const pickVariants = (map, keys) => {
448
489
  };
449
490
 
450
491
  /**
451
- * INTERACTIVE control fill — background + border + hover/press/focus per variant.
452
- * The frame ladder for `Button` and `ActionIcon`. Spread into `variants.variant`.
492
+ * INTERACTIVE control fill — background (+ border) with hover/press clauses per
493
+ * variant (`filled → { backgroundColor: "color9 hover:color10 press:color8" }`).
494
+ * The frame ladder for `Button` and `ActionIcon`. Use as (or spread into, at
495
+ * module scope) `variants.variant`. `gradient` has no hover/press colour: its
496
+ * runtime gradient would hide it; the press-dip still gives tactile feedback.
453
497
  */
454
- export const controlColorVariant = {
455
- filled: {
456
- ...VARIANT_FILL.filled,
457
- ...VARIANT_INTERACTION.filled
458
- },
459
- light: {
460
- ...VARIANT_FILL.light,
461
- ...VARIANT_INTERACTION.light
462
- },
463
- outline: {
464
- ...VARIANT_FILL.outline,
465
- ...VARIANT_INTERACTION.outline
466
- },
467
- subtle: {
468
- ...VARIANT_FILL.subtle,
469
- ...VARIANT_INTERACTION.subtle
470
- },
471
- default: {
472
- ...VARIANT_FILL.default,
473
- ...VARIANT_INTERACTION.default
474
- },
475
- white: {
476
- ...VARIANT_FILL.white,
477
- ...VARIANT_INTERACTION.white
478
- },
479
- transparent: {
480
- ...VARIANT_FILL.transparent,
481
- ...VARIANT_INTERACTION.transparent
482
- },
483
- // No hover/press color: the runtime gradient sits in `backgroundImage` (web) or
484
- // an SVG layer (native), so a hover/press `backgroundColor` would be invisible
485
- // beneath it. The shared press-dip (`pressScaleStyle`) still gives tactile feedback.
486
- gradient: {
487
- ...VARIANT_FILL.gradient
488
- }
489
- };
498
+ export const controlColorVariant = VARIANT_CONTROL;
490
499
 
491
500
  /**
492
- * STATIC surface fill — background + border only, no pseudo states. The frame
493
- * ladder for non-interactive surfaces (`Badge`, `Alert`). Includes the pill-only
494
- * `dot` variant; `pickVariants` to expose just the subset a component supports.
501
+ * STATIC surface fill — background + border only, no interaction clauses. The
502
+ * frame ladder for non-interactive surfaces (`Badge`, `Alert`). Includes the
503
+ * pill-only `dot`; `pickVariants` to expose just the subset a component supports.
495
504
  */
496
- export const surfaceColorVariant = {
497
- ...VARIANT_FILL
498
- };
505
+ export const surfaceColorVariant = VARIANT_FILL;
499
506
 
500
507
  /**
501
508
  * EMPHASIS text color per variant — labels, titles, glyphs sitting on the fill.
502
509
  * The text ladder for `Button`/`ActionIcon` labels, `Badge` text, `Alert.Title`.
503
510
  */
504
- export const controlTextColorVariant = {
505
- ...VARIANT_FOREGROUND_EMPHASIS
506
- };
511
+ export const controlTextColorVariant = VARIANT_FOREGROUND_EMPHASIS;
507
512
 
508
513
  /**
509
514
  * MUTED text color per variant — softer body copy (e.g. `Alert.Message`). Only
510
- * `filled` inverts to sit on the strong fill; the rest resolve to `$color12`.
515
+ * `filled` inverts to sit on the strong fill; the rest resolve to `color12`.
511
516
  */
512
- export const mutedTextColorVariant = {
513
- ...VARIANT_FOREGROUND_MUTED
514
- };
517
+ export const mutedTextColorVariant = VARIANT_FOREGROUND_MUTED;
515
518
 
516
- /** The canonical variant keys, re-exported as a Set for cheap membership checks. */
519
+ /** The canonical variant keys, as a Set for cheap membership checks. */
517
520
  const VARIANT_KEY_SET = new Set(["filled", "light", "outline", "subtle", "default", "white", "transparent", "dot", "gradient"]);
518
521
 
519
522
  /** True when `value` is one of the canonical variant keys. */
520
523
  export const isVariantKey = value => VARIANT_KEY_SET.has(value);
521
524
 
522
- /**
523
- * Thickness/height-only `size` prop — maps a size key onto `height` (from the
524
- * `size` scale), or a number straight through. The single source of truth for
525
- * tracks/boxes whose only size dimension is height.
526
- *
527
- * Used by `Loader` (frame) and `Progress` (track).
528
- */
529
- export const heightVariant = {
525
+ /* -------------------------------------------------------------------------- */
526
+ /* Thickness / extent ladders */
527
+ /* -------------------------------------------------------------------------- */
528
+
529
+ /** Height-only sizes from the canonical control heights. */
530
+ const HEIGHT_SIZES = {
530
531
  xxs: {
531
532
  height: M.xxs.height
532
533
  },
@@ -547,58 +548,31 @@ export const heightVariant = {
547
548
  },
548
549
  xxl: {
549
550
  height: M.xxl.height
550
- },
551
- ":number": val => ({
552
- height: val
553
- })
551
+ }
554
552
  };
555
553
 
554
+ /**
555
+ * Thickness/height-only `size` prop — a size key onto `height` (from the `size`
556
+ * scale), or a number straight through. Used by `Loader` (frame).
557
+ */
558
+ export const heightVariant = tableVariant(HEIGHT_SIZES, value => ({
559
+ height: value
560
+ }));
561
+
556
562
  /**
557
563
  * The input root frame's per-size HEIGHT (a `md` field is 40px, matching a `md`
558
- * Button), with `:string`/`:number` catch-alls for a custom height. Like
559
- * `heightVariant` but with the extra `:string` pass-through. It lives HERE — not in
564
+ * Button), with a number / CSS value escape hatch. It lives HERE — not in
560
565
  * `Input/shared.tsx` — so the styled input frame's `size` variant doesn't create a
561
- * circular TYPE reference back through its own props (frame → variant →
562
- * frame-props → frame). Derived from the canonical control heights.
566
+ * circular TYPE reference back through its own props.
563
567
  */
564
- export const fieldHeightVariant = {
565
- xxs: {
566
- height: M.xxs.height
567
- },
568
- xs: {
569
- height: M.xs.height
570
- },
571
- sm: {
572
- height: M.sm.height
573
- },
574
- md: {
575
- height: M.md.height
576
- },
577
- lg: {
578
- height: M.lg.height
579
- },
580
- xl: {
581
- height: M.xl.height
582
- },
583
- xxl: {
584
- height: M.xxl.height
585
- },
586
- ":string": val => ({
587
- height: val
588
- }),
589
- ":number": val => ({
590
- height: val
591
- })
592
- };
568
+ export const fieldHeightVariant = tableVariant(HEIGHT_SIZES, heightOf);
593
569
 
594
570
  /**
595
- * Track-thickness `size` ladder for thin horizontal bars (Progress). A bar track
596
- * is far thinner than a control height, so it keeps its own small px ladder rather
597
- * than reading `controlMetrics.height` — but it lives here as a NAMED shared
598
- * variant (reviewed as a set, `:number` escape hatch preserved) instead of an
599
- * inline magic-number map. Used by `Progress`.
571
+ * Track-thickness ladder for thin horizontal bars (Progress) — far thinner than a
572
+ * control height, so its own small px ladder. Read as data by `Progress` for the
573
+ * vertical orientation.
600
574
  */
601
- export const progressThicknessVariant = {
575
+ export const PROGRESS_THICKNESS = {
602
576
  xxs: {
603
577
  height: 2
604
578
  },
@@ -619,17 +593,14 @@ export const progressThicknessVariant = {
619
593
  },
620
594
  xxl: {
621
595
  height: 20
622
- },
623
- ":number": val => ({
624
- height: val
625
- })
596
+ }
626
597
  };
598
+ export const progressThicknessVariant = tableVariant(PROGRESS_THICKNESS, value => ({
599
+ height: value
600
+ }));
627
601
 
628
- /**
629
- * Slider track-thickness ladder — like `progressThicknessVariant` but tuned for a
630
- * draggable track. Maps a size key onto the track `height`. Used by `Slider`.
631
- */
632
- export const sliderTrackVariant = {
602
+ /** Slider track-thickness ladder — tuned for a draggable track. Used by `Slider`. */
603
+ export const SLIDER_TRACK_SIZES = {
633
604
  xxs: {
634
605
  height: 3
635
606
  },
@@ -650,17 +621,14 @@ export const sliderTrackVariant = {
650
621
  },
651
622
  xxl: {
652
623
  height: 12
653
- },
654
- ":number": val => ({
655
- height: val
656
- })
624
+ }
657
625
  };
626
+ export const sliderTrackVariant = tableVariant(SLIDER_TRACK_SIZES, value => ({
627
+ height: value
628
+ }));
658
629
 
659
- /**
660
- * Slider thumb ladder — square width+height for the draggable handle. Tuned to sit
661
- * proportionally above the track of the same key. Used by `Slider`.
662
- */
663
- export const sliderThumbVariant = {
630
+ /** Slider thumb ladder — square handle tuned above the same-key track. Used by `Slider`. */
631
+ export const SLIDER_THUMB_SIZES = {
664
632
  xxs: {
665
633
  width: 12,
666
634
  height: 12
@@ -688,20 +656,18 @@ export const sliderThumbVariant = {
688
656
  xxl: {
689
657
  width: 32,
690
658
  height: 32
691
- },
692
- ":number": val => ({
693
- width: val,
694
- height: val
695
- })
659
+ }
696
660
  };
661
+ export const sliderThumbVariant = tableVariant(SLIDER_THUMB_SIZES, value => ({
662
+ width: value,
663
+ height: value
664
+ }));
697
665
 
698
666
  /**
699
- * Fixed content-WIDTH ladder for panels (Dialog, Drawer width axis). A single
700
- * shared width scale so a `md` of any panel is the same width; a `:number`/`:string`
701
- * passes an arbitrary px/CSS width through. Distinct from `maxWidthVariant`, which
702
- * sets a max-width cap rather than a fixed width.
667
+ * Fixed content-WIDTH ladder for panels (Dialog, Drawer width axis), so a `md` of
668
+ * any panel is the same width. Read as data by `Drawer`.
703
669
  */
704
- export const panelWidthVariant = {
670
+ export const PANEL_WIDTH = {
705
671
  xxs: {
706
672
  width: 160
707
673
  },
@@ -722,15 +688,12 @@ export const panelWidthVariant = {
722
688
  },
723
689
  xxl: {
724
690
  width: 560
725
- },
726
- ":number": val => ({
727
- width: val
728
- }),
729
- ":string": val => ({
730
- width: val
731
- })
691
+ }
732
692
  };
733
693
 
694
+ /** {@link PANEL_WIDTH} as a variant; a number / CSS value passes through as `width`. */
695
+ export const panelWidthVariant = tableVariant(PANEL_WIDTH, widthOf);
696
+
734
697
  /**
735
698
  * Cursor is a web affordance in this kit. Passing it as a Tamagui style prop on
736
699
  * native can leak to React Native's host node as a top-level prop and trigger
@@ -814,35 +777,62 @@ export const webButtonTextReset = () => WEB_BUTTON_TEXT_RESET;
814
777
  * styleable wrapper that maps `direction` → `flexDirection` instead (see `Flex`).
815
778
  */
816
779
 
780
+ /* -------------------------------------------------------------------------- */
781
+ /* Transitions (v3 `transition` prop values) */
782
+ /* -------------------------------------------------------------------------- */
783
+
817
784
  /**
818
- * Transition keys registered in `@knitui/core`'s `createAnimations` config
819
- * (`config/animations.ts` + `.native.ts`). Kept in sync with those maps.
820
- *
821
- * Split into duration presets + named effects (the first eight) and the CSS
822
- * easing-curve keys (the last five). The curve keys are what `resolveTransition`
823
- * maps a `transitionTimingFunction` onto so the easing is exact.
785
+ * The named presets registered in `@knitui/core`'s animation drivers — the keys
786
+ * of the one `MOTION_PRESETS` table both drivers are built from (`fast`,
787
+ * `medium`, `slow`, `bouncy`, `pulse`, `spin`, `stripe`, and the easing-curve
788
+ * keys `linear` / `ease` / `ease-in` / `ease-out` / `ease-in-out`). v2's
789
+ * `"100ms"` key is gone: a duration is plain CSS in v3.
824
790
  */
825
791
 
826
792
  /**
827
- * Map a CSS `transition-timing-function` onto the registered easing curve that
828
- * reproduces it. The matching `ease`/`ease-in`/`ease-out`/`ease-in-out`/`linear`
829
- * keys carry the curve; the exact duration is applied separately via a
830
- * `{ duration }` override (see {@link timedTransition}), so this resolver only
831
- * picks the *shape*. An arbitrary `cubic-bezier(...)` can't be a static config
832
- * key, so it approximates to `bouncy` (its overshoot curve) — the one lossy case
833
- * on web; `CollapseBox.native` parses the bezier exactly off the shared
834
- * `CSS_EASING_BEZIER` table (`@knitui/core`).
835
- * Unknown values fall back to `ease`, the library-wide default.
836
- *
837
- * This is the single source of truth — `CollapseBox` (web), `RollingNumber`, and
838
- * the native `Transition` all import it instead of re-deriving the mapping.
793
+ * The object form of a v3 transition — the subset of Tamagui's `TransitionConfig`
794
+ * the kit authors. `properties` scopes the transition (v2's `animateOnly`, as a
795
+ * CSS `transition-property` list: `"transform, opacity"`).
796
+ */
797
+
798
+ /**
799
+ * A kit transition value: a preset name, an object, or `null` (keep the
800
+ * `transition` key present but animate nothing — Tamagui's rule for animated
801
+ * views, so hook order never changes).
802
+ */
803
+
804
+ /** `["transform", "opacity"]` / `"transform, opacity"` → `"transform, opacity"`. */
805
+ export const toTransitionProperties = properties => typeof properties === "string" ? properties : properties.join(", ");
806
+
807
+ /**
808
+ * Scope a transition to `properties` (the v3 home of v2's `animateOnly`): a preset
809
+ * name becomes `{ preset, properties }`, an object gains `properties`, `null` stays
810
+ * `null`. Without it a plain `transition="fast"` animates EVERY changing property,
811
+ * which slides floating elements across the screen on each re-measure.
812
+ */
813
+ export const withTransitionProperties = (value, properties) => {
814
+ if (value == null || properties === undefined) return value;
815
+ const list = toTransitionProperties(properties);
816
+ return typeof value === "string" ? {
817
+ preset: value,
818
+ properties: list
819
+ } : {
820
+ ...value,
821
+ properties: list
822
+ };
823
+ };
824
+
825
+ /**
826
+ * Map a CSS `transition-timing-function` onto the registered easing preset that
827
+ * reproduces it (`"ease-out"` → `"ease-out"`; unknown → `"ease"`; a
828
+ * `cubic-bezier(…)` → `"ease"`). v3 accepts any CSS easing in the object form,
829
+ * so prefer {@link timedTransition}, which keeps the curve EXACT; this stays for
830
+ * callers that need a preset NAME.
839
831
  */
840
832
  export const resolveTransition = (timingFunction = "ease") => {
841
833
  switch (timingFunction.trim().toLowerCase()) {
842
834
  case "linear":
843
835
  return "linear";
844
- case "ease":
845
- return "ease";
846
836
  case "ease-in":
847
837
  return "ease-in";
848
838
  case "ease-out":
@@ -850,145 +840,193 @@ export const resolveTransition = (timingFunction = "ease") => {
850
840
  case "ease-in-out":
851
841
  return "ease-in-out";
852
842
  default:
853
- return timingFunction.includes("cubic-bezier") ? "bouncy" : "ease";
843
+ return "ease";
854
844
  }
855
845
  };
856
846
 
857
847
  /**
858
- * Build the `[curve, { duration }]` transition value for a timed (non-spring)
859
- * animation: pick the easing curve for `timingFunction`, then pin the exact
860
- * `duration` via the driver's duration override. Pass the result to
861
- * {@link transitionProps}. Centralises the `[resolveTransition(fn), { duration }]`
862
- * idiom the size/height-clip components all repeat.
848
+ * A timed (non-spring) transition: exact `duration` (ms) and exact CSS easing
849
+ * curve, as the v3 object form `{ duration, easing }` — both drivers take any CSS
850
+ * timing function (`cubic-bezier(…)` included), so nothing approximates any more.
851
+ * Pass `properties` to scope it.
863
852
  */
864
- export const timedTransition = (duration, timingFunction = "ease") => [resolveTransition(timingFunction), {
865
- duration
866
- }];
853
+ export const timedTransition = (duration, timingFunction = "ease", properties) => properties === undefined ? {
854
+ duration,
855
+ easing: timingFunction
856
+ } : {
857
+ duration,
858
+ easing: timingFunction,
859
+ properties: toTransitionProperties(properties)
860
+ };
867
861
 
868
862
  /**
869
863
  * Build a precisely-typed `{ transition }` object to spread onto a styled
870
- * component. Keeping this prop present and passing `null` when disabled follows
871
- * Tamagui's animation-driver rules and preserves hook order for animated views.
864
+ * component (or a `styled()` base), optionally scoped to `properties`. Keep the
865
+ * prop present and pass `null` when disabled (Tamagui's animated-view rule).
866
+ *
867
+ * ```ts
868
+ * styled(Box, { ...transitionProps("fast", ["backgroundColor"]) })
869
+ * ```
872
870
  */
873
- export const transitionProps = transition => ({
874
- transition
871
+ export const transitionProps = (transition, properties) => ({
872
+ transition: withTransitionProperties(transition, properties)
875
873
  });
874
+ const scopedCache = new WeakMap();
875
+
876
+ /**
877
+ * Scope an existing `{ transition }` result (e.g. from `useReducedTransition`) to
878
+ * `properties` — the v3 replacement for the v2 pair
879
+ * `{...fade} {...animateOnlyProps(["opacity"])}` → `{...scopeTransition(fade, ["opacity"])}`.
880
+ * Cached per (result object, property list), so a memoised `fade` yields the same
881
+ * object every render.
882
+ */
883
+ export const scopeTransition = (result, properties) => {
884
+ const list = toTransitionProperties(properties);
885
+ let byList = scopedCache.get(result);
886
+ if (!byList) scopedCache.set(result, byList = new Map());
887
+ let hit = byList.get(list);
888
+ if (!hit) byList.set(list, hit = {
889
+ transition: withTransitionProperties(result.transition, list)
890
+ });
891
+ return hit;
892
+ };
893
+
894
+ /** The base duration (ms) of a timed preset, or `undefined` for a spring. */
895
+ export const presetDurationMs = name => {
896
+ const preset = MOTION_PRESETS[name];
897
+ return typeof preset.duration === "number" ? preset.duration : undefined;
898
+ };
899
+
900
+ /* -------------------------------------------------------------------------- */
901
+ /* Press feedback */
902
+ /* -------------------------------------------------------------------------- */
876
903
 
877
904
  /**
878
905
  * Fraction an interactive control scales DOWN to while pressed — the tactile
879
906
  * "dip" shared by `Button`, `ActionIcon`, `Chip`, … `0.97` is a 3% shrink: clearly
880
- * felt without looking broken on the smallest controls. Tune the press feel here
881
- * once for the whole kit.
907
+ * felt without looking broken on the smallest controls.
882
908
  */
883
909
  export const PRESS_SCALE = 0.97;
884
910
 
885
911
  /**
886
- * Tactile "shrink on press" feedback. Spread onto a pressable frame's BASE style
887
- * (`...pressScaleStyle`): Tamagui MERGES this base `pressStyle` with the
888
- * per-variant `pressStyle` color, so on press the control both darkens (variant)
889
- * and dips (this). Pair the frame with `transitionProps("fast")` (or any
890
- * `transition`) so the dip EASES instead of snapping — the `scale` rides
891
- * Tamagui's `transform` transition on web and the Reanimated `scale` driver on
892
- * native, using the kit's own animation/press internals end to end.
912
+ * Tactile "shrink on press" feedback as a v3 flat clause. Spread onto a pressable
913
+ * frame's BASE style (`...pressScaleStyle`). v3 merges clause slots per (property,
914
+ * condition) across tiers, so this base `scale: "press:0.97"` composes with a
915
+ * variant's `bg: "… press:color8"` (different properties) — on press the control
916
+ * both darkens (variant) and dips (this). Pair the frame with `usePressScale()` at
917
+ * render so the dip EASES (and collapses under reduced motion).
893
918
  */
894
919
  export const pressScaleStyle = {
895
- pressStyle: {
896
- scale: PRESS_SCALE
897
- }
920
+ scale: `press:${PRESS_SCALE}`
898
921
  };
899
922
 
900
- /**
901
- * Build a precisely-typed `{ animateOnly }` object to spread onto a styled
902
- * component. `animateOnly` scopes the CSS animation driver's `transition` to ONLY
903
- * the listed properties (see `@tamagui/animations-css`); without it a plain
904
- * `transition="fast"` expands to `transition: all …`, which animates `top`/`left`
905
- * too. Floating elements (Tooltip/Popover) position via `top`/`left` from
906
- * floating-ui and must NOT transition those — otherwise the element visibly slides
907
- * across the screen on every re-measure. Restricting to `["transform", "opacity"]`
908
- * keeps the enter/exit fade + scale/slide while positioning stays instant. Like
909
- * `transitionProps`, this dodges the excess-property check WITHOUT widening to `any`.
910
- */
911
- export const animateOnlyProps = properties => ({
912
- animateOnly: properties
913
- });
923
+ /** Hover handlers as spread by {@link hoverProps}: web keys OR native keys. */
914
924
 
915
925
  /**
916
- * Build a precisely-typed `{ onHoverIn?, onHoverOut? }` object to spread onto a
917
- * styled component. Tamagui resolves these web hover events at runtime (they are
918
- * no-ops on native), but the generated style-prop types don't surface them, so a
919
- * direct attribute fails to typecheck. Spreading a precise object dodges the
920
- * excess-property check WITHOUT widening to `any` — the same technique as
921
- * `transitionProps`. Used by `Rating` for its hover preview.
926
+ * Pointer-hover handlers for a Tamagui frame, per platform. Spread the result:
927
+ * `<Frame {...hoverProps({ onHoverIn, onHoverOut })} />`. The platform event is
928
+ * forwarded to the handler (typed `unknown` unless `E` is given).
929
+ *
930
+ * v3 (3.0.18) only attaches its web mouse listeners when the element has
931
+ * `onMouseEnter`/`onMouseLeave` (or a `hover:` style): `onHoverIn`/`onHoverOut`
932
+ * ALONE are never wired on web (`createComponent` → `attachHover`), so a frame that
933
+ * only declared them silently ignored the pointer. Web therefore gets the mouse
934
+ * handlers; native keeps Tamagui's `onHoverIn`/`onHoverOut` (pointer devices on
935
+ * iPad / Android). Absent handlers stay absent (no `undefined` keys).
922
936
  */
923
- export const hoverProps = handlers => handlers;
937
+ export function hoverProps(handlers) {
938
+ const {
939
+ onHoverIn,
940
+ onHoverOut
941
+ } = handlers;
942
+ const out = {};
943
+ if (isWeb) {
944
+ if (onHoverIn) out.onMouseEnter = onHoverIn;
945
+ if (onHoverOut) out.onMouseLeave = onHoverOut;
946
+ } else {
947
+ if (onHoverIn) out.onHoverIn = onHoverIn;
948
+ if (onHoverOut) out.onHoverOut = onHoverOut;
949
+ }
950
+ return out;
951
+ }
952
+
953
+ /* -------------------------------------------------------------------------- */
954
+ /* Shadows */
955
+ /* -------------------------------------------------------------------------- */
924
956
 
925
957
  /**
926
958
  * Mantine-style `shadow` scale (xxs→xxl). Elevation rises with the key; colour
927
- * comes from the `$dropShadowColor` semantic token so it adapts to light/dark.
959
+ * comes from the `dropShadowColor` theme key so it adapts to light/dark.
928
960
  *
929
961
  * Expressed as the cross-platform `boxShadow` style prop (`"{x}px {y}px {blur}px
930
- * {spread}px {color}"`) rather than legacy RN `shadow*` props: `shadow*` only
931
- * renders on iOS (Android needs `elevation`), whereas `boxShadow` works on web +
932
- * iOS + Android 9+ (RN 0.76 New Arch, enabled here). Tamagui resolves the
933
- * embedded `$dropShadowColor` token theme-aware on every platform
934
- * (`resolveCompoundTokens`/`parseBoxShadow`), so iOS and Android stay aligned
935
- * with no runtime polyfill.
962
+ * {spread}px {color}"`) rather than legacy RN `shadow*` props: `boxShadow` works
963
+ * on web + iOS + Android 9+ (RN New Arch). v3 resolves the bare theme name
964
+ * embedded in the shadow recipe on every platform (`getSplitStyles`
965
+ * `configuredValue` → `grammar.embeddedTokens`, where a recipe word that is not a
966
+ * token is resolved as a COLOR against the active theme): web emits
967
+ * `var(--dropShadowColor)`, native the theme's raw rgba. So these stay static
968
+ * strings — no runtime theme read. Verified by `shadow.test.tsx`.
936
969
  *
937
- * The token is deliberately NOT named `$shadowColor`: that key collides with
938
- * React Native's reserved legacy `shadowColor` style prop, which makes Tamagui's
939
- * native pipeline drop the token's alpha on iOS (shadows render washed-out).
970
+ * The key is deliberately NOT named `shadowColor`: that collides with React
971
+ * Native's reserved legacy `shadowColor` style prop, which makes the native
972
+ * pipeline drop the token's alpha on iOS (shadows render washed-out).
940
973
  */
941
974
  export const shadowVariant = {
942
975
  xxs: {
943
- boxShadow: "0px 1px 1px 0px $dropShadowColor"
976
+ boxShadow: "0px 1px 1px 0px dropShadowColor"
944
977
  },
945
978
  xs: {
946
- boxShadow: "0px 1px 3px 0px $dropShadowColor"
979
+ boxShadow: "0px 1px 3px 0px dropShadowColor"
947
980
  },
948
981
  sm: {
949
- boxShadow: "0px 3px 6px 0px $dropShadowColor"
982
+ boxShadow: "0px 3px 6px 0px dropShadowColor"
950
983
  },
951
984
  md: {
952
- boxShadow: "0px 5px 12px 0px $dropShadowColor"
985
+ boxShadow: "0px 5px 12px 0px dropShadowColor"
953
986
  },
954
987
  lg: {
955
- boxShadow: "0px 8px 20px 0px $dropShadowColor"
988
+ boxShadow: "0px 8px 20px 0px dropShadowColor"
956
989
  },
957
990
  xl: {
958
- boxShadow: "0px 12px 28px 0px $dropShadowColor"
991
+ boxShadow: "0px 12px 28px 0px dropShadowColor"
959
992
  },
960
993
  xxl: {
961
- boxShadow: "0px 16px 40px 0px $dropShadowColor"
994
+ boxShadow: "0px 16px 40px 0px dropShadowColor"
962
995
  }
963
996
  };
964
997
 
998
+ /** The shadow scale's keys (`shadow` prop values). */
999
+
1000
+ /* -------------------------------------------------------------------------- */
1001
+ /* Typography */
1002
+ /* -------------------------------------------------------------------------- */
1003
+
965
1004
  /**
966
1005
  * Mantine-style `size` prop for text: a size key (`"md"`) maps to the matching
967
- * font-size token; a `$`-token / CSS value / number passes through to
968
- * `fontSize`. Line height is intentionally left unset so it derives from the
969
- * font config's per-fontSize line-height mapping.
1006
+ * font-size token. Line height is intentionally left unset so it derives from
1007
+ * the font config's per-fontSize line-height mapping. Static exact-key map.
970
1008
  */
971
1009
  export const fontSizeVariant = {
972
1010
  xxs: {
973
- fontSize: "$xxs"
1011
+ fontSize: "xxs"
974
1012
  },
975
1013
  xs: {
976
- fontSize: "$xs"
1014
+ fontSize: "xs"
977
1015
  },
978
1016
  sm: {
979
- fontSize: "$sm"
1017
+ fontSize: "sm"
980
1018
  },
981
1019
  md: {
982
- fontSize: "$md"
1020
+ fontSize: "md"
983
1021
  },
984
1022
  lg: {
985
- fontSize: "$lg"
1023
+ fontSize: "lg"
986
1024
  },
987
1025
  xl: {
988
- fontSize: "$xl"
1026
+ fontSize: "xl"
989
1027
  },
990
1028
  xxl: {
991
- fontSize: "$xxl"
1029
+ fontSize: "xxl"
992
1030
  }
993
1031
  };
994
1032
 
@@ -1046,58 +1084,32 @@ export const kbdSizeVariant = {
1046
1084
  }
1047
1085
  };
1048
1086
 
1087
+ /** The plain `fontSize` fallthrough body: a raw px / font token / CSS value. */
1088
+ export const fontSizeOf = value => ({
1089
+ fontSize: value
1090
+ });
1091
+
1049
1092
  /**
1050
- * Plain `fontSize` pass-through — UNLIKE `fontSizeVariant` it does NOT map a
1051
- * bare size key to a `$`-token; every value (key, `$`-token, CSS value) flows
1052
- * straight to `fontSize`. Use it as the catch-all alongside explicit token keys:
1053
- *
1054
- * ```ts
1055
- * size: { xs: { fontSize: "$xs" }, …, ...fontSizePassthroughVariant }
1056
- * ```
1093
+ * {@link fontSizeVariant} plus the escape hatch: a number / font token / CSS value
1094
+ * flows straight to `fontSize`. To add keys (Title's `h1`…), build a new one:
1095
+ * `tableVariant({ ...fontSizeVariant, h1: { fontSize: "xxl" } }, fontSizeOf)`.
1057
1096
  */
1058
- export const fontSizePassthroughVariant = {
1059
- ...fontSizeVariant,
1060
- ":string": val => ({
1061
- fontSize: val
1062
- }),
1063
- ":number": val => ({
1064
- fontSize: val
1065
- })
1066
- };
1097
+ export const fontSizePassthroughVariant = tableVariant(fontSizeVariant, fontSizeOf);
1067
1098
 
1068
1099
  /** Open-ended `fontWeight` prop (`"700"`, `600`, `"bold"`, …). */
1069
- export const fontWeightVariant = {
1070
- ":string": val => ({
1071
- fontWeight: val
1072
- }),
1073
- ":number": val => ({
1074
- fontWeight: val
1075
- })
1076
- };
1100
+ export const fontWeightVariant = passthroughVariant("fontWeight");
1077
1101
 
1078
1102
  /** Open-ended `textAlign` prop (`"left"`, `"center"`, `"justify"`, …). */
1079
- export const textAlignVariant = {
1080
- ":string": val => ({
1081
- textAlign: val
1082
- })
1083
- };
1103
+ export const textAlignVariant = passthroughVariant("textAlign");
1084
1104
 
1085
1105
  /** Open-ended `textTransform` prop (`"uppercase"`, `"capitalize"`, …). */
1086
- export const textTransformVariant = {
1087
- ":string": val => ({
1088
- textTransform: val
1089
- })
1090
- };
1106
+ export const textTransformVariant = passthroughVariant("textTransform");
1091
1107
 
1092
1108
  /**
1093
1109
  * CSS `text-wrap` values (`"balance"`, `"pretty"`, …) — web-only and not modeled
1094
- * by Tamagui's style props, so the variant narrows the open-ended string locally.
1110
+ * by Tamagui's style props.
1095
1111
  */
1096
1112
 
1097
1113
  /** Mantine-style `textWrap` prop. Web-only; a no-op on native. Used by `Title`. */
1098
- export const textWrapVariant = {
1099
- ":string": val => ({
1100
- textWrap: val
1101
- })
1102
- };
1114
+ export const textWrapVariant = passthroughVariant("textWrap");
1103
1115
  //# sourceMappingURL=style-props.js.map