@hzblj/kara-components 0.1.0 → 0.2.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 (231) hide show
  1. package/lib/module/atoms/badge/badge.android.js +8 -2
  2. package/lib/module/atoms/badge/badge.android.js.map +1 -1
  3. package/lib/module/atoms/button/button-tokens.js +39 -0
  4. package/lib/module/atoms/button/button-tokens.js.map +1 -1
  5. package/lib/module/atoms/button/button.android.js +40 -12
  6. package/lib/module/atoms/button/button.android.js.map +1 -1
  7. package/lib/module/atoms/button/button.ios.js +5 -2
  8. package/lib/module/atoms/button/button.ios.js.map +1 -1
  9. package/lib/module/atoms/checkbox/checkbox.android.js +17 -2
  10. package/lib/module/atoms/checkbox/checkbox.android.js.map +1 -1
  11. package/lib/module/atoms/date-picker/date-picker.android.js +72 -0
  12. package/lib/module/atoms/date-picker/date-picker.android.js.map +1 -0
  13. package/lib/module/atoms/date-picker/{date-picker.js → date-picker.ios.js} +4 -7
  14. package/lib/module/atoms/date-picker/date-picker.ios.js.map +1 -0
  15. package/lib/module/atoms/date-picker/index.js +1 -1
  16. package/lib/module/atoms/date-picker/index.js.map +1 -1
  17. package/lib/module/atoms/fab/fab.android.js +5 -3
  18. package/lib/module/atoms/fab/fab.android.js.map +1 -1
  19. package/lib/module/atoms/glass-view/glass-fallback.js +5 -2
  20. package/lib/module/atoms/glass-view/glass-fallback.js.map +1 -1
  21. package/lib/module/atoms/icon/icon.android.js +10 -12
  22. package/lib/module/atoms/icon/icon.android.js.map +1 -1
  23. package/lib/module/atoms/icon/icon.ios.js +15 -3
  24. package/lib/module/atoms/icon/icon.ios.js.map +1 -1
  25. package/lib/module/atoms/icon/index.js +0 -1
  26. package/lib/module/atoms/icon/index.js.map +1 -1
  27. package/lib/module/atoms/index.js +1 -1
  28. package/lib/module/atoms/index.js.map +1 -1
  29. package/lib/module/atoms/list/list.android.js +8 -2
  30. package/lib/module/atoms/list/list.android.js.map +1 -1
  31. package/lib/module/atoms/picker/index.js +1 -1
  32. package/lib/module/atoms/picker/index.js.map +1 -1
  33. package/lib/module/atoms/picker/picker.android.js +87 -0
  34. package/lib/module/atoms/picker/picker.android.js.map +1 -0
  35. package/lib/module/atoms/picker/{picker.js → picker.ios.js} +1 -1
  36. package/lib/module/atoms/picker/picker.ios.js.map +1 -0
  37. package/lib/module/atoms/rn-icon/index.js +5 -0
  38. package/lib/module/atoms/rn-icon/index.js.map +1 -0
  39. package/lib/module/atoms/rn-icon/rn-icon.android.js +29 -0
  40. package/lib/module/atoms/rn-icon/rn-icon.android.js.map +1 -0
  41. package/lib/module/atoms/rn-icon/rn-icon.ios.js +29 -0
  42. package/lib/module/atoms/rn-icon/rn-icon.ios.js.map +1 -0
  43. package/lib/module/atoms/rn-icon/rn-icon.types.js +4 -0
  44. package/lib/module/atoms/rn-icon/rn-icon.types.js.map +1 -0
  45. package/lib/module/atoms/surface/surface.android.js +33 -5
  46. package/lib/module/atoms/surface/surface.android.js.map +1 -1
  47. package/lib/module/atoms/switch/switch.android.js +14 -1
  48. package/lib/module/atoms/switch/switch.android.js.map +1 -1
  49. package/lib/module/glyph/glyph-button.android.js +25 -0
  50. package/lib/module/glyph/glyph-button.android.js.map +1 -0
  51. package/lib/module/glyph/glyph-button.ios.js +33 -0
  52. package/lib/module/glyph/glyph-button.ios.js.map +1 -0
  53. package/lib/module/glyph/glyph-button.types.js +4 -0
  54. package/lib/module/glyph/glyph-button.types.js.map +1 -0
  55. package/lib/module/glyph/glyph.android.js +20 -0
  56. package/lib/module/glyph/glyph.android.js.map +1 -0
  57. package/lib/module/glyph/glyph.ios.js +24 -0
  58. package/lib/module/glyph/glyph.ios.js.map +1 -0
  59. package/lib/module/glyph/glyph.types.js +4 -0
  60. package/lib/module/glyph/glyph.types.js.map +1 -0
  61. package/lib/module/glyph/index.js +8 -0
  62. package/lib/module/glyph/index.js.map +1 -0
  63. package/lib/module/glyph/rn-glyph.android.js +25 -0
  64. package/lib/module/glyph/rn-glyph.android.js.map +1 -0
  65. package/lib/module/glyph/rn-glyph.ios.js +26 -0
  66. package/lib/module/glyph/rn-glyph.ios.js.map +1 -0
  67. package/lib/module/molecules/collapsible/collapsible.android.js +2 -2
  68. package/lib/module/molecules/collapsible/collapsible.android.js.map +1 -1
  69. package/lib/module/molecules/labeled-content/labeled-content.js +2 -1
  70. package/lib/module/molecules/labeled-content/labeled-content.js.map +1 -1
  71. package/lib/module/molecules/list-item/list-item.js +2 -1
  72. package/lib/module/molecules/list-item/list-item.js.map +1 -1
  73. package/lib/module/molecules/navigation-bar/navigation-bar.android.js +8 -4
  74. package/lib/module/molecules/navigation-bar/navigation-bar.android.js.map +1 -1
  75. package/lib/module/molecules/radio-group/radio-group.android.js +5 -0
  76. package/lib/module/molecules/radio-group/radio-group.android.js.map +1 -1
  77. package/lib/module/molecules/radio-group/radio-group.ios.js +2 -2
  78. package/lib/module/molecules/radio-group/radio-group.ios.js.map +1 -1
  79. package/lib/module/molecules/search-bar/search-bar.js +10 -23
  80. package/lib/module/molecules/search-bar/search-bar.js.map +1 -1
  81. package/lib/module/molecules/stepper/stepper.android.js +7 -5
  82. package/lib/module/molecules/stepper/stepper.android.js.map +1 -1
  83. package/lib/module/organisms/alert/alert.android.js +42 -13
  84. package/lib/module/organisms/alert/alert.android.js.map +1 -1
  85. package/lib/module/organisms/context-menu/context-menu.android.js +82 -31
  86. package/lib/module/organisms/context-menu/context-menu.android.js.map +1 -1
  87. package/lib/module/organisms/context-menu/context-menu.ios.js +37 -16
  88. package/lib/module/organisms/context-menu/context-menu.ios.js.map +1 -1
  89. package/lib/module/organisms/fab-menu/fab-menu.android.js +6 -2
  90. package/lib/module/organisms/fab-menu/fab-menu.android.js.map +1 -1
  91. package/lib/module/organisms/fab-menu/fab-menu.ios.js +15 -6
  92. package/lib/module/organisms/fab-menu/fab-menu.ios.js.map +1 -1
  93. package/lib/module/organisms/form/form.android.js +1 -0
  94. package/lib/module/organisms/form/form.android.js.map +1 -1
  95. package/lib/module/organisms/index.js +0 -1
  96. package/lib/module/organisms/index.js.map +1 -1
  97. package/lib/module/organisms/menu/menu.android.js +51 -33
  98. package/lib/module/organisms/menu/menu.android.js.map +1 -1
  99. package/lib/typescript/atoms/button/button-tokens.d.ts +6 -1
  100. package/lib/typescript/atoms/date-picker/date-picker.d.ts +1 -2
  101. package/lib/typescript/atoms/date-picker/date-picker.ios.d.ts +3 -0
  102. package/lib/typescript/atoms/glass-view/glass-fallback.d.ts +4 -1
  103. package/lib/typescript/atoms/glass-view/glass-view.types.d.ts +1 -1
  104. package/lib/typescript/atoms/icon/icon.ios.d.ts +4 -0
  105. package/lib/typescript/atoms/icon/icon.types.d.ts +18 -1
  106. package/lib/typescript/atoms/icon/index.d.ts +0 -1
  107. package/lib/typescript/atoms/index.d.ts +1 -1
  108. package/lib/typescript/atoms/list/list.types.d.ts +9 -0
  109. package/lib/typescript/atoms/picker/picker.d.ts +1 -2
  110. package/lib/typescript/atoms/picker/picker.ios.d.ts +2 -0
  111. package/lib/typescript/atoms/rn-icon/index.d.ts +2 -0
  112. package/lib/typescript/atoms/rn-icon/rn-icon.d.ts +1 -0
  113. package/lib/typescript/atoms/rn-icon/rn-icon.ios.d.ts +3 -0
  114. package/lib/typescript/atoms/rn-icon/rn-icon.types.d.ts +5 -0
  115. package/lib/typescript/glyph/glyph-button.d.ts +1 -0
  116. package/lib/typescript/glyph/glyph-button.ios.d.ts +2 -0
  117. package/lib/typescript/glyph/glyph-button.types.d.ts +10 -0
  118. package/lib/typescript/glyph/glyph.d.ts +1 -0
  119. package/lib/typescript/glyph/glyph.ios.d.ts +3 -0
  120. package/lib/typescript/glyph/glyph.types.d.ts +13 -0
  121. package/lib/typescript/glyph/index.d.ts +5 -0
  122. package/lib/typescript/glyph/rn-glyph.d.ts +1 -0
  123. package/lib/typescript/glyph/rn-glyph.ios.d.ts +3 -0
  124. package/lib/typescript/molecules/scroll-edge-container/scroll-edge-container.types.d.ts +3 -0
  125. package/lib/typescript/organisms/context-menu/context-menu.types.d.ts +28 -2
  126. package/lib/typescript/organisms/fab-menu/fab-menu.types.d.ts +1 -1
  127. package/lib/typescript/organisms/form/form.types.d.ts +5 -0
  128. package/lib/typescript/organisms/index.d.ts +0 -1
  129. package/package.json +5 -7
  130. package/src/atoms/badge/badge.android.tsx +5 -2
  131. package/src/atoms/button/button-tokens.ts +49 -0
  132. package/src/atoms/button/button.android.tsx +46 -12
  133. package/src/atoms/button/button.ios.tsx +5 -2
  134. package/src/atoms/checkbox/checkbox.android.tsx +21 -4
  135. package/src/atoms/date-picker/date-picker.android.tsx +74 -0
  136. package/src/atoms/date-picker/date-picker.ios.tsx +27 -0
  137. package/src/atoms/fab/fab.android.tsx +4 -1
  138. package/src/atoms/glass-view/glass-fallback.tsx +5 -2
  139. package/src/atoms/glass-view/glass-view.types.ts +1 -1
  140. package/src/atoms/icon/icon.android.tsx +11 -7
  141. package/src/atoms/icon/icon.ios.tsx +25 -5
  142. package/src/atoms/icon/icon.types.ts +18 -24
  143. package/src/atoms/icon/index.ts +0 -1
  144. package/src/atoms/index.ts +1 -1
  145. package/src/atoms/list/list.android.tsx +12 -1
  146. package/src/atoms/list/list.types.ts +9 -0
  147. package/src/atoms/picker/picker.android.tsx +88 -0
  148. package/src/atoms/rn-icon/index.ts +2 -0
  149. package/src/atoms/rn-icon/rn-icon.android.tsx +28 -0
  150. package/src/atoms/rn-icon/rn-icon.ios.tsx +28 -0
  151. package/src/atoms/rn-icon/rn-icon.types.ts +8 -0
  152. package/src/atoms/surface/surface.android.tsx +28 -4
  153. package/src/atoms/switch/switch.android.tsx +24 -3
  154. package/src/glyph/glyph-button.android.tsx +25 -0
  155. package/src/glyph/glyph-button.ios.tsx +37 -0
  156. package/src/glyph/glyph-button.types.ts +12 -0
  157. package/src/glyph/glyph.android.tsx +12 -0
  158. package/src/glyph/glyph.ios.tsx +15 -0
  159. package/src/glyph/glyph.types.ts +15 -0
  160. package/src/glyph/index.ts +5 -0
  161. package/src/glyph/rn-glyph.android.tsx +14 -0
  162. package/src/glyph/rn-glyph.ios.tsx +16 -0
  163. package/src/molecules/collapsible/collapsible.android.tsx +2 -2
  164. package/src/molecules/labeled-content/labeled-content.tsx +2 -1
  165. package/src/molecules/list-item/list-item.tsx +2 -1
  166. package/src/molecules/navigation-bar/navigation-bar.android.tsx +11 -4
  167. package/src/molecules/radio-group/radio-group.android.tsx +11 -2
  168. package/src/molecules/radio-group/radio-group.ios.tsx +2 -2
  169. package/src/molecules/scroll-edge-container/scroll-edge-container.types.ts +3 -0
  170. package/src/molecules/search-bar/search-bar.tsx +4 -9
  171. package/src/molecules/stepper/stepper.android.tsx +3 -3
  172. package/src/organisms/alert/alert.android.tsx +44 -7
  173. package/src/organisms/context-menu/context-menu.android.tsx +71 -37
  174. package/src/organisms/context-menu/context-menu.ios.tsx +40 -18
  175. package/src/organisms/context-menu/context-menu.types.ts +29 -3
  176. package/src/organisms/fab-menu/fab-menu.android.tsx +3 -2
  177. package/src/organisms/fab-menu/fab-menu.ios.tsx +13 -12
  178. package/src/organisms/fab-menu/fab-menu.types.ts +1 -1
  179. package/src/organisms/form/form.android.tsx +1 -1
  180. package/src/organisms/form/form.types.ts +5 -0
  181. package/src/organisms/index.ts +0 -1
  182. package/src/organisms/menu/menu.android.tsx +36 -30
  183. package/CHANGELOG.md +0 -14
  184. package/lib/module/atoms/countdown/countdown-frame.js +0 -115
  185. package/lib/module/atoms/countdown/countdown-frame.js.map +0 -1
  186. package/lib/module/atoms/countdown/countdown-units.js +0 -25
  187. package/lib/module/atoms/countdown/countdown-units.js.map +0 -1
  188. package/lib/module/atoms/countdown/countdown.android.js +0 -53
  189. package/lib/module/atoms/countdown/countdown.android.js.map +0 -1
  190. package/lib/module/atoms/countdown/countdown.ios.js +0 -50
  191. package/lib/module/atoms/countdown/countdown.ios.js.map +0 -1
  192. package/lib/module/atoms/countdown/countdown.types.js +0 -4
  193. package/lib/module/atoms/countdown/countdown.types.js.map +0 -1
  194. package/lib/module/atoms/countdown/index.js +0 -5
  195. package/lib/module/atoms/countdown/index.js.map +0 -1
  196. package/lib/module/atoms/date-picker/date-picker.js.map +0 -1
  197. package/lib/module/atoms/icon/icon-names.js +0 -53
  198. package/lib/module/atoms/icon/icon-names.js.map +0 -1
  199. package/lib/module/atoms/picker/picker.js.map +0 -1
  200. package/lib/module/organisms/rn-context-menu/index.js +0 -5
  201. package/lib/module/organisms/rn-context-menu/index.js.map +0 -1
  202. package/lib/module/organisms/rn-context-menu/rn-context-menu.android.js +0 -101
  203. package/lib/module/organisms/rn-context-menu/rn-context-menu.android.js.map +0 -1
  204. package/lib/module/organisms/rn-context-menu/rn-context-menu.ios.js +0 -44
  205. package/lib/module/organisms/rn-context-menu/rn-context-menu.ios.js.map +0 -1
  206. package/lib/module/organisms/rn-context-menu/rn-context-menu.types.js +0 -4
  207. package/lib/module/organisms/rn-context-menu/rn-context-menu.types.js.map +0 -1
  208. package/lib/typescript/atoms/countdown/countdown-frame.d.ts +0 -17
  209. package/lib/typescript/atoms/countdown/countdown-units.d.ts +0 -5
  210. package/lib/typescript/atoms/countdown/countdown.d.ts +0 -1
  211. package/lib/typescript/atoms/countdown/countdown.ios.d.ts +0 -2
  212. package/lib/typescript/atoms/countdown/countdown.types.d.ts +0 -21
  213. package/lib/typescript/atoms/countdown/index.d.ts +0 -2
  214. package/lib/typescript/atoms/icon/icon-names.d.ts +0 -50
  215. package/lib/typescript/organisms/rn-context-menu/index.d.ts +0 -2
  216. package/lib/typescript/organisms/rn-context-menu/rn-context-menu.d.ts +0 -1
  217. package/lib/typescript/organisms/rn-context-menu/rn-context-menu.ios.d.ts +0 -2
  218. package/lib/typescript/organisms/rn-context-menu/rn-context-menu.types.d.ts +0 -33
  219. package/src/atoms/countdown/countdown-frame.tsx +0 -123
  220. package/src/atoms/countdown/countdown-units.ts +0 -37
  221. package/src/atoms/countdown/countdown.android.tsx +0 -49
  222. package/src/atoms/countdown/countdown.ios.tsx +0 -46
  223. package/src/atoms/countdown/countdown.types.ts +0 -24
  224. package/src/atoms/countdown/index.ts +0 -2
  225. package/src/atoms/date-picker/date-picker.tsx +0 -26
  226. package/src/atoms/icon/icon-names.ts +0 -53
  227. package/src/organisms/rn-context-menu/index.ts +0 -2
  228. package/src/organisms/rn-context-menu/rn-context-menu.android.tsx +0 -90
  229. package/src/organisms/rn-context-menu/rn-context-menu.ios.tsx +0 -47
  230. package/src/organisms/rn-context-menu/rn-context-menu.types.ts +0 -36
  231. /package/src/atoms/picker/{picker.tsx → picker.ios.tsx} +0 -0
@@ -1,23 +1,44 @@
1
1
  "use strict";
2
2
 
3
- import { Button, ContextMenu as SwiftUIContextMenu } from '@expo/ui/swift-ui';
4
- import { useHostGuard } from "../../host-context.js";
5
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
- export const ContextMenu = ({
3
+ import { iconResourceName } from '@hzblj/kara-native';
4
+ import { ContextMenu as NativeContextMenu, ContextMenuExclusion as NativeContextMenuExclusion } from '@hzblj/kara-native/swift-ui';
5
+ import { useSx } from '@hzblj/kara-sx';
6
+ import { useCallback, useMemo } from 'react';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ const ContextMenuRoot = ({
7
9
  actions,
8
- children
10
+ children,
11
+ onPreviewPress,
12
+ preview,
13
+ testID,
14
+ ...sx
9
15
  }) => {
10
- useHostGuard('ContextMenu');
11
- return /*#__PURE__*/_jsxs(SwiftUIContextMenu, {
12
- children: [/*#__PURE__*/_jsx(SwiftUIContextMenu.Items, {
13
- children: actions.map(action => /*#__PURE__*/_jsx(Button, {
14
- label: action.label,
15
- onPress: action.onPress,
16
- role: action.destructive ? 'destructive' : 'default'
17
- }, action.label))
18
- }), /*#__PURE__*/_jsx(SwiftUIContextMenu.Trigger, {
19
- children: children
20
- })]
16
+ const style = useSx(sx);
17
+
18
+ /** The native side hands back an id; the index is the one identity every action has. */
19
+ const items = useMemo(() => actions.map((action, index) => ({
20
+ destructive: action.destructive,
21
+ id: String(index),
22
+ image: action.icon ? iconResourceName(action.icon) : undefined,
23
+ title: action.label
24
+ })), [actions]);
25
+ const onSelectItem = useCallback(id => actions[Number(id)]?.onPress(), [actions]);
26
+ return /*#__PURE__*/_jsx(NativeContextMenu, {
27
+ items: items,
28
+ onPreviewPress: onPreviewPress,
29
+ onSelectItem: onSelectItem,
30
+ preview: preview,
31
+ style: style,
32
+ testID: testID,
33
+ children: children
21
34
  });
22
35
  };
36
+ const Exclusion = ({
37
+ children
38
+ }) => /*#__PURE__*/_jsx(NativeContextMenuExclusion, {
39
+ children: children
40
+ });
41
+ export const ContextMenu = Object.assign(ContextMenuRoot, {
42
+ Exclusion
43
+ });
23
44
  //# sourceMappingURL=context-menu.ios.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Button","ContextMenu","SwiftUIContextMenu","useHostGuard","jsx","_jsx","jsxs","_jsxs","actions","children","Items","map","action","label","onPress","role","destructive","Trigger"],"sourceRoot":"../../../../src","sources":["organisms/context-menu/context-menu.ios.tsx"],"mappings":";;AAAA,SAAQA,MAAM,EAAEC,WAAW,IAAIC,kBAAkB,QAAO,mBAAmB;AAE3E,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,OAAO,MAAMN,WAAiC,GAAGA,CAAC;EAACO,OAAO;EAAEC;AAA0B,CAAC,KAAK;EAC1FN,YAAY,CAAC,aAAa,CAAC;EAE3B,oBACEI,KAAA,CAACL,kBAAkB;IAAAO,QAAA,gBACjBJ,IAAA,CAACH,kBAAkB,CAACQ,KAAK;MAAAD,QAAA,EACtBD,OAAO,CAACG,GAAG,CAACC,MAAM,iBACjBP,IAAA,CAACL,MAAM;QAELa,KAAK,EAAED,MAAM,CAACC,KAAM;QACpBC,OAAO,EAAEF,MAAM,CAACE,OAAQ;QACxBC,IAAI,EAAEH,MAAM,CAACI,WAAW,GAAG,aAAa,GAAG;MAAU,GAHhDJ,MAAM,CAACC,KAIb,CACF;IAAC,CACsB,CAAC,eAC3BR,IAAA,CAACH,kBAAkB,CAACe,OAAO;MAAAR,QAAA,EAAEA;IAAQ,CAA6B,CAAC;EAAA,CACjD,CAAC;AAEzB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["iconResourceName","ContextMenu","NativeContextMenu","ContextMenuExclusion","NativeContextMenuExclusion","useSx","useCallback","useMemo","jsx","_jsx","ContextMenuRoot","actions","children","onPreviewPress","preview","testID","sx","style","items","map","action","index","destructive","id","String","image","icon","undefined","title","label","onSelectItem","Number","onPress","Exclusion","Object","assign"],"sourceRoot":"../../../../src","sources":["organisms/context-menu/context-menu.ios.tsx"],"mappings":";;AAAA,SAAQA,gBAAgB,QAAO,oBAAoB;AACnD,SAEEC,WAAW,IAAIC,iBAAiB,EAChCC,oBAAoB,IAAIC,0BAA0B,QAC7C,6BAA6B;AACpC,SAAQC,KAAK,QAAO,gBAAgB;AACpC,SAAQC,WAAW,EAAEC,OAAO,QAAO,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG1C,MAAMC,eAAe,GAAGA,CAAC;EAACC,OAAO;EAAEC,QAAQ;EAAEC,cAAc;EAAEC,OAAO;EAAEC,MAAM;EAAE,GAAGC;AAAoB,CAAC,KAAK;EACzG,MAAMC,KAAK,GAAGZ,KAAK,CAACW,EAAE,CAAC;;EAEvB;EACA,MAAME,KAAK,GAAGX,OAAO,CACnB,MACEI,OAAO,CAACQ,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,MAAM;IAC9BC,WAAW,EAAEF,MAAM,CAACE,WAAW;IAC/BC,EAAE,EAAEC,MAAM,CAACH,KAAK,CAAC;IACjBI,KAAK,EAAEL,MAAM,CAACM,IAAI,GAAG1B,gBAAgB,CAACoB,MAAM,CAACM,IAAI,CAAC,GAAGC,SAAS;IAC9DC,KAAK,EAAER,MAAM,CAACS;EAChB,CAAC,CAAC,CAAC,EACL,CAAClB,OAAO,CACV,CAAC;EAED,MAAMmB,YAAY,GAAGxB,WAAW,CAAEiB,EAAU,IAAKZ,OAAO,CAACoB,MAAM,CAACR,EAAE,CAAC,CAAC,EAAES,OAAO,CAAC,CAAC,EAAE,CAACrB,OAAO,CAAC,CAAC;EAE3F,oBACEF,IAAA,CAACP,iBAAiB;IAChBgB,KAAK,EAAEA,KAAM;IACbL,cAAc,EAAEA,cAAe;IAC/BiB,YAAY,EAAEA,YAAa;IAC3BhB,OAAO,EAAEA,OAAQ;IACjBG,KAAK,EAAEA,KAAM;IACbF,MAAM,EAAEA,MAAO;IAAAH,QAAA,EAEdA;EAAQ,CACQ,CAAC;AAExB,CAAC;AAED,MAAMqB,SAAS,GAAGA,CAAC;EAACrB;AAAmC,CAAC,kBACtDH,IAAA,CAACL,0BAA0B;EAAAQ,QAAA,EAAEA;AAAQ,CAA6B,CACnE;AAED,OAAO,MAAMX,WAAiC,GAAGiC,MAAM,CAACC,MAAM,CAACzB,eAAe,EAAE;EAACuB;AAAS,CAAC,CAAC","ignoreList":[]}
@@ -5,6 +5,7 @@ import { FloatingActionButtonMenu, FloatingActionButtonMenuItem, ToggleFloatingA
5
5
  import { useAppTheme } from '@hzblj/kara-theme';
6
6
  import { useCallback, useState } from 'react';
7
7
  import { Icon } from "../../atoms/icon/index.js";
8
+ import { Glyph } from "../../glyph/index.js";
8
9
  import { useHostGuard } from "../../host-context.js";
9
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
11
  /** A row's `onClick` closes over its own action, so memoising it needs a component per row. */
@@ -40,7 +41,7 @@ const FabMenuRow = ({
40
41
  */
41
42
  export const FabMenu = ({
42
43
  actions,
43
- icon = 'add'
44
+ icon
44
45
  }) => {
45
46
  useHostGuard('FabMenu');
46
47
  const theme = useAppTheme();
@@ -58,9 +59,12 @@ export const FabMenu = ({
58
59
  containerColor: theme.color('fill.accent.primary'),
59
60
  onCheckedChange: setExpanded,
60
61
  children: /*#__PURE__*/_jsx(ToggleFloatingActionButton.Icon, {
61
- children: /*#__PURE__*/_jsx(Icon, {
62
+ children: icon ? /*#__PURE__*/_jsx(Icon, {
62
63
  color: "content.on.bg",
63
64
  name: icon
65
+ }) : /*#__PURE__*/_jsx(Glyph, {
66
+ color: "content.on.bg",
67
+ name: "plus"
64
68
  })
65
69
  })
66
70
  })
@@ -1 +1 @@
1
- {"version":3,"names":["Text","ComposeText","FloatingActionButtonMenu","FloatingActionButtonMenuItem","ToggleFloatingActionButton","useAppTheme","useCallback","useState","Icon","useHostGuard","jsx","_jsx","jsxs","_jsxs","FabMenuRow","action","onSelect","theme","onClick","containerColor","color","contentColor","children","icon","name","colorString","style","typography","labelMedium","label","FabMenu","actions","expanded","setExpanded","onPress","horizontalAlignment","Button","checked","onCheckedChange","map"],"sourceRoot":"../../../../src","sources":["organisms/fab-menu/fab-menu.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,IAAIC,WAAW,QAAO,0BAA0B;AAC5D,SACEC,wBAAwB,EACxBC,4BAA4B,EAC5BC,0BAA0B,QACrB,oCAAoC;AAC3C,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,WAAW,EAAEC,QAAQ,QAAO,OAAO;AAC3C,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS/C;AACA,MAAMC,UAAU,GAAGA,CAAC;EAACC,MAAM;EAAEC;AAAyB,CAAC,KAAK;EAC1D,MAAMC,KAAK,GAAGZ,WAAW,CAAC,CAAC;EAC3B,MAAMa,OAAO,GAAGZ,WAAW,CAAC,MAAMU,QAAQ,CAACD,MAAM,CAAC,EAAE,CAACA,MAAM,EAAEC,QAAQ,CAAC,CAAC;EAEvE,oBACEH,KAAA,CAACV,4BAA4B;IAC3BgB,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC,qBAAqB,CAAE;IACnDC,YAAY,EAAEJ,KAAK,CAACG,KAAK,CAAC,eAAe,CAAE;IAC3CF,OAAO,EAAEA,OAAQ;IAAA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A,eAE7BX,IAAA,CAACP,0BAA0B,CAACI,IAAI;UAAAc,QAAA,eAC9BX,IAAA,CAACH,IAAI;YAACY,KAAK,EAAC,eAAe;YAACI,IAAI,EAAED;UAAK,CAAE;QAAC,CACX;MAAC,CACR;IAAC,CACE,CAAC,EACjCQ,OAAO,CAACQ,GAAG,CAACxB,MAAM,iBACjBJ,IAAA,CAACG,UAAU;MAACC,MAAM,EAAEA,MAAO;MAAoBC,QAAQ,EAAEA;IAAS,GAAjCD,MAAM,CAACc,KAA4B,CACrE,CAAC;EAAA,CACsB,CAAC;AAE/B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Text","ComposeText","FloatingActionButtonMenu","FloatingActionButtonMenuItem","ToggleFloatingActionButton","useAppTheme","useCallback","useState","Icon","Glyph","useHostGuard","jsx","_jsx","jsxs","_jsxs","FabMenuRow","action","onSelect","theme","onClick","containerColor","color","contentColor","children","icon","name","colorString","style","typography","labelMedium","label","FabMenu","actions","expanded","setExpanded","onPress","horizontalAlignment","Button","checked","onCheckedChange","map"],"sourceRoot":"../../../../src","sources":["organisms/fab-menu/fab-menu.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,IAAIC,WAAW,QAAO,0BAA0B;AAC5D,SACEC,wBAAwB,EACxBC,4BAA4B,EAC5BC,0BAA0B,QACrB,oCAAoC;AAC3C,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,WAAW,EAAEC,QAAQ,QAAO,OAAO;AAC3C,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,KAAK,QAAO,sBAAa;AACjC,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS/C;AACA,MAAMC,UAAU,GAAGA,CAAC;EAACC,MAAM;EAAEC;AAAyB,CAAC,KAAK;EAC1D,MAAMC,KAAK,GAAGb,WAAW,CAAC,CAAC;EAC3B,MAAMc,OAAO,GAAGb,WAAW,CAAC,MAAM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AS;IAACG,mBAAmB,EAAC,KAAK;IAAAb,QAAA,gBACrEX,IAAA,CAACV,wBAAwB,CAACmC,MAAM;MAAAd,QAAA,eAC9BX,IAAA,CAACR,0BAA0B;QACzBkC,OAAO,EAAEL,QAAS;QAClBb,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC,qBAAqB,CAAE;QACnDkB,eAAe,EAAEL,WAAY;QAAAX,QAAA,eAE7BX,IAAA,CAACR,0BAA0B,CAACI,IAAI;UAAAe,QAAA,EAC7BC,IAAI,gBAAGZ,IAAA,CAACJ,IAAI;YAACa,KAAK,EAAC,eAAe;YAACI,IAAI,EAAED;UAAK,CAAE,CAAC,gBAAGZ,IAAA,CAACH,KAAK;YAACY,KAAK,EAAC,eAAe;YAACI,IAAI,EAAC;UAAM,CAAE;QAAC,CACjE;MAAC,CACR;IAAC,CACE,CAAC,EACjCO,OAAO,CAACQ,GAAG,CAACxB,MAAM,iBACjBJ,IAAA,CAACG,UAAU;MAACC,MAAM,EAAEA,MAAO;MAAoBC,QAAQ,EAAEA;IAAS,GAAjCD,MAAM,CAACc,KAA4B,CACrE,CAAC;EAAA,CACsB,CAAC;AAE/B,CAAC","ignoreList":[]}
@@ -1,15 +1,17 @@
1
1
  "use strict";
2
2
 
3
- import { Button, Menu } from '@expo/ui/swift-ui';
4
- import { Icon, SF_SYMBOLS } from "../../atoms/icon/index.js";
3
+ import { Button, Image, Label, Menu } from '@expo/ui/swift-ui';
4
+ import { iconResourceName } from '@hzblj/kara-native';
5
+ import { Icon } from "../../atoms/icon/index.js";
5
6
  import { VStack } from "../../atoms/v-stack/index.js";
7
+ import { Glyph } from "../../glyph/index.js";
6
8
  import { useHostGuard } from "../../host-context.js";
7
9
  import { jsx as _jsx } from "react/jsx-runtime";
8
10
  /** Matches `Fab`, so a screen can switch between the two without the button changing shape. */
9
11
  const FAB_SIZE = 56;
10
12
  export const FabMenu = ({
11
13
  actions,
12
- icon = 'add',
14
+ icon,
13
15
  testID
14
16
  }) => {
15
17
  useHostGuard('FabMenu');
@@ -22,17 +24,24 @@ export const FabMenu = ({
22
24
  p: "s16",
23
25
  shadow: "btn.accent",
24
26
  w: FAB_SIZE,
25
- children: /*#__PURE__*/_jsx(Icon, {
27
+ children: icon ? /*#__PURE__*/_jsx(Icon, {
26
28
  color: "content.on.bg",
27
29
  name: icon
30
+ }) : /*#__PURE__*/_jsx(Glyph, {
31
+ color: "content.on.bg",
32
+ name: "plus"
28
33
  })
29
34
  }),
30
35
  testID: testID,
31
36
  children: actions.map(action => /*#__PURE__*/_jsx(Button, {
32
- label: action.label,
33
37
  onPress: action.onPress,
34
38
  role: action.destructive ? 'destructive' : 'default',
35
- systemImage: action.icon ? SF_SYMBOLS[action.icon] : undefined
39
+ children: /*#__PURE__*/_jsx(Label, {
40
+ icon: action.icon ? /*#__PURE__*/_jsx(Image, {
41
+ assetName: iconResourceName(action.icon)
42
+ }) : undefined,
43
+ title: action.label
44
+ })
36
45
  }, action.label))
37
46
  });
38
47
  };
@@ -1 +1 @@
1
- {"version":3,"names":["Button","Menu","Icon","SF_SYMBOLS","VStack","useHostGuard","jsx","_jsx","FAB_SIZE","FabMenu","actions","icon","testID","label","align","bg","borderRadius","h","p","shadow","w","children","color","name","map","action","onPress","role","destructive","systemImage","undefined"],"sourceRoot":"../../../../src","sources":["organisms/fab-menu/fab-menu.ios.tsx"],"mappings":";;AAAA,SAAQA,MAAM,EAAEC,IAAI,QAAO,mBAAmB;AAG9C,SAAQC,IAAI,EAAEC,UAAU,QAAO,2BAAkB;AACjD,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C;AACA,MAAMC,QAAQ,GAAG,EAAE;AAEnB,OAAO,MAAMC,OAAyB,GAAGA,CAAC;EAACC,OAAO;EAAEC,IAAI,GAAG,KAAK;EAAEC;AAAoB,CAAC,KAAK;EAC1FP,YAAY,CAAC,SAAS,CAAC;EAEvB,oBACEE,IAAA,CAACN,IAAI;IACHY,KAAK,eACHN,IAAA,CAACH,MAAM;MACLU,KAAK,EAAC,QAAQ;MACdC,EAAE,EAAC,qBAAqB;MACxBC,YAAY,EAAC,MAAM;MACnBC,CAAC,EAAET,QAAS;MACZU,CAAC,EAAC,KAAK;MACPC,MAAM,EAAC,YAAY;MACnBC,CAAC,EAAEZ,QAAS;MAAAa,QAAA,eAEZd,IAAA,CAACL,IAAI;QAACoB,KAAK,EAAC,eAAe;QAACC,IAAI,EAAEZ;MAAK,CAAE;IAAC,CACpC,CACT;IACDC,MAAM,EAAEA,MAAO;IAAAS,QAAA,EAEdX,OAAO,CAACc,GAAG,CAACC,MAAM,iBACjBlB,IAAA,CAACP,MAAM;MAELa,KAAK,EAAEY,MAAM,CAACZ,KAAM;MACpBa,OAAO,EAAED,MAAM,CAACC,OAAQ;MACxBC,IAAI,EAAEF,MAAM,CAACG,WAAW,GAAG,aAAa,GAAG,SAAU;MACrDC,WAAW,EAAEJ,MAAM,CAACd,IAAI,GAAIR,UAAU,CAACsB,MAAM,CAACd,IAAI,CAAC,GAAgBmB;IAAU,GAJxEL,MAAM,CAACZ,KAKb,CACF;EAAC,CACE,CAAC;AAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Button","Image","Label","Menu","iconResourceName","Icon","VStack","Glyph","useHostGuard","jsx","_jsx","FAB_SIZE","FabMenu","actions","icon","testID","label","align","bg","borderRadius","h","p","shadow","w","children","color","name","map","action","onPress","role","destructive","assetName","undefined","title"],"sourceRoot":"../../../../src","sources":["organisms/fab-menu/fab-menu.ios.tsx"],"mappings":";;AAAA,SAAQA,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,QAAO,mBAAmB;AAC5D,SAAQC,gBAAgB,QAAO,oBAAoB;AAEnD,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,KAAK,QAAO,sBAAa;AACjC,SAAQC,YAAY,QAAO,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: "labelMedium",
31
31
  children: title
32
32
  }) : null, /*#__PURE__*/_jsx(Card, {
33
+ wide: true,
33
34
  children: children
34
35
  }), footer ? /*#__PURE__*/_jsx(Text, {
35
36
  color: "content.tertiary",
@@ -1 +1 @@
1
- {"version":3,"names":["Card","Text","VStack","useHostGuard","jsx","_jsx","jsxs","_jsxs","FormRoot","children","testID","spacing","wide","FormSection","footer","title","color","transform","variant","Form","Object","assign","Section"],"sourceRoot":"../../../../src","sources":["organisms/form/form.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,QAAO,2BAAkB;AACrC,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,MAAMC,QAAQ,GAAGA,CAAC;EAACC,QAAQ;EAAEC;AAAiB,CAAC,KAAK;EAClDP,YAAY,CAAC,MAAM,CAAC;EAEpB,oBACEE,IAAA,CAACH,MAAM;IAACS,OAAO,EAAC,KAAK;IAACD,MAAM,EAAEA,MAAO;IAACE,IAAI;IAAAH,QAAA,EACvCA;EAAQ,CACH,CAAC;AAEb,CAAC;AAED,MAAMI,WAAW,GAAGA,CAAC;EAACJ,QAAQ;EAAEK,MAAM;EAAEC;AAAuB,CAAC,kBAC9DR,KAAA,CAACL,MAAM;EAACS,OAAO,EAAC,IAAI;EAACC,IAAI;EAAAH,QAAA,GACtBM,KAAK,gBACJV,IAAA,CAACJ,IAAI;IAACe,KAAK,EAAC,mBAAmB;IAACC,SAAS,EAAC,WAAW;IAACC,OAAO,EAAC,aAAa;IAAAT,QAAA,EACxEM;EAAK,CACF,CAAC,GACL,IAAI,eACRV,IAAA,CAACL,IAAI;IAAAS,QAAA,EAAEA;EAAQ,CAAO,CAAC,EACtBK,MAAM,gBACLT,IAAA,CAACJ,IAAI;IAACe,KAAK,EAAC,kBAAkB;IAACE,OAAO,EAAC,UAAU;IAAAT,QAAA,EAC9CK;EAAM,CACH,CAAC,GACL,IAAI;AAAA,CACF,CACT;AAED,OAAO,MAAMK,IAAmB,GAAGC,MAAM,CAACC,MAAM,CAACb,QAAQ,EAAE;EAACc,OAAO,EAAET;AAAW,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Card","Text","VStack","useHostGuard","jsx","_jsx","jsxs","_jsxs","FormRoot","children","testID","spacing","wide","FormSection","footer","title","color","transform","variant","Form","Object","assign","Section"],"sourceRoot":"../../../../src","sources":["organisms/form/form.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,QAAO,2BAAkB;AACrC,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,MAAMC,QAAQ,GAAGA,CAAC;EAACC,QAAQ;EAAEC;AAAiB,CAAC,KAAK;EAClDP,YAAY,CAAC,MAAM,CAAC;EAEpB,oBACEE,IAAA,CAACH,MAAM;IAACS,OAAO,EAAC,KAAK;IAACD,MAAM,EAAEA,MAAO;IAACE,IAAI;IAAAH,QAAA,EACvCA;EAAQ,CACH,CAAC;AAEb,CAAC;AAED,MAAMI,WAAW,GAAGA,CAAC;EAACJ,QAAQ;EAAEK,MAAM;EAAEC;AAAuB,CAAC,kBAC9DR,KAAA,CAACL,MAAM;EAACS,OAAO,EAAC,IAAI;EAACC,IAAI;EAAAH,QAAA,GACtBM,KAAK,gBACJV,IAAA,CAACJ,IAAI;IAACe,KAAK,EAAC,mBAAmB;IAACC,SAAS,EAAC,WAAW;IAACC,OAAO,EAAC,aAAa;IAAAT,QAAA,EACxEM;EAAK,CACF,CAAC,GACL,IAAI,eACRV,IAAA,CAACL,IAAI;IAACY,IAAI;IAAAH,QAAA,EAAEA;EAAQ,CAAO,CAAC,EAC3BK,MAAM,gBACLT,IAAA,CAACJ,IAAI;IAACe,KAAK,EAAC,kBAAkB;IAACE,OAAO,EAAC,UAAU;IAAAT,QAAA,EAC9CK;EAAM,CACH,CAAC,GACL,IAAI;AAAA,CACF,CACT;AAED,OAAO,MAAMK,IAAmB,GAAGC,MAAM,CAACC,MAAM,CAACb,QAAQ,EAAE;EAACc,OAAO,EAAET;AAAW,CAAC,CAAC","ignoreList":[]}
@@ -6,7 +6,6 @@ export * from "./context-menu/index.js";
6
6
  export * from "./fab-menu/index.js";
7
7
  export * from "./form/index.js";
8
8
  export * from "./menu/index.js";
9
- export * from "./rn-context-menu/index.js";
10
9
  export * from "./sheet/index.js";
11
10
  export * from "./snackbar/index.js";
12
11
  export * from "./swipe-actions/index.js";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["organisms/index.ts"],"mappings":";;AAAA,cAAc,yBAAgB;AAC9B,cAAc,kBAAS;AACvB,cAAc,yBAAgB;AAC9B,cAAc,qBAAY;AAC1B,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,4BAAmB;AACjC,cAAc,kBAAS;AACvB,cAAc,qBAAY;AAC1B,cAAc,0BAAiB","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["organisms/index.ts"],"mappings":";;AAAA,cAAc,yBAAgB;AAC9B,cAAc,kBAAS;AACvB,cAAc,yBAAgB;AAC9B,cAAc,qBAAY;AAC1B,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,kBAAS;AACvB,cAAc,qBAAY;AAC1B,cAAc,0BAAiB","ignoreList":[]}
@@ -1,62 +1,80 @@
1
1
  "use strict";
2
2
 
3
- import { Text as ComposeText, DropdownMenu } from '@expo/ui/jetpack-compose';
4
- import { clickable } from '@expo/ui/jetpack-compose/modifiers';
3
+ import { Text as ComposeText, DropdownMenu, DropdownMenuItem } from '@expo/ui/jetpack-compose';
5
4
  import { useAppTheme } from '@hzblj/kara-theme';
6
- import { useCallback, useMemo, useState } from 'react';
5
+ import { useCallback, useState } from 'react';
7
6
  import { HStack } from "../../atoms/h-stack/index.js";
8
7
  import { Icon } from "../../atoms/icon/index.js";
9
- import { Spacer } from "../../atoms/spacer/index.js";
10
8
  import { Text } from "../../atoms/text/index.js";
11
- import { VStack } from "../../atoms/v-stack/index.js";
9
+ import { Glyph } from "../../glyph/index.js";
12
10
  import { useHostGuard } from "../../host-context.js";
13
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- /** A row's `clickable` closes over its own action, so memoising it needs a component per row. */
15
12
  const MenuItem = ({
16
13
  action,
17
14
  onDismiss
18
15
  }) => {
19
16
  const theme = useAppTheme();
20
- const modifiers = useMemo(() => [clickable(() => {
21
- onDismiss();
22
- action.onPress();
23
- })], [action, onDismiss]);
24
- return /*#__PURE__*/_jsx(ComposeText, {
25
- color: theme.colorString(action.destructive ? 'content.destructive' : 'content.primary'),
26
- modifiers: modifiers,
27
- style: theme.typography.body,
28
- children: action.label
17
+ const color = action.destructive ? 'content.destructive' : 'content.primary';
18
+ return /*#__PURE__*/_jsxs(DropdownMenuItem, {
19
+ elementColors: {
20
+ leadingIconColor: theme.color(color),
21
+ textColor: theme.color(color)
22
+ },
23
+ onClick: () => {
24
+ onDismiss();
25
+ action.onPress();
26
+ },
27
+ children: [/*#__PURE__*/_jsx(DropdownMenuItem.Text, {
28
+ children: /*#__PURE__*/_jsx(ComposeText, {
29
+ color: theme.colorString(color),
30
+ style: theme.typography.body,
31
+ children: action.label
32
+ })
33
+ }), action.icon ? /*#__PURE__*/_jsx(DropdownMenuItem.LeadingIcon, {
34
+ children: /*#__PURE__*/_jsx(Icon, {
35
+ color: color,
36
+ name: action.icon,
37
+ size: "s20"
38
+ })
39
+ }) : null]
29
40
  });
30
41
  };
42
+
43
+ /**
44
+ * Material's dropdown menu, anchored to its trigger. The items live in the `Items` slot, which Compose presents in
45
+ * its own popup — anywhere else they would be laid out in place, on top of the trigger.
46
+ */
31
47
  export const Menu = ({
32
48
  actions,
33
49
  label
34
50
  }) => {
35
51
  useHostGuard('Menu');
52
+ const theme = useAppTheme();
36
53
  const [expanded, setExpanded] = useState(false);
37
54
  const dismiss = useCallback(() => setExpanded(false), []);
38
- return /*#__PURE__*/_jsxs(VStack, {
39
- children: [/*#__PURE__*/_jsxs(HStack, {
40
- align: "center",
41
- onPress: () => setExpanded(true),
42
- spacing: "s4",
43
- children: [/*#__PURE__*/_jsx(Text, {
44
- color: "content.accent",
45
- children: label
46
- }), /*#__PURE__*/_jsx(Icon, {
47
- color: "content.accent",
48
- name: "chevronDown",
49
- size: "s16"
50
- })]
51
- }), /*#__PURE__*/_jsx(DropdownMenu, {
52
- expanded: expanded,
53
- onDismissRequest: dismiss,
55
+ return /*#__PURE__*/_jsxs(DropdownMenu, {
56
+ color: theme.color('surface.primary'),
57
+ expanded: expanded,
58
+ onDismissRequest: dismiss,
59
+ children: [/*#__PURE__*/_jsx(DropdownMenu.Trigger, {
60
+ children: /*#__PURE__*/_jsxs(HStack, {
61
+ align: "center",
62
+ onPress: () => setExpanded(true),
63
+ spacing: "s4",
64
+ children: [/*#__PURE__*/_jsx(Text, {
65
+ color: "content.accent",
66
+ children: label
67
+ }), /*#__PURE__*/_jsx(Glyph, {
68
+ color: "content.accent",
69
+ name: "chevronDown",
70
+ size: "s16"
71
+ })]
72
+ })
73
+ }), /*#__PURE__*/_jsx(DropdownMenu.Items, {
54
74
  children: actions.map(action => /*#__PURE__*/_jsx(MenuItem, {
55
75
  action: action,
56
76
  onDismiss: dismiss
57
77
  }, action.label))
58
- }), /*#__PURE__*/_jsx(Spacer, {
59
- min: "s0"
60
78
  })]
61
79
  });
62
80
  };
@@ -1 +1 @@
1
- {"version":3,"names":["Text","ComposeText","DropdownMenu","clickable","useAppTheme","useCallback","useMemo","useState","HStack","Icon","Spacer","VStack","useHostGuard","jsx","_jsx","jsxs","_jsxs","MenuItem","action","onDismiss","theme","modifiers","onPress","color","colorString","destructive","style","typography","body","children","label","Menu","actions","expanded","setExpanded","dismiss","align","spacing","name","size","onDismissRequest","map","min"],"sourceRoot":"../../../../src","sources":["organisms/menu/menu.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,IAAIC,WAAW,EAAEC,YAAY,QAAO,0BAA0B;AAC1E,SAAQC,SAAS,QAAO,oCAAoC;AAC5D,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAO,OAAO;AACpD,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,MAAM,QAAO,6BAAoB;AACzC,SAAQV,IAAI,QAAO,2BAAkB;AACrC,SAAQW,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ/C;AACA,MAAMC,QAAQ,GAAGA,CAAC;EAACC,MAAM;EAAEC;AAAwB,CAAC,KAAK;EACvD,MAAMC,KAAK,GAAGhB,WAAW,CAAC,CAAC;EAC3B,MAAMiB,SAAS,GAAGf,OAAO,CACvB,MAAM,CACJH,SAAS,CAAC,MAAM;IACdgB,SAAS,CAAC,CAAC;IACXD,MAAM,CAACI,OAAO,CAAC,CAAC;EAClB,CAAC,CAAC,CACH,EACD,CAACJ,MAAM,EAAEC,SAAS,CACpB,CAAC;EAED,oBACEL,IAAA,CAACb,WAAW;IACVsB,KAAK,EAAEH,KAAK,CAACI,WAAW,CAACN,MAAM,CAACO,WAAW,GAAG,qBAAqB,GAAG,iBAAiB,CAAE;IACzFJ,SAAS,EAAEA,SAAU;IACrBK,KAAK,EAAEN,KAAK,CAACO,UAAU,CAACC,IAAK;IAAAC,QAAA,EAE5BX,MAAM,CAACY;EAAK,CACF,CAAC;AAElB,CAAC;AAED,OAAO,MAAMC,IAAmB,GAAGA,CAAC;EAACC,OAAO;EAAEF;AAAgB,CAAC,KAAK;EAClElB,YAAY,CAAC,MAAM,CAAC;EAEpB,MAAM,CAACqB,QAAQ,EAAEC,WAAW,CAAC,GAAG3B,QAAQ,CAAC,KAAK,CAAC;EAC/C,MAAM4B,OAAO,GAAG9B,WAAW,CAAC,MAAM6B,WAAW,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;EAEzD,oBACElB,KAAA,CAACL,MAAM;IAAAkB,QAAA,gBACLb,KAAA,CAACR,MAAM;MAAC4B,KAAK,EAAC,QAAQ;MAACd,OAAO,EAAEA,CAAA,KAAMY,WAAW,CAAC,IAAI,CAAE;MAACG,OAAO,EAAC,IAAI;MAAAR,QAAA,gBACnEf,IAAA,CAACd,IAAI;QAACuB,KAAK,EAAC,gBAAgB;QAAAM,QAAA,EAAEC;MAAK,CAAO,CAAC,eAC3ChB,IAAA,CAACL,IAAI;QAACc,KAAK,EAAC,gBAAgB;QAACe,IAAI,EAAC,aAAa;QAACC,IAAI,EAAC;MAAK,CAAE,CAAC;IAAA,CACvD,CAAC,eACTzB,IAAA,CAACZ,YAAY;MAAC+B,QAAQ,EAAEA,QAAS;MAACO,gBAAgB,EAAEL,OAAQ;MAAAN,QAAA,EACzDG,OAAO,CAACS,GAAG,CAACvB,MAAM,iBACjBJ,IAAA,CAACG,QAAQ;QAACC,MAAM,EAAEA,MAAO;QAAoBC,SAAS,EAAEgB;MAAQ,GAAjCjB,MAAM,CAACY,KAA4B,CACnE;IAAC,CACU,CAAC,eACfhB,IAAA,CAACJ,MAAM;MAACgC,GAAG,EAAC;IAAI,CAAE,CAAC;EAAA,CACb,CAAC;AAEb,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Text","ComposeText","DropdownMenu","DropdownMenuItem","useAppTheme","useCallback","useState","HStack","Icon","Glyph","useHostGuard","jsx","_jsx","jsxs","_jsxs","MenuItem","action","onDismiss","theme","color","destructive","elementColors","leadingIconColor","textColor","onClick","onPress","children","colorString","style","typography","body","label","icon","LeadingIcon","name","size","Menu","actions","expanded","setExpanded","dismiss","onDismissRequest","Trigger","align","spacing","Items","map"],"sourceRoot":"../../../../src","sources":["organisms/menu/menu.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,IAAIC,WAAW,EAAEC,YAAY,EAAEC,gBAAgB,QAAO,0BAA0B;AAC5F,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,WAAW,EAAEC,QAAQ,QAAO,OAAO;AAC3C,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQR,IAAI,QAAO,2BAAkB;AACrC,SAAQS,KAAK,QAAO,sBAAa;AACjC,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ/C,MAAMC,QAAQ,GAAGA,CAAC;EAACC,MAAM;EAAEC;AAAwB,CAAC,KAAK;EACvD,MAAMC,KAAK,GAAGd,WAAW,CAAC,CAAC;EAC3B,MAAMe,KAAK,GAAGH,MAAM,CAACI,WAAW,GAAG,qBAAqB,GAAG,iBAAiB;EAE5E,oBACEN,KAAA,CAACX,gBAAgB;IACfkB,aAAa,EAAE;MAACC,gBAAgB,EAAEJ,KAAK,CAACC,KAAK,CAACA,KAAK,CAAC;MAAEI,SAAS,EAAEL,KAAK,CAACC,KAAK,CAACA,KAAK;IAAC,CAAE;IACrFK,OAAO,EAAEA,CAAA,KAAM;MACbP,SAAS,CAAC,CAAC;MACXD,MAAM,CAACS,OAAO,CAAC,CAAC;IAClB,CAAE;IAAAC,QAAA,gBAEFd,IAAA,CAACT,gBAAgB,CAACH,IAAI;MAAA0B,QAAA,eACpBd,IAAA,CAACX,WAAW;QAACkB,KAAK,EAAED,KAAK,CAACS,WAAW,CAACR,KAAK,CAAE;QAACS,KAAK,EAAEV,KAAK,CAACW,UAAU,CAACC,IAAK;QAAAJ,QAAA,EACxEV,MAAM,CAACe;MAAK,CACF;IAAC,CACO,CAAC,EACvBf,MAAM,CAACgB,IAAI,gBACVpB,IAAA,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,EAChBW,OAAO,CAACS,GAAG,CAAC9B,MAAM,iBACjBJ,IAAA,CAACG,QAAQ;QAACC,MAAM,EAAEA,MAAO;QAAoBC,SAAS,EAAEuB;MAAQ,GAAjCxB,MAAM,CAACe,KAA4B,CACnE;IAAC,CACgB,CAAC;EAAA,CACT,CAAC;AAEnB,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import type { Theme } from '@hzblj/kara-theme';
1
+ import type { ColorToken, Theme } from '@hzblj/kara-theme';
2
2
  import type { ButtonVariant } from './button.types';
3
3
  export declare const buttonTokens: (variant: ButtonVariant, disabled: boolean, theme: Theme) => {
4
4
  readonly content: 'content.on.bg';
@@ -21,3 +21,8 @@ export declare const buttonTokens: (variant: ButtonVariant, disabled: boolean, t
21
21
  readonly fill: "btn.bg.glass.disabled" | "btn.bg.secondary.disabled" | "fill.accent.disabled" | "fill.destructive.disabled";
22
22
  readonly shadow: "btn.accent" | "btn.destructive" | "btn.glass" | "btn.secondary";
23
23
  };
24
+ /**
25
+ * The label for a button filled with an arbitrary `tint`: the on-accent white over a strong colour, the primary
26
+ * content colour over a pale one (`fill.accent.base`) — the light container tokens pair with it in both appearances.
27
+ */
28
+ export declare const contentOnTint: (tint: ColorToken, theme: Theme) => ColorToken;
@@ -1,2 +1 @@
1
- import type { DatePickerComponent } from './date-picker.types';
2
- export declare const DatePicker: DatePickerComponent;
1
+ export * from './date-picker.ios';
@@ -0,0 +1,3 @@
1
+ import type { DatePickerComponent } from './date-picker.types';
2
+ /** The system's compact date picker, inline: a tap on it opens the calendar popover UIKit owns. */
3
+ export declare const DatePicker: DatePickerComponent;
@@ -1,3 +1,6 @@
1
1
  import type { GlassViewProps } from './glass-view.types';
2
- /** The capsule drawn where there is no Liquid Glass to draw. */
2
+ /**
3
+ * The capsule drawn where there is no Liquid Glass to draw: the glass buttons' own translucent fill, so whatever sits
4
+ * on the glass — usually content meant for a colourful backdrop — stays readable, the way it would on real glass.
5
+ */
3
6
  export declare const GlassFallback: ({ children, interactive: _interactive, tint, ...props }: GlassViewProps) => import("react").JSX.Element;
@@ -4,7 +4,7 @@ import type { ReactNode } from 'react';
4
4
  /**
5
5
  * iOS 26 Liquid Glass around a React Native subtree, shaped as a capsule — the React Native tier, so it needs no host
6
6
  * and costs next to nothing in a list cell. Where there is no Liquid Glass (Android, and iOS before 26) it draws a
7
- * capsule of `tint` instead, or of `fill.tertiary` when there is none.
7
+ * capsule of `tint` instead, or of the glass buttons' translucent fill (`btn.bg.glass.base`) when there is none.
8
8
  */
9
9
  export type GlassViewProps = ResponsiveViewSx & {
10
10
  /** React Native views. Give them `pointerEvents="none"` when `interactive`, so the press reaches the `Pressable`. */
@@ -1,2 +1,6 @@
1
1
  import type { IconComponent } from './icon.types';
2
+ /**
3
+ * The app's icon from its asset catalog — the template image set the config plugin generated from the SVG, vector data
4
+ * kept, so `resizable()` scales it crisply to the token size and the platform tints it.
5
+ */
2
6
  export declare const Icon: IconComponent;
@@ -1,10 +1,27 @@
1
1
  import type { ColorToken, SpaceSize } from '@hzblj/kara-theme';
2
2
  import type { ReactNode } from 'react';
3
- export type IconName = 'add' | 'arrowLeft' | 'arrowRight' | 'calendar' | 'check' | 'chevronDown' | 'chevronRight' | 'close' | 'error' | 'grid' | 'heart' | 'home' | 'info' | 'lock' | 'more' | 'notification' | 'search' | 'settings' | 'share' | 'star' | 'trash' | 'user' | 'warning';
3
+ declare global {
4
+ /**
5
+ * The app's icon names, one key per SVG in its icon folder. Written by the config plugin
6
+ * (`plugins: [['@hzblj/kara-ui', {icons: {source: './assets/icons'}}]]`) into `kara-icons.d.ts`, or by
7
+ * `npx kara-icons`. Empty until then. Global, so the declaration reaches it without resolving any kara package.
8
+ */
9
+ interface KaraIcons {
10
+ }
11
+ }
12
+ type DeclaredIconName = keyof KaraIcons & string;
13
+ /**
14
+ * One of the app's icons. Once the plugin has written `kara-icons.d.ts` only those names type-check — an icon removed
15
+ * from the folder fails at every call site. Before that, any string, so a project can adopt icons gradually.
16
+ */
17
+ export type IconName = [DeclaredIconName] extends [never] ? string : DeclaredIconName;
4
18
  export type IconProps = {
19
+ /** What a screen reader says. Unset, the icon is decorative and hidden from it. */
20
+ accessibilityLabel?: string;
5
21
  color?: ColorToken;
6
22
  name: IconName;
7
23
  size?: SpaceSize;
8
24
  testID?: string;
9
25
  };
10
26
  export type IconComponent = (props: IconProps) => ReactNode;
27
+ export {};
@@ -1,3 +1,2 @@
1
1
  export * from './icon';
2
2
  export * from './icon.types';
3
- export * from './icon-names';
@@ -7,7 +7,6 @@ export * from './card';
7
7
  export * from './checkbox';
8
8
  export * from './chip';
9
9
  export * from './color-picker';
10
- export * from './countdown';
11
10
  export * from './date-picker';
12
11
  export * from './divider';
13
12
  export * from './fab';
@@ -23,6 +22,7 @@ export * from './picker';
23
22
  export * from './pressable';
24
23
  export * from './progress';
25
24
  export * from './rn-flat-list';
25
+ export * from './rn-icon';
26
26
  export * from './rn-scroll-view';
27
27
  export * from './rn-section-list';
28
28
  export * from './rn-text';
@@ -1,4 +1,13 @@
1
1
  import type { ReactNode } from 'react';
2
+ /**
3
+ * A scrolling list — SwiftUI `List`, Compose `LazyColumn`. It has no height of its own, so it needs one from outside:
4
+ * a `Screen`, or an `Island` with `matchContents={false}` and a height. In an island that sizes itself to its content
5
+ * Compose measures it against an infinite height and throws ("Vertically scrollable component was measured with an
6
+ * infinity maximum height"); SwiftUI shows nothing. For a handful of rows that should not scroll, use a `VStack`.
7
+ *
8
+ * Rows are separated for you — SwiftUI's own separators, a `Divider` between rows on Android — so a `Divider` among
9
+ * the children is one too many: on iOS it becomes an empty row of its own.
10
+ */
2
11
  export type ListProps = {
3
12
  children: ReactNode;
4
13
  /**
@@ -1,2 +1 @@
1
- import type { PickerComponent } from './picker.types';
2
- export declare const Picker: PickerComponent;
1
+ export * from './picker.ios';
@@ -0,0 +1,2 @@
1
+ import type { PickerComponent } from './picker.types';
2
+ export declare const Picker: PickerComponent;
@@ -0,0 +1,2 @@
1
+ export * from './rn-icon';
2
+ export * from './rn-icon.types';
@@ -0,0 +1 @@
1
+ export * from './rn-icon.ios';
@@ -0,0 +1,3 @@
1
+ import type { RnIconComponent } from './rn-icon.types';
2
+ /** A `UIImageView` over the app's asset-catalog icon — what a list row wants, rather than a SwiftUI host per row. */
3
+ export declare const RnIcon: RnIconComponent;
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { IconProps } from '../icon';
3
+ /** The same contract as `Icon`, for the React Native tier — anywhere, no `Screen` or `Island` needed. */
4
+ export type RnIconProps = IconProps;
5
+ export type RnIconComponent = (props: RnIconProps) => ReactNode;
@@ -0,0 +1 @@
1
+ export * from './glyph-button.ios';
@@ -0,0 +1,2 @@
1
+ import type { GlyphButtonComponent } from './glyph-button.types';
2
+ export declare const GlyphButton: GlyphButtonComponent;
@@ -0,0 +1,10 @@
1
+ import type { GlyphName } from '@hzblj/kara-native';
2
+ import type { ReactNode } from 'react';
3
+ /** An icon button over one of kara's glyphs — for the controls its own components build (a stepper, a bar). */
4
+ export type GlyphButtonProps = {
5
+ accessibilityLabel?: string;
6
+ disabled?: boolean;
7
+ name: GlyphName;
8
+ onPress?: () => void;
9
+ };
10
+ export type GlyphButtonComponent = (props: GlyphButtonProps) => ReactNode;
@@ -0,0 +1 @@
1
+ export * from './glyph.ios';
@@ -0,0 +1,3 @@
1
+ import type { GlyphComponent } from './glyph.types';
2
+ /** The SF Symbol the system already has — inside a SwiftUI host. */
3
+ export declare const Glyph: GlyphComponent;
@@ -0,0 +1,13 @@
1
+ import type { GlyphName } from '@hzblj/kara-native';
2
+ import type { ColorToken, SpaceSize } from '@hzblj/kara-theme';
3
+ import type { ReactNode } from 'react';
4
+ /**
5
+ * One of the few glyphs kara's own components draw — a search field's magnifier, a row's chevron. Internal: apps draw
6
+ * their own icons with `Icon` / `RnIcon`.
7
+ */
8
+ export type GlyphProps = {
9
+ color?: ColorToken;
10
+ name: GlyphName;
11
+ size?: SpaceSize;
12
+ };
13
+ export type GlyphComponent = (props: GlyphProps) => ReactNode;
@@ -0,0 +1,5 @@
1
+ export * from './glyph';
2
+ export * from './glyph.types';
3
+ export * from './glyph-button';
4
+ export * from './glyph-button.types';
5
+ export * from './rn-glyph';
@@ -0,0 +1 @@
1
+ export * from './rn-glyph.ios';
@@ -0,0 +1,3 @@
1
+ import type { GlyphComponent } from './glyph.types';
2
+ /** The SF Symbol in a `UIImageView`, drawn at the size `Glyph` gives it inside a host — the React Native tier. */
3
+ export declare const RnGlyph: GlyphComponent;
@@ -5,6 +5,9 @@ export type { ScrollEdgeEffect, ScrollEdgeScrollableProps } from '@hzblj/kara-na
5
5
  /**
6
6
  * Bars over one React Native scroll view, with the iOS 26 scroll edge effect under them — the system's progressive
7
7
  * blur where content scrolls past a bar. The React Native tier: it needs no host.
8
+ *
9
+ * A screen-level container: wrap the screen's scroll view with it. Mounted inside a cell of a virtualized list on iOS
10
+ * it draws only its bottom bar — the hosted scroll view and the top bar stay blank.
8
11
  */
9
12
  export type ScrollEdgeContainerProps = ResponsiveViewSx & {
10
13
  /**
@@ -1,7 +1,33 @@
1
+ import type { ResponsiveViewSx } from '@hzblj/kara-sx';
1
2
  import type { ReactNode } from 'react';
2
3
  import type { MenuAction } from '../menu';
3
- export type ContextMenuProps = {
4
+ /**
5
+ * A context menu on a React Native subtree — a card in a list, say — opened by a long press. iOS: a
6
+ * `UIContextMenuInteraction`, with an optional React Native `preview` lifted while the menu is open and a callback for
7
+ * a tap on it. Android: a Material dropdown under the subtree. The trigger is ordinary React Native layout, so it
8
+ * needs no `Screen` or `Island`.
9
+ */
10
+ export type ContextMenuProps = ResponsiveViewSx & {
4
11
  actions: MenuAction[];
12
+ /** The trigger, laid out as usual. */
5
13
  children: ReactNode;
14
+ /** iOS: the user tapped the lifted preview, committing to it — open the detail the card stands for. */
15
+ onPreviewPress?: () => void;
16
+ /**
17
+ * iOS: lifted in place of the trigger while the menu is open — a larger version of the card, say. A snapshot of the
18
+ * trigger when unset. Mounted only once a finger has rested on the trigger, so a list of cards does not pay for
19
+ * every preview up front.
20
+ */
21
+ preview?: ReactNode;
22
+ testID?: string;
23
+ };
24
+ export type ContextMenuExclusionProps = {
25
+ children: ReactNode;
26
+ };
27
+ export type ContextMenuComponent = ((props: ContextMenuProps) => ReactNode) & {
28
+ /**
29
+ * A region of the trigger that must not open the menu — a button inside the card. On iOS the interaction covers the
30
+ * whole trigger, so a long press on that button would otherwise open the card's menu.
31
+ */
32
+ Exclusion: (props: ContextMenuExclusionProps) => ReactNode;
6
33
  };
7
- export type ContextMenuComponent = (props: ContextMenuProps) => ReactNode;