@studio-piot/native-ui 0.2.5 → 0.16.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 (338) hide show
  1. package/README.md +22 -18
  2. package/dist/components/Button/Button.d.ts +20 -4
  3. package/dist/components/Button/Button.d.ts.map +1 -1
  4. package/dist/components/Button/Button.js +34 -21
  5. package/dist/components/Button/Button.js.map +1 -1
  6. package/dist/components/Button/buttonAppearance.d.ts +20 -0
  7. package/dist/components/Button/buttonAppearance.d.ts.map +1 -0
  8. package/dist/components/Button/buttonAppearance.js +28 -0
  9. package/dist/components/Button/buttonAppearance.js.map +1 -0
  10. package/dist/components/Button/buttonThemeRoles.d.ts +6 -0
  11. package/dist/components/Button/buttonThemeRoles.d.ts.map +1 -0
  12. package/dist/components/Button/buttonThemeRoles.js +8 -0
  13. package/dist/components/Button/buttonThemeRoles.js.map +1 -0
  14. package/dist/components/Button/index.d.ts +3 -1
  15. package/dist/components/Button/index.d.ts.map +1 -1
  16. package/dist/components/Button/index.js +4 -1
  17. package/dist/components/Button/index.js.map +1 -1
  18. package/dist/components/Choice/Choice.d.ts +8 -0
  19. package/dist/components/Choice/Choice.d.ts.map +1 -0
  20. package/dist/components/Choice/Choice.js +60 -0
  21. package/dist/components/Choice/Choice.js.map +1 -0
  22. package/dist/components/Choice/choiceLayout.d.ts +7 -0
  23. package/dist/components/Choice/choiceLayout.d.ts.map +1 -0
  24. package/dist/components/Choice/choiceLayout.js +13 -0
  25. package/dist/components/Choice/choiceLayout.js.map +1 -0
  26. package/dist/components/Choice/choiceThemeRoles.d.ts +8 -0
  27. package/dist/components/Choice/choiceThemeRoles.d.ts.map +1 -0
  28. package/dist/components/Choice/choiceThemeRoles.js +10 -0
  29. package/dist/components/Choice/choiceThemeRoles.js.map +1 -0
  30. package/dist/components/Choice/index.d.ts +5 -0
  31. package/dist/components/Choice/index.d.ts.map +1 -0
  32. package/dist/components/Choice/index.js +10 -0
  33. package/dist/components/Choice/index.js.map +1 -0
  34. package/dist/components/Choice/types.d.ts +26 -0
  35. package/dist/components/Choice/types.d.ts.map +1 -0
  36. package/dist/components/Choice/types.js +3 -0
  37. package/dist/components/Choice/types.js.map +1 -0
  38. package/dist/components/ErrorBanner/ErrorBanner.d.ts +1 -1
  39. package/dist/components/ErrorBanner/ErrorBanner.d.ts.map +1 -1
  40. package/dist/components/ErrorBanner/ErrorBanner.js +19 -19
  41. package/dist/components/ErrorBanner/ErrorBanner.js.map +1 -1
  42. package/dist/components/ErrorBanner/errorBannerContext.d.ts +23 -3
  43. package/dist/components/ErrorBanner/errorBannerContext.d.ts.map +1 -1
  44. package/dist/components/ErrorBanner/errorBannerContext.js +9 -5
  45. package/dist/components/ErrorBanner/errorBannerContext.js.map +1 -1
  46. package/dist/components/ErrorBanner/errorBannerLayout.d.ts +18 -0
  47. package/dist/components/ErrorBanner/errorBannerLayout.d.ts.map +1 -0
  48. package/dist/components/ErrorBanner/errorBannerLayout.js +54 -0
  49. package/dist/components/ErrorBanner/errorBannerLayout.js.map +1 -0
  50. package/dist/components/ErrorBanner/icons.d.ts +7 -5
  51. package/dist/components/ErrorBanner/icons.d.ts.map +1 -1
  52. package/dist/components/ErrorBanner/icons.js +8 -4
  53. package/dist/components/ErrorBanner/icons.js.map +1 -1
  54. package/dist/components/ErrorBanner/index.d.ts +1 -1
  55. package/dist/components/ErrorBanner/index.d.ts.map +1 -1
  56. package/dist/components/ErrorBanner/index.js.map +1 -1
  57. package/dist/components/Form/Form.d.ts +9 -1
  58. package/dist/components/Form/Form.d.ts.map +1 -1
  59. package/dist/components/Form/Form.js +56 -78
  60. package/dist/components/Form/Form.js.map +1 -1
  61. package/dist/components/Form/FormCloseButton.d.ts +3 -1
  62. package/dist/components/Form/FormCloseButton.d.ts.map +1 -1
  63. package/dist/components/Form/FormCloseButton.js +5 -4
  64. package/dist/components/Form/FormCloseButton.js.map +1 -1
  65. package/dist/components/Form/FormErrorBanner.d.ts +15 -0
  66. package/dist/components/Form/FormErrorBanner.d.ts.map +1 -0
  67. package/dist/components/Form/FormErrorBanner.js +30 -0
  68. package/dist/components/Form/FormErrorBanner.js.map +1 -0
  69. package/dist/components/Form/FormSubmitFooter.d.ts +17 -0
  70. package/dist/components/Form/FormSubmitFooter.d.ts.map +1 -0
  71. package/dist/components/Form/FormSubmitFooter.js +32 -0
  72. package/dist/components/Form/FormSubmitFooter.js.map +1 -0
  73. package/dist/components/Form/formThemeRoles.d.ts +7 -0
  74. package/dist/components/Form/formThemeRoles.d.ts.map +1 -0
  75. package/dist/components/Form/formThemeRoles.js +9 -0
  76. package/dist/components/Form/formThemeRoles.js.map +1 -0
  77. package/dist/components/Form/index.d.ts +1 -0
  78. package/dist/components/Form/index.d.ts.map +1 -1
  79. package/dist/components/Form/index.js +3 -1
  80. package/dist/components/Form/index.js.map +1 -1
  81. package/dist/components/Form/types.d.ts +14 -10
  82. package/dist/components/Form/types.d.ts.map +1 -1
  83. package/dist/components/FormSheet/FormSheet.d.ts +10 -0
  84. package/dist/components/FormSheet/FormSheet.d.ts.map +1 -0
  85. package/dist/components/FormSheet/FormSheet.js +153 -0
  86. package/dist/components/FormSheet/FormSheet.js.map +1 -0
  87. package/dist/components/FormSheet/formSheetLayout.d.ts +32 -0
  88. package/dist/components/FormSheet/formSheetLayout.d.ts.map +1 -0
  89. package/dist/components/FormSheet/formSheetLayout.js +43 -0
  90. package/dist/components/FormSheet/formSheetLayout.js.map +1 -0
  91. package/dist/components/FormSheet/formSheetThemeRoles.d.ts +8 -0
  92. package/dist/components/FormSheet/formSheetThemeRoles.d.ts.map +1 -0
  93. package/dist/components/FormSheet/formSheetThemeRoles.js +10 -0
  94. package/dist/components/FormSheet/formSheetThemeRoles.js.map +1 -0
  95. package/dist/components/FormSheet/index.d.ts +5 -0
  96. package/dist/components/FormSheet/index.d.ts.map +1 -0
  97. package/dist/components/FormSheet/index.js +10 -0
  98. package/dist/components/FormSheet/index.js.map +1 -0
  99. package/dist/components/FormSheet/types.d.ts +64 -0
  100. package/dist/components/FormSheet/types.d.ts.map +1 -0
  101. package/dist/components/FormSheet/types.js +3 -0
  102. package/dist/components/FormSheet/types.js.map +1 -0
  103. package/dist/components/HeaderButton/HeaderCapsule.d.ts +4 -0
  104. package/dist/components/HeaderButton/HeaderCapsule.d.ts.map +1 -0
  105. package/dist/components/HeaderButton/HeaderCapsule.js +32 -0
  106. package/dist/components/HeaderButton/HeaderCapsule.js.map +1 -0
  107. package/dist/components/HeaderButton/HeaderGroup.d.ts +4 -0
  108. package/dist/components/HeaderButton/HeaderGroup.d.ts.map +1 -0
  109. package/dist/components/HeaderButton/HeaderGroup.js +23 -0
  110. package/dist/components/HeaderButton/HeaderGroup.js.map +1 -0
  111. package/dist/components/HeaderButton/HeaderIcon.d.ts +4 -0
  112. package/dist/components/HeaderButton/HeaderIcon.d.ts.map +1 -0
  113. package/dist/components/HeaderButton/HeaderIcon.js +28 -0
  114. package/dist/components/HeaderButton/HeaderIcon.js.map +1 -0
  115. package/dist/components/HeaderButton/headerButtonLayout.d.ts +21 -0
  116. package/dist/components/HeaderButton/headerButtonLayout.d.ts.map +1 -0
  117. package/dist/components/HeaderButton/headerButtonLayout.js +34 -0
  118. package/dist/components/HeaderButton/headerButtonLayout.js.map +1 -0
  119. package/dist/components/HeaderButton/headerButtonThemeRoles.d.ts +5 -0
  120. package/dist/components/HeaderButton/headerButtonThemeRoles.d.ts.map +1 -0
  121. package/dist/components/HeaderButton/headerButtonThemeRoles.js +7 -0
  122. package/dist/components/HeaderButton/headerButtonThemeRoles.js.map +1 -0
  123. package/dist/components/HeaderButton/index.d.ts +7 -0
  124. package/dist/components/HeaderButton/index.d.ts.map +1 -0
  125. package/dist/components/HeaderButton/index.js +14 -0
  126. package/dist/components/HeaderButton/index.js.map +1 -0
  127. package/dist/components/HeaderButton/types.d.ts +40 -0
  128. package/dist/components/HeaderButton/types.d.ts.map +1 -0
  129. package/dist/components/HeaderButton/types.js +3 -0
  130. package/dist/components/HeaderButton/types.js.map +1 -0
  131. package/dist/components/HeaderWash/HeaderWash.d.ts +10 -0
  132. package/dist/components/HeaderWash/HeaderWash.d.ts.map +1 -0
  133. package/dist/components/HeaderWash/HeaderWash.js +19 -0
  134. package/dist/components/HeaderWash/HeaderWash.js.map +1 -0
  135. package/dist/components/HeaderWash/headerWashGradient.d.ts +8 -0
  136. package/dist/components/HeaderWash/headerWashGradient.d.ts.map +1 -0
  137. package/dist/components/HeaderWash/headerWashGradient.js +21 -0
  138. package/dist/components/HeaderWash/headerWashGradient.js.map +1 -0
  139. package/dist/components/HeaderWash/index.d.ts +2 -0
  140. package/dist/components/HeaderWash/index.d.ts.map +1 -0
  141. package/dist/components/HeaderWash/index.js +6 -0
  142. package/dist/components/HeaderWash/index.js.map +1 -0
  143. package/dist/components/Page/Page.d.ts +13 -0
  144. package/dist/components/Page/Page.d.ts.map +1 -0
  145. package/dist/components/Page/Page.js +49 -0
  146. package/dist/components/Page/Page.js.map +1 -0
  147. package/dist/components/Page/PageBleed.d.ts +9 -0
  148. package/dist/components/Page/PageBleed.d.ts.map +1 -0
  149. package/dist/components/Page/PageBleed.js +12 -0
  150. package/dist/components/Page/PageBleed.js.map +1 -0
  151. package/dist/components/Page/index.d.ts +5 -0
  152. package/dist/components/Page/index.d.ts.map +1 -0
  153. package/dist/components/Page/index.js +10 -0
  154. package/dist/components/Page/index.js.map +1 -0
  155. package/dist/components/Page/pageContext.d.ts +4 -0
  156. package/dist/components/Page/pageContext.d.ts.map +1 -0
  157. package/dist/components/Page/pageContext.js +11 -0
  158. package/dist/components/Page/pageContext.js.map +1 -0
  159. package/dist/components/Page/pageInsets.d.ts +26 -0
  160. package/dist/components/Page/pageInsets.d.ts.map +1 -0
  161. package/dist/components/Page/pageInsets.js +37 -0
  162. package/dist/components/Page/pageInsets.js.map +1 -0
  163. package/dist/components/Page/pageLayout.d.ts +5 -0
  164. package/dist/components/Page/pageLayout.d.ts.map +1 -0
  165. package/dist/components/Page/pageLayout.js +8 -0
  166. package/dist/components/Page/pageLayout.js.map +1 -0
  167. package/dist/components/Page/pageThemeRoles.d.ts +5 -0
  168. package/dist/components/Page/pageThemeRoles.d.ts.map +1 -0
  169. package/dist/components/Page/pageThemeRoles.js +7 -0
  170. package/dist/components/Page/pageThemeRoles.js.map +1 -0
  171. package/dist/components/Page/types.d.ts +22 -0
  172. package/dist/components/Page/types.d.ts.map +1 -0
  173. package/dist/components/Page/types.js +3 -0
  174. package/dist/components/Page/types.js.map +1 -0
  175. package/dist/components/Select/Select.d.ts +1 -1
  176. package/dist/components/Select/Select.d.ts.map +1 -1
  177. package/dist/components/Select/Select.js +8 -9
  178. package/dist/components/Select/Select.js.map +1 -1
  179. package/dist/components/Select/selectThemeRoles.d.ts +2 -0
  180. package/dist/components/Select/selectThemeRoles.d.ts.map +1 -1
  181. package/dist/components/Select/selectThemeRoles.js +2 -0
  182. package/dist/components/Select/selectThemeRoles.js.map +1 -1
  183. package/dist/components/Select/types.d.ts +4 -0
  184. package/dist/components/Select/types.d.ts.map +1 -1
  185. package/dist/components/TabAccessoryButton/TabAccessoryButton.d.ts +8 -0
  186. package/dist/components/TabAccessoryButton/TabAccessoryButton.d.ts.map +1 -0
  187. package/dist/components/TabAccessoryButton/TabAccessoryButton.js +77 -0
  188. package/dist/components/TabAccessoryButton/TabAccessoryButton.js.map +1 -0
  189. package/dist/components/TabAccessoryButton/index.d.ts +5 -0
  190. package/dist/components/TabAccessoryButton/index.d.ts.map +1 -0
  191. package/dist/components/TabAccessoryButton/index.js +11 -0
  192. package/dist/components/TabAccessoryButton/index.js.map +1 -0
  193. package/dist/components/TabAccessoryButton/tabAccessoryLayout.d.ts +27 -0
  194. package/dist/components/TabAccessoryButton/tabAccessoryLayout.d.ts.map +1 -0
  195. package/dist/components/TabAccessoryButton/tabAccessoryLayout.js +38 -0
  196. package/dist/components/TabAccessoryButton/tabAccessoryLayout.js.map +1 -0
  197. package/dist/components/TabAccessoryButton/tabAccessoryThemeRoles.d.ts +14 -0
  198. package/dist/components/TabAccessoryButton/tabAccessoryThemeRoles.d.ts.map +1 -0
  199. package/dist/components/TabAccessoryButton/tabAccessoryThemeRoles.js +19 -0
  200. package/dist/components/TabAccessoryButton/tabAccessoryThemeRoles.js.map +1 -0
  201. package/dist/components/TabAccessoryButton/types.d.ts +27 -0
  202. package/dist/components/TabAccessoryButton/types.d.ts.map +1 -0
  203. package/dist/components/TabAccessoryButton/types.js +3 -0
  204. package/dist/components/TabAccessoryButton/types.js.map +1 -0
  205. package/dist/components/index.d.ts +9 -3
  206. package/dist/components/index.d.ts.map +1 -1
  207. package/dist/components/index.js +30 -1
  208. package/dist/components/index.js.map +1 -1
  209. package/dist/index.d.ts +11 -4
  210. package/dist/index.d.ts.map +1 -1
  211. package/dist/index.js +34 -2
  212. package/dist/index.js.map +1 -1
  213. package/dist/layout/HeaderInsetProbe.d.ts +15 -0
  214. package/dist/layout/HeaderInsetProbe.d.ts.map +1 -0
  215. package/dist/layout/HeaderInsetProbe.js +28 -0
  216. package/dist/layout/HeaderInsetProbe.js.map +1 -0
  217. package/dist/layout/headerInset.d.ts +26 -0
  218. package/dist/layout/headerInset.d.ts.map +1 -0
  219. package/dist/layout/headerInset.js +29 -0
  220. package/dist/layout/headerInset.js.map +1 -0
  221. package/dist/layout/index.d.ts +1 -0
  222. package/dist/layout/index.d.ts.map +1 -1
  223. package/dist/layout/index.js +3 -1
  224. package/dist/layout/index.js.map +1 -1
  225. package/dist/layout/sheet.d.ts +3 -0
  226. package/dist/layout/sheet.d.ts.map +1 -0
  227. package/dist/layout/sheet.js +6 -0
  228. package/dist/layout/sheet.js.map +1 -0
  229. package/dist/theme/ThemeProvider.d.ts +4 -1
  230. package/dist/theme/ThemeProvider.d.ts.map +1 -1
  231. package/dist/theme/ThemeProvider.js +5 -2
  232. package/dist/theme/ThemeProvider.js.map +1 -1
  233. package/dist/theme/index.d.ts +2 -0
  234. package/dist/theme/index.d.ts.map +1 -1
  235. package/dist/theme/index.js +6 -1
  236. package/dist/theme/index.js.map +1 -1
  237. package/dist/theme/resolveThemeSpacing.d.ts +12 -0
  238. package/dist/theme/resolveThemeSpacing.d.ts.map +1 -0
  239. package/dist/theme/resolveThemeSpacing.js +14 -0
  240. package/dist/theme/resolveThemeSpacing.js.map +1 -0
  241. package/dist/theme/types.d.ts +2 -0
  242. package/dist/theme/types.d.ts.map +1 -1
  243. package/dist/theme/useThemeSpacing.d.ts +4 -0
  244. package/dist/theme/useThemeSpacing.d.ts.map +1 -0
  245. package/dist/theme/useThemeSpacing.js +11 -0
  246. package/dist/theme/useThemeSpacing.js.map +1 -0
  247. package/docs/components/button.md +92 -38
  248. package/docs/components/choice.md +88 -0
  249. package/docs/components/error-banner.md +46 -3
  250. package/docs/components/form-sheet.md +140 -0
  251. package/docs/components/form.md +80 -45
  252. package/docs/components/header-button.md +310 -0
  253. package/docs/components/header-wash.md +40 -0
  254. package/docs/components/page.md +183 -0
  255. package/docs/components/select.md +2 -2
  256. package/docs/components/tab-accessory-button.md +146 -0
  257. package/docs/specifications/Liquid Glass header buttons in Expo Router.md +327 -0
  258. package/package.json +1 -1
  259. package/src/components/Button/Button.tsx +82 -38
  260. package/src/components/Button/buttonAppearance.test.ts +44 -0
  261. package/src/components/Button/buttonAppearance.ts +38 -0
  262. package/src/components/Button/buttonThemeRoles.test.ts +10 -0
  263. package/src/components/Button/buttonThemeRoles.ts +6 -0
  264. package/src/components/Button/index.ts +12 -1
  265. package/src/components/Choice/Choice.tsx +109 -0
  266. package/src/components/Choice/choiceLayout.test.ts +14 -0
  267. package/src/components/Choice/choiceLayout.ts +9 -0
  268. package/src/components/Choice/choiceThemeRoles.test.ts +14 -0
  269. package/src/components/Choice/choiceThemeRoles.ts +8 -0
  270. package/src/components/Choice/index.ts +4 -0
  271. package/src/components/Choice/types.ts +26 -0
  272. package/src/components/ErrorBanner/ErrorBanner.tsx +32 -22
  273. package/src/components/ErrorBanner/errorBannerContext.tsx +31 -6
  274. package/src/components/ErrorBanner/errorBannerLayout.test.ts +49 -0
  275. package/src/components/ErrorBanner/errorBannerLayout.ts +59 -0
  276. package/src/components/ErrorBanner/icons.tsx +25 -6
  277. package/src/components/ErrorBanner/index.ts +1 -0
  278. package/src/components/Form/Form.tsx +77 -173
  279. package/src/components/Form/FormCloseButton.tsx +12 -4
  280. package/src/components/Form/FormErrorBanner.tsx +57 -0
  281. package/src/components/Form/FormSubmitFooter.tsx +70 -0
  282. package/src/components/Form/formThemeRoles.test.ts +13 -0
  283. package/src/components/Form/formThemeRoles.ts +7 -0
  284. package/src/components/Form/index.ts +1 -0
  285. package/src/components/Form/types.ts +14 -10
  286. package/src/components/FormSheet/FormSheet.tsx +279 -0
  287. package/src/components/FormSheet/formSheetLayout.test.ts +66 -0
  288. package/src/components/FormSheet/formSheetLayout.ts +55 -0
  289. package/src/components/FormSheet/formSheetThemeRoles.test.ts +14 -0
  290. package/src/components/FormSheet/formSheetThemeRoles.ts +8 -0
  291. package/src/components/FormSheet/index.ts +7 -0
  292. package/src/components/FormSheet/types.ts +66 -0
  293. package/src/components/HeaderButton/HeaderCapsule.tsx +63 -0
  294. package/src/components/HeaderButton/HeaderGroup.tsx +36 -0
  295. package/src/components/HeaderButton/HeaderIcon.tsx +56 -0
  296. package/src/components/HeaderButton/headerButtonLayout.test.ts +47 -0
  297. package/src/components/HeaderButton/headerButtonLayout.ts +36 -0
  298. package/src/components/HeaderButton/headerButtonThemeRoles.test.ts +9 -0
  299. package/src/components/HeaderButton/headerButtonThemeRoles.ts +5 -0
  300. package/src/components/HeaderButton/index.ts +14 -0
  301. package/src/components/HeaderButton/types.ts +40 -0
  302. package/src/components/HeaderWash/HeaderWash.tsx +20 -0
  303. package/src/components/HeaderWash/headerWashGradient.test.ts +22 -0
  304. package/src/components/{Form/withAlpha.ts → HeaderWash/headerWashGradient.ts} +9 -0
  305. package/src/components/HeaderWash/index.ts +1 -0
  306. package/src/components/Page/Page.tsx +80 -0
  307. package/src/components/Page/PageBleed.tsx +14 -0
  308. package/src/components/Page/index.ts +4 -0
  309. package/src/components/Page/pageContext.ts +8 -0
  310. package/src/components/Page/pageInsets.test.ts +73 -0
  311. package/src/components/Page/pageInsets.ts +52 -0
  312. package/src/components/Page/pageThemeRoles.test.ts +9 -0
  313. package/src/components/Page/pageThemeRoles.ts +5 -0
  314. package/src/components/Page/types.ts +26 -0
  315. package/src/components/Select/Select.tsx +11 -4
  316. package/src/components/Select/selectThemeRoles.test.ts +5 -0
  317. package/src/components/Select/selectThemeRoles.ts +2 -0
  318. package/src/components/Select/types.ts +4 -0
  319. package/src/components/TabAccessoryButton/TabAccessoryButton.tsx +150 -0
  320. package/src/components/TabAccessoryButton/index.ts +12 -0
  321. package/src/components/TabAccessoryButton/tabAccessoryLayout.test.ts +42 -0
  322. package/src/components/TabAccessoryButton/tabAccessoryLayout.ts +43 -0
  323. package/src/components/TabAccessoryButton/tabAccessoryThemeRoles.test.ts +28 -0
  324. package/src/components/TabAccessoryButton/tabAccessoryThemeRoles.ts +22 -0
  325. package/src/components/TabAccessoryButton/types.ts +27 -0
  326. package/src/components/index.ts +64 -2
  327. package/src/index.ts +61 -2
  328. package/src/layout/headerInset.test.ts +60 -0
  329. package/src/layout/headerInset.ts +41 -0
  330. package/src/layout/index.ts +1 -0
  331. package/src/layout/sheet.ts +2 -0
  332. package/src/theme/ThemeProvider.tsx +9 -1
  333. package/src/theme/index.ts +6 -0
  334. package/src/theme/resolveThemeSpacing.test.ts +29 -0
  335. package/src/theme/resolveThemeSpacing.ts +21 -0
  336. package/src/theme/types.ts +3 -0
  337. package/src/theme/useThemeSpacing.ts +8 -0
  338. package/src/components/Form/withAlpha.test.ts +0 -13
package/README.md CHANGED
@@ -10,19 +10,38 @@ The package is the native counterpart of `@studio-piot/ui`. Apps own their palet
10
10
  npm install @studio-piot/native-ui
11
11
  ```
12
12
 
13
- `Select` peers `@gorhom/bottom-sheet`, `react-native-reanimated`, `react-native-gesture-handler`, and `react-native-screens` (iOS `FullWindowOverlay` so the sheet appears above React Navigation modals). `SegmentedControl` uses that same `react-native-reanimated` peer to slide the selection fill. `Slider` peers `@react-native-community/slider`. `ErrorBanner` peers `react-native-svg` for the megaphone and row arrow.
13
+ `Select` peers `@gorhom/bottom-sheet`, `react-native-reanimated`, `react-native-gesture-handler`, and `react-native-screens` (iOS `FullWindowOverlay` so the sheet appears above React Navigation modals). `SegmentedControl` uses that same `react-native-reanimated` peer to slide the selection fill. `Slider` peers `@react-native-community/slider`. `ErrorBanner` peers `react-native-svg` for the megaphone and row arrow. `HeaderIcon` and `HeaderCapsule` take an icon render function, so they add no peer; pass `expo-symbols` `SymbolView` or any icon component.
14
+
15
+ ## Theme roles
16
+
17
+ The package never reads your app's own colour names (`background`, `text`, `primary`, …). Every component reads roles with its own prefix (`buttonBackground`, `formBackground`, `pageBackground`, `segmentLabel`, …), and each one has a matching optional prop. Map those roles to your palette in the `ThemeProvider` colours:
18
+
19
+ ```ts
20
+ const Colors = {
21
+ light: { pageBackground: palette.paper, buttonBackground: palette.brand, /* … */ },
22
+ dark: { pageBackground: palette.ink, buttonBackground: palette.brand, /* … */ },
23
+ };
24
+ ```
25
+
26
+ Each component doc lists its roles.
14
27
 
15
28
  ## Docs
16
29
 
17
30
  - [Theme provider and Button usage](./docs/components/button.md)
18
31
  - [LinkBlocks usage](./docs/components/link-blocks.md)
19
32
  - [Field usage](./docs/components/field.md)
33
+ - [Choice usage](./docs/components/choice.md)
20
34
  - [Form usage](./docs/components/form.md)
35
+ - [HeaderWash usage](./docs/components/header-wash.md)
36
+ - [FormSheet usage](./docs/components/form-sheet.md)
21
37
  - [ErrorBanner usage](./docs/components/error-banner.md)
22
38
  - [RadioField usage](./docs/components/radio-field.md)
23
39
  - [Select usage](./docs/components/select.md)
24
40
  - [SegmentedControl usage](./docs/components/segmented-control.md)
25
41
  - [Slider usage](./docs/components/slider.md)
42
+ - [Header buttons (Liquid Glass) usage](./docs/components/header-button.md)
43
+ - [TabAccessoryButton (Liquid Glass) usage](./docs/components/tab-accessory-button.md)
44
+ - [Page usage](./docs/components/page.md)
26
45
  - [Design: theme provider and Button](./docs/superpowers/specs/2026-09-24-theme-provider-button-design.md)
27
46
  - [Design: LinkBlocks](./docs/superpowers/specs/2026-09-24-link-blocks-design.md)
28
47
  - [Design: Field](./docs/superpowers/specs/2026-09-24-field-design.md)
@@ -33,32 +52,17 @@ npm install @studio-piot/native-ui
33
52
  ## Quick start
34
53
 
35
54
  ```tsx
36
- import {
37
- Button,
38
- ThemeProvider,
39
- useThemeColor,
40
- } from "@studio-piot/native-ui";
55
+ import { Button, ThemeProvider } from "@studio-piot/native-ui";
41
56
 
42
57
  const Colors = {
43
58
  light: { buttonBackground: "#111", buttonLabel: "#fff" },
44
59
  dark: { buttonBackground: "#eee", buttonLabel: "#111" },
45
60
  };
46
61
 
47
- function SaveButton({ onPress }: { onPress: () => void }) {
48
- return (
49
- <Button
50
- label="Save"
51
- onPress={onPress}
52
- backgroundColor={useThemeColor("buttonBackground")}
53
- labelColor={useThemeColor("buttonLabel")}
54
- />
55
- );
56
- }
57
-
58
62
  export function App() {
59
63
  return (
60
64
  <ThemeProvider colors={Colors}>
61
- <SaveButton onPress={() => undefined} />
65
+ <Button label="Save" onPress={() => undefined} />
62
66
  </ThemeProvider>
63
67
  );
64
68
  }
@@ -1,16 +1,32 @@
1
+ import type { ReactNode } from "react";
1
2
  import { type StyleProp, type TextStyle, type ViewStyle } from "react-native";
3
+ import { type ButtonVariant } from "./buttonAppearance";
2
4
  import { type ButtonRadius } from "./buttonRadius";
5
+ export declare const BUTTON_ICON_SIZE = 20;
6
+ /** Renders the icon in the button's content colour, e.g. an expo-symbols `SymbolView`. */
7
+ export type ButtonIcon = (props: {
8
+ color: string;
9
+ size: number;
10
+ }) => ReactNode;
11
+ export type ButtonIconPosition = "start" | "end" | "only";
3
12
  export type ButtonProps = {
13
+ /** Shown text, and the accessibility label (also when `iconPosition="only"`). */
4
14
  label: string;
5
15
  onPress: () => void;
6
- backgroundColor: string;
7
- labelColor: string;
16
+ /** Filled: fill. Outline: border, label and icon. Defaults to theme role `buttonBackground`. */
17
+ backgroundColor?: string;
18
+ /** Filled: label, icon and spinner. Defaults to theme role `buttonLabel`. */
19
+ labelColor?: string;
8
20
  disabled?: boolean;
9
21
  loading?: boolean;
10
- variant?: "filled" | "outline";
22
+ variant?: ButtonVariant;
11
23
  radius?: ButtonRadius;
24
+ icon?: ButtonIcon;
25
+ /** Default `"start"`. `"only"` hides the label text; `label` stays the accessibility name. */
26
+ iconPosition?: ButtonIconPosition;
27
+ iconSize?: number;
12
28
  style?: StyleProp<ViewStyle>;
13
29
  labelStyle?: StyleProp<TextStyle>;
14
30
  };
15
- export declare function Button({ label, onPress, backgroundColor, labelColor, disabled, loading, variant, radius, style, labelStyle, }: ButtonProps): import("react").JSX.Element;
31
+ export declare function Button({ label, onPress, backgroundColor: backgroundColorProp, labelColor: labelColorProp, disabled, loading, variant, radius, icon, iconPosition, iconSize, style, labelStyle, }: ButtonProps): import("react").JSX.Element;
16
32
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;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AA8F;IAC9F,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACnC,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,eAAe,EAAE,mBAAmB,EACpC,UAAU,EAAE,cAAc,EAC1B,QAAgB,EAChB,OAAe,EACf,OAAkB,EAClB,MAAa,EACb,IAAI,EACJ,YAAsB,EACtB,QAA2B,EAC3B,KAAK,EACL,UAAU,GACX,EAAE,WAAW,+BAqDb"}
@@ -1,44 +1,57 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BUTTON_ICON_SIZE = void 0;
3
4
  exports.Button = Button;
4
5
  const jsx_runtime_1 = require("react/jsx-runtime");
5
6
  const react_native_1 = require("react-native");
7
+ const useResolvedFieldColor_1 = require("../Field/useResolvedFieldColor");
8
+ const buttonAppearance_1 = require("./buttonAppearance");
6
9
  const buttonRadius_1 = require("./buttonRadius");
7
- function Button({ label, onPress, backgroundColor, labelColor, disabled = false, loading = false, variant = "filled", radius = "xl", style, labelStyle, }) {
8
- const blocked = disabled || loading;
9
- const isOutline = variant === "outline";
10
- const borderRadius = (0, buttonRadius_1.buttonRadiusValue)(radius);
11
- return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { accessibilityLabel: label, accessibilityRole: "button", accessibilityState: { disabled: blocked, busy: loading }, activeOpacity: 0.75, disabled: blocked, onPress: onPress, style: [
10
+ const buttonThemeRoles_1 = require("./buttonThemeRoles");
11
+ exports.BUTTON_ICON_SIZE = 20;
12
+ function Button({ label, onPress, backgroundColor: backgroundColorProp, labelColor: labelColorProp, disabled = false, loading = false, variant = "filled", radius = "xl", icon, iconPosition = "start", iconSize = exports.BUTTON_ICON_SIZE, style, labelStyle, }) {
13
+ const backgroundColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(backgroundColorProp, buttonThemeRoles_1.BUTTON_THEME_ROLES.backgroundColor);
14
+ const labelColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(labelColorProp, buttonThemeRoles_1.BUTTON_THEME_ROLES.labelColor);
15
+ const colors = (0, buttonAppearance_1.buttonColors)(variant, backgroundColor, labelColor);
16
+ const iconNode = icon?.({ color: colors.content, size: iconSize });
17
+ const showLabel = !(icon && iconPosition === "only");
18
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { accessibilityLabel: label, accessibilityRole: "button", accessibilityState: { disabled: disabled || loading, busy: loading }, disabled: disabled || loading, onPress: onPress, style: ({ pressed }) => [
12
19
  styles.shell,
13
- { borderRadius },
14
- isOutline
15
- ? {
16
- backgroundColor: "transparent",
17
- borderWidth: 1,
18
- borderColor: backgroundColor,
19
- }
20
- : { backgroundColor },
21
- blocked && styles.blocked,
20
+ {
21
+ borderRadius: (0, buttonRadius_1.buttonRadiusValue)(radius),
22
+ backgroundColor: colors.fill,
23
+ opacity: (0, buttonAppearance_1.buttonOpacity)({ disabled, loading, pressed }),
24
+ },
25
+ colors.border != null && {
26
+ borderWidth: 1,
27
+ borderColor: colors.border,
28
+ },
22
29
  style,
23
- ], children: loading ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { color: isOutline ? backgroundColor : labelColor, size: "small" })) : ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [
24
- styles.label,
25
- { color: isOutline ? backgroundColor : labelColor },
26
- labelStyle,
27
- ], children: label })) }));
30
+ ], children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles.content, loading && styles.hidden], children: [iconPosition !== "end" ? iconNode : null, showLabel ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.label, { color: colors.content }, labelStyle], children: label })) : null, iconPosition === "end" ? iconNode : null] }), loading ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { color: colors.content, size: "small", style: react_native_1.StyleSheet.absoluteFill })) : null] }));
28
31
  }
29
32
  const styles = react_native_1.StyleSheet.create({
30
33
  shell: {
31
34
  width: "100%",
32
35
  minHeight: 52,
36
+ paddingHorizontal: 20,
37
+ paddingVertical: 12,
33
38
  alignItems: "center",
34
39
  justifyContent: "center",
35
40
  },
36
- blocked: {
37
- opacity: 0.4,
41
+ content: {
42
+ flexDirection: "row",
43
+ alignItems: "center",
44
+ justifyContent: "center",
45
+ gap: 8,
46
+ },
47
+ hidden: {
48
+ opacity: 0,
38
49
  },
39
50
  label: {
51
+ flexShrink: 1,
40
52
  fontSize: 17,
41
53
  fontWeight: "600",
54
+ textAlign: "center",
42
55
  },
43
56
  });
44
57
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":";;AAwBA,wBAwDC;;AAhFD,+CAQsB;AACtB,iDAAsE;AAetE,SAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,eAAe,EACf,UAAU,EACV,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,QAAQ,EAClB,MAAM,GAAG,IAAI,EACb,KAAK,EACL,UAAU,GACE;IACZ,MAAM,OAAO,GAAG,QAAQ,IAAI,OAAO,CAAC;IACpC,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,CAAC;IACxC,MAAM,YAAY,GAAG,IAAA,gCAAiB,EAAC,MAAM,CAAC,CAAC;IAE/C,OAAO,CACL,uBAAC,+BAAgB,IACf,kBAAkB,EAAE,KAAK,EACzB,iBAAiB,EAAC,QAAQ,EAC1B,kBAAkB,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EACxD,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;YACL,MAAM,CAAC,KAAK;YACZ,EAAE,YAAY,EAAE;YAChB,SAAS;gBACP,CAAC,CAAC;oBACE,eAAe,EAAE,aAAa;oBAC9B,WAAW,EAAE,CAAC;oBACd,WAAW,EAAE,eAAe;iBAC7B;gBACH,CAAC,CAAC,EAAE,eAAe,EAAE;YACvB,OAAO,IAAI,MAAM,CAAC,OAAO;YACzB,KAAK;SACN,YAEA,OAAO,CAAC,CAAC,CAAC,CACT,uBAAC,gCAAiB,IAChB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU,EAC/C,IAAI,EAAC,OAAO,GACZ,CACH,CAAC,CAAC,CAAC,CACF,uBAAC,mBAAI,IACH,KAAK,EAAE;gBACL,MAAM,CAAC,KAAK;gBACZ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU,EAAE;gBACnD,UAAU;aACX,YAEA,KAAK,GACD,CACR,GACgB,CACpB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,GAAG;KACb;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":";;;AA+CA,wBAmEC;;AAjHD,+CASsB;AACtB,0EAAuE;AACvE,yDAI4B;AAC5B,iDAAsE;AACtE,yDAAwD;AAE3C,QAAA,gBAAgB,GAAG,EAAE,CAAC;AA2BnC,SAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,eAAe,EAAE,mBAAmB,EACpC,U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AAE,QAAQ;KACpB;CACF,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ export type ButtonVariant = "filled" | "outline";
2
+ /**
3
+ * Fill, border and content (label, icon, spinner) colours for a variant.
4
+ * Outline draws everything in `background`; `label` is unused there.
5
+ */
6
+ export declare function buttonColors(variant: ButtonVariant, background: string, label: string): {
7
+ fill: string;
8
+ border: string | undefined;
9
+ content: string;
10
+ };
11
+ /**
12
+ * Disabled fades the button. Loading only blocks presses: a spinner on a
13
+ * faded button reads as broken, not busy.
14
+ */
15
+ export declare function buttonOpacity({ disabled, loading, pressed, }: {
16
+ disabled: boolean;
17
+ loading: boolean;
18
+ pressed: boolean;
19
+ }): number;
20
+ //# sourceMappingURL=buttonAppearance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buttonAppearance.d.ts","sourceRoot":"","sources":["../../../src/components/Button/buttonAppearance.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GACZ;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAK/D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,OAAO,EACP,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,MAAM,CAQT"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buttonColors = buttonColors;
4
+ exports.buttonOpacity = buttonOpacity;
5
+ /**
6
+ * Fill, border and content (label, icon, spinner) colours for a variant.
7
+ * Outline draws everything in `background`; `label` is unused there.
8
+ */
9
+ function buttonColors(variant, background, label) {
10
+ if (variant === "outline") {
11
+ return { fill: "transparent", border: background, content: background };
12
+ }
13
+ return { fill: background, border: undefined, content: label };
14
+ }
15
+ /**
16
+ * Disabled fades the button. Loading only blocks presses: a spinner on a
17
+ * faded button reads as broken, not busy.
18
+ */
19
+ function buttonOpacity({ disabled, loading, pressed, }) {
20
+ if (disabled) {
21
+ return 0.4;
22
+ }
23
+ if (pressed && !loading) {
24
+ return 0.75;
25
+ }
26
+ return 1;
27
+ }
28
+ //# sourceMappingURL=buttonAppearance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buttonAppearance.js","sourceRoot":"","sources":["../../../src/components/Button/buttonAppearance.ts"],"names":[],"mappings":";;AAMA,oCASC;AAMD,sCAgBC;AAnCD;;;GAGG;AACH,SAAgB,YAAY,CAC1B,OAAsB,EACtB,UAAkB,EAClB,KAAa;IAEb,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAC1E,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,OAAO,EACP,OAAO,GAKR;IACC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const BUTTON_THEME_ROLES: {
2
+ readonly backgroundColor: "buttonBackground";
3
+ readonly labelColor: "buttonLabel";
4
+ };
5
+ export type ButtonThemeColorProp = keyof typeof BUTTON_THEME_ROLES;
6
+ //# sourceMappingURL=buttonThemeRoles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buttonThemeRoles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/buttonThemeRoles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BUTTON_THEME_ROLES = void 0;
4
+ exports.BUTTON_THEME_ROLES = {
5
+ backgroundColor: "buttonBackground",
6
+ labelColor: "buttonLabel",
7
+ };
8
+ //# sourceMappingURL=buttonThemeRoles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buttonThemeRoles.js","sourceRoot":"","sources":["../../../src/components/Button/buttonThemeRoles.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,eAAe,EAAE,kBAAkB;IACnC,UAAU,EAAE,aAAa;CACjB,CAAC"}
@@ -1,3 +1,5 @@
1
- export { Button, type ButtonProps } from "./Button";
1
+ export { Button, BUTTON_ICON_SIZE, type ButtonIcon, type ButtonIconPosition, type ButtonProps, } from "./Button";
2
+ export type { ButtonVariant } from "./buttonAppearance";
2
3
  export { buttonRadiusValue, type ButtonRadius } from "./buttonRadius";
4
+ export { BUTTON_THEME_ROLES, type ButtonThemeColorProp, } from "./buttonThemeRoles";
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC"}
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buttonRadiusValue = exports.Button = void 0;
3
+ exports.BUTTON_THEME_ROLES = exports.buttonRadiusValue = exports.BUTTON_ICON_SIZE = exports.Button = void 0;
4
4
  var Button_1 = require("./Button");
5
5
  Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
6
+ Object.defineProperty(exports, "BUTTON_ICON_SIZE", { enumerable: true, get: function () { return Button_1.BUTTON_ICON_SIZE; } });
6
7
  var buttonRadius_1 = require("./buttonRadius");
7
8
  Object.defineProperty(exports, "buttonRadiusValue", { enumerable: true, get: function () { return buttonRadius_1.buttonRadiusValue; } });
9
+ var buttonThemeRoles_1 = require("./buttonThemeRoles");
10
+ Object.defineProperty(exports, "BUTTON_THEME_ROLES", { enumerable: true, get: function () { return buttonThemeRoles_1.BUTTON_THEME_ROLES; } });
8
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":";;;AAAA,mCAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,+CAAsE;AAA7D,iHAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":";;;AAAA,mCAMkB;AALhB,gGAAA,MAAM,OAAA;AACN,0GAAA,gBAAgB,OAAA;AAMlB,+CAAsE;AAA7D,iHAAA,iBAAiB,OAAA;AAC1B,uDAG4B;AAF1B,sHAAA,kBAAkB,OAAA"}
@@ -0,0 +1,8 @@
1
+ import type { ChoiceProps } from "./types";
2
+ /**
3
+ * One option in a list of next steps: an icon, a title and an optional
4
+ * description, in a filled row. Tapping it acts straight away, usually to
5
+ * open the next screen. For picking a value, use RadioField or Select.
6
+ */
7
+ export declare function Choice({ title, description, icon, onPress, disabled, iconSize, radius, backgroundColor: backgroundColorProp, titleColor: titleColorProp, descriptionColor: descriptionColorProp, iconColor: iconColorProp, style, }: ChoiceProps): import("react").JSX.Element;
8
+ //# sourceMappingURL=Choice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Choice.d.ts","sourceRoot":"","sources":["../../../src/components/Choice/Choice.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAgB,EAChB,QAA2B,EAC3B,MAAa,EACb,eAAe,EAAE,mBAAmB,EACpC,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,oBAAoB,EACtC,SAAS,EAAE,aAAa,EACxB,KAAK,GACN,EAAE,WAAW,+BAwDb"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Choice = Choice;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_1 = require("react-native");
6
+ const buttonAppearance_1 = require("../Button/buttonAppearance");
7
+ const buttonRadius_1 = require("../Button/buttonRadius");
8
+ const useResolvedFieldColor_1 = require("../Field/useResolvedFieldColor");
9
+ const choiceLayout_1 = require("./choiceLayout");
10
+ const choiceThemeRoles_1 = require("./choiceThemeRoles");
11
+ /**
12
+ * One option in a list of next steps: an icon, a title and an optional
13
+ * description, in a filled row. Tapping it acts straight away, usually to
14
+ * open the next screen. For picking a value, use RadioField or Select.
15
+ */
16
+ function Choice({ title, description, icon, onPress, disabled = false, iconSize = choiceLayout_1.CHOICE_ICON_SIZE, radius = "xl", backgroundColor: backgroundColorProp, titleColor: titleColorProp, descriptionColor: descriptionColorProp, iconColor: iconColorProp, style, }) {
17
+ const backgroundColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(backgroundColorProp, choiceThemeRoles_1.CHOICE_THEME_ROLES.backgroundColor);
18
+ const titleColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(titleColorProp, choiceThemeRoles_1.CHOICE_THEME_ROLES.titleColor);
19
+ const descriptionColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(descriptionColorProp, choiceThemeRoles_1.CHOICE_THEME_ROLES.descriptionColor);
20
+ const iconColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(iconColorProp, choiceThemeRoles_1.CHOICE_THEME_ROLES.iconColor);
21
+ const slot = (0, choiceLayout_1.choiceIconSlot)(iconSize);
22
+ return (
23
+ // No explicit label: the row groups its text, so VoiceOver reads the
24
+ // title and description together ("Running, Outdoors, with GPS, button").
25
+ (0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { accessibilityRole: "button", accessibilityState: { disabled }, disabled: disabled, onPress: onPress, style: ({ pressed }) => [
26
+ styles.row,
27
+ {
28
+ backgroundColor,
29
+ borderRadius: (0, buttonRadius_1.buttonRadiusValue)(radius),
30
+ opacity: (0, buttonAppearance_1.buttonOpacity)({ disabled, loading: false, pressed }),
31
+ },
32
+ style,
33
+ ], children: [icon ? ((0, jsx_runtime_1.jsx)(react_native_1.View, { importantForAccessibility: "no-hide-descendants", accessibilityElementsHidden: true, style: [styles.icon, { width: slot, height: slot }], children: icon({ color: iconColor, size: iconSize }) })) : null, (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.copy, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.title, { color: titleColor }], children: title }), description ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.description, { color: descriptionColor }], children: description })) : null] })] }));
34
+ }
35
+ const styles = react_native_1.StyleSheet.create({
36
+ row: {
37
+ alignItems: "center",
38
+ flexDirection: "row",
39
+ gap: 12,
40
+ minHeight: 72,
41
+ paddingHorizontal: 16,
42
+ paddingVertical: 14,
43
+ },
44
+ icon: {
45
+ alignItems: "center",
46
+ justifyContent: "center",
47
+ },
48
+ copy: {
49
+ flex: 1,
50
+ gap: 2,
51
+ },
52
+ title: {
53
+ fontSize: 17,
54
+ fontWeight: "600",
55
+ },
56
+ description: {
57
+ fontSize: 13,
58
+ },
59
+ });
60
+ //# sourceMappingURL=Choice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Choice.js","sourceRoot":"","sources":["../../../src/components/Choice/Choice.tsx"],"names":[],"mappings":";;AAaA,wBAqEC;;AAlFD,+CAAiE;AACjE,iEAA2D;AAC3D,yDAA2D;AAC3D,0EAAuE;AACvE,iDAAkE;AAClE,yDAAwD;AAGxD;;;;GAIG;AACH,SAAgB,MAAM,CAAC,EACrB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,+BAAgB,EAC3B,MAAM,GAAG,IAAI,EACb,eAAe,EAAE,mBAAmB,EACpC,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,oBAAoB,EACtC,SAAS,EAAE,aAAa,EACxB,KAAK,GACO;IACZ,MAAM,eAAe,GAAG,IAAA,6CAAqB,EAC3C,mBAAmB,EACnB,qCAAkB,CAAC,eAAe,CACnC,CAAC;IACF,MAAM,UAAU,GAAG,IAAA,6CAAqB,EACtC,cAAc,EACd,qCAAkB,CAAC,UAAU,CAC9B,CAAC;IACF,MAAM,gBAAgB,GAAG,IAAA,6CAAqB,EAC5C,oBAAoB,EACpB,qCAAkB,CAAC,gBAAgB,CACpC,CAAC;IACF,MAAM,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WAAW,GACP,CACR,CAAC,CAAC,CAAC,IAAI,IACH,IACG,CACb,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE;QACH,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,EAAE;QACP,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;KACpB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,CAAC;KACP;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Default icon box, sized for an SF Symbol next to a two-line label. */
2
+ export declare const CHOICE_ICON_SIZE = 28;
3
+ /** Icon column width, so titles line up across a list of choices. */
4
+ export declare const CHOICE_ICON_SLOT = 32;
5
+ /** The icon column: the steady slot, or the icon itself when it is larger. Pure so it can be unit-tested. */
6
+ export declare function choiceIconSlot(iconSize: number): number;
7
+ //# sourceMappingURL=choiceLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choiceLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Choice/choiceLayout.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,6GAA6G;AAC7G,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEvD"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CHOICE_ICON_SLOT = exports.CHOICE_ICON_SIZE = void 0;
4
+ exports.choiceIconSlot = choiceIconSlot;
5
+ /** Default icon box, sized for an SF Symbol next to a two-line label. */
6
+ exports.CHOICE_ICON_SIZE = 28;
7
+ /** Icon column width, so titles line up across a list of choices. */
8
+ exports.CHOICE_ICON_SLOT = 32;
9
+ /** The icon column: the steady slot, or the icon itself when it is larger. Pure so it can be unit-tested. */
10
+ function choiceIconSlot(iconSize) {
11
+ return Math.max(exports.CHOICE_ICON_SLOT, iconSize);
12
+ }
13
+ //# sourceMappingURL=choiceLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choiceLayout.js","sourceRoot":"","sources":["../../../src/components/Choice/choiceLayout.ts"],"names":[],"mappings":";;;AAMA,wCAEC;AARD,yEAAyE;AAC5D,QAAA,gBAAgB,GAAG,EAAE,CAAC;AACnC,qEAAqE;AACxD,QAAA,gBAAgB,GAAG,EAAE,CAAC;AAEnC,6GAA6G;AAC7G,SAAgB,cAAc,CAAC,QAAgB;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,wBAAgB,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const CHOICE_THEME_ROLES: {
2
+ readonly backgroundColor: "choiceBackground";
3
+ readonly titleColor: "choiceTitle";
4
+ readonly descriptionColor: "choiceDescription";
5
+ readonly iconColor: "choiceIcon";
6
+ };
7
+ export type ChoiceThemeColorProp = keyof typeof CHOICE_THEME_ROLES;
8
+ //# sourceMappingURL=choiceThemeRoles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choiceThemeRoles.d.ts","sourceRoot":"","sources":["../../../src/components/Choice/choiceThemeRoles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CHOICE_THEME_ROLES = void 0;
4
+ exports.CHOICE_THEME_ROLES = {
5
+ backgroundColor: "choiceBackground",
6
+ titleColor: "choiceTitle",
7
+ descriptionColor: "choiceDescription",
8
+ iconColor: "choiceIcon",
9
+ };
10
+ //# sourceMappingURL=choiceThemeRoles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choiceThemeRoles.js","sourceRoot":"","sources":["../../../src/components/Choice/choiceThemeRoles.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,eAAe,EAAE,kBAAkB;IACnC,UAAU,EAAE,aAAa;IACzB,gBAAgB,EAAE,mBAAmB;IACrC,SAAS,EAAE,YAAY;CACf,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { Choice } from "./Choice";
2
+ export { CHOICE_ICON_SIZE } from "./choiceLayout";
3
+ export { CHOICE_THEME_ROLES, type ChoiceThemeColorProp } from "./choiceThemeRoles";
4
+ export type { ChoiceProps } from "./types";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Choice/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACnF,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CHOICE_THEME_ROLES = exports.CHOICE_ICON_SIZE = exports.Choice = void 0;
4
+ var Choice_1 = require("./Choice");
5
+ Object.defineProperty(exports, "Choice", { enumerable: true, get: function () { return Choice_1.Choice; } });
6
+ var choiceLayout_1 = require("./choiceLayout");
7
+ Object.defineProperty(exports, "CHOICE_ICON_SIZE", { enumerable: true, get: function () { return choiceLayout_1.CHOICE_ICON_SIZE; } });
8
+ var choiceThemeRoles_1 = require("./choiceThemeRoles");
9
+ Object.defineProperty(exports, "CHOICE_THEME_ROLES", { enumerable: true, get: function () { return choiceThemeRoles_1.CHOICE_THEME_ROLES; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Choice/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,+CAAkD;AAAzC,gHAAA,gBAAgB,OAAA;AACzB,uDAAmF;AAA1E,sHAAA,kBAAkB,OAAA"}
@@ -0,0 +1,26 @@
1
+ import type { StyleProp, ViewStyle } from "react-native";
2
+ import type { ButtonIcon } from "../Button";
3
+ import type { ButtonRadius } from "../Button/buttonRadius";
4
+ export type ChoiceProps = {
5
+ title: string;
6
+ /** Second line under the title. */
7
+ description?: string;
8
+ /** `({ color, size }) => ReactNode`, e.g. an expo-symbols `SymbolView`. */
9
+ icon?: ButtonIcon;
10
+ onPress: () => void;
11
+ disabled?: boolean;
12
+ /** Icon box. Default 28. */
13
+ iconSize?: number;
14
+ /** Default `"xl"` (12), the same scale as `Button`. */
15
+ radius?: ButtonRadius;
16
+ /** Row fill. Defaults to theme role `choiceBackground`. */
17
+ backgroundColor?: string;
18
+ /** Defaults to theme role `choiceTitle`. */
19
+ titleColor?: string;
20
+ /** Defaults to theme role `choiceDescription`. */
21
+ descriptionColor?: string;
22
+ /** Defaults to theme role `choiceIcon`. */
23
+ iconColor?: string;
24
+ style?: StyleProp<ViewStyle>;
25
+ };
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Choice/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Choice/types.ts"],"names":[],"mappings":""}
@@ -4,5 +4,5 @@ import type { ErrorBannerProps } from "./types";
4
4
  * exit animation can play. It is not tied to a form shell: pass `errors`,
5
5
  * `onJump`, and `onDismiss`. `Form` does that by default.
6
6
  */
7
- export declare function ErrorBanner({ open, errors, onJump, onDismiss, onHeightChange, safeAreaTop, paddingHorizontal, backgroundColor: backgroundColorProp, textColor: textColorProp, secondaryColor: secondaryColorProp, dividerColor: dividerColorProp, accentColor: accentColorProp, }: ErrorBannerProps): import("react").JSX.Element;
7
+ export declare function ErrorBanner({ open, errors, onJump, onDismiss, onHeightChange, safeAreaTop, paddingHorizontal: paddingHorizontalProp, backgroundColor: backgroundColorProp, textColor: textColorProp, secondaryColor: secondaryColorProp, dividerColor: dividerColorProp, accentColor: accentColorProp, }: ErrorBannerProps): import("react").JSX.Element;
8
8
  //# sourceMappingURL=ErrorBanner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBanner.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorBanner/ErrorBanner.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIhD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAM,EACN,MAAM,EACN,SAAS,EACT,cAAc,EACd,WAAW,EACX,iBAA2C,EAC3C,eAAe,EAAE,mBAAmB,EACpC,SAAS,EAAE,aAAa,EACxB,cAAc,EAAE,kBAAkB,EAClC,YAAY,EAAE,gBAAgB,EAC9B,WAAW,EAAE,eAAe,GAC7B,EAAE,gBAAgB,+BAuIlB"}
1
+ {"version":3,"file":"ErrorBanner.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorBanner/ErrorBanner.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIhD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAM,EACN,MAAM,EACN,SAAS,EACT,cAAc,EACd,WAAW,EACX,iBAAiB,EAAE,qBAAqB,EACxC,eAAe,EAAE,mBAAmB,EACpC,SAAS,EAAE,aAAa,EACxB,cAAc,EAAE,kBAAkB,EAClC,YAAY,EAAE,gBAAgB,EAC9B,WAAW,EAAE,eAAe,GAC7B,EAAE,gBAAgB,+BAwIlB"}