@ankhorage/surface 5.0.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -2
  3. package/dist/{layout → core/responsive}/Show.d.ts +2 -1
  4. package/dist/core/responsive/Show.d.ts.map +1 -0
  5. package/dist/{layout → core/responsive}/Show.js +3 -1
  6. package/dist/core/responsive/Show.js.map +1 -0
  7. package/dist/core/responsive/index.d.ts +1 -0
  8. package/dist/core/responsive/index.d.ts.map +1 -1
  9. package/dist/core/responsive/index.js +1 -0
  10. package/dist/core/responsive/index.js.map +1 -1
  11. package/dist/features/app-bar/adapters/inbound/AppBar.d.ts +5 -0
  12. package/dist/features/app-bar/adapters/inbound/AppBar.d.ts.map +1 -0
  13. package/dist/features/app-bar/adapters/inbound/AppBar.js +40 -0
  14. package/dist/features/app-bar/adapters/inbound/AppBar.js.map +1 -0
  15. package/dist/features/app-bar/public.d.ts +3 -0
  16. package/dist/features/app-bar/public.d.ts.map +1 -0
  17. package/dist/features/app-bar/public.js +2 -0
  18. package/dist/features/app-bar/public.js.map +1 -0
  19. package/dist/features/badge/adapters/inbound/Badge.js +3 -3
  20. package/dist/features/badge/adapters/inbound/Badge.js.map +1 -1
  21. package/dist/features/button/adapters/inbound/Button.js +8 -8
  22. package/dist/features/button/adapters/inbound/Button.js.map +1 -1
  23. package/dist/features/button/adapters/inbound/IconButton.js +3 -3
  24. package/dist/features/button/adapters/inbound/IconButton.js.map +1 -1
  25. package/dist/features/form/checkbox/adapters/inbound/Checkbox.js +7 -7
  26. package/dist/features/form/checkbox/adapters/inbound/Checkbox.js.map +1 -1
  27. package/dist/{components/field → features/form/field/adapters/inbound}/Field.d.ts +2 -1
  28. package/dist/features/form/field/adapters/inbound/Field.d.ts.map +1 -0
  29. package/dist/features/form/field/adapters/inbound/Field.js +40 -0
  30. package/dist/features/form/field/adapters/inbound/Field.js.map +1 -0
  31. package/dist/features/form/field/public.d.ts +3 -0
  32. package/dist/features/form/field/public.d.ts.map +1 -0
  33. package/dist/features/form/field/public.js +2 -0
  34. package/dist/features/form/field/public.js.map +1 -0
  35. package/dist/features/form/radio/adapters/inbound/Radio.js +8 -8
  36. package/dist/features/form/radio/adapters/inbound/Radio.js.map +1 -1
  37. package/dist/{components/switch → features/form/switch/adapters/inbound}/Switch.d.ts +2 -1
  38. package/dist/features/form/switch/adapters/inbound/Switch.d.ts.map +1 -0
  39. package/dist/features/form/switch/adapters/inbound/Switch.js +52 -0
  40. package/dist/features/form/switch/adapters/inbound/Switch.js.map +1 -0
  41. package/dist/features/form/switch/public.d.ts +3 -0
  42. package/dist/features/form/switch/public.d.ts.map +1 -0
  43. package/dist/features/form/switch/public.js +2 -0
  44. package/dist/features/form/switch/public.js.map +1 -0
  45. package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -1
  46. package/dist/features/form/text-input/adapters/inbound/TextInput.js +8 -4
  47. package/dist/features/form/text-input/adapters/inbound/TextInput.js.map +1 -1
  48. package/dist/features/layout/adapters/inbound/Divider.js +2 -2
  49. package/dist/features/layout/adapters/inbound/Divider.js.map +1 -1
  50. package/dist/features/layout/adapters/inbound/Grid.d.ts.map +1 -1
  51. package/dist/features/layout/adapters/inbound/Grid.js +7 -9
  52. package/dist/features/layout/adapters/inbound/Grid.js.map +1 -1
  53. package/dist/features/layout/adapters/inbound/ScrollView.d.ts +5 -0
  54. package/dist/features/layout/adapters/inbound/ScrollView.d.ts.map +1 -0
  55. package/dist/features/layout/adapters/inbound/ScrollView.js +69 -0
  56. package/dist/features/layout/adapters/inbound/ScrollView.js.map +1 -0
  57. package/dist/features/layout/adapters/inbound/View.d.ts +5 -0
  58. package/dist/features/layout/adapters/inbound/View.d.ts.map +1 -0
  59. package/dist/features/layout/adapters/inbound/View.js +17 -0
  60. package/dist/features/layout/adapters/inbound/View.js.map +1 -0
  61. package/dist/features/layout/public.d.ts +3 -4
  62. package/dist/features/layout/public.d.ts.map +1 -1
  63. package/dist/features/layout/public.js +2 -3
  64. package/dist/features/layout/public.js.map +1 -1
  65. package/dist/features/list/adapters/inbound/List.d.ts +5 -0
  66. package/dist/features/list/adapters/inbound/List.d.ts.map +1 -0
  67. package/dist/features/list/adapters/inbound/List.js +7 -0
  68. package/dist/features/list/adapters/inbound/List.js.map +1 -0
  69. package/dist/features/list/adapters/inbound/ListItem.d.ts +5 -0
  70. package/dist/features/list/adapters/inbound/ListItem.d.ts.map +1 -0
  71. package/dist/features/list/adapters/inbound/ListItem.js +59 -0
  72. package/dist/features/list/adapters/inbound/ListItem.js.map +1 -0
  73. package/dist/features/list/public.d.ts +4 -0
  74. package/dist/features/list/public.d.ts.map +1 -0
  75. package/dist/features/list/public.js +3 -0
  76. package/dist/features/list/public.js.map +1 -0
  77. package/dist/features/modal/adapters/inbound/Modal.d.ts.map +1 -1
  78. package/dist/features/modal/adapters/inbound/Modal.js +8 -8
  79. package/dist/features/modal/adapters/inbound/Modal.js.map +1 -1
  80. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.d.ts.map +1 -1
  81. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js +11 -12
  82. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js.map +1 -1
  83. package/dist/features/surface/adapters/inbound/Surface.d.ts +1 -1
  84. package/dist/features/surface/adapters/inbound/Surface.d.ts.map +1 -1
  85. package/dist/features/surface/adapters/inbound/Surface.js +3 -3
  86. package/dist/features/surface/adapters/inbound/Surface.js.map +1 -1
  87. package/dist/features/tabs/adapters/inbound/Tab.js +3 -3
  88. package/dist/features/tabs/adapters/inbound/Tab.js.map +1 -1
  89. package/dist/features/tabs/adapters/inbound/TabList.d.ts.map +1 -1
  90. package/dist/features/tabs/adapters/inbound/TabList.js +3 -5
  91. package/dist/features/tabs/adapters/inbound/TabList.js.map +1 -1
  92. package/dist/features/tabs/adapters/inbound/Tabs.js +2 -2
  93. package/dist/features/tabs/adapters/inbound/Tabs.js.map +1 -1
  94. package/dist/features/toast/adapters/inbound/Toast.js +5 -5
  95. package/dist/features/toast/adapters/inbound/Toast.js.map +1 -1
  96. package/dist/features/toast/adapters/inbound/ToastProvider.js +3 -3
  97. package/dist/features/toast/adapters/inbound/ToastProvider.js.map +1 -1
  98. package/dist/index.d.ts +10 -15
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +5 -8
  101. package/dist/index.js.map +1 -1
  102. package/dist/primitives/button-base/ButtonBase.d.ts +1 -0
  103. package/dist/primitives/button-base/ButtonBase.d.ts.map +1 -1
  104. package/dist/primitives/button-base/ButtonBase.js +6 -5
  105. package/dist/primitives/button-base/ButtonBase.js.map +1 -1
  106. package/dist/primitives/button-base/types.d.ts +2 -2
  107. package/dist/primitives/button-base/types.d.ts.map +1 -1
  108. package/dist/primitives/button-base/types.js.map +1 -1
  109. package/dist/types/app-bar.d.ts +12 -0
  110. package/dist/types/app-bar.d.ts.map +1 -0
  111. package/dist/types/app-bar.js +2 -0
  112. package/dist/types/app-bar.js.map +1 -0
  113. package/dist/{components/field/types.d.ts → types/field.d.ts} +1 -1
  114. package/dist/types/field.d.ts.map +1 -0
  115. package/dist/types/field.js +2 -0
  116. package/dist/types/field.js.map +1 -0
  117. package/dist/types/layout.d.ts +15 -17
  118. package/dist/types/layout.d.ts.map +1 -1
  119. package/dist/types/layout.js.map +1 -1
  120. package/dist/types/list.d.ts +20 -0
  121. package/dist/types/list.d.ts.map +1 -0
  122. package/dist/types/list.js +2 -0
  123. package/dist/types/list.js.map +1 -0
  124. package/dist/types/surface.d.ts +2 -2
  125. package/dist/types/surface.d.ts.map +1 -1
  126. package/dist/types/surface.js.map +1 -1
  127. package/dist/{components/switch/types.d.ts → types/switch.d.ts} +4 -4
  128. package/dist/types/switch.d.ts.map +1 -0
  129. package/dist/types/switch.js +2 -0
  130. package/dist/types/switch.js.map +1 -0
  131. package/dist/utils/resolveViewStyles.d.ts +7 -0
  132. package/dist/utils/resolveViewStyles.d.ts.map +1 -0
  133. package/dist/utils/{resolveBoxStyles.js → resolveViewStyles.js} +11 -4
  134. package/dist/utils/resolveViewStyles.js.map +1 -0
  135. package/package.json +1 -1
  136. package/src/{layout → core/responsive}/Show.tsx +4 -1
  137. package/src/core/responsive/index.ts +1 -0
  138. package/src/features/app-bar/adapters/inbound/AppBar.tsx +69 -0
  139. package/src/features/app-bar/public.ts +2 -0
  140. package/src/features/badge/adapters/inbound/Badge.tsx +3 -3
  141. package/src/features/button/adapters/inbound/Button.tsx +8 -8
  142. package/src/features/button/adapters/inbound/IconButton.tsx +3 -3
  143. package/src/features/form/checkbox/adapters/inbound/Checkbox.tsx +7 -7
  144. package/src/features/form/field/adapters/inbound/Field.tsx +82 -0
  145. package/src/features/form/field/public.ts +2 -0
  146. package/src/features/form/radio/adapters/inbound/Radio.tsx +8 -8
  147. package/src/features/form/switch/adapters/inbound/Switch.tsx +123 -0
  148. package/src/features/form/switch/public.ts +2 -0
  149. package/src/features/form/text-input/adapters/inbound/TextInput.tsx +21 -5
  150. package/src/features/layout/adapters/inbound/Divider.tsx +2 -2
  151. package/src/features/layout/adapters/inbound/Grid.tsx +12 -14
  152. package/src/features/layout/adapters/inbound/ScrollView.tsx +102 -0
  153. package/src/features/layout/adapters/inbound/{Box.tsx → View.tsx} +9 -9
  154. package/src/features/layout/public.ts +3 -10
  155. package/src/features/list/adapters/inbound/List.tsx +9 -0
  156. package/src/features/list/adapters/inbound/ListItem.tsx +128 -0
  157. package/src/features/list/public.test.ts +13 -0
  158. package/src/features/list/public.ts +3 -0
  159. package/src/features/modal/adapters/inbound/Modal.tsx +11 -8
  160. package/src/features/popover-menu/adapters/inbound/PopoverMenu.tsx +11 -14
  161. package/src/features/surface/adapters/inbound/Surface.tsx +3 -3
  162. package/src/features/tabs/adapters/inbound/Tab.tsx +3 -3
  163. package/src/features/tabs/adapters/inbound/TabList.tsx +3 -6
  164. package/src/features/tabs/adapters/inbound/Tabs.tsx +2 -2
  165. package/src/features/toast/adapters/inbound/Toast.tsx +5 -5
  166. package/src/features/toast/adapters/inbound/ToastProvider.tsx +3 -3
  167. package/src/index.test.ts +26 -48
  168. package/src/index.ts +10 -21
  169. package/src/primitives/button-base/ButtonBase.tsx +6 -8
  170. package/src/primitives/button-base/types.ts +2 -2
  171. package/src/types/app-bar.ts +13 -0
  172. package/src/types/layout.ts +25 -20
  173. package/src/types/list.ts +22 -0
  174. package/src/types/surface.ts +2 -2
  175. package/src/{components/switch/types.ts → types/switch.ts} +3 -3
  176. package/src/utils/resolveViewStyles.test.ts +71 -0
  177. package/src/utils/{resolveBoxStyles.ts → resolveViewStyles.ts} +16 -9
  178. package/src/webAcceptance.test.tsx +8 -9
  179. package/dist/components/field/Field.d.ts.map +0 -1
  180. package/dist/components/field/Field.js +0 -26
  181. package/dist/components/field/Field.js.map +0 -1
  182. package/dist/components/field/index.d.ts +0 -3
  183. package/dist/components/field/index.d.ts.map +0 -1
  184. package/dist/components/field/index.js +0 -2
  185. package/dist/components/field/index.js.map +0 -1
  186. package/dist/components/field/types.d.ts.map +0 -1
  187. package/dist/components/field/types.js +0 -2
  188. package/dist/components/field/types.js.map +0 -1
  189. package/dist/components/helper-text/HelperText.d.ts +0 -4
  190. package/dist/components/helper-text/HelperText.d.ts.map +0 -1
  191. package/dist/components/helper-text/HelperText.js +0 -8
  192. package/dist/components/helper-text/HelperText.js.map +0 -1
  193. package/dist/components/helper-text/index.d.ts +0 -3
  194. package/dist/components/helper-text/index.d.ts.map +0 -1
  195. package/dist/components/helper-text/index.js +0 -2
  196. package/dist/components/helper-text/index.js.map +0 -1
  197. package/dist/components/helper-text/types.d.ts +0 -9
  198. package/dist/components/helper-text/types.d.ts.map +0 -1
  199. package/dist/components/helper-text/types.js +0 -2
  200. package/dist/components/helper-text/types.js.map +0 -1
  201. package/dist/components/label/Label.d.ts +0 -4
  202. package/dist/components/label/Label.d.ts.map +0 -1
  203. package/dist/components/label/Label.js +0 -11
  204. package/dist/components/label/Label.js.map +0 -1
  205. package/dist/components/label/index.d.ts +0 -3
  206. package/dist/components/label/index.d.ts.map +0 -1
  207. package/dist/components/label/index.js +0 -2
  208. package/dist/components/label/index.js.map +0 -1
  209. package/dist/components/label/types.d.ts +0 -10
  210. package/dist/components/label/types.d.ts.map +0 -1
  211. package/dist/components/label/types.js +0 -2
  212. package/dist/components/label/types.js.map +0 -1
  213. package/dist/components/list-item/ListItem.d.ts +0 -4
  214. package/dist/components/list-item/ListItem.d.ts.map +0 -1
  215. package/dist/components/list-item/ListItem.js +0 -43
  216. package/dist/components/list-item/ListItem.js.map +0 -1
  217. package/dist/components/list-item/index.d.ts +0 -3
  218. package/dist/components/list-item/index.d.ts.map +0 -1
  219. package/dist/components/list-item/index.js +0 -2
  220. package/dist/components/list-item/index.js.map +0 -1
  221. package/dist/components/list-item/types.d.ts +0 -11
  222. package/dist/components/list-item/types.d.ts.map +0 -1
  223. package/dist/components/list-item/types.js +0 -2
  224. package/dist/components/list-item/types.js.map +0 -1
  225. package/dist/components/switch/Switch.d.ts.map +0 -1
  226. package/dist/components/switch/Switch.js +0 -71
  227. package/dist/components/switch/Switch.js.map +0 -1
  228. package/dist/components/switch/index.d.ts +0 -3
  229. package/dist/components/switch/index.d.ts.map +0 -1
  230. package/dist/components/switch/index.js +0 -2
  231. package/dist/components/switch/index.js.map +0 -1
  232. package/dist/components/switch/types.d.ts.map +0 -1
  233. package/dist/components/switch/types.js +0 -2
  234. package/dist/components/switch/types.js.map +0 -1
  235. package/dist/components/textarea/Textarea.d.ts +0 -4
  236. package/dist/components/textarea/Textarea.d.ts.map +0 -1
  237. package/dist/components/textarea/Textarea.js +0 -6
  238. package/dist/components/textarea/Textarea.js.map +0 -1
  239. package/dist/components/textarea/index.d.ts +0 -3
  240. package/dist/components/textarea/index.d.ts.map +0 -1
  241. package/dist/components/textarea/index.js +0 -2
  242. package/dist/components/textarea/index.js.map +0 -1
  243. package/dist/components/textarea/types.d.ts +0 -5
  244. package/dist/components/textarea/types.d.ts.map +0 -1
  245. package/dist/components/textarea/types.js +0 -2
  246. package/dist/components/textarea/types.js.map +0 -1
  247. package/dist/features/layout/adapters/inbound/Box.d.ts +0 -5
  248. package/dist/features/layout/adapters/inbound/Box.d.ts.map +0 -1
  249. package/dist/features/layout/adapters/inbound/Box.js +0 -17
  250. package/dist/features/layout/adapters/inbound/Box.js.map +0 -1
  251. package/dist/features/layout/adapters/inbound/Container.d.ts +0 -5
  252. package/dist/features/layout/adapters/inbound/Container.d.ts.map +0 -1
  253. package/dist/features/layout/adapters/inbound/Container.js +0 -28
  254. package/dist/features/layout/adapters/inbound/Container.js.map +0 -1
  255. package/dist/features/layout/adapters/inbound/Stack.d.ts +0 -5
  256. package/dist/features/layout/adapters/inbound/Stack.d.ts.map +0 -1
  257. package/dist/features/layout/adapters/inbound/Stack.js +0 -27
  258. package/dist/features/layout/adapters/inbound/Stack.js.map +0 -1
  259. package/dist/layout/AppBar.d.ts +0 -13
  260. package/dist/layout/AppBar.d.ts.map +0 -1
  261. package/dist/layout/AppBar.js +0 -30
  262. package/dist/layout/AppBar.js.map +0 -1
  263. package/dist/layout/Center.d.ts +0 -7
  264. package/dist/layout/Center.d.ts.map +0 -1
  265. package/dist/layout/Center.js +0 -12
  266. package/dist/layout/Center.js.map +0 -1
  267. package/dist/layout/Inline.d.ts +0 -5
  268. package/dist/layout/Inline.d.ts.map +0 -1
  269. package/dist/layout/Inline.js +0 -6
  270. package/dist/layout/Inline.js.map +0 -1
  271. package/dist/layout/ScrollArea.d.ts +0 -9
  272. package/dist/layout/ScrollArea.d.ts.map +0 -1
  273. package/dist/layout/ScrollArea.js +0 -52
  274. package/dist/layout/ScrollArea.js.map +0 -1
  275. package/dist/layout/Show.d.ts.map +0 -1
  276. package/dist/layout/Show.js.map +0 -1
  277. package/dist/layout/Spacer.d.ts +0 -9
  278. package/dist/layout/Spacer.d.ts.map +0 -1
  279. package/dist/layout/Spacer.js +0 -12
  280. package/dist/layout/Spacer.js.map +0 -1
  281. package/dist/layout/Template.d.ts +0 -18
  282. package/dist/layout/Template.d.ts.map +0 -1
  283. package/dist/layout/Template.js +0 -36
  284. package/dist/layout/Template.js.map +0 -1
  285. package/dist/layout/index.d.ts +0 -15
  286. package/dist/layout/index.d.ts.map +0 -1
  287. package/dist/layout/index.js +0 -8
  288. package/dist/layout/index.js.map +0 -1
  289. package/dist/utils/resolveBoxStyles.d.ts +0 -7
  290. package/dist/utils/resolveBoxStyles.d.ts.map +0 -1
  291. package/dist/utils/resolveBoxStyles.js.map +0 -1
  292. package/src/components/field/Field.tsx +0 -51
  293. package/src/components/field/index.ts +0 -2
  294. package/src/components/helper-text/HelperText.tsx +0 -12
  295. package/src/components/helper-text/index.ts +0 -2
  296. package/src/components/helper-text/types.ts +0 -10
  297. package/src/components/label/Label.tsx +0 -23
  298. package/src/components/label/index.ts +0 -2
  299. package/src/components/label/types.ts +0 -11
  300. package/src/components/list-item/ListItem.tsx +0 -72
  301. package/src/components/list-item/index.ts +0 -2
  302. package/src/components/list-item/types.ts +0 -11
  303. package/src/components/switch/Switch.tsx +0 -118
  304. package/src/components/switch/index.ts +0 -2
  305. package/src/components/textarea/Textarea.tsx +0 -15
  306. package/src/components/textarea/index.ts +0 -2
  307. package/src/components/textarea/types.ts +0 -5
  308. package/src/features/layout/adapters/inbound/Container.tsx +0 -43
  309. package/src/features/layout/adapters/inbound/Stack.test.ts +0 -13
  310. package/src/features/layout/adapters/inbound/Stack.tsx +0 -44
  311. package/src/layout/AppBar.tsx +0 -60
  312. package/src/layout/Center.tsx +0 -22
  313. package/src/layout/Inline.tsx +0 -9
  314. package/src/layout/ScrollArea.tsx +0 -116
  315. package/src/layout/Spacer.tsx +0 -22
  316. package/src/layout/Template.tsx +0 -86
  317. package/src/layout/index.ts +0 -14
  318. package/src/utils/resolveBoxStyles.test.ts +0 -54
  319. /package/src/{components/field/types.ts → types/field.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stack.js","sourceRoot":"","sources":["../../../../../src/features/layout/adapters/inbound/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C;AACJ,CAAC","sourcesContent":["import type React from 'react';\n\nimport { resolveResponsive, useResponsiveRuntime } from '../../../../core/responsive';\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { StackProps } from '../../../../types/layout';\nimport { resolveSpacing } from '../../../../utils/resolveSpacing';\nimport { Box } from './Box';\n\n/*** Stacks authored children directly along a responsive flex direction. */\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,13 +0,0 @@
1
- import React from 'react';
2
- import { type StyleProp, type ViewStyle } from 'react-native';
3
- import { type BoxProps } from '../features/layout/public';
4
- export interface AppBarProps extends Omit<BoxProps, 'children'> {
5
- leading?: React.ReactNode;
6
- trailing?: React.ReactNode;
7
- children?: React.ReactNode;
8
- safeAreaTop?: boolean;
9
- divider?: boolean;
10
- contentStyle?: StyleProp<ViewStyle>;
11
- }
12
- export declare function AppBar({ leading, trailing, children, safeAreaTop, divider, contentStyle, bg, style, ...props }: AppBarProps): React.JSX.Element;
13
- //# sourceMappingURL=AppBar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../src/layout/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EAAO,KAAK,QAAQ,EAAW,MAAM,2BAA2B,CAAC;AAGxE,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC7D,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACrC;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAkB,EAClB,OAAe,EACf,YAAY,EACZ,EAAE,EACF,KAAK,EACL,GAAG,KAAK,EACT,EAAE,WAAW,qBAiCb"}
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { View } from 'react-native';
3
- import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
4
- import { Box, Divider } from '../features/layout/public';
5
- import { useTheme } from '../theme/ThemeContext';
6
- export function AppBar({ leading, trailing, children, safeAreaTop = true, divider = false, contentStyle, bg, style, ...props }) {
7
- const { theme } = useTheme();
8
- const insets = React.use(SafeAreaInsetsContext);
9
- const topInset = safeAreaTop ? (insets?.top ?? 0) : 0;
10
- const safeAreaStyle = topInset === 0 ? undefined : { paddingTop: topInset };
11
- return (<Box {...props} bg={bg ?? theme.semantics.surface.default} style={style}>
12
- <View style={safeAreaStyle}>
13
- <View style={[
14
- {
15
- minHeight: 56,
16
- flexDirection: 'row',
17
- alignItems: 'center',
18
- paddingHorizontal: theme.spacing.m,
19
- },
20
- contentStyle,
21
- ]}>
22
- {leading ? (<View style={{ marginRight: theme.spacing.s, flexShrink: 0 }}>{leading}</View>) : null}
23
- <View style={{ flex: 1, minWidth: 0 }}>{children}</View>
24
- {trailing ? (<View style={{ marginLeft: theme.spacing.s, flexShrink: 0 }}>{trailing}</View>) : null}
25
- </View>
26
- {divider ? <Divider color={theme.semantics.neutral.divider} thickness={1}/> : null}
27
- </View>
28
- </Box>);
29
- }
30
- //# sourceMappingURL=AppBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppBar.js","sourceRoot":"","sources":["../../src/layout/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkB,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,EAAE,GAAG,EAAiB,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAWjD,MAAM,UAAU,MAAM,CAAC,EACrB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAW,GAAG,IAAI,EAClB,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,EAAE,EACF,KAAK,EACL,GAAG,KAAK,EACI;IACZ,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,aAAa,GACjB,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IAExD,OAAO,CACL,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CA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} from 'react-native';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nimport { Box, type BoxProps, Divider } from '../features/layout/public';\nimport { useTheme } from '../theme/ThemeContext';\n\nexport interface AppBarProps extends Omit<BoxProps, 'children'> {\n leading?: React.ReactNode;\n trailing?: React.ReactNode;\n children?: React.ReactNode;\n safeAreaTop?: boolean;\n divider?: boolean;\n contentStyle?: StyleProp<ViewStyle>;\n}\n\nexport function AppBar({\n leading,\n trailing,\n children,\n safeAreaTop = true,\n divider = false,\n contentStyle,\n bg,\n style,\n ...props\n}: AppBarProps) {\n const { theme } = useTheme();\n const insets = React.use(SafeAreaInsetsContext);\n const topInset = safeAreaTop ? (insets?.top ?? 0) : 0;\n const safeAreaStyle: ViewStyle | undefined =\n topInset === 0 ? undefined : { paddingTop: topInset };\n\n return (\n <Box {...props} bg={bg ?? theme.semantics.surface.default} style={style}>\n <View style={safeAreaStyle}>\n <View\n style={[\n {\n minHeight: 56,\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: theme.spacing.m,\n },\n contentStyle,\n ]}\n >\n {leading ? (\n <View style={{ marginRight: theme.spacing.s, flexShrink: 0 }}>{leading}</View>\n ) : null}\n <View style={{ flex: 1, minWidth: 0 }}>{children}</View>\n {trailing ? (\n <View style={{ marginLeft: theme.spacing.s, flexShrink: 0 }}>{trailing}</View>\n ) : null}\n </View>\n {divider ? <Divider color={theme.semantics.neutral.divider} thickness={1} /> : null}\n </View>\n </Box>\n );\n}\n"]}
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { type BoxProps } from '../features/layout/public';
3
- export interface CenterProps extends BoxProps {
4
- axis?: 'horizontal' | 'vertical' | 'both';
5
- }
6
- export declare function Center({ axis, style, ...props }: CenterProps): React.JSX.Element;
7
- //# sourceMappingURL=Center.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Center.d.ts","sourceRoot":"","sources":["../../src/layout/Center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,QAAQ;IAC3C,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;CAC3C;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAa,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAarE"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Box } from '../features/layout/public';
3
- export function Center({ axis = 'both', style, ...props }) {
4
- return (<Box {...props} style={[
5
- {
6
- alignItems: axis === 'both' || axis === 'horizontal' ? 'center' : undefined,
7
- justifyContent: axis === 'both' || axis === 'vertical' ? 'center' : undefined,
8
- },
9
- style,
10
- ]}/>);
11
- }
12
- //# sourceMappingURL=Center.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Center.js","sourceRoot":"","sources":["../../src/layout/Center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAiB,MAAM,2BAA2B,CAAC;AAM/D,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAe;IACpE,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACL;gBACE,UAAU,EAAE,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;gBAC3E,cAAc,EAAE,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;aAC9E;YACD,KAAK;SACN,CAAC,EACF,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box, type BoxProps } from '../features/layout/public';\n\nexport interface CenterProps extends BoxProps {\n axis?: 'horizontal' | 'vertical' | 'both';\n}\n\nexport function Center({ axis = 'both', style, ...props }: CenterProps) {\n return (\n <Box\n {...props}\n style={[\n {\n alignItems: axis === 'both' || axis === 'horizontal' ? 'center' : undefined,\n justifyContent: axis === 'both' || axis === 'vertical' ? 'center' : undefined,\n },\n style,\n ]}\n />\n );\n}\n"]}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { type StackProps } from '../features/layout/public';
3
- export type InlineProps = Omit<StackProps, 'direction'>;
4
- export declare function Inline({ wrap, align, ...props }: InlineProps): React.JSX.Element;
5
- //# sourceMappingURL=Inline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../src/layout/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEnE,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAExD,wBAAgB,MAAM,CAAC,EAAE,IAAa,EAAE,KAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAEhF"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { Stack } from '../features/layout/public';
3
- export function Inline({ wrap = 'wrap', align = 'center', ...props }) {
4
- return <Stack {...props} align={align} direction="row" wrap={wrap}/>;
5
- }
6
- //# sourceMappingURL=Inline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Inline.js","sourceRoot":"","sources":["../../src/layout/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAmB,MAAM,2BAA2B,CAAC;AAInE,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAe;IAC/E,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAG,CAAC;AACxE,CAAC","sourcesContent":["import React from 'react';\n\nimport { Stack, type StackProps } from '../features/layout/public';\n\nexport type InlineProps = Omit<StackProps, 'direction'>;\n\nexport function Inline({ wrap = 'wrap', align = 'center', ...props }: InlineProps) {\n return <Stack {...props} align={align} direction=\"row\" wrap={wrap} />;\n}\n"]}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { type ScrollViewProps as ReactNativeScrollViewProps, type StyleProp, type ViewStyle } from 'react-native';
3
- import type { BoxStyleProps } from '../types/layout';
4
- export interface ScrollAreaProps extends BoxStyleProps, Omit<ReactNativeScrollViewProps, 'children' | 'contentContainerStyle' | 'style'> {
5
- children?: React.ReactNode;
6
- contentContainerStyle?: StyleProp<ViewStyle>;
7
- }
8
- export declare function ScrollArea({ children, contentContainerStyle, p, px, py, pt, pb, pl, pr, m, mx, my, mt, mb, ml, mr, bg, radius, borderWidth, borderColor, width, height, minWidth, maxWidth, minHeight, maxHeight, flex, flexGrow, flexShrink, flexBasis, alignSelf, position, top, bottom, left, right, overflow, zIndex, opacity, style, ...scrollProps }: ScrollAreaProps): React.JSX.Element;
9
- //# sourceMappingURL=ScrollArea.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollArea.d.ts","sourceRoot":"","sources":["../../src/layout/ScrollArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,eAAe,IAAI,0BAA0B,EAClD,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,MAAM,WAAW,eACf,SACE,aAAa,EACb,IAAI,CAAC,0BAA0B,EAAE,UAAU,GAAG,uBAAuB,GAAG,OAAO,CAAC;IAClF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,qBAAqB,EACrB,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,MAAM,EACN,WAAW,EACX,WAAW,EACX,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,GAAG,WAAW,EACf,EAAE,eAAe,qBAoDjB"}
@@ -1,52 +0,0 @@
1
- import React from 'react';
2
- import { ScrollView, } from 'react-native';
3
- import { useResponsiveRuntime } from '../core/responsive';
4
- import { useTheme } from '../theme/ThemeContext';
5
- import { resolveBoxStyles } from '../utils/resolveBoxStyles';
6
- export function ScrollArea({ children, contentContainerStyle, p, px, py, pt, pb, pl, pr, m, mx, my, mt, mb, ml, mr, bg, radius, borderWidth, borderColor, width, height, minWidth, maxWidth, minHeight, maxHeight, flex, flexGrow, flexShrink, flexBasis, alignSelf, position, top, bottom, left, right, overflow, zIndex, opacity, style, ...scrollProps }) {
7
- const { theme } = useTheme();
8
- const { breakpoint } = useResponsiveRuntime();
9
- const resolved = resolveBoxStyles(theme, breakpoint, {
10
- p,
11
- px,
12
- py,
13
- pt,
14
- pb,
15
- pl,
16
- pr,
17
- m,
18
- mx,
19
- my,
20
- mt,
21
- mb,
22
- ml,
23
- mr,
24
- bg,
25
- radius,
26
- borderWidth,
27
- borderColor,
28
- width,
29
- height,
30
- minWidth,
31
- maxWidth,
32
- minHeight,
33
- maxHeight,
34
- flex,
35
- flexGrow,
36
- flexShrink,
37
- flexBasis,
38
- alignSelf,
39
- position,
40
- top,
41
- bottom,
42
- left,
43
- right,
44
- overflow,
45
- zIndex,
46
- opacity,
47
- });
48
- return (<ScrollView {...scrollProps} contentContainerStyle={contentContainerStyle} style={[resolved, style]}>
49
- {children}
50
- </ScrollView>);
51
- }
52
- //# sourceMappingURL=ScrollArea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollArea.js","sourceRoot":"","sources":["../../src/layout/ScrollArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,GAIX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAU7D,MAAM,UAAU,UAAU,CAAC,EACzB,QAAQ,EACR,qBAAqB,EACrB,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,MAAM,EACN,WAAW,EACX,WAAW,EACX,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,GAAG,WAAW,EACE;IAChB,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;QACnD,CAAC;QACD,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,CAAC;QACD,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,MAAM;QACN,WAAW;QACX,WAAW;QACX,KAAK;QACL,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,SAAS;QACT,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,SAAS;QACT,SAAS;QACT,QAAQ;QACR,GAAG;QACH,MAAM;QACN,IAAI;QACJ,KAAK;QACL,QAAQ;QACR,MAAM;QACN,OAAO;KACR,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,UAAU,CACT,IAAI,WAAW,CAAC,CAChB,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,CAC7C,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAEzB;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport {\n ScrollView,\n type ScrollViewProps as ReactNativeScrollViewProps,\n type StyleProp,\n type ViewStyle,\n} from 'react-native';\n\nimport { useResponsiveRuntime } from '../core/responsive';\nimport { useTheme } from '../theme/ThemeContext';\nimport type { BoxStyleProps } from '../types/layout';\nimport { resolveBoxStyles } from '../utils/resolveBoxStyles';\n\nexport interface ScrollAreaProps\n extends\n BoxStyleProps,\n Omit<ReactNativeScrollViewProps, 'children' | 'contentContainerStyle' | 'style'> {\n children?: React.ReactNode;\n contentContainerStyle?: StyleProp<ViewStyle>;\n}\n\nexport function ScrollArea({\n children,\n contentContainerStyle,\n p,\n px,\n py,\n pt,\n pb,\n pl,\n pr,\n m,\n mx,\n my,\n mt,\n mb,\n ml,\n mr,\n bg,\n radius,\n borderWidth,\n borderColor,\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n flex,\n flexGrow,\n flexShrink,\n flexBasis,\n alignSelf,\n position,\n top,\n bottom,\n left,\n right,\n overflow,\n zIndex,\n opacity,\n style,\n ...scrollProps\n}: ScrollAreaProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n const resolved = resolveBoxStyles(theme, breakpoint, {\n p,\n px,\n py,\n pt,\n pb,\n pl,\n pr,\n m,\n mx,\n my,\n mt,\n mb,\n ml,\n mr,\n bg,\n radius,\n borderWidth,\n borderColor,\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n flex,\n flexGrow,\n flexShrink,\n flexBasis,\n alignSelf,\n position,\n top,\n bottom,\n left,\n right,\n overflow,\n zIndex,\n opacity,\n });\n\n return (\n <ScrollView\n {...scrollProps}\n contentContainerStyle={contentContainerStyle}\n style={[resolved, style]}\n >\n {children}\n </ScrollView>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Show.d.ts","sourceRoot":"","sources":["../../src/layout/Show.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,KAAK,UAAU,EAAwB,MAAM,oBAAoB,CAAC;AAE9F,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,SAAS,qBAIlE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/layout/Show.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAQ9F,MAAM,UAAU,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAa;IACjE,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC9C,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,KAAK,CAAC;IAC7D,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC9C,CAAC","sourcesContent":["import React from 'react';\n\nimport { resolveResponsive, type Responsive, useResponsiveRuntime } from '../core/responsive';\n\nexport interface ShowProps {\n when: Responsive<boolean>;\n children: React.ReactNode;\n fallback?: React.ReactNode;\n}\n\nexport function Show({ when, children, fallback = null }: ShowProps) {\n const { breakpoint } = useResponsiveRuntime();\n const visible = resolveResponsive(when, breakpoint) ?? false;\n return <>{visible ? children : fallback}</>;\n}\n"]}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { SpaceValue } from '../types/layout';
3
- export interface SpacerProps {
4
- size?: SpaceValue;
5
- axis?: 'horizontal' | 'vertical' | 'both';
6
- testID?: string;
7
- }
8
- export declare function Spacer({ size, axis, testID }: SpacerProps): React.JSX.Element;
9
- //# sourceMappingURL=Spacer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../src/layout/Spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAU,EAAE,IAAiB,EAAE,MAAM,EAAE,EAAE,WAAW,qBAU5E"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Box } from '../features/layout/public';
3
- export function Spacer({ size = 'm', axis = 'vertical', testID }) {
4
- if (axis === 'horizontal') {
5
- return <Box testID={testID} width={size}/>;
6
- }
7
- if (axis === 'both') {
8
- return <Box testID={testID} height={size} width={size}/>;
9
- }
10
- return <Box testID={testID} height={size}/>;
11
- }
12
- //# sourceMappingURL=Spacer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Spacer.js","sourceRoot":"","sources":["../../src/layout/Spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAShD,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,GAAG,GAAG,EAAE,IAAI,GAAG,UAAU,EAAE,MAAM,EAAe;IAC3E,IAAI,IAAI,KAAK,YAAY,EAAE,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAG,CAAC;IAC9C,CAAC;IAED,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAG,CAAC;IAC5D,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAG,CAAC;AAC/C,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box } from '../features/layout/public';\nimport type { SpaceValue } from '../types/layout';\n\nexport interface SpacerProps {\n size?: SpaceValue;\n axis?: 'horizontal' | 'vertical' | 'both';\n testID?: string;\n}\n\nexport function Spacer({ size = 'm', axis = 'vertical', testID }: SpacerProps) {\n if (axis === 'horizontal') {\n return <Box testID={testID} width={size} />;\n }\n\n if (axis === 'both') {\n return <Box testID={testID} height={size} width={size} />;\n }\n\n return <Box testID={testID} height={size} />;\n}\n"]}
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { type Breakpoint, type Responsive } from '../core/responsive';
3
- import { type BoxProps } from '../features/layout/public';
4
- import type { SpaceValue } from '../types/layout';
5
- type SlotMap = Record<string, React.ReactNode>;
6
- type TemplateMap = Partial<Record<Breakpoint, string[][]>>;
7
- type ColumnsMap = Partial<Record<Breakpoint, number[]>>;
8
- export interface TemplateProps extends Omit<BoxProps, 'children'> {
9
- slots: SlotMap;
10
- templates: TemplateMap;
11
- columns?: ColumnsMap;
12
- gap?: Responsive<SpaceValue>;
13
- rowGap?: Responsive<SpaceValue>;
14
- colGap?: Responsive<SpaceValue>;
15
- }
16
- export declare function Template({ slots, templates, columns, gap, rowGap, colGap, ...props }: TemplateProps): React.JSX.Element;
17
- export {};
18
- //# sourceMappingURL=Template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Template.d.ts","sourceRoot":"","sources":["../../src/layout/Template.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,KAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;AAC/C,KAAK,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,KAAK,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAExD,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC/D,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,WAAW,CAAC;IACvB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,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;CACjC;AASD,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,EACT,OAAO,EACP,GAAO,EACP,MAAM,EACN,MAAM,EACN,GAAG,KAAK,EACT,EAAE,aAAa,qBA2Cf"}
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import { View } from 'react-native';
3
- import { resolveResponsive, useResponsiveRuntime, } from '../core/responsive';
4
- import { Box } from '../features/layout/public';
5
- import { useTheme } from '../theme/ThemeContext';
6
- import { resolveSpacing } from '../utils/resolveSpacing';
7
- function resolveByBreakpointMap(map, breakpoint) {
8
- return resolveResponsive(map, breakpoint);
9
- }
10
- export function Template({ slots, templates, columns, gap = 0, rowGap, colGap, ...props }) {
11
- const { theme } = useTheme();
12
- const { breakpoint } = useResponsiveRuntime();
13
- const resolvedTemplate = resolveByBreakpointMap(templates, breakpoint) ?? [];
14
- const resolvedColumns = resolveByBreakpointMap(columns, breakpoint);
15
- const defaultGap = resolveResponsive(gap, breakpoint) ?? 0;
16
- const rowSpacing = Number(resolveSpacing(theme, resolveResponsive(rowGap, breakpoint) ?? defaultGap) ?? 0);
17
- const colSpacing = Number(resolveSpacing(theme, resolveResponsive(colGap, breakpoint) ?? defaultGap) ?? 0);
18
- return (<Box {...props}>
19
- {resolvedTemplate.map((row, rowIndex) => (<View key={`row-${String(rowIndex)}`} style={{
20
- flexDirection: 'row',
21
- marginTop: rowIndex === 0 ? 0 : rowSpacing,
22
- }}>
23
- {row.map((slotId, cellIndex) => {
24
- const weight = resolvedColumns?.[cellIndex] ?? 1;
25
- const node = slots[slotId];
26
- return (<View key={`${slotId}-${String(rowIndex)}-${String(cellIndex)}`} style={{
27
- flex: weight,
28
- marginLeft: cellIndex === 0 ? 0 : colSpacing,
29
- }}>
30
- {node}
31
- </View>);
32
- })}
33
- </View>))}
34
- </Box>);
35
- }
36
- //# sourceMappingURL=Template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Template.js","sourceRoot":"","sources":["../../src/layout/Template.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAEL,iBAAiB,EAEjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,GAAG,EAAiB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAezD,SAAS,sBAAsB,CAC7B,GAA+C,EAC/C,UAAsB;IAEtB,OAAO,iBAAiB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,EACT,OAAO,EACP,GAAG,GAAG,CAAC,EACP,MAAM,EACN,MAAM,EACN,GAAG,KAAK,EACM;IACd,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAE9C,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;IAC7E,MAAM,eAAe,GAAG,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACpE,MAAM,UAA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AC,IAAI,CACP;cAAA,EAAE,IAAI,CAAC,CACR,CAAC;YACJ,CAAC,CAAC,CACJ;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CACJ;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport {\n type Breakpoint,\n resolveResponsive,\n type Responsive,\n useResponsiveRuntime,\n} from '../core/responsive';\nimport { Box, type BoxProps } from '../features/layout/public';\nimport { useTheme } from '../theme/ThemeContext';\nimport type { SpaceValue } from '../types/layout';\nimport { resolveSpacing } from '../utils/resolveSpacing';\n\ntype SlotMap = Record<string, React.ReactNode>;\ntype TemplateMap = Partial<Record<Breakpoint, string[][]>>;\ntype ColumnsMap = Partial<Record<Breakpoint, number[]>>;\n\nexport interface TemplateProps extends Omit<BoxProps, 'children'> {\n slots: SlotMap;\n templates: TemplateMap;\n columns?: ColumnsMap;\n gap?: Responsive<SpaceValue>;\n rowGap?: Responsive<SpaceValue>;\n colGap?: Responsive<SpaceValue>;\n}\n\nfunction resolveByBreakpointMap<T>(\n map: Partial<Record<Breakpoint, T>> | undefined,\n breakpoint: Breakpoint,\n): T | undefined {\n return resolveResponsive(map, breakpoint);\n}\n\nexport function Template({\n slots,\n templates,\n columns,\n gap = 0,\n rowGap,\n colGap,\n ...props\n}: TemplateProps) {\n const { theme } = useTheme();\n const { breakpoint } = useResponsiveRuntime();\n\n const resolvedTemplate = resolveByBreakpointMap(templates, breakpoint) ?? [];\n const resolvedColumns = resolveByBreakpointMap(columns, breakpoint);\n const defaultGap = resolveResponsive(gap, breakpoint) ?? 0;\n const rowSpacing = Number(\n resolveSpacing(theme, resolveResponsive(rowGap, breakpoint) ?? defaultGap) ?? 0,\n );\n const colSpacing = Number(\n resolveSpacing(theme, resolveResponsive(colGap, breakpoint) ?? defaultGap) ?? 0,\n );\n\n return (\n <Box {...props}>\n {resolvedTemplate.map((row, rowIndex) => (\n <View\n key={`row-${String(rowIndex)}`}\n style={{\n flexDirection: 'row',\n marginTop: rowIndex === 0 ? 0 : rowSpacing,\n }}\n >\n {row.map((slotId, cellIndex) => {\n const weight = resolvedColumns?.[cellIndex] ?? 1;\n const node = slots[slotId];\n return (\n <View\n key={`${slotId}-${String(rowIndex)}-${String(cellIndex)}`}\n style={{\n flex: weight,\n marginLeft: cellIndex === 0 ? 0 : colSpacing,\n }}\n >\n {node}\n </View>\n );\n })}\n </View>\n ))}\n </Box>\n );\n}\n"]}
@@ -1,15 +0,0 @@
1
- export type { AppBarProps } from './AppBar';
2
- export { AppBar } from './AppBar';
3
- export type { CenterProps } from './Center';
4
- export { Center } from './Center';
5
- export type { InlineProps } from './Inline';
6
- export { Inline } from './Inline';
7
- export type { ScrollAreaProps } from './ScrollArea';
8
- export { ScrollArea } from './ScrollArea';
9
- export type { ShowProps } from './Show';
10
- export { Show } from './Show';
11
- export type { SpacerProps } from './Spacer';
12
- export { Spacer } from './Spacer';
13
- export type { TemplateProps } from './Template';
14
- export { Template } from './Template';
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -1,8 +0,0 @@
1
- export { AppBar } from './AppBar';
2
- export { Center } from './Center';
3
- export { Inline } from './Inline';
4
- export { ScrollArea } from './ScrollArea';
5
- export { Show } from './Show';
6
- export { Spacer } from './Spacer';
7
- export { Template } from './Template';
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export type { AppBarProps } from './AppBar';\nexport { AppBar } from './AppBar';\nexport type { CenterProps } from './Center';\nexport { Center } from './Center';\nexport type { InlineProps } from './Inline';\nexport { Inline } from './Inline';\nexport type { ScrollAreaProps } from './ScrollArea';\nexport { ScrollArea } from './ScrollArea';\nexport type { ShowProps } from './Show';\nexport { Show } from './Show';\nexport type { SpacerProps } from './Spacer';\nexport { Spacer } from './Spacer';\nexport type { TemplateProps } from './Template';\nexport { Template } from './Template';\n"]}
@@ -1,7 +0,0 @@
1
- import type { ViewStyle } from 'react-native';
2
- import type { Breakpoint } from '../core/responsive/types';
3
- import type { SurfaceTheme } from '../theme/types';
4
- import type { BoxStyleProps } from '../types/layout';
5
- /*** Resolves responsive Box style props into one React Native view style. */
6
- export declare function resolveBoxStyles(theme: SurfaceTheme, breakpoint: Breakpoint, props: BoxStyleProps): ViewStyle;
7
- //# sourceMappingURL=resolveBoxStyles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolveBoxStyles.d.ts","sourceRoot":"","sources":["../../src/utils/resolveBoxStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,iBAAiB,CAAC;AAGjE,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,aAAa,GACnB,SAAS,CAQX"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolveBoxStyles.js","sourceRoot":"","sources":["../../src/utils/resolveBoxStyles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,6EAA6E;AAC7E,MAAM,UAAU,gBAAgB,CAC9B,KAAmB,EACnB,UAAsB,EACtB,KAAoB;IAEpB,OAAO;QACL,SAAS,EAAE,CAAC;QACZ,GAAG,oBAAoB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC;QACjD,GAAG,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC;QAChD,GAAG,sBAAsB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC;QACnD,GAAG,mBAAmB,CAAC,UAAU,EAAE,KAAK,CAAC;K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AU,CAAC;KACtD,CAAC;AACJ,CAAC;AAED,sDAAsD;AACtD,SAAS,aAAa,CACpB,KAAmB,EACnB,KAAuD;IAEvD,OAAO,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC1C,CAAC;AAED,gFAAgF;AAChF,SAAS,YAAY,CAAC,KAAmB,EAAE,KAA6B;IACtE,OAAO,YAAY,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED,iFAAiF;AACjF,SAAS,gBAAgB,CACvB,KAAmB,EACnB,KAAkC;IAElC,OAAO,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import type { ViewStyle } from 'react-native';\n\nimport { resolveResponsive } from '../core/responsive/resolve';\nimport type { Breakpoint } from '../core/responsive/types';\nimport { resolveToken } from '../theme/resolveToken';\nimport type { SurfaceTheme } from '../theme/types';\nimport type { BoxStyleProps, ColorValue } from '../types/layout';\nimport { resolveSpacing } from './resolveSpacing';\n\n/*** Resolves responsive Box style props into one React Native view style. */\nexport function resolveBoxStyles(\n theme: SurfaceTheme,\n breakpoint: Breakpoint,\n props: BoxStyleProps,\n): ViewStyle {\n return {\n elevation: 0,\n ...resolveSpacingStyles(theme, breakpoint, props),\n ...resolveVisualStyles(theme, breakpoint, props),\n ...resolveDimensionStyles(theme, breakpoint, props),\n ...resolveLayoutStyles(breakpoint, props),\n };\n}\n\n/*** Resolves padding and margin styles from responsive spacing props. */\nfunction resolveSpacingStyles(\n theme: SurfaceTheme,\n breakpoint: Breakpoint,\n props: BoxStyleProps,\n): ViewStyle {\n return {\n padding: resolveSpacing(theme, resolveResponsive(props.p, breakpoint)),\n paddingHorizontal: resolveSpacing(theme, resolveResponsive(props.px, breakpoint)),\n paddingVertical: resolveSpacing(theme, resolveResponsive(props.py, breakpoint)),\n paddingTop: resolveSpacing(theme, resolveResponsive(props.pt, breakpoint)),\n paddingBottom: resolveSpacing(theme, resolveResponsive(props.pb, breakpoint)),\n paddingLeft: resolveSpacing(theme, resolveResponsive(props.pl, breakpoint)),\n paddingRight: resolveSpacing(theme, resolveResponsive(props.pr, breakpoint)),\n margin: resolveSpacing(theme, resolveResponsive(props.m, breakpoint)),\n marginHorizontal: resolveSpacing(theme, resolveResponsive(props.mx, breakpoint)),\n marginVertical: resolveSpacing(theme, resolveResponsive(props.my, breakpoint)),\n marginTop: resolveSpacing(theme, resolveResponsive(props.mt, breakpoint)),\n marginBottom: resolveSpacing(theme, resolveResponsive(props.mb, breakpoint)),\n marginLeft: resolveSpacing(theme, resolveResponsive(props.ml, breakpoint)),\n marginRight: resolveSpacing(theme, resolveResponsive(props.mr, breakpoint)),\n };\n}\n\n/*** Resolves background, radius, and border styles. */\nfunction resolveVisualStyles(\n theme: SurfaceTheme,\n breakpoint: Breakpoint,\n props: BoxStyleProps,\n): ViewStyle {\n return {\n backgroundColor: resolveColor(theme, resolveResponsive(props.bg, breakpoint)),\n borderRadius: resolveRadius(theme, resolveResponsive(props.radius, breakpoint)),\n borderWidth: resolveResponsive(props.borderWidth, breakpoint),\n borderColor: resolveColor(theme, resolveResponsive(props.borderColor, breakpoint)),\n };\n}\n\n/*** Resolves responsive dimension props through spacing tokens. */\nfunction resolveDimensionStyles(\n theme: SurfaceTheme,\n breakpoint: Breakpoint,\n props: BoxStyleProps,\n): ViewStyle {\n return {\n width: resolveDimension(\n theme,\n resolveResponsive(props.width, breakpoint),\n ) as ViewStyle['width'],\n height: resolveDimension(\n theme,\n resolveResponsive(props.height, breakpoint),\n ) as ViewStyle['height'],\n minWidth: resolveDimension(\n theme,\n resolveResponsive(props.minWidth, breakpoint),\n ) as ViewStyle['minWidth'],\n maxWidth: resolveDimension(\n theme,\n resolveResponsive(props.maxWidth, breakpoint),\n ) as ViewStyle['maxWidth'],\n minHeight: resolveDimension(\n theme,\n resolveResponsive(props.minHeight, breakpoint),\n ) as ViewStyle['minHeight'],\n maxHeight: resolveDimension(\n theme,\n resolveResponsive(props.maxHeight, breakpoint),\n ) as ViewStyle['maxHeight'],\n };\n}\n\n/*** Resolves responsive flex, positioning, and visibility styles. */\nfunction resolveLayoutStyles(breakpoint: Breakpoint, props: BoxStyleProps): ViewStyle {\n return {\n flex: resolveResponsive(props.flex, breakpoint),\n flexGrow: resolveResponsive(props.flexGrow, breakpoint),\n flexShrink: resolveResponsive(props.flexShrink, breakpoint),\n flexBasis: resolveResponsive(props.flexBasis, breakpoint) as ViewStyle['flexBasis'],\n alignSelf: resolveResponsive(props.alignSelf, breakpoint),\n position: resolveResponsive(props.position, breakpoint),\n top: resolveResponsive(props.top, breakpoint),\n bottom: resolveResponsive(props.bottom, breakpoint),\n left: resolveResponsive(props.left, breakpoint),\n right: resolveResponsive(props.right, breakpoint),\n overflow: resolveResponsive(props.overflow, breakpoint),\n zIndex: resolveResponsive(props.zIndex, breakpoint),\n opacity: resolveResponsive(props.opacity, breakpoint),\n };\n}\n\n/*** Resolves a Surface radius token or raw number. */\nfunction resolveRadius(\n theme: SurfaceTheme,\n value: number | keyof SurfaceTheme['radii'] | undefined,\n): number | undefined {\n return resolveToken(theme.radii, value);\n}\n\n/*** Resolves a Surface color token while preserving arbitrary color strings. */\nfunction resolveColor(theme: SurfaceTheme, value: ColorValue | undefined): string | undefined {\n return resolveToken(theme.colors, value);\n}\n\n/*** Resolves spacing-token dimensions while preserving raw dimension strings. */\nfunction resolveDimension(\n theme: SurfaceTheme,\n value: number | string | undefined,\n): number | string | undefined {\n return resolveToken(theme.spacing, value);\n}\n"]}
@@ -1,51 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Box, Stack } from '../../features/layout/public';
4
- import { resolveFieldPresentation, resolveFieldState } from '../../internal/resolvers';
5
- import { HelperText } from '../helper-text';
6
- import { Label } from '../label';
7
- import type { FieldProps } from './types';
8
-
9
- export function Field({
10
- children,
11
- label,
12
- helperText,
13
- errorText,
14
- required = false,
15
- disabled = false,
16
- invalid = false,
17
- readOnly = false,
18
- testID,
19
- }: FieldProps) {
20
- const hasErrorText = Boolean(errorText);
21
- const fieldState = resolveFieldState({
22
- disabled,
23
- invalid: invalid || hasErrorText,
24
- readOnly,
25
- });
26
- const presentation = resolveFieldPresentation(fieldState);
27
-
28
- return (
29
- <Stack gap="xs" testID={testID}>
30
- {label ? (
31
- <Label
32
- color={presentation.labelColor}
33
- emphasis={presentation.labelEmphasis}
34
- required={required}
35
- >
36
- {label}
37
- </Label>
38
- ) : null}
39
- <Box>{children}</Box>
40
- {hasErrorText ? (
41
- <HelperText color={presentation.helperColor} emphasis={presentation.helperEmphasis}>
42
- {errorText}
43
- </HelperText>
44
- ) : helperText ? (
45
- <HelperText color={presentation.helperColor} emphasis={presentation.helperEmphasis}>
46
- {helperText}
47
- </HelperText>
48
- ) : null}
49
- </Stack>
50
- );
51
- }
@@ -1,2 +0,0 @@
1
- export { Field } from './Field';
2
- export type { FieldProps } from './types';
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Text } from '../../features/typography/public';
4
- import type { HelperTextProps } from './types';
5
-
6
- export function HelperText({ children, emphasis = 'muted', color, testID }: HelperTextProps) {
7
- return (
8
- <Text color={color} emphasis={emphasis} testID={testID} variant="caption">
9
- {children}
10
- </Text>
11
- );
12
- }
@@ -1,2 +0,0 @@
1
- export { HelperText } from './HelperText';
2
- export type { HelperTextProps } from './types';
@@ -1,10 +0,0 @@
1
- import type React from 'react';
2
-
3
- import type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';
4
-
5
- export interface HelperTextProps {
6
- children?: React.ReactNode;
7
- emphasis?: Extract<SurfaceEmphasis, 'default' | 'muted'>;
8
- color?: Extract<SurfaceColor, 'error'>;
9
- testID?: string;
10
- }
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Text } from '../../features/typography/public';
4
- import type { LabelProps } from './types';
5
-
6
- export function Label({
7
- children,
8
- required = false,
9
- emphasis = 'default',
10
- color,
11
- testID,
12
- }: LabelProps) {
13
- return (
14
- <Text color={color} emphasis={emphasis} testID={testID} variant="label" weight="medium">
15
- {children}
16
- {required ? (
17
- <Text color="error" variant="label" weight="medium">
18
- {' *'}
19
- </Text>
20
- ) : null}
21
- </Text>
22
- );
23
- }
@@ -1,2 +0,0 @@
1
- export { Label } from './Label';
2
- export type { LabelProps } from './types';
@@ -1,11 +0,0 @@
1
- import type React from 'react';
2
-
3
- import type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';
4
-
5
- export interface LabelProps {
6
- children?: React.ReactNode;
7
- required?: boolean;
8
- emphasis?: Extract<SurfaceEmphasis, 'default' | 'muted'>;
9
- color?: Extract<SurfaceColor, 'error'>;
10
- testID?: string;
11
- }
@@ -1,72 +0,0 @@
1
- import React from 'react';
2
- import { View } from 'react-native';
3
-
4
- import { Box } from '../../features/layout/public';
5
- import { Text } from '../../features/typography/public';
6
- import { ButtonBase } from '../../primitives/button-base';
7
- import { useTheme } from '../../theme/ThemeContext';
8
- import type { ListItemProps } from './types';
9
-
10
- function ListItemContent({
11
- title,
12
- description,
13
- leading,
14
- trailing,
15
- testID,
16
- }: Omit<ListItemProps, 'disabled' | 'onPress'>) {
17
- const { theme } = useTheme();
18
-
19
- return (
20
- <Box
21
- px="m"
22
- py="m"
23
- testID={testID}
24
- style={{
25
- flexDirection: 'row',
26
- alignItems: 'center',
27
- }}
28
- >
29
- {leading ? <View style={{ marginRight: theme.spacing.m }}>{leading}</View> : null}
30
- <Box flex={1}>
31
- {title ? (
32
- <Text numberOfLines={1} variant="body" weight="medium">
33
- {title}
34
- </Text>
35
- ) : null}
36
- {description ? (
37
- <Text emphasis="muted" numberOfLines={2} variant="bodySmall">
38
- {description}
39
- </Text>
40
- ) : null}
41
- </Box>
42
- {trailing ? <View style={{ marginLeft: theme.spacing.m }}>{trailing}</View> : null}
43
- </Box>
44
- );
45
- }
46
-
47
- export function ListItem({ onPress, disabled = false, testID, ...content }: ListItemProps) {
48
- const { theme } = useTheme();
49
-
50
- if (!onPress) {
51
- return <ListItemContent {...content} testID={testID} />;
52
- }
53
-
54
- return (
55
- <ButtonBase accessibilityRole="button" disabled={disabled} onPress={onPress} testID={testID}>
56
- {(state) => (
57
- <Box
58
- style={{
59
- backgroundColor: state.pressed
60
- ? theme.semantics.neutral.surfaceActive
61
- : state.hovered
62
- ? theme.semantics.neutral.surfaceHover
63
- : 'transparent',
64
- opacity: state.disabled ? 0.72 : 1,
65
- }}
66
- >
67
- <ListItemContent {...content} />
68
- </Box>
69
- )}
70
- </ButtonBase>
71
- );
72
- }
@@ -1,2 +0,0 @@
1
- export { ListItem } from './ListItem';
2
- export type { ListItemProps } from './types';
@@ -1,11 +0,0 @@
1
- import type React from 'react';
2
-
3
- export interface ListItemProps {
4
- title?: React.ReactNode;
5
- description?: React.ReactNode;
6
- leading?: React.ReactNode;
7
- trailing?: React.ReactNode;
8
- onPress?: (() => void) | undefined;
9
- disabled?: boolean;
10
- testID?: string;
11
- }