@webority/mobile-ui 0.9.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/android/src/newarch/java/com/webority/mobileui/pdfrasterizer/PdfRasterizerModule.kt +6 -7
  2. package/ios/PdfRasterizer.mm +36 -9
  3. package/lib/commonjs/components/BarChart/BarChart.js +1 -0
  4. package/lib/commonjs/components/BarChart/index.js +1 -0
  5. package/lib/commonjs/components/BarChart/scale.js +1 -0
  6. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
  7. package/lib/commonjs/components/BottomNavigation/useScreenReaderEnabled.js +1 -0
  8. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  9. package/lib/commonjs/components/BottomSheet/index.js +1 -1
  10. package/lib/commonjs/components/BottomSheet/useSheetSwap.js +1 -0
  11. package/lib/commonjs/components/Card/Card.js +1 -1
  12. package/lib/commonjs/components/Checkbox/Checkbox.js +1 -1
  13. package/lib/commonjs/components/Composer/Composer.js +1 -0
  14. package/lib/commonjs/components/Composer/index.js +1 -0
  15. package/lib/commonjs/components/DateSeparator/DateSeparator.js +1 -0
  16. package/lib/commonjs/components/DateSeparator/index.js +1 -0
  17. package/lib/commonjs/components/FieldBase/ChoiceText.js +1 -1
  18. package/lib/commonjs/components/FieldBase/FieldBase.js +1 -1
  19. package/lib/commonjs/components/FieldBase/useFloatingLabel.js +1 -1
  20. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
  21. package/lib/commonjs/components/FormField/FormField.js +1 -1
  22. package/lib/commonjs/components/Input/Input.js +1 -1
  23. package/lib/commonjs/components/ListItem/ListItem.js +1 -1
  24. package/lib/commonjs/components/Menu/Menu.js +1 -0
  25. package/lib/commonjs/components/Menu/MenuSurface.js +1 -0
  26. package/lib/commonjs/components/Menu/focusHost.js +1 -0
  27. package/lib/commonjs/components/Menu/index.js +1 -0
  28. package/lib/commonjs/components/Menu/menuModel.js +1 -0
  29. package/lib/commonjs/components/Menu/useContextMenu.js +1 -0
  30. package/lib/commonjs/components/Menu/webOnly.js +1 -0
  31. package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -0
  32. package/lib/commonjs/components/MessageBubble/index.js +1 -0
  33. package/lib/commonjs/components/MessageList/MessageList.js +1 -0
  34. package/lib/commonjs/components/MessageList/index.js +1 -0
  35. package/lib/commonjs/components/Notation/Notation.js +1 -1
  36. package/lib/commonjs/components/OnboardingPager/OnboardingPager.js +1 -0
  37. package/lib/commonjs/components/OnboardingPager/index.js +1 -0
  38. package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
  39. package/lib/commonjs/components/PaymentResult/PaymentResult.js +1 -0
  40. package/lib/commonjs/components/PaymentResult/index.js +1 -0
  41. package/lib/commonjs/components/PermissionPrompt/PermissionPrompt.js +1 -0
  42. package/lib/commonjs/components/PermissionPrompt/index.js +1 -0
  43. package/lib/commonjs/components/PermissionPrompt/usePermissionPrompt.js +1 -0
  44. package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  45. package/lib/commonjs/components/Radio/Radio.js +1 -1
  46. package/lib/commonjs/components/Radio/RadioGroup.js +1 -1
  47. package/lib/commonjs/components/ScannerOverlay/ScannerOverlay.js +1 -0
  48. package/lib/commonjs/components/ScannerOverlay/index.js +1 -0
  49. package/lib/commonjs/components/SearchBar/SearchBar.js +1 -1
  50. package/lib/commonjs/components/SearchBar/SearchPanel.js +1 -0
  51. package/lib/commonjs/components/SearchBar/highlight.js +1 -0
  52. package/lib/commonjs/components/SearchBar/index.js +1 -1
  53. package/lib/commonjs/components/SearchBar/useRecentSearches.js +1 -0
  54. package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +1 -1
  55. package/lib/commonjs/components/Select/Select.js +1 -1
  56. package/lib/commonjs/components/SignaturePad/SignaturePad.js +1 -0
  57. package/lib/commonjs/components/SignaturePad/index.js +1 -0
  58. package/lib/commonjs/components/SignaturePad/signatureGeometry.js +1 -0
  59. package/lib/commonjs/components/SignaturePad/writePng.js +1 -0
  60. package/lib/commonjs/components/SignaturePad/writePng.web.js +1 -0
  61. package/lib/commonjs/components/Sparkline/Sparkline.js +1 -0
  62. package/lib/commonjs/components/Sparkline/geometry.js +1 -0
  63. package/lib/commonjs/components/Sparkline/index.js +1 -0
  64. package/lib/commonjs/components/Spinner/Spinner.js +1 -1
  65. package/lib/commonjs/components/StatTile/StatTile.js +1 -1
  66. package/lib/commonjs/components/Switch/Switch.js +1 -1
  67. package/lib/commonjs/components/TagInput/TagInput.js +1 -1
  68. package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
  69. package/lib/commonjs/components/Toast/Toast.js +1 -1
  70. package/lib/commonjs/components/Toast/ToastProvider.js +1 -1
  71. package/lib/commonjs/components/Tooltip/RichTooltipBody.js +1 -0
  72. package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
  73. package/lib/commonjs/components/Tooltip/tooltipPosition.js +1 -0
  74. package/lib/commonjs/components/TypingIndicator/TypingIndicator.js +1 -0
  75. package/lib/commonjs/components/TypingIndicator/index.js +1 -0
  76. package/lib/commonjs/components/WheelPicker/Wheel.js +1 -0
  77. package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -0
  78. package/lib/commonjs/components/WheelPicker/index.js +1 -0
  79. package/lib/commonjs/components/index.js +1 -1
  80. package/lib/commonjs/hooks/index.js +1 -1
  81. package/lib/commonjs/hooks/useRefreshControl.js +1 -0
  82. package/lib/commonjs/hooks/useScrollDirection.js +1 -0
  83. package/lib/commonjs/index.js +1 -1
  84. package/lib/commonjs/utils/announce.js +1 -0
  85. package/lib/commonjs/utils/hapticUtils.js +1 -1
  86. package/lib/commonjs/utils/index.js +1 -1
  87. package/lib/commonjs/utils/placement.js +1 -0
  88. package/lib/module/components/BarChart/BarChart.js +1 -0
  89. package/lib/module/components/BarChart/index.js +1 -0
  90. package/lib/module/components/BarChart/scale.js +1 -0
  91. package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
  92. package/lib/module/components/BottomNavigation/useScreenReaderEnabled.js +1 -0
  93. package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
  94. package/lib/module/components/BottomSheet/index.js +1 -1
  95. package/lib/module/components/BottomSheet/useSheetSwap.js +1 -0
  96. package/lib/module/components/Card/Card.js +1 -1
  97. package/lib/module/components/Checkbox/Checkbox.js +1 -1
  98. package/lib/module/components/Composer/Composer.js +1 -0
  99. package/lib/module/components/Composer/index.js +1 -0
  100. package/lib/module/components/DateSeparator/DateSeparator.js +1 -0
  101. package/lib/module/components/DateSeparator/index.js +1 -0
  102. package/lib/module/components/FieldBase/ChoiceText.js +1 -1
  103. package/lib/module/components/FieldBase/FieldBase.js +1 -1
  104. package/lib/module/components/FieldBase/useFloatingLabel.js +1 -1
  105. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
  106. package/lib/module/components/FormField/FormField.js +1 -1
  107. package/lib/module/components/Input/Input.js +1 -1
  108. package/lib/module/components/ListItem/ListItem.js +1 -1
  109. package/lib/module/components/Menu/Menu.js +1 -0
  110. package/lib/module/components/Menu/MenuSurface.js +1 -0
  111. package/lib/module/components/Menu/focusHost.js +1 -0
  112. package/lib/module/components/Menu/index.js +1 -0
  113. package/lib/module/components/Menu/menuModel.js +1 -0
  114. package/lib/module/components/Menu/useContextMenu.js +1 -0
  115. package/lib/module/components/Menu/webOnly.js +1 -0
  116. package/lib/module/components/MessageBubble/MessageBubble.js +1 -0
  117. package/lib/module/components/MessageBubble/index.js +1 -0
  118. package/lib/module/components/MessageList/MessageList.js +1 -0
  119. package/lib/module/components/MessageList/index.js +1 -0
  120. package/lib/module/components/Notation/Notation.js +1 -1
  121. package/lib/module/components/OnboardingPager/OnboardingPager.js +1 -0
  122. package/lib/module/components/OnboardingPager/index.js +1 -0
  123. package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
  124. package/lib/module/components/PaymentResult/PaymentResult.js +1 -0
  125. package/lib/module/components/PaymentResult/index.js +1 -0
  126. package/lib/module/components/PermissionPrompt/PermissionPrompt.js +1 -0
  127. package/lib/module/components/PermissionPrompt/index.js +1 -0
  128. package/lib/module/components/PermissionPrompt/usePermissionPrompt.js +1 -0
  129. package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  130. package/lib/module/components/Radio/Radio.js +1 -1
  131. package/lib/module/components/Radio/RadioGroup.js +1 -1
  132. package/lib/module/components/ScannerOverlay/ScannerOverlay.js +1 -0
  133. package/lib/module/components/ScannerOverlay/index.js +1 -0
  134. package/lib/module/components/SearchBar/SearchBar.js +1 -1
  135. package/lib/module/components/SearchBar/SearchPanel.js +1 -0
  136. package/lib/module/components/SearchBar/highlight.js +1 -0
  137. package/lib/module/components/SearchBar/index.js +1 -1
  138. package/lib/module/components/SearchBar/useRecentSearches.js +1 -0
  139. package/lib/module/components/SegmentedControl/SegmentedControl.js +1 -1
  140. package/lib/module/components/Select/Select.js +1 -1
  141. package/lib/module/components/SignaturePad/SignaturePad.js +1 -0
  142. package/lib/module/components/SignaturePad/index.js +1 -0
  143. package/lib/module/components/SignaturePad/signatureGeometry.js +1 -0
  144. package/lib/module/components/SignaturePad/writePng.js +1 -0
  145. package/lib/module/components/SignaturePad/writePng.web.js +1 -0
  146. package/lib/module/components/Sparkline/Sparkline.js +1 -0
  147. package/lib/module/components/Sparkline/geometry.js +1 -0
  148. package/lib/module/components/Sparkline/index.js +1 -0
  149. package/lib/module/components/Spinner/Spinner.js +1 -1
  150. package/lib/module/components/StatTile/StatTile.js +1 -1
  151. package/lib/module/components/Switch/Switch.js +1 -1
  152. package/lib/module/components/TagInput/TagInput.js +1 -1
  153. package/lib/module/components/TimePicker/TimePicker.js +1 -1
  154. package/lib/module/components/Toast/Toast.js +1 -1
  155. package/lib/module/components/Toast/ToastProvider.js +1 -1
  156. package/lib/module/components/Tooltip/RichTooltipBody.js +1 -0
  157. package/lib/module/components/Tooltip/Tooltip.js +1 -1
  158. package/lib/module/components/Tooltip/tooltipPosition.js +1 -0
  159. package/lib/module/components/TypingIndicator/TypingIndicator.js +1 -0
  160. package/lib/module/components/TypingIndicator/index.js +1 -0
  161. package/lib/module/components/WheelPicker/Wheel.js +1 -0
  162. package/lib/module/components/WheelPicker/WheelPicker.js +1 -0
  163. package/lib/module/components/WheelPicker/index.js +1 -0
  164. package/lib/module/components/index.js +1 -1
  165. package/lib/module/hooks/index.js +1 -1
  166. package/lib/module/hooks/useRefreshControl.js +1 -0
  167. package/lib/module/hooks/useScrollDirection.js +1 -0
  168. package/lib/module/index.js +1 -1
  169. package/lib/module/utils/announce.js +1 -0
  170. package/lib/module/utils/hapticUtils.js +1 -1
  171. package/lib/module/utils/index.js +1 -1
  172. package/lib/module/utils/placement.js +1 -0
  173. package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +62 -0
  174. package/lib/typescript/commonjs/components/BarChart/index.d.ts +3 -0
  175. package/lib/typescript/commonjs/components/BarChart/scale.d.ts +15 -0
  176. package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +32 -0
  177. package/lib/typescript/commonjs/components/BottomNavigation/index.d.ts +1 -1
  178. package/lib/typescript/commonjs/components/BottomNavigation/useScreenReaderEnabled.d.ts +8 -0
  179. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +34 -3
  180. package/lib/typescript/commonjs/components/BottomSheet/index.d.ts +2 -0
  181. package/lib/typescript/commonjs/components/BottomSheet/useSheetSwap.d.ts +24 -0
  182. package/lib/typescript/commonjs/components/Card/Card.d.ts +9 -0
  183. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +4 -1
  184. package/lib/typescript/commonjs/components/Composer/Composer.d.ts +61 -0
  185. package/lib/typescript/commonjs/components/Composer/index.d.ts +3 -0
  186. package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.d.ts +37 -0
  187. package/lib/typescript/commonjs/components/DateSeparator/index.d.ts +3 -0
  188. package/lib/typescript/commonjs/components/FileViewer/FileViewer.d.ts +1 -1
  189. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +3 -1
  190. package/lib/typescript/commonjs/components/Input/Input.d.ts +2 -2
  191. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +9 -0
  192. package/lib/typescript/commonjs/components/Menu/Menu.d.ts +46 -0
  193. package/lib/typescript/commonjs/components/Menu/MenuSurface.d.ts +30 -0
  194. package/lib/typescript/commonjs/components/Menu/focusHost.d.ts +9 -0
  195. package/lib/typescript/commonjs/components/Menu/index.d.ts +5 -0
  196. package/lib/typescript/commonjs/components/Menu/menuModel.d.ts +68 -0
  197. package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +58 -0
  198. package/lib/typescript/commonjs/components/Menu/webOnly.d.ts +7 -0
  199. package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +87 -0
  200. package/lib/typescript/commonjs/components/MessageBubble/index.d.ts +3 -0
  201. package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +68 -0
  202. package/lib/typescript/commonjs/components/MessageList/index.d.ts +3 -0
  203. package/lib/typescript/commonjs/components/Notation/Notation.d.ts +10 -4
  204. package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.d.ts +53 -0
  205. package/lib/typescript/commonjs/components/OnboardingPager/index.d.ts +3 -0
  206. package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +2 -0
  207. package/lib/typescript/commonjs/components/PaymentResult/PaymentResult.d.ts +71 -0
  208. package/lib/typescript/commonjs/components/PaymentResult/index.d.ts +3 -0
  209. package/lib/typescript/commonjs/components/PermissionPrompt/PermissionPrompt.d.ts +39 -0
  210. package/lib/typescript/commonjs/components/PermissionPrompt/index.d.ts +5 -0
  211. package/lib/typescript/commonjs/components/PermissionPrompt/usePermissionPrompt.d.ts +44 -0
  212. package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +5 -2
  213. package/lib/typescript/commonjs/components/Radio/Radio.d.ts +13 -4
  214. package/lib/typescript/commonjs/components/Radio/RadioGroup.d.ts +5 -0
  215. package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.d.ts +74 -0
  216. package/lib/typescript/commonjs/components/ScannerOverlay/index.d.ts +3 -0
  217. package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +35 -0
  218. package/lib/typescript/commonjs/components/SearchBar/SearchPanel.d.ts +49 -0
  219. package/lib/typescript/commonjs/components/SearchBar/highlight.d.ts +14 -0
  220. package/lib/typescript/commonjs/components/SearchBar/index.d.ts +3 -0
  221. package/lib/typescript/commonjs/components/SearchBar/useRecentSearches.d.ts +24 -0
  222. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +5 -1
  223. package/lib/typescript/commonjs/components/Select/Select.d.ts +4 -1
  224. package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +94 -0
  225. package/lib/typescript/commonjs/components/SignaturePad/index.d.ts +4 -0
  226. package/lib/typescript/commonjs/components/SignaturePad/signatureGeometry.d.ts +36 -0
  227. package/lib/typescript/commonjs/components/SignaturePad/writePng.d.ts +7 -0
  228. package/lib/typescript/commonjs/components/SignaturePad/writePng.web.d.ts +3 -0
  229. package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +41 -0
  230. package/lib/typescript/commonjs/components/Sparkline/geometry.d.ts +20 -0
  231. package/lib/typescript/commonjs/components/Sparkline/index.d.ts +3 -0
  232. package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +7 -1
  233. package/lib/typescript/commonjs/components/StatTile/StatTile.d.ts +24 -1
  234. package/lib/typescript/commonjs/components/StatTile/index.d.ts +1 -1
  235. package/lib/typescript/commonjs/components/Switch/Switch.d.ts +11 -4
  236. package/lib/typescript/commonjs/components/TagInput/TagInput.d.ts +4 -0
  237. package/lib/typescript/commonjs/components/Toast/Toast.d.ts +21 -0
  238. package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +21 -0
  239. package/lib/typescript/commonjs/components/Toast/index.d.ts +1 -1
  240. package/lib/typescript/commonjs/components/Tooltip/RichTooltipBody.d.ts +27 -0
  241. package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +24 -0
  242. package/lib/typescript/commonjs/components/Tooltip/index.d.ts +1 -1
  243. package/lib/typescript/commonjs/components/Tooltip/tooltipPosition.d.ts +35 -0
  244. package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.d.ts +21 -0
  245. package/lib/typescript/commonjs/components/TypingIndicator/index.d.ts +3 -0
  246. package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +34 -0
  247. package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +73 -0
  248. package/lib/typescript/commonjs/components/WheelPicker/index.d.ts +3 -0
  249. package/lib/typescript/commonjs/components/index.d.ts +36 -8
  250. package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
  251. package/lib/typescript/commonjs/hooks/useRefreshControl.d.ts +75 -0
  252. package/lib/typescript/commonjs/hooks/useScrollDirection.d.ts +21 -0
  253. package/lib/typescript/commonjs/index.d.ts +4 -4
  254. package/lib/typescript/commonjs/specs/NativePdfRasterizer.d.ts +1 -1
  255. package/lib/typescript/commonjs/utils/announce.d.ts +14 -0
  256. package/lib/typescript/commonjs/utils/hapticUtils.d.ts +1 -1
  257. package/lib/typescript/commonjs/utils/index.d.ts +2 -0
  258. package/lib/typescript/commonjs/utils/placement.d.ts +55 -0
  259. package/lib/typescript/module/components/BarChart/BarChart.d.ts +62 -0
  260. package/lib/typescript/module/components/BarChart/index.d.ts +3 -0
  261. package/lib/typescript/module/components/BarChart/scale.d.ts +15 -0
  262. package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +32 -0
  263. package/lib/typescript/module/components/BottomNavigation/index.d.ts +1 -1
  264. package/lib/typescript/module/components/BottomNavigation/useScreenReaderEnabled.d.ts +8 -0
  265. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +34 -3
  266. package/lib/typescript/module/components/BottomSheet/index.d.ts +2 -0
  267. package/lib/typescript/module/components/BottomSheet/useSheetSwap.d.ts +24 -0
  268. package/lib/typescript/module/components/Card/Card.d.ts +9 -0
  269. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +4 -1
  270. package/lib/typescript/module/components/Composer/Composer.d.ts +61 -0
  271. package/lib/typescript/module/components/Composer/index.d.ts +3 -0
  272. package/lib/typescript/module/components/DateSeparator/DateSeparator.d.ts +37 -0
  273. package/lib/typescript/module/components/DateSeparator/index.d.ts +3 -0
  274. package/lib/typescript/module/components/FileViewer/FileViewer.d.ts +1 -1
  275. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +3 -1
  276. package/lib/typescript/module/components/Input/Input.d.ts +2 -2
  277. package/lib/typescript/module/components/ListItem/ListItem.d.ts +9 -0
  278. package/lib/typescript/module/components/Menu/Menu.d.ts +46 -0
  279. package/lib/typescript/module/components/Menu/MenuSurface.d.ts +30 -0
  280. package/lib/typescript/module/components/Menu/focusHost.d.ts +9 -0
  281. package/lib/typescript/module/components/Menu/index.d.ts +5 -0
  282. package/lib/typescript/module/components/Menu/menuModel.d.ts +68 -0
  283. package/lib/typescript/module/components/Menu/useContextMenu.d.ts +58 -0
  284. package/lib/typescript/module/components/Menu/webOnly.d.ts +7 -0
  285. package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +87 -0
  286. package/lib/typescript/module/components/MessageBubble/index.d.ts +3 -0
  287. package/lib/typescript/module/components/MessageList/MessageList.d.ts +68 -0
  288. package/lib/typescript/module/components/MessageList/index.d.ts +3 -0
  289. package/lib/typescript/module/components/Notation/Notation.d.ts +10 -4
  290. package/lib/typescript/module/components/OnboardingPager/OnboardingPager.d.ts +53 -0
  291. package/lib/typescript/module/components/OnboardingPager/index.d.ts +3 -0
  292. package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +2 -0
  293. package/lib/typescript/module/components/PaymentResult/PaymentResult.d.ts +71 -0
  294. package/lib/typescript/module/components/PaymentResult/index.d.ts +3 -0
  295. package/lib/typescript/module/components/PermissionPrompt/PermissionPrompt.d.ts +39 -0
  296. package/lib/typescript/module/components/PermissionPrompt/index.d.ts +5 -0
  297. package/lib/typescript/module/components/PermissionPrompt/usePermissionPrompt.d.ts +44 -0
  298. package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +5 -2
  299. package/lib/typescript/module/components/Radio/Radio.d.ts +13 -4
  300. package/lib/typescript/module/components/Radio/RadioGroup.d.ts +5 -0
  301. package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.d.ts +74 -0
  302. package/lib/typescript/module/components/ScannerOverlay/index.d.ts +3 -0
  303. package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +35 -0
  304. package/lib/typescript/module/components/SearchBar/SearchPanel.d.ts +49 -0
  305. package/lib/typescript/module/components/SearchBar/highlight.d.ts +14 -0
  306. package/lib/typescript/module/components/SearchBar/index.d.ts +3 -0
  307. package/lib/typescript/module/components/SearchBar/useRecentSearches.d.ts +24 -0
  308. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +5 -1
  309. package/lib/typescript/module/components/Select/Select.d.ts +4 -1
  310. package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +94 -0
  311. package/lib/typescript/module/components/SignaturePad/index.d.ts +4 -0
  312. package/lib/typescript/module/components/SignaturePad/signatureGeometry.d.ts +36 -0
  313. package/lib/typescript/module/components/SignaturePad/writePng.d.ts +7 -0
  314. package/lib/typescript/module/components/SignaturePad/writePng.web.d.ts +3 -0
  315. package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +41 -0
  316. package/lib/typescript/module/components/Sparkline/geometry.d.ts +20 -0
  317. package/lib/typescript/module/components/Sparkline/index.d.ts +3 -0
  318. package/lib/typescript/module/components/Spinner/Spinner.d.ts +7 -1
  319. package/lib/typescript/module/components/StatTile/StatTile.d.ts +24 -1
  320. package/lib/typescript/module/components/StatTile/index.d.ts +1 -1
  321. package/lib/typescript/module/components/Switch/Switch.d.ts +11 -4
  322. package/lib/typescript/module/components/TagInput/TagInput.d.ts +4 -0
  323. package/lib/typescript/module/components/Toast/Toast.d.ts +21 -0
  324. package/lib/typescript/module/components/Toast/ToastProvider.d.ts +21 -0
  325. package/lib/typescript/module/components/Toast/index.d.ts +1 -1
  326. package/lib/typescript/module/components/Tooltip/RichTooltipBody.d.ts +27 -0
  327. package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +24 -0
  328. package/lib/typescript/module/components/Tooltip/index.d.ts +1 -1
  329. package/lib/typescript/module/components/Tooltip/tooltipPosition.d.ts +35 -0
  330. package/lib/typescript/module/components/TypingIndicator/TypingIndicator.d.ts +21 -0
  331. package/lib/typescript/module/components/TypingIndicator/index.d.ts +3 -0
  332. package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +34 -0
  333. package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +73 -0
  334. package/lib/typescript/module/components/WheelPicker/index.d.ts +3 -0
  335. package/lib/typescript/module/components/index.d.ts +36 -8
  336. package/lib/typescript/module/hooks/index.d.ts +4 -0
  337. package/lib/typescript/module/hooks/useRefreshControl.d.ts +75 -0
  338. package/lib/typescript/module/hooks/useScrollDirection.d.ts +21 -0
  339. package/lib/typescript/module/index.d.ts +4 -4
  340. package/lib/typescript/module/specs/NativePdfRasterizer.d.ts +1 -1
  341. package/lib/typescript/module/utils/announce.d.ts +14 -0
  342. package/lib/typescript/module/utils/hapticUtils.d.ts +1 -1
  343. package/lib/typescript/module/utils/index.d.ts +2 -0
  344. package/lib/typescript/module/utils/placement.d.ts +55 -0
  345. package/package.json +3 -3
  346. package/src/specs/NativePdfRasterizer.ts +1 -1
@@ -1 +1 @@
1
- "use strict";import React,{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Dimensions,Easing,Modal,Pressable,StyleSheet,Text,View}from"react-native";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{ToastHost}from"../Toast/ToastProvider.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const DEFAULT_TOOLTIP_GAP=8,DEFAULT_SCREEN_PADDING=8,DEFAULT_PRESS_AUTO_HIDE_MS=4e3,DEFAULT_ARROW_HALF_WIDTH=4,DEFAULT_ARROW_HEIGHT=6,DEFAULT_ARROW_CORNER_PADDING=12,DEFAULT_MAX_WIDTH=240,DEFAULT_LINE_HEIGHT=18,Tooltip=e=>{const{content:t,children:o,placement:r="auto",trigger:s="longPress",visible:i,onVisibleChange:n,hideOnContentPress:a=!0,maxWidth:l,showArrow:u=!0,accessibilityLabel:c,style:m,containerStyle:h,arrowStyle:d,messageStyle:p,testID:g}=e,f=useTheme(),b=useMemo(()=>buildStyles(f),[f]),y=f.components.tooltip,w=y?.gap??8,x=y?.screenPadding??8,T=y?.pressAutoHideMs??4e3,_=y?.arrowHalfWidth??4,A=y?.arrowHeight??6,R=y?.arrowCornerPadding??12,S=y?.lineHeight??18,D=l??y?.maxWidth??240,E=y?.enableScaleAnimation??!1,v=y?.exitDurationMs??150,C="manual"===s||"boolean"==typeof i,[M,L]=useState(!1),j=C?Boolean(i):M,[H,P]=useState(null),[F,O]=useState({width:0,height:0}),V=useRef(null),W=useRef(createAnimatedValue(j?1:E?.85:1)).current,I=useRef(createAnimatedValue(j?1:0)).current,k=useRef(null),N=useRef(!1),U=useCallback(e=>{C||L(e),n?.(e)},[C,n]),z=useCallback(()=>{V.current&&V.current.measureInWindow((e,t,o,r)=>{P({x:e,y:t,width:o,height:r})})},[]),G=useCallback(e=>{z(),U(!0)},[z,U]),B=useCallback(()=>{U(!1)},[U]);useEffect(()=>{if(!N.current)return N.current=!0,j&&(z(),"press"===s&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{B()},T))),()=>{k.current&&(clearTimeout(k.current),k.current=null)};let e;if(j){z();const t=[Animated.timing(I,{toValue:1,duration:f.motion.duration.fast,useNativeDriver:!0})];E&&t.push(Animated.spring(W,{toValue:1,damping:f.motion.spring.snappy.damping,stiffness:f.motion.spring.snappy.stiffness,mass:f.motion.spring.snappy.mass,useNativeDriver:!0})),e=Animated.parallel(t),e.start(),"press"===s&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{B()},T))}else{const t=[Animated.timing(I,{toValue:0,duration:v,easing:Easing.bezier(...f.motion.easing.accelerate),useNativeDriver:!0})];E&&t.push(Animated.timing(W,{toValue:.85,duration:v,easing:Easing.bezier(...f.motion.easing.accelerate),useNativeDriver:!0})),e=Animated.parallel(t),e.start(),k.current&&(clearTimeout(k.current),k.current=null)}return()=>{e?.stop(),k.current&&(clearTimeout(k.current),k.current=null)}},[j]);const q=useMemo(()=>{const e=Dimensions.get("window");if(!H)return{top:x,left:x,placement:"bottom",arrowOffset:0};const t=F.width||Math.min(D,e.width-2*x),o=F.height||0;let s;if("auto"===r){const t={top:H.y,bottom:e.height-(H.y+H.height),left:H.x,right:e.width-(H.x+H.width)},o=Math.max(t.top,t.bottom,t.left,t.right);s=o===t.bottom?"bottom":o===t.top?"top":o===t.right?"right":"left"}else s=r;let i=0,n=0;"top"===s?(i=H.y-o-w,n=H.x+H.width/2-t/2):"bottom"===s?(i=H.y+H.height+w,n=H.x+H.width/2-t/2):"left"===s?(i=H.y+H.height/2-o/2,n=H.x-t-w):(i=H.y+H.height/2-o/2,n=H.x+H.width+w),n=Math.max(x,Math.min(n,e.width-t-x)),i=Math.max(x,Math.min(i,e.height-o-x));let a=0;if("top"===s||"bottom"===s){const e=H.x+H.width/2-n,o=R,r=Math.max(o,t-R);a=Math.max(o,Math.min(e,r))}else{const e=H.y+H.height/2-i,t=R,r=Math.max(t,o-R);a=Math.max(t,Math.min(e,r))}return{top:i,left:n,placement:s,arrowOffset:a}},[H,F,r,D,x,w,R]),X={};if("longPress"===s)X.onLongPress=G,X.accessibilityHint="Long press for more info";else if("press"===s){const e=o.props.onPress;X.onPress=t=>{e?.(t),G(t)}}const J=React.cloneElement(o,X),K=c??("string"==typeof t?t:"Tooltip"),Q=useMemo(()=>{if(!u)return null;const e=f.colors.background.inverse,t={position:"absolute",width:0,height:0,backgroundColor:"transparent",borderStyle:"solid",borderLeftWidth:_,borderRightWidth:_,borderBottomWidth:A,borderTopWidth:0,borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",borderBottomColor:e};return"top"===q.placement?{...t,bottom:-A,left:q.arrowOffset-_,transform:[{rotate:"180deg"}]}:"bottom"===q.placement?{...t,top:-A,left:q.arrowOffset-_}:"left"===q.placement?{...t,right:-A,top:q.arrowOffset-_,transform:[{rotate:"90deg"}]}:{...t,left:-A,top:q.arrowOffset-_,transform:[{rotate:"-90deg"}]}},[u,q,f,_,A]);return _jsxs(_Fragment,{children:[_jsx(View,{ref:V,collapsable:!1,onLayout:z,testID:g,children:J}),_jsxs(Modal,{visible:j,transparent:!0,statusBarTranslucent:!0,presentationStyle:"overFullScreen",animationType:"none",onRequestClose:B,children:[_jsx(Pressable,{style:StyleSheet.absoluteFill,onPress:a?B:void 0,accessibilityLabel:"Close tooltip",accessibilityRole:"button",children:j?_jsxs(Animated.View,{accessibilityRole:"tooltip",accessibilityLiveRegion:"polite",accessibilityLabel:K,onLayout:e=>{const{width:t,height:o}=e.nativeEvent.layout;t===F.width&&o===F.height||O({width:t,height:o})},style:[{position:"absolute",top:q.top,left:q.left,maxWidth:D,opacity:I,transform:[{scale:W}]},m,h],children:[_jsx(View,{style:[b.tooltip,{backgroundColor:f.colors.background.inverse,borderRadius:f.radius.md,...smoothCorners,paddingHorizontal:f.spacing.md,paddingVertical:f.spacing.sm,...f.shadows.lg,shadowColor:f.shadows.lg.shadowColor}],children:"string"==typeof t?_jsx(Text,{style:[{color:f.colors.text.inverse,fontSize:f.typography.fontSize.sm,lineHeight:S},p],children:t}):t}),Q?_jsx(View,{style:[Q,d],pointerEvents:"none"}):null]}):null}),_jsx(ToastHost,{})]})]})},buildStyles=e=>StyleSheet.create({tooltip:{overflow:"hidden"}});export{Tooltip};export default Tooltip;
1
+ "use strict";import React,{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,Modal,Platform,Pressable,StyleSheet,Text,useWindowDimensions,View}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{mergeRefs}from"../../utils/mergeRefs.js";import{claimAnchoredSurface}from"../../utils/placement.js";import{FOCUS_DELAY_MS,focusHost}from"../Menu/focusHost.js";import{ToastHost}from"../Toast/ToastProvider.js";import{RichTooltipBody}from"./RichTooltipBody.js";import{resolveTooltipPosition}from"./tooltipPosition.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const DEFAULT_TOOLTIP_GAP=8,DEFAULT_SCREEN_PADDING=8,DEFAULT_PRESS_AUTO_HIDE_MS=4e3,DEFAULT_ARROW_HALF_WIDTH=4,DEFAULT_ARROW_HEIGHT=6,DEFAULT_ARROW_CORNER_PADDING=12,DEFAULT_MAX_WIDTH=240,RICH_MAX_WIDTH=280,DEFAULT_LINE_HEIGHT=18,Tooltip=e=>{const{content:t,children:r,variant:o="plain",title:s,action:i,placement:n="auto",visible:a,onVisibleChange:l,hideOnContentPress:u=!0,maxWidth:c,showArrow:m=!0,accessibilityLabel:d,style:f,containerStyle:p,arrowStyle:h,messageStyle:g,closeLabel:b="Close tooltip",testID:y}=e,T="rich"===o,_=e.trigger??(T?"press":"longPress"),R=useTheme(),A=useSafeAreaInsets(),S=useWindowDimensions(),w=useMemo(()=>buildStyles(R),[R]),x=R.components.tooltip,v=x?.gap??8,C=x?.screenPadding??8,D=x?.pressAutoHideMs??4e3,E=x?.arrowHalfWidth??4,P=x?.arrowHeight??6,j=x?.arrowCornerPadding??12,L=x?.lineHeight??18,H=c??(T?280:x?.maxWidth??240),F="press"===_&&!T,W=x?.enableScaleAnimation??!1,I=x?.exitDurationMs??150,M="manual"===_||"boolean"==typeof a,[O,V]=useState(!1),k=M?Boolean(a):O,[U,N]=useState(null),[B,z]=useState({width:0,height:0}),G=useRef(null),X=useRef(null),Y=useRef(null),q=useRef(null),J=useRef(null),K=useRef(!1),Q=useRef(!1),Z=useRef(createAnimatedValue(k?1:W?.85:1)).current,$=useRef(createAnimatedValue(k?1:0)).current,ee=useRef(null),te=useRef(!1),re=useCallback(e=>{M||V(e),l?.(e)},[M,l]),oe=useCallback(()=>{G.current&&G.current.measureInWindow((e,t,r,o)=>{N({x:e,y:t,width:r,height:o})})},[]),se=useCallback(e=>{oe(),re(!0)},[oe,re]),ie=useCallback(()=>{re(!1)},[re]),ne=useRef(ie);ne.current=ie;const ae=useCallback(()=>{if(!K.current)return;K.current=!1;const e=J.current;J.current=null,e?e():T&&focusHost(X.current??G.current)},[T]);useEffect(()=>{if(k)return Q.current=!0,K.current=!1,claimAnchoredSurface(()=>ne.current());Q.current&&(Q.current=!1,K.current=!0,"ios"!==Platform.OS&&ae())},[k]);const le=useCallback(()=>{J.current=i?.onPress??null,ie()},[i,ie]);useEffect(()=>{if(!te.current)return te.current=!0,k&&(oe(),F&&(ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>{ie()},D))),()=>{ee.current&&(clearTimeout(ee.current),ee.current=null)};let e;if(k){oe();const t=[Animated.timing($,{toValue:1,duration:R.motion.duration.fast,useNativeDriver:!0})];W&&t.push(Animated.spring(Z,{toValue:1,damping:R.motion.spring.snappy.damping,stiffness:R.motion.spring.snappy.stiffness,mass:R.motion.spring.snappy.mass,useNativeDriver:!0})),e=Animated.parallel(t),e.start(),F&&(ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>{ie()},D))}else{const t=[Animated.timing($,{toValue:0,duration:I,easing:Easing.bezier(...R.motion.easing.accelerate),useNativeDriver:!0})];W&&t.push(Animated.timing(Z,{toValue:.85,duration:I,easing:Easing.bezier(...R.motion.easing.accelerate),useNativeDriver:!0})),e=Animated.parallel(t),e.start(),ee.current&&(clearTimeout(ee.current),ee.current=null)}return()=>{e?.stop(),ee.current&&(clearTimeout(ee.current),ee.current=null)}},[k]);const handleContentLayout=e=>{const{width:t,height:r}=e.nativeEvent.layout;t===B.width&&r===B.height||z({width:t,height:r})},ue=useMemo(()=>resolveTooltipPosition({anchor:U,size:B,placement:n,rich:T,viewport:{width:S.width,height:S.height,insets:A},maxWidth:H,gap:v,padding:C,arrowCornerPadding:j}),[U,B,n,T,S.width,S.height,A,H,v,C,j]),ce=k&&null!==U&&B.width>0;useEffect(()=>{if(!T||!ce)return;const e="web"===Platform.OS?q:Y,t=setTimeout(()=>focusHost(e.current),FOCUS_DELAY_MS);return()=>clearTimeout(t)},[T,ce]);const me=r.props,de=useMemo(()=>mergeRefs(me.ref,X),[me.ref]),fe={};"longPress"!==_||me.contextMenu?"press"===_&&(fe.onPress=e=>{me.onPress?.(e),se(e)}):(fe.onLongPress=se,fe.accessibilityHint="Long press for more info"),T&&(fe.ref=de);const pe=React.cloneElement(r,fe),he=d??("string"==typeof t?t:"Tooltip"),ge=useMemo(()=>{if(!m)return null;const e=T?R.colors.background.elevated:R.colors.background.inverse,t={position:"absolute",width:0,height:0,backgroundColor:"transparent",borderStyle:"solid",borderLeftWidth:E,borderRightWidth:E,borderBottomWidth:P,borderTopWidth:0,borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",borderBottomColor:e};return"top"===ue.placement?{...t,bottom:-P,left:ue.arrowOffset-E,transform:[{rotate:"180deg"}]}:"bottom"===ue.placement?{...t,top:-P,left:ue.arrowOffset-E}:"left"===ue.placement?{...t,right:-P,top:ue.arrowOffset-E,transform:[{rotate:"90deg"}]}:{...t,left:-P,top:ue.arrowOffset-E,transform:[{rotate:"-90deg"}]}},[m,ue,R,T,E,P]),be={position:"absolute",top:ue.top,left:ue.left,maxWidth:H,opacity:ce?$:0,transform:[{scale:Z}]},ye=ge?_jsx(View,{style:[ge,h],pointerEvents:"none"}):null;return _jsxs(_Fragment,{children:[_jsx(View,{ref:G,collapsable:!1,onLayout:oe,testID:y,children:pe}),_jsxs(Modal,{visible:k,transparent:!0,statusBarTranslucent:!0,presentationStyle:"overFullScreen",animationType:"none",onRequestClose:ie,onDismiss:ae,children:[T?_jsxs(_Fragment,{children:[_jsx(Pressable,{style:StyleSheet.absoluteFill,onPress:u?ie:void 0,accessibilityLabel:b,accessibilityRole:"button"}),k?_jsxs(Animated.View,{onLayout:handleContentLayout,style:[be,f,p],children:[_jsx(RichTooltipBody,{title:s,content:t,action:i,onAction:le,focusRef:Y,actionRef:q,messageStyle:g}),ye]}):null]}):_jsx(Pressable,{style:StyleSheet.absoluteFill,onPress:u?ie:void 0,accessibilityLabel:b,accessibilityRole:"button",children:k?_jsxs(Animated.View,{accessibilityRole:"tooltip",accessibilityLiveRegion:"polite",accessibilityLabel:he,onLayout:handleContentLayout,style:[be,f,p],children:[_jsx(View,{style:[w.tooltip,{backgroundColor:R.colors.background.inverse,borderRadius:R.radius.md,...smoothCorners,paddingHorizontal:R.spacing.md,paddingVertical:R.spacing.sm,...R.shadows.lg,shadowColor:R.shadows.lg.shadowColor}],children:"string"==typeof t?_jsx(Text,{style:[{color:R.colors.text.inverse,fontSize:R.typography.fontSize.sm,lineHeight:L},g],children:t}):t}),ye]}):null}),_jsx(ToastHost,{})]})]})},buildStyles=e=>StyleSheet.create({tooltip:{overflow:"hidden"}});export{Tooltip};export default Tooltip;
@@ -0,0 +1 @@
1
+ "use strict";import{arrowOffset,computePlacement}from"../../utils/placement.js";const clamp=(t,e,o)=>Math.max(e,Math.min(t,o)),roomiestSide=(t,e)=>{const o={top:t.y,bottom:e.height-(t.y+t.height),left:t.x,right:e.width-(t.x+t.width)},r=Math.max(o.top,o.bottom,o.left,o.right);return r===o.bottom?"bottom":r===o.top?"top":r===o.right?"right":"left"};export const resolveTooltipPosition=t=>{const{anchor:e,size:o,placement:r,rich:i,viewport:a,maxWidth:h,gap:m,padding:n}=t;if(!e)return{top:n,left:n,placement:"bottom",arrowOffset:0};const{insets:p}=a,l=o.width||Math.min(h,a.width-2*n),c=o.height||0,f=p.top+n,s=a.height-p.bottom-n-c;let g;if(g=i?"top"===r||"bottom"===r?r:"auto":"auto"===r?roomiestSide(e,a):r,"left"!==g&&"right"!==g){const o=computePlacement(e,{width:l,height:c},a,g,{gap:m,margin:n}),r=e.x+e.width/2;return{top:clamp(o.y,f,s),left:o.x,placement:o.placement,arrowOffset:arrowOffset(r,o.x,l,t.arrowCornerPadding)}}const d="left"===g?e.x-l-m:e.x+e.width+m,w=a.width-p.right-n-l,x=clamp(d,p.left+n,w),u=clamp(e.y+e.height/2-c/2,f,s),b=e.y+e.height/2;return{top:u,left:x,placement:g,arrowOffset:arrowOffset(b,u,c,t.arrowCornerPadding)}};
@@ -0,0 +1 @@
1
+ "use strict";import{useEffect,useMemo}from"react";import{StyleSheet,View}from"react-native";import Animated,{cancelAnimation,useAnimatedStyle,useSharedValue,withDelay,withRepeat,withSequence,withTiming}from"react-native-reanimated";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const DOT=6,DIM=.3,PULSE_MS=400,STAGGER_MS=160,STILL_OPACITY=[1,.65,.3],Dot=({index:e,still:t,colour:i})=>{const s=useSharedValue(.3);useEffect(()=>{if(!t)return s.value=withDelay(160*e,withRepeat(withSequence(withTiming(1,{duration:400}),withTiming(.3,{duration:400})),-1)),()=>cancelAnimation(s)},[t,e,s]);const o=useAnimatedStyle(()=>({opacity:s.value}));return _jsx(Animated.View,{style:[styles.dot,{backgroundColor:i},t?{opacity:STILL_OPACITY[e]}:o]})};export const TypingIndicator=({label:e,accessibilityLabel:t,bubble:i=!0,style:s,testID:o})=>{const r=useTheme(),a=useMemo(()=>buildStyles(r),[r]),n=useReducedMotion(),l=r.colors.text.tertiary;return _jsxs(View,{style:[a.root,i?a.bubble:null,s],accessible:!0,accessibilityRole:"progressbar",accessibilityLabel:e??t??"Typing",accessibilityState:{busy:!0},"aria-busy":!0,testID:o,children:[_jsx(View,{style:a.dots,children:[0,1,2].map(e=>_jsx(Dot,{index:e,still:n,colour:l},e))}),e?_jsx(Text,{variant:"bodySmall",color:"secondary",children:e}):null]})};const styles=StyleSheet.create({dot:{width:6,height:6,borderRadius:3,...smoothCorners}}),buildStyles=e=>StyleSheet.create({root:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:e.spacing.sm,marginTop:e.spacing.sm},bubble:{backgroundColor:e.colors.background.secondary,borderRadius:e.radius.xl,...smoothCorners,paddingHorizontal:e.spacing.md,paddingVertical:e.spacing.sm+e.spacing.xs},dots:{flexDirection:"row",alignItems:"center",gap:e.spacing.xs}});export default TypingIndicator;
@@ -0,0 +1 @@
1
+ "use strict";export{default,TypingIndicator}from"./TypingIndicator.js";
@@ -0,0 +1 @@
1
+ "use strict";import{memo,useCallback,useEffect,useMemo,useRef}from"react";import{Animated,Platform,Pressable,StyleSheet,Text,View}from"react-native";import{createAnimatedValue,setNativeValue}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const WHEEL_VISIBLE_ITEMS=5;export const WHEEL_CENTER_OFFSET=Math.floor(2.5);const HAPTIC_DEBOUNCE_MS=35,WEB_SETTLE_MS=120,SCALE_STOPS=[-2,-1,0,1,2],WheelRow=memo(({label:e,index:t,scrollY:n,itemHeight:a,selected:s,theme:i,reducedMotion:r,onPress:l})=>{const{opacity:o,scale:c}=useMemo(()=>{const e=Animated.subtract(Animated.divide(n,a),t);return{opacity:e.interpolate({inputRange:SCALE_STOPS,outputRange:[.3,.6,1,.6,.3],extrapolate:"clamp"}),scale:e.interpolate({inputRange:SCALE_STOPS,outputRange:[.85,.95,1.05,.95,.85],extrapolate:"clamp"})}},[n,a,t]),u=_jsx(Text,{numberOfLines:1,maxFontSizeMultiplier:1.5,style:{fontSize:i.typography.fontSize.xl,color:s?i.colors.text.primary:i.colors.text.secondary,fontWeight:s?i.typography.fontWeight.semibold:i.typography.fontWeight.medium,letterSpacing:i.typography.letterSpacing.normal},children:e});return _jsx(Animated.View,{style:[styles.row,{height:a},r?{opacity:o}:{opacity:o,transform:[{scale:c}]}],accessible:!1,importantForAccessibility:"no",children:l?_jsx(Pressable,{focusable:!1,accessible:!1,onPress:()=>l(t),style:styles.rowPress,children:u}):u})});export const Wheel=({label:e,items:t,selectedIndex:n,onIndexChange:a,itemHeight:s,width:i,theme:r,haptic:l,disabled:o,reducedMotion:c,testID:u})=>{const m="web"===Platform.OS,d=useRef(null),f=useRef(createAnimatedValue(n*s)).current,y=useRef(n*s),h=useRef(n*s),b=useRef(n),p=useRef(0),x=useRef(null),g=useRef(()=>{}),S=r.components.timePicker?.hapticDebounceMs??35,E=t.length-1;useEffect(()=>{b.current=n;const e=n*s;if(h.current===e)return;if(h.current=e,Math.abs(y.current-e)<1)return;y.current=e,m||setNativeValue(f,e);const t=requestAnimationFrame(()=>{d.current?.scrollToOffset({offset:e,animated:!1})});return()=>cancelAnimationFrame(t)},[n,s,f,m]),useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const v=useCallback((e,s)=>{if(!(e===n||e<0||e>E)){if("accessibility"===s){const e=resolveHaptic(l,"denseTick");e&&triggerHaptic(e)}if("keyboard"!==s){const n=t[e];n&&announce(n.accessibilityLabel??n.label)}a(e)}},[n,E,t,l,a]);g.current=()=>{x.current=null;const e=Math.max(0,Math.min(E,Math.round(y.current/s))),t=e*s;Math.abs(y.current-t)>=1&&d.current?.scrollToOffset({offset:t,animated:!c}),v(e,"scroll")};const M=useMemo(()=>Animated.event([{nativeEvent:{contentOffset:{y:f}}}],{useNativeDriver:!m,listener:e=>{const t=e.nativeEvent.contentOffset.y;y.current=t;const n=Math.round(t/s);if(n!==b.current&&n>=0&&n<=E){const e=Date.now();if(e-p.current>=S){const t=resolveHaptic(l,"denseTick");t&&triggerHaptic(t),p.current=e}b.current=n}m&&(x.current&&clearTimeout(x.current),x.current=setTimeout(()=>g.current(),120))}}),[f,s,E,l,S,m]),T=useCallback(e=>{const t=e.nativeEvent.contentOffset.y;v(Math.max(0,Math.min(E,Math.round(t/s))),"scroll")},[v,E,s]),w=useCallback(e=>{if(o)return;const t=e.nativeEvent.actionName;"increment"===t?v(Math.min(E,n+1),"accessibility"):"decrement"===t&&v(Math.max(0,n-1),"accessibility")},[o,v,E,n]),A=useCallback(e=>{o||d.current?.scrollToOffset({offset:e*s,animated:!c})},[o,s,c]),_=useCallback(({item:e,index:t})=>_jsx(WheelRow,{label:e.label,index:t,scrollY:f,itemHeight:s,selected:t===n,theme:r,reducedMotion:c,onPress:m?A:void 0}),[f,s,n,r,c,m,A]),C=useCallback((e,t)=>`${String(e.value)}-${t}`,[]),R=useCallback((e,t)=>({length:s,offset:s*t,index:t}),[s]),j=t[n]?t[n].accessibilityLabel??t[n].label:"",I=m?{focusable:!0,role:"spinbutton","aria-label":e,"aria-valuetext":j,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":E,"aria-disabled":o,onKeyDown:e=>{if(o)return;const t={ArrowDown:Math.min(E,n+1),PageDown:Math.min(E,n+1),ArrowUp:Math.max(0,n-1),PageUp:Math.max(0,n-1),Home:0,End:E}[e.key];void 0!==t&&(e.preventDefault?.(),v(t,"keyboard"))}}:void 0;return _jsxs(View,{style:[void 0===i?styles.columnFlex:{width:i},{height:5*s},styles.column,o?styles.disabled:null],testID:u,...I,children:[m?null:_jsx(View,{pointerEvents:"none",style:styles.a11yLayer,accessible:!0,accessibilityRole:"adjustable",accessibilityLabel:e,accessibilityValue:{text:j},accessibilityState:{disabled:Boolean(o)},"aria-disabled":Boolean(o),accessibilityActions:[{name:"increment"},{name:"decrement"}],onAccessibilityAction:w}),_jsx(Animated.FlatList,{ref:d,data:t,keyExtractor:C,renderItem:_,getItemLayout:R,showsVerticalScrollIndicator:!1,snapToInterval:s,snapToAlignment:"start",decelerationRate:"fast",bounces:!1,scrollEnabled:!o,nestedScrollEnabled:!0,scrollEventThrottle:16,onScroll:M,onMomentumScrollEnd:T,contentContainerStyle:{paddingVertical:s*WHEEL_CENTER_OFFSET},initialScrollIndex:n,style:[styles.list,{height:5*s}],importantForAccessibility:"no-hide-descendants","aria-hidden":!0})]})};const styles=StyleSheet.create({column:{overflow:"hidden"},columnFlex:{flex:1},disabled:{opacity:.5},list:{flexGrow:0},row:{alignItems:"center",justifyContent:"center"},rowPress:{alignItems:"center",justifyContent:"center",alignSelf:"stretch",flex:1},a11yLayer:{...StyleSheet.absoluteFill,zIndex:2}});
@@ -0,0 +1 @@
1
+ "use strict";import{Fragment,useCallback,useMemo}from"react";import{StyleSheet,Text,useWindowDimensions,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{WHEEL_CENTER_OFFSET,WHEEL_VISIBLE_ITEMS,Wheel}from"./Wheel.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const BASE_ITEM_HEIGHT=40,MAX_FONT_SCALE=1.5,DEFAULT_COLUMN_WIDTH=64,MAX_DURATION_MINUTES=1439,range=(e,t,i=1)=>{const o=[];for(let n=e;n<=t;n+=i)o.push(n);return o},plural=(e,t,i)=>`${e} ${1===e?t:i}`,toItem=e=>"object"==typeof e?e:{value:e,label:String(e)},WheelPicker=e=>{const{haptic:t,disabled:i,testID:o,style:n}=e,s=useTheme(),a=useReducedMotion(),{fontScale:l}=useWindowDimensions(),r=Math.min(Math.max(l,1),1.5),u=Math.round(40*r),m=useMemo(()=>buildStyles(s,u),[s,u]),d="list"===e.mode?e.items:void 0,h=useMemo(()=>d?.map(toItem),[d]),c="duration"===e.mode?e.minuteStep??1:1,p="duration"===e.mode?Math.max(0,Math.min(1439,Math.floor(e.maxMinutes??1/0))):0,b=Math.floor(p/60),y="duration"===e.mode?e.labels:void 0,M=y?.hours??"Hours",f=y?.minutes??"Minutes",x=y?.hourUnit??"hr",g=y?.minuteUnit??"min",S=useCallback(e=>{const t=e===b?p%60:59;return Math.floor(t/c)*c},[b,p,c]),_="duration"===e.mode?e.value:0,E=useMemo(()=>{const e=Number.isFinite(_)?_:0,t=Math.max(0,Math.min(p,e)),i=Math.floor(t/60),o=Math.round(t%60/c)*c;return{hour:i,minute:Math.min(S(i),o)}},[_,p,c,S]),I=useMemo(()=>"duration"===e.mode?range(0,b).map(e=>({value:e,label:String(e),accessibilityLabel:plural(e,"hour","hours")})):[],[e.mode,b]),j=S(E.hour),v=useMemo(()=>"duration"===e.mode?range(0,j,c).map(e=>({value:e,label:String(e).padStart(2,"0"),accessibilityLabel:plural(e,"minute","minutes")})):[],[e.mode,j,c]),T=useMemo(()=>"list"===e.mode?[{key:"list",label:e.label??"Value",items:h??[],value:e.value??"",width:e.width}]:"duration"===e.mode?[{key:"hours",label:M,items:I,value:E.hour,unit:x,gapAfter:s.spacing.md},{key:"minutes",label:f,items:v,value:E.minute,unit:g}]:e.columns,[e,h,I,v,E,M,f,x,g,s.spacing.md]),{onChange:W}=e,w=useCallback((t,i)=>{const o=t.items[i];if(o&&W)if("list"===e.mode)W(o.value);else if("duration"===e.mode){const e=Number(o.value),i=W;"hours"===t.key?i(60*e+Math.min(E.minute,S(e))):i(60*E.hour+e)}else W(t.key,o.value)},[W,e.mode,E,S]);return _jsxs(View,{style:[m.wheels,n],testID:o,children:[_jsxs(View,{pointerEvents:"none",style:m.selectionBand,children:[_jsx(View,{style:m.bandLine}),_jsx(View,{style:m.bandLine})]}),T.map(o=>{if(0===o.items.length)return null;const n=o.items.findIndex(e=>e.value===o.value);return _jsxs(Fragment,{children:[_jsx(Wheel,{label:o.label,items:o.items,selectedIndex:Math.max(0,n),onIndexChange:e=>w(o,e),itemHeight:u,width:o.width??("list"===e.mode?void 0:64),theme:s,haptic:t,disabled:i,reducedMotion:a,testID:o.testID}),o.unit?_jsx(Text,{style:m.unit,maxFontSizeMultiplier:1.5,numberOfLines:1,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:o.unit}):null,o.separator?_jsx(Text,{style:m.separator,maxFontSizeMultiplier:1.5,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:o.separator}):null,o.gapAfter?_jsx(View,{style:{width:o.gapAfter}}):null]},o.key)})]})},buildStyles=(e,t)=>StyleSheet.create({wheels:{flexDirection:"row",alignItems:"center",justifyContent:"center",height:t*WHEEL_VISIBLE_ITEMS,position:"relative"},selectionBand:{position:"absolute",left:0,right:0,top:t*WHEEL_CENTER_OFFSET,height:t,justifyContent:"space-between"},bandLine:{height:2*StyleSheet.hairlineWidth,backgroundColor:e.colors.primary,opacity:.85},separator:{fontSize:e.typography.fontSize["2xl"],fontWeight:e.typography.fontWeight.bold,color:e.colors.text.primary,paddingHorizontal:e.spacing.xs},unit:{fontSize:e.typography.fontSize.base,fontWeight:e.typography.fontWeight.semibold,color:e.colors.text.secondary,paddingLeft:e.spacing.xs}});export{WheelPicker};export default WheelPicker;
@@ -0,0 +1 @@
1
+ "use strict";export{default,WheelPicker}from"./WheelPicker.js";
@@ -1 +1 @@
1
- "use strict";export{Accordion,AccordionGroup}from"./Accordion/index.js";export{AmountSlider}from"./AmountSlider/index.js";export{AnimatePresence}from"./AnimatePresence/index.js";export{AppBar}from"./AppBar/index.js";export{AsyncBlock}from"./AsyncBlock/index.js";export{AuthedImage,authedImageCacheStats,clearAuthedImageCache,getAuthedImageCacheLimit,setAuthedImageCacheLimit}from"./AuthedImage/index.js";export{Autocomplete}from"./Autocomplete/index.js";export{Avatar,AvatarGroup}from"./Avatar/index.js";export{Badge}from"./Badge/index.js";export{Banner}from"./Banner/index.js";export{BottomNavigation}from"./BottomNavigation/index.js";export{BottomSheet,useBottomSheet}from"./BottomSheet/index.js";export{Box,Row,Spacer,Stack}from"./Box/index.js";export{Button}from"./Button/index.js";export{Calendar}from"./Calendar/index.js";export{Card}from"./Card/index.js";export{Carousel}from"./Carousel/index.js";export{Checkbox}from"./Checkbox/index.js";export{Chip}from"./Chip/index.js";export{ChoiceGroup}from"./ChoiceGroup/index.js";export{Confetti}from"./Confetti/index.js";export{DatePicker}from"./DatePicker/index.js";export{DateRangePicker}from"./DateRangePicker/index.js";export{cleanDecimalText,DecimalInput,parseDecimalText}from"./DecimalInput/index.js";export{Descriptions}from"./Descriptions/index.js";export{Dialog}from"./Dialog/index.js";export{Divider}from"./Divider/index.js";export{Drawer}from"./Drawer/index.js";export{EmptyState}from"./EmptyState/index.js";export{ErrorBoundary,useErrorHandler,withErrorBoundary}from"./ErrorBoundary/index.js";export{FilePicker,formatFileSize}from"./FilePicker/index.js";export{FileViewer}from"./FileViewer/index.js";export{FloatingActionButton,FloatingActionButtonGroup}from"./FloatingActionButton/index.js";export{ForceUpdateDialog}from"./ForceUpdateDialog/index.js";export{FormField}from"./FormField/index.js";export{IconBadge}from"./IconBadge/index.js";export{IconButton}from"./IconButton/index.js";export{ImageGallery}from"./ImageGallery/index.js";export{InlineSelect}from"./InlineSelect/index.js";export{Input}from"./Input/index.js";export{KeyboardAwareScrollView}from"./KeyboardAwareScrollView/index.js";export{KeyboardToolbar}from"./KeyboardToolbar/index.js";export{ListItem}from"./ListItem/index.js";export{LoaderOverlay,loader,useLoader}from"./LoaderOverlay/index.js";export{Markdown}from"./Markdown/index.js";export{MODAL_DISMISS_GRACE_MS,Modal}from"./Modal/index.js";export{Notation,parseNotation,sym}from"./Notation/index.js";export{NumberInput}from"./NumberInput/index.js";export{OptionSheet}from"./OptionSheet/index.js";export{OTPInput}from"./OTPInput/index.js";export{ALL_CALLING_CODES,DEFAULT_CALLING_CODES,formatE164,PhoneNumberInput,parseE164}from"./PhoneNumberInput/index.js";export{PickerTrigger}from"./PickerTrigger/index.js";export{ProfileCompletion}from"./ProfileCompletion/index.js";export{ProfilePicker}from"./ProfilePicker/index.js";export{ProgressBar}from"./ProgressBar/index.js";export{ProgressRing}from"./ProgressRing/index.js";export{Radio,RadioDot,RadioGroup}from"./Radio/index.js";export{Rating}from"./Rating/index.js";export{Repeater}from"./Repeater/index.js";export{applyMarkdownAction,RichTextEditor}from"./RichTextEditor/index.js";export{SearchBar}from"./SearchBar/index.js";export{SectionHeader}from"./SectionHeader/index.js";export{SegmentedControl}from"./SegmentedControl/index.js";export{Select}from"./Select/index.js";export{Skeleton,SkeletonCircle,SkeletonClockProvider,SkeletonContent,SkeletonList,SkeletonProvider,SkeletonSkip,SkeletonText,useReduceMotion,useSkeletonClock,useSkeletonDefaults}from"./Skeleton/index.js";export{Slider}from"./Slider/index.js";export{SliderField}from"./SliderField/index.js";export{SlideToConfirm}from"./SlideToConfirm/index.js";export{Spinner}from"./Spinner/index.js";export{StatTile}from"./StatTile/index.js";export{StatusBadge}from"./StatusBadge/index.js";export{Stepper}from"./Stepper/index.js";export{Swipeable}from"./Swipeable/index.js";export{Switch}from"./Switch/index.js";export{Tabs}from"./Tabs/index.js";export{TagInput}from"./TagInput/index.js";export{Text}from"./Text/index.js";export{Timeline}from"./Timeline/index.js";export{TimePicker}from"./TimePicker/index.js";export{Toast,ToastHost,ToastProvider,toast,useToast}from"./Toast/index.js";export{Tooltip}from"./Tooltip/index.js";export{Tour}from"./Tour/index.js";export{ZoomableImage}from"./ZoomableImage/index.js";
1
+ "use strict";export{Accordion,AccordionGroup}from"./Accordion/index.js";export{AmountSlider}from"./AmountSlider/index.js";export{AnimatePresence}from"./AnimatePresence/index.js";export{AppBar}from"./AppBar/index.js";export{AsyncBlock}from"./AsyncBlock/index.js";export{AuthedImage,authedImageCacheStats,clearAuthedImageCache,getAuthedImageCacheLimit,setAuthedImageCacheLimit}from"./AuthedImage/index.js";export{Autocomplete}from"./Autocomplete/index.js";export{Avatar,AvatarGroup}from"./Avatar/index.js";export{Badge}from"./Badge/index.js";export{Banner}from"./Banner/index.js";export{BarChart}from"./BarChart/index.js";export{BottomNavigation}from"./BottomNavigation/index.js";export{BottomSheet,useBottomSheet,useSheetSwap}from"./BottomSheet/index.js";export{Box,Row,Spacer,Stack}from"./Box/index.js";export{Button}from"./Button/index.js";export{Calendar}from"./Calendar/index.js";export{Card}from"./Card/index.js";export{Carousel}from"./Carousel/index.js";export{Checkbox}from"./Checkbox/index.js";export{Chip}from"./Chip/index.js";export{ChoiceGroup}from"./ChoiceGroup/index.js";export{Composer}from"./Composer/index.js";export{Confetti}from"./Confetti/index.js";export{DatePicker}from"./DatePicker/index.js";export{DateRangePicker}from"./DateRangePicker/index.js";export{DateSeparator,DEFAULT_DATE_SEPARATOR_LABELS,dayLabel}from"./DateSeparator/index.js";export{cleanDecimalText,DecimalInput,parseDecimalText}from"./DecimalInput/index.js";export{Descriptions}from"./Descriptions/index.js";export{Dialog}from"./Dialog/index.js";export{Divider}from"./Divider/index.js";export{Drawer}from"./Drawer/index.js";export{EmptyState}from"./EmptyState/index.js";export{ErrorBoundary,useErrorHandler,withErrorBoundary}from"./ErrorBoundary/index.js";export{FilePicker,formatFileSize}from"./FilePicker/index.js";export{FileViewer}from"./FileViewer/index.js";export{FloatingActionButton,FloatingActionButtonGroup}from"./FloatingActionButton/index.js";export{ForceUpdateDialog}from"./ForceUpdateDialog/index.js";export{FormField}from"./FormField/index.js";export{IconBadge}from"./IconBadge/index.js";export{IconButton}from"./IconButton/index.js";export{ImageGallery}from"./ImageGallery/index.js";export{InlineSelect}from"./InlineSelect/index.js";export{Input}from"./Input/index.js";export{KeyboardAwareScrollView}from"./KeyboardAwareScrollView/index.js";export{KeyboardToolbar}from"./KeyboardToolbar/index.js";export{ListItem}from"./ListItem/index.js";export{LoaderOverlay,loader,useLoader}from"./LoaderOverlay/index.js";export{Markdown}from"./Markdown/index.js";export{Menu}from"./Menu/index.js";export{DEFAULT_MESSAGE_BUBBLE_LABELS,MessageBubble}from"./MessageBubble/index.js";export{DEFAULT_MESSAGE_LIST_LABELS,MessageList}from"./MessageList/index.js";export{MODAL_DISMISS_GRACE_MS,Modal}from"./Modal/index.js";export{Notation,parseNotation,sym}from"./Notation/index.js";export{NumberInput}from"./NumberInput/index.js";export{OnboardingPager}from"./OnboardingPager/index.js";export{OptionSheet}from"./OptionSheet/index.js";export{OTPInput}from"./OTPInput/index.js";export{PaymentResult}from"./PaymentResult/index.js";export{PermissionPrompt,usePermissionPrompt}from"./PermissionPrompt/index.js";export{ALL_CALLING_CODES,DEFAULT_CALLING_CODES,formatE164,PhoneNumberInput,parseE164}from"./PhoneNumberInput/index.js";export{PickerTrigger}from"./PickerTrigger/index.js";export{ProfileCompletion}from"./ProfileCompletion/index.js";export{ProfilePicker}from"./ProfilePicker/index.js";export{ProgressBar}from"./ProgressBar/index.js";export{ProgressRing}from"./ProgressRing/index.js";export{Radio,RadioDot,RadioGroup}from"./Radio/index.js";export{Rating}from"./Rating/index.js";export{Repeater}from"./Repeater/index.js";export{applyMarkdownAction,RichTextEditor}from"./RichTextEditor/index.js";export{ScannerOverlay}from"./ScannerOverlay/index.js";export{SearchBar,useRecentSearches}from"./SearchBar/index.js";export{SectionHeader}from"./SectionHeader/index.js";export{SegmentedControl}from"./SegmentedControl/index.js";export{Select}from"./Select/index.js";export{SignaturePad}from"./SignaturePad/index.js";export{Skeleton,SkeletonCircle,SkeletonClockProvider,SkeletonContent,SkeletonList,SkeletonProvider,SkeletonSkip,SkeletonText,useReduceMotion,useSkeletonClock,useSkeletonDefaults}from"./Skeleton/index.js";export{Slider}from"./Slider/index.js";export{SliderField}from"./SliderField/index.js";export{SlideToConfirm}from"./SlideToConfirm/index.js";export{Sparkline}from"./Sparkline/index.js";export{Spinner}from"./Spinner/index.js";export{StatTile}from"./StatTile/index.js";export{StatusBadge}from"./StatusBadge/index.js";export{Stepper}from"./Stepper/index.js";export{Swipeable}from"./Swipeable/index.js";export{Switch}from"./Switch/index.js";export{Tabs}from"./Tabs/index.js";export{TagInput}from"./TagInput/index.js";export{Text}from"./Text/index.js";export{Timeline}from"./Timeline/index.js";export{TimePicker}from"./TimePicker/index.js";export{Toast,ToastHost,ToastProvider,toast,useToast}from"./Toast/index.js";export{Tooltip}from"./Tooltip/index.js";export{Tour}from"./Tour/index.js";export{TypingIndicator}from"./TypingIndicator/index.js";export{WheelPicker}from"./WheelPicker/index.js";export{ZoomableImage}from"./ZoomableImage/index.js";
@@ -1 +1 @@
1
- "use strict";export{useControllableState}from"./useControllableState.js";export{useDebounce}from"./useDebounce.js";export{createDragToDismissController,DRAG_DISMISS_DISTANCE,DRAG_DISMISS_VELOCITY,useDragToDismiss}from"./useDragToDismiss.js";export{FLICK_TOLERANCE,useFlickGuard}from"./useFlickGuard.js";export{PRESS_ANIMATION_PRESETS,usePressAnimation}from"./usePressAnimation.js";export{useReducedMotion}from"./useReducedMotion.js";export{useToggle}from"./useToggle.js";
1
+ "use strict";export{useControllableState}from"./useControllableState.js";export{useDebounce}from"./useDebounce.js";export{createDragToDismissController,DRAG_DISMISS_DISTANCE,DRAG_DISMISS_VELOCITY,useDragToDismiss}from"./useDragToDismiss.js";export{FLICK_TOLERANCE,useFlickGuard}from"./useFlickGuard.js";export{PRESS_ANIMATION_PRESETS,usePressAnimation}from"./usePressAnimation.js";export{useReducedMotion}from"./useReducedMotion.js";export{useRefreshControl}from"./useRefreshControl.js";export{useScrollDirection}from"./useScrollDirection.js";export{useToggle}from"./useToggle.js";
@@ -0,0 +1 @@
1
+ "use strict";import{Logger}from"@webority/mobile-core";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Platform,RefreshControl}from"react-native";import{useTheme}from"../theme/index.js";import{announce}from"../utils/announce.js";import{resolveHaptic,triggerHaptic}from"../utils/hapticUtils.js";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_MIN_VISIBLE_MS=400;export const useRefreshControl=e=>{const{onRefresh:r,refreshing:t=!1,haptic:o,title:s,minVisibleMs:n=DEFAULT_MIN_VISIBLE_MS,labels:c}=e,i=useTheme(),[u,a]=useState(!1),l=useRef(!1),f=useRef(!0),m=useRef(null),h=useRef(r);h.current=r;const p=useRef(c);p.current=c;const g=useRef(n);g.current=n,useEffect(()=>(f.current=!0,()=>{f.current=!1,m.current?.release()}),[]);const b=useCallback(e=>new Promise(r=>{if(e<=0)return void r();const t=setTimeout(()=>{m.current=null,r()},e);m.current={release:()=>{clearTimeout(t),m.current=null,r()}}}),[]),d=useCallback(async e=>{if(l.current)return;l.current=!0,a(!0);const r=Date.now();e&&announce(p.current?.refreshing??"Refreshing");let t=!1;try{await h.current()}catch(e){t=!0,Logger.error("[@webority/mobile-ui] useRefreshControl: onRefresh failed.",e)}f.current&&await b(g.current-(Date.now()-r)),l.current=!1,f.current&&(a(!1),e&&!t&&announce(p.current?.refreshed??"Updated"))},[b]),R="android"===Platform.OS?"gestureStart":null,C=void 0===o?R:resolveHaptic(o,"gestureStart"),y=useCallback(()=>{l.current||(C&&triggerHaptic(C),d(!1))},[C,d]),v=useCallback(()=>d(!0),[d]),S=useMemo(()=>({accessibilityActions:[{name:"refresh",label:c?.refresh??"Refresh"}],onAccessibilityAction:e=>{"refresh"===e.nativeEvent.actionName&&d(!0)}}),[c?.refresh,d]),k=u||t;return{refreshControl:useMemo(()=>_jsx(RefreshControl,{refreshing:k,onRefresh:y,tintColor:i.colors.primary,colors:[i.colors.primary],progressBackgroundColor:i.colors.background.elevated,title:s,titleColor:i.colors.text.secondary}),[k,y,s,i.colors.primary,i.colors.background.elevated,i.colors.text.secondary]),refreshing:k,refresh:v,accessibilityProps:S}};
@@ -0,0 +1 @@
1
+ "use strict";import{useCallback,useRef,useState}from"react";const DEFAULT_THRESHOLD=8;export const useScrollDirection=e=>{const t=e?.threshold??8,[r,n]=useState("idle"),u=useRef(0),c=useRef(0),s=useRef("idle"),a=useCallback(e=>{s.current!==e&&(s.current=e,n(e))},[]);return{direction:r,onScroll:useCallback(e=>{const{contentOffset:r,contentSize:n,layoutMeasurement:s}=e.nativeEvent,i=n&&s?Math.max(0,n.height-s.height):Number.POSITIVE_INFINITY,o=Math.min(Math.max(r.y,0),i),l=o-u.current;if(u.current=o,o<=0)return c.current=0,void a("idle");0!==l&&(Math.sign(l)!==Math.sign(c.current)&&(c.current=0),c.current+=l,Math.abs(c.current)>=t&&a(c.current>0?"down":"up"))},[t,a])}};
@@ -1 +1 @@
1
- "use strict";export*from"./components/index.js";export{APP_ICON_SIZES,AppIcon,CURATED_ICON_NAMES,defaultIcons,ICON_NAMES,ICONSAX_SUFFIX,renderSlotIcon}from"./components/AppIcon/index.js";export{deletePath,Form,getPath,HookFormField,isFieldFilled,rules,setPath,useField,useFieldArray,useForm,useFormCompletion,useFormContext,useHookFormField,useOptionalFormContext}from"./form/index.js";export{FLICK_TOLERANCE,PRESS_ANIMATION_PRESETS,useControllableState,useDebounce,useFlickGuard,usePressAnimation,useReducedMotion,useToggle}from"./hooks/index.js";export{initUI}from"./initUI.js";export{NetworkStatusBanner}from"./network/index.js";export{darkTheme,getColorMode,getTheme,lightTheme,mergeTheme,resetTheme,setColorMode,setTheme,subscribeTheme,ThemeProvider,useTheme,useThemeMode}from"./theme/index.js";export{Breakpoints,configureFeedback,feedback,hapticForIntent,isFeedbackEnabled,isScreenSize,isTablet,Margin,Padding,Responsive,ScreenDimensions,Spacing,SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,setHapticImplementation,shadowStyle,smoothCorners,squircleApplies,squircleHostRadius,squirclePath,triggerHaptic,useScreenDimensions,warnUnknownProps}from"./utils/index.js";
1
+ "use strict";export*from"./components/index.js";export{APP_ICON_SIZES,AppIcon,CURATED_ICON_NAMES,defaultIcons,ICON_NAMES,ICONSAX_SUFFIX,renderSlotIcon}from"./components/AppIcon/index.js";export{deletePath,Form,getPath,HookFormField,isFieldFilled,rules,setPath,useField,useFieldArray,useForm,useFormCompletion,useFormContext,useHookFormField,useOptionalFormContext}from"./form/index.js";export{FLICK_TOLERANCE,PRESS_ANIMATION_PRESETS,useControllableState,useDebounce,useFlickGuard,usePressAnimation,useReducedMotion,useRefreshControl,useScrollDirection,useToggle}from"./hooks/index.js";export{initUI}from"./initUI.js";export{NetworkStatusBanner}from"./network/index.js";export{darkTheme,getColorMode,getTheme,lightTheme,mergeTheme,resetTheme,setColorMode,setTheme,subscribeTheme,ThemeProvider,useTheme,useThemeMode}from"./theme/index.js";export{announce,Breakpoints,configureFeedback,feedback,hapticForIntent,isFeedbackEnabled,isScreenSize,isTablet,Margin,Padding,Responsive,ScreenDimensions,Spacing,SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,setHapticImplementation,shadowStyle,smoothCorners,squircleApplies,squircleHostRadius,squirclePath,triggerHaptic,useScreenDimensions,warnUnknownProps}from"./utils/index.js";
@@ -0,0 +1 @@
1
+ "use strict";import{AccessibilityInfo,Platform}from"react-native";let webRegions=null;const webRegion=e=>{if("undefined"==typeof document)return null;if(!webRegions||!webRegions.polite.isConnected){const make=e=>{const t=document.createElement("div");return t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.setAttribute("role","assertive"===e?"alert":"status"),Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"}),document.body.appendChild(t),t};webRegions={polite:make("polite"),assertive:make("assertive")}}return e?webRegions.polite:webRegions.assertive};export const announce=(e,t)=>{if(!e)return;const i=!1!==t?.polite;if("web"===Platform.OS){const t=webRegion(i);return void(t&&(t.textContent="",setTimeout(()=>{t.textContent=e},50)))}"ios"!==Platform.OS?AccessibilityInfo.announceForAccessibility(e):AccessibilityInfo.announceForAccessibilityWithOptions(e,i?{queue:!0}:{queue:!1,priority:"high"})};
@@ -1 +1 @@
1
- "use strict";import*as Haptics from"expo-haptics";import{Platform,Vibration}from"react-native";let hapticImpl=null;const fallback=t=>{if("android"===Platform.OS){const i={selection:5,impactLight:10,impactMedium:20,impactHeavy:30,notificationSuccess:15,notificationWarning:25,notificationError:40};try{Vibration.vibrate(i[t]??10)}catch{}}},EXPO_HANDLERS={selection:()=>Haptics.selectionAsync(),impactLight:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light),impactMedium:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),impactHeavy:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy),notificationSuccess:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),notificationWarning:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Warning),notificationError:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error)};export const triggerHaptic=(t="selection")=>{if(hapticImpl)try{return void hapticImpl(t)}catch{}const i=EXPO_HANDLERS[t];i?i().catch(()=>fallback(t)):fallback(t)};export const setHapticImplementation=t=>{hapticImpl=t};export const resolveHaptic=(t,i)=>!1===t?null:t??i;
1
+ "use strict";import*as Haptics from"expo-haptics";import{Platform,Vibration}from"react-native";let hapticImpl=null;const fallback=t=>{if("android"===Platform.OS){const i={selection:5,impactLight:10,impactMedium:20,impactHeavy:30,notificationSuccess:15,notificationWarning:25,notificationError:40,longPress:20,tick:5,denseTick:3,confirm:15,reject:40,gestureStart:10};try{Vibration.vibrate(i[t]??10)}catch{}}},EXPO_HANDLERS={selection:()=>Haptics.selectionAsync(),impactLight:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light),impactMedium:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),impactHeavy:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy),notificationSuccess:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),notificationWarning:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Warning),notificationError:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error),longPress:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),tick:()=>Haptics.selectionAsync(),denseTick:()=>Haptics.selectionAsync(),confirm:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),reject:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error),gestureStart:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light)},ANDROID_HAPTICS={longPress:"Long_Press",tick:"Segment_Tick",denseTick:"Segment_Frequent_Tick",confirm:"Confirm",reject:"Reject",gestureStart:"Gesture_Start"},androidHandler=t=>{const i=ANDROID_HAPTICS[t];return"android"===Platform.OS&&i&&"function"==typeof Haptics.performAndroidHapticsAsync&&Haptics.AndroidHaptics?.[i]?()=>Haptics.performAndroidHapticsAsync(Haptics.AndroidHaptics[i]):null};export const triggerHaptic=(t="selection")=>{if(hapticImpl)try{return void hapticImpl(t)}catch{}const i=androidHandler(t)??EXPO_HANDLERS[t];if(i)try{i().catch(()=>fallback(t))}catch{fallback(t)}else fallback(t)};export const setHapticImplementation=t=>{hapticImpl=t};export const resolveHaptic=(t,i)=>!1===t?null:t??i;
@@ -1 +1 @@
1
- "use strict";export{blendOf,tintOf}from"./color.js";export{smoothCorners}from"./corners.js";export{configureFeedback,feedback,hapticForIntent,isFeedbackEnabled}from"./feedback.js";export{resolveHaptic,setHapticImplementation,triggerHaptic}from"./hapticUtils.js";export{mergeRefs}from"./mergeRefs.js";export{Breakpoints,isScreenSize,isTablet,Responsive,ScreenDimensions,useScreenDimensions}from"./responsive.js";export{shadowStyle}from"./shadows.js";export{Margin,Padding,Spacing}from"./spacing.js";export{SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,squircleApplies,squircleHostRadius,squirclePath}from"./squircle.js";export{warnUnknownProps}from"./warnUnknownProps.js";
1
+ "use strict";export{announce}from"./announce.js";export{blendOf,tintOf}from"./color.js";export{smoothCorners}from"./corners.js";export{configureFeedback,feedback,hapticForIntent,isFeedbackEnabled}from"./feedback.js";export{resolveHaptic,setHapticImplementation,triggerHaptic}from"./hapticUtils.js";export{mergeRefs}from"./mergeRefs.js";export{Breakpoints,isScreenSize,isTablet,Responsive,ScreenDimensions,useScreenDimensions}from"./responsive.js";export{shadowStyle}from"./shadows.js";export{Margin,Padding,Spacing}from"./spacing.js";export{SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,squircleApplies,squircleHostRadius,squirclePath}from"./squircle.js";export{warnUnknownProps}from"./warnUnknownProps.js";
@@ -0,0 +1 @@
1
+ "use strict";export const PLACEMENT_GAP=8;export const PLACEMENT_MARGIN=8;export const placementRoom=(t,e,o)=>{const n=o?.gap??8,r=o?.margin??8,a=e.insets.top+r,s=e.height-e.insets.bottom-r;return{above:Math.max(0,t.y-n-a),below:Math.max(0,s-(t.y+t.height+n))}};const resolveSide=(t,e,o)=>{const n=e<=o.above,r=e<=o.below;return"top"===t?n||!r&&o.above>=o.below?"top":"bottom":"bottom"===t?r||!n&&o.below>o.above?"bottom":"top":o.below>=o.above?"bottom":"top"};export const computePlacement=(t,e,o,n,r)=>{const a=r?.gap??8,s=r?.margin??8,h=r?.align??"center",i=placementRoom(t,o,r),c=resolveSide(n,e.height,i),m=o.insets.top+s,l=o.height-o.insets.bottom-s,p="bottom"===c?Math.max(m,t.y+t.height+a):Math.min(l-e.height,t.y-a-e.height),b=o.insets.left+s,x=o.width-o.insets.right-s,u="start"===h?t.x:"end"===h?t.x+t.width-e.width:t.x+t.width/2-e.width/2;return{x:Math.max(b,Math.min(u,x-e.width)),y:p,placement:c}};export const arrowOffset=(t,e,o,n)=>{const r=Math.max(n,o-n);return Math.max(n,Math.min(t-e,r))};let current=null;export const claimAnchoredSurface=t=>{const e=current,o={close:t};return current=o,e&&e.close(),()=>{current===o&&(current=null)}};
@@ -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';
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';
2
+ export { BarChart, default } from './BarChart';
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';
3
4
  import type { ShadowScale } from '../../theme/types';
4
5
  import type { HapticType } from '../../utils';
5
6
  import type { SlotIcon, SlotIconState } from '../AppIcon';
@@ -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';
1
+ export type { BottomNavigationAccessoryState, BottomNavigationCenterAction, BottomNavigationElevation, BottomNavigationIndicatorPosition, BottomNavigationIndicatorRadius, BottomNavigationProps, BottomNavigationRadius, BottomNavigationVariant, TabBadge, TabConfig, TabIcon, TabIconProps } from './BottomNavigation';
2
2
  export { BottomNavigation, default } from './BottomNavigation';
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';
2
2
  export { BottomSheet, default, useBottomSheet } from './BottomSheet';
3
+ export type { SheetSwap, SheetSwapOptions } from './useSheetSwap';
4
+ export { useSheetSwap } from './useSheetSwap';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,24 @@
1
+ import type { RefObject } from 'react';
2
+ import type { BottomSheetRef } from './BottomSheet';
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';
4
4
  import type { HapticType } from '../../utils/hapticUtils';
5
+ import type { ContextMenuConfig } from '../Menu/useContextMenu';
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. */
@@ -16,7 +16,10 @@ export interface CheckboxProps extends Omit<PressableProps, 'style' | 'children'
16
16
  label?: React.ReactNode;
17
17
  /** Secondary line under the label. A string or a node; a node description adds nothing to the accessibility hint. */
18
18
  description?: React.ReactNode;
19
- /** Error line under the label (and description); also draws the box in the error colour. A string or a node. */
19
+ /**
20
+ * Error line under the label (and description); also draws the box in the error colour. A string
21
+ * or a node; `true` shows the error state without a message.
22
+ */
20
23
  error?: React.ReactNode;
21
24
  /**
22
25
  * Drawn beside the label, after it (a glossary info button, say). It sits
@@ -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';
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';
2
+ export { Composer, default } from './Composer';
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';
2
+ export { DateSeparator, DEFAULT_DATE_SEPARATOR_LABELS, dayLabel, default } from './DateSeparator';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -25,7 +25,7 @@ export interface FileViewerProps {
25
25
  accessibilityLabel?: string;
26
26
  }
27
27
  /**
28
- * Renders a PDF via our own native rasterizer (PDFKit on iOS, PdfRenderer on
28
+ * Renders a PDF via our own native rasterizer (Core Graphics on iOS, PdfRenderer on
29
29
  * Android) — no third-party PDF dependency. Pages are paged through a plain
30
30
  * `ScrollView` with manual windowed mounting (render the visible page ±
31
31
  * `RENDER_WINDOW`), not a `FlatList` — a `VirtualizedList`-based component