@hzblj/kara-components 0.9.0 → 0.11.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 (281) hide show
  1. package/CHANGELOG.md +72 -28
  2. package/README.md +8 -8
  3. package/lib/module/atoms/activity-indicator/activity-indicator.android.js +6 -1
  4. package/lib/module/atoms/activity-indicator/activity-indicator.android.js.map +1 -1
  5. package/lib/module/atoms/activity-indicator/activity-indicator.ios.js +2 -0
  6. package/lib/module/atoms/activity-indicator/activity-indicator.ios.js.map +1 -1
  7. package/lib/module/atoms/avatar/avatar.js +5 -0
  8. package/lib/module/atoms/avatar/avatar.js.map +1 -1
  9. package/lib/module/atoms/button/button-tokens.js +2 -2
  10. package/lib/module/atoms/button/button-tokens.js.map +1 -1
  11. package/lib/module/atoms/button/button.android.js +6 -2
  12. package/lib/module/atoms/button/button.android.js.map +1 -1
  13. package/lib/module/atoms/button/button.ios.js +7 -2
  14. package/lib/module/atoms/button/button.ios.js.map +1 -1
  15. package/lib/module/atoms/card/card.android.js +5 -3
  16. package/lib/module/atoms/card/card.android.js.map +1 -1
  17. package/lib/module/atoms/card/card.ios.js +7 -3
  18. package/lib/module/atoms/card/card.ios.js.map +1 -1
  19. package/lib/module/atoms/checkbox/checkbox.android.js +1 -1
  20. package/lib/module/atoms/checkbox/checkbox.android.js.map +1 -1
  21. package/lib/module/atoms/color-picker/color-picker.android.js +32 -5
  22. package/lib/module/atoms/color-picker/color-picker.android.js.map +1 -1
  23. package/lib/module/atoms/fab/fab.android.js +9 -1
  24. package/lib/module/atoms/fab/fab.android.js.map +1 -1
  25. package/lib/module/atoms/fab/fab.ios.js +9 -3
  26. package/lib/module/atoms/fab/fab.ios.js.map +1 -1
  27. package/lib/module/atoms/glass-view/glass-view.android.js +1 -1
  28. package/lib/module/atoms/glass-view/glass-view.android.js.map +1 -1
  29. package/lib/module/atoms/h-stack/h-stack.ios.js +5 -3
  30. package/lib/module/atoms/h-stack/h-stack.ios.js.map +1 -1
  31. package/lib/module/atoms/icon-button/icon-button.android.js +9 -0
  32. package/lib/module/atoms/icon-button/icon-button.android.js.map +1 -1
  33. package/lib/module/atoms/icon-button/icon-button.ios.js +26 -6
  34. package/lib/module/atoms/icon-button/icon-button.ios.js.map +1 -1
  35. package/lib/module/atoms/image/image.js +4 -4
  36. package/lib/module/atoms/image/image.js.map +1 -1
  37. package/lib/module/atoms/pressable/pressable.js +52 -28
  38. package/lib/module/atoms/pressable/pressable.js.map +1 -1
  39. package/lib/module/atoms/progress/progress.android.js +7 -0
  40. package/lib/module/atoms/progress/progress.android.js.map +1 -1
  41. package/lib/module/atoms/progress/progress.ios.js +6 -1
  42. package/lib/module/atoms/progress/progress.ios.js.map +1 -1
  43. package/lib/module/atoms/segmented-control/segmented-control.android.js +1 -1
  44. package/lib/module/atoms/segmented-control/segmented-control.android.js.map +1 -1
  45. package/lib/module/atoms/segmented-control/segmented-control.ios.js +1 -1
  46. package/lib/module/atoms/segmented-control/segmented-control.ios.js.map +1 -1
  47. package/lib/module/atoms/skeleton/skeleton.js +20 -6
  48. package/lib/module/atoms/skeleton/skeleton.js.map +1 -1
  49. package/lib/module/atoms/surface/surface.android.js +5 -3
  50. package/lib/module/atoms/surface/surface.android.js.map +1 -1
  51. package/lib/module/atoms/surface/surface.ios.js +7 -3
  52. package/lib/module/atoms/surface/surface.ios.js.map +1 -1
  53. package/lib/module/atoms/switch/switch.android.js +1 -1
  54. package/lib/module/atoms/switch/switch.android.js.map +1 -1
  55. package/lib/module/atoms/text/text.android.js +5 -3
  56. package/lib/module/atoms/text/text.android.js.map +1 -1
  57. package/lib/module/atoms/text/text.ios.js +6 -4
  58. package/lib/module/atoms/text/text.ios.js.map +1 -1
  59. package/lib/module/atoms/v-stack/v-stack.ios.js +5 -3
  60. package/lib/module/atoms/v-stack/v-stack.ios.js.map +1 -1
  61. package/lib/module/atoms/z-stack/z-stack.ios.js +5 -3
  62. package/lib/module/atoms/z-stack/z-stack.ios.js.map +1 -1
  63. package/lib/module/glyph/glyph.android.js +2 -0
  64. package/lib/module/glyph/glyph.android.js.map +1 -1
  65. package/lib/module/glyph/glyph.ios.js +5 -2
  66. package/lib/module/glyph/glyph.ios.js.map +1 -1
  67. package/lib/module/molecules/collapsible/collapsible.android.js +18 -8
  68. package/lib/module/molecules/collapsible/collapsible.android.js.map +1 -1
  69. package/lib/module/molecules/labeled-content/labeled-content.js +4 -1
  70. package/lib/module/molecules/labeled-content/labeled-content.js.map +1 -1
  71. package/lib/module/molecules/link/link.js +4 -1
  72. package/lib/module/molecules/link/link.js.map +1 -1
  73. package/lib/module/molecules/list-item/list-item.js +4 -1
  74. package/lib/module/molecules/list-item/list-item.js.map +1 -1
  75. package/lib/module/molecules/navigation-bar/navigation-bar.android.js +1 -1
  76. package/lib/module/molecules/navigation-bar/navigation-bar.android.js.map +1 -1
  77. package/lib/module/molecules/navigation-bar/navigation-bar.ios.js +1 -1
  78. package/lib/module/molecules/navigation-bar/navigation-bar.ios.js.map +1 -1
  79. package/lib/module/molecules/rn-list-item/rn-list-item.js +10 -2
  80. package/lib/module/molecules/rn-list-item/rn-list-item.js.map +1 -1
  81. package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js +3 -4
  82. package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js.map +1 -1
  83. package/lib/module/molecules/stepper/stepper.ios.js +6 -2
  84. package/lib/module/molecules/stepper/stepper.ios.js.map +1 -1
  85. package/lib/module/motion.js +19 -0
  86. package/lib/module/motion.js.map +1 -0
  87. package/lib/module/organisms/fab-menu/fab-menu.android.js +8 -5
  88. package/lib/module/organisms/fab-menu/fab-menu.android.js.map +1 -1
  89. package/lib/module/organisms/fab-menu/fab-menu.ios.js +5 -2
  90. package/lib/module/organisms/fab-menu/fab-menu.ios.js.map +1 -1
  91. package/lib/module/organisms/snackbar/snackbar.js +142 -17
  92. package/lib/module/organisms/snackbar/snackbar.js.map +1 -1
  93. package/lib/module/organisms/swipe-actions/swipe-actions.android.js +1 -1
  94. package/lib/module/organisms/swipe-actions/swipe-actions.android.js.map +1 -1
  95. package/lib/module/use-stack-modifiers.js +10 -8
  96. package/lib/module/use-stack-modifiers.js.map +1 -1
  97. package/lib/typescript/atoms/activity-indicator/activity-indicator.types.d.ts +3 -1
  98. package/lib/typescript/atoms/avatar/avatar.types.d.ts +7 -2
  99. package/lib/typescript/atoms/badge/badge.types.d.ts +1 -1
  100. package/lib/typescript/atoms/blur-view/blur-view.types.d.ts +6 -6
  101. package/lib/typescript/atoms/button/button-tokens.d.ts +1 -1
  102. package/lib/typescript/atoms/button/button.types.d.ts +9 -7
  103. package/lib/typescript/atoms/card/card.types.d.ts +3 -3
  104. package/lib/typescript/atoms/checkbox/checkbox.types.d.ts +2 -2
  105. package/lib/typescript/atoms/chip/chip.types.d.ts +1 -1
  106. package/lib/typescript/atoms/color-picker/color-picker.types.d.ts +4 -3
  107. package/lib/typescript/atoms/date-picker/date-picker.types.d.ts +4 -4
  108. package/lib/typescript/atoms/divider/divider.types.d.ts +2 -2
  109. package/lib/typescript/atoms/fab/fab.types.d.ts +10 -3
  110. package/lib/typescript/atoms/glass-view/glass-view.types.d.ts +5 -5
  111. package/lib/typescript/atoms/h-stack/h-stack.types.d.ts +8 -5
  112. package/lib/typescript/atoms/icon/icon.types.d.ts +4 -4
  113. package/lib/typescript/atoms/icon-button/icon-button.types.d.ts +14 -3
  114. package/lib/typescript/atoms/image/image.d.ts +2 -2
  115. package/lib/typescript/atoms/island/island.types.d.ts +4 -4
  116. package/lib/typescript/atoms/list/list.types.d.ts +5 -5
  117. package/lib/typescript/atoms/picker/picker.types.d.ts +1 -1
  118. package/lib/typescript/atoms/pressable/pressable.types.d.ts +23 -7
  119. package/lib/typescript/atoms/progress/progress.types.d.ts +3 -1
  120. package/lib/typescript/atoms/rn-flat-list/rn-flat-list.types.d.ts +2 -2
  121. package/lib/typescript/atoms/rn-icon/rn-icon.types.d.ts +1 -1
  122. package/lib/typescript/atoms/rn-scroll-view/rn-scroll-view.types.d.ts +2 -2
  123. package/lib/typescript/atoms/rn-section-list/rn-section-list.types.d.ts +2 -2
  124. package/lib/typescript/atoms/rn-text/rn-text.types.d.ts +2 -2
  125. package/lib/typescript/atoms/rn-view/rn-view.types.d.ts +3 -3
  126. package/lib/typescript/atoms/scroll-view/scroll-view.types.d.ts +3 -3
  127. package/lib/typescript/atoms/segmented-control/segmented-control.types.d.ts +3 -3
  128. package/lib/typescript/atoms/skeleton/skeleton.types.d.ts +2 -1
  129. package/lib/typescript/atoms/spacer/spacer.types.d.ts +1 -1
  130. package/lib/typescript/atoms/surface/surface.types.d.ts +3 -3
  131. package/lib/typescript/atoms/switch/switch.types.d.ts +1 -1
  132. package/lib/typescript/atoms/text/text.types.d.ts +3 -3
  133. package/lib/typescript/atoms/text-field/text-field.types.d.ts +4 -4
  134. package/lib/typescript/atoms/v-stack/v-stack.types.d.ts +4 -4
  135. package/lib/typescript/atoms/z-stack/z-stack.types.d.ts +4 -4
  136. package/lib/typescript/glyph/glyph-button.types.d.ts +1 -1
  137. package/lib/typescript/glyph/glyph.types.d.ts +3 -1
  138. package/lib/typescript/molecules/collapsible/collapsible.types.d.ts +1 -1
  139. package/lib/typescript/molecules/empty-state/empty-state.types.d.ts +1 -1
  140. package/lib/typescript/molecules/label/label.types.d.ts +1 -1
  141. package/lib/typescript/molecules/labeled-content/labeled-content.types.d.ts +6 -4
  142. package/lib/typescript/molecules/link/link.types.d.ts +2 -1
  143. package/lib/typescript/molecules/list-item/list-item.types.d.ts +6 -4
  144. package/lib/typescript/molecules/navigation-bar/navigation-bar.types.d.ts +8 -8
  145. package/lib/typescript/molecules/pager/pager.types.d.ts +2 -2
  146. package/lib/typescript/molecules/radio-group/radio-group.types.d.ts +2 -2
  147. package/lib/typescript/molecules/rn-list-item/rn-list-item.types.d.ts +1 -1
  148. package/lib/typescript/molecules/rn-tooltip/rn-tooltip.types.d.ts +7 -7
  149. package/lib/typescript/molecules/scroll-edge-container/scroll-edge-container.types.d.ts +3 -3
  150. package/lib/typescript/molecules/search-bar/search-bar.types.d.ts +2 -2
  151. package/lib/typescript/molecules/stepper/stepper.ios.d.ts +1 -1
  152. package/lib/typescript/molecules/stepper/stepper.types.d.ts +2 -2
  153. package/lib/typescript/molecules/tooltip/tooltip.types.d.ts +6 -6
  154. package/lib/typescript/motion.d.ts +8 -0
  155. package/lib/typescript/organisms/action-sheet/action-sheet.types.d.ts +3 -3
  156. package/lib/typescript/organisms/alert/alert.types.d.ts +3 -3
  157. package/lib/typescript/organisms/context-menu/context-menu.types.d.ts +9 -9
  158. package/lib/typescript/organisms/fab-menu/fab-menu.types.d.ts +10 -5
  159. package/lib/typescript/organisms/form/form.types.d.ts +1 -1
  160. package/lib/typescript/organisms/menu/menu.types.d.ts +2 -2
  161. package/lib/typescript/organisms/sheet/sheet.types.d.ts +12 -12
  162. package/lib/typescript/organisms/snackbar/snackbar.types.d.ts +39 -6
  163. package/lib/typescript/organisms/swipe-actions/swipe-actions.types.d.ts +5 -5
  164. package/lib/typescript/templates/screen/screen.types.d.ts +2 -2
  165. package/lib/typescript/use-stack-modifiers.d.ts +6 -5
  166. package/package.json +4 -4
  167. package/src/atoms/activity-indicator/activity-indicator.android.tsx +7 -1
  168. package/src/atoms/activity-indicator/activity-indicator.ios.tsx +9 -1
  169. package/src/atoms/activity-indicator/activity-indicator.types.ts +3 -1
  170. package/src/atoms/avatar/avatar.tsx +5 -1
  171. package/src/atoms/avatar/avatar.types.ts +7 -2
  172. package/src/atoms/badge/badge.types.ts +1 -1
  173. package/src/atoms/blur-view/blur-view.types.ts +6 -6
  174. package/src/atoms/button/button-tokens.ts +2 -2
  175. package/src/atoms/button/button.android.tsx +5 -3
  176. package/src/atoms/button/button.ios.tsx +10 -2
  177. package/src/atoms/button/button.types.ts +9 -7
  178. package/src/atoms/card/card.android.tsx +6 -4
  179. package/src/atoms/card/card.ios.tsx +7 -3
  180. package/src/atoms/card/card.types.ts +9 -8
  181. package/src/atoms/checkbox/checkbox.android.tsx +1 -1
  182. package/src/atoms/checkbox/checkbox.types.ts +2 -2
  183. package/src/atoms/chip/chip.types.ts +1 -1
  184. package/src/atoms/color-picker/color-picker.android.tsx +26 -6
  185. package/src/atoms/color-picker/color-picker.types.ts +4 -3
  186. package/src/atoms/date-picker/date-picker.types.ts +4 -4
  187. package/src/atoms/divider/divider.types.ts +2 -2
  188. package/src/atoms/fab/fab.android.tsx +5 -3
  189. package/src/atoms/fab/fab.ios.tsx +8 -4
  190. package/src/atoms/fab/fab.types.ts +10 -3
  191. package/src/atoms/glass-view/glass-view.android.tsx +1 -1
  192. package/src/atoms/glass-view/glass-view.types.ts +5 -5
  193. package/src/atoms/h-stack/h-stack.ios.tsx +6 -4
  194. package/src/atoms/h-stack/h-stack.types.ts +18 -14
  195. package/src/atoms/icon/icon.types.ts +4 -4
  196. package/src/atoms/icon-button/icon-button.android.tsx +16 -3
  197. package/src/atoms/icon-button/icon-button.ios.tsx +24 -5
  198. package/src/atoms/icon-button/icon-button.types.ts +14 -3
  199. package/src/atoms/image/image.tsx +3 -3
  200. package/src/atoms/island/island.types.ts +4 -4
  201. package/src/atoms/list/list.types.ts +5 -5
  202. package/src/atoms/picker/picker.types.ts +1 -1
  203. package/src/atoms/pressable/pressable.tsx +50 -21
  204. package/src/atoms/pressable/pressable.types.ts +35 -17
  205. package/src/atoms/progress/progress.android.tsx +5 -3
  206. package/src/atoms/progress/progress.ios.tsx +5 -2
  207. package/src/atoms/progress/progress.types.ts +3 -1
  208. package/src/atoms/rn-flat-list/rn-flat-list.types.ts +2 -2
  209. package/src/atoms/rn-icon/rn-icon.types.ts +1 -1
  210. package/src/atoms/rn-scroll-view/rn-scroll-view.types.ts +2 -2
  211. package/src/atoms/rn-section-list/rn-section-list.types.ts +2 -2
  212. package/src/atoms/rn-text/rn-text.types.ts +2 -2
  213. package/src/atoms/rn-view/rn-view.types.ts +3 -3
  214. package/src/atoms/scroll-view/scroll-view.types.ts +3 -3
  215. package/src/atoms/segmented-control/segmented-control.android.tsx +1 -1
  216. package/src/atoms/segmented-control/segmented-control.ios.tsx +1 -1
  217. package/src/atoms/segmented-control/segmented-control.types.ts +3 -3
  218. package/src/atoms/skeleton/skeleton.tsx +18 -4
  219. package/src/atoms/skeleton/skeleton.types.ts +2 -1
  220. package/src/atoms/spacer/spacer.types.ts +1 -1
  221. package/src/atoms/surface/surface.android.tsx +6 -4
  222. package/src/atoms/surface/surface.ios.tsx +7 -3
  223. package/src/atoms/surface/surface.types.ts +11 -10
  224. package/src/atoms/switch/switch.android.tsx +1 -1
  225. package/src/atoms/switch/switch.types.ts +1 -1
  226. package/src/atoms/text/text.android.tsx +6 -4
  227. package/src/atoms/text/text.ios.tsx +6 -4
  228. package/src/atoms/text/text.types.ts +24 -23
  229. package/src/atoms/text-field/text-field.types.ts +4 -4
  230. package/src/atoms/v-stack/v-stack.ios.tsx +6 -4
  231. package/src/atoms/v-stack/v-stack.types.ts +18 -17
  232. package/src/atoms/z-stack/z-stack.ios.tsx +6 -4
  233. package/src/atoms/z-stack/z-stack.types.ts +16 -15
  234. package/src/glyph/glyph-button.types.ts +1 -1
  235. package/src/glyph/glyph.android.tsx +14 -2
  236. package/src/glyph/glyph.ios.tsx +13 -3
  237. package/src/glyph/glyph.types.ts +3 -1
  238. package/src/molecules/collapsible/collapsible.android.tsx +27 -7
  239. package/src/molecules/collapsible/collapsible.types.ts +1 -1
  240. package/src/molecules/empty-state/empty-state.types.ts +1 -1
  241. package/src/molecules/label/label.types.ts +1 -1
  242. package/src/molecules/labeled-content/labeled-content.tsx +12 -1
  243. package/src/molecules/labeled-content/labeled-content.types.ts +6 -4
  244. package/src/molecules/link/link.tsx +2 -1
  245. package/src/molecules/link/link.types.ts +2 -1
  246. package/src/molecules/list-item/list-item.tsx +20 -2
  247. package/src/molecules/list-item/list-item.types.ts +6 -4
  248. package/src/molecules/navigation-bar/navigation-bar.android.tsx +1 -1
  249. package/src/molecules/navigation-bar/navigation-bar.ios.tsx +1 -1
  250. package/src/molecules/navigation-bar/navigation-bar.types.ts +8 -8
  251. package/src/molecules/pager/pager.types.ts +2 -2
  252. package/src/molecules/radio-group/radio-group.types.ts +2 -2
  253. package/src/molecules/rn-list-item/rn-list-item.tsx +18 -3
  254. package/src/molecules/rn-list-item/rn-list-item.types.ts +1 -1
  255. package/src/molecules/rn-tooltip/rn-tooltip.types.ts +7 -7
  256. package/src/molecules/scroll-edge-container/scroll-edge-container.android.tsx +3 -2
  257. package/src/molecules/scroll-edge-container/scroll-edge-container.types.ts +3 -3
  258. package/src/molecules/search-bar/search-bar.types.ts +2 -2
  259. package/src/molecules/stepper/stepper.ios.tsx +8 -2
  260. package/src/molecules/stepper/stepper.types.ts +2 -2
  261. package/src/molecules/tooltip/tooltip.types.ts +6 -6
  262. package/src/motion.ts +13 -0
  263. package/src/organisms/action-sheet/action-sheet.types.ts +3 -3
  264. package/src/organisms/alert/alert.types.ts +3 -3
  265. package/src/organisms/context-menu/context-menu.types.ts +9 -9
  266. package/src/organisms/fab-menu/fab-menu.android.tsx +9 -5
  267. package/src/organisms/fab-menu/fab-menu.ios.tsx +6 -2
  268. package/src/organisms/fab-menu/fab-menu.types.ts +10 -5
  269. package/src/organisms/form/form.types.ts +1 -1
  270. package/src/organisms/menu/menu.types.ts +2 -2
  271. package/src/organisms/sheet/sheet.types.ts +12 -12
  272. package/src/organisms/snackbar/snackbar.tsx +143 -19
  273. package/src/organisms/snackbar/snackbar.types.ts +42 -6
  274. package/src/organisms/swipe-actions/swipe-actions.android.tsx +1 -1
  275. package/src/organisms/swipe-actions/swipe-actions.types.ts +5 -5
  276. package/src/templates/screen/screen.types.ts +2 -2
  277. package/src/use-stack-modifiers.ts +20 -7
  278. package/lib/module/platform-support.js +0 -19
  279. package/lib/module/platform-support.js.map +0 -1
  280. package/lib/typescript/platform-support.d.ts +0 -8
  281. package/src/platform-support.ts +0 -20
package/CHANGELOG.md CHANGED
@@ -1,14 +1,58 @@
1
1
  # @hzblj/kara-components
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#25](https://github.com/hzblj/kara-ui/pull/25) [`6828522`](https://github.com/hzblj/kara-ui/commit/68285220a725ccfcd2c2bd9a4bcc7eb3a7f8a047) Thanks [@hzblj](https://github.com/hzblj)! - Accessibility props in the engine: `accessibilityLabel`, `accessibilityHint`, `accessibilityRole` (`button`, `header`, `image`, `link`, `text`), `accessibilityValue`, `accessibilityHidden` and `accessible`, one set for both platforms. `@hzblj/kara-sx` turns them into SwiftUI's accessibility modifiers on iOS and into Compose semantics on Android, through a new `karaAccessibility` modifier in `@hzblj/kara-native` (a native rebuild picks it up). The stacks, `Text`, `Card`, `Surface`, `ListItem`, `RnListItem`, `LabeledContent`, `Link` and `Pressable` take all of them; `Button` takes a hint, and `Avatar`, `Progress` and `ActivityIndicator` a label.
8
+
9
+ What the components do by themselves: a stack with `onPress` is read as one button, `Pressable` is a button, list rows and a `LabeledContent` with a value are read as one element, `Link` is a link, and `Skeleton` and an `Avatar` without a label are hidden. `IconButton`, `Fab` and `FabMenu` now require an `accessibilityLabel`, since an icon has nothing of its own for VoiceOver or TalkBack to say; `Snackbar`'s close button is labelled.
10
+
11
+ Reduce Motion: `useReducedMotion()` follows the device's Reduce Motion (iOS) or Remove animations (Android) setting live, and `KaraProvider reduceMotion` can force it (`always`) or ignore it (`never`). With motion reduced, `Pressable` dims instead of scaling, `Snackbar` only fades, `Skeleton` holds still, Android's `Collapsible` fades and snaps its chevron, and iOS's `Stepper` cross-fades its value.
12
+
13
+ - [#25](https://github.com/hzblj/kara-ui/pull/25) [`6828522`](https://github.com/hzblj/kara-ui/commit/68285220a725ccfcd2c2bd9a4bcc7eb3a7f8a047) Thanks [@hzblj](https://github.com/hzblj)! - Motion tokens on transitions.dev's scale, in place of the `d0` to `d10000` steps, of which six were ever used. Durations are named by what the motion does: `micro` (80 ms, what answers a touch), `quick` (150 ms, something leaving or swapped in place), `fast` (250 ms, something arriving), `medium` (350 ms, a larger surface leaving), `slow` (400 ms, a larger surface arriving), `verySlow` (500 ms, an emphasised moment), `stagger` (40 ms, the offset between items) and `none`. Pick a step by what the motion does, not by the number it had: as a rule of thumb, `d100` is `micro`, `d150` `quick`, `d200` `quick` or `fast`, `d250` and `d300` `fast`, `d400` `slow` and `d500` `verySlow`. `ZoomTransition`'s Android `duration` takes the same names and, unset, keeps Material's own 450 ms.
14
+
15
+ New `easing` tokens carry the curves as cubic-bézier points, ready for `Easing.bezier(...easing.smoothOut)`: `smoothOut` for arriving and leaving alike, `inOut` for a swap in place, `out` for a small fade, `linear` for what loops.
16
+
17
+ The components use them: `Pressable` eases its scale down in `quick` and back in `fast` with no bounce, and dims in `micro`; `Snackbar` arrives in `fast` and leaves in `quick` on `smoothOut`; `Image` fades in over `quick`.
18
+
19
+ `content.on.bg` is `content.on.accent`, which is what it sits on (Material's `onPrimary` under `dynamicColor`). The opacity and spacing scales keep their values and are documented now: the opacity ramp's tens and quarters, and spacing's 4 pt grid with half steps where small gaps need them.
20
+
21
+ - [#25](https://github.com/hzblj/kara-ui/pull/25) [`6828522`](https://github.com/hzblj/kara-ui/commit/68285220a725ccfcd2c2bd9a4bcc7eb3a7f8a047) Thanks [@hzblj](https://github.com/hzblj)! - `Snackbar` puts its action at the trailing end, as far in from the edge as the message is from the start, and takes Material's options: `duration` (`short`, `long`, `indefinite` or milliseconds, with `onDismiss` when it runs out), `dismissible` (a close button), `actionOnNewLine`, `position` (`bottom` or `top`) and `offset`. `animation` picks how it comes and goes (`scale`, Material's own, by default on Android; `slide` on iOS; `fade`), and `entering` and `exiting` take Reanimated animations of your own. It is announced to VoiceOver and TalkBack when it appears.
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [[`6828522`](https://github.com/hzblj/kara-ui/commit/68285220a725ccfcd2c2bd9a4bcc7eb3a7f8a047), [`6828522`](https://github.com/hzblj/kara-ui/commit/68285220a725ccfcd2c2bd9a4bcc7eb3a7f8a047)]:
26
+ - @hzblj/kara-sx@0.11.0
27
+ - @hzblj/kara-native@0.11.0
28
+ - @hzblj/kara-theme@0.11.0
29
+
30
+ ## 0.10.0
31
+
32
+ ### Minor Changes
33
+
34
+ - [#23](https://github.com/hzblj/kara-ui/pull/23) [`26f1651`](https://github.com/hzblj/kara-ui/commit/26f1651b6a8be9fc2d7af6bbe29bd2335605a717) Thanks [@hzblj](https://github.com/hzblj)! - `ColorPicker` works on Android. Compose ships no colour picker, so kara draws its own in the iOS picker's shape: a well with a rainbow ring beside the label, and a Material bottom sheet with a grid of swatches, a spectrum and RGB sliders, an opacity slider with `supportsOpacity`, and the colour with its hex at the foot. It reports every change through `onValueChange`, as `#RRGGBB` or, with opacity, `#RRGGBBAA`. It needs no extra dependency.
35
+
36
+ `Pressable` takes a `pressEffect`: `scale` springs the content down to `pressedScale` (0.96), `opacity` dims it to `pressedOpacity` (`o60`), `none` holds it still. Each platform keeps its own by default, a spring on iOS and the ripple on Android, and Android keeps the ripple on top of any effect unless `ripple` is off.
37
+
38
+ `IconButton` on iOS sits in a 44pt tap target with the icon centred, as Android's sits in Material's 48dp, so a row of them spaces itself the same way on both. A disabled one is dimmed once, by SwiftUI, instead of twice.
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [[`26f1651`](https://github.com/hzblj/kara-ui/commit/26f1651b6a8be9fc2d7af6bbe29bd2335605a717), [`26f1651`](https://github.com/hzblj/kara-ui/commit/26f1651b6a8be9fc2d7af6bbe29bd2335605a717)]:
43
+ - @hzblj/kara-native@0.10.0
44
+ - @hzblj/kara-theme@0.10.0
45
+ - @hzblj/kara-sx@0.10.0
46
+
3
47
  ## 0.9.0
4
48
 
5
49
  ### Minor Changes
6
50
 
7
- - [#21](https://github.com/hzblj/kara-ui/pull/21) [`356c00f`](https://github.com/hzblj/kara-ui/commit/356c00f76eee8323c4eb65ed4cbcda121c3af627) Thanks [@hzblj](https://github.com/hzblj)! - `TextField`'s `error` takes a message: `error="A postcode has five digits."` shows it under the field — Material's supporting text beside its error icon on Android — so an error never rests on colour alone, which in dark mode Material draws a pale red. `error` alone still marks the field. kara's glyphs gain `error` for it.
51
+ - [#21](https://github.com/hzblj/kara-ui/pull/21) [`356c00f`](https://github.com/hzblj/kara-ui/commit/356c00f76eee8323c4eb65ed4cbcda121c3af627) Thanks [@hzblj](https://github.com/hzblj)! - `TextField`'s `error` takes a message: `error="A postcode has five digits."` shows it under the field (Material's supporting text beside its error icon on Android), so an error never rests on colour alone, which in dark mode Material draws a pale red. `error` alone still marks the field. kara's glyphs gain `error` for it.
8
52
 
9
53
  `Tabs` on iOS tint their icons: the selected one takes the accent and the rest the label colour. Expo Router tints an asset-catalog icon only when both states have an icon colour, so with the accent alone every icon kept its SVG's black, selected or not, in dark mode too.
10
54
 
11
- `Surface` on iOS sits on `surface.primary` unless told otherwise, as it does on Android; a plain one drew nothing behind its content. `Progress` with `circular` and a `value` is a ring that fills on iOS — a SwiftUI capacity `Gauge` — where a circular `ProgressView` ignored the value and spun.
55
+ `Surface` on iOS sits on `surface.primary` unless told otherwise, as it does on Android; a plain one drew nothing behind its content. `Progress` with `circular` and a `value` is a ring that fills on iOS (a SwiftUI capacity `Gauge`), where a circular `ProgressView` ignored the value and spun.
12
56
 
13
57
  ### Patch Changes
14
58
 
@@ -21,23 +65,23 @@
21
65
 
22
66
  ### Minor Changes
23
67
 
24
- - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - `ActivityIndicator` plays Material 3's expressive `LoadingIndicator` on Android — its shapes morph as it turns — in a host of its own, so it still renders anywhere; iOS keeps UIKit's spinner. It takes the design system's props now, not React Native's: `color` is a token (`fill.accent.primary` by default), `size` is `small` or `large`.
68
+ - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - `ActivityIndicator` plays Material 3's expressive `LoadingIndicator` on Android (its shapes morph as it turns), in a host of its own, so it still renders anywhere; iOS keeps UIKit's spinner. It takes the design system's props now, not React Native's: `color` is a token (`fill.accent.primary` by default), `size` is `small` or `large`.
25
69
 
26
70
  `Collapsible` on Android spans its parent, the chevron at the far end, and its row is never shorter than Material's 48dp touch target; the chevron sat right after the label. `Pager`'s dots on Android are centred under the pages.
27
71
 
28
72
  - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - Android gets glass and a scroll edge of its own.
29
73
 
30
- - `GlassView` is frosted glass on Android: what lies behind the capsule, blurred (Android 12+), under a translucent tonal surface — or its `tint` — and a light hairline, the blurred surfaces Android 16 gives its own system UI. It was an almost clear capsule that left its content unreadable over a photo. Below Android 12 the same colours are drawn near-opaque. kara-native's new `BackdropBlurView` (`/jetpack-compose`) does the blur — blurred, then saturated, as iOS lifts the colour under its materials: a plain view, no host, and an idle screen draws no frames.
31
- - `ScrollEdgeContainer` on Android behaves like a Material top app bar on scroll: the bars stay transparent at rest and fill with the scrolled container colour once content scrolls under the top one, the bottom one while there is more below. Its scroll view also takes the room between the bars now — it grew to its content's height, ran under the bottom bar and could not scroll.
32
- - New token `surface.secondary`: Material's `surfaceContainer` on Android, `tertiarySystemGroupedBackgroundColor` on iOS — a step above `surface.primary`.
74
+ - `GlassView` is frosted glass on Android: what lies behind the capsule, blurred (Android 12+), under a translucent tonal surface (or its `tint`) and a light hairline, the blurred surfaces Android 16 gives its own system UI. It was an almost clear capsule that left its content unreadable over a photo. Below Android 12 the same colours are drawn near-opaque. kara-native's new `BackdropBlurView` (`/jetpack-compose`) does the blur (blurred, then saturated, as iOS lifts the colour under its materials): a plain view, no host, and an idle screen draws no frames.
75
+ - `ScrollEdgeContainer` on Android behaves like a Material top app bar on scroll: the bars stay transparent at rest and fill with the scrolled container colour once content scrolls under the top one, the bottom one while there is more below. Its scroll view also takes the room between the bars now; before, it grew to its content's height, ran under the bottom bar and could not scroll.
76
+ - New token `surface.secondary`, a step above `surface.primary`: Material's `surfaceContainer` on Android, `tertiarySystemGroupedBackgroundColor` on iOS.
33
77
 
34
- - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - `Pressable` on Android presses the Material way: a ripple over the content — the pressed state layer — clipped to the pressable's shape, and nothing scales. iOS keeps its spring to 96%. Give the `Pressable` the `borderRadius` of what it wraps (`full` around a `GlassView`) and the ripple follows it.
78
+ - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - `Pressable` on Android presses the Material way: a ripple over the content (the pressed state layer), clipped to the pressable's shape, and nothing scales. iOS keeps its spring to 96%. Give the `Pressable` the `borderRadius` of what it wraps (`full` around a `GlassView`) and the ripple follows it.
35
79
 
36
80
  `Collapsible` on Android expands down from its row with a fade, and its chevron turns toward the content; it grew from a corner and the chevron jumped.
37
81
 
38
- - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - New `BlurView`: the system materials, by SwiftUI's names — `ultraThin`, `thin`, `regular`, `thick`, `ultraThick`.
82
+ - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - New `BlurView`: the system materials, by SwiftUI's names (`ultraThin`, `thin`, `regular`, `thick`, `ultraThick`).
39
83
 
40
- - iOS: UIKit's `system*Material` blur as a plain view — no SwiftUI host, cheap enough for a list cell — with `vibrancy` (`primary` to `quaternary`, `fill`, `separator`) to draw the content the way iOS draws its own on a material.
84
+ - iOS: UIKit's `system*Material` blur as a plain view (no SwiftUI host, cheap enough for a list cell), with `vibrancy` (`primary` to `quaternary`, `fill`, `separator`) to draw the content the way iOS draws its own on a material.
41
85
  - Android: what lies behind, blurred and saturated (Android 12+), under a Material tonal surface that rises from `surface` to `surfaceContainerHighest` as the material thickens; below Android 12 the surface alone.
42
86
  - `appearance` pins a material to light or dark whatever the app's; `borderRadius` shapes it and clips the content.
43
87
 
@@ -45,8 +89,8 @@
45
89
 
46
90
  - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - `sx` reaches the components that still took raw styles or none:
47
91
 
48
- - `Text` takes the native `sx` surface — padding, a background, a frame (`wide` puts the text on the side `align` names) and the `ios` bucket. `ios.contentTransition` with the new `ios.animation` rolls a number to its next value, and `ios.monospacedDigit` keeps it from shifting what follows. `Stepper` on iOS is built on it.
49
- - `RnText` takes `Box`'s `sx` props for its own box — margins, `flex`, padding — all but `align`, which still aligns its lines.
92
+ - `Text` takes the native `sx` surface: padding, a background, a frame (`wide` puts the text on the side `align` names) and the `ios` bucket. `ios.contentTransition` with the new `ios.animation` rolls a number to its next value, and `ios.monospacedDigit` keeps it from shifting what follows. `Stepper` on iOS is built on it.
93
+ - `RnText` takes `Box`'s `sx` props for its own box (margins, `flex`, padding), all but `align`, which still aligns its lines.
50
94
  - `Image` is `sx(expo-image)`, the way `Box` is `sx(View)`: `w`, `h`, `aspectRatio`, `borderRadius`, `position`… instead of a `style` object. Its props are exported as `ImageProps`.
51
95
  - `Island` takes the same `sx` props for where it sits in React Native layout: `<Island h={240} matchContents={false}>`. An explicit `style` still wins.
52
96
  - `Skeleton` is sized with the `sx` names, `h` and `w` (was `height` and `width`), and `w` takes a percentage: `<Skeleton h={12} w="60%" />` for a line that ends early.
@@ -63,7 +107,7 @@
63
107
 
64
108
  ### Minor Changes
65
109
 
66
- - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `SwipeActions` works on Android, and takes its buttons as data. **Breaking:** `SwipeActions.Actions` and its `Button` children are gone — pass `leading` and/or `trailing`, each a list of `{icon, label, onPress, destructive?, tint?}`, and `allowsFullSwipe` on the row:
110
+ - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `SwipeActions` works on Android, and takes its buttons as data. **Breaking:** `SwipeActions.Actions` and its `Button` children are gone. Pass `leading` and/or `trailing`, each a list of `{icon, label, onPress, destructive?, tint?}`, and `allowsFullSwipe` on the row:
67
111
 
68
112
  ```tsx
69
113
  <SwipeActions
@@ -75,33 +119,33 @@
75
119
  </SwipeActions>
76
120
  ```
77
121
 
78
- iOS renders SwiftUI's `swipeActions`, each action its icon on a button in its tint — round, with the label under it, on iOS 26. Android, where Compose has no swipe actions, gets kara's own `SwipeActionsBox` (`@hzblj/kara-native/jetpack-compose`): the row slides on an anchored drag, and filled icon buttons with their labels show in the strip it leaves. One row is open at a time on both, and a tap on an open row closes it.
122
+ iOS renders SwiftUI's `swipeActions`, each action its icon on a button in its tint (round, with the label under it, on iOS 26). Android, where Compose has no swipe actions, gets kara's own `SwipeActionsBox` (`@hzblj/kara-native/jetpack-compose`): the row slides on an anchored drag, and filled icon buttons with their labels show in the strip it leaves. One row is open at a time on both, and a tap on an open row closes it.
79
123
 
80
- - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - **Breaking:** `FlashList` is gone, and `@shopify/flash-list` is no longer a peer dependency. kara's list for React Native content is `RnFlatList` (and `RnSectionList`): React Native's own virtualized lists, whose cells stay in normal flow, so rows that host native views keep them in place — a recycling list moves its cells, which an `@expo/ui` host does not survive. An app that wants FlashList for plain data rows installs and imports it itself.
124
+ - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - **Breaking:** `FlashList` is gone, and `@shopify/flash-list` is no longer a peer dependency. kara's list for React Native content is `RnFlatList` (and `RnSectionList`): React Native's own virtualized lists, whose cells stay in normal flow, so rows that host native views keep them in place; a recycling list moves its cells, which an `@expo/ui` host does not survive. An app that wants FlashList for plain data rows installs and imports it itself.
81
125
 
82
- - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `Tooltip` is controlled on Android too: `visible` shows Material's plain tooltip, centred above the anchor and kept inside the window, and `onDismiss` reports a touch outside it or the anchor scrolling away. It used to open only on a long press and hide itself, ignoring both props — and Material's own placement let it run off the edge of the screen. Nothing opens it on a long press any more; wire one to `visible` if you want it.
126
+ - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `Tooltip` is controlled on Android too: `visible` shows Material's plain tooltip, centred above the anchor and kept inside the window, and `onDismiss` reports a touch outside it or the anchor scrolling away. It used to open only on a long press and hide itself, ignoring both props, and Material's own placement let it run off the edge of the screen. Nothing opens it on a long press any more; wire one to `visible` if you want it.
83
127
 
84
128
  `TooltipBox` (`@hzblj/kara-native/jetpack-compose`) takes `plain` for that style, and hides when `isPresented` turns false.
85
129
 
86
130
  ### Patch Changes
87
131
 
88
- - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `ActionSheet` on Android renders its rows in a host of its own — they were Compose views straight inside the sheet, which has none, and threw "must be rendered inside a Host". The rows are Material's bottom-sheet menu now: full width, with each action's `icon` before its label.
132
+ - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `ActionSheet` on Android renders its rows in a host of its own. They were Compose views straight inside the sheet, which has none, and threw "must be rendered inside a Host". The rows are Material's bottom-sheet menu now: full width, with each action's `icon` before its label.
89
133
 
90
134
  `SearchBar` on iOS centres its text beside the magnifier. The type scale's line height sat the text at the bottom of a taller line in a single-line `UITextField`.
91
135
 
92
136
  - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - Android layout fixes:
93
137
 
94
- - `Screen` keeps its content clear of the status bar when nothing sits above it, as a SwiftUI host keeps to the safe area — it drew under it. Under a navigation bar nothing changes; the background still runs to the edges.
95
- - `Form` is inset from its container on every side, with section titles and footers indented to the cards' content, like SwiftUI's grouped form — in a `Screen` its cards ran into the screen's edges.
138
+ - `Screen` keeps its content clear of the status bar when nothing sits above it, as a SwiftUI host keeps to the safe area; it used to draw under it. Under a navigation bar nothing changes; the background still runs to the edges.
139
+ - `Form` is inset from its container on every side, with section titles and footers indented to the cards' content, like SwiftUI's grouped form; in a `Screen` its cards used to run into the screen's edges.
96
140
  - A disabled or read-only `Checkbox` or `Switch` keeps Material's 48dp touch target, so it lines up with the enabled ones instead of shifting toward the edge.
97
141
 
98
- - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `DatePicker` on iOS sizes itself to its value. Its host took the width it was given and laid the compact field out against the far edge of it — past its container's, in a row. The calendar is in the accent now.
142
+ - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `DatePicker` on iOS sizes itself to its value. Its host took the width it was given and laid the compact field out against the far edge of it, past its container's, in a row. The calendar is in the accent now.
99
143
 
100
- - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `Alert` and `ActionSheet` appear on iOS. Both hung their SwiftUI presentation on an `EmptyView` — `@expo/ui` uses one when there is no trigger, and SwiftUI never presents from it — so `visible` changed nothing. Each now has a trigger that takes no room, and `ActionSheet` passes its buttons through the dialog's `Actions` slot.
144
+ - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `Alert` and `ActionSheet` appear on iOS. Both hung their SwiftUI presentation on an `EmptyView` (`@expo/ui` uses one when there is no trigger, and SwiftUI never presents from it), so `visible` changed nothing. Each now has a trigger that takes no room, and `ActionSheet` passes its buttons through the dialog's `Actions` slot.
101
145
 
102
146
  - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `RnFlatList` and `RnSectionList` keep rows that host native views on Android. React Native's Android default, `removeClippedSubviews`, detached a host measured at zero height before its first layout, and the row stayed empty; it is off unless you turn it on.
103
147
 
104
- - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `SegmentedControl` draws its selected segment in the accent on both platforms. iOS renders kara's own `UISegmentedControl` (`SegmentedControl` in `@hzblj/kara-native/swift-ui`), whose pill, labels and track take colours — the system control tints only the pill, SwiftUI's segmented picker not even that. Android colours Material's segmented buttons, equal widths. `onChange` now fires for a new segment only on Android too.
148
+ - [#12](https://github.com/hzblj/kara-ui/pull/12) [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490) Thanks [@hzblj](https://github.com/hzblj)! - `SegmentedControl` draws its selected segment in the accent on both platforms. iOS renders kara's own `UISegmentedControl` (`SegmentedControl` in `@hzblj/kara-native/swift-ui`), whose pill, labels and track take colours; the system control tints only the pill, SwiftUI's segmented picker not even that. Android colours Material's segmented buttons, equal widths. `onChange` now fires for a new segment only on Android too.
105
149
 
106
150
  - Updated dependencies [[`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490), [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490), [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490), [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490), [`2a6595f`](https://github.com/hzblj/kara-ui/commit/2a6595f79176a3450610d361a02001aac9530490)]:
107
151
  - @hzblj/kara-native@0.7.0
@@ -114,13 +158,13 @@
114
158
 
115
159
  - [#10](https://github.com/hzblj/kara-ui/pull/10) [`62b7131`](https://github.com/hzblj/kara-ui/commit/62b713143bd03872ecdd89ca8de42d98fe589617) Thanks [@hzblj](https://github.com/hzblj)! - Haptics: kara's own, native on both platforms, named for what happened.
116
160
 
117
- - `haptics.success()`, `haptics.selection()`, … — one function per haptic — and `haptics.play(name)` for a name that arrives as data. `selection`, `tick`, `toggleOn`/`toggleOff`, `success`/`warning`/`error`, `longPress`, `dragStart`, `thresholdActivate`/`thresholdDeactivate`, `keyPress`, and the impacts `soft`, `light`, `medium`, `rigid`, `heavy` (`intensity` scales them on iOS). Synchronous, nothing to await.
118
- - iOS: UIKit's feedback generators, kept alive and warmed up with `haptics.prepare` — `Pressable` prepares its haptic on press-in. Android: the system's own haptic feedback (`View.performHapticFeedback`), with Android 14's constants falling back to older ones — never a raw vibration. Both follow the user's system setting.
161
+ - One function per haptic (`haptics.success()`, `haptics.selection()`, …) and `haptics.play(name)` for a name that arrives as data. `selection`, `tick`, `toggleOn`/`toggleOff`, `success`/`warning`/`error`, `longPress`, `dragStart`, `thresholdActivate`/`thresholdDeactivate`, `keyPress`, and the impacts `soft`, `light`, `medium`, `rigid`, `heavy` (`intensity` scales them on iOS). Synchronous, nothing to await.
162
+ - iOS: UIKit's feedback generators, kept alive and warmed up with `haptics.prepare` (`Pressable` prepares its haptic on press-in). Android: the system's own haptic feedback (`View.performHapticFeedback`), with Android 14's constants falling back to older ones, never a raw vibration. Both follow the user's system setting.
119
163
  - `useHapticFeedback(trigger, haptic)` plays on every change of a value, never on mount; a function of the previous and next value picks a haptic per change.
120
164
  - `haptics.setEnabled(false)` silences every kara haptic, the components' own included.
121
165
  - `Pressable`'s `haptic` takes a name as well as `true` (a `light` impact); `Chip` plays `selection`.
122
166
  - On Android, where Compose's Material controls play nothing: `Switch` plays `toggleOn`/`toggleOff`, a stepped `Slider` ticks at every stop, `SegmentedControl` plays `selection`. iOS keeps its native controls' own feedback.
123
- - `Slider`: `step` is the increment on Android too — it was passed to Compose as the number of stops.
167
+ - `Slider`: `step` is the increment on Android too. It was passed to Compose as the number of stops.
124
168
  - `expo-haptics` is no longer a peer dependency.
125
169
 
126
170
  ### Patch Changes
@@ -181,7 +225,7 @@
181
225
 
182
226
  ### Minor Changes
183
227
 
184
- - [`f84ffd5`](https://github.com/hzblj/kara-ui/commit/f84ffd52954a5e7052541c8682787137de205a28) Thanks [@hzblj](https://github.com/hzblj)! - Native sheets with a native header. `Sheet` is now a TrueSheet (`@lodev09/react-native-true-sheet`, a new peer dependency) with `<Sheet.Header>` — a real navigation bar with a centred, leading or large title that hands over to the bar as it scrolls away, items on either side, and on iOS 26 the content scrolls under it with the soft edge effect — plus `<Sheet.ScrollView>`, `useSheetScroll`, detents, a footer and a ref (`present`/`dismiss`/`resize`). It is React Native tier now: no host, native atoms inside go in an `Island`. `fitToContents` is replaced by `detents` (`['auto']` by default).
228
+ - [`f84ffd5`](https://github.com/hzblj/kara-ui/commit/f84ffd52954a5e7052541c8682787137de205a28) Thanks [@hzblj](https://github.com/hzblj)! - Native sheets with a native header. `Sheet` is now a TrueSheet (`@lodev09/react-native-true-sheet`, a new peer dependency) with `<Sheet.Header>`, `<Sheet.ScrollView>`, `useSheetScroll`, detents, a footer and a ref (`present`/`dismiss`/`resize`). `<Sheet.Header>` is a real navigation bar with a centred, leading or large title that hands over to the bar as it scrolls away, items on either side, and on iOS 26 the content scrolls under it with the soft edge effect. It is React Native tier now: no host, native atoms inside go in an `Island`. `fitToContents` is replaced by `detents` (`['auto']` by default).
185
229
 
186
230
  `NavigationBar` takes `leadingItems` / `trailingItems` instead of `onBack` / `onClose`: `back`, `close` or an app `icon`, on either side and in any order; on iOS 26 neighbours share a glass capsule unless an item is `separated`. Also `titleAlignment`, `titleVisible`, `inverted` and an iOS `search` field. On Android it is now Material's native top app bar.
187
231
 
@@ -209,12 +253,12 @@
209
253
 
210
254
  - [`c30bef6`](https://github.com/hzblj/kara-ui/commit/c30bef6be2639deb6d385ad209d1a2799b5b656f) Thanks [@hzblj](https://github.com/hzblj)! - Icons are now fully native and the app's own: `plugins: [['@hzblj/kara-ui', {icons: {source: './assets/icons'}}]]` turns every SVG in the folder into an iOS asset-catalog template image and an Android vector drawable at prebuild (`x.ios.svg` / `x.android.svg` for per-platform glyphs), and writes `kara-icons.d.ts` so `name` only accepts icons that exist; `npx kara-icons` does the same for CI. `Icon` draws them in a host, the new `RnIcon` anywhere, and `Tabs` passes them as `xcasset` / `drawable`. The built-in SF Symbol / Material icon names and the `@expo/vector-icons` peer dependency are gone.
211
255
 
212
- - [`c30bef6`](https://github.com/hzblj/kara-ui/commit/c30bef6be2639deb6d385ad209d1a2799b5b656f) Thanks [@hzblj](https://github.com/hzblj)! - Leaner, reusable-only components. `Countdown` is gone, with its native views. There is one `ContextMenu` now — the native module's long-press menu on React Native content, with a custom preview on iOS (formerly `RnContextMenu`); the `@expo/ui`-based one is removed.
256
+ - [`c30bef6`](https://github.com/hzblj/kara-ui/commit/c30bef6be2639deb6d385ad209d1a2799b5b656f) Thanks [@hzblj](https://github.com/hzblj)! - Leaner, reusable-only components. `Countdown` is gone, with its native views. There is one `ContextMenu` now: the native module's long-press menu on React Native content, with a custom preview on iOS (formerly `RnContextMenu`); the `@expo/ui`-based one is removed.
213
257
 
214
258
  Android, reworked to look and behave like Material while honouring the theme:
215
259
 
216
260
  - `Button`, `Badge` and `Alert` render their labels; `Button` keeps Material's own shape (no iOS ring), takes `tint` as its fill with a label that contrasts with it, and draws `glass` as Material's outlined button.
217
- - `Alert` is built from `AlertDialog`'s slots — title, message, the confirm action (destructive when asked) and Cancel — instead of drawing empty.
261
+ - `Alert` is built from `AlertDialog`'s slots instead of drawing empty: title, message, the confirm action (destructive when asked) and Cancel.
218
262
  - `Menu` presents its actions in Material's dropdown popup, with their icons, instead of laying them out over the trigger.
219
263
  - `Picker` is a themed Material exposed dropdown the width of its container.
220
264
  - `Switch`, `Checkbox` and `RadioGroup` are tinted with the accent, and with a label are full-width rows that toggle as a whole; `Form` sections span the form's width.
@@ -232,7 +276,7 @@
232
276
 
233
277
  ### Minor Changes
234
278
 
235
- - [`f919c7b`](https://github.com/hzblj/kara-ui/commit/f919c7b06f3798cebd58eef1581076bf1ee61cd1) Thanks [@hzblj](https://github.com/hzblj)! - First release of the kara-ui design system: theme and tokens, the `sx` engine, atoms, molecules, organisms and `Screen`, native tabs (`@hzblj/kara-ui/router`), the KaraUI native module (Liquid Glass, scroll edge effect, native countdown, context menu with preview, rich tooltip, FAB menu), and `KaraProvider` with theme overrides — colours, the app's own fonts, the Material seed, and Material You dynamic colour on Android. Text uses the platform's face by default. Install `@hzblj/kara-ui`; the scoped packages are its building blocks.
279
+ - [`f919c7b`](https://github.com/hzblj/kara-ui/commit/f919c7b06f3798cebd58eef1581076bf1ee61cd1) Thanks [@hzblj](https://github.com/hzblj)! - First release of the kara-ui design system: theme and tokens, the `sx` engine, atoms, molecules, organisms and `Screen`, native tabs (`@hzblj/kara-ui/router`), the KaraUI native module (Liquid Glass, scroll edge effect, native countdown, context menu with preview, rich tooltip, FAB menu), and `KaraProvider` with theme overrides (colours, the app's own fonts, the Material seed, and Material You dynamic colour on Android). Text uses the platform's face by default. Install `@hzblj/kara-ui`; the scoped packages are its building blocks.
236
280
 
237
281
  ### Patch Changes
238
282
 
package/README.md CHANGED
@@ -8,25 +8,25 @@
8
8
  [license-badge]: https://img.shields.io/badge/license-MIT-ff5700?labelColor=27272a
9
9
  [license-url]: https://github.com/hzblj/kara-ui/blob/main/LICENSE
10
10
 
11
- <a href="https://www.kara.janblazej.dev"><img src="https://www.kara.janblazej.dev/og.png" alt="Kara — native UI for Expo: real SwiftUI and Jetpack Compose views" width="720"></a>
11
+ <a href="https://www.kara.janblazej.dev"><img src="https://www.kara.janblazej.dev/og.png" alt="Kara, native UI for Expo: real SwiftUI and Jetpack Compose views" width="720"></a>
12
12
 
13
- The components of [Kara UI](https://www.kara.janblazej.dev) — a native-first design system for Expo.
13
+ The components of [Kara UI](https://www.kara.janblazej.dev), a native-first design system for Expo.
14
14
 
15
15
  > **Install [`@hzblj/kara-ui`](https://www.npmjs.com/package/@hzblj/kara-ui) instead.** This package is one of its
16
16
  > building blocks, published so its types resolve; everything here is re-exported from `@hzblj/kara-ui`.
17
17
 
18
18
  ## What's inside
19
19
 
20
- - **Native components** — real SwiftUI views on iOS and Jetpack Compose on Android, through `@expo/ui`: a `Switch` is
20
+ - **Native components**: real SwiftUI views on iOS and Jetpack Compose on Android, through `@expo/ui`. A `Switch` is
21
21
  a SwiftUI `Toggle` on one and a Material `Switch` on the other.
22
- - **`Screen` and `Island`** — the hosts native views render in.
23
- - **The React Native tier** — `RnView`, `RnText`, `RnScrollView` and the rest: plain React Native views with the same
24
- `sx` props, for long lists and for content around the native islands.
25
- - **Haptics** — the platform's own feedback, named for what happened.
22
+ - **`Screen` and `Island`**: the hosts native views render in.
23
+ - **The React Native tier**: `RnView`, `RnText`, `RnScrollView` and the rest are plain React Native views with the
24
+ same `sx` props, for long lists and for content around the native islands.
25
+ - **Haptics**: the platform's own feedback, named for what happened.
26
26
 
27
27
  ## Documentation
28
28
 
29
- - [Components](https://www.kara.janblazej.dev/docs/components) — every one photographed on iOS and Android, with its props
29
+ - [Components](https://www.kara.janblazej.dev/docs/components): every one on iOS and Android, with its props
30
30
  - [Screen and Island](https://www.kara.janblazej.dev/docs/hosts)
31
31
  - [Haptics](https://www.kara.janblazej.dev/docs/haptics)
32
32
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { Host, LoadingIndicator } from '@expo/ui/jetpack-compose';
4
4
  import { fillMaxSize, testID as testIdModifier } from '@expo/ui/jetpack-compose/modifiers';
5
+ import { useAccessibilityModifiers } from '@hzblj/kara-sx';
5
6
  import { useAppTheme } from '@hzblj/kara-theme';
6
7
  import { useMemo } from 'react';
7
8
  import { StyleSheet } from 'react-native';
@@ -23,12 +24,16 @@ const styles = StyleSheet.create({
23
24
  * anywhere and takes its place in the first frame.
24
25
  */
25
26
  export const ActivityIndicator = ({
27
+ accessibilityLabel,
26
28
  color = 'fill.accent.primary',
27
29
  size = 'small',
28
30
  testID
29
31
  }) => {
30
32
  const theme = useAppTheme();
31
- const modifiers = useMemo(() => testID ? [fillMaxSize(), testIdModifier(testID)] : [fillMaxSize()], [testID]);
33
+ const accessibilityModifiers = useAccessibilityModifiers({
34
+ accessibilityLabel
35
+ });
36
+ const modifiers = useMemo(() => [fillMaxSize(), ...(testID ? [testIdModifier(testID)] : []), ...accessibilityModifiers], [accessibilityModifiers, testID]);
32
37
  return /*#__PURE__*/_jsx(Host, {
33
38
  colorScheme: theme.dark ? 'dark' : 'light',
34
39
  seedColor: theme.materialSeed,
@@ -1 +1 @@
1
- {"version":3,"names":["Host","LoadingIndicator","fillMaxSize","testID","testIdModifier","useAppTheme","useMemo","StyleSheet","jsx","_jsx","styles","create","large","height","width","small","ActivityIndicator","color","size","theme","modifiers","colorScheme","dark","seedColor","materialSeed","style","children"],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/activity-indicator.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,EAAEC,gBAAgB,QAAO,0BAA0B;AAC/D,SAAQC,WAAW,EAAEC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AACxF,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,UAAU,QAAO,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIvC;AACA,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC/BC,KAAK,EAAE;IAACC,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAE,CAAC;EAC9BC,KAAK,EAAE;IAACF,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAE;AAC/B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,OAAO,MAAME,iBAA6C,GAAGA,CAAC;EAC5DC,KAAK,GAAG,qBAAqB;EAC7BC,IAAI,GAAG,OAAO;EACdf;AACsB,CAAC,KAAK;EAC5B,MAAMgB,KAAK,GAAGd,WAAW,CAAC,CAAC;EAC3B,MAAMe,SAAS,GAAGd,OAAO,CAAC,MAAOH,MAAM,GAAG,CAACD,WAAW,CAAC,CAAC,EAAEE,cAAc,CAACD,MAAM,CAAC,CAAC,GAAG,CAACD,WAAW,CAAC,CAAC,CAAE,EAAE,CAACC,MAAM,CAAC,CAAC;EAE/G,oBACEM,IAAA,CAACT,IAAI;IAACqB,WAAW,EAAEF,KAAK,CAACG,IAAI,GAAG,MAAM,GAAG,OAAQ;IAACC,SAAS,EAAEJ,KAAK,CAACK,YAAa;IAACC,KAAK,EAAEf,MAAM,CAACQ,IAAI,CAAE;IAAAQ,QAAA,eACnGjB,IAAA,CAACR,gBAAgB;MAACgB,KAAK,EAAEE,KAAK,CAACF,KAAK,CAACA,KAAK,CAAE;MAACG,SAAS,EAAEA;IAAU,CAAE;EAAC,CACjE,CAAC;AAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Host","LoadingIndicator","fillMaxSize","testID","testIdModifier","useAccessibilityModifiers","useAppTheme","useMemo","StyleSheet","jsx","_jsx","styles","create","large","height","width","small","ActivityIndicator","accessibilityLabel","color","size","theme","accessibilityModifiers","modifiers","colorScheme","dark","seedColor","materialSeed","style","children"],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/activity-indicator.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,EAAEC,gBAAgB,QAAO,0BAA0B;AAC/D,SAAQC,WAAW,EAAEC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AACxF,SAAQC,yBAAyB,QAAO,gBAAgB;AACxD,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,UAAU,QAAO,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIvC;AACA,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC/BC,KAAK,EAAE;IAACC,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAE,CAAC;EAC9BC,KAAK,EAAE;IAACF,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAE;AAC/B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,OAAO,MAAME,iBAA6C,GAAGA,CAAC;EAC5DC,kBAAkB;EAClBC,KAAK,GAAG,qBAAqB;EAC7BC,IAAI,GAAG,OAAO;EACdjB;AACsB,CAAC,KAAK;EAC5B,MAAMkB,KAAK,GAAGf,WAAW,CAAC,CAAC;EAC3B,MAAMgB,sBAAsB,GAAGjB,yBAAyB,CAAC;IAACa;EAAkB,CAAC,CAAC;EAC9E,MAAMK,SAAS,GAAGhB,OAAO,CACvB,MAAM,CAACL,WAAW,CAAC,CAAC,EAAE,IAAIC,MAAM,GAAG,CAACC,cAAc,CAACD,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,GAAGmB,sBAAsB,CAAC,EAC7F,CAACA,sBAAsB,EAAEnB,MAAM,CACjC,CAAC;EAED,oBACEO,IAAA,CAACV,IAAI;IAACwB,WAAW,EAAEH,KAAK,CAACI,IAAI,GAAG,MAAM,GAAG,OAAQ;IAACC,SAAS,EAAEL,KAAK,CAACM,YAAa;IAACC,KAAK,EAAEjB,MAAM,CAACS,IAAI,CAAE;IAAAS,QAAA,eACnGnB,IAAA,CAACT,gBAAgB;MAACkB,KAAK,EAAEE,KAAK,CAACF,KAAK,CAACA,KAAK,CAAE;MAACI,SAAS,EAAEA;IAAU,CAAE;EAAC,CACjE,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -5,12 +5,14 @@ import { ActivityIndicator as RNActivityIndicator } from 'react-native';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  /** React Native's spinner, which on iOS is UIKit's own `UIActivityIndicatorView`. */
7
7
  export const ActivityIndicator = ({
8
+ accessibilityLabel,
8
9
  color = 'fill.accent.primary',
9
10
  size = 'small',
10
11
  testID
11
12
  }) => {
12
13
  const theme = useAppTheme();
13
14
  return /*#__PURE__*/_jsx(RNActivityIndicator, {
15
+ accessibilityLabel: accessibilityLabel,
14
16
  color: theme.color(color),
15
17
  size: size,
16
18
  testID: testID
@@ -1 +1 @@
1
- {"version":3,"names":["useAppTheme","ActivityIndicator","RNActivityIndicator","jsx","_jsx","color","size","testID","theme"],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/activity-indicator.ios.tsx"],"mappings":";;AAAA,SAAQA,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,iBAAiB,IAAIC,mBAAmB,QAAO,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIrE;AACA,OAAO,MAAMH,iBAA6C,GAAGA,CAAC;EAC5DI,KAAK,GAAG,qBAAqB;EAC7BC,IAAI,GAAG,OAAO;EACdC;AACsB,CAAC,KAAK;EAC5B,MAAMC,KAAK,GAAGR,WAAW,CAAC,CAAC;EAE3B,oBAAOI,IAAA,CAACF,mBAAmB;IAACG,KAAK,EAAEG,KAAK,CAACH,KAAK,CAACA,KAAK,CAAE;IAACC,IAAI,EAAEA,IAAK;IAACC,MAAM,EAAEA;EAAO,CAAE,CAAC;AACvF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useAppTheme","ActivityIndicator","RNActivityIndicator","jsx","_jsx","accessibilityLabel","color","size","testID","theme"],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/activity-indicator.ios.tsx"],"mappings":";;AAAA,SAAQA,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,iBAAiB,IAAIC,mBAAmB,QAAO,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIrE;AACA,OAAO,MAAMH,iBAA6C,GAAGA,CAAC;EAC5DI,kBAAkB;EAClBC,KAAK,GAAG,qBAAqB;EAC7BC,IAAI,GAAG,OAAO;EACdC;AACsB,CAAC,KAAK;EAC5B,MAAMC,KAAK,GAAGT,WAAW,CAAC,CAAC;EAE3B,oBACEI,IAAA,CAACF,mBAAmB;IAClBG,kBAAkB,EAAEA,kBAAmB;IACvCC,KAAK,EAAEG,KAAK,CAACH,KAAK,CAACA,KAAK,CAAE;IAC1BC,IAAI,EAAEA,IAAK;IACXC,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -16,6 +16,7 @@ const VARIANT = {
16
16
  sm: 'caption'
17
17
  };
18
18
  export const Avatar = ({
19
+ accessibilityLabel,
19
20
  initials,
20
21
  size = 'md',
21
22
  source,
@@ -23,6 +24,10 @@ export const Avatar = ({
23
24
  }) => {
24
25
  const diameter = DIAMETER[size];
25
26
  return /*#__PURE__*/_jsx(Box, {
27
+ "aria-hidden": accessibilityLabel === undefined,
28
+ accessibilityLabel: accessibilityLabel,
29
+ accessibilityRole: accessibilityLabel === undefined ? undefined : 'image',
30
+ accessible: accessibilityLabel !== undefined,
26
31
  align: "center",
27
32
  bg: "fill.tertiary",
28
33
  borderRadius: "full",
@@ -1 +1 @@
1
- {"version":3,"names":["spacing","Box","Image","RnText","jsx","_jsx","DIAMETER","lg","s64","md","s40","sm","s24","VARIANT","Avatar","initials","size","source","testID","diameter","align","bg","borderRadius","h","justify","overflow","w","children","color","variant"],"sourceRoot":"../../../../src","sources":["atoms/avatar/avatar.tsx"],"mappings":";;AAAA,SAAQA,OAAO,QAAO,mBAAmB;AAEzC,SAAQC,GAAG,QAAO,iBAAQ;AAC1B,SAAQC,KAAK,QAAO,mBAAU;AAC9B,SAAQC,MAAM,QAAO,qBAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGjC,MAAMC,QAAQ,GAAG;EACfC,EAAE,EAAEP,OAAO,CAACQ,GAAG;EACfC,EAAE,EAAET,OAAO,CAACU,GAAG;EACfC,EAAE,EAAEX,OAAO,CAACY;AACd,CAA+C;AAE/C,MAAMC,OAAO,GAAG;EACdN,EAAE,EAAE,WAAW;EACfE,EAAE,EAAE,aAAa;EACjBE,EAAE,EAAE;AACN,CAAU;AAEV,OAAO,MAAMG,MAAuB,GAAGA,CAAC;EAACC,QAAQ;EAAEC,IAAI,GAAG,IAAI;EAAEC,MAAM;EAAEC;AAAmB,CAAC,KAAK;EAC/F,MAAMC,QAAQ,GAAGb,QAAQ,CAACU,IAAI,CAAC;EAE/B,oBACEX,IAAA,CAACJ,GAAG;IACFmB,KAAK,EAAC,QAAQ;IACdC,EAAE,EAAC,eAAe;IAClBC,YAAY,EAAC,MAAM;IACnBC,CAAC,EAAEJ,QAAS;IACZK,OAAO,EAAC,QAAQ;IAChBC,QAAQ,EAAC,QAAQ;IACjBP,MAAM,EAAEA,MAAO;IACfQ,CAAC,EAAEP,QAAS;IAAAQ,QAAA,EAEXV,MAAM,gBACLZ,IAAA,CAACH,KAAK;MAACqB,CAAC,EAAEJ,QAAS;MAACF,MAAM,EAAEA,MAAO;MAACS,CAAC,EAAEP;IAAS,CAAE,CAAC,gBAEnDd,IAAA,CAACF,MAAM;MAACyB,KAAK,EAAC,mBAAmB;MAACC,OAAO,EAAEhB,OAAO,CAACG,IAAI,CAAE;MAAAW,QAAA,EACtDZ,QAAQ,IAAI;IAAE,CACT;EACT,CACE,CAAC;AAEV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["spacing","Box","Image","RnText","jsx","_jsx","DIAMETER","lg","s64","md","s40","sm","s24","VARIANT","Avatar","accessibilityLabel","initials","size","source","testID","diameter","undefined","accessibilityRole","accessible","align","bg","borderRadius","h","justify","overflow","w","children","color","variant"],"sourceRoot":"../../../../src","sources":["atoms/avatar/avatar.tsx"],"mappings":";;AAAA,SAAQA,OAAO,QAAO,mBAAmB;AAEzC,SAAQC,GAAG,QAAO,iBAAQ;AAC1B,SAAQC,KAAK,QAAO,mBAAU;AAC9B,SAAQC,MAAM,QAAO,qBAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGjC,MAAMC,QAAQ,GAAG;EACfC,EAAE,EAAEP,OAAO,CAACQ,GAAG;EACfC,EAAE,EAAET,OAAO,CAACU,GAAG;EACfC,EAAE,EAAEX,OAAO,CAACY;AACd,CAA+C;AAE/C,MAAMC,OAAO,GAAG;EACdN,EAAE,EAAE,WAAW;EACfE,EAAE,EAAE,aAAa;EACjBE,EAAE,EAAE;AACN,CAAU;AAEV,OAAO,MAAMG,MAAuB,GAAGA,CAAC;EAACC,kBAAkB;EAAEC,QAAQ;EAAEC,IAAI,GAAG,IAAI;EAAEC,MAAM;EAAEC;AAAmB,CAAC,KAAK;EACnH,MAAMC,QAAQ,GAAGd,QAAQ,CAACW,IAAI,CAAC;EAE/B,oBACEZ,IAAA,CAACJ,GAAG;IACF,eAAac,kBAAkB,KAAKM,SAAU;IAC9CN,kBAAkB,EAAEA,kBAAmB;IACvCO,iBAAiB,EAAEP,kBAAkB,KAAKM,SAAS,GAAGA,SAAS,GAAG,OAAQ;IAC1EE,UAAU,EAAER,kBAAkB,KAAKM,SAAU;IAC7CG,KAAK,EAAC,QAAQ;IACdC,EAAE,EAAC,eAAe;IAClBC,YAAY,EAAC,MAAM;IACnBC,CAAC,EAAEP,QAAS;IACZQ,OAAO,EAAC,QAAQ;IAChBC,QAAQ,EAAC,QAAQ;IACjBV,MAAM,EAAEA,MAAO;IACfW,CAAC,EAAEV,QAAS;IAAAW,QAAA,EAEXb,MAAM,gBACLb,IAAA,CAACH,KAAK;MAACyB,CAAC,EAAEP,QAAS;MAACF,MAAM,EAAEA,MAAO;MAACY,CAAC,EAAEV;IAAS,CAAE,CAAC,gBAEnDf,IAAA,CAACF,MAAM;MAAC6B,KAAK,EAAC,mBAAmB;MAACC,OAAO,EAAEpB,OAAO,CAACI,IAAI,CAAE;MAAAc,QAAA,EACtDf,QAAQ,IAAI;IAAE,CACT;EACT,CACE,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -2,7 +2,7 @@
2
2
 
3
3
  const TOKENS = {
4
4
  accent: {
5
- content: 'content.on.bg',
5
+ content: 'content.on.accent',
6
6
  fill: 'fill.accent.primary',
7
7
  shadow: 'btn.accent'
8
8
  },
@@ -78,5 +78,5 @@ const currentHex = (token, theme) => {
78
78
  * The label for a button filled with an arbitrary `tint`: the on-accent white over a strong colour, the primary
79
79
  * content colour over a pale one (`fill.accent.base`) — the light container tokens pair with it in both appearances.
80
80
  */
81
- export const contentOnTint = (tint, theme) => (luminance(currentHex(tint, theme)) ?? 0) > 0.4 ? 'content.primary' : 'content.on.bg';
81
+ export const contentOnTint = (tint, theme) => (luminance(currentHex(tint, theme)) ?? 0) > 0.4 ? 'content.primary' : 'content.on.accent';
82
82
  //# sourceMappingURL=button-tokens.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["TOKENS","accent","content","fill","shadow","destructive","glass","secondary","buttonTokens","variant","disabled","theme","tokens","disabledFill","luminance","color","hex","exec","undefined","r","g","b","map","i","channel","Number","parseInt","slice","currentHex","token","resolved","entry","split","reduce","node","key","dark","light","adaptive","contentOnTint","tint"],"sourceRoot":"../../../../src","sources":["atoms/button/button-tokens.ts"],"mappings":";;AAUA,MAAMA,MAAM,GAAG;EACbC,MAAM,EAAE;IAACC,OAAO,EAAE,eAAe;IAAEC,IAAI,EAAE,qBAAqB;IAAEC,MAAM,EAAE;EAAY,CAAC;EACrFC,WAAW,EAAE;IAACH,OAAO,EAAE,wBAAwB;IAAEC,IAAI,EAAE,0BAA0B;IAAEC,MAAM,EAAE;EAAiB,CAAC;EAC7GE,KAAK,EAAE;IAACJ,OAAO,EAAE,iBAAiB;IAAEC,IAAI,EAAE,mBAAmB;IAAEC,MAAM,EAAE;EAAW,CAAC;EACnFG,SAAS,EAAE;IAACL,OAAO,EAAE,iBAAiB;IAAEC,IAAI,EAAE,uBAAuB;IAAEC,MAAM,EAAE;EAAe;AAChG,CAAwD;AAExD,OAAO,MAAMI,YAAY,GAAGA,CAACC,OAAsB,EAAEC,QAAiB,EAAEC,KAAY,KAAK;EACvF,MAAMC,MAAM,GAAGZ,MAAM,CAACS,OAAO,CAAC;EAE9B,IAAI,CAACC,QAAQ,EAAE;IACb,OAAOE,MAAM;EACf;EAEA,MAAMC,YAAY,GAAG;IACnBZ,MAAM,EAAE,sBAAsB;IAC9BI,WAAW,EAAE,2BAA2B;IACxCC,KAAK,EAAE,uBAAuB;IAC9BC,SAAS,EAAE;EACb,CAAsD;EAEtD,KAAKI,KAAK;EAEV,OAAO;IAACT,OAAO,EAAE,sBAAsB;IAAEC,IAAI,EAAEU,YAAY,CAACJ,OAAO,CAAC;IAAEL,MAAM,EAAEQ,MAAM,CAACR;EAAM,CAAC;AAC9F,CAAC;;AAED;AACA,MAAMU,SA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C7D,MAAM;MAACK,IAAI;MAAEC;IAAK,CAAC,GAAIN,KAAK,CAA+CO,QAAQ;IAEnF,OAAO3B,KAAK,CAACyB,IAAI,GAAGA,IAAI,GAAGC,KAAK;EAClC;EAEA,OAAON,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMQ,aAAa,GAAGA,CAACC,IAAgB,EAAE7B,KAAY,KAC1D,CAACG,SAAS,CAACc,UAAU,CAACY,IAAI,EAAE7B,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,iBAAiB,GAAG,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["TOKENS","accent","content","fill","shadow","destructive","glass","secondary","buttonTokens","variant","disabled","theme","tokens","disabledFill","luminance","color","hex","exec","undefined","r","g","b","map","i","channel","Number","parseInt","slice","currentHex","token","resolved","entry","split","reduce","node","key","dark","light","adaptive","contentOnTint","tint"],"sourceRoot":"../../../../src","sources":["atoms/button/button-tokens.ts"],"mappings":";;AAUA,MAAMA,MAAM,GAAG;EACbC,MAAM,EAAE;IAACC,OAAO,EAAE,mBAAmB;IAAEC,IAAI,EAAE,qBAAqB;IAAEC,MAAM,EAAE;EAAY,CAAC;EACzFC,WAAW,EAAE;IAACH,OAAO,EAAE,wBAAwB;IAAEC,IAAI,EAAE,0BAA0B;IAAEC,MAAM,EAAE;EAAiB,CAAC;EAC7GE,KAAK,EAAE;IAACJ,OAAO,EAAE,iBAAiB;IAAEC,IAAI,EAAE,mBAAmB;IAAEC,MAAM,EAAE;EAAW,CAAC;EACnFG,SAAS,EAAE;IAACL,OAAO,EAAE,iBAAiB;IAAEC,IAAI,EAAE,uBAAuB;IAAEC,MAAM,EAAE;EAAe;AAChG,CAAwD;AAExD,OAAO,MAAMI,YAAY,GAAGA,CAACC,OAAsB,EAAEC,QAAiB,EAAEC,KAAY,KAAK;EACvF,MAAMC,MAAM,GAAGZ,MAAM,CAACS,OAAO,CAAC;EAE9B,IAAI,CAACC,QAAQ,EAA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OC,QAAQ,KAAK,QAAQ,EAAE;IAChC,OAAOA,QAAQ;EACjB;EAEA,MAAMC,KAAK,GAAGF,KAAK,CAChBG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACbA,KAAK,CAAC,GAAG,CAAC,CACVC,MAAM,CAAU,CAACC,IAAI,EAAEC,GAAG,KAAMD,IAAI,GAA2CC,GAAG,CAAC,EAAExB,KAAK,CAAC;EAE9F,IAAIoB,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,UAAU,IAAIA,KAAK,EAAE;IAC7D,MAAM;MAACK,IAAI;MAAEC;IAAK,CAAC,GAAIN,KAAK,CAA+CO,QAAQ;IAEnF,OAAO3B,KAAK,CAACyB,IAAI,GAAGA,IAAI,GAAGC,KAAK;EAClC;EAEA,OAAON,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMQ,aAAa,GAAGA,CAACC,IAAgB,EAAE7B,KAAY,KAC1D,CAACG,SAAS,CAACc,UAAU,CAACY,IAAI,EAAE7B,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,iBAAiB,GAAG,mBAAmB","ignoreList":[]}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Button as ComposeButton, Text as ComposeText, OutlinedButton } from '@expo/ui/jetpack-compose';
4
4
  import { testID as testIdModifier } from '@expo/ui/jetpack-compose/modifiers';
5
- import { useSxModifiers } from '@hzblj/kara-sx';
5
+ import { useAccessibilityModifiers, useSxModifiers } from '@hzblj/kara-sx';
6
6
  import { useAppTheme } from '@hzblj/kara-theme';
7
7
  import { useMemo } from 'react';
8
8
  import { useHostGuard } from "../../host-context.js";
@@ -18,6 +18,7 @@ import { buttonTokens, contentOnTint } from "./button-tokens.js";
18
18
  */
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  export const Button = ({
21
+ accessibilityHint,
21
22
  disabled = false,
22
23
  label,
23
24
  onPress,
@@ -32,7 +33,10 @@ export const Button = ({
32
33
  const sxModifiers = useSxModifiers({
33
34
  wide
34
35
  });
35
- const modifiers = useMemo(() => testID ? [...sxModifiers, testIdModifier(testID)] : sxModifiers, [sxModifiers, testID]);
36
+ const accessibilityModifiers = useAccessibilityModifiers({
37
+ accessibilityHint
38
+ }, accessibilityHint !== undefined);
39
+ const modifiers = useMemo(() => [...sxModifiers, ...(testID ? [testIdModifier(testID)] : []), ...accessibilityModifiers], [accessibilityModifiers, sxModifiers, testID]);
36
40
  const style = theme.typography.body;
37
41
  const outlined = variant === 'glass' && !tint;
38
42
  const fill = tint && !disabled ? tint : tokens.fill;
@@ -1 +1 @@
1
- {"version":3,"names":["Button","ComposeButton","Text","ComposeText","OutlinedButton","testID","testIdModifier","useSxModifiers","useAppTheme","useMemo","useHostGuard","buttonTokens","contentOnTint","jsx","_jsx","disabled","label","onPress","tint","variant","wide","theme","tokens","sxModifiers","modifiers","style","typography","body","outlined","fill","content","MaterialButton","colors","contentColor","color","disabledContentColor","containerColor","disabledContainerColor","enabled","onClick","children","colorString","fontFamily","fontSize","fontWeight","lineHeight"],"sourceRoot":"../../../../src","sources":["atoms/button/button.android.tsx"],"mappings":";;AAAA,SAAQA,MAAM,IAAIC,aAAa,EAAEC,IAAI,IAAIC,WAAW,EAAEC,cAAc,QAAO,0BAA0B;AACrG,SAAQC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AAC3E,SAAQC,cAAc,QAAO,gBAAgB;AAC7C,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,YAAY,QAAO,uBAAoB;AAE/C,SAAQC,YAAY,EAAEC,aAAa,QAAO,oBAAiB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA;AAQA,OAAO,MAAMd,MAAuB,GAAGA,CAAC;EACtCe,QAAQ,GAAG,KAAK;EAChBC,KAAK;EACLC,OAAO;EACPZ,MAAM;EACNa,IAAI;EACJ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,oBAAoB,EAAEd,KAAK,CAACa,KAAK,CAACJ,OAAO;IAC3C,CACL;IACDQ,OAAO,EAAE,CAACvB,QAAS;IACnBS,SAAS,EAAEA,SAAU;IACrBe,OAAO,EAAEtB,OAAQ;IAAAuB,QAAA,eAEjB1B,IAAA,CAACX,WAAW;MACV+B,KAAK,EAAEb,KAAK,CAACoB,WAAW,CAACX,OAAO,CAAE;MAClCL,KAAK,EAAE;QACLiB,UAAU,EAAEjB,KAAK,CAACiB,UAAU;QAC5BC,QAAQ,EAAElB,KAAK,CAACkB,QAAQ;QACxBC,UAAU,EAAEnB,KAAK,CAACmB,UAAU;QAC5BC,UAAU,EAAEpB,KAAK,CAACoB;MACpB,CAAE;MAAAL,QAAA,EAEDxB;IAAK,CACK;EAAC,CACA,CAAC;AAErB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Button","ComposeButton","Text","ComposeText","OutlinedButton","testID","testIdModifier","useAccessibilityModifiers","useSxModifiers","useAppTheme","useMemo","useHostGuard","buttonTokens","contentOnTint","jsx","_jsx","accessibilityHint","disabled","label","onPress","tint","variant","wide","theme","tokens","sxModifiers","accessibilityModifiers","undefined","modifiers","style","typography","body","outlined","fill","content","MaterialButton","colors","contentColor","color","disabledContentColor","containerColor","disabledContainerColor","enabled","onClick","children","colorString","fontFamily","fontSize","fontWeight","lineHeight"],"sourceRoot":"../../../../src","sources":["atoms/button/button.android.tsx"],"mappings":";;AAAA,SAAQA,MAAM,IAAIC,aAAa,EAAEC,IAAI,IAAIC,WAAW,EAAEC,cAAc,QAAO,0BAA0B;AACrG,SAAQC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AAC3E,SAAQC,yBAAyB,EAAEC,cAAc,QAAO,gBAAgB;AACxE,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,YAAY,QAAO,uBAAoB;AAE/C,SAAQC,YAAY,EAAEC,aAAa,QAAO,oBAAiB;;AAE3D;AACA;AAC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oB,cAAc;IACbC,MAAM,EACJJ,QAAQ,GACJ;MAACK,YAAY,EAAEd,KAAK,CAACe,KAAK,CAACJ,OAAO,CAAC;MAAEK,oBAAoB,EAAEhB,KAAK,CAACe,KAAK,CAACJ,OAAO;IAAC,CAAC,GAChF;MACEM,cAAc,EAAEjB,KAAK,CAACe,KAAK,CAACL,IAAI,CAAC;MACjCI,YAAY,EAAEd,KAAK,CAACe,KAAK,CAACJ,OAAO,CAAC;MAClCO,sBAAsB,EAAElB,KAAK,CAACe,KAAK,CAACL,IAAI,CAAC;MACzCM,oBAAoB,EAAEhB,KAAK,CAACe,KAAK,CAACJ,OAAO;IAC3C,CACL;IACDQ,OAAO,EAAE,CAACzB,QAAS;IACnBW,SAAS,EAAEA,SAAU;IACrBe,OAAO,EAAExB,OAAQ;IAAAyB,QAAA,eAEjB7B,IAAA,CAACZ,WAAW;MACVmC,KAAK,EAAEf,KAAK,CAACsB,WAAW,CAACX,OAAO,CAAE;MAClCL,KAAK,EAAE;QACLiB,UAAU,EAAEjB,KAAK,CAACiB,UAAU;QAC5BC,QAAQ,EAAElB,KAAK,CAACkB,QAAQ;QACxBC,UAAU,EAAEnB,KAAK,CAACmB,UAAU;QAC5BC,UAAU,EAAEpB,KAAK,CAACoB;MACpB,CAAE;MAAAL,QAAA,EAED1B;IAAK,CACK;EAAC,CACA,CAAC;AAErB,CAAC","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { Button as SwiftUIButton } from '@expo/ui/swift-ui';
4
4
  import { buttonStyle as buttonStyleModifier, controlSize as controlSizeModifier, disabled as disabledModifier, glassEffect as glassEffectModifier, tint as tintModifier } from '@expo/ui/swift-ui/modifiers';
5
+ import { useAccessibilityModifiers } from '@hzblj/kara-sx';
5
6
  import { useAppTheme } from '@hzblj/kara-theme';
6
7
  import { useMemo } from 'react';
7
8
  import { useHostGuard } from "../../host-context.js";
@@ -22,6 +23,7 @@ const TINT_BY_VARIANT = {
22
23
  secondary: undefined
23
24
  };
24
25
  export const Button = ({
26
+ accessibilityHint,
25
27
  buttonStyle,
26
28
  controlSize = 'large',
27
29
  disabled = false,
@@ -51,8 +53,11 @@ export const Button = ({
51
53
  const filled = Boolean(glassTint) || style === 'borderedProminent' || style === 'glassProminent';
52
54
  // A prominent style — and tinted glass — is coloured by the tint, so a caller's own tint picks the label on it.
53
55
  const content = tint && filled && !disabled ? contentOnTint(tint, theme) : tokens.content;
56
+ const accessibilityModifiers = useAccessibilityModifiers({
57
+ accessibilityHint
58
+ });
54
59
  const modifiers = useMemo(() => {
55
- const list = [buttonStyleModifier(glassTint ? 'plain' : style), controlSizeModifier(controlSize)];
60
+ const list = [buttonStyleModifier(glassTint ? 'plain' : style), controlSizeModifier(controlSize), ...accessibilityModifiers];
56
61
  if (glassTint) {
57
62
  list.push(glassEffectModifier({
58
63
  glass: {
@@ -69,7 +74,7 @@ export const Button = ({
69
74
  list.push(disabledModifier(true));
70
75
  }
71
76
  return list;
72
- }, [controlSize, disabled, glassTint, resolvedTint, style, theme]);
77
+ }, [accessibilityModifiers, controlSize, disabled, glassTint, resolvedTint, style, theme]);
73
78
  return /*#__PURE__*/_jsx(SwiftUIButton, {
74
79
  modifiers: modifiers,
75
80
  onPress: onPress,
@@ -1 +1 @@
1
- {"version":3,"names":["Button","SwiftUIButton","buttonStyle","buttonStyleModifier","controlSize","controlSizeModifier","disabled","disabledModifier","glassEffect","glassEffectModifier","tint","tintModifier","useAppTheme","useMemo","useHostGuard","Text","VStack","buttonTokens","contentOnTint","jsx","_jsx","STYLE_BY_VARIANT","accent","destructive","glass","secondary","TINT_BY_VARIANT","undefined","label","onPress","testID","variant","wide","theme","tokens","resolvedTint","style","glassTint","color","filled","Boolean","content","modifiers","list","push","interactive","shape","children","align","py"],"sourceRoot":"../../../../src","sources":["atoms/button/button.ios.tsx"],"mappings":";;AAAA,SAAQA,MAAM,IAAIC,aAAa,QAAO,mBAAmB;AACzD,SACEC,WAAW,IAAIC,mBAAmB,EAClCC,WAAW,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ACpE3B,IAAA,CAACJ,MAAM;MAACgC,KAAK,EAAC,QAAQ;MAACC,EAAE,EAAEZ,SAAS,GAAG,KAAK,GAAGV,SAAU;MAACK,IAAI,EAAEA,IAAK;MAAAe,QAAA,eACnE3B,IAAA,CAACL,IAAI;QAACuB,KAAK,EAAEG,OAAQ;QAACV,OAAO,EAAC,MAAM;QAAAgB,QAAA,EACjCnB;MAAK,CACF;IAAC,CACD;EAAC,CACI,CAAC;AAEpB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Button","SwiftUIButton","buttonStyle","buttonStyleModifier","controlSize","controlSizeModifier","disabled","disabledModifier","glassEffect","glassEffectModifier","tint","tintModifier","useAccessibilityModifiers","useAppTheme","useMemo","useHostGuard","Text","VStack","buttonTokens","contentOnTint","jsx","_jsx","STYLE_BY_VARIANT","accent","destructive","glass","secondary","TINT_BY_VARIANT","undefined","accessibilityHint","label","onPress","testID","variant","wide","theme","tokens","resolvedTint","style","glassTint","color","filled","Boolean","content","accessibilityModifiers","modifiers","list","push","interactive","shape","children","align","py"],"sourceRoot":"../../../../src","sources":["atoms/button/button.ios.tsx"],"mappings":";;AAAA,SAAQA,MAAM,IAAIC,aAAa,QAAO,mBAAmB;AACzD,SACEC,WAAW,IAAIC,mBAAmB,EAClCC,WAAW,IAAIC,mBAAmB,EAClCC,QAAQ,IAAIC,gBAAgB,EAC5BC,WAAW,IAAIC,mBAAmB,EAClCC,IAAI,IAAIC,YAAY,QACf,6BAA6B;AACpC,SAAQC,yBAAyB,QAAO,gBAAgB;AACxD,SAAyBC,WAAW,QAAO,mBAAmB;AAC9D,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,YAAY,QAAO,uBAAoB;AAC/C,SAAQC,IAAI,QAAO,kBAAS;AAC5B,SAAQC,MAAM,QAAO,qBAAY;AAEjC,SAAQC,YAAY,EAAEC,aAAa,QAAO,oBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE3D,MAAMC,gBAAgB,GAAG;EACv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EAAC,CACI,CAAC;AAEpB,CAAC","ignoreList":[]}
@@ -2,16 +2,17 @@
2
2
 
3
3
  import { Column } from '@expo/ui/jetpack-compose';
4
4
  import { testID as testIdModifier } from '@expo/ui/jetpack-compose/modifiers';
5
- import { useSxModifiers } from '@hzblj/kara-sx';
5
+ import { splitAccessibility, useAccessibilityModifiers, useSxModifiers } from '@hzblj/kara-sx';
6
6
  import { useMemo } from 'react';
7
7
  import { useHostGuard } from "../../host-context.js";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  export const Card = ({
10
10
  children,
11
11
  testID,
12
- ...sx
12
+ ...props
13
13
  }) => {
14
14
  useHostGuard('Card');
15
+ const [accessibility, sx] = splitAccessibility(props);
15
16
  const sxModifiers = useSxModifiers({
16
17
  bg: 'surface.primary',
17
18
  borderRadius: 'large',
@@ -19,7 +20,8 @@ export const Card = ({
19
20
  shadow: 'card',
20
21
  ...sx
21
22
  });
22
- const modifiers = useMemo(() => testID ? [...sxModifiers, testIdModifier(testID)] : sxModifiers, [sxModifiers, testID]);
23
+ const accessibilityModifiers = useAccessibilityModifiers(accessibility);
24
+ const modifiers = useMemo(() => [...sxModifiers, ...(testID ? [testIdModifier(testID)] : []), ...accessibilityModifiers], [accessibilityModifiers, sxModifiers, testID]);
23
25
  return /*#__PURE__*/_jsx(Column, {
24
26
  modifiers: modifiers,
25
27
  children: children
@@ -1 +1 @@
1
- {"version":3,"names":["Column","testID","testIdModifier","useSxModifiers","useMemo","useHostGuard","jsx","_jsx","Card","children","sx","sxModifiers","bg","borderRadius","p","shadow","modifiers"],"sourceRoot":"../../../../src","sources":["atoms/card/card.android.tsx"],"mappings":";;AAAA,SAAQA,MAAM,QAAO,0BAA0B;AAC/C,SAAQC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AAC3E,SAAQC,cAAc,QAAO,gBAAgB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,OAAO,MAAMC,IAAmB,GAAGA,CAAC;EAACC,QAAQ;EAAER,MAAM;EAAE,GAAGS;AAAa,CAAC,KAAK;EAC3EL,YAAY,CAAC,MAAM,CAAC;EACpB,MAAMM,WAAW,GAAGR,cAAc,CAAC;IAACS,EAAE,EAAE,iBAAiB;IAAEC,YAAY,EAAE,OAAO;IAAEC,CAAC,EAAE,KAAK;IAAEC,MAAM,EAAE,MAAM;IAAE,GAAGL;EAAE,CAAC,CAAC;EACnH,MAAMM,SAAS,GAAGZ,OAAO,CACvB,MAAOH,MAAM,GAAG,CAAC,GAAGU,WAAW,EAAET,cAAc,CAACD,MAAM,CAAC,CAAC,GAAGU,WAAY,EACvE,CAACA,WAAW,EAAEV,MAAM,CACtB,CAAC;EAED,oBAAOM,IAAA,CAACP,MAAM;IAACgB,SAAS,EAAEA,SAAU;IAAAP,QAAA,EAAEA;EAAQ,CAAS,CAAC;AAC1D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Column","testID","testIdModifier","splitAccessibility","useAccessibilityModifiers","useSxModifiers","useMemo","useHostGuard","jsx","_jsx","Card","children","props","accessibility","sx","sxModifiers","bg","borderRadius","p","shadow","accessibilityModifiers","modifiers"],"sourceRoot":"../../../../src","sources":["atoms/card/card.android.tsx"],"mappings":";;AAAA,SAAQA,MAAM,QAAO,0BAA0B;AAC/C,SAAQC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AAC3E,SAAQC,kBAAkB,EAAEC,yBAAyB,EAAEC,cAAc,QAAO,gBAAgB;AAC5F,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,OAAO,MAAMC,IAAmB,GAAGA,CAAC;EAACC,QAAQ;EAAEV,MAAM;EAAE,GAAGW;AAAgB,CAAC,KAAK;EAC9EL,YAAY,CAAC,MAAM,CAAC;EACpB,MAAM,CAACM,aAAa,EAAEC,EAAE,CAAC,GAAGX,kBAAkB,CAACS,KAAK,CAAC;EACrD,MAAMG,WAAW,GAAGV,cAAc,CAAC;IAACW,EAAE,EAAE,iBAAiB;IAAEC,YAAY,EAAE,OAAO;IAAEC,CAAC,EAAE,KAAK;IAAEC,MAAM,EAAE,MAAM;IAAE,GAAGL;EAAE,CAAC,CAAC;EACnH,MAAMM,sBAAsB,GAAGhB,yBAAyB,CAACS,aAAa,CAAC;EACvE,MAAMQ,SAAS,GAAGf,OAAO,CACvB,MAAM,CAAC,GAAGS,WAAW,EAAE,IAAId,MAAM,GAAG,CAACC,cAAc,CAACD,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,GAAGmB,sBAAsB,CAAC,EAC9F,CAACA,sBAAsB,EAAEL,WAAW,EAAEd,MAAM,CAC9C,CAAC;EAED,oBAAOQ,IAAA,CAACT,MAAM;IAACqB,SAAS,EAAEA,SAAU;IAAAV,QAAA,EAAEA;EAAQ,CAAS,CAAC;AAC1D,CAAC","ignoreList":[]}
@@ -1,22 +1,26 @@
1
1
  "use strict";
2
2
 
3
3
  import { VStack } from '@expo/ui/swift-ui';
4
- import { useSxModifiers } from '@hzblj/kara-sx';
4
+ import { splitAccessibility, useAccessibilityModifiers, useSxModifiers } from '@hzblj/kara-sx';
5
+ import { useMemo } from 'react';
5
6
  import { useHostGuard } from "../../host-context.js";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  export const Card = ({
8
9
  children,
9
10
  testID,
10
- ...sx
11
+ ...props
11
12
  }) => {
12
13
  useHostGuard('Card');
13
- const modifiers = useSxModifiers({
14
+ const [accessibility, sx] = splitAccessibility(props);
15
+ const sxModifiers = useSxModifiers({
14
16
  bg: 'surface.primary',
15
17
  borderRadius: 'large',
16
18
  p: 's16',
17
19
  shadow: 'card',
18
20
  ...sx
19
21
  });
22
+ const accessibilityModifiers = useAccessibilityModifiers(accessibility);
23
+ const modifiers = useMemo(() => [...sxModifiers, ...accessibilityModifiers], [accessibilityModifiers, sxModifiers]);
20
24
  return /*#__PURE__*/_jsx(VStack, {
21
25
  alignment: "leading",
22
26
  modifiers: modifiers,