@webority/mobile-ui 0.9.1 → 0.10.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 (283) hide show
  1. package/lib/commonjs/components/BarChart/BarChart.js +1 -0
  2. package/lib/commonjs/components/BarChart/index.js +1 -0
  3. package/lib/commonjs/components/BarChart/scale.js +1 -0
  4. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
  5. package/lib/commonjs/components/BottomNavigation/useScreenReaderEnabled.js +1 -0
  6. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  7. package/lib/commonjs/components/BottomSheet/index.js +1 -1
  8. package/lib/commonjs/components/BottomSheet/useSheetSwap.js +1 -0
  9. package/lib/commonjs/components/Card/Card.js +1 -1
  10. package/lib/commonjs/components/Composer/Composer.js +1 -0
  11. package/lib/commonjs/components/Composer/index.js +1 -0
  12. package/lib/commonjs/components/DateSeparator/DateSeparator.js +1 -0
  13. package/lib/commonjs/components/DateSeparator/index.js +1 -0
  14. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
  15. package/lib/commonjs/components/Input/Input.js +1 -1
  16. package/lib/commonjs/components/ListItem/ListItem.js +1 -1
  17. package/lib/commonjs/components/Menu/Menu.js +1 -0
  18. package/lib/commonjs/components/Menu/MenuSurface.js +1 -0
  19. package/lib/commonjs/components/Menu/focusHost.js +1 -0
  20. package/lib/commonjs/components/Menu/index.js +1 -0
  21. package/lib/commonjs/components/Menu/menuModel.js +1 -0
  22. package/lib/commonjs/components/Menu/useContextMenu.js +1 -0
  23. package/lib/commonjs/components/Menu/webOnly.js +1 -0
  24. package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -0
  25. package/lib/commonjs/components/MessageBubble/index.js +1 -0
  26. package/lib/commonjs/components/MessageList/MessageList.js +1 -0
  27. package/lib/commonjs/components/MessageList/index.js +1 -0
  28. package/lib/commonjs/components/OnboardingPager/OnboardingPager.js +1 -0
  29. package/lib/commonjs/components/OnboardingPager/index.js +1 -0
  30. package/lib/commonjs/components/PaymentResult/PaymentResult.js +1 -0
  31. package/lib/commonjs/components/PaymentResult/index.js +1 -0
  32. package/lib/commonjs/components/ScannerOverlay/ScannerOverlay.js +1 -0
  33. package/lib/commonjs/components/ScannerOverlay/index.js +1 -0
  34. package/lib/commonjs/components/SearchBar/SearchBar.js +1 -1
  35. package/lib/commonjs/components/SearchBar/SearchPanel.js +1 -0
  36. package/lib/commonjs/components/SearchBar/highlight.js +1 -0
  37. package/lib/commonjs/components/SearchBar/index.js +1 -1
  38. package/lib/commonjs/components/SearchBar/useRecentSearches.js +1 -0
  39. package/lib/commonjs/components/Select/Select.js +1 -1
  40. package/lib/commonjs/components/SignaturePad/SignaturePad.js +1 -0
  41. package/lib/commonjs/components/SignaturePad/index.js +1 -0
  42. package/lib/commonjs/components/SignaturePad/signatureGeometry.js +1 -0
  43. package/lib/commonjs/components/SignaturePad/writePng.js +1 -0
  44. package/lib/commonjs/components/SignaturePad/writePng.web.js +1 -0
  45. package/lib/commonjs/components/Sparkline/Sparkline.js +1 -0
  46. package/lib/commonjs/components/Sparkline/geometry.js +1 -0
  47. package/lib/commonjs/components/Sparkline/index.js +1 -0
  48. package/lib/commonjs/components/Spinner/Spinner.js +1 -1
  49. package/lib/commonjs/components/StatTile/StatTile.js +1 -1
  50. package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
  51. package/lib/commonjs/components/Toast/Toast.js +1 -1
  52. package/lib/commonjs/components/Toast/ToastProvider.js +1 -1
  53. package/lib/commonjs/components/Tooltip/RichTooltipBody.js +1 -0
  54. package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
  55. package/lib/commonjs/components/Tooltip/tooltipPosition.js +1 -0
  56. package/lib/commonjs/components/TypingIndicator/TypingIndicator.js +1 -0
  57. package/lib/commonjs/components/TypingIndicator/index.js +1 -0
  58. package/lib/commonjs/components/WheelPicker/Wheel.js +1 -0
  59. package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -0
  60. package/lib/commonjs/components/WheelPicker/index.js +1 -0
  61. package/lib/commonjs/components/index.js +1 -1
  62. package/lib/commonjs/hooks/index.js +1 -1
  63. package/lib/commonjs/hooks/useRefreshControl.js +1 -0
  64. package/lib/commonjs/hooks/useScrollDirection.js +1 -0
  65. package/lib/commonjs/index.js +1 -1
  66. package/lib/commonjs/utils/announce.js +1 -0
  67. package/lib/commonjs/utils/hapticUtils.js +1 -1
  68. package/lib/commonjs/utils/index.js +1 -1
  69. package/lib/commonjs/utils/placement.js +1 -0
  70. package/lib/module/components/BarChart/BarChart.js +1 -0
  71. package/lib/module/components/BarChart/index.js +1 -0
  72. package/lib/module/components/BarChart/scale.js +1 -0
  73. package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
  74. package/lib/module/components/BottomNavigation/useScreenReaderEnabled.js +1 -0
  75. package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
  76. package/lib/module/components/BottomSheet/index.js +1 -1
  77. package/lib/module/components/BottomSheet/useSheetSwap.js +1 -0
  78. package/lib/module/components/Card/Card.js +1 -1
  79. package/lib/module/components/Composer/Composer.js +1 -0
  80. package/lib/module/components/Composer/index.js +1 -0
  81. package/lib/module/components/DateSeparator/DateSeparator.js +1 -0
  82. package/lib/module/components/DateSeparator/index.js +1 -0
  83. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
  84. package/lib/module/components/Input/Input.js +1 -1
  85. package/lib/module/components/ListItem/ListItem.js +1 -1
  86. package/lib/module/components/Menu/Menu.js +1 -0
  87. package/lib/module/components/Menu/MenuSurface.js +1 -0
  88. package/lib/module/components/Menu/focusHost.js +1 -0
  89. package/lib/module/components/Menu/index.js +1 -0
  90. package/lib/module/components/Menu/menuModel.js +1 -0
  91. package/lib/module/components/Menu/useContextMenu.js +1 -0
  92. package/lib/module/components/Menu/webOnly.js +1 -0
  93. package/lib/module/components/MessageBubble/MessageBubble.js +1 -0
  94. package/lib/module/components/MessageBubble/index.js +1 -0
  95. package/lib/module/components/MessageList/MessageList.js +1 -0
  96. package/lib/module/components/MessageList/index.js +1 -0
  97. package/lib/module/components/OnboardingPager/OnboardingPager.js +1 -0
  98. package/lib/module/components/OnboardingPager/index.js +1 -0
  99. package/lib/module/components/PaymentResult/PaymentResult.js +1 -0
  100. package/lib/module/components/PaymentResult/index.js +1 -0
  101. package/lib/module/components/ScannerOverlay/ScannerOverlay.js +1 -0
  102. package/lib/module/components/ScannerOverlay/index.js +1 -0
  103. package/lib/module/components/SearchBar/SearchBar.js +1 -1
  104. package/lib/module/components/SearchBar/SearchPanel.js +1 -0
  105. package/lib/module/components/SearchBar/highlight.js +1 -0
  106. package/lib/module/components/SearchBar/index.js +1 -1
  107. package/lib/module/components/SearchBar/useRecentSearches.js +1 -0
  108. package/lib/module/components/Select/Select.js +1 -1
  109. package/lib/module/components/SignaturePad/SignaturePad.js +1 -0
  110. package/lib/module/components/SignaturePad/index.js +1 -0
  111. package/lib/module/components/SignaturePad/signatureGeometry.js +1 -0
  112. package/lib/module/components/SignaturePad/writePng.js +1 -0
  113. package/lib/module/components/SignaturePad/writePng.web.js +1 -0
  114. package/lib/module/components/Sparkline/Sparkline.js +1 -0
  115. package/lib/module/components/Sparkline/geometry.js +1 -0
  116. package/lib/module/components/Sparkline/index.js +1 -0
  117. package/lib/module/components/Spinner/Spinner.js +1 -1
  118. package/lib/module/components/StatTile/StatTile.js +1 -1
  119. package/lib/module/components/TimePicker/TimePicker.js +1 -1
  120. package/lib/module/components/Toast/Toast.js +1 -1
  121. package/lib/module/components/Toast/ToastProvider.js +1 -1
  122. package/lib/module/components/Tooltip/RichTooltipBody.js +1 -0
  123. package/lib/module/components/Tooltip/Tooltip.js +1 -1
  124. package/lib/module/components/Tooltip/tooltipPosition.js +1 -0
  125. package/lib/module/components/TypingIndicator/TypingIndicator.js +1 -0
  126. package/lib/module/components/TypingIndicator/index.js +1 -0
  127. package/lib/module/components/WheelPicker/Wheel.js +1 -0
  128. package/lib/module/components/WheelPicker/WheelPicker.js +1 -0
  129. package/lib/module/components/WheelPicker/index.js +1 -0
  130. package/lib/module/components/index.js +1 -1
  131. package/lib/module/hooks/index.js +1 -1
  132. package/lib/module/hooks/useRefreshControl.js +1 -0
  133. package/lib/module/hooks/useScrollDirection.js +1 -0
  134. package/lib/module/index.js +1 -1
  135. package/lib/module/utils/announce.js +1 -0
  136. package/lib/module/utils/hapticUtils.js +1 -1
  137. package/lib/module/utils/index.js +1 -1
  138. package/lib/module/utils/placement.js +1 -0
  139. package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +62 -0
  140. package/lib/typescript/commonjs/components/BarChart/index.d.ts +3 -0
  141. package/lib/typescript/commonjs/components/BarChart/scale.d.ts +15 -0
  142. package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +32 -0
  143. package/lib/typescript/commonjs/components/BottomNavigation/index.d.ts +1 -1
  144. package/lib/typescript/commonjs/components/BottomNavigation/useScreenReaderEnabled.d.ts +8 -0
  145. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +34 -3
  146. package/lib/typescript/commonjs/components/BottomSheet/index.d.ts +2 -0
  147. package/lib/typescript/commonjs/components/BottomSheet/useSheetSwap.d.ts +24 -0
  148. package/lib/typescript/commonjs/components/Card/Card.d.ts +9 -0
  149. package/lib/typescript/commonjs/components/Composer/Composer.d.ts +61 -0
  150. package/lib/typescript/commonjs/components/Composer/index.d.ts +3 -0
  151. package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.d.ts +37 -0
  152. package/lib/typescript/commonjs/components/DateSeparator/index.d.ts +3 -0
  153. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +3 -1
  154. package/lib/typescript/commonjs/components/Input/Input.d.ts +2 -2
  155. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +9 -0
  156. package/lib/typescript/commonjs/components/Menu/Menu.d.ts +46 -0
  157. package/lib/typescript/commonjs/components/Menu/MenuSurface.d.ts +30 -0
  158. package/lib/typescript/commonjs/components/Menu/focusHost.d.ts +9 -0
  159. package/lib/typescript/commonjs/components/Menu/index.d.ts +5 -0
  160. package/lib/typescript/commonjs/components/Menu/menuModel.d.ts +68 -0
  161. package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +58 -0
  162. package/lib/typescript/commonjs/components/Menu/webOnly.d.ts +7 -0
  163. package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +87 -0
  164. package/lib/typescript/commonjs/components/MessageBubble/index.d.ts +3 -0
  165. package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +68 -0
  166. package/lib/typescript/commonjs/components/MessageList/index.d.ts +3 -0
  167. package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.d.ts +53 -0
  168. package/lib/typescript/commonjs/components/OnboardingPager/index.d.ts +3 -0
  169. package/lib/typescript/commonjs/components/PaymentResult/PaymentResult.d.ts +71 -0
  170. package/lib/typescript/commonjs/components/PaymentResult/index.d.ts +3 -0
  171. package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.d.ts +74 -0
  172. package/lib/typescript/commonjs/components/ScannerOverlay/index.d.ts +3 -0
  173. package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +35 -0
  174. package/lib/typescript/commonjs/components/SearchBar/SearchPanel.d.ts +49 -0
  175. package/lib/typescript/commonjs/components/SearchBar/highlight.d.ts +14 -0
  176. package/lib/typescript/commonjs/components/SearchBar/index.d.ts +3 -0
  177. package/lib/typescript/commonjs/components/SearchBar/useRecentSearches.d.ts +24 -0
  178. package/lib/typescript/commonjs/components/Select/Select.d.ts +2 -1
  179. package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +94 -0
  180. package/lib/typescript/commonjs/components/SignaturePad/index.d.ts +4 -0
  181. package/lib/typescript/commonjs/components/SignaturePad/signatureGeometry.d.ts +36 -0
  182. package/lib/typescript/commonjs/components/SignaturePad/writePng.d.ts +7 -0
  183. package/lib/typescript/commonjs/components/SignaturePad/writePng.web.d.ts +3 -0
  184. package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +41 -0
  185. package/lib/typescript/commonjs/components/Sparkline/geometry.d.ts +20 -0
  186. package/lib/typescript/commonjs/components/Sparkline/index.d.ts +3 -0
  187. package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +7 -1
  188. package/lib/typescript/commonjs/components/StatTile/StatTile.d.ts +24 -1
  189. package/lib/typescript/commonjs/components/StatTile/index.d.ts +1 -1
  190. package/lib/typescript/commonjs/components/Toast/Toast.d.ts +21 -0
  191. package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +21 -0
  192. package/lib/typescript/commonjs/components/Toast/index.d.ts +1 -1
  193. package/lib/typescript/commonjs/components/Tooltip/RichTooltipBody.d.ts +27 -0
  194. package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +24 -0
  195. package/lib/typescript/commonjs/components/Tooltip/index.d.ts +1 -1
  196. package/lib/typescript/commonjs/components/Tooltip/tooltipPosition.d.ts +35 -0
  197. package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.d.ts +21 -0
  198. package/lib/typescript/commonjs/components/TypingIndicator/index.d.ts +3 -0
  199. package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +34 -0
  200. package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +73 -0
  201. package/lib/typescript/commonjs/components/WheelPicker/index.d.ts +3 -0
  202. package/lib/typescript/commonjs/components/index.d.ts +34 -8
  203. package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
  204. package/lib/typescript/commonjs/hooks/useRefreshControl.d.ts +75 -0
  205. package/lib/typescript/commonjs/hooks/useScrollDirection.d.ts +21 -0
  206. package/lib/typescript/commonjs/index.d.ts +4 -4
  207. package/lib/typescript/commonjs/utils/announce.d.ts +14 -0
  208. package/lib/typescript/commonjs/utils/hapticUtils.d.ts +1 -1
  209. package/lib/typescript/commonjs/utils/index.d.ts +2 -0
  210. package/lib/typescript/commonjs/utils/placement.d.ts +55 -0
  211. package/lib/typescript/module/components/BarChart/BarChart.d.ts +62 -0
  212. package/lib/typescript/module/components/BarChart/index.d.ts +3 -0
  213. package/lib/typescript/module/components/BarChart/scale.d.ts +15 -0
  214. package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +32 -0
  215. package/lib/typescript/module/components/BottomNavigation/index.d.ts +1 -1
  216. package/lib/typescript/module/components/BottomNavigation/useScreenReaderEnabled.d.ts +8 -0
  217. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +34 -3
  218. package/lib/typescript/module/components/BottomSheet/index.d.ts +2 -0
  219. package/lib/typescript/module/components/BottomSheet/useSheetSwap.d.ts +24 -0
  220. package/lib/typescript/module/components/Card/Card.d.ts +9 -0
  221. package/lib/typescript/module/components/Composer/Composer.d.ts +61 -0
  222. package/lib/typescript/module/components/Composer/index.d.ts +3 -0
  223. package/lib/typescript/module/components/DateSeparator/DateSeparator.d.ts +37 -0
  224. package/lib/typescript/module/components/DateSeparator/index.d.ts +3 -0
  225. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +3 -1
  226. package/lib/typescript/module/components/Input/Input.d.ts +2 -2
  227. package/lib/typescript/module/components/ListItem/ListItem.d.ts +9 -0
  228. package/lib/typescript/module/components/Menu/Menu.d.ts +46 -0
  229. package/lib/typescript/module/components/Menu/MenuSurface.d.ts +30 -0
  230. package/lib/typescript/module/components/Menu/focusHost.d.ts +9 -0
  231. package/lib/typescript/module/components/Menu/index.d.ts +5 -0
  232. package/lib/typescript/module/components/Menu/menuModel.d.ts +68 -0
  233. package/lib/typescript/module/components/Menu/useContextMenu.d.ts +58 -0
  234. package/lib/typescript/module/components/Menu/webOnly.d.ts +7 -0
  235. package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +87 -0
  236. package/lib/typescript/module/components/MessageBubble/index.d.ts +3 -0
  237. package/lib/typescript/module/components/MessageList/MessageList.d.ts +68 -0
  238. package/lib/typescript/module/components/MessageList/index.d.ts +3 -0
  239. package/lib/typescript/module/components/OnboardingPager/OnboardingPager.d.ts +53 -0
  240. package/lib/typescript/module/components/OnboardingPager/index.d.ts +3 -0
  241. package/lib/typescript/module/components/PaymentResult/PaymentResult.d.ts +71 -0
  242. package/lib/typescript/module/components/PaymentResult/index.d.ts +3 -0
  243. package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.d.ts +74 -0
  244. package/lib/typescript/module/components/ScannerOverlay/index.d.ts +3 -0
  245. package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +35 -0
  246. package/lib/typescript/module/components/SearchBar/SearchPanel.d.ts +49 -0
  247. package/lib/typescript/module/components/SearchBar/highlight.d.ts +14 -0
  248. package/lib/typescript/module/components/SearchBar/index.d.ts +3 -0
  249. package/lib/typescript/module/components/SearchBar/useRecentSearches.d.ts +24 -0
  250. package/lib/typescript/module/components/Select/Select.d.ts +2 -1
  251. package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +94 -0
  252. package/lib/typescript/module/components/SignaturePad/index.d.ts +4 -0
  253. package/lib/typescript/module/components/SignaturePad/signatureGeometry.d.ts +36 -0
  254. package/lib/typescript/module/components/SignaturePad/writePng.d.ts +7 -0
  255. package/lib/typescript/module/components/SignaturePad/writePng.web.d.ts +3 -0
  256. package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +41 -0
  257. package/lib/typescript/module/components/Sparkline/geometry.d.ts +20 -0
  258. package/lib/typescript/module/components/Sparkline/index.d.ts +3 -0
  259. package/lib/typescript/module/components/Spinner/Spinner.d.ts +7 -1
  260. package/lib/typescript/module/components/StatTile/StatTile.d.ts +24 -1
  261. package/lib/typescript/module/components/StatTile/index.d.ts +1 -1
  262. package/lib/typescript/module/components/Toast/Toast.d.ts +21 -0
  263. package/lib/typescript/module/components/Toast/ToastProvider.d.ts +21 -0
  264. package/lib/typescript/module/components/Toast/index.d.ts +1 -1
  265. package/lib/typescript/module/components/Tooltip/RichTooltipBody.d.ts +27 -0
  266. package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +24 -0
  267. package/lib/typescript/module/components/Tooltip/index.d.ts +1 -1
  268. package/lib/typescript/module/components/Tooltip/tooltipPosition.d.ts +35 -0
  269. package/lib/typescript/module/components/TypingIndicator/TypingIndicator.d.ts +21 -0
  270. package/lib/typescript/module/components/TypingIndicator/index.d.ts +3 -0
  271. package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +34 -0
  272. package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +73 -0
  273. package/lib/typescript/module/components/WheelPicker/index.d.ts +3 -0
  274. package/lib/typescript/module/components/index.d.ts +34 -8
  275. package/lib/typescript/module/hooks/index.d.ts +4 -0
  276. package/lib/typescript/module/hooks/useRefreshControl.d.ts +75 -0
  277. package/lib/typescript/module/hooks/useScrollDirection.d.ts +21 -0
  278. package/lib/typescript/module/index.d.ts +4 -4
  279. package/lib/typescript/module/utils/announce.d.ts +14 -0
  280. package/lib/typescript/module/utils/hapticUtils.d.ts +1 -1
  281. package/lib/typescript/module/utils/index.d.ts +2 -0
  282. package/lib/typescript/module/utils/placement.d.ts +55 -0
  283. package/package.json +3 -3
@@ -0,0 +1,62 @@
1
+ /**
2
+ * BarChart: a simple vertical bar chart for a dashboard.
3
+ *
4
+ * Zero is always on the axis, so a bar's length is its value. The point of the
5
+ * chart is readable without touching it: bars carry their value when there are
6
+ * few of them, and a summary line names the main message. Touching it adds
7
+ * detail: a tap picks a bar, and dragging along the plot picks the bar under
8
+ * the finger with one haptic tick per bar crossed. The picked bar's label and
9
+ * value are written above the plot.
10
+ *
11
+ * A screen reader gets one adjustable element: swipe up or down to move from
12
+ * bar to bar, each one read as "label, value". Bars are Views, not SVG, so the
13
+ * labels follow the app's font scale and nothing is drawn in a fixed pixel box.
14
+ *
15
+ * Values may be negative; the zero line then sits inside the plot.
16
+ */
17
+ import type { View as RNView, StyleProp, ViewStyle } from 'react-native';
18
+ import type { HapticType } from '../../utils/index.js';
19
+ export type BarChartTone = 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
20
+ export interface BarChartDatum {
21
+ /** The full name of the bar, read aloud and written in the callout: "Mon 06-Oct-2026". */
22
+ label: string;
23
+ /** The bar's value. A value that is not a finite number draws as zero. */
24
+ value: number;
25
+ /** A shorter label drawn under the bar: "Mon". Default `label`. */
26
+ axisLabel?: string;
27
+ /** Replaces the spoken text of the bar. Default `"label, value"`. */
28
+ accessibilityLabel?: string;
29
+ }
30
+ export interface BarChartProps {
31
+ data: ReadonlyArray<BarChartDatum>;
32
+ /** Colour of the bars. Default `'primary'`. Drawn in the tone's text ink so it holds 3:1 on the page in light and dark. */
33
+ tone?: BarChartTone;
34
+ /** Bar colour override; wins over `tone`. */
35
+ color?: string;
36
+ /** Height of the plot in points. Default `160`. */
37
+ height?: number;
38
+ /** What the chart shows, read first by a screen reader: "Approvals per day". */
39
+ label?: string;
40
+ /** The main message in a sentence, visible while no bar is picked: "Approvals peaked on Thursday". Default: the highest bar. */
41
+ summary?: string;
42
+ /** Write a value in full, for the callout and the spoken text. Default: the house number format (Indian grouping). */
43
+ formatValue?: (value: number) => string;
44
+ /** Write a value short, for the axis and the figures on the bars. Default: compact Indian form (1.5L, 2.3Cr). */
45
+ formatTick?: (value: number) => string;
46
+ /** Draw each bar's value on it. Default: when there are 7 bars or fewer. */
47
+ showValues?: boolean;
48
+ /** Picked bar (controlled); `null` for none. */
49
+ selection?: number | null;
50
+ /** Picked bar when uncontrolled. Default none. */
51
+ defaultSelection?: number | null;
52
+ /** Called when a bar is picked, or `null` when the picked bar is tapped again. */
53
+ onSelect?: (index: number | null) => void;
54
+ /** Haptic tick for each bar a drag crosses and for a tap. `false` turns it off. Default `'tick'`. */
55
+ haptic?: HapticType | false;
56
+ style?: StyleProp<ViewStyle>;
57
+ testID?: string;
58
+ }
59
+ declare const BarChart: import("react").ForwardRefExoticComponent<BarChartProps & import("react").RefAttributes<RNView>>;
60
+ export { BarChart };
61
+ export default BarChart;
62
+ //# sourceMappingURL=BarChart.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { BarChartDatum, BarChartProps, BarChartTone } from './BarChart.js';
2
+ export { BarChart, default } from './BarChart.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ export interface BarScale {
2
+ /** Lowest value on the axis; never above zero. */
3
+ min: number;
4
+ /** Highest value on the axis; never below zero. */
5
+ max: number;
6
+ /** Axis ticks from `min` to `max`, on round steps (1, 2 or 5 times a power of ten). */
7
+ ticks: number[];
8
+ }
9
+ /**
10
+ * The axis of a bar chart: zero is always on it (a bar's length is its value),
11
+ * the other end rounds up to a familiar step (0, 5, 10 ...), and values that
12
+ * are not finite numbers are ignored.
13
+ */
14
+ export declare const barScale: (values: ReadonlyArray<number>, targetTicks?: number) => BarScale;
15
+ //# sourceMappingURL=scale.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { View as RNView, StyleProp, TextStyle, ViewStyle } from 'react-native';
3
+ import type { ScrollDirection } from '../../hooks/useScrollDirection.js';
3
4
  import type { ShadowScale } from '../../theme/types.js';
4
5
  import type { HapticType } from '../../utils/index.js';
5
6
  import type { SlotIcon, SlotIconState } from '../AppIcon/index.js';
@@ -114,6 +115,11 @@ export interface BottomNavigationCenterAction {
114
115
  haptic?: HapticType | false;
115
116
  testID?: string;
116
117
  }
118
+ /** What the bar tells a function `accessory` when it draws. */
119
+ export interface BottomNavigationAccessoryState {
120
+ /** True while the bar is minimised: the accessory sits inline beside the tabs. */
121
+ minimized: boolean;
122
+ }
117
123
  export interface BottomNavigationProps {
118
124
  tabs: TabConfig[];
119
125
  /** A pressable button in the middle of the bar, between the tabs. */
@@ -200,6 +206,32 @@ export interface BottomNavigationProps {
200
206
  * Off unless set.
201
207
  */
202
208
  border?: boolean;
209
+ /**
210
+ * Opt in to minimising the bar while the person scrolls down: the labels go
211
+ * and the bar shrinks to its icons (it never hides), and it restores on
212
+ * scroll up, on reaching the top, or on a tap on a tab. Needs
213
+ * `scrollDirection` from the scroll view's `useScrollDirection`. Stays
214
+ * expanded while a screen reader is on, and snaps with no animation under
215
+ * Reduce Motion. Off by default.
216
+ */
217
+ minimizeOnScroll?: boolean;
218
+ /**
219
+ * The scroll view's direction, from `useScrollDirection().direction`. Only
220
+ * read while `minimizeOnScroll` is set: `down` minimises, `up` and `idle`
221
+ * (at the top) restore. Default `idle`. A tap on a tab restores the bar
222
+ * until the direction next changes, so keep one hook per screen: sharing one
223
+ * across tab screens leaves `down` unchanged when the person returns to
224
+ * the top of another.
225
+ */
226
+ scrollDirection?: ScrollDirection;
227
+ /**
228
+ * A compact strip tied to the bar, such as a "clocked in" status. Expanded,
229
+ * it sits above the tabs across the bar's width; minimised, it moves inline
230
+ * to the left of the tabs, so keep it small there. Pass a function to draw
231
+ * a smaller version when `minimized`. Drawn whether or not
232
+ * `minimizeOnScroll` is set; `testID` gives it `${testID}-accessory`.
233
+ */
234
+ accessory?: React.ReactNode | ((state: BottomNavigationAccessoryState) => React.ReactNode);
203
235
  style?: StyleProp<ViewStyle>;
204
236
  /** Style applied to the active indicator of every variant (pill, line, bubble or expanded pill). */
205
237
  indicatorStyle?: StyleProp<ViewStyle>;
@@ -1,3 +1,3 @@
1
- export type { BottomNavigationCenterAction, BottomNavigationElevation, BottomNavigationIndicatorPosition, BottomNavigationIndicatorRadius, BottomNavigationProps, BottomNavigationRadius, BottomNavigationVariant, TabBadge, TabConfig, TabIcon, TabIconProps } from './BottomNavigation.js';
1
+ export type { BottomNavigationAccessoryState, BottomNavigationCenterAction, BottomNavigationElevation, BottomNavigationIndicatorPosition, BottomNavigationIndicatorRadius, BottomNavigationProps, BottomNavigationRadius, BottomNavigationVariant, TabBadge, TabConfig, TabIcon, TabIconProps } from './BottomNavigation.js';
2
2
  export { BottomNavigation, default } from './BottomNavigation.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Whether VoiceOver or TalkBack is running. Subscribes only while `active`, so
3
+ * a bar that never minimises keeps no listener. Always false on web: React
4
+ * Native Web's `isScreenReaderEnabled` resolves `true` unconditionally and
5
+ * fires no change event, so it cannot tell a reader from none.
6
+ */
7
+ export declare const useScreenReaderEnabled: (active: boolean) => boolean;
8
+ //# sourceMappingURL=useScreenReaderEnabled.d.ts.map
@@ -14,7 +14,8 @@
14
14
  * ref.current?.expand(); // open at first snap point (or `index` prop)
15
15
  * ref.current?.expand(2); // open at specific index
16
16
  * ref.current?.collapse(); // animate to smallest snap point
17
- * ref.current?.close(); // dismiss
17
+ * ref.current?.close(); // dismiss (never asks `confirmDismiss`)
18
+ * ref.current?.requestClose(); // dismiss the way a drag or the scrim would: asks first
18
19
  */
19
20
  import type React from 'react';
20
21
  import type { LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';
@@ -49,6 +50,23 @@ export interface BottomSheetProps {
49
50
  onAfterClose?: () => void;
50
51
  enablePanDownToClose?: boolean;
51
52
  enableBackdropPress?: boolean;
53
+ /**
54
+ * Asked before the user dismisses the sheet: a handle drag past the close
55
+ * threshold or a fast swipe down, a tap on the scrim, hardware Back (Android)
56
+ * and Escape (web), and `requestClose()`. Return `true` (or resolve `true`)
57
+ * to let it close, `false` to keep it open. A refused drag springs back to
58
+ * the snap point it started from, and `onChange(-1)` does not fire.
59
+ *
60
+ * Show the question with a `Dialog` or `OptionSheet` rendered inside this
61
+ * sheet's children (a second native modal beside the sheet's own does not
62
+ * present on iOS), and resolve a Promise from its buttons. While a Promise
63
+ * is pending, further dismissals are ignored, so it must settle. A rejected
64
+ * Promise leaves the sheet open and surfaces as an unhandled rejection.
65
+ *
66
+ * `ref.close()`, `useBottomSheet().close` and a controlled `index={-1}` are
67
+ * the app's own decision (a Save button, say) and never ask.
68
+ */
69
+ confirmDismiss?: () => boolean | Promise<boolean>;
52
70
  /**
53
71
  * Wrap `children` in a vertical ScrollView sized to the space between header
54
72
  * and footer. Off by default; a plain View then holds the content. The sheet
@@ -130,7 +148,19 @@ export interface BottomSheetProps {
130
148
  export interface BottomSheetRef {
131
149
  expand: (index?: number) => void;
132
150
  collapse: () => void;
133
- close: () => void;
151
+ /**
152
+ * Closes without asking `confirmDismiss`. Resolves once the close has
153
+ * finished (when `onAfterClose` fires); resolves at once on a sheet that is
154
+ * not open, and when a reopen overtakes the close or the sheet unmounts.
155
+ */
156
+ close: () => Promise<void>;
157
+ /**
158
+ * Closes the way a drag or the scrim would: asks `confirmDismiss` first.
159
+ * Resolves `true` once the sheet has closed (or was not open), `false` when
160
+ * the dismissal was refused, ignored while another is being decided, or
161
+ * overtaken by a reopen or unmount.
162
+ */
163
+ requestClose: () => Promise<boolean>;
134
164
  }
135
165
  /**
136
166
  * State + actions exposed to anything rendered inside a `<BottomSheet>` —
@@ -148,7 +178,8 @@ export interface BottomSheetContextValue {
148
178
  snapPoints: number[];
149
179
  expand: (index?: number) => void;
150
180
  collapse: () => void;
151
- close: () => void;
181
+ close: () => Promise<void>;
182
+ requestClose: () => Promise<boolean>;
152
183
  }
153
184
  /**
154
185
  * Access the enclosing `<BottomSheet>`'s state and imperative actions.
@@ -1,3 +1,5 @@
1
1
  export type { BottomSheetContextValue, BottomSheetPresentation, BottomSheetProps, BottomSheetRef, SnapPoint } from './BottomSheet.js';
2
2
  export { BottomSheet, default, useBottomSheet } from './BottomSheet.js';
3
+ export type { SheetSwap, SheetSwapOptions } from './useSheetSwap.js';
4
+ export { useSheetSwap } from './useSheetSwap.js';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,24 @@
1
+ import type { RefObject } from 'react';
2
+ import type { BottomSheetRef } from './BottomSheet.js';
3
+ export interface SheetSwapOptions {
4
+ /** Snap index the next sheet opens at. Defaults to its first snap point. */
5
+ index?: number;
6
+ /** Ask the first sheet's `confirmDismiss` before closing it. Off by default (the app chose to swap). */
7
+ confirm?: boolean;
8
+ }
9
+ export type SheetSwap = (from: RefObject<BottomSheetRef | null>, to: RefObject<BottomSheetRef | null>, options?: SheetSwapOptions) => Promise<boolean>;
10
+ /**
11
+ * Replaces one bottom sheet with another: closes `from`, waits until it is
12
+ * fully gone (on iOS, until its native modal window is dismissed, which UIKit
13
+ * needs before it presents another), then opens `to`. One sheet is on screen
14
+ * at a time and there is no window where both are mounted.
15
+ *
16
+ * Resolves `true` once `to` has been asked to open, `false` when nothing was
17
+ * swapped: the close was refused or overtaken by a reopen (`confirm: true`),
18
+ * the component unmounted, `to` is not mounted, or another swap is running.
19
+ *
20
+ * const swap = useSheetSwap();
21
+ * swap(listRef, detailRef, { index: 1 });
22
+ */
23
+ export declare const useSheetSwap: () => SheetSwap;
24
+ //# sourceMappingURL=useSheetSwap.d.ts.map
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { GestureResponderEvent, ImageSourcePropType, PressableProps, View as RNView, StyleProp, ViewStyle } from 'react-native';
3
3
  import type { ColorPalette, GradientDefinition } from '../../theme/types.js';
4
4
  import type { HapticType } from '../../utils/hapticUtils.js';
5
+ import type { ContextMenuConfig } from '../Menu/useContextMenu.js';
5
6
  export type CardVariant = 'elevated' | 'outlined' | 'filled' | 'flat';
6
7
  /** A text action in the card header, drawn with a 44 pt hit target. */
7
8
  export interface CardTextAction {
@@ -71,6 +72,14 @@ export interface CardProps extends Omit<PressableProps, 'style' | 'children'> {
71
72
  onPress?: (event: GestureResponderEvent) => void;
72
73
  /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
73
74
  haptic?: HapticType | false;
75
+ /**
76
+ * A long-press menu. Long press (right-click or Shift+F10 on the web) lifts
77
+ * the card over a dimmed screen with the menu beside it, and every item is
78
+ * also a screen reader action on the card. Unavailable items are hidden
79
+ * unless `unavailable: 'disable'`. The menu takes the long press: an
80
+ * `onLongPress` passed beside it is not called.
81
+ */
82
+ contextMenu?: ContextMenuConfig;
74
83
  accessibilityLabel?: string;
75
84
  style?: StyleProp<ViewStyle>;
76
85
  /** Alias for `style` — applied to the outer card element. */
@@ -0,0 +1,61 @@
1
+ import type React from 'react';
2
+ import type { StyleProp, ViewStyle } from 'react-native';
3
+ import { TextInput } from 'react-native';
4
+ import type { HapticType } from '../../utils/hapticUtils.js';
5
+ export interface ComposerProps {
6
+ /** Called with the trimmed text; the box clears once it is handed over. */
7
+ onSend: (text: string) => unknown;
8
+ /** Controlled draft. Leave unset and the composer keeps its own. */
9
+ value?: string;
10
+ onChangeText?: (text: string) => void;
11
+ placeholder?: string;
12
+ /** The text box's screen-reader name. Default: `placeholder`. */
13
+ accessibilityLabel?: string;
14
+ /** The send button's screen-reader name. Default 'Send'. */
15
+ sendLabel?: string;
16
+ /** A reply is arriving: the person can type but not send, and send shows a spinner. */
17
+ busy?: boolean;
18
+ /** Nothing can be typed or sent. */
19
+ disabled?: boolean;
20
+ maxLength?: number;
21
+ /** The box grows to this many lines, then scrolls. Default 5. */
22
+ maxLines?: number;
23
+ /** Before the box, e.g. an attach button. */
24
+ leading?: React.ReactNode;
25
+ /** Between the box and send, e.g. a microphone button. */
26
+ trailing?: React.ReactNode;
27
+ /** Inside the bar, above the row: a banner, a "questions left" note. Rides the keyboard too. */
28
+ above?: React.ReactNode;
29
+ /** Inside the bar, below the row: a disclaimer. */
30
+ below?: React.ReactNode;
31
+ /**
32
+ * Rides the keyboard (react-native-keyboard-controller's `KeyboardStickyView`).
33
+ * Default true. Turn it off inside a sheet that already moves with the
34
+ * keyboard. Pair it with a `MessageList` given the same `keyboardOffset`.
35
+ */
36
+ keyboardAware?: boolean;
37
+ /**
38
+ * How far below the bar the keyboard's top edge starts: the bottom safe area
39
+ * the bar pads for, plus anything under it such as a tab bar. Default: the
40
+ * bottom safe-area inset when `safeArea` is on, else 0.
41
+ */
42
+ keyboardOffset?: number;
43
+ /** Pad the bar for the bottom safe area. Default true; off above a tab bar. */
44
+ safeArea?: boolean;
45
+ autoFocus?: boolean;
46
+ /** Send haptic. Default `'selection'`. */
47
+ haptic?: HapticType | false;
48
+ style?: StyleProp<ViewStyle>;
49
+ testID?: string;
50
+ }
51
+ /**
52
+ * The message box of a chat: a text box that grows to `maxLines` and then
53
+ * scrolls, a send button that is disabled while the trimmed text is empty,
54
+ * and slots for an attach or microphone button. The return key adds a line,
55
+ * as phone keyboards expect; only the button sends. By default the bar rides
56
+ * the keyboard and pads for the bottom safe area, so a chat screen is a
57
+ * `MessageList` above a `Composer` with no keyboard wiring of its own.
58
+ */
59
+ export declare const Composer: React.ForwardRefExoticComponent<ComposerProps & React.RefAttributes<TextInput>>;
60
+ export default Composer;
61
+ //# sourceMappingURL=Composer.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { ComposerProps } from './Composer.js';
2
+ export { Composer, default } from './Composer.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { type DateValue } from '@webority/mobile-core';
2
+ import type React from 'react';
3
+ import type { StyleProp, ViewStyle } from 'react-native';
4
+ export interface DateSeparatorLabels {
5
+ today: string;
6
+ yesterday: string;
7
+ }
8
+ export declare const DEFAULT_DATE_SEPARATOR_LABELS: Readonly<DateSeparatorLabels>;
9
+ export interface DateSeparatorProps {
10
+ /** The day to name. An instant is read in the configured zone (IST by default). */
11
+ date?: DateValue;
12
+ /** Draws this text instead of a day, e.g. "New messages" above the first unread. */
13
+ label?: string;
14
+ /** Draws the text and rules in the brand colour, for an unread divider. */
15
+ emphasis?: boolean;
16
+ labels?: Partial<DateSeparatorLabels>;
17
+ /** The reference for Today and Yesterday. Default: now. */
18
+ now?: Date;
19
+ style?: StyleProp<ViewStyle>;
20
+ testID?: string;
21
+ }
22
+ /**
23
+ * "Today", "Yesterday" or "10-Oct-2026" for a day, in the configured zone.
24
+ * Exported so a list can key its separators on the same text it shows.
25
+ */
26
+ export declare const dayLabel: (date: DateValue, options?: {
27
+ now?: Date;
28
+ labels?: Partial<DateSeparatorLabels>;
29
+ }) => string;
30
+ /**
31
+ * A centred day name between two hairlines, for a message list. It is a
32
+ * header to screen readers, so a person can move through a conversation by
33
+ * day. With `label` and `emphasis` it draws an unread divider instead.
34
+ */
35
+ export declare const DateSeparator: React.FC<DateSeparatorProps>;
36
+ export default DateSeparator;
37
+ //# sourceMappingURL=DateSeparator.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { DateSeparatorLabels, DateSeparatorProps } from './DateSeparator.js';
2
+ export { DateSeparator, DEFAULT_DATE_SEPARATOR_LABELS, dayLabel, default } from './DateSeparator.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -29,7 +29,8 @@ declare const FloatingActionButton: React.ForwardRefExoticComponent<FloatingActi
29
29
  export interface FloatingActionButtonGroupAction {
30
30
  key: string;
31
31
  icon: React.ReactNode;
32
- label?: string;
32
+ /** Visible text beside the action. Required: an icon-only menu item is not allowed. */
33
+ label: string;
33
34
  onPress: () => void;
34
35
  tone?: FloatingActionButtonTone;
35
36
  accessibilityLabel: string;
@@ -37,6 +38,7 @@ export interface FloatingActionButtonGroupAction {
37
38
  export interface FloatingActionButtonGroupProps {
38
39
  primaryIcon: React.ReactNode;
39
40
  primaryActiveIcon?: React.ReactNode;
41
+ /** 2 to 6 actions, each with a visible label. Only the first 6 are drawn. */
40
42
  actions: FloatingActionButtonGroupAction[];
41
43
  open?: boolean;
42
44
  defaultOpen?: boolean;
@@ -108,8 +108,8 @@ export interface InputProps extends Omit<TextInputProps, 'style'> {
108
108
  * `'https://'`. The mirror of `unit`: the field's font size in the
109
109
  * placeholder colour, so it reads as part of the field rather than of what
110
110
  * was typed. Sits after `leftIcon` when both are set. A node (a symbol with
111
- * a subscript) is drawn as is, on the same line and with the same gap; it
112
- * owns its own type, and `prefixStyle` does not reach into it.
111
+ * a subscript) sits in the same Text on the same line with the same gap, so
112
+ * its base and subscript take that size and ink, and `prefixStyle` too.
113
113
  */
114
114
  prefix?: React.ReactNode;
115
115
  /** Style applied to the prefix text. */
@@ -4,6 +4,7 @@ import type { HapticType } from '../../utils/hapticUtils.js';
4
4
  import type { SlotIcon } from '../AppIcon/slotIcon.js';
5
5
  import type { ButtonProps } from '../Button/index.js';
6
6
  import type { IconBadgeTone } from '../IconBadge/index.js';
7
+ import type { ContextMenuConfig } from '../Menu/useContextMenu.js';
7
8
  import type { SwipeableAction } from '../Swipeable/index.js';
8
9
  export type ListItemSize = 'sm' | 'md' | 'lg';
9
10
  /**
@@ -88,6 +89,14 @@ export interface ListItemProps {
88
89
  leftActions?: SwipeableAction[];
89
90
  /** Optional swipe-from-right actions. Wraps the row in a Swipeable when provided. */
90
91
  rightActions?: SwipeableAction[];
92
+ /**
93
+ * A long-press menu. Long press (right-click or Shift+F10 on the web) lifts
94
+ * the row over a dimmed screen with the menu beside it, and every item is
95
+ * also a screen reader action on the row. Unavailable items are hidden
96
+ * unless `unavailable: 'disable'`. Keep each action reachable elsewhere too.
97
+ * A disabled row has no menu.
98
+ */
99
+ contextMenu?: ContextMenuConfig;
91
100
  accessibilityLabel?: string;
92
101
  accessibilityHint?: string;
93
102
  style?: StyleProp<ViewStyle>;
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import type { HapticType } from '../../utils/hapticUtils.js';
3
+ import type { PlacementPreference } from '../../utils/placement.js';
4
+ import type { MenuItem, MenuItems, MenuPresentation, MenuUnavailable } from './menuModel.js';
5
+ export interface MenuProps {
6
+ /** A flat list, or a list of up to three groups split by dividers. */
7
+ items: MenuItems;
8
+ /**
9
+ * The element that opens the menu on press, usually an `IconButton` or a
10
+ * `Button`. Its own `onPress` still runs first.
11
+ */
12
+ trigger: React.ReactElement;
13
+ /** A short heading over the items; also the menu's accessible name. */
14
+ title?: string;
15
+ /** Up to three icon actions in a row above the list (the iOS "medium" layout). */
16
+ topActions?: ReadonlyArray<MenuItem>;
17
+ /** Preferred side of the trigger; flips when the other side has the room. Default `'bottom'`. */
18
+ placement?: PlacementPreference;
19
+ /** Default `'auto'`: a sheet on a phone past seven items or with a description. */
20
+ presentation?: MenuPresentation;
21
+ /** Default `'disable'`: unavailable items stay visible, dimmed and focusable. */
22
+ unavailable?: MenuUnavailable;
23
+ /** Controlled open state. */
24
+ open?: boolean;
25
+ onOpenChange?: (open: boolean) => void;
26
+ /** Haptic on choosing an item. Pass false to disable; a HapticType to override. */
27
+ haptic?: HapticType | false;
28
+ /** Accessible name of the menu when there is no `title`. */
29
+ accessibilityLabel?: string;
30
+ /** Accessible name of the tap-outside area. Default `'Close menu'`. */
31
+ closeLabel?: string;
32
+ /** Accessible name of a submenu's Back row. Default `'Back'`. */
33
+ backLabel?: string;
34
+ /** On the trigger wrapper; the open menu takes `<testID>-menu` and its scrim `<testID>-scrim`. */
35
+ testID?: string;
36
+ }
37
+ /**
38
+ * A menu opened from a button, anchored below it (above when there is no
39
+ * room) and closed by choosing an item, tapping outside, Back or Escape.
40
+ * Items run after the menu has closed. For a long-press menu on a row or a
41
+ * card, use their `contextMenu` prop.
42
+ */
43
+ declare const Menu: React.FC<MenuProps>;
44
+ export { Menu };
45
+ export default Menu;
46
+ //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1,30 @@
1
+ import type React from 'react';
2
+ import type { LayoutRectangle } from 'react-native';
3
+ import type { HapticType } from '../../utils/hapticUtils.js';
4
+ import type { PlacementPreference } from '../../utils/placement.js';
5
+ import type { MenuItem, MenuItems, MenuPresentation, MenuUnavailable } from './menuModel.js';
6
+ export interface MenuSurfaceProps {
7
+ open: boolean;
8
+ /** The trigger or the long-pressed view, in window coordinates. */
9
+ anchor: LayoutRectangle | null;
10
+ items: MenuItems;
11
+ title?: string;
12
+ topActions?: ReadonlyArray<MenuItem>;
13
+ placement: PlacementPreference;
14
+ presentation: MenuPresentation;
15
+ unavailable: MenuUnavailable;
16
+ /** A long-press menu: a dimmed scrim, the preview lifted, items reversed when it opens above. */
17
+ context?: boolean;
18
+ /** Drawn over the anchor while a context menu is open. */
19
+ preview?: React.ReactNode;
20
+ onClose: () => void;
21
+ /** Where focus goes back to when the menu closes without running an item. */
22
+ restoreFocusTo?: () => unknown;
23
+ haptic?: HapticType | false;
24
+ accessibilityLabel?: string;
25
+ closeLabel: string;
26
+ backLabel: string;
27
+ testID?: string;
28
+ }
29
+ export declare const MenuSurface: React.FC<MenuSurfaceProps>;
30
+ //# sourceMappingURL=MenuSurface.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** Delay before moving screen reader focus, so it lands after the surface has drawn. */
2
+ export declare const FOCUS_DELAY_MS = 150;
3
+ /**
4
+ * Moves focus to a host view: keyboard focus on the web, screen reader focus
5
+ * on iOS and Android. A ref that resolved to something other than a host
6
+ * view (a consumer component without a forwarded ref) is left alone.
7
+ */
8
+ export declare const focusHost: (node: unknown) => void;
9
+ //# sourceMappingURL=focusHost.d.ts.map
@@ -0,0 +1,5 @@
1
+ export type { MenuProps } from './Menu.js';
2
+ export { default, Menu } from './Menu.js';
3
+ export type { MenuItem, MenuItems, MenuPresentation, MenuUnavailable } from './menuModel.js';
4
+ export type { ContextMenuConfig } from './useContextMenu.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,68 @@
1
+ import type { SlotIcon } from '../AppIcon/slotIcon.js';
2
+ /**
3
+ * One menu entry. Items are data, not children, so the same list can later
4
+ * be handed to a native menu (UIMenu, a Compose DropdownMenu) unchanged.
5
+ */
6
+ export interface MenuItem {
7
+ /** Stable id; also names the item's screen reader action on a context menu. */
8
+ key: string;
9
+ /** A verb, in title case on iOS. End it with an ellipsis when the action asks for more. */
10
+ label: string;
11
+ /** Leading icon. Give every item in a group an icon, or none of them. */
12
+ icon?: SlotIcon;
13
+ /** A line under the label. On a phone any description presents the menu as a sheet. */
14
+ description?: string;
15
+ /** Short trailing text, such as a count. */
16
+ detail?: string;
17
+ /** Draws a check mark and reports the checked state; leave undefined for a plain action. */
18
+ checked?: boolean;
19
+ /** Draws the item in the error ink. Confirm the action in a Dialog from `onPress`. */
20
+ destructive?: boolean;
21
+ /** Unavailable now. Hidden or dimmed by the menu's `unavailable` mode. */
22
+ disabled?: boolean;
23
+ /** Never shown. */
24
+ hidden?: boolean;
25
+ /** One level of items that replaces the list, with a Back row, when this item is chosen. */
26
+ submenu?: ReadonlyArray<MenuItem>;
27
+ /** Runs after the menu has closed, so a Dialog or a native picker can open from it. */
28
+ onPress?: () => void;
29
+ accessibilityLabel?: string;
30
+ testID?: string;
31
+ }
32
+ /** A flat list is one group; a list of lists is groups split by dividers (at most 3). */
33
+ export type MenuItems = ReadonlyArray<MenuItem> | ReadonlyArray<ReadonlyArray<MenuItem>>;
34
+ /**
35
+ * `hide` drops a disabled item (the HIG rule for context menus); `disable`
36
+ * shows it dimmed and focusable but not selectable (the Material rule for a
37
+ * button menu).
38
+ */
39
+ export type MenuUnavailable = 'hide' | 'disable';
40
+ /**
41
+ * `popover` anchors the menu to its trigger; `sheet` lists it in an
42
+ * OptionSheet; `auto` uses the sheet on a phone when the menu has more than
43
+ * seven items or any description, and the popover otherwise.
44
+ */
45
+ export type MenuPresentation = 'auto' | 'popover' | 'sheet';
46
+ export declare const MAX_GROUPS = 3;
47
+ export declare const MAX_TOP_ACTIONS = 3;
48
+ export declare const SHEET_ITEM_THRESHOLD = 7;
49
+ /** Prefixes a context menu's screen reader actions, so a key never collides with `activate`. */
50
+ export declare const ACTION_PREFIX = "menu:";
51
+ /** The groups to draw: hidden items and empty groups removed. */
52
+ export declare const visibleGroups: (items: MenuItems, unavailable: MenuUnavailable) => ReadonlyArray<ReadonlyArray<MenuItem>>;
53
+ /** The top row of the iOS "medium" layout, cut to three. */
54
+ export declare const visibleTopActions: (topActions: ReadonlyArray<MenuItem> | undefined, unavailable: MenuUnavailable) => ReadonlyArray<MenuItem>;
55
+ /** Whether `auto` presentation should use the sheet for these items on a phone. */
56
+ export declare const wantsSheet: (groups: ReadonlyArray<ReadonlyArray<MenuItem>>, topActions: ReadonlyArray<MenuItem>) => boolean;
57
+ export interface MenuAction {
58
+ name: string;
59
+ label: string;
60
+ item: MenuItem;
61
+ }
62
+ /**
63
+ * Every enabled leaf as a screen reader action: a context menu is reached by
64
+ * a long press, and the HIG wants its actions available without the gesture.
65
+ * A submenu item names its parent first.
66
+ */
67
+ export declare const menuActions: (groups: ReadonlyArray<ReadonlyArray<MenuItem>>, topActions: ReadonlyArray<MenuItem>) => MenuAction[];
68
+ //# sourceMappingURL=menuModel.d.ts.map