@webority/mobile-ui 0.148.0 → 0.150.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 (485) hide show
  1. package/dist/canvas-kit/kit.js +13 -56553
  2. package/dist/canvas-kit/manifest.json +20 -41
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/lib/commonjs/components/Accordion/Accordion.js +1 -1
  5. package/lib/commonjs/components/AppIcon/AppIcon.js +1 -1
  6. package/lib/commonjs/components/AppIcon/glyphs.g.js +1 -1
  7. package/lib/commonjs/components/AsyncBlock/AsyncBlock.js +1 -1
  8. package/lib/commonjs/components/AuthedImage/AuthedImage.js +1 -1
  9. package/lib/commonjs/components/AuthedImage/authedImageCache.js +1 -1
  10. package/lib/commonjs/components/Avatar/Avatar.js +1 -1
  11. package/lib/commonjs/components/Badge/Badge.js +1 -1
  12. package/lib/commonjs/components/Banner/Banner.js +1 -1
  13. package/lib/commonjs/components/BarChart/BarChart.js +1 -1
  14. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
  15. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  16. package/lib/commonjs/components/Box/Box.js +1 -1
  17. package/lib/commonjs/components/Card/Card.js +1 -1
  18. package/lib/commonjs/components/Carousel/Carousel.js +1 -1
  19. package/lib/commonjs/components/Chip/Chip.js +1 -1
  20. package/lib/commonjs/components/ChoiceGroup/ChoiceGroup.js +1 -1
  21. package/lib/commonjs/components/Confetti/Confetti.js +1 -1
  22. package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
  23. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
  24. package/lib/commonjs/components/Descriptions/Descriptions.js +1 -1
  25. package/lib/commonjs/components/Dialog/Dialog.js +1 -1
  26. package/lib/commonjs/components/Drawer/Drawer.js +1 -1
  27. package/lib/commonjs/components/FieldBase/useFloatingLabel.js +1 -1
  28. package/lib/commonjs/components/FileViewer/fileSource.js +1 -1
  29. package/lib/commonjs/components/FileViewer/useFileViewerZoom.js +1 -1
  30. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
  31. package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
  32. package/lib/commonjs/components/InlineSelect/InlineSelect.js +1 -1
  33. package/lib/commonjs/components/Input/Input.js +1 -1
  34. package/lib/commonjs/components/ListItem/ListItem.js +1 -1
  35. package/lib/commonjs/components/Markdown/Markdown.js +1 -1
  36. package/lib/commonjs/components/Menu/MenuSurface.js +1 -1
  37. package/lib/commonjs/components/Menu/focusHost.js +1 -1
  38. package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
  39. package/lib/commonjs/components/OptionSheet/optionAccessors.js +1 -0
  40. package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  41. package/lib/commonjs/components/ProgressRing/ProgressRing.js +1 -1
  42. package/lib/commonjs/components/Radio/RadioGroup.js +1 -1
  43. package/lib/commonjs/components/Rating/Rating.js +1 -1
  44. package/lib/commonjs/components/Repeater/Repeater.js +1 -1
  45. package/lib/commonjs/components/Screen/Screen.js +1 -1
  46. package/lib/commonjs/components/SearchBar/useRecentSearches.js +1 -1
  47. package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +1 -1
  48. package/lib/commonjs/components/Select/Select.js +1 -1
  49. package/lib/commonjs/components/SignaturePad/SignaturePad.js +1 -1
  50. package/lib/commonjs/components/Skeleton/SkeletonContent.js +1 -1
  51. package/lib/commonjs/components/Skeleton/SkeletonList.js +1 -1
  52. package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.js +1 -1
  53. package/lib/commonjs/components/Slider/Slider.js +1 -1
  54. package/lib/commonjs/components/SliderField/SliderField.js +1 -1
  55. package/lib/commonjs/components/SortableList/SortableList.js +1 -1
  56. package/lib/commonjs/components/Sparkline/Sparkline.js +1 -1
  57. package/lib/commonjs/components/SquircleFill/SquircleFill.js +1 -1
  58. package/lib/commonjs/components/StatTile/StatTile.js +1 -1
  59. package/lib/commonjs/components/StatusBadge/StatusBadge.js +1 -1
  60. package/lib/commonjs/components/StatusBadge/statusMap.js +1 -1
  61. package/lib/commonjs/components/Stepper/Stepper.js +1 -1
  62. package/lib/commonjs/components/Swipeable/Swipeable.js +1 -1
  63. package/lib/commonjs/components/Text/Text.js +1 -1
  64. package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
  65. package/lib/commonjs/components/WheelPicker/Wheel.js +1 -1
  66. package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -1
  67. package/lib/commonjs/components/ZoomableImage/ZoomableImage.js +1 -1
  68. package/lib/commonjs/form/HookFormField.js +1 -1
  69. package/lib/commonjs/form/path.js +1 -1
  70. package/lib/commonjs/hooks/useControllableState.js +1 -1
  71. package/lib/commonjs/hooks/useDragToDismiss.js +1 -1
  72. package/lib/commonjs/navigation/NavigationScreen.js +1 -1
  73. package/lib/commonjs/specs/NativePdfRasterizer.js +1 -1
  74. package/lib/commonjs/theme/ThemeContext.js +1 -1
  75. package/lib/commonjs/theme/animatedValue.js +1 -1
  76. package/lib/commonjs/theme/componentSizes.js +1 -1
  77. package/lib/commonjs/theme/merge.js +1 -1
  78. package/lib/commonjs/theme/scale.js +1 -1
  79. package/lib/commonjs/utils/complete.js +1 -0
  80. package/lib/commonjs/utils/guards.js +1 -0
  81. package/lib/commonjs/utils/hapticUtils.js +1 -1
  82. package/lib/module/components/Accordion/Accordion.js +1 -1
  83. package/lib/module/components/AppIcon/AppIcon.js +1 -1
  84. package/lib/module/components/AppIcon/glyphs.g.js +1 -1
  85. package/lib/module/components/AsyncBlock/AsyncBlock.js +1 -1
  86. package/lib/module/components/AuthedImage/AuthedImage.js +1 -1
  87. package/lib/module/components/AuthedImage/authedImageCache.js +1 -1
  88. package/lib/module/components/Avatar/Avatar.js +1 -1
  89. package/lib/module/components/Badge/Badge.js +1 -1
  90. package/lib/module/components/Banner/Banner.js +1 -1
  91. package/lib/module/components/BarChart/BarChart.js +1 -1
  92. package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
  93. package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
  94. package/lib/module/components/Box/Box.js +1 -1
  95. package/lib/module/components/Card/Card.js +1 -1
  96. package/lib/module/components/Carousel/Carousel.js +1 -1
  97. package/lib/module/components/Chip/Chip.js +1 -1
  98. package/lib/module/components/ChoiceGroup/ChoiceGroup.js +1 -1
  99. package/lib/module/components/Confetti/Confetti.js +1 -1
  100. package/lib/module/components/DatePicker/DatePicker.js +1 -1
  101. package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
  102. package/lib/module/components/Descriptions/Descriptions.js +1 -1
  103. package/lib/module/components/Dialog/Dialog.js +1 -1
  104. package/lib/module/components/Drawer/Drawer.js +1 -1
  105. package/lib/module/components/FieldBase/useFloatingLabel.js +1 -1
  106. package/lib/module/components/FileViewer/fileSource.js +1 -1
  107. package/lib/module/components/FileViewer/useFileViewerZoom.js +1 -1
  108. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
  109. package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
  110. package/lib/module/components/InlineSelect/InlineSelect.js +1 -1
  111. package/lib/module/components/Input/Input.js +1 -1
  112. package/lib/module/components/ListItem/ListItem.js +1 -1
  113. package/lib/module/components/Markdown/Markdown.js +1 -1
  114. package/lib/module/components/Menu/MenuSurface.js +1 -1
  115. package/lib/module/components/Menu/focusHost.js +1 -1
  116. package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
  117. package/lib/module/components/OptionSheet/optionAccessors.js +1 -0
  118. package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  119. package/lib/module/components/ProgressRing/ProgressRing.js +1 -1
  120. package/lib/module/components/Radio/RadioGroup.js +1 -1
  121. package/lib/module/components/Rating/Rating.js +1 -1
  122. package/lib/module/components/Repeater/Repeater.js +1 -1
  123. package/lib/module/components/Screen/Screen.js +1 -1
  124. package/lib/module/components/SearchBar/useRecentSearches.js +1 -1
  125. package/lib/module/components/SegmentedControl/SegmentedControl.js +1 -1
  126. package/lib/module/components/Select/Select.js +1 -1
  127. package/lib/module/components/SignaturePad/SignaturePad.js +1 -1
  128. package/lib/module/components/Skeleton/SkeletonContent.js +1 -1
  129. package/lib/module/components/Skeleton/SkeletonList.js +1 -1
  130. package/lib/module/components/SlideToConfirm/SlideToConfirm.js +1 -1
  131. package/lib/module/components/Slider/Slider.js +1 -1
  132. package/lib/module/components/SliderField/SliderField.js +1 -1
  133. package/lib/module/components/SortableList/SortableList.js +1 -1
  134. package/lib/module/components/Sparkline/Sparkline.js +1 -1
  135. package/lib/module/components/SquircleFill/SquircleFill.js +1 -1
  136. package/lib/module/components/StatTile/StatTile.js +1 -1
  137. package/lib/module/components/StatusBadge/StatusBadge.js +1 -1
  138. package/lib/module/components/StatusBadge/statusMap.js +1 -1
  139. package/lib/module/components/Stepper/Stepper.js +1 -1
  140. package/lib/module/components/Swipeable/Swipeable.js +1 -1
  141. package/lib/module/components/Text/Text.js +1 -1
  142. package/lib/module/components/TimePicker/TimePicker.js +1 -1
  143. package/lib/module/components/WheelPicker/Wheel.js +1 -1
  144. package/lib/module/components/WheelPicker/WheelPicker.js +1 -1
  145. package/lib/module/components/ZoomableImage/ZoomableImage.js +1 -1
  146. package/lib/module/form/HookFormField.js +1 -1
  147. package/lib/module/form/path.js +1 -1
  148. package/lib/module/hooks/useControllableState.js +1 -1
  149. package/lib/module/hooks/useDragToDismiss.js +1 -1
  150. package/lib/module/navigation/NavigationScreen.js +1 -1
  151. package/lib/module/specs/NativePdfRasterizer.js +1 -1
  152. package/lib/module/theme/ThemeContext.js +1 -1
  153. package/lib/module/theme/animatedValue.js +1 -1
  154. package/lib/module/theme/componentSizes.js +1 -1
  155. package/lib/module/theme/merge.js +1 -1
  156. package/lib/module/theme/scale.js +1 -1
  157. package/lib/module/utils/complete.js +1 -0
  158. package/lib/module/utils/guards.js +1 -0
  159. package/lib/module/utils/hapticUtils.js +1 -1
  160. package/lib/typescript/commonjs/canvasKit/index.d.ts +12 -12
  161. package/lib/typescript/commonjs/canvasKit/meta.d.ts +5 -7
  162. package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +22 -22
  163. package/lib/typescript/commonjs/components/AmountSlider/AmountSlider.d.ts +23 -23
  164. package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +5 -5
  165. package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +39 -39
  166. package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +7 -7
  167. package/lib/typescript/commonjs/components/AppIcon/defaultIcons.d.ts +2 -1
  168. package/lib/typescript/commonjs/components/AppIcon/glyphs.g.d.ts +233 -233
  169. package/lib/typescript/commonjs/components/AppIcon/slotIcon.d.ts +1 -1
  170. package/lib/typescript/commonjs/components/AppLockOverlay/AppLockOverlay.d.ts +5 -5
  171. package/lib/typescript/commonjs/components/AsyncBlock/AsyncBlock.d.ts +22 -40
  172. package/lib/typescript/commonjs/components/AuthedImage/AuthedImage.d.ts +15 -15
  173. package/lib/typescript/commonjs/components/AuthedImage/authedImageCache.d.ts +2 -2
  174. package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.d.ts +24 -24
  175. package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +36 -36
  176. package/lib/typescript/commonjs/components/Badge/Badge.d.ts +18 -18
  177. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +25 -25
  178. package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +21 -21
  179. package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +36 -36
  180. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +33 -33
  181. package/lib/typescript/commonjs/components/Box/Box.d.ts +27 -27
  182. package/lib/typescript/commonjs/components/Button/Button.d.ts +22 -22
  183. package/lib/typescript/commonjs/components/Calendar/Calendar.d.ts +20 -20
  184. package/lib/typescript/commonjs/components/Calendar/CalendarDay.d.ts +4 -2
  185. package/lib/typescript/commonjs/components/Card/Card.d.ts +41 -41
  186. package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +21 -21
  187. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +21 -21
  188. package/lib/typescript/commonjs/components/Chip/Chip.d.ts +23 -23
  189. package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.d.ts +51 -46
  190. package/lib/typescript/commonjs/components/Composer/Composer.d.ts +27 -27
  191. package/lib/typescript/commonjs/components/Confetti/Confetti.d.ts +22 -21
  192. package/lib/typescript/commonjs/components/Confirm/confirm.d.ts +4 -4
  193. package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +20 -20
  194. package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +22 -22
  195. package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.d.ts +9 -9
  196. package/lib/typescript/commonjs/components/DecimalInput/DecimalInput.d.ts +14 -14
  197. package/lib/typescript/commonjs/components/Descriptions/Descriptions.d.ts +13 -13
  198. package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +24 -24
  199. package/lib/typescript/commonjs/components/Dialog/OverlayActions.d.ts +5 -5
  200. package/lib/typescript/commonjs/components/Divider/Divider.d.ts +9 -9
  201. package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +15 -15
  202. package/lib/typescript/commonjs/components/EmptyState/EmptyState.d.ts +13 -13
  203. package/lib/typescript/commonjs/components/ErrorBoundary/ErrorBoundary.d.ts +8 -8
  204. package/lib/typescript/commonjs/components/FieldBase/Chevron.d.ts +2 -2
  205. package/lib/typescript/commonjs/components/FieldBase/ChoiceText.d.ts +10 -10
  206. package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +54 -54
  207. package/lib/typescript/commonjs/components/FieldBase/useFloatingLabel.d.ts +8 -8
  208. package/lib/typescript/commonjs/components/FilePicker/FilePicker.d.ts +35 -35
  209. package/lib/typescript/commonjs/components/FileViewer/FileViewer.d.ts +10 -10
  210. package/lib/typescript/commonjs/components/FileViewer/fileSource.d.ts +3 -3
  211. package/lib/typescript/commonjs/components/FileViewer/useFileViewerZoom.d.ts +3 -3
  212. package/lib/typescript/commonjs/components/FilterChipRow/FilterChipRow.d.ts +12 -12
  213. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +35 -35
  214. package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +11 -11
  215. package/lib/typescript/commonjs/components/FormField/FormField.d.ts +15 -15
  216. package/lib/typescript/commonjs/components/IconBadge/IconBadge.d.ts +11 -11
  217. package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +14 -14
  218. package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +14 -14
  219. package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +36 -31
  220. package/lib/typescript/commonjs/components/Input/Input.d.ts +47 -47
  221. package/lib/typescript/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +7 -7
  222. package/lib/typescript/commonjs/components/KeyboardToolbar/KeyboardToolbar.d.ts +8 -8
  223. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +44 -44
  224. package/lib/typescript/commonjs/components/ListSection/ListSection.d.ts +6 -6
  225. package/lib/typescript/commonjs/components/LoaderOverlay/LoaderOverlay.d.ts +17 -11
  226. package/lib/typescript/commonjs/components/Markdown/Markdown.d.ts +15 -15
  227. package/lib/typescript/commonjs/components/Menu/Menu.d.ts +17 -12
  228. package/lib/typescript/commonjs/components/Menu/MenuSurface.d.ts +8 -8
  229. package/lib/typescript/commonjs/components/Menu/menuModel.d.ts +11 -11
  230. package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +13 -13
  231. package/lib/typescript/commonjs/components/Menu/webOnly.d.ts +3 -3
  232. package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +20 -20
  233. package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +14 -14
  234. package/lib/typescript/commonjs/components/Modal/Modal.d.ts +19 -19
  235. package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +27 -27
  236. package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +20 -20
  237. package/lib/typescript/commonjs/components/OTPInput/OTPResendRow.d.ts +9 -9
  238. package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.d.ts +5 -5
  239. package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +33 -33
  240. package/lib/typescript/commonjs/components/OptionSheet/optionAccessors.d.ts +8 -0
  241. package/lib/typescript/commonjs/components/PagedListFooter/PagedListFooter.d.ts +2 -2
  242. package/lib/typescript/commonjs/components/PermissionPrompt/PermissionPrompt.d.ts +6 -6
  243. package/lib/typescript/commonjs/components/PermissionPrompt/usePermissionPrompt.d.ts +1 -1
  244. package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +43 -43
  245. package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +23 -23
  246. package/lib/typescript/commonjs/components/ProfileCompletion/ProfileCompletion.d.ts +23 -23
  247. package/lib/typescript/commonjs/components/ProfilePicker/ProfilePicker.d.ts +30 -30
  248. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +21 -21
  249. package/lib/typescript/commonjs/components/ProgressRing/ProgressRing.d.ts +13 -13
  250. package/lib/typescript/commonjs/components/Radio/Radio.d.ts +18 -18
  251. package/lib/typescript/commonjs/components/Radio/RadioDot.d.ts +5 -5
  252. package/lib/typescript/commonjs/components/Radio/RadioGroup.d.ts +8 -8
  253. package/lib/typescript/commonjs/components/Rating/Rating.d.ts +15 -15
  254. package/lib/typescript/commonjs/components/Repeater/Repeater.d.ts +10 -10
  255. package/lib/typescript/commonjs/components/RichTextEditor/RichTextEditor.d.ts +15 -15
  256. package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.d.ts +13 -13
  257. package/lib/typescript/commonjs/components/Screen/Screen.d.ts +43 -44
  258. package/lib/typescript/commonjs/components/Screen/index.d.ts +1 -1
  259. package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +31 -31
  260. package/lib/typescript/commonjs/components/SearchBar/SearchPanel.d.ts +6 -6
  261. package/lib/typescript/commonjs/components/SearchBar/useRecentSearches.d.ts +1 -1
  262. package/lib/typescript/commonjs/components/SectionHeader/SectionHeader.d.ts +10 -10
  263. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +25 -24
  264. package/lib/typescript/commonjs/components/Select/Select.d.ts +50 -45
  265. package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +20 -20
  266. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +13 -13
  267. package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +9 -9
  268. package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +30 -8
  269. package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +9 -9
  270. package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +14 -14
  271. package/lib/typescript/commonjs/components/Slider/Slider.d.ts +30 -30
  272. package/lib/typescript/commonjs/components/Slider/valueText.d.ts +9 -9
  273. package/lib/typescript/commonjs/components/SliderField/SliderField.d.ts +41 -41
  274. package/lib/typescript/commonjs/components/SortableList/SortableList.d.ts +5 -5
  275. package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +13 -13
  276. package/lib/typescript/commonjs/components/Sparkline/geometry.d.ts +3 -1
  277. package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +10 -10
  278. package/lib/typescript/commonjs/components/SquircleFill/SquircleFill.d.ts +3 -3
  279. package/lib/typescript/commonjs/components/SquircleImage/SquircleImage.d.ts +5 -12
  280. package/lib/typescript/commonjs/components/StatTile/StatTile.d.ts +14 -14
  281. package/lib/typescript/commonjs/components/StatusBadge/StatusBadge.d.ts +13 -13
  282. package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +21 -21
  283. package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +16 -16
  284. package/lib/typescript/commonjs/components/Switch/Switch.d.ts +19 -19
  285. package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +20 -20
  286. package/lib/typescript/commonjs/components/TagInput/TagInput.d.ts +19 -19
  287. package/lib/typescript/commonjs/components/Text/Text.d.ts +10 -10
  288. package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +14 -14
  289. package/lib/typescript/commonjs/components/Timeline/Timeline.d.ts +12 -12
  290. package/lib/typescript/commonjs/components/Toast/Toast.d.ts +17 -17
  291. package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +8 -8
  292. package/lib/typescript/commonjs/components/Tooltip/RichTooltipBody.d.ts +4 -4
  293. package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +24 -19
  294. package/lib/typescript/commonjs/components/Tour/Tour.d.ts +7 -7
  295. package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.d.ts +6 -6
  296. package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +6 -6
  297. package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +20 -20
  298. package/lib/typescript/commonjs/components/ZoomableImage/ZoomableImage.d.ts +8 -8
  299. package/lib/typescript/commonjs/form/HookFormField.d.ts +5 -18
  300. package/lib/typescript/commonjs/form/path.d.ts +4 -2
  301. package/lib/typescript/commonjs/form/useFormCompletion.d.ts +1 -1
  302. package/lib/typescript/commonjs/hooks/useControllableState.d.ts +2 -2
  303. package/lib/typescript/commonjs/hooks/useDragToDismiss.d.ts +8 -8
  304. package/lib/typescript/commonjs/hooks/useFieldErrorScroll.d.ts +1 -1
  305. package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +4 -4
  306. package/lib/typescript/commonjs/hooks/useRefreshControl.d.ts +8 -8
  307. package/lib/typescript/commonjs/hooks/useResendCountdown.d.ts +1 -1
  308. package/lib/typescript/commonjs/hooks/useScrollDirection.d.ts +1 -1
  309. package/lib/typescript/commonjs/navigation/DiscardGuard.d.ts +2 -2
  310. package/lib/typescript/commonjs/navigation/NavigationScreen.d.ts +3 -3
  311. package/lib/typescript/commonjs/network/NetworkStatusBanner.d.ts +7 -7
  312. package/lib/typescript/commonjs/theme/Gradient.d.ts +2 -2
  313. package/lib/typescript/commonjs/theme/ThemeContext.d.ts +5 -5
  314. package/lib/typescript/commonjs/theme/componentSizes.d.ts +15 -38
  315. package/lib/typescript/commonjs/theme/types.d.ts +84 -84
  316. package/lib/typescript/commonjs/utils/announce.d.ts +1 -1
  317. package/lib/typescript/commonjs/utils/complete.d.ts +5 -0
  318. package/lib/typescript/commonjs/utils/feedback.d.ts +3 -1
  319. package/lib/typescript/commonjs/utils/guards.d.ts +9 -0
  320. package/lib/typescript/commonjs/utils/placement.d.ts +3 -3
  321. package/lib/typescript/commonjs/utils/squircle.d.ts +2 -2
  322. package/lib/typescript/module/canvasKit/index.d.ts +12 -12
  323. package/lib/typescript/module/canvasKit/meta.d.ts +5 -7
  324. package/lib/typescript/module/components/Accordion/Accordion.d.ts +22 -22
  325. package/lib/typescript/module/components/AmountSlider/AmountSlider.d.ts +23 -23
  326. package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +5 -5
  327. package/lib/typescript/module/components/AppBar/AppBar.d.ts +39 -39
  328. package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +7 -7
  329. package/lib/typescript/module/components/AppIcon/defaultIcons.d.ts +2 -1
  330. package/lib/typescript/module/components/AppIcon/glyphs.g.d.ts +233 -233
  331. package/lib/typescript/module/components/AppIcon/slotIcon.d.ts +1 -1
  332. package/lib/typescript/module/components/AppLockOverlay/AppLockOverlay.d.ts +5 -5
  333. package/lib/typescript/module/components/AsyncBlock/AsyncBlock.d.ts +22 -40
  334. package/lib/typescript/module/components/AuthedImage/AuthedImage.d.ts +15 -15
  335. package/lib/typescript/module/components/AuthedImage/authedImageCache.d.ts +2 -2
  336. package/lib/typescript/module/components/Autocomplete/Autocomplete.d.ts +24 -24
  337. package/lib/typescript/module/components/Avatar/Avatar.d.ts +36 -36
  338. package/lib/typescript/module/components/Badge/Badge.d.ts +18 -18
  339. package/lib/typescript/module/components/Banner/Banner.d.ts +25 -25
  340. package/lib/typescript/module/components/BarChart/BarChart.d.ts +21 -21
  341. package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +36 -36
  342. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +33 -33
  343. package/lib/typescript/module/components/Box/Box.d.ts +27 -27
  344. package/lib/typescript/module/components/Button/Button.d.ts +22 -22
  345. package/lib/typescript/module/components/Calendar/Calendar.d.ts +20 -20
  346. package/lib/typescript/module/components/Calendar/CalendarDay.d.ts +4 -2
  347. package/lib/typescript/module/components/Card/Card.d.ts +41 -41
  348. package/lib/typescript/module/components/Carousel/Carousel.d.ts +21 -21
  349. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +21 -21
  350. package/lib/typescript/module/components/Chip/Chip.d.ts +23 -23
  351. package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.d.ts +51 -46
  352. package/lib/typescript/module/components/Composer/Composer.d.ts +27 -27
  353. package/lib/typescript/module/components/Confetti/Confetti.d.ts +22 -21
  354. package/lib/typescript/module/components/Confirm/confirm.d.ts +4 -4
  355. package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +20 -20
  356. package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +22 -22
  357. package/lib/typescript/module/components/DateSeparator/DateSeparator.d.ts +9 -9
  358. package/lib/typescript/module/components/DecimalInput/DecimalInput.d.ts +14 -14
  359. package/lib/typescript/module/components/Descriptions/Descriptions.d.ts +13 -13
  360. package/lib/typescript/module/components/Dialog/Dialog.d.ts +24 -24
  361. package/lib/typescript/module/components/Dialog/OverlayActions.d.ts +5 -5
  362. package/lib/typescript/module/components/Divider/Divider.d.ts +9 -9
  363. package/lib/typescript/module/components/Drawer/Drawer.d.ts +15 -15
  364. package/lib/typescript/module/components/EmptyState/EmptyState.d.ts +13 -13
  365. package/lib/typescript/module/components/ErrorBoundary/ErrorBoundary.d.ts +8 -8
  366. package/lib/typescript/module/components/FieldBase/Chevron.d.ts +2 -2
  367. package/lib/typescript/module/components/FieldBase/ChoiceText.d.ts +10 -10
  368. package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +54 -54
  369. package/lib/typescript/module/components/FieldBase/useFloatingLabel.d.ts +8 -8
  370. package/lib/typescript/module/components/FilePicker/FilePicker.d.ts +35 -35
  371. package/lib/typescript/module/components/FileViewer/FileViewer.d.ts +10 -10
  372. package/lib/typescript/module/components/FileViewer/fileSource.d.ts +3 -3
  373. package/lib/typescript/module/components/FileViewer/useFileViewerZoom.d.ts +3 -3
  374. package/lib/typescript/module/components/FilterChipRow/FilterChipRow.d.ts +12 -12
  375. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +35 -35
  376. package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +11 -11
  377. package/lib/typescript/module/components/FormField/FormField.d.ts +15 -15
  378. package/lib/typescript/module/components/IconBadge/IconBadge.d.ts +11 -11
  379. package/lib/typescript/module/components/IconButton/IconButton.d.ts +14 -14
  380. package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +14 -14
  381. package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +36 -31
  382. package/lib/typescript/module/components/Input/Input.d.ts +47 -47
  383. package/lib/typescript/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +7 -7
  384. package/lib/typescript/module/components/KeyboardToolbar/KeyboardToolbar.d.ts +8 -8
  385. package/lib/typescript/module/components/ListItem/ListItem.d.ts +44 -44
  386. package/lib/typescript/module/components/ListSection/ListSection.d.ts +6 -6
  387. package/lib/typescript/module/components/LoaderOverlay/LoaderOverlay.d.ts +17 -11
  388. package/lib/typescript/module/components/Markdown/Markdown.d.ts +15 -15
  389. package/lib/typescript/module/components/Menu/Menu.d.ts +17 -12
  390. package/lib/typescript/module/components/Menu/MenuSurface.d.ts +8 -8
  391. package/lib/typescript/module/components/Menu/menuModel.d.ts +11 -11
  392. package/lib/typescript/module/components/Menu/useContextMenu.d.ts +13 -13
  393. package/lib/typescript/module/components/Menu/webOnly.d.ts +3 -3
  394. package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +20 -20
  395. package/lib/typescript/module/components/MessageList/MessageList.d.ts +14 -14
  396. package/lib/typescript/module/components/Modal/Modal.d.ts +19 -19
  397. package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +27 -27
  398. package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +20 -20
  399. package/lib/typescript/module/components/OTPInput/OTPResendRow.d.ts +9 -9
  400. package/lib/typescript/module/components/OnboardingPager/OnboardingPager.d.ts +5 -5
  401. package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +33 -33
  402. package/lib/typescript/module/components/OptionSheet/optionAccessors.d.ts +8 -0
  403. package/lib/typescript/module/components/PagedListFooter/PagedListFooter.d.ts +2 -2
  404. package/lib/typescript/module/components/PermissionPrompt/PermissionPrompt.d.ts +6 -6
  405. package/lib/typescript/module/components/PermissionPrompt/usePermissionPrompt.d.ts +1 -1
  406. package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +43 -43
  407. package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +23 -23
  408. package/lib/typescript/module/components/ProfileCompletion/ProfileCompletion.d.ts +23 -23
  409. package/lib/typescript/module/components/ProfilePicker/ProfilePicker.d.ts +30 -30
  410. package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +21 -21
  411. package/lib/typescript/module/components/ProgressRing/ProgressRing.d.ts +13 -13
  412. package/lib/typescript/module/components/Radio/Radio.d.ts +18 -18
  413. package/lib/typescript/module/components/Radio/RadioDot.d.ts +5 -5
  414. package/lib/typescript/module/components/Radio/RadioGroup.d.ts +8 -8
  415. package/lib/typescript/module/components/Rating/Rating.d.ts +15 -15
  416. package/lib/typescript/module/components/Repeater/Repeater.d.ts +10 -10
  417. package/lib/typescript/module/components/RichTextEditor/RichTextEditor.d.ts +15 -15
  418. package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.d.ts +13 -13
  419. package/lib/typescript/module/components/Screen/Screen.d.ts +43 -44
  420. package/lib/typescript/module/components/Screen/index.d.ts +1 -1
  421. package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +31 -31
  422. package/lib/typescript/module/components/SearchBar/SearchPanel.d.ts +6 -6
  423. package/lib/typescript/module/components/SearchBar/useRecentSearches.d.ts +1 -1
  424. package/lib/typescript/module/components/SectionHeader/SectionHeader.d.ts +10 -10
  425. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +25 -24
  426. package/lib/typescript/module/components/Select/Select.d.ts +50 -45
  427. package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +20 -20
  428. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +13 -13
  429. package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +9 -9
  430. package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +30 -8
  431. package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +9 -9
  432. package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +14 -14
  433. package/lib/typescript/module/components/Slider/Slider.d.ts +30 -30
  434. package/lib/typescript/module/components/Slider/valueText.d.ts +9 -9
  435. package/lib/typescript/module/components/SliderField/SliderField.d.ts +41 -41
  436. package/lib/typescript/module/components/SortableList/SortableList.d.ts +5 -5
  437. package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +13 -13
  438. package/lib/typescript/module/components/Sparkline/geometry.d.ts +3 -1
  439. package/lib/typescript/module/components/Spinner/Spinner.d.ts +10 -10
  440. package/lib/typescript/module/components/SquircleFill/SquircleFill.d.ts +3 -3
  441. package/lib/typescript/module/components/SquircleImage/SquircleImage.d.ts +5 -12
  442. package/lib/typescript/module/components/StatTile/StatTile.d.ts +14 -14
  443. package/lib/typescript/module/components/StatusBadge/StatusBadge.d.ts +13 -13
  444. package/lib/typescript/module/components/Stepper/Stepper.d.ts +21 -21
  445. package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +16 -16
  446. package/lib/typescript/module/components/Switch/Switch.d.ts +19 -19
  447. package/lib/typescript/module/components/Tabs/Tabs.d.ts +20 -20
  448. package/lib/typescript/module/components/TagInput/TagInput.d.ts +19 -19
  449. package/lib/typescript/module/components/Text/Text.d.ts +10 -10
  450. package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +14 -14
  451. package/lib/typescript/module/components/Timeline/Timeline.d.ts +12 -12
  452. package/lib/typescript/module/components/Toast/Toast.d.ts +17 -17
  453. package/lib/typescript/module/components/Toast/ToastProvider.d.ts +8 -8
  454. package/lib/typescript/module/components/Tooltip/RichTooltipBody.d.ts +4 -4
  455. package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +24 -19
  456. package/lib/typescript/module/components/Tour/Tour.d.ts +7 -7
  457. package/lib/typescript/module/components/TypingIndicator/TypingIndicator.d.ts +6 -6
  458. package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +6 -6
  459. package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +20 -20
  460. package/lib/typescript/module/components/ZoomableImage/ZoomableImage.d.ts +8 -8
  461. package/lib/typescript/module/form/HookFormField.d.ts +5 -18
  462. package/lib/typescript/module/form/path.d.ts +4 -2
  463. package/lib/typescript/module/form/useFormCompletion.d.ts +1 -1
  464. package/lib/typescript/module/hooks/useControllableState.d.ts +2 -2
  465. package/lib/typescript/module/hooks/useDragToDismiss.d.ts +8 -8
  466. package/lib/typescript/module/hooks/useFieldErrorScroll.d.ts +1 -1
  467. package/lib/typescript/module/hooks/usePressAnimation.d.ts +4 -4
  468. package/lib/typescript/module/hooks/useRefreshControl.d.ts +8 -8
  469. package/lib/typescript/module/hooks/useResendCountdown.d.ts +1 -1
  470. package/lib/typescript/module/hooks/useScrollDirection.d.ts +1 -1
  471. package/lib/typescript/module/navigation/DiscardGuard.d.ts +2 -2
  472. package/lib/typescript/module/navigation/NavigationScreen.d.ts +3 -3
  473. package/lib/typescript/module/network/NetworkStatusBanner.d.ts +7 -7
  474. package/lib/typescript/module/theme/Gradient.d.ts +2 -2
  475. package/lib/typescript/module/theme/ThemeContext.d.ts +5 -5
  476. package/lib/typescript/module/theme/componentSizes.d.ts +15 -38
  477. package/lib/typescript/module/theme/types.d.ts +84 -84
  478. package/lib/typescript/module/utils/announce.d.ts +1 -1
  479. package/lib/typescript/module/utils/complete.d.ts +5 -0
  480. package/lib/typescript/module/utils/feedback.d.ts +3 -1
  481. package/lib/typescript/module/utils/guards.d.ts +9 -0
  482. package/lib/typescript/module/utils/placement.d.ts +3 -3
  483. package/lib/typescript/module/utils/squircle.d.ts +2 -2
  484. package/package.json +11 -11
  485. package/src/specs/NativePdfRasterizer.ts +1 -1
@@ -1 +1 @@
1
- "use strict";import{Fragment,useCallback,useMemo}from"react";import{StyleSheet,useWindowDimensions,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Chip}from"../Chip/index.js";import{Text}from"../Text/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;export const DEFAULT_WHEEL_PICKER_LABELS=Object.freeze({hours:"Hours",minutes:"Minutes",hourUnit:"hr",minuteUnit:"min",hourOne:"hour",hourMany:"hours",minuteOne:"minute",minuteMany:"minutes",value:"Value"});const range=(e,t,i=1)=>{const s=[];for(let o=e;o<=t;o+=i)s.push(o);return s},plural=(e,t,i)=>`${e} ${1===e?t:i}`,formatPreset=(e,t,i)=>{const s=Math.floor(e/60),o=e%60;return 0===s?`${o} ${i}`:0===o?`${s} ${t}`:`${s} ${t} ${o} ${i}`},toItem=e=>"object"==typeof e?e:{value:e,label:String(e)},WheelPicker=e=>{const{haptic:t,disabled:i,testID:s,style:o,labels:n}=e;assertValidValue("WheelPicker","mode",e.mode,["columns","list","duration"]);const r=useTheme(),a=useReducedMotion(),{fontScale:l}=useWindowDimensions(),u=Math.min(Math.max(l,1),1.5),m=Math.round(40*u),d=useMemo(()=>buildStyles(r,m),[r,m]),h="list"===e.mode?e.items:void 0,c=useMemo(()=>h?.map(toItem),[h]),p="duration"===e.mode?e.minuteStep??1:1,b="duration"===e.mode?Math.max(0,Math.min(1439,Math.floor(e.maxMinutes??1/0))):0,f=Math.floor(b/60),x=useMemo(()=>({...DEFAULT_WHEEL_PICKER_LABELS,...n}),[n]),M="duration"===e.mode?e.presets:void 0;for(const e of M??[])if(!Number.isInteger(e)||e<0||e>b||e%p!==0)throw new Error(`WheelPicker preset ${e} must be a whole number of minutes from 0 to ${b} in steps of ${p}.`);const y=useCallback(e=>{const t=e===f?b%60:59;return Math.floor(t/p)*p},[f,b,p]),E="duration"===e.mode?e.value:0,_=useMemo(()=>{const e=Number.isFinite(E)?E:0,t=Math.max(0,Math.min(b,e)),i=Math.floor(t/60),s=Math.round(t%60/p)*p;return{hour:i,minute:Math.min(y(i),s)}},[E,b,p,y]),g=useMemo(()=>"duration"===e.mode?range(0,f).map(e=>({value:e,label:String(e),accessibilityLabel:plural(e,x.hourOne,x.hourMany)})):[],[e.mode,f,x]),j=y(_.hour),S=useMemo(()=>"duration"===e.mode?range(0,j,p).map(e=>({value:e,label:String(e).padStart(2,"0"),accessibilityLabel:plural(e,x.minuteOne,x.minuteMany)})):[],[e.mode,j,p,x]),w=useMemo(()=>"list"===e.mode?[{key:"list",label:e.label??x.value,items:c??[],value:e.value??"",width:e.width}]:"duration"===e.mode?[{key:"hours",label:x.hours,items:g,value:_.hour,unit:x.hourUnit,gapAfter:r.space.md},{key:"minutes",label:x.minutes,items:S,value:_.minute,unit:x.minuteUnit}]:e.columns,[e,c,g,S,_,x,r.space.md]),{onChange:I}=e,L=useCallback((t,i)=>{const s=t.items[i];if(s&&I)if("list"===e.mode)I(s.value);else if("duration"===e.mode){const e=Number(s.value),i=I;"hours"===t.key?i(60*e+Math.min(_.minute,y(e))):i(60*_.hour+e)}else I(t.key,s.value)},[I,e.mode,_,y]),v=useCallback(e=>{I?.(e)},[I]),T=60*_.hour+_.minute,C=_jsxs(View,{style:[d.wheels,o],testID:s,children:[_jsxs(View,{pointerEvents:"none",style:d.selectionBand,children:[_jsx(View,{style:d.bandLine}),_jsx(View,{style:d.bandLine})]}),w.map(s=>{if(0===s.items.length)return null;const o=s.items.findIndex(e=>e.value===s.value);return _jsxs(Fragment,{children:[_jsx(Wheel,{label:s.label,items:s.items,selectedIndex:Math.max(0,o),onIndexChange:e=>L(s,e),itemHeight:m,width:s.width??("list"===e.mode?void 0:64),theme:r,haptic:t,disabled:i,reducedMotion:a,typeable:"duration"===e.mode,testID:s.testID}),s.unit?_jsx(Text,{variant:"body",weight:"semibold",color:"secondary",style:d.unit,maxFontSizeMultiplier:1.5,numberOfLines:1,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:s.unit}):null,s.separator?_jsx(Text,{variant:"h2",weight:"bold",style:d.separator,maxFontSizeMultiplier:1.5,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:s.separator}):null,s.gapAfter?_jsx(View,{style:{width:s.gapAfter}}):null]},s.key)})]});return M&&0!==M.length?_jsxs(View,{children:[C,_jsx(View,{style:d.presets,children:M.map(e=>_jsx(Chip,{label:formatPreset(e,x.hourUnit,x.minuteUnit),size:"sm",selected:e===T,disabled:i,onPress:()=>v(e)},e))})]}):C},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:{paddingHorizontal:e.space.xs},unit:{paddingLeft:e.space.xs},presets:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center",gap:e.space.xs,paddingTop:e.space.sm}});export{WheelPicker};export default WheelPicker;
1
+ "use strict";import{Fragment,useCallback,useMemo}from"react";import{StyleSheet,useWindowDimensions,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Chip}from"../Chip/index.js";import{Text}from"../Text/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;export const DEFAULT_WHEEL_PICKER_LABELS=Object.freeze({hours:"Hours",minutes:"Minutes",hourUnit:"hr",minuteUnit:"min",hourOne:"hour",hourMany:"hours",minuteOne:"minute",minuteMany:"minutes",value:"Value"});const range=(e,t,i=1)=>{const s=[];for(let o=e;o<=t;o+=i)s.push(o);return s},plural=(e,t,i)=>`${e} ${1===e?t:i}`,formatPreset=(e,t,i)=>{const s=Math.floor(e/60),o=e%60;return 0===s?`${o} ${i}`:0===o?`${s} ${t}`:`${s} ${t} ${o} ${i}`},toItem=e=>"object"==typeof e?e:{value:e,label:String(e)},WheelPicker=e=>{const{haptic:t,disabled:i,testID:s,style:o,labels:n}=e;assertValidValue("WheelPicker","mode",e.mode,["columns","list","duration"]);const a=useTheme(),r=useReducedMotion(),{fontScale:l}=useWindowDimensions(),u=Math.min(Math.max(l,1),1.5),m=Math.round(40*u),d=useMemo(()=>buildStyles(a,m),[a,m]),h="list"===e.mode?e.items:void 0,c=useMemo(()=>h?.map(toItem),[h]),p="duration"===e.mode?e.minuteStep??1:1,b="duration"===e.mode?Math.max(0,Math.min(1439,Math.floor(e.maxMinutes??1/0))):0,f=Math.floor(b/60),x=useMemo(()=>({...DEFAULT_WHEEL_PICKER_LABELS,...n}),[n]),M="duration"===e.mode?e.presets:void 0;for(const e of M??[])if(!Number.isInteger(e)||e<0||e>b||e%p!==0)throw new Error(`WheelPicker preset ${e} must be a whole number of minutes from 0 to ${b} in steps of ${p}.`);const y=useCallback(e=>{const t=e===f?b%60:59;return Math.floor(t/p)*p},[f,b,p]),E="duration"===e.mode?e.value:0,_=useMemo(()=>{const e=Number.isFinite(E)?E:0,t=Math.max(0,Math.min(b,e)),i=Math.floor(t/60),s=Math.round(t%60/p)*p;return{hour:i,minute:Math.min(y(i),s)}},[E,b,p,y]),g=useMemo(()=>"duration"===e.mode?range(0,f).map(e=>({value:e,label:String(e),accessibilityLabel:plural(e,x.hourOne,x.hourMany)})):[],[e.mode,f,x]),j=y(_.hour),S=useMemo(()=>"duration"===e.mode?range(0,j,p).map(e=>({value:e,label:String(e).padStart(2,"0"),accessibilityLabel:plural(e,x.minuteOne,x.minuteMany)})):[],[e.mode,j,p,x]),v=useMemo(()=>"list"===e.mode?[{key:"list",label:e.label??x.value,items:c??[],value:e.value??"",width:e.width}]:"duration"===e.mode?[{key:"hours",label:x.hours,items:g,value:_.hour,unit:x.hourUnit,gapAfter:a.space.md},{key:"minutes",label:x.minutes,items:S,value:_.minute,unit:x.minuteUnit}]:e.columns,[e,c,g,S,_,x,a.space.md]),w="list"===e.mode?e.onChange:void 0,I="duration"===e.mode?e.onChange:void 0,L="list"===e.mode||"duration"===e.mode?void 0:e.onChange,T=useCallback((e,t)=>{const i=e.items[t];if(i)if(w)w(i.value);else if(I){const t=Number(i.value);"hours"===e.key?I(60*t+Math.min(_.minute,y(t))):I(60*_.hour+t)}else L?.(e.key,i.value)},[w,I,L,_,y]),C=useCallback(e=>{I?.(e)},[I]),W=60*_.hour+_.minute,k=_jsxs(View,{style:[d.wheels,o],testID:s,children:[_jsxs(View,{pointerEvents:"none",style:d.selectionBand,children:[_jsx(View,{style:d.bandLine}),_jsx(View,{style:d.bandLine})]}),v.map(s=>{if(0===s.items.length)return null;const o=s.items.findIndex(e=>e.value===s.value);return _jsxs(Fragment,{children:[_jsx(Wheel,{label:s.label,items:s.items,selectedIndex:Math.max(0,o),onIndexChange:e=>T(s,e),itemHeight:m,width:s.width??("list"===e.mode?void 0:64),theme:a,haptic:t,disabled:i,reducedMotion:r,typeable:"duration"===e.mode,testID:s.testID}),s.unit?_jsx(Text,{variant:"body",weight:"semibold",color:"secondary",style:d.unit,maxFontSizeMultiplier:1.5,numberOfLines:1,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:s.unit}):null,s.separator?_jsx(Text,{variant:"h2",weight:"bold",style:d.separator,maxFontSizeMultiplier:1.5,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:s.separator}):null,s.gapAfter?_jsx(View,{style:{width:s.gapAfter}}):null]},s.key)})]});return M&&0!==M.length?_jsxs(View,{children:[k,_jsx(View,{style:d.presets,children:M.map(e=>_jsx(Chip,{label:formatPreset(e,x.hourUnit,x.minuteUnit),size:"sm",selected:e===W,disabled:i,onPress:()=>C(e)},e))})]}):k},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:{paddingHorizontal:e.space.xs},unit:{paddingLeft:e.space.xs},presets:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center",gap:e.space.xs,paddingTop:e.space.sm}});export{WheelPicker};export default WheelPicker;
@@ -1 +1 @@
1
- "use strict";import{useCallback,useEffect,useMemo}from"react";import{StyleSheet}from"react-native";import{Gesture,GestureDetector}from"react-native-gesture-handler";import Animated,{runOnJS,useAnimatedStyle,useSharedValue,withSpring}from"react-native-reanimated";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_MAX_SCALE=4,DEFAULT_MIN_SCALE=1,DEFAULT_DOUBLE_TAP_SCALE=2,SPRING_CONFIG={damping:18,stiffness:220,mass:1};export const ZoomableImage=({children:e,maxScale:a=4,minScale:t=1,doubleTapScale:l=2,disabled:r=!1,haptic:u,style:i,accessibilityLabel:n,testID:s})=>{const o=useSharedValue(1),v=useSharedValue(1),c=useSharedValue(0),S=useSharedValue(0),m=useSharedValue(0),d=useSharedValue(0),h=useCallback(()=>{o.value=withSpring(1,SPRING_CONFIG),v.value=1,c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),m.value=0,d.value=0},[o,v,c,S,m,d]);useEffect(()=>{r&&h()},[r,h]);const p=useCallback(()=>{const e=resolveHaptic(u,"impactLight");e&&triggerHaptic(e)},[u]),I=useMemo(()=>Gesture.Pinch().enabled(!r).onStart(()=>{"worklet";v.value=o.value}).onUpdate(e=>{"worklet";const l=v.value*e.scale;o.value=l<t?t+.3*(l-t):l>a?a+.2*(l-a):l}).onEnd(()=>{"worklet";return o.value<t?(o.value=withSpring(t,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),v.value=t,m.value=0,void(d.value=0)):o.value>a?(o.value=withSpring(a,SPRING_CONFIG),void(v.value=a)):void(v.value=o.value)}),[r,o,v,c,S,m,d,t,a]),G=useMemo(()=>Gesture.Pan().enabled(!r).minPointers(1).maxPointers(1).onStart(()=>{"worklet";m.value=c.value,d.value=S.value}).onUpdate(e=>{"worklet";o.value<=1||(c.value=m.value+e.translationX,S.value=d.value+e.translationY)}).onEnd(()=>{"worklet";m.value=c.value,d.value=S.value}),[r,o,c,S,m,d]),g=useMemo(()=>Gesture.Tap().enabled(!r).numberOfTaps(2).onEnd(()=>{"worklet";runOnJS(p)(),o.value>1?(o.value=withSpring(1,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),v.value=1,m.value=0,d.value=0):(o.value=withSpring(l,SPRING_CONFIG),v.value=l)}),[r,o,v,c,S,m,d,p,l]),N=useMemo(()=>Gesture.Race(I,G,g),[I,G,g]),w=useAnimatedStyle(()=>({transform:[{translateX:c.value},{translateY:S.value},{scale:o.value}]}),[c,S,o]);return _jsx(GestureDetector,{gesture:N,children:_jsx(Animated.View,{style:[styles.container,i],testID:s,accessibilityLabel:n,accessibilityState:{disabled:r},"aria-disabled":r,children:_jsx(Animated.View,{style:[styles.content,w],children:e})})})};ZoomableImage.displayName="ZoomableImage";const styles=StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",overflow:"hidden"},content:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}});export default ZoomableImage;
1
+ "use strict";import{useCallback,useEffect,useMemo}from"react";import{StyleSheet}from"react-native";import{GestureDetector,useCompetingGestures,usePanGesture,usePinchGesture,useTapGesture}from"react-native-gesture-handler";import Animated,{runOnJS,useAnimatedStyle,useSharedValue,withSpring}from"react-native-reanimated";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_MAX_SCALE=4,DEFAULT_MIN_SCALE=1,DEFAULT_DOUBLE_TAP_SCALE=2,SPRING_CONFIG={damping:18,stiffness:220,mass:1};export const ZoomableImage=({children:e,maxScale:a=4,minScale:t=1,doubleTapScale:l=2,disabled:u=!1,haptic:i,style:s,accessibilityLabel:r,testID:n})=>{const o=useSharedValue(1),v=useSharedValue(1),c=useSharedValue(0),S=useSharedValue(0),m=useSharedValue(0),d=useSharedValue(0),p=useCallback(()=>{o.value=withSpring(1,SPRING_CONFIG),v.value=1,c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),m.value=0,d.value=0},[o,v,c,S,m,d]);useEffect(()=>{u&&p()},[u,p]);const h=useCallback(()=>{const e=resolveHaptic(i,"impactLight");e&&triggerHaptic(e)},[i]),G=useMemo(()=>({enabled:!u,onActivate:()=>{"worklet";v.value=o.value},onUpdate:e=>{"worklet";const l=v.value*e.scale;o.value=l<t?t+.3*(l-t):l>a?a+.2*(l-a):l},onDeactivate:()=>{"worklet";return o.value<t?(o.value=withSpring(t,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),v.value=t,m.value=0,void(d.value=0)):o.value>a?(o.value=withSpring(a,SPRING_CONFIG),void(v.value=a)):void(v.value=o.value)}}),[u,o,v,c,S,m,d,t,a]),I=usePinchGesture(G),g=useMemo(()=>({enabled:!u,minPointers:1,maxPointers:1,onActivate:()=>{"worklet";m.value=c.value,d.value=S.value},onUpdate:e=>{"worklet";o.value<=1||(c.value=m.value+e.translationX,S.value=d.value+e.translationY)},onDeactivate:()=>{"worklet";m.value=c.value,d.value=S.value}}),[u,o,c,S,m,d]),N=usePanGesture(g),w=useMemo(()=>({enabled:!u,numberOfTaps:2,onDeactivate:()=>{"worklet";runOnJS(h)(),o.value>1?(o.value=withSpring(1,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),v.value=1,m.value=0,d.value=0):(o.value=withSpring(l,SPRING_CONFIG),v.value=l)}}),[u,o,v,c,S,m,d,h,l]),_=useTapGesture(w),C=useCompetingGestures(I,N,_),b=useAnimatedStyle(()=>({transform:[{translateX:c.value},{translateY:S.value},{scale:o.value}]}),[c,S,o]);return _jsx(GestureDetector,{gesture:C,children:_jsx(Animated.View,{style:[styles.container,s],testID:n,accessibilityLabel:r,accessibilityState:{disabled:u},"aria-disabled":u,children:_jsx(Animated.View,{style:[styles.content,b],children:e})})})};ZoomableImage.displayName="ZoomableImage";const styles=StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",overflow:"hidden"},content:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}});export default ZoomableImage;
@@ -1 +1 @@
1
- "use strict";import React from"react";import{FormField}from"../components/FormField/FormField.js";import{useHookFormField}from"./useHookFormField.js";import{jsx as _jsx}from"react/jsx-runtime";const assignRef=(e,r)=>{"function"==typeof e?e(r):e&&(e.current=r)};export const HookFormField=e=>{const{label:r,help:o,helperText:l,helperLines:t,labels:i,required:n,layout:s,labelStyle:a,helperStyle:c,errorStyle:m,containerStyle:p,inputContainerStyle:u,accessibilityLabel:F,testID:d,children:y,hideError:f,...h}=e,b=useHookFormField(h),x="function"==typeof y;let S=null;if(x)S=y(b);else if(React.isValidElement(y)){const e=y.props;S=React.cloneElement(y,{value:b.value,error:b.error,onChangeText:r=>{b.onChangeText(r),e.onChangeText?.(r)},onBlur:r=>{b.onBlur(),e.onBlur?.(r)},ref:r=>{b.ref(r),assignRef(e.ref,r)}})}const j=!x||React.isValidElement(S)&&"error"in S.props;return _jsx(FormField,{label:r,help:o,helperText:l,helperLines:t,labels:i,required:n,layout:s,labelStyle:a,helperStyle:c,errorStyle:m,containerStyle:p,inputContainerStyle:u,accessibilityLabel:F,testID:d,error:f??j?void 0:b.error,children:S})};HookFormField.displayName="HookFormField";
1
+ "use strict";import React from"react";import{FormField}from"../components/FormField/FormField.js";import{useHookFormField}from"./useHookFormField.js";import{jsx as _jsx}from"react/jsx-runtime";const assignRef=(e,r)=>{"function"==typeof e?e(r):e&&(e.current=r)};export const HookFormField=e=>{const{label:r,help:o,helperText:l,helperLines:t,labels:i,required:n,layout:s,labelStyle:a,helperStyle:c,errorStyle:m,containerStyle:p,inputContainerStyle:u,accessibilityLabel:F,testID:d,children:y,hideError:f,...h}=e,b=useHookFormField(h),x="function"==typeof y;let S=null;if(x)S=y(b);else if(React.isValidElement(y)){const e=y.props,r={value:b.value,error:b.error,onChangeText:r=>{b.onChangeText(r),e.onChangeText?.(r)},onBlur:r=>{b.onBlur(),e.onBlur?.(r)},ref:r=>{b.ref(r),assignRef(e.ref,r)}};S=React.cloneElement(y,r)}const j=!x||React.isValidElement(S)&&"error"in S.props;return _jsx(FormField,{label:r,help:o,helperText:l,helperLines:t,labels:i,required:n,layout:s,labelStyle:a,helperStyle:c,errorStyle:m,containerStyle:p,inputContainerStyle:u,accessibilityLabel:F,testID:d,error:f??j?void 0:b.error,children:S})};HookFormField.displayName="HookFormField";
@@ -1 +1 @@
1
- "use strict";const tokenize=t=>{const r=[],o=/[^.[\]]+/g;for(const e of t.matchAll(o)){const t=e[0];r.push(/^\d+$/.test(t)?Number(t):t)}return r};export const getPath=(t,r)=>{const o=tokenize(r);let e=t;for(const t of o){if(null==e||"object"!=typeof e)return;e=e[t]}return e};export const setPath=(t,r,o)=>{const e=tokenize(r),n=e.pop();if(void 0===n)return t;const s=Array.isArray(t)?[...t]:{...t};let c=s,i=e.shift();for(const t of[...e,n]){if(void 0===i)break;const r=c[i],o=null!=r&&"object"==typeof r?Array.isArray(r)?[...r]:{...r}:"number"==typeof t?[]:{};c[i]=o,c=o,i=t}return c[n]=o,s};export const deletePath=(t,r)=>{const o=tokenize(r),e=o.pop();if(void 0===e)return t;const n=Array.isArray(t)?[...t]:{...t};let s=n;for(const t of o){const r=s[t];if(null==r||"object"!=typeof r)return n;const o=Array.isArray(r)?[...r]:{...r};s[t]=o,s=o}return Array.isArray(s)&&"number"==typeof e?s.splice(e,1):delete s[e],n};
1
+ "use strict";const tokenize=t=>{const e=[],o=/[^.[\]]+/g;for(const r of t.matchAll(o)){const t=r[0];e.push(/^\d+$/.test(t)?Number(t):t)}return e},copyOf=t=>Object.assign(Array.isArray(t)?Array.from(t):{},t);export const getPath=(t,e)=>{const o=tokenize(e);let r=t;for(const t of o){if(null==r||"object"!=typeof r)return;r=Reflect.get(r,t)}return r};export const setPath=(t,e,o)=>{const r=tokenize(e),n=r.pop();if(void 0===n)return t;const c={...t};let s=c,f=r.shift();for(const t of[...r,n]){if(void 0===f)break;const e=Reflect.get(s,f),o=null!=e&&"object"==typeof e?copyOf(e):"number"==typeof t?[]:{};Reflect.set(s,f,o),s=o,f=t}return Reflect.set(s,n,o),c};export const deletePath=(t,e)=>{const o=tokenize(e),r=o.pop();if(void 0===r)return t;const n={...t};let c=n;for(const t of o){const e=Reflect.get(c,t);if(null==e||"object"!=typeof e)return n;const o=copyOf(e);Reflect.set(c,t,o),c=o}return Array.isArray(c)&&"number"==typeof r?c.splice(r,1):Reflect.deleteProperty(c,r),n};
@@ -1 +1 @@
1
- "use strict";import{useCallback,useRef,useState}from"react";export function useControllableState({value:e,defaultValue:t,onChange:u}){const a=useRef(void 0!==e).current,[l,r]=useState(t);return[a?e:l,useCallback(e=>{a||r(e),u?.(e)},[a,u])]}
1
+ "use strict";import{useCallback,useRef,useState}from"react";export function useControllableState({value:e,defaultValue:t,onChange:u}){const a=useRef(void 0!==e).current,[l,o]=useState(t);return[a&&void 0!==e?e:l,useCallback(e=>{a||o(e),u?.(e)},[a,u])]}
@@ -1 +1 @@
1
- "use strict";import{useMemo,useRef}from"react";import{Animated,Easing}from"react-native";import{Gesture}from"react-native-gesture-handler";import{createAnimatedValue,setNativeValue,useTheme}from"../theme/index.js";import{nativeDriver}from"../utils/nativeDriver.js";import{usePresenceMotion}from"./usePresenceMotion.js";export const DRAG_DISMISS_DISTANCE=100;export const DRAG_DISMISS_VELOCITY=.5;export const createDragToDismissController=({drag:e,travel:t,onDismiss:r,opacity:a},i,s)=>{const{snappy:n}=i.spring,springBack=()=>Animated.spring(e,{toValue:0,damping:n.damping,stiffness:n.stiffness,mass:n.mass,useNativeDriver:nativeDriver}).start(),o=!0===s?.reduced?a:void 0,u=s?.duration("default")??i.duration.default;return{move:t=>{setNativeValue(e,Math.max(0,t))},release:(a,s)=>{if(a>100||s>.5){if(o)return void Animated.timing(o,{toValue:0,duration:u,easing:Easing.bezier(...i.ease.accelerate),useNativeDriver:nativeDriver}).start(()=>r());Animated.timing(e,{toValue:"function"==typeof t?t():t,duration:i.duration.fast,easing:Easing.bezier(...i.ease.accelerate),useNativeDriver:nativeDriver}).start(()=>r())}else springBack()},cancel:springBack}};export const useDragToDismiss=e=>{const{drag:t,travel:r,onDismiss:a,contentAtTop:i,scrollGesture:s}=e,{motion:n}=useTheme(),o=usePresenceMotion(),u=useRef(createAnimatedValue(1)).current;return useMemo(()=>{const e=createDragToDismissController({drag:t,travel:r,onDismiss:a,opacity:u},n,o),l=Gesture.Pan().runOnJS(!0).activeOffsetY(6).failOffsetX([-12,12]).onUpdate(t=>e.move(t.translationY)).onEnd(t=>e.release(t.translationY,t.velocityY/1e3)).onFinalize((_e,t)=>{t||e.cancel()});let c=0,m=!1;const v=Gesture.Pan().runOnJS(!0).activeOffsetY(8).failOffsetX([-12,12]).onBegin(()=>{c=0,m=!1}).onUpdate(t=>{if(!m){if(i&&!i())return;m=!0,c=t.translationY}e.move(t.translationY-c)}).onEnd(t=>{m&&e.release(t.translationY-c,t.velocityY/1e3)}).onFinalize((_e,t)=>{!t&&m&&e.cancel()});return s&&v.simultaneousWithExternalGesture(s),{handleGesture:l,sheetGesture:v,opacity:u}},[t,r,a,i,s,n,o,u])};
1
+ "use strict";import{useMemo,useRef}from"react";import{Animated,Easing}from"react-native";import{usePanGesture}from"react-native-gesture-handler";import{createAnimatedValue,setNativeValue,useTheme}from"../theme/index.js";import{nativeDriver}from"../utils/nativeDriver.js";import{usePresenceMotion}from"./usePresenceMotion.js";export const DRAG_DISMISS_DISTANCE=100;export const DRAG_DISMISS_VELOCITY=.5;export const createDragToDismissController=({drag:e,travel:t,onDismiss:a,opacity:i},r,s)=>{const{snappy:n}=r.spring,springBack=()=>Animated.spring(e,{toValue:0,damping:n.damping,stiffness:n.stiffness,mass:n.mass,useNativeDriver:nativeDriver}).start(),o=!0===s?.reduced?i:void 0,u=s?.duration("default")??r.duration.default;return{move:t=>{setNativeValue(e,Math.max(0,t))},release:(i,s)=>{if(i>100||s>.5){if(o)return void Animated.timing(o,{toValue:0,duration:u,easing:Easing.bezier(...r.ease.accelerate),useNativeDriver:nativeDriver}).start(()=>a());Animated.timing(e,{toValue:"function"==typeof t?t():t,duration:r.duration.fast,easing:Easing.bezier(...r.ease.accelerate),useNativeDriver:nativeDriver}).start(()=>a())}else springBack()},cancel:springBack}};export const useDragToDismiss=e=>{const{drag:t,travel:a,onDismiss:i,contentAtTop:r,scrollGesture:s}=e,{motion:n}=useTheme(),o=usePresenceMotion(),u=useRef(createAnimatedValue(1)).current,c=useMemo(()=>createDragToDismissController({drag:t,travel:a,onDismiss:i,opacity:u},n,o),[t,a,i,u,n,o]),l=useMemo(()=>({runOnJS:!0,activeOffsetY:6,failOffsetX:[-12,12],onUpdate:e=>c.move(e.translationY),onDeactivate:e=>c.release(e.translationY,e.velocityY/1e3),onFinalize:e=>{e.canceled&&c.cancel()}}),[c]),m=usePanGesture(l),v=useMemo(()=>{let e=0,t=!1;return{runOnJS:!0,activeOffsetY:8,failOffsetX:[-12,12],simultaneousWith:s,onBegin:()=>{e=0,t=!1},onUpdate:a=>{if(!t){if(r&&!r())return;t=!0,e=a.translationY}c.move(a.translationY-e)},onDeactivate:a=>{t&&c.release(a.translationY-e,a.velocityY/1e3)},onFinalize:e=>{e.canceled&&t&&c.cancel()}}},[c,r,s]),f=usePanGesture(v);return useMemo(()=>({handleGesture:m,sheetGesture:f,opacity:u}),[m,f,u])};
@@ -1 +1 @@
1
- "use strict";import{BottomTabBarHeightContext}from"@react-navigation/bottom-tabs";import{useNavigation}from"@react-navigation/native";import{useContext}from"react";import{Screen}from"../components/Screen/index.js";import{useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";const TAB_EDGES=["top"];export function NavigationScreen({kind:t="pushed",appBar:e=!0,onBack:o,...i}){const n=useNavigation(),r=useContext(BottomTabBarHeightContext),a=!0===useTheme().settings.components.screen?.tabBarFloats,s=e?i:{...i,title:void 0,subtitle:void 0,leading:void 0,trailing:void 0,rightActions:void 0};return _jsx(Screen,"tab"===t?{...s,largeTitle:!1,edges:TAB_EDGES,bottomInset:a?r??0:0}:{...s,largeTitle:!1,onBack:"root"!==t&&e?o??n.goBack:void 0})}
1
+ "use strict";import{useNavigation}from"@react-navigation/native";import{createContext,useContext}from"react";import{Screen}from"../components/Screen/index.js";import{useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";const TabBarHeightContext=(()=>{try{return require("@react-navigation/bottom-tabs").BottomTabBarHeightContext}catch{return createContext(void 0)}})(),TAB_EDGES=["top"];export function NavigationScreen({kind:t="pushed",appBar:e=!0,onBack:o,...i}){const r=useNavigation(),n=useContext(TabBarHeightContext),a=!0===useTheme().settings.components.screen?.tabBarFloats,s=e?i:{...i,title:void 0,subtitle:void 0,leading:void 0,trailing:void 0,rightActions:void 0};return _jsx(Screen,"tab"===t?{...s,largeTitle:!1,edges:TAB_EDGES,bottomInset:a?n??0:0}:{...s,largeTitle:!1,onBack:"root"!==t&&e?o??r.goBack:void 0})}
@@ -1 +1 @@
1
- "use strict";import{TurboModuleRegistry}from"react-native";export default TurboModuleRegistry.get("PdfRasterizer");
1
+ "use strict";import{TurboModuleRegistry}from"react-native";export default TurboModuleRegistry.get("PdfRasterizer")??null;
@@ -1 +1 @@
1
- "use strict";import{Storage}from"@webority/mobile-core";import{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Appearance}from"react-native";import{useReducedMotion}from"../hooks/useReducedMotion.js";import{mergeBrand}from"./merge.js";import{darkTheme,lightTheme}from"./tokens.js";import{jsx as _jsx}from"react/jsx-runtime";const REDUCED_SPRING={damping:100,stiffness:1e3,mass:1},collapseMotion=e=>({...e,duration:{instant:0,fast:0,default:0,slow:0,slower:0},spring:{gentle:REDUCED_SPRING,bouncy:REDUCED_SPRING,snappy:REDUCED_SPRING}}),isPreference=e=>"light"===e||"dark"===e||"system"===e,defaultValue={theme:lightTheme,mode:"light",preference:"system",setPreference:()=>{},toggleColorMode:()=>{}},ThemeContext=createContext(defaultValue);export const ThemeProvider=e=>{const{children:t,initialPreference:r="system",persistKey:o,brand:n,settings:s,...i}=e;if(Object.keys(i).length>0)throw new Error("ThemeProvider takes only these props: children, initialPreference, persistKey, brand, settings (mobile-ui 0.89.0). Run webority upgrade 0.89.0 to move an app.");const[m,a]=useState(r),c=useRef(!1);useEffect(()=>{if(!o)return;let e=!0;return Storage.getItem(o).then(t=>{e&&!c.current&&isPreference(t)&&a(t)}),()=>{e=!1}},[o]);const d=useCallback(e=>{c.current=!0,a(e)},[]);useEffect(()=>{o&&c.current&&Storage.setItem(o,m)},[o,m]);const[l,u]=useState(()=>Appearance.getColorScheme()??"light");useEffect(()=>{const e=Appearance.addChangeListener(({colorScheme:e})=>{u(e??"light")});return()=>e.remove()},[]);const h="system"===m?l:m,g=useReducedMotion(),f=useMemo(()=>{const e="dark"===h?darkTheme:lightTheme,t=n||s?mergeBrand(e,n,s):e;return g?{...t,motion:collapseMotion(t.motion)}:t},[h,n,s,g]),p=useMemo(()=>({theme:f,mode:h,preference:m,setPreference:d,toggleColorMode:()=>d(e=>"system"===e?"dark"===l?"light":"dark":"dark"===e?"light":"dark")}),[f,h,m,l,d]);return _jsx(ThemeContext.Provider,{value:p,children:t})};export const KitThemeBridge=({mode:e,brand:t,children:r})=>{const o=useReducedMotion();if("light"!==e&&"dark"!==e)throw new Error('KitThemeBridge takes mode "light" or "dark".');const n=useMemo(()=>{const r="dark"===e?darkTheme:lightTheme,n=t?mergeBrand(r,t,void 0):r;return o?{...n,motion:collapseMotion(n.motion)}:n},[e,t,o]),s=useMemo(()=>({theme:n,mode:e,preference:e,setPreference:()=>{},toggleColorMode:()=>{}}),[n,e]);return _jsx(ThemeContext.Provider,{value:s,children:r})};export const useTheme=()=>useContext(ThemeContext).theme;export const useThemeMode=()=>{const e=useContext(ThemeContext);return{mode:e.mode,preference:e.preference,setPreference:e.setPreference,toggleColorMode:e.toggleColorMode}};
1
+ "use strict";import{Storage}from"@webority/mobile-core";import{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Appearance}from"react-native";import{useReducedMotion}from"../hooks/useReducedMotion.js";import{isOneOf}from"../utils/guards.js";import{mergeBrand}from"./merge.js";import{darkTheme,lightTheme}from"./tokens.js";import{jsx as _jsx}from"react/jsx-runtime";const REDUCED_SPRING={damping:100,stiffness:1e3,mass:1},collapseMotion=e=>({...e,duration:{instant:0,fast:0,default:0,slow:0,slower:0},spring:{gentle:REDUCED_SPRING,bouncy:REDUCED_SPRING,snappy:REDUCED_SPRING}}),isPreference=e=>"light"===e||"dark"===e||"system"===e,COLOR_MODES=["light","dark"],colorModeOf=e=>isOneOf(COLOR_MODES,e)?e:"light",defaultValue={theme:lightTheme,mode:"light",preference:"system",setPreference:()=>{},toggleColorMode:()=>{}},ThemeContext=createContext(defaultValue);export const ThemeProvider=e=>{const{children:t,initialPreference:r="system",persistKey:o,brand:s,settings:n,...i}=e;if(Object.keys(i).length>0)throw new Error("ThemeProvider takes only these props: children, initialPreference, persistKey, brand, settings (mobile-ui 0.89.0). Run webority upgrade 0.89.0 to move an app.");const[m,c]=useState(r),a=useRef(!1);useEffect(()=>{if(!o)return;let e=!0;return Storage.getItem(o).then(t=>{e&&!a.current&&isPreference(t)&&c(t)}),()=>{e=!1}},[o]);const d=useCallback(e=>{a.current=!0,c(e)},[]);useEffect(()=>{o&&a.current&&Storage.setItem(o,m)},[o,m]);const[l,u]=useState(()=>colorModeOf(Appearance.getColorScheme()));useEffect(()=>{const e=Appearance.addChangeListener(({colorScheme:e})=>{u(colorModeOf(e))});return()=>e.remove()},[]);const h="system"===m?l:m,f=useReducedMotion(),g=useMemo(()=>{const e="dark"===h?darkTheme:lightTheme,t=s||n?mergeBrand(e,s,n):e;return f?{...t,motion:collapseMotion(t.motion)}:t},[h,s,n,f]),p=useMemo(()=>({theme:g,mode:h,preference:m,setPreference:d,toggleColorMode:()=>d(e=>"system"===e?"dark"===l?"light":"dark":"dark"===e?"light":"dark")}),[g,h,m,l,d]);return _jsx(ThemeContext.Provider,{value:p,children:t})};export const KitThemeBridge=({mode:e,brand:t,children:r})=>{const o=useReducedMotion();if("light"!==e&&"dark"!==e)throw new Error('KitThemeBridge takes mode "light" or "dark".');const s=useMemo(()=>{const r="dark"===e?darkTheme:lightTheme,s=t?mergeBrand(r,t,void 0):r;return o?{...s,motion:collapseMotion(s.motion)}:s},[e,t,o]),n=useMemo(()=>({theme:s,mode:e,preference:e,setPreference:()=>{},toggleColorMode:()=>{}}),[s,e]);return _jsx(ThemeContext.Provider,{value:n,children:r})};export const useTheme=()=>useContext(ThemeContext).theme;export const useThemeMode=()=>{const e=useContext(ThemeContext);return{mode:e.mode,preference:e.preference,setPreference:e.setPreference,toggleColorMode:e.toggleColorMode}};
@@ -1 +1 @@
1
- "use strict";import{Animated,Platform}from"react-native";import{nativeDriver}from"../utils/nativeDriver.js";export const createAnimatedValue=(t,e)=>{const r=new Animated.Value(t,e);return"web"===Platform.OS?r:(r._tracking=null,Object.seal(r))};export const setNativeValue=(t,e)=>{Animated.timing(t,{toValue:e,duration:0,useNativeDriver:nativeDriver}).start()};
1
+ "use strict";import{Animated,Platform}from"react-native";import{nativeDriver}from"../utils/nativeDriver.js";export const createAnimatedValue=(t,e)=>{const r=new Animated.Value(t,e);return"web"===Platform.OS?r:(Object.assign(r,{_tracking:null}),Object.seal(r))};export const setNativeValue=(t,e)=>{Animated.timing(t,{toValue:e,duration:0,useNativeDriver:nativeDriver}).start()};
@@ -1 +1 @@
1
- "use strict";import{scaleStep}from"./scale.js";import{COMPONENT_KINDS}from"./tokens.generated.js";const SIZE_KEYS=["xs","sm","md","lg","xl"],kindOf=(e,o,t)=>{const s=COMPONENT_KINDS[e][o];if(!s)throw new Error(`components.${e}${t?`.${t}`:""}.${o} has no kind in COMPONENT_KINDS.`);return s},pixelsOf=(e,o,t,s)=>{if("space"===o||"text"===o||"radius"===o)return scaleStep(e,o,String(t),s);if("number"!=typeof t)throw new Error(`${s} is ${JSON.stringify(t)}; it takes a number.`);return t},resolveSize=(e,o,t)=>{const s=e.components[o][t];if(void 0===s)throw new Error(`components.${o} has no "${t}" size in the theme.`);const r={};for(const i of Object.keys(s))r[i]=pixelsOf(e,kindOf(o,i,t),s[i],`components.${o}.${t}.${i}`);return r};export const resolveButtonSize=(e,o)=>resolveSize(e,"button",o);export const resolveFieldSize=(e,o)=>resolveSize(e,"field",o);export const resolveEmptyStateSize=(e,o)=>resolveSize(e,"empty-state",o);export const resolveListItemSize=(e,o)=>resolveSize(e,"list-item",o);export const resolveBadgeSize=(e,o)=>resolveSize(e,"badge",o);export const resolveChipSize=(e,o)=>resolveSize(e,"chip",o);export const resolveCheckboxSize=(e,o)=>resolveSize(e,"checkbox",o);export const resolveRadioSize=(e,o)=>resolveSize(e,"radio",o);export const resolveSwitchSize=(e,o)=>resolveSize(e,"switch",o);export const resolveOtpInputSize=(e,o)=>resolveSize(e,"otp-input",o);export const resolveSegmentedControlSize=(e,o)=>resolveSize(e,"segmented-control",o);export const resolveTabsSize=(e,o)=>resolveSize(e,"tabs",o);export const resolveSliderSize=(e,o)=>resolveSize(e,"slider",o);export const resolveFloatingActionButtonSize=(e,o)=>resolveSize(e,"floating-action-button",o);export const validateComponentTokens=e=>{for(const o of Object.keys(COMPONENT_KINDS)){const t=e.components[o];for(const s of Object.keys(t))SIZE_KEYS.includes(s)?resolveSize(e,o,s):pixelsOf(e,kindOf(o,s),t[s],`components.${o}.${s}`)}};
1
+ "use strict";import{isOneOf,isRecord,keysOf}from"../utils/guards.js";import{scaleStep}from"./scale.js";import{COMPONENT_KINDS}from"./tokens.generated.js";const SIZE_KEYS=["xs","sm","md","lg","xl"],kindOf=(e,t,i)=>{const o=COMPONENT_KINDS[e][t];if(!o)throw new Error(`components.${e}${i?`.${i}`:""}.${t} has no kind in COMPONENT_KINDS.`);return o},pixelsOf=(e,t,i,o)=>{if("space"===t||"text"===t||"radius"===t)return scaleStep(e,t,String(i),o);if("number"!=typeof i)throw new Error(`${o} is ${JSON.stringify(i)}; it takes a number.`);return i},resolveSize=(e,t,i)=>{const o=e.components[t];if(!isRecord(o))throw new Error(`components.${t} is missing in the theme.`);const n=o[i];if(!isRecord(n))throw new Error(`components.${t} has no "${i}" size in the theme.`);const s={};for(const o of Object.keys(n))s[o]=pixelsOf(e,kindOf(t,o,i),n[o],`components.${t}.${i}.${o}`);return s},sizeToken=(e,t,i,o)=>{const n=e[o];if(void 0===n)throw new Error(`components.${t}.${i}.${o} is missing`);return n};export const resolveButtonSize=(e,t)=>{const i=resolveSize(e,"button",t);return{"padding-x":sizeToken(i,"button",t,"padding-x"),"padding-y":sizeToken(i,"button",t,"padding-y"),"min-height":sizeToken(i,"button",t,"min-height"),text:sizeToken(i,"button",t,"text"),radius:sizeToken(i,"button",t,"radius"),icon:sizeToken(i,"button",t,"icon"),"badge-icon":sizeToken(i,"button",t,"badge-icon")}};export const resolveFieldSize=(e,t)=>{const i=resolveSize(e,"field",t);return{radius:sizeToken(i,"field",t,"radius"),"padding-x":sizeToken(i,"field",t,"padding-x"),"padding-y":sizeToken(i,"field",t,"padding-y"),"min-height":sizeToken(i,"field",t,"min-height"),text:sizeToken(i,"field",t,"text"),icon:sizeToken(i,"field",t,"icon"),"label-text":sizeToken(i,"field",t,"label-text"),"label-gap":sizeToken(i,"field",t,"label-gap"),"message-text":sizeToken(i,"field",t,"message-text"),"message-gap":sizeToken(i,"field",t,"message-gap")}};export const resolveEmptyStateSize=(e,t)=>{const i=resolveSize(e,"empty-state",t);return{icon:sizeToken(i,"empty-state",t,"icon"),"illustration-size":sizeToken(i,"empty-state",t,"illustration-size"),"title-text":sizeToken(i,"empty-state",t,"title-text"),"description-text":sizeToken(i,"empty-state",t,"description-text"),"padding-y":sizeToken(i,"empty-state",t,"padding-y"),"title-gap":sizeToken(i,"empty-state",t,"title-gap"),"description-gap":sizeToken(i,"empty-state",t,"description-gap")}};export const resolveListItemSize=(e,t)=>{const i=resolveSize(e,"list-item",t);return{"padding-y":sizeToken(i,"list-item",t,"padding-y"),"title-text":sizeToken(i,"list-item",t,"title-text"),"subtitle-text":sizeToken(i,"list-item",t,"subtitle-text"),"min-height":sizeToken(i,"list-item",t,"min-height")}};export const resolveBadgeSize=(e,t)=>{const i=resolveSize(e,"badge",t);return{text:sizeToken(i,"badge",t,"text"),"min-width":sizeToken(i,"badge",t,"min-width"),height:sizeToken(i,"badge",t,"height"),"padding-x":sizeToken(i,"badge",t,"padding-x"),"dot-size":sizeToken(i,"badge",t,"dot-size")}};export const resolveChipSize=(e,t)=>{const i=resolveSize(e,"chip",t);return{"padding-x":sizeToken(i,"chip",t,"padding-x"),"padding-y":sizeToken(i,"chip",t,"padding-y"),text:sizeToken(i,"chip",t,"text"),"min-height":sizeToken(i,"chip",t,"min-height"),"close-size":sizeToken(i,"chip",t,"close-size"),"close-text":sizeToken(i,"chip",t,"close-text"),gap:sizeToken(i,"chip",t,"gap"),icon:sizeToken(i,"chip",t,"icon")}};export const resolveCheckboxSize=(e,t)=>{const i=resolveSize(e,"checkbox",t);return{"box-size":sizeToken(i,"checkbox",t,"box-size")}};export const resolveRadioSize=(e,t)=>{const i=resolveSize(e,"radio",t);return{outer:sizeToken(i,"radio",t,"outer"),inner:sizeToken(i,"radio",t,"inner")}};export const resolveSwitchSize=(e,t)=>{const i=resolveSize(e,"switch",t);return{"track-width":sizeToken(i,"switch",t,"track-width"),"track-height":sizeToken(i,"switch",t,"track-height"),"thumb-size":sizeToken(i,"switch",t,"thumb-size"),padding:sizeToken(i,"switch",t,"padding")}};export const resolveOtpInputSize=(e,t)=>{const i=resolveSize(e,"otp-input",t);return{cell:sizeToken(i,"otp-input",t,"cell"),text:sizeToken(i,"otp-input",t,"text"),radius:sizeToken(i,"otp-input",t,"radius"),gap:sizeToken(i,"otp-input",t,"gap")}};export const resolveSegmentedControlSize=(e,t)=>{const i=resolveSize(e,"segmented-control",t);return{height:sizeToken(i,"segmented-control",t,"height"),text:sizeToken(i,"segmented-control",t,"text"),"padding-x":sizeToken(i,"segmented-control",t,"padding-x"),icon:sizeToken(i,"segmented-control",t,"icon")}};export const resolveTabsSize=(e,t)=>{const i=resolveSize(e,"tabs",t);return{text:sizeToken(i,"tabs",t,"text"),"padding-y":sizeToken(i,"tabs",t,"padding-y"),"padding-x":sizeToken(i,"tabs",t,"padding-x"),"scrollable-padding-x":sizeToken(i,"tabs",t,"scrollable-padding-x"),icon:sizeToken(i,"tabs",t,"icon")}};export const resolveSliderSize=(e,t)=>{const i=resolveSize(e,"slider",t);return{"track-height":sizeToken(i,"slider",t,"track-height"),"thumb-diameter":sizeToken(i,"slider",t,"thumb-diameter")}};export const resolveFloatingActionButtonSize=(e,t)=>{const i=resolveSize(e,"floating-action-button",t);return{diameter:sizeToken(i,"floating-action-button",t,"diameter"),icon:sizeToken(i,"floating-action-button",t,"icon"),text:sizeToken(i,"floating-action-button",t,"text"),"label-padding-x":sizeToken(i,"floating-action-button",t,"label-padding-x")}};export const validateComponentTokens=e=>{for(const t of keysOf(COMPONENT_KINDS))for(const[i,o]of Object.entries(e.components[t]))isOneOf(SIZE_KEYS,i)?resolveSize(e,t,i):pixelsOf(e,kindOf(t,i),o,`components.${t}.${i}`)};
@@ -1 +1 @@
1
- "use strict";import{validateComponentTokens}from"./componentSizes.js";import{COLOR_NAMES,FONT_NAMES,RADIUS_NAMES,WEIGHT_NAMES}from"./tokens.generated.js";import{deriveSolidFill,deriveStateFills,deriveToneInk}from"./toneInk.js";const HINT="Run webority upgrade to rename old names.",BRAND_KEYS=["colors","radius","font"],COLOR_MODES=["light","dark"],FIXED_RADII=["none","pill"],RADIUS_ALLOWED="sm, md, lg, xl",SETTINGS_KEYS=["icons","gradients","textVariants","maxFontSizeMultiplier","components"],COMPONENT_SETTING_KEYS={field:{defaultVariant:!0,requiredMarker:!0},input:{defaultVariant:!0,defaultLabelMode:!0,tintLabelOnFocus:!0,shakeOnError:!0},"search-bar":{defaultVariant:!0},select:{defaultVariant:!0},"otp-input":{shakeOnError:!0},"option-sheet":{selectedMarker:!0},"profile-picker":{defaultTone:!0,defaultVariant:!0,defaultAvatarTone:!0},slider:{thumbPressAnimation:!0},rating:{pulseOnPress:!0},stepper:{pulseAnimation:!0},tooltip:{enableScaleAnimation:!0},toast:{enableSwipeDismiss:!0,defaultDurationMs:!0},button:{defaultVariant:!0,defaultSize:!0,defaultPressAnimation:!0},card:{defaultVariant:!0,defaultPadding:!0,defaultRadius:!0,defaultTitleFont:!0},"section-header":{defaultVariant:!0,defaultFlush:!0},"empty-state":{defaultSize:!0,defaultVariant:!0},screen:{tabBarFloats:!0,headerShadowOnScroll:!0}},isPlainObject=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),validateBrand=e=>{if(void 0===e)return;if(!isPlainObject(e))throw new Error(`A brand is an object of colors, radius and font; got ${typeof e}. ${HINT}`);for(const o of Object.keys(e))if(!BRAND_KEYS.includes(o))throw new Error(`A brand sets colors, radius and font only; ${o} is not allowed (allowed: colors, radius, font). ${HINT}`);const o=e.colors;if(void 0!==o&&!isPlainObject(o))throw new Error(`A brand's colors is an object of light and dark; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o??{})){if(!COLOR_MODES.includes(e))throw new Error(`A brand sets colours under light and dark only; ${e} is not allowed (allowed: light, dark). ${HINT}`);const t=o[e];if(void 0===t)throw new Error(`A brand's ${e} colours are missing. ${HINT}`);for(const e of Object.keys(t)){if(!COLOR_NAMES.includes(e))throw new Error(`unknown colour ${e}; allowed: ${COLOR_NAMES.join(", ")}. ${HINT}`);if(void 0!==t[e]&&"string"!=typeof t[e])throw new Error(`colour ${e} must be a string; got ${typeof t[e]}.`)}}const t=e.radius;if(void 0!==t&&!isPlainObject(t))throw new Error(`A brand's radius is an object of radius names; got ${typeof t}. ${HINT}`);for(const e of Object.keys(t??{})){const o=t[e];if(!RADIUS_NAMES.includes(e))throw new Error(`unknown radius ${e}; allowed: ${RADIUS_ALLOWED}. ${HINT}`);if(FIXED_RADII.includes(e))throw new Error(`radius ${e} is fixed by the library; allowed: ${RADIUS_ALLOWED}.`);if("number"!=typeof o||!Number.isFinite(o))throw new Error(`radius ${e} must be a number; got ${typeof o}.`)}const n=e.font;if(void 0!==n&&!isPlainObject(n))throw new Error(`A brand's font is an object of font names; got ${typeof n}. ${HINT}`);for(const e of Object.keys(n??{})){if(!FONT_NAMES.includes(e))throw new Error(`unknown font ${e}; allowed: ${FONT_NAMES.join(", ")}. ${HINT}`);const o=n[e];if(!isPlainObject(o))throw new Error(`font ${e} must be an object of weights; got ${typeof o}. ${HINT}`);for(const t of Object.keys(o)){if(!WEIGHT_NAMES.includes(t))throw new Error(`unknown font weight ${t} in font ${e}; allowed: ${WEIGHT_NAMES.join(", ")}. ${HINT}`);const n=o[t];if("string"!=typeof n||0===n.length)throw new Error(`font ${e} weight ${t} must be a non-empty string.`)}}},validateSettings=e=>{if(void 0===e)return;if(!isPlainObject(e))throw new Error(`Theme settings is an object; got ${typeof e}. ${HINT}`);for(const o of Object.keys(e))if(!SETTINGS_KEYS.includes(o))throw new Error(`Theme settings take ${SETTINGS_KEYS.join(", ")} only; ${o} is not allowed. ${HINT}`);const o=e.components;if(void 0===o)return;if(!isPlainObject(o))throw new Error(`Theme settings components is an object of component names; got ${typeof o}. ${HINT}`);const t=COMPONENT_SETTING_KEYS;for(const e of Object.keys(o)){if(!Object.keys(t).includes(e))throw new Error(`unknown component ${e} in theme settings; allowed: ${Object.keys(COMPONENT_SETTING_KEYS).join(", ")}. ${HINT}`);const n=o[e];if(void 0===n)continue;if(!isPlainObject(n))throw new Error(`theme settings for ${e} is an object; got ${typeof n}. ${HINT}`);const r=t[e];if(void 0===r)throw new Error(`theme settings for ${e} have no allowed keys table. ${HINT}`);for(const o of Object.keys(n))if(!(o in r))throw new Error(`unknown setting ${o} for ${e}; allowed: ${Object.keys(r).join(", ")}. ${HINT}`)}},TONES=["primary","success","warning","danger","info"];export const mergeBrand=(e,o,t)=>{validateBrand(o),validateSettings(t);const n=Object.fromEntries(Object.entries(o?.colors?.[e.mode]??{}).filter(([,e])=>void 0!==e)),r={...e.colors,...n},colorOf=e=>{const o=r[e];if(void 0===o)throw new Error(`The theme has no colour ${e}.`);return o},i={...e.radius,...o?.radius},s={...e.font};for(const t of Object.keys(o?.font??{}))s[t]={...e.font[t],...o?.font?.[t]};const a=[colorOf("bg"),colorOf("bg-subtle"),colorOf("bg-muted")],l={};for(const o of TONES){const t="string"==typeof n[o];let r=colorOf(o);if(t||"string"==typeof n[`on-${o}`]){const e=deriveSolidFill(r,colorOf(`on-${o}`));e!==r&&(l[o]=e,r=e)}if(t&&"string"!=typeof n[`${o}-text`]&&(l[`${o}-text`]=deriveToneInk(r,a,e.mode)),"primary"===o&&(t||void 0!==l.primary)){const o=deriveStateFills(r,colorOf("on-primary"),{fill:e.colors.primary,hover:e.colors["primary-hover"],pressed:e.colors["primary-pressed"]});"string"!=typeof n["primary-hover"]&&(l["primary-hover"]=o.hover),"string"!=typeof n["primary-pressed"]&&(l["primary-pressed"]=o.pressed)}}const d={},f=new Set([...Object.keys(e.settings.components),...Object.keys(t?.components??{})]);for(const o of f)d[o]={...e.settings.components[o],...t?.components?.[o]};const c=t?.maxFontSizeMultiplier??e.settings.maxFontSizeMultiplier,u={icons:{...e.settings.icons,...t?.icons},gradients:{...e.settings.gradients,...t?.gradients},textVariants:{...e.settings.textVariants,...t?.textVariants},components:d,...void 0===c?{}:{maxFontSizeMultiplier:c}},w={...e,colors:{...r,...l},radius:i,font:s,settings:u};return validateComponentTokens(w),w};
1
+ "use strict";import{hasKey,isOneOf,isRecord,keysOf}from"../utils/guards.js";import{validateComponentTokens}from"./componentSizes.js";import{COLOR_NAMES,FONT_NAMES,RADIUS_NAMES,WEIGHT_NAMES}from"./tokens.generated.js";import{deriveSolidFill,deriveStateFills,deriveToneInk}from"./toneInk.js";const HINT="Run webority upgrade to rename old names.",BRAND_KEYS=["colors","radius","font"],COLOR_MODES=["light","dark"],FIXED_RADII=["none","pill"],RADIUS_ALLOWED="sm, md, lg, xl",SETTINGS_KEYS=["icons","gradients","textVariants","maxFontSizeMultiplier","components"],COMPONENT_SETTING_KEYS={field:{defaultVariant:!0,requiredMarker:!0},input:{defaultVariant:!0,defaultLabelMode:!0,tintLabelOnFocus:!0,shakeOnError:!0},"search-bar":{defaultVariant:!0},select:{defaultVariant:!0},"otp-input":{shakeOnError:!0},"option-sheet":{selectedMarker:!0},"profile-picker":{defaultTone:!0,defaultVariant:!0,defaultAvatarTone:!0},slider:{thumbPressAnimation:!0},rating:{pulseOnPress:!0},stepper:{pulseAnimation:!0},tooltip:{enableScaleAnimation:!0},toast:{enableSwipeDismiss:!0,defaultDurationMs:!0},button:{defaultVariant:!0,defaultSize:!0,defaultPressAnimation:!0},card:{defaultVariant:!0,defaultPadding:!0,defaultRadius:!0,defaultTitleFont:!0},"section-header":{defaultVariant:!0,defaultFlush:!0},"empty-state":{defaultSize:!0,defaultVariant:!0},screen:{tabBarFloats:!0,headerShadowOnScroll:!0}},isPlainObject=o=>"object"==typeof o&&null!==o&&!Array.isArray(o),validateBrand=o=>{if(void 0===o)return;if(!isPlainObject(o))throw new Error(`A brand is an object of colors, radius and font; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o))if(!BRAND_KEYS.includes(e))throw new Error(`A brand sets colors, radius and font only; ${e} is not allowed (allowed: colors, radius, font). ${HINT}`);const e=o.colors;if(void 0!==e&&!isPlainObject(e))throw new Error(`A brand's colors is an object of light and dark; got ${typeof e}. ${HINT}`);if(isRecord(e))for(const o of Object.keys(e)){if(!COLOR_MODES.includes(o))throw new Error(`A brand sets colours under light and dark only; ${o} is not allowed (allowed: light, dark). ${HINT}`);const t=e[o];if(void 0===t)throw new Error(`A brand's ${o} colours are missing. ${HINT}`);if(!isRecord(t))throw new Error(`A brand's ${o} colours is an object of colour names; got ${typeof t}. ${HINT}`);for(const o of Object.keys(t)){if(!isOneOf(COLOR_NAMES,o))throw new Error(`unknown colour ${o}; allowed: ${COLOR_NAMES.join(", ")}. ${HINT}`);if(void 0!==t[o]&&"string"!=typeof t[o])throw new Error(`colour ${o} must be a string; got ${typeof t[o]}.`)}}const t=o.radius;if(void 0!==t){if(!isPlainObject(t))throw new Error(`A brand's radius is an object of radius names; got ${typeof t}. ${HINT}`);for(const o of Object.keys(t)){const e=t[o];if(!isOneOf(RADIUS_NAMES,o))throw new Error(`unknown radius ${o}; allowed: ${RADIUS_ALLOWED}. ${HINT}`);if(FIXED_RADII.includes(o))throw new Error(`radius ${o} is fixed by the library; allowed: ${RADIUS_ALLOWED}.`);if("number"!=typeof e||!Number.isFinite(e))throw new Error(`radius ${o} must be a number; got ${typeof e}.`)}}const n=o.font;if(void 0!==n){if(!isPlainObject(n))throw new Error(`A brand's font is an object of font names; got ${typeof n}. ${HINT}`);for(const o of Object.keys(n)){if(!isOneOf(FONT_NAMES,o))throw new Error(`unknown font ${o}; allowed: ${FONT_NAMES.join(", ")}. ${HINT}`);const e=n[o];if(!isPlainObject(e))throw new Error(`font ${o} must be an object of weights; got ${typeof e}. ${HINT}`);for(const t of Object.keys(e)){if(!isOneOf(WEIGHT_NAMES,t))throw new Error(`unknown font weight ${t} in font ${o}; allowed: ${WEIGHT_NAMES.join(", ")}. ${HINT}`);const n=e[t];if("string"!=typeof n||0===n.length)throw new Error(`font ${o} weight ${t} must be a non-empty string.`)}}}},validateSettings=o=>{if(void 0===o)return;if(!isPlainObject(o))throw new Error(`Theme settings is an object; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o))if(!isOneOf(SETTINGS_KEYS,e))throw new Error(`Theme settings take ${SETTINGS_KEYS.join(", ")} only; ${e} is not allowed. ${HINT}`);const e=o.components;if(void 0!==e){if(!isPlainObject(e))throw new Error(`Theme settings components is an object of component names; got ${typeof e}. ${HINT}`);for(const o of Object.keys(e)){if(!hasKey(COMPONENT_SETTING_KEYS,o))throw new Error(`unknown component ${o} in theme settings; allowed: ${Object.keys(COMPONENT_SETTING_KEYS).join(", ")}. ${HINT}`);const t=e[o];if(void 0===t)continue;if(!isPlainObject(t))throw new Error(`theme settings for ${o} is an object; got ${typeof t}. ${HINT}`);const n=COMPONENT_SETTING_KEYS[o];for(const e of Object.keys(t))if(!(e in n))throw new Error(`unknown setting ${e} for ${o}; allowed: ${Object.keys(n).join(", ")}. ${HINT}`)}}},TONES=["primary","success","warning","danger","info"],setComponentSettings=(o,e,t)=>{o[e]=t},mergeComponentSettings=(o,e,t)=>({...hasKey(o,t)?o[t]:void 0,...void 0!==e&&hasKey(e,t)?e[t]:void 0});export const mergeBrand=(o,e,t)=>{validateBrand(e),validateSettings(t);const n={};for(const[t,r]of Object.entries(e?.colors?.[o.mode]??{}))void 0!==r&&(n[t]=r);const r={...o.colors,...n},colorOf=o=>{const e=r[o];if(void 0===e)throw new Error(`The theme has no colour ${o}.`);return e},i={...o.radius,...e?.radius},s={...o.font};if(void 0!==e?.font)for(const t of keysOf(e.font))s[t]={...o.font[t],...e.font[t]};const a=[colorOf("bg"),colorOf("bg-subtle"),colorOf("bg-muted")],f={};for(const e of TONES){const t="string"==typeof n[e];let r=colorOf(e);if(t||"string"==typeof n[`on-${e}`]){const o=deriveSolidFill(r,colorOf(`on-${e}`));o!==r&&(f[e]=o,r=o)}if(t&&"string"!=typeof n[`${e}-text`]&&(f[`${e}-text`]=deriveToneInk(r,a,o.mode)),"primary"===e&&(t||void 0!==f.primary)){const e=deriveStateFills(r,colorOf("on-primary"),{fill:o.colors.primary,hover:o.colors["primary-hover"],pressed:o.colors["primary-pressed"]});"string"!=typeof n["primary-hover"]&&(f["primary-hover"]=e.hover),"string"!=typeof n["primary-pressed"]&&(f["primary-pressed"]=e.pressed)}}const l=o.settings.components,d=t?.components,c={},u=new Set([...keysOf(l),...void 0===d?[]:keysOf(d)]);for(const o of u)setComponentSettings(c,o,mergeComponentSettings(l,d,o));const p=t?.maxFontSizeMultiplier??o.settings.maxFontSizeMultiplier,m={icons:{...o.settings.icons,...t?.icons},gradients:{...o.settings.gradients,...t?.gradients},textVariants:{...o.settings.textVariants,...t?.textVariants},components:c,...void 0===p?{}:{maxFontSizeMultiplier:p}},w={...o.colors};for(const o of COLOR_NAMES)w[o]=f[o]??r[o];const O={...o,colors:w,radius:i,font:s,settings:m};return validateComponentTokens(O),O};
@@ -1 +1 @@
1
- "use strict";export const scaleStep=(e,t,s,r)=>{const c="space"===t?e.space:"radius"===t?e.radius:e.text,o=c[s],a="text"===t?o?.size:o;if("number"!=typeof a){const e=Object.keys(c).join(", ");throw new Error(`${r?`${r} is `:""}${JSON.stringify(s)}, which is not a ${"text"===t?"text size":"radius"===t?"corner":"space"} name. Use one of: ${e}.`)}return a};export const spaceOf=(e,t)=>scaleStep(e,"space",t);export const radiusOf=(e,t)=>scaleStep(e,"radius",t);export const textOf=(e,t)=>scaleStep(e,"text",t);
1
+ "use strict";import{isRecord}from"../utils/guards.js";export const scaleStep=(e,t,s,r)=>{const o="space"===t?e.space:"radius"===t?e.radius:e.text,c=o[s],i="text"===t?isRecord(c)?c.size:void 0:c;if("number"!=typeof i){const e=Object.keys(o).join(", ");throw new Error(`${r?`${r} is `:""}${JSON.stringify(s)}, which is not a ${"text"===t?"text size":"radius"===t?"corner":"space"} name. Use one of: ${e}.`)}return i};export const spaceOf=(e,t)=>scaleStep(e,"space",t);export const radiusOf=(e,t)=>scaleStep(e,"radius",t);export const textOf=(e,t)=>scaleStep(e,"text",t);
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";export function isOneOf(e,r){return e.some(e=>e===r)}export function hasKey(e,r){return Object.hasOwn(e,r)}export function isRecord(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}export function keysOf(e){return Object.keys(e).filter(r=>hasKey(e,r))}
@@ -1 +1 @@
1
- "use strict";import*as Haptics from"expo-haptics";import{Platform}from"react-native";let hapticImpl=null;const 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 c=ANDROID_HAPTICS[t];return"android"===Platform.OS&&c&&"function"==typeof Haptics.performAndroidHapticsAsync&&Haptics.AndroidHaptics?.[c]?()=>Haptics.performAndroidHapticsAsync(Haptics.AndroidHaptics[c]):null};let hapticsEnabled=!0;export const setHapticsEnabled=t=>{hapticsEnabled=t};export const isHapticsEnabled=()=>hapticsEnabled;export const triggerHaptic=(t="selection")=>{if(!hapticsEnabled)return;if(hapticImpl)try{return void hapticImpl(t)}catch{}const c=androidHandler(t)??EXPO_HANDLERS[t];try{c().catch(()=>{})}catch{}};export const setHapticImplementation=t=>{hapticImpl=t};export const resolveHaptic=(t,c)=>!1===t?null:t??c;
1
+ "use strict";import{Logger}from"@webority/mobile-core";import*as Haptics from"expo-haptics";import{Platform}from"react-native";let hapticImpl=null;const 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 c=ANDROID_HAPTICS[t];return"android"===Platform.OS&&c&&"function"==typeof Haptics.performAndroidHapticsAsync&&Haptics.AndroidHaptics?.[c]?()=>Haptics.performAndroidHapticsAsync(Haptics.AndroidHaptics[c]):null};let hapticsEnabled=!0;export const setHapticsEnabled=t=>{hapticsEnabled=t};export const isHapticsEnabled=()=>hapticsEnabled;export const triggerHaptic=(t="selection")=>{if(!hapticsEnabled)return;if(hapticImpl)try{return void hapticImpl(t)}catch(t){Logger.recordError(t,{op:"triggerHaptic"})}const c=androidHandler(t)??EXPO_HANDLERS[t];try{c().catch(t=>{Logger.recordError(t,{op:"triggerHaptic"})})}catch(t){Logger.recordError(t,{op:"triggerHaptic"})}};export const setHapticImplementation=t=>{hapticImpl=t};export const resolveHaptic=(t,c)=>!1===t?null:t??c;
@@ -13,43 +13,43 @@ export declare const PHONE_CHROME_INSETS: {
13
13
  };
14
14
  export interface StatusBarProps {
15
15
  os: PhoneChromeOs;
16
- colorMode?: ColorMode;
16
+ colorMode?: ColorMode | undefined;
17
17
  /** The clock as shown, such as 9:41. */
18
- time?: string;
18
+ time?: string | undefined;
19
19
  /** Signal strength in bars, 0 to 4. */
20
- signal?: number;
20
+ signal?: number | undefined;
21
21
  /** Battery level in percent, 0 to 100. */
22
- battery?: number;
22
+ battery?: number | undefined;
23
23
  }
24
24
  export declare const StatusBar: ({ os, colorMode, time, signal, battery }: StatusBarProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
25
25
  ref?: React.Ref<import("react-native").ViewInstance> | undefined;
26
26
  }>;
27
27
  export interface HomeIndicatorProps {
28
28
  os: PhoneChromeOs;
29
- colorMode?: ColorMode;
29
+ colorMode?: ColorMode | undefined;
30
30
  }
31
31
  export declare const HomeIndicator: ({ os, colorMode }: HomeIndicatorProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
32
32
  ref?: React.Ref<import("react-native").ViewInstance> | undefined;
33
33
  }>;
34
34
  export interface NavigationBarProps {
35
35
  os: PhoneChromeOs;
36
- colorMode?: ColorMode;
36
+ colorMode?: ColorMode | undefined;
37
37
  }
38
38
  export declare const NavigationBar: ({ os, colorMode }: NavigationBarProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
39
39
  ref?: React.Ref<import("react-native").ViewInstance> | undefined;
40
40
  }> | null;
41
41
  export interface SafeAreaProps {
42
42
  os: PhoneChromeOs;
43
- children?: ReactNode;
43
+ children?: ReactNode | undefined;
44
44
  }
45
45
  export declare const SafeArea: ({ os, children }: SafeAreaProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
46
46
  ref?: React.Ref<import("react-native").ViewInstance> | undefined;
47
47
  }>;
48
48
  export type KeyboardPreviewOs = "ios" | "android";
49
49
  export interface KeyboardFrameProps {
50
- colorMode?: ColorMode;
51
- previewOs?: KeyboardPreviewOs;
52
- children?: ReactNode;
50
+ colorMode?: ColorMode | undefined;
51
+ previewOs?: KeyboardPreviewOs | undefined;
52
+ children?: ReactNode | undefined;
53
53
  }
54
54
  export declare const KeyboardFrame: ({ colorMode, previewOs, children }: KeyboardFrameProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
55
55
  ref?: React.Ref<import("react-native").ViewInstance> | undefined;
@@ -57,9 +57,9 @@ export declare const KeyboardFrame: ({ colorMode, previewOs, children }: Keyboar
57
57
  export interface PhoneChromeManifestProp {
58
58
  name: string;
59
59
  type: "enum" | "string" | "number";
60
- enum?: string[];
60
+ enum?: string[] | undefined;
61
61
  required: boolean;
62
- description?: string;
62
+ description?: string | undefined;
63
63
  }
64
64
  export interface PhoneChromeManifestComponent {
65
65
  name: string;
@@ -10,7 +10,7 @@ export type KitPropKey<P> = {
10
10
  type Literal<T> = [NonNullable<T>] extends [string] ? string extends NonNullable<T> ? never : NonNullable<T> : [NonNullable<T>] extends [number] ? number extends NonNullable<T> ? never : NonNullable<T> : never;
11
11
  type IsIconName<T> = [NonNullable<T>] extends [AppIconName] ? ([AppIconName] extends [NonNullable<T>] ? true : false) : false;
12
12
  type PropFor<T, Optional extends boolean> = MetaProp & (Optional extends true ? {
13
- required?: false;
13
+ required?: false | undefined;
14
14
  } : {
15
15
  required: true;
16
16
  }) & (IsIconName<T> extends true ? {
@@ -30,20 +30,18 @@ type ObjectKey<P> = {
30
30
  }[KitPropKey<P>];
31
31
  export interface PhoneMeta<P, O extends KitPropKey<P>, F extends KitPropKey<P> = never> extends Omit<ComponentMeta, "props" | "examples" | "omit" | "component" | "fixedProps" | "actions" | "takesAction" | "itemsTakeAction"> {
32
32
  /** The export this description draws, when it is not `name`: one export described once per mode. */
33
- component?: string;
33
+ component?: string | undefined;
34
34
  /** Props the kit sets on every placement; they are neither shown nor set by an example. */
35
35
  fixedProps?: {
36
36
  readonly [K in F]: ExampleValue<P[K]>;
37
- };
37
+ } | undefined;
38
38
  props: {
39
39
  [K in Exclude<KitPropKey<P>, O | F>]: PropFor<P[K], Partial<Pick<P, K>> extends Pick<P, K> ? true : false>;
40
40
  };
41
- /** The part's role in the manifest. */
42
- role?: "title" | "navigation";
43
41
  /** Object props that each carry one action; in play a tap on one runs the stored action. */
44
- takesAction?: readonly ObjectKey<P>[];
42
+ takesAction?: readonly ObjectKey<P>[] | undefined;
45
43
  /** Array props whose items each carry an action. */
46
- itemsTakeAction?: readonly ListKey<P>[];
44
+ itemsTakeAction?: readonly ListKey<P>[] | undefined;
47
45
  /** Kit props deliberately not shown, such as object or render props no kit type fits. */
48
46
  omit: readonly O[];
49
47
  examples: readonly (Omit<MetaExample, "id" | "props"> & {
@@ -5,40 +5,40 @@ export type AccordionVariant = "plain" | "card";
5
5
  export interface AccordionProps {
6
6
  title: string;
7
7
  children: React.ReactNode;
8
- id?: string;
9
- expanded?: boolean;
10
- defaultExpanded?: boolean;
11
- onChange?: (expanded: boolean) => void;
12
- icon?: React.ReactNode;
13
- disabled?: boolean;
14
- variant?: AccordionVariant;
15
- accessibilityLabel?: string;
8
+ id?: string | undefined;
9
+ expanded?: boolean | undefined;
10
+ defaultExpanded?: boolean | undefined;
11
+ onChange?: ((expanded: boolean) => void) | undefined;
12
+ icon?: React.ReactNode | undefined;
13
+ disabled?: boolean | undefined;
14
+ variant?: AccordionVariant | undefined;
15
+ accessibilityLabel?: string | undefined;
16
16
  /** The outer box. Applied last on that node, so it wins over containerStyle. */
17
- style?: StyleProp<ViewStyle>;
18
- headerStyle?: StyleProp<ViewStyle>;
19
- contentStyle?: StyleProp<ViewStyle>;
17
+ style?: StyleProp<ViewStyle> | undefined;
18
+ headerStyle?: StyleProp<ViewStyle> | undefined;
19
+ contentStyle?: StyleProp<ViewStyle> | undefined;
20
20
  /** Style applied to the animated wrapper around the expandable content. */
21
- contentWrapperStyle?: StyleProp<ViewStyle>;
21
+ contentWrapperStyle?: StyleProp<ViewStyle> | undefined;
22
22
  /** Alias of style, applied before it on the same node. Use style. */
23
- containerStyle?: StyleProp<ViewStyle>;
24
- testID?: string;
23
+ containerStyle?: StyleProp<ViewStyle> | undefined;
24
+ testID?: string | undefined;
25
25
  /**
26
26
  * When true, renders the accordion as its authored skeleton placeholder
27
27
  * shape (header row, collapsed body). Footprint matches the closed live
28
28
  * accordion so the layout doesn't shift when data arrives.
29
29
  */
30
- loading?: boolean;
30
+ loading?: boolean | undefined;
31
31
  /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
32
- haptic?: HapticType | false;
32
+ haptic?: HapticType | false | undefined;
33
33
  }
34
34
  export interface AccordionGroupProps {
35
35
  children: React.ReactNode;
36
- allowMultiple?: boolean;
37
- defaultExpandedKeys?: string[];
38
- expandedKeys?: string[];
39
- onChange?: (keys: string[]) => void;
40
- style?: StyleProp<ViewStyle>;
41
- testID?: string;
36
+ allowMultiple?: boolean | undefined;
37
+ defaultExpandedKeys?: string[] | undefined;
38
+ expandedKeys?: string[] | undefined;
39
+ onChange?: ((keys: string[]) => void) | undefined;
40
+ style?: StyleProp<ViewStyle> | undefined;
41
+ testID?: string | undefined;
42
42
  }
43
43
  declare const AccordionGroup: React.FC<AccordionGroupProps>;
44
44
  declare const Accordion: React.FC<AccordionProps> & {
@@ -13,47 +13,47 @@ export interface AmountSliderLabels {
13
13
  }
14
14
  export declare const DEFAULT_AMOUNT_SLIDER_LABELS: Readonly<AmountSliderLabels>;
15
15
  export interface AmountSliderProps {
16
- value?: number;
17
- defaultValue?: number;
18
- onChange?: (value: number) => void;
19
- min?: number;
20
- max?: number;
21
- step?: number;
22
- disabled?: boolean;
23
- tone?: SliderTone;
24
- size?: SliderSize;
16
+ value?: number | undefined;
17
+ defaultValue?: number | undefined;
18
+ onChange?: ((value: number) => void) | undefined;
19
+ min?: number | undefined;
20
+ max?: number | undefined;
21
+ step?: number | undefined;
22
+ disabled?: boolean | undefined;
23
+ tone?: SliderTone | undefined;
24
+ size?: SliderSize | undefined;
25
25
  /** The slider's look. Default `'inset'`, the design this component comes from. */
26
- variant?: SliderVariant;
26
+ variant?: SliderVariant | undefined;
27
27
  /**
28
28
  * Whether the large amount reads in Thousand, Lakh and Crore or in Thousand,
29
29
  * Million and Billion. Default: the grouping of the configured locale.
30
30
  */
31
- units?: ScaleUnits;
31
+ units?: ScaleUnits | undefined;
32
32
  /** ISO 4217 code of the amount; the symbol drawn before it comes from this. */
33
33
  currency: string;
34
34
  /** Unit words and the input box's label. Omitted keys keep the English defaults. */
35
- labels?: Partial<AmountSliderLabels>;
35
+ labels?: Partial<AmountSliderLabels> | undefined;
36
36
  /**
37
37
  * Text of the input box when it is not being edited. Default: the currency
38
38
  * with no decimals.
39
39
  */
40
- formatInput?: (value: number) => string;
40
+ formatInput?: ((value: number) => string) | undefined;
41
41
  /**
42
42
  * Duration in ms of one digit roll. Default `theme.motion.duration.default`,
43
43
  * which the ThemeProvider collapses to 0 when the OS asks for reduced
44
44
  * motion.
45
45
  */
46
- animationDuration?: number;
47
- haptic?: HapticType | false;
46
+ animationDuration?: number | undefined;
47
+ haptic?: HapticType | false | undefined;
48
48
  /** Read out for the slider. The input box reads `labels.inputLabel`. */
49
- accessibilityLabel?: string;
50
- style?: StyleProp<ViewStyle>;
51
- headerStyle?: StyleProp<ViewStyle>;
52
- valueStyle?: StyleProp<TextStyle>;
53
- unitStyle?: StyleProp<TextStyle>;
54
- inputStyle?: StyleProp<ViewStyle>;
55
- sliderStyle?: StyleProp<ViewStyle>;
56
- testID?: string;
49
+ accessibilityLabel?: string | undefined;
50
+ style?: StyleProp<ViewStyle> | undefined;
51
+ headerStyle?: StyleProp<ViewStyle> | undefined;
52
+ valueStyle?: StyleProp<TextStyle> | undefined;
53
+ unitStyle?: StyleProp<TextStyle> | undefined;
54
+ inputStyle?: StyleProp<ViewStyle> | undefined;
55
+ sliderStyle?: StyleProp<ViewStyle> | undefined;
56
+ testID?: string | undefined;
57
57
  }
58
58
  interface Scaled {
59
59
  amount: number;
@@ -7,13 +7,13 @@ export interface AnimatePresenceProps {
7
7
  * animation plays before the content unmounts; when it returns the enter
8
8
  * animation plays. Drive it like `{visible ? <Panel /> : null}`.
9
9
  */
10
- children?: React.ReactNode;
10
+ children?: React.ReactNode | undefined;
11
11
  /** Enter/exit preset. Default `'fade'`. */
12
- preset?: PresencePreset;
12
+ preset?: PresencePreset | undefined;
13
13
  /** Animation duration (ms). Defaults to `theme.motion.duration.default`. */
14
- duration?: number;
15
- style?: StyleProp<ViewStyle>;
16
- testID?: string;
14
+ duration?: number | undefined;
15
+ style?: StyleProp<ViewStyle> | undefined;
16
+ testID?: string | undefined;
17
17
  }
18
18
  /**
19
19
  * Animates a single child in on mount and out on unmount. Thin, theme-aware