@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,34 +1,35 @@
1
1
  /**
2
2
  * The animation ERGONOMICS layer — the easy, configurable, preset-driven surface
3
3
  * that sits on top of the primitive motion tokens in `@knitui/core` (`DURATIONS`,
4
- * `EASINGS`) and the Tamagui animation driver (the `transition` style prop).
4
+ * `MOTION_PRESETS`) and the Tamagui v3 `transition` prop.
5
5
  *
6
- * Three things live here:
7
- *
8
- * 1. {@link SCALES} / {@link DISTANCES} — the shared transform magnitudes (press
9
- * dip, enter offsets) so no component hardcodes `0.97` / `8` / `30` again.
6
+ * 1. {@link SCALES} / {@link DISTANCES} / {@link ANGLES} — the shared transform
7
+ * magnitudes (press dip, enter offsets).
10
8
  * 2. {@link motionPresets} + {@link useMotionPreset} — NAMED enter/exit recipes
11
- * (`"pop"`, `"fade-up"`, …) that resolve to plain props you spread onto any
12
- * animated frame: `{ transition, enterStyle, exitStyle, animateOnly }`. A
13
- * component exposes one `animation?` prop and forwards the result — that's the
14
- * whole integration. Reduced motion is honoured here, ONCE, for every consumer.
9
+ * (`"pop"`, `"fade-up"`, …) that resolve to v3 props you spread onto any
10
+ * animated frame: `{ transition, opacity: "enter:0 exit:0", y: "enter:30px
11
+ * exit:30px" }`. Reduced motion is honoured here, ONCE, for every consumer.
15
12
  * 3. {@link usePressScale} / {@link useReducedTransition} — the reduced-motion-aware
16
13
  * press-dip and in-place-transition helpers.
17
14
  * 4. {@link MotionConfig} / {@link useMotionConfig} — an app- (or subtree-) wide
18
- * config the three hooks read: a global `durationScale` speed knob and a global
19
- * `disabled` off-switch, so the whole system is tunable from one provider.
15
+ * `durationScale` speed knob and `disabled` off-switch the hooks read.
20
16
  *
21
17
  * Everything uses Tamagui's cross-platform shorthand transforms (`scale`, `x`,
22
- * `y`, `rotate`) rather than CSS strings / RN arrays, so a preset renders the
23
- * SAME on web and native — closing the web/native divergence the string-based
24
- * `Transition/transitions.ts` presets still carry.
18
+ * `y`, `rotate`) as v3 `enter:` / `exit:` clauses, so a preset renders the SAME
19
+ * on web and native. Exit clauses only play under `AnimatePresence`.
25
20
  */
26
21
  import * as React from "react";
27
22
 
28
- import { DURATIONS } from "@knitui/core";
29
23
  import { useReducedMotion } from "@knitui/hooks";
30
24
 
31
- import { type TransitionName, type TransitionValue } from "./style-props";
25
+ import {
26
+ presetDurationMs,
27
+ PRESS_SCALE,
28
+ toTransitionProperties,
29
+ type TransitionName,
30
+ type TransitionSpec,
31
+ type TransitionValue,
32
+ } from "./style-props";
32
33
 
33
34
  /* -------------------------------------------------------------------------- */
34
35
  /* Shared transform magnitudes */
@@ -37,7 +38,7 @@ import { type TransitionName, type TransitionValue } from "./style-props";
37
38
  /** Dimensionless scale targets shared across animated components. */
38
39
  export const SCALES = {
39
40
  /** Tactile "shrink on press" — the 3% dip shared by interactive controls. */
40
- press: 0.97,
41
+ press: PRESS_SCALE,
41
42
  /** Pop entry scale — eases UP into place from slightly smaller. */
42
43
  pop: 0.9,
43
44
  /** Zoom entry scale — eases DOWN into place from slightly larger. */
@@ -60,8 +61,7 @@ export const DISTANCES = {
60
61
  enter: 16,
61
62
  /** Fade-slide travel. */
62
63
  fade: 30,
63
- /** Pronounced slide — drawer-style edge motion (best-effort; supply your own
64
- * `enterStyle`/`exitStyle` for a full-bleed off-screen slide). */
64
+ /** Pronounced slide — drawer-style edge motion. */
65
65
  slide: 100,
66
66
  } as const;
67
67
 
@@ -71,8 +71,9 @@ export const DISTANCES = {
71
71
 
72
72
  /**
73
73
  * A cross-platform animated style snapshot — Tamagui shorthand transform props
74
- * plus opacity. Used for the `enterStyle` (the "from" state animated to rest) and
75
- * `exitStyle` (the "to" state on unmount, with `AnimatePresence`).
74
+ * plus opacity, as plain numbers / angle strings. A recipe's `enter` is the
75
+ * "from" state animated to rest; `exit` the "to" state on unmount (with
76
+ * `AnimatePresence`). Lengths (`x`, `y`) are px.
76
77
  */
77
78
  export interface MotionStyle {
78
79
  opacity?: number;
@@ -86,16 +87,22 @@ export interface MotionStyle {
86
87
  skewY?: string;
87
88
  }
88
89
 
90
+ /** The animated properties a {@link MotionStyle} can name. */
91
+ export type MotionProp = keyof MotionStyle;
92
+
89
93
  /** A named or inline animation recipe. */
90
94
  export interface MotionPreset {
91
- /** Driver key picking easing + duration. @default "fast" */
95
+ /** Driver preset picking easing + duration. @default "fast" */
92
96
  transition?: TransitionName;
93
97
  /** The "from" state on enter — animates to the frame's resting style. */
94
- enterStyle?: MotionStyle;
98
+ enter?: MotionStyle;
95
99
  /** The "to" state on exit — only animates when wrapped in `AnimatePresence`. */
96
- exitStyle?: MotionStyle;
97
- /** Scope the driver to the changing props (perf + keeps `top`/`left` instant). */
98
- animateOnly?: string[];
100
+ exit?: MotionStyle;
101
+ /**
102
+ * Scope the transition to the changing properties (perf + keeps `top`/`left`
103
+ * instant): `["transform", "opacity"]` or `"transform, opacity"`.
104
+ */
105
+ properties?: readonly string[] | string;
99
106
  }
100
107
 
101
108
  export type MotionPresetName =
@@ -120,167 +127,99 @@ export type MotionPresetName =
120
127
  | "skew-up"
121
128
  | "skew-down";
122
129
 
123
- const OPACITY_ONLY = ["opacity"];
124
- const TRANSFORM_AND_OPACITY = ["transform", "opacity"];
130
+ const OPACITY_ONLY = "opacity";
131
+ const TRANSFORM_AND_OPACITY = "transform, opacity";
132
+
133
+ /** A symmetric recipe: the same snapshot on enter and exit. */
134
+ const symmetric = (
135
+ transition: TransitionName,
136
+ snapshot: MotionStyle,
137
+ properties: string = TRANSFORM_AND_OPACITY,
138
+ ): MotionPreset => ({ transition, enter: snapshot, exit: snapshot, properties });
125
139
 
126
140
  /**
127
- * The built-in enter/exit recipes. Each pairs a driver `transition` key with a
128
- * symmetric `enterStyle`/`exitStyle` and an `animateOnly` scope. Values come from
141
+ * The built-in enter/exit recipes. Each pairs a driver `transition` preset with a
142
+ * symmetric `enter`/`exit` snapshot and a `properties` scope. Values come from
129
143
  * {@link SCALES}/{@link DISTANCES}, so retuning the feel is a one-line change.
130
144
  */
131
145
  export const motionPresets: Record<MotionPresetName, MotionPreset> = {
132
- fade: {
133
- transition: "fast",
134
- enterStyle: { opacity: 0 },
135
- exitStyle: { opacity: 0 },
136
- animateOnly: OPACITY_ONLY,
137
- },
138
- "fade-up": {
139
- transition: "fast",
140
- enterStyle: { opacity: 0, y: DISTANCES.fade },
141
- exitStyle: { opacity: 0, y: DISTANCES.fade },
142
- animateOnly: TRANSFORM_AND_OPACITY,
143
- },
144
- "fade-down": {
145
- transition: "fast",
146
- enterStyle: { opacity: 0, y: -DISTANCES.fade },
147
- exitStyle: { opacity: 0, y: -DISTANCES.fade },
148
- animateOnly: TRANSFORM_AND_OPACITY,
149
- },
150
- "fade-left": {
151
- transition: "fast",
152
- enterStyle: { opacity: 0, x: DISTANCES.fade },
153
- exitStyle: { opacity: 0, x: DISTANCES.fade },
154
- animateOnly: TRANSFORM_AND_OPACITY,
155
- },
156
- "fade-right": {
157
- transition: "fast",
158
- enterStyle: { opacity: 0, x: -DISTANCES.fade },
159
- exitStyle: { opacity: 0, x: -DISTANCES.fade },
160
- animateOnly: TRANSFORM_AND_OPACITY,
161
- },
162
- pop: {
163
- transition: "bouncy",
164
- enterStyle: { opacity: 0, scale: SCALES.pop },
165
- exitStyle: { opacity: 0, scale: SCALES.pop },
166
- animateOnly: TRANSFORM_AND_OPACITY,
167
- },
168
- scale: {
169
- transition: "fast",
170
- enterStyle: { opacity: 0, scale: 0 },
171
- exitStyle: { opacity: 0, scale: 0 },
172
- animateOnly: TRANSFORM_AND_OPACITY,
173
- },
174
- "scale-y": {
175
- transition: "fast",
176
- enterStyle: { opacity: 0, scaleY: 0 },
177
- exitStyle: { opacity: 0, scaleY: 0 },
178
- animateOnly: TRANSFORM_AND_OPACITY,
179
- },
180
- "scale-x": {
181
- transition: "fast",
182
- enterStyle: { opacity: 0, scaleX: 0 },
183
- exitStyle: { opacity: 0, scaleX: 0 },
184
- animateOnly: TRANSFORM_AND_OPACITY,
185
- },
186
- "slide-up": {
187
- transition: "medium",
188
- enterStyle: { y: DISTANCES.slide },
189
- exitStyle: { y: DISTANCES.slide },
190
- animateOnly: TRANSFORM_AND_OPACITY,
191
- },
192
- "slide-down": {
193
- transition: "medium",
194
- enterStyle: { y: -DISTANCES.slide },
195
- exitStyle: { y: -DISTANCES.slide },
196
- animateOnly: TRANSFORM_AND_OPACITY,
197
- },
198
- "slide-left": {
199
- transition: "medium",
200
- enterStyle: { x: DISTANCES.slide },
201
- exitStyle: { x: DISTANCES.slide },
202
- animateOnly: TRANSFORM_AND_OPACITY,
203
- },
204
- "slide-right": {
205
- transition: "medium",
206
- enterStyle: { x: -DISTANCES.slide },
207
- exitStyle: { x: -DISTANCES.slide },
208
- animateOnly: TRANSFORM_AND_OPACITY,
209
- },
146
+ fade: symmetric("fast", { opacity: 0 }, OPACITY_ONLY),
147
+ "fade-up": symmetric("fast", { opacity: 0, y: DISTANCES.fade }),
148
+ "fade-down": symmetric("fast", { opacity: 0, y: -DISTANCES.fade }),
149
+ "fade-left": symmetric("fast", { opacity: 0, x: DISTANCES.fade }),
150
+ "fade-right": symmetric("fast", { opacity: 0, x: -DISTANCES.fade }),
151
+ pop: symmetric("bouncy", { opacity: 0, scale: SCALES.pop }),
152
+ scale: symmetric("fast", { opacity: 0, scale: 0 }),
153
+ "scale-y": symmetric("fast", { opacity: 0, scaleY: 0 }),
154
+ "scale-x": symmetric("fast", { opacity: 0, scaleX: 0 }),
155
+ "slide-up": symmetric("medium", { y: DISTANCES.slide }),
156
+ "slide-down": symmetric("medium", { y: -DISTANCES.slide }),
157
+ "slide-left": symmetric("medium", { x: DISTANCES.slide }),
158
+ "slide-right": symmetric("medium", { x: -DISTANCES.slide }),
210
159
  // Pop with a directional rise/drop — the bouncy spring + a nudge translate.
211
- "pop-up": {
212
- transition: "bouncy",
213
- enterStyle: { opacity: 0, scale: SCALES.pop, y: DISTANCES.nudge },
214
- exitStyle: { opacity: 0, scale: SCALES.pop, y: DISTANCES.nudge },
215
- animateOnly: TRANSFORM_AND_OPACITY,
216
- },
217
- "pop-down": {
218
- transition: "bouncy",
219
- enterStyle: { opacity: 0, scale: SCALES.pop, y: -DISTANCES.nudge },
220
- exitStyle: { opacity: 0, scale: SCALES.pop, y: -DISTANCES.nudge },
221
- animateOnly: TRANSFORM_AND_OPACITY,
222
- },
160
+ "pop-up": symmetric("bouncy", { opacity: 0, scale: SCALES.pop, y: DISTANCES.nudge }),
161
+ "pop-down": symmetric("bouncy", { opacity: 0, scale: SCALES.pop, y: -DISTANCES.nudge }),
223
162
  // Eases DOWN into place from slightly larger (a "zoom in" settle).
224
- zoom: {
225
- transition: "medium",
226
- enterStyle: { opacity: 0, scale: SCALES.zoom },
227
- exitStyle: { opacity: 0, scale: SCALES.zoom },
228
- animateOnly: TRANSFORM_AND_OPACITY,
229
- },
230
- // Tilt + rise. `rotate` is a Tamagui shorthand transform, so it animates on web
231
- // and native alike (unlike the string-based `Transition` skew presets).
232
- "rotate-left": {
233
- transition: "medium",
234
- enterStyle: { opacity: 0, y: DISTANCES.nudge, rotate: `-${ANGLES.tilt}` },
235
- exitStyle: { opacity: 0, y: DISTANCES.nudge, rotate: `-${ANGLES.tilt}` },
236
- animateOnly: TRANSFORM_AND_OPACITY,
237
- },
238
- "rotate-right": {
239
- transition: "medium",
240
- enterStyle: { opacity: 0, y: DISTANCES.nudge, rotate: ANGLES.tilt },
241
- exitStyle: { opacity: 0, y: DISTANCES.nudge, rotate: ANGLES.tilt },
242
- animateOnly: TRANSFORM_AND_OPACITY,
243
- },
244
- // Shear + slide. `skewX` is a shorthand transform prop, so it animates on native
245
- // too (the legacy `Transition` skew presets are dropped by RN's string parser).
246
- "skew-up": {
247
- transition: "medium",
248
- enterStyle: { opacity: 0, y: -DISTANCES.fade, skewX: ANGLES.skew },
249
- exitStyle: { opacity: 0, y: -DISTANCES.fade, skewX: ANGLES.skew },
250
- animateOnly: TRANSFORM_AND_OPACITY,
251
- },
252
- "skew-down": {
253
- transition: "medium",
254
- enterStyle: { opacity: 0, y: DISTANCES.fade, skewX: ANGLES.skew },
255
- exitStyle: { opacity: 0, y: DISTANCES.fade, skewX: ANGLES.skew },
256
- animateOnly: TRANSFORM_AND_OPACITY,
257
- },
163
+ zoom: symmetric("medium", { opacity: 0, scale: SCALES.zoom }),
164
+ // Tilt + rise. `rotate` is a Tamagui shorthand transform: animates on web and native.
165
+ "rotate-left": symmetric("medium", {
166
+ opacity: 0,
167
+ y: DISTANCES.nudge,
168
+ rotate: `-${ANGLES.tilt}`,
169
+ }),
170
+ "rotate-right": symmetric("medium", { opacity: 0, y: DISTANCES.nudge, rotate: ANGLES.tilt }),
171
+ // Shear + slide. `skewX` is a shorthand transform prop, so it animates on native too.
172
+ "skew-up": symmetric("medium", { opacity: 0, y: -DISTANCES.fade, skewX: ANGLES.skew }),
173
+ "skew-down": symmetric("medium", { opacity: 0, y: DISTANCES.fade, skewX: ANGLES.skew }),
258
174
  };
259
175
 
260
176
  /* -------------------------------------------------------------------------- */
261
- /* Global motion config (provider) */
177
+ /* Recipe → v3 clause props */
262
178
  /* -------------------------------------------------------------------------- */
263
179
 
180
+ /** A v3 flat clause program (`"enter:0 exit:0"`). */
181
+ export type ClauseString = `${string}:${string}`;
182
+
183
+ /** The mount/unmount clauses a recipe compiles to — one flat value per property. */
184
+ export type MotionClauseProps = { [K in MotionProp]?: ClauseString };
185
+
186
+ const LENGTH_PROPS = new Set<MotionProp>(["x", "y"]);
187
+
188
+ /** One clause payload: lengths carry `px` (a bare number in a clause is unitless). */
189
+ const payload = (prop: MotionProp, value: number | string): string =>
190
+ typeof value === "number" && LENGTH_PROPS.has(prop) ? `${value}px` : `${value}`;
191
+
192
+ const compiledCache = new WeakMap<MotionPreset, MotionClauseProps>();
193
+
264
194
  /**
265
- * Base duration (ms) per driver key — mirrors the `createAnimations` config in
266
- * `@knitui/core` so `durationScale` can retime a bare key. Spring keys (`bouncy`)
267
- * are intentionally absent: they have no scalable duration. Keep in sync with
268
- * `core/src/config/animations.ts` / `animations.native.ts`.
195
+ * Compile a recipe's `enter` / `exit` snapshots to v3 clause props:
196
+ * `{ enter: { opacity: 0, y: 30 }, exit: { opacity: 0 } }` →
197
+ * `{ opacity: "enter:0 exit:0", y: "enter:30px" }`. Cached per recipe object, so
198
+ * the built-in (and any module-level) recipes compile once.
269
199
  */
270
- const DRIVER_KEY_MS: Partial<Record<TransitionName, number>> = {
271
- "100ms": DURATIONS.quick,
272
- fast: DURATIONS.fast,
273
- medium: DURATIONS.base,
274
- slow: DURATIONS.slow,
275
- pulse: DURATIONS.ambient,
276
- spin: 700,
277
- stripe: 180,
278
- linear: DURATIONS.base,
279
- ease: DURATIONS.base,
280
- "ease-in": DURATIONS.base,
281
- "ease-out": DURATIONS.base,
282
- "ease-in-out": DURATIONS.base,
283
- };
200
+ export function compileMotion(recipe: MotionPreset): MotionClauseProps {
201
+ const hit = compiledCache.get(recipe);
202
+ if (hit) return hit;
203
+ const out: MotionClauseProps = {};
204
+ const add = (phase: "enter" | "exit", snapshot: MotionStyle | undefined) => {
205
+ if (!snapshot) return;
206
+ for (const prop of Object.keys(snapshot) as MotionProp[]) {
207
+ const value = snapshot[prop];
208
+ if (value === undefined) continue;
209
+ const clause = `${phase}:${payload(prop, value)}` as ClauseString;
210
+ const prev = out[prop];
211
+ out[prop] = prev ? (`${prev} ${clause}` as ClauseString) : clause;
212
+ }
213
+ };
214
+ add("enter", recipe.enter);
215
+ add("exit", recipe.exit);
216
+ compiledCache.set(recipe, out);
217
+ return out;
218
+ }
219
+
220
+ /* -------------------------------------------------------------------------- */
221
+ /* Global motion config (provider) */
222
+ /* -------------------------------------------------------------------------- */
284
223
 
285
224
  /** Resolved global motion config — what {@link useMotionConfig} returns. */
286
225
  export interface MotionConfigValue {
@@ -334,34 +273,43 @@ export function useMotionConfig(): MotionConfigValue {
334
273
 
335
274
  /**
336
275
  * Apply the global motion config to a resolved transition: `null` when disabled;
337
- * otherwise scale the duration by `durationScale`, resolving a bare driver key to
338
- * its base ms via {@link DRIVER_KEY_MS}. A `null` value, a unit scale, or a spring
339
- * key (`bouncy` — no scalable duration) pass through unchanged.
276
+ * otherwise scale the duration by `durationScale` — a preset name becomes
277
+ * `{ preset, duration }` with its base ms read from core's `MOTION_PRESETS` (the
278
+ * one motion table). A `null` value, a unit scale, or a spring preset (`bouncy` —
279
+ * no scalable duration) pass through unchanged.
340
280
  */
341
- function applyMotionConfig(value: TransitionValue, config: MotionConfigValue): TransitionValue {
281
+ export function applyMotionConfig(
282
+ value: TransitionValue,
283
+ config: MotionConfigValue,
284
+ ): TransitionValue {
342
285
  if (config.disabled) return null;
343
286
  if (value == null || config.durationScale === 1) return value;
344
- const [key, opts] = Array.isArray(value) ? value : [value, undefined];
345
- const baseMs = opts?.duration ?? DRIVER_KEY_MS[key];
346
- if (baseMs == null) return value; // spring / unknown key — nothing to scale
347
- return [key, { duration: Math.max(0, Math.round(baseMs * config.durationScale)) }];
287
+ const spec: TransitionSpec = typeof value === "string" ? { preset: value } : value;
288
+ const baseMs = spec.duration ?? (spec.preset ? presetDurationMs(spec.preset) : undefined);
289
+ if (baseMs == null) return value; // spring / unknown — nothing to scale
290
+ return { ...spec, duration: Math.max(0, Math.round(baseMs * config.durationScale)) };
348
291
  }
349
292
 
293
+ /** A stable primitive key for a transition value (memo deps). */
294
+ const transitionKey = (value: TransitionValue): string | null => {
295
+ if (value == null || typeof value === "string") return value;
296
+ return JSON.stringify(value);
297
+ };
298
+
350
299
  /* -------------------------------------------------------------------------- */
351
300
  /* Resolver hook */
352
301
  /* -------------------------------------------------------------------------- */
353
302
 
354
- /** The spreadable props {@link useMotionPreset} returns. */
355
- export interface ResolvedMotion {
356
- /** Driver key (or `null` to disable). Spread onto the frame's `transition`. */
303
+ /**
304
+ * The spreadable props {@link useMotionPreset} returns: the `transition` plus the
305
+ * recipe's mount/unmount clauses (`opacity: "enter:0 exit:0"`, …). Spread it LAST
306
+ * among the animated properties it names — a later `opacity`/`y` prop replaces the
307
+ * clause program (v3 has one value per property).
308
+ */
309
+ export type ResolvedMotion = MotionClauseProps & {
310
+ /** Preset / object (or `null` to disable). */
357
311
  transition: TransitionValue;
358
- /** "From" state — spread onto the frame's `enterStyle`. */
359
- enterStyle?: MotionStyle;
360
- /** "To" state on exit — spread onto the frame's `exitStyle` (needs AnimatePresence). */
361
- exitStyle?: MotionStyle;
362
- /** Driver scope — spread onto the frame's `animateOnly`. */
363
- animateOnly?: string[];
364
- }
312
+ };
365
313
 
366
314
  export interface UseMotionPresetOptions {
367
315
  /** Override the preset's driver key (easing + base duration). */
@@ -373,19 +321,20 @@ export interface UseMotionPresetOptions {
373
321
  }
374
322
 
375
323
  /** The inert (no-animation) result — reused so reduced-motion renders are stable. */
376
- const INERT: ResolvedMotion = { transition: null };
324
+ const INERT: ResolvedMotion = Object.freeze({ transition: null });
377
325
 
378
326
  /**
379
327
  * Resolve a preset (by name, an inline {@link MotionPreset}, or `false`/`null` to
380
- * disable) into plain props to spread onto an animated frame. Honours the user's
328
+ * disable) into v3 props to spread onto an animated frame. Honours the user's
381
329
  * reduced-motion preference centrally: under reduced motion (or when disabled) it
382
- * returns {@link INERT} — `transition: null` and no enter/exit styles — so the
383
- * frame appears instantly with no per-component guard.
330
+ * returns {@link INERT} — `transition: null` and no enter/exit clauses — so the
331
+ * frame appears instantly with no per-component guard. Memoised: the same inputs
332
+ * return the same object.
384
333
  *
385
334
  * ```tsx
386
335
  * function Dialog({ animation = "fade-up", ...props }) {
387
336
  * const motion = useMotionPreset(animation);
388
- * return <Frame {...motion} {...props} />; // configurable + reduced-motion safe
337
+ * return <Frame {...props} {...motion} />; // configurable + reduced-motion safe
389
338
  * }
390
339
  * ```
391
340
  */
@@ -395,22 +344,21 @@ export function useMotionPreset(
395
344
  ): ResolvedMotion {
396
345
  const reduced = useReducedMotion();
397
346
  const config = useMotionConfig();
398
-
399
- if (!preset || reduced || config.disabled || options.enabled === false) {
400
- return INERT;
401
- }
402
-
403
- const recipe = typeof preset === "string" ? motionPresets[preset] : preset;
404
- const key = options.transition ?? recipe.transition ?? "fast";
405
- const base: TransitionValue =
406
- options.duration != null ? [key, { duration: options.duration }] : key;
407
-
408
- return {
409
- transition: applyMotionConfig(base, config),
410
- enterStyle: recipe.enterStyle,
411
- exitStyle: recipe.exitStyle,
412
- animateOnly: recipe.animateOnly,
413
- };
347
+ const inert = !preset || reduced || config.disabled || options.enabled === false;
348
+ const recipe = inert ? undefined : typeof preset === "string" ? motionPresets[preset] : preset;
349
+ const key = recipe ? (options.transition ?? recipe.transition ?? "fast") : undefined;
350
+ const properties = recipe?.properties;
351
+ const propertiesKey = properties === undefined ? undefined : toTransitionProperties(properties);
352
+
353
+ return React.useMemo<ResolvedMotion>(() => {
354
+ if (!recipe || !key) return INERT;
355
+ const spec: TransitionSpec = { preset: key };
356
+ if (options.duration != null) spec.duration = options.duration;
357
+ if (propertiesKey) spec.properties = propertiesKey;
358
+ const base: TransitionValue = spec.duration == null && spec.properties == null ? key : spec;
359
+ return { ...compileMotion(recipe), transition: applyMotionConfig(base, config) };
360
+ // `config` is a memoised context value; the recipe object is compiled once per identity.
361
+ }, [recipe, key, options.duration, propertiesKey, config]);
414
362
  }
415
363
 
416
364
  /* -------------------------------------------------------------------------- */
@@ -419,36 +367,33 @@ export function useMotionPreset(
419
367
 
420
368
  /** The spreadable props {@link usePressScale} returns. */
421
369
  export interface PressScaleResult {
422
- /** Easing key for the dip (`null` under reduced motion). */
370
+ /** Easing for the dip (`null` under reduced motion). */
423
371
  transition: TransitionValue;
424
- /** Neutralises the base `pressStyle` dip under reduced motion; absent otherwise. */
425
- pressStyle?: { scale: number };
372
+ /** Neutralises the base `scale: "press:0.97"` dip under reduced motion; absent otherwise. */
373
+ scale?: "press:1";
426
374
  }
427
375
 
376
+ const PRESS_REDUCED: PressScaleResult = Object.freeze({ transition: null, scale: "press:1" });
377
+
428
378
  /**
429
379
  * Reduced-motion-aware press feedback for interactive controls (Button,
430
- * ActionIcon, Chip, …). Pair with the static `pressScaleStyle` spread into the
431
- * component's `styled()` base config: that supplies the `pressStyle: { scale }`
432
- * dip, and THIS supplies the easing at render — collapsing to an instant,
433
- * dip-free press when the user prefers reduced motion.
434
- *
435
- * Replaces the old `{...transitionProps("fast")}` at the press call site:
436
- *
437
- * ```tsx
438
- * <Frame {...pressScaleStyle-in-base-config} {...usePressScale()} />
439
- * ```
380
+ * ActionIcon, Chip, …). Pair with the static `pressScaleStyle` in the component's
381
+ * `styled()` base (the `scale: "press:0.97"` dip); THIS supplies the easing at
382
+ * render — collapsing to an instant, dip-free press under reduced motion.
440
383
  *
441
- * Normal: `{ transition: "fast" }` — identical to before. Reduced: `{ transition:
442
- * null, pressStyle: { scale: 1 } }` — the `scale: 1` overrides only the dip key,
443
- * leaving any variant `pressStyle` colour intact.
384
+ * Normal: `{ transition: "fast" }`. Reduced: `{ transition: null, scale:
385
+ * "press:1" }` — a call-site `press:` clause outranks the base one for that slot
386
+ * only, so the frame's resting `scale` and any variant press COLOUR stay intact.
444
387
  */
445
388
  export function usePressScale(options: { transition?: TransitionName } = {}): PressScaleResult {
446
389
  const reduced = useReducedMotion();
447
390
  const config = useMotionConfig();
448
- if (reduced || config.disabled) {
449
- return { transition: null, pressStyle: { scale: 1 } };
450
- }
451
- return { transition: applyMotionConfig(options.transition ?? "fast", config) };
391
+ const off = reduced || config.disabled;
392
+ const name = options.transition ?? "fast";
393
+ return React.useMemo(
394
+ () => (off ? PRESS_REDUCED : { transition: applyMotionConfig(name, config) }),
395
+ [off, name, config],
396
+ );
452
397
  }
453
398
 
454
399
  /* -------------------------------------------------------------------------- */
@@ -457,23 +402,38 @@ export function usePressScale(options: { transition?: TransitionName } = {}): Pr
457
402
 
458
403
  /**
459
404
  * Reduced-motion-aware transition for IN-PLACE state changes — chevron rotation,
460
- * thumb/indicator slide, scrollbar fade, color toggles — the generic sibling of
461
- * {@link usePressScale} (press) and {@link useMotionPreset} (enter/exit). Pass the
462
- * driver key you'd normally hand to the `transition` prop, or a `[key, { duration }]`
463
- * pair (e.g. from `timedTransition`), or `null` to opt a branch out. Under reduced
464
- * motion it returns `{ transition: null }` so the change snaps instantly — so the
465
- * call site no longer needs its own `useReducedMotion` guard.
466
- *
467
- * Replaces the hand-written `transitionProps(reduced ? null : value)` idiom:
405
+ * thumb/indicator slide, scrollbar fade, color toggles. Pass the value you'd hand
406
+ * to the `transition` prop (a preset name, a `{ duration, easing }` object from
407
+ * `timedTransition`, or `null`), plus optional `properties` to scope it. Under
408
+ * reduced motion it returns `{ transition: null }`. Memoised on the VALUE (not
409
+ * its identity), so an inline object argument still yields a stable result —
410
+ * which also lets `scopeTransition(result, …)` hit its cache.
468
411
  *
469
412
  * ```tsx
470
413
  * const fade = useReducedTransition("fast");
471
- * <Thumb {...fade} x={offset} /> // eases normally, snaps under reduced motion
414
+ * <Thumb {...scopeTransition(fade, ["opacity"])} opacity={visible ? 1 : 0} />
472
415
  * ```
473
416
  */
474
- export function useReducedTransition(value: TransitionValue): { transition: TransitionValue } {
417
+ export function useReducedTransition(
418
+ value: TransitionValue,
419
+ properties?: readonly string[] | string,
420
+ ): { transition: TransitionValue } {
475
421
  const reduced = useReducedMotion();
476
422
  const config = useMotionConfig();
477
- if (reduced) return { transition: null };
478
- return { transition: applyMotionConfig(value, config) };
423
+ const valueKey = transitionKey(value);
424
+ const propertiesKey = properties === undefined ? undefined : toTransitionProperties(properties);
425
+ return React.useMemo(
426
+ () => {
427
+ if (reduced) return { transition: null };
428
+ const scoped: TransitionValue =
429
+ propertiesKey === undefined || value == null
430
+ ? value
431
+ : typeof value === "string"
432
+ ? { preset: value, properties: propertiesKey }
433
+ : { ...value, properties: propertiesKey };
434
+ return { transition: applyMotionConfig(scoped, config) };
435
+ },
436
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed on the value, not its identity
437
+ [reduced, valueKey, propertiesKey, config],
438
+ );
479
439
  }
@@ -1,19 +1,19 @@
1
1
  import { type useTheme, variableToString } from "@knitui/core";
2
2
 
3
3
  /**
4
- * Resolve a `$colorN` token (or an already-concrete color) to a value that
5
- * `react-native-svg` can paint with — it can't resolve theme tokens or
6
- * `currentColor` itself. Cross-platform via Tamagui's `variableToString`:
7
- * web → `var(--colorN)` (tracks the theme via CSS), native → the raw color
8
- * (`variable.val`); both are valid SVG `fill`/`stroke` values.
4
+ * Resolve a theme colour NAME (`color9`, `blue9`, `borderColor`; or an
5
+ * already-concrete colour) to a value that `react-native-svg` can paint — it
6
+ * can't resolve theme keys or `currentColor` itself. Cross-platform via Tamagui's
7
+ * `variableToString`: web → `var(--color9)` (tracks the theme via CSS), native →
8
+ * the raw colour (`variable.val`); both are valid SVG `fill`/`stroke` values.
9
9
  *
10
- * THE single place icon color resolution lives, shared by `ControlIconProvider`
10
+ * THE single place icon colour resolution lives, shared by `ControlIconProvider`
11
11
  * and the in-component glyph icons (Checkbox/Chip/Combobox chevron), so the
12
- * (token → concrete) rule can't drift between them. A non-token / unknown value
13
- * passes through unchanged.
12
+ * (name → concrete) rule can't drift between them. v3 has no `$` sigil: the
13
+ * active theme IS the oracle — a key it defines resolves, anything else (`#fff`,
14
+ * `rgb(…)`, an unknown name) passes through unchanged.
14
15
  */
15
16
  export const resolveThemeColor = (theme: ReturnType<typeof useTheme>, color: string): string => {
16
- const key = color.startsWith("$") ? color.slice(1) : color;
17
- const value = key ? theme[key as keyof typeof theme] : undefined;
17
+ const value = color ? theme[color as keyof typeof theme] : undefined;
18
18
  return value ? variableToString(value) : color;
19
19
  };