@webority/mobile-ui 0.149.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 (459) hide show
  1. package/dist/canvas-kit/kit.js +13 -56714
  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/BottomNavigation/BottomNavigation.js +1 -1
  14. package/lib/commonjs/components/Box/Box.js +1 -1
  15. package/lib/commonjs/components/Card/Card.js +1 -1
  16. package/lib/commonjs/components/Carousel/Carousel.js +1 -1
  17. package/lib/commonjs/components/Chip/Chip.js +1 -1
  18. package/lib/commonjs/components/ChoiceGroup/ChoiceGroup.js +1 -1
  19. package/lib/commonjs/components/Confetti/Confetti.js +1 -1
  20. package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
  21. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
  22. package/lib/commonjs/components/Descriptions/Descriptions.js +1 -1
  23. package/lib/commonjs/components/Dialog/Dialog.js +1 -1
  24. package/lib/commonjs/components/FileViewer/fileSource.js +1 -1
  25. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
  26. package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
  27. package/lib/commonjs/components/InlineSelect/InlineSelect.js +1 -1
  28. package/lib/commonjs/components/Input/Input.js +1 -1
  29. package/lib/commonjs/components/ListItem/ListItem.js +1 -1
  30. package/lib/commonjs/components/Markdown/Markdown.js +1 -1
  31. package/lib/commonjs/components/Menu/MenuSurface.js +1 -1
  32. package/lib/commonjs/components/Menu/focusHost.js +1 -1
  33. package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
  34. package/lib/commonjs/components/OptionSheet/optionAccessors.js +1 -0
  35. package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  36. package/lib/commonjs/components/ProgressRing/ProgressRing.js +1 -1
  37. package/lib/commonjs/components/Radio/RadioGroup.js +1 -1
  38. package/lib/commonjs/components/Rating/Rating.js +1 -1
  39. package/lib/commonjs/components/Repeater/Repeater.js +1 -1
  40. package/lib/commonjs/components/Screen/Screen.js +1 -1
  41. package/lib/commonjs/components/SearchBar/useRecentSearches.js +1 -1
  42. package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +1 -1
  43. package/lib/commonjs/components/Select/Select.js +1 -1
  44. package/lib/commonjs/components/Skeleton/SkeletonContent.js +1 -1
  45. package/lib/commonjs/components/Skeleton/SkeletonList.js +1 -1
  46. package/lib/commonjs/components/Slider/Slider.js +1 -1
  47. package/lib/commonjs/components/SliderField/SliderField.js +1 -1
  48. package/lib/commonjs/components/SortableList/SortableList.js +1 -1
  49. package/lib/commonjs/components/Sparkline/Sparkline.js +1 -1
  50. package/lib/commonjs/components/SquircleFill/SquircleFill.js +1 -1
  51. package/lib/commonjs/components/StatTile/StatTile.js +1 -1
  52. package/lib/commonjs/components/StatusBadge/StatusBadge.js +1 -1
  53. package/lib/commonjs/components/StatusBadge/statusMap.js +1 -1
  54. package/lib/commonjs/components/Stepper/Stepper.js +1 -1
  55. package/lib/commonjs/components/Text/Text.js +1 -1
  56. package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
  57. package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -1
  58. package/lib/commonjs/form/HookFormField.js +1 -1
  59. package/lib/commonjs/form/path.js +1 -1
  60. package/lib/commonjs/hooks/useControllableState.js +1 -1
  61. package/lib/commonjs/specs/NativePdfRasterizer.js +1 -1
  62. package/lib/commonjs/theme/ThemeContext.js +1 -1
  63. package/lib/commonjs/theme/animatedValue.js +1 -1
  64. package/lib/commonjs/theme/componentSizes.js +1 -1
  65. package/lib/commonjs/theme/merge.js +1 -1
  66. package/lib/commonjs/theme/scale.js +1 -1
  67. package/lib/commonjs/utils/complete.js +1 -0
  68. package/lib/commonjs/utils/guards.js +1 -0
  69. package/lib/commonjs/utils/hapticUtils.js +1 -1
  70. package/lib/module/components/Accordion/Accordion.js +1 -1
  71. package/lib/module/components/AppIcon/AppIcon.js +1 -1
  72. package/lib/module/components/AppIcon/glyphs.g.js +1 -1
  73. package/lib/module/components/AsyncBlock/AsyncBlock.js +1 -1
  74. package/lib/module/components/AuthedImage/AuthedImage.js +1 -1
  75. package/lib/module/components/AuthedImage/authedImageCache.js +1 -1
  76. package/lib/module/components/Avatar/Avatar.js +1 -1
  77. package/lib/module/components/Badge/Badge.js +1 -1
  78. package/lib/module/components/Banner/Banner.js +1 -1
  79. package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
  80. package/lib/module/components/Box/Box.js +1 -1
  81. package/lib/module/components/Card/Card.js +1 -1
  82. package/lib/module/components/Carousel/Carousel.js +1 -1
  83. package/lib/module/components/Chip/Chip.js +1 -1
  84. package/lib/module/components/ChoiceGroup/ChoiceGroup.js +1 -1
  85. package/lib/module/components/Confetti/Confetti.js +1 -1
  86. package/lib/module/components/DatePicker/DatePicker.js +1 -1
  87. package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
  88. package/lib/module/components/Descriptions/Descriptions.js +1 -1
  89. package/lib/module/components/Dialog/Dialog.js +1 -1
  90. package/lib/module/components/FileViewer/fileSource.js +1 -1
  91. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
  92. package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
  93. package/lib/module/components/InlineSelect/InlineSelect.js +1 -1
  94. package/lib/module/components/Input/Input.js +1 -1
  95. package/lib/module/components/ListItem/ListItem.js +1 -1
  96. package/lib/module/components/Markdown/Markdown.js +1 -1
  97. package/lib/module/components/Menu/MenuSurface.js +1 -1
  98. package/lib/module/components/Menu/focusHost.js +1 -1
  99. package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
  100. package/lib/module/components/OptionSheet/optionAccessors.js +1 -0
  101. package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  102. package/lib/module/components/ProgressRing/ProgressRing.js +1 -1
  103. package/lib/module/components/Radio/RadioGroup.js +1 -1
  104. package/lib/module/components/Rating/Rating.js +1 -1
  105. package/lib/module/components/Repeater/Repeater.js +1 -1
  106. package/lib/module/components/Screen/Screen.js +1 -1
  107. package/lib/module/components/SearchBar/useRecentSearches.js +1 -1
  108. package/lib/module/components/SegmentedControl/SegmentedControl.js +1 -1
  109. package/lib/module/components/Select/Select.js +1 -1
  110. package/lib/module/components/Skeleton/SkeletonContent.js +1 -1
  111. package/lib/module/components/Skeleton/SkeletonList.js +1 -1
  112. package/lib/module/components/Slider/Slider.js +1 -1
  113. package/lib/module/components/SliderField/SliderField.js +1 -1
  114. package/lib/module/components/SortableList/SortableList.js +1 -1
  115. package/lib/module/components/Sparkline/Sparkline.js +1 -1
  116. package/lib/module/components/SquircleFill/SquircleFill.js +1 -1
  117. package/lib/module/components/StatTile/StatTile.js +1 -1
  118. package/lib/module/components/StatusBadge/StatusBadge.js +1 -1
  119. package/lib/module/components/StatusBadge/statusMap.js +1 -1
  120. package/lib/module/components/Stepper/Stepper.js +1 -1
  121. package/lib/module/components/Text/Text.js +1 -1
  122. package/lib/module/components/TimePicker/TimePicker.js +1 -1
  123. package/lib/module/components/WheelPicker/WheelPicker.js +1 -1
  124. package/lib/module/form/HookFormField.js +1 -1
  125. package/lib/module/form/path.js +1 -1
  126. package/lib/module/hooks/useControllableState.js +1 -1
  127. package/lib/module/specs/NativePdfRasterizer.js +1 -1
  128. package/lib/module/theme/ThemeContext.js +1 -1
  129. package/lib/module/theme/animatedValue.js +1 -1
  130. package/lib/module/theme/componentSizes.js +1 -1
  131. package/lib/module/theme/merge.js +1 -1
  132. package/lib/module/theme/scale.js +1 -1
  133. package/lib/module/utils/complete.js +1 -0
  134. package/lib/module/utils/guards.js +1 -0
  135. package/lib/module/utils/hapticUtils.js +1 -1
  136. package/lib/typescript/commonjs/canvasKit/index.d.ts +12 -12
  137. package/lib/typescript/commonjs/canvasKit/meta.d.ts +5 -7
  138. package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +22 -22
  139. package/lib/typescript/commonjs/components/AmountSlider/AmountSlider.d.ts +23 -23
  140. package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +5 -5
  141. package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +39 -39
  142. package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +7 -7
  143. package/lib/typescript/commonjs/components/AppIcon/defaultIcons.d.ts +2 -1
  144. package/lib/typescript/commonjs/components/AppIcon/glyphs.g.d.ts +233 -233
  145. package/lib/typescript/commonjs/components/AppIcon/slotIcon.d.ts +1 -1
  146. package/lib/typescript/commonjs/components/AppLockOverlay/AppLockOverlay.d.ts +5 -5
  147. package/lib/typescript/commonjs/components/AsyncBlock/AsyncBlock.d.ts +22 -40
  148. package/lib/typescript/commonjs/components/AuthedImage/AuthedImage.d.ts +15 -15
  149. package/lib/typescript/commonjs/components/AuthedImage/authedImageCache.d.ts +2 -2
  150. package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.d.ts +24 -24
  151. package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +36 -36
  152. package/lib/typescript/commonjs/components/Badge/Badge.d.ts +18 -18
  153. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +25 -25
  154. package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +21 -21
  155. package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +36 -36
  156. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +32 -32
  157. package/lib/typescript/commonjs/components/Box/Box.d.ts +27 -27
  158. package/lib/typescript/commonjs/components/Button/Button.d.ts +22 -22
  159. package/lib/typescript/commonjs/components/Calendar/Calendar.d.ts +20 -20
  160. package/lib/typescript/commonjs/components/Calendar/CalendarDay.d.ts +4 -2
  161. package/lib/typescript/commonjs/components/Card/Card.d.ts +41 -41
  162. package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +21 -21
  163. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +21 -21
  164. package/lib/typescript/commonjs/components/Chip/Chip.d.ts +23 -23
  165. package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.d.ts +51 -46
  166. package/lib/typescript/commonjs/components/Composer/Composer.d.ts +27 -27
  167. package/lib/typescript/commonjs/components/Confetti/Confetti.d.ts +22 -21
  168. package/lib/typescript/commonjs/components/Confirm/confirm.d.ts +4 -4
  169. package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +20 -20
  170. package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +22 -22
  171. package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.d.ts +9 -9
  172. package/lib/typescript/commonjs/components/DecimalInput/DecimalInput.d.ts +14 -14
  173. package/lib/typescript/commonjs/components/Descriptions/Descriptions.d.ts +13 -13
  174. package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +24 -24
  175. package/lib/typescript/commonjs/components/Dialog/OverlayActions.d.ts +5 -5
  176. package/lib/typescript/commonjs/components/Divider/Divider.d.ts +9 -9
  177. package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +14 -14
  178. package/lib/typescript/commonjs/components/EmptyState/EmptyState.d.ts +13 -13
  179. package/lib/typescript/commonjs/components/ErrorBoundary/ErrorBoundary.d.ts +8 -8
  180. package/lib/typescript/commonjs/components/FieldBase/Chevron.d.ts +2 -2
  181. package/lib/typescript/commonjs/components/FieldBase/ChoiceText.d.ts +10 -10
  182. package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +54 -54
  183. package/lib/typescript/commonjs/components/FieldBase/useFloatingLabel.d.ts +8 -8
  184. package/lib/typescript/commonjs/components/FilePicker/FilePicker.d.ts +35 -35
  185. package/lib/typescript/commonjs/components/FileViewer/FileViewer.d.ts +10 -10
  186. package/lib/typescript/commonjs/components/FileViewer/fileSource.d.ts +3 -3
  187. package/lib/typescript/commonjs/components/FilterChipRow/FilterChipRow.d.ts +12 -12
  188. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +35 -35
  189. package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +11 -11
  190. package/lib/typescript/commonjs/components/FormField/FormField.d.ts +15 -15
  191. package/lib/typescript/commonjs/components/IconBadge/IconBadge.d.ts +11 -11
  192. package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +14 -14
  193. package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +14 -14
  194. package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +36 -31
  195. package/lib/typescript/commonjs/components/Input/Input.d.ts +47 -47
  196. package/lib/typescript/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +7 -7
  197. package/lib/typescript/commonjs/components/KeyboardToolbar/KeyboardToolbar.d.ts +8 -8
  198. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +44 -44
  199. package/lib/typescript/commonjs/components/ListSection/ListSection.d.ts +6 -6
  200. package/lib/typescript/commonjs/components/LoaderOverlay/LoaderOverlay.d.ts +17 -11
  201. package/lib/typescript/commonjs/components/Markdown/Markdown.d.ts +15 -15
  202. package/lib/typescript/commonjs/components/Menu/Menu.d.ts +17 -12
  203. package/lib/typescript/commonjs/components/Menu/MenuSurface.d.ts +8 -8
  204. package/lib/typescript/commonjs/components/Menu/menuModel.d.ts +11 -11
  205. package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +13 -13
  206. package/lib/typescript/commonjs/components/Menu/webOnly.d.ts +3 -3
  207. package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +20 -20
  208. package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +14 -14
  209. package/lib/typescript/commonjs/components/Modal/Modal.d.ts +19 -19
  210. package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +27 -27
  211. package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +20 -20
  212. package/lib/typescript/commonjs/components/OTPInput/OTPResendRow.d.ts +9 -9
  213. package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.d.ts +5 -5
  214. package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +33 -33
  215. package/lib/typescript/commonjs/components/OptionSheet/optionAccessors.d.ts +8 -0
  216. package/lib/typescript/commonjs/components/PagedListFooter/PagedListFooter.d.ts +2 -2
  217. package/lib/typescript/commonjs/components/PermissionPrompt/PermissionPrompt.d.ts +6 -6
  218. package/lib/typescript/commonjs/components/PermissionPrompt/usePermissionPrompt.d.ts +1 -1
  219. package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +43 -43
  220. package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +23 -23
  221. package/lib/typescript/commonjs/components/ProfileCompletion/ProfileCompletion.d.ts +23 -23
  222. package/lib/typescript/commonjs/components/ProfilePicker/ProfilePicker.d.ts +30 -30
  223. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +21 -21
  224. package/lib/typescript/commonjs/components/ProgressRing/ProgressRing.d.ts +13 -13
  225. package/lib/typescript/commonjs/components/Radio/Radio.d.ts +18 -18
  226. package/lib/typescript/commonjs/components/Radio/RadioDot.d.ts +5 -5
  227. package/lib/typescript/commonjs/components/Radio/RadioGroup.d.ts +8 -8
  228. package/lib/typescript/commonjs/components/Rating/Rating.d.ts +15 -15
  229. package/lib/typescript/commonjs/components/Repeater/Repeater.d.ts +10 -10
  230. package/lib/typescript/commonjs/components/RichTextEditor/RichTextEditor.d.ts +15 -15
  231. package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.d.ts +13 -13
  232. package/lib/typescript/commonjs/components/Screen/Screen.d.ts +43 -44
  233. package/lib/typescript/commonjs/components/Screen/index.d.ts +1 -1
  234. package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +31 -31
  235. package/lib/typescript/commonjs/components/SearchBar/SearchPanel.d.ts +6 -6
  236. package/lib/typescript/commonjs/components/SearchBar/useRecentSearches.d.ts +1 -1
  237. package/lib/typescript/commonjs/components/SectionHeader/SectionHeader.d.ts +10 -10
  238. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +25 -24
  239. package/lib/typescript/commonjs/components/Select/Select.d.ts +50 -45
  240. package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +20 -20
  241. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +13 -13
  242. package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +9 -9
  243. package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +30 -8
  244. package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +9 -9
  245. package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +14 -14
  246. package/lib/typescript/commonjs/components/Slider/Slider.d.ts +30 -30
  247. package/lib/typescript/commonjs/components/Slider/valueText.d.ts +9 -9
  248. package/lib/typescript/commonjs/components/SliderField/SliderField.d.ts +41 -41
  249. package/lib/typescript/commonjs/components/SortableList/SortableList.d.ts +5 -5
  250. package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +13 -13
  251. package/lib/typescript/commonjs/components/Sparkline/geometry.d.ts +3 -1
  252. package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +10 -10
  253. package/lib/typescript/commonjs/components/SquircleFill/SquircleFill.d.ts +3 -3
  254. package/lib/typescript/commonjs/components/SquircleImage/SquircleImage.d.ts +5 -12
  255. package/lib/typescript/commonjs/components/StatTile/StatTile.d.ts +14 -14
  256. package/lib/typescript/commonjs/components/StatusBadge/StatusBadge.d.ts +13 -13
  257. package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +21 -21
  258. package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +15 -15
  259. package/lib/typescript/commonjs/components/Switch/Switch.d.ts +19 -19
  260. package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +20 -20
  261. package/lib/typescript/commonjs/components/TagInput/TagInput.d.ts +19 -19
  262. package/lib/typescript/commonjs/components/Text/Text.d.ts +10 -10
  263. package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +14 -14
  264. package/lib/typescript/commonjs/components/Timeline/Timeline.d.ts +12 -12
  265. package/lib/typescript/commonjs/components/Toast/Toast.d.ts +17 -17
  266. package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +8 -8
  267. package/lib/typescript/commonjs/components/Tooltip/RichTooltipBody.d.ts +4 -4
  268. package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +24 -19
  269. package/lib/typescript/commonjs/components/Tour/Tour.d.ts +7 -7
  270. package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.d.ts +6 -6
  271. package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +6 -6
  272. package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +20 -20
  273. package/lib/typescript/commonjs/components/ZoomableImage/ZoomableImage.d.ts +8 -8
  274. package/lib/typescript/commonjs/form/HookFormField.d.ts +5 -18
  275. package/lib/typescript/commonjs/form/path.d.ts +4 -2
  276. package/lib/typescript/commonjs/form/useFormCompletion.d.ts +1 -1
  277. package/lib/typescript/commonjs/hooks/useControllableState.d.ts +2 -2
  278. package/lib/typescript/commonjs/hooks/useDragToDismiss.d.ts +3 -3
  279. package/lib/typescript/commonjs/hooks/useFieldErrorScroll.d.ts +1 -1
  280. package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +4 -4
  281. package/lib/typescript/commonjs/hooks/useRefreshControl.d.ts +8 -8
  282. package/lib/typescript/commonjs/hooks/useResendCountdown.d.ts +1 -1
  283. package/lib/typescript/commonjs/hooks/useScrollDirection.d.ts +1 -1
  284. package/lib/typescript/commonjs/navigation/DiscardGuard.d.ts +2 -2
  285. package/lib/typescript/commonjs/navigation/NavigationScreen.d.ts +3 -3
  286. package/lib/typescript/commonjs/network/NetworkStatusBanner.d.ts +7 -7
  287. package/lib/typescript/commonjs/theme/Gradient.d.ts +2 -2
  288. package/lib/typescript/commonjs/theme/ThemeContext.d.ts +5 -5
  289. package/lib/typescript/commonjs/theme/componentSizes.d.ts +15 -38
  290. package/lib/typescript/commonjs/theme/types.d.ts +84 -84
  291. package/lib/typescript/commonjs/utils/announce.d.ts +1 -1
  292. package/lib/typescript/commonjs/utils/complete.d.ts +5 -0
  293. package/lib/typescript/commonjs/utils/feedback.d.ts +3 -1
  294. package/lib/typescript/commonjs/utils/guards.d.ts +9 -0
  295. package/lib/typescript/commonjs/utils/placement.d.ts +3 -3
  296. package/lib/typescript/commonjs/utils/squircle.d.ts +2 -2
  297. package/lib/typescript/module/canvasKit/index.d.ts +12 -12
  298. package/lib/typescript/module/canvasKit/meta.d.ts +5 -7
  299. package/lib/typescript/module/components/Accordion/Accordion.d.ts +22 -22
  300. package/lib/typescript/module/components/AmountSlider/AmountSlider.d.ts +23 -23
  301. package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +5 -5
  302. package/lib/typescript/module/components/AppBar/AppBar.d.ts +39 -39
  303. package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +7 -7
  304. package/lib/typescript/module/components/AppIcon/defaultIcons.d.ts +2 -1
  305. package/lib/typescript/module/components/AppIcon/glyphs.g.d.ts +233 -233
  306. package/lib/typescript/module/components/AppIcon/slotIcon.d.ts +1 -1
  307. package/lib/typescript/module/components/AppLockOverlay/AppLockOverlay.d.ts +5 -5
  308. package/lib/typescript/module/components/AsyncBlock/AsyncBlock.d.ts +22 -40
  309. package/lib/typescript/module/components/AuthedImage/AuthedImage.d.ts +15 -15
  310. package/lib/typescript/module/components/AuthedImage/authedImageCache.d.ts +2 -2
  311. package/lib/typescript/module/components/Autocomplete/Autocomplete.d.ts +24 -24
  312. package/lib/typescript/module/components/Avatar/Avatar.d.ts +36 -36
  313. package/lib/typescript/module/components/Badge/Badge.d.ts +18 -18
  314. package/lib/typescript/module/components/Banner/Banner.d.ts +25 -25
  315. package/lib/typescript/module/components/BarChart/BarChart.d.ts +21 -21
  316. package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +36 -36
  317. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +32 -32
  318. package/lib/typescript/module/components/Box/Box.d.ts +27 -27
  319. package/lib/typescript/module/components/Button/Button.d.ts +22 -22
  320. package/lib/typescript/module/components/Calendar/Calendar.d.ts +20 -20
  321. package/lib/typescript/module/components/Calendar/CalendarDay.d.ts +4 -2
  322. package/lib/typescript/module/components/Card/Card.d.ts +41 -41
  323. package/lib/typescript/module/components/Carousel/Carousel.d.ts +21 -21
  324. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +21 -21
  325. package/lib/typescript/module/components/Chip/Chip.d.ts +23 -23
  326. package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.d.ts +51 -46
  327. package/lib/typescript/module/components/Composer/Composer.d.ts +27 -27
  328. package/lib/typescript/module/components/Confetti/Confetti.d.ts +22 -21
  329. package/lib/typescript/module/components/Confirm/confirm.d.ts +4 -4
  330. package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +20 -20
  331. package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +22 -22
  332. package/lib/typescript/module/components/DateSeparator/DateSeparator.d.ts +9 -9
  333. package/lib/typescript/module/components/DecimalInput/DecimalInput.d.ts +14 -14
  334. package/lib/typescript/module/components/Descriptions/Descriptions.d.ts +13 -13
  335. package/lib/typescript/module/components/Dialog/Dialog.d.ts +24 -24
  336. package/lib/typescript/module/components/Dialog/OverlayActions.d.ts +5 -5
  337. package/lib/typescript/module/components/Divider/Divider.d.ts +9 -9
  338. package/lib/typescript/module/components/Drawer/Drawer.d.ts +14 -14
  339. package/lib/typescript/module/components/EmptyState/EmptyState.d.ts +13 -13
  340. package/lib/typescript/module/components/ErrorBoundary/ErrorBoundary.d.ts +8 -8
  341. package/lib/typescript/module/components/FieldBase/Chevron.d.ts +2 -2
  342. package/lib/typescript/module/components/FieldBase/ChoiceText.d.ts +10 -10
  343. package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +54 -54
  344. package/lib/typescript/module/components/FieldBase/useFloatingLabel.d.ts +8 -8
  345. package/lib/typescript/module/components/FilePicker/FilePicker.d.ts +35 -35
  346. package/lib/typescript/module/components/FileViewer/FileViewer.d.ts +10 -10
  347. package/lib/typescript/module/components/FileViewer/fileSource.d.ts +3 -3
  348. package/lib/typescript/module/components/FilterChipRow/FilterChipRow.d.ts +12 -12
  349. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +35 -35
  350. package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +11 -11
  351. package/lib/typescript/module/components/FormField/FormField.d.ts +15 -15
  352. package/lib/typescript/module/components/IconBadge/IconBadge.d.ts +11 -11
  353. package/lib/typescript/module/components/IconButton/IconButton.d.ts +14 -14
  354. package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +14 -14
  355. package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +36 -31
  356. package/lib/typescript/module/components/Input/Input.d.ts +47 -47
  357. package/lib/typescript/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +7 -7
  358. package/lib/typescript/module/components/KeyboardToolbar/KeyboardToolbar.d.ts +8 -8
  359. package/lib/typescript/module/components/ListItem/ListItem.d.ts +44 -44
  360. package/lib/typescript/module/components/ListSection/ListSection.d.ts +6 -6
  361. package/lib/typescript/module/components/LoaderOverlay/LoaderOverlay.d.ts +17 -11
  362. package/lib/typescript/module/components/Markdown/Markdown.d.ts +15 -15
  363. package/lib/typescript/module/components/Menu/Menu.d.ts +17 -12
  364. package/lib/typescript/module/components/Menu/MenuSurface.d.ts +8 -8
  365. package/lib/typescript/module/components/Menu/menuModel.d.ts +11 -11
  366. package/lib/typescript/module/components/Menu/useContextMenu.d.ts +13 -13
  367. package/lib/typescript/module/components/Menu/webOnly.d.ts +3 -3
  368. package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +20 -20
  369. package/lib/typescript/module/components/MessageList/MessageList.d.ts +14 -14
  370. package/lib/typescript/module/components/Modal/Modal.d.ts +19 -19
  371. package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +27 -27
  372. package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +20 -20
  373. package/lib/typescript/module/components/OTPInput/OTPResendRow.d.ts +9 -9
  374. package/lib/typescript/module/components/OnboardingPager/OnboardingPager.d.ts +5 -5
  375. package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +33 -33
  376. package/lib/typescript/module/components/OptionSheet/optionAccessors.d.ts +8 -0
  377. package/lib/typescript/module/components/PagedListFooter/PagedListFooter.d.ts +2 -2
  378. package/lib/typescript/module/components/PermissionPrompt/PermissionPrompt.d.ts +6 -6
  379. package/lib/typescript/module/components/PermissionPrompt/usePermissionPrompt.d.ts +1 -1
  380. package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +43 -43
  381. package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +23 -23
  382. package/lib/typescript/module/components/ProfileCompletion/ProfileCompletion.d.ts +23 -23
  383. package/lib/typescript/module/components/ProfilePicker/ProfilePicker.d.ts +30 -30
  384. package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +21 -21
  385. package/lib/typescript/module/components/ProgressRing/ProgressRing.d.ts +13 -13
  386. package/lib/typescript/module/components/Radio/Radio.d.ts +18 -18
  387. package/lib/typescript/module/components/Radio/RadioDot.d.ts +5 -5
  388. package/lib/typescript/module/components/Radio/RadioGroup.d.ts +8 -8
  389. package/lib/typescript/module/components/Rating/Rating.d.ts +15 -15
  390. package/lib/typescript/module/components/Repeater/Repeater.d.ts +10 -10
  391. package/lib/typescript/module/components/RichTextEditor/RichTextEditor.d.ts +15 -15
  392. package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.d.ts +13 -13
  393. package/lib/typescript/module/components/Screen/Screen.d.ts +43 -44
  394. package/lib/typescript/module/components/Screen/index.d.ts +1 -1
  395. package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +31 -31
  396. package/lib/typescript/module/components/SearchBar/SearchPanel.d.ts +6 -6
  397. package/lib/typescript/module/components/SearchBar/useRecentSearches.d.ts +1 -1
  398. package/lib/typescript/module/components/SectionHeader/SectionHeader.d.ts +10 -10
  399. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +25 -24
  400. package/lib/typescript/module/components/Select/Select.d.ts +50 -45
  401. package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +20 -20
  402. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +13 -13
  403. package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +9 -9
  404. package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +30 -8
  405. package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +9 -9
  406. package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +14 -14
  407. package/lib/typescript/module/components/Slider/Slider.d.ts +30 -30
  408. package/lib/typescript/module/components/Slider/valueText.d.ts +9 -9
  409. package/lib/typescript/module/components/SliderField/SliderField.d.ts +41 -41
  410. package/lib/typescript/module/components/SortableList/SortableList.d.ts +5 -5
  411. package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +13 -13
  412. package/lib/typescript/module/components/Sparkline/geometry.d.ts +3 -1
  413. package/lib/typescript/module/components/Spinner/Spinner.d.ts +10 -10
  414. package/lib/typescript/module/components/SquircleFill/SquircleFill.d.ts +3 -3
  415. package/lib/typescript/module/components/SquircleImage/SquircleImage.d.ts +5 -12
  416. package/lib/typescript/module/components/StatTile/StatTile.d.ts +14 -14
  417. package/lib/typescript/module/components/StatusBadge/StatusBadge.d.ts +13 -13
  418. package/lib/typescript/module/components/Stepper/Stepper.d.ts +21 -21
  419. package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +15 -15
  420. package/lib/typescript/module/components/Switch/Switch.d.ts +19 -19
  421. package/lib/typescript/module/components/Tabs/Tabs.d.ts +20 -20
  422. package/lib/typescript/module/components/TagInput/TagInput.d.ts +19 -19
  423. package/lib/typescript/module/components/Text/Text.d.ts +10 -10
  424. package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +14 -14
  425. package/lib/typescript/module/components/Timeline/Timeline.d.ts +12 -12
  426. package/lib/typescript/module/components/Toast/Toast.d.ts +17 -17
  427. package/lib/typescript/module/components/Toast/ToastProvider.d.ts +8 -8
  428. package/lib/typescript/module/components/Tooltip/RichTooltipBody.d.ts +4 -4
  429. package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +24 -19
  430. package/lib/typescript/module/components/Tour/Tour.d.ts +7 -7
  431. package/lib/typescript/module/components/TypingIndicator/TypingIndicator.d.ts +6 -6
  432. package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +6 -6
  433. package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +20 -20
  434. package/lib/typescript/module/components/ZoomableImage/ZoomableImage.d.ts +8 -8
  435. package/lib/typescript/module/form/HookFormField.d.ts +5 -18
  436. package/lib/typescript/module/form/path.d.ts +4 -2
  437. package/lib/typescript/module/form/useFormCompletion.d.ts +1 -1
  438. package/lib/typescript/module/hooks/useControllableState.d.ts +2 -2
  439. package/lib/typescript/module/hooks/useDragToDismiss.d.ts +3 -3
  440. package/lib/typescript/module/hooks/useFieldErrorScroll.d.ts +1 -1
  441. package/lib/typescript/module/hooks/usePressAnimation.d.ts +4 -4
  442. package/lib/typescript/module/hooks/useRefreshControl.d.ts +8 -8
  443. package/lib/typescript/module/hooks/useResendCountdown.d.ts +1 -1
  444. package/lib/typescript/module/hooks/useScrollDirection.d.ts +1 -1
  445. package/lib/typescript/module/navigation/DiscardGuard.d.ts +2 -2
  446. package/lib/typescript/module/navigation/NavigationScreen.d.ts +3 -3
  447. package/lib/typescript/module/network/NetworkStatusBanner.d.ts +7 -7
  448. package/lib/typescript/module/theme/Gradient.d.ts +2 -2
  449. package/lib/typescript/module/theme/ThemeContext.d.ts +5 -5
  450. package/lib/typescript/module/theme/componentSizes.d.ts +15 -38
  451. package/lib/typescript/module/theme/types.d.ts +84 -84
  452. package/lib/typescript/module/utils/announce.d.ts +1 -1
  453. package/lib/typescript/module/utils/complete.d.ts +5 -0
  454. package/lib/typescript/module/utils/feedback.d.ts +3 -1
  455. package/lib/typescript/module/utils/guards.d.ts +9 -0
  456. package/lib/typescript/module/utils/placement.d.ts +3 -3
  457. package/lib/typescript/module/utils/squircle.d.ts +2 -2
  458. package/package.json +9 -9
  459. package/src/specs/NativePdfRasterizer.ts +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateComponentTokens=exports.resolveTabsSize=exports.resolveSwitchSize=exports.resolveSliderSize=exports.resolveSegmentedControlSize=exports.resolveRadioSize=exports.resolveOtpInputSize=exports.resolveListItemSize=exports.resolveFloatingActionButtonSize=exports.resolveFieldSize=exports.resolveEmptyStateSize=exports.resolveChipSize=exports.resolveCheckboxSize=exports.resolveButtonSize=exports.resolveBadgeSize=void 0;var _scale=require("./scale.js"),_tokensGenerated=require("./tokens.generated.js");const SIZE_KEYS=["xs","sm","md","lg","xl"],kindOf=(e,o,t)=>{const s=_tokensGenerated.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(0,_scale.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},resolveButtonSize=(e,o)=>resolveSize(e,"button",o);exports.resolveButtonSize=resolveButtonSize;const resolveFieldSize=(e,o)=>resolveSize(e,"field",o);exports.resolveFieldSize=resolveFieldSize;const resolveEmptyStateSize=(e,o)=>resolveSize(e,"empty-state",o);exports.resolveEmptyStateSize=resolveEmptyStateSize;const resolveListItemSize=(e,o)=>resolveSize(e,"list-item",o);exports.resolveListItemSize=resolveListItemSize;const resolveBadgeSize=(e,o)=>resolveSize(e,"badge",o);exports.resolveBadgeSize=resolveBadgeSize;const resolveChipSize=(e,o)=>resolveSize(e,"chip",o);exports.resolveChipSize=resolveChipSize;const resolveCheckboxSize=(e,o)=>resolveSize(e,"checkbox",o);exports.resolveCheckboxSize=resolveCheckboxSize;const resolveRadioSize=(e,o)=>resolveSize(e,"radio",o);exports.resolveRadioSize=resolveRadioSize;const resolveSwitchSize=(e,o)=>resolveSize(e,"switch",o);exports.resolveSwitchSize=resolveSwitchSize;const resolveOtpInputSize=(e,o)=>resolveSize(e,"otp-input",o);exports.resolveOtpInputSize=resolveOtpInputSize;const resolveSegmentedControlSize=(e,o)=>resolveSize(e,"segmented-control",o);exports.resolveSegmentedControlSize=resolveSegmentedControlSize;const resolveTabsSize=(e,o)=>resolveSize(e,"tabs",o);exports.resolveTabsSize=resolveTabsSize;const resolveSliderSize=(e,o)=>resolveSize(e,"slider",o);exports.resolveSliderSize=resolveSliderSize;const resolveFloatingActionButtonSize=(e,o)=>resolveSize(e,"floating-action-button",o);exports.resolveFloatingActionButtonSize=resolveFloatingActionButtonSize;const validateComponentTokens=e=>{for(const o of Object.keys(_tokensGenerated.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}`)}};exports.validateComponentTokens=validateComponentTokens;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateComponentTokens=exports.resolveTabsSize=exports.resolveSwitchSize=exports.resolveSliderSize=exports.resolveSegmentedControlSize=exports.resolveRadioSize=exports.resolveOtpInputSize=exports.resolveListItemSize=exports.resolveFloatingActionButtonSize=exports.resolveFieldSize=exports.resolveEmptyStateSize=exports.resolveChipSize=exports.resolveCheckboxSize=exports.resolveButtonSize=exports.resolveBadgeSize=void 0;var _guards=require("../utils/guards.js"),_scale=require("./scale.js"),_tokensGenerated=require("./tokens.generated.js");const SIZE_KEYS=["xs","sm","md","lg","xl"],kindOf=(e,t,i)=>{const o=_tokensGenerated.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(0,_scale.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(!(0,_guards.isRecord)(o))throw new Error(`components.${t} is missing in the theme.`);const s=o[i];if(!(0,_guards.isRecord)(s))throw new Error(`components.${t} has no "${i}" size in the theme.`);const n={};for(const o of Object.keys(s))n[o]=pixelsOf(e,kindOf(t,o,i),s[o],`components.${t}.${i}.${o}`);return n},sizeToken=(e,t,i,o)=>{const s=e[o];if(void 0===s)throw new Error(`components.${t}.${i}.${o} is missing`);return s},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")}};exports.resolveButtonSize=resolveButtonSize;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")}};exports.resolveFieldSize=resolveFieldSize;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")}};exports.resolveEmptyStateSize=resolveEmptyStateSize;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")}};exports.resolveListItemSize=resolveListItemSize;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")}};exports.resolveBadgeSize=resolveBadgeSize;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")}};exports.resolveChipSize=resolveChipSize;const resolveCheckboxSize=(e,t)=>{const i=resolveSize(e,"checkbox",t);return{"box-size":sizeToken(i,"checkbox",t,"box-size")}};exports.resolveCheckboxSize=resolveCheckboxSize;const resolveRadioSize=(e,t)=>{const i=resolveSize(e,"radio",t);return{outer:sizeToken(i,"radio",t,"outer"),inner:sizeToken(i,"radio",t,"inner")}};exports.resolveRadioSize=resolveRadioSize;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")}};exports.resolveSwitchSize=resolveSwitchSize;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")}};exports.resolveOtpInputSize=resolveOtpInputSize;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")}};exports.resolveSegmentedControlSize=resolveSegmentedControlSize;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")}};exports.resolveTabsSize=resolveTabsSize;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")}};exports.resolveSliderSize=resolveSliderSize;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")}};exports.resolveFloatingActionButtonSize=resolveFloatingActionButtonSize;const validateComponentTokens=e=>{for(const t of(0,_guards.keysOf)(_tokensGenerated.COMPONENT_KINDS))for(const[i,o]of Object.entries(e.components[t]))(0,_guards.isOneOf)(SIZE_KEYS,i)?resolveSize(e,t,i):pixelsOf(e,kindOf(t,i),o,`components.${t}.${i}`)};exports.validateComponentTokens=validateComponentTokens;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeBrand=void 0;var _componentSizes=require("./componentSizes.js"),_tokensGenerated=require("./tokens.generated.js"),_toneInk=require("./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 t of Object.keys(e))if(!BRAND_KEYS.includes(t))throw new Error(`A brand sets colors, radius and font only; ${t} is not allowed (allowed: colors, radius, font). ${HINT}`);const t=e.colors;if(void 0!==t&&!isPlainObject(t))throw new Error(`A brand's colors is an object of light and dark; got ${typeof t}. ${HINT}`);for(const e of Object.keys(t??{})){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 o=t[e];if(void 0===o)throw new Error(`A brand's ${e} colours are missing. ${HINT}`);for(const e of Object.keys(o)){if(!_tokensGenerated.COLOR_NAMES.includes(e))throw new Error(`unknown colour ${e}; allowed: ${_tokensGenerated.COLOR_NAMES.join(", ")}. ${HINT}`);if(void 0!==o[e]&&"string"!=typeof o[e])throw new Error(`colour ${e} must be a string; got ${typeof o[e]}.`)}}const o=e.radius;if(void 0!==o&&!isPlainObject(o))throw new Error(`A brand's radius is an object of radius names; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o??{})){const t=o[e];if(!_tokensGenerated.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 t||!Number.isFinite(t))throw new Error(`radius ${e} must be a number; got ${typeof t}.`)}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(!_tokensGenerated.FONT_NAMES.includes(e))throw new Error(`unknown font ${e}; allowed: ${_tokensGenerated.FONT_NAMES.join(", ")}. ${HINT}`);const t=n[e];if(!isPlainObject(t))throw new Error(`font ${e} must be an object of weights; got ${typeof t}. ${HINT}`);for(const o of Object.keys(t)){if(!_tokensGenerated.WEIGHT_NAMES.includes(o))throw new Error(`unknown font weight ${o} in font ${e}; allowed: ${_tokensGenerated.WEIGHT_NAMES.join(", ")}. ${HINT}`);const n=t[o];if("string"!=typeof n||0===n.length)throw new Error(`font ${e} weight ${o} 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 t of Object.keys(e))if(!SETTINGS_KEYS.includes(t))throw new Error(`Theme settings take ${SETTINGS_KEYS.join(", ")} only; ${t} is not allowed. ${HINT}`);const t=e.components;if(void 0===t)return;if(!isPlainObject(t))throw new Error(`Theme settings components is an object of component names; got ${typeof t}. ${HINT}`);const o=COMPONENT_SETTING_KEYS;for(const e of Object.keys(t)){if(!Object.keys(o).includes(e))throw new Error(`unknown component ${e} in theme settings; allowed: ${Object.keys(COMPONENT_SETTING_KEYS).join(", ")}. ${HINT}`);const n=t[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=o[e];if(void 0===r)throw new Error(`theme settings for ${e} have no allowed keys table. ${HINT}`);for(const t of Object.keys(n))if(!(t in r))throw new Error(`unknown setting ${t} for ${e}; allowed: ${Object.keys(r).join(", ")}. ${HINT}`)}},TONES=["primary","success","warning","danger","info"],mergeBrand=(e,t,o)=>{validateBrand(t),validateSettings(o);const n=Object.fromEntries(Object.entries(t?.colors?.[e.mode]??{}).filter(([,e])=>void 0!==e)),r={...e.colors,...n},colorOf=e=>{const t=r[e];if(void 0===t)throw new Error(`The theme has no colour ${e}.`);return t},s={...e.radius,...t?.radius},i={...e.font};for(const o of Object.keys(t?.font??{}))i[o]={...e.font[o],...t?.font?.[o]};const a=[colorOf("bg"),colorOf("bg-subtle"),colorOf("bg-muted")],d={};for(const t of TONES){const o="string"==typeof n[t];let r=colorOf(t);if(o||"string"==typeof n[`on-${t}`]){const e=(0,_toneInk.deriveSolidFill)(r,colorOf(`on-${t}`));e!==r&&(d[t]=e,r=e)}if(o&&"string"!=typeof n[`${t}-text`]&&(d[`${t}-text`]=(0,_toneInk.deriveToneInk)(r,a,e.mode)),"primary"===t&&(o||void 0!==d.primary)){const t=(0,_toneInk.deriveStateFills)(r,colorOf("on-primary"),{fill:e.colors.primary,hover:e.colors["primary-hover"],pressed:e.colors["primary-pressed"]});"string"!=typeof n["primary-hover"]&&(d["primary-hover"]=t.hover),"string"!=typeof n["primary-pressed"]&&(d["primary-pressed"]=t.pressed)}}const l={},f=new Set([...Object.keys(e.settings.components),...Object.keys(o?.components??{})]);for(const t of f)l[t]={...e.settings.components[t],...o?.components?.[t]};const c=o?.maxFontSizeMultiplier??e.settings.maxFontSizeMultiplier,u={icons:{...e.settings.icons,...o?.icons},gradients:{...e.settings.gradients,...o?.gradients},textVariants:{...e.settings.textVariants,...o?.textVariants},components:l,...void 0===c?{}:{maxFontSizeMultiplier:c}},w={...e,colors:{...r,...d},radius:s,font:i,settings:u};return(0,_componentSizes.validateComponentTokens)(w),w};exports.mergeBrand=mergeBrand;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeBrand=void 0;var _guards=require("../utils/guards.js"),_componentSizes=require("./componentSizes.js"),_tokensGenerated=require("./tokens.generated.js"),_toneInk=require("./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}`);if((0,_guards.isRecord)(o))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}`);if(!(0,_guards.isRecord)(t))throw new Error(`A brand's ${e} colours is an object of colour names; got ${typeof t}. ${HINT}`);for(const e of Object.keys(t)){if(!(0,_guards.isOneOf)(_tokensGenerated.COLOR_NAMES,e))throw new Error(`unknown colour ${e}; allowed: ${_tokensGenerated.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){if(!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(!(0,_guards.isOneOf)(_tokensGenerated.RADIUS_NAMES,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){if(!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(!(0,_guards.isOneOf)(_tokensGenerated.FONT_NAMES,e))throw new Error(`unknown font ${e}; allowed: ${_tokensGenerated.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(!(0,_guards.isOneOf)(_tokensGenerated.WEIGHT_NAMES,t))throw new Error(`unknown font weight ${t} in font ${e}; allowed: ${_tokensGenerated.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(!(0,_guards.isOneOf)(SETTINGS_KEYS,o))throw new Error(`Theme settings take ${SETTINGS_KEYS.join(", ")} only; ${o} is not allowed. ${HINT}`);const o=e.components;if(void 0!==o){if(!isPlainObject(o))throw new Error(`Theme settings components is an object of component names; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o)){if(!(0,_guards.hasKey)(COMPONENT_SETTING_KEYS,e))throw new Error(`unknown component ${e} in theme settings; allowed: ${Object.keys(COMPONENT_SETTING_KEYS).join(", ")}. ${HINT}`);const t=o[e];if(void 0===t)continue;if(!isPlainObject(t))throw new Error(`theme settings for ${e} is an object; got ${typeof t}. ${HINT}`);const n=COMPONENT_SETTING_KEYS[e];for(const o of Object.keys(t))if(!(o in n))throw new Error(`unknown setting ${o} for ${e}; allowed: ${Object.keys(n).join(", ")}. ${HINT}`)}}},TONES=["primary","success","warning","danger","info"],setComponentSettings=(e,o,t)=>{e[o]=t},mergeComponentSettings=(e,o,t)=>({...(0,_guards.hasKey)(e,t)?e[t]:void 0,...void 0!==o&&(0,_guards.hasKey)(o,t)?o[t]:void 0}),mergeBrand=(e,o,t)=>{validateBrand(o),validateSettings(t);const n={};for(const[t,r]of Object.entries(o?.colors?.[e.mode]??{}))void 0!==r&&(n[t]=r);const 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},s={...e.radius,...o?.radius},i={...e.font};if(void 0!==o?.font)for(const t of(0,_guards.keysOf)(o.font))i[t]={...e.font[t],...o.font[t]};const a=[colorOf("bg"),colorOf("bg-subtle"),colorOf("bg-muted")],d={};for(const o of TONES){const t="string"==typeof n[o];let r=colorOf(o);if(t||"string"==typeof n[`on-${o}`]){const e=(0,_toneInk.deriveSolidFill)(r,colorOf(`on-${o}`));e!==r&&(d[o]=e,r=e)}if(t&&"string"!=typeof n[`${o}-text`]&&(d[`${o}-text`]=(0,_toneInk.deriveToneInk)(r,a,e.mode)),"primary"===o&&(t||void 0!==d.primary)){const o=(0,_toneInk.deriveStateFills)(r,colorOf("on-primary"),{fill:e.colors.primary,hover:e.colors["primary-hover"],pressed:e.colors["primary-pressed"]});"string"!=typeof n["primary-hover"]&&(d["primary-hover"]=o.hover),"string"!=typeof n["primary-pressed"]&&(d["primary-pressed"]=o.pressed)}}const f=e.settings.components,l=t?.components,c={},u=new Set([...(0,_guards.keysOf)(f),...void 0===l?[]:(0,_guards.keysOf)(l)]);for(const e of u)setComponentSettings(c,e,mergeComponentSettings(f,l,e));const g=t?.maxFontSizeMultiplier??e.settings.maxFontSizeMultiplier,p={icons:{...e.settings.icons,...t?.icons},gradients:{...e.settings.gradients,...t?.gradients},textVariants:{...e.settings.textVariants,...t?.textVariants},components:c,...void 0===g?{}:{maxFontSizeMultiplier:g}},w={...e.colors};for(const e of _tokensGenerated.COLOR_NAMES)w[e]=d[e]??r[e];const m={...e,colors:w,radius:s,font:i,settings:p};return(0,_componentSizes.validateComponentTokens)(m),m};exports.mergeBrand=mergeBrand;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.textOf=exports.spaceOf=exports.scaleStep=exports.radiusOf=void 0;const scaleStep=(e,t,s,r)=>{const a="space"===t?e.space:"radius"===t?e.radius:e.text,c=a[s],o="text"===t?c?.size:c;if("number"!=typeof o){const e=Object.keys(a).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 o};exports.scaleStep=scaleStep;const spaceOf=(e,t)=>scaleStep(e,"space",t);exports.spaceOf=spaceOf;const radiusOf=(e,t)=>scaleStep(e,"radius",t);exports.radiusOf=radiusOf;const textOf=(e,t)=>scaleStep(e,"text",t);exports.textOf=textOf;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.textOf=exports.spaceOf=exports.scaleStep=exports.radiusOf=void 0;var _guards=require("../utils/guards.js");const scaleStep=(e,s,t,r)=>{const a="space"===s?e.space:"radius"===s?e.radius:e.text,o=a[t],c="text"===s?(0,_guards.isRecord)(o)?o.size:void 0:o;if("number"!=typeof c){const e=Object.keys(a).join(", ");throw new Error(`${r?`${r} is `:""}${JSON.stringify(t)}, which is not a ${"text"===s?"text size":"radius"===s?"corner":"space"} name. Use one of: ${e}.`)}return c};exports.scaleStep=scaleStep;const spaceOf=(e,s)=>scaleStep(e,"space",s);exports.spaceOf=spaceOf;const radiusOf=(e,s)=>scaleStep(e,"radius",s);exports.radiusOf=radiusOf;const textOf=(e,s)=>scaleStep(e,"text",s);exports.textOf=textOf;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";function isOneOf(e,s){return e.some(e=>e===s)}function hasKey(e,s){return Object.hasOwn(e,s)}function isRecord(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function keysOf(e){return Object.keys(e).filter(s=>hasKey(e,s))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.hasKey=hasKey,exports.isOneOf=isOneOf,exports.isRecord=isRecord,exports.keysOf=keysOf;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.triggerHaptic=exports.setHapticsEnabled=exports.setHapticImplementation=exports.resolveHaptic=exports.isHapticsEnabled=void 0;var cache,Haptics=_interopRequireWildcard(require("expo-haptics")),_reactNative=require("react-native");function _interopRequireWildcard(t,e){if(!e&&t&&t.__esModule)return t;var c,i,a=Object.defineProperty,s={__proto__:null,default:t};if(Object(t)!==t)return s;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(t))return cache.get(t);cache.set(t,s)}for(i in t)"default"!==i&&{}.hasOwnProperty.call(t,i)&&((c=a&&Object.getOwnPropertyDescriptor(t,i))&&(c.get||c.set)?a(s,i,c):s[i]=t[i]);return s}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 e=ANDROID_HAPTICS[t];return"android"===_reactNative.Platform.OS&&e&&"function"==typeof Haptics.performAndroidHapticsAsync&&Haptics.AndroidHaptics?.[e]?()=>Haptics.performAndroidHapticsAsync(Haptics.AndroidHaptics[e]):null};let hapticsEnabled=!0;const setHapticsEnabled=t=>{hapticsEnabled=t};exports.setHapticsEnabled=setHapticsEnabled;const isHapticsEnabled=()=>hapticsEnabled;exports.isHapticsEnabled=isHapticsEnabled;const triggerHaptic=(t="selection")=>{if(!hapticsEnabled)return;if(hapticImpl)try{return void hapticImpl(t)}catch{}const e=androidHandler(t)??EXPO_HANDLERS[t];try{e().catch(()=>{})}catch{}};exports.triggerHaptic=triggerHaptic;const setHapticImplementation=t=>{hapticImpl=t};exports.setHapticImplementation=setHapticImplementation;const resolveHaptic=(t,e)=>!1===t?null:t??e;exports.resolveHaptic=resolveHaptic;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.triggerHaptic=exports.setHapticsEnabled=exports.setHapticImplementation=exports.resolveHaptic=exports.isHapticsEnabled=void 0;var cache,_mobileCore=require("@webority/mobile-core"),Haptics=_interopRequireWildcard(require("expo-haptics")),_reactNative=require("react-native");function _interopRequireWildcard(t,e){if(!e&&t&&t.__esModule)return t;var i,c,a=Object.defineProperty,r={__proto__:null,default:t};if(Object(t)!==t)return r;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(t))return cache.get(t);cache.set(t,r)}for(c in t)"default"!==c&&{}.hasOwnProperty.call(t,c)&&((i=a&&Object.getOwnPropertyDescriptor(t,c))&&(i.get||i.set)?a(r,c,i):r[c]=t[c]);return r}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 e=ANDROID_HAPTICS[t];return"android"===_reactNative.Platform.OS&&e&&"function"==typeof Haptics.performAndroidHapticsAsync&&Haptics.AndroidHaptics?.[e]?()=>Haptics.performAndroidHapticsAsync(Haptics.AndroidHaptics[e]):null};let hapticsEnabled=!0;const setHapticsEnabled=t=>{hapticsEnabled=t};exports.setHapticsEnabled=setHapticsEnabled;const isHapticsEnabled=()=>hapticsEnabled;exports.isHapticsEnabled=isHapticsEnabled;const triggerHaptic=(t="selection")=>{if(!hapticsEnabled)return;if(hapticImpl)try{return void hapticImpl(t)}catch(t){_mobileCore.Logger.recordError(t,{op:"triggerHaptic"})}const e=androidHandler(t)??EXPO_HANDLERS[t];try{e().catch(t=>{_mobileCore.Logger.recordError(t,{op:"triggerHaptic"})})}catch(t){_mobileCore.Logger.recordError(t,{op:"triggerHaptic"})}};exports.triggerHaptic=triggerHaptic;const setHapticImplementation=t=>{hapticImpl=t};exports.setHapticImplementation=setHapticImplementation;const resolveHaptic=(t,e)=>!1===t?null:t??e;exports.resolveHaptic=resolveHaptic;
@@ -1 +1 @@
1
- "use strict";import{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,LayoutAnimation,Pressable,StyleSheet,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{defaultIcons}from"../AppIcon/defaultIcons.js";import{Skeleton}from"../Skeleton/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const AccordionGroupContext=createContext(null),useAccordionGroup=()=>useContext(AccordionGroupContext),AccordionGroup=({children:e,allowMultiple:t=!1,defaultExpandedKeys:o,expandedKeys:i,onChange:n,style:r,testID:s})=>{const a=void 0!==i,[l,c]=useState(o??[]),d=a?i:l,u=useCallback(e=>{a||c(e),n?.(e)},[a,n]),p=useCallback(e=>{let o;o=d.includes(e)?d.filter(t=>t!==e):t?[...d,e]:[e],u(o)},[d,t,u]),m=useCallback(e=>d.includes(e),[d]),h=useMemo(()=>({isExpanded:m,toggle:p,allowMultiple:t}),[m,p,t]);return _jsx(AccordionGroupContext.Provider,{value:h,children:_jsx(View,{style:r,testID:s,children:e})})};AccordionGroup.displayName="AccordionGroup";const Chevron=({rotate:e,color:t})=>{const o=useTheme();return _jsx(Animated.View,{style:[chevronStyles.icon,{transform:[{rotate:e}]}],accessible:!1,children:(o.settings.icons.chevronDown??defaultIcons.chevronDown)({size:16,color:t})})},chevronStyles=StyleSheet.create({icon:{width:16,height:16,alignItems:"center",justifyContent:"center"}}),Accordion=e=>{const{title:t,children:o,id:i,expanded:n,defaultExpanded:r=!1,onChange:s,icon:a,disabled:l=!1,variant:c="plain",accessibilityLabel:d,style:u,headerStyle:p,contentStyle:m,contentWrapperStyle:h,containerStyle:x,testID:y,loading:g=!1,haptic:f}=e;assertValidValue("Accordion","variant",e.variant,["plain","card"]);const b=useTheme(),A=usePresenceMotion(),j=A.duration("default"),v=useMemo(()=>buildStyles(b),[b]),S=useAccordionGroup(),V=void 0!==n,[w,C]=useState(r),k=S&&i?S.isExpanded(i):null,_=null!==k?k:V?!!n:w,[R,I]=useState(null),D=useRef(createAnimatedValue(_?1:0)).current,E=useRef(createAnimatedValue(_?1:0)).current,G=useRef(createAnimatedValue(_?1:0)).current,L=useRef(_);useEffect(()=>{if(L.current===_)return;L.current=_;const e=_?1:0,t=Easing.bezier(...b.motion.ease["in-out"]),o=Animated.timing(D,{toValue:e,duration:b.motion.duration.default,easing:t,useNativeDriver:!1}),i=Animated.timing(E,{toValue:e,duration:j,easing:t,useNativeDriver:!1}),n=Animated.timing(G,{toValue:e,duration:b.motion.duration.default,easing:t,useNativeDriver:!1}),r=A.reduced&&!_?Animated.sequence([i,Animated.parallel([o,n])]):Animated.parallel([o,i,n]);return r.start(),()=>r.stop()},[_,D,E,G,j,A.reduced,b.motion]);const M=useCallback(e=>{const t=e.nativeEvent.layout.height;t>0&&t!==R&&I(t)},[R]),P=useCallback(()=>{if(l)return;const e=resolveHaptic(f,"selection");if(e&&triggerHaptic(e),S&&i)return S.toggle(i),void s?.(!_);V||C(!_),s?.(!_)},[l,S,i,_,V,s,f]),T=G.interpolate({inputRange:[0,1],outputRange:["0deg","180deg"]}),H=null===R?void 0:D.interpolate({inputRange:[0,1],outputRange:[0,R]}),N="card"===c?[v.card,b.shadow.card,{backgroundColor:b.colors.surface,borderRadius:b.radius.md,...smoothCorners}]:null;return g?_jsx(AccordionSkeleton,{...e}):_jsxs(View,{style:[N,x,u],testID:y,children:[_jsxs(Pressable,{onPress:P,disabled:l,accessibilityRole:"button",accessibilityLabel:d??t,accessibilityState:{expanded:_,disabled:l},"aria-expanded":_,"aria-disabled":l,style:({pressed:e})=>[v.header,p,{opacity:l?.55:e?.85:1}],children:[a?_jsx(View,{style:v.iconLeft,children:a}):null,_jsx(Text,{variant:"body",weight:"semibold",color:l?"disabled":"primary",numberOfLines:2,style:v.title,children:t}),_jsx(Chevron,{rotate:T,color:l?b.colors["text-disabled"]:b.colors["text-muted"]})]}),null===R?_jsx(View,{style:v.measurer,pointerEvents:"none",onLayout:M,children:_jsx(View,{style:[v.content,m],children:o})}):null,_jsx(Animated.View,{style:[v.contentWrapper,null===R?{height:0,opacity:0}:{height:H,opacity:E},h],children:_jsx(View,{onLayout:M,style:[v.content,m],children:o})})]})};Accordion.displayName="Accordion";const AccordionSkeleton=({variant:e="plain",style:t})=>{const o=useTheme();return _jsx(View,{style:["card"===e?{paddingHorizontal:o.space.md,paddingVertical:o.space.sm,backgroundColor:o.colors.surface,borderRadius:o.radius.md,...smoothCorners}:{paddingVertical:o.space.sm},t],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:_jsxs(View,{style:{flexDirection:"row",alignItems:"center"},children:[_jsx(Skeleton,{shape:"text",width:"60%",height:18,style:{flex:1}}),_jsx(Skeleton,{width:16,height:16,radius:"sm",style:{marginLeft:o.space.sm}})]})})};AccordionSkeleton.displayName="AccordionSkeleton",Accordion.Skeleton=AccordionSkeleton;const buildStyles=e=>StyleSheet.create({card:{paddingHorizontal:e.space.md,paddingVertical:e.space.xs,marginVertical:e.space.xs},header:{flexDirection:"row",alignItems:"center",paddingVertical:e.space.sm},iconLeft:{marginRight:e.space.sm},title:{flex:1},contentWrapper:{overflow:"hidden"},content:{paddingBottom:e.space.sm},measurer:{position:"absolute",opacity:0,left:0,right:0,top:0,zIndex:-1}});export{Accordion,AccordionGroup};export default Accordion;
1
+ "use strict";import{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,LayoutAnimation,Pressable,StyleSheet,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{defaultIcons}from"../AppIcon/defaultIcons.js";import{Skeleton}from"../Skeleton/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const AccordionGroupContext=createContext(null),useAccordionGroup=()=>useContext(AccordionGroupContext),AccordionGroup=({children:e,allowMultiple:t=!1,defaultExpandedKeys:o,expandedKeys:i,onChange:n,style:r,testID:s})=>{const a=void 0!==i,[l,c]=useState(o??[]),d=i??l,u=useCallback(e=>{a||c(e),n?.(e)},[a,n]),p=useCallback(e=>{let o;o=d.includes(e)?d.filter(t=>t!==e):t?[...d,e]:[e],u(o)},[d,t,u]),m=useCallback(e=>d.includes(e),[d]),h=useMemo(()=>({isExpanded:m,toggle:p,allowMultiple:t}),[m,p,t]);return _jsx(AccordionGroupContext.Provider,{value:h,children:_jsx(View,{style:r,testID:s,children:e})})};AccordionGroup.displayName="AccordionGroup";const Chevron=({rotate:e,color:t})=>{const o=useTheme();return _jsx(Animated.View,{style:[chevronStyles.icon,{transform:[{rotate:e}]}],accessible:!1,children:(o.settings.icons.chevronDown??defaultIcons.chevronDown)({size:16,color:t})})},chevronStyles=StyleSheet.create({icon:{width:16,height:16,alignItems:"center",justifyContent:"center"}}),Accordion=e=>{const{title:t,children:o,id:i,expanded:n,defaultExpanded:r=!1,onChange:s,icon:a,disabled:l=!1,variant:c="plain",accessibilityLabel:d,style:u,headerStyle:p,contentStyle:m,contentWrapperStyle:h,containerStyle:x,testID:y,loading:g=!1,haptic:f}=e;assertValidValue("Accordion","variant",e.variant,["plain","card"]);const b=useTheme(),A=usePresenceMotion(),j=A.duration("default"),v=useMemo(()=>buildStyles(b),[b]),S=useAccordionGroup(),V=void 0!==n,[w,C]=useState(r),k=S&&i?S.isExpanded(i):null,_=null!==k?k:V?!!n:w,[R,I]=useState(null),D=useRef(createAnimatedValue(_?1:0)).current,E=useRef(createAnimatedValue(_?1:0)).current,G=useRef(createAnimatedValue(_?1:0)).current,L=useRef(_);useEffect(()=>{if(L.current===_)return;L.current=_;const e=_?1:0,t=Easing.bezier(...b.motion.ease["in-out"]),o=Animated.timing(D,{toValue:e,duration:b.motion.duration.default,easing:t,useNativeDriver:!1}),i=Animated.timing(E,{toValue:e,duration:j,easing:t,useNativeDriver:!1}),n=Animated.timing(G,{toValue:e,duration:b.motion.duration.default,easing:t,useNativeDriver:!1}),r=A.reduced&&!_?Animated.sequence([i,Animated.parallel([o,n])]):Animated.parallel([o,i,n]);return r.start(),()=>r.stop()},[_,D,E,G,j,A.reduced,b.motion]);const M=useCallback(e=>{const t=e.nativeEvent.layout.height;t>0&&t!==R&&I(t)},[R]),P=useCallback(()=>{if(l)return;const e=resolveHaptic(f,"selection");if(e&&triggerHaptic(e),S&&i)return S.toggle(i),void s?.(!_);V||C(!_),s?.(!_)},[l,S,i,_,V,s,f]),T=G.interpolate({inputRange:[0,1],outputRange:["0deg","180deg"]}),H=null===R?void 0:D.interpolate({inputRange:[0,1],outputRange:[0,R]}),N="card"===c?[v.card,b.shadow.card,{backgroundColor:b.colors.surface,borderRadius:b.radius.md,...smoothCorners}]:null;return g?_jsx(AccordionSkeleton,{...e}):_jsxs(View,{style:[N,x,u],testID:y,children:[_jsxs(Pressable,{onPress:P,disabled:l,accessibilityRole:"button",accessibilityLabel:d??t,accessibilityState:{expanded:_,disabled:l},"aria-expanded":_,"aria-disabled":l,style:({pressed:e})=>[v.header,p,{opacity:l?.55:e?.85:1}],children:[a?_jsx(View,{style:v.iconLeft,children:a}):null,_jsx(Text,{variant:"body",weight:"semibold",color:l?"disabled":"primary",numberOfLines:2,style:v.title,children:t}),_jsx(Chevron,{rotate:T,color:l?b.colors["text-disabled"]:b.colors["text-muted"]})]}),null===R?_jsx(View,{style:v.measurer,pointerEvents:"none",onLayout:M,children:_jsx(View,{style:[v.content,m],children:o})}):null,_jsx(Animated.View,{style:[v.contentWrapper,null===R?{height:0,opacity:0}:{height:H,opacity:E},h],children:_jsx(View,{onLayout:M,style:[v.content,m],children:o})})]})};Accordion.displayName="Accordion";const AccordionSkeleton=({variant:e="plain",style:t})=>{const o=useTheme();return _jsx(View,{style:["card"===e?{paddingHorizontal:o.space.md,paddingVertical:o.space.sm,backgroundColor:o.colors.surface,borderRadius:o.radius.md,...smoothCorners}:{paddingVertical:o.space.sm},t],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:_jsxs(View,{style:{flexDirection:"row",alignItems:"center"},children:[_jsx(Skeleton,{shape:"text",width:"60%",height:18,style:{flex:1}}),_jsx(Skeleton,{width:16,height:16,radius:"sm",style:{marginLeft:o.space.sm}})]})})};AccordionSkeleton.displayName="AccordionSkeleton",Accordion.Skeleton=AccordionSkeleton;const buildStyles=e=>StyleSheet.create({card:{paddingHorizontal:e.space.md,paddingVertical:e.space.xs,marginVertical:e.space.xs},header:{flexDirection:"row",alignItems:"center",paddingVertical:e.space.sm},iconLeft:{marginRight:e.space.sm},title:{flex:1},contentWrapper:{overflow:"hidden"},content:{paddingBottom:e.space.sm},measurer:{position:"absolute",opacity:0,left:0,right:0,top:0,zIndex:-1}});export{Accordion,AccordionGroup};export default Accordion;
@@ -1 +1 @@
1
- "use strict";import{Logger}from"@webority/mobile-core";import{useMemo}from"react";import{SvgXml}from"react-native-svg";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{resolveColor}from"../Text/Text.js";import{CATALOG_LOADERS,ICON_NAMES}from"./catalog.g.js";import{CURATED_ICON_NAMES,GLYPHS}from"./glyphs.g.js";import{jsx as _jsx}from"react/jsx-runtime";export{CURATED_ICON_NAMES,ICON_NAMES};export const ICONSAX_SUFFIX="-iconsax";export const APP_ICON_SIZES={xs:14,sm:18,md:22,lg:28,xl:36};const tryRequire=e=>{try{return e()}catch{return null}};let curatedVariants=null;const loadCuratedVariants=()=>(curatedVariants||(curatedVariants=tryRequire(()=>require("./variants.g").VARIANT_GLYPHS)??{}),curatedVariants),shardCache=new Map,loadShard=(e,r)=>{const t=r[0]?.toLowerCase()??"",o=`${e}:${t}`,a=shardCache.get(o);if(void 0!==a)return a;const n=CATALOG_LOADERS[e]?.[t],s=n?tryRequire(n):null;return shardCache.set(o,s),s},warned=new Set,resolveCatalogue=(e,r)=>{const t=loadShard(r,e)?.[e];return t||("linear"===r?null:loadShard("linear",e)?.[e]??null)};export const resolveGlyph=(e,r="linear")=>{if(e.endsWith("-iconsax")){const t=e.slice(0,-8);return t in GLYPHS?resolveCatalogue(t,r):null}const t=GLYPHS[e];return t?"linear"===r?t:loadCuratedVariants()[r]?.[e]??t:resolveCatalogue(e,r)};export const buildIconXml=(e,r,t)=>`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 24 24" fill="none">${e.replace(/currentColor/g,t)}</svg>`;const iconXmlCache=new Map;export const AppIcon=({name:e,size:r="md",color:t,variant:o="linear",style:a,accessibilityLabel:n,testID:s})=>{const l=useTheme();"string"==typeof r&&assertValidValue("AppIcon","size",r,Object.keys(APP_ICON_SIZES)),assertValidValue("AppIcon","variant",o,["linear","bold","bulk","broken","outline","twotone"]);const i="number"==typeof r?r:APP_ICON_SIZES[r]??APP_ICON_SIZES.md,c=void 0===t?l.colors["text-body"]:resolveColor(l,t),u=resolveGlyph(e,o),m=useMemo(()=>{if(!u)return null;const r=`${e}|${o}|${i}|${c}`,t=iconXmlCache.get(r);if(void 0!==t)return t;iconXmlCache.size>=500&&iconXmlCache.clear();const a=buildIconXml(u,i,c);return iconXmlCache.set(r,a),a},[e,o,u,i,c]);return m?_jsx(SvgXml,{xml:m,width:i,height:i,style:a,accessible:null!=n,accessibilityLabel:n,accessibilityRole:null!=n?"image":void 0,testID:s}):(__DEV__&&!warned.has(e)&&(warned.add(e),Logger.warn(`[@webority/mobile-ui] AppIcon: Unknown icon "${e}". Names come from webority-ui's icon map and the Iconsax catalogue; run node scripts/gen-icons.mjs after adding one there.`)),null)};AppIcon.displayName="AppIcon";export default AppIcon;
1
+ "use strict";import{Logger}from"@webority/mobile-core";import{useMemo}from"react";import{SvgXml}from"react-native-svg";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{hasKey}from"../../utils/guards.js";import{resolveColor}from"../Text/Text.js";import{CATALOG_LOADERS,ICON_NAMES}from"./catalog.g.js";import{CURATED_ICON_NAMES,GLYPHS}from"./glyphs.g.js";import{jsx as _jsx}from"react/jsx-runtime";export{CURATED_ICON_NAMES,ICON_NAMES};export const ICONSAX_SUFFIX="-iconsax";export const APP_ICON_SIZES={xs:14,sm:18,md:22,lg:28,xl:36};const tryRequire=e=>{try{return e()}catch{return null}};let curatedVariants=null;const loadCuratedVariants=()=>(curatedVariants||(curatedVariants=tryRequire(()=>require("./variants.g").VARIANT_GLYPHS)??{}),curatedVariants),shardCache=new Map,loadShard=(e,r)=>{const t=r[0]?.toLowerCase()??"",o=`${e}:${t}`,a=shardCache.get(o);if(void 0!==a)return a;const s=CATALOG_LOADERS[e]?.[t],n=s?tryRequire(s):null;return shardCache.set(o,n),n},warned=new Set,resolveCatalogue=(e,r)=>{const t=loadShard(r,e)?.[e];return t||("linear"===r?null:loadShard("linear",e)?.[e]??null)};export const resolveGlyph=(e,r="linear")=>{if(e.endsWith("-iconsax")){const t=e.slice(0,-8);return t in GLYPHS?resolveCatalogue(t,r):null}const t=hasKey(GLYPHS,e)?GLYPHS[e]:void 0;return t?"linear"===r?t:loadCuratedVariants()[r]?.[e]??t:resolveCatalogue(e,r)};export const buildIconXml=(e,r,t)=>`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 24 24" fill="none">${e.replace(/currentColor/g,t)}</svg>`;const iconXmlCache=new Map;export const AppIcon=({name:e,size:r="md",color:t,variant:o="linear",style:a,accessibilityLabel:s,testID:n})=>{const l=useTheme();"string"==typeof r&&assertValidValue("AppIcon","size",r,Object.keys(APP_ICON_SIZES)),assertValidValue("AppIcon","variant",o,["linear","bold","bulk","broken","outline","twotone"]);const i="number"==typeof r?r:APP_ICON_SIZES[r]??APP_ICON_SIZES.md,c=void 0===t?l.colors["text-body"]:resolveColor(l,t),u=resolveGlyph(e,o),m=useMemo(()=>{if(!u)return null;const r=`${e}|${o}|${i}|${c}`,t=iconXmlCache.get(r);if(void 0!==t)return t;iconXmlCache.size>=500&&iconXmlCache.clear();const a=buildIconXml(u,i,c);return iconXmlCache.set(r,a),a},[e,o,u,i,c]);if(!m)return __DEV__&&!warned.has(e)&&(warned.add(e),Logger.warn(`[@webority/mobile-ui] AppIcon: Unknown icon "${e}". Names come from webority-ui's icon map and the Iconsax catalogue; run node scripts/gen-icons.mjs after adding one there.`)),null;return _jsx(SvgXml,{xml:m,width:i,height:i,...void 0!==a?{style:a}:{},accessible:null!=s,...null!=s?{accessibilityLabel:s,accessibilityRole:"image"}:{},...void 0!==n?{testID:n}:{}})};AppIcon.displayName="AppIcon";export default AppIcon;