@ankhorage/surface 5.0.0 → 6.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 (313) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -3
  3. package/dist/components/field/Field.d.ts +1 -0
  4. package/dist/components/field/Field.d.ts.map +1 -1
  5. package/dist/components/field/Field.js +5 -4
  6. package/dist/components/field/Field.js.map +1 -1
  7. package/dist/components/list-item/ListItem.d.ts +1 -0
  8. package/dist/components/list-item/ListItem.d.ts.map +1 -1
  9. package/dist/components/list-item/ListItem.js +13 -12
  10. package/dist/components/list-item/ListItem.js.map +1 -1
  11. package/dist/components/switch/Switch.d.ts +1 -0
  12. package/dist/components/switch/Switch.d.ts.map +1 -1
  13. package/dist/components/switch/Switch.js +10 -13
  14. package/dist/components/switch/Switch.js.map +1 -1
  15. package/dist/{layout → core/responsive}/Show.d.ts +2 -1
  16. package/dist/core/responsive/Show.d.ts.map +1 -0
  17. package/dist/{layout → core/responsive}/Show.js +3 -1
  18. package/dist/core/responsive/Show.js.map +1 -0
  19. package/dist/core/responsive/index.d.ts +1 -0
  20. package/dist/core/responsive/index.d.ts.map +1 -1
  21. package/dist/core/responsive/index.js +1 -0
  22. package/dist/core/responsive/index.js.map +1 -1
  23. package/dist/features/app-bar/adapters/inbound/AppBar.d.ts +5 -0
  24. package/dist/features/app-bar/adapters/inbound/AppBar.d.ts.map +1 -0
  25. package/dist/features/app-bar/adapters/inbound/AppBar.js +40 -0
  26. package/dist/features/app-bar/adapters/inbound/AppBar.js.map +1 -0
  27. package/dist/features/app-bar/public.d.ts +3 -0
  28. package/dist/features/app-bar/public.d.ts.map +1 -0
  29. package/dist/features/app-bar/public.js +2 -0
  30. package/dist/features/app-bar/public.js.map +1 -0
  31. package/dist/features/badge/adapters/inbound/Badge.js +3 -3
  32. package/dist/features/badge/adapters/inbound/Badge.js.map +1 -1
  33. package/dist/features/button/adapters/inbound/Button.js +8 -8
  34. package/dist/features/button/adapters/inbound/Button.js.map +1 -1
  35. package/dist/features/button/adapters/inbound/IconButton.js +3 -3
  36. package/dist/features/button/adapters/inbound/IconButton.js.map +1 -1
  37. package/dist/features/form/checkbox/adapters/inbound/Checkbox.js +7 -7
  38. package/dist/features/form/checkbox/adapters/inbound/Checkbox.js.map +1 -1
  39. package/dist/features/form/radio/adapters/inbound/Radio.js +8 -8
  40. package/dist/features/form/radio/adapters/inbound/Radio.js.map +1 -1
  41. package/dist/features/layout/adapters/inbound/Divider.js +2 -2
  42. package/dist/features/layout/adapters/inbound/Divider.js.map +1 -1
  43. package/dist/features/layout/adapters/inbound/Grid.d.ts.map +1 -1
  44. package/dist/features/layout/adapters/inbound/Grid.js +7 -9
  45. package/dist/features/layout/adapters/inbound/Grid.js.map +1 -1
  46. package/dist/features/layout/adapters/inbound/ScrollView.d.ts +5 -0
  47. package/dist/features/layout/adapters/inbound/ScrollView.d.ts.map +1 -0
  48. package/dist/features/layout/adapters/inbound/ScrollView.js +69 -0
  49. package/dist/features/layout/adapters/inbound/ScrollView.js.map +1 -0
  50. package/dist/features/layout/adapters/inbound/View.d.ts +5 -0
  51. package/dist/features/layout/adapters/inbound/View.d.ts.map +1 -0
  52. package/dist/features/layout/adapters/inbound/View.js +17 -0
  53. package/dist/features/layout/adapters/inbound/View.js.map +1 -0
  54. package/dist/features/layout/public.d.ts +3 -4
  55. package/dist/features/layout/public.d.ts.map +1 -1
  56. package/dist/features/layout/public.js +2 -3
  57. package/dist/features/layout/public.js.map +1 -1
  58. package/dist/{components/modal → features/modal/adapters/inbound}/Modal.d.ts +2 -1
  59. package/dist/features/modal/adapters/inbound/Modal.d.ts.map +1 -0
  60. package/dist/features/modal/adapters/inbound/Modal.js +51 -0
  61. package/dist/features/modal/adapters/inbound/Modal.js.map +1 -0
  62. package/dist/features/modal/public.d.ts +3 -0
  63. package/dist/features/modal/public.d.ts.map +1 -0
  64. package/dist/features/modal/public.js +2 -0
  65. package/dist/features/modal/public.js.map +1 -0
  66. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.d.ts.map +1 -1
  67. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js +11 -12
  68. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js.map +1 -1
  69. package/dist/features/surface/adapters/inbound/Surface.d.ts +1 -1
  70. package/dist/features/surface/adapters/inbound/Surface.d.ts.map +1 -1
  71. package/dist/features/surface/adapters/inbound/Surface.js +3 -3
  72. package/dist/features/surface/adapters/inbound/Surface.js.map +1 -1
  73. package/dist/features/tabs/adapters/inbound/Tab.d.ts +5 -0
  74. package/dist/features/tabs/adapters/inbound/Tab.d.ts.map +1 -0
  75. package/dist/features/tabs/adapters/inbound/Tab.js +33 -0
  76. package/dist/features/tabs/adapters/inbound/Tab.js.map +1 -0
  77. package/dist/features/tabs/adapters/inbound/TabList.d.ts +5 -0
  78. package/dist/features/tabs/adapters/inbound/TabList.d.ts.map +1 -0
  79. package/dist/features/tabs/adapters/inbound/TabList.js +40 -0
  80. package/dist/features/tabs/adapters/inbound/TabList.js.map +1 -0
  81. package/dist/features/tabs/adapters/inbound/TabPanel.d.ts +5 -0
  82. package/dist/features/tabs/adapters/inbound/TabPanel.d.ts.map +1 -0
  83. package/dist/features/tabs/adapters/inbound/TabPanel.js +14 -0
  84. package/dist/features/tabs/adapters/inbound/TabPanel.js.map +1 -0
  85. package/dist/features/tabs/adapters/inbound/Tabs.d.ts +5 -0
  86. package/dist/features/tabs/adapters/inbound/Tabs.d.ts.map +1 -0
  87. package/dist/features/tabs/adapters/inbound/Tabs.js +12 -0
  88. package/dist/features/tabs/adapters/inbound/Tabs.js.map +1 -0
  89. package/dist/features/tabs/composition/TabsContext.d.ts +4 -0
  90. package/dist/features/tabs/composition/TabsContext.d.ts.map +1 -0
  91. package/dist/features/tabs/composition/TabsContext.js +3 -0
  92. package/dist/features/tabs/composition/TabsContext.js.map +1 -0
  93. package/dist/features/tabs/composition/useTabRegistration.d.ts +7 -0
  94. package/dist/features/tabs/composition/useTabRegistration.d.ts.map +1 -0
  95. package/dist/features/tabs/composition/useTabRegistration.js +20 -0
  96. package/dist/features/tabs/composition/useTabRegistration.js.map +1 -0
  97. package/dist/features/tabs/composition/useTabsContext.d.ts +4 -0
  98. package/dist/features/tabs/composition/useTabsContext.d.ts.map +1 -0
  99. package/dist/{components/tabs/context.js → features/tabs/composition/useTabsContext.js} +4 -4
  100. package/dist/features/tabs/composition/useTabsContext.js.map +1 -0
  101. package/dist/features/tabs/composition/useTabsController.d.ts +4 -0
  102. package/dist/features/tabs/composition/useTabsController.d.ts.map +1 -0
  103. package/dist/features/tabs/composition/useTabsController.js +43 -0
  104. package/dist/features/tabs/composition/useTabsController.js.map +1 -0
  105. package/dist/features/tabs/public.d.ts +6 -0
  106. package/dist/features/tabs/public.d.ts.map +1 -0
  107. package/dist/features/tabs/public.js +5 -0
  108. package/dist/features/tabs/public.js.map +1 -0
  109. package/dist/features/tabs/utils/resolveNextTabValue.d.ts +4 -0
  110. package/dist/features/tabs/utils/resolveNextTabValue.d.ts.map +1 -0
  111. package/dist/{components/tabs/navigation.js → features/tabs/utils/resolveNextTabValue.js} +10 -13
  112. package/dist/features/tabs/utils/resolveNextTabValue.js.map +1 -0
  113. package/dist/features/tabs/utils/resolveTabElementId.d.ts +3 -0
  114. package/dist/features/tabs/utils/resolveTabElementId.d.ts.map +1 -0
  115. package/dist/features/tabs/utils/resolveTabElementId.js +10 -0
  116. package/dist/features/tabs/utils/resolveTabElementId.js.map +1 -0
  117. package/dist/features/toast/adapters/inbound/Toast.js +5 -5
  118. package/dist/features/toast/adapters/inbound/Toast.js.map +1 -1
  119. package/dist/features/toast/adapters/inbound/ToastProvider.js +3 -3
  120. package/dist/features/toast/adapters/inbound/ToastProvider.js.map +1 -1
  121. package/dist/index.d.ts +8 -7
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +4 -4
  124. package/dist/index.js.map +1 -1
  125. package/dist/primitives/button-base/ButtonBase.d.ts +1 -0
  126. package/dist/primitives/button-base/ButtonBase.d.ts.map +1 -1
  127. package/dist/primitives/button-base/ButtonBase.js +6 -5
  128. package/dist/primitives/button-base/ButtonBase.js.map +1 -1
  129. package/dist/primitives/button-base/types.d.ts +2 -2
  130. package/dist/primitives/button-base/types.d.ts.map +1 -1
  131. package/dist/primitives/button-base/types.js.map +1 -1
  132. package/dist/types/app-bar.d.ts +12 -0
  133. package/dist/types/app-bar.d.ts.map +1 -0
  134. package/dist/types/app-bar.js +2 -0
  135. package/dist/types/app-bar.js.map +1 -0
  136. package/dist/types/layout.d.ts +15 -17
  137. package/dist/types/layout.d.ts.map +1 -1
  138. package/dist/types/layout.js.map +1 -1
  139. package/dist/{components/modal/types.d.ts → types/modal.d.ts} +2 -2
  140. package/dist/types/modal.d.ts.map +1 -0
  141. package/dist/types/modal.js +2 -0
  142. package/dist/types/modal.js.map +1 -0
  143. package/dist/types/surface.d.ts +2 -2
  144. package/dist/types/surface.d.ts.map +1 -1
  145. package/dist/types/surface.js.map +1 -1
  146. package/dist/types/tabs.d.ts +43 -0
  147. package/dist/types/tabs.d.ts.map +1 -0
  148. package/dist/types/tabs.js +2 -0
  149. package/dist/types/tabs.js.map +1 -0
  150. package/dist/utils/resolveViewStyles.d.ts +7 -0
  151. package/dist/utils/resolveViewStyles.d.ts.map +1 -0
  152. package/dist/utils/{resolveBoxStyles.js → resolveViewStyles.js} +11 -4
  153. package/dist/utils/resolveViewStyles.js.map +1 -0
  154. package/package.json +1 -1
  155. package/src/components/field/Field.tsx +5 -4
  156. package/src/components/list-item/ListItem.tsx +17 -13
  157. package/src/components/switch/Switch.tsx +10 -15
  158. package/src/{layout → core/responsive}/Show.tsx +4 -1
  159. package/src/core/responsive/index.ts +1 -0
  160. package/src/features/app-bar/adapters/inbound/AppBar.tsx +69 -0
  161. package/src/features/app-bar/public.ts +2 -0
  162. package/src/features/badge/adapters/inbound/Badge.tsx +3 -3
  163. package/src/features/button/adapters/inbound/Button.tsx +8 -8
  164. package/src/features/button/adapters/inbound/IconButton.tsx +3 -3
  165. package/src/features/form/checkbox/adapters/inbound/Checkbox.tsx +7 -7
  166. package/src/features/form/radio/adapters/inbound/Radio.tsx +8 -8
  167. package/src/features/layout/adapters/inbound/Divider.tsx +2 -2
  168. package/src/features/layout/adapters/inbound/Grid.tsx +12 -14
  169. package/src/features/layout/adapters/inbound/ScrollView.tsx +102 -0
  170. package/src/features/layout/adapters/inbound/{Box.tsx → View.tsx} +9 -9
  171. package/src/features/layout/public.ts +3 -10
  172. package/src/features/modal/adapters/inbound/Modal.tsx +77 -0
  173. package/src/features/modal/public.ts +2 -0
  174. package/src/features/popover-menu/adapters/inbound/PopoverMenu.tsx +11 -14
  175. package/src/features/surface/adapters/inbound/Surface.tsx +3 -3
  176. package/src/features/tabs/adapters/inbound/Tab.tsx +67 -0
  177. package/src/features/tabs/adapters/inbound/TabList.tsx +47 -0
  178. package/src/{components/tabs → features/tabs/adapters/inbound}/TabPanel.tsx +6 -10
  179. package/src/features/tabs/adapters/inbound/Tabs.tsx +17 -0
  180. package/src/features/tabs/composition/TabsContext.tsx +5 -0
  181. package/src/features/tabs/composition/useTabRegistration.ts +27 -0
  182. package/src/features/tabs/composition/useTabsContext.ts +13 -0
  183. package/src/features/tabs/composition/useTabsController.ts +55 -0
  184. package/src/features/tabs/public.ts +5 -0
  185. package/src/{components/tabs/navigation.test.ts → features/tabs/utils/resolveNextTabValue.test.ts} +2 -2
  186. package/src/features/tabs/utils/resolveNextTabValue.ts +24 -0
  187. package/src/features/tabs/utils/resolveTabElementId.test.ts +19 -0
  188. package/src/features/tabs/utils/resolveTabElementId.ts +14 -0
  189. package/src/features/toast/adapters/inbound/Toast.tsx +5 -5
  190. package/src/features/toast/adapters/inbound/ToastProvider.tsx +3 -3
  191. package/src/index.test.ts +14 -38
  192. package/src/index.ts +8 -13
  193. package/src/primitives/button-base/ButtonBase.tsx +6 -8
  194. package/src/primitives/button-base/types.ts +2 -2
  195. package/src/types/app-bar.ts +13 -0
  196. package/src/types/layout.ts +25 -20
  197. package/src/{components/modal/types.ts → types/modal.ts} +1 -1
  198. package/src/types/surface.ts +2 -2
  199. package/src/types/tabs.ts +51 -0
  200. package/src/utils/resolveViewStyles.test.ts +71 -0
  201. package/src/utils/{resolveBoxStyles.ts → resolveViewStyles.ts} +16 -9
  202. package/src/webAcceptance.test.tsx +8 -9
  203. package/dist/components/modal/Modal.d.ts.map +0 -1
  204. package/dist/components/modal/Modal.js +0 -59
  205. package/dist/components/modal/Modal.js.map +0 -1
  206. package/dist/components/modal/index.d.ts +0 -3
  207. package/dist/components/modal/index.d.ts.map +0 -1
  208. package/dist/components/modal/index.js +0 -2
  209. package/dist/components/modal/index.js.map +0 -1
  210. package/dist/components/modal/types.d.ts.map +0 -1
  211. package/dist/components/modal/types.js +0 -2
  212. package/dist/components/modal/types.js.map +0 -1
  213. package/dist/components/tabs/Tab.d.ts +0 -4
  214. package/dist/components/tabs/Tab.d.ts.map +0 -1
  215. package/dist/components/tabs/Tab.js +0 -48
  216. package/dist/components/tabs/Tab.js.map +0 -1
  217. package/dist/components/tabs/TabList.d.ts +0 -4
  218. package/dist/components/tabs/TabList.d.ts.map +0 -1
  219. package/dist/components/tabs/TabList.js +0 -37
  220. package/dist/components/tabs/TabList.js.map +0 -1
  221. package/dist/components/tabs/TabPanel.d.ts +0 -4
  222. package/dist/components/tabs/TabPanel.d.ts.map +0 -1
  223. package/dist/components/tabs/TabPanel.js +0 -16
  224. package/dist/components/tabs/TabPanel.js.map +0 -1
  225. package/dist/components/tabs/Tabs.d.ts +0 -4
  226. package/dist/components/tabs/Tabs.d.ts.map +0 -1
  227. package/dist/components/tabs/Tabs.js +0 -54
  228. package/dist/components/tabs/Tabs.js.map +0 -1
  229. package/dist/components/tabs/a11y.d.ts +0 -3
  230. package/dist/components/tabs/a11y.d.ts.map +0 -1
  231. package/dist/components/tabs/a11y.js +0 -13
  232. package/dist/components/tabs/a11y.js.map +0 -1
  233. package/dist/components/tabs/context.d.ts +0 -20
  234. package/dist/components/tabs/context.d.ts.map +0 -1
  235. package/dist/components/tabs/context.js.map +0 -1
  236. package/dist/components/tabs/index.d.ts +0 -6
  237. package/dist/components/tabs/index.d.ts.map +0 -1
  238. package/dist/components/tabs/index.js +0 -5
  239. package/dist/components/tabs/index.js.map +0 -1
  240. package/dist/components/tabs/navigation.d.ts +0 -3
  241. package/dist/components/tabs/navigation.d.ts.map +0 -1
  242. package/dist/components/tabs/navigation.js.map +0 -1
  243. package/dist/components/tabs/types.d.ts +0 -26
  244. package/dist/components/tabs/types.d.ts.map +0 -1
  245. package/dist/components/tabs/types.js +0 -2
  246. package/dist/components/tabs/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/modal/Modal.tsx +0 -96
  293. package/src/components/modal/index.ts +0 -2
  294. package/src/components/tabs/Tab.tsx +0 -89
  295. package/src/components/tabs/TabList.tsx +0 -51
  296. package/src/components/tabs/Tabs.tsx +0 -67
  297. package/src/components/tabs/a11y.test.ts +0 -15
  298. package/src/components/tabs/a11y.ts +0 -15
  299. package/src/components/tabs/context.tsx +0 -31
  300. package/src/components/tabs/index.ts +0 -5
  301. package/src/components/tabs/navigation.ts +0 -32
  302. package/src/components/tabs/types.ts +0 -30
  303. package/src/features/layout/adapters/inbound/Container.tsx +0 -43
  304. package/src/features/layout/adapters/inbound/Stack.test.ts +0 -13
  305. package/src/features/layout/adapters/inbound/Stack.tsx +0 -44
  306. package/src/layout/AppBar.tsx +0 -60
  307. package/src/layout/Center.tsx +0 -22
  308. package/src/layout/Inline.tsx +0 -9
  309. package/src/layout/ScrollArea.tsx +0 -116
  310. package/src/layout/Spacer.tsx +0 -22
  311. package/src/layout/Template.tsx +0 -86
  312. package/src/layout/index.ts +0 -14
  313. package/src/utils/resolveBoxStyles.test.ts +0 -54
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ankhorage/surface
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 574a34b: Replace legacy layout aliases with canonical React Native-named `View` and `ScrollView` primitives, remove redundant layout presets, and move AppBar and responsive Show to their owning boundaries.
8
+
9
+ ## 5.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 14c083f: Move Modal and the accessible Tabs system to canonical feature ownership without changing their public root API.
14
+
3
15
  ## 5.0.0
4
16
 
5
17
  ### Major Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/surface
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v4.3.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v5.0.1](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Cross-platform UI foundation for React Native and React Native Web. Provides theming, layout primitives, and core building blocks for modern apps.
9
9
 
@@ -27,14 +27,13 @@ Cross-platform UI foundation for React Native and React Native Web. Provides the
27
27
  - [IconButton sequence](././paradox/diagrams/sequences/icon-button.mmd)
28
28
  - [isDeepEqual sequence](././paradox/diagrams/sequences/is-deep-equal.mmd)
29
29
  - [ListItem sequence](././paradox/diagrams/sequences/list-item.mmd)
30
- - [Menu sequence](././paradox/diagrams/sequences/menu.mmd)
31
30
  - [Modal sequence](././paradox/diagrams/sequences/modal.mmd)
32
31
  - [Popover sequence](././paradox/diagrams/sequences/popover.mmd)
32
+ - [PopoverMenu sequence](././paradox/diagrams/sequences/popover-menu.mmd)
33
33
  - [Radio sequence](././paradox/diagrams/sequences/radio.mmd)
34
34
  - [resolveResponsive sequence](././paradox/diagrams/sequences/resolve-responsive.mmd)
35
35
  - [ResponsiveProvider sequence](././paradox/diagrams/sequences/responsive-provider.mmd)
36
36
  - [Show sequence](././paradox/diagrams/sequences/show.mmd)
37
- - [Stack sequence](././paradox/diagrams/sequences/stack.mmd)
38
37
  - [Surface sequence](././paradox/diagrams/sequences/surface.mmd)
39
38
  - [Switch sequence](././paradox/diagrams/sequences/switch.mmd)
40
39
  - [TabList sequence](././paradox/diagrams/sequences/tab-list.mmd)
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { FieldProps } from './types';
3
+ /*** Composes a label, control, and helper or error message into one field. */
3
4
  export declare function Field({ children, label, helperText, errorText, required, disabled, invalid, readOnly, testID, }: FieldProps): React.JSX.Element;
4
5
  //# sourceMappingURL=Field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/components/field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAgB,EAChB,QAAgB,EAChB,OAAe,EACf,QAAgB,EAChB,MAAM,GACP,EAAE,UAAU,qBAgCZ"}
1
+ {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/components/field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,8EAA8E;AAC9E,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAgB,EAChB,QAAgB,EAChB,OAAe,EACf,QAAgB,EAChB,MAAM,GACP,EAAE,UAAU,qBAgCZ"}
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { Box, Stack } from '../../features/layout/public';
2
+ import { View } from '../../features/layout/public';
3
3
  import { resolveFieldPresentation, resolveFieldState } from '../../internal/resolvers';
4
4
  import { HelperText } from '../helper-text';
5
5
  import { Label } from '../label';
6
+ /*** Composes a label, control, and helper or error message into one field. */
6
7
  export function Field({ children, label, helperText, errorText, required = false, disabled = false, invalid = false, readOnly = false, testID, }) {
7
8
  const hasErrorText = Boolean(errorText);
8
9
  const fieldState = resolveFieldState({
@@ -11,16 +12,16 @@ export function Field({ children, label, helperText, errorText, required = false
11
12
  readOnly,
12
13
  });
13
14
  const presentation = resolveFieldPresentation(fieldState);
14
- return (<Stack gap="xs" testID={testID}>
15
+ return (<View gap="xs" testID={testID}>
15
16
  {label ? (<Label color={presentation.labelColor} emphasis={presentation.labelEmphasis} required={required}>
16
17
  {label}
17
18
  </Label>) : null}
18
- <Box>{children}</Box>
19
+ <View>{children}</View>
19
20
  {hasErrorText ? (<HelperText color={presentation.helperColor} emphasis={presentation.helperEmphasis}>
20
21
  {errorText}
21
22
  </HelperText>) : helperText ? (<HelperText color={presentation.helperColor} emphasis={presentation.helperEmphasis}>
22
23
  {helperText}
23
24
  </HelperText>) : null}
24
- </Stack>);
25
+ </View>);
25
26
  }
26
27
  //# sourceMappingURL=Field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../src/components/field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;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AC,CACjF;UAAA,CAAC,SAAS,CACZ;QAAA,EAAE,UAAU,CAAC,CACd,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CACf,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,CACjF;UAAA,CAAC,UAAU,CACb;QAAA,EAAE,UAAU,CAAC,CACd,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box, Stack } from '../../features/layout/public';\nimport { resolveFieldPresentation, resolveFieldState } from '../../internal/resolvers';\nimport { HelperText } from '../helper-text';\nimport { Label } from '../label';\nimport type { FieldProps } from './types';\n\nexport function Field({\n children,\n label,\n helperText,\n errorText,\n required = false,\n disabled = false,\n invalid = false,\n readOnly = false,\n testID,\n}: FieldProps) {\n const hasErrorText = Boolean(errorText);\n const fieldState = resolveFieldState({\n disabled,\n invalid: invalid || hasErrorText,\n readOnly,\n });\n const presentation = resolveFieldPresentation(fieldState);\n\n return (\n <Stack gap=\"xs\" testID={testID}>\n {label ? (\n <Label\n color={presentation.labelColor}\n emphasis={presentation.labelEmphasis}\n required={required}\n >\n {label}\n </Label>\n ) : null}\n <Box>{children}</Box>\n {hasErrorText ? (\n <HelperText color={presentation.helperColor} emphasis={presentation.helperEmphasis}>\n {errorText}\n </HelperText>\n ) : helperText ? (\n <HelperText color={presentation.helperColor} emphasis={presentation.helperEmphasis}>\n {helperText}\n </HelperText>\n ) : null}\n </Stack>\n );\n}\n"]}
1
+ {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../src/components/field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,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C,CACf,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,CACjF;UAAA,CAAC,UAAU,CACb;QAAA,EAAE,UAAU,CAAC,CACd,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { View } from '../../features/layout/public';\nimport { resolveFieldPresentation, resolveFieldState } from '../../internal/resolvers';\nimport { HelperText } from '../helper-text';\nimport { Label } from '../label';\nimport type { FieldProps } from './types';\n\n/*** Composes a label, control, and helper or error message into one field. */\nexport function Field({\n children,\n label,\n helperText,\n errorText,\n required = false,\n disabled = false,\n invalid = false,\n readOnly = false,\n testID,\n}: FieldProps) {\n const hasErrorText = Boolean(errorText);\n const fieldState = resolveFieldState({\n disabled,\n invalid: invalid || hasErrorText,\n readOnly,\n });\n const presentation = resolveFieldPresentation(fieldState);\n\n return (\n <View gap=\"xs\" testID={testID}>\n {label ? (\n <Label\n color={presentation.labelColor}\n emphasis={presentation.labelEmphasis}\n required={required}\n >\n {label}\n </Label>\n ) : null}\n <View>{children}</View>\n {hasErrorText ? (\n <HelperText color={presentation.helperColor} emphasis={presentation.helperEmphasis}>\n {errorText}\n </HelperText>\n ) : helperText ? (\n <HelperText color={presentation.helperColor} emphasis={presentation.helperEmphasis}>\n {helperText}\n </HelperText>\n ) : null}\n </View>\n );\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { ListItemProps } from './types';
3
+ /*** Renders a static or pressable list item. */
3
4
  export declare function ListItem({ onPress, disabled, testID, ...content }: ListItemProps): React.JSX.Element;
4
5
  //# sourceMappingURL=ListItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/components/list-item/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAuC7C,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAgB,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,aAAa,qBAyBxF"}
1
+ {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/components/list-item/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA4C7C,gDAAgD;AAChD,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAgB,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,aAAa,qBAuBxF"}
@@ -1,34 +1,35 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
3
- import { Box } from '../../features/layout/public';
2
+ import { View as ReactNativeView } from 'react-native';
3
+ import { View } from '../../features/layout/public';
4
4
  import { Text } from '../../features/typography/public';
5
5
  import { ButtonBase } from '../../primitives/button-base';
6
6
  import { useTheme } from '../../theme/ThemeContext';
7
+ /*** Renders the content row shared by static and interactive ListItem variants. */
7
8
  function ListItemContent({ title, description, leading, trailing, testID, }) {
8
9
  const { theme } = useTheme();
9
- return (<Box px="m" py="m" testID={testID} style={{
10
+ return (<View px="m" py="m" testID={testID} style={{
10
11
  flexDirection: 'row',
11
12
  alignItems: 'center',
12
13
  }}>
13
- {leading ? <View style={{ marginRight: theme.spacing.m }}>{leading}</View> : null}
14
- <Box flex={1}>
14
+ {leading ? (<ReactNativeView style={{ marginRight: theme.spacing.m }}>{leading}</ReactNativeView>) : null}
15
+ <View flex={1}>
15
16
  {title ? (<Text numberOfLines={1} variant="body" weight="medium">
16
17
  {title}
17
18
  </Text>) : null}
18
19
  {description ? (<Text emphasis="muted" numberOfLines={2} variant="bodySmall">
19
20
  {description}
20
21
  </Text>) : null}
21
- </Box>
22
- {trailing ? <View style={{ marginLeft: theme.spacing.m }}>{trailing}</View> : null}
23
- </Box>);
22
+ </View>
23
+ {trailing ? (<ReactNativeView style={{ marginLeft: theme.spacing.m }}>{trailing}</ReactNativeView>) : null}
24
+ </View>);
24
25
  }
26
+ /*** Renders a static or pressable list item. */
25
27
  export function ListItem({ onPress, disabled = false, testID, ...content }) {
26
28
  const { theme } = useTheme();
27
- if (!onPress) {
29
+ if (!onPress)
28
30
  return <ListItemContent {...content} testID={testID}/>;
29
- }
30
31
  return (<ButtonBase accessibilityRole="button" disabled={disabled} onPress={onPress} testID={testID}>
31
- {(state) => (<Box style={{
32
+ {(state) => (<View style={{
32
33
  backgroundColor: state.pressed
33
34
  ? theme.semantics.neutral.surfaceActive
34
35
  : state.hovered
@@ -37,7 +38,7 @@ export function ListItem({ onPress, disabled = false, testID, ...content }) {
37
38
  opacity: state.disabled ? 0.72 : 1,
38
39
  }}>
39
40
  <ListItemContent {...content}/>
40
- </Box>)}
41
+ </View>)}
41
42
  </ButtonBase>);
42
43
  }
43
44
  //# sourceMappingURL=ListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../src/components/list-item/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGpD,SAAS,eAAe,CAAC,EACvB,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,MAAM,GACsC;IAC5C,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE7B,OAAO,CACL,CAAC,GAAG,CACF,EAAE,CAAC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AAG,OAAO,EAAiB;IACvF,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,CAAC,eAAe,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,EAAG,CAAC;IAC1D,CAAC;IAED,OAAO,CACL,CAAC,UAAU,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC1F;MAAA,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACV,CAAC,GAAG,CACF,KAAK,CAAC,CAAC;gBACL,eAAe,EAAE,KAAK,CAAC,OAAO;oBAC5B,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,aAAa;oBACvC,CAAC,CAAC,KAAK,CAAC,OAAO;wBACb,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY;wBACtC,CAAC,CAAC,aAAa;gBACnB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACnC,CAAC,CAEF;UAAA,CAAC,eAAe,CAAC,IAAI,OAAO,CAAC,EAC/B;QAAA,EAAE,GAAG,CAAC,CACP,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { Box } from '../../features/layout/public';\nimport { Text } from '../../features/typography/public';\nimport { ButtonBase } from '../../primitives/button-base';\nimport { useTheme } from '../../theme/ThemeContext';\nimport type { ListItemProps } from './types';\n\nfunction ListItemContent({\n title,\n description,\n leading,\n trailing,\n testID,\n}: Omit<ListItemProps, 'disabled' | 'onPress'>) {\n const { theme } = useTheme();\n\n return (\n <Box\n px=\"m\"\n py=\"m\"\n testID={testID}\n style={{\n flexDirection: 'row',\n alignItems: 'center',\n }}\n >\n {leading ? <View style={{ marginRight: theme.spacing.m }}>{leading}</View> : null}\n <Box flex={1}>\n {title ? (\n <Text numberOfLines={1} variant=\"body\" weight=\"medium\">\n {title}\n </Text>\n ) : null}\n {description ? (\n <Text emphasis=\"muted\" numberOfLines={2} variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Box>\n {trailing ? <View style={{ marginLeft: theme.spacing.m }}>{trailing}</View> : null}\n </Box>\n );\n}\n\nexport function ListItem({ onPress, disabled = false, testID, ...content }: ListItemProps) {\n const { theme } = useTheme();\n\n if (!onPress) {\n return <ListItemContent {...content} testID={testID} />;\n }\n\n return (\n <ButtonBase accessibilityRole=\"button\" disabled={disabled} onPress={onPress} testID={testID}>\n {(state) => (\n <Box\n style={{\n backgroundColor: state.pressed\n ? theme.semantics.neutral.surfaceActive\n : state.hovered\n ? theme.semantics.neutral.surfaceHover\n : 'transparent',\n opacity: state.disabled ? 0.72 : 1,\n }}\n >\n <ListItemContent {...content} />\n </Box>\n )}\n </ButtonBase>\n );\n}\n"]}
1
+ {"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../src/components/list-item/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGpD,mFAAmF;AACnF,SAAS,eAAe,CAAC,EACvB,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,MAAM,GACsC;IAC5C,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE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,UAAU,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,EAAiB;IACvF,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE7B,IAAI,CAAC,OAAO;QAAE,OAAO,CAAC,eAAe,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,EAAG,CAAC;IAEtE,OAAO,CACL,CAAC,UAAU,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC1F;MAAA,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACV,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;gBACL,eAAe,EAAE,KAAK,CAAC,OAAO;oBAC5B,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,aAAa;oBACvC,CAAC,CAAC,KAAK,CAAC,OAAO;wBACb,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY;wBACtC,CAAC,CAAC,aAAa;gBACnB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACnC,CAAC,CAEF;UAAA,CAAC,eAAe,CAAC,IAAI,OAAO,CAAC,EAC/B;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { View as ReactNativeView } from 'react-native';\n\nimport { View } from '../../features/layout/public';\nimport { Text } from '../../features/typography/public';\nimport { ButtonBase } from '../../primitives/button-base';\nimport { useTheme } from '../../theme/ThemeContext';\nimport type { ListItemProps } from './types';\n\n/*** Renders the content row shared by static and interactive ListItem variants. */\nfunction ListItemContent({\n title,\n description,\n leading,\n trailing,\n testID,\n}: Omit<ListItemProps, 'disabled' | 'onPress'>) {\n const { theme } = useTheme();\n\n return (\n <View\n px=\"m\"\n py=\"m\"\n testID={testID}\n style={{\n flexDirection: 'row',\n alignItems: 'center',\n }}\n >\n {leading ? (\n <ReactNativeView style={{ marginRight: theme.spacing.m }}>{leading}</ReactNativeView>\n ) : null}\n <View flex={1}>\n {title ? (\n <Text numberOfLines={1} variant=\"body\" weight=\"medium\">\n {title}\n </Text>\n ) : null}\n {description ? (\n <Text emphasis=\"muted\" numberOfLines={2} variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </View>\n {trailing ? (\n <ReactNativeView style={{ marginLeft: theme.spacing.m }}>{trailing}</ReactNativeView>\n ) : null}\n </View>\n );\n}\n\n/*** Renders a static or pressable list item. */\nexport function ListItem({ onPress, disabled = false, testID, ...content }: ListItemProps) {\n const { theme } = useTheme();\n\n if (!onPress) return <ListItemContent {...content} testID={testID} />;\n\n return (\n <ButtonBase accessibilityRole=\"button\" disabled={disabled} onPress={onPress} testID={testID}>\n {(state) => (\n <View\n style={{\n backgroundColor: state.pressed\n ? theme.semantics.neutral.surfaceActive\n : state.hovered\n ? theme.semantics.neutral.surfaceHover\n : 'transparent',\n opacity: state.disabled ? 0.72 : 1,\n }}\n >\n <ListItemContent {...content} />\n </View>\n )}\n </ButtonBase>\n );\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { SwitchProps } from './types';
3
+ /*** Renders a controlled or uncontrolled accessible switch. */
3
4
  export declare function Switch({ children, checked, defaultChecked, onCheckedChange, color, size, disabled, invalid, readOnly, accessibilityLabel, testID, ...props }: SwitchProps): React.JSX.Element;
4
5
  //# sourceMappingURL=Switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,cAAsB,EACtB,eAAe,EACf,KAAiB,EACjB,IAAU,EACV,QAAgB,EAChB,OAAe,EACf,QAAgB,EAChB,kBAAkB,EAClB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,WAAW,qBAyFb"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,+DAA+D;AAC/D,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,cAAsB,EACtB,eAAe,EACf,KAAiB,EACjB,IAAU,EACV,QAAgB,EAChB,OAAe,EACf,QAAgB,EAChB,kBAAkB,EAClB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,WAAW,qBAmFb"}
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
- import { Box } from '../../features/layout/public';
2
+ import { View } from '../../features/layout/public';
3
3
  import { Text } from '../../features/typography/public';
4
4
  import { resolveFieldState, resolveIndicatorSize, resolveSelectionControlColors, resolveSelectionControlNextChecked, } from '../../internal/resolvers';
5
5
  import { useControllableState } from '../../internal/useControllableState';
6
6
  import { ButtonBase } from '../../primitives/button-base';
7
7
  import { useTheme } from '../../theme/ThemeContext';
8
+ /*** Renders a controlled or uncontrolled accessible switch. */
8
9
  export function Switch({ children, checked, defaultChecked = false, onCheckedChange, color = 'primary', size = 'm', disabled = false, invalid = false, readOnly = false, accessibilityLabel, testID, ...props }) {
9
10
  const { theme } = useTheme();
10
11
  const [isChecked, setChecked] = useControllableState({
@@ -19,11 +20,7 @@ export function Switch({ children, checked, defaultChecked = false, onCheckedCha
19
20
  kind: 'switch',
20
21
  readOnly,
21
22
  });
22
- return (<ButtonBase {...props} accessibilityLabel={accessibilityLabel} accessibilityRole="switch" accessibilityState={{ checked: isChecked }} disabled={disabled} onPress={nextChecked === null
23
- ? undefined
24
- : () => {
25
- setChecked(nextChecked);
26
- }} testID={testID}>
23
+ return (<ButtonBase {...props} accessibilityLabel={accessibilityLabel} accessibilityRole="switch" accessibilityState={{ checked: isChecked }} disabled={disabled} onPress={nextChecked === null ? undefined : () => setChecked(nextChecked)} testID={testID}>
27
24
  {(interactionState) => {
28
25
  const fieldState = resolveFieldState({
29
26
  disabled,
@@ -39,12 +36,12 @@ export function Switch({ children, checked, defaultChecked = false, onCheckedCha
39
36
  color,
40
37
  });
41
38
  const labelEmphasis = colors.labelColor === theme.semantics.content.muted ? 'muted' : 'default';
42
- return (<Box style={{
39
+ return (<View style={{
43
40
  alignItems: 'center',
44
41
  flexDirection: 'row',
45
42
  opacity: colors.opacity,
46
43
  }}>
47
- <Box radius="full" style={{
44
+ <View radius="full" style={{
48
45
  backgroundColor: colors.trackColor,
49
46
  borderColor: colors.borderColor,
50
47
  borderWidth: 1,
@@ -54,17 +51,17 @@ export function Switch({ children, checked, defaultChecked = false, onCheckedCha
54
51
  width: indicatorSize.switchWidth,
55
52
  height: indicatorSize.switchHeight,
56
53
  }}>
57
- <Box radius="full" style={{
54
+ <View radius="full" style={{
58
55
  alignSelf: isChecked ? 'flex-end' : 'flex-start',
59
56
  backgroundColor: colors.thumbColor,
60
57
  height: indicatorSize.switchThumb,
61
58
  width: indicatorSize.switchThumb,
62
59
  }}/>
63
- </Box>
64
- {children ? (<Box ml="s">
60
+ </View>
61
+ {children ? (<View ml="s">
65
62
  <Text emphasis={labelEmphasis}>{children}</Text>
66
- </Box>) : null}
67
- </Box>);
63
+ </View>) : null}
64
+ </View>);
68
65
  }}
69
66
  </ButtonBase>);
70
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../src/components/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GA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ACb,KAAK,CAAC,CAAC;oBACL,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY;oBAChD,eAAe,EAAE,MAAM,CAAC,UAAU;oBAClC,MAAM,EAAE,aAAa,CAAC,WAAW;oBACjC,KAAK,EAAE,aAAa,CAAC,WAAW;iBACjC,CAAC,EAEN;YAAA,EAAE,GAAG,CACL;YAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACV,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CACT;gBAAA,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CACjD;cAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,GAAG,CAAC,CACP,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box } from '../../features/layout/public';\nimport { Text } from '../../features/typography/public';\nimport {\n resolveFieldState,\n resolveIndicatorSize,\n resolveSelectionControlColors,\n resolveSelectionControlNextChecked,\n} from '../../internal/resolvers';\nimport { useControllableState } from '../../internal/useControllableState';\nimport { ButtonBase } from '../../primitives/button-base';\nimport { useTheme } from '../../theme/ThemeContext';\nimport type { SwitchProps } from './types';\n\nexport function Switch({\n children,\n checked,\n defaultChecked = false,\n onCheckedChange,\n color = 'primary',\n size = 'm',\n disabled = false,\n invalid = false,\n readOnly = false,\n accessibilityLabel,\n testID,\n ...props\n}: SwitchProps) {\n const { theme } = useTheme();\n const [isChecked, setChecked] = useControllableState<boolean>({\n value: checked,\n defaultValue: defaultChecked,\n onChange: onCheckedChange,\n });\n const indicatorSize = resolveIndicatorSize(size);\n const nextChecked = resolveSelectionControlNextChecked({\n checked: isChecked,\n disabled,\n kind: 'switch',\n readOnly,\n });\n\n return (\n <ButtonBase\n {...props}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole=\"switch\"\n accessibilityState={{ checked: isChecked }}\n disabled={disabled}\n onPress={\n nextChecked === null\n ? undefined\n : () => {\n setChecked(nextChecked);\n }\n }\n testID={testID}\n >\n {(interactionState) => {\n const fieldState = resolveFieldState({\n disabled,\n focused: interactionState.focused,\n invalid,\n readOnly,\n });\n const colors = resolveSelectionControlColors(theme, {\n checked: isChecked,\n fieldState,\n hovered: interactionState.hovered,\n pressed: interactionState.pressed,\n color,\n });\n const labelEmphasis =\n colors.labelColor === theme.semantics.content.muted ? 'muted' : 'default';\n\n return (\n <Box\n style={{\n alignItems: 'center',\n flexDirection: 'row',\n opacity: colors.opacity,\n }}\n >\n <Box\n radius=\"full\"\n style={{\n backgroundColor: colors.trackColor,\n borderColor: colors.borderColor,\n borderWidth: 1,\n justifyContent: 'center',\n minWidth: indicatorSize.switchWidth,\n paddingHorizontal: 2,\n width: indicatorSize.switchWidth,\n height: indicatorSize.switchHeight,\n }}\n >\n <Box\n radius=\"full\"\n style={{\n alignSelf: isChecked ? 'flex-end' : 'flex-start',\n backgroundColor: colors.thumbColor,\n height: indicatorSize.switchThumb,\n width: indicatorSize.switchThumb,\n }}\n />\n </Box>\n {children ? (\n <Box ml=\"s\">\n <Text emphasis={labelEmphasis}>{children}</Text>\n </Box>\n ) : null}\n </Box>\n );\n }}\n </ButtonBase>\n );\n}\n"]}
1
+ {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../src/components/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,EAC7B,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,UAA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AA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACV,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CACV;gBAAA,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CACjD;cAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,IAAI,CAAC,CACR,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { View } from '../../features/layout/public';\nimport { Text } from '../../features/typography/public';\nimport {\n resolveFieldState,\n resolveIndicatorSize,\n resolveSelectionControlColors,\n resolveSelectionControlNextChecked,\n} from '../../internal/resolvers';\nimport { useControllableState } from '../../internal/useControllableState';\nimport { ButtonBase } from '../../primitives/button-base';\nimport { useTheme } from '../../theme/ThemeContext';\nimport type { SwitchProps } from './types';\n\n/*** Renders a controlled or uncontrolled accessible switch. */\nexport function Switch({\n children,\n checked,\n defaultChecked = false,\n onCheckedChange,\n color = 'primary',\n size = 'm',\n disabled = false,\n invalid = false,\n readOnly = false,\n accessibilityLabel,\n testID,\n ...props\n}: SwitchProps) {\n const { theme } = useTheme();\n const [isChecked, setChecked] = useControllableState<boolean>({\n value: checked,\n defaultValue: defaultChecked,\n onChange: onCheckedChange,\n });\n const indicatorSize = resolveIndicatorSize(size);\n const nextChecked = resolveSelectionControlNextChecked({\n checked: isChecked,\n disabled,\n kind: 'switch',\n readOnly,\n });\n\n return (\n <ButtonBase\n {...props}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole=\"switch\"\n accessibilityState={{ checked: isChecked }}\n disabled={disabled}\n onPress={nextChecked === null ? undefined : () => setChecked(nextChecked)}\n testID={testID}\n >\n {(interactionState) => {\n const fieldState = resolveFieldState({\n disabled,\n focused: interactionState.focused,\n invalid,\n readOnly,\n });\n const colors = resolveSelectionControlColors(theme, {\n checked: isChecked,\n fieldState,\n hovered: interactionState.hovered,\n pressed: interactionState.pressed,\n color,\n });\n const labelEmphasis =\n colors.labelColor === theme.semantics.content.muted ? 'muted' : 'default';\n\n return (\n <View\n style={{\n alignItems: 'center',\n flexDirection: 'row',\n opacity: colors.opacity,\n }}\n >\n <View\n radius=\"full\"\n style={{\n backgroundColor: colors.trackColor,\n borderColor: colors.borderColor,\n borderWidth: 1,\n justifyContent: 'center',\n minWidth: indicatorSize.switchWidth,\n paddingHorizontal: 2,\n width: indicatorSize.switchWidth,\n height: indicatorSize.switchHeight,\n }}\n >\n <View\n radius=\"full\"\n style={{\n alignSelf: isChecked ? 'flex-end' : 'flex-start',\n backgroundColor: colors.thumbColor,\n height: indicatorSize.switchThumb,\n width: indicatorSize.switchThumb,\n }}\n />\n </View>\n {children ? (\n <View ml=\"s\">\n <Text emphasis={labelEmphasis}>{children}</Text>\n </View>\n ) : null}\n </View>\n );\n }}\n </ButtonBase>\n );\n}\n"]}
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import { type Responsive } from '../core/responsive';
2
+ import type { Responsive } from './types';
3
3
  export interface ShowProps {
4
4
  when: Responsive<boolean>;
5
5
  children: React.ReactNode;
6
6
  fallback?: React.ReactNode;
7
7
  }
8
+ /*** Conditionally renders one responsive subtree or its fallback. */
8
9
  export declare function Show({ when, children, fallback }: ShowProps): React.JSX.Element;
9
10
  //# sourceMappingURL=Show.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Show.d.ts","sourceRoot":"","sources":["../../../src/core/responsive/Show.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,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,qEAAqE;AACrE,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,SAAS,qBAIlE"}
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- import { resolveResponsive, useResponsiveRuntime } from '../core/responsive';
2
+ import { resolveResponsive } from './resolve';
3
+ import { useResponsiveRuntime } from './ResponsiveProvider';
4
+ /*** Conditionally renders one responsive subtree or its fallback. */
3
5
  export function Show({ when, children, fallback = null }) {
4
6
  const { breakpoint } = useResponsiveRuntime();
5
7
  const visible = resolveResponsive(when, breakpoint) ?? false;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Show.js","sourceRoot":"","sources":["../../../src/core/responsive/Show.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAS5D,qEAAqE;AACrE,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 } from './resolve';\nimport { useResponsiveRuntime } from './ResponsiveProvider';\nimport type { Responsive } from './types';\n\nexport interface ShowProps {\n when: Responsive<boolean>;\n children: React.ReactNode;\n fallback?: React.ReactNode;\n}\n\n/*** Conditionally renders one responsive subtree or its fallback. */\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"]}
@@ -2,6 +2,7 @@ export { BREAKPOINT_ORDER, BREAKPOINTS } from './breakpoints';
2
2
  export { getBreakpointFromWidth } from './getBreakpointFromWidth';
3
3
  export { resolveResponsive } from './resolve';
4
4
  export { ResponsiveProvider, useResponsiveRuntime } from './ResponsiveProvider';
5
+ export { Show, type ShowProps } from './Show';
5
6
  export type { Breakpoint, Responsive, ResponsiveRuntime } from './types';
6
7
  export { useBreakpoint } from './useBreakpoint';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/responsive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/responsive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -2,5 +2,6 @@ export { BREAKPOINT_ORDER, BREAKPOINTS } from './breakpoints';
2
2
  export { getBreakpointFromWidth } from './getBreakpointFromWidth';
3
3
  export { resolveResponsive } from './resolve';
4
4
  export { ResponsiveProvider, useResponsiveRuntime } from './ResponsiveProvider';
5
+ export { Show } from './Show';
5
6
  export { useBreakpoint } from './useBreakpoint';
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/responsive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { BREAKPOINT_ORDER, BREAKPOINTS } from './breakpoints';\nexport { getBreakpointFromWidth } from './getBreakpointFromWidth';\nexport { resolveResponsive } from './resolve';\nexport { ResponsiveProvider, useResponsiveRuntime } from './ResponsiveProvider';\nexport type { Breakpoint, Responsive, ResponsiveRuntime } from './types';\nexport { useBreakpoint } from './useBreakpoint';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/responsive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { BREAKPOINT_ORDER, BREAKPOINTS } from './breakpoints';\nexport { getBreakpointFromWidth } from './getBreakpointFromWidth';\nexport { resolveResponsive } from './resolve';\nexport { ResponsiveProvider, useResponsiveRuntime } from './ResponsiveProvider';\nexport { Show, type ShowProps } from './Show';\nexport type { Breakpoint, Responsive, ResponsiveRuntime } from './types';\nexport { useBreakpoint } from './useBreakpoint';\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { AppBarProps } from '../../../../types/app-bar';
3
+ /*** Renders application chrome with optional safe-area padding and leading/trailing slots. */
4
+ export declare function AppBar({ leading, trailing, children, safeAreaTop, divider, contentStyle, bg, style, ...props }: AppBarProps): React.JSX.Element;
5
+ //# sourceMappingURL=AppBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../../../../src/features/app-bar/adapters/inbound/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAG7D,8FAA8F;AAC9F,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"}
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { StyleSheet, View as ReactNativeView } from 'react-native';
3
+ import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
4
+ import { useTheme } from '../../../../theme/ThemeContext';
5
+ import { Divider, View } from '../../../layout/public';
6
+ /*** Renders application chrome with optional safe-area padding and leading/trailing slots. */
7
+ export function AppBar({ leading, trailing, children, safeAreaTop = true, divider = false, contentStyle, bg, style, ...props }) {
8
+ const { theme } = useTheme();
9
+ const insets = React.use(SafeAreaInsetsContext);
10
+ const topInset = safeAreaTop ? (insets?.top ?? 0) : 0;
11
+ const safeAreaStyle = topInset === 0 ? undefined : { paddingTop: topInset };
12
+ return (<View {...props} bg={bg ?? theme.semantics.surface.default} style={style}>
13
+ <ReactNativeView style={safeAreaStyle}>
14
+ <ReactNativeView style={[styles.content, resolveHorizontalPadding(theme.spacing.m), contentStyle]}>
15
+ {leading ? (<ReactNativeView style={[styles.accessory, resolveAccessoryMargin(theme.spacing.s, 'leading')]}>
16
+ {leading}
17
+ </ReactNativeView>) : null}
18
+ <ReactNativeView style={styles.center}>{children}</ReactNativeView>
19
+ {trailing ? (<ReactNativeView style={[styles.accessory, resolveAccessoryMargin(theme.spacing.s, 'trailing')]}>
20
+ {trailing}
21
+ </ReactNativeView>) : null}
22
+ </ReactNativeView>
23
+ {divider ? <Divider color={theme.semantics.neutral.divider} thickness={1}/> : null}
24
+ </ReactNativeView>
25
+ </View>);
26
+ }
27
+ /*** Resolves dynamic horizontal padding for the AppBar content row. */
28
+ function resolveHorizontalPadding(paddingHorizontal) {
29
+ return { paddingHorizontal };
30
+ }
31
+ /*** Resolves directional spacing for one AppBar accessory. */
32
+ function resolveAccessoryMargin(spacing, position) {
33
+ return position === 'leading' ? { marginRight: spacing } : { marginLeft: spacing };
34
+ }
35
+ const styles = StyleSheet.create({
36
+ accessory: { flexShrink: 0 },
37
+ center: { flex: 1, minWidth: 0 },
38
+ content: { alignItems: 'center', flexDirection: 'row', minHeight: 56 },
39
+ });
40
+ //# sourceMappingURL=AppBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppBar.js","sourceRoot":"","sources":["../../../../../src/features/app-bar/adapters/inbound/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,IAAI,e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UAAU,EAAE,CAAC,EAAE;IAC5B,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;IAChC,OAAO,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;CACvE,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, View as ReactNativeView, type ViewStyle } from 'react-native';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { AppBarProps } from '../../../../types/app-bar';\nimport { Divider, View } from '../../../layout/public';\n\n/*** Renders application chrome with optional safe-area padding and leading/trailing slots. */\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 <View {...props} bg={bg ?? theme.semantics.surface.default} style={style}>\n <ReactNativeView style={safeAreaStyle}>\n <ReactNativeView\n style={[styles.content, resolveHorizontalPadding(theme.spacing.m), contentStyle]}\n >\n {leading ? (\n <ReactNativeView\n style={[styles.accessory, resolveAccessoryMargin(theme.spacing.s, 'leading')]}\n >\n {leading}\n </ReactNativeView>\n ) : null}\n <ReactNativeView style={styles.center}>{children}</ReactNativeView>\n {trailing ? (\n <ReactNativeView\n style={[styles.accessory, resolveAccessoryMargin(theme.spacing.s, 'trailing')]}\n >\n {trailing}\n </ReactNativeView>\n ) : null}\n </ReactNativeView>\n {divider ? <Divider color={theme.semantics.neutral.divider} thickness={1} /> : null}\n </ReactNativeView>\n </View>\n );\n}\n\n/*** Resolves dynamic horizontal padding for the AppBar content row. */\nfunction resolveHorizontalPadding(paddingHorizontal: number): ViewStyle {\n return { paddingHorizontal };\n}\n\n/*** Resolves directional spacing for one AppBar accessory. */\nfunction resolveAccessoryMargin(spacing: number, position: 'leading' | 'trailing'): ViewStyle {\n return position === 'leading' ? { marginRight: spacing } : { marginLeft: spacing };\n}\n\nconst styles = StyleSheet.create({\n accessory: { flexShrink: 0 },\n center: { flex: 1, minWidth: 0 },\n content: { alignItems: 'center', flexDirection: 'row', minHeight: 56 },\n});\n"]}
@@ -0,0 +1,3 @@
1
+ export type { AppBarProps } from '../../types/app-bar';
2
+ export { AppBar } from './adapters/inbound/AppBar';
3
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/app-bar/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { AppBar } from './adapters/inbound/AppBar';
2
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/app-bar/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export type { AppBarProps } from '../../types/app-bar';\nexport { AppBar } from './adapters/inbound/AppBar';\n"]}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { resolveButtonColors, resolveControlSize } from '../../../../internal/resolvers';
3
3
  import { useTheme } from '../../../../theme/ThemeContext';
4
- import { Box } from '../../../layout/public';
4
+ import { View } from '../../../layout/public';
5
5
  import { Text } from '../../../typography/public';
6
6
  /*** Renders compact semantic status or metadata content. */
7
7
  export function Badge({ content, variant = 'soft', color = 'primary', size = 's', testID, }) {
@@ -12,11 +12,11 @@ export function Badge({ content, variant = 'soft', color = 'primary', size = 's'
12
12
  color,
13
13
  state: { disabled: false, focused: false, hovered: false, pressed: false },
14
14
  });
15
- return (<Box px={Math.max(theme.spacing.xs, controlSize.paddingHorizontal - 4)} py={Math.max(4, controlSize.paddingVertical - 2)} radius={controlSize.borderRadius} style={resolveBadgeStyle(colors.backgroundColor, colors.borderColor, variant)} testID={testID}>
15
+ return (<View px={Math.max(theme.spacing.xs, controlSize.paddingHorizontal - 4)} py={Math.max(4, controlSize.paddingVertical - 2)} radius={controlSize.borderRadius} style={resolveBadgeStyle(colors.backgroundColor, colors.borderColor, variant)} testID={testID}>
16
16
  <Text color={color} emphasis={variant === 'solid' ? 'inverse' : 'default'} variant="bodySmall" weight="medium">
17
17
  {content}
18
18
  </Text>
19
- </Box>);
19
+ </View>);
20
20
  }
21
21
  /*** Resolves the visual container style for one badge variant. */
22
22
  function resolveBadgeStyle(backgroundColor, borderColor, variant) {
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../../../src/features/badge/adapters/inbound/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,4DAA4D;AAC5D,MAAM,UAAU,KAAK,CAAC,EACpB,OAAO,EACP,OAAO,GAAG,MAAM,EAChB,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,GAAG,EACV,MAAM,GACK;IACX,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,EAAE;QACxC,OAAO;QACP,KAAK;QACL,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;KAC3E,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,GAAG,CACF,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,WAAW,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC,CAClE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,CACjD,MAAM,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CACjC,KAAK,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAC9E,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,IAAI,CACH,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CACtD,OAAO,CAAC,WAAW,CACnB,MAAM,CAAC,QAAQ,CAEf;QAAA,CAAC,OAAO,CACV;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED,kEAAkE;AAClE,SAAS,iBAAiB,CACxB,eAAuB,EACvB,WAAmB,EACnB,OAA2C;IAE3C,OAAO;QACL,SAAS,EAAE,YAAY;QACvB,eAAe;QACf,WAAW;QACX,WAAW,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport type { ViewStyle } from 'react-native';\n\nimport { resolveButtonColors, resolveControlSize } from '../../../../internal/resolvers';\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { BadgeProps } from '../../../../types/badge';\nimport { Box } from '../../../layout/public';\nimport { Text } from '../../../typography/public';\n\n/*** Renders compact semantic status or metadata content. */\nexport function Badge({\n content,\n variant = 'soft',\n color = 'primary',\n size = 's',\n testID,\n}: BadgeProps) {\n const { theme } = useTheme();\n const controlSize = resolveControlSize(theme, size);\n const colors = resolveButtonColors(theme, {\n variant,\n color,\n state: { disabled: false, focused: false, hovered: false, pressed: false },\n });\n\n return (\n <Box\n px={Math.max(theme.spacing.xs, controlSize.paddingHorizontal - 4)}\n py={Math.max(4, controlSize.paddingVertical - 2)}\n radius={controlSize.borderRadius}\n style={resolveBadgeStyle(colors.backgroundColor, colors.borderColor, variant)}\n testID={testID}\n >\n <Text\n color={color}\n emphasis={variant === 'solid' ? 'inverse' : 'default'}\n variant=\"bodySmall\"\n weight=\"medium\"\n >\n {content}\n </Text>\n </Box>\n );\n}\n\n/*** Resolves the visual container style for one badge variant. */\nfunction resolveBadgeStyle(\n backgroundColor: string,\n borderColor: string,\n variant: NonNullable<BadgeProps['variant']>,\n): ViewStyle {\n return {\n alignSelf: 'flex-start',\n backgroundColor,\n borderColor,\n borderWidth: variant === 'solid' ? 0 : 1,\n };\n}\n"]}
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../../../src/features/badge/adapters/inbound/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,4DAA4D;AAC5D,MAAM,UAAU,KAAK,CAAC,EACpB,OAAO,EACP,OAAO,GAAG,MAAM,EAChB,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,GAAG,EACV,MAAM,GACK;IAC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AE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport type { ViewStyle } from 'react-native';\n\nimport { resolveButtonColors, resolveControlSize } from '../../../../internal/resolvers';\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { BadgeProps } from '../../../../types/badge';\nimport { View } from '../../../layout/public';\nimport { Text } from '../../../typography/public';\n\n/*** Renders compact semantic status or metadata content. */\nexport function Badge({\n content,\n variant = 'soft',\n color = 'primary',\n size = 's',\n testID,\n}: BadgeProps) {\n const { theme } = useTheme();\n const controlSize = resolveControlSize(theme, size);\n const colors = resolveButtonColors(theme, {\n variant,\n color,\n state: { disabled: false, focused: false, hovered: false, pressed: false },\n });\n\n return (\n <View\n px={Math.max(theme.spacing.xs, controlSize.paddingHorizontal - 4)}\n py={Math.max(4, controlSize.paddingVertical - 2)}\n radius={controlSize.borderRadius}\n style={resolveBadgeStyle(colors.backgroundColor, colors.borderColor, variant)}\n testID={testID}\n >\n <Text\n color={color}\n emphasis={variant === 'solid' ? 'inverse' : 'default'}\n variant=\"bodySmall\"\n weight=\"medium\"\n >\n {content}\n </Text>\n </View>\n );\n}\n\n/*** Resolves the visual container style for one badge variant. */\nfunction resolveBadgeStyle(\n backgroundColor: string,\n borderColor: string,\n variant: NonNullable<BadgeProps['variant']>,\n): ViewStyle {\n return {\n alignSelf: 'flex-start',\n backgroundColor,\n borderColor,\n borderWidth: variant === 'solid' ? 0 : 1,\n };\n}\n"]}
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { ActivityIndicator, View } from 'react-native';
2
+ import { ActivityIndicator, View as ReactNativeView } from 'react-native';
3
3
  import { resolveButtonColors, resolveControlSize, resolveIconSize, } from '../../../../internal/resolvers';
4
4
  import { ButtonBase } from '../../../../primitives/button-base';
5
5
  import { useTheme } from '../../../../theme/ThemeContext';
6
6
  import { Icon } from '../../../icon/public';
7
- import { Box } from '../../../layout/public';
7
+ import { View } from '../../../layout/public';
8
8
  import { Text } from '../../../typography/public';
9
9
  /*** Renders the primary Surface action control with semantic visual states. */
10
10
  export function Button({ children, variant = 'solid', color = 'primary', size = 'm', disabled = false, loading = false, leadingIcon, trailingIcon, fullWidth = false, onPress, testID, ...props }) {
@@ -21,19 +21,19 @@ function ButtonContent({ children, color, controlSize, fullWidth, leadingIcon, l
21
21
  const colors = resolveButtonColors(theme, { variant, color, state });
22
22
  const muted = colors.contentColor === theme.semantics.content.muted;
23
23
  const iconSize = resolveIconSize(theme, size);
24
- return (<Box px={controlSize.paddingHorizontal} py={controlSize.paddingVertical} radius={controlSize.borderRadius} style={resolveButtonContentStyle(controlSize, colors, fullWidth, variant)}>
24
+ return (<View px={controlSize.paddingHorizontal} py={controlSize.paddingVertical} radius={controlSize.borderRadius} style={resolveButtonContentStyle(controlSize, colors, fullWidth, variant)}>
25
25
  {loading ? (<ActivityIndicator color={colors.contentColor} size="small"/>) : (<>
26
- {leadingIcon ? (<View style={resolveAccessoryStyle(theme.spacing.s, 'leading')}>
26
+ {leadingIcon ? (<ReactNativeView style={resolveAccessoryStyle(theme.spacing.s, 'leading')}>
27
27
  <Icon {...leadingIcon} color={colors.contentColor} size={iconSize}/>
28
- </View>) : null}
28
+ </ReactNativeView>) : null}
29
29
  <Text color={muted ? undefined : color} emphasis={muted ? 'muted' : variant === 'solid' ? 'inverse' : 'default'} variant={controlSize.textVariant} weight="semiBold">
30
30
  {children}
31
31
  </Text>
32
- {trailingIcon ? (<View style={resolveAccessoryStyle(theme.spacing.s, 'trailing')}>
32
+ {trailingIcon ? (<ReactNativeView style={resolveAccessoryStyle(theme.spacing.s, 'trailing')}>
33
33
  <Icon {...trailingIcon} color={colors.contentColor} size={iconSize}/>
34
- </View>) : null}
34
+ </ReactNativeView>) : null}
35
35
  </>)}
36
- </Box>);
36
+ </View>);
37
37
  }
38
38
  /*** Resolves the outer ButtonBase layout style. */
39
39
  function resolveButtonBaseStyle(fullWidth) {