@knitui/components 0.13.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 (963) 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.js +197 -22
  85. package/lib/commonjs/Image/Image.js.map +1 -1
  86. package/lib/commonjs/Image/Image.native.js +41 -0
  87. package/lib/commonjs/Image/Image.native.js.map +1 -0
  88. package/lib/commonjs/Image/createImage.js +92 -59
  89. package/lib/commonjs/Image/createImage.js.map +1 -1
  90. package/lib/commonjs/Indicator/Indicator.js +36 -29
  91. package/lib/commonjs/Indicator/Indicator.js.map +1 -1
  92. package/lib/commonjs/Input/Input.js +87 -119
  93. package/lib/commonjs/Input/Input.js.map +1 -1
  94. package/lib/commonjs/Input/Input.native.js +40 -30
  95. package/lib/commonjs/Input/Input.native.js.map +1 -1
  96. package/lib/commonjs/Input/shared.js +148 -225
  97. package/lib/commonjs/Input/shared.js.map +1 -1
  98. package/lib/commonjs/InputBase/InputBase.js +2 -1
  99. package/lib/commonjs/InputBase/InputBase.js.map +1 -1
  100. package/lib/commonjs/Kbd/Kbd.js +12 -18
  101. package/lib/commonjs/Kbd/Kbd.js.map +1 -1
  102. package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
  103. package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
  104. package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
  105. package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
  106. package/lib/commonjs/List/List.js +10 -10
  107. package/lib/commonjs/List/List.js.map +1 -1
  108. package/lib/commonjs/Loader/Loader.js +31 -37
  109. package/lib/commonjs/Loader/Loader.js.map +1 -1
  110. package/lib/commonjs/LoadingOverlay/LoadingOverlay.js +2 -1
  111. package/lib/commonjs/LoadingOverlay/LoadingOverlay.js.map +1 -1
  112. package/lib/commonjs/Mark/Mark.js +12 -15
  113. package/lib/commonjs/Mark/Mark.js.map +1 -1
  114. package/lib/commonjs/Marquee/Marquee.js +66 -48
  115. package/lib/commonjs/Marquee/Marquee.js.map +1 -1
  116. package/lib/commonjs/MaskInput/MaskInput.js +2 -1
  117. package/lib/commonjs/MaskInput/MaskInput.js.map +1 -1
  118. package/lib/commonjs/Menu/Menu.js +84 -48
  119. package/lib/commonjs/Menu/Menu.js.map +1 -1
  120. package/lib/commonjs/Modal/Modal.js +34 -30
  121. package/lib/commonjs/Modal/Modal.js.map +1 -1
  122. package/lib/commonjs/Modal/drag/DragDismissHost.web.js +10 -6
  123. package/lib/commonjs/Modal/drag/DragDismissHost.web.js.map +1 -1
  124. package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js +6 -8
  125. package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js.map +1 -1
  126. package/lib/commonjs/Modal/drag/index.js.map +1 -1
  127. package/lib/commonjs/Modal/modal-base-inner.js +1 -1
  128. package/lib/commonjs/Modal/modal-base-inner.js.map +1 -1
  129. package/lib/commonjs/Modal/modal-base-inner.native.js +3 -2
  130. package/lib/commonjs/Modal/modal-base-inner.native.js.map +1 -1
  131. package/lib/commonjs/Modal/modal-base.js +22 -9
  132. package/lib/commonjs/Modal/modal-base.js.map +1 -1
  133. package/lib/commonjs/MultiSelect/MultiSelect.js +6 -2
  134. package/lib/commonjs/MultiSelect/MultiSelect.js.map +1 -1
  135. package/lib/commonjs/NativeSelect/NativeSelect.js +25 -30
  136. package/lib/commonjs/NativeSelect/NativeSelect.js.map +1 -1
  137. package/lib/commonjs/NavLink/NavLink.js +63 -58
  138. package/lib/commonjs/NavLink/NavLink.js.map +1 -1
  139. package/lib/commonjs/Notification/Notification.js +28 -28
  140. package/lib/commonjs/Notification/Notification.js.map +1 -1
  141. package/lib/commonjs/NumberFormatter/NumberFormatter.js +2 -2
  142. package/lib/commonjs/NumberFormatter/NumberFormatter.js.map +1 -1
  143. package/lib/commonjs/NumberInput/NumberInput.js +46 -43
  144. package/lib/commonjs/NumberInput/NumberInput.js.map +1 -1
  145. package/lib/commonjs/Overlay/Overlay.js +18 -11
  146. package/lib/commonjs/Overlay/Overlay.js.map +1 -1
  147. package/lib/commonjs/Pagination/Pagination.js +125 -120
  148. package/lib/commonjs/Pagination/Pagination.js.map +1 -1
  149. package/lib/commonjs/Paper/Paper.js +7 -8
  150. package/lib/commonjs/Paper/Paper.js.map +1 -1
  151. package/lib/commonjs/Paragraph/Paragraph.js +7 -10
  152. package/lib/commonjs/Paragraph/Paragraph.js.map +1 -1
  153. package/lib/commonjs/PasswordInput/PasswordInput.js +3 -3
  154. package/lib/commonjs/PasswordInput/PasswordInput.js.map +1 -1
  155. package/lib/commonjs/Pill/Pill.js +39 -33
  156. package/lib/commonjs/Pill/Pill.js.map +1 -1
  157. package/lib/commonjs/PillsInput/PillsInput.js +58 -31
  158. package/lib/commonjs/PillsInput/PillsInput.js.map +1 -1
  159. package/lib/commonjs/PinInput/PinInput.js +26 -20
  160. package/lib/commonjs/PinInput/PinInput.js.map +1 -1
  161. package/lib/commonjs/Popover/Popover.native.js +6 -2
  162. package/lib/commonjs/Popover/Popover.native.js.map +1 -1
  163. package/lib/commonjs/Popover/Popover.shared.js +33 -22
  164. package/lib/commonjs/Popover/Popover.shared.js.map +1 -1
  165. package/lib/commonjs/Progress/Progress.js +37 -26
  166. package/lib/commonjs/Progress/Progress.js.map +1 -1
  167. package/lib/commonjs/Radio/Radio.js +81 -93
  168. package/lib/commonjs/Radio/Radio.js.map +1 -1
  169. package/lib/commonjs/Radio/RadioIcon.js +4 -6
  170. package/lib/commonjs/Radio/RadioIcon.js.map +1 -1
  171. package/lib/commonjs/Rating/Rating.js +48 -38
  172. package/lib/commonjs/Rating/Rating.js.map +1 -1
  173. package/lib/commonjs/RollingNumber/RollingNumber.js +48 -24
  174. package/lib/commonjs/RollingNumber/RollingNumber.js.map +1 -1
  175. package/lib/commonjs/ScrollArea/ScrollArea.js +40 -37
  176. package/lib/commonjs/ScrollArea/ScrollArea.js.map +1 -1
  177. package/lib/commonjs/ScrollArea/ScrollArea.native.js +21 -26
  178. package/lib/commonjs/ScrollArea/ScrollArea.native.js.map +1 -1
  179. package/lib/commonjs/SegmentedControl/SegmentedControl.js +106 -55
  180. package/lib/commonjs/SegmentedControl/SegmentedControl.js.map +1 -1
  181. package/lib/commonjs/Select/Select.js +7 -3
  182. package/lib/commonjs/Select/Select.js.map +1 -1
  183. package/lib/commonjs/Separator/Separator.js +47 -39
  184. package/lib/commonjs/Separator/Separator.js.map +1 -1
  185. package/lib/commonjs/SimpleGrid/SimpleGrid.js +12 -14
  186. package/lib/commonjs/SimpleGrid/SimpleGrid.js.map +1 -1
  187. package/lib/commonjs/Skeleton/Skeleton.js +39 -24
  188. package/lib/commonjs/Skeleton/Skeleton.js.map +1 -1
  189. package/lib/commonjs/Slider/Slider.js +308 -257
  190. package/lib/commonjs/Slider/Slider.js.map +1 -1
  191. package/lib/commonjs/Spacer/Spacer.js +15 -29
  192. package/lib/commonjs/Spacer/Spacer.js.map +1 -1
  193. package/lib/commonjs/Spoiler/Spoiler.js +16 -16
  194. package/lib/commonjs/Spoiler/Spoiler.js.map +1 -1
  195. package/lib/commonjs/Stack/Stack.js +3 -3
  196. package/lib/commonjs/Stack/Stack.js.map +1 -1
  197. package/lib/commonjs/Stepper/Stepper.js +96 -71
  198. package/lib/commonjs/Stepper/Stepper.js.map +1 -1
  199. package/lib/commonjs/Switch/Switch.js +71 -67
  200. package/lib/commonjs/Switch/Switch.js.map +1 -1
  201. package/lib/commonjs/Table/Table.js +96 -82
  202. package/lib/commonjs/Table/Table.js.map +1 -1
  203. package/lib/commonjs/TableOfContents/TableOfContents.js +94 -95
  204. package/lib/commonjs/TableOfContents/TableOfContents.js.map +1 -1
  205. package/lib/commonjs/Tabs/Tabs.js +71 -73
  206. package/lib/commonjs/Tabs/Tabs.js.map +1 -1
  207. package/lib/commonjs/TagsInput/TagsInput.js +19 -3
  208. package/lib/commonjs/TagsInput/TagsInput.js.map +1 -1
  209. package/lib/commonjs/Text/Text.js +29 -14
  210. package/lib/commonjs/Text/Text.js.map +1 -1
  211. package/lib/commonjs/TextInput/TextInput.js +2 -1
  212. package/lib/commonjs/TextInput/TextInput.js.map +1 -1
  213. package/lib/commonjs/Textarea/Textarea.js +1 -1
  214. package/lib/commonjs/Textarea/Textarea.js.map +1 -1
  215. package/lib/commonjs/ThemeIcon/ThemeIcon.js +9 -5
  216. package/lib/commonjs/ThemeIcon/ThemeIcon.js.map +1 -1
  217. package/lib/commonjs/Title/Title.js +49 -32
  218. package/lib/commonjs/Title/Title.js.map +1 -1
  219. package/lib/commonjs/Tooltip/Tooltip.js +43 -27
  220. package/lib/commonjs/Tooltip/Tooltip.js.map +1 -1
  221. package/lib/commonjs/Transition/Transition.native.js +11 -10
  222. package/lib/commonjs/Transition/Transition.native.js.map +1 -1
  223. package/lib/commonjs/Transition/use-overlay-transition.native.js +2 -5
  224. package/lib/commonjs/Transition/use-overlay-transition.native.js.map +1 -1
  225. package/lib/commonjs/Tree/Tree.js +30 -34
  226. package/lib/commonjs/Tree/Tree.js.map +1 -1
  227. package/lib/commonjs/TreeSelect/TreeSelect.js +50 -26
  228. package/lib/commonjs/TreeSelect/TreeSelect.js.map +1 -1
  229. package/lib/commonjs/Typography/Typography.js +5 -7
  230. package/lib/commonjs/Typography/Typography.js.map +1 -1
  231. package/lib/commonjs/UnstyledButton/UnstyledButton.js +4 -4
  232. package/lib/commonjs/UnstyledButton/UnstyledButton.js.map +1 -1
  233. package/lib/commonjs/VirtualList/VirtualList.js +23 -7
  234. package/lib/commonjs/VirtualList/VirtualList.js.map +1 -1
  235. package/lib/commonjs/VisuallyHidden/VisuallyHidden.js +7 -10
  236. package/lib/commonjs/VisuallyHidden/VisuallyHidden.js.map +1 -1
  237. package/lib/commonjs/control-system.js +7 -0
  238. package/lib/commonjs/control-system.js.map +1 -1
  239. package/lib/commonjs/index.js +6 -0
  240. package/lib/commonjs/index.js.map +1 -1
  241. package/lib/commonjs/internal/ControlIconProvider.js +1 -1
  242. package/lib/commonjs/internal/ControlIconProvider.js.map +1 -1
  243. package/lib/commonjs/internal/InlineControl.js +24 -29
  244. package/lib/commonjs/internal/InlineControl.js.map +1 -1
  245. package/lib/commonjs/internal/collapse-box.js +12 -10
  246. package/lib/commonjs/internal/collapse-box.js.map +1 -1
  247. package/lib/commonjs/internal/control-icon-size.js +5 -8
  248. package/lib/commonjs/internal/control-icon-size.js.map +1 -1
  249. package/lib/commonjs/internal/control-metrics.js +51 -51
  250. package/lib/commonjs/internal/control-metrics.js.map +1 -1
  251. package/lib/commonjs/internal/floating-arrow.js +43 -29
  252. package/lib/commonjs/internal/floating-arrow.js.map +1 -1
  253. package/lib/commonjs/internal/focus-ring.js +99 -0
  254. package/lib/commonjs/internal/focus-ring.js.map +1 -0
  255. package/lib/commonjs/internal/gradient-shared.js +7 -7
  256. package/lib/commonjs/internal/gradient-shared.js.map +1 -1
  257. package/lib/commonjs/internal/gradient.native.js +1 -1
  258. package/lib/commonjs/internal/motion.js +247 -359
  259. package/lib/commonjs/internal/motion.js.map +1 -1
  260. package/lib/commonjs/internal/resolve-theme-color.js +10 -10
  261. package/lib/commonjs/internal/resolve-theme-color.js.map +1 -1
  262. package/lib/commonjs/internal/style-props.js +510 -464
  263. package/lib/commonjs/internal/style-props.js.map +1 -1
  264. package/lib/commonjs/internal/theme-color-web.js +44 -26
  265. package/lib/commonjs/internal/theme-color-web.js.map +1 -1
  266. package/lib/commonjs/internal/use-icon-color.js +1 -1
  267. package/lib/commonjs/internal/use-icon-color.native.js +1 -1
  268. package/lib/commonjs/internal/use-slot-text-wrapper.js +1 -1
  269. package/lib/commonjs/internal/variant-colors.js +163 -229
  270. package/lib/commonjs/internal/variant-colors.js.map +1 -1
  271. package/lib/module/Accordion/Accordion.js +80 -98
  272. package/lib/module/Accordion/Accordion.js.map +1 -1
  273. package/lib/module/ActionIcon/ActionIcon.js +128 -62
  274. package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
  275. package/lib/module/Affix/Affix.js +17 -21
  276. package/lib/module/Affix/Affix.js.map +1 -1
  277. package/lib/module/Alert/Alert.js +54 -54
  278. package/lib/module/Alert/Alert.js.map +1 -1
  279. package/lib/module/Anchor/Anchor.js +13 -16
  280. package/lib/module/Anchor/Anchor.js.map +1 -1
  281. package/lib/module/AngleSlider/AngleSlider.js +66 -38
  282. package/lib/module/AngleSlider/AngleSlider.js.map +1 -1
  283. package/lib/module/AspectRatio/AspectRatio.js +10 -14
  284. package/lib/module/AspectRatio/AspectRatio.js.map +1 -1
  285. package/lib/module/Autocomplete/Autocomplete.js +8 -4
  286. package/lib/module/Autocomplete/Autocomplete.js.map +1 -1
  287. package/lib/module/Avatar/Avatar.js +29 -26
  288. package/lib/module/Avatar/Avatar.js.map +1 -1
  289. package/lib/module/BackgroundImage/BackgroundImage.js +16 -7
  290. package/lib/module/BackgroundImage/BackgroundImage.js.map +1 -1
  291. package/lib/module/Badge/Badge.js +61 -50
  292. package/lib/module/Badge/Badge.js.map +1 -1
  293. package/lib/module/Blockquote/Blockquote.js +82 -81
  294. package/lib/module/Blockquote/Blockquote.js.map +1 -1
  295. package/lib/module/Box/Box.js +2 -2
  296. package/lib/module/Box/Box.js.map +1 -1
  297. package/lib/module/Breadcrumbs/Breadcrumbs.js +10 -10
  298. package/lib/module/Breadcrumbs/Breadcrumbs.js.map +1 -1
  299. package/lib/module/Burger/Burger.js +32 -21
  300. package/lib/module/Burger/Burger.js.map +1 -1
  301. package/lib/module/Button/Button.js +105 -63
  302. package/lib/module/Button/Button.js.map +1 -1
  303. package/lib/module/Card/Card.js +51 -39
  304. package/lib/module/Card/Card.js.map +1 -1
  305. package/lib/module/Center/Center.js +3 -3
  306. package/lib/module/Center/Center.js.map +1 -1
  307. package/lib/module/Checkbox/CheckIcon.js +5 -4
  308. package/lib/module/Checkbox/CheckIcon.js.map +1 -1
  309. package/lib/module/Checkbox/Checkbox.js +100 -70
  310. package/lib/module/Checkbox/Checkbox.js.map +1 -1
  311. package/lib/module/Chip/Chip.js +35 -68
  312. package/lib/module/Chip/Chip.js.map +1 -1
  313. package/lib/module/CloseButton/CloseButton.js +12 -5
  314. package/lib/module/CloseButton/CloseButton.js.map +1 -1
  315. package/lib/module/Code/Code.js +15 -11
  316. package/lib/module/Code/Code.js.map +1 -1
  317. package/lib/module/Collapse/Collapse.js +11 -5
  318. package/lib/module/Collapse/Collapse.js.map +1 -1
  319. package/lib/module/ColorInput/ColorInput.js +26 -21
  320. package/lib/module/ColorInput/ColorInput.js.map +1 -1
  321. package/lib/module/ColorPicker/ColorPicker.js +96 -84
  322. package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
  323. package/lib/module/ColorSwatch/ColorSwatch.js +13 -15
  324. package/lib/module/ColorSwatch/ColorSwatch.js.map +1 -1
  325. package/lib/module/Combobox/Combobox.js +194 -188
  326. package/lib/module/Combobox/Combobox.js.map +1 -1
  327. package/lib/module/Combobox/OptionsDropdown.js +13 -7
  328. package/lib/module/Combobox/OptionsDropdown.js.map +1 -1
  329. package/lib/module/Combobox/index.js +1 -1
  330. package/lib/module/Combobox/index.js.map +1 -1
  331. package/lib/module/Container/Container.js +12 -19
  332. package/lib/module/Container/Container.js.map +1 -1
  333. package/lib/module/Dialog/Dialog.js +16 -15
  334. package/lib/module/Dialog/Dialog.js.map +1 -1
  335. package/lib/module/Drawer/Drawer.js +53 -34
  336. package/lib/module/Drawer/Drawer.js.map +1 -1
  337. package/lib/module/Fieldset/Fieldset.js +27 -19
  338. package/lib/module/Fieldset/Fieldset.js.map +1 -1
  339. package/lib/module/FileButton/FileButton.js +5 -3
  340. package/lib/module/FileButton/FileButton.js.map +1 -1
  341. package/lib/module/Flex/Flex.js +24 -28
  342. package/lib/module/Flex/Flex.js.map +1 -1
  343. package/lib/module/FocusTrap/FocusTrap.js +4 -3
  344. package/lib/module/FocusTrap/FocusTrap.js.map +1 -1
  345. package/lib/module/Grid/Grid.js +22 -19
  346. package/lib/module/Grid/Grid.js.map +1 -1
  347. package/lib/module/Group/Group.js +4 -4
  348. package/lib/module/Group/Group.js.map +1 -1
  349. package/lib/module/Highlight/Highlight.js +2 -1
  350. package/lib/module/Highlight/Highlight.js.map +1 -1
  351. package/lib/module/HoverCard/HoverCard.js +8 -25
  352. package/lib/module/HoverCard/HoverCard.js.map +1 -1
  353. package/lib/module/Image/Image.js +195 -23
  354. package/lib/module/Image/Image.js.map +1 -1
  355. package/lib/module/Image/Image.native.js +38 -0
  356. package/lib/module/Image/Image.native.js.map +1 -0
  357. package/lib/module/Image/createImage.js +92 -59
  358. package/lib/module/Image/createImage.js.map +1 -1
  359. package/lib/module/Indicator/Indicator.js +37 -30
  360. package/lib/module/Indicator/Indicator.js.map +1 -1
  361. package/lib/module/Input/Input.js +89 -121
  362. package/lib/module/Input/Input.js.map +1 -1
  363. package/lib/module/Input/Input.native.js +42 -32
  364. package/lib/module/Input/Input.native.js.map +1 -1
  365. package/lib/module/Input/shared.js +148 -225
  366. package/lib/module/Input/shared.js.map +1 -1
  367. package/lib/module/InputBase/InputBase.js +2 -1
  368. package/lib/module/InputBase/InputBase.js.map +1 -1
  369. package/lib/module/Kbd/Kbd.js +12 -18
  370. package/lib/module/Kbd/Kbd.js.map +1 -1
  371. package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
  372. package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
  373. package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
  374. package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
  375. package/lib/module/List/List.js +11 -11
  376. package/lib/module/List/List.js.map +1 -1
  377. package/lib/module/Loader/Loader.js +33 -39
  378. package/lib/module/Loader/Loader.js.map +1 -1
  379. package/lib/module/LoadingOverlay/LoadingOverlay.js +2 -1
  380. package/lib/module/LoadingOverlay/LoadingOverlay.js.map +1 -1
  381. package/lib/module/Mark/Mark.js +11 -15
  382. package/lib/module/Mark/Mark.js.map +1 -1
  383. package/lib/module/Marquee/Marquee.js +66 -48
  384. package/lib/module/Marquee/Marquee.js.map +1 -1
  385. package/lib/module/MaskInput/MaskInput.js +2 -1
  386. package/lib/module/MaskInput/MaskInput.js.map +1 -1
  387. package/lib/module/Menu/Menu.js +86 -50
  388. package/lib/module/Menu/Menu.js.map +1 -1
  389. package/lib/module/Modal/Modal.js +35 -31
  390. package/lib/module/Modal/Modal.js.map +1 -1
  391. package/lib/module/Modal/drag/DragDismissHost.web.js +10 -6
  392. package/lib/module/Modal/drag/DragDismissHost.web.js.map +1 -1
  393. package/lib/module/Modal/drag/DragDismissOverlay.web.js +6 -8
  394. package/lib/module/Modal/drag/DragDismissOverlay.web.js.map +1 -1
  395. package/lib/module/Modal/drag/index.js +1 -1
  396. package/lib/module/Modal/drag/index.js.map +1 -1
  397. package/lib/module/Modal/modal-base-inner.js +1 -1
  398. package/lib/module/Modal/modal-base-inner.js.map +1 -1
  399. package/lib/module/Modal/modal-base-inner.native.js +3 -2
  400. package/lib/module/Modal/modal-base-inner.native.js.map +1 -1
  401. package/lib/module/Modal/modal-base.js +22 -9
  402. package/lib/module/Modal/modal-base.js.map +1 -1
  403. package/lib/module/MultiSelect/MultiSelect.js +7 -3
  404. package/lib/module/MultiSelect/MultiSelect.js.map +1 -1
  405. package/lib/module/NativeSelect/NativeSelect.js +26 -31
  406. package/lib/module/NativeSelect/NativeSelect.js.map +1 -1
  407. package/lib/module/NavLink/NavLink.js +64 -59
  408. package/lib/module/NavLink/NavLink.js.map +1 -1
  409. package/lib/module/Notification/Notification.js +29 -29
  410. package/lib/module/Notification/Notification.js.map +1 -1
  411. package/lib/module/NumberFormatter/NumberFormatter.js +3 -3
  412. package/lib/module/NumberFormatter/NumberFormatter.js.map +1 -1
  413. package/lib/module/NumberInput/NumberInput.js +49 -46
  414. package/lib/module/NumberInput/NumberInput.js.map +1 -1
  415. package/lib/module/Overlay/Overlay.js +19 -12
  416. package/lib/module/Overlay/Overlay.js.map +1 -1
  417. package/lib/module/Pagination/Pagination.js +127 -122
  418. package/lib/module/Pagination/Pagination.js.map +1 -1
  419. package/lib/module/Paper/Paper.js +8 -9
  420. package/lib/module/Paper/Paper.js.map +1 -1
  421. package/lib/module/Paragraph/Paragraph.js +6 -10
  422. package/lib/module/Paragraph/Paragraph.js.map +1 -1
  423. package/lib/module/PasswordInput/PasswordInput.js +4 -4
  424. package/lib/module/PasswordInput/PasswordInput.js.map +1 -1
  425. package/lib/module/Pill/Pill.js +40 -34
  426. package/lib/module/Pill/Pill.js.map +1 -1
  427. package/lib/module/PillsInput/PillsInput.js +59 -32
  428. package/lib/module/PillsInput/PillsInput.js.map +1 -1
  429. package/lib/module/PinInput/PinInput.js +27 -21
  430. package/lib/module/PinInput/PinInput.js.map +1 -1
  431. package/lib/module/Popover/Popover.native.js +6 -2
  432. package/lib/module/Popover/Popover.native.js.map +1 -1
  433. package/lib/module/Popover/Popover.shared.js +34 -23
  434. package/lib/module/Popover/Popover.shared.js.map +1 -1
  435. package/lib/module/Progress/Progress.js +39 -28
  436. package/lib/module/Progress/Progress.js.map +1 -1
  437. package/lib/module/Radio/Radio.js +83 -95
  438. package/lib/module/Radio/Radio.js.map +1 -1
  439. package/lib/module/Radio/RadioIcon.js +4 -6
  440. package/lib/module/Radio/RadioIcon.js.map +1 -1
  441. package/lib/module/Rating/Rating.js +50 -40
  442. package/lib/module/Rating/Rating.js.map +1 -1
  443. package/lib/module/RollingNumber/RollingNumber.js +49 -25
  444. package/lib/module/RollingNumber/RollingNumber.js.map +1 -1
  445. package/lib/module/ScrollArea/ScrollArea.js +41 -38
  446. package/lib/module/ScrollArea/ScrollArea.js.map +1 -1
  447. package/lib/module/ScrollArea/ScrollArea.native.js +22 -27
  448. package/lib/module/ScrollArea/ScrollArea.native.js.map +1 -1
  449. package/lib/module/SegmentedControl/SegmentedControl.js +108 -57
  450. package/lib/module/SegmentedControl/SegmentedControl.js.map +1 -1
  451. package/lib/module/Select/Select.js +8 -4
  452. package/lib/module/Select/Select.js.map +1 -1
  453. package/lib/module/Separator/Separator.js +49 -41
  454. package/lib/module/Separator/Separator.js.map +1 -1
  455. package/lib/module/SimpleGrid/SimpleGrid.js +14 -16
  456. package/lib/module/SimpleGrid/SimpleGrid.js.map +1 -1
  457. package/lib/module/Skeleton/Skeleton.js +40 -25
  458. package/lib/module/Skeleton/Skeleton.js.map +1 -1
  459. package/lib/module/Slider/Slider.js +309 -258
  460. package/lib/module/Slider/Slider.js.map +1 -1
  461. package/lib/module/Spacer/Spacer.js +16 -29
  462. package/lib/module/Spacer/Spacer.js.map +1 -1
  463. package/lib/module/Spoiler/Spoiler.js +17 -17
  464. package/lib/module/Spoiler/Spoiler.js.map +1 -1
  465. package/lib/module/Stack/Stack.js +3 -3
  466. package/lib/module/Stack/Stack.js.map +1 -1
  467. package/lib/module/Stepper/Stepper.js +97 -72
  468. package/lib/module/Stepper/Stepper.js.map +1 -1
  469. package/lib/module/Switch/Switch.js +73 -69
  470. package/lib/module/Switch/Switch.js.map +1 -1
  471. package/lib/module/Table/Table.js +99 -85
  472. package/lib/module/Table/Table.js.map +1 -1
  473. package/lib/module/TableOfContents/TableOfContents.js +96 -97
  474. package/lib/module/TableOfContents/TableOfContents.js.map +1 -1
  475. package/lib/module/Tabs/Tabs.js +72 -74
  476. package/lib/module/Tabs/Tabs.js.map +1 -1
  477. package/lib/module/TagsInput/TagsInput.js +21 -5
  478. package/lib/module/TagsInput/TagsInput.js.map +1 -1
  479. package/lib/module/Text/Text.js +29 -14
  480. package/lib/module/Text/Text.js.map +1 -1
  481. package/lib/module/TextInput/TextInput.js +2 -1
  482. package/lib/module/TextInput/TextInput.js.map +1 -1
  483. package/lib/module/Textarea/Textarea.js +2 -2
  484. package/lib/module/Textarea/Textarea.js.map +1 -1
  485. package/lib/module/ThemeIcon/ThemeIcon.js +10 -6
  486. package/lib/module/ThemeIcon/ThemeIcon.js.map +1 -1
  487. package/lib/module/Title/Title.js +51 -34
  488. package/lib/module/Title/Title.js.map +1 -1
  489. package/lib/module/Tooltip/Tooltip.js +44 -28
  490. package/lib/module/Tooltip/Tooltip.js.map +1 -1
  491. package/lib/module/Transition/Transition.native.js +12 -11
  492. package/lib/module/Transition/Transition.native.js.map +1 -1
  493. package/lib/module/Transition/use-overlay-transition.native.js +3 -6
  494. package/lib/module/Transition/use-overlay-transition.native.js.map +1 -1
  495. package/lib/module/Tree/Tree.js +31 -35
  496. package/lib/module/Tree/Tree.js.map +1 -1
  497. package/lib/module/TreeSelect/TreeSelect.js +52 -28
  498. package/lib/module/TreeSelect/TreeSelect.js.map +1 -1
  499. package/lib/module/Typography/Typography.js +5 -7
  500. package/lib/module/Typography/Typography.js.map +1 -1
  501. package/lib/module/UnstyledButton/UnstyledButton.js +5 -5
  502. package/lib/module/UnstyledButton/UnstyledButton.js.map +1 -1
  503. package/lib/module/VirtualList/VirtualList.js +23 -7
  504. package/lib/module/VirtualList/VirtualList.js.map +1 -1
  505. package/lib/module/VisuallyHidden/VisuallyHidden.js +6 -10
  506. package/lib/module/VisuallyHidden/VisuallyHidden.js.map +1 -1
  507. package/lib/module/control-system.js +5 -0
  508. package/lib/module/control-system.js.map +1 -1
  509. package/lib/module/index.js +8 -4
  510. package/lib/module/index.js.map +1 -1
  511. package/lib/module/internal/ControlIconProvider.js +1 -1
  512. package/lib/module/internal/ControlIconProvider.js.map +1 -1
  513. package/lib/module/internal/InlineControl.js +25 -30
  514. package/lib/module/internal/InlineControl.js.map +1 -1
  515. package/lib/module/internal/collapse-box.js +13 -11
  516. package/lib/module/internal/collapse-box.js.map +1 -1
  517. package/lib/module/internal/control-icon-size.js +5 -8
  518. package/lib/module/internal/control-icon-size.js.map +1 -1
  519. package/lib/module/internal/control-metrics.js +52 -52
  520. package/lib/module/internal/control-metrics.js.map +1 -1
  521. package/lib/module/internal/floating-arrow.js +44 -30
  522. package/lib/module/internal/floating-arrow.js.map +1 -1
  523. package/lib/module/internal/focus-ring.js +95 -0
  524. package/lib/module/internal/focus-ring.js.map +1 -0
  525. package/lib/module/internal/gradient-shared.js +7 -7
  526. package/lib/module/internal/gradient-shared.js.map +1 -1
  527. package/lib/module/internal/gradient.native.js +1 -1
  528. package/lib/module/internal/motion.js +245 -359
  529. package/lib/module/internal/motion.js.map +1 -1
  530. package/lib/module/internal/resolve-theme-color.js +10 -10
  531. package/lib/module/internal/resolve-theme-color.js.map +1 -1
  532. package/lib/module/internal/style-props.js +471 -459
  533. package/lib/module/internal/style-props.js.map +1 -1
  534. package/lib/module/internal/theme-color-web.js +45 -27
  535. package/lib/module/internal/theme-color-web.js.map +1 -1
  536. package/lib/module/internal/use-icon-color.js +1 -1
  537. package/lib/module/internal/use-icon-color.native.js +1 -1
  538. package/lib/module/internal/use-slot-text-wrapper.js +1 -1
  539. package/lib/module/internal/variant-colors.js +150 -228
  540. package/lib/module/internal/variant-colors.js.map +1 -1
  541. package/lib/typescript/Accordion/Accordion.d.ts +120 -74
  542. package/lib/typescript/Accordion/Accordion.d.ts.map +1 -1
  543. package/lib/typescript/ActionIcon/ActionIcon.d.ts +236 -94
  544. package/lib/typescript/ActionIcon/ActionIcon.d.ts.map +1 -1
  545. package/lib/typescript/Affix/Affix.d.ts +12 -7
  546. package/lib/typescript/Affix/Affix.d.ts.map +1 -1
  547. package/lib/typescript/Alert/Alert.d.ts +228 -68
  548. package/lib/typescript/Alert/Alert.d.ts.map +1 -1
  549. package/lib/typescript/Anchor/Anchor.d.ts +33 -24
  550. package/lib/typescript/Anchor/Anchor.d.ts.map +1 -1
  551. package/lib/typescript/AngleSlider/AngleSlider.d.ts +224 -66
  552. package/lib/typescript/AngleSlider/AngleSlider.d.ts.map +1 -1
  553. package/lib/typescript/AspectRatio/AspectRatio.d.ts +34 -14
  554. package/lib/typescript/AspectRatio/AspectRatio.d.ts.map +1 -1
  555. package/lib/typescript/Autocomplete/Autocomplete.d.ts +30 -42
  556. package/lib/typescript/Autocomplete/Autocomplete.d.ts.map +1 -1
  557. package/lib/typescript/Avatar/Avatar.d.ts +167 -191
  558. package/lib/typescript/Avatar/Avatar.d.ts.map +1 -1
  559. package/lib/typescript/BackgroundImage/BackgroundImage.d.ts +15 -10
  560. package/lib/typescript/BackgroundImage/BackgroundImage.d.ts.map +1 -1
  561. package/lib/typescript/Badge/Badge.d.ts +138 -62
  562. package/lib/typescript/Badge/Badge.d.ts.map +1 -1
  563. package/lib/typescript/Blockquote/Blockquote.d.ts +148 -50
  564. package/lib/typescript/Blockquote/Blockquote.d.ts.map +1 -1
  565. package/lib/typescript/Box/Box.d.ts +11 -3
  566. package/lib/typescript/Box/Box.d.ts.map +1 -1
  567. package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts +115 -35
  568. package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  569. package/lib/typescript/Burger/Burger.d.ts +124 -41
  570. package/lib/typescript/Burger/Burger.d.ts.map +1 -1
  571. package/lib/typescript/Button/Button.d.ts +236 -107
  572. package/lib/typescript/Button/Button.d.ts.map +1 -1
  573. package/lib/typescript/Card/Card.d.ts +79 -47
  574. package/lib/typescript/Card/Card.d.ts.map +1 -1
  575. package/lib/typescript/Center/Center.d.ts +13 -9
  576. package/lib/typescript/Center/Center.d.ts.map +1 -1
  577. package/lib/typescript/Checkbox/CheckIcon.d.ts +7 -3
  578. package/lib/typescript/Checkbox/CheckIcon.d.ts.map +1 -1
  579. package/lib/typescript/Checkbox/Checkbox.d.ts +79 -60
  580. package/lib/typescript/Checkbox/Checkbox.d.ts.map +1 -1
  581. package/lib/typescript/Chip/Chip.d.ts +140 -57
  582. package/lib/typescript/Chip/Chip.d.ts.map +1 -1
  583. package/lib/typescript/CloseButton/CloseButton.d.ts +85 -50
  584. package/lib/typescript/CloseButton/CloseButton.d.ts.map +1 -1
  585. package/lib/typescript/Code/Code.d.ts +31 -23
  586. package/lib/typescript/Code/Code.d.ts.map +1 -1
  587. package/lib/typescript/Collapse/Collapse.d.ts +44 -20
  588. package/lib/typescript/Collapse/Collapse.d.ts.map +1 -1
  589. package/lib/typescript/ColorInput/ColorInput.d.ts +15 -5
  590. package/lib/typescript/ColorInput/ColorInput.d.ts.map +1 -1
  591. package/lib/typescript/ColorPicker/ColorPicker.d.ts +72 -16
  592. package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
  593. package/lib/typescript/ColorSwatch/ColorSwatch.d.ts +59 -38
  594. package/lib/typescript/ColorSwatch/ColorSwatch.d.ts.map +1 -1
  595. package/lib/typescript/Combobox/Combobox.d.ts +183 -100
  596. package/lib/typescript/Combobox/Combobox.d.ts.map +1 -1
  597. package/lib/typescript/Combobox/OptionsDropdown.d.ts +6 -0
  598. package/lib/typescript/Combobox/OptionsDropdown.d.ts.map +1 -1
  599. package/lib/typescript/Combobox/index.d.ts +66 -86
  600. package/lib/typescript/Combobox/index.d.ts.map +1 -1
  601. package/lib/typescript/Container/Container.d.ts +3 -41
  602. package/lib/typescript/Container/Container.d.ts.map +1 -1
  603. package/lib/typescript/Dialog/Dialog.d.ts +79 -76
  604. package/lib/typescript/Dialog/Dialog.d.ts.map +1 -1
  605. package/lib/typescript/Drawer/Drawer.d.ts +115 -40
  606. package/lib/typescript/Drawer/Drawer.d.ts.map +1 -1
  607. package/lib/typescript/Fieldset/Fieldset.d.ts +91 -46
  608. package/lib/typescript/Fieldset/Fieldset.d.ts.map +1 -1
  609. package/lib/typescript/FileButton/FileButton.d.ts.map +1 -1
  610. package/lib/typescript/FileInput/FileInput.d.ts +1 -1
  611. package/lib/typescript/FileInput/FileInput.d.ts.map +1 -1
  612. package/lib/typescript/Flex/Flex.d.ts +28 -26
  613. package/lib/typescript/Flex/Flex.d.ts.map +1 -1
  614. package/lib/typescript/FocusTrap/FocusTrap.d.ts.map +1 -1
  615. package/lib/typescript/Grid/Grid.d.ts +56 -48
  616. package/lib/typescript/Grid/Grid.d.ts.map +1 -1
  617. package/lib/typescript/Group/Group.d.ts +21 -16
  618. package/lib/typescript/Group/Group.d.ts.map +1 -1
  619. package/lib/typescript/Highlight/Highlight.d.ts +1 -15
  620. package/lib/typescript/Highlight/Highlight.d.ts.map +1 -1
  621. package/lib/typescript/HoverCard/HoverCard.d.ts +9 -9
  622. package/lib/typescript/HoverCard/HoverCard.d.ts.map +1 -1
  623. package/lib/typescript/Image/Image.d.ts +76 -158
  624. package/lib/typescript/Image/Image.d.ts.map +1 -1
  625. package/lib/typescript/Image/Image.native.d.ts +327 -0
  626. package/lib/typescript/Image/Image.native.d.ts.map +1 -0
  627. package/lib/typescript/Image/createImage.d.ts +49 -357
  628. package/lib/typescript/Image/createImage.d.ts.map +1 -1
  629. package/lib/typescript/Image/types.d.ts +4 -1
  630. package/lib/typescript/Image/types.d.ts.map +1 -1
  631. package/lib/typescript/Indicator/Indicator.d.ts +122 -43
  632. package/lib/typescript/Indicator/Indicator.d.ts.map +1 -1
  633. package/lib/typescript/Input/Input.d.ts +131 -328
  634. package/lib/typescript/Input/Input.d.ts.map +1 -1
  635. package/lib/typescript/Input/Input.native.d.ts +150 -472
  636. package/lib/typescript/Input/Input.native.d.ts.map +1 -1
  637. package/lib/typescript/Input/shared.d.ts +290 -490
  638. package/lib/typescript/Input/shared.d.ts.map +1 -1
  639. package/lib/typescript/Input/types.d.ts +14 -1
  640. package/lib/typescript/Input/types.d.ts.map +1 -1
  641. package/lib/typescript/InputBase/InputBase.d.ts +1 -52
  642. package/lib/typescript/InputBase/InputBase.d.ts.map +1 -1
  643. package/lib/typescript/Kbd/Kbd.d.ts +21 -65
  644. package/lib/typescript/Kbd/Kbd.d.ts.map +1 -1
  645. package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +2 -6
  646. package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts.map +1 -1
  647. package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +7 -3
  648. package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts.map +1 -1
  649. package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +2 -6
  650. package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts.map +1 -1
  651. package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts +6 -2
  652. package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts.map +1 -1
  653. package/lib/typescript/List/List.d.ts +165 -63
  654. package/lib/typescript/List/List.d.ts.map +1 -1
  655. package/lib/typescript/Loader/Loader.d.ts +58 -28
  656. package/lib/typescript/Loader/Loader.d.ts.map +1 -1
  657. package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts +1 -9
  658. package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
  659. package/lib/typescript/Mark/Mark.d.ts +21 -65
  660. package/lib/typescript/Mark/Mark.d.ts.map +1 -1
  661. package/lib/typescript/Marquee/Marquee.d.ts +127 -44
  662. package/lib/typescript/Marquee/Marquee.d.ts.map +1 -1
  663. package/lib/typescript/MaskInput/MaskInput.d.ts +1 -51
  664. package/lib/typescript/MaskInput/MaskInput.d.ts.map +1 -1
  665. package/lib/typescript/Menu/Menu.d.ts +93 -105
  666. package/lib/typescript/Menu/Menu.d.ts.map +1 -1
  667. package/lib/typescript/Modal/Modal.d.ts +166 -91
  668. package/lib/typescript/Modal/Modal.d.ts.map +1 -1
  669. package/lib/typescript/Modal/drag/DragDismissHost.web.d.ts.map +1 -1
  670. package/lib/typescript/Modal/drag/DragDismissOverlay.web.d.ts.map +1 -1
  671. package/lib/typescript/Modal/drag/index.d.ts +2 -2
  672. package/lib/typescript/Modal/drag/index.d.ts.map +1 -1
  673. package/lib/typescript/Modal/drag/types.d.ts +14 -2
  674. package/lib/typescript/Modal/drag/types.d.ts.map +1 -1
  675. package/lib/typescript/Modal/modal-base-inner.d.ts +6 -2
  676. package/lib/typescript/Modal/modal-base-inner.d.ts.map +1 -1
  677. package/lib/typescript/Modal/modal-base-inner.native.d.ts +7 -3
  678. package/lib/typescript/Modal/modal-base-inner.native.d.ts.map +1 -1
  679. package/lib/typescript/Modal/modal-base.d.ts +2 -2
  680. package/lib/typescript/Modal/modal-base.d.ts.map +1 -1
  681. package/lib/typescript/MultiSelect/MultiSelect.d.ts +30 -50
  682. package/lib/typescript/MultiSelect/MultiSelect.d.ts.map +1 -1
  683. package/lib/typescript/NativeSelect/NativeSelect.d.ts.map +1 -1
  684. package/lib/typescript/NativeSelect/NativeSelect.native.d.ts +1 -1
  685. package/lib/typescript/NativeSelect/NativeSelect.native.d.ts.map +1 -1
  686. package/lib/typescript/NavLink/NavLink.d.ts +245 -72
  687. package/lib/typescript/NavLink/NavLink.d.ts.map +1 -1
  688. package/lib/typescript/Notification/Notification.d.ts +230 -69
  689. package/lib/typescript/Notification/Notification.d.ts.map +1 -1
  690. package/lib/typescript/NumberFormatter/NumberFormatter.d.ts +24 -19
  691. package/lib/typescript/NumberFormatter/NumberFormatter.d.ts.map +1 -1
  692. package/lib/typescript/NumberInput/NumberInput.d.ts +91 -150
  693. package/lib/typescript/NumberInput/NumberInput.d.ts.map +1 -1
  694. package/lib/typescript/Overlay/Overlay.d.ts +17 -12
  695. package/lib/typescript/Overlay/Overlay.d.ts.map +1 -1
  696. package/lib/typescript/Pagination/Pagination.d.ts +43 -65
  697. package/lib/typescript/Pagination/Pagination.d.ts.map +1 -1
  698. package/lib/typescript/Paper/Paper.d.ts +19 -7
  699. package/lib/typescript/Paper/Paper.d.ts.map +1 -1
  700. package/lib/typescript/Paragraph/Paragraph.d.ts +23 -19
  701. package/lib/typescript/Paragraph/Paragraph.d.ts.map +1 -1
  702. package/lib/typescript/PasswordInput/PasswordInput.d.ts +110 -207
  703. package/lib/typescript/PasswordInput/PasswordInput.d.ts.map +1 -1
  704. package/lib/typescript/Pill/Pill.d.ts +133 -95
  705. package/lib/typescript/Pill/Pill.d.ts.map +1 -1
  706. package/lib/typescript/PillsInput/PillsInput.d.ts +2 -2
  707. package/lib/typescript/PillsInput/PillsInput.d.ts.map +1 -1
  708. package/lib/typescript/PinInput/PinInput.d.ts +148 -297
  709. package/lib/typescript/PinInput/PinInput.d.ts.map +1 -1
  710. package/lib/typescript/Popover/Popover.native.d.ts.map +1 -1
  711. package/lib/typescript/Popover/Popover.shared.d.ts +15 -11
  712. package/lib/typescript/Popover/Popover.shared.d.ts.map +1 -1
  713. package/lib/typescript/Progress/Progress.d.ts +114 -65
  714. package/lib/typescript/Progress/Progress.d.ts.map +1 -1
  715. package/lib/typescript/Radio/Radio.d.ts +69 -80
  716. package/lib/typescript/Radio/Radio.d.ts.map +1 -1
  717. package/lib/typescript/Radio/RadioIcon.d.ts +5 -0
  718. package/lib/typescript/Radio/RadioIcon.d.ts.map +1 -1
  719. package/lib/typescript/Rating/Rating.d.ts +94 -44
  720. package/lib/typescript/Rating/Rating.d.ts.map +1 -1
  721. package/lib/typescript/RollingNumber/RollingNumber.d.ts +112 -32
  722. package/lib/typescript/RollingNumber/RollingNumber.d.ts.map +1 -1
  723. package/lib/typescript/ScrollArea/ScrollArea.d.ts +50 -10
  724. package/lib/typescript/ScrollArea/ScrollArea.d.ts.map +1 -1
  725. package/lib/typescript/ScrollArea/ScrollArea.native.d.ts +40 -8
  726. package/lib/typescript/ScrollArea/ScrollArea.native.d.ts.map +1 -1
  727. package/lib/typescript/ScrollArea/ScrollArea.shared.d.ts +2 -2
  728. package/lib/typescript/SegmentedControl/SegmentedControl.d.ts +148 -56
  729. package/lib/typescript/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  730. package/lib/typescript/Select/Select.d.ts +31 -51
  731. package/lib/typescript/Select/Select.d.ts.map +1 -1
  732. package/lib/typescript/Separator/Separator.d.ts +124 -61
  733. package/lib/typescript/Separator/Separator.d.ts.map +1 -1
  734. package/lib/typescript/SimpleGrid/SimpleGrid.d.ts +15 -13
  735. package/lib/typescript/SimpleGrid/SimpleGrid.d.ts.map +1 -1
  736. package/lib/typescript/Skeleton/Skeleton.d.ts +18 -14
  737. package/lib/typescript/Skeleton/Skeleton.d.ts.map +1 -1
  738. package/lib/typescript/Slider/Slider.d.ts +425 -129
  739. package/lib/typescript/Slider/Slider.d.ts.map +1 -1
  740. package/lib/typescript/Spacer/Spacer.d.ts +10 -17
  741. package/lib/typescript/Spacer/Spacer.d.ts.map +1 -1
  742. package/lib/typescript/Spoiler/Spoiler.d.ts +88 -28
  743. package/lib/typescript/Spoiler/Spoiler.d.ts.map +1 -1
  744. package/lib/typescript/Stack/Stack.d.ts +17 -5
  745. package/lib/typescript/Stack/Stack.d.ts.map +1 -1
  746. package/lib/typescript/Stepper/Stepper.d.ts +433 -101
  747. package/lib/typescript/Stepper/Stepper.d.ts.map +1 -1
  748. package/lib/typescript/Switch/Switch.d.ts +157 -69
  749. package/lib/typescript/Switch/Switch.d.ts.map +1 -1
  750. package/lib/typescript/Table/Table.d.ts +151 -201
  751. package/lib/typescript/Table/Table.d.ts.map +1 -1
  752. package/lib/typescript/TableOfContents/TableOfContents.d.ts +116 -46
  753. package/lib/typescript/TableOfContents/TableOfContents.d.ts.map +1 -1
  754. package/lib/typescript/Tabs/Tabs.d.ts +138 -88
  755. package/lib/typescript/Tabs/Tabs.d.ts.map +1 -1
  756. package/lib/typescript/TagsInput/TagsInput.d.ts +30 -42
  757. package/lib/typescript/TagsInput/TagsInput.d.ts.map +1 -1
  758. package/lib/typescript/Text/Text.d.ts +22 -4
  759. package/lib/typescript/Text/Text.d.ts.map +1 -1
  760. package/lib/typescript/TextInput/TextInput.d.ts +1 -51
  761. package/lib/typescript/TextInput/TextInput.d.ts.map +1 -1
  762. package/lib/typescript/Textarea/Textarea.d.ts +1 -51
  763. package/lib/typescript/Textarea/Textarea.d.ts.map +1 -1
  764. package/lib/typescript/ThemeIcon/ThemeIcon.d.ts +52 -39
  765. package/lib/typescript/ThemeIcon/ThemeIcon.d.ts.map +1 -1
  766. package/lib/typescript/Title/Title.d.ts +40 -25
  767. package/lib/typescript/Title/Title.d.ts.map +1 -1
  768. package/lib/typescript/Tooltip/Tooltip.d.ts +97 -41
  769. package/lib/typescript/Tooltip/Tooltip.d.ts.map +1 -1
  770. package/lib/typescript/Transition/Transition.native.d.ts.map +1 -1
  771. package/lib/typescript/Transition/use-overlay-transition.d.ts +1 -2
  772. package/lib/typescript/Transition/use-overlay-transition.d.ts.map +1 -1
  773. package/lib/typescript/Transition/use-overlay-transition.native.d.ts +3 -4
  774. package/lib/typescript/Transition/use-overlay-transition.native.d.ts.map +1 -1
  775. package/lib/typescript/Tree/Tree.d.ts +180 -50
  776. package/lib/typescript/Tree/Tree.d.ts.map +1 -1
  777. package/lib/typescript/TreeSelect/TreeSelect.d.ts +141 -182
  778. package/lib/typescript/TreeSelect/TreeSelect.d.ts.map +1 -1
  779. package/lib/typescript/Typography/Typography.d.ts +13 -7
  780. package/lib/typescript/Typography/Typography.d.ts.map +1 -1
  781. package/lib/typescript/UnstyledButton/UnstyledButton.d.ts +27 -20
  782. package/lib/typescript/UnstyledButton/UnstyledButton.d.ts.map +1 -1
  783. package/lib/typescript/VirtualList/VirtualList.d.ts.map +1 -1
  784. package/lib/typescript/VirtualList/VirtualList.shared.d.ts +1 -1
  785. package/lib/typescript/VirtualList/VirtualList.shared.d.ts.map +1 -1
  786. package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts +23 -19
  787. package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
  788. package/lib/typescript/control-system.d.ts +3 -0
  789. package/lib/typescript/control-system.d.ts.map +1 -1
  790. package/lib/typescript/index.d.ts +2 -1
  791. package/lib/typescript/index.d.ts.map +1 -1
  792. package/lib/typescript/internal/InlineControl.d.ts +80 -22
  793. package/lib/typescript/internal/InlineControl.d.ts.map +1 -1
  794. package/lib/typescript/internal/collapse-box.d.ts +3 -3
  795. package/lib/typescript/internal/collapse-box.d.ts.map +1 -1
  796. package/lib/typescript/internal/collapse-box.shared.d.ts +1 -1
  797. package/lib/typescript/internal/control-icon-size.d.ts +4 -3
  798. package/lib/typescript/internal/control-icon-size.d.ts.map +1 -1
  799. package/lib/typescript/internal/control-metrics.d.ts +50 -50
  800. package/lib/typescript/internal/floating-arrow.d.ts +6 -7
  801. package/lib/typescript/internal/floating-arrow.d.ts.map +1 -1
  802. package/lib/typescript/internal/focus-ring.d.ts +94 -0
  803. package/lib/typescript/internal/focus-ring.d.ts.map +1 -0
  804. package/lib/typescript/internal/gradient-shared.d.ts +8 -8
  805. package/lib/typescript/internal/gradient-shared.d.ts.map +1 -1
  806. package/lib/typescript/internal/motion.d.ts +77 -67
  807. package/lib/typescript/internal/motion.d.ts.map +1 -1
  808. package/lib/typescript/internal/resolve-theme-color.d.ts +9 -8
  809. package/lib/typescript/internal/resolve-theme-color.d.ts.map +1 -1
  810. package/lib/typescript/internal/style-props.d.ts +490 -664
  811. package/lib/typescript/internal/style-props.d.ts.map +1 -1
  812. package/lib/typescript/internal/theme-color-web.d.ts.map +1 -1
  813. package/lib/typescript/internal/use-icon-color.d.ts +1 -1
  814. package/lib/typescript/internal/use-icon-color.native.d.ts +1 -1
  815. package/lib/typescript/internal/use-looping-animation.d.ts +10 -2
  816. package/lib/typescript/internal/use-looping-animation.d.ts.map +1 -1
  817. package/lib/typescript/internal/variant-colors.d.ts +191 -199
  818. package/lib/typescript/internal/variant-colors.d.ts.map +1 -1
  819. package/package.json +7 -6
  820. package/src/Accordion/Accordion.tsx +55 -47
  821. package/src/ActionIcon/ActionIcon.tsx +114 -57
  822. package/src/Affix/Affix.tsx +14 -25
  823. package/src/Alert/Alert.tsx +55 -42
  824. package/src/Anchor/Anchor.tsx +13 -12
  825. package/src/AngleSlider/AngleSlider.tsx +87 -63
  826. package/src/AspectRatio/AspectRatio.tsx +9 -12
  827. package/src/Autocomplete/Autocomplete.tsx +7 -2
  828. package/src/Avatar/Avatar.tsx +42 -34
  829. package/src/BackgroundImage/BackgroundImage.tsx +9 -6
  830. package/src/Badge/Badge.tsx +53 -28
  831. package/src/Blockquote/Blockquote.tsx +55 -45
  832. package/src/Box/Box.tsx +2 -2
  833. package/src/Breadcrumbs/Breadcrumbs.tsx +13 -11
  834. package/src/Burger/Burger.tsx +33 -24
  835. package/src/Button/Button.tsx +104 -78
  836. package/src/Card/Card.tsx +52 -44
  837. package/src/Center/Center.tsx +3 -3
  838. package/src/Checkbox/CheckIcon.tsx +8 -5
  839. package/src/Checkbox/Checkbox.tsx +97 -62
  840. package/src/Chip/Chip.tsx +50 -45
  841. package/src/CloseButton/CloseButton.tsx +30 -11
  842. package/src/Code/Code.tsx +15 -11
  843. package/src/Collapse/Collapse.tsx +11 -6
  844. package/src/ColorInput/ColorInput.tsx +30 -24
  845. package/src/ColorPicker/ColorPicker.tsx +78 -79
  846. package/src/ColorSwatch/ColorSwatch.tsx +11 -14
  847. package/src/Combobox/Combobox.tsx +174 -153
  848. package/src/Combobox/OptionsDropdown.tsx +15 -2
  849. package/src/Combobox/index.ts +1 -0
  850. package/src/Container/Container.tsx +11 -15
  851. package/src/Dialog/Dialog.tsx +26 -16
  852. package/src/Drawer/Drawer.tsx +51 -33
  853. package/src/Fieldset/Fieldset.tsx +25 -17
  854. package/src/FileButton/FileButton.tsx +4 -1
  855. package/src/Flex/Flex.tsx +24 -21
  856. package/src/FocusTrap/FocusTrap.tsx +4 -3
  857. package/src/Grid/Grid.tsx +24 -27
  858. package/src/Group/Group.tsx +4 -4
  859. package/src/Highlight/Highlight.tsx +2 -2
  860. package/src/HoverCard/HoverCard.tsx +17 -32
  861. package/src/Image/Image.native.tsx +36 -0
  862. package/src/Image/Image.tsx +240 -23
  863. package/src/Image/createImage.tsx +103 -67
  864. package/src/Image/types.ts +5 -1
  865. package/src/Indicator/Indicator.tsx +41 -32
  866. package/src/Input/Input.native.tsx +521 -501
  867. package/src/Input/Input.tsx +110 -156
  868. package/src/Input/shared.tsx +198 -291
  869. package/src/Input/types.ts +15 -0
  870. package/src/InputBase/InputBase.tsx +3 -1
  871. package/src/Kbd/Kbd.tsx +13 -15
  872. package/src/KeyboardAvoidingView/KeyboardAvoidingView.native.tsx +2 -2
  873. package/src/KeyboardAwareScrollView/KeyboardAwareScrollView.native.tsx +1 -1
  874. package/src/List/List.tsx +17 -11
  875. package/src/Loader/Loader.tsx +33 -37
  876. package/src/LoadingOverlay/LoadingOverlay.tsx +3 -2
  877. package/src/Mark/Mark.tsx +12 -12
  878. package/src/Marquee/Marquee.tsx +58 -46
  879. package/src/MaskInput/MaskInput.tsx +2 -1
  880. package/src/Menu/Menu.tsx +110 -45
  881. package/src/Modal/Modal.tsx +38 -31
  882. package/src/Modal/drag/DragDismissHost.web.tsx +2 -1
  883. package/src/Modal/drag/DragDismissOverlay.web.tsx +6 -1
  884. package/src/Modal/drag/index.ts +7 -2
  885. package/src/Modal/drag/types.ts +15 -3
  886. package/src/Modal/modal-base-inner.native.tsx +3 -2
  887. package/src/Modal/modal-base-inner.tsx +1 -1
  888. package/src/Modal/modal-base.tsx +10 -8
  889. package/src/MultiSelect/MultiSelect.tsx +6 -1
  890. package/src/NativeSelect/NativeSelect.tsx +21 -32
  891. package/src/NavLink/NavLink.tsx +54 -47
  892. package/src/Notification/Notification.tsx +31 -30
  893. package/src/NumberFormatter/NumberFormatter.tsx +4 -3
  894. package/src/NumberInput/NumberInput.tsx +52 -42
  895. package/src/Overlay/Overlay.tsx +18 -14
  896. package/src/Pagination/Pagination.tsx +142 -123
  897. package/src/Paper/Paper.tsx +8 -9
  898. package/src/Paragraph/Paragraph.tsx +7 -7
  899. package/src/PasswordInput/PasswordInput.tsx +67 -67
  900. package/src/Pill/Pill.tsx +42 -30
  901. package/src/PillsInput/PillsInput.tsx +60 -31
  902. package/src/PinInput/PinInput.tsx +31 -23
  903. package/src/Popover/Popover.native.tsx +3 -4
  904. package/src/Popover/Popover.shared.tsx +29 -24
  905. package/src/Progress/Progress.tsx +77 -64
  906. package/src/Radio/Radio.tsx +128 -122
  907. package/src/Radio/RadioIcon.tsx +4 -10
  908. package/src/Rating/Rating.tsx +63 -42
  909. package/src/RollingNumber/RollingNumber.tsx +60 -28
  910. package/src/ScrollArea/ScrollArea.native.tsx +28 -27
  911. package/src/ScrollArea/ScrollArea.shared.ts +2 -2
  912. package/src/ScrollArea/ScrollArea.tsx +35 -33
  913. package/src/SegmentedControl/SegmentedControl.tsx +98 -53
  914. package/src/Select/Select.tsx +7 -2
  915. package/src/Separator/Separator.tsx +43 -36
  916. package/src/SimpleGrid/SimpleGrid.tsx +23 -24
  917. package/src/Skeleton/Skeleton.tsx +35 -16
  918. package/src/Slider/Slider.tsx +303 -227
  919. package/src/Spacer/Spacer.tsx +17 -41
  920. package/src/Spoiler/Spoiler.tsx +19 -13
  921. package/src/Stack/Stack.tsx +3 -3
  922. package/src/Stepper/Stepper.tsx +89 -73
  923. package/src/Switch/Switch.tsx +87 -73
  924. package/src/Table/Table.tsx +100 -77
  925. package/src/TableOfContents/TableOfContents.tsx +80 -74
  926. package/src/Tabs/Tabs.tsx +78 -66
  927. package/src/TagsInput/TagsInput.tsx +35 -4
  928. package/src/Text/Text.tsx +25 -10
  929. package/src/TextInput/TextInput.tsx +3 -1
  930. package/src/Textarea/Textarea.tsx +2 -2
  931. package/src/ThemeIcon/ThemeIcon.tsx +37 -22
  932. package/src/Title/Title.tsx +48 -23
  933. package/src/Tooltip/Tooltip.tsx +50 -29
  934. package/src/Transition/Transition.native.tsx +16 -19
  935. package/src/Transition/use-overlay-transition.native.ts +6 -12
  936. package/src/Transition/use-overlay-transition.ts +2 -2
  937. package/src/Tree/Tree.tsx +39 -44
  938. package/src/TreeSelect/TreeSelect.tsx +49 -24
  939. package/src/Typography/Typography.tsx +5 -7
  940. package/src/UnstyledButton/UnstyledButton.tsx +6 -5
  941. package/src/VirtualList/VirtualList.shared.ts +1 -1
  942. package/src/VirtualList/VirtualList.tsx +18 -6
  943. package/src/VisuallyHidden/VisuallyHidden.tsx +7 -9
  944. package/src/control-system.ts +5 -0
  945. package/src/index.ts +30 -12
  946. package/src/internal/ControlIconProvider.tsx +1 -1
  947. package/src/internal/InlineControl.tsx +23 -27
  948. package/src/internal/collapse-box.shared.ts +1 -1
  949. package/src/internal/collapse-box.tsx +15 -11
  950. package/src/internal/control-icon-size.ts +5 -8
  951. package/src/internal/control-metrics.ts +52 -52
  952. package/src/internal/floating-arrow.tsx +48 -40
  953. package/src/internal/focus-ring.ts +92 -0
  954. package/src/internal/gradient-shared.ts +10 -10
  955. package/src/internal/gradient.native.tsx +1 -1
  956. package/src/internal/motion.ts +204 -244
  957. package/src/internal/resolve-theme-color.ts +10 -10
  958. package/src/internal/style-props.ts +545 -390
  959. package/src/internal/theme-color-web.ts +47 -27
  960. package/src/internal/use-icon-color.native.ts +1 -1
  961. package/src/internal/use-icon-color.ts +1 -1
  962. package/src/internal/use-slot-text-wrapper.tsx +1 -1
  963. package/src/internal/variant-colors.ts +187 -151
@@ -1,35 +1,207 @@
1
1
  "use strict";
2
2
 
3
- import { Image as ExpoImage } from "expo-image";
3
+ /// <reference lib="dom" />
4
+
5
+ import * as React from "react";
6
+ import { View } from "react-native";
4
7
  import { createImage } from "./createImage";
5
- import { objectFitToContentFit } from "./shared";
8
+ import { normalizeContentPosition, objectFitToContentFit } from "./shared";
6
9
 
7
10
  /**
8
- * Cross-platform `Image`, backed by [expo-image](https://docs.expo.dev/versions/latest/sdk/image/)
9
- * on web, iOS, and Android. The same file resolves on every platform because
10
- * expo-image ships platform builds (a real `<img>` on web, native views on
11
- * device), so there is no `.native` split.
11
+ * Web `Image`: the same component and props as the native one (`Image.native.tsx`,
12
+ * expo-image), rendered as a wrapper view plus a real `<img>` that is in the
13
+ * very first render — so it is in the server HTML, and an image the browser
14
+ * already has paints on the frame it mounts.
15
+ *
16
+ * Why not expo-image's own web build: it renders NOTHING until an effect adds
17
+ * its `<img>` (one blank frame per mount, an empty box in the SSR markup), and
18
+ * its fade starts every mount at `opacity: 0` — cached or not. A virtualized
19
+ * list, a revisited page or a hydrating one remounts images all the time, so
20
+ * every one of them blinked.
21
+ *
22
+ * Shown as soon as the browser can: `transition` is a NATIVE fade. On the web
23
+ * the `<img>` is never held hidden; the browser paints it as it decodes (a
24
+ * cached one at once), over whatever backdrop the caller gives the box.
12
25
  *
13
- * On top of expo-image's full prop surface (`transition`, `placeholder`,
14
- * `cachePolicy`, `tintColor`, `blurRadius`, `priority`, …) it adds the unified,
15
- * Mantine-compatible API: `src`, `fit`/`objectFit` (→ `contentFit`),
16
- * `objectPosition` (→ `contentPosition`), `radius`, `fallbackSrc`, plus Tamagui
17
- * styling props (`w`, `h`, `bg`, `$token`s). expo-image's static methods
18
- * (`Image.prefetch`, `Image.clearMemoryCache`, …) are forwarded as-is.
26
+ * Kept from expo-image's web behaviour: `contentFit` → `object-fit` (default
27
+ * `cover`), `contentPosition` → `object-position`, lazy loading (the browser
28
+ * fetches an image as it nears the viewport), `priority` → `fetchpriority`,
29
+ * `blurRadius` → a CSS blur, a URL `placeholder` shown until the image loads
30
+ * (`placeholderContentFit`, default `scale-down`), and the load / error /
31
+ * display events with expo-image's payloads. `Image.prefetch` preloads through
32
+ * the browser cache.
19
33
  *
20
- * @example
21
- * <Image
22
- * src="https://example.com/photo.jpg"
23
- * fallbackSrc="https://example.com/placeholder.jpg"
24
- * fit="cover"
25
- * radius="md"
26
- * transition={300}
27
- * w={320}
28
- * h={180}
29
- * />
34
+ * Not on web: BlurHash / ThumbHash placeholders (only URL placeholders render),
35
+ * `tintColor`, `transition`, and the cache-management statics
36
+ * (`clearMemoryCache` / `clearDiskCache` / `getCachePathAsync` /
37
+ * `generateBlurhashAsync` / `loadAsync` resolve as the no-ops `createImage`
38
+ * provides).
39
+ */
40
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
41
+ const FILL = {
42
+ position: "absolute",
43
+ left: 0,
44
+ top: 0,
45
+ width: "100%",
46
+ height: "100%"
47
+ };
48
+
49
+ /** The first renderable URL of an expo-image source (string, `{ uri }`, list). */
50
+ function sourceUri(source) {
51
+ const first = Array.isArray(source) ? source[0] : source;
52
+ if (first == null || typeof first === "number") return undefined;
53
+ if (typeof first === "string") return first;
54
+ return first.uri;
55
+ }
56
+
57
+ /** A placeholder string is a URL, not a BlurHash / ThumbHash. */
58
+ function isUrlLike(value) {
59
+ return /^(https?:|data:|blob:|file:|\/|\.\.?\/)/.test(value) || value.includes("://");
60
+ }
61
+
62
+ /** expo-image's web units: numbers are px, percentages pass through. */
63
+ function webUnits(value) {
64
+ const text = String(value).trim();
65
+ return text.endsWith("%") ? text : `${text}px`;
66
+ }
67
+
68
+ /** expo-image's `contentPosition` (object or CSS string) → CSS `object-position`. */
69
+ export function objectPositionOf(position) {
70
+ const object = normalizeContentPosition(position);
71
+ if (!object) return "50% 50%";
72
+ const resolved = {
73
+ ...object
74
+ };
75
+ if (resolved.top == null && resolved.bottom == null) resolved.top = "50%";
76
+ if (resolved.left == null && resolved.right == null) resolved.left = "50%";
77
+ return ["top", "bottom", "left", "right"].filter(key => resolved[key] != null).map(key => `${key} ${webUnits(resolved[key])}`).join(" ") || "50% 50%";
78
+ }
79
+ const WebImage = /*#__PURE__*/React.forwardRef(function WebImage(props, ref) {
80
+ const {
81
+ source,
82
+ placeholder,
83
+ contentFit = "cover",
84
+ contentPosition,
85
+ placeholderContentFit = "scale-down",
86
+ blurRadius,
87
+ priority,
88
+ loading,
89
+ responsivePolicy,
90
+ accessibilityLabel,
91
+ alt,
92
+ draggable,
93
+ onLoadStart,
94
+ onLoad,
95
+ onError,
96
+ onLoadEnd,
97
+ onDisplay,
98
+ transition: _transition,
99
+ tintColor: _tintColor,
100
+ cachePolicy: _cachePolicy,
101
+ recyclingKey: _recyclingKey,
102
+ style,
103
+ ...rest
104
+ } = props;
105
+ const uri = sourceUri(source);
106
+ const placeholderValue = sourceUri(placeholder);
107
+ const placeholderUri = placeholderValue && isUrlLike(placeholderValue) ? placeholderValue : undefined;
108
+ // Keyed on the source, so a new `uri` brings its placeholder back without an effect.
109
+ const [loadedUri, setLoadedUri] = React.useState();
110
+ React.useEffect(() => {
111
+ if (uri) onLoadStart?.();
112
+ // `onLoadStart` is an event prop: a new identity is not a new load.
113
+ // eslint-disable-next-line react-hooks/exhaustive-deps
114
+ }, [uri]);
115
+ const filter = blurRadius ? `blur(${blurRadius}px)` : undefined;
116
+ const label = accessibilityLabel ?? alt;
117
+ const fetchPriority = priority === "high" || priority === "low" ? priority : undefined;
118
+ const resolvedLoading = loading ?? (responsivePolicy == null || responsivePolicy === "static" ? "lazy" : undefined);
119
+ const handleLoad = event => {
120
+ const target = event.currentTarget;
121
+ setLoadedUri(uri);
122
+ onLoad?.({
123
+ source: {
124
+ url: target.currentSrc || target.src,
125
+ width: target.naturalWidth,
126
+ height: target.naturalHeight,
127
+ mediaType: null
128
+ },
129
+ cacheType: "none"
130
+ });
131
+ onLoadEnd?.();
132
+ // There is no "displayed" event on the web; the repaint after the load is it.
133
+ if (onDisplay && typeof requestAnimationFrame === "function") {
134
+ requestAnimationFrame(() => onDisplay());
135
+ }
136
+ };
137
+ const handleError = () => {
138
+ onError?.({
139
+ error: `Failed to load image from url: ${uri}`
140
+ });
141
+ onLoadEnd?.();
142
+ };
143
+ return /*#__PURE__*/_jsxs(View, {
144
+ ref: ref,
145
+ ...rest,
146
+ style: [{
147
+ overflow: "hidden"
148
+ }, style],
149
+ children: [placeholderUri && loadedUri !== uri ? /*#__PURE__*/_jsx("img", {
150
+ src: placeholderUri,
151
+ alt: "",
152
+ "aria-hidden": true,
153
+ draggable: draggable,
154
+ style: {
155
+ ...FILL,
156
+ objectFit: placeholderContentFit,
157
+ filter
158
+ }
159
+ }) : null, uri ? /*#__PURE__*/_jsx("img", {
160
+ src: uri,
161
+ ...(label !== undefined && {
162
+ alt: label
163
+ }),
164
+ loading: resolvedLoading
165
+ // React 19 knows `fetchPriority`; older DOM typings don't.
166
+ ,
167
+ ...(fetchPriority && {
168
+ fetchPriority
169
+ }),
170
+ draggable: draggable,
171
+ onLoad: handleLoad,
172
+ onError: handleError,
173
+ style: {
174
+ ...FILL,
175
+ objectFit: contentFit,
176
+ objectPosition: objectPositionOf(contentPosition),
177
+ filter
178
+ }
179
+ }, uri) : null]
180
+ });
181
+ });
182
+
183
+ /** Warm the browser cache for one or more URLs; resolves `true` when all loaded. */
184
+ function prefetch(urls) {
185
+ const list = Array.isArray(urls) ? urls : [urls];
186
+ if (typeof window === "undefined" || typeof window.Image !== "function") {
187
+ return Promise.resolve(false);
188
+ }
189
+ return Promise.all(list.map(url => new Promise(resolve => {
190
+ const image = new window.Image();
191
+ image.onload = () => resolve(true);
192
+ image.onerror = () => resolve(false);
193
+ image.src = url;
194
+ }))).then(results => results.every(Boolean));
195
+ }
196
+ WebImage.prefetch = prefetch;
197
+
198
+ /**
199
+ * Cross-platform `Image` (web build). Same API and types as on native — see
200
+ * `Image.native.tsx` for the full prop surface and examples.
30
201
  */
31
202
  export const Image = createImage({
32
- Component: ExpoImage,
203
+ // Typed as expo-image so both platforms export one prop surface.
204
+ Component: WebImage,
33
205
  resizeModePropName: "contentFit",
34
206
  objectPositionPropName: "contentPosition",
35
207
  mapObjectFitToResizeMode: objectFitToContentFit
@@ -1 +1 @@
1
- {"version":3,"names":["Image","ExpoImage","createImage","objectFitToContentFit","Component","resizeModePropName","objectPositionPropName","mapObjectFitToResizeMode"],"sourceRoot":"../../../src","sources":["Image/Image.tsx"],"mappings":";;AAAA,SAASA,KAAK,IAAIC,SAAS,QAAQ,YAAY;AAE/C,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,qBAAqB,QAAQ,UAAU;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMH,KAAK,GAAGE,WAAW,CAAC;EAC/BE,SAAS,EAAEH,SAAS;EACpBI,kBAAkB,EAAE,YAAY;EAChCC,sBAAsB,EAAE,iBAAiB;EACzCC,wBAAwB,EAAEJ;AAC5B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","View","createImage","normalizeContentPosition","objectFitToContentFit","jsx","_jsx","jsxs","_jsxs","FILL","position","left","top","width","height","sourceUri","source","first","Array","isArray","undefined","uri","isUrlLike","value","test","includes","webUnits","text","String","trim","endsWith","objectPositionOf","object","resolved","bottom","right","filter","key","map","join","WebImage","forwardRef","props","ref","placeholder","contentFit","contentPosition","placeholderContentFit","blurRadius","priority","loading","responsivePolicy","accessibilityLabel","alt","draggable","onLoadStart","onLoad","onError","onLoadEnd","onDisplay","transition","_transition","tintColor","_tintColor","cachePolicy","_cachePolicy","recyclingKey","_recyclingKey","style","rest","placeholderValue","placeholderUri","loadedUri","setLoadedUri","useState","useEffect","label","fetchPriority","resolvedLoading","handleLoad","event","target","currentTarget","url","currentSrc","src","naturalWidth","naturalHeight","mediaType","cacheType","requestAnimationFrame","handleError","error","overflow","children","objectFit","objectPosition","prefetch","urls","list","window","Image","Promise","resolve","all","image","onload","onerror","then","results","every","Boolean","Component","resizeModePropName","objectPositionPropName","mapObjectFitToResizeMode"],"sourceRoot":"../../../src","sources":["Image/Image.tsx"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ import { Image as ExpoImage } from "expo-image";
4
+ import { createImage } from "./createImage";
5
+ import { objectFitToContentFit } from "./shared";
6
+
7
+ /**
8
+ * Native `Image` (iOS / Android), backed by
9
+ * [expo-image](https://docs.expo.dev/versions/latest/sdk/image/). The web twin
10
+ * (`Image.tsx`) renders its own `<img>` with the same props: expo-image's web
11
+ * build mounts its `<img>` only after an effect and replays the fade on every
12
+ * mount, so an image the browser already had blinked each time it came back.
13
+ *
14
+ * On top of expo-image's full prop surface (`transition`, `placeholder`,
15
+ * `cachePolicy`, `tintColor`, `blurRadius`, `priority`, …) it adds the unified,
16
+ * Mantine-compatible API: `src`, `fit`/`objectFit` (→ `contentFit`),
17
+ * `objectPosition` (→ `contentPosition`), `radius`, `fallbackSrc`, plus Tamagui
18
+ * styling props (`w`, `h`, `bg`, token names). expo-image's static methods
19
+ * (`Image.prefetch`, `Image.clearMemoryCache`, …) are forwarded as-is.
20
+ *
21
+ * @example
22
+ * <Image
23
+ * src="https://example.com/photo.jpg"
24
+ * fallbackSrc="https://example.com/placeholder.jpg"
25
+ * fit="cover"
26
+ * radius="md"
27
+ * transition={300}
28
+ * w={320}
29
+ * h={180}
30
+ * />
31
+ */
32
+ export const Image = createImage({
33
+ Component: ExpoImage,
34
+ resizeModePropName: "contentFit",
35
+ objectPositionPropName: "contentPosition",
36
+ mapObjectFitToResizeMode: objectFitToContentFit
37
+ });
38
+ //# sourceMappingURL=Image.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Image","ExpoImage","createImage","objectFitToContentFit","Component","resizeModePropName","objectPositionPropName","mapObjectFitToResizeMode"],"sourceRoot":"../../../src","sources":["Image/Image.native.tsx"],"mappings":";;AAAA,SAASA,KAAK,IAAIC,SAAS,QAAQ,YAAY;AAE/C,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,qBAAqB,QAAQ,UAAU;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMH,KAAK,GAAGE,WAAW,CAAC;EAC/BE,SAAS,EAAEH,SAAS;EACpBI,kBAAkB,EAAE,YAAY;EAChCC,sBAAsB,EAAE,iBAAiB;EACzCC,wBAAwB,EAAEJ;AAC5B,CAAC,CAAC","ignoreList":[]}
@@ -1,20 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  import * as React from "react";
4
- import { getTokenValue, isWeb, styled, View, withStaticProperties } from "@knitui/core";
4
+ import { isWeb, resolveToken, styleable, styled, View, withStaticProperties } from "@knitui/core";
5
5
  import { useCallbackRef, useMergedRef } from "@knitui/hooks";
6
+ import { shadowVariant } from "../internal/style-props";
6
7
  import { slotStyles } from "../internal/styles";
8
+ import { themeColorToCssVar } from "../internal/theme-color-web";
7
9
  import { attachImageStatics, normalizeContentPosition, objectFitToResizeMode, resizeModeToObjectFit, resolveSource, useImageFallback } from "./shared";
8
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
- // Radius/size token keys, matching the canonical set in internal/style-props.
10
- // Missing keys silently drop to no-radius, so this must stay in sync.
11
- const SIZE_KEYS = new Set(["xxs", "xs", "sm", "md", "lg", "xl", "xxl"]);
12
-
13
11
  /**
14
12
  * Internal alias the unified `transition` prop is forwarded under. expo-image's
15
- * `transition` (a numeric fade duration / config) collides with Tamagui v2's
13
+ * `transition` (a numeric fade duration / config) collides with Tamagui's
16
14
  * reserved `transition` animation prop: Tamagui treats ANY component where
17
- * `"transition" in props` as animated (see @tamagui/web useComponentState) and
15
+ * `"transition" in props` as animated (v3 still does) and
18
16
  * engages its animation driver. On web that driver calls `getComputedStyle(host)`,
19
17
  * but the backing expo-image host ref is not a DOM `Element`, so it throws
20
18
  * ("parameter 1 is not of type 'Element'") and blanks the tree. We therefore
@@ -69,9 +67,6 @@ const defaultTransformSource = props => {
69
67
  */
70
68
  export const resolveRadiusValue = (value, dimensions) => {
71
69
  if (typeof value === "number" || value == null) return value;
72
- if (typeof value === "object" && "isVar" in value && "val" in value) {
73
- return resolveRadiusValue(value.val, dimensions);
74
- }
75
70
  if (typeof value !== "string") return value;
76
71
 
77
72
  // Percentages (e.g. "50%" for circular avatars). expo-image's web build
@@ -91,24 +86,56 @@ export const resolveRadiusValue = (value, dimensions) => {
91
86
  const basis = w !== undefined && h !== undefined ? Math.min(w, h) : w ?? h;
92
87
  return basis !== undefined ? basis * fraction : 9999;
93
88
  }
94
- const token = value[0] === "$" ? value : SIZE_KEYS.has(value) ? `$${value}` : undefined;
95
- if (token) return getTokenValue(token, "radius");
89
+
90
+ // A radius token (`"md"`, `"radius.md"`) resolves through the active config.
91
+ const token = resolveToken(value, "radius");
92
+ if (token !== undefined) return token;
96
93
  const numericValue = Number.parseFloat(value);
97
94
  return Number.isFinite(numericValue) ? numericValue : undefined;
98
95
  };
99
96
 
97
+ /**
98
+ * Colour style props (longhand or the kit's shorthand) that v3 drops when it
99
+ * styles a NON-Tamagui host such as the image backend: theme names
100
+ * (`bg="color3"`) never reach the DOM. On web they are lifted into the inline
101
+ * style as the theme's CSS variable (theme-free, follows theme changes).
102
+ */
103
+ const COLOR_STYLE_KEYS = {
104
+ bg: "backgroundColor",
105
+ backgroundColor: "backgroundColor",
106
+ borderColor: "borderColor",
107
+ borderTopColor: "borderTopColor",
108
+ borderRightColor: "borderRightColor",
109
+ borderBottomColor: "borderBottomColor",
110
+ borderLeftColor: "borderLeftColor"
111
+ };
112
+
113
+ /** Web: pull theme-name colour props out of `rest` into an inline style block. */
114
+ function liftWebColors(rest) {
115
+ if (!isWeb) return undefined;
116
+ let lifted;
117
+ for (const key in COLOR_STYLE_KEYS) {
118
+ const value = rest[key];
119
+ if (typeof value !== "string") continue;
120
+ (lifted ??= {})[COLOR_STYLE_KEYS[key]] = themeColorToCssVar(value);
121
+ delete rest[key];
122
+ }
123
+ return lifted;
124
+ }
125
+
100
126
  /** Frames `useWebCachedImageLoad` waits for the backend to put its `<img>` in the DOM. */
101
127
  const CACHED_LOAD_MAX_FRAMES = 10;
102
128
 
103
129
  /**
104
130
  * Find the rendered `<img>` behind a backend instance on web: the instance itself
105
- * (a plain `<img>` backend), or expo-image's container `<div>` (the LAST `<img>`
106
- * in it is the current source; a placeholder node, when any, comes first).
131
+ * (a plain `<img>` backend), or the backend's container element — the kit's web
132
+ * `Image` wrapper, or expo-image's `containerViewRef` — whose LAST `<img>` is the
133
+ * current source (a placeholder node, when any, comes first).
107
134
  */
108
135
  const findWebImg = instance => {
109
136
  if (typeof HTMLElement === "undefined" || instance == null) return null;
110
137
  if (instance instanceof HTMLImageElement) return instance;
111
- const container = instance.containerViewRef?.current;
138
+ const container = instance instanceof HTMLElement ? instance : instance.containerViewRef?.current;
112
139
  if (container instanceof HTMLElement) {
113
140
  const imgs = container.querySelectorAll("img");
114
141
  return imgs.length ? imgs[imgs.length - 1] : null;
@@ -162,8 +189,12 @@ function useWebCachedImageLoad(forwardedRef, onLoad, source) {
162
189
  };
163
190
  }
164
191
 
165
- /** Resolve a `$size`-token dimension to its numeric value, passing others through. */
166
- const resolveDimension = value => typeof value === "string" && value[0] === "$" ? getTokenValue(value, "size") : value;
192
+ /**
193
+ * Resolve a size-token dimension (`"md"`) to its raw value, passing numbers and
194
+ * CSS lengths (`"100%"`, `"auto"`) through. The raw value both sizes the frame
195
+ * and, when numeric, becomes the backend source's intrinsic width/height.
196
+ */
197
+ const resolveDimension = value => typeof value === "string" ? resolveToken(value, "size") ?? value : value;
167
198
 
168
199
  /**
169
200
  * Named style slots for the composable `Image` family (Pillar B /
@@ -202,7 +233,7 @@ const IMAGE_SLOT_KEYS = ["root", "image", "fallback", "placeholder", "overlay"];
202
233
  *
203
234
  * You then get every expo-image prop (transition, placeholder, cachePolicy, …)
204
235
  * plus the unified API (`src`, `fit`/`objectFit`, `objectPosition`, `radius`,
205
- * `fallbackSrc`) and Tamagui styling (`w`, `h`, `bg`, `$token`s).
236
+ * `fallbackSrc`) and Tamagui styling (`w`, `h`, `bg`, token names like `"md"`).
206
237
  * <Image src="https://example.com/photo.jpg" fit="cover" transition={300} radius="md" />
207
238
  *
208
239
  * @example
@@ -252,7 +283,11 @@ export function createImage(options) {
252
283
  });
253
284
  });
254
285
  const StyledImage = styled(BaseComponent, {
255
- name: "Image"
286
+ displayName: "Image",
287
+ variants: {
288
+ // The shared elevation ladder (`shadow="md"`), as on `Box`.
289
+ shadow: shadowVariant
290
+ }
256
291
  }, {
257
292
  inlineProps: inlinePropsSet
258
293
  });
@@ -264,14 +299,34 @@ export function createImage(options) {
264
299
  const ImageContext = /*#__PURE__*/React.createContext(undefined);
265
300
 
266
301
  /**
267
- * The backing image — the engine. Resolves the unified API (`src`/`fit`/
268
- * `radius`/`fallbackSrc`/`objectPosition`) and the cross-platform load/error
269
- * events, then renders through the Tamagui-styled wrapper. When rendered under
270
- * an `Image.Root` it reads/updates the shared fallback state via context;
271
- * standalone it owns its own state via `useImageFallback`.
302
+ * The unified-API props: the engine's own surface plus an optional per-slot
303
+ * `styles` map and the legacy `fallbackProps` (both target the backing image).
272
304
  */
273
- const ImagePart = StyledImage.styleable((incomingProps, ref) => {
274
- const props = incomingProps;
305
+
306
+ /**
307
+ * The backing image — the engine, and also the public `Image` itself (the
308
+ * sugar used to be a separate wrapper; folding it in saves one component
309
+ * layer per image, which adds up in long lists). Resolves the unified API
310
+ * (`src`/`fit`/`radius`/`fallbackSrc`/`objectPosition`) and the
311
+ * cross-platform load/error events, then renders through the Tamagui-styled
312
+ * wrapper. When rendered under an `Image.Root` it reads/updates the shared
313
+ * fallback state via context; standalone it owns its own state via
314
+ * `useImageFallback`.
315
+ */
316
+ const ImagePart = styleable(StyledImage, function Image(incomingProps, ref) {
317
+ const {
318
+ styles,
319
+ fallbackProps,
320
+ ...direct
321
+ } = incomingProps;
322
+ // Engine props win over the per-slot sugar (explicit beats sugar); the image
323
+ // slot and the legacy `fallbackProps` are the same target. Only allocate a
324
+ // merged object when either sugar is present.
325
+ const props = styles || fallbackProps ? {
326
+ ...slotStyles(styles, IMAGE_SLOT_KEYS, "Image").get("image"),
327
+ ...fallbackProps,
328
+ ...direct
329
+ } : direct;
275
330
  const {
276
331
  src,
277
332
  source,
@@ -313,6 +368,8 @@ export function createImage(options) {
313
368
  height: resolvedHeight
314
369
  });
315
370
  const incomingStyle = Array.isArray(rest.style) ? Object.assign({}, ...rest.style.flat()) : rest.style;
371
+ // `rest` is this render's own object (a destructuring rest), safe to edit.
372
+ const liftedColors = liftWebColors(rest);
316
373
  const resolvedBorderRadius = resolveRadiusValue(radius ?? borderRadius, {
317
374
  width: resolvedWidth,
318
375
  height: resolvedHeight
@@ -348,6 +405,7 @@ export function createImage(options) {
348
405
  ...rest,
349
406
  source: finalSource,
350
407
  style: {
408
+ ...liftedColors,
351
409
  ...incomingStyle,
352
410
  ...(resolvedBorderRadius !== undefined && {
353
411
  borderRadius: resolvedBorderRadius
@@ -430,10 +488,10 @@ export function createImage(options) {
430
488
  */
431
489
 
432
490
  const RootFrame = styled(View, {
433
- name: "ImageRoot",
491
+ displayName: "ImageRoot",
434
492
  position: "relative"
435
493
  });
436
- const Root = RootFrame.styleable((props, ref) => {
494
+ const Root = styleable(RootFrame, (props, ref) => {
437
495
  // Split children out at runtime without forming `CombinedProps & {children}`
438
496
  // — that intersection overflows the checker (TS2590). The remaining props are
439
497
  // the unified image API, re-typed for the `.src`/`.source` reads below.
@@ -482,7 +540,7 @@ export function createImage(options) {
482
540
  * (and no usable `fallbackSrc` rendered). Layers absolutely over the image.
483
541
  */
484
542
  const FallbackFrame = styled(View, {
485
- name: "ImageFallback",
543
+ displayName: "ImageFallback",
486
544
  position: "absolute",
487
545
  top: 0,
488
546
  left: 0,
@@ -491,7 +549,7 @@ export function createImage(options) {
491
549
  alignItems: "center",
492
550
  justifyContent: "center"
493
551
  });
494
- const Fallback = FallbackFrame.styleable((props, ref) => {
552
+ const Fallback = styleable(FallbackFrame, (props, ref) => {
495
553
  const ctx = React.useContext(ImageContext);
496
554
  if (ctx && !ctx.errored) return null;
497
555
  return /*#__PURE__*/_jsx(FallbackFrame, {
@@ -505,7 +563,7 @@ export function createImage(options) {
505
563
  * displayed and has not errored. Layers absolutely over the image.
506
564
  */
507
565
  const PlaceholderFrame = styled(View, {
508
- name: "ImagePlaceholder",
566
+ displayName: "ImagePlaceholder",
509
567
  position: "absolute",
510
568
  top: 0,
511
569
  left: 0,
@@ -514,7 +572,7 @@ export function createImage(options) {
514
572
  alignItems: "center",
515
573
  justifyContent: "center"
516
574
  });
517
- const Placeholder = PlaceholderFrame.styleable((props, ref) => {
575
+ const Placeholder = styleable(PlaceholderFrame, (props, ref) => {
518
576
  const ctx = React.useContext(ImageContext);
519
577
  if (ctx && (ctx.loaded || ctx.errored)) return null;
520
578
  return /*#__PURE__*/_jsx(PlaceholderFrame, {
@@ -528,39 +586,14 @@ export function createImage(options) {
528
586
  * captions). Unlike `Fallback`/`Placeholder` it does not depend on load state.
529
587
  */
530
588
  const Overlay = styled(View, {
531
- name: "ImageOverlay",
589
+ displayName: "ImageOverlay",
532
590
  position: "absolute",
533
591
  top: 0,
534
592
  left: 0,
535
593
  right: 0,
536
594
  bottom: 0
537
595
  });
538
-
539
- /**
540
- * The unified-API sugar. Thin wrapper over the engine: it accepts the classic
541
- * `<Image src=… fallbackSrc=… />` surface (rendering the backing image
542
- * directly so the host `<img>` stays the queryable/ref'd element), plus an
543
- * optional per-slot `styles` map and `fallbackProps`. For multi-layer
544
- * composition use the `Image.Root` + parts form.
545
- */
546
-
547
- const ImageComponent = StyledImage.styleable((incomingProps, ref) => {
548
- const {
549
- styles,
550
- fallbackProps,
551
- ...rest
552
- } = incomingProps;
553
- const s = slotStyles(styles, IMAGE_SLOT_KEYS, "Image");
554
- // Engine props win over the per-slot sugar (explicit beats sugar); the
555
- // image slot and the legacy `fallbackProps` are the same target.
556
- return /*#__PURE__*/_jsx(ImagePartLoose, {
557
- ref: ref,
558
- ...s.get("image"),
559
- ...fallbackProps,
560
- ...rest
561
- });
562
- });
563
- const ImageWithParts = withStaticProperties(ImageComponent, {
596
+ const ImageWithParts = withStaticProperties(ImagePart, {
564
597
  Root,
565
598
  Image: ImagePart,
566
599
  Fallback,