@webority/mobile-ui 0.90.0 → 0.92.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 (480) hide show
  1. package/canvas-kit.json +8 -0
  2. package/lib/commonjs/components/Accordion/Accordion.meta.js +1 -0
  3. package/lib/commonjs/components/Accordion/AccordionGroup.meta.js +1 -0
  4. package/lib/commonjs/components/AmountSlider/AmountSlider.meta.js +1 -0
  5. package/lib/commonjs/components/AnimatePresence/AnimatePresence.meta.js +1 -0
  6. package/lib/commonjs/components/AppBar/AppBar.meta.js +1 -0
  7. package/lib/commonjs/components/AppIcon/AppIcon.meta.js +1 -0
  8. package/lib/commonjs/components/AsyncBlock/AsyncBlock.meta.js +1 -0
  9. package/lib/commonjs/components/AuthedImage/AuthedImage.meta.js +1 -0
  10. package/lib/commonjs/components/Autocomplete/Autocomplete.meta.js +1 -0
  11. package/lib/commonjs/components/Avatar/Avatar.meta.js +1 -0
  12. package/lib/commonjs/components/Avatar/AvatarGroup.meta.js +1 -0
  13. package/lib/commonjs/components/Badge/Badge.meta.js +1 -0
  14. package/lib/commonjs/components/Banner/Banner.meta.js +1 -0
  15. package/lib/commonjs/components/BarChart/BarChart.meta.js +1 -0
  16. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
  17. package/lib/commonjs/components/BottomNavigation/BottomNavigation.meta.js +1 -0
  18. package/lib/commonjs/components/BottomSheet/BottomSheet.meta.js +1 -0
  19. package/lib/commonjs/components/Box/Spacer.meta.js +1 -0
  20. package/lib/commonjs/components/Button/Button.js +1 -1
  21. package/lib/commonjs/components/Button/Button.meta.js +1 -0
  22. package/lib/commonjs/components/Calendar/Calendar.meta.js +1 -0
  23. package/lib/commonjs/components/Card/Card.js +1 -1
  24. package/lib/commonjs/components/Card/Card.meta.js +1 -0
  25. package/lib/commonjs/components/Carousel/Carousel.meta.js +1 -0
  26. package/lib/commonjs/components/Checkbox/Checkbox.meta.js +1 -0
  27. package/lib/commonjs/components/Chip/Chip.meta.js +1 -0
  28. package/lib/commonjs/components/ChoiceGroup/ChoiceGroup.meta.js +1 -0
  29. package/lib/commonjs/components/Composer/Composer.js +1 -1
  30. package/lib/commonjs/components/Composer/Composer.meta.js +1 -0
  31. package/lib/commonjs/components/Confetti/Confetti.meta.js +1 -0
  32. package/lib/commonjs/components/DatePicker/DatePicker.meta.js +1 -0
  33. package/lib/commonjs/components/DateRangePicker/DateRangePicker.meta.js +1 -0
  34. package/lib/commonjs/components/DateSeparator/DateSeparator.meta.js +1 -0
  35. package/lib/commonjs/components/DecimalInput/DecimalInput.meta.js +1 -0
  36. package/lib/commonjs/components/Descriptions/Descriptions.meta.js +1 -0
  37. package/lib/commonjs/components/Dialog/Dialog.js +1 -1
  38. package/lib/commonjs/components/Dialog/Dialog.meta.js +1 -0
  39. package/lib/commonjs/components/Divider/Divider.meta.js +1 -0
  40. package/lib/commonjs/components/Drawer/Drawer.meta.js +1 -0
  41. package/lib/commonjs/components/EmptyState/EmptyState.js +1 -1
  42. package/lib/commonjs/components/EmptyState/EmptyState.meta.js +1 -0
  43. package/lib/commonjs/components/FilePicker/FilePicker.meta.js +1 -0
  44. package/lib/commonjs/components/FileViewer/FileViewer.meta.js +1 -0
  45. package/lib/commonjs/components/FilterChipRow/FilterChipRow.meta.js +1 -0
  46. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.meta.js +1 -0
  47. package/lib/commonjs/components/FloatingActionButton/FloatingActionButtonGroup.meta.js +1 -0
  48. package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.meta.js +1 -0
  49. package/lib/commonjs/components/FormField/FormField.meta.js +1 -0
  50. package/lib/commonjs/components/IconBadge/IconBadge.meta.js +1 -0
  51. package/lib/commonjs/components/IconButton/IconButton.js +1 -1
  52. package/lib/commonjs/components/IconButton/IconButton.meta.js +1 -0
  53. package/lib/commonjs/components/ImageGallery/ImageGallery.meta.js +1 -0
  54. package/lib/commonjs/components/InlineSelect/InlineSelect.meta.js +1 -0
  55. package/lib/commonjs/components/Input/Input.js +1 -1
  56. package/lib/commonjs/components/Input/Input.meta.js +1 -0
  57. package/lib/commonjs/components/KeyboardToolbar/KeyboardToolbar.meta.js +1 -0
  58. package/lib/commonjs/components/ListItem/ListItem.meta.js +1 -0
  59. package/lib/commonjs/components/LoaderOverlay/LoaderOverlay.meta.js +1 -0
  60. package/lib/commonjs/components/Markdown/Markdown.meta.js +1 -0
  61. package/lib/commonjs/components/Menu/Menu.meta.js +1 -0
  62. package/lib/commonjs/components/MessageBubble/MessageBubble.meta.js +1 -0
  63. package/lib/commonjs/components/MessageList/MessageList.meta.js +1 -0
  64. package/lib/commonjs/components/Modal/Modal.meta.js +1 -0
  65. package/lib/commonjs/components/Notation/Notation.meta.js +1 -0
  66. package/lib/commonjs/components/NumberInput/NumberInput.meta.js +1 -0
  67. package/lib/commonjs/components/OTPInput/OTPInput.meta.js +1 -0
  68. package/lib/commonjs/components/OnboardingPager/OnboardingPager.meta.js +1 -0
  69. package/lib/commonjs/components/OptionSheet/OptionSheet.meta.js +1 -0
  70. package/lib/commonjs/components/PaymentResult/PaymentResult.meta.js +1 -0
  71. package/lib/commonjs/components/PermissionPrompt/PermissionPrompt.meta.js +1 -0
  72. package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.meta.js +1 -0
  73. package/lib/commonjs/components/PickerTrigger/PickerTrigger.meta.js +1 -0
  74. package/lib/commonjs/components/ProfileCompletion/ProfileCompletion.js +1 -1
  75. package/lib/commonjs/components/ProfileCompletion/ProfileCompletion.meta.js +1 -0
  76. package/lib/commonjs/components/ProfilePicker/ProfilePicker.meta.js +1 -0
  77. package/lib/commonjs/components/ProgressBar/ProgressBar.meta.js +1 -0
  78. package/lib/commonjs/components/ProgressRing/ProgressRing.meta.js +1 -0
  79. package/lib/commonjs/components/Radio/Radio.meta.js +1 -0
  80. package/lib/commonjs/components/Radio/RadioGroup.meta.js +1 -0
  81. package/lib/commonjs/components/Rating/Rating.meta.js +1 -0
  82. package/lib/commonjs/components/Repeater/Repeater.meta.js +1 -0
  83. package/lib/commonjs/components/RichTextEditor/RichTextEditor.meta.js +1 -0
  84. package/lib/commonjs/components/ScannerOverlay/ScannerOverlay.meta.js +1 -0
  85. package/lib/commonjs/components/Screen/Screen.meta.js +1 -0
  86. package/lib/commonjs/components/SearchBar/SearchBar.meta.js +1 -0
  87. package/lib/commonjs/components/SectionHeader/SectionHeader.meta.js +1 -0
  88. package/lib/commonjs/components/SegmentedControl/SegmentedControl.meta.js +1 -0
  89. package/lib/commonjs/components/Select/Select.meta.js +1 -0
  90. package/lib/commonjs/components/SignaturePad/SignaturePad.meta.js +1 -0
  91. package/lib/commonjs/components/Skeleton/Skeleton.meta.js +1 -0
  92. package/lib/commonjs/components/Skeleton/SkeletonCircle.meta.js +1 -0
  93. package/lib/commonjs/components/Skeleton/SkeletonContent.meta.js +1 -0
  94. package/lib/commonjs/components/Skeleton/SkeletonList.meta.js +1 -0
  95. package/lib/commonjs/components/Skeleton/SkeletonText.meta.js +1 -0
  96. package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.meta.js +1 -0
  97. package/lib/commonjs/components/Slider/Slider.meta.js +1 -0
  98. package/lib/commonjs/components/SliderField/SliderField.meta.js +1 -0
  99. package/lib/commonjs/components/Sparkline/Sparkline.meta.js +1 -0
  100. package/lib/commonjs/components/Spinner/Spinner.meta.js +1 -0
  101. package/lib/commonjs/components/SquircleView/SquircleView.meta.js +1 -0
  102. package/lib/commonjs/components/StatTile/StatTile.meta.js +1 -0
  103. package/lib/commonjs/components/StatusBadge/StatusBadge.meta.js +1 -0
  104. package/lib/commonjs/components/Stepper/Stepper.meta.js +1 -0
  105. package/lib/commonjs/components/Swipeable/Swipeable.meta.js +1 -0
  106. package/lib/commonjs/components/Switch/Switch.meta.js +1 -0
  107. package/lib/commonjs/components/Tabs/Tabs.meta.js +1 -0
  108. package/lib/commonjs/components/TagInput/TagInput.meta.js +1 -0
  109. package/lib/commonjs/components/Text/Text.js +1 -1
  110. package/lib/commonjs/components/Text/Text.meta.js +1 -0
  111. package/lib/commonjs/components/TimePicker/TimePicker.meta.js +1 -0
  112. package/lib/commonjs/components/Timeline/Timeline.meta.js +1 -0
  113. package/lib/commonjs/components/Toast/Toast.meta.js +1 -0
  114. package/lib/commonjs/components/Tooltip/Tooltip.meta.js +1 -0
  115. package/lib/commonjs/components/Tour/Tour.meta.js +1 -0
  116. package/lib/commonjs/components/TypingIndicator/TypingIndicator.meta.js +1 -0
  117. package/lib/commonjs/components/WheelPicker/WheelPickerColumns.meta.js +1 -0
  118. package/lib/commonjs/components/WheelPicker/WheelPickerDuration.meta.js +1 -0
  119. package/lib/commonjs/components/WheelPicker/WheelPickerList.meta.js +1 -0
  120. package/lib/commonjs/components/ZoomableImage/ZoomableImage.meta.js +1 -0
  121. package/lib/commonjs/components/not-drawn.json +17 -0
  122. package/lib/commonjs/theme/tokens.generated.js +1 -1
  123. package/lib/commonjs/utils/hitSlop.js +1 -0
  124. package/lib/commonjs/utils/warnInvalidValue.js +1 -0
  125. package/lib/module/components/Accordion/Accordion.meta.js +1 -0
  126. package/lib/module/components/Accordion/AccordionGroup.meta.js +1 -0
  127. package/lib/module/components/AmountSlider/AmountSlider.meta.js +1 -0
  128. package/lib/module/components/AnimatePresence/AnimatePresence.meta.js +1 -0
  129. package/lib/module/components/AppBar/AppBar.meta.js +1 -0
  130. package/lib/module/components/AppIcon/AppIcon.meta.js +1 -0
  131. package/lib/module/components/AsyncBlock/AsyncBlock.meta.js +1 -0
  132. package/lib/module/components/AuthedImage/AuthedImage.meta.js +1 -0
  133. package/lib/module/components/Autocomplete/Autocomplete.meta.js +1 -0
  134. package/lib/module/components/Avatar/Avatar.meta.js +1 -0
  135. package/lib/module/components/Avatar/AvatarGroup.meta.js +1 -0
  136. package/lib/module/components/Badge/Badge.meta.js +1 -0
  137. package/lib/module/components/Banner/Banner.meta.js +1 -0
  138. package/lib/module/components/BarChart/BarChart.meta.js +1 -0
  139. package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
  140. package/lib/module/components/BottomNavigation/BottomNavigation.meta.js +1 -0
  141. package/lib/module/components/BottomSheet/BottomSheet.meta.js +1 -0
  142. package/lib/module/components/Box/Spacer.meta.js +1 -0
  143. package/lib/module/components/Button/Button.js +1 -1
  144. package/lib/module/components/Button/Button.meta.js +1 -0
  145. package/lib/module/components/Calendar/Calendar.meta.js +1 -0
  146. package/lib/module/components/Card/Card.js +1 -1
  147. package/lib/module/components/Card/Card.meta.js +1 -0
  148. package/lib/module/components/Carousel/Carousel.meta.js +1 -0
  149. package/lib/module/components/Checkbox/Checkbox.meta.js +1 -0
  150. package/lib/module/components/Chip/Chip.meta.js +1 -0
  151. package/lib/module/components/ChoiceGroup/ChoiceGroup.meta.js +1 -0
  152. package/lib/module/components/Composer/Composer.js +1 -1
  153. package/lib/module/components/Composer/Composer.meta.js +1 -0
  154. package/lib/module/components/Confetti/Confetti.meta.js +1 -0
  155. package/lib/module/components/DatePicker/DatePicker.meta.js +1 -0
  156. package/lib/module/components/DateRangePicker/DateRangePicker.meta.js +1 -0
  157. package/lib/module/components/DateSeparator/DateSeparator.meta.js +1 -0
  158. package/lib/module/components/DecimalInput/DecimalInput.meta.js +1 -0
  159. package/lib/module/components/Descriptions/Descriptions.meta.js +1 -0
  160. package/lib/module/components/Dialog/Dialog.js +1 -1
  161. package/lib/module/components/Dialog/Dialog.meta.js +1 -0
  162. package/lib/module/components/Divider/Divider.meta.js +1 -0
  163. package/lib/module/components/Drawer/Drawer.meta.js +1 -0
  164. package/lib/module/components/EmptyState/EmptyState.js +1 -1
  165. package/lib/module/components/EmptyState/EmptyState.meta.js +1 -0
  166. package/lib/module/components/FilePicker/FilePicker.meta.js +1 -0
  167. package/lib/module/components/FileViewer/FileViewer.meta.js +1 -0
  168. package/lib/module/components/FilterChipRow/FilterChipRow.meta.js +1 -0
  169. package/lib/module/components/FloatingActionButton/FloatingActionButton.meta.js +1 -0
  170. package/lib/module/components/FloatingActionButton/FloatingActionButtonGroup.meta.js +1 -0
  171. package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.meta.js +1 -0
  172. package/lib/module/components/FormField/FormField.meta.js +1 -0
  173. package/lib/module/components/IconBadge/IconBadge.meta.js +1 -0
  174. package/lib/module/components/IconButton/IconButton.js +1 -1
  175. package/lib/module/components/IconButton/IconButton.meta.js +1 -0
  176. package/lib/module/components/ImageGallery/ImageGallery.meta.js +1 -0
  177. package/lib/module/components/InlineSelect/InlineSelect.meta.js +1 -0
  178. package/lib/module/components/Input/Input.js +1 -1
  179. package/lib/module/components/Input/Input.meta.js +1 -0
  180. package/lib/module/components/KeyboardToolbar/KeyboardToolbar.meta.js +1 -0
  181. package/lib/module/components/ListItem/ListItem.meta.js +1 -0
  182. package/lib/module/components/LoaderOverlay/LoaderOverlay.meta.js +1 -0
  183. package/lib/module/components/Markdown/Markdown.meta.js +1 -0
  184. package/lib/module/components/Menu/Menu.meta.js +1 -0
  185. package/lib/module/components/MessageBubble/MessageBubble.meta.js +1 -0
  186. package/lib/module/components/MessageList/MessageList.meta.js +1 -0
  187. package/lib/module/components/Modal/Modal.meta.js +1 -0
  188. package/lib/module/components/Notation/Notation.meta.js +1 -0
  189. package/lib/module/components/NumberInput/NumberInput.meta.js +1 -0
  190. package/lib/module/components/OTPInput/OTPInput.meta.js +1 -0
  191. package/lib/module/components/OnboardingPager/OnboardingPager.meta.js +1 -0
  192. package/lib/module/components/OptionSheet/OptionSheet.meta.js +1 -0
  193. package/lib/module/components/PaymentResult/PaymentResult.meta.js +1 -0
  194. package/lib/module/components/PermissionPrompt/PermissionPrompt.meta.js +1 -0
  195. package/lib/module/components/PhoneNumberInput/PhoneNumberInput.meta.js +1 -0
  196. package/lib/module/components/PickerTrigger/PickerTrigger.meta.js +1 -0
  197. package/lib/module/components/ProfileCompletion/ProfileCompletion.js +1 -1
  198. package/lib/module/components/ProfileCompletion/ProfileCompletion.meta.js +1 -0
  199. package/lib/module/components/ProfilePicker/ProfilePicker.meta.js +1 -0
  200. package/lib/module/components/ProgressBar/ProgressBar.meta.js +1 -0
  201. package/lib/module/components/ProgressRing/ProgressRing.meta.js +1 -0
  202. package/lib/module/components/Radio/Radio.meta.js +1 -0
  203. package/lib/module/components/Radio/RadioGroup.meta.js +1 -0
  204. package/lib/module/components/Rating/Rating.meta.js +1 -0
  205. package/lib/module/components/Repeater/Repeater.meta.js +1 -0
  206. package/lib/module/components/RichTextEditor/RichTextEditor.meta.js +1 -0
  207. package/lib/module/components/ScannerOverlay/ScannerOverlay.meta.js +1 -0
  208. package/lib/module/components/Screen/Screen.meta.js +1 -0
  209. package/lib/module/components/SearchBar/SearchBar.meta.js +1 -0
  210. package/lib/module/components/SectionHeader/SectionHeader.meta.js +1 -0
  211. package/lib/module/components/SegmentedControl/SegmentedControl.meta.js +1 -0
  212. package/lib/module/components/Select/Select.meta.js +1 -0
  213. package/lib/module/components/SignaturePad/SignaturePad.meta.js +1 -0
  214. package/lib/module/components/Skeleton/Skeleton.meta.js +1 -0
  215. package/lib/module/components/Skeleton/SkeletonCircle.meta.js +1 -0
  216. package/lib/module/components/Skeleton/SkeletonContent.meta.js +1 -0
  217. package/lib/module/components/Skeleton/SkeletonList.meta.js +1 -0
  218. package/lib/module/components/Skeleton/SkeletonText.meta.js +1 -0
  219. package/lib/module/components/SlideToConfirm/SlideToConfirm.meta.js +1 -0
  220. package/lib/module/components/Slider/Slider.meta.js +1 -0
  221. package/lib/module/components/SliderField/SliderField.meta.js +1 -0
  222. package/lib/module/components/Sparkline/Sparkline.meta.js +1 -0
  223. package/lib/module/components/Spinner/Spinner.meta.js +1 -0
  224. package/lib/module/components/SquircleView/SquircleView.meta.js +1 -0
  225. package/lib/module/components/StatTile/StatTile.meta.js +1 -0
  226. package/lib/module/components/StatusBadge/StatusBadge.meta.js +1 -0
  227. package/lib/module/components/Stepper/Stepper.meta.js +1 -0
  228. package/lib/module/components/Swipeable/Swipeable.meta.js +1 -0
  229. package/lib/module/components/Switch/Switch.meta.js +1 -0
  230. package/lib/module/components/Tabs/Tabs.meta.js +1 -0
  231. package/lib/module/components/TagInput/TagInput.meta.js +1 -0
  232. package/lib/module/components/Text/Text.js +1 -1
  233. package/lib/module/components/Text/Text.meta.js +1 -0
  234. package/lib/module/components/TimePicker/TimePicker.meta.js +1 -0
  235. package/lib/module/components/Timeline/Timeline.meta.js +1 -0
  236. package/lib/module/components/Toast/Toast.meta.js +1 -0
  237. package/lib/module/components/Tooltip/Tooltip.meta.js +1 -0
  238. package/lib/module/components/Tour/Tour.meta.js +1 -0
  239. package/lib/module/components/TypingIndicator/TypingIndicator.meta.js +1 -0
  240. package/lib/module/components/WheelPicker/WheelPickerColumns.meta.js +1 -0
  241. package/lib/module/components/WheelPicker/WheelPickerDuration.meta.js +1 -0
  242. package/lib/module/components/WheelPicker/WheelPickerList.meta.js +1 -0
  243. package/lib/module/components/ZoomableImage/ZoomableImage.meta.js +1 -0
  244. package/lib/module/components/not-drawn.json +17 -0
  245. package/lib/module/theme/tokens.generated.js +1 -1
  246. package/lib/module/utils/hitSlop.js +1 -0
  247. package/lib/module/utils/warnInvalidValue.js +1 -0
  248. package/lib/typescript/commonjs/canvasKit/meta.d.ts +21 -6
  249. package/lib/typescript/commonjs/components/Accordion/Accordion.meta.d.ts +3 -0
  250. package/lib/typescript/commonjs/components/Accordion/AccordionGroup.meta.d.ts +3 -0
  251. package/lib/typescript/commonjs/components/AmountSlider/AmountSlider.meta.d.ts +3 -0
  252. package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.meta.d.ts +3 -0
  253. package/lib/typescript/commonjs/components/AppBar/AppBar.meta.d.ts +3 -0
  254. package/lib/typescript/commonjs/components/AppIcon/AppIcon.meta.d.ts +3 -0
  255. package/lib/typescript/commonjs/components/AsyncBlock/AsyncBlock.meta.d.ts +3 -0
  256. package/lib/typescript/commonjs/components/AuthedImage/AuthedImage.meta.d.ts +5 -0
  257. package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.meta.d.ts +3 -0
  258. package/lib/typescript/commonjs/components/Avatar/Avatar.meta.d.ts +3 -0
  259. package/lib/typescript/commonjs/components/Avatar/AvatarGroup.meta.d.ts +3 -0
  260. package/lib/typescript/commonjs/components/Badge/Badge.meta.d.ts +3 -0
  261. package/lib/typescript/commonjs/components/Banner/Banner.meta.d.ts +3 -0
  262. package/lib/typescript/commonjs/components/BarChart/BarChart.meta.d.ts +3 -0
  263. package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.meta.d.ts +3 -0
  264. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.meta.d.ts +3 -0
  265. package/lib/typescript/commonjs/components/Box/Spacer.meta.d.ts +3 -0
  266. package/lib/typescript/commonjs/components/Button/Button.meta.d.ts +3 -0
  267. package/lib/typescript/commonjs/components/Calendar/Calendar.meta.d.ts +3 -0
  268. package/lib/typescript/commonjs/components/Card/Card.d.ts +3 -0
  269. package/lib/typescript/commonjs/components/Card/Card.meta.d.ts +3 -0
  270. package/lib/typescript/commonjs/components/Carousel/Carousel.meta.d.ts +3 -0
  271. package/lib/typescript/commonjs/components/Checkbox/Checkbox.meta.d.ts +3 -0
  272. package/lib/typescript/commonjs/components/Chip/Chip.meta.d.ts +3 -0
  273. package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.meta.d.ts +3 -0
  274. package/lib/typescript/commonjs/components/Composer/Composer.meta.d.ts +3 -0
  275. package/lib/typescript/commonjs/components/Confetti/Confetti.meta.d.ts +3 -0
  276. package/lib/typescript/commonjs/components/DatePicker/DatePicker.meta.d.ts +3 -0
  277. package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.meta.d.ts +3 -0
  278. package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.meta.d.ts +3 -0
  279. package/lib/typescript/commonjs/components/DecimalInput/DecimalInput.meta.d.ts +3 -0
  280. package/lib/typescript/commonjs/components/Descriptions/Descriptions.meta.d.ts +3 -0
  281. package/lib/typescript/commonjs/components/Dialog/Dialog.meta.d.ts +3 -0
  282. package/lib/typescript/commonjs/components/Divider/Divider.meta.d.ts +3 -0
  283. package/lib/typescript/commonjs/components/Drawer/Drawer.meta.d.ts +3 -0
  284. package/lib/typescript/commonjs/components/EmptyState/EmptyState.meta.d.ts +3 -0
  285. package/lib/typescript/commonjs/components/FilePicker/FilePicker.meta.d.ts +3 -0
  286. package/lib/typescript/commonjs/components/FileViewer/FileViewer.meta.d.ts +3 -0
  287. package/lib/typescript/commonjs/components/FilterChipRow/FilterChipRow.meta.d.ts +3 -0
  288. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.meta.d.ts +3 -0
  289. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButtonGroup.meta.d.ts +3 -0
  290. package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.meta.d.ts +3 -0
  291. package/lib/typescript/commonjs/components/FormField/FormField.meta.d.ts +3 -0
  292. package/lib/typescript/commonjs/components/IconBadge/IconBadge.meta.d.ts +3 -0
  293. package/lib/typescript/commonjs/components/IconButton/IconButton.meta.d.ts +3 -0
  294. package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.meta.d.ts +3 -0
  295. package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.meta.d.ts +3 -0
  296. package/lib/typescript/commonjs/components/Input/Input.meta.d.ts +3 -0
  297. package/lib/typescript/commonjs/components/KeyboardToolbar/KeyboardToolbar.meta.d.ts +3 -0
  298. package/lib/typescript/commonjs/components/ListItem/ListItem.meta.d.ts +3 -0
  299. package/lib/typescript/commonjs/components/LoaderOverlay/LoaderOverlay.meta.d.ts +3 -0
  300. package/lib/typescript/commonjs/components/Markdown/Markdown.meta.d.ts +3 -0
  301. package/lib/typescript/commonjs/components/Menu/Menu.meta.d.ts +3 -0
  302. package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.meta.d.ts +3 -0
  303. package/lib/typescript/commonjs/components/MessageList/MessageList.meta.d.ts +5 -0
  304. package/lib/typescript/commonjs/components/Modal/Modal.meta.d.ts +3 -0
  305. package/lib/typescript/commonjs/components/Notation/Notation.meta.d.ts +3 -0
  306. package/lib/typescript/commonjs/components/NumberInput/NumberInput.meta.d.ts +3 -0
  307. package/lib/typescript/commonjs/components/OTPInput/OTPInput.meta.d.ts +3 -0
  308. package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.meta.d.ts +3 -0
  309. package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.meta.d.ts +3 -0
  310. package/lib/typescript/commonjs/components/PaymentResult/PaymentResult.meta.d.ts +3 -0
  311. package/lib/typescript/commonjs/components/PermissionPrompt/PermissionPrompt.meta.d.ts +3 -0
  312. package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.meta.d.ts +3 -0
  313. package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.meta.d.ts +3 -0
  314. package/lib/typescript/commonjs/components/ProfileCompletion/ProfileCompletion.meta.d.ts +3 -0
  315. package/lib/typescript/commonjs/components/ProfilePicker/ProfilePicker.meta.d.ts +3 -0
  316. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.meta.d.ts +3 -0
  317. package/lib/typescript/commonjs/components/ProgressRing/ProgressRing.meta.d.ts +3 -0
  318. package/lib/typescript/commonjs/components/Radio/Radio.meta.d.ts +3 -0
  319. package/lib/typescript/commonjs/components/Radio/RadioGroup.meta.d.ts +3 -0
  320. package/lib/typescript/commonjs/components/Rating/Rating.meta.d.ts +3 -0
  321. package/lib/typescript/commonjs/components/Repeater/Repeater.meta.d.ts +3 -0
  322. package/lib/typescript/commonjs/components/RichTextEditor/RichTextEditor.meta.d.ts +3 -0
  323. package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.meta.d.ts +3 -0
  324. package/lib/typescript/commonjs/components/Screen/Screen.meta.d.ts +3 -0
  325. package/lib/typescript/commonjs/components/SearchBar/SearchBar.meta.d.ts +3 -0
  326. package/lib/typescript/commonjs/components/SectionHeader/SectionHeader.meta.d.ts +3 -0
  327. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.meta.d.ts +3 -0
  328. package/lib/typescript/commonjs/components/Select/Select.meta.d.ts +3 -0
  329. package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.meta.d.ts +3 -0
  330. package/lib/typescript/commonjs/components/Skeleton/Skeleton.meta.d.ts +3 -0
  331. package/lib/typescript/commonjs/components/Skeleton/SkeletonCircle.meta.d.ts +3 -0
  332. package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.meta.d.ts +3 -0
  333. package/lib/typescript/commonjs/components/Skeleton/SkeletonList.meta.d.ts +3 -0
  334. package/lib/typescript/commonjs/components/Skeleton/SkeletonText.meta.d.ts +3 -0
  335. package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.meta.d.ts +3 -0
  336. package/lib/typescript/commonjs/components/Slider/Slider.meta.d.ts +3 -0
  337. package/lib/typescript/commonjs/components/SliderField/SliderField.meta.d.ts +3 -0
  338. package/lib/typescript/commonjs/components/Sparkline/Sparkline.meta.d.ts +3 -0
  339. package/lib/typescript/commonjs/components/Spinner/Spinner.meta.d.ts +3 -0
  340. package/lib/typescript/commonjs/components/SquircleView/SquircleView.meta.d.ts +2 -0
  341. package/lib/typescript/commonjs/components/StatTile/StatTile.meta.d.ts +3 -0
  342. package/lib/typescript/commonjs/components/StatusBadge/StatusBadge.meta.d.ts +3 -0
  343. package/lib/typescript/commonjs/components/Stepper/Stepper.meta.d.ts +3 -0
  344. package/lib/typescript/commonjs/components/Swipeable/Swipeable.meta.d.ts +3 -0
  345. package/lib/typescript/commonjs/components/Switch/Switch.meta.d.ts +3 -0
  346. package/lib/typescript/commonjs/components/Tabs/Tabs.meta.d.ts +3 -0
  347. package/lib/typescript/commonjs/components/TagInput/TagInput.meta.d.ts +3 -0
  348. package/lib/typescript/commonjs/components/Text/Text.d.ts +1 -1
  349. package/lib/typescript/commonjs/components/Text/Text.meta.d.ts +3 -0
  350. package/lib/typescript/commonjs/components/TimePicker/TimePicker.meta.d.ts +3 -0
  351. package/lib/typescript/commonjs/components/Timeline/Timeline.meta.d.ts +3 -0
  352. package/lib/typescript/commonjs/components/Toast/Toast.meta.d.ts +3 -0
  353. package/lib/typescript/commonjs/components/Tooltip/Tooltip.meta.d.ts +3 -0
  354. package/lib/typescript/commonjs/components/Tour/Tour.meta.d.ts +3 -0
  355. package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.meta.d.ts +3 -0
  356. package/lib/typescript/commonjs/components/WheelPicker/WheelPickerColumns.meta.d.ts +3 -0
  357. package/lib/typescript/commonjs/components/WheelPicker/WheelPickerDuration.meta.d.ts +3 -0
  358. package/lib/typescript/commonjs/components/WheelPicker/WheelPickerList.meta.d.ts +3 -0
  359. package/lib/typescript/commonjs/components/ZoomableImage/ZoomableImage.meta.d.ts +3 -0
  360. package/lib/typescript/commonjs/theme/tokens.generated.d.ts +1 -2
  361. package/lib/typescript/commonjs/theme/types.d.ts +1 -1
  362. package/lib/typescript/commonjs/utils/hitSlop.d.ts +14 -0
  363. package/lib/typescript/commonjs/utils/warnInvalidValue.d.ts +10 -0
  364. package/lib/typescript/module/canvasKit/meta.d.ts +21 -6
  365. package/lib/typescript/module/components/Accordion/Accordion.meta.d.ts +3 -0
  366. package/lib/typescript/module/components/Accordion/AccordionGroup.meta.d.ts +3 -0
  367. package/lib/typescript/module/components/AmountSlider/AmountSlider.meta.d.ts +3 -0
  368. package/lib/typescript/module/components/AnimatePresence/AnimatePresence.meta.d.ts +3 -0
  369. package/lib/typescript/module/components/AppBar/AppBar.meta.d.ts +3 -0
  370. package/lib/typescript/module/components/AppIcon/AppIcon.meta.d.ts +3 -0
  371. package/lib/typescript/module/components/AsyncBlock/AsyncBlock.meta.d.ts +3 -0
  372. package/lib/typescript/module/components/AuthedImage/AuthedImage.meta.d.ts +5 -0
  373. package/lib/typescript/module/components/Autocomplete/Autocomplete.meta.d.ts +3 -0
  374. package/lib/typescript/module/components/Avatar/Avatar.meta.d.ts +3 -0
  375. package/lib/typescript/module/components/Avatar/AvatarGroup.meta.d.ts +3 -0
  376. package/lib/typescript/module/components/Badge/Badge.meta.d.ts +3 -0
  377. package/lib/typescript/module/components/Banner/Banner.meta.d.ts +3 -0
  378. package/lib/typescript/module/components/BarChart/BarChart.meta.d.ts +3 -0
  379. package/lib/typescript/module/components/BottomNavigation/BottomNavigation.meta.d.ts +3 -0
  380. package/lib/typescript/module/components/BottomSheet/BottomSheet.meta.d.ts +3 -0
  381. package/lib/typescript/module/components/Box/Spacer.meta.d.ts +3 -0
  382. package/lib/typescript/module/components/Button/Button.meta.d.ts +3 -0
  383. package/lib/typescript/module/components/Calendar/Calendar.meta.d.ts +3 -0
  384. package/lib/typescript/module/components/Card/Card.d.ts +3 -0
  385. package/lib/typescript/module/components/Card/Card.meta.d.ts +3 -0
  386. package/lib/typescript/module/components/Carousel/Carousel.meta.d.ts +3 -0
  387. package/lib/typescript/module/components/Checkbox/Checkbox.meta.d.ts +3 -0
  388. package/lib/typescript/module/components/Chip/Chip.meta.d.ts +3 -0
  389. package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.meta.d.ts +3 -0
  390. package/lib/typescript/module/components/Composer/Composer.meta.d.ts +3 -0
  391. package/lib/typescript/module/components/Confetti/Confetti.meta.d.ts +3 -0
  392. package/lib/typescript/module/components/DatePicker/DatePicker.meta.d.ts +3 -0
  393. package/lib/typescript/module/components/DateRangePicker/DateRangePicker.meta.d.ts +3 -0
  394. package/lib/typescript/module/components/DateSeparator/DateSeparator.meta.d.ts +3 -0
  395. package/lib/typescript/module/components/DecimalInput/DecimalInput.meta.d.ts +3 -0
  396. package/lib/typescript/module/components/Descriptions/Descriptions.meta.d.ts +3 -0
  397. package/lib/typescript/module/components/Dialog/Dialog.meta.d.ts +3 -0
  398. package/lib/typescript/module/components/Divider/Divider.meta.d.ts +3 -0
  399. package/lib/typescript/module/components/Drawer/Drawer.meta.d.ts +3 -0
  400. package/lib/typescript/module/components/EmptyState/EmptyState.meta.d.ts +3 -0
  401. package/lib/typescript/module/components/FilePicker/FilePicker.meta.d.ts +3 -0
  402. package/lib/typescript/module/components/FileViewer/FileViewer.meta.d.ts +3 -0
  403. package/lib/typescript/module/components/FilterChipRow/FilterChipRow.meta.d.ts +3 -0
  404. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.meta.d.ts +3 -0
  405. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButtonGroup.meta.d.ts +3 -0
  406. package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.meta.d.ts +3 -0
  407. package/lib/typescript/module/components/FormField/FormField.meta.d.ts +3 -0
  408. package/lib/typescript/module/components/IconBadge/IconBadge.meta.d.ts +3 -0
  409. package/lib/typescript/module/components/IconButton/IconButton.meta.d.ts +3 -0
  410. package/lib/typescript/module/components/ImageGallery/ImageGallery.meta.d.ts +3 -0
  411. package/lib/typescript/module/components/InlineSelect/InlineSelect.meta.d.ts +3 -0
  412. package/lib/typescript/module/components/Input/Input.meta.d.ts +3 -0
  413. package/lib/typescript/module/components/KeyboardToolbar/KeyboardToolbar.meta.d.ts +3 -0
  414. package/lib/typescript/module/components/ListItem/ListItem.meta.d.ts +3 -0
  415. package/lib/typescript/module/components/LoaderOverlay/LoaderOverlay.meta.d.ts +3 -0
  416. package/lib/typescript/module/components/Markdown/Markdown.meta.d.ts +3 -0
  417. package/lib/typescript/module/components/Menu/Menu.meta.d.ts +3 -0
  418. package/lib/typescript/module/components/MessageBubble/MessageBubble.meta.d.ts +3 -0
  419. package/lib/typescript/module/components/MessageList/MessageList.meta.d.ts +5 -0
  420. package/lib/typescript/module/components/Modal/Modal.meta.d.ts +3 -0
  421. package/lib/typescript/module/components/Notation/Notation.meta.d.ts +3 -0
  422. package/lib/typescript/module/components/NumberInput/NumberInput.meta.d.ts +3 -0
  423. package/lib/typescript/module/components/OTPInput/OTPInput.meta.d.ts +3 -0
  424. package/lib/typescript/module/components/OnboardingPager/OnboardingPager.meta.d.ts +3 -0
  425. package/lib/typescript/module/components/OptionSheet/OptionSheet.meta.d.ts +3 -0
  426. package/lib/typescript/module/components/PaymentResult/PaymentResult.meta.d.ts +3 -0
  427. package/lib/typescript/module/components/PermissionPrompt/PermissionPrompt.meta.d.ts +3 -0
  428. package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.meta.d.ts +3 -0
  429. package/lib/typescript/module/components/PickerTrigger/PickerTrigger.meta.d.ts +3 -0
  430. package/lib/typescript/module/components/ProfileCompletion/ProfileCompletion.meta.d.ts +3 -0
  431. package/lib/typescript/module/components/ProfilePicker/ProfilePicker.meta.d.ts +3 -0
  432. package/lib/typescript/module/components/ProgressBar/ProgressBar.meta.d.ts +3 -0
  433. package/lib/typescript/module/components/ProgressRing/ProgressRing.meta.d.ts +3 -0
  434. package/lib/typescript/module/components/Radio/Radio.meta.d.ts +3 -0
  435. package/lib/typescript/module/components/Radio/RadioGroup.meta.d.ts +3 -0
  436. package/lib/typescript/module/components/Rating/Rating.meta.d.ts +3 -0
  437. package/lib/typescript/module/components/Repeater/Repeater.meta.d.ts +3 -0
  438. package/lib/typescript/module/components/RichTextEditor/RichTextEditor.meta.d.ts +3 -0
  439. package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.meta.d.ts +3 -0
  440. package/lib/typescript/module/components/Screen/Screen.meta.d.ts +3 -0
  441. package/lib/typescript/module/components/SearchBar/SearchBar.meta.d.ts +3 -0
  442. package/lib/typescript/module/components/SectionHeader/SectionHeader.meta.d.ts +3 -0
  443. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.meta.d.ts +3 -0
  444. package/lib/typescript/module/components/Select/Select.meta.d.ts +3 -0
  445. package/lib/typescript/module/components/SignaturePad/SignaturePad.meta.d.ts +3 -0
  446. package/lib/typescript/module/components/Skeleton/Skeleton.meta.d.ts +3 -0
  447. package/lib/typescript/module/components/Skeleton/SkeletonCircle.meta.d.ts +3 -0
  448. package/lib/typescript/module/components/Skeleton/SkeletonContent.meta.d.ts +3 -0
  449. package/lib/typescript/module/components/Skeleton/SkeletonList.meta.d.ts +3 -0
  450. package/lib/typescript/module/components/Skeleton/SkeletonText.meta.d.ts +3 -0
  451. package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.meta.d.ts +3 -0
  452. package/lib/typescript/module/components/Slider/Slider.meta.d.ts +3 -0
  453. package/lib/typescript/module/components/SliderField/SliderField.meta.d.ts +3 -0
  454. package/lib/typescript/module/components/Sparkline/Sparkline.meta.d.ts +3 -0
  455. package/lib/typescript/module/components/Spinner/Spinner.meta.d.ts +3 -0
  456. package/lib/typescript/module/components/SquircleView/SquircleView.meta.d.ts +2 -0
  457. package/lib/typescript/module/components/StatTile/StatTile.meta.d.ts +3 -0
  458. package/lib/typescript/module/components/StatusBadge/StatusBadge.meta.d.ts +3 -0
  459. package/lib/typescript/module/components/Stepper/Stepper.meta.d.ts +3 -0
  460. package/lib/typescript/module/components/Swipeable/Swipeable.meta.d.ts +3 -0
  461. package/lib/typescript/module/components/Switch/Switch.meta.d.ts +3 -0
  462. package/lib/typescript/module/components/Tabs/Tabs.meta.d.ts +3 -0
  463. package/lib/typescript/module/components/TagInput/TagInput.meta.d.ts +3 -0
  464. package/lib/typescript/module/components/Text/Text.d.ts +1 -1
  465. package/lib/typescript/module/components/Text/Text.meta.d.ts +3 -0
  466. package/lib/typescript/module/components/TimePicker/TimePicker.meta.d.ts +3 -0
  467. package/lib/typescript/module/components/Timeline/Timeline.meta.d.ts +3 -0
  468. package/lib/typescript/module/components/Toast/Toast.meta.d.ts +3 -0
  469. package/lib/typescript/module/components/Tooltip/Tooltip.meta.d.ts +3 -0
  470. package/lib/typescript/module/components/Tour/Tour.meta.d.ts +3 -0
  471. package/lib/typescript/module/components/TypingIndicator/TypingIndicator.meta.d.ts +3 -0
  472. package/lib/typescript/module/components/WheelPicker/WheelPickerColumns.meta.d.ts +3 -0
  473. package/lib/typescript/module/components/WheelPicker/WheelPickerDuration.meta.d.ts +3 -0
  474. package/lib/typescript/module/components/WheelPicker/WheelPickerList.meta.d.ts +3 -0
  475. package/lib/typescript/module/components/ZoomableImage/ZoomableImage.meta.d.ts +3 -0
  476. package/lib/typescript/module/theme/tokens.generated.d.ts +1 -2
  477. package/lib/typescript/module/theme/types.d.ts +1 -1
  478. package/lib/typescript/module/utils/hitSlop.d.ts +14 -0
  479. package/lib/typescript/module/utils/warnInvalidValue.d.ts +10 -0
  480. package/package.json +7 -6
@@ -1 +1 @@
1
- "use strict";import React,{forwardRef,useMemo}from"react";import{Animated,Image,Pressable,StyleSheet,View}from"react-native";import{useControllableState}from"../../hooks/useControllableState.js";import{usePressAnimation}from"../../hooks/usePressAnimation.js";import{Gradient,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{triggerHaptic}from"../../utils/hapticUtils.js";import{mergeRefs}from"../../utils/mergeRefs.js";import{supportsBoxShadow,toBoxShadow}from"../../utils/shadows.js";import{squircleHostRadius}from"../../utils/squircle.js";import{themeStyles}from"../../utils/themeStyles.js";import{AppIcon}from"../AppIcon/AppIcon.js";import{useContextMenu}from"../Menu/useContextMenu.js";import{Skeleton,SkeletonText}from"../Skeleton/index.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const BACKGROUND_TOKENS=["bg","bg-subtle","bg-muted","surface","scrim","surface-inverse"],paddingMap={none:"none",sm:"sm",md:"lg",lg:"xl",xl:"2xl"},Card=React.memo(forwardRef((e,t)=>{const{children:o,variant:i="elevated",elevation:s="card",radius:r="lg",padding:a="md",interactive:l=!1,bg:n,header:d,title:c,lead:u,action:h,headerActions:m,collapsible:p=!1,collapsed:b,defaultCollapsed:g=!1,onCollapsedChange:y,collapsedSummary:x,onRemove:f,removeLabel:S="Remove",separatorHeight:j=StyleSheet.hairlineWidth,footer:v,imageSource:C,imageHeight:_=160,imageAspectRatio:w,imageOverlay:R,loading:A=!1,gradient:k,onPress:T,haptic:B,contextMenu:I,accessibilityLabel:H,accessibilityHint:L,accessibilityRole:P,style:V,containerStyle:F,headerStyle:z,bodyStyle:M,footerStyle:q,borderRadius:O,testID:W,onLayout:D,...N}=e,E=useTheme(),G=l||"function"==typeof T,K=useContextMenu(I,{haptic:B||!1,testID:W,accessibilityActions:N.accessibilityActions,onAccessibilityAction:N.onAccessibilityAction}),U=useMemo(()=>mergeRefs(t,K.hostRef),[t,K.hostRef]),$=G||K.enabled,{style:J,pressIn:Q,pressOut:X}=usePressAnimation({enabled:$}),Y=stylesFor(E),Z=Boolean(C),ee=E.space[paddingMap[a]],te=useMemo(()=>k?"string"==typeof k?E.settings.gradients[k]??null:k:null,[k,E.settings.gradients]),oe="flat"===i,ie=oe?E.radius.none:O??E.radius[r],se=resolveBackground(E,n),[re,ae]=useControllableState({value:b,defaultValue:g,onChange:y}),le=p&&re,ne=hasBuiltInHeaderContent(e),de=Boolean(d)||ne,ce=useSquircle(!Z&&!te&&!oe,ie,D),ue=StyleSheet.flatten([V,F])??{},he=ue.backgroundColor,me=ue.borderColor,pe=he??se??("filled"===i?E.colors["bg-subtle"]:E.colors.surface),be="outlined"===i?E.size.border:0,ge=me??E.colors.border,ye="none"===s?void 0:E.shadow[s],xe="elevated"===i&&supportsBoxShadow()&&ye?toBoxShadow(ye):void 0,fe=ce.active&&"elevated"===i&&!xe,Se=ce.active&&!fe?{backgroundColor:"transparent",borderColor:"transparent"}:null,je=useMemo(()=>{const e={borderRadius:fe&&ce.size?squircleHostRadius(ce.size.width,ce.size.height,ie):ie,...smoothCorners,padding:Z?E.space.none:ee,overflow:ce.active?"visible":"hidden"};switch(i){case"flat":return{...e,backgroundColor:se??E.colors.surface,borderBottomWidth:j,borderBottomColor:E.colors.border};case"outlined":return{...e,backgroundColor:ce.active?"transparent":se??E.colors.surface,borderWidth:E.size.border,borderColor:ce.active?"transparent":E.colors.border};case"filled":return{...e,backgroundColor:ce.active?"transparent":se??E.colors["bg-subtle"]};default:return{...e,backgroundColor:se??E.colors.surface,...xe?{boxShadow:xe}:ye}}},[E,i,ye,ie,Z,ee,ce.active,ce.size,xe,fe,se,j]),ve=useMemo(()=>({..."number"==typeof w?{width:"100%",aspectRatio:w}:{width:"100%",height:_},borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomLeftRadius:E.radius.none,borderBottomRightRadius:E.radius.none,...smoothCorners}),[E,ie,w,_]),Ce="string"==typeof c?c:"",we=_jsxs(_Fragment,{children:[_jsxs(View,{style:Y.titleColumn,children:["string"==typeof c?_jsx(Text,{variant:"title",accessibilityRole:"header",children:c}):c,u?_jsx(Text,{variant:"bodySmall",style:Y.lead,children:u}):null,le&&x?_jsx(Text,{variant:"caption",style:Y.lead,children:x}):null]}),isCardTextAction(h)?_jsx(CardTextActionButton,{action:h,haptic:B}):h?_jsx(View,{style:Y.actionNode,children:h}):null,m,p?_jsx(CardIconAction,{icon:le?"chevron-down":"chevron-up",label:`${le?"Show":"Hide"} ${Ce}`.trim(),expanded:!le,onPress:()=>ae(!le),haptic:B}):null,f?_jsx(CardIconAction,{icon:"trash",label:S,onPress:f,color:E.colors["danger-text"],haptic:B}):null]}),Re=_jsxs(_Fragment,{children:[de?_jsx(View,{style:[Y.header,!d&&Y.headerRow,le&&Y.headerFolded,z],children:d??we}):null,le?null:_jsx(View,{style:[de||v?Y.body:null,M],children:o}),v&&!le?_jsx(View,{style:[Y.footer,q],children:v}):null]}),Ae=Z?_jsxs(_Fragment,{children:[_jsxs(View,{style:Y.imageWrapper,children:[_jsx(Image,{source:C,resizeMode:"cover",style:ve,accessibilityLabel:"",accessible:!1}),R?_jsx(View,{pointerEvents:"box-none",style:Y.imageOverlay,children:R}):null]}),_jsx(View,{style:{padding:ee},children:Re})]}):Re,ke=te?_jsxs(_Fragment,{children:[_jsx(Gradient,{gradient:te,style:StyleSheet.absoluteFill}),Ae]}):ce.active&&ce.size?_jsxs(_Fragment,{children:[_jsx(SquircleFill,{width:ce.size.width,height:ce.size.height,radius:ie,fill:pe,stroke:be?ge:void 0,strokeWidth:be,outset:be}),Ae]}):Ae;let Te;if($){const handlePress=e=>{G&&(B&&triggerHaptic(B),T?.(e))};Te=_jsx(Animated.View,{style:J,children:_jsx(Pressable,{ref:U,onPress:handlePress,onPressIn:Q,onPressOut:X,android_ripple:{color:E.colors["surface-pressed"],borderless:!1},accessibilityRole:P??(G?"button":void 0),accessibilityLabel:H,accessibilityHint:L,testID:W,onLayout:ce.onLayout,style:[je,V,F,Se],...N,...K.hostProps,children:ke})})}else Te=_jsx(View,{ref:t,accessibilityLabel:H,accessibilityHint:L,accessibilityRole:P,testID:W,onLayout:ce.onLayout,style:[je,V,F,Se],...N,children:ke});return A?_jsx(CardSkeleton,{...e}):K.enabled?_jsxs(_Fragment,{children:[Te,K.renderSurface(_jsx(View,{style:[je,V,F,Se,Y.preview],children:ke}))]}):Te}));Card.displayName="Card";const CardSkeleton=({variant:e="elevated",elevation:t,radius:o="lg",padding:i="md",bg:s,header:r,footer:a,imageSource:l,imageHeight:n=160,imageAspectRatio:d,borderRadius:c,containerStyle:u,headerStyle:h,bodyStyle:m,footerStyle:p,style:b,...g})=>{const y=useTheme(),x=paddingMap[i],f=y.space[x],S="flat"===e?y.radius.none:c??y.radius[o],j=void 0!==r||hasBuiltInHeaderContent(g),v=resolveBackground(y,s)??y.colors.surface,C="outlined"===e?1:0,_="outlined"===e?y.colors.border:void 0;return _jsxs(View,{style:[{backgroundColor:v,borderRadius:S,...smoothCorners,borderWidth:C,borderColor:_,overflow:"hidden"},u,b],accessibilityRole:"progressbar",accessibilityLabel:"Loading",accessibilityState:{busy:!0},"aria-busy":!0,children:[void 0!==l?_jsx(Skeleton,{width:"100%",height:d?void 0:n,style:d?{aspectRatio:d,width:"100%"}:void 0}):null,j?_jsx(View,{style:[{padding:f,paddingBottom:y.space.sm},h],children:_jsx(Skeleton,{shape:"text",width:"60%",height:18})}):null,_jsx(View,{style:[{padding:f},m],children:_jsx(SkeletonText,{lines:3,fontSize:y.text.base.size,lastLineWidth:"55%"})}),void 0!==a?_jsx(View,{style:[{padding:f,paddingTop:y.space.sm,flexDirection:"row"},p],children:_jsx(Skeleton,{width:88,height:32,shape:"rounded"})}):null]})};CardSkeleton.displayName="CardSkeleton",Card.Skeleton=CardSkeleton;const hasBuiltInHeaderContent=e=>Boolean(e.title||e.lead||e.action||e.headerActions||e.collapsible||e.onRemove),isCardTextAction=e=>"object"==typeof e&&null!==e&&!React.isValidElement(e)&&"label"in e&&"onPress"in e,HIT_TARGET=44,CardIconAction=({icon:e,label:t,onPress:o,expanded:i,color:s,haptic:r})=>{const a=useTheme();return _jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:t,accessibilityState:void 0===i?void 0:{expanded:i},"aria-expanded":i,onPress:()=>{r&&triggerHaptic(r),o()},style:iconActionStyle,children:_jsx(AppIcon,{name:e,size:20,color:s??a.colors["text-body"]})})},CardTextActionButton=({action:e,haptic:t})=>{const o=useTheme();return _jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,onPress:()=>{t&&triggerHaptic(t),e.onPress()},style:textActionStyle,children:_jsx(Text,{variant:"label",weight:"semibold",color:o.colors.primary,children:e.label})})},iconActionStyle={width:44,height:44,alignItems:"center",justifyContent:"center"},textActionStyle={minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},resolveBackground=(e,t)=>{if(null!=t)return BACKGROUND_TOKENS.includes(t)?e.colors[t]:t},buildStyles=e=>StyleSheet.create({header:{marginBottom:e.space.md},headerRow:{flexDirection:"row",alignItems:"center",gap:e.space.sm},headerFolded:{marginBottom:e.space.none},titleColumn:{flex:1},lead:{marginTop:e.space.xs},actionNode:{flexShrink:0},body:{flexShrink:1},footer:{marginTop:e.space.md},imageWrapper:{position:"relative"},imageOverlay:{...StyleSheet.absoluteFill},preview:{margin:e.space.none,marginTop:e.space.none,marginBottom:e.space.none,marginLeft:e.space.none,marginRight:e.space.none,marginStart:e.space.none,marginEnd:e.space.none,marginHorizontal:e.space.none,marginVertical:e.space.none,position:"relative",top:0,left:0,width:"100%",height:"100%"}}),stylesFor=themeStyles(buildStyles);export{Card};export default Card;
1
+ "use strict";import React,{forwardRef,useMemo}from"react";import{Animated,Image,Pressable,StyleSheet,View}from"react-native";import{useControllableState}from"../../hooks/useControllableState.js";import{usePressAnimation}from"../../hooks/usePressAnimation.js";import{fontFor,Gradient,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{triggerHaptic}from"../../utils/hapticUtils.js";import{mergeRefs}from"../../utils/mergeRefs.js";import{supportsBoxShadow,toBoxShadow}from"../../utils/shadows.js";import{squircleHostRadius}from"../../utils/squircle.js";import{themeStyles}from"../../utils/themeStyles.js";import{AppIcon}from"../AppIcon/AppIcon.js";import{useContextMenu}from"../Menu/useContextMenu.js";import{Skeleton,SkeletonText}from"../Skeleton/index.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const BACKGROUND_TOKENS=["bg","bg-subtle","bg-muted","surface","scrim","surface-inverse"],paddingMap={none:"none",sm:"sm",md:"lg",lg:"xl",xl:"2xl"},Card=React.memo(forwardRef((e,t)=>{const{children:o,variant:i="elevated",elevation:s="card",radius:r="lg",padding:l="md",interactive:a=!1,bg:n,header:d,title:c,titleFont:u="sans",lead:h,action:m,headerActions:p,collapsible:b=!1,collapsed:g,defaultCollapsed:y=!1,onCollapsedChange:x,collapsedSummary:f,onRemove:S,removeLabel:j="Remove",separatorHeight:v=StyleSheet.hairlineWidth,footer:C,imageSource:_,imageHeight:w=160,imageAspectRatio:R,imageOverlay:A,loading:k=!1,gradient:T,onPress:F,haptic:B,contextMenu:I,accessibilityLabel:H,accessibilityHint:L,accessibilityRole:P,style:V,containerStyle:z,headerStyle:M,bodyStyle:q,footerStyle:O,borderRadius:W,testID:D,onLayout:N,...E}=e,G=useTheme(),K=a||"function"==typeof F,U=useContextMenu(I,{haptic:B||!1,testID:D,accessibilityActions:E.accessibilityActions,onAccessibilityAction:E.onAccessibilityAction}),$=useMemo(()=>mergeRefs(t,U.hostRef),[t,U.hostRef]),J=K||U.enabled,{style:Q,pressIn:X,pressOut:Y}=usePressAnimation({enabled:J}),Z=stylesFor(G),ee=Boolean(_),te=G.space[paddingMap[l]],oe=useMemo(()=>T?"string"==typeof T?G.settings.gradients[T]??null:T:null,[T,G.settings.gradients]),ie="flat"===i,se=ie?G.radius.none:W??G.radius[r],re=resolveBackground(G,n),[le,ae]=useControllableState({value:g,defaultValue:y,onChange:x}),ne=b&&le,de=hasBuiltInHeaderContent(e),ce=Boolean(d)||de,ue=useSquircle(!ee&&!oe&&!ie,se,N),he=StyleSheet.flatten([V,z])??{},me=he.backgroundColor,pe=he.borderColor,be=me??re??("filled"===i?G.colors["bg-subtle"]:G.colors.surface),ge="outlined"===i?G.size.border:0,ye=pe??G.colors.border,xe="none"===s?void 0:G.shadow[s],fe="elevated"===i&&supportsBoxShadow()&&xe?toBoxShadow(xe):void 0,Se=ue.active&&"elevated"===i&&!fe,je=ue.active&&!Se?{backgroundColor:"transparent",borderColor:"transparent"}:null,ve=useMemo(()=>{const e={borderRadius:Se&&ue.size?squircleHostRadius(ue.size.width,ue.size.height,se):se,...smoothCorners,padding:ee?G.space.none:te,overflow:ue.active?"visible":"hidden"};switch(i){case"flat":return{...e,backgroundColor:re??G.colors.surface,borderBottomWidth:v,borderBottomColor:G.colors.border};case"outlined":return{...e,backgroundColor:ue.active?"transparent":re??G.colors.surface,borderWidth:G.size.border,borderColor:ue.active?"transparent":G.colors.border};case"filled":return{...e,backgroundColor:ue.active?"transparent":re??G.colors["bg-subtle"]};default:return{...e,backgroundColor:re??G.colors.surface,...fe?{boxShadow:fe}:xe}}},[G,i,xe,se,ee,te,ue.active,ue.size,fe,Se,re,v]),Ce=useMemo(()=>({..."number"==typeof R?{width:"100%",aspectRatio:R}:{width:"100%",height:w},borderTopLeftRadius:se,borderTopRightRadius:se,borderBottomLeftRadius:G.radius.none,borderBottomRightRadius:G.radius.none,...smoothCorners}),[G,se,R,w]),we="string"==typeof c?c:"",Re=_jsxs(_Fragment,{children:[_jsxs(View,{style:Z.titleColumn,children:["string"==typeof c?_jsx(Text,{variant:"title",accessibilityRole:"header",style:titleFaceFor(G,u),children:c}):c,h?_jsx(Text,{variant:"bodySmall",style:Z.lead,children:h}):null,ne&&f?_jsx(Text,{variant:"caption",style:Z.lead,children:f}):null]}),isCardTextAction(m)?_jsx(CardTextActionButton,{action:m,haptic:B}):m?_jsx(View,{style:Z.actionNode,children:m}):null,p,b?_jsx(CardIconAction,{icon:ne?"chevron-down":"chevron-up",label:`${ne?"Show":"Hide"} ${we}`.trim(),expanded:!ne,onPress:()=>ae(!ne),haptic:B}):null,S?_jsx(CardIconAction,{icon:"trash",label:j,onPress:S,color:G.colors["danger-text"],haptic:B}):null]}),Ae=_jsxs(_Fragment,{children:[ce?_jsx(View,{style:[Z.header,!d&&Z.headerRow,ne&&Z.headerFolded,M],children:d??Re}):null,ne?null:_jsx(View,{style:[ce||C?Z.body:null,q],children:o}),C&&!ne?_jsx(View,{style:[Z.footer,O],children:C}):null]}),ke=ee?_jsxs(_Fragment,{children:[_jsxs(View,{style:Z.imageWrapper,children:[_jsx(Image,{source:_,resizeMode:"cover",style:Ce,accessibilityLabel:"",accessible:!1}),A?_jsx(View,{pointerEvents:"box-none",style:Z.imageOverlay,children:A}):null]}),_jsx(View,{style:{padding:te},children:Ae})]}):Ae,Te=oe?_jsxs(_Fragment,{children:[_jsx(Gradient,{gradient:oe,style:StyleSheet.absoluteFill}),ke]}):ue.active&&ue.size?_jsxs(_Fragment,{children:[_jsx(SquircleFill,{width:ue.size.width,height:ue.size.height,radius:se,fill:be,stroke:ge?ye:void 0,strokeWidth:ge,outset:ge}),ke]}):ke;let Fe;if(J){const handlePress=e=>{K&&(B&&triggerHaptic(B),F?.(e))};Fe=_jsx(Animated.View,{style:Q,children:_jsx(Pressable,{ref:$,onPress:handlePress,onPressIn:X,onPressOut:Y,android_ripple:{color:G.colors["surface-pressed"],borderless:!1},accessibilityRole:P??(K?"button":void 0),accessibilityLabel:H,accessibilityHint:L,testID:D,onLayout:ue.onLayout,style:[ve,V,z,je],...E,...U.hostProps,children:Te})})}else Fe=_jsx(View,{ref:t,accessibilityLabel:H,accessibilityHint:L,accessibilityRole:P,testID:D,onLayout:ue.onLayout,style:[ve,V,z,je],...E,children:Te});return k?_jsx(CardSkeleton,{...e}):U.enabled?_jsxs(_Fragment,{children:[Fe,U.renderSurface(_jsx(View,{style:[ve,V,z,je,Z.preview],children:Te}))]}):Fe}));Card.displayName="Card";const CardSkeleton=({variant:e="elevated",elevation:t,radius:o="lg",padding:i="md",bg:s,header:r,footer:l,imageSource:a,imageHeight:n=160,imageAspectRatio:d,borderRadius:c,containerStyle:u,headerStyle:h,bodyStyle:m,footerStyle:p,style:b,...g})=>{const y=useTheme(),x=paddingMap[i],f=y.space[x],S="flat"===e?y.radius.none:c??y.radius[o],j=void 0!==r||hasBuiltInHeaderContent(g),v=resolveBackground(y,s)??y.colors.surface,C="outlined"===e?1:0,_="outlined"===e?y.colors.border:void 0;return _jsxs(View,{style:[{backgroundColor:v,borderRadius:S,...smoothCorners,borderWidth:C,borderColor:_,overflow:"hidden"},u,b],accessibilityRole:"progressbar",accessibilityLabel:"Loading",accessibilityState:{busy:!0},"aria-busy":!0,children:[void 0!==a?_jsx(Skeleton,{width:"100%",height:d?void 0:n,style:d?{aspectRatio:d,width:"100%"}:void 0}):null,j?_jsx(View,{style:[{padding:f,paddingBottom:y.space.sm},h],children:_jsx(Skeleton,{shape:"text",width:"60%",height:18})}):null,_jsx(View,{style:[{padding:f},m],children:_jsx(SkeletonText,{lines:3,fontSize:y.text.base.size,lastLineWidth:"55%"})}),void 0!==l?_jsx(View,{style:[{padding:f,paddingTop:y.space.sm,flexDirection:"row"},p],children:_jsx(Skeleton,{width:88,height:32,shape:"rounded"})}):null]})};CardSkeleton.displayName="CardSkeleton",Card.Skeleton=CardSkeleton;const hasBuiltInHeaderContent=e=>Boolean(e.title||e.lead||e.action||e.headerActions||e.collapsible||e.onRemove),isCardTextAction=e=>"object"==typeof e&&null!==e&&!React.isValidElement(e)&&"label"in e&&"onPress"in e,HIT_TARGET=44,CardIconAction=({icon:e,label:t,onPress:o,expanded:i,color:s,haptic:r})=>{const l=useTheme();return _jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:t,accessibilityState:void 0===i?void 0:{expanded:i},"aria-expanded":i,onPress:()=>{r&&triggerHaptic(r),o()},style:iconActionStyle,children:_jsx(AppIcon,{name:e,size:20,color:s??l.colors["text-body"]})})},CardTextActionButton=({action:e,haptic:t})=>{const o=useTheme();return _jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,onPress:()=>{t&&triggerHaptic(t),e.onPress()},style:textActionStyle,children:_jsx(Text,{variant:"label",weight:"semibold",color:o.colors.primary,children:e.label})})},iconActionStyle={width:44,height:44,alignItems:"center",justifyContent:"center"},textActionStyle={minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},titleFaceFor=(e,t)=>"serif"===t?fontFor(e,"semibold","display"):{fontFamily:void 0,...fontFor(e,"semibold")},resolveBackground=(e,t)=>{if(null!=t)return BACKGROUND_TOKENS.includes(t)?e.colors[t]:t},buildStyles=e=>StyleSheet.create({header:{marginBottom:e.space.md},headerRow:{flexDirection:"row",alignItems:"center",gap:e.space.sm},headerFolded:{marginBottom:e.space.none},titleColumn:{flex:1},lead:{marginTop:e.space.xs},actionNode:{flexShrink:0},body:{flexShrink:1},footer:{marginTop:e.space.md},imageWrapper:{position:"relative"},imageOverlay:{...StyleSheet.absoluteFill},preview:{margin:e.space.none,marginTop:e.space.none,marginBottom:e.space.none,marginLeft:e.space.none,marginRight:e.space.none,marginStart:e.space.none,marginEnd:e.space.none,marginHorizontal:e.space.none,marginVertical:e.space.none,position:"relative",top:0,left:0,width:"100%",height:"100%"}}),stylesFor=themeStyles(buildStyles);export{Card};export default Card;
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Card",marker:null,platforms:["phone"],acceptsChildren:!0,props:{variant:{type:"enum",values:["elevated","outlined","filled","flat"],default:"elevated",description:"The surface style of the card."},elevation:{type:"enum",values:["none","card","elevated","popover","modal","drawer"],default:"card",description:"The shadow under the card, as a shadow name or none."},radius:{type:"enum",values:["sm","md","lg","xl"],default:"lg",description:"The corner radius."},padding:{type:"enum",values:["none","sm","md","lg","xl"],default:"md",description:"The space inside the card."},interactive:{type:"boolean",default:!1,description:"Makes the whole card pressable."},bg:{type:"string",description:"The background: a background colour name or any colour value. It replaces the variant surface."},header:{type:"node",description:"A free header slot. When set it replaces the built-in header."},title:{type:"node",description:"The built-in header title. A string is drawn as a heading; a node is drawn as it is."},titleFont:{type:"enum",values:["sans","serif"],default:"sans",description:"The face of a string title: the sans text face, or the serif display face. A node title ignores it."},lead:{type:"node",description:"A subtitle line under the title."},action:{type:"node",description:"A header action: a node is drawn as it is, or a label with a press handler draws a text action."},headerActions:{type:"node",description:"Extra nodes drawn in the header row after the action."},collapsible:{type:"boolean",default:!1,description:"Draws a chevron in the header that folds the body and footer away."},collapsed:{type:"boolean",description:"The folded state, when the screen controls it."},defaultCollapsed:{type:"boolean",default:!1,description:"The folded state at the start, when the card keeps its own."},collapsedSummary:{type:"node",description:"Shown under the title while the card is folded."},removeLabel:{type:"string",default:"Remove",description:"The accessible name of the remove button."},separatorHeight:{type:"number",description:"Height of the bottom band of the flat variant. It defaults to a hairline."},footer:{type:"node",description:"A footer slot below the body."},imageHeight:{type:"number",default:160,description:"Height of the card image in points."},imageAspectRatio:{type:"number",description:"The width to height ratio of the card image."},imageOverlay:{type:"node",description:"A node drawn over the card image."},loading:{type:"boolean",default:!1,description:"Draws the placeholder shape instead of the content while data loads."},contextMenu:{type:"object",fields:{items:{type:"any",required:!0,description:"The menu entries: a list of items, or a list of groups of items."},title:{type:"string",description:"A short heading over the items. It is also the accessible name of the menu."},topActions:{type:"array",itemFields:{key:{type:"string",required:!0,description:"A stable id for the item."},label:{type:"string",required:!0,description:"The item text."},icon:{type:"icon",description:"A leading icon."},description:{type:"string",description:"A line under the label. Any description presents the menu as a sheet on a phone."},detail:{type:"string",description:"Short trailing text, such as a count."},checked:{type:"boolean",description:"Draws a check mark and reports the checked state."},destructive:{type:"boolean",description:"Draws the item in the error colour."},disabled:{type:"boolean",description:"Marks the item as unavailable now."},hidden:{type:"boolean",description:"Never shows the item."},submenu:{type:"array",description:"One level of items that replaces the list when this item is chosen."},accessibilityLabel:{type:"string",description:"Replaces the item text for a screen reader."}},description:"Up to three icon actions in a row above the list."},preview:{type:"node",description:"What lifts over the dimmed screen while the menu is open."},unavailable:{type:"enum",values:["hide","disable"],description:"Hide drops an unavailable item; disable shows it dimmed."},presentation:{type:"enum",values:["auto","popover","sheet"],description:"How the menu is drawn. Auto picks a sheet on a phone past seven items or with a description."},placement:{type:"enum",values:["top","bottom","auto"],description:"The preferred side of the pressed card."},accessibilityLabel:{type:"string",description:"Names the menu for a screen reader."},closeLabel:{type:"string",description:"The accessible name of the tap outside area."},backLabel:{type:"string",description:"The accessible name of a submenu's Back row."}},description:"A long press menu. Every item is also a screen reader action on the card."},borderRadius:{type:"number",description:"A corner radius in points for this card. It wins over the radius name."},accessibilityHint:{type:"string",description:"What happens when the control is used, read after its name by a screen reader."},disabled:{type:"boolean",description:"Blocks presses on an interactive card."},accessibilityLabel:{type:"string",description:"Names the card for a screen reader."}},omit:["imageSource","gradient","haptic","hitSlop","id","needsOffscreenAlphaCompositing","pointerEvents","removeClippedSubviews","nativeID","collapsable","collapsableChildren","renderToHardwareTextureAndroid","focusable","tabIndex","shouldRasterizeIOS","isTVSelectable","hasTVPreferredFocus","tvParallaxShiftDistanceX","tvParallaxShiftDistanceY","tvParallaxTiltAngle","tvParallaxMagnification","accessible","accessibilityActions","aria-label","accessibilityRole","accessibilityState","aria-busy","aria-checked","aria-disabled","aria-expanded","aria-selected","accessibilityValue","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","importantForAccessibility","aria-hidden","aria-modal","role","accessibilityLabelledBy","aria-labelledby","accessibilityLiveRegion","aria-live","screenReaderFocusable","accessibilityElementsHidden","accessibilityViewIsModal","accessibilityIgnoresInvertColors","accessibilityLanguage","accessibilityShowsLargeContentViewer","accessibilityLargeContentTitle","accessibilityRespondsToUserInteraction","cancelable","delayHoverIn","delayHoverOut","delayLongPress","pressRetentionOffset","android_disableSound","android_ripple","testOnly_pressed","unstable_pressDelay"],examples:[{id:"Card.elevated",title:"Elevated",props:{variant:"elevated",title:"Account summary",lead:"Updated today"},children:"Balance and recent activity appear here."},{id:"Card.outlined",title:"Outlined",props:{variant:"outlined",title:"Notes",padding:"lg"},children:"A short note about this account."},{id:"Card.collapsible",title:"Collapsible",props:{title:"Details",collapsible:!0,defaultCollapsed:!1,collapsedSummary:"3 items"},children:"Three items are listed in this section."}],usage:{when:["Related content should read as one group, such as a summary, a record or a list item.","The group may need a header, a footer, an image or a menu.","The whole group should be pressable and lead somewhere."],whenNot:[{text:"The content is a plain row in a list.",instead:"ListItem"},{text:"The content only needs spacing.",instead:"Box"}],do:[{note:"Give the card a title so the group has a name.",example:[{component:"Card",props:{title:"Account summary"}}]}],dont:[{note:"Do not nest cards inside cards. The surfaces and shadows pile up.",example:[{component:"Card",props:{title:"Outer"},children:[{component:"Card",props:{title:"Inner"}}]}]}],a11y:["Context menu items are also screen reader actions on the card.","Set accessibilityLabel on an interactive card so its purpose is announced."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Carousel",marker:null,platforms:["phone"],acceptsChildren:!1,props:{data:{type:"array",required:!0,description:"The slides. Each entry is handed to the slide renderer."},index:{type:"number",description:"The slide shown, counted from 0, when the screen controls it."},defaultIndex:{type:"number",default:0,description:"The slide shown at the start when the carousel keeps its own position."},autoPlay:{type:"boolean",default:!1,description:"Advances the slides on a timer. It implies loop."},autoPlayInterval:{type:"number",default:4e3,description:"The time between slides when autoPlay is on, in milliseconds."},loop:{type:"boolean",default:!1,description:"Jumps back to the first slide after the last."},showPagination:{type:"boolean",default:!0,description:"Draws the pagination marks under the slides."},paginationStyle:{type:"enum",values:["dots","bars","numbers"],default:"dots",description:"The look of the pagination marks."},itemWidth:{type:"stringOrNumber",description:"Width of each slide in points, or the text screen for the width of the parent.",default:"screen"},spacing:{type:"number",default:0,description:"Horizontal space between slides, in points."},accessibilityLabel:{type:"string",description:"Names the carousel for a screen reader."},showThumbnails:{type:"boolean",default:!1,description:"Draws a strip of small thumbnails under the carousel."},loading:{type:"boolean",default:!1,description:"Draws the placeholder shape instead of the slides while data loads."}},omit:["haptic"],examples:[{id:"Carousel.dots",title:"Dots",props:{data:["Sunset","Mountain","Coast"],showPagination:!0,paginationStyle:"dots"}},{id:"Carousel.bars",title:"Bars with spacing",props:{data:["Sunset","Mountain","Coast"],paginationStyle:"bars",itemWidth:280,spacing:12}},{id:"Carousel.numbers",title:"Numbers",props:{data:["Sunset","Mountain","Coast"],paginationStyle:"numbers",loop:!0}}],usage:{when:["A few slides of the same kind share one place, such as promotions or photos.","The person swipes sideways and sees where they are in the set.","A slide strip should advance on its own, such as a banner rotation."],whenNot:[{text:"The slides are steps of a first run flow.",instead:"OnboardingPager"},{text:"The items are a long scrolling list.",instead:"a list"}],do:[{note:"Keep the set short and show the pagination so the person knows more slides follow.",example:[{component:"Carousel",props:{data:["One","Two","Three"],showPagination:!0}}]}],dont:[{note:"Do not auto play a carousel that holds text the person must read. The slide changes before they finish.",example:[{component:"Carousel",props:{data:["One","Two","Three"],autoPlay:!0,autoPlayInterval:1e3}}]}],a11y:["Set accessibilityLabel so a screen reader names the carousel.","Auto play pauses while the person drags and resumes after a short idle time."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Checkbox",marker:null,platforms:["phone"],acceptsChildren:!1,props:{checked:{type:"boolean",description:"Whether the box is checked, when the screen controls it."},defaultChecked:{type:"boolean",description:"Whether the box starts checked, when the checkbox keeps its own state."},indeterminate:{type:"boolean",default:!1,description:"Draws the mixed state, such as a select all box with some rows chosen."},disabled:{type:"boolean",default:!1,description:"Blocks presses and dims the checkbox."},label:{type:"node",description:"The text beside the box. A node label needs an accessibility label."},description:{type:"node",description:"A secondary line under the label."},error:{type:"node",description:"An error line under the label. It also draws the box in the error colour; true shows the error state without a message."},help:{type:"node",description:"A node beside the label, such as an info button. It is not part of the checkbox and does not toggle it."},labelLines:{type:"number",description:"The lines the label may take before it truncates. Zero or unset means no limit."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"The size of the box."},tone:{type:"enum",values:["primary","success","warning","danger"],default:"primary",description:"The colour of the checked box."},accessibilityHint:{type:"string",description:"What happens when the control is used, read after its name by a screen reader."},accessibilityLabel:{type:"string",description:"The accessible name of the checkbox. Needed when the label is a node."}},omit:["haptic","hitSlop","id","needsOffscreenAlphaCompositing","pointerEvents","removeClippedSubviews","nativeID","collapsable","collapsableChildren","renderToHardwareTextureAndroid","focusable","tabIndex","shouldRasterizeIOS","isTVSelectable","hasTVPreferredFocus","tvParallaxShiftDistanceX","tvParallaxShiftDistanceY","tvParallaxTiltAngle","tvParallaxMagnification","accessible","accessibilityActions","aria-label","accessibilityRole","accessibilityState","aria-busy","aria-checked","aria-disabled","aria-expanded","aria-selected","accessibilityValue","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","importantForAccessibility","aria-hidden","aria-modal","role","accessibilityLabelledBy","aria-labelledby","accessibilityLiveRegion","aria-live","screenReaderFocusable","accessibilityElementsHidden","accessibilityViewIsModal","accessibilityIgnoresInvertColors","accessibilityLanguage","accessibilityShowsLargeContentViewer","accessibilityLargeContentTitle","accessibilityRespondsToUserInteraction","cancelable","delayHoverIn","delayHoverOut","delayLongPress","pressRetentionOffset","android_disableSound","android_ripple","testOnly_pressed","unstable_pressDelay"],examples:[{id:"Checkbox.checked",title:"Checked",props:{checked:!0,label:"Email me a receipt"}},{id:"Checkbox.description",title:"With a description",props:{checked:!1,label:"Subscribe to updates",description:"A monthly summary, no more."}},{id:"Checkbox.error",title:"Error",props:{checked:!1,label:"I accept the terms",error:"You must accept the terms to continue."}},{id:"Checkbox.indeterminate",title:"Mixed state",props:{indeterminate:!0,label:"Select all",size:"lg"}}],usage:{when:["The person picks any number of options from a list.","A single yes or no needs to be saved with a form, such as accepting terms.","A parent box should show that only some of its rows are chosen."],whenNot:[{text:"The person picks exactly one option.",instead:"Radio"},{text:"The setting takes effect at once when changed.",instead:"Switch"}],do:[{note:"Write the label so a checked box reads as a true statement.",example:[{component:"Checkbox",props:{checked:!0,label:"Email me a receipt"}}]}],dont:[{note:"Do not leave a checkbox with no label. The person cannot tell what it controls.",example:[{component:"Checkbox",props:{checked:!1}}]}],a11y:["A node label needs an accessibility label, which becomes the screen reader name.","Pressing the help node beside the label does not toggle the checkbox."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Chip",marker:null,platforms:["phone"],acceptsChildren:!1,props:{label:{type:"string",required:!0,description:"Chip text."},count:{type:"stringOrNumber",description:'A figure after the label, drawn quieter than it (regular weight, caption size, tabular digits): "Open" with `count={4}`.'},selected:{type:"boolean",default:!1,description:"Selected visual state."},selectionMode:{type:"enum",values:["single","multiple","radio"],default:"single",description:"How a pressable chip announces itself."},leftIcon:{type:"icon",description:"Icon before the label."},iconVariant:{type:"enum",values:["linear","bold","broken","bulk","outline","twotone"],description:"Iconsax style for a leftIcon given as a name. Default linear."},variant:{type:"enum",values:["filled","outlined","soft"],default:"filled",description:"Visual style."},tone:{type:"enum",values:["primary","neutral","success","warning","danger","info"],default:"neutral",description:"Semantic color."},size:{type:"enum",values:["sm","md"],default:"md",description:"Size scale."},disabled:{type:"boolean",default:!1,description:"Disabled state."},loading:{type:"boolean",default:!1,description:"When true, renders the component as its authored skeleton placeholder shape."},accessibilityLabel:{type:"string",description:"Overrides the default accessibility label."}},omit:["haptic"],examples:[{id:"Chip.default",title:"Default",props:{label:"Engineering"}},{id:"Chip.selected",title:"Selected multiple",props:{label:"Design",selected:!0,selectionMode:"multiple",tone:"primary"}},{id:"Chip.count",title:"With count",props:{label:"Open",count:4,variant:"outlined"}},{id:"Chip.withIcon",title:"With icon",props:{label:"Starred",leftIcon:"star",variant:"soft",tone:"primary"}}],usage:{when:["A compact tag, optionally selectable or closable.","A compact pill for filters, tags, and selections."],whenNot:[{text:"When the affordance is an action.",instead:"Button"},{text:"For 2 to 4 short values in a single exclusive switch.",instead:"SegmentedControl"},{text:"When options can wrap freely or be multi-select and the library should manage the selection state.",instead:"ChoiceGroup"}],do:[{note:"Pass a string or number to count to render a figure after the label.",example:[{component:"Chip",props:{label:"Open",count:4}}]}],dont:[{note:"Do not pass 0 to count if you want it hidden while loading.",example:[{component:"Chip",props:{label:"Open",count:0}}]}],a11y:["Announces as a radio, a checkbox, or a button depending on the selection mode.","Exposes a checked state for radio and multiple selection modes, and a selected state otherwise.","A radio chip adds vertical hit slop to reach a 44 point touch target."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"ChoiceGroup",marker:null,platforms:["phone"],acceptsChildren:!1,props:{value:{type:"any",description:"The selected value when the parent controls it: one option's value, or a list of them when several can be chosen."},options:{type:"array",required:!0,description:"The choices, in the ChoiceOption shape by default.",itemFields:{label:{type:"string",required:!0,description:"The text shown for the option and read aloud."},value:{type:"stringOrNumber",required:!0,description:"The value the group stores when this option is chosen."},color:{type:"string",description:"Tints the default card's label, border, dot and selected fill; defaults to the primary colour."},description:{type:"string",description:"A second line shown on the card only; the chip is label and icon alone."},icon:{type:"icon",description:"Icon before the label: an AppIcon name drawn in the option's current ink and bold while selected, or a name and variant object, a render function or any node."},disabled:{type:"boolean",description:"Disables this option only."}}},selectionMode:{type:"enum",values:["single","multiple"],description:"Single picks one option (radio); multiple toggles any number (checkbox). Defaults to single."},variant:{type:"enum",values:["card","chip"],default:"card",description:"Look of the built-in template: the bordered card or the icon-and-label chip."},indicatorPosition:{type:"enum",values:["leading","trailing"],default:"trailing",description:"Side of the card the radio dot sits on; the chip has no dot."},direction:{type:"enum",values:["row","column"],default:"row",description:"Main axis of the option list."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"Density of the built-in templates: padding, font size, icon and dot."},gap:{type:"number",description:"Gap between options. Default theme.space.sm."},wrap:{type:"boolean",default:!1,description:"Allow options to wrap onto multiple lines (swatch grids)."},fullWidth:{type:"boolean",description:"Stretch options equally along the main axis. Default true for an unwrapped row of cards, false otherwise; a chip hugs its content."},disabled:{type:"boolean",default:!1,description:"Disables the whole group; per-option disabled still applies on top."},labelLines:{type:"number",default:1,description:"Lines an option label may take in the built-in templates before it ends in an ellipsis."},descriptionLines:{type:"number",default:2,description:"Lines an option description may take in the card before it ends in an ellipsis."},accessibilityLabel:{type:"string",description:"Accessible label for the group."},min:{type:"number",description:"Multiple mode only: fewest options that stay selected. Pressing a selected option at this count does nothing."},max:{type:"number",description:"Multiple mode only: most options that can be selected. At this count the unselected options are disabled."}},omit:["defaultValue","haptic"],examples:[{id:"ChoiceGroup.status",title:"Status cards",props:{options:[{label:"Hot",value:"Hot",icon:"flash"},{label:"Warm",value:"Warm",icon:"sun-1"},{label:"Cold",value:"Cold",icon:"cloud"}],value:"Hot"}},{id:"ChoiceGroup.chip",title:"Role chips",props:{variant:"chip",options:[{label:"Admin",value:"admin",icon:"shield-tick"},{label:"Finance",value:"finance",icon:"wallet-2"},{label:"Viewer",value:"viewer",icon:"eye"}],value:"finance"}},{id:"ChoiceGroup.column",title:"Plans in a column",props:{direction:"column",indicatorPosition:"leading",options:[{label:"Free",value:"free",description:"Hobby projects"},{label:"Pro",value:"pro",description:"Solo professionals"},{label:"Team",value:"team",description:"Up to 10 seats"}],value:"pro"}}],usage:{when:["Choosing one option from a short, fully visible set, such as a status or a plan.","Picking a role or filter where each choice has its own icon (the chip variant)."],whenNot:[{text:"The list is long and needs scrolling or search",instead:"Select"},{text:"The options must join into one bar of segments that slides",instead:"SegmentedControl"},{text:"The question is a single yes or no",instead:"Checkbox"}],do:[{note:"Give each option a label and a value, and pass a default so one option starts selected.",example:[{component:"ChoiceGroup",props:{options:[{label:"Hot",value:"Hot"},{label:"Warm",value:"Warm"},{label:"Cold",value:"Cold"}],value:"Hot"}}]}],dont:[{note:"Pass a single value in multiple mode; multiple mode takes an array of values.",example:[{component:"ChoiceGroup",props:{selectionMode:"multiple",options:[{label:"Hot",value:"Hot"},{label:"Warm",value:"Warm"}],value:"Hot"}}]}],a11y:["Single mode exposes a radiogroup of radio options; multiple mode exposes checkboxes with checked state and no radiogroup role.","Each option is read with its label, and a card reads its full description even when the text is cut short on screen.","A disabled group or option is announced as disabled and cannot be pressed."]}});
@@ -1 +1 @@
1
- "use strict";import{forwardRef,useCallback,useMemo,useState}from"react";import{Platform,StyleSheet,TextInput,View}from"react-native";import{KeyboardStickyView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useControllableState}from"../../hooks/useControllableState.js";import{useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{IconButton}from"../IconButton/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const MIN_BOX=44;export const Composer=forwardRef(({onSend:e,value:o,onChangeText:t,placeholder:a="Message",accessibilityLabel:s,sendLabel:i="Send",busy:r=!1,disabled:l=!1,maxLength:n,maxLines:d=5,leading:c,trailing:m,above:b,below:p,keyboardAware:u=!0,keyboardOffset:h,safeArea:x=!0,autoFocus:f,haptic:g,style:y,testID:S},C)=>{const j=useTheme(),v=useSafeAreaInsets(),w=useMemo(()=>buildStyles(j),[j]),[I,k]=useControllableState({value:o,defaultValue:"",onChange:t}),T=I.trim(),V=r||l||""===T,_=x?v.bottom:0,z=h??_,B=resolveFieldTextStyle(j,{disabled:l}),D=j.text.base.size,F=Math.round(D*j.leading.normal),L=(44-F)/2,M=F*d+2*L,[H,A]=useState(void 0),P=useCallback(e=>{const o=e.nativeEvent.contentSize.height+2*L;A(Math.min(Math.max(o,44),M))},[L,M]),O=useCallback(()=>{V||(k(""),e(T))},[V,k,e,T]),R=_jsxs(View,{style:[w.bar,{paddingBottom:j.space.sm+_},y],testID:S,children:[b,_jsxs(View,{style:w.row,children:[c,_jsx(View,{style:[w.box,l?w.boxDisabled:null],children:_jsx(TextInput,{ref:C,value:I,onChangeText:k,multiline:!0,maxLength:n,editable:!l,autoFocus:f,placeholder:a,placeholderTextColor:B.placeholderColor,selectionColor:j.colors["field-caret"],accessibilityLabel:s??a,accessibilityState:{disabled:l},"aria-disabled":l,onContentSizeChange:"web"===Platform.OS?P:void 0,style:[w.input,{color:B.color,...B.weightStyle,fontSize:D,lineHeight:F,paddingVertical:L,maxHeight:M,height:"web"===Platform.OS?H:void 0}],testID:S?`${S}-input`:void 0})}),m,_jsx(IconButton,{icon:"send",accessibilityLabel:i,variant:"solid",tone:"primary",disabled:V,loading:r,haptic:g,onPress:O,testID:S?`${S}-send`:void 0})]}),p]});return u?_jsx(KeyboardStickyView,{offset:{closed:0,opened:z},children:R}):R});Composer.displayName="Composer";const buildStyles=e=>StyleSheet.create({bar:{gap:e.space.xs,paddingHorizontal:e.space.md,paddingTop:e.space.sm,backgroundColor:e.colors.bg,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:e.colors["border-subtle"]},row:{flexDirection:"row",alignItems:"flex-end",gap:e.space.sm},box:{flex:1,minHeight:44,justifyContent:"center",backgroundColor:e.colors["field-bg"],borderRadius:e.radius.pill,...smoothCorners,paddingHorizontal:e.space.md},boxDisabled:{backgroundColor:e.colors["field-bg-disabled"]},input:{margin:e.space.none,paddingHorizontal:e.space.none,includeFontPadding:!1,textAlignVertical:"top"}});export default Composer;
1
+ "use strict";import{forwardRef,useCallback,useMemo,useState}from"react";import{Platform,StyleSheet,TextInput,View}from"react-native";import{KeyboardStickyView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useControllableState}from"../../hooks/useControllableState.js";import{useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{IconButton}from"../IconButton/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const MIN_BOX=44;export const Composer=forwardRef(({onSend:e,value:o,onChangeText:t,placeholder:a="Message",accessibilityLabel:s,sendLabel:i="Send",busy:r=!1,disabled:l=!1,maxLength:n,maxLines:d=5,leading:c,trailing:b,above:m,below:p,keyboardAware:u=!0,keyboardOffset:h,safeArea:x=!0,autoFocus:f,haptic:g,style:y,testID:S},C)=>{const j=useTheme(),v=useSafeAreaInsets(),w=useMemo(()=>buildStyles(j),[j]),[I,k]=useControllableState({value:o,defaultValue:"",onChange:t}),T=I.trim(),V=r||l||""===T,_=x?v.bottom:0,z=h??_,B=resolveFieldTextStyle(j,{disabled:l}),D=j.text.base.size,F=Math.round(D*j.leading.body),L=(44-F)/2,M=F*d+2*L,[H,A]=useState(void 0),P=useCallback(e=>{const o=e.nativeEvent.contentSize.height+2*L;A(Math.min(Math.max(o,44),M))},[L,M]),O=useCallback(()=>{V||(k(""),e(T))},[V,k,e,T]),R=_jsxs(View,{style:[w.bar,{paddingBottom:j.space.sm+_},y],testID:S,children:[m,_jsxs(View,{style:w.row,children:[c,_jsx(View,{style:[w.box,l?w.boxDisabled:null],children:_jsx(TextInput,{ref:C,value:I,onChangeText:k,multiline:!0,maxLength:n,editable:!l,autoFocus:f,placeholder:a,placeholderTextColor:B.placeholderColor,selectionColor:j.colors["field-caret"],accessibilityLabel:s??a,accessibilityState:{disabled:l},"aria-disabled":l,onContentSizeChange:"web"===Platform.OS?P:void 0,style:[w.input,{color:B.color,...B.weightStyle,fontSize:D,lineHeight:F,paddingVertical:L,maxHeight:M,height:"web"===Platform.OS?H:void 0}],testID:S?`${S}-input`:void 0})}),b,_jsx(IconButton,{icon:"send",accessibilityLabel:i,variant:"solid",tone:"primary",disabled:V,loading:r,haptic:g,onPress:O,testID:S?`${S}-send`:void 0})]}),p]});return u?_jsx(KeyboardStickyView,{offset:{closed:0,opened:z},children:R}):R});Composer.displayName="Composer";const buildStyles=e=>StyleSheet.create({bar:{gap:e.space.xs,paddingHorizontal:e.space.md,paddingTop:e.space.sm,backgroundColor:e.colors.bg,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:e.colors["border-subtle"]},row:{flexDirection:"row",alignItems:"flex-end",gap:e.space.sm},box:{flex:1,minHeight:44,justifyContent:"center",backgroundColor:e.colors["field-bg"],borderRadius:e.radius.pill,...smoothCorners,paddingHorizontal:e.space.md},boxDisabled:{backgroundColor:e.colors["field-bg-disabled"]},input:{margin:e.space.none,paddingHorizontal:e.space.none,includeFontPadding:!1,textAlignVertical:"top"}});export default Composer;
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Composer",marker:null,platforms:["phone"],acceptsChildren:!1,props:{placeholder:{type:"string",default:"Message",description:"The placeholder text shown while the box is empty."},value:{type:"string",description:"Controlled draft text; leave unset and the composer keeps its own."},accessibilityLabel:{type:"string",description:"The text box's screen reader name, defaulting to the placeholder."},sendLabel:{type:"string",default:"Send",description:"The send button's screen reader name."},busy:{type:"boolean",default:!1,description:"A reply is arriving: the person can type but not send, and send shows a spinner."},disabled:{type:"boolean",default:!1,description:"Nothing can be typed or sent."},maxLength:{type:"number",description:"The maximum number of characters the box accepts."},maxLines:{type:"number",default:5,description:"The box grows to this many lines, then scrolls."},leading:{type:"node",description:"Before the box, e.g. an attach button."},trailing:{type:"node",description:"Between the box and send, e.g. a microphone button."},above:{type:"node",description:"Inside the bar, above the row: a banner or note that rides the keyboard too."},below:{type:"node",description:"Inside the bar, below the row: a disclaimer."},keyboardAware:{type:"boolean",default:!0,description:"Rides the keyboard so the composer stays visible above it."},keyboardOffset:{type:"number",description:"How far below the bar the keyboard top starts: the bottom safe area inset plus anything under it."},safeArea:{type:"boolean",default:!0,description:"Pad the bar for the bottom safe area, or turn off above a tab bar."},autoFocus:{type:"boolean",description:"Focuses the text input when the component mounts."}},omit:["haptic"],examples:[{id:"Composer.default",title:"Default",props:{placeholder:"Message Asha",keyboardAware:!1,safeArea:!1}},{id:"Composer.busy",title:"Reply arriving",props:{placeholder:"Message Asha",busy:!0,keyboardAware:!1,safeArea:!1}},{id:"Composer.disabled",title:"Closed conversation",props:{placeholder:"Messaging is closed",disabled:!0,keyboardAware:!1,safeArea:!1}}],usage:{when:["Provide the message input bar at the bottom of a chat screen.","Allow typing messages with an integrated send button and action slots.","Pair with MessageList to ride the keyboard automatically in a chat view."],whenNot:[{text:"A single labelled field.",instead:"Input"},{text:"A long form answer.",instead:"Input with type textarea"}],do:[{note:"Turn off keyboardAware when placing the composer inside a sheet that already moves with the keyboard.",example:[{component:"Composer",props:{placeholder:"Message Asha",keyboardAware:!1}}]}],dont:[{note:"Do not leave keyboardAware enabled inside a sheet that already moves with the keyboard.",example:[{component:"Composer",props:{placeholder:"Message Asha",keyboardAware:!0}}]}],a11y:["The text input accessibility label defaults to the placeholder text when accessibilityLabel is unset.","The send button accessibility label uses sendLabel, which defaults to Send.","The send button reports its disabled or busy loading state to assistive technologies."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Confetti",marker:null,platforms:["phone"],acceptsChildren:!1,props:{count:{type:"number",default:80,description:"Number of pieces."},colors:{type:"array",description:"Piece colours. Defaults to a vibrant set drawn from the theme palette."},preset:{type:"enum",values:["pop","rain","fireworks"],default:"pop",description:"Which animation to run. 'pop' bursts open from the origin, rises, hangs, then floats down; 'rain' falls from the top edge; 'fireworks' fires several staggered bursts at random points."},shapes:{type:"array",description:"Which shapes appear. Defaults to a mix chosen per preset. Members: strip, square, circle, triangle, star, streamer."},speed:{type:"enum",values:["slow","normal","fast"],default:"normal",description:"Scales duration. Slow is 1.6x, fast is 0.6x."},physics:{type:"object",fields:{velocity:{type:"number",description:"Launch speed. Above 1 throws pieces further from the origin."},drag:{type:"number",description:"Air resistance. Above 1 makes pieces give up their launch speed sooner."},fallSpeed:{type:"number",description:"Steady falling speed once the launch speed is spent."},spread:{type:"number",description:"Burst arc in degrees, for 'pop' and 'fireworks'. Ignored by 'rain'."}},description:"Tune the preset's motion. Each value multiplies the preset's own."},origin:{type:"object",fields:{x:{type:"number",required:!0,description:"Horizontal origin coordinate."},y:{type:"number",required:!0,description:"Vertical origin coordinate."}},description:"Burst origin for 'pop'. Defaults to the centre of the container."},duration:{type:"number",default:2800,description:"Base animation duration in ms, before speed scales it."},fadeOut:{type:"boolean",default:!0,description:"Fade pieces out near the end."},autoStart:{type:"boolean",default:!1,description:"Fire automatically on mount."},recycle:{type:"boolean",default:!1,description:"Loop continuously until `stop()` is called."},size:{type:"number",default:10,description:"Base piece size in px, varied ±40% per piece."}},omit:[],examples:[{id:"Confetti.pop",title:"Pop burst",props:{preset:"pop",count:80,autoStart:!0}},{id:"Confetti.rain",title:"Rain of circles and squares",props:{preset:"rain",speed:"slow",shapes:["circle","square"],autoStart:!0}},{id:"Confetti.fireworks",title:"Fireworks",props:{preset:"fireworks",count:120,duration:3600,autoStart:!0}}],usage:{when:["Celebration moments such as an order confirmed or an achievement unlocked.","When a decorative burst should overlay the current screen without blocking interaction."],whenNot:[{text:"An element entering or leaving the screen.",instead:"AnimatePresence"},{text:"A quiet confirmation without a celebration.",instead:"Toast"}],do:[{note:"Place Confetti last in the parent so it covers the area, and fire it through a ref or with autoStart.",example:[{component:"Confetti",props:{preset:"pop",count:80,autoStart:!0}}]}],dont:[{note:"Do not rely on Confetti for layout space; it draws an absolute-fill overlay with no pointer events.",example:[{component:"Confetti",props:{preset:"pop",recycle:!0}}]}],a11y:["The burst is decorative and conveys no information.","Under reduced motion the animation stops and onComplete fires immediately."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"DatePicker",marker:null,platforms:["phone"],acceptsChildren:!1,props:{visible:{type:"boolean",description:"Opens the calendar sheet when the parent controls it; leave out to use the built-in trigger field."},value:{type:"string",description:"The selected date."},minDate:{type:"string",description:"The earliest date that can be picked."},maxDate:{type:"string",description:"The latest date that can be picked."},disabledDates:{type:"array",description:"Single dates that cannot be picked."},mode:{type:"enum",values:["modal","inline"],default:"modal",description:"Shows the calendar in a sheet or inline in the page."},locale:{type:"string",default:"en-IN",description:"Locale for month and weekday labels."},weekStartsOn:{type:"enum",values:[0,1,6],default:0,description:"First day of week, 0 is Sunday."},title:{type:"string",default:"Select Date",description:"The heading of the calendar sheet."},confirmLabel:{type:"string",default:"Confirm",description:"The label of the confirm button."},cancelLabel:{type:"string",default:"Cancel",description:"The label of the cancel button."},label:{type:"string",description:"Field label when used in trigger mode."},placeholder:{type:"string",description:"Placeholder text when used in trigger mode."},helperText:{type:"string",description:"Helper text below the field when used in trigger mode."},error:{type:"node",description:"Error message shown below the field."},required:{type:"boolean",description:"Shows a required marker on the trigger label."},disabled:{type:"boolean",description:"Disables the trigger field."},size:{type:"enum",values:["sm","md","lg"],description:"Size of the trigger field."},variant:{type:"enum",values:["outlined","filled","underline"],description:"Visual style of the trigger field."},clearable:{type:"boolean",description:"Shows a clear button once a value is set."}},omit:["haptic"],examples:[{id:"DatePicker.trigger",title:"Trigger field",props:{label:"Start date",placeholder:"Select date",size:"md",variant:"outlined"}},{id:"DatePicker.required",title:"Required with helper",props:{label:"Birth date",required:!0,helperText:"Tap to open the calendar"}},{id:"DatePicker.error",title:"With error",props:{label:"Start date",error:"This field is required",clearable:!0}},{id:"DatePicker.inline",title:"Inline calendar",props:{visible:!0,mode:"inline"}}],usage:{when:["A modal calendar is needed with bounds and disabled dates.","A calendar with locale aware labels is required."],whenNot:[{text:"A time needs to be picked.",instead:"TimePicker"},{text:"A start and end date need to be picked.",instead:"DateRangePicker"},{text:"An always visible month grid is needed.",instead:"Calendar"}],do:[{note:"Omit the visible prop to use trigger mode and let the component manage its own open state.",example:[{component:"DatePicker",props:{label:"Date of birth",placeholder:"Select date"}}]}],dont:[{note:"Do not pass the visible prop unless you need to own the open state externally with a custom trigger.",example:[{component:"DatePicker",props:{visible:!0}}]}],a11y:["The modal sheet traps focus for screen readers when open.","Day cells announce their full date and their selected or disabled states.","Under Reduce Motion the sheet fades in and out and day cells do not scale on press."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"DateRangePicker",marker:null,platforms:["phone"],acceptsChildren:!1,props:{visible:{type:"boolean",description:"Opens the range sheet when the parent controls it; leave out to use the built-in trigger field."},value:{type:"object",required:!0,description:"The chosen range, from a start day to an end day.",fields:{start:{type:"string",required:!0,description:"Start day of the range, as an ISO 8601 date, or null."},end:{type:"string",required:!0,description:"End day of the range, as an ISO 8601 date, or null."}}},label:{type:"string",description:"Label shown above the trigger field."},placeholder:{type:"string",description:"Text shown in the trigger field when no range is set."},helperText:{type:"string",description:"Helper text shown below the trigger field."},error:{type:"node",description:"Error shown in place of the helper text."},required:{type:"boolean",description:"Shows a required marker on the trigger field."},disabled:{type:"boolean",description:"Disables the trigger field."},size:{type:"enum",values:["sm","md","lg"],description:"Size of the trigger field."},variant:{type:"enum",values:["outlined","filled","underline"],description:"Visual treatment of the trigger field."},clearable:{type:"boolean",description:"Shows a clear affordance in the trigger field."},minDate:{type:"string",description:"Selection bound: days before this date cannot be picked, as an ISO 8601 date."},maxDate:{type:"string",description:"Selection bound: days after this date cannot be picked, as an ISO 8601 date."},disabledDates:{type:"array",description:"Specific dates, as ISO 8601 dates, that cannot be picked."},markedDates:{type:"array",description:"Holidays, events and pending requests drawn on the grid; see Calendar.",itemFields:{date:{type:"string",required:!0,description:"The day, as an ISO 8601 date."},kind:{type:"enum",values:["holiday","event","pending"],required:!0,description:"What the day is: a holiday, an event or a pending request."},label:{type:"string",description:"What the day is, such as Dussehra or Casual leave; read aloud before the kind."},tone:{type:"enum",values:["success","warning","danger","info","primary","neutral"],description:"Dot colour. Default: danger for a holiday, primary for an event, warning for pending."}}},strikeMarkedInRange:{type:"boolean",description:"Strike holidays inside the chosen range and read them as not counted; see Calendar."},locale:{type:"string",default:"en-IN",description:"Locale used to format dates in the grid and the range header."},weekStartsOn:{type:"enum",values:[0,1,6],default:0,description:"First weekday of the grid: 0 Sunday, 1 Monday, 6 Saturday."},title:{type:"string",default:"Select Date Range",description:"Heading shown at the top of the sheet."},confirmLabel:{type:"string",default:"Confirm",description:"Label of the confirm button."},cancelLabel:{type:"string",default:"Cancel",description:"Label of the cancel button."},maxRange:{type:"number",description:"Cap on the selected range length, in days."}},omit:["haptic"],examples:[{id:"DateRangePicker.trigger",title:"Trigger field",props:{value:{start:"2026-10-12",end:"2026-10-16"},label:"Dates",placeholder:"Select range",size:"md"}},{id:"DateRangePicker.weekStart",title:"Monday start with a cap",props:{value:{start:"2026-10-12",end:"2026-10-16"},label:"Leave",weekStartsOn:1,maxRange:14}},{id:"DateRangePicker.disabled",title:"Disabled",props:{value:{start:"2026-10-12",end:"2026-10-16"},label:"Dates",disabled:!0}}],usage:{when:["Pick a start day and an end day as one range, such as the dates of a stay or a leave request.","Confirm a range in one step inside a sheet, with an optional cap on its length."],whenNot:[{text:"Picking a single day.",instead:"DatePicker"},{text:"Showing a month grid that stays on screen.",instead:"Calendar"},{text:"Picking a time of day.",instead:"TimePicker"}],do:[{note:"Set maxRange when a range has a limit, such as a 14-day leave cap, so a longer pick restarts from the new tap.",example:[{component:"DateRangePicker",props:{label:"Leave",weekStartsOn:1,maxRange:14}}]}],dont:[{note:"Do not use it for one day; a single day belongs in DatePicker.",example:[{component:"DateRangePicker",props:{label:"Day"}}]}],a11y:["Marked days are read aloud with their label before their kind, such as Dussehra holiday.","A range longer than maxRange is rejected with a warning haptic, and the selection restarts from the tapped day.","The picker opens as a modal sheet that screen readers treat as modal; Cancel, Dismiss or a drag down from the title closes it."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"DateSeparator",marker:null,platforms:["phone"],acceptsChildren:!1,props:{date:{type:"string",description:"The day to name."},label:{type:"string",description:'Draws this text instead of a day, e.g. "New messages" above the first unread.'},emphasis:{type:"boolean",default:!1,description:"Draws the text and rules in the brand colour, for an unread divider."},labels:{type:"object",description:"Custom relative day labels, defaulting to Today and Yesterday.",fields:{today:{type:"string",description:"The label for today, defaulting to Today."},yesterday:{type:"string",description:"The label for yesterday, defaulting to Yesterday."}}},now:{type:"string",description:"The reference for Today and Yesterday."}},omit:[],examples:[{id:"DateSeparator.day",title:"A day",props:{date:"2026-10-11T09:00:00Z"}},{id:"DateSeparator.label",title:"A text label",props:{label:"Earlier"}},{id:"DateSeparator.unread",title:"Unread divider",props:{label:"New messages",emphasis:!0}}],usage:{when:["Separate groups of chat messages by day in a message list.","Draw an unread divider line above the first unread message with label and emphasis."],whenNot:[{text:"A heading above a block of content.",instead:"SectionHeader"},{text:"Separating days inside MessageList where the list already inserts separators.",instead:"MessageList day grouping"}],do:[{note:"Pass either date for a day divider or label with emphasis for an unread messages divider.",example:[{component:"DateSeparator",props:{date:"2026-10-11T09:00:00Z"}}]}],dont:[{note:"Do not pass both date and label together, because label overrides date.",example:[{component:"DateSeparator",props:{date:"2026-10-11T09:00:00Z",label:"Today"}}]}],a11y:["The text uses an accessibility header role so screen reader users can navigate through a conversation by day.","The centred text element is announced directly to assistive technologies."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"DecimalInput",marker:null,platforms:["phone"],acceptsChildren:!1,props:{symbol:{type:"node",description:"The quantity's symbol, drawn in the prefix box before the value."},value:{type:"stringOrNumber",description:"The figure. Text in the default mode, a number or an empty string in numeric mode. Null and undefined show an empty field."},max:{type:"number",description:"A keystroke or paste that would pass this is refused; a figure already past it can still be edited down."},min:{type:"number",description:"Lower bound, refused the same way as max."},decimals:{type:"number",description:"Most fraction digits kept after the point."},whole:{type:"boolean",default:!1,description:"Digits only. Number-pad keyboard."},signed:{type:"boolean",default:!1,description:"Allow one leading minus. Numeric keyboard."},allowExponent:{type:"boolean",default:!1,description:"Allow exponent notation such as 1e-5."},numeric:{type:"boolean",default:!1,description:"Hand onChange a number. The field keeps the typed text itself, so a half-typed figure survives the keystroke, and follows value when it changes from elsewhere."},unclearCommaMessage:{type:"node",default:"Use a point for the decimal mark. A comma before three digits could mean thousands.",description:"Shown when the figure has a comma before exactly three digits and no error is passed."},readOnly:{type:"boolean",default:!1,description:"Selectable and focusable but not editable. Unlike disabled, the field is not dimmed."},disabled:{type:"boolean",default:!1,description:"Dims the field out and blocks editing."},label:{type:"node",description:"A string, or a node for a symbol with a subscript. A node label needs an explicit accessibilityLabel."},help:{type:"node",description:"Drawn beside the static label, right after it and centred on its line, such as a glossary info button."},error:{type:"node",description:"A string or a node puts the field in the error state and replaces the helper; true shows the error state without a message."},helperText:{type:"node",description:"A string or a node, shown below the field when there is no error."},prefix:{type:"node",description:"Fixed text drawn before the value in the leading slot, such as a currency symbol or a country code."},placeholder:{type:"string",description:"Placeholder text shown while the field is empty."},unit:{type:"string",description:"A fixed unit drawn after the value in the trailing slot, such as km, % or /month."},accessibilityLabel:{type:"string",description:"The screen reader name of the field. When left out, the label is used, or the placeholder when there is no label."},maxLength:{type:"number",description:"Character limit passed to the text input."},borderRadius:{type:"number",description:"Per-instance override for the field's corner radius. Wins over the field size's radius."},type:{type:"enum",values:["input","password","textarea"],default:"input",description:"One switch for the behaviour set: input for single-line text, password for a masked value with an eye toggle, textarea for multi-line text."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"Field height, padding and font size."},variant:{type:"enum",values:["outlined","filled","underline"],description:"The field's look. When left out, the theme's field variant is used, and outlined when the theme sets none."},labelMode:{type:"enum",values:["float","top"],description:"top keeps the static label above the field. float uses a floating label that rises to the top border on focus."},showPasswordToggle:{type:"boolean",default:!1,description:"Setting this alone also puts the field in password mode, the same as type password."},secureTextEntry:{type:"boolean",default:!1,description:"React Native's own prop: masks the value without the eye toggle."},multiline:{type:"boolean",default:!1,description:"React Native's own prop, the same as type textarea."},required:{type:"boolean",default:!1,description:"Marks the field as required."},showCounter:{type:"boolean",default:!0,description:"Renders a character counter below the field when maxLength is set. Set false for fields that cap input without advertising it."},leftIcon:{type:"icon",description:"Leading slot: an icon name such as user, a name and variant object, a render function or a node."},rightIcon:{type:"icon",description:"Trailing slot, same contract as leftIcon."},action:{type:"object",description:"A button beside the field box, for a Verify, Apply or Look up action on what was typed.",fields:{label:{type:"string",required:!0,description:"The button's text."},loading:{type:"boolean",description:"Shows the button's spinner and blocks presses."},disabled:{type:"boolean",description:"Blocks presses. The button is also disabled whenever the field is."},variant:{type:"enum",values:["solid","soft","outline","ghost","link","glass"],description:"Button variant."},tone:{type:"enum",values:["primary","secondary","success","warning","danger","neutral"],description:"Button tone."},icon:{type:"icon",description:"Icon drawn before the button label."}}}},omit:["allowFontScaling","autoCapitalize","autoComplete","autoCorrect","autoFocus","blurOnSubmit","submitBehavior","caretHidden","contextMenuHidden","defaultValue","editable","inputMode","placeholderTextColor","returnKeyType","enterKeyHint","selectTextOnFocus","selection","selectionColor","textAlign","inputAccessoryViewID","inputAccessoryViewButtonLabel","maxFontSizeMultiplier","hitSlop","id","needsOffscreenAlphaCompositing","pointerEvents","removeClippedSubviews","nativeID","collapsable","collapsableChildren","renderToHardwareTextureAndroid","focusable","tabIndex","shouldRasterizeIOS","isTVSelectable","hasTVPreferredFocus","tvParallaxShiftDistanceX","tvParallaxShiftDistanceY","tvParallaxTiltAngle","tvParallaxMagnification","accessible","accessibilityActions","aria-label","accessibilityRole","accessibilityState","aria-busy","aria-checked","aria-disabled","aria-expanded","aria-selected","accessibilityHint","accessibilityValue","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","importantForAccessibility","aria-hidden","aria-modal","role","accessibilityLabelledBy","aria-labelledby","accessibilityLiveRegion","aria-live","screenReaderFocusable","accessibilityElementsHidden","accessibilityViewIsModal","accessibilityIgnoresInvertColors","accessibilityLanguage","accessibilityShowsLargeContentViewer","accessibilityLargeContentTitle","accessibilityRespondsToUserInteraction","disableKeyboardShortcuts","clearButtonMode","clearTextOnFocus","dataDetectorTypes","enablesReturnKeyAutomatically","keyboardAppearance","passwordRules","rejectResponderTermination","selectionState","spellCheck","textContentType","scrollEnabled","lineBreakStrategyIOS","lineBreakModeIOS","smartInsertDelete","cursorColor","selectionHandleColor","importantForAutofill","disableFullscreenUI","inlineImageLeft","inlineImagePadding","numberOfLines","returnKeyLabel","textBreakStrategy","underlineColorAndroid","textAlignVertical","showSoftInputOnFocus","verticalAlign"],examples:[{id:"DecimalInput.amount",title:"Amount with symbol",props:{label:"Amount",symbol:"₹",max:1e5}},{id:"DecimalInput.whole",title:"Whole number with unit",props:{label:"Quantity",whole:!0,unit:"pcs"}},{id:"DecimalInput.signed",title:"Signed with two decimals",props:{label:"Adjustment",signed:!0,decimals:2}},{id:"DecimalInput.readOnly",title:"Read only",props:{label:"Total",readOnly:!0,value:"1250.50"}}],usage:{when:["The figure can be empty or half-typed while the person types, such as 12. or a lone minus.","The value is a measurement, a tolerance or an amount the person types, not a count changed by steps."],whenNot:[{text:"The value changes by taps and is never empty or half-typed.",instead:"NumberInput"},{text:"The field takes free text rather than a figure.",instead:"Input"}],do:[{note:"Give the figure a label, and a symbol or unit so the number has a meaning.",example:[{component:"DecimalInput",props:{label:"Length",symbol:"L",unit:"m",max:500}}]}],dont:[{note:"Do not use it for a stepper quantity. Use NumberInput when the value is changed by steps.",example:[{component:"DecimalInput",props:{label:"Quantity",whole:!0,max:10}}]}],a11y:["Every figure needs a label. A symbol or unit alone does not name the field.","A comma before exactly three digits, such as 2,500, shows unclearCommaMessage as the field error, which a screen reader announces.","readOnly keeps the figure focusable and announced. disabled greys it out and drops it from the focus order."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Descriptions",marker:null,platforms:["phone"],acceptsChildren:!1,props:{items:{type:"array",required:!0,description:"The rows.",itemFields:{label:{type:"node",required:!0,description:"A string renders as text."},value:{type:"node",description:"A string, a number, a `sym()` / `Notation` or a list of those renders as text in the value's size, weight and colour (`strong`, `tone`), the subscript included."},full:{type:"boolean",description:"Make this row span both columns."},key:{type:"string",description:"React key."},strong:{type:"boolean",description:"Draw a string value in the semibold weight."},tone:{type:"enum",values:["primary","secondary","tertiary","inverse","disabled","link","textStrong","success","warning","danger","info"],description:"Colour of a string value: a text role, a semantic tone or a raw colour."}}},columns:{type:"enum",values:[1,2],default:1,description:"1 stacks label above value; 2 puts them side by side."},size:{type:"enum",values:["sm","md"],default:"md",description:"Row padding + font size."},bordered:{type:"boolean",default:!1,description:"Hairlines between rows."},title:{type:"string",description:"Optional heading above the list."},variant:{type:"enum",values:["list","summary"],default:"list",description:"'list' (default) is the record-detail layout."}},omit:[],examples:[{id:"Descriptions.default",title:"Two columns",props:{title:"Invoice details",columns:2,bordered:!0,items:[{label:"Invoice",value:"INV-1042"},{label:"Amount",value:"₹12,500"},{label:"Status",value:"Paid"},{label:"Notes",value:"Net 30",full:!0}]}},{id:"Descriptions.summary",title:"Summary table",props:{variant:"summary",items:[{label:"Collection area",value:"1 240 m²"},{label:"Risk",value:"3.2",strong:!0,tone:"danger"},{label:"Tolerable",value:"1.0",tone:"tertiary"}]}},{id:"Descriptions.compact",title:"Compact with a missing value",props:{size:"sm",items:[{label:"Name",value:"Asha"},{label:"City"}]}}],usage:{when:["Display read-only labelled facts and record details on a screen.","Show a compact summary table of key metrics with right-aligned values.","Present structured fields where missing values should read as no value rather than a broken row."],whenNot:[{text:"The row is interactive or navigates to another screen.",instead:"ListItem"},{text:"Displaying a single prominent headline metric or KPI.",instead:"StatTile"}],do:[{note:"Leave missing or empty values undefined so the component renders the standard hyphen.",example:[{component:"Descriptions",props:{items:[{label:"Status",value:"Active"},{label:"Paid on"}]}}]}],dont:[{note:"Do not pass placeholder strings like N/A for missing values.",example:[{component:"Descriptions",props:{items:[{label:"Status",value:"Active"},{label:"Paid on",value:"N/A"}]}}]}],a11y:["A missing value renders a plain hyphen so a row is never blank to a screen reader.","Labels and textual values are read in natural order by screen readers."]}});
@@ -1 +1 @@
1
- "use strict";import{useCallback,useMemo}from"react";import{ActivityIndicator,Pressable,StyleSheet,Text,View}from"react-native";import{fontFor,useTheme}from"../../theme/index.js";import{tintOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{MODAL_DISMISS_GRACE_MS,Modal}from"../Modal/Modal.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const Dialog=e=>{const{visible:t,onClose:o,title:r,message:i,children:s,icon:l,variant:n="default",actions:a,dismissOnAction:c=!0,accessibilityLabel:d,contentStyle:u,containerStyle:b,titleStyle:m,messageStyle:g,iconWrapperStyle:p,actionsRowStyle:y,actionButtonStyle:x,actionTextStyle:h,haptic:f,testID:C}=e,S=useTheme(),j=useMemo(()=>buildStyles(S),[S]),_=useMemo(()=>discFor(S,n),[S,n]),w=S.components.dialog["icon-wrapper-size"],I=S.components.dialog["action-button-min-height"],D=Boolean(a&&a.length>0),M=useCallback(e=>{if(e.loading||e.disabled)return;const t=resolveHaptic(f,"selection");t&&triggerHaptic(t),c?(o(),setTimeout(e.onPress,MODAL_DISMISS_GRACE_MS)):e.onPress()},[c,o,f]);return _jsx(Modal,{visible:t,onRequestClose:o,haptic:f,presentation:"centered",accessibilityLabel:d??r,contentStyle:u,testID:C,children:_jsxs(View,{accessibilityRole:"alert",accessibilityLabel:d??r,style:[j.container,b],children:[l?_jsx(View,{style:[j.iconWrapper,{width:w,height:w,borderRadius:S.radius.pill,...smoothCorners,backgroundColor:_,marginBottom:S.space.md},p],children:l}):null,r?_jsx(Text,{style:[j.title,{color:S.colors["text-body"],fontSize:S.text.xl.size,...fontFor(S,"semibold"),marginBottom:i||null!=s?S.space.sm:S.space.md},m],accessibilityRole:"header",children:r}):null,i?_jsx(Text,{style:[j.message,{color:S.colors["text-muted"],fontSize:S.text.base.size,lineHeight:S.text.base.size*S.leading.normal,marginBottom:null!=s?S.space.md:D?S.space.lg:0},g],children:i}):null,null!=s?_jsx(View,{style:{marginBottom:D?S.space.lg:0},children:s}):null,a&&a.length>0?_jsx(View,{style:[j.actionsRow,y],children:a.map((e,t)=>{const o=e.tone??"primary",r=Boolean(e.disabled),i=actionStyleFor(S,o,r),s=t===a.length-1;return _jsx(Pressable,{onPress:()=>M(e),disabled:e.loading||r,accessibilityRole:"button",accessibilityLabel:e.label,accessibilityState:{busy:e.loading,disabled:Boolean(e.loading)||r},"aria-busy":e.loading,"aria-disabled":Boolean(e.loading)||r,style:({pressed:t})=>[j.actionButton,{minHeight:I,backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderWidth:i.borderWidth,borderRadius:S.radius.md,...smoothCorners,paddingVertical:S.space.sm,paddingHorizontal:S.space.md,marginRight:s?0:S.space.sm,opacity:e.loading?.7:t&&!r?.85:1},x],children:e.loading?_jsx(ActivityIndicator,{size:"small",color:i.textColor}):_jsx(Text,{style:[{color:i.textColor,fontSize:S.text.base.size,...fontFor(S,"semibold"),textAlign:"center"},h],children:e.label})},`${e.label}-${t}`)})}):null]})})};Dialog.displayName="Dialog";const SOFT_DISC_OPACITY=.14,discFor=(e,t)=>{const o=e.colors["bg-subtle"];switch(t){case"success":return tintOf(e.colors.success,.14,o);case"warning":return tintOf(e.colors.warning,.14,o);case"danger":return tintOf(e.colors.danger,.14,o);case"info":return tintOf(e.colors.info,.14,o);default:return e.colors["primary-soft"]}},actionStyleFor=(e,t,o)=>{if(o)return{backgroundColor:"neutral"===t?"transparent":e.colors["surface-disabled"],borderColor:"neutral"===t?e.colors.border:"transparent",borderWidth:"neutral"===t?1:0,textColor:e.colors["text-disabled"]};switch(t){case"primary":return{backgroundColor:e.colors.primary,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-primary"]};case"info":return{backgroundColor:e.colors.info,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-info"]};case"danger":return{backgroundColor:e.colors.danger,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-danger"]};default:return{backgroundColor:"transparent",borderColor:e.colors.border,borderWidth:1,textColor:e.colors["text-body"]}}},buildStyles=e=>StyleSheet.create({container:{alignItems:"stretch"},iconWrapper:{alignItems:"center",justifyContent:"center",alignSelf:"center"},title:{textAlign:"center"},message:{textAlign:"center"},actionsRow:{flexDirection:"row",justifyContent:"flex-end",alignItems:"stretch"},actionButton:{flex:1,alignItems:"center",justifyContent:"center"}});export{Dialog};export default Dialog;
1
+ "use strict";import{useCallback,useMemo}from"react";import{ActivityIndicator,Pressable,StyleSheet,Text,View}from"react-native";import{fontFor,useTheme}from"../../theme/index.js";import{tintOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{MODAL_DISMISS_GRACE_MS,Modal}from"../Modal/Modal.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const Dialog=e=>{const{visible:t,onClose:o,title:r,message:i,children:s,icon:l,variant:n="default",actions:a,dismissOnAction:c=!0,accessibilityLabel:d,contentStyle:u,containerStyle:b,titleStyle:m,messageStyle:g,iconWrapperStyle:p,actionsRowStyle:y,actionButtonStyle:x,actionTextStyle:h,haptic:f,testID:C}=e,S=useTheme(),j=useMemo(()=>buildStyles(S),[S]),_=useMemo(()=>discFor(S,n),[S,n]),w=S.components.dialog["icon-wrapper-size"],I=S.components.dialog["action-button-min-height"],D=Boolean(a&&a.length>0),M=useCallback(e=>{if(e.loading||e.disabled)return;const t=resolveHaptic(f,"selection");t&&triggerHaptic(t),c?(o(),setTimeout(e.onPress,MODAL_DISMISS_GRACE_MS)):e.onPress()},[c,o,f]);return _jsx(Modal,{visible:t,onRequestClose:o,haptic:f,presentation:"centered",accessibilityLabel:d??r,contentStyle:u,testID:C,children:_jsxs(View,{accessibilityRole:"alert",accessibilityLabel:d??r,style:[j.container,b],children:[l?_jsx(View,{style:[j.iconWrapper,{width:w,height:w,borderRadius:S.radius.pill,...smoothCorners,backgroundColor:_,marginBottom:S.space.md},p],children:l}):null,r?_jsx(Text,{style:[j.title,{color:S.colors["text-body"],fontSize:S.text.xl.size,...fontFor(S,"semibold"),marginBottom:i||null!=s?S.space.sm:S.space.md},m],accessibilityRole:"header",children:r}):null,i?_jsx(Text,{style:[j.message,{color:S.colors["text-muted"],fontSize:S.text.base.size,lineHeight:S.text.base.size*S.leading.body,marginBottom:null!=s?S.space.md:D?S.space.lg:0},g],children:i}):null,null!=s?_jsx(View,{style:{marginBottom:D?S.space.lg:0},children:s}):null,a&&a.length>0?_jsx(View,{style:[j.actionsRow,y],children:a.map((e,t)=>{const o=e.tone??"primary",r=Boolean(e.disabled),i=actionStyleFor(S,o,r),s=t===a.length-1;return _jsx(Pressable,{onPress:()=>M(e),disabled:e.loading||r,accessibilityRole:"button",accessibilityLabel:e.label,accessibilityState:{busy:e.loading,disabled:Boolean(e.loading)||r},"aria-busy":e.loading,"aria-disabled":Boolean(e.loading)||r,style:({pressed:t})=>[j.actionButton,{minHeight:I,backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderWidth:i.borderWidth,borderRadius:S.radius.md,...smoothCorners,paddingVertical:S.space.sm,paddingHorizontal:S.space.md,marginRight:s?0:S.space.sm,opacity:e.loading?.7:t&&!r?.85:1},x],children:e.loading?_jsx(ActivityIndicator,{size:"small",color:i.textColor}):_jsx(Text,{style:[{color:i.textColor,fontSize:S.text.base.size,...fontFor(S,"semibold"),textAlign:"center"},h],children:e.label})},`${e.label}-${t}`)})}):null]})})};Dialog.displayName="Dialog";const SOFT_DISC_OPACITY=.14,discFor=(e,t)=>{const o=e.colors["bg-subtle"];switch(t){case"success":return tintOf(e.colors.success,.14,o);case"warning":return tintOf(e.colors.warning,.14,o);case"danger":return tintOf(e.colors.danger,.14,o);case"info":return tintOf(e.colors.info,.14,o);default:return e.colors["primary-soft"]}},actionStyleFor=(e,t,o)=>{if(o)return{backgroundColor:"neutral"===t?"transparent":e.colors["surface-disabled"],borderColor:"neutral"===t?e.colors.border:"transparent",borderWidth:"neutral"===t?1:0,textColor:e.colors["text-disabled"]};switch(t){case"primary":return{backgroundColor:e.colors.primary,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-primary"]};case"info":return{backgroundColor:e.colors.info,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-info"]};case"danger":return{backgroundColor:e.colors.danger,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-danger"]};default:return{backgroundColor:"transparent",borderColor:e.colors.border,borderWidth:1,textColor:e.colors["text-body"]}}},buildStyles=e=>StyleSheet.create({container:{alignItems:"stretch"},iconWrapper:{alignItems:"center",justifyContent:"center",alignSelf:"center"},title:{textAlign:"center"},message:{textAlign:"center"},actionsRow:{flexDirection:"row",justifyContent:"flex-end",alignItems:"stretch"},actionButton:{flex:1,alignItems:"center",justifyContent:"center"}});export{Dialog};export default Dialog;
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Dialog",marker:null,platforms:["phone"],acceptsChildren:!0,props:{visible:{type:"boolean",required:!0,description:"Controls visibility."},title:{type:"string",description:"Headline."},message:{type:"string",description:"Body text."},icon:{type:"node",description:"Top icon."},variant:{type:"enum",values:["default","success","warning","danger","info"],default:"default",description:"Semantic styling."},actions:{type:"array",description:"Ordered action buttons.",itemFields:{label:{type:"string",required:!0,description:"The text drawn on the action button."},tone:{type:"enum",values:["primary","neutral","info","danger"],description:"The color scheme of the action."},loading:{type:"boolean",description:"Shows a spinner and blocks its press."},disabled:{type:"boolean",description:"Dims the action and blocks its press (a confirm waiting on a typed phrase, say)."}}},dismissOnAction:{type:"boolean",default:!0,description:"Automatically close after an action fires."},accessibilityLabel:{type:"string",description:"Overrides the alert region label."}},omit:["haptic"],examples:[{id:"Dialog.default",title:"Default",props:{visible:!0,title:"Save changes?",message:"Your edits will be saved to the cloud and synced across all devices."}},{id:"Dialog.warning",title:"Warning",props:{visible:!0,variant:"warning",title:"Discard draft?",message:"The draft will be deleted."}},{id:"Dialog.danger",title:"Danger",props:{visible:!0,variant:"danger",title:"Delete account?",message:"This cannot be undone."}},{id:"Dialog.success",title:"Success",props:{visible:!0,variant:"success",title:"Payment received",message:"A receipt is on its way."}}],usage:{when:["For a confirm, alert or destructive dialog with action buttons.","When the user must explicitly choose an action to proceed."],whenNot:[{text:"For content anchored to the bottom edge.",instead:"BottomSheet"},{text:"For a menu or a longer form.",instead:"Drawer"},{text:"For a message that needs no answer.",instead:"Toast"}],do:[{note:"Use a warning or danger variant for destructive operations.",example:[{component:"Dialog",props:{visible:!0,title:"Delete account?",message:"This cannot be undone.",variant:"danger"}}]}],dont:[{note:"Do not use the default variant for destructive operations.",example:[{component:"Dialog",props:{visible:!0,title:"Delete account?",message:"This cannot be undone."}}]}],a11y:["The dialog sets the alert role and its accessible name defaults to the title.","Dismissing the dialog delays action execution until after the native modal has dismissed.","You can override the accessible name using the accessibility label prop."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"Divider",marker:null,platforms:["phone"],acceptsChildren:!1,props:{orientation:{type:"enum",required:!1,values:["horizontal","vertical"],default:"horizontal",description:"Direction of the line; a vertical line stretches to fill the height of its parent."},thickness:{type:"number",required:!1,default:1,description:"Line thickness in points."},color:{type:"string",required:!1,description:"Line color; the theme border color when left out."},spacing:{type:"enum",required:!1,values:["none","sm","md","lg"],default:"none",description:"Margin around the line, vertical for a horizontal line and horizontal for a vertical one."},inset:{type:"number",required:!1,default:0,description:"Extra offset from the leading edge, to line up with an avatar or icon column."},label:{type:"string",required:!1,description:"Text drawn inline that splits the line in two; ignored on a vertical line."},labelPosition:{type:"enum",required:!1,values:["start","center","end"],default:"center",description:"Where the label sits along the line."}},omit:[],examples:[{id:"Divider.plain",title:"Plain line",props:{}},{id:"Divider.labelled",title:"Labelled break",props:{label:"OR"}},{id:"Divider.labelStart",title:"Label at the start",props:{label:"OR",labelPosition:"start"}},{id:"Divider.thick",title:"Thick line",props:{thickness:4}}],usage:{when:["Separate groups of rows in a list or form.","Show an OR break between two paths with a short label."],whenNot:[{text:"Spacing alone separates the content.",instead:"Use gap or margin, not a line."},{text:"A section needs a heading.",instead:"SectionHeader"}],do:[{note:"Keep a label to a word or two.",example:[{component:"Divider",props:{label:"OR"}}]}],dont:[{note:"Do not put a sentence in the label; it is cut to one line.",example:[{component:"Divider",props:{label:"Or continue with your email address instead"}}]}],a11y:["The line is decorative and hidden from screen readers, so never rely on it alone to show a grouping.","A label is read as plain text, so keep it meaningful."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";const drawerChildren=[{component:"ListItem",props:{title:"Profile",chevron:!0}},{component:"ListItem",props:{title:"Settings",chevron:!0}}];export const meta=definePhoneMeta()({name:"Drawer",marker:null,platforms:["phone"],acceptsChildren:!0,props:{visible:{type:"boolean",required:!1,description:"Controlled visibility; leave it out to let the drawer manage its own state."},defaultVisible:{type:"boolean",required:!1,default:!1,description:"Initial visibility when the drawer manages its own state."},side:{type:"enum",required:!1,values:["left","right","top","bottom"],default:"left",description:"Edge the drawer slides in from."},width:{type:"stringOrNumber",required:!1,description:"Size along the slide axis, in points or as a percent string; 280 for left and right and 40% of the window height for top and bottom when left out."},enableSwipe:{type:"boolean",required:!1,default:!0,description:"Allows dragging the drawer toward its edge to dismiss it."},enableBackdropPress:{type:"boolean",required:!1,default:!0,description:"Allows a tap on the dimmed backdrop to dismiss the drawer."},backdropOpacity:{type:"number",required:!1,default:.5,description:"Backdrop opacity from 0 to 1 when the drawer is fully open."},accessibilityLabel:{type:"string",required:!1,description:"Name announced for the drawer panel; Drawer when left out."}},omit:["haptic"],examples:[{id:"Drawer.left",title:"Left drawer",props:{defaultVisible:!0,side:"left",width:280},children:drawerChildren},{id:"Drawer.right",title:"Right drawer, 320 wide",props:{defaultVisible:!0,side:"right",width:320},children:drawerChildren},{id:"Drawer.top",title:"Top drawer, 40 percent",props:{defaultVisible:!0,side:"top",width:"40%"},children:drawerChildren},{id:"Drawer.bottom",title:"Bottom drawer, 60 percent",props:{defaultVisible:!0,side:"bottom",width:"60%"},children:drawerChildren}],usage:{when:["A navigation menu or contextual actions that slide over the screen from an edge.","A settings or filter panel that keeps the page visible behind a dimmed backdrop."],whenNot:[{text:"The surface is partial height and driven by its content.",instead:"BottomSheet"},{text:"A short confirmation or choice.",instead:"Dialog"}],do:[{note:"Give the drawer a close button at the foot.",example:[{component:"ListItem",props:{title:"Profile",chevron:!0}},{component:"Button",props:{title:"Close drawer",variant:"outline"}}]}],dont:[{note:"Do not leave a drawer with no visible way to close it when swipe and backdrop dismissal are off.",example:[{component:"ListItem",props:{title:"Profile",chevron:!0}}]}],a11y:["The panel is announced with its accessibilityLabel, Drawer when left out, and the backdrop is a Close drawer button.","The rest of the screen is hidden from screen readers while the drawer is open."]}});
@@ -1 +1 @@
1
- "use strict";import{forwardRef,useMemo}from"react";import{Animated,Pressable,StyleSheet,Text,View}from"react-native";import{usePressAnimation}from"../../hooks/usePressAnimation.js";import{fontFor,resolveEmptyStateSize,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{triggerHaptic}from"../../utils/hapticUtils.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";const ActionButton=({action:e,variant:t})=>{const r=useTheme(),{style:o,pressIn:i,pressOut:s}=usePressAnimation({enabled:!0}),n=useMemo(()=>buildActionStyles(r),[r]),l="primary"===t,a=useSquircle(!0,r.radius.md),fillFor=e=>l?e?r.colors["primary-hover"]:r.colors.primary:e?r.colors["surface-pressed"]:"transparent";return _jsx(Animated.View,{style:o,children:_jsx(Pressable,{onPress:()=>{triggerHaptic("selection"),e.onPress()},onPressIn:i,onPressOut:s,accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,accessibilityHint:e.accessibilityHint,testID:e.testID,onLayout:a.onLayout,style:({pressed:e})=>[n.button,l?n.buttonPrimary:n.buttonSecondary,e&&!a.active?l?n.buttonPrimaryPressed:n.buttonSecondaryPressed:null,a.active?n.buttonSquircleHost:null],children:({pressed:t})=>_jsxs(_Fragment,{children:[a.active&&a.size?_jsx(SquircleFill,{width:a.size.width,height:a.size.height,radius:r.radius.md,fill:fillFor(t),stroke:l?void 0:r.colors.border,strokeWidth:l?0:1,outset:l?0:1}):null,_jsx(Text,{style:[n.buttonText,l?n.buttonTextPrimary:n.buttonTextSecondary],numberOfLines:1,children:e.label})]})})})},EmptyState=forwardRef((e,t)=>{const{icon:r,title:o,description:i,action:s,secondaryAction:n,size:l="md",fill:a=!1,style:c,testID:d}=e,u=useTheme(),m=useMemo(()=>resolveEmptyStateSize(u,l),[u,l]),y=useMemo(()=>buildStyles(u),[u]);return _jsxs(View,{ref:t,accessibilityRole:"summary",testID:d,style:[y.root,{paddingVertical:m["padding-y"]},a?y.fill:null,c],children:[r?_jsx(View,{style:[y.iconCircle,{width:m.icon,height:m.icon,marginBottom:m["title-gap"],borderRadius:u.radius.pill,...smoothCorners}],children:r}):null,_jsx(Text,{style:[y.title,{fontSize:m["title-text"],...fontFor(u,"semibold")}],children:o}),i?_jsx(Text,{style:[y.description,{fontSize:m["description-text"],marginTop:m["description-gap"]}],children:i}):null,s||n?_jsxs(View,{style:y.actions,children:[s?_jsx(ActionButton,{action:s,variant:"primary"}):null,n?_jsx(ActionButton,{action:n,variant:"secondary"}):null]}):null]})});EmptyState.displayName="EmptyState";const buildStyles=e=>StyleSheet.create({root:{alignItems:"center",justifyContent:"center",paddingHorizontal:e.space.lg},fill:{flexGrow:1},iconCircle:{backgroundColor:e.colors["surface-disabled"],alignItems:"center",justifyContent:"center"},title:{color:e.colors["text-body"],textAlign:"center"},description:{color:e.colors["text-muted"],textAlign:"center",maxWidth:320,lineHeight:e.text.base.size*e.leading.normal},actions:{flexDirection:"row",alignItems:"center",gap:e.space.sm,marginTop:e.space.lg}}),buildActionStyles=e=>StyleSheet.create({button:{paddingHorizontal:e.space.lg,paddingVertical:e.space.sm,minHeight:42,borderRadius:e.radius.md,...smoothCorners,overflow:"hidden",alignItems:"center",justifyContent:"center",flexDirection:"row"},buttonPrimary:{backgroundColor:e.colors.primary},buttonPrimaryPressed:{backgroundColor:e.colors["primary-hover"]},buttonSecondary:{backgroundColor:"transparent",borderWidth:1,borderColor:e.colors.border},buttonSecondaryPressed:{backgroundColor:e.colors["surface-pressed"]},buttonSquircleHost:{backgroundColor:"transparent",borderColor:"transparent",overflow:"visible"},buttonText:{fontSize:e.text.base.size,...fontFor(e,"semibold")},buttonTextPrimary:{color:e.colors["on-primary"]},buttonTextSecondary:{color:e.colors["text-body"]}});export{EmptyState};export default EmptyState;
1
+ "use strict";import{forwardRef,useMemo}from"react";import{Animated,Pressable,StyleSheet,Text,View}from"react-native";import{usePressAnimation}from"../../hooks/usePressAnimation.js";import{fontFor,resolveEmptyStateSize,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{triggerHaptic}from"../../utils/hapticUtils.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";const ActionButton=({action:e,variant:t})=>{const r=useTheme(),{style:o,pressIn:i,pressOut:s}=usePressAnimation({enabled:!0}),n=useMemo(()=>buildActionStyles(r),[r]),l="primary"===t,a=useSquircle(!0,r.radius.md),fillFor=e=>l?e?r.colors["primary-hover"]:r.colors.primary:e?r.colors["surface-pressed"]:"transparent";return _jsx(Animated.View,{style:o,children:_jsx(Pressable,{onPress:()=>{triggerHaptic("selection"),e.onPress()},onPressIn:i,onPressOut:s,accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,accessibilityHint:e.accessibilityHint,testID:e.testID,onLayout:a.onLayout,style:({pressed:e})=>[n.button,l?n.buttonPrimary:n.buttonSecondary,e&&!a.active?l?n.buttonPrimaryPressed:n.buttonSecondaryPressed:null,a.active?n.buttonSquircleHost:null],children:({pressed:t})=>_jsxs(_Fragment,{children:[a.active&&a.size?_jsx(SquircleFill,{width:a.size.width,height:a.size.height,radius:r.radius.md,fill:fillFor(t),stroke:l?void 0:r.colors.border,strokeWidth:l?0:1,outset:l?0:1}):null,_jsx(Text,{style:[n.buttonText,l?n.buttonTextPrimary:n.buttonTextSecondary],numberOfLines:1,children:e.label})]})})})},EmptyState=forwardRef((e,t)=>{const{icon:r,title:o,description:i,action:s,secondaryAction:n,size:l="md",fill:a=!1,style:c,testID:d}=e,u=useTheme(),m=useMemo(()=>resolveEmptyStateSize(u,l),[u,l]),y=useMemo(()=>buildStyles(u),[u]);return _jsxs(View,{ref:t,accessibilityRole:"summary",testID:d,style:[y.root,{paddingVertical:m["padding-y"]},a?y.fill:null,c],children:[r?_jsx(View,{style:[y.iconCircle,{width:m.icon,height:m.icon,marginBottom:m["title-gap"],borderRadius:u.radius.pill,...smoothCorners}],children:r}):null,_jsx(Text,{style:[y.title,{fontSize:m["title-text"],...fontFor(u,"semibold")}],children:o}),i?_jsx(Text,{style:[y.description,{fontSize:m["description-text"],marginTop:m["description-gap"]}],children:i}):null,s||n?_jsxs(View,{style:y.actions,children:[s?_jsx(ActionButton,{action:s,variant:"primary"}):null,n?_jsx(ActionButton,{action:n,variant:"secondary"}):null]}):null]})});EmptyState.displayName="EmptyState";const buildStyles=e=>StyleSheet.create({root:{alignItems:"center",justifyContent:"center",paddingHorizontal:e.space.lg},fill:{flexGrow:1},iconCircle:{backgroundColor:e.colors["surface-disabled"],alignItems:"center",justifyContent:"center"},title:{color:e.colors["text-body"],textAlign:"center"},description:{color:e.colors["text-muted"],textAlign:"center",maxWidth:320,lineHeight:e.text.base.size*e.leading.body},actions:{flexDirection:"row",alignItems:"center",gap:e.space.sm,marginTop:e.space.lg}}),buildActionStyles=e=>StyleSheet.create({button:{paddingHorizontal:e.space.lg,paddingVertical:e.space.sm,minHeight:42,borderRadius:e.radius.md,...smoothCorners,overflow:"hidden",alignItems:"center",justifyContent:"center",flexDirection:"row"},buttonPrimary:{backgroundColor:e.colors.primary},buttonPrimaryPressed:{backgroundColor:e.colors["primary-hover"]},buttonSecondary:{backgroundColor:"transparent",borderWidth:1,borderColor:e.colors.border},buttonSecondaryPressed:{backgroundColor:e.colors["surface-pressed"]},buttonSquircleHost:{backgroundColor:"transparent",borderColor:"transparent",overflow:"visible"},buttonText:{fontSize:e.text.base.size,...fontFor(e,"semibold")},buttonTextPrimary:{color:e.colors["on-primary"]},buttonTextSecondary:{color:e.colors["text-body"]}});export{EmptyState};export default EmptyState;
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"EmptyState",marker:null,platforms:["phone"],acceptsChildren:!1,props:{icon:{type:"node",description:"Illustration or icon drawn in a circle above the title."},title:{type:"string",required:!0,description:"Headline message."},description:{type:"string",description:"Supporting copy under the title."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"Icon size, type scale and vertical padding."},fill:{type:"boolean",default:!1,description:"Grows to fill the space it is given and centres its content; pass it as the empty component of a list."}},omit:["action","secondaryAction"],examples:[{id:"EmptyState.medium",title:"Medium",props:{title:"No messages yet",description:"Start a conversation with anyone in your contacts.",size:"md"}},{id:"EmptyState.small",title:"Small",props:{title:"No messages yet",description:"Start a conversation with anyone in your contacts.",size:"sm"}},{id:"EmptyState.large",title:"Large",props:{title:"No messages yet",description:"Start a conversation with anyone in your contacts.",size:"lg"}},{id:"EmptyState.titleOnly",title:"Title only",props:{title:"Nothing here"}}],usage:{when:["A list, search or screen has no data yet and needs a clear next step.","A load failed and the screen shows a message with a retry action."],whenNot:[{text:"Data is still loading.",instead:"Skeleton"},{text:"A short passing message about an action.",instead:"Toast"}],do:[{note:"Say what is missing and what to do about it.",example:[{component:"EmptyState",props:{title:"No orders yet",description:"When you place an order it will show up here."}}]}],dont:[{note:"Do not leave a bare title with no explanation.",example:[{component:"EmptyState",props:{title:"Empty"}}]}],a11y:["Announced as a summary region, so write the title and description as plain sentences.","Put the meaning in the title and description, not in the icon."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"FilePicker",marker:null,platforms:["phone"],acceptsChildren:!1,props:{maxFiles:{type:"number",required:!1,description:"Most files that can be attached."},maxSizeMB:{type:"number",required:!1,description:"Largest size of one file in megabytes; bigger picks are rejected with an error."},accept:{type:"array",required:!1,description:"Accepted mime types, such as image/* or application/pdf; every type is accepted when left out."},variant:{type:"enum",required:!1,values:["card","list"],default:"card",description:"card shows a dashed upload tile and a strip of thumbnails; list shows one row per file."},disabled:{type:"boolean",required:!1,default:!1,description:"Blocks picking and removing files and dims the trigger."},helperText:{type:"string",required:!1,description:"Hint under the trigger, such as the file limits."},error:{type:"node",required:!1,description:"External error shown under the field; it wins over validation errors."},accessibilityLabel:{type:"string",required:!1,description:"Overrides the generated Attachments label."}},omit:["files","defaultFiles","sources","labels","haptic"],examples:[{id:"FilePicker.card",title:"Card with limits",props:{variant:"card",maxFiles:4,maxSizeMB:100,accept:["image/*","application/pdf"],helperText:"Up to 4 files, max 100MB each."}},{id:"FilePicker.list",title:"List with limits",props:{variant:"list",maxFiles:4,maxSizeMB:100,accept:["image/*","application/pdf"],helperText:"Up to 4 files, max 100MB each."}},{id:"FilePicker.disabled",title:"Disabled",props:{disabled:!0,helperText:"Up to 4 files, max 100MB each."}},{id:"FilePicker.error",title:"With an error",props:{error:"Add at least one file."}}],usage:{when:["A form needs photos or documents attached, with limits on count, size and type.","An edit screen shows files already uploaded beside new picks."],whenNot:[{text:"The file only needs to be viewed.",instead:"FileViewer"},{text:"The person picks one value from a short list.",instead:"Select"}],do:[{note:"Show the limits in the helper text so a rejection is no surprise.",example:[{component:"FilePicker",props:{maxFiles:4,helperText:"Up to 4 files, max 100MB each."}}]}],dont:[{note:"Do not set limits without telling the person.",example:[{component:"FilePicker",props:{maxFiles:4}}]}],a11y:["The picker is announced as a button named Attachments with the file count; set accessibilityLabel to name the field.","Remove and retry controls carry their own labels."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"FileViewer",marker:null,platforms:["phone"],acceptsChildren:!1,props:{zoomEnabled:{type:"boolean",required:!1,default:!0,description:"Allows pinch, double tap zoom and panning while zoomed; off also resets any zoom."},maxZoom:{type:"number",required:!1,default:4,description:"Upper bound on pinch zoom, as a multiple of the page fitting the width."},accessibilityLabel:{type:"string",required:!1,description:"Spoken name for the viewer."}},omit:["source"],examples:[{id:"FileViewer.default",title:"Sample document",props:{accessibilityLabel:"Sample PDF document"}},{id:"FileViewer.noZoom",title:"Zoom off",props:{zoomEnabled:!1,accessibilityLabel:"Sample PDF document"}},{id:"FileViewer.maxZoom",title:"Zoom capped at 2",props:{maxZoom:2,accessibilityLabel:"Sample PDF document"}}],usage:{when:["Showing a PDF inside the app, from a link or a saved file."],whenNot:[{text:"The document is not a PDF.",instead:"Open it with the system viewer."},{text:"The file is a picture or a set of pictures.",instead:"ImageGallery"}],do:[{note:"Leave zoom on so small print stays readable.",example:[{component:"FileViewer",props:{}}]}],dont:[{note:"Do not turn zoom off for a dense document.",example:[{component:"FileViewer",props:{zoomEnabled:!1}}]}],a11y:["Give the viewer an accessibilityLabel that names the document; without one it is not announced as a labelled element."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"FilterChipRow",marker:null,platforms:["phone"],acceptsChildren:!1,props:{items:{type:"array",required:!0,description:"The chips to show in the row.",itemFields:{key:{type:"string",required:!0,description:"Stable id of the chip."},label:{type:"string",required:!0,description:"The text on the chip."},count:{type:"stringOrNumber",description:"Shown after the label."},disabled:{type:"boolean",description:"Disables this chip only."}}},value:{type:"string",required:!0,description:"Key of the selected item."},bleed:{type:"number",default:0,description:"The page gutter in points."},size:{type:"enum",values:["sm","md"],description:"Size scale."},variant:{type:"enum",values:["filled","outlined","soft"],description:"Visual style."},tone:{type:"enum",values:["primary","neutral","success","warning","danger","info"],description:"Semantic color."},accessibilityLabel:{type:"string",description:'Names the radiogroup for screen readers, e.g. "Filter by status".'}},omit:["haptic"],examples:[{id:"FilterChipRow.default",title:"Default",props:{items:[{key:"all",label:"All"},{key:"open",label:"Open",count:4},{key:"closed",label:"Closed"}],value:"open"}},{id:"FilterChipRow.bleed",title:"Edge to edge",props:{bleed:16,items:[{key:"today",label:"Today"},{key:"week",label:"This week"},{key:"month",label:"This month"},{key:"year",label:"This year"}],value:"today"}},{id:"FilterChipRow.styled",title:"Styled chips",props:{variant:"soft",tone:"primary",size:"sm",items:[{key:"design",label:"Design"},{key:"engineering",label:"Engineering"},{key:"marketing",label:"Marketing"}],value:"engineering"}}],usage:{when:["A scrolling horizontal row of single-choice filter chips above a list."],whenNot:[{text:"To switch between entirely different views or tabs of a screen.",instead:"Tabs"}],do:[{note:"Provide a unique key for each item and pass the currently selected key to value.",example:[{component:"FilterChipRow",props:{items:[{key:"active",label:"Active"},{key:"inactive",label:"Inactive"}],value:"active"}}]},{note:"Use the count field on an item to show the number of results for that filter.",example:[{component:"FilterChipRow",props:{items:[{key:"draft",label:"Drafts",count:2},{key:"published",label:"Published",count:15}],value:"draft"}}]}],dont:[{note:"Do not leave value empty; one item should always be selected by default.",example:[{component:"FilterChipRow",props:{items:[{key:"active",label:"Active"},{key:"inactive",label:"Inactive"}],value:""}}]},{note:"Do not put the count in the label string; use the count field so it is styled correctly.",example:[{component:"FilterChipRow",props:{items:[{key:"draft",label:"Drafts (2)"},{key:"published",label:"Published (15)"}],value:"draft"}}]}],a11y:["Announces as a radiogroup of radios.","Use accessibilityLabel to name the group for screen readers."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"FloatingActionButton",marker:null,platforms:["phone"],acceptsChildren:!1,props:{label:{type:"string",description:"Text beside the icon; makes the button extended, a pill."},collapsed:{type:"boolean",default:!1,description:"Folds an extended button to its round icon, with the label fading out, and has no effect without a label."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"The diameter of the round button."},tone:{type:"enum",values:["primary","success","warning","danger","neutral"],default:"primary",description:"The colour family of the button."},position:{type:"enum",values:["bottomRight","bottomLeft","bottomCenter"],description:"The corner or edge of the screen the button is pinned to; leave it unset to place the button yourself."},bottomOffset:{type:"number",description:"The gap above the bottom edge, in points, before the safe area inset is added."},disabled:{type:"boolean",default:!1,description:"Blocks presses and dims the button."},hideOnScroll:{type:"boolean",default:!1,description:"Slides the button off the bottom edge while isScrolling is true."},isScrolling:{type:"boolean",default:!1,description:"Whether the list behind the button is scrolling right now; wire it to your scroll handler."},accessibilityLabel:{type:"string",required:!0,description:"The name a screen reader reads for the button."},accessibilityHint:{type:"string",description:"What happens when the button is pressed, read after its name by a screen reader."}},omit:["icon","haptic"],examples:[{id:"FloatingActionButton.extended",title:"Extended",props:{label:"New invoice",accessibilityLabel:"New invoice",tone:"primary"}},{id:"FloatingActionButton.neutralLarge",title:"Neutral and large",props:{label:"Filter",accessibilityLabel:"Filter the list",tone:"neutral",size:"lg"}},{id:"FloatingActionButton.collapsed",title:"Collapsed",props:{label:"New invoice",accessibilityLabel:"New invoice",collapsed:!0}}],usage:{when:["A screen has one main action that a person repeats often, such as adding an item.","The action has to stay reachable while the list behind it scrolls."],whenNot:[{text:"The action is a confirmation or a submit inside a form or dialog.",instead:"Button"}],do:[{note:"Use one button per screen for its main action, with a label that says what happens.",example:[{component:"FloatingActionButton",props:{label:"New invoice",accessibilityLabel:"New invoice"}}]},{note:"Fold an extended button with collapsed while the list scrolls, so it covers fewer rows.",example:[{component:"FloatingActionButton",props:{label:"New invoice",accessibilityLabel:"New invoice",collapsed:!0}}]}],dont:[{note:"Do not put two buttons on one screen; the second competes with the first for attention.",example:[{component:"FloatingActionButton",props:{label:"New invoice",accessibilityLabel:"New invoice"}},{component:"FloatingActionButton",props:{label:"Import",accessibilityLabel:"Import invoices"}}]},{note:"Do not set collapsed on a button with no label, because there is nothing to fold.",example:[{component:"FloatingActionButton",props:{accessibilityLabel:"New invoice",collapsed:!0}}]}],a11y:["The accessibility label names the button for a screen reader; set it to the action, not to the icon.","A collapsed button keeps its label as the accessible name, so a screen reader still hears what it does."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"FloatingActionButtonGroup",marker:null,platforms:["phone"],acceptsChildren:!1,props:{open:{type:"boolean",description:"Whether the actions are expanded. Set it to control the group; leave it unset to let the group track its own state."},defaultOpen:{type:"boolean",default:!1,description:"Whether the group starts expanded when it is not controlled by open."},position:{type:"enum",values:["bottomRight","bottomLeft","bottomCenter"],default:"bottomRight",description:"The corner or edge of the screen the group is pinned to."},bottomOffset:{type:"number",description:"The gap above the bottom edge, in points, before the safe area inset is added."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"The diameter of the primary button and of the action buttons."},accessibilityLabel:{type:"string",default:"Quick actions",description:"The name a screen reader reads for the primary button."},hideOnScroll:{type:"boolean",default:!1,description:"Slides the whole group off the bottom edge while isScrolling is true, and closes it first."},isScrolling:{type:"boolean",default:!1,description:"Whether the list behind the group is scrolling right now; wire it to your scroll handler."}},omit:["primaryIcon","primaryActiveIcon","actions","haptic"],examples:[{id:"FloatingActionButtonGroup.basic",title:"Basic",props:{accessibilityLabel:"Create"}},{id:"FloatingActionButtonGroup.open",title:"Open",props:{accessibilityLabel:"Create",defaultOpen:!0}},{id:"FloatingActionButtonGroup.placed",title:"Bottom left, large",props:{accessibilityLabel:"Create",position:"bottomLeft",size:"lg",bottomOffset:24}}],usage:{when:["A screen has one main task that offers two to six related actions, such as creating an item of several kinds.","The actions have to stay reachable while the list behind them scrolls."],whenNot:[{text:"The screen has one action only; a single button does the job.",instead:"FloatingActionButton"},{text:"The choices belong to a field or a row, not to the screen.",instead:"Menu"}],do:[{note:"Pin the group to a corner, where a thumb reaches it, and name it for what its actions create.",example:[{component:"FloatingActionButtonGroup",props:{accessibilityLabel:"Create",position:"bottomRight"}}]},{note:"Set hideOnScroll so the group slides away while the list behind it scrolls.",example:[{component:"FloatingActionButtonGroup",props:{accessibilityLabel:"Create",hideOnScroll:!0}}]}],dont:[{note:"Do not centre the group at the bottom of the screen, where it covers the buttons there.",example:[{component:"FloatingActionButtonGroup",props:{accessibilityLabel:"Create",position:"bottomCenter"}}]},{note:"Do not leave hideOnScroll off on a long list, because the group then covers the rows as they scroll.",example:[{component:"FloatingActionButtonGroup",props:{accessibilityLabel:"Create",hideOnScroll:!1}}]}],a11y:["The accessibility label names the group for a screen reader, so set it to what the actions create, not to an icon.","The primary button announces whether the group is expanded, and each action reads its own accessibility label."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"ForceUpdateDialog",marker:null,platforms:["phone"],acceptsChildren:!1,props:{visible:{type:"boolean",required:!0,description:"Whether the dialog is showing."},mandatory:{type:"boolean",required:!1,default:!1,description:"Hides the Later action and ignores backdrop and Back dismissal; use it for updates that must not be skipped."},updateUrl:{type:"string",required:!1,description:"Address the Update action opens; the platform store when left out."},title:{type:"string",required:!1,default:"Update available",description:"Dialog title."},message:{type:"string",required:!1,default:"A new version of the app is available. Please update to continue using the latest features and security improvements.",description:"Dialog message."},updateLabel:{type:"string",required:!1,default:"Update now",description:"Label of the main action."},laterLabel:{type:"string",required:!1,default:"Later",description:"Label of the dismiss action; hidden when mandatory."}},omit:[],examples:[{id:"ForceUpdateDialog.optional",title:"Optional update",props:{visible:!0,message:"Version 2.1.0 brings faster sync and improved offline support."}},{id:"ForceUpdateDialog.mandatory",title:"Mandatory update",props:{visible:!0,mandatory:!0,message:"Version 2.1.0 brings faster sync and improved offline support."}},{id:"ForceUpdateDialog.defaultCopy",title:"Default copy",props:{visible:!0}},{id:"ForceUpdateDialog.customLabels",title:"Custom labels",props:{visible:!0,title:"Time to update",updateLabel:"Get the update",laterLabel:"Not now"}}],usage:{when:["The installed version is too old and the person must move to the store version.","A newer version is out and the app offers it with a Later choice."],whenNot:[{text:"A passing notice about something new.",instead:"Banner"},{text:"Any other confirmation.",instead:"Dialog"}],do:[{note:"Mark the update mandatory only when the old version cannot keep working.",example:[{component:"ForceUpdateDialog",props:{visible:!0,mandatory:!0}}]}],dont:[{note:"Do not make an ordinary update mandatory; the person cannot dismiss it.",example:[{component:"ForceUpdateDialog",props:{visible:!0,mandatory:!0,message:"A small colour tweak is available."}}]}],a11y:["Shown as a modal dialog: focus stays inside until it is dismissed, and a mandatory one cannot be dismissed.","Keep the message short and say why the update is needed."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"FormField",marker:null,platforms:["phone"],acceptsChildren:!0,props:{label:{type:"node",required:!1,description:"Field label above the input, or left of it in the inline layout; a node label needs accessibilityLabel."},help:{type:"node",required:!1,description:"Drawn right after the label, such as an info button; not part of the label's spoken text."},helperText:{type:"node",required:!1,description:"Hint under the input; hidden while an error shows."},error:{type:"node",required:!1,description:"Error message in the error color; it hides the helper text and marks the field invalid."},required:{type:"boolean",required:!1,default:!1,description:"Adds the required marker after the label."},name:{type:"string",required:!1,description:"Connects the field to the surrounding form by name."},layout:{type:"enum",required:!1,values:["stacked","inline"],default:"stacked",description:"stacked puts the label above the input; inline puts it on the left."},helperLines:{type:"number",required:!1,description:"Lines the helper text and error may take before an ellipsis; no limit when left out or 0."},accessibilityLabel:{type:"string",required:!1,description:"Overrides the spoken label built from the label and the error."}},omit:[],examples:[{id:"FormField.stacked",title:"Stacked with helper",props:{label:"Email",required:!0,helperText:"We'll never share this."},children:[{component:"Input",props:{placeholder:"you@example.com"}}]},{id:"FormField.inline",title:"Inline label",props:{label:"Email",layout:"inline",helperText:"We'll never share this."},children:[{component:"Input",props:{placeholder:"you@example.com"}}]},{id:"FormField.error",title:"With an error",props:{label:"Email",required:!0,helperText:"We'll never share this.",error:"Enter a valid email address."},children:[{component:"Input",props:{placeholder:"you@example.com"}}]},{id:"FormField.optional",title:"Optional field",props:{label:"Nickname"},children:[{component:"Input",props:{placeholder:"What should we call you?"}}]}],usage:{when:["Wrap one input with a label, a helper or an error so every field in a form is laid out the same way.","Any input type: Input, Select, Switch or a date picker."],whenNot:[{text:"The control already draws its own label and error.",instead:"Use the control on its own."},{text:"The form is wired with react-hook-form.",instead:"HookFormField"}],do:[{note:"Say what to fix in the error, and keep the hint for what to enter.",example:[{component:"FormField",props:{label:"Email",error:"Enter a valid email address."},children:[{component:"Input",props:{placeholder:"you@example.com"}}]}]}],dont:[{note:"Do not repeat the label as the placeholder.",example:[{component:"FormField",props:{label:"Email"},children:[{component:"Input",props:{placeholder:"Email"}}]}]}],a11y:["The field is announced as the label plus the error when one shows; a node label needs accessibilityLabel.","The error is read out when it appears, through a live region."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"IconBadge",marker:null,platforms:["phone"],acceptsChildren:!1,props:{icon:{type:"icon",required:!0,description:"The icon to draw inside the badge."},iconVariant:{type:"enum",values:["linear","bold","broken","bulk","outline","twotone"],default:"linear",description:"The Iconsax style for the icon when given as a name."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"The size of the badge circle and its icon."},tone:{type:"enum",values:["primary","secondary","success","warning","danger","info","neutral"],default:"primary",description:"The colour of the tinted background and the icon."},accessibilityLabel:{type:"string",description:"Announces the badge as an image to screen readers; without it the badge is decorative."}},omit:[],examples:[{id:"IconBadge.primary",title:"Primary",props:{icon:"user"}},{id:"IconBadge.danger",title:"Danger",props:{icon:"alert-circle",tone:"danger",size:"lg",accessibilityLabel:"Error"}},{id:"IconBadge.neutral",title:"Neutral",props:{icon:"user",tone:"neutral",iconVariant:"bold"}}],usage:{when:["Draw an icon on a circular surface tinted with the same colour."],whenNot:[{text:"Providing a tappable icon action.",instead:"Use IconButton."}],do:[{note:"Give a standalone badge an accessibility label when it carries meaning.",example:[{component:"IconBadge",props:{icon:"user",accessibilityLabel:"User profile"}}]},{note:"Use the danger tone to highlight an error or a critical warning.",example:[{component:"IconBadge",props:{icon:"alert-circle",tone:"danger",accessibilityLabel:"Error"}}]}],dont:[{note:"Do not leave a meaningful badge silent for screen readers.",example:[{component:"IconBadge",props:{icon:"user"}}]},{note:"Do not use the danger tone for a standard status or an informational icon.",example:[{component:"IconBadge",props:{icon:"user",tone:"danger",accessibilityLabel:"User profile"}}]}],a11y:["A decorative badge is hidden from screen readers; set accessibilityLabel when it carries meaning.","Colour is never the only signal; pair a coloured badge with text."]}});
@@ -1 +1 @@
1
- "use strict";import{forwardRef}from"react";import{Animated,Pressable,StyleSheet}from"react-native";import{usePressAnimation}from"../../hooks/usePressAnimation.js";import{useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{tintOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{Spinner}from"../Spinner/index.js";import{jsx as _jsx}from"react/jsx-runtime";const GLASS_RIM_WIDTH=1,SOFT_FILL_OPACITY=.14,SIZE_MAP={sm:{diameter:32,icon:16},md:{diameter:40,icon:20},lg:{diameter:48,icon:24}},toneFor=(e,s)=>{switch(s){case"secondary":return{base:e.colors.neutral,on:e.colors["on-neutral"],fg:e.colors.neutral};case"success":return{base:e.colors.success,on:e.colors["on-success"],fg:e.colors["success-text"]};case"warning":return{base:e.colors.warning,on:e.colors["on-warning"],fg:e.colors["warning-text"]};case"danger":return{base:e.colors.danger,on:e.colors["on-danger"],fg:e.colors["danger-text"]};case"neutral":return{base:e.colors["bg-muted"],on:e.colors["text-body"],fg:e.colors["text-body"]};default:return{base:e.colors.primary,on:e.colors["on-primary"],fg:e.colors.primary}}},IconButton=forwardRef((e,s)=>{const{icon:o,iconVariant:r,onPress:t,accessibilityLabel:n,tone:i="primary",variant:a="solid",size:c="md",shape:l="circle",active:d=!1,disabled:m=!1,loading:u=!1,haptic:b,style:p,testID:f}=e,g=useTheme(),y=SIZE_MAP[c],I=m||u,{style:x,pressIn:h,pressOut:S}=usePressAnimation({scaleTo:.92,enabled:!I}),{base:j,on:P,fg:A}=toneFor(g,i),_=d?"solid":a;let w="transparent",C="transparent",O=0,T=I?g.colors["text-disabled"]:A;"solid"===_?(w=I?g.colors["surface-disabled"]:j,T=I?g.colors["text-disabled"]:P):"soft"===_?w=I?g.colors["surface-disabled"]:tintOf(j,.14,g.colors["bg-subtle"]):"outline"===_?(C=I?g.colors.border:j,O=g.size.border):"glass"===_&&(w=g.colors["glass-fill"],C=g.colors["glass-border"],O=1,T=I?g.colors["text-disabled"]:g.colors["on-glass"]);const v={color:T,size:y.icon,disabled:I},B="circle"===l?y.diameter/2:g.radius.md;return _jsx(Pressable,{ref:s,onPress:e=>{if(I)return;const s=resolveHaptic(b,"selection");s&&triggerHaptic(s),t?.(e)},onPressIn:h,onPressOut:S,disabled:I,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:I,selected:d},"aria-disabled":I,"aria-selected":d,hitSlop:6,testID:f,style:({pressed:e})=>[styles.base,{width:y.diameter,height:y.diameter,borderRadius:B,...smoothCorners,backgroundColor:w,borderColor:C,borderWidth:O,opacity:e&&"solid"!==_?.7:1},p],children:_jsx(Animated.View,{style:[styles.content,x],children:u?_jsx(Spinner,{size:"sm",color:T}):renderSlotIcon(o,v,r)})})});IconButton.displayName="IconButton";const styles=StyleSheet.create({base:{alignItems:"center",justifyContent:"center"},content:{alignItems:"center",justifyContent:"center"}});export{IconButton};export default IconButton;
1
+ "use strict";import{forwardRef}from"react";import{Animated,Pressable,StyleSheet}from"react-native";import{usePressAnimation}from"../../hooks/usePressAnimation.js";import{useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{tintOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{Spinner}from"../Spinner/index.js";import{jsx as _jsx}from"react/jsx-runtime";const GLASS_RIM_WIDTH=1,HIT_SLOP=6,SOFT_FILL_OPACITY=.14,SIZE_MAP={sm:{diameter:32,icon:16},md:{diameter:40,icon:20},lg:{diameter:48,icon:24}},toneFor=(e,o)=>{switch(o){case"secondary":return{base:e.colors.neutral,on:e.colors["on-neutral"],fg:e.colors.neutral};case"success":return{base:e.colors.success,on:e.colors["on-success"],fg:e.colors["success-text"]};case"warning":return{base:e.colors.warning,on:e.colors["on-warning"],fg:e.colors["warning-text"]};case"danger":return{base:e.colors.danger,on:e.colors["on-danger"],fg:e.colors["danger-text"]};case"neutral":return{base:e.colors["bg-muted"],on:e.colors["text-body"],fg:e.colors["text-body"]};default:return{base:e.colors.primary,on:e.colors["on-primary"],fg:e.colors.primary}}},IconButton=forwardRef((e,o)=>{const{icon:s,iconVariant:r,onPress:t,accessibilityLabel:n,tone:i="primary",variant:a="solid",size:l="md",shape:c="circle",active:d=!1,disabled:m=!1,loading:u=!1,haptic:b,style:p,testID:f}=e,g=useTheme(),y=SIZE_MAP[l],I=m||u,{style:h,pressIn:S,pressOut:x}=usePressAnimation({scaleTo:.92,enabled:!I}),{base:j,on:P,fg:_}=toneFor(g,i),A=d?"solid":a;let w="transparent",C="transparent",O=0,T=I?g.colors["text-disabled"]:_;"solid"===A?(w=I?g.colors["surface-disabled"]:j,T=I?g.colors["text-disabled"]:P):"soft"===A?w=I?g.colors["surface-disabled"]:tintOf(j,.14,g.colors["bg-subtle"]):"outline"===A?(C=I?g.colors.border:j,O=g.size.border):"glass"===A&&(w=g.colors["glass-fill"],C=g.colors["glass-border"],O=1,T=I?g.colors["text-disabled"]:g.colors["on-glass"]);const H={color:T,size:y.icon,disabled:I},L="circle"===c?y.diameter/2:g.radius.md;return _jsx(Pressable,{ref:o,onPress:e=>{if(I)return;const o=resolveHaptic(b,"selection");o&&triggerHaptic(o),t?.(e)},onPressIn:S,onPressOut:x,disabled:I,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:I,selected:d},"aria-disabled":I,"aria-selected":d,hitSlop:6,...hitSlopMarker(6),testID:f,style:({pressed:e})=>[styles.base,{width:y.diameter,height:y.diameter,borderRadius:L,...smoothCorners,backgroundColor:w,borderColor:C,borderWidth:O,opacity:e&&"solid"!==A?.7:1},p],children:_jsx(Animated.View,{style:[styles.content,h],children:u?_jsx(Spinner,{size:"sm",color:T}):renderSlotIcon(s,H,r)})})});IconButton.displayName="IconButton";const styles=StyleSheet.create({base:{alignItems:"center",justifyContent:"center"},content:{alignItems:"center",justifyContent:"center"}});export{IconButton};export default IconButton;
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"IconButton",marker:null,platforms:["phone"],acceptsChildren:!1,props:{accessibilityLabel:{type:"string",required:!0,description:"The accessible name of the button, required for an icon-only control."},iconVariant:{type:"enum",values:["linear","bold","broken","bulk","outline","twotone"],default:"linear",description:"The Iconsax style for the icon when it is given by name."},tone:{type:"enum",values:["primary","secondary","success","warning","danger","neutral"],default:"primary",description:"The colour family of the button."},variant:{type:"enum",values:["solid","soft","outline","ghost","glass"],default:"solid",description:"The visual weight of the button, from a solid fill to no fill."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"The diameter of the button and the size of its icon."},shape:{type:"enum",values:["circle","rounded"],default:"circle",description:"The outline of the button."},active:{type:"boolean",default:!1,description:"Draws the button filled regardless of the variant, as for an active nav tile."},disabled:{type:"boolean",default:!1,description:"Blocks presses and dims the button."},loading:{type:"boolean",default:!1,description:"Replaces the icon with a spinner and disables the button."}},omit:["icon","haptic"],examples:[{id:"IconButton.default",title:"Default",props:{accessibilityLabel:"Send",variant:"solid",tone:"primary"}},{id:"IconButton.outline",title:"Outline",props:{accessibilityLabel:"Close",variant:"outline",tone:"neutral"}},{id:"IconButton.active",title:"Active",props:{accessibilityLabel:"Menu",active:!0,tone:"primary"}}],usage:{when:["A single icon action that needs a clear touch target, such as a back or close control.","A navigation tile that is selected and should render filled."],whenNot:[{text:"A button with a text label.",instead:"Button"},{text:"A decorative icon with no action.",instead:"AppIcon"},{text:"A floating action button over the main content.",instead:"FloatingActionButton"}],do:[{note:"Always set an accessibility label so screen readers can announce the action.",example:[{component:"IconButton",props:{accessibilityLabel:"Close dialog"}}]},{note:"Use the outline variant for a quiet action beside stronger controls.",example:[{component:"IconButton",props:{accessibilityLabel:"Copy",variant:"outline",tone:"neutral"}}]}],dont:[{note:"Do not omit the accessibility label; an icon-only button is invisible to screen readers without it.",example:[{component:"IconButton",props:{variant:"solid"}}]},{note:"Do not use the danger tone for a standard destructive action without confirmation.",example:[{component:"IconButton",props:{accessibilityLabel:"Delete",tone:"danger"}}]}],a11y:["The accessibility label is the spoken name; without it the button has no accessible name.","The button announces itself as disabled when disabled or loading, with a disabled state.","The active state is exposed as selected for screen readers."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"ImageGallery",marker:null,platforms:["phone"],acceptsChildren:!1,props:{images:{type:"array",required:!0,description:"The photos in order. Each entry holds a source, and may hold a caption and alt text."},initialIndex:{type:"number",default:0,description:"The photo shown first, counted from 0."},showThumbnails:{type:"boolean",default:!0,description:"Draws a strip of small thumbnails under the photo."},showCounter:{type:"boolean",default:!0,description:"Draws a counter such as 2 / 5 over the photo."},enableLightbox:{type:"boolean",default:!0,description:"Opens a full screen view when the person taps a photo."},enablePinchZoom:{type:"boolean",default:!0,description:"Lets the person pinch and double tap to zoom into a photo in the full screen view."},loading:{type:"boolean",default:!1,description:"Draws the placeholder shape instead of the photos while data loads."},accessibilityLabel:{type:"string",description:"Names the gallery for a screen reader."}},omit:["haptic"],examples:[{id:"ImageGallery.withThumbnails",title:"With thumbnails",props:{images:[{source:{uri:"https://picsum.photos/seed/sunset/800/600"},caption:"Sunset"},{source:{uri:"https://picsum.photos/seed/mountain/800/600"},caption:"Mountain"},{source:{uri:"https://picsum.photos/seed/coast/800/600"},caption:"Coast"}],showThumbnails:!0,showCounter:!0}},{id:"ImageGallery.startsLater",title:"Starts on a later photo",props:{images:[{source:{uri:"https://picsum.photos/seed/forest/800/600"},alt:"Forest path in autumn"},{source:{uri:"https://picsum.photos/seed/river/800/600"},alt:"River at dawn"}],initialIndex:1,showThumbnails:!1}},{id:"ImageGallery.noLightbox",title:"Photos without full screen view",props:{images:[{source:{uri:"https://picsum.photos/seed/harbor/800/600"},caption:"Harbor"},{source:{uri:"https://picsum.photos/seed/meadow/800/600"},caption:"Meadow"}],enableLightbox:!1,showCounter:!1}}],usage:{when:["A short set of photos belongs together and the person looks through them in one place.","The person may need to zoom into a photo to see its detail."],whenNot:[{text:"The items are slides of a banner or promotion that rotate on their own.",instead:"Carousel"}],do:[{note:"Give each photo a caption so the person knows what it shows.",example:[{component:"ImageGallery",props:{images:[{source:{uri:"https://picsum.photos/seed/sunset/800/600"},caption:"Sunset"},{source:{uri:"https://picsum.photos/seed/coast/800/600"},caption:"Coast"}]}}]},{note:"Keep the full screen view on so the person can open each photo at full size.",example:[{component:"ImageGallery",props:{images:[{source:{uri:"https://picsum.photos/seed/harbor/800/600"},caption:"Harbor"},{source:{uri:"https://picsum.photos/seed/meadow/800/600"},caption:"Meadow"}],enableLightbox:!0}}]}],dont:[{note:"Do not leave out captions. Photos with no caption give the person no context.",example:[{component:"ImageGallery",props:{images:[{source:{uri:"https://picsum.photos/seed/sunset/800/600"}},{source:{uri:"https://picsum.photos/seed/coast/800/600"}}]}}]},{note:"Do not turn off the full screen view for photos the person must inspect. They cannot open them at full size.",example:[{component:"ImageGallery",props:{images:[{source:{uri:"https://picsum.photos/seed/harbor/800/600"},caption:"Harbor"},{source:{uri:"https://picsum.photos/seed/meadow/800/600"},caption:"Meadow"}],enableLightbox:!1}}]}],a11y:["Set accessibilityLabel to name the gallery for a screen reader.","Each photo is announced by its alt text, or by its position in the set when it has no alt text."]}});
@@ -0,0 +1 @@
1
+ "use strict";import{definePhoneMeta}from"../../canvasKit/meta.js";export const meta=definePhoneMeta()({name:"InlineSelect",marker:null,platforms:["phone"],acceptsChildren:!1,props:{options:{type:"array",required:!0,description:"The options to pick from, each with a label, a value and an optional icon, description or disabled flag.",itemFields:{label:{type:"string",required:!0,description:"The text shown for the option."},value:{type:"stringOrNumber",required:!0,description:"The value the option stands for."},description:{type:"string",description:"A supporting description line under the label."},icon:{type:"icon",description:"An icon drawn beside the option."},disabled:{type:"boolean",description:"Blocks selection of this option."}}},value:{type:"stringOrNumber",description:"The selected option value."},placeholder:{type:"string",default:"Select",description:"Trigger text shown when nothing is selected."},label:{type:"string",description:"A label drawn above the trigger like a field label."},title:{type:"string",description:"Heading shown at the top of the options bottom sheet."},searchable:{type:"boolean",default:!1,description:"Shows a search box above the option list in the sheet."},disabled:{type:"boolean",default:!1,description:"Blocks opening the sheet and dims the trigger."},size:{type:"enum",values:["sm","md","lg"],default:"md",description:"Density of the trigger text and chevron, matching the host field."},color:{type:"string",description:"Color for the trigger text and chevron, falling back to the primary brand color."},chevronColor:{type:"string",description:"Color override for the chevron glyph."},chevronSize:{type:"number",description:"Chevron size in pixels, falling back to the icon size of the chosen field size."},accessibilityLabel:{type:"string",description:"The spoken name of the trigger for screen readers."}},omit:["haptic"],examples:[{id:"InlineSelect.currencyPrefix",title:"Currency prefix",props:{options:[{label:"INR",value:"inr"},{label:"USD",value:"usd"},{label:"EUR",value:"eur"}],value:"inr",size:"md"}},{id:"InlineSelect.sheetHeading",title:"With sheet heading and search",props:{options:[{label:"Bengaluru",value:"blr",description:"Karnataka"},{label:"Chennai",value:"maa",description:"Tamil Nadu"},{label:"Delhi",value:"del",description:"National Capital Territory"},{label:"Mumbai",value:"bom",description:"Maharashtra"}],value:"blr",title:"Select city",searchable:!0}},{id:"InlineSelect.withLabel",title:"With label and placeholder",props:{options:[{label:"Kilograms",value:"kg"},{label:"Pounds",value:"lbs"},{label:"Grams",value:"g"}],label:"Unit",placeholder:"Pick unit"}}],usage:{when:["A compact dropdown trigger inside a field prefix or suffix slot.","A borderless picker trigger in a toolbar or list header."],whenNot:[{text:"The choice needs a full standalone field with its own border or multi selection.",instead:"Select"}],do:[{note:"Provide a title so the sheet heading and spoken name describe the choice.",example:[{component:"InlineSelect",props:{options:[{label:"INR",value:"INR"},{label:"USD",value:"USD"}],value:"INR",title:"Currency"}}]},{note:"Turn on search when the list of options is long.",example:[{component:"InlineSelect",props:{options:[{label:"Bengaluru",value:"blr"},{label:"Chennai",value:"maa"},{label:"Delhi",value:"del"}],title:"City",searchable:!0}}]}],dont:[{note:"Do not leave the trigger with no title or label to describe the choice.",example:[{component:"InlineSelect",props:{options:[{label:"INR",value:"INR"},{label:"USD",value:"USD"}],value:"INR"}}]},{note:"Do not leave search off when the list of options is long.",example:[{component:"InlineSelect",props:{options:[{label:"Bengaluru",value:"blr"},{label:"Chennai",value:"maa"},{label:"Delhi",value:"del"}],title:"City",searchable:!1}}]}],a11y:["The trigger announces as a button with its label, selected value and expanded state.","Set title, label or accessibilityLabel so the trigger has a descriptive name for screen readers."]}});
@@ -1 +1 @@
1
- "use strict";import{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,Pressable,StyleSheet,Text,TextInput,View}from"react-native";import{useReducedMotion}from"../../hooks/index.js";import{createAnimatedValue,fontFor,resolveFieldSize,setNativeValue,useTheme}from"../../theme/index.js";import{mergeRefs,triggerHaptic}from"../../utils/index.js";import{defaultIcons}from"../AppIcon/defaultIcons.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{Button}from"../Button/index.js";import{FieldBase,FieldErrorGlyph,FieldLabel,fieldTextAsString,hasFieldText,RequiredPlaceholder,resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{useFloatingLabel}from"../FieldBase/useFloatingLabel.js";import{NotationInkContext,useNotationInk}from"../Notation/Notation.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const Input=forwardRef((e,t)=>{const{label:i,help:n,placeholder:o,value:l,onChangeText:s,error:r,helperText:a,type:d="input",secureTextEntry:c=!1,showPasswordToggle:u=!1,disabled:p=!1,multiline:f=!1,leftIcon:g,rightIcon:m,unit:x,unitStyle:h,prefix:y,prefixStyle:b,readOnly:v=!1,action:S,actionStyle:j,size:w="md",variant:T,labelMode:F,required:I=!1,maxLength:R,showCounter:_=!0,textAlign:V,format:A,parse:z,style:N,containerStyle:k,inputStyle:C,labelStyle:L,messageStyle:P,borderRadius:D,onFocus:H,onBlur:B,accessibilityLabel:E,testID:M,editable:O,...q}=e,G=useTheme(),W=useMemo(()=>buildStyles(G),[G]),$=resolveFieldSize(G,w),X=G.components.input[w]["multiline-min-height"],J=Math.round(1.4*$.text),K=T??G.settings.components.input?.defaultVariant??G.settings.components.field?.defaultVariant??"outlined",Q=F??G.settings.components.input?.defaultLabelMode??"top",[U,Y]=useState(!1),[Z,ee]=useState(!1),te="password"===d||u||c,ie="password"===d||u,ne="textarea"===d||f,oe=ne?Math.round(.1*$.text):0,le="string"==typeof l&&l.length>0,se=hasFieldText(r),re=!0===r||se,ae=hasFieldText(a),de=se||!re&&ae,ce=hasFieldText(i),ue=hasFieldText(y),pe=!p&&!1!==O,fe=U||le||ue,ge=useRef(null),me=useMemo(()=>mergeRefs(ge,t),[t]),xe=useCallback(()=>{pe&&ge.current?.focus()},[pe]),he=ce&&"float"===Q,ye=useRef(createAnimatedValue(0)).current,be=useRef(createAnimatedValue(de?1:0)).current;useEffect(()=>{const e=Animated.timing(be,{toValue:de?1:0,duration:G.motion.duration.fast,easing:Easing.bezier(...G.motion.ease["in-out"]),useNativeDriver:!0});return e.start(),()=>e.stop()},[de,be,G.motion.duration.fast,G.motion.ease["in-out"]]);const ve=useReducedMotion(),Se=G.settings.components.input?.shakeOnError??!1,je=useRef(re);useEffect(()=>{if(!Se)return void(je.current=re);let e;return re&&!je.current&&(ve||(setNativeValue(ye,0),e=Animated.sequence([Animated.timing(ye,{toValue:1,duration:50,useNativeDriver:!0}),Animated.timing(ye,{toValue:-1,duration:50,useNativeDriver:!0}),Animated.timing(ye,{toValue:1,duration:50,useNativeDriver:!0}),Animated.timing(ye,{toValue:-1,duration:50,useNativeDriver:!0}),Animated.timing(ye,{toValue:0,duration:100,useNativeDriver:!0})]),e.start()),triggerHaptic("notificationError")),je.current=re,()=>e?.stop()},[re,ye,Se,ve]);const we=useCallback(e=>{Y(!0),H?.(e)},[H]),Te=useCallback(e=>{Y(!1),B?.(e)},[B]),Fe=useCallback(()=>{triggerHaptic("selection"),ee(e=>!e)},[]),Ie=G.colors["field-caret"],Re=D??$.radius,Ve=G.settings.components.input?.tintLabelOnFocus??!1,Ae=U&&Ve?G.colors["field-border-focus"]:G.colors["field-label"],ze=ye.interpolate({inputRange:[-1,0,1],outputRange:[-6,0,6]}),Ne=Boolean(m)||Boolean(x)||ie,ke="underline"===K,Ce=g?$.icon+G.space.md+1+G.space.md:0,Le=useFloatingLabel({label:i,enabled:he,floated:fe,required:I,variant:K,sizeTokens:$,leadingOffset:Ce,trailingOffset:Ne?$.icon+G.space.sm:0,textAlign:V,paddingLeft:ke?G.space.none:$["padding-x"],lineHeight:ne?J:void 0,restNudge:oe,floatTrim:ne?2:0,color:Ae,style:L}),Pe=resolveFieldTextStyle(G,{disabled:p}),De=Pe.color,He=Pe.placeholderColor,Be=I&&!ce&&!le&&"string"==typeof o&&o.length>0,Ee=re?r:a,Me=_&&"number"==typeof R&&"string"==typeof l?`${l.length} / ${R}`:null,Oe=re?G.colors["field-message"]:G.colors["text-muted"],qe=useNotationInk(P,$["message-text"],Oe),Ge=E??fieldTextAsString(i)??o,We=p?G.colors["field-icon-disabled"]:U?G.colors["field-icon-focus"]:G.colors["field-icon"],$e={focused:U,disabled:p,error:re,color:We,size:$.icon},renderSlot=e=>renderSlotIcon(e,$e),Xe=(()=>{if(ie){const e=(Z?G.settings.icons.eyeOff:G.settings.icons.eye)??(Z?defaultIcons.eyeOff:defaultIcons.eye);return _jsx(Pressable,{onPress:Fe,disabled:!pe,hitSlop:8,accessibilityRole:"button",accessibilityLabel:Z?"Hide password":"Show password",children:e({size:$.icon,color:We})})}const e=x?_jsx(Text,{style:[W.unit,{fontSize:$.text,color:He},h],children:x}):null,t=m?_jsx(View,{children:renderSlot(m)}):null;return e&&t?_jsxs(View,{style:W.trailingRow,children:[e,t]}):e??t})(),Je=g?_jsx(View,{children:renderSlot(g)}):null,Ke=StyleSheet.flatten(b),Qe=Ke?.fontSize??$.text,Ue=Ke?.color??He,Ye=useMemo(()=>({fontSize:Qe,color:Ue}),[Qe,Ue]),Ze=ue?"string"==typeof y||"number"==typeof y?_jsx(Text,{style:[W.prefix,{fontSize:$.text,color:He,marginRight:G.space.xs,lineHeight:ne?J:void 0,paddingTop:ne?oe:void 0},b],children:y}):_jsx(View,{style:[W.prefixNode,{marginRight:G.space.xs,minHeight:ne?J:void 0,justifyContent:"center",paddingTop:ne?oe:void 0}],children:_jsx(Text,{style:[W.prefix,{fontSize:$.text,color:He,lineHeight:ne?J:void 0},b],children:_jsx(NotationInkContext.Provider,{value:Ye,children:y})})}):null,et=S?_jsx(Button,{variant:S.variant??"outline",tone:S.tone??"primary",size:w,title:S.label,leftIcon:S.icon,loading:S.loading,disabled:p||S.disabled,onPress:S.onPress,pressAnimation:!1,testID:S.testID,style:[W.action,{minHeight:$["min-height"],alignSelf:ne?"flex-start":"stretch"},j]}):null;return _jsxs(Animated.View,{style:[W.container,{transform:[{translateX:ze}]},N],children:[ce&&!he?_jsx(FieldLabel,{size:w,required:I,help:n,color:Ae,style:L,children:i}):null,_jsxs(View,{style:[W.fieldRow,{columnGap:G.space.sm,alignItems:ne?"flex-start":"stretch"}],children:[_jsxs(View,{style:W.fieldWrapper,children:[_jsxs(FieldBase,{size:w,variant:K,focused:U,disabled:p,error:re,filled:le,minHeight:ne?X:void 0,borderRadius:Re,leading:Je,leadingDivider:null!=g,paddingLeft:ke?G.space.none:void 0,trailing:Xe,slotAlign:ne?"top":"center",slotLineHeight:ne?J:void 0,topNotch:Le.topNotch,onPress:xe,pressFeedback:!1,style:k,children:[Ze,_jsxs(View,{style:W.inputWrap,children:[_jsx(TextInput,{ref:me,style:[W.input,{color:De,fontSize:$.text,...Pe.weightStyle,paddingLeft:ke?G.space.none:void 0,minHeight:ne?X-2*$["padding-y"]:void 0,lineHeight:ne?J:void 0,paddingTop:ne?oe:void 0,textAlignVertical:ne?"top":"center"},C],textAlign:V,placeholder:he&&!fe||Be?void 0:o,placeholderTextColor:He,value:A&&null!=l?A(l):l,onChangeText:e=>{s&&s(z?z(e):e)},onFocus:we,onBlur:Te,editable:pe,readOnly:v,secureTextEntry:te&&!Z,multiline:ne,autoCapitalize:te?"none":void 0,autoCorrect:!te&&void 0,maxLength:R,selectionColor:Ie,accessibilityLabel:Ge,accessibilityState:{disabled:p},"aria-disabled":p,testID:M,...q}),Be?_jsx(RequiredPlaceholder,{text:o,color:He,fontSize:$.text,weightStyle:Pe.weightStyle,align:ne?"top":"center",paddingTop:ne?oe:void 0,textAlign:V}):null]})]}),Le.node]}),et]}),de||Me?_jsxs(View,{style:[W.footerRow,{marginTop:$["message-gap"]}],children:[de?_jsxs(Animated.View,{style:[W.messageRow,{columnGap:G.space.xs,opacity:be}],accessibilityLiveRegion:re?"polite":"none",children:[re?_jsx(FieldErrorGlyph,{size:$["message-text"],color:Oe}):null,_jsx(Text,{style:[W.messageText,{color:Oe,fontSize:$["message-text"],...fontFor(G,"normal")},P],children:_jsx(NotationInkContext.Provider,{value:qe,children:Ee})})]}):_jsx(View,{style:W.footerSpacer}),Me?_jsx(Text,{style:[W.counterText,{color:G.colors["text-subtle"],fontSize:$["message-text"],...fontFor(G,"normal")}],children:Me}):null]}):null]})});Input.displayName="Input";const buildStyles=e=>StyleSheet.create({container:{width:"100%"},fieldRow:{flexDirection:"row"},fieldWrapper:{position:"relative",overflow:"visible",flex:1},action:{flexShrink:0},input:{padding:e.space.none,margin:e.space.none,includeFontPadding:!1},prefix:{flexShrink:0,includeFontPadding:!1},prefixNode:{flexShrink:0},inputWrap:{flex:1,alignSelf:"stretch",justifyContent:"center"},unit:{includeFontPadding:!1},trailingRow:{flexDirection:"row",alignItems:"center",columnGap:e.space.sm},footerRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",columnGap:e.space.sm},footerSpacer:{flex:1},messageRow:{flex:1,flexDirection:"row",alignItems:"center"},messageText:{flexShrink:1,includeFontPadding:!1},counterText:{flexShrink:0,includeFontPadding:!1}});export{Input};export default Input;
1
+ "use strict";import{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,Pressable,StyleSheet,Text,TextInput,View}from"react-native";import{useReducedMotion}from"../../hooks/index.js";import{createAnimatedValue,fontFor,resolveFieldSize,setNativeValue,useTheme}from"../../theme/index.js";import{mergeRefs,triggerHaptic}from"../../utils/index.js";import{defaultIcons}from"../AppIcon/defaultIcons.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{Button}from"../Button/index.js";import{FieldBase,FieldErrorGlyph,FieldLabel,fieldTextAsString,hasFieldText,RequiredPlaceholder,resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{useFloatingLabel}from"../FieldBase/useFloatingLabel.js";import{NotationInkContext,useNotationInk}from"../Notation/Notation.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const Input=forwardRef((e,t)=>{const{label:i,help:n,placeholder:o,value:l,onChangeText:s,error:r,helperText:a,type:d="input",secureTextEntry:c=!1,showPasswordToggle:u=!1,disabled:p=!1,multiline:f=!1,leftIcon:g,rightIcon:m,unit:x,unitStyle:h,prefix:y,prefixStyle:b,readOnly:v=!1,action:S,actionStyle:j,size:w="md",variant:T,labelMode:F,required:I=!1,maxLength:R,showCounter:_=!0,textAlign:V,format:A,parse:z,style:N,containerStyle:k,inputStyle:C,labelStyle:L,messageStyle:P,borderRadius:D,onFocus:H,onBlur:B,accessibilityLabel:E,testID:M,editable:O,...q}=e,G=useTheme(),W=useMemo(()=>buildStyles(G),[G]),$=resolveFieldSize(G,w),X=G.components.input[w]["multiline-min-height"],J=Math.round($.text*G.leading.body),K=T??G.settings.components.input?.defaultVariant??G.settings.components.field?.defaultVariant??"outlined",Q=F??G.settings.components.input?.defaultLabelMode??"top",[U,Y]=useState(!1),[Z,ee]=useState(!1),te="password"===d||u||c,ie="password"===d||u,ne="textarea"===d||f,oe=ne?Math.round(.1*$.text):0,le="string"==typeof l&&l.length>0,se=hasFieldText(r),re=!0===r||se,ae=hasFieldText(a),de=se||!re&&ae,ce=hasFieldText(i),ue=hasFieldText(y),pe=!p&&!1!==O,fe=U||le||ue,ge=useRef(null),me=useMemo(()=>mergeRefs(ge,t),[t]),xe=useCallback(()=>{pe&&ge.current?.focus()},[pe]),he=ce&&"float"===Q,ye=useRef(createAnimatedValue(0)).current,be=useRef(createAnimatedValue(de?1:0)).current;useEffect(()=>{const e=Animated.timing(be,{toValue:de?1:0,duration:G.motion.duration.fast,easing:Easing.bezier(...G.motion.ease["in-out"]),useNativeDriver:!0});return e.start(),()=>e.stop()},[de,be,G.motion.duration.fast,G.motion.ease["in-out"]]);const ve=useReducedMotion(),Se=G.settings.components.input?.shakeOnError??!1,je=useRef(re);useEffect(()=>{if(!Se)return void(je.current=re);let e;return re&&!je.current&&(ve||(setNativeValue(ye,0),e=Animated.sequence([Animated.timing(ye,{toValue:1,duration:50,useNativeDriver:!0}),Animated.timing(ye,{toValue:-1,duration:50,useNativeDriver:!0}),Animated.timing(ye,{toValue:1,duration:50,useNativeDriver:!0}),Animated.timing(ye,{toValue:-1,duration:50,useNativeDriver:!0}),Animated.timing(ye,{toValue:0,duration:100,useNativeDriver:!0})]),e.start()),triggerHaptic("notificationError")),je.current=re,()=>e?.stop()},[re,ye,Se,ve]);const we=useCallback(e=>{Y(!0),H?.(e)},[H]),Te=useCallback(e=>{Y(!1),B?.(e)},[B]),Fe=useCallback(()=>{triggerHaptic("selection"),ee(e=>!e)},[]),Ie=G.colors["field-caret"],Re=D??$.radius,Ve=G.settings.components.input?.tintLabelOnFocus??!1,Ae=U&&Ve?G.colors["field-border-focus"]:G.colors["field-label"],ze=ye.interpolate({inputRange:[-1,0,1],outputRange:[-6,0,6]}),Ne=Boolean(m)||Boolean(x)||ie,ke="underline"===K,Ce=g?$.icon+G.space.md+1+G.space.md:0,Le=useFloatingLabel({label:i,enabled:he,floated:fe,required:I,variant:K,sizeTokens:$,leadingOffset:Ce,trailingOffset:Ne?$.icon+G.space.sm:0,textAlign:V,paddingLeft:ke?G.space.none:$["padding-x"],lineHeight:ne?J:void 0,restNudge:oe,floatTrim:ne?2:0,color:Ae,style:L}),Pe=resolveFieldTextStyle(G,{disabled:p}),De=Pe.color,He=Pe.placeholderColor,Be=I&&!ce&&!le&&"string"==typeof o&&o.length>0,Ee=re?r:a,Me=_&&"number"==typeof R&&"string"==typeof l?`${l.length} / ${R}`:null,Oe=re?G.colors["field-message"]:G.colors["text-muted"],qe=useNotationInk(P,$["message-text"],Oe),Ge=E??fieldTextAsString(i)??o,We=p?G.colors["field-icon-disabled"]:U?G.colors["field-icon-focus"]:G.colors["field-icon"],$e={focused:U,disabled:p,error:re,color:We,size:$.icon},renderSlot=e=>renderSlotIcon(e,$e),Xe=(()=>{if(ie){const e=(Z?G.settings.icons.eyeOff:G.settings.icons.eye)??(Z?defaultIcons.eyeOff:defaultIcons.eye);return _jsx(Pressable,{onPress:Fe,disabled:!pe,hitSlop:8,accessibilityRole:"button",accessibilityLabel:Z?"Hide password":"Show password",children:e({size:$.icon,color:We})})}const e=x?_jsx(Text,{style:[W.unit,{fontSize:$.text,color:He},h],children:x}):null,t=m?_jsx(View,{children:renderSlot(m)}):null;return e&&t?_jsxs(View,{style:W.trailingRow,children:[e,t]}):e??t})(),Je=g?_jsx(View,{children:renderSlot(g)}):null,Ke=StyleSheet.flatten(b),Qe=Ke?.fontSize??$.text,Ue=Ke?.color??He,Ye=useMemo(()=>({fontSize:Qe,color:Ue}),[Qe,Ue]),Ze=ue?"string"==typeof y||"number"==typeof y?_jsx(Text,{style:[W.prefix,{fontSize:$.text,color:He,marginRight:G.space.xs,lineHeight:ne?J:void 0,paddingTop:ne?oe:void 0},b],children:y}):_jsx(View,{style:[W.prefixNode,{marginRight:G.space.xs,minHeight:ne?J:void 0,justifyContent:"center",paddingTop:ne?oe:void 0}],children:_jsx(Text,{style:[W.prefix,{fontSize:$.text,color:He,lineHeight:ne?J:void 0},b],children:_jsx(NotationInkContext.Provider,{value:Ye,children:y})})}):null,et=S?_jsx(Button,{variant:S.variant??"outline",tone:S.tone??"primary",size:w,title:S.label,leftIcon:S.icon,loading:S.loading,disabled:p||S.disabled,onPress:S.onPress,pressAnimation:!1,testID:S.testID,style:[W.action,{minHeight:$["min-height"],alignSelf:ne?"flex-start":"stretch"},j]}):null;return _jsxs(Animated.View,{style:[W.container,{transform:[{translateX:ze}]},N],children:[ce&&!he?_jsx(FieldLabel,{size:w,required:I,help:n,color:Ae,style:L,children:i}):null,_jsxs(View,{style:[W.fieldRow,{columnGap:G.space.sm,alignItems:ne?"flex-start":"stretch"}],children:[_jsxs(View,{style:W.fieldWrapper,children:[_jsxs(FieldBase,{size:w,variant:K,focused:U,disabled:p,error:re,filled:le,minHeight:ne?X:void 0,borderRadius:Re,leading:Je,leadingDivider:null!=g,paddingLeft:ke?G.space.none:void 0,trailing:Xe,slotAlign:ne?"top":"center",slotLineHeight:ne?J:void 0,topNotch:Le.topNotch,onPress:xe,pressFeedback:!1,style:k,children:[Ze,_jsxs(View,{style:W.inputWrap,children:[_jsx(TextInput,{ref:me,style:[W.input,{color:De,fontSize:$.text,...Pe.weightStyle,paddingLeft:ke?G.space.none:void 0,minHeight:ne?X-2*$["padding-y"]:void 0,lineHeight:ne?J:void 0,paddingTop:ne?oe:void 0,textAlignVertical:ne?"top":"center"},C],textAlign:V,placeholder:he&&!fe||Be?void 0:o,placeholderTextColor:He,value:A&&null!=l?A(l):l,onChangeText:e=>{s&&s(z?z(e):e)},onFocus:we,onBlur:Te,editable:pe,readOnly:v,secureTextEntry:te&&!Z,multiline:ne,autoCapitalize:te?"none":void 0,autoCorrect:!te&&void 0,maxLength:R,selectionColor:Ie,accessibilityLabel:Ge,accessibilityState:{disabled:p},"aria-disabled":p,testID:M,...q}),Be?_jsx(RequiredPlaceholder,{text:o,color:He,fontSize:$.text,weightStyle:Pe.weightStyle,align:ne?"top":"center",paddingTop:ne?oe:void 0,textAlign:V}):null]})]}),Le.node]}),et]}),de||Me?_jsxs(View,{style:[W.footerRow,{marginTop:$["message-gap"]}],children:[de?_jsxs(Animated.View,{style:[W.messageRow,{columnGap:G.space.xs,opacity:be}],accessibilityLiveRegion:re?"polite":"none",children:[re?_jsx(FieldErrorGlyph,{size:$["message-text"],color:Oe}):null,_jsx(Text,{style:[W.messageText,{color:Oe,fontSize:$["message-text"],...fontFor(G,"normal")},P],children:_jsx(NotationInkContext.Provider,{value:qe,children:Ee})})]}):_jsx(View,{style:W.footerSpacer}),Me?_jsx(Text,{style:[W.counterText,{color:G.colors["text-subtle"],fontSize:$["message-text"],...fontFor(G,"normal")}],children:Me}):null]}):null]})});Input.displayName="Input";const buildStyles=e=>StyleSheet.create({container:{width:"100%"},fieldRow:{flexDirection:"row"},fieldWrapper:{position:"relative",overflow:"visible",flex:1},action:{flexShrink:0},input:{padding:e.space.none,margin:e.space.none,includeFontPadding:!1},prefix:{flexShrink:0,includeFontPadding:!1},prefixNode:{flexShrink:0},inputWrap:{flex:1,alignSelf:"stretch",justifyContent:"center"},unit:{includeFontPadding:!1},trailingRow:{flexDirection:"row",alignItems:"center",columnGap:e.space.sm},footerRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",columnGap:e.space.sm},footerSpacer:{flex:1},messageRow:{flex:1,flexDirection:"row",alignItems:"center"},messageText:{flexShrink:1,includeFontPadding:!1},counterText:{flexShrink:0,includeFontPadding:!1}});export{Input};export default Input;