@knitui/components 0.4.0 → 0.6.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 (483) hide show
  1. package/lib/commonjs/Accordion/Accordion.js +10 -6
  2. package/lib/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/lib/commonjs/ActionIcon/ActionIcon.js.map +1 -1
  4. package/lib/commonjs/Alert/Alert.js +31 -11
  5. package/lib/commonjs/Alert/Alert.js.map +1 -1
  6. package/lib/commonjs/AngleSlider/AngleSlider.js +55 -17
  7. package/lib/commonjs/AngleSlider/AngleSlider.js.map +1 -1
  8. package/lib/commonjs/Autocomplete/Autocomplete.js +53 -33
  9. package/lib/commonjs/Autocomplete/Autocomplete.js.map +1 -1
  10. package/lib/commonjs/Avatar/Avatar.js.map +1 -1
  11. package/lib/commonjs/Badge/Badge.js +6 -9
  12. package/lib/commonjs/Badge/Badge.js.map +1 -1
  13. package/lib/commonjs/Button/Button.js +22 -6
  14. package/lib/commonjs/Button/Button.js.map +1 -1
  15. package/lib/commonjs/Card/Card.js +13 -4
  16. package/lib/commonjs/Card/Card.js.map +1 -1
  17. package/lib/commonjs/Checkbox/CheckIcon.js +10 -6
  18. package/lib/commonjs/Checkbox/CheckIcon.js.map +1 -1
  19. package/lib/commonjs/Checkbox/Checkbox.js +9 -2
  20. package/lib/commonjs/Checkbox/Checkbox.js.map +1 -1
  21. package/lib/commonjs/Chip/Chip.js +15 -16
  22. package/lib/commonjs/Chip/Chip.js.map +1 -1
  23. package/lib/commonjs/CloseButton/CloseButton.js +2 -2
  24. package/lib/commonjs/CloseButton/CloseButton.js.map +1 -1
  25. package/lib/commonjs/ColorInput/ColorInput.js +12 -4
  26. package/lib/commonjs/ColorInput/ColorInput.js.map +1 -1
  27. package/lib/commonjs/ColorPicker/ColorPicker.js +32 -24
  28. package/lib/commonjs/ColorPicker/ColorPicker.js.map +1 -1
  29. package/lib/commonjs/Combobox/Combobox.js +11 -6
  30. package/lib/commonjs/Combobox/Combobox.js.map +1 -1
  31. package/lib/commonjs/Combobox/OptionsDropdown.js +6 -2
  32. package/lib/commonjs/Combobox/OptionsDropdown.js.map +1 -1
  33. package/lib/commonjs/Group/Group.js +19 -11
  34. package/lib/commonjs/Group/Group.js.map +1 -1
  35. package/lib/commonjs/Highlight/Highlight.js +30 -10
  36. package/lib/commonjs/Highlight/Highlight.js.map +1 -1
  37. package/lib/commonjs/HoverCard/HoverCard.js +23 -10
  38. package/lib/commonjs/HoverCard/HoverCard.js.map +1 -1
  39. package/lib/commonjs/Indicator/Indicator.js +5 -1
  40. package/lib/commonjs/Indicator/Indicator.js.map +1 -1
  41. package/lib/commonjs/Input/Input.js +30 -12
  42. package/lib/commonjs/Input/Input.js.map +1 -1
  43. package/lib/commonjs/Input/shared.js +18 -8
  44. package/lib/commonjs/Input/shared.js.map +1 -1
  45. package/lib/commonjs/Loader/Loader.js +18 -10
  46. package/lib/commonjs/Loader/Loader.js.map +1 -1
  47. package/lib/commonjs/Menu/Menu.js +6 -7
  48. package/lib/commonjs/Menu/Menu.js.map +1 -1
  49. package/lib/commonjs/MultiSelect/MultiSelect.js +112 -47
  50. package/lib/commonjs/MultiSelect/MultiSelect.js.map +1 -1
  51. package/lib/commonjs/Notification/Notification.js +31 -11
  52. package/lib/commonjs/Notification/Notification.js.map +1 -1
  53. package/lib/commonjs/NumberFormatter/NumberFormatter.js +48 -11
  54. package/lib/commonjs/NumberFormatter/NumberFormatter.js.map +1 -1
  55. package/lib/commonjs/Paper/Paper.js +8 -8
  56. package/lib/commonjs/Paper/Paper.js.map +1 -1
  57. package/lib/commonjs/Pill/Pill.js +6 -8
  58. package/lib/commonjs/Pill/Pill.js.map +1 -1
  59. package/lib/commonjs/PinInput/PinInput.js.map +1 -1
  60. package/lib/commonjs/Progress/Progress.js +4 -1
  61. package/lib/commonjs/Progress/Progress.js.map +1 -1
  62. package/lib/commonjs/RollingNumber/RollingNumber.js +30 -13
  63. package/lib/commonjs/RollingNumber/RollingNumber.js.map +1 -1
  64. package/lib/commonjs/RollingNumber/rolling-number-utils.js +27 -5
  65. package/lib/commonjs/RollingNumber/rolling-number-utils.js.map +1 -1
  66. package/lib/commonjs/ScrollArea/ScrollArea.js +131 -41
  67. package/lib/commonjs/ScrollArea/ScrollArea.js.map +1 -1
  68. package/lib/commonjs/ScrollArea/ScrollArea.native.js +128 -40
  69. package/lib/commonjs/ScrollArea/ScrollArea.native.js.map +1 -1
  70. package/lib/commonjs/SegmentedControl/SegmentedControl.js +4 -1
  71. package/lib/commonjs/SegmentedControl/SegmentedControl.js.map +1 -1
  72. package/lib/commonjs/Select/Select.js +64 -35
  73. package/lib/commonjs/Select/Select.js.map +1 -1
  74. package/lib/commonjs/Skeleton/Skeleton.js +6 -2
  75. package/lib/commonjs/Skeleton/Skeleton.js.map +1 -1
  76. package/lib/commonjs/Slider/Slider.js +136 -83
  77. package/lib/commonjs/Slider/Slider.js.map +1 -1
  78. package/lib/commonjs/Spoiler/Spoiler.js +22 -2
  79. package/lib/commonjs/Spoiler/Spoiler.js.map +1 -1
  80. package/lib/commonjs/Stepper/Stepper.js +2 -2
  81. package/lib/commonjs/Stepper/Stepper.js.map +1 -1
  82. package/lib/commonjs/Switch/Switch.js +18 -7
  83. package/lib/commonjs/Switch/Switch.js.map +1 -1
  84. package/lib/commonjs/Table/Table.js +91 -28
  85. package/lib/commonjs/Table/Table.js.map +1 -1
  86. package/lib/commonjs/TableOfContents/TableOfContents.js +4 -1
  87. package/lib/commonjs/TableOfContents/TableOfContents.js.map +1 -1
  88. package/lib/commonjs/TagsInput/TagsInput.js +138 -55
  89. package/lib/commonjs/TagsInput/TagsInput.js.map +1 -1
  90. package/lib/commonjs/ThemeIcon/ThemeIcon.js.map +1 -1
  91. package/lib/commonjs/Title/Title.js.map +1 -1
  92. package/lib/commonjs/Tooltip/Tooltip.js +27 -5
  93. package/lib/commonjs/Tooltip/Tooltip.js.map +1 -1
  94. package/lib/commonjs/Transition/use-transition.js.map +1 -1
  95. package/lib/commonjs/Tree/Tree.js +4 -1
  96. package/lib/commonjs/Tree/Tree.js.map +1 -1
  97. package/lib/commonjs/Tree/tree-data.js +58 -23
  98. package/lib/commonjs/Tree/tree-data.js.map +1 -1
  99. package/lib/commonjs/Tree/use-tree.js +33 -4
  100. package/lib/commonjs/Tree/use-tree.js.map +1 -1
  101. package/lib/commonjs/TreeSelect/TreeSelect.js +70 -30
  102. package/lib/commonjs/TreeSelect/TreeSelect.js.map +1 -1
  103. package/lib/commonjs/Typography/Typography.js +10 -10
  104. package/lib/commonjs/Typography/Typography.js.map +1 -1
  105. package/lib/commonjs/UnstyledButton/UnstyledButton.js +8 -3
  106. package/lib/commonjs/UnstyledButton/UnstyledButton.js.map +1 -1
  107. package/lib/commonjs/VirtualList/VirtualList.js +71 -13
  108. package/lib/commonjs/VirtualList/VirtualList.js.map +1 -1
  109. package/lib/commonjs/floating/platform.js +28 -1
  110. package/lib/commonjs/floating/platform.js.map +1 -1
  111. package/lib/commonjs/floating/use-position.js +33 -1
  112. package/lib/commonjs/floating/use-position.js.map +1 -1
  113. package/lib/commonjs/internal/ControlIconProvider.js +20 -15
  114. package/lib/commonjs/internal/ControlIconProvider.js.map +1 -1
  115. package/lib/commonjs/internal/gradient-shared.js +9 -5
  116. package/lib/commonjs/internal/gradient-shared.js.map +1 -1
  117. package/lib/commonjs/internal/gradient.js +21 -9
  118. package/lib/commonjs/internal/gradient.js.map +1 -1
  119. package/lib/commonjs/internal/gradient.native.js +36 -10
  120. package/lib/commonjs/internal/gradient.native.js.map +1 -1
  121. package/lib/commonjs/internal/render-text-child.js +30 -2
  122. package/lib/commonjs/internal/render-text-child.js.map +1 -1
  123. package/lib/commonjs/internal/style-props.js +17 -5
  124. package/lib/commonjs/internal/style-props.js.map +1 -1
  125. package/lib/commonjs/internal/theme-color-web.js +46 -0
  126. package/lib/commonjs/internal/theme-color-web.js.map +1 -0
  127. package/lib/commonjs/internal/use-icon-color.js +33 -0
  128. package/lib/commonjs/internal/use-icon-color.js.map +1 -0
  129. package/lib/commonjs/internal/use-icon-color.native.js +23 -0
  130. package/lib/commonjs/internal/use-icon-color.native.js.map +1 -0
  131. package/lib/commonjs/internal/use-looping-animation.js +7 -3
  132. package/lib/commonjs/internal/use-looping-animation.js.map +1 -1
  133. package/lib/commonjs/internal/use-looping-animation.native.js +9 -1
  134. package/lib/commonjs/internal/use-looping-animation.native.js.map +1 -1
  135. package/lib/commonjs/internal/use-looping-animation.shared.js +33 -0
  136. package/lib/commonjs/internal/use-looping-animation.shared.js.map +1 -1
  137. package/lib/commonjs/internal/use-slot-text-wrapper.js +36 -5
  138. package/lib/commonjs/internal/use-slot-text-wrapper.js.map +1 -1
  139. package/lib/module/Accordion/Accordion.js +9 -5
  140. package/lib/module/Accordion/Accordion.js.map +1 -1
  141. package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
  142. package/lib/module/Alert/Alert.js +31 -11
  143. package/lib/module/Alert/Alert.js.map +1 -1
  144. package/lib/module/AngleSlider/AngleSlider.js +55 -17
  145. package/lib/module/AngleSlider/AngleSlider.js.map +1 -1
  146. package/lib/module/Autocomplete/Autocomplete.js +54 -34
  147. package/lib/module/Autocomplete/Autocomplete.js.map +1 -1
  148. package/lib/module/Avatar/Avatar.js.map +1 -1
  149. package/lib/module/Badge/Badge.js +6 -9
  150. package/lib/module/Badge/Badge.js.map +1 -1
  151. package/lib/module/Button/Button.js +23 -7
  152. package/lib/module/Button/Button.js.map +1 -1
  153. package/lib/module/Card/Card.js +13 -4
  154. package/lib/module/Card/Card.js.map +1 -1
  155. package/lib/module/Checkbox/CheckIcon.js +9 -5
  156. package/lib/module/Checkbox/CheckIcon.js.map +1 -1
  157. package/lib/module/Checkbox/Checkbox.js +9 -2
  158. package/lib/module/Checkbox/Checkbox.js.map +1 -1
  159. package/lib/module/Chip/Chip.js +15 -16
  160. package/lib/module/Chip/Chip.js.map +1 -1
  161. package/lib/module/CloseButton/CloseButton.js +1 -1
  162. package/lib/module/CloseButton/CloseButton.js.map +1 -1
  163. package/lib/module/ColorInput/ColorInput.js +12 -4
  164. package/lib/module/ColorInput/ColorInput.js.map +1 -1
  165. package/lib/module/ColorPicker/ColorPicker.js +32 -24
  166. package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
  167. package/lib/module/Combobox/Combobox.js +11 -6
  168. package/lib/module/Combobox/Combobox.js.map +1 -1
  169. package/lib/module/Combobox/OptionsDropdown.js +6 -2
  170. package/lib/module/Combobox/OptionsDropdown.js.map +1 -1
  171. package/lib/module/Group/Group.js +19 -11
  172. package/lib/module/Group/Group.js.map +1 -1
  173. package/lib/module/Highlight/Highlight.js +30 -10
  174. package/lib/module/Highlight/Highlight.js.map +1 -1
  175. package/lib/module/HoverCard/HoverCard.js +23 -10
  176. package/lib/module/HoverCard/HoverCard.js.map +1 -1
  177. package/lib/module/Indicator/Indicator.js +5 -1
  178. package/lib/module/Indicator/Indicator.js.map +1 -1
  179. package/lib/module/Input/Input.js +32 -14
  180. package/lib/module/Input/Input.js.map +1 -1
  181. package/lib/module/Input/shared.js +19 -9
  182. package/lib/module/Input/shared.js.map +1 -1
  183. package/lib/module/Loader/Loader.js +18 -10
  184. package/lib/module/Loader/Loader.js.map +1 -1
  185. package/lib/module/Menu/Menu.js +6 -7
  186. package/lib/module/Menu/Menu.js.map +1 -1
  187. package/lib/module/MultiSelect/MultiSelect.js +113 -48
  188. package/lib/module/MultiSelect/MultiSelect.js.map +1 -1
  189. package/lib/module/Notification/Notification.js +31 -11
  190. package/lib/module/Notification/Notification.js.map +1 -1
  191. package/lib/module/NumberFormatter/NumberFormatter.js +48 -11
  192. package/lib/module/NumberFormatter/NumberFormatter.js.map +1 -1
  193. package/lib/module/Paper/Paper.js +7 -8
  194. package/lib/module/Paper/Paper.js.map +1 -1
  195. package/lib/module/Pill/Pill.js +6 -8
  196. package/lib/module/Pill/Pill.js.map +1 -1
  197. package/lib/module/PinInput/PinInput.js.map +1 -1
  198. package/lib/module/Progress/Progress.js +4 -1
  199. package/lib/module/Progress/Progress.js.map +1 -1
  200. package/lib/module/RollingNumber/RollingNumber.js +30 -13
  201. package/lib/module/RollingNumber/RollingNumber.js.map +1 -1
  202. package/lib/module/RollingNumber/rolling-number-utils.js +27 -5
  203. package/lib/module/RollingNumber/rolling-number-utils.js.map +1 -1
  204. package/lib/module/ScrollArea/ScrollArea.js +133 -43
  205. package/lib/module/ScrollArea/ScrollArea.js.map +1 -1
  206. package/lib/module/ScrollArea/ScrollArea.native.js +128 -40
  207. package/lib/module/ScrollArea/ScrollArea.native.js.map +1 -1
  208. package/lib/module/SegmentedControl/SegmentedControl.js +4 -1
  209. package/lib/module/SegmentedControl/SegmentedControl.js.map +1 -1
  210. package/lib/module/Select/Select.js +65 -36
  211. package/lib/module/Select/Select.js.map +1 -1
  212. package/lib/module/Skeleton/Skeleton.js +6 -2
  213. package/lib/module/Skeleton/Skeleton.js.map +1 -1
  214. package/lib/module/Slider/Slider.js +137 -84
  215. package/lib/module/Slider/Slider.js.map +1 -1
  216. package/lib/module/Spoiler/Spoiler.js +23 -3
  217. package/lib/module/Spoiler/Spoiler.js.map +1 -1
  218. package/lib/module/Stepper/Stepper.js +1 -1
  219. package/lib/module/Stepper/Stepper.js.map +1 -1
  220. package/lib/module/Switch/Switch.js +18 -7
  221. package/lib/module/Switch/Switch.js.map +1 -1
  222. package/lib/module/Table/Table.js +91 -28
  223. package/lib/module/Table/Table.js.map +1 -1
  224. package/lib/module/TableOfContents/TableOfContents.js +5 -2
  225. package/lib/module/TableOfContents/TableOfContents.js.map +1 -1
  226. package/lib/module/TagsInput/TagsInput.js +140 -57
  227. package/lib/module/TagsInput/TagsInput.js.map +1 -1
  228. package/lib/module/ThemeIcon/ThemeIcon.js.map +1 -1
  229. package/lib/module/Title/Title.js.map +1 -1
  230. package/lib/module/Tooltip/Tooltip.js +27 -5
  231. package/lib/module/Tooltip/Tooltip.js.map +1 -1
  232. package/lib/module/Transition/use-transition.js.map +1 -1
  233. package/lib/module/Tree/Tree.js +4 -1
  234. package/lib/module/Tree/Tree.js.map +1 -1
  235. package/lib/module/Tree/tree-data.js +57 -23
  236. package/lib/module/Tree/tree-data.js.map +1 -1
  237. package/lib/module/Tree/use-tree.js +34 -5
  238. package/lib/module/Tree/use-tree.js.map +1 -1
  239. package/lib/module/TreeSelect/TreeSelect.js +72 -32
  240. package/lib/module/TreeSelect/TreeSelect.js.map +1 -1
  241. package/lib/module/Typography/Typography.js +9 -10
  242. package/lib/module/Typography/Typography.js.map +1 -1
  243. package/lib/module/UnstyledButton/UnstyledButton.js +9 -4
  244. package/lib/module/UnstyledButton/UnstyledButton.js.map +1 -1
  245. package/lib/module/VirtualList/VirtualList.js +71 -13
  246. package/lib/module/VirtualList/VirtualList.js.map +1 -1
  247. package/lib/module/floating/platform.js +28 -1
  248. package/lib/module/floating/platform.js.map +1 -1
  249. package/lib/module/floating/use-position.js +33 -1
  250. package/lib/module/floating/use-position.js.map +1 -1
  251. package/lib/module/internal/ControlIconProvider.js +18 -13
  252. package/lib/module/internal/ControlIconProvider.js.map +1 -1
  253. package/lib/module/internal/gradient-shared.js +9 -5
  254. package/lib/module/internal/gradient-shared.js.map +1 -1
  255. package/lib/module/internal/gradient.js +22 -9
  256. package/lib/module/internal/gradient.js.map +1 -1
  257. package/lib/module/internal/gradient.native.js +36 -10
  258. package/lib/module/internal/gradient.native.js.map +1 -1
  259. package/lib/module/internal/render-text-child.js +30 -2
  260. package/lib/module/internal/render-text-child.js.map +1 -1
  261. package/lib/module/internal/style-props.js +16 -4
  262. package/lib/module/internal/style-props.js.map +1 -1
  263. package/lib/module/internal/theme-color-web.js +42 -0
  264. package/lib/module/internal/theme-color-web.js.map +1 -0
  265. package/lib/module/internal/use-icon-color.js +29 -0
  266. package/lib/module/internal/use-icon-color.js.map +1 -0
  267. package/lib/module/internal/use-icon-color.native.js +19 -0
  268. package/lib/module/internal/use-icon-color.native.js.map +1 -0
  269. package/lib/module/internal/use-looping-animation.js +8 -4
  270. package/lib/module/internal/use-looping-animation.js.map +1 -1
  271. package/lib/module/internal/use-looping-animation.native.js +10 -2
  272. package/lib/module/internal/use-looping-animation.native.js.map +1 -1
  273. package/lib/module/internal/use-looping-animation.shared.js +31 -0
  274. package/lib/module/internal/use-looping-animation.shared.js.map +1 -1
  275. package/lib/module/internal/use-slot-text-wrapper.js +37 -5
  276. package/lib/module/internal/use-slot-text-wrapper.js.map +1 -1
  277. package/lib/typescript/Accordion/Accordion.d.ts +11 -11
  278. package/lib/typescript/Accordion/Accordion.d.ts.map +1 -1
  279. package/lib/typescript/ActionIcon/ActionIcon.d.ts +7 -7
  280. package/lib/typescript/ActionIcon/ActionIcon.d.ts.map +1 -1
  281. package/lib/typescript/Alert/Alert.d.ts +7 -7
  282. package/lib/typescript/Alert/Alert.d.ts.map +1 -1
  283. package/lib/typescript/Anchor/Anchor.d.ts +3 -3
  284. package/lib/typescript/AngleSlider/AngleSlider.d.ts.map +1 -1
  285. package/lib/typescript/Autocomplete/Autocomplete.d.ts +16 -42
  286. package/lib/typescript/Autocomplete/Autocomplete.d.ts.map +1 -1
  287. package/lib/typescript/Avatar/Avatar.d.ts +21 -21
  288. package/lib/typescript/Avatar/Avatar.d.ts.map +1 -1
  289. package/lib/typescript/Badge/Badge.d.ts +7 -7
  290. package/lib/typescript/Badge/Badge.d.ts.map +1 -1
  291. package/lib/typescript/Button/Button.d.ts +7 -7
  292. package/lib/typescript/Button/Button.d.ts.map +1 -1
  293. package/lib/typescript/Card/Card.d.ts.map +1 -1
  294. package/lib/typescript/Checkbox/CheckIcon.d.ts.map +1 -1
  295. package/lib/typescript/Checkbox/Checkbox.d.ts.map +1 -1
  296. package/lib/typescript/Chip/Chip.d.ts.map +1 -1
  297. package/lib/typescript/CloseButton/CloseButton.d.ts +7 -7
  298. package/lib/typescript/ColorInput/ColorInput.d.ts.map +1 -1
  299. package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
  300. package/lib/typescript/Combobox/Combobox.d.ts +2 -2
  301. package/lib/typescript/Combobox/Combobox.d.ts.map +1 -1
  302. package/lib/typescript/Combobox/OptionsDropdown.d.ts.map +1 -1
  303. package/lib/typescript/Combobox/index.d.ts +2 -2
  304. package/lib/typescript/Dialog/Dialog.d.ts +6 -6
  305. package/lib/typescript/Fieldset/Fieldset.d.ts +7 -7
  306. package/lib/typescript/FileButton/FileButton.types.d.ts.map +1 -1
  307. package/lib/typescript/Flex/Flex.d.ts +3 -3
  308. package/lib/typescript/Group/Group.d.ts +3 -3
  309. package/lib/typescript/Group/Group.d.ts.map +1 -1
  310. package/lib/typescript/Highlight/Highlight.d.ts.map +1 -1
  311. package/lib/typescript/HoverCard/HoverCard.d.ts +1 -1
  312. package/lib/typescript/HoverCard/HoverCard.d.ts.map +1 -1
  313. package/lib/typescript/Image/Image.d.ts +14 -14
  314. package/lib/typescript/Image/createImage.d.ts +17 -17
  315. package/lib/typescript/Indicator/Indicator.d.ts.map +1 -1
  316. package/lib/typescript/Input/Input.d.ts +13 -13
  317. package/lib/typescript/Input/Input.d.ts.map +1 -1
  318. package/lib/typescript/Input/Input.native.d.ts +16 -16
  319. package/lib/typescript/Input/shared.d.ts +10 -10
  320. package/lib/typescript/Input/shared.d.ts.map +1 -1
  321. package/lib/typescript/InputBase/InputBase.d.ts +2 -2
  322. package/lib/typescript/Kbd/Kbd.d.ts +1 -1
  323. package/lib/typescript/Loader/Loader.d.ts.map +1 -1
  324. package/lib/typescript/Mark/Mark.d.ts +1 -1
  325. package/lib/typescript/MaskInput/MaskInput.d.ts +2 -2
  326. package/lib/typescript/Menu/Menu.d.ts +1 -1
  327. package/lib/typescript/Menu/Menu.d.ts.map +1 -1
  328. package/lib/typescript/Modal/Modal.d.ts +6 -6
  329. package/lib/typescript/MultiSelect/MultiSelect.d.ts +15 -60
  330. package/lib/typescript/MultiSelect/MultiSelect.d.ts.map +1 -1
  331. package/lib/typescript/NavLink/NavLink.d.ts +7 -7
  332. package/lib/typescript/Notification/Notification.d.ts.map +1 -1
  333. package/lib/typescript/NumberFormatter/NumberFormatter.d.ts.map +1 -1
  334. package/lib/typescript/NumberInput/NumberInput.d.ts +5 -5
  335. package/lib/typescript/Paper/Paper.d.ts +8 -40
  336. package/lib/typescript/Paper/Paper.d.ts.map +1 -1
  337. package/lib/typescript/PasswordInput/PasswordInput.d.ts +11 -11
  338. package/lib/typescript/Pill/Pill.d.ts +15 -15
  339. package/lib/typescript/Pill/Pill.d.ts.map +1 -1
  340. package/lib/typescript/PinInput/PinInput.d.ts +13 -13
  341. package/lib/typescript/PinInput/PinInput.d.ts.map +1 -1
  342. package/lib/typescript/Popover/Popover.shared.d.ts +3 -3
  343. package/lib/typescript/Progress/Progress.d.ts.map +1 -1
  344. package/lib/typescript/Radio/Radio.d.ts +8 -8
  345. package/lib/typescript/RollingNumber/RollingNumber.d.ts.map +1 -1
  346. package/lib/typescript/RollingNumber/rolling-number-utils.d.ts.map +1 -1
  347. package/lib/typescript/ScrollArea/ScrollArea.d.ts.map +1 -1
  348. package/lib/typescript/ScrollArea/ScrollArea.native.d.ts.map +1 -1
  349. package/lib/typescript/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  350. package/lib/typescript/Select/Select.d.ts +20 -49
  351. package/lib/typescript/Select/Select.d.ts.map +1 -1
  352. package/lib/typescript/Separator/Separator.d.ts +9 -9
  353. package/lib/typescript/Skeleton/Skeleton.d.ts.map +1 -1
  354. package/lib/typescript/Slider/Slider.d.ts.map +1 -1
  355. package/lib/typescript/Spoiler/Spoiler.d.ts.map +1 -1
  356. package/lib/typescript/Switch/Switch.d.ts +14 -3
  357. package/lib/typescript/Switch/Switch.d.ts.map +1 -1
  358. package/lib/typescript/Table/Table.d.ts +18 -12
  359. package/lib/typescript/Table/Table.d.ts.map +1 -1
  360. package/lib/typescript/TableOfContents/TableOfContents.d.ts.map +1 -1
  361. package/lib/typescript/Tabs/Tabs.d.ts +12 -12
  362. package/lib/typescript/TagsInput/TagsInput.d.ts +13 -47
  363. package/lib/typescript/TagsInput/TagsInput.d.ts.map +1 -1
  364. package/lib/typescript/TextInput/TextInput.d.ts +2 -2
  365. package/lib/typescript/Textarea/Textarea.d.ts +2 -2
  366. package/lib/typescript/ThemeIcon/ThemeIcon.d.ts +7 -7
  367. package/lib/typescript/ThemeIcon/ThemeIcon.d.ts.map +1 -1
  368. package/lib/typescript/Title/Title.d.ts +3 -3
  369. package/lib/typescript/Title/Title.d.ts.map +1 -1
  370. package/lib/typescript/Tooltip/Tooltip.d.ts.map +1 -1
  371. package/lib/typescript/Transition/use-transition.d.ts.map +1 -1
  372. package/lib/typescript/Tree/Tree.d.ts +1 -1
  373. package/lib/typescript/Tree/Tree.d.ts.map +1 -1
  374. package/lib/typescript/Tree/tree-data.d.ts +7 -0
  375. package/lib/typescript/Tree/tree-data.d.ts.map +1 -1
  376. package/lib/typescript/Tree/use-tree.d.ts +5 -0
  377. package/lib/typescript/Tree/use-tree.d.ts.map +1 -1
  378. package/lib/typescript/TreeSelect/TreeSelect.d.ts +21 -47
  379. package/lib/typescript/TreeSelect/TreeSelect.d.ts.map +1 -1
  380. package/lib/typescript/Typography/Typography.d.ts +8 -8
  381. package/lib/typescript/Typography/Typography.d.ts.map +1 -1
  382. package/lib/typescript/UnstyledButton/UnstyledButton.d.ts.map +1 -1
  383. package/lib/typescript/VirtualList/VirtualList.d.ts.map +1 -1
  384. package/lib/typescript/floating/platform.d.ts +11 -0
  385. package/lib/typescript/floating/platform.d.ts.map +1 -1
  386. package/lib/typescript/floating/use-position.d.ts.map +1 -1
  387. package/lib/typescript/internal/ControlIconProvider.d.ts +1 -1
  388. package/lib/typescript/internal/ControlIconProvider.d.ts.map +1 -1
  389. package/lib/typescript/internal/gradient-shared.d.ts +7 -4
  390. package/lib/typescript/internal/gradient-shared.d.ts.map +1 -1
  391. package/lib/typescript/internal/gradient.d.ts +18 -0
  392. package/lib/typescript/internal/gradient.d.ts.map +1 -1
  393. package/lib/typescript/internal/gradient.native.d.ts.map +1 -1
  394. package/lib/typescript/internal/render-text-child.d.ts +11 -0
  395. package/lib/typescript/internal/render-text-child.d.ts.map +1 -1
  396. package/lib/typescript/internal/style-props.d.ts +17 -0
  397. package/lib/typescript/internal/style-props.d.ts.map +1 -1
  398. package/lib/typescript/internal/theme-color-web.d.ts +2 -0
  399. package/lib/typescript/internal/theme-color-web.d.ts.map +1 -0
  400. package/lib/typescript/internal/use-icon-color.d.ts +25 -0
  401. package/lib/typescript/internal/use-icon-color.d.ts.map +1 -0
  402. package/lib/typescript/internal/use-icon-color.native.d.ts +11 -0
  403. package/lib/typescript/internal/use-icon-color.native.d.ts.map +1 -0
  404. package/lib/typescript/internal/use-looping-animation.d.ts.map +1 -1
  405. package/lib/typescript/internal/use-looping-animation.native.d.ts.map +1 -1
  406. package/lib/typescript/internal/use-looping-animation.shared.d.ts +30 -3
  407. package/lib/typescript/internal/use-looping-animation.shared.d.ts.map +1 -1
  408. package/lib/typescript/internal/use-slot-text-wrapper.d.ts +0 -20
  409. package/lib/typescript/internal/use-slot-text-wrapper.d.ts.map +1 -1
  410. package/package.json +13 -13
  411. package/src/Accordion/Accordion.tsx +6 -2
  412. package/src/ActionIcon/ActionIcon.tsx +1 -8
  413. package/src/Alert/Alert.tsx +44 -29
  414. package/src/AngleSlider/AngleSlider.tsx +73 -21
  415. package/src/Autocomplete/Autocomplete.tsx +74 -55
  416. package/src/Avatar/Avatar.tsx +1 -7
  417. package/src/Badge/Badge.tsx +7 -16
  418. package/src/Button/Button.tsx +18 -11
  419. package/src/Card/Card.tsx +11 -3
  420. package/src/Checkbox/CheckIcon.tsx +9 -5
  421. package/src/Checkbox/Checkbox.tsx +8 -1
  422. package/src/Chip/Chip.tsx +15 -22
  423. package/src/CloseButton/CloseButton.tsx +1 -1
  424. package/src/ColorInput/ColorInput.tsx +15 -4
  425. package/src/ColorPicker/ColorPicker.tsx +39 -27
  426. package/src/Combobox/Combobox.tsx +10 -6
  427. package/src/Combobox/OptionsDropdown.tsx +6 -1
  428. package/src/FileButton/FileButton.types.ts +2 -11
  429. package/src/Group/Group.tsx +21 -10
  430. package/src/Highlight/Highlight.tsx +42 -7
  431. package/src/HoverCard/HoverCard.tsx +48 -31
  432. package/src/Indicator/Indicator.tsx +4 -0
  433. package/src/Input/Input.tsx +31 -16
  434. package/src/Input/shared.tsx +20 -4
  435. package/src/Loader/Loader.tsx +14 -4
  436. package/src/Menu/Menu.tsx +6 -8
  437. package/src/MultiSelect/MultiSelect.tsx +140 -85
  438. package/src/Notification/Notification.tsx +43 -22
  439. package/src/NumberFormatter/NumberFormatter.tsx +66 -11
  440. package/src/Paper/Paper.tsx +8 -6
  441. package/src/Pill/Pill.tsx +6 -9
  442. package/src/PinInput/PinInput.tsx +1 -8
  443. package/src/Progress/Progress.tsx +3 -0
  444. package/src/RollingNumber/RollingNumber.tsx +43 -21
  445. package/src/RollingNumber/rolling-number-utils.ts +28 -5
  446. package/src/ScrollArea/ScrollArea.native.tsx +142 -49
  447. package/src/ScrollArea/ScrollArea.tsx +140 -47
  448. package/src/SegmentedControl/SegmentedControl.tsx +12 -1
  449. package/src/Select/Select.tsx +90 -67
  450. package/src/Skeleton/Skeleton.tsx +5 -1
  451. package/src/Slider/Slider.tsx +157 -61
  452. package/src/Spoiler/Spoiler.tsx +22 -10
  453. package/src/Stepper/Stepper.tsx +1 -1
  454. package/src/Switch/Switch.tsx +20 -9
  455. package/src/Table/Table.tsx +89 -33
  456. package/src/TableOfContents/TableOfContents.tsx +5 -1
  457. package/src/TagsInput/TagsInput.tsx +193 -141
  458. package/src/ThemeIcon/ThemeIcon.tsx +1 -8
  459. package/src/Title/Title.tsx +1 -13
  460. package/src/Tooltip/Tooltip.tsx +33 -7
  461. package/src/Transition/use-transition.ts +1 -6
  462. package/src/Tree/Tree.tsx +4 -1
  463. package/src/Tree/tree-data.ts +74 -26
  464. package/src/Tree/use-tree.ts +52 -7
  465. package/src/TreeSelect/TreeSelect.tsx +96 -64
  466. package/src/Typography/Typography.tsx +9 -8
  467. package/src/UnstyledButton/UnstyledButton.tsx +12 -5
  468. package/src/VirtualList/VirtualList.tsx +82 -18
  469. package/src/floating/platform.ts +29 -1
  470. package/src/floating/use-position.tsx +38 -1
  471. package/src/internal/ControlIconProvider.tsx +17 -12
  472. package/src/internal/gradient-shared.ts +9 -5
  473. package/src/internal/gradient.native.tsx +29 -5
  474. package/src/internal/gradient.tsx +22 -7
  475. package/src/internal/render-text-child.tsx +30 -2
  476. package/src/internal/style-props.ts +20 -4
  477. package/src/internal/theme-color-web.ts +40 -0
  478. package/src/internal/use-icon-color.native.ts +17 -0
  479. package/src/internal/use-icon-color.ts +26 -0
  480. package/src/internal/use-looping-animation.native.tsx +10 -2
  481. package/src/internal/use-looping-animation.shared.ts +38 -3
  482. package/src/internal/use-looping-animation.tsx +8 -4
  483. package/src/internal/use-slot-text-wrapper.tsx +39 -5
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Resolve a control's icon colour token to something `react-native-svg` (native)
3
+ * or CSS (web) can paint — WEB implementation (`use-icon-color.native.ts` is the
4
+ * native twin).
5
+ *
6
+ * On web this needs no theme at all: a `$token` maps to its CSS custom property
7
+ * by pure string transform (see `theme-color-web.ts`). That matters a lot here,
8
+ * because `ControlIconProvider` is instantiated once per control SECTION — a
9
+ * Button with a left and a right section mounts two, on top of its own frame, at
10
+ * 16 JSX sites across 11 components. Every one of those used to call `useTheme()`,
11
+ * which means:
12
+ *
13
+ * - a `useThemeWithState` per section (useId + useRef + useReducer + a DEP-LESS
14
+ * `useEffect` that fires after every render — 100 icon sites = 100 effect fires
15
+ * per render pass plus 100 global listener entries), and
16
+ * - on native, `variableToString` reads `variable.val`, which trips Tamagui's
17
+ * theme proxy `track(key)` and makes every icon-bearing control a theme
18
+ * SUBSCRIBER.
19
+ *
20
+ * The subscription is only actually needed on native (where the concrete colour
21
+ * value has to be read out of the active theme); on web the CSS variable tracks
22
+ * the theme by itself.
23
+ */
24
+ export declare const useIconColor: (token: string) => string;
25
+ //# sourceMappingURL=use-icon-color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-icon-color.d.ts","sourceRoot":"","sources":["../../../src/internal/use-icon-color.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAAmC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Resolve a control's icon colour token — NATIVE implementation (overrides the
3
+ * web `use-icon-color.ts`).
4
+ *
5
+ * `react-native-svg` cannot paint `$colorN`, so the concrete value genuinely has
6
+ * to be read out of the active theme, and the component genuinely has to be a
7
+ * theme subscriber so it repaints on a theme change. On web none of that is
8
+ * needed — see the web twin for why that split exists.
9
+ */
10
+ export declare const useIconColor: (token: string) => string;
11
+ //# sourceMappingURL=use-icon-color.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-icon-color.native.d.ts","sourceRoot":"","sources":["../../../src/internal/use-icon-color.native.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAG5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-looping-animation.d.ts","sourceRoot":"","sources":["../../../src/internal/use-looping-animation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,KAAK,UAAU,EAAiB,MAAM,gCAAgC,CAAC;AAEhF,YAAY,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,gCAAgC,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE;QACL,aAAa,EAAE,MAAM,CAAC;QACtB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,uBAAuB,EAAE,MAAM,CAAC;QAChC,uBAAuB,EAAE,UAAU,CAAC;QACpC,kBAAkB,CAAC,EAAE,WAAW,CAAC;QACjC,+EAA+E;QAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,kFAAkF;AAClF,eAAO,MAAM,QAAQ;;6CAAM,CAAC;AAE5B;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,KAAG,CAAc,CAAC;AAoD7F;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAuBjE"}
1
+ {"version":3,"file":"use-looping-animation.d.ts","sourceRoot":"","sources":["../../../src/internal/use-looping-animation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAkB,KAAK,UAAU,EAAiB,MAAM,gCAAgC,CAAC;AAEhG,YAAY,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,gCAAgC,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE;QACL,aAAa,EAAE,MAAM,CAAC;QACtB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,uBAAuB,EAAE,MAAM,CAAC;QAChC,uBAAuB,EAAE,UAAU,CAAC;QACpC,kBAAkB,CAAC,EAAE,WAAW,CAAC;QACjC,+EAA+E;QAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,kFAAkF;AAClF,eAAO,MAAM,QAAQ;;6CAAM,CAAC;AAE5B;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,KAAG,CAAc,CAAC;AAoD7F;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CA2BjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-looping-animation.native.d.ts","sourceRoot":"","sources":["../../../src/internal/use-looping-animation.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAiB,EAIf,gBAAgB,EAIjB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,KAAK,UAAU,EAAiB,MAAM,gCAAgC,CAAC;AAEhF,YAAY,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,gCAAgC,CAAC;AAIxC;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,gLAAgB,CAAC;AAEtC;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,KAAG,CACgB,CAAC;AAE/F,6EAA6E;AAC7E,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;CAC5C;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAgDjE"}
1
+ {"version":3,"file":"use-looping-animation.native.d.ts","sourceRoot":"","sources":["../../../src/internal/use-looping-animation.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAiB,EAIf,gBAAgB,EAIjB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAkB,KAAK,UAAU,EAAiB,MAAM,gCAAgC,CAAC;AAEhG,YAAY,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,gCAAgC,CAAC;AAIxC;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,gLAAgB,CAAC;AAEtC;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,KAAG,CACgB,CAAC;AAE/F,6EAA6E;AAC7E,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;CAC5C;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAwDjE"}
@@ -10,8 +10,24 @@
10
10
  * This is the single source of truth for the motion union + its defaults so the
11
11
  * two implementations can never drift.
12
12
  */
13
+ /**
14
+ * Fields every motion accepts. `enabled` is the perf-critical one: a loop is a
15
+ * PERMANENT animation (a compositor `@keyframes` on web, a `withRepeat` on
16
+ * reanimated's UI thread on native), so an instance whose loop is never rendered
17
+ * must not schedule one. Components declare their hooks unconditionally (stable
18
+ * hook order across variant changes) — e.g. `Loader` declares a spin + three
19
+ * pulses but renders only one of them, `Skeleton`/`Indicator` declare a pulse they
20
+ * only use when `animate`/`processing` — so without this gate every instance paid
21
+ * for up to four forever-running animations that nothing displays. Pass the same
22
+ * condition that decides whether the returned `style` is actually spread.
23
+ * @default true
24
+ */
25
+ export interface LoopMotionBase {
26
+ /** Schedule the loop at all. `false` → a static first frame, no animation. */
27
+ enabled?: boolean;
28
+ }
13
29
  /** A continuous 360° rotation (the `Loader` oval, `Indicator` processing ring). */
14
- export interface SpinMotion {
30
+ export interface SpinMotion extends LoopMotionBase {
15
31
  kind: "spin";
16
32
  /** One full revolution, ms. @default 1000 */
17
33
  durationMs?: number;
@@ -21,7 +37,7 @@ export interface SpinMotion {
21
37
  * (`Skeleton` shimmer-lite, `Indicator` processing dot). Alternates direction so
22
38
  * the loop is seamless without a snap.
23
39
  */
24
- export interface PulseMotion {
40
+ export interface PulseMotion extends LoopMotionBase {
25
41
  kind: "pulse";
26
42
  /** One half-cycle (full→min OR min→full), ms. @default 600 */
27
43
  durationMs?: number;
@@ -34,7 +50,7 @@ export interface PulseMotion {
34
50
  * axis, then snaps back (the repeated copies make the snap invisible). Linear so
35
51
  * the speed is constant.
36
52
  */
37
- export interface ShimmerMotion {
53
+ export interface ShimmerMotion extends LoopMotionBase {
38
54
  kind: "shimmer";
39
55
  /** One full slide of `distance`, ms. @default 1000 */
40
56
  durationMs?: number;
@@ -61,4 +77,15 @@ export type ResolvedMotion = {
61
77
  };
62
78
  /** Apply the documented defaults to a {@link LoopMotion}. */
63
79
  export declare function resolveMotion(motion: LoopMotion): ResolvedMotion;
80
+ /**
81
+ * Whether a resolved motion would actually MOVE anything. A zero-duration loop,
82
+ * or a `shimmer` with no travel, paints an identical frame forever — scheduling it
83
+ * costs a compositor animation (web) / a per-frame UI-thread worklet (native) for
84
+ * no visual result, so both platform files treat it as static. This is why callers
85
+ * can express "not animating right now" as `distance: 0` (`Progress`, `Marquee`
86
+ * before measurement) and pay nothing for it.
87
+ */
88
+ export declare function isMotionInert(motion: ResolvedMotion): boolean;
89
+ /** Whether the loop should be scheduled: explicitly enabled AND visually moving. */
90
+ export declare function isMotionActive(motion: LoopMotion, resolved: ResolvedMotion): boolean;
64
91
  //# sourceMappingURL=use-looping-animation.shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-looping-animation.shared.d.ts","sourceRoot":"","sources":["../../../src/internal/use-looping-animation.shared.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;AAElE,kFAAkF;AAClF,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAAA;CAAE,CAAC;AAE/E,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CAkBhE"}
1
+ {"version":3,"file":"use-looping-animation.shared.d.ts","sourceRoot":"","sources":["../../../src/internal/use-looping-animation.shared.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,mFAAmF;AACnF,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,IAAI,EAAE,SAAS,CAAC;IAChB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;AAElE,kFAAkF;AAClF,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAAA;CAAE,CAAC;AAE/E,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CAkBhE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAG7D;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAEpF"}
@@ -1,24 +1,4 @@
1
1
  import * as React from "react";
2
- /**
3
- * Memoize the text-wrapper component handed to `renderTextChild`.
4
- *
5
- * `renderTextChild(children, Wrapper)` uses `Wrapper` as the element *type*
6
- * (`<Wrapper>{children}</Wrapper>`). If `Wrapper` is a fresh inline component on
7
- * every render, React sees a new type each time and unmounts + remounts the
8
- * wrapped text subtree (state/focus loss, layout thrash). The fix is to keep the
9
- * wrapper's identity stable across renders, only changing it when the bound slot
10
- * props actually change.
11
- *
12
- * Pass the component's own styled text element (`BlockquoteText`,
13
- * `BreadcrumbLabel`, `ButtonText`, …) plus the resolved `styles` slot props (the
14
- * `slotStyles(...).get("...")` value, which is a stable reference while the
15
- * caller's `styles` prop is stable). When there are no slot props the base
16
- * `Component` is returned unwrapped, matching the historical
17
- * `slot ? (p) => <El {...slot} {...p}/> : El` idiom.
18
- *
19
- * (`Tabs` keeps its own `useCallback` wrapper because it also binds dynamic
20
- * `active`/`variant`/`size` props; this hook covers the slot-only sites.)
21
- */
22
2
  export declare function useSlotTextWrapper<P extends {
23
3
  children?: React.ReactNode;
24
4
  }>(Component: React.ComponentType<P>, slotProps: Partial<P> | undefined): React.ComponentType<{
@@ -1 +1 @@
1
- {"version":3,"file":"use-slot-text-wrapper.d.ts","sourceRoot":"","sources":["../../../src/internal/use-slot-text-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,EACzE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,GAChC,KAAK,CAAC,aAAa,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,CAQpD"}
1
+ {"version":3,"file":"use-slot-text-wrapper.d.ts","sourceRoot":"","sources":["../../../src/internal/use-slot-text-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsD/B,wBAAgB,kBAAkB,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,EACzE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,GAChC,KAAK,CAAC,aAAa,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,CAUpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knitui/components",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Cross-platform (React Native + Web) component kit for Knit UI.",
5
5
  "license": "MIT",
6
6
  "author": "The Haus <joost@the.haus>",
@@ -60,10 +60,10 @@
60
60
  ],
61
61
  "sideEffects": false,
62
62
  "dependencies": {
63
- "expo-image": "~57.0.0",
64
- "@knitui/core": "0.4.0",
65
- "@knitui/hooks": "0.4.0",
66
- "@knitui/icons": "0.4.0"
63
+ "expo-image": "~57.0.1",
64
+ "@knitui/core": "0.6.0",
65
+ "@knitui/hooks": "0.6.0",
66
+ "@knitui/icons": "0.6.0"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "react": "*",
@@ -91,26 +91,26 @@
91
91
  "devDependencies": {
92
92
  "@babel/core": "^7.25.0",
93
93
  "@playwright/test": "^1.50.0",
94
- "@storybook/addon-docs": "^10.4.1",
95
- "@storybook/react-vite": "^10.4.1",
96
- "@tamagui/build": "^2.3.0",
94
+ "@storybook/addon-docs": "^10.5.3",
95
+ "@storybook/react-vite": "^10.5.3",
96
+ "@tamagui/build": "^2.4.6",
97
97
  "@testing-library/jest-dom": "^6.6.3",
98
98
  "@testing-library/react": "^16.1.0",
99
99
  "@testing-library/user-event": "^14.5.2",
100
100
  "@types/jest": "^29.5.12",
101
101
  "@types/react": "~19.2.0",
102
- "@vitejs/plugin-react": "^6.0.2",
102
+ "@vitejs/plugin-react": "^6.0.3",
103
103
  "babel-jest": "^29.7.0",
104
- "babel-preset-expo": "^57.0.2",
104
+ "babel-preset-expo": "^57.0.3",
105
105
  "jest": "^29.7.0",
106
106
  "jest-environment-jsdom": "^29.7.0",
107
107
  "react": "19.2.3",
108
108
  "react-dom": "19.2.3",
109
109
  "react-native": "0.86.0",
110
- "react-native-builder-bob": "^0.40.5",
110
+ "react-native-builder-bob": "^0.43.0",
111
111
  "react-native-web": "~0.21.0",
112
- "storybook": "^10.4.1",
113
- "vite": "^8.0.14"
112
+ "storybook": "^10.5.3",
113
+ "vite": "^8.1.5"
114
114
  },
115
115
  "react-native-builder-bob": {
116
116
  "source": "src",
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
 
3
3
  import { DURATIONS, type GetProps, styled, withStaticProperties } from "@knitui/core";
4
4
  import { useId, useKeyboardActions, useUncontrolled } from "@knitui/hooks";
5
- import { IconChevronDown } from "@knitui/icons";
5
+ import { IconChevronDown } from "@knitui/icons/IconChevronDown";
6
6
 
7
7
  import { Box, type BoxProps } from "../Box";
8
8
  import { Collapse } from "../Collapse";
@@ -309,8 +309,12 @@ const AccordionItem = AccordionItemFrame.styleable<AccordionItemProps>(
309
309
  const s = useAccordionSlots();
310
310
  const isActive = ctx.isItemActive(value);
311
311
 
312
+ // Stable identity so item-context consumers (Control/Panel) only re-render
313
+ // when the item's own value/active state actually changes.
314
+ const itemCtx = React.useMemo(() => ({ value, isActive }), [value, isActive]);
315
+
312
316
  return (
313
- <AccordionItemContext.Provider value={{ value, isActive }}>
317
+ <AccordionItemContext.Provider value={itemCtx}>
314
318
  <AccordionItemFrame
315
319
  ref={ref}
316
320
  variant={ctx.variant}
@@ -26,14 +26,7 @@ import { Text } from "../Text";
26
26
 
27
27
  type ActionIconSize = SizeKey;
28
28
  type ActionIconVariant =
29
- | "filled"
30
- | "light"
31
- | "outline"
32
- | "subtle"
33
- | "transparent"
34
- | "white"
35
- | "default"
36
- | "gradient";
29
+ "filled" | "light" | "outline" | "subtle" | "transparent" | "white" | "default" | "gradient";
37
30
 
38
31
  const ActionIconContext = createStyledContext<{
39
32
  size: ActionIconSize;
@@ -23,13 +23,7 @@ import { Text } from "../Text";
23
23
 
24
24
  type AlertSize = SizeKey;
25
25
  type AlertVariant =
26
- | "filled"
27
- | "light"
28
- | "outline"
29
- | "default"
30
- | "transparent"
31
- | "white"
32
- | "gradient";
26
+ "filled" | "light" | "outline" | "default" | "transparent" | "white" | "gradient";
33
27
 
34
28
  const AlertContext = createStyledContext<{ size: AlertSize; variant: AlertVariant }>({
35
29
  size: "md",
@@ -236,17 +230,37 @@ export interface AlertProps extends GetProps<typeof AlertFrame> {
236
230
  }
237
231
 
238
232
  /**
239
- * Pure-text body (`string`/`number`, including inline runs) renders as a single
240
- * themed `AlertMessage`. The moment an element is present — mixed or not — we use
241
- * the `AlertContent` Box instead so rich content isn't trapped inside a `<Text>`.
233
+ * How the body children render: nothing at all, a single themed `AlertMessage`
234
+ * (pure text — `string`/`number`, including inline runs), or the `AlertContent`
235
+ * Box. The moment an element is present — mixed or not — we use the Box so rich
236
+ * content isn't trapped inside a `<Text>`.
242
237
  */
243
- function isTextOnly(children: React.ReactNode): boolean {
244
- const array = React.Children.toArray(children);
245
- return array.length > 0 && array.every((c) => typeof c === "string" || typeof c === "number");
246
- }
238
+ type AlertBodyKind = "empty" | "text" | "rich";
247
239
 
248
- function hasRenderableChild(children: React.ReactNode): boolean {
249
- return React.Children.toArray(children).length > 0;
240
+ /**
241
+ * ## Cost
242
+ *
243
+ * This replaces a `hasRenderableChild(children)` + `isTextOnly(children)` pair
244
+ * that BOTH called `React.Children.toArray` — which flattens *and clones every
245
+ * element child* — so the same work happened twice per render, and a toast-style
246
+ * stack renders N of these. One pass now, and the single-child shapes are answered
247
+ * before `toArray` is reached at all (same fast-path ladder as `renderTextChild`).
248
+ * Classification is unchanged: `toArray` drops `null`/`undefined`/booleans, and
249
+ * does NOT flatten a Fragment (which therefore counts as one element → "rich").
250
+ */
251
+ function classifyBody(children: React.ReactNode): AlertBodyKind {
252
+ const type = typeof children;
253
+ if (type === "string" || type === "number") return "text";
254
+ if (children == null || type === "boolean") return "empty";
255
+ if (React.isValidElement(children)) return "rich";
256
+
257
+ const array = React.Children.toArray(children);
258
+ if (array.length === 0) return "empty";
259
+ for (let i = 0; i < array.length; i++) {
260
+ const child = array[i];
261
+ if (typeof child !== "string" && typeof child !== "number") return "rich";
262
+ }
263
+ return "text";
250
264
  }
251
265
 
252
266
  function getCloseButtonSize(size: AlertSize): AlertSize {
@@ -291,19 +305,20 @@ const AlertComponent = AlertFrame.styleable<AlertProps>(function Alert(props, re
291
305
 
292
306
  const rootId = useId(typeof id === "string" ? id : undefined);
293
307
  const titleId = title ? `${rootId}-title` : undefined;
294
- const hasBody = hasRenderableChild(children);
295
- const bodyId = hasBody ? `${rootId}-body` : undefined;
296
- const bodyContent = hasBody ? (
297
- isTextOnly(children) ? (
298
- <AlertMessage id={bodyId} {...s.get("message")}>
299
- {children}
300
- </AlertMessage>
301
- ) : (
302
- <AlertContent id={bodyId} {...s.get("content")}>
303
- {renderTextChild(children, AlertMessage)}
304
- </AlertContent>
305
- )
306
- ) : null;
308
+ const bodyKind = classifyBody(children);
309
+ const bodyId = bodyKind !== "empty" ? `${rootId}-body` : undefined;
310
+ const bodyContent =
311
+ bodyKind !== "empty" ? (
312
+ bodyKind === "text" ? (
313
+ <AlertMessage id={bodyId} {...s.get("message")}>
314
+ {children}
315
+ </AlertMessage>
316
+ ) : (
317
+ <AlertContent id={bodyId} {...s.get("content")}>
318
+ {renderTextChild(children, AlertMessage)}
319
+ </AlertContent>
320
+ )
321
+ ) : null;
307
322
 
308
323
  // Pick a close-button variant whose glyph contrasts the panel fill: on a
309
324
  // `filled` ($color9) panel the close button matches it ($color1 glyph); on a
@@ -191,6 +191,68 @@ const ANGLE_SLIDER_SLOT_KEYS = [
191
191
  "markLabel",
192
192
  ] as const satisfies readonly (keyof AngleSliderStyles)[];
193
193
 
194
+ /* -------------------------------------------------------------------------- */
195
+ /* Marks — memoized subtree */
196
+ /* -------------------------------------------------------------------------- */
197
+
198
+ interface AngleSliderMarksLayerProps {
199
+ marks: AngleSliderMark[];
200
+ /** `top` of each tick, derived from the resolved thumb size. */
201
+ tickTop: number;
202
+ /** `height` of each tick, derived from the resolved thumb size. */
203
+ tickHeight: number;
204
+ /** `top` of each mark label (negative — it sits outside the ring). */
205
+ labelOffset: number;
206
+ /** `minWidth` of each mark label. */
207
+ labelMinWidth: number;
208
+ marksProps?: Partial<GetProps<typeof AngleSliderMarks>>;
209
+ markProps?: Partial<GetProps<typeof AngleSliderMark>>;
210
+ markTickProps?: Partial<GetProps<typeof AngleSliderMarkTick>>;
211
+ markLabelProps?: Partial<GetProps<typeof AngleSliderMarkLabel>>;
212
+ }
213
+
214
+ /**
215
+ * The ring's marks layer, extracted and memoized.
216
+ *
217
+ * Dragging calls `setValue` on every pointermove, and the marks used to be mapped
218
+ * inline in the render body — so every frame rebuilt 2–3 Tamagui frames per mark
219
+ * even though NOTHING about a mark depends on the current angle (unlike `Slider`,
220
+ * there is no `filled` variant here). With the split, a drag frame re-renders only
221
+ * the thumb + centre label; the marks are skipped entirely by `React.memo` as long
222
+ * as `marks` and the geometry props are referentially stable.
223
+ */
224
+ const AngleSliderMarksLayer = React.memo(function AngleSliderMarksLayer({
225
+ marks,
226
+ tickTop,
227
+ tickHeight,
228
+ labelOffset,
229
+ labelMinWidth,
230
+ marksProps,
231
+ markProps,
232
+ markTickProps,
233
+ markLabelProps,
234
+ }: AngleSliderMarksLayerProps) {
235
+ return (
236
+ <AngleSliderMarks {...marksProps}>
237
+ {marks.map((mark, index) => (
238
+ <AngleSliderMark key={index} {...markProps} rotate={`${mark.value}deg`}>
239
+ <AngleSliderMarkTick top={tickTop} height={tickHeight} {...markTickProps} />
240
+ {mark.label != null ? (
241
+ <AngleSliderMarkLabel
242
+ top={labelOffset}
243
+ minWidth={labelMinWidth}
244
+ rotate={`${360 - mark.value}deg`}
245
+ {...markLabelProps}
246
+ >
247
+ {mark.label}
248
+ </AngleSliderMarkLabel>
249
+ ) : null}
250
+ </AngleSliderMark>
251
+ ))}
252
+ </AngleSliderMarks>
253
+ );
254
+ });
255
+
194
256
  /* -------------------------------------------------------------------------- */
195
257
  /* AngleSlider */
196
258
  /* -------------------------------------------------------------------------- */
@@ -363,27 +425,17 @@ const AngleSliderComponent = AngleSliderRoot.styleable<AngleSliderProps>(
363
425
  {...rest}
364
426
  >
365
427
  {marks && marks.length > 0 ? (
366
- <AngleSliderMarks {...s.get("marks")}>
367
- {marks.map((mark, index) => (
368
- <AngleSliderMark key={index} {...s.get("mark")} rotate={`${mark.value}deg`}>
369
- <AngleSliderMarkTick
370
- top={resolvedThumbSize / 3}
371
- height={resolvedThumbSize / 1.5}
372
- {...s.get("markTick")}
373
- />
374
- {mark.label != null ? (
375
- <AngleSliderMarkLabel
376
- top={markLabelOffset}
377
- minWidth={markLabelMinWidth}
378
- rotate={`${360 - mark.value}deg`}
379
- {...s.get("markLabel")}
380
- >
381
- {mark.label}
382
- </AngleSliderMarkLabel>
383
- ) : null}
384
- </AngleSliderMark>
385
- ))}
386
- </AngleSliderMarks>
428
+ <AngleSliderMarksLayer
429
+ marks={marks}
430
+ tickTop={resolvedThumbSize / 3}
431
+ tickHeight={resolvedThumbSize / 1.5}
432
+ labelOffset={markLabelOffset}
433
+ labelMinWidth={markLabelMinWidth}
434
+ marksProps={s.get("marks")}
435
+ markProps={s.get("mark")}
436
+ markTickProps={s.get("markTick")}
437
+ markLabelProps={s.get("markLabel")}
438
+ />
387
439
  ) : null}
388
440
 
389
441
  {labelNode != null ? (