@ankhorage/surface 4.2.0 → 4.3.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 (623) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/field/Field.js +1 -1
  3. package/dist/components/field/Field.js.map +1 -1
  4. package/dist/components/helper-text/HelperText.js +1 -1
  5. package/dist/components/helper-text/HelperText.js.map +1 -1
  6. package/dist/components/label/Label.js +1 -1
  7. package/dist/components/label/Label.js.map +1 -1
  8. package/dist/components/list-item/ListItem.js +2 -2
  9. package/dist/components/list-item/ListItem.js.map +1 -1
  10. package/dist/components/menu/Menu.d.ts.map +1 -1
  11. package/dist/components/menu/Menu.js +4 -2
  12. package/dist/components/menu/Menu.js.map +1 -1
  13. package/dist/components/modal/Modal.d.ts.map +1 -1
  14. package/dist/components/modal/Modal.js +2 -1
  15. package/dist/components/modal/Modal.js.map +1 -1
  16. package/dist/components/switch/Switch.js +2 -2
  17. package/dist/components/switch/Switch.js.map +1 -1
  18. package/dist/components/tabs/Tab.js +2 -2
  19. package/dist/components/tabs/Tab.js.map +1 -1
  20. package/dist/components/tabs/TabList.js +1 -1
  21. package/dist/components/tabs/TabList.js.map +1 -1
  22. package/dist/components/tabs/Tabs.js +1 -1
  23. package/dist/components/tabs/Tabs.js.map +1 -1
  24. package/dist/components/textarea/Textarea.js +1 -1
  25. package/dist/components/textarea/Textarea.js.map +1 -1
  26. package/dist/components/textarea/types.d.ts +1 -1
  27. package/dist/components/textarea/types.d.ts.map +1 -1
  28. package/dist/components/textarea/types.js.map +1 -1
  29. package/dist/components/toast/Toast.d.ts.map +1 -1
  30. package/dist/components/toast/Toast.js +4 -2
  31. package/dist/components/toast/Toast.js.map +1 -1
  32. package/dist/components/toast/ToastProvider.js +1 -1
  33. package/dist/components/toast/ToastProvider.js.map +1 -1
  34. package/dist/components/tooltip/Tooltip.js +2 -2
  35. package/dist/components/tooltip/Tooltip.js.map +1 -1
  36. package/dist/examples/DocsExamples.js +6 -6
  37. package/dist/examples/DocsExamples.js.map +1 -1
  38. package/dist/features/accordion/adapters/inbound/Accordion.d.ts +5 -0
  39. package/dist/features/accordion/adapters/inbound/Accordion.d.ts.map +1 -0
  40. package/dist/features/accordion/adapters/inbound/Accordion.js +46 -0
  41. package/dist/features/accordion/adapters/inbound/Accordion.js.map +1 -0
  42. package/dist/features/accordion/adapters/inbound/AccordionContent.d.ts +5 -0
  43. package/dist/features/accordion/adapters/inbound/AccordionContent.d.ts.map +1 -0
  44. package/dist/features/accordion/adapters/inbound/AccordionContent.js +16 -0
  45. package/dist/features/accordion/adapters/inbound/AccordionContent.js.map +1 -0
  46. package/dist/features/accordion/adapters/inbound/AccordionContext.d.ts +4 -0
  47. package/dist/features/accordion/adapters/inbound/AccordionContext.d.ts.map +1 -0
  48. package/dist/features/accordion/adapters/inbound/AccordionContext.js +3 -0
  49. package/dist/features/accordion/adapters/inbound/AccordionContext.js.map +1 -0
  50. package/dist/features/accordion/adapters/inbound/AccordionItem.d.ts +5 -0
  51. package/dist/features/accordion/adapters/inbound/AccordionItem.d.ts.map +1 -0
  52. package/dist/features/accordion/adapters/inbound/AccordionItem.js +28 -0
  53. package/dist/features/accordion/adapters/inbound/AccordionItem.js.map +1 -0
  54. package/dist/features/accordion/adapters/inbound/AccordionItemContext.d.ts +4 -0
  55. package/dist/features/accordion/adapters/inbound/AccordionItemContext.d.ts.map +1 -0
  56. package/dist/features/accordion/adapters/inbound/AccordionItemContext.js +3 -0
  57. package/dist/features/accordion/adapters/inbound/AccordionItemContext.js.map +1 -0
  58. package/dist/features/accordion/adapters/inbound/AccordionTrigger.d.ts +5 -0
  59. package/dist/features/accordion/adapters/inbound/AccordionTrigger.d.ts.map +1 -0
  60. package/dist/features/accordion/adapters/inbound/AccordionTrigger.js +17 -0
  61. package/dist/features/accordion/adapters/inbound/AccordionTrigger.js.map +1 -0
  62. package/dist/features/accordion/public.d.ts +6 -0
  63. package/dist/features/accordion/public.d.ts.map +1 -0
  64. package/dist/features/accordion/public.js +5 -0
  65. package/dist/features/accordion/public.js.map +1 -0
  66. package/dist/features/accordion/utils/resolveAccordionToggle.d.ts +11 -0
  67. package/dist/features/accordion/utils/resolveAccordionToggle.d.ts.map +1 -0
  68. package/dist/features/accordion/utils/resolveAccordionToggle.js +13 -0
  69. package/dist/features/accordion/utils/resolveAccordionToggle.js.map +1 -0
  70. package/dist/features/badge/adapters/inbound/Badge.d.ts +5 -0
  71. package/dist/features/badge/adapters/inbound/Badge.d.ts.map +1 -0
  72. package/dist/features/badge/adapters/inbound/Badge.js +30 -0
  73. package/dist/features/badge/adapters/inbound/Badge.js.map +1 -0
  74. package/dist/features/badge/public.d.ts +3 -0
  75. package/dist/features/badge/public.d.ts.map +1 -0
  76. package/dist/features/badge/public.js +2 -0
  77. package/dist/features/badge/public.js.map +1 -0
  78. package/dist/{components/button → features/button/adapters/inbound}/Button.d.ts +2 -1
  79. package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -0
  80. package/dist/features/button/adapters/inbound/Button.js +60 -0
  81. package/dist/features/button/adapters/inbound/Button.js.map +1 -0
  82. package/dist/{components/icon-button → features/button/adapters/inbound}/IconButton.d.ts +2 -1
  83. package/dist/features/button/adapters/inbound/IconButton.d.ts.map +1 -0
  84. package/dist/features/button/adapters/inbound/IconButton.js +33 -0
  85. package/dist/features/button/adapters/inbound/IconButton.js.map +1 -0
  86. package/dist/features/button/public.d.ts +4 -0
  87. package/dist/features/button/public.d.ts.map +1 -0
  88. package/dist/features/button/public.js +3 -0
  89. package/dist/features/button/public.js.map +1 -0
  90. package/dist/features/card/adapters/inbound/Card.d.ts +5 -0
  91. package/dist/features/card/adapters/inbound/Card.d.ts.map +1 -0
  92. package/dist/features/card/adapters/inbound/Card.js +44 -0
  93. package/dist/features/card/adapters/inbound/Card.js.map +1 -0
  94. package/dist/features/card/public.d.ts +3 -0
  95. package/dist/features/card/public.d.ts.map +1 -0
  96. package/dist/features/card/public.js +2 -0
  97. package/dist/features/card/public.js.map +1 -0
  98. package/dist/features/form/checkbox/adapters/inbound/Checkbox.d.ts +5 -0
  99. package/dist/features/form/checkbox/adapters/inbound/Checkbox.d.ts.map +1 -0
  100. package/dist/features/form/checkbox/adapters/inbound/Checkbox.js +88 -0
  101. package/dist/features/form/checkbox/adapters/inbound/Checkbox.js.map +1 -0
  102. package/dist/features/form/checkbox/public.d.ts +3 -0
  103. package/dist/features/form/checkbox/public.d.ts.map +1 -0
  104. package/dist/features/form/checkbox/public.js +2 -0
  105. package/dist/features/form/checkbox/public.js.map +1 -0
  106. package/dist/features/form/radio/adapters/inbound/Radio.d.ts +5 -0
  107. package/dist/features/form/radio/adapters/inbound/Radio.d.ts.map +1 -0
  108. package/dist/features/form/radio/adapters/inbound/Radio.js +91 -0
  109. package/dist/features/form/radio/adapters/inbound/Radio.js.map +1 -0
  110. package/dist/features/form/radio/public.d.ts +3 -0
  111. package/dist/features/form/radio/public.d.ts.map +1 -0
  112. package/dist/features/form/radio/public.js +2 -0
  113. package/dist/features/form/radio/public.js.map +1 -0
  114. package/dist/features/form/radio/utils/isRadioTextContent.d.ts +4 -0
  115. package/dist/features/form/radio/utils/isRadioTextContent.d.ts.map +1 -0
  116. package/dist/features/form/radio/utils/isRadioTextContent.js +5 -0
  117. package/dist/features/form/radio/utils/isRadioTextContent.js.map +1 -0
  118. package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts +5 -0
  119. package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -0
  120. package/dist/features/form/text-input/adapters/inbound/TextInput.js +41 -0
  121. package/dist/features/form/text-input/adapters/inbound/TextInput.js.map +1 -0
  122. package/dist/features/form/text-input/public.d.ts +3 -0
  123. package/dist/features/form/text-input/public.d.ts.map +1 -0
  124. package/dist/features/form/text-input/public.js +2 -0
  125. package/dist/features/form/text-input/public.js.map +1 -0
  126. package/dist/features/form/text-input/utils/resolveTextInputPresentation.d.ts +15 -0
  127. package/dist/features/form/text-input/utils/resolveTextInputPresentation.d.ts.map +1 -0
  128. package/dist/features/form/text-input/utils/resolveTextInputPresentation.js +56 -0
  129. package/dist/features/form/text-input/utils/resolveTextInputPresentation.js.map +1 -0
  130. package/dist/features/icon/adapters/inbound/Icon.d.ts +4 -0
  131. package/dist/features/icon/adapters/inbound/Icon.d.ts.map +1 -0
  132. package/dist/{primitives/icon → features/icon/adapters/inbound}/Icon.js +3 -3
  133. package/dist/features/icon/adapters/inbound/Icon.js.map +1 -0
  134. package/dist/features/icon/adapters/inbound/PortableIcon.d.ts +19 -0
  135. package/dist/features/icon/adapters/inbound/PortableIcon.d.ts.map +1 -0
  136. package/dist/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.js +37 -43
  137. package/dist/features/icon/adapters/inbound/PortableIcon.js.map +1 -0
  138. package/dist/features/icon/constants.d.ts +2 -0
  139. package/dist/features/icon/constants.d.ts.map +1 -0
  140. package/dist/features/icon/constants.js +8 -0
  141. package/dist/features/icon/constants.js.map +1 -0
  142. package/dist/features/icon/public.d.ts +4 -0
  143. package/dist/features/icon/public.d.ts.map +1 -0
  144. package/dist/features/icon/public.js +3 -0
  145. package/dist/features/icon/public.js.map +1 -0
  146. package/dist/{primitives/image → features/image/adapters/inbound}/Image.d.ts +2 -1
  147. package/dist/features/image/adapters/inbound/Image.d.ts.map +1 -0
  148. package/dist/features/image/adapters/inbound/Image.js +28 -0
  149. package/dist/features/image/adapters/inbound/Image.js.map +1 -0
  150. package/dist/features/image/public.d.ts +3 -0
  151. package/dist/features/image/public.d.ts.map +1 -0
  152. package/dist/features/image/public.js +2 -0
  153. package/dist/features/image/public.js.map +1 -0
  154. package/dist/features/image/utils/getSourceKey.d.ts +4 -0
  155. package/dist/features/image/utils/getSourceKey.d.ts.map +1 -0
  156. package/dist/features/image/utils/getSourceKey.js +33 -0
  157. package/dist/features/image/utils/getSourceKey.js.map +1 -0
  158. package/dist/features/image/utils/normalizeSource.d.ts +5 -0
  159. package/dist/features/image/utils/normalizeSource.d.ts.map +1 -0
  160. package/dist/features/image/utils/normalizeSource.js +9 -0
  161. package/dist/features/image/utils/normalizeSource.js.map +1 -0
  162. package/dist/features/image/utils/resolveAccessibilityLabel.d.ts +4 -0
  163. package/dist/features/image/utils/resolveAccessibilityLabel.d.ts.map +1 -0
  164. package/dist/features/image/utils/resolveAccessibilityLabel.js +5 -0
  165. package/dist/features/image/utils/resolveAccessibilityLabel.js.map +1 -0
  166. package/dist/features/image/utils/resolveAlt.d.ts +4 -0
  167. package/dist/features/image/utils/resolveAlt.d.ts.map +1 -0
  168. package/dist/features/image/utils/resolveAlt.js +5 -0
  169. package/dist/features/image/utils/resolveAlt.js.map +1 -0
  170. package/dist/features/image/utils/resolveImageStyle.d.ts +6 -0
  171. package/dist/features/image/utils/resolveImageStyle.d.ts.map +1 -0
  172. package/dist/features/image/utils/resolveImageStyle.js +15 -0
  173. package/dist/features/image/utils/resolveImageStyle.js.map +1 -0
  174. package/dist/features/image/utils/resolveRenderedSource.d.ts +4 -0
  175. package/dist/features/image/utils/resolveRenderedSource.d.ts.map +1 -0
  176. package/dist/features/image/utils/resolveRenderedSource.js +7 -0
  177. package/dist/features/image/utils/resolveRenderedSource.js.map +1 -0
  178. package/dist/features/image/utils/resolveResizeMode.d.ts +5 -0
  179. package/dist/features/image/utils/resolveResizeMode.d.ts.map +1 -0
  180. package/dist/features/image/utils/resolveResizeMode.js +5 -0
  181. package/dist/features/image/utils/resolveResizeMode.js.map +1 -0
  182. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts +5 -0
  183. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts.map +1 -0
  184. package/dist/{layout → features/keyboard-avoiding-view/adapters/inbound}/KeyboardAvoidingView.js +2 -2
  185. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.js.map +1 -0
  186. package/dist/features/keyboard-avoiding-view/public.d.ts +3 -0
  187. package/dist/features/keyboard-avoiding-view/public.d.ts.map +1 -0
  188. package/dist/features/keyboard-avoiding-view/public.js +2 -0
  189. package/dist/features/keyboard-avoiding-view/public.js.map +1 -0
  190. package/dist/features/layout/adapters/inbound/Box.d.ts +5 -0
  191. package/dist/features/layout/adapters/inbound/Box.d.ts.map +1 -0
  192. package/dist/{layout → features/layout/adapters/inbound}/Box.js +5 -4
  193. package/dist/features/layout/adapters/inbound/Box.js.map +1 -0
  194. package/dist/features/layout/adapters/inbound/Container.d.ts +5 -0
  195. package/dist/features/layout/adapters/inbound/Container.d.ts.map +1 -0
  196. package/dist/features/layout/adapters/inbound/Container.js +28 -0
  197. package/dist/features/layout/adapters/inbound/Container.js.map +1 -0
  198. package/dist/features/layout/adapters/inbound/Divider.d.ts +5 -0
  199. package/dist/features/layout/adapters/inbound/Divider.d.ts.map +1 -0
  200. package/dist/{layout → features/layout/adapters/inbound}/Divider.js +1 -0
  201. package/dist/features/layout/adapters/inbound/Divider.js.map +1 -0
  202. package/dist/features/layout/adapters/inbound/Grid.d.ts +5 -0
  203. package/dist/features/layout/adapters/inbound/Grid.d.ts.map +1 -0
  204. package/dist/features/layout/adapters/inbound/Grid.js +48 -0
  205. package/dist/features/layout/adapters/inbound/Grid.js.map +1 -0
  206. package/dist/features/layout/adapters/inbound/Stack.d.ts +5 -0
  207. package/dist/features/layout/adapters/inbound/Stack.d.ts.map +1 -0
  208. package/dist/{layout → features/layout/adapters/inbound}/Stack.js +4 -3
  209. package/dist/features/layout/adapters/inbound/Stack.js.map +1 -0
  210. package/dist/features/layout/public.d.ts +7 -0
  211. package/dist/features/layout/public.d.ts.map +1 -0
  212. package/dist/features/layout/public.js +6 -0
  213. package/dist/features/layout/public.js.map +1 -0
  214. package/dist/features/surface/adapters/inbound/Surface.d.ts +5 -0
  215. package/dist/features/surface/adapters/inbound/Surface.d.ts.map +1 -0
  216. package/dist/{layout → features/surface/adapters/inbound}/Surface.js +17 -28
  217. package/dist/features/surface/adapters/inbound/Surface.js.map +1 -0
  218. package/dist/features/surface/public.d.ts +3 -0
  219. package/dist/features/surface/public.d.ts.map +1 -0
  220. package/dist/features/surface/public.js +2 -0
  221. package/dist/features/surface/public.js.map +1 -0
  222. package/dist/features/typography/adapters/inbound/Heading.d.ts +5 -0
  223. package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -0
  224. package/dist/features/typography/adapters/inbound/Heading.js +29 -0
  225. package/dist/features/typography/adapters/inbound/Heading.js.map +1 -0
  226. package/dist/{primitives/text → features/typography/adapters/inbound}/Text.d.ts +2 -1
  227. package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -0
  228. package/dist/{primitives/text → features/typography/adapters/inbound}/Text.js +18 -25
  229. package/dist/features/typography/adapters/inbound/Text.js.map +1 -0
  230. package/dist/features/typography/public.d.ts +4 -0
  231. package/dist/features/typography/public.d.ts.map +1 -0
  232. package/dist/features/typography/public.js +3 -0
  233. package/dist/features/typography/public.js.map +1 -0
  234. package/dist/features/typography/utils/resolveHeadingTextStyle.d.ts +7 -0
  235. package/dist/features/typography/utils/resolveHeadingTextStyle.d.ts.map +1 -0
  236. package/dist/features/typography/utils/resolveHeadingTextStyle.js +10 -0
  237. package/dist/features/typography/utils/resolveHeadingTextStyle.js.map +1 -0
  238. package/dist/index.d.ts +26 -22
  239. package/dist/index.d.ts.map +1 -1
  240. package/dist/index.js +13 -11
  241. package/dist/index.js.map +1 -1
  242. package/dist/layout/AppBar.d.ts +1 -1
  243. package/dist/layout/AppBar.d.ts.map +1 -1
  244. package/dist/layout/AppBar.js +1 -2
  245. package/dist/layout/AppBar.js.map +1 -1
  246. package/dist/layout/Center.d.ts +1 -1
  247. package/dist/layout/Center.d.ts.map +1 -1
  248. package/dist/layout/Center.js +1 -1
  249. package/dist/layout/Center.js.map +1 -1
  250. package/dist/layout/Inline.d.ts +1 -1
  251. package/dist/layout/Inline.d.ts.map +1 -1
  252. package/dist/layout/Inline.js +1 -1
  253. package/dist/layout/Inline.js.map +1 -1
  254. package/dist/layout/ScrollArea.d.ts +1 -1
  255. package/dist/layout/ScrollArea.d.ts.map +1 -1
  256. package/dist/layout/ScrollArea.js +1 -1
  257. package/dist/layout/ScrollArea.js.map +1 -1
  258. package/dist/layout/Spacer.d.ts +1 -1
  259. package/dist/layout/Spacer.d.ts.map +1 -1
  260. package/dist/layout/Spacer.js +1 -1
  261. package/dist/layout/Spacer.js.map +1 -1
  262. package/dist/layout/Template.d.ts +2 -2
  263. package/dist/layout/Template.d.ts.map +1 -1
  264. package/dist/layout/Template.js +2 -2
  265. package/dist/layout/Template.js.map +1 -1
  266. package/dist/layout/index.d.ts +0 -14
  267. package/dist/layout/index.d.ts.map +1 -1
  268. package/dist/layout/index.js +0 -7
  269. package/dist/layout/index.js.map +1 -1
  270. package/dist/primitives/button-base/ButtonBase.js +1 -1
  271. package/dist/primitives/button-base/ButtonBase.js.map +1 -1
  272. package/dist/primitives/button-base/types.d.ts +1 -1
  273. package/dist/primitives/button-base/types.d.ts.map +1 -1
  274. package/dist/primitives/button-base/types.js.map +1 -1
  275. package/dist/types/accordion.d.ts +54 -0
  276. package/dist/types/accordion.d.ts.map +1 -0
  277. package/dist/types/accordion.js +2 -0
  278. package/dist/types/accordion.js.map +1 -0
  279. package/dist/types/badge.d.ts +12 -0
  280. package/dist/types/badge.d.ts.map +1 -0
  281. package/dist/types/badge.js +2 -0
  282. package/dist/types/badge.js.map +1 -0
  283. package/dist/types/button.d.ts +25 -0
  284. package/dist/types/button.d.ts.map +1 -0
  285. package/dist/types/button.js +2 -0
  286. package/dist/types/button.js.map +1 -0
  287. package/dist/{components/card/types.d.ts → types/card.d.ts} +2 -2
  288. package/dist/types/card.d.ts.map +1 -0
  289. package/dist/types/card.js +2 -0
  290. package/dist/types/card.js.map +1 -0
  291. package/dist/{components/checkbox/types.d.ts → types/checkbox.d.ts} +4 -4
  292. package/dist/types/checkbox.d.ts.map +1 -0
  293. package/dist/types/checkbox.js +2 -0
  294. package/dist/types/checkbox.js.map +1 -0
  295. package/dist/types/icon.d.ts +66 -0
  296. package/dist/types/icon.d.ts.map +1 -0
  297. package/dist/types/icon.js +2 -0
  298. package/dist/types/icon.js.map +1 -0
  299. package/dist/{primitives/image/types.d.ts → types/image.d.ts} +3 -4
  300. package/dist/types/image.d.ts.map +1 -0
  301. package/dist/types/image.js +2 -0
  302. package/dist/types/image.js.map +1 -0
  303. package/dist/types/keyboard-avoiding-view.d.ts +4 -0
  304. package/dist/types/keyboard-avoiding-view.d.ts.map +1 -0
  305. package/dist/types/keyboard-avoiding-view.js +2 -0
  306. package/dist/types/keyboard-avoiding-view.js.map +1 -0
  307. package/dist/{layout/helpers.d.ts → types/layout.d.ts} +39 -5
  308. package/dist/types/layout.d.ts.map +1 -0
  309. package/dist/types/layout.js +2 -0
  310. package/dist/types/layout.js.map +1 -0
  311. package/dist/{components/radio/types.d.ts → types/radio.d.ts} +4 -4
  312. package/dist/types/radio.d.ts.map +1 -0
  313. package/dist/types/radio.js +2 -0
  314. package/dist/types/radio.js.map +1 -0
  315. package/dist/types/surface.d.ts +6 -0
  316. package/dist/types/surface.d.ts.map +1 -0
  317. package/dist/types/surface.js +2 -0
  318. package/dist/types/surface.js.map +1 -0
  319. package/dist/{components/text-input/types.d.ts → types/text-input.d.ts} +3 -3
  320. package/dist/types/text-input.d.ts.map +1 -0
  321. package/dist/types/text-input.js +2 -0
  322. package/dist/types/text-input.js.map +1 -0
  323. package/dist/types/typography.d.ts +29 -0
  324. package/dist/types/typography.d.ts.map +1 -0
  325. package/dist/types/typography.js +2 -0
  326. package/dist/types/typography.js.map +1 -0
  327. package/dist/utils/resolveBoxStyles.d.ts +7 -0
  328. package/dist/utils/resolveBoxStyles.d.ts.map +1 -0
  329. package/dist/utils/resolveBoxStyles.js +83 -0
  330. package/dist/utils/resolveBoxStyles.js.map +1 -0
  331. package/dist/utils/resolveSpacing.d.ts +5 -0
  332. package/dist/utils/resolveSpacing.d.ts.map +1 -0
  333. package/dist/utils/resolveSpacing.js +6 -0
  334. package/dist/utils/resolveSpacing.js.map +1 -0
  335. package/package.json +1 -1
  336. package/src/components/field/Field.tsx +1 -1
  337. package/src/components/helper-text/HelperText.tsx +1 -1
  338. package/src/components/label/Label.tsx +1 -1
  339. package/src/components/list-item/ListItem.tsx +2 -2
  340. package/src/components/menu/Menu.tsx +4 -2
  341. package/src/components/modal/Modal.tsx +2 -1
  342. package/src/components/switch/Switch.tsx +2 -2
  343. package/src/components/tabs/Tab.tsx +2 -2
  344. package/src/components/tabs/TabList.tsx +1 -1
  345. package/src/components/tabs/Tabs.tsx +1 -1
  346. package/src/components/textarea/Textarea.tsx +1 -1
  347. package/src/components/textarea/types.ts +1 -1
  348. package/src/components/toast/Toast.tsx +4 -2
  349. package/src/components/toast/ToastProvider.tsx +1 -1
  350. package/src/components/tooltip/Tooltip.tsx +2 -2
  351. package/src/examples/DocsExamples.tsx +6 -6
  352. package/src/features/accordion/adapters/inbound/Accordion.tsx +83 -0
  353. package/src/features/accordion/adapters/inbound/AccordionContent.tsx +30 -0
  354. package/src/features/accordion/adapters/inbound/AccordionContext.ts +5 -0
  355. package/src/features/accordion/adapters/inbound/AccordionItem.tsx +42 -0
  356. package/src/features/accordion/adapters/inbound/AccordionItemContext.ts +5 -0
  357. package/src/features/accordion/adapters/inbound/AccordionTrigger.tsx +34 -0
  358. package/src/features/accordion/public.ts +13 -0
  359. package/src/features/accordion/utils/resolveAccordionToggle.test.ts +57 -0
  360. package/src/features/accordion/utils/resolveAccordionToggle.ts +28 -0
  361. package/src/features/badge/adapters/inbound/Badge.tsx +58 -0
  362. package/src/features/badge/public.ts +2 -0
  363. package/src/features/button/adapters/inbound/Button.tsx +159 -0
  364. package/src/features/button/adapters/inbound/IconButton.tsx +69 -0
  365. package/src/features/button/public.ts +3 -0
  366. package/src/features/card/adapters/inbound/Card.tsx +88 -0
  367. package/src/features/card/public.ts +2 -0
  368. package/src/features/form/checkbox/adapters/inbound/Checkbox.tsx +207 -0
  369. package/src/features/form/checkbox/public.ts +2 -0
  370. package/src/{components/radio → features/form/radio/adapters/inbound}/Radio.test.ts +5 -5
  371. package/src/features/form/radio/adapters/inbound/Radio.tsx +214 -0
  372. package/src/features/form/radio/public.ts +2 -0
  373. package/src/{components/radio → features/form/radio/utils}/isRadioTextContent.ts +1 -3
  374. package/src/features/form/text-input/adapters/inbound/TextInput.tsx +72 -0
  375. package/src/features/form/text-input/public.ts +2 -0
  376. package/src/features/form/text-input/utils/resolveTextInputPresentation.ts +91 -0
  377. package/src/features/icon/adapters/inbound/Icon.tsx +14 -0
  378. package/src/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.tsx +41 -97
  379. package/src/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.web.test.tsx +6 -10
  380. package/src/features/icon/constants.ts +9 -0
  381. package/src/features/icon/public.ts +10 -0
  382. package/src/features/image/adapters/inbound/Image.tsx +55 -0
  383. package/src/features/image/public.ts +2 -0
  384. package/src/features/image/utils/getSourceKey.ts +32 -0
  385. package/src/features/image/utils/normalizeSource.ts +12 -0
  386. package/src/features/image/utils/resolveAccessibilityLabel.ts +9 -0
  387. package/src/features/image/utils/resolveAlt.ts +9 -0
  388. package/src/{primitives/image → features/image/utils}/resolveImageProps.test.ts +10 -22
  389. package/src/features/image/utils/resolveImageStyle.ts +23 -0
  390. package/src/features/image/utils/resolveRenderedSource.ts +11 -0
  391. package/src/features/image/utils/resolveResizeMode.ts +11 -0
  392. package/src/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.tsx +9 -0
  393. package/src/features/keyboard-avoiding-view/public.ts +5 -0
  394. package/src/{layout → features/layout/adapters/inbound}/Box.tsx +7 -15
  395. package/src/features/layout/adapters/inbound/Container.tsx +43 -0
  396. package/src/{layout → features/layout/adapters/inbound}/Divider.tsx +3 -8
  397. package/src/features/layout/adapters/inbound/Grid.tsx +78 -0
  398. package/src/{layout → features/layout/adapters/inbound}/Stack.test.ts +0 -1
  399. package/src/{layout → features/layout/adapters/inbound}/Stack.tsx +6 -15
  400. package/src/features/layout/public.ts +12 -0
  401. package/src/{layout → features/surface/adapters/inbound}/Surface.tsx +24 -41
  402. package/src/features/surface/public.ts +2 -0
  403. package/src/{primitives/heading → features/typography/adapters/inbound}/Heading.tsx +35 -38
  404. package/src/{primitives/text → features/typography/adapters/inbound}/Text.tsx +25 -35
  405. package/src/features/typography/public.ts +3 -0
  406. package/src/{primitives/heading/resolveHeadingStyle.test.ts → features/typography/utils/resolveHeadingTextStyle.test.ts} +5 -12
  407. package/src/features/typography/utils/resolveHeadingTextStyle.ts +21 -0
  408. package/src/index.test.ts +58 -28
  409. package/src/index.ts +52 -26
  410. package/src/layout/AppBar.tsx +1 -2
  411. package/src/layout/Center.tsx +1 -1
  412. package/src/layout/Inline.tsx +1 -1
  413. package/src/layout/ScrollArea.tsx +2 -1
  414. package/src/layout/Spacer.tsx +2 -2
  415. package/src/layout/Template.tsx +3 -2
  416. package/src/layout/index.ts +0 -17
  417. package/src/primitives/button-base/ButtonBase.tsx +1 -1
  418. package/src/primitives/button-base/types.ts +1 -1
  419. package/src/types/accordion.ts +69 -0
  420. package/src/{components/badge/types.ts → types/badge.ts} +3 -3
  421. package/src/types/button.ts +34 -0
  422. package/src/{components/card/types.ts → types/card.ts} +1 -1
  423. package/src/{components/checkbox/types.ts → types/checkbox.ts} +3 -3
  424. package/src/types/icon.ts +52 -0
  425. package/src/{primitives/image/types.ts → types/image.ts} +3 -3
  426. package/src/types/keyboard-avoiding-view.ts +6 -0
  427. package/src/types/layout.ts +96 -0
  428. package/src/{components/radio/types.ts → types/radio.ts} +3 -3
  429. package/src/types/surface.ts +7 -0
  430. package/src/{components/text-input/types.ts → types/text-input.ts} +2 -2
  431. package/src/types/typography.ts +32 -0
  432. package/src/{layout/helpers.test.ts → utils/resolveBoxStyles.test.ts} +8 -25
  433. package/src/utils/resolveBoxStyles.ts +135 -0
  434. package/src/utils/resolveSpacing.ts +11 -0
  435. package/src/webAcceptance.test.tsx +2 -3
  436. package/dist/components/badge/Badge.d.ts +0 -4
  437. package/dist/components/badge/Badge.d.ts.map +0 -1
  438. package/dist/components/badge/Badge.js +0 -30
  439. package/dist/components/badge/Badge.js.map +0 -1
  440. package/dist/components/badge/index.d.ts +0 -3
  441. package/dist/components/badge/index.d.ts.map +0 -1
  442. package/dist/components/badge/index.js +0 -2
  443. package/dist/components/badge/index.js.map +0 -1
  444. package/dist/components/badge/types.d.ts +0 -12
  445. package/dist/components/badge/types.d.ts.map +0 -1
  446. package/dist/components/badge/types.js +0 -2
  447. package/dist/components/badge/types.js.map +0 -1
  448. package/dist/components/button/Button.d.ts.map +0 -1
  449. package/dist/components/button/Button.js +0 -51
  450. package/dist/components/button/Button.js.map +0 -1
  451. package/dist/components/button/index.d.ts +0 -3
  452. package/dist/components/button/index.d.ts.map +0 -1
  453. package/dist/components/button/index.js +0 -2
  454. package/dist/components/button/index.js.map +0 -1
  455. package/dist/components/button/types.d.ts +0 -18
  456. package/dist/components/button/types.d.ts.map +0 -1
  457. package/dist/components/button/types.js +0 -2
  458. package/dist/components/button/types.js.map +0 -1
  459. package/dist/components/card/Card.d.ts +0 -4
  460. package/dist/components/card/Card.d.ts.map +0 -1
  461. package/dist/components/card/Card.js +0 -46
  462. package/dist/components/card/Card.js.map +0 -1
  463. package/dist/components/card/index.d.ts +0 -3
  464. package/dist/components/card/index.d.ts.map +0 -1
  465. package/dist/components/card/index.js +0 -2
  466. package/dist/components/card/index.js.map +0 -1
  467. package/dist/components/card/types.d.ts.map +0 -1
  468. package/dist/components/card/types.js +0 -2
  469. package/dist/components/card/types.js.map +0 -1
  470. package/dist/components/checkbox/Checkbox.d.ts +0 -4
  471. package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
  472. package/dist/components/checkbox/Checkbox.js +0 -69
  473. package/dist/components/checkbox/Checkbox.js.map +0 -1
  474. package/dist/components/checkbox/index.d.ts +0 -3
  475. package/dist/components/checkbox/index.d.ts.map +0 -1
  476. package/dist/components/checkbox/index.js +0 -2
  477. package/dist/components/checkbox/index.js.map +0 -1
  478. package/dist/components/checkbox/types.d.ts.map +0 -1
  479. package/dist/components/checkbox/types.js +0 -2
  480. package/dist/components/checkbox/types.js.map +0 -1
  481. package/dist/components/icon-button/IconButton.d.ts.map +0 -1
  482. package/dist/components/icon-button/IconButton.js +0 -28
  483. package/dist/components/icon-button/IconButton.js.map +0 -1
  484. package/dist/components/icon-button/index.d.ts +0 -3
  485. package/dist/components/icon-button/index.d.ts.map +0 -1
  486. package/dist/components/icon-button/index.js +0 -2
  487. package/dist/components/icon-button/index.js.map +0 -1
  488. package/dist/components/icon-button/types.d.ts +0 -13
  489. package/dist/components/icon-button/types.d.ts.map +0 -1
  490. package/dist/components/icon-button/types.js +0 -2
  491. package/dist/components/icon-button/types.js.map +0 -1
  492. package/dist/components/radio/Radio.d.ts +0 -7
  493. package/dist/components/radio/Radio.d.ts.map +0 -1
  494. package/dist/components/radio/Radio.js +0 -75
  495. package/dist/components/radio/Radio.js.map +0 -1
  496. package/dist/components/radio/index.d.ts +0 -3
  497. package/dist/components/radio/index.d.ts.map +0 -1
  498. package/dist/components/radio/index.js +0 -2
  499. package/dist/components/radio/index.js.map +0 -1
  500. package/dist/components/radio/isRadioTextContent.d.ts +0 -6
  501. package/dist/components/radio/isRadioTextContent.d.ts.map +0 -1
  502. package/dist/components/radio/isRadioTextContent.js +0 -7
  503. package/dist/components/radio/isRadioTextContent.js.map +0 -1
  504. package/dist/components/radio/types.d.ts.map +0 -1
  505. package/dist/components/radio/types.js +0 -2
  506. package/dist/components/radio/types.js.map +0 -1
  507. package/dist/components/text-input/TextInput.d.ts +0 -4
  508. package/dist/components/text-input/TextInput.d.ts.map +0 -1
  509. package/dist/components/text-input/TextInput.js +0 -72
  510. package/dist/components/text-input/TextInput.js.map +0 -1
  511. package/dist/components/text-input/index.d.ts +0 -3
  512. package/dist/components/text-input/index.d.ts.map +0 -1
  513. package/dist/components/text-input/index.js +0 -2
  514. package/dist/components/text-input/index.js.map +0 -1
  515. package/dist/components/text-input/types.d.ts.map +0 -1
  516. package/dist/components/text-input/types.js +0 -2
  517. package/dist/components/text-input/types.js.map +0 -1
  518. package/dist/layout/Box.d.ts +0 -14
  519. package/dist/layout/Box.d.ts.map +0 -1
  520. package/dist/layout/Box.js.map +0 -1
  521. package/dist/layout/Container.d.ts +0 -11
  522. package/dist/layout/Container.d.ts.map +0 -1
  523. package/dist/layout/Container.js +0 -24
  524. package/dist/layout/Container.js.map +0 -1
  525. package/dist/layout/Divider.d.ts +0 -10
  526. package/dist/layout/Divider.d.ts.map +0 -1
  527. package/dist/layout/Divider.js.map +0 -1
  528. package/dist/layout/Grid.d.ts +0 -14
  529. package/dist/layout/Grid.d.ts.map +0 -1
  530. package/dist/layout/Grid.js +0 -51
  531. package/dist/layout/Grid.js.map +0 -1
  532. package/dist/layout/KeyboardAvoidingView.d.ts +0 -7
  533. package/dist/layout/KeyboardAvoidingView.d.ts.map +0 -1
  534. package/dist/layout/KeyboardAvoidingView.js.map +0 -1
  535. package/dist/layout/Stack.d.ts +0 -14
  536. package/dist/layout/Stack.d.ts.map +0 -1
  537. package/dist/layout/Stack.js.map +0 -1
  538. package/dist/layout/Surface.d.ts +0 -8
  539. package/dist/layout/Surface.d.ts.map +0 -1
  540. package/dist/layout/Surface.js.map +0 -1
  541. package/dist/layout/helpers.d.ts.map +0 -1
  542. package/dist/layout/helpers.js +0 -91
  543. package/dist/layout/helpers.js.map +0 -1
  544. package/dist/primitives/heading/Heading.d.ts +0 -4
  545. package/dist/primitives/heading/Heading.d.ts.map +0 -1
  546. package/dist/primitives/heading/Heading.js +0 -30
  547. package/dist/primitives/heading/Heading.js.map +0 -1
  548. package/dist/primitives/heading/index.d.ts +0 -3
  549. package/dist/primitives/heading/index.d.ts.map +0 -1
  550. package/dist/primitives/heading/index.js +0 -2
  551. package/dist/primitives/heading/index.js.map +0 -1
  552. package/dist/primitives/heading/resolveHeadingStyle.d.ts +0 -6
  553. package/dist/primitives/heading/resolveHeadingStyle.d.ts.map +0 -1
  554. package/dist/primitives/heading/resolveHeadingStyle.js +0 -9
  555. package/dist/primitives/heading/resolveHeadingStyle.js.map +0 -1
  556. package/dist/primitives/heading/types.d.ts +0 -15
  557. package/dist/primitives/heading/types.d.ts.map +0 -1
  558. package/dist/primitives/heading/types.js +0 -2
  559. package/dist/primitives/heading/types.js.map +0 -1
  560. package/dist/primitives/icon/Icon.d.ts +0 -16
  561. package/dist/primitives/icon/Icon.d.ts.map +0 -1
  562. package/dist/primitives/icon/Icon.js.map +0 -1
  563. package/dist/primitives/icon/PortableIcon.d.ts +0 -70
  564. package/dist/primitives/icon/PortableIcon.d.ts.map +0 -1
  565. package/dist/primitives/icon/PortableIcon.js.map +0 -1
  566. package/dist/primitives/icon/index.d.ts +0 -4
  567. package/dist/primitives/icon/index.d.ts.map +0 -1
  568. package/dist/primitives/icon/index.js +0 -3
  569. package/dist/primitives/icon/index.js.map +0 -1
  570. package/dist/primitives/image/Image.d.ts.map +0 -1
  571. package/dist/primitives/image/Image.js +0 -26
  572. package/dist/primitives/image/Image.js.map +0 -1
  573. package/dist/primitives/image/index.d.ts +0 -3
  574. package/dist/primitives/image/index.d.ts.map +0 -1
  575. package/dist/primitives/image/index.js +0 -2
  576. package/dist/primitives/image/index.js.map +0 -1
  577. package/dist/primitives/image/resolveImageProps.d.ts +0 -12
  578. package/dist/primitives/image/resolveImageProps.d.ts.map +0 -1
  579. package/dist/primitives/image/resolveImageProps.js +0 -67
  580. package/dist/primitives/image/resolveImageProps.js.map +0 -1
  581. package/dist/primitives/image/types.d.ts.map +0 -1
  582. package/dist/primitives/image/types.js +0 -2
  583. package/dist/primitives/image/types.js.map +0 -1
  584. package/dist/primitives/text/Text.d.ts.map +0 -1
  585. package/dist/primitives/text/Text.js.map +0 -1
  586. package/dist/primitives/text/index.d.ts +0 -3
  587. package/dist/primitives/text/index.d.ts.map +0 -1
  588. package/dist/primitives/text/index.js +0 -2
  589. package/dist/primitives/text/index.js.map +0 -1
  590. package/dist/primitives/text/types.d.ts +0 -17
  591. package/dist/primitives/text/types.d.ts.map +0 -1
  592. package/dist/primitives/text/types.js +0 -2
  593. package/dist/primitives/text/types.js.map +0 -1
  594. package/src/components/badge/Badge.tsx +0 -52
  595. package/src/components/badge/index.ts +0 -2
  596. package/src/components/button/Button.tsx +0 -98
  597. package/src/components/button/index.ts +0 -2
  598. package/src/components/button/types.ts +0 -23
  599. package/src/components/card/Card.tsx +0 -81
  600. package/src/components/card/index.ts +0 -2
  601. package/src/components/checkbox/Checkbox.tsx +0 -120
  602. package/src/components/checkbox/index.ts +0 -2
  603. package/src/components/icon-button/IconButton.tsx +0 -55
  604. package/src/components/icon-button/index.ts +0 -2
  605. package/src/components/icon-button/types.ts +0 -16
  606. package/src/components/radio/Radio.tsx +0 -124
  607. package/src/components/radio/index.ts +0 -2
  608. package/src/components/text-input/TextInput.tsx +0 -124
  609. package/src/components/text-input/index.ts +0 -2
  610. package/src/layout/Container.tsx +0 -43
  611. package/src/layout/Grid.tsx +0 -83
  612. package/src/layout/KeyboardAvoidingView.tsx +0 -16
  613. package/src/layout/helpers.ts +0 -205
  614. package/src/primitives/heading/index.ts +0 -2
  615. package/src/primitives/heading/resolveHeadingStyle.ts +0 -20
  616. package/src/primitives/heading/types.ts +0 -17
  617. package/src/primitives/icon/Icon.tsx +0 -34
  618. package/src/primitives/icon/index.ts +0 -10
  619. package/src/primitives/image/Image.tsx +0 -65
  620. package/src/primitives/image/index.ts +0 -2
  621. package/src/primitives/image/resolveImageProps.ts +0 -92
  622. package/src/primitives/text/index.ts +0 -2
  623. package/src/primitives/text/types.ts +0 -18
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type { TextInputProps } from './types';
3
- export declare function TextInput({ value, defaultValue, onChangeText, placeholder, size, disabled, readOnly, invalid, leadingAccessory, trailingAccessory, interactionPolicy, style, testID, onFocus, onBlur, ...props }: TextInputProps): React.JSX.Element;
4
- //# sourceMappingURL=TextInput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,IAAU,EACV,QAAgB,EAChB,QAAgB,EAChB,OAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,iBAA6B,EAC7B,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACT,EAAE,cAAc,qBA6FhB"}
@@ -1,72 +0,0 @@
1
- import React from 'react';
2
- import { Platform, TextInput as ReactNativeTextInput, View } from 'react-native';
3
- import { resolveControlSize, resolveFieldState, resolveFocusRingStyles, resolveInputColors, resolveTextStyles, } from '../../internal/resolvers';
4
- import { useTheme } from '../../theme/ThemeContext';
5
- export function TextInput({ value, defaultValue, onChangeText, placeholder, size = 'm', disabled = false, readOnly = false, invalid = false, leadingAccessory, trailingAccessory, interactionPolicy = 'enabled', style, testID, onFocus, onBlur, ...props }) {
6
- const { theme } = useTheme();
7
- const controlSize = resolveControlSize(theme, size);
8
- const [focused, setFocused] = React.useState(false);
9
- const fieldState = resolveFieldState({
10
- disabled,
11
- focused,
12
- invalid,
13
- readOnly,
14
- });
15
- const colors = resolveInputColors(theme, fieldState);
16
- const resolvedTextStyle = resolveTextStyles(theme, {
17
- variant: controlSize.textVariant,
18
- });
19
- const resolvedLineHeight = typeof resolvedTextStyle.lineHeight === 'number'
20
- ? resolvedTextStyle.lineHeight
21
- : controlSize.minHeight - controlSize.paddingVertical * 2;
22
- const lineCount = Math.max(props.numberOfLines ?? 1, 1);
23
- const inputMinHeight = props.multiline
24
- ? resolvedLineHeight * lineCount
25
- : controlSize.minHeight - controlSize.paddingVertical * 2;
26
- const containerMinHeight = props.multiline
27
- ? inputMinHeight + controlSize.paddingVertical * 2
28
- : controlSize.minHeight;
29
- const passive = interactionPolicy === 'passive';
30
- const handleFocus = (event) => {
31
- setFocused(true);
32
- onFocus?.(event);
33
- };
34
- const handleBlur = (event) => {
35
- setFocused(false);
36
- onBlur?.(event);
37
- };
38
- return (<View style={[
39
- {
40
- minHeight: containerMinHeight,
41
- paddingHorizontal: controlSize.paddingHorizontal,
42
- paddingVertical: controlSize.paddingVertical,
43
- borderRadius: controlSize.borderRadius,
44
- borderWidth: 1,
45
- borderColor: colors.borderColor,
46
- backgroundColor: colors.backgroundColor,
47
- flexDirection: 'row',
48
- alignItems: props.multiline ? 'flex-start' : 'center',
49
- opacity: colors.opacity,
50
- },
51
- resolveFocusRingStyles(theme.semantics.border.focus, focused, Platform.OS === 'web'),
52
- ]}>
53
- {leadingAccessory ? (<View style={{ marginRight: theme.spacing.s }}>{leadingAccessory}</View>) : null}
54
- <ReactNativeTextInput {...props} defaultValue={defaultValue} editable={passive ? false : !disabled && !readOnly} numberOfLines={props.multiline ? props.numberOfLines : 1} onBlur={handleBlur} onChangeText={(nextValue) => {
55
- if (passive) {
56
- return;
57
- }
58
- onChangeText?.(nextValue);
59
- }} onFocus={handleFocus} placeholder={placeholder} placeholderTextColor={colors.placeholderColor} readOnly={readOnly} style={[
60
- {
61
- flex: 1,
62
- minHeight: inputMinHeight,
63
- padding: 0,
64
- color: colors.contentColor,
65
- textAlignVertical: props.multiline ? 'top' : 'center',
66
- },
67
- style,
68
- ]} testID={testID} value={value}/>
69
- {trailingAccessory ? (<View style={{ marginLeft: theme.spacing.s }}>{trailingAccessory}</View>) : null}
70
- </View>);
71
- }
72
- //# sourceMappingURL=TextInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/components/text-input/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,IAAI,oBAAoB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEjF,OAAO,EACL,kBAAkB,EAClB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C,CAAC,CACnB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,CACzE,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Platform, TextInput as ReactNativeTextInput, View } from 'react-native';\n\nimport {\n resolveControlSize,\n resolveFieldState,\n resolveFocusRingStyles,\n resolveInputColors,\n resolveTextStyles,\n} from '../../internal/resolvers';\nimport { useTheme } from '../../theme/ThemeContext';\nimport type { TextInputProps } from './types';\n\nexport function TextInput({\n value,\n defaultValue,\n onChangeText,\n placeholder,\n size = 'm',\n disabled = false,\n readOnly = false,\n invalid = false,\n leadingAccessory,\n trailingAccessory,\n interactionPolicy = 'enabled',\n style,\n testID,\n onFocus,\n onBlur,\n ...props\n}: TextInputProps) {\n const { theme } = useTheme();\n const controlSize = resolveControlSize(theme, size);\n const [focused, setFocused] = React.useState(false);\n const fieldState = resolveFieldState({\n disabled,\n focused,\n invalid,\n readOnly,\n });\n const colors = resolveInputColors(theme, fieldState);\n const resolvedTextStyle = resolveTextStyles(theme, {\n variant: controlSize.textVariant,\n });\n const resolvedLineHeight =\n typeof resolvedTextStyle.lineHeight === 'number'\n ? resolvedTextStyle.lineHeight\n : controlSize.minHeight - controlSize.paddingVertical * 2;\n const lineCount = Math.max(props.numberOfLines ?? 1, 1);\n const inputMinHeight = props.multiline\n ? resolvedLineHeight * lineCount\n : controlSize.minHeight - controlSize.paddingVertical * 2;\n const containerMinHeight = props.multiline\n ? inputMinHeight + controlSize.paddingVertical * 2\n : controlSize.minHeight;\n const passive = interactionPolicy === 'passive';\n\n const handleFocus: NonNullable<TextInputProps['onFocus']> = (event) => {\n setFocused(true);\n onFocus?.(event);\n };\n\n const handleBlur: NonNullable<TextInputProps['onBlur']> = (event) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n return (\n <View\n style={[\n {\n minHeight: containerMinHeight,\n paddingHorizontal: controlSize.paddingHorizontal,\n paddingVertical: controlSize.paddingVertical,\n borderRadius: controlSize.borderRadius,\n borderWidth: 1,\n borderColor: colors.borderColor,\n backgroundColor: colors.backgroundColor,\n flexDirection: 'row',\n alignItems: props.multiline ? 'flex-start' : 'center',\n opacity: colors.opacity,\n },\n resolveFocusRingStyles(theme.semantics.border.focus, focused, Platform.OS === 'web'),\n ]}\n >\n {leadingAccessory ? (\n <View style={{ marginRight: theme.spacing.s }}>{leadingAccessory}</View>\n ) : null}\n <ReactNativeTextInput\n {...props}\n defaultValue={defaultValue}\n editable={passive ? false : !disabled && !readOnly}\n numberOfLines={props.multiline ? props.numberOfLines : 1}\n onBlur={handleBlur}\n onChangeText={(nextValue) => {\n if (passive) {\n return;\n }\n\n onChangeText?.(nextValue);\n }}\n onFocus={handleFocus}\n placeholder={placeholder}\n placeholderTextColor={colors.placeholderColor}\n readOnly={readOnly}\n style={[\n {\n flex: 1,\n minHeight: inputMinHeight,\n padding: 0,\n color: colors.contentColor,\n textAlignVertical: props.multiline ? 'top' : 'center',\n },\n style,\n ]}\n testID={testID}\n value={value}\n />\n {trailingAccessory ? (\n <View style={{ marginLeft: theme.spacing.s }}>{trailingAccessory}</View>\n ) : null}\n </View>\n );\n}\n"]}
@@ -1,3 +0,0 @@
1
- export { TextInput } from './TextInput';
2
- export type { TextInputProps } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export { TextInput } from './TextInput';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/text-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { TextInput } from './TextInput';\nexport type { TextInputProps } from './types';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,SAAS,EACT,cAAc,IAAI,yBAAyB,EAC3C,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE/E,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,yBAAyB,EACvB,cAAc,GACd,UAAU,GACV,cAAc,GACd,sBAAsB,GACtB,OAAO,GACP,QAAQ,GACR,OAAO,CACV;IACC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/text-input/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\nimport type {\n StyleProp,\n TextInputProps as ReactNativeTextInputProps,\n TextStyle,\n} from 'react-native';\n\nimport type { InteractionPolicy } from '../../interactionPolicy';\nimport type { ControlSize } from '../../internal/resolvers/resolveControlSize';\n\nexport interface TextInputProps extends Omit<\n ReactNativeTextInputProps,\n | 'defaultValue'\n | 'editable'\n | 'onChangeText'\n | 'placeholderTextColor'\n | 'style'\n | 'testID'\n | 'value'\n> {\n value?: string;\n defaultValue?: string;\n onChangeText?: ((text: string) => void) | undefined;\n placeholder?: string;\n size?: ControlSize;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n leadingAccessory?: React.ReactNode;\n trailingAccessory?: React.ReactNode;\n interactionPolicy?: InteractionPolicy;\n style?: StyleProp<TextStyle>;\n testID?: string;\n}\n"]}
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { type ViewProps as ReactNativeViewProps } from 'react-native';
3
- import { type BoxStyleProps } from './helpers';
4
- export interface BoxProps extends BoxStyleProps {
5
- accessibilityLabel?: ReactNativeViewProps['accessibilityLabel'];
6
- accessibilityRole?: ReactNativeViewProps['accessibilityRole'];
7
- accessibilityState?: ReactNativeViewProps['accessibilityState'];
8
- accessible?: ReactNativeViewProps['accessible'];
9
- children?: React.ReactNode;
10
- pointerEvents?: ReactNativeViewProps['pointerEvents'];
11
- testID?: string;
12
- }
13
- export declare function Box({ accessible, accessibilityLabel, accessibilityRole, accessibilityState, children, pointerEvents, style, testID, ...props }: BoxProps): React.JSX.Element;
14
- //# sourceMappingURL=Box.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../src/layout/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1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,MAAM,EACN,GAAG,KAAK,EACC;IACT,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC9C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IAC5D,MAAM,qBAAqB,GAAG,aAAa,CAAC,CAAC,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,qBAAqB,EAAE,KAAK,CAAC,CACjC,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAEvD;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { View, type ViewProps as ReactNativeViewProps } from 'react-native';\n\nimport { useResponsiveRuntime } from '../core/responsive';\nimport { resolvePointerEvents } from '../internal/resolvePointerEvents';\nimport { useTheme } from '../theme/ThemeContext';\nimport { type BoxStyleProps, resolveBoxStyles } from './helpers';\n\nexport interface BoxProps extends BoxStyleProps {\n accessibilityLabel?: ReactNativeViewProps['accessibilityLabel'];\n accessibilityRole?: ReactNativeViewProps['accessibilityRole'];\n accessibilityState?: ReactNativeViewProps['accessibilityState'];\n accessible?: ReactNativeViewProps['accessible'];\n children?: React.ReactNode;\n pointerEvents?: ReactNativeViewProps['pointerEvents'];\n testID?: string;\n}\n\nexport function Box({\n accessible,\n accessibilityLabel,\n accessibilityRole,\n accessibilityState,\n children,\n pointerEvents,\n style,\n testID,\n ...props\n}: BoxProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n const resolved = resolveBoxStyles(theme, breakpoint, props);\n const resolvedPointerEvents = pointerEvents ? resolvePointerEvents(pointerEvents) : null;\n\n return (\n <View\n {...resolvedPointerEvents?.props}\n accessible={accessible}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n accessibilityState={accessibilityState}\n testID={testID}\n style={[resolved, resolvedPointerEvents?.style, style]}\n >\n {children}\n </View>\n );\n}\n"]}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { type Responsive } from '../core/responsive';
3
- import type { SurfaceTheme } from '../theme/types';
4
- import { type BoxProps } from './Box';
5
- export interface ContainerProps extends Omit<BoxProps, 'children'> {
6
- children?: React.ReactNode;
7
- maxWidth?: Responsive<number>;
8
- px?: Responsive<number | keyof SurfaceTheme['spacing']>;
9
- }
10
- export declare function Container({ children, maxWidth, px, ...props }: ContainerProps): React.JSX.Element;
11
- //# sourceMappingURL=Container.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../src/layout/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAqB,KAAK,UAAU,EAAwB,MAAM,oBAAoB,CAAC;AAE9F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG3C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAChE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC9B,EAAE,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;CACzD;AAED,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,QAAsD,EACtD,EAAiC,EACjC,GAAG,KAAK,EACT,EAAE,cAAc,qBAsBhB"}
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { View } from 'react-native';
3
- import { resolveResponsive, useResponsiveRuntime } from '../core/responsive';
4
- import { useTheme } from '../theme/ThemeContext';
5
- import { Box } from './Box';
6
- import { resolveSpacing } from './helpers';
7
- export function Container({ children, maxWidth = { base: Number.MAX_SAFE_INTEGER, lg: 1120 }, px = { base: 16, md: 24, lg: 32 }, ...props }) {
8
- const { theme } = useTheme();
9
- const { breakpoint } = useResponsiveRuntime();
10
- const activeMaxWidth = resolveResponsive(maxWidth, breakpoint);
11
- const activePx = resolveSpacing(theme, resolveResponsive(px, breakpoint));
12
- return (<Box {...props} width="100%" style={[{ width: '100%' }, props.style]}>
13
- <View style={{
14
- width: '100%',
15
- maxWidth: activeMaxWidth,
16
- alignSelf: 'center',
17
- paddingLeft: activePx,
18
- paddingRight: activePx,
19
- }}>
20
- {children}
21
- </View>
22
- </Box>);
23
- }
24
- //# sourceMappingURL=Container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Container.js","sourceRoot":"","sources":["../../src/layout/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQ3C,MAAM,UAAU,SAAS,CAAC,EACxB,QAAQ,EACR,QAAQ,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,EACtD,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EACjC,GAAG,KAAK,EACO;IACf,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAE9C,MAAM,cAAc,GAAG,iBAAiB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;IAE1E,OAAO,CACL,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CACnE;MAAA,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,cAAc;YACxB,SAAS,EAAE,QAAQ;YACnB,WAAW,EAAE,QAAQ;YACrB,YAAY,EAAE,QAAQ;SACvB,CAAC,CAEF;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { resolveResponsive, type Responsive, useResponsiveRuntime } from '../core/responsive';\nimport { useTheme } from '../theme/ThemeContext';\nimport type { SurfaceTheme } from '../theme/types';\nimport { Box, type BoxProps } from './Box';\nimport { resolveSpacing } from './helpers';\n\nexport interface ContainerProps extends Omit<BoxProps, 'children'> {\n children?: React.ReactNode;\n maxWidth?: Responsive<number>;\n px?: Responsive<number | keyof SurfaceTheme['spacing']>;\n}\n\nexport function Container({\n children,\n maxWidth = { base: Number.MAX_SAFE_INTEGER, lg: 1120 },\n px = { base: 16, md: 24, lg: 32 },\n ...props\n}: ContainerProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n\n const activeMaxWidth = resolveResponsive(maxWidth, breakpoint);\n const activePx = resolveSpacing(theme, resolveResponsive(px, breakpoint));\n\n return (\n <Box {...props} width=\"100%\" style={[{ width: '100%' }, props.style]}>\n <View\n style={{\n width: '100%',\n maxWidth: activeMaxWidth,\n alignSelf: 'center',\n paddingLeft: activePx,\n paddingRight: activePx,\n }}\n >\n {children}\n </View>\n </Box>\n );\n}\n"]}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { type BoxProps } from './Box';
3
- import type { ColorValue } from './helpers';
4
- export interface DividerProps extends Omit<BoxProps, 'bg' | 'height' | 'width'> {
5
- orientation?: 'horizontal' | 'vertical';
6
- color?: ColorValue;
7
- thickness?: number;
8
- }
9
- export declare function Divider({ orientation, color, thickness, ...props }: DividerProps): React.JSX.Element;
10
- //# sourceMappingURL=Divider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../src/layout/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC7E,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,OAAO,CAAC,EACtB,WAA0B,EAC1B,KAAgB,EAChB,SAAa,EACb,GAAG,KAAK,EACT,EAAE,YAAY,qBASd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Divider.js","sourceRoot":"","sources":["../../src/layout/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAS3C,MAAM,UAAU,OAAO,CAAC,EACtB,WAAW,GAAG,YAAY,EAC1B,KAAK,GAAG,QAAQ,EAChB,SAAS,GAAG,CAAC,EACb,GAAG,KAAK,EACK;IACb,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,EAAE,CAAC,CAAC,KAAK,CAAC,CACV,MAAM,CAAC,CAAC,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAC1D,KAAK,CAAC,CAAC,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,EACvD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box, type BoxProps } from './Box';\nimport type { ColorValue } from './helpers';\n\nexport interface DividerProps extends Omit<BoxProps, 'bg' | 'height' | 'width'> {\n orientation?: 'horizontal' | 'vertical';\n color?: ColorValue;\n thickness?: number;\n}\n\nexport function Divider({\n orientation = 'horizontal',\n color = 'border',\n thickness = 1,\n ...props\n}: DividerProps) {\n return (\n <Box\n {...props}\n bg={color}\n height={orientation === 'horizontal' ? thickness : '100%'}\n width={orientation === 'vertical' ? thickness : '100%'}\n />\n );\n}\n"]}
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { type Responsive } from '../core/responsive';
3
- import { type BoxProps } from './Box';
4
- import { type SpaceValue } from './helpers';
5
- export interface GridProps extends Omit<BoxProps, 'children'> {
6
- children?: React.ReactNode;
7
- cols: Responsive<number>;
8
- gap?: Responsive<SpaceValue>;
9
- rowGap?: Responsive<SpaceValue>;
10
- colGap?: Responsive<SpaceValue>;
11
- minItemWidth?: Responsive<number>;
12
- }
13
- export declare function Grid({ children, cols, gap, rowGap, colGap, minItemWidth, ...props }: GridProps): React.JSX.Element;
14
- //# sourceMappingURL=Grid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/layout/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAqB,KAAK,UAAU,EAAwB,MAAM,oBAAoB,CAAC;AAE9F,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACzB,GAAG,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;CACnC;AAED,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,IAAI,EACJ,GAAO,EACP,MAAM,EACN,MAAM,EACN,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,SAAS,qBAyDX"}
@@ -1,51 +0,0 @@
1
- import React from 'react';
2
- import { View } from 'react-native';
3
- import { resolveResponsive, useResponsiveRuntime } from '../core/responsive';
4
- import { useTheme } from '../theme/ThemeContext';
5
- import { Box } from './Box';
6
- import { resolveSpacing } from './helpers';
7
- export function Grid({ children, cols, gap = 0, rowGap, colGap, minItemWidth, ...props }) {
8
- const { theme } = useTheme();
9
- const { breakpoint } = useResponsiveRuntime();
10
- const activeCols = Math.max(1, Math.floor(resolveResponsive(cols, breakpoint) ?? 1));
11
- const defaultGap = resolveResponsive(gap, breakpoint) ?? 0;
12
- const activeRowGap = resolveResponsive(rowGap, breakpoint) ?? defaultGap;
13
- const activeColGap = resolveResponsive(colGap, breakpoint) ?? defaultGap;
14
- const rowSpacing = Number(resolveSpacing(theme, activeRowGap) ?? 0);
15
- const colSpacing = Number(resolveSpacing(theme, activeColGap) ?? 0);
16
- const activeMinItemWidth = resolveResponsive(minItemWidth, breakpoint);
17
- const basisPercent = `${100 / activeCols}%`;
18
- const nodes = React.Children.toArray(children);
19
- return (<Box {...props}>
20
- <View style={{
21
- flexDirection: 'row',
22
- flexWrap: 'wrap',
23
- marginTop: -rowSpacing / 2,
24
- marginLeft: -colSpacing / 2,
25
- marginRight: -colSpacing / 2,
26
- }}>
27
- {nodes.map((node, index) => {
28
- const itemStyle = activeMinItemWidth !== undefined
29
- ? {
30
- minWidth: activeMinItemWidth,
31
- flexBasis: activeMinItemWidth,
32
- flexGrow: 1,
33
- }
34
- : {
35
- width: basisPercent,
36
- flexBasis: basisPercent,
37
- };
38
- return (<View key={String(index)} style={{
39
- paddingTop: rowSpacing / 2,
40
- paddingBottom: rowSpacing / 2,
41
- paddingLeft: colSpacing / 2,
42
- paddingRight: colSpacing / 2,
43
- ...itemStyle,
44
- }}>
45
- {node}
46
- </View>);
47
- })}
48
- </View>
49
- </Box>);
50
- }
51
- //# sourceMappingURL=Grid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../src/layout/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAC;AAW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CAAC;YAC1B,UAAU,EAAE,CAAC,UAAU,GAAG,CAAC;YAC3B,WAAW,EAAE,CAAC,UAAU,GAAG,CAAC;SAC7B,CAAC,CAEF;QAAA,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YACzB,MAAM,SAAS,GACb,kBAAkB,KAAK,SAAS;gBAC9B,CAAC,CAAC;oBACE,QAAQ,EAAE,kBAAkB;oBAC5B,SAAS,EAAE,kBAAkB;oBAC7B,QAAQ,EAAE,CAAC;iBACZ;gBACH,CAAC,CAAC;oBACE,KAAK,EAAE,YAAY;oBACnB,SAAS,EAAE,YAAY;iBACxB,CAAC;YAER,OAAO,CACL,CAAC,IAAI,CACH,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CACnB,KAAK,CAAC,CAAC;oBACL,UAAU,EAAE,UAAU,GAAG,CAAC;oBAC1B,aAAa,EAAE,UAAU,GAAG,CAAC;oBAC7B,WAAW,EAAE,UAAU,GAAG,CAAC;oBAC3B,YAAY,EAAE,UAAU,GAAG,CAAC;oBAC5B,GAAG,SAAS;iBACb,CAAC,CAEF;cAAA,CAAC,IAAI,CACP;YAAA,EAAE,IAAI,CAAC,CACR,CAAC;QACJ,CAAC,CAAC,CACJ;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { View, type ViewStyle } from 'react-native';\n\nimport { resolveResponsive, type Responsive, useResponsiveRuntime } from '../core/responsive';\nimport { useTheme } from '../theme/ThemeContext';\nimport { Box, type BoxProps } from './Box';\nimport { resolveSpacing, type SpaceValue } from './helpers';\n\nexport interface GridProps extends Omit<BoxProps, 'children'> {\n children?: React.ReactNode;\n cols: Responsive<number>;\n gap?: Responsive<SpaceValue>;\n rowGap?: Responsive<SpaceValue>;\n colGap?: Responsive<SpaceValue>;\n minItemWidth?: Responsive<number>;\n}\n\nexport function Grid({\n children,\n cols,\n gap = 0,\n rowGap,\n colGap,\n minItemWidth,\n ...props\n}: GridProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n\n const activeCols = Math.max(1, Math.floor(resolveResponsive(cols, breakpoint) ?? 1));\n const defaultGap = resolveResponsive(gap, breakpoint) ?? 0;\n const activeRowGap = resolveResponsive(rowGap, breakpoint) ?? defaultGap;\n const activeColGap = resolveResponsive(colGap, breakpoint) ?? defaultGap;\n const rowSpacing = Number(resolveSpacing(theme, activeRowGap) ?? 0);\n const colSpacing = Number(resolveSpacing(theme, activeColGap) ?? 0);\n const activeMinItemWidth = resolveResponsive(minItemWidth, breakpoint);\n\n const basisPercent: `${number}%` = `${100 / activeCols}%`;\n const nodes = React.Children.toArray(children);\n\n return (\n <Box {...props}>\n <View\n style={{\n flexDirection: 'row',\n flexWrap: 'wrap',\n marginTop: -rowSpacing / 2,\n marginLeft: -colSpacing / 2,\n marginRight: -colSpacing / 2,\n }}\n >\n {nodes.map((node, index) => {\n const itemStyle: ViewStyle =\n activeMinItemWidth !== undefined\n ? {\n minWidth: activeMinItemWidth,\n flexBasis: activeMinItemWidth,\n flexGrow: 1,\n }\n : {\n width: basisPercent,\n flexBasis: basisPercent,\n };\n\n return (\n <View\n key={String(index)}\n style={{\n paddingTop: rowSpacing / 2,\n paddingBottom: rowSpacing / 2,\n paddingLeft: colSpacing / 2,\n paddingRight: colSpacing / 2,\n ...itemStyle,\n }}\n >\n {node}\n </View>\n );\n })}\n </View>\n </Box>\n );\n}\n"]}
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { type KeyboardAvoidingViewProps as ReactNativeKeyboardAvoidingViewProps } from 'react-native';
3
- /*** Preserve React Native keyboard avoidance behind the stable Surface layout boundary. */
4
- export declare function KeyboardAvoidingView(props: KeyboardAvoidingViewProps): React.JSX.Element;
5
- export type KeyboardAvoidingViewBehavior = NonNullable<ReactNativeKeyboardAvoidingViewProps['behavior']>;
6
- export type KeyboardAvoidingViewProps = ReactNativeKeyboardAvoidingViewProps;
7
- //# sourceMappingURL=KeyboardAvoidingView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"KeyboardAvoidingView.d.ts","sourceRoot":"","sources":["../../src/layout/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,yBAAyB,IAAI,oCAAoC,EACvE,MAAM,cAAc,CAAC;AAEtB,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qBAEpE;AAED,MAAM,MAAM,4BAA4B,GAAG,WAAW,CACpD,oCAAoC,CAAC,UAAU,CAAC,CACjD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,oCAAoC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"KeyboardAvoidingView.js","sourceRoot":"","sources":["../../src/layout/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,oBAAoB,IAAI,+BAA+B,GAExD,MAAM,cAAc,CAAC;AAEtB,2FAA2F;AAC3F,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,OAAO,CAAC,+BAA+B,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACxD,CAAC","sourcesContent":["import React from 'react';\nimport {\n KeyboardAvoidingView as ReactNativeKeyboardAvoidingView,\n type KeyboardAvoidingViewProps as ReactNativeKeyboardAvoidingViewProps,\n} from 'react-native';\n\n/*** Preserve React Native keyboard avoidance behind the stable Surface layout boundary. */\nexport function KeyboardAvoidingView(props: KeyboardAvoidingViewProps) {\n return <ReactNativeKeyboardAvoidingView {...props} />;\n}\n\nexport type KeyboardAvoidingViewBehavior = NonNullable<\n ReactNativeKeyboardAvoidingViewProps['behavior']\n>;\n\nexport type KeyboardAvoidingViewProps = ReactNativeKeyboardAvoidingViewProps;\n"]}
@@ -1,14 +0,0 @@
1
- import type React from 'react';
2
- import { type Responsive } from '../core/responsive';
3
- import { type BoxProps } from './Box';
4
- import { type SpaceValue } from './helpers';
5
- export interface StackProps extends Omit<BoxProps, 'children'> {
6
- children?: React.ReactNode;
7
- direction?: Responsive<'row' | 'column'>;
8
- gap?: Responsive<SpaceValue>;
9
- align?: Responsive<'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'>;
10
- justify?: Responsive<'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'>;
11
- wrap?: Responsive<'nowrap' | 'wrap'>;
12
- }
13
- export declare function Stack({ children, direction, gap, align, justify, wrap, ...props }: StackProps): React.JSX.Element;
14
- //# sourceMappingURL=Stack.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/layout/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAqB,KAAK,UAAU,EAAwB,MAAM,oBAAoB,CAAC;AAE9F,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5D,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,UAAU,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;IACzC,GAAG,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;IAClF,OAAO,CAAC,EAAE,UAAU,CAClB,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,cAAc,CACzF,CAAC;IACF,IAAI,CAAC,EAAE,UAA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C;YACL;gBACE,aAAa,EAAE,eAAe;gBAC9B,GAAG,EAAE,SAAS;gBACd,UAAU,EAAE,WAAW;gBACvB,cAAc,EAAE,aAAa;gBAC7B,QAAQ,EAAE,UAAU;aACrB;YACD,KAAK,CAAC,KAAK;SACZ,CAAC,CAEF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type React from 'react';\n\nimport { resolveResponsive, type Responsive, useResponsiveRuntime } from '../core/responsive';\nimport { useTheme } from '../theme/ThemeContext';\nimport { Box, type BoxProps } from './Box';\nimport { resolveSpacing, type SpaceValue } from './helpers';\n\nexport interface StackProps extends Omit<BoxProps, 'children'> {\n children?: React.ReactNode;\n direction?: Responsive<'row' | 'column'>;\n gap?: Responsive<SpaceValue>;\n align?: Responsive<'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'>;\n justify?: Responsive<\n 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'\n >;\n wrap?: Responsive<'nowrap' | 'wrap'>;\n}\n\nexport function Stack({\n children,\n direction = 'column',\n gap = 0,\n align,\n justify,\n wrap,\n ...props\n}: StackProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n const activeDirection = resolveResponsive(direction, breakpoint) ?? 'column';\n const activeGap = resolveSpacing(theme, resolveResponsive(gap, breakpoint)) ?? 0;\n const activeAlign = resolveResponsive(align, breakpoint);\n const activeJustify = resolveResponsive(justify, breakpoint);\n const activeWrap = resolveResponsive(wrap, breakpoint);\n\n return (\n <Box\n {...props}\n style={[\n {\n flexDirection: activeDirection,\n gap: activeGap,\n alignItems: activeAlign,\n justifyContent: activeJustify,\n flexWrap: activeWrap,\n },\n props.style,\n ]}\n >\n {children}\n </Box>\n );\n}\n"]}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { type BoxProps } from './Box';
3
- export type SurfaceVariant = 'default' | 'subtle' | 'raised' | 'outline';
4
- export interface SurfaceProps extends Omit<BoxProps, 'bg' | 'borderColor' | 'borderWidth'> {
5
- variant?: SurfaceVariant;
6
- }
7
- export declare function Surface({ variant, radius, style, ...props }: SurfaceProps): React.JSX.Element;
8
- //# sourceMappingURL=Surface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../src/layout/Surface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzE,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,aAAa,GAAG,aAAa,CAAC;IACxF,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAyCD,wBAAgB,OAAO,CAAC,EAAE,OAAmB,EAAE,MAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,qBAkB3F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Surface.js","sourceRoot":"","sources":["../../src/layout/Surface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAQ3C,SAAS,2BAA2B,CAClC,OAAuB,EACvB,WAAmB,EACnB,eAAuB;IAEvB,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,QAAQ;YACX,OAAO;gBACL,eAAe;gBACf,WAAW,EAAE,aAAa;gBAC1B,WAAW,EAAE,CAAC;aACf,CAAC;QACJ,KAAK,QAAQ;YACX,OAAO;gBACL,eAAe;gBACf,WAAW,EAAE,aAAa;gBAC1B,WAAW,EAAE,CAAC;gBACd,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,SAAS;gBACtB,aAAa,EAAE,IAAI;gBACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;gBACrC,YAAY,EAAE,CAAC;aAChB,CAAC;QACJ,KAAK,SAAS;YACZ,OAAO;gBACL,eAAe,EAAE,aAAa;gBAC9B,WAAW;gBACX,WAAW,EAAE,CAAC;aACf,CAAC;QACJ,KAAK,SAAS,CAAC;QACf;YACE,OAAO;gBACL,eAAe;gBACf,WAAW;gBACX,WAAW,EAAE,CAAC;aACf,CAAC;IACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,KAAK,EAAgB;IAC1F,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE7B,MAAM,eAAe,GACnB,OAAO,KAAK,QAAQ;QAClB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;QAChC,CAAC,CAAC,OAAO,KAAK,QAAQ;YACpB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;YAChC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;IACxC,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAEnD,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,OAAO,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC,EACnF,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport type { ViewStyle } from 'react-native';\n\nimport { useTheme } from '../theme/ThemeContext';\nimport { Box, type BoxProps } from './Box';\n\nexport type SurfaceVariant = 'default' | 'subtle' | 'raised' | 'outline';\n\nexport interface SurfaceProps extends Omit<BoxProps, 'bg' | 'borderColor' | 'borderWidth'> {\n variant?: SurfaceVariant;\n}\n\nfunction resolveSurfaceVariantStyles(\n variant: SurfaceVariant,\n borderColor: string,\n backgroundColor: string,\n): ViewStyle {\n switch (variant) {\n case 'subtle':\n return {\n backgroundColor,\n borderColor: 'transparent',\n borderWidth: 0,\n };\n case 'raised':\n return {\n backgroundColor,\n borderColor: 'transparent',\n borderWidth: 0,\n elevation: 2,\n shadowColor: '#000000',\n shadowOpacity: 0.08,\n shadowOffset: { width: 0, height: 2 },\n shadowRadius: 8,\n };\n case 'outline':\n return {\n backgroundColor: 'transparent',\n borderColor,\n borderWidth: 1,\n };\n case 'default':\n default:\n return {\n backgroundColor,\n borderColor,\n borderWidth: 1,\n };\n }\n}\n\nexport function Surface({ variant = 'default', radius = 'm', style, ...props }: SurfaceProps) {\n const { theme } = useTheme();\n\n const backgroundColor =\n variant === 'subtle'\n ? theme.semantics.surface.subtle\n : variant === 'raised'\n ? theme.semantics.surface.raised\n : theme.semantics.surface.default;\n const borderColor = theme.semantics.border.default;\n\n return (\n <Box\n {...props}\n radius={radius}\n style={[resolveSurfaceVariantStyles(variant, borderColor, backgroundColor), style]}\n />\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/layout/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,KAAK,UAAU,GAAG,MAAM,YAAY,CAAC,SAAS,CAAC,CAAC;AAChD,KAAK,WAAW,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;AAC/C,KAAK,UAAU,GAAG,MAAM,YAAY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cAAc,CAC5B,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,UAAU,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAIpB;AA4BD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,aAAa,GACnB,SAAS,CA6GX"}
@@ -1,91 +0,0 @@
1
- import { resolveResponsive } from '../core/responsive/resolve';
2
- import { resolveToken } from '../theme/resolveToken';
3
- export function resolveSpacing(theme, value) {
4
- if (value === undefined)
5
- return undefined;
6
- if (typeof value === 'number')
7
- return value;
8
- return theme.spacing[value];
9
- }
10
- function resolveRadius(theme, value) {
11
- if (value === undefined)
12
- return undefined;
13
- if (typeof value === 'number')
14
- return value;
15
- return theme.radii[value];
16
- }
17
- function resolveColor(theme, value) {
18
- if (value === undefined)
19
- return undefined;
20
- if (Object.prototype.hasOwnProperty.call(theme.colors, value)) {
21
- return theme.colors[value];
22
- }
23
- return value;
24
- }
25
- function resolveDimension(theme, value) {
26
- if (value === undefined || typeof value === 'number')
27
- return value;
28
- return resolveToken(theme.spacing, value);
29
- }
30
- function assignIfDefined(target, key, value) {
31
- if (value !== undefined)
32
- target[key] = value;
33
- }
34
- export function resolveBoxStyles(theme, breakpoint, props) {
35
- const styles = {
36
- elevation: 0,
37
- };
38
- const p = resolveSpacing(theme, resolveResponsive(props.p, breakpoint));
39
- const px = resolveSpacing(theme, resolveResponsive(props.px, breakpoint));
40
- const py = resolveSpacing(theme, resolveResponsive(props.py, breakpoint));
41
- const pt = resolveSpacing(theme, resolveResponsive(props.pt, breakpoint));
42
- const pb = resolveSpacing(theme, resolveResponsive(props.pb, breakpoint));
43
- const pl = resolveSpacing(theme, resolveResponsive(props.pl, breakpoint));
44
- const pr = resolveSpacing(theme, resolveResponsive(props.pr, breakpoint));
45
- const m = resolveSpacing(theme, resolveResponsive(props.m, breakpoint));
46
- const mx = resolveSpacing(theme, resolveResponsive(props.mx, breakpoint));
47
- const my = resolveSpacing(theme, resolveResponsive(props.my, breakpoint));
48
- const mt = resolveSpacing(theme, resolveResponsive(props.mt, breakpoint));
49
- const mb = resolveSpacing(theme, resolveResponsive(props.mb, breakpoint));
50
- const ml = resolveSpacing(theme, resolveResponsive(props.ml, breakpoint));
51
- const mr = resolveSpacing(theme, resolveResponsive(props.mr, breakpoint));
52
- assignIfDefined(styles, 'padding', p);
53
- assignIfDefined(styles, 'paddingHorizontal', px);
54
- assignIfDefined(styles, 'paddingVertical', py);
55
- assignIfDefined(styles, 'paddingTop', pt);
56
- assignIfDefined(styles, 'paddingBottom', pb);
57
- assignIfDefined(styles, 'paddingLeft', pl);
58
- assignIfDefined(styles, 'paddingRight', pr);
59
- assignIfDefined(styles, 'margin', m);
60
- assignIfDefined(styles, 'marginHorizontal', mx);
61
- assignIfDefined(styles, 'marginVertical', my);
62
- assignIfDefined(styles, 'marginTop', mt);
63
- assignIfDefined(styles, 'marginBottom', mb);
64
- assignIfDefined(styles, 'marginLeft', ml);
65
- assignIfDefined(styles, 'marginRight', mr);
66
- assignIfDefined(styles, 'backgroundColor', resolveColor(theme, resolveResponsive(props.bg, breakpoint)));
67
- assignIfDefined(styles, 'borderRadius', resolveRadius(theme, resolveResponsive(props.radius, breakpoint)));
68
- assignIfDefined(styles, 'borderWidth', resolveResponsive(props.borderWidth, breakpoint));
69
- assignIfDefined(styles, 'borderColor', resolveColor(theme, resolveResponsive(props.borderColor, breakpoint)));
70
- assignIfDefined(styles, 'width', resolveDimension(theme, resolveResponsive(props.width, breakpoint)));
71
- assignIfDefined(styles, 'height', resolveDimension(theme, resolveResponsive(props.height, breakpoint)));
72
- assignIfDefined(styles, 'minWidth', resolveDimension(theme, resolveResponsive(props.minWidth, breakpoint)));
73
- assignIfDefined(styles, 'maxWidth', resolveDimension(theme, resolveResponsive(props.maxWidth, breakpoint)));
74
- assignIfDefined(styles, 'minHeight', resolveDimension(theme, resolveResponsive(props.minHeight, breakpoint)));
75
- assignIfDefined(styles, 'maxHeight', resolveDimension(theme, resolveResponsive(props.maxHeight, breakpoint)));
76
- assignIfDefined(styles, 'flex', resolveResponsive(props.flex, breakpoint));
77
- assignIfDefined(styles, 'flexGrow', resolveResponsive(props.flexGrow, breakpoint));
78
- assignIfDefined(styles, 'flexShrink', resolveResponsive(props.flexShrink, breakpoint));
79
- assignIfDefined(styles, 'flexBasis', resolveResponsive(props.flexBasis, breakpoint));
80
- assignIfDefined(styles, 'alignSelf', resolveResponsive(props.alignSelf, breakpoint));
81
- assignIfDefined(styles, 'position', resolveResponsive(props.position, breakpoint));
82
- assignIfDefined(styles, 'top', resolveResponsive(props.top, breakpoint));
83
- assignIfDefined(styles, 'bottom', resolveResponsive(props.bottom, breakpoint));
84
- assignIfDefined(styles, 'left', resolveResponsive(props.left, breakpoint));
85
- assignIfDefined(styles, 'right', resolveResponsive(props.right, breakpoint));
86
- assignIfDefined(styles, 'overflow', resolveResponsive(props.overflow, breakpoint));
87
- assignIfDefined(styles, 'zIndex', resolveResponsive(props.zIndex, breakpoint));
88
- assignIfDefined(styles, 'opacity', resolveResponsive(props.opacity, breakpoint));
89
- return styles;
90
- }
91
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/layout/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAoDrD,MAAM,UAAU,cAAc,CAC5B,KAAmB,EACnB,KAA6B;IAE7B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAmB,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,aAAa,CAAC,KAAmB,EAAE,KAA8B;IACxE,IAAI,KAAK,KAAK,SA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ive } from '../core/responsive/resolve';\nimport type { Breakpoint, Responsive } from '../core/responsive/types';\nimport { resolveToken } from '../theme/resolveToken';\nimport type { SurfaceTheme } from '../theme/types';\n\ntype SpaceToken = keyof SurfaceTheme['spacing'];\ntype RadiusToken = keyof SurfaceTheme['radii'];\ntype ColorToken = keyof SurfaceTheme['colors'];\n\ntype RadiusValue = number | RadiusToken;\nexport type SpaceValue = number | SpaceToken;\nexport type ColorValue = string | ColorToken;\n\nexport interface BoxStyleProps {\n p?: Responsive<SpaceValue>;\n px?: Responsive<SpaceValue>;\n py?: Responsive<SpaceValue>;\n pt?: Responsive<SpaceValue>;\n pb?: Responsive<SpaceValue>;\n pl?: Responsive<SpaceValue>;\n pr?: Responsive<SpaceValue>;\n m?: Responsive<SpaceValue>;\n mx?: Responsive<SpaceValue>;\n my?: Responsive<SpaceValue>;\n mt?: Responsive<SpaceValue>;\n mb?: Responsive<SpaceValue>;\n ml?: Responsive<SpaceValue>;\n mr?: Responsive<SpaceValue>;\n bg?: Responsive<ColorValue>;\n radius?: Responsive<RadiusValue>;\n borderWidth?: Responsive<number>;\n borderColor?: Responsive<ColorValue>;\n width?: Responsive<number | string>;\n height?: Responsive<number | string>;\n minWidth?: Responsive<number | string>;\n maxWidth?: Responsive<number | string>;\n minHeight?: Responsive<number | string>;\n maxHeight?: Responsive<number | string>;\n flex?: Responsive<number>;\n flexGrow?: Responsive<number>;\n flexShrink?: Responsive<number>;\n flexBasis?: Responsive<number | string>;\n alignSelf?: Responsive<ViewStyle['alignSelf']>;\n position?: Responsive<ViewStyle['position']>;\n top?: Responsive<number>;\n bottom?: Responsive<number>;\n left?: Responsive<number>;\n right?: Responsive<number>;\n overflow?: Responsive<ViewStyle['overflow']>;\n zIndex?: Responsive<number>;\n opacity?: Responsive<number>;\n style?: StyleProp<ViewStyle>;\n}\n\nexport function resolveSpacing(\n theme: SurfaceTheme,\n value: SpaceValue | undefined,\n): number | undefined {\n if (value === undefined) return undefined;\n if (typeof value === 'number') return value;\n return theme.spacing[value as SpaceToken];\n}\n\nfunction resolveRadius(theme: SurfaceTheme, value: RadiusValue | undefined): number | undefined {\n if (value === undefined) return undefined;\n if (typeof value === 'number') return value;\n return theme.radii[value];\n}\n\nfunction resolveColor(theme: SurfaceTheme, value: ColorValue | undefined): string | undefined {\n if (value === undefined) return undefined;\n if (Object.prototype.hasOwnProperty.call(theme.colors, value)) {\n return theme.colors[value];\n }\n return value as string;\n}\n\nfunction resolveDimension(\n theme: SurfaceTheme,\n value: number | string | undefined,\n): number | string | undefined {\n if (value === undefined || typeof value === 'number') return value;\n return resolveToken(theme.spacing, value);\n}\n\nfunction assignIfDefined<T, K extends keyof T>(target: T, key: K, value: T[K] | undefined) {\n if (value !== undefined) target[key] = value;\n}\n\nexport function resolveBoxStyles(\n theme: SurfaceTheme,\n breakpoint: Breakpoint,\n props: BoxStyleProps,\n): ViewStyle {\n const styles: ViewStyle = {\n elevation: 0,\n };\n\n const p = resolveSpacing(theme, resolveResponsive(props.p, breakpoint));\n const px = resolveSpacing(theme, resolveResponsive(props.px, breakpoint));\n const py = resolveSpacing(theme, resolveResponsive(props.py, breakpoint));\n const pt = resolveSpacing(theme, resolveResponsive(props.pt, breakpoint));\n const pb = resolveSpacing(theme, resolveResponsive(props.pb, breakpoint));\n const pl = resolveSpacing(theme, resolveResponsive(props.pl, breakpoint));\n const pr = resolveSpacing(theme, resolveResponsive(props.pr, breakpoint));\n const m = resolveSpacing(theme, resolveResponsive(props.m, breakpoint));\n const mx = resolveSpacing(theme, resolveResponsive(props.mx, breakpoint));\n const my = resolveSpacing(theme, resolveResponsive(props.my, breakpoint));\n const mt = resolveSpacing(theme, resolveResponsive(props.mt, breakpoint));\n const mb = resolveSpacing(theme, resolveResponsive(props.mb, breakpoint));\n const ml = resolveSpacing(theme, resolveResponsive(props.ml, breakpoint));\n const mr = resolveSpacing(theme, resolveResponsive(props.mr, breakpoint));\n\n assignIfDefined(styles, 'padding', p as ViewStyle['padding']);\n assignIfDefined(styles, 'paddingHorizontal', px as ViewStyle['paddingHorizontal']);\n assignIfDefined(styles, 'paddingVertical', py as ViewStyle['paddingVertical']);\n assignIfDefined(styles, 'paddingTop', pt as ViewStyle['paddingTop']);\n assignIfDefined(styles, 'paddingBottom', pb as ViewStyle['paddingBottom']);\n assignIfDefined(styles, 'paddingLeft', pl as ViewStyle['paddingLeft']);\n assignIfDefined(styles, 'paddingRight', pr as ViewStyle['paddingRight']);\n assignIfDefined(styles, 'margin', m as ViewStyle['margin']);\n assignIfDefined(styles, 'marginHorizontal', mx as ViewStyle['marginHorizontal']);\n assignIfDefined(styles, 'marginVertical', my as ViewStyle['marginVertical']);\n assignIfDefined(styles, 'marginTop', mt as ViewStyle['marginTop']);\n assignIfDefined(styles, 'marginBottom', mb as ViewStyle['marginBottom']);\n assignIfDefined(styles, 'marginLeft', ml as ViewStyle['marginLeft']);\n assignIfDefined(styles, 'marginRight', mr as ViewStyle['marginRight']);\n\n assignIfDefined(\n styles,\n 'backgroundColor',\n resolveColor(theme, resolveResponsive(props.bg, breakpoint)),\n );\n assignIfDefined(\n styles,\n 'borderRadius',\n resolveRadius(theme, resolveResponsive(props.radius, breakpoint)) as ViewStyle['borderRadius'],\n );\n assignIfDefined(styles, 'borderWidth', resolveResponsive(props.borderWidth, breakpoint));\n assignIfDefined(\n styles,\n 'borderColor',\n resolveColor(theme, resolveResponsive(props.borderColor, breakpoint)),\n );\n\n assignIfDefined(\n styles,\n 'width',\n resolveDimension(theme, resolveResponsive(props.width, breakpoint)) as ViewStyle['width'],\n );\n assignIfDefined(\n styles,\n 'height',\n resolveDimension(theme, resolveResponsive(props.height, breakpoint)) as ViewStyle['height'],\n );\n assignIfDefined(\n styles,\n 'minWidth',\n resolveDimension(theme, resolveResponsive(props.minWidth, breakpoint)) as ViewStyle['minWidth'],\n );\n assignIfDefined(\n styles,\n 'maxWidth',\n resolveDimension(theme, resolveResponsive(props.maxWidth, breakpoint)) as ViewStyle['maxWidth'],\n );\n assignIfDefined(\n styles,\n 'minHeight',\n resolveDimension(\n theme,\n resolveResponsive(props.minHeight, breakpoint),\n ) as ViewStyle['minHeight'],\n );\n assignIfDefined(\n styles,\n 'maxHeight',\n resolveDimension(\n theme,\n resolveResponsive(props.maxHeight, breakpoint),\n ) as ViewStyle['maxHeight'],\n );\n\n assignIfDefined(styles, 'flex', resolveResponsive(props.flex, breakpoint));\n assignIfDefined(styles, 'flexGrow', resolveResponsive(props.flexGrow, breakpoint));\n assignIfDefined(styles, 'flexShrink', resolveResponsive(props.flexShrink, breakpoint));\n assignIfDefined(\n styles,\n 'flexBasis',\n resolveResponsive(props.flexBasis, breakpoint) as ViewStyle['flexBasis'],\n );\n assignIfDefined(styles, 'alignSelf', resolveResponsive(props.alignSelf, breakpoint));\n\n assignIfDefined(styles, 'position', resolveResponsive(props.position, breakpoint));\n assignIfDefined(styles, 'top', resolveResponsive(props.top, breakpoint));\n assignIfDefined(styles, 'bottom', resolveResponsive(props.bottom, breakpoint));\n assignIfDefined(styles, 'left', resolveResponsive(props.left, breakpoint));\n assignIfDefined(styles, 'right', resolveResponsive(props.right, breakpoint));\n assignIfDefined(styles, 'overflow', resolveResponsive(props.overflow, breakpoint));\n assignIfDefined(styles, 'zIndex', resolveResponsive(props.zIndex, breakpoint));\n assignIfDefined(styles, 'opacity', resolveResponsive(props.opacity, breakpoint));\n\n return styles;\n}\n"]}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type { HeadingProps } from './types';
3
- export declare const Heading: React.FC<HeadingProps>;
4
- //# sourceMappingURL=Heading.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/primitives/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA8B5C,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAyB1C,CAAC"}
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { Text } from 'react-native';
3
- import { useTranslationContext } from '../../context/TranslationContext';
4
- import { useTheme } from '../../theme/ThemeContext';
5
- import { resolveHeadingTextStyle } from './resolveHeadingStyle';
6
- function resolveHeadingContent({ text, children, i18nKey, translate, }) {
7
- let content = text ?? children;
8
- if (!i18nKey) {
9
- return content;
10
- }
11
- try {
12
- const translated = translate(i18nKey);
13
- if (translated && translated !== i18nKey) {
14
- content = translated;
15
- }
16
- }
17
- catch (error) {
18
- console.warn('[Heading] Translation error:', error);
19
- }
20
- return content;
21
- }
22
- export const Heading = ({ text, children, level = 2, align, color, emphasis = 'default', numberOfLines, i18nKey, testID, }) => {
23
- const { theme } = useTheme();
24
- const { t } = useTranslationContext();
25
- const content = resolveHeadingContent({ text, children, i18nKey, translate: t });
26
- return (<Text accessibilityRole="header" testID={testID} numberOfLines={numberOfLines} style={resolveHeadingTextStyle(theme, level, align, emphasis, color)}>
27
- {content}
28
- </Text>);
29
- };
30
- //# sourceMappingURL=Heading.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/primitives/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,SAAS,qBAAqB,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,GAMV;IACC,IAAI,OAAO,GAAG,IAAI,IAAI,QAAQ,CAAC;IAC/B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,UAAU,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;YACzC,OAAO,GAAG,UAAU,CAAC;QACvB,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,EAC9C,IAAI,EACJ,QAAQ,EACR,KAAK,GAAG,CAAC,EACT,KAAK,EACL,KAAK,EACL,QAAQ,GAAG,SAAS,EACpB,aAAa,EACb,OAAO,EACP,MAAM,GACP,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,CAAC,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,qBAAqB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IAEjF,OAAO,CACL,CAAC,IAAI,CACH,iBAAiB,CAAC,QAAQ,CAC1B,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,KAAK,CAAC,CAAC,uBAAuB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAErE;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\n\nimport { useTranslationContext } from '../../context/TranslationContext';\nimport { useTheme } from '../../theme/ThemeContext';\nimport { resolveHeadingTextStyle } from './resolveHeadingStyle';\nimport type { HeadingProps } from './types';\n\nfunction resolveHeadingContent({\n text,\n children,\n i18nKey,\n translate,\n}: {\n text: HeadingProps['text'];\n children: HeadingProps['children'];\n i18nKey: HeadingProps['i18nKey'];\n translate: (key: string) => string;\n}) {\n let content = text ?? children;\n if (!i18nKey) {\n return content;\n }\n\n try {\n const translated = translate(i18nKey);\n if (translated && translated !== i18nKey) {\n content = translated;\n }\n } catch (error) {\n console.warn('[Heading] Translation error:', error);\n }\n\n return content;\n}\n\nexport const Heading: React.FC<HeadingProps> = ({\n text,\n children,\n level = 2,\n align,\n color,\n emphasis = 'default',\n numberOfLines,\n i18nKey,\n testID,\n}) => {\n const { theme } = useTheme();\n const { t } = useTranslationContext();\n const content = resolveHeadingContent({ text, children, i18nKey, translate: t });\n\n return (\n <Text\n accessibilityRole=\"header\"\n testID={testID}\n numberOfLines={numberOfLines}\n style={resolveHeadingTextStyle(theme, level, align, emphasis, color)}\n >\n {content}\n </Text>\n );\n};\n"]}
@@ -1,3 +0,0 @@
1
- export { Heading } from './Heading';
2
- export type { HeadingLevel, HeadingProps } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/heading/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export { Heading } from './Heading';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/primitives/heading/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingLevel, HeadingProps } from './types';\n"]}