@webority/mobile-ui 0.1.0 → 0.2.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 (405) hide show
  1. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  2. package/lib/commonjs/components/Button/Button.js +1 -1
  3. package/lib/commonjs/components/Confetti/Confetti.js +1 -1
  4. package/lib/commonjs/components/Drawer/Drawer.js +1 -1
  5. package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
  6. package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.js +1 -1
  7. package/lib/commonjs/components/Slider/Slider.js +1 -1
  8. package/lib/commonjs/components/Swipeable/Swipeable.js +1 -1
  9. package/lib/commonjs/components/ZoomableImage/ZoomableImage.js +1 -1
  10. package/lib/module/components/Accordion/Accordion.js +1 -1
  11. package/lib/module/components/Accordion/index.js +1 -1
  12. package/lib/module/components/AmountSlider/AmountSlider.js +1 -1
  13. package/lib/module/components/AmountSlider/index.js +1 -1
  14. package/lib/module/components/AnimatePresence/AnimatePresence.js +1 -1
  15. package/lib/module/components/AnimatePresence/index.js +1 -1
  16. package/lib/module/components/AppBar/AppBar.js +1 -1
  17. package/lib/module/components/AppBar/index.js +1 -1
  18. package/lib/module/components/AppIcon/AppIcon.js +1 -1
  19. package/lib/module/components/AppIcon/catalog/bold/a.g.js +1 -1
  20. package/lib/module/components/AppIcon/catalog/bold/b.g.js +1 -1
  21. package/lib/module/components/AppIcon/catalog/bold/c.g.js +1 -1
  22. package/lib/module/components/AppIcon/catalog/bold/d.g.js +1 -1
  23. package/lib/module/components/AppIcon/catalog/bold/e.g.js +1 -1
  24. package/lib/module/components/AppIcon/catalog/bold/f.g.js +1 -1
  25. package/lib/module/components/AppIcon/catalog/bold/g.g.js +1 -1
  26. package/lib/module/components/AppIcon/catalog/bold/h.g.js +1 -1
  27. package/lib/module/components/AppIcon/catalog/bold/i.g.js +1 -1
  28. package/lib/module/components/AppIcon/catalog/bold/j.g.js +1 -1
  29. package/lib/module/components/AppIcon/catalog/bold/k.g.js +1 -1
  30. package/lib/module/components/AppIcon/catalog/bold/l.g.js +1 -1
  31. package/lib/module/components/AppIcon/catalog/bold/m.g.js +1 -1
  32. package/lib/module/components/AppIcon/catalog/bold/n.g.js +1 -1
  33. package/lib/module/components/AppIcon/catalog/bold/o.g.js +1 -1
  34. package/lib/module/components/AppIcon/catalog/bold/p.g.js +1 -1
  35. package/lib/module/components/AppIcon/catalog/bold/q.g.js +1 -1
  36. package/lib/module/components/AppIcon/catalog/bold/r.g.js +1 -1
  37. package/lib/module/components/AppIcon/catalog/bold/s.g.js +1 -1
  38. package/lib/module/components/AppIcon/catalog/bold/t.g.js +1 -1
  39. package/lib/module/components/AppIcon/catalog/bold/u.g.js +1 -1
  40. package/lib/module/components/AppIcon/catalog/bold/v.g.js +1 -1
  41. package/lib/module/components/AppIcon/catalog/bold/w.g.js +1 -1
  42. package/lib/module/components/AppIcon/catalog/bold/x.g.js +1 -1
  43. package/lib/module/components/AppIcon/catalog/bold/y.g.js +1 -1
  44. package/lib/module/components/AppIcon/catalog/bold/z.g.js +1 -1
  45. package/lib/module/components/AppIcon/catalog/broken/a.g.js +1 -1
  46. package/lib/module/components/AppIcon/catalog/broken/b.g.js +1 -1
  47. package/lib/module/components/AppIcon/catalog/broken/c.g.js +1 -1
  48. package/lib/module/components/AppIcon/catalog/broken/d.g.js +1 -1
  49. package/lib/module/components/AppIcon/catalog/broken/e.g.js +1 -1
  50. package/lib/module/components/AppIcon/catalog/broken/f.g.js +1 -1
  51. package/lib/module/components/AppIcon/catalog/broken/g.g.js +1 -1
  52. package/lib/module/components/AppIcon/catalog/broken/h.g.js +1 -1
  53. package/lib/module/components/AppIcon/catalog/broken/i.g.js +1 -1
  54. package/lib/module/components/AppIcon/catalog/broken/j.g.js +1 -1
  55. package/lib/module/components/AppIcon/catalog/broken/k.g.js +1 -1
  56. package/lib/module/components/AppIcon/catalog/broken/l.g.js +1 -1
  57. package/lib/module/components/AppIcon/catalog/broken/m.g.js +1 -1
  58. package/lib/module/components/AppIcon/catalog/broken/n.g.js +1 -1
  59. package/lib/module/components/AppIcon/catalog/broken/o.g.js +1 -1
  60. package/lib/module/components/AppIcon/catalog/broken/p.g.js +1 -1
  61. package/lib/module/components/AppIcon/catalog/broken/q.g.js +1 -1
  62. package/lib/module/components/AppIcon/catalog/broken/r.g.js +1 -1
  63. package/lib/module/components/AppIcon/catalog/broken/s.g.js +1 -1
  64. package/lib/module/components/AppIcon/catalog/broken/t.g.js +1 -1
  65. package/lib/module/components/AppIcon/catalog/broken/u.g.js +1 -1
  66. package/lib/module/components/AppIcon/catalog/broken/v.g.js +1 -1
  67. package/lib/module/components/AppIcon/catalog/broken/w.g.js +1 -1
  68. package/lib/module/components/AppIcon/catalog/broken/x.g.js +1 -1
  69. package/lib/module/components/AppIcon/catalog/broken/y.g.js +1 -1
  70. package/lib/module/components/AppIcon/catalog/broken/z.g.js +1 -1
  71. package/lib/module/components/AppIcon/catalog/bulk/a.g.js +1 -1
  72. package/lib/module/components/AppIcon/catalog/bulk/b.g.js +1 -1
  73. package/lib/module/components/AppIcon/catalog/bulk/c.g.js +1 -1
  74. package/lib/module/components/AppIcon/catalog/bulk/d.g.js +1 -1
  75. package/lib/module/components/AppIcon/catalog/bulk/e.g.js +1 -1
  76. package/lib/module/components/AppIcon/catalog/bulk/f.g.js +1 -1
  77. package/lib/module/components/AppIcon/catalog/bulk/g.g.js +1 -1
  78. package/lib/module/components/AppIcon/catalog/bulk/h.g.js +1 -1
  79. package/lib/module/components/AppIcon/catalog/bulk/i.g.js +1 -1
  80. package/lib/module/components/AppIcon/catalog/bulk/j.g.js +1 -1
  81. package/lib/module/components/AppIcon/catalog/bulk/k.g.js +1 -1
  82. package/lib/module/components/AppIcon/catalog/bulk/l.g.js +1 -1
  83. package/lib/module/components/AppIcon/catalog/bulk/m.g.js +1 -1
  84. package/lib/module/components/AppIcon/catalog/bulk/n.g.js +1 -1
  85. package/lib/module/components/AppIcon/catalog/bulk/o.g.js +1 -1
  86. package/lib/module/components/AppIcon/catalog/bulk/p.g.js +1 -1
  87. package/lib/module/components/AppIcon/catalog/bulk/q.g.js +1 -1
  88. package/lib/module/components/AppIcon/catalog/bulk/r.g.js +1 -1
  89. package/lib/module/components/AppIcon/catalog/bulk/s.g.js +1 -1
  90. package/lib/module/components/AppIcon/catalog/bulk/t.g.js +1 -1
  91. package/lib/module/components/AppIcon/catalog/bulk/u.g.js +1 -1
  92. package/lib/module/components/AppIcon/catalog/bulk/v.g.js +1 -1
  93. package/lib/module/components/AppIcon/catalog/bulk/w.g.js +1 -1
  94. package/lib/module/components/AppIcon/catalog/bulk/x.g.js +1 -1
  95. package/lib/module/components/AppIcon/catalog/bulk/y.g.js +1 -1
  96. package/lib/module/components/AppIcon/catalog/bulk/z.g.js +1 -1
  97. package/lib/module/components/AppIcon/catalog/linear/a.g.js +1 -1
  98. package/lib/module/components/AppIcon/catalog/linear/b.g.js +1 -1
  99. package/lib/module/components/AppIcon/catalog/linear/c.g.js +1 -1
  100. package/lib/module/components/AppIcon/catalog/linear/d.g.js +1 -1
  101. package/lib/module/components/AppIcon/catalog/linear/e.g.js +1 -1
  102. package/lib/module/components/AppIcon/catalog/linear/f.g.js +1 -1
  103. package/lib/module/components/AppIcon/catalog/linear/g.g.js +1 -1
  104. package/lib/module/components/AppIcon/catalog/linear/h.g.js +1 -1
  105. package/lib/module/components/AppIcon/catalog/linear/i.g.js +1 -1
  106. package/lib/module/components/AppIcon/catalog/linear/j.g.js +1 -1
  107. package/lib/module/components/AppIcon/catalog/linear/k.g.js +1 -1
  108. package/lib/module/components/AppIcon/catalog/linear/l.g.js +1 -1
  109. package/lib/module/components/AppIcon/catalog/linear/m.g.js +1 -1
  110. package/lib/module/components/AppIcon/catalog/linear/n.g.js +1 -1
  111. package/lib/module/components/AppIcon/catalog/linear/o.g.js +1 -1
  112. package/lib/module/components/AppIcon/catalog/linear/p.g.js +1 -1
  113. package/lib/module/components/AppIcon/catalog/linear/q.g.js +1 -1
  114. package/lib/module/components/AppIcon/catalog/linear/r.g.js +1 -1
  115. package/lib/module/components/AppIcon/catalog/linear/s.g.js +1 -1
  116. package/lib/module/components/AppIcon/catalog/linear/t.g.js +1 -1
  117. package/lib/module/components/AppIcon/catalog/linear/u.g.js +1 -1
  118. package/lib/module/components/AppIcon/catalog/linear/v.g.js +1 -1
  119. package/lib/module/components/AppIcon/catalog/linear/w.g.js +1 -1
  120. package/lib/module/components/AppIcon/catalog/linear/x.g.js +1 -1
  121. package/lib/module/components/AppIcon/catalog/linear/y.g.js +1 -1
  122. package/lib/module/components/AppIcon/catalog/linear/z.g.js +1 -1
  123. package/lib/module/components/AppIcon/catalog/outline/a.g.js +1 -1
  124. package/lib/module/components/AppIcon/catalog/outline/b.g.js +1 -1
  125. package/lib/module/components/AppIcon/catalog/outline/c.g.js +1 -1
  126. package/lib/module/components/AppIcon/catalog/outline/d.g.js +1 -1
  127. package/lib/module/components/AppIcon/catalog/outline/e.g.js +1 -1
  128. package/lib/module/components/AppIcon/catalog/outline/f.g.js +1 -1
  129. package/lib/module/components/AppIcon/catalog/outline/g.g.js +1 -1
  130. package/lib/module/components/AppIcon/catalog/outline/h.g.js +1 -1
  131. package/lib/module/components/AppIcon/catalog/outline/i.g.js +1 -1
  132. package/lib/module/components/AppIcon/catalog/outline/j.g.js +1 -1
  133. package/lib/module/components/AppIcon/catalog/outline/k.g.js +1 -1
  134. package/lib/module/components/AppIcon/catalog/outline/l.g.js +1 -1
  135. package/lib/module/components/AppIcon/catalog/outline/m.g.js +1 -1
  136. package/lib/module/components/AppIcon/catalog/outline/n.g.js +1 -1
  137. package/lib/module/components/AppIcon/catalog/outline/o.g.js +1 -1
  138. package/lib/module/components/AppIcon/catalog/outline/p.g.js +1 -1
  139. package/lib/module/components/AppIcon/catalog/outline/q.g.js +1 -1
  140. package/lib/module/components/AppIcon/catalog/outline/r.g.js +1 -1
  141. package/lib/module/components/AppIcon/catalog/outline/s.g.js +1 -1
  142. package/lib/module/components/AppIcon/catalog/outline/t.g.js +1 -1
  143. package/lib/module/components/AppIcon/catalog/outline/u.g.js +1 -1
  144. package/lib/module/components/AppIcon/catalog/outline/v.g.js +1 -1
  145. package/lib/module/components/AppIcon/catalog/outline/w.g.js +1 -1
  146. package/lib/module/components/AppIcon/catalog/outline/x.g.js +1 -1
  147. package/lib/module/components/AppIcon/catalog/outline/y.g.js +1 -1
  148. package/lib/module/components/AppIcon/catalog/outline/z.g.js +1 -1
  149. package/lib/module/components/AppIcon/catalog/twotone/a.g.js +1 -1
  150. package/lib/module/components/AppIcon/catalog/twotone/b.g.js +1 -1
  151. package/lib/module/components/AppIcon/catalog/twotone/c.g.js +1 -1
  152. package/lib/module/components/AppIcon/catalog/twotone/d.g.js +1 -1
  153. package/lib/module/components/AppIcon/catalog/twotone/e.g.js +1 -1
  154. package/lib/module/components/AppIcon/catalog/twotone/f.g.js +1 -1
  155. package/lib/module/components/AppIcon/catalog/twotone/g.g.js +1 -1
  156. package/lib/module/components/AppIcon/catalog/twotone/h.g.js +1 -1
  157. package/lib/module/components/AppIcon/catalog/twotone/i.g.js +1 -1
  158. package/lib/module/components/AppIcon/catalog/twotone/j.g.js +1 -1
  159. package/lib/module/components/AppIcon/catalog/twotone/k.g.js +1 -1
  160. package/lib/module/components/AppIcon/catalog/twotone/l.g.js +1 -1
  161. package/lib/module/components/AppIcon/catalog/twotone/m.g.js +1 -1
  162. package/lib/module/components/AppIcon/catalog/twotone/n.g.js +1 -1
  163. package/lib/module/components/AppIcon/catalog/twotone/o.g.js +1 -1
  164. package/lib/module/components/AppIcon/catalog/twotone/p.g.js +1 -1
  165. package/lib/module/components/AppIcon/catalog/twotone/q.g.js +1 -1
  166. package/lib/module/components/AppIcon/catalog/twotone/r.g.js +1 -1
  167. package/lib/module/components/AppIcon/catalog/twotone/s.g.js +1 -1
  168. package/lib/module/components/AppIcon/catalog/twotone/t.g.js +1 -1
  169. package/lib/module/components/AppIcon/catalog/twotone/u.g.js +1 -1
  170. package/lib/module/components/AppIcon/catalog/twotone/v.g.js +1 -1
  171. package/lib/module/components/AppIcon/catalog/twotone/w.g.js +1 -1
  172. package/lib/module/components/AppIcon/catalog/twotone/x.g.js +1 -1
  173. package/lib/module/components/AppIcon/catalog/twotone/y.g.js +1 -1
  174. package/lib/module/components/AppIcon/catalog/twotone/z.g.js +1 -1
  175. package/lib/module/components/AppIcon/catalog.g.js +1 -1
  176. package/lib/module/components/AppIcon/defaultIcons.js +1 -1
  177. package/lib/module/components/AppIcon/glyphs.g.js +1 -1
  178. package/lib/module/components/AppIcon/index.js +1 -1
  179. package/lib/module/components/AppIcon/slotIcon.js +1 -1
  180. package/lib/module/components/AppIcon/variants.g.js +1 -1
  181. package/lib/module/components/AsyncBlock/AsyncBlock.js +1 -1
  182. package/lib/module/components/AsyncBlock/index.js +1 -1
  183. package/lib/module/components/AuthedImage/AuthedImage.js +1 -1
  184. package/lib/module/components/AuthedImage/authedImageCache.js +1 -1
  185. package/lib/module/components/AuthedImage/index.js +1 -1
  186. package/lib/module/components/Autocomplete/Autocomplete.js +1 -1
  187. package/lib/module/components/Autocomplete/index.js +1 -1
  188. package/lib/module/components/Avatar/Avatar.js +1 -1
  189. package/lib/module/components/Avatar/index.js +1 -1
  190. package/lib/module/components/Badge/Badge.js +1 -1
  191. package/lib/module/components/Badge/index.js +1 -1
  192. package/lib/module/components/Banner/Banner.js +1 -1
  193. package/lib/module/components/Banner/index.js +1 -1
  194. package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
  195. package/lib/module/components/BottomNavigation/index.js +1 -1
  196. package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
  197. package/lib/module/components/BottomSheet/index.js +1 -1
  198. package/lib/module/components/Box/Box.js +1 -1
  199. package/lib/module/components/Box/index.js +1 -1
  200. package/lib/module/components/Button/Button.js +1 -1
  201. package/lib/module/components/Button/index.js +1 -1
  202. package/lib/module/components/Card/Card.js +1 -1
  203. package/lib/module/components/Card/index.js +1 -1
  204. package/lib/module/components/Carousel/Carousel.js +1 -1
  205. package/lib/module/components/Carousel/index.js +1 -1
  206. package/lib/module/components/Checkbox/Checkbox.js +1 -1
  207. package/lib/module/components/Checkbox/index.js +1 -1
  208. package/lib/module/components/Chip/Chip.js +1 -1
  209. package/lib/module/components/Chip/index.js +1 -1
  210. package/lib/module/components/ChoiceGroup/ChoiceGroup.js +1 -1
  211. package/lib/module/components/ChoiceGroup/index.js +1 -1
  212. package/lib/module/components/Confetti/Confetti.js +1 -1
  213. package/lib/module/components/Confetti/index.js +1 -1
  214. package/lib/module/components/DatePicker/DatePicker.js +1 -1
  215. package/lib/module/components/DatePicker/index.js +1 -1
  216. package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
  217. package/lib/module/components/DateRangePicker/index.js +1 -1
  218. package/lib/module/components/DecimalInput/DecimalInput.js +1 -1
  219. package/lib/module/components/DecimalInput/index.js +1 -1
  220. package/lib/module/components/Descriptions/Descriptions.js +1 -1
  221. package/lib/module/components/Descriptions/index.js +1 -1
  222. package/lib/module/components/Dialog/Dialog.js +1 -1
  223. package/lib/module/components/Dialog/index.js +1 -1
  224. package/lib/module/components/Divider/Divider.js +1 -1
  225. package/lib/module/components/Divider/index.js +1 -1
  226. package/lib/module/components/Drawer/Drawer.js +1 -1
  227. package/lib/module/components/Drawer/index.js +1 -1
  228. package/lib/module/components/EmptyState/EmptyState.js +1 -1
  229. package/lib/module/components/EmptyState/index.js +1 -1
  230. package/lib/module/components/ErrorBoundary/ErrorBoundary.js +1 -1
  231. package/lib/module/components/ErrorBoundary/index.js +1 -1
  232. package/lib/module/components/ErrorBoundary/useErrorHandler.js +1 -1
  233. package/lib/module/components/ErrorBoundary/withErrorBoundary.js +1 -1
  234. package/lib/module/components/FieldBase/Chevron.js +1 -1
  235. package/lib/module/components/FieldBase/ChoiceText.js +1 -1
  236. package/lib/module/components/FieldBase/FieldBase.js +1 -1
  237. package/lib/module/components/FieldBase/index.js +1 -1
  238. package/lib/module/components/FieldBase/useFloatingLabel.js +1 -1
  239. package/lib/module/components/FilePicker/FilePicker.js +1 -1
  240. package/lib/module/components/FilePicker/index.js +1 -1
  241. package/lib/module/components/FileViewer/FileViewer.js +1 -1
  242. package/lib/module/components/FileViewer/index.js +1 -1
  243. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
  244. package/lib/module/components/FloatingActionButton/index.js +1 -1
  245. package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
  246. package/lib/module/components/ForceUpdateDialog/index.js +1 -1
  247. package/lib/module/components/FormField/FormField.js +1 -1
  248. package/lib/module/components/FormField/index.js +1 -1
  249. package/lib/module/components/IconBadge/IconBadge.js +1 -1
  250. package/lib/module/components/IconBadge/index.js +1 -1
  251. package/lib/module/components/IconButton/IconButton.js +1 -1
  252. package/lib/module/components/IconButton/index.js +1 -1
  253. package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
  254. package/lib/module/components/ImageGallery/index.js +1 -1
  255. package/lib/module/components/InlineSelect/InlineSelect.js +1 -1
  256. package/lib/module/components/InlineSelect/index.js +1 -1
  257. package/lib/module/components/Input/Input.js +1 -1
  258. package/lib/module/components/Input/index.js +1 -1
  259. package/lib/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
  260. package/lib/module/components/KeyboardAwareScrollView/index.js +1 -1
  261. package/lib/module/components/KeyboardToolbar/KeyboardToolbar.js +1 -1
  262. package/lib/module/components/KeyboardToolbar/index.js +1 -1
  263. package/lib/module/components/ListItem/ListItem.js +1 -1
  264. package/lib/module/components/ListItem/index.js +1 -1
  265. package/lib/module/components/LoaderOverlay/LoaderOverlay.js +1 -1
  266. package/lib/module/components/LoaderOverlay/index.js +1 -1
  267. package/lib/module/components/Markdown/Markdown.js +1 -1
  268. package/lib/module/components/Markdown/index.js +1 -1
  269. package/lib/module/components/Markdown/parse.js +1 -1
  270. package/lib/module/components/Modal/Modal.js +1 -1
  271. package/lib/module/components/Modal/index.js +1 -1
  272. package/lib/module/components/Notation/Notation.js +1 -1
  273. package/lib/module/components/Notation/index.js +1 -1
  274. package/lib/module/components/NumberInput/NumberInput.js +1 -1
  275. package/lib/module/components/NumberInput/index.js +1 -1
  276. package/lib/module/components/OTPInput/OTPInput.js +1 -1
  277. package/lib/module/components/OTPInput/index.js +1 -1
  278. package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
  279. package/lib/module/components/OptionSheet/index.js +1 -1
  280. package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  281. package/lib/module/components/PhoneNumberInput/index.js +1 -1
  282. package/lib/module/components/PickerTrigger/PickerTrigger.js +1 -1
  283. package/lib/module/components/PickerTrigger/index.js +1 -1
  284. package/lib/module/components/ProfileCompletion/ProfileCompletion.js +1 -1
  285. package/lib/module/components/ProfileCompletion/index.js +1 -1
  286. package/lib/module/components/ProfilePicker/ProfilePicker.js +1 -1
  287. package/lib/module/components/ProfilePicker/index.js +1 -1
  288. package/lib/module/components/ProgressBar/ProgressBar.js +1 -1
  289. package/lib/module/components/ProgressBar/index.js +1 -1
  290. package/lib/module/components/ProgressRing/ProgressRing.js +1 -1
  291. package/lib/module/components/ProgressRing/index.js +1 -1
  292. package/lib/module/components/Radio/Radio.js +1 -1
  293. package/lib/module/components/Radio/RadioDot.js +1 -1
  294. package/lib/module/components/Radio/RadioGroup.js +1 -1
  295. package/lib/module/components/Radio/index.js +1 -1
  296. package/lib/module/components/Rating/Rating.js +1 -1
  297. package/lib/module/components/Rating/index.js +1 -1
  298. package/lib/module/components/Repeater/Repeater.js +1 -1
  299. package/lib/module/components/Repeater/index.js +1 -1
  300. package/lib/module/components/RichTextEditor/RichTextEditor.js +1 -1
  301. package/lib/module/components/RichTextEditor/index.js +1 -1
  302. package/lib/module/components/RichTextEditor/markdownActions.js +1 -1
  303. package/lib/module/components/SearchBar/SearchBar.js +1 -1
  304. package/lib/module/components/SearchBar/index.js +1 -1
  305. package/lib/module/components/SectionHeader/SectionHeader.js +1 -1
  306. package/lib/module/components/SectionHeader/index.js +1 -1
  307. package/lib/module/components/SegmentedControl/SegmentedControl.js +1 -1
  308. package/lib/module/components/SegmentedControl/index.js +1 -1
  309. package/lib/module/components/Select/Select.js +1 -1
  310. package/lib/module/components/Select/index.js +1 -1
  311. package/lib/module/components/Skeleton/Skeleton.js +1 -1
  312. package/lib/module/components/Skeleton/SkeletonClock.js +1 -1
  313. package/lib/module/components/Skeleton/SkeletonContent.js +1 -1
  314. package/lib/module/components/Skeleton/SkeletonList.js +1 -1
  315. package/lib/module/components/Skeleton/SkeletonProvider.js +1 -1
  316. package/lib/module/components/Skeleton/SkeletonSkip.js +1 -1
  317. package/lib/module/components/Skeleton/index.js +1 -1
  318. package/lib/module/components/SlideToConfirm/SlideToConfirm.js +1 -1
  319. package/lib/module/components/SlideToConfirm/index.js +1 -1
  320. package/lib/module/components/Slider/Slider.js +1 -1
  321. package/lib/module/components/Slider/index.js +1 -1
  322. package/lib/module/components/Slider/valueText.js +1 -1
  323. package/lib/module/components/SliderField/SliderField.js +1 -1
  324. package/lib/module/components/SliderField/index.js +1 -1
  325. package/lib/module/components/Spinner/Spinner.js +1 -1
  326. package/lib/module/components/Spinner/index.js +1 -1
  327. package/lib/module/components/SquircleFill/SquircleFill.js +1 -1
  328. package/lib/module/components/StatTile/StatTile.js +1 -1
  329. package/lib/module/components/StatTile/index.js +1 -1
  330. package/lib/module/components/StatusBadge/StatusBadge.js +1 -1
  331. package/lib/module/components/StatusBadge/index.js +1 -1
  332. package/lib/module/components/Stepper/Stepper.js +1 -1
  333. package/lib/module/components/Stepper/index.js +1 -1
  334. package/lib/module/components/Swipeable/Swipeable.js +1 -1
  335. package/lib/module/components/Swipeable/index.js +1 -1
  336. package/lib/module/components/Switch/Switch.js +1 -1
  337. package/lib/module/components/Switch/index.js +1 -1
  338. package/lib/module/components/Tabs/Tabs.js +1 -1
  339. package/lib/module/components/Tabs/index.js +1 -1
  340. package/lib/module/components/TagInput/TagInput.js +1 -1
  341. package/lib/module/components/TagInput/index.js +1 -1
  342. package/lib/module/components/Text/Text.js +1 -1
  343. package/lib/module/components/Text/index.js +1 -1
  344. package/lib/module/components/TimePicker/TimePicker.js +1 -1
  345. package/lib/module/components/TimePicker/index.js +1 -1
  346. package/lib/module/components/Timeline/Timeline.js +1 -1
  347. package/lib/module/components/Timeline/index.js +1 -1
  348. package/lib/module/components/Toast/Toast.js +1 -1
  349. package/lib/module/components/Toast/ToastProvider.js +1 -1
  350. package/lib/module/components/Toast/index.js +1 -1
  351. package/lib/module/components/Tooltip/Tooltip.js +1 -1
  352. package/lib/module/components/Tooltip/index.js +1 -1
  353. package/lib/module/components/Tour/Tour.js +1 -1
  354. package/lib/module/components/Tour/index.js +1 -1
  355. package/lib/module/components/ZoomableImage/ZoomableImage.js +1 -1
  356. package/lib/module/components/ZoomableImage/index.js +1 -1
  357. package/lib/module/components/index.js +1 -1
  358. package/lib/module/form/FormContext.js +1 -1
  359. package/lib/module/form/HookFormField.js +1 -1
  360. package/lib/module/form/equal.js +1 -1
  361. package/lib/module/form/index.js +1 -1
  362. package/lib/module/form/path.js +1 -1
  363. package/lib/module/form/rules.js +1 -1
  364. package/lib/module/form/types.js +1 -0
  365. package/lib/module/form/useField.js +1 -1
  366. package/lib/module/form/useForm.js +1 -1
  367. package/lib/module/form/useFormCompletion.js +1 -1
  368. package/lib/module/form/useHookFormField.js +1 -1
  369. package/lib/module/hooks/index.js +1 -1
  370. package/lib/module/hooks/useControllableState.js +1 -1
  371. package/lib/module/hooks/useDebounce.js +1 -1
  372. package/lib/module/hooks/useDragToDismiss.js +1 -1
  373. package/lib/module/hooks/useFlickGuard.js +1 -1
  374. package/lib/module/hooks/usePressAnimation.js +1 -1
  375. package/lib/module/hooks/useReducedMotion.js +1 -1
  376. package/lib/module/hooks/useToggle.js +1 -1
  377. package/lib/module/index.js +1 -1
  378. package/lib/module/initUI.js +1 -1
  379. package/lib/module/network/NetworkStatusBanner.js +1 -1
  380. package/lib/module/network/index.js +1 -1
  381. package/lib/module/specs/NativePdfRasterizer.js +1 -1
  382. package/lib/module/theme/Gradient.js +1 -1
  383. package/lib/module/theme/ThemeContext.js +1 -1
  384. package/lib/module/theme/animatedValue.js +1 -1
  385. package/lib/module/theme/index.js +1 -1
  386. package/lib/module/theme/merge.js +1 -1
  387. package/lib/module/theme/textStyle.js +1 -1
  388. package/lib/module/theme/tokens.js +1 -1
  389. package/lib/module/theme/types.js +1 -1
  390. package/lib/module/utils/color.js +1 -1
  391. package/lib/module/utils/corners.js +1 -1
  392. package/lib/module/utils/dimensions.js +1 -1
  393. package/lib/module/utils/feedback.js +1 -1
  394. package/lib/module/utils/hapticUtils.js +1 -1
  395. package/lib/module/utils/hashString.js +1 -1
  396. package/lib/module/utils/index.js +1 -1
  397. package/lib/module/utils/mergeRefs.js +1 -1
  398. package/lib/module/utils/responsive.js +1 -1
  399. package/lib/module/utils/shadows.js +1 -1
  400. package/lib/module/utils/spacing.js +1 -1
  401. package/lib/module/utils/squircle.js +1 -1
  402. package/lib/module/utils/warnUnknownProps.js +1 -1
  403. package/lib/typescript/commonjs/components/Button/Button.d.ts +5 -0
  404. package/lib/typescript/module/components/Button/Button.d.ts +5 -0
  405. package/package.json +2 -2
@@ -1 +1 @@
1
- const isPlainObject=r=>{if(null===r||"object"!=typeof r)return!1;const e=Object.getPrototypeOf(r);return e===Object.prototype||null===e};export const valuesEqual=(r,e)=>{if(Object.is(r,e))return!0;if(r instanceof Date&&e instanceof Date)return r.getTime()===e.getTime();if(Array.isArray(r)||Array.isArray(e)){if(!Array.isArray(r)||!Array.isArray(e)||r.length!==e.length)return!1;for(let t=0;t<r.length;t+=1)if(!valuesEqual(r[t],e[t]))return!1;return!0}if(!isPlainObject(r)||!isPlainObject(e))return!1;const t=Object.keys(r).filter(e=>void 0!==r[e]),n=Object.keys(e).filter(r=>void 0!==e[r]);if(t.length!==n.length)return!1;for(const n of t)if(!valuesEqual(r[n],e[n]))return!1;return!0};
1
+ "use strict";const isPlainObject=t=>{if(null===t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||null===e};export const valuesEqual=(t,e)=>{if(Object.is(t,e))return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r+=1)if(!valuesEqual(t[r],e[r]))return!1;return!0}if(!isPlainObject(t)||!isPlainObject(e))return!1;const r=Object.keys(t).filter(e=>void 0!==t[e]),n=Object.keys(e).filter(t=>void 0!==e[t]);if(r.length!==n.length)return!1;for(const n of r)if(!valuesEqual(t[n],e[n]))return!1;return!0};
@@ -1 +1 @@
1
- export{Form,useFormContext,useOptionalFormContext}from"./FormContext.js";export{HookFormField}from"./HookFormField.js";export{deletePath,getPath,setPath}from"./path.js";import*as o from"./rules.js";export{useField,useFieldArray}from"./useField.js";export{useForm}from"./useForm.js";export{isFieldFilled,useFormCompletion}from"./useFormCompletion.js";export{useHookFormField}from"./useHookFormField.js";export{o as rules};
1
+ "use strict";export{Form,useFormContext,useOptionalFormContext}from"./FormContext.js";export{HookFormField}from"./HookFormField.js";export{deletePath,getPath,setPath}from"./path.js";import*as rules from"./rules.js";export{useField,useFieldArray}from"./useField.js";export{useForm}from"./useForm.js";export{isFieldFilled,useFormCompletion}from"./useFormCompletion.js";export{useHookFormField}from"./useHookFormField.js";export{rules};
@@ -1 +1 @@
1
- const tokenize=t=>{const e=[],r=/[^.[\]]+/g;let n;for(;null!==(n=r.exec(t));){const t=n[0];e.push(/^\d+$/.test(t)?Number(t):t)}return e};export const getPath=(t,e)=>{const r=tokenize(e);let n=t;for(const t of r){if(null==n||"object"!=typeof n)return;n=n[t]}return n};export const setPath=(t,e,r)=>{const n=tokenize(e);if(0===n.length)return t;const o=Array.isArray(t)?[...t]:{...t};let s=o;for(let t=0;t<n.length-1;t++){const e=n[t],r=n[t+1],o=s[e],l=null!=o&&"object"==typeof o?Array.isArray(o)?[...o]:{...o}:"number"==typeof r?[]:{};s[e]=l,s=l}return s[n[n.length-1]]=r,o};export const deletePath=(t,e)=>{const r=tokenize(e);if(0===r.length)return t;const n=Array.isArray(t)?[...t]:{...t};let o=n;for(let t=0;t<r.length-1;t++){const e=r[t],s=o[e];if(null==s||"object"!=typeof s)return n;const l=Array.isArray(s)?[...s]:{...s};o[e]=l,o=l}const s=r[r.length-1];return Array.isArray(o)&&"number"==typeof s?o.splice(s,1):delete o[s],n};
1
+ "use strict";const tokenize=t=>{const e=[],r=/[^.[\]]+/g;let n;for(;null!==(n=r.exec(t));){const t=n[0];e.push(/^\d+$/.test(t)?Number(t):t)}return e};export const getPath=(t,e)=>{const r=tokenize(e);let n=t;for(const t of r){if(null==n||"object"!=typeof n)return;n=n[t]}return n};export const setPath=(t,e,r)=>{const n=tokenize(e);if(0===n.length)return t;const o=Array.isArray(t)?[...t]:{...t};let s=o;for(let t=0;t<n.length-1;t++){const e=n[t],r=n[t+1],o=s[e],l=null!=o&&"object"==typeof o?Array.isArray(o)?[...o]:{...o}:"number"==typeof r?[]:{};s[e]=l,s=l}return s[n[n.length-1]]=r,o};export const deletePath=(t,e)=>{const r=tokenize(e);if(0===r.length)return t;const n=Array.isArray(t)?[...t]:{...t};let o=n;for(let t=0;t<r.length-1;t++){const e=r[t],s=o[e];if(null==s||"object"!=typeof s)return n;const l=Array.isArray(s)?[...s]:{...s};o[e]=l,o=l}const s=r[r.length-1];return Array.isArray(o)&&"number"==typeof s?o.splice(s,1):delete o[s],n};
@@ -1 +1 @@
1
- import{isAadhaar as t,isAlphanumeric as e,isEmail as o,isGstin as r,isIfsc as n,isIndianMobile as a,isIndianPincode as i,isInteger as s,isNumeric as c,isPan as d,isPhone as l,isStrongPassword as p,isUrl as m}from"@webority/mobile-core";import{getPath as v}from"./path.js";const isEmptyValue=t=>null==t||""===t||Array.isArray(t)&&0===t.length,fromPredicate=(t,e)=>o=>r=>isEmptyValue(r)||t(r)?void 0:o??e;export const required=(t="This field is required")=>e=>"boolean"==typeof e?e?void 0:t:isEmptyValue(e)?t:void 0;export const email=fromPredicate(o,"Enter a valid email");export const mobile=fromPredicate(a,"Enter a valid mobile number");export const phone=fromPredicate(l,"Enter a valid phone number");export const url=fromPredicate(m,"Enter a valid URL");export const numeric=fromPredicate(c,"Enter a valid number");export const integer=fromPredicate(s,"Enter a whole number");export const alphanumeric=fromPredicate(e,"Use letters and numbers only");export const pincode=fromPredicate(i,"Enter a valid 6-digit PIN code");export const pan=fromPredicate(d,"Enter a valid PAN");export const gstin=fromPredicate(r,"Enter a valid GSTIN");export const aadhaar=fromPredicate(t,"Enter a valid Aadhaar number");export const ifsc=fromPredicate(n,"Enter a valid IFSC code");export const minLength=(t,e)=>o=>isEmptyValue(o)||String(o).length>=t?void 0:e??`Must be at least ${t} characters`;export const maxLength=(t,e)=>o=>null==o||String(o).length<=t?void 0:e??`Must be at most ${t} characters`;export const min=(t,e)=>o=>isEmptyValue(o)||Number(o)>=t?void 0:e??`Must be at least ${t}`;export const max=(t,e)=>o=>isEmptyValue(o)||Number(o)<=t?void 0:e??`Must be at most ${t}`;export const pattern=(t,e="Invalid format")=>o=>isEmptyValue(o)||t.test(String(o))?void 0:e;export const oneOf=(t,e="Invalid selection")=>o=>isEmptyValue(o)||t.includes(o)?void 0:e;export const matches=(t,e="Values do not match")=>(o,r)=>o===v(r,t)?void 0:e;export const strongPassword=(t,e="Password is too weak")=>o=>isEmptyValue(o)||p(o,t)?void 0:e;export const custom=(t,e="Invalid value")=>async(o,r)=>{const n=await t(o,r);if(!0!==n)return!1===n?e:n};
1
+ "use strict";import{isAadhaar,isAlphanumeric,isEmail,isGstin,isIfsc,isIndianMobile,isIndianPincode,isInteger,isNumeric,isPan,isPhone,isStrongPassword,isUrl}from"@webority/mobile-core";import{getPath}from"./path.js";const isEmptyValue=e=>null==e||""===e||Array.isArray(e)&&0===e.length,fromPredicate=(e,t)=>i=>r=>isEmptyValue(r)||e(r)?void 0:i??t;export const required=(e="This field is required")=>t=>"boolean"==typeof t?t?void 0:e:isEmptyValue(t)?e:void 0;export const email=fromPredicate(isEmail,"Enter a valid email");export const mobile=fromPredicate(isIndianMobile,"Enter a valid mobile number");export const phone=fromPredicate(isPhone,"Enter a valid phone number");export const url=fromPredicate(isUrl,"Enter a valid URL");export const numeric=fromPredicate(isNumeric,"Enter a valid number");export const integer=fromPredicate(isInteger,"Enter a whole number");export const alphanumeric=fromPredicate(isAlphanumeric,"Use letters and numbers only");export const pincode=fromPredicate(isIndianPincode,"Enter a valid 6-digit PIN code");export const pan=fromPredicate(isPan,"Enter a valid PAN");export const gstin=fromPredicate(isGstin,"Enter a valid GSTIN");export const aadhaar=fromPredicate(isAadhaar,"Enter a valid Aadhaar number");export const ifsc=fromPredicate(isIfsc,"Enter a valid IFSC code");export const minLength=(e,t)=>i=>isEmptyValue(i)||String(i).length>=e?void 0:t??`Must be at least ${e} characters`;export const maxLength=(e,t)=>i=>null==i||String(i).length<=e?void 0:t??`Must be at most ${e} characters`;export const min=(e,t)=>i=>isEmptyValue(i)||Number(i)>=e?void 0:t??`Must be at least ${e}`;export const max=(e,t)=>i=>isEmptyValue(i)||Number(i)<=e?void 0:t??`Must be at most ${e}`;export const pattern=(e,t="Invalid format")=>i=>isEmptyValue(i)||e.test(String(i))?void 0:t;export const oneOf=(e,t="Invalid selection")=>i=>isEmptyValue(i)||e.includes(i)?void 0:t;export const matches=(e,t="Values do not match")=>(i,r)=>i===getPath(r,e)?void 0:t;export const strongPassword=(e,t="Password is too weak")=>i=>isEmptyValue(i)||isStrongPassword(i,e)?void 0:t;export const custom=(e,t="Invalid value")=>async(i,r)=>{const o=await e(i,r);if(!0!==o)return!1===o?t:o};
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1 +1 @@
1
- import{useFormContext as e}from"./FormContext.js";import{getPath as t}from"./path.js";export function useField(t){return e().getFieldProps(t)}export function useFieldArray(r){const n=e(),i=t(n.values,r)??[],set=e=>n.setFieldValue(r,e);return{fields:i,length:i.length,push:e=>set([...i,e]),remove:e=>set(i.filter((t,r)=>r!==e)),insert:(e,t)=>{const r=[...i];r.splice(e,0,t),set(r)},move:(e,t)=>{if(e<0||e>=i.length)return;const r=[...i],[n]=r.splice(e,1);r.splice(Math.max(0,Math.min(t,r.length)),0,n),set(r)},replace:(e,t)=>{if(e<0||e>=i.length)return;const r=[...i];r[e]=t,set(r)}}}
1
+ "use strict";import{useFormContext}from"./FormContext.js";import{getPath}from"./path.js";export function useField(e){return useFormContext().getFieldProps(e)}export function useFieldArray(e){const t=useFormContext(),r=getPath(t.values,e)??[],set=r=>t.setFieldValue(e,r);return{fields:r,length:r.length,push:e=>set([...r,e]),remove:e=>set(r.filter((t,r)=>r!==e)),insert:(e,t)=>{const n=[...r];n.splice(e,0,t),set(n)},move:(e,t)=>{if(e<0||e>=r.length)return;const n=[...r],[o]=n.splice(e,1);n.splice(Math.max(0,Math.min(t,n.length)),0,o),set(n)},replace:(e,t)=>{if(e<0||e>=r.length)return;const n=[...r];n[e]=t,set(n)}}}
@@ -1 +1 @@
1
- import{useCallback as r,useEffect as e,useMemo as t,useRef as n,useState as u}from"react";import{valuesEqual as c}from"./equal.js";import{getPath as o,setPath as s}from"./path.js";const rulesFor=(r,e)=>{if(!r||"function"==typeof r)return[];const t=r[e];return t?Array.isArray(t)?t:[t]:[]};export function useForm(i){const a=n(i);a.current=i;const l=n(i.initialValues),[f,d]=u(i.initialValues),[v,y]=u({}),[h,m]=u({}),[b,p]=u(!1),[w,g]=u(!1),[V,F]=u(0),O=n({values:f,errors:v,touched:h,submitCount:V});O.current={values:f,errors:v,touched:h,submitCount:V};const j=n(new Map),C=n([]),E=n(null),k=n({values:i.initialValues,version:0});c(i.initialValues,k.current.values)||(k.current={values:i.initialValues,version:k.current.version+1});const S=k.current.version;e(()=>{if(!a.current.enableReinitialize)return;const r=a.current.initialValues;l.current=r,O.current.values=r,O.current.errors={},O.current.touched={},d(r),y({}),m({})},[S]);const x=r(async r=>{const e=a.current.validate,t=O.current.values;if("function"==typeof e){return(await e(t)??{})[r]||void 0}const n=o(t,r);for(const u of rulesFor(e,r)){const r=await u(n,t);if(r)return r}},[]),B=r(async r=>{const e=a.current.validate;if(!e)return{};if("function"==typeof e)return await e(r)??{};const t={};return await Promise.all(Object.keys(e).map(async n=>{const u=o(r,n);for(const c of rulesFor(e,n)){const e=await c(u,r);if(e){t[n]=e;break}}})),t},[]),P=r(async r=>{const e=await x(r);y(t=>{if(t[r]===e)return t;const n={...t};return e?n[r]=e:delete n[r],O.current.errors=n,n})},[x]),A=r(async()=>{g(!0);const r=await B(O.current.values);return g(!1),O.current.errors=r,y(r),r},[B]),T=r((r,e,t)=>{const n=s(O.current.values,r,e);O.current.values=n,d(n);const u=a.current,c=Boolean(O.current.errors[r])&&"blur"===u.revalidateOn;(t??(!c&&(O.current.touched[r]||O.current.submitCount>0||"change"===u.validateOn)))&&P(r)},[P]),q=r(r=>{m(e=>{if(e[r])return e;const t={...e,[r]:!0};return O.current.touched=t,t}),P(r)},[P]),z=r((r,e=!0,t)=>{const n={...O.current.touched,[r]:e};O.current.touched=n,m(n),(t??e)&&P(r)},[P]),M=r((r,e)=>{y(t=>{const n={...t};return e?n[r]=e:delete n[r],O.current.errors=n,n})},[]),N=r(r=>{O.current.errors=r,y(r)},[]),R=r((r,e)=>{const t="function"==typeof r?r(O.current.values):{...O.current.values,...r};O.current.values=t,d(t),e&&A()},[A]),D=r(r=>{const e=r?{...l.current,...r}:l.current;l.current=e,O.current.values=e,O.current.errors={},O.current.touched={},O.current.submitCount=0,d(e),y({}),m({}),F(0)},[]),G=r((r,e)=>{e?(j.current.set(r,e),C.current.includes(r)||C.current.push(r)):(j.current.delete(r),C.current=C.current.filter(e=>e!==r))},[]),H=r(r=>{E.current=r},[]),I=r(r=>{const e=C.current,t=E.current,n=t?e.indexOf(t):-1,u=e[n+r];u&&(E.current=u,j.current.get(u)?.focus?.())},[]),J=r(()=>I(1),[I]),K=r(()=>I(-1),[I]),L=t(()=>({setErrors:N,setFieldError:M,reset:D,setSubmitting:p}),[N,M,D]),Q=r(()=>{(async()=>{const r=a.current,e=O.current.values;O.current.submitCount+=1,F(r=>r+1),g(!0);const t=await B(e);g(!1);const n=new Set([...C.current,...Object.keys(t)]),u={...O.current.touched};n.forEach(r=>{u[r]=!0}),O.current.touched=u,O.current.errors=t,m(u),y(t);const c=C.current.find(r=>t[r])??Object.keys(t).find(r=>t[r]);if(c)j.current.get(c)?.focus?.();else{p(!0);try{await r.onSubmit(e,L)}finally{p(!1)}}})()},[B,L]),U=t(()=>{const r={};for(const e of Object.keys(v))v[e]&&(h[e]||V>0)&&(r[e]=v[e]);return r},[v,h,V]),W=t(()=>{const r=a.current.validate;if(!r)return!0;if("function"==typeof r)return Object.values(v).every(r=>!r);for(const e of Object.keys(r)){const t=o(f,e);for(const n of rulesFor(r,e)){const r=n(t,f);if("string"==typeof r&&r)return!1}}return!0},[f,v]),X=t(()=>!c(f,l.current),[f]);return{values:f,errors:U,rawErrors:v,touched:h,dirty:X,isValid:W,isSubmitting:b,isValidating:w,submitCount:V,setFieldValue:T,setFieldTouched:z,setFieldError:M,setValues:R,setErrors:N,reset:D,validate:A,validateField:x,submit:Q,handleBlur:q,focusNext:J,focusPrev:K,registerField:G,getFieldState:r=>{const e=o(f,r),t=v[r],n=!!h[r];return{value:e,error:n||V>0?t:void 0,rawError:t,touched:n,dirty:!c(e,o(l.current,r))}},getFieldProps:r=>({name:r,value:o(f,r),error:h[r]||V>0?v[r]:void 0,touched:!!h[r],onChange:e=>T(r,e),onChangeText:e=>T(r,e),onBlur:()=>q(r),onFocus:()=>H(r),setValue:(e,t)=>T(r,e,t)})}}
1
+ "use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{valuesEqual}from"./equal.js";import{getPath,setPath}from"./path.js";const rulesFor=(e,r)=>{if(!e||"function"==typeof e)return[];const t=e[r];return t?Array.isArray(t)?t:[t]:[]};export function useForm(e){const r=useRef(e);r.current=e;const t=useRef(e.initialValues),[u,n]=useState(e.initialValues),[s,c]=useState({}),[a,o]=useState({}),[l,i]=useState(!1),[f,d]=useState(!1),[v,b]=useState(0),h=useRef({values:u,errors:s,touched:a,submitCount:v});h.current={values:u,errors:s,touched:a,submitCount:v};const C=useRef(new Map),m=useRef([]),k=useRef(null),y=useRef({values:e.initialValues,version:0});valuesEqual(e.initialValues,y.current.values)||(y.current={values:e.initialValues,version:y.current.version+1});const g=y.current.version;useEffect(()=>{if(!r.current.enableReinitialize)return;const e=r.current.initialValues;t.current=e,h.current.values=e,h.current.errors={},h.current.touched={},n(e),c({}),o({})},[g]);const p=useCallback(async e=>{const t=r.current.validate,u=h.current.values;if("function"==typeof t){return(await t(u)??{})[e]||void 0}const n=getPath(u,e);for(const r of rulesFor(t,e)){const e=await r(n,u);if(e)return e}},[]),F=useCallback(async e=>{const t=r.current.validate;if(!t)return{};if("function"==typeof t)return await t(e)??{};const u={};return await Promise.all(Object.keys(t).map(async r=>{const n=getPath(e,r);for(const s of rulesFor(t,r)){const t=await s(n,e);if(t){u[r]=t;break}}})),u},[]),w=useCallback(async e=>{const r=await p(e);c(t=>{if(t[e]===r)return t;const u={...t};return r?u[e]=r:delete u[e],h.current.errors=u,u})},[p]),E=useCallback(async()=>{d(!0);const e=await F(h.current.values);return d(!1),h.current.errors=e,c(e),e},[F]),P=useCallback((e,t,u)=>{const s=setPath(h.current.values,e,t);h.current.values=s,n(s);const c=r.current,a=Boolean(h.current.errors[e])&&"blur"===c.revalidateOn;(u??(!a&&(h.current.touched[e]||h.current.submitCount>0||"change"===c.validateOn)))&&w(e)},[w]),S=useCallback(e=>{o(r=>{if(r[e])return r;const t={...r,[e]:!0};return h.current.touched=t,t}),w(e)},[w]),V=useCallback((e,r=!0,t)=>{const u={...h.current.touched,[e]:r};h.current.touched=u,o(u),(t??r)&&w(e)},[w]),O=useCallback((e,r)=>{c(t=>{const u={...t};return r?u[e]=r:delete u[e],h.current.errors=u,u})},[]),R=useCallback(e=>{h.current.errors=e,c(e)},[]),j=useCallback((e,r)=>{const t="function"==typeof e?e(h.current.values):{...h.current.values,...e};h.current.values=t,n(t),r&&E()},[E]),M=useCallback(e=>{const r=e?{...t.current,...e}:t.current;t.current=r,h.current.values=r,h.current.errors={},h.current.touched={},h.current.submitCount=0,n(r),c({}),o({}),b(0)},[]),q=useCallback((e,r)=>{r?(C.current.set(e,r),m.current.includes(e)||m.current.push(e)):(C.current.delete(e),m.current=m.current.filter(r=>r!==e))},[]),x=useCallback(e=>{k.current=e},[]),B=useCallback(e=>{const r=m.current,t=k.current,u=t?r.indexOf(t):-1,n=r[u+e];n&&(k.current=n,C.current.get(n)?.focus?.())},[]),A=useCallback(()=>B(1),[B]),T=useCallback(()=>B(-1),[B]),z=useMemo(()=>({setErrors:R,setFieldError:O,reset:M,setSubmitting:i}),[R,O,M]),N=useCallback(()=>{(async()=>{const e=r.current,t=h.current.values;h.current.submitCount+=1,b(e=>e+1),d(!0);const u=await F(t);d(!1);const n=new Set([...m.current,...Object.keys(u)]),s={...h.current.touched};n.forEach(e=>{s[e]=!0}),h.current.touched=s,h.current.errors=u,o(s),c(u);const a=m.current.find(e=>u[e])??Object.keys(u).find(e=>u[e]);if(a)C.current.get(a)?.focus?.();else{i(!0);try{await e.onSubmit(t,z)}finally{i(!1)}}})()},[F,z]),D=useMemo(()=>{const e={};for(const r of Object.keys(s))s[r]&&(a[r]||v>0)&&(e[r]=s[r]);return e},[s,a,v]),G=useMemo(()=>{const e=r.current.validate;if(!e)return!0;if("function"==typeof e)return Object.values(s).every(e=>!e);for(const r of Object.keys(e)){const t=getPath(u,r);for(const n of rulesFor(e,r)){const e=n(t,u);if("string"==typeof e&&e)return!1}}return!0},[u,s]),H=useMemo(()=>!valuesEqual(u,t.current),[u]);return{values:u,errors:D,rawErrors:s,touched:a,dirty:H,isValid:G,isSubmitting:l,isValidating:f,submitCount:v,setFieldValue:P,setFieldTouched:V,setFieldError:O,setValues:j,setErrors:R,reset:M,validate:E,validateField:p,submit:N,handleBlur:S,focusNext:A,focusPrev:T,registerField:q,getFieldState:e=>{const r=getPath(u,e),n=s[e],c=!!a[e];return{value:r,error:c||v>0?n:void 0,rawError:n,touched:c,dirty:!valuesEqual(r,getPath(t.current,e))}},getFieldProps:e=>({name:e,value:getPath(u,e),error:a[e]||v>0?s[e]:void 0,touched:!!a[e],onChange:r=>P(e,r),onChangeText:r=>P(e,r),onBlur:()=>S(e),onFocus:()=>x(e),setValue:(r,t)=>P(e,r,t)})}}
@@ -1 +1 @@
1
- import{useMemo as t}from"react";import{getPath as e}from"./path.js";export const isFieldFilled=t=>null!=t&&!1!==t&&("number"==typeof t?!Number.isNaN(t):"string"==typeof t?t.trim().length>0:!Array.isArray(t)||t.length>0);export const useFormCompletion=(r,i,l={})=>{const{isFilled:n}=l,o=i.join("\0");return t(()=>{const t=0===o.length?[]:o.split("\0"),i=t.filter(t=>{const i=e(r,t);return!(n?n(i,t):isFieldFilled(i))}),l=t.length,s=l-i.length,p=0===l?0:s/l;return{progress:p,percent:100*p,filled:s,total:l,missing:i}},[r,o,n])};
1
+ "use strict";import{useMemo}from"react";import{getPath}from"./path.js";export const isFieldFilled=t=>null!=t&&!1!==t&&("number"==typeof t?!Number.isNaN(t):"string"==typeof t?t.trim().length>0:!Array.isArray(t)||t.length>0);export const useFormCompletion=(t,e,r={})=>{const{isFilled:i}=r,s=e.join("\0");return useMemo(()=>{const e=0===s.length?[]:s.split("\0"),r=e.filter(e=>{const r=getPath(t,e);return!(i?i(r,e):isFieldFilled(r))}),l=e.length,o=l-r.length,n=0===l?0:o/l;return{progress:n,percent:100*n,filled:o,total:l,missing:r}},[t,s,i])};
@@ -1 +1 @@
1
- import{useController as e}from"react-hook-form";export function useHookFormField(o){const{field:r,fieldState:n}=e(o);return{name:r.name,value:r.value,error:n.error?.message||void 0,touched:n.isTouched,dirty:n.isDirty,onChange:e=>{r.onChange(e)},onChangeText:e=>{r.onChange(e)},onBlur:()=>{r.onBlur()},ref:r.ref}}
1
+ "use strict";import{useController}from"react-hook-form";export function useHookFormField(e){const{field:o,fieldState:r}=useController(e);return{name:o.name,value:o.value,error:r.error?.message||void 0,touched:r.isTouched,dirty:r.isDirty,onChange:e=>{o.onChange(e)},onChangeText:e=>{o.onChange(e)},onBlur:()=>{o.onBlur()},ref:o.ref}}
@@ -1 +1 @@
1
- export{useControllableState}from"./useControllableState.js";export{useDebounce}from"./useDebounce.js";export{createDragToDismissController,DRAG_DISMISS_DISTANCE,DRAG_DISMISS_VELOCITY,useDragToDismiss}from"./useDragToDismiss.js";export{FLICK_TOLERANCE,useFlickGuard}from"./useFlickGuard.js";export{PRESS_ANIMATION_PRESETS,usePressAnimation}from"./usePressAnimation.js";export{useReducedMotion}from"./useReducedMotion.js";export{useToggle}from"./useToggle.js";
1
+ "use strict";export{useControllableState}from"./useControllableState.js";export{useDebounce}from"./useDebounce.js";export{createDragToDismissController,DRAG_DISMISS_DISTANCE,DRAG_DISMISS_VELOCITY,useDragToDismiss}from"./useDragToDismiss.js";export{FLICK_TOLERANCE,useFlickGuard}from"./useFlickGuard.js";export{PRESS_ANIMATION_PRESETS,usePressAnimation}from"./usePressAnimation.js";export{useReducedMotion}from"./useReducedMotion.js";export{useToggle}from"./useToggle.js";
@@ -1 +1 @@
1
- import{useCallback as e,useRef as t,useState as o}from"react";export function useControllableState({value:r,defaultValue:n,onChange:a}){const u=t(void 0!==r).current,[l,c]=o(n);return[u?r:l,e(e=>{u||c(e),a?.(e)},[u,a])]}
1
+ "use strict";import{useCallback,useRef,useState}from"react";export function useControllableState({value:e,defaultValue:t,onChange:u}){const a=useRef(void 0!==e).current,[l,r]=useState(t);return[a?e:l,useCallback(e=>{a||r(e),u?.(e)},[a,u])]}
@@ -1 +1 @@
1
- import{useEffect as e,useState as t}from"react";export const useDebounce=(o,r=300)=>{const[c,n]=t(o);return e(()=>{const e=setTimeout(()=>n(o),r);return()=>clearTimeout(e)},[o,r]),c};
1
+ "use strict";import{useEffect,useState}from"react";export const useDebounce=(e,t=300)=>{const[s,u]=useState(e);return useEffect(()=>{const s=setTimeout(()=>u(e),t);return()=>clearTimeout(s)},[e,t]),s};
@@ -1 +1 @@
1
- import{useMemo as e}from"react";import{Animated as t,Easing as n}from"react-native";import{Gesture as s}from"react-native-gesture-handler";import{setNativeValue as r,useTheme as a}from"../theme/index.js";export const DRAG_DISMISS_DISTANCE=100;export const DRAG_DISMISS_VELOCITY=.5;export const createDragToDismissController=({drag:e,travel:s,onDismiss:a},o)=>{const{snappy:i}=o.spring,springBack=()=>t.spring(e,{toValue:0,damping:i.damping,stiffness:i.stiffness,mass:i.mass,useNativeDriver:!0}).start();return{move:t=>{r(e,Math.max(0,t))},release:(r,i)=>{r>100||i>.5?t.timing(e,{toValue:"function"==typeof s?s():s,duration:o.duration.fast,easing:n.bezier(...o.easing.accelerate),useNativeDriver:!0}).start(()=>a()):springBack()},cancel:springBack}};export const useDragToDismiss=t=>{const{drag:n,travel:r,onDismiss:o,contentAtTop:i,scrollGesture:l}=t,{motion:c}=a();return e(()=>{const e=createDragToDismissController({drag:n,travel:r,onDismiss:o},c),t=s.Pan().runOnJS(!0).activeOffsetY(6).failOffsetX([-12,12]).onUpdate(t=>e.move(t.translationY)).onEnd(t=>e.release(t.translationY,t.velocityY/1e3)).onFinalize((t,n)=>{n||e.cancel()});let a=0,m=!1;const f=s.Pan().runOnJS(!0).activeOffsetY(8).failOffsetX([-12,12]).onBegin(()=>{a=0,m=!1}).onUpdate(t=>{if(!m){if(i&&!i())return;m=!0,a=t.translationY}e.move(t.translationY-a)}).onEnd(t=>{m&&e.release(t.translationY-a,t.velocityY/1e3)}).onFinalize((t,n)=>{!n&&m&&e.cancel()});return l&&f.simultaneousWithExternalGesture(l),{handleGesture:t,sheetGesture:f}},[n,r,o,i,l,c])};
1
+ "use strict";import{useMemo}from"react";import{Animated,Easing}from"react-native";import{Gesture}from"react-native-gesture-handler";import{setNativeValue,useTheme}from"../theme/index.js";export const DRAG_DISMISS_DISTANCE=100;export const DRAG_DISMISS_VELOCITY=.5;export const createDragToDismissController=({drag:e,travel:t,onDismiss:s},n)=>{const{snappy:a}=n.spring,springBack=()=>Animated.spring(e,{toValue:0,damping:a.damping,stiffness:a.stiffness,mass:a.mass,useNativeDriver:!0}).start();return{move:t=>{setNativeValue(e,Math.max(0,t))},release:(a,r)=>{a>100||r>.5?Animated.timing(e,{toValue:"function"==typeof t?t():t,duration:n.duration.fast,easing:Easing.bezier(...n.easing.accelerate),useNativeDriver:!0}).start(()=>s()):springBack()},cancel:springBack}};export const useDragToDismiss=e=>{const{drag:t,travel:s,onDismiss:n,contentAtTop:a,scrollGesture:r}=e,{motion:i}=useTheme();return useMemo(()=>{const e=createDragToDismissController({drag:t,travel:s,onDismiss:n},i),o=Gesture.Pan().runOnJS(!0).activeOffsetY(6).failOffsetX([-12,12]).onUpdate(t=>e.move(t.translationY)).onEnd(t=>e.release(t.translationY,t.velocityY/1e3)).onFinalize((t,s)=>{s||e.cancel()});let l=0,m=!1;const u=Gesture.Pan().runOnJS(!0).activeOffsetY(8).failOffsetX([-12,12]).onBegin(()=>{l=0,m=!1}).onUpdate(t=>{if(!m){if(a&&!a())return;m=!0,l=t.translationY}e.move(t.translationY-l)}).onEnd(t=>{m&&e.release(t.translationY-l,t.velocityY/1e3)}).onFinalize((t,s)=>{!s&&m&&e.cancel()});return r&&u.simultaneousWithExternalGesture(r),{handleGesture:o,sheetGesture:u}},[t,s,n,a,r,i])};
@@ -1 +1 @@
1
- import{useCallback as e,useRef as t}from"react";export const FLICK_TOLERANCE=10;export const useFlickGuard=()=>{const n=t(null);return{onPressIn:e(e=>{const{pageX:t,pageY:r}=e.nativeEvent;n.current="number"==typeof t&&"number"==typeof r?{x:t,y:r}:null},[]),isFlick:e(e=>{const t=n.current;if(n.current=null,!t)return!1;const{pageX:r,pageY:o}=e.nativeEvent;return"number"==typeof r&&"number"==typeof o&&Math.hypot(r-t.x,o-t.y)>10},[])}};
1
+ "use strict";import{useCallback,useRef}from"react";export const FLICK_TOLERANCE=10;export const useFlickGuard=()=>{const e=useRef(null);return{onPressIn:useCallback(t=>{const{pageX:n,pageY:r}=t.nativeEvent;e.current="number"==typeof n&&"number"==typeof r?{x:n,y:r}:null},[]),isFlick:useCallback(t=>{const n=e.current;if(e.current=null,!n)return!1;const{pageX:r,pageY:u}=t.nativeEvent;return"number"==typeof r&&"number"==typeof u&&Math.hypot(r-n.x,u-n.y)>10},[])}};
@@ -1 +1 @@
1
- import{useCallback as e,useMemo as s,useRef as a}from"react";import{Easing as t,Animated as n}from"react-native";import{useTheme as r}from"../theme/index.js";import{createAnimatedValue as i}from"../theme/animatedValue.js";export const PRESS_ANIMATION_PRESETS=["scale","bounce","fade","sink","pulse"];const o={scale:.97,bounce:.92,fade:1,sink:1,pulse:1};export const usePressAnimation=({preset:c="scale",scaleTo:m,pressDuration:p,enabled:u=!0}={})=>{const d=r(),l=a(i(1)).current,f=a(i(1)).current,g=a(i(0)).current,b=m??o[c],k=e((e,s,a)=>n.timing(e,{toValue:s,duration:p??d.motion.duration.fast,easing:t.bezier(...a),useNativeDriver:!0}),[p,d]),v=e((e,s,a)=>n.spring(e,{toValue:s,damping:d.motion.spring[a].damping,stiffness:d.motion.spring[a].stiffness,mass:d.motion.spring[a].mass,useNativeDriver:!0}),[d]),y=e(()=>{if(u)switch(c){case"scale":case"bounce":k(l,b,d.motion.easing.standard).start();break;case"fade":k(f,.6,d.motion.easing.standard).start();break;case"sink":k(g,2,d.motion.easing.standard).start()}},[u,c,b,l,f,g,d,k]),N=e(()=>{if(u)switch(c){case"scale":v(l,1,"snappy").start();break;case"bounce":v(l,1,"bouncy").start();break;case"fade":k(f,1,d.motion.easing.decelerate).start();break;case"sink":v(g,0,"snappy").start()}},[u,c,l,f,g,d,k,v]),h=e(()=>{u&&"pulse"===c&&n.sequence([n.timing(l,{toValue:1.05,duration:d.motion.duration.instant,easing:t.bezier(...d.motion.easing.accelerate),useNativeDriver:!0}),v(l,1,"snappy")]).start()},[u,c,l,d,v]),A=s(()=>({transform:[{scale:l},{translateY:g}],opacity:f}),[l,g,f]);return{scale:l,opacity:f,translateY:g,style:A,pressIn:y,pressOut:N,press:h}};
1
+ "use strict";import{useCallback,useMemo,useRef}from"react";import{Easing,Animated as RNAnimated}from"react-native";import{useTheme}from"../theme/index.js";import{createAnimatedValue}from"../theme/animatedValue.js";export const PRESS_ANIMATION_PRESETS=["scale","bounce","fade","sink","pulse"];const FADE_TO=.6,SINK_BY=2,PULSE_TO=1.05,DEFAULT_SCALE_TO={scale:.97,bounce:.92,fade:1,sink:1,pulse:1};export const usePressAnimation=({preset:e="scale",scaleTo:a,pressDuration:s,enabled:t=!0}={})=>{const n=useTheme(),i=useRef(createAnimatedValue(1)).current,r=useRef(createAnimatedValue(1)).current,o=useRef(createAnimatedValue(0)).current,c=a??DEFAULT_SCALE_TO[e],u=useCallback((e,a,t)=>RNAnimated.timing(e,{toValue:a,duration:s??n.motion.duration.fast,easing:Easing.bezier(...t),useNativeDriver:!0}),[s,n]),m=useCallback((e,a,s)=>RNAnimated.spring(e,{toValue:a,damping:n.motion.spring[s].damping,stiffness:n.motion.spring[s].stiffness,mass:n.motion.spring[s].mass,useNativeDriver:!0}),[n]),l=useCallback(()=>{if(t)switch(e){case"scale":case"bounce":u(i,c,n.motion.easing.standard).start();break;case"fade":u(r,.6,n.motion.easing.standard).start();break;case"sink":u(o,2,n.motion.easing.standard).start()}},[t,e,c,i,r,o,n,u]),d=useCallback(()=>{if(t)switch(e){case"scale":m(i,1,"snappy").start();break;case"bounce":m(i,1,"bouncy").start();break;case"fade":u(r,1,n.motion.easing.decelerate).start();break;case"sink":m(o,0,"snappy").start()}},[t,e,i,r,o,n,u,m]),p=useCallback(()=>{t&&"pulse"===e&&RNAnimated.sequence([RNAnimated.timing(i,{toValue:1.05,duration:n.motion.duration.instant,easing:Easing.bezier(...n.motion.easing.accelerate),useNativeDriver:!0}),m(i,1,"snappy")]).start()},[t,e,i,n,m]),f=useMemo(()=>({transform:[{scale:i},{translateY:o}],opacity:r}),[i,o,r]);return{scale:i,opacity:r,translateY:o,style:f,pressIn:l,pressOut:d,press:p}};
@@ -1 +1 @@
1
- import{useEffect as e,useState as t}from"react";import{AccessibilityInfo as o}from"react-native";export const useReducedMotion=()=>{const[n,r]=t(!1);return e(()=>{let e=!0;o.isReduceMotionEnabled().then(t=>{e&&r(t)});const t=o.addEventListener("reduceMotionChanged",e=>r(e));return()=>{e=!1,t.remove()}},[]),n};
1
+ "use strict";import{useEffect,useState}from"react";import{AccessibilityInfo}from"react-native";export const useReducedMotion=()=>{const[e,t]=useState(!1);return useEffect(()=>{let e=!0;AccessibilityInfo.isReduceMotionEnabled().then(i=>{e&&t(i)});const i=AccessibilityInfo.addEventListener("reduceMotionChanged",e=>t(e));return()=>{e=!1,i.remove()}},[]),e};
@@ -1 +1 @@
1
- import{useCallback as e,useState as t}from"react";export const useToggle=(o=!1)=>{const[r,s]=t(o);return{value:r,toggle:e(()=>s(e=>!e),[]),setOn:e(()=>s(!0),[]),setOff:e(()=>s(!1),[]),setValue:s}};
1
+ "use strict";import{useCallback,useState}from"react";export const useToggle=(e=!1)=>{const[t,s]=useState(e);return{value:t,toggle:useCallback(()=>s(e=>!e),[]),setOn:useCallback(()=>s(!0),[]),setOff:useCallback(()=>s(!1),[]),setValue:s}};
@@ -1 +1 @@
1
- export*from"./components/index.js";export{APP_ICON_SIZES,AppIcon,CURATED_ICON_NAMES,defaultIcons,ICON_NAMES,ICONSAX_SUFFIX,renderSlotIcon}from"./components/AppIcon/index.js";export{deletePath,Form,getPath,HookFormField,isFieldFilled,rules,setPath,useField,useFieldArray,useForm,useFormCompletion,useFormContext,useHookFormField,useOptionalFormContext}from"./form/index.js";export{FLICK_TOLERANCE,PRESS_ANIMATION_PRESETS,useControllableState,useDebounce,useFlickGuard,usePressAnimation,useReducedMotion,useToggle}from"./hooks/index.js";export{initUI}from"./initUI.js";export{NetworkStatusBanner}from"./network/index.js";export{darkTheme,getColorMode,getTheme,lightTheme,mergeTheme,resetTheme,setColorMode,setTheme,subscribeTheme,ThemeProvider,useTheme,useThemeMode}from"./theme/index.js";export{Breakpoints,configureFeedback,feedback,hapticForIntent,isFeedbackEnabled,isScreenSize,isTablet,Margin,Padding,Responsive,ScreenDimensions,Spacing,SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,setHapticImplementation,shadowStyle,smoothCorners,squircleApplies,squircleHostRadius,squirclePath,triggerHaptic,useScreenDimensions,warnUnknownProps}from"./utils/index.js";
1
+ "use strict";export*from"./components/index.js";export{APP_ICON_SIZES,AppIcon,CURATED_ICON_NAMES,defaultIcons,ICON_NAMES,ICONSAX_SUFFIX,renderSlotIcon}from"./components/AppIcon/index.js";export{deletePath,Form,getPath,HookFormField,isFieldFilled,rules,setPath,useField,useFieldArray,useForm,useFormCompletion,useFormContext,useHookFormField,useOptionalFormContext}from"./form/index.js";export{FLICK_TOLERANCE,PRESS_ANIMATION_PRESETS,useControllableState,useDebounce,useFlickGuard,usePressAnimation,useReducedMotion,useToggle}from"./hooks/index.js";export{initUI}from"./initUI.js";export{NetworkStatusBanner}from"./network/index.js";export{darkTheme,getColorMode,getTheme,lightTheme,mergeTheme,resetTheme,setColorMode,setTheme,subscribeTheme,ThemeProvider,useTheme,useThemeMode}from"./theme/index.js";export{Breakpoints,configureFeedback,feedback,hapticForIntent,isFeedbackEnabled,isScreenSize,isTablet,Margin,Padding,Responsive,ScreenDimensions,Spacing,SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,setHapticImplementation,shadowStyle,smoothCorners,squircleApplies,squircleHostRadius,squirclePath,triggerHaptic,useScreenDimensions,warnUnknownProps}from"./utils/index.js";
@@ -1 +1 @@
1
- import{setColorMode as t,setTheme as d}from"./theme/index.js";export const initUI=(e={})=>{e.defaultMode&&t(e.defaultMode),e.light&&d(e.light,"light"),e.dark&&d(e.dark,"dark")};
1
+ "use strict";import{setColorMode,setTheme}from"./theme/index.js";export const initUI=(e={})=>{e.defaultMode&&setColorMode(e.defaultMode),e.light&&setTheme(e.light,"light"),e.dark&&setTheme(e.dark,"dark")};
@@ -1 +1 @@
1
- import{useNetworkStatus as t}from"@webority/mobile-core";import o,{useEffect as e,useMemo as r,useRef as n,useState as a}from"react";import{Animated as i,StyleSheet as l,Text as s}from"react-native";import{useSafeAreaInsets as m}from"react-native-safe-area-context";import{fontFor as p,useTheme as c}from"../theme/index.js";import{jsx as u}from"react/jsx-runtime";export const NetworkStatusBanner=({message:o="You are offline. Some features may be unavailable.",position:l="top",style:d,disabled:f=!1,safeArea:b=!0})=>{const g=c(),v=m(),y=b?"top"===l?v.top:v.bottom:0,[h,x]=a(0),w=h>0?h:56+y,{isConnected:V,isInternetReachable:R}=t(),S=!(f||V&&!1!==R),z=n(new i.Value(0)).current,N=n(new i.Value(0)).current;e(()=>{i.parallel([i.timing(z,{toValue:S?1:0,duration:g.motion.duration.normal,useNativeDriver:!0}),i.timing(N,{toValue:S?1:0,duration:g.motion.duration.normal,useNativeDriver:!0})]).start()},[S,z,N,g.motion.duration.normal]);const j=r(()=>buildStyles(),[]),k=z.interpolate({inputRange:[0,1],outputRange:["top"===l?-w:w,0]});return u(i.View,{pointerEvents:S?"auto":"none",accessibilityRole:"alert",accessibilityLiveRegion:S?"polite":"none",onLayout:t=>x(t.nativeEvent.layout.height),style:[j.container,"top"===l?j.top:j.bottom,"top"===l?{paddingTop:10+y}:{paddingBottom:10+y},{backgroundColor:g.colors.error,opacity:N,transform:[{translateY:k}]},d],children:u(s,{style:{color:g.colors.onError,fontSize:g.typography.fontSize.sm,...p(g,"semibold"),textAlign:"center"},numberOfLines:2,children:o})})};const buildStyles=()=>l.create({container:{position:"absolute",left:0,right:0,paddingVertical:10,paddingHorizontal:16,zIndex:1e3,elevation:8},top:{top:0},bottom:{bottom:0}});export default NetworkStatusBanner;
1
+ "use strict";import{useNetworkStatus}from"@webority/mobile-core";import React,{useEffect,useMemo,useRef,useState}from"react";import{Animated,StyleSheet,Text}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{fontFor,useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";export const NetworkStatusBanner=({message:e="You are offline. Some features may be unavailable.",position:t="top",style:o,disabled:a=!1,safeArea:n=!0})=>{const r=useTheme(),i=useSafeAreaInsets(),s=n?"top"===t?i.top:i.bottom:0,[u,l]=useState(0),m=u>0?u:56+s,{isConnected:c,isInternetReachable:p}=useNetworkStatus(),d=!(a||c&&!1!==p),f=useRef(new Animated.Value(0)).current,b=useRef(new Animated.Value(0)).current;useEffect(()=>{Animated.parallel([Animated.timing(f,{toValue:d?1:0,duration:r.motion.duration.normal,useNativeDriver:!0}),Animated.timing(b,{toValue:d?1:0,duration:r.motion.duration.normal,useNativeDriver:!0})]).start()},[d,f,b,r.motion.duration.normal]);const S=useMemo(()=>buildStyles(),[]),y=f.interpolate({inputRange:[0,1],outputRange:["top"===t?-m:m,0]});return _jsx(Animated.View,{pointerEvents:d?"auto":"none",accessibilityRole:"alert",accessibilityLiveRegion:d?"polite":"none",onLayout:e=>l(e.nativeEvent.layout.height),style:[S.container,"top"===t?S.top:S.bottom,"top"===t?{paddingTop:10+s}:{paddingBottom:10+s},{backgroundColor:r.colors.error,opacity:b,transform:[{translateY:y}]},o],children:_jsx(Text,{style:{color:r.colors.onError,fontSize:r.typography.fontSize.sm,...fontFor(r,"semibold"),textAlign:"center"},numberOfLines:2,children:e})})};const buildStyles=()=>StyleSheet.create({container:{position:"absolute",left:0,right:0,paddingVertical:10,paddingHorizontal:16,zIndex:1e3,elevation:8},top:{top:0},bottom:{bottom:0}});export default NetworkStatusBanner;
@@ -1 +1 @@
1
- export{NetworkStatusBanner}from"./NetworkStatusBanner.js";
1
+ "use strict";export{NetworkStatusBanner}from"./NetworkStatusBanner.js";
@@ -1 +1 @@
1
- import{TurboModuleRegistry as e}from"react-native";export default e.get("PdfRasterizer");
1
+ "use strict";import{TurboModuleRegistry}from"react-native";export default TurboModuleRegistry.get("PdfRasterizer");
@@ -1 +1 @@
1
- import{View as t}from"react-native";import{jsx as o}from"react/jsx-runtime";const e={x:.5,y:0},r={x:.5,y:1},round=t=>Math.round(1e3*t)/1e3;export const gradientAngle=(t=e,o=r)=>{const n=180*Math.atan2(o.x-t.x,t.y-o.y)/Math.PI;return round((n%360+360)%360)};export const toBackgroundImage=t=>({type:"linear-gradient",direction:`${gradientAngle(t.start,t.end)}deg`,colorStops:t.colors.map((o,e)=>{const r=t.locations?.[e];return void 0===r?{color:o}:{color:o,positions:[`${round(100*r)}%`]}})});export const Gradient=({gradient:e,style:r,children:n})=>o(t,{style:[{experimental_backgroundImage:[toBackgroundImage(e)]},r],children:n});
1
+ "use strict";import{View}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_START={x:.5,y:0},DEFAULT_END={x:.5,y:1},round=t=>Math.round(1e3*t)/1e3;export const gradientAngle=(t=DEFAULT_START,o=DEFAULT_END)=>{const r=180*Math.atan2(o.x-t.x,t.y-o.y)/Math.PI;return round((r%360+360)%360)};export const toBackgroundImage=t=>({type:"linear-gradient",direction:`${gradientAngle(t.start,t.end)}deg`,colorStops:t.colors.map((o,r)=>{const e=t.locations?.[r];return void 0===e?{color:o}:{color:o,positions:[`${round(100*e)}%`]}})});export const Gradient=({gradient:t,style:o,children:r})=>_jsx(View,{style:[{experimental_backgroundImage:[toBackgroundImage(t)]},o],children:r});
@@ -1 +1 @@
1
- import{Storage as e}from"@webority/mobile-core";import r,{createContext as t,useCallback as o,useContext as s,useEffect as n,useMemo as m,useRef as i,useState as c}from"react";import{Appearance as d}from"react-native";import{useReducedMotion as l}from"../hooks/useReducedMotion.js";import{mergeTheme as a}from"./merge.js";import{darkTheme as g,lightTheme as f}from"./tokens.js";import{jsx as h}from"react/jsx-runtime";const p={damping:100,stiffness:1e3,mass:1},u=t({theme:f,mode:"light",preference:"system",setPreference:()=>{},toggleColorMode:()=>{}});export const ThemeProvider=({children:r,initialPreference:t="system",persistKey:s,lightOverrides:k,darkOverrides:y})=>{const[v,P]=c(t),C=i(!1);n(()=>{if(!s)return;let r=!0;return e.getItem(s).then(e=>{r&&!C.current&&(e=>"light"===e||"dark"===e||"system"===e)(e)&&P(e)}),()=>{r=!1}},[s]);const M=o(e=>{C.current=!0,P(e)},[]);n(()=>{s&&C.current&&e.setItem(s,v)},[s,v]);const[j,x]=c(()=>d.getColorScheme()??"light");n(()=>{const e=d.addChangeListener(({colorScheme:e})=>{x(e??"light")});return()=>e.remove()},[]);const b="system"===v?j:v,w=l(),T=m(()=>{const e="dark"===b?g:f,r="dark"===b?y:k,t=r?a(e,r):e;return w?{...t,motion:(o=t.motion,{...o,duration:{instant:0,fast:0,normal:0,slow:0,slower:0},spring:{gentle:p,bouncy:p,snappy:p}})}:t;var o},[b,k,y,w]),I=m(()=>({theme:T,mode:b,preference:v,setPreference:M,toggleColorMode:()=>M(e=>"system"===e?"dark"===j?"light":"dark":"dark"===e?"light":"dark")}),[T,b,v,j,M]);return h(u.Provider,{value:I,children:r})};export const useTheme=()=>s(u).theme;export const useThemeMode=()=>{const e=s(u);return{mode:e.mode,preference:e.preference,setPreference:e.setPreference,toggleColorMode:e.toggleColorMode}};
1
+ "use strict";import{Storage}from"@webority/mobile-core";import React,{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Appearance}from"react-native";import{useReducedMotion}from"../hooks/useReducedMotion.js";import{mergeTheme}from"./merge.js";import{darkTheme,lightTheme}from"./tokens.js";import{jsx as _jsx}from"react/jsx-runtime";const REDUCED_SPRING={damping:100,stiffness:1e3,mass:1},collapseMotion=e=>({...e,duration:{instant:0,fast:0,normal:0,slow:0,slower:0},spring:{gentle:REDUCED_SPRING,bouncy:REDUCED_SPRING,snappy:REDUCED_SPRING}}),isPreference=e=>"light"===e||"dark"===e||"system"===e,defaultValue={theme:lightTheme,mode:"light",preference:"system",setPreference:()=>{},toggleColorMode:()=>{}},ThemeContext=createContext(defaultValue);export const ThemeProvider=({children:e,initialPreference:t="system",persistKey:r,lightOverrides:o,darkOverrides:s})=>{const[n,m]=useState(t),c=useRef(!1);useEffect(()=>{if(!r)return;let e=!0;return Storage.getItem(r).then(t=>{e&&!c.current&&isPreference(t)&&m(t)}),()=>{e=!1}},[r]);const a=useCallback(e=>{c.current=!0,m(e)},[]);useEffect(()=>{r&&c.current&&Storage.setItem(r,n)},[r,n]);const[i,u]=useState(()=>Appearance.getColorScheme()??"light");useEffect(()=>{const e=Appearance.addChangeListener(({colorScheme:e})=>{u(e??"light")});return()=>e.remove()},[]);const l="system"===n?i:n,d=useReducedMotion(),f=useMemo(()=>{const e="dark"===l?darkTheme:lightTheme,t="dark"===l?s:o,r=t?mergeTheme(e,t):e;return d?{...r,motion:collapseMotion(r.motion)}:r},[l,o,s,d]),h=useMemo(()=>({theme:f,mode:l,preference:n,setPreference:a,toggleColorMode:()=>a(e=>"system"===e?"dark"===i?"light":"dark":"dark"===e?"light":"dark")}),[f,l,n,i,a]);return _jsx(ThemeContext.Provider,{value:h,children:e})};export const useTheme=()=>useContext(ThemeContext).theme;export const useThemeMode=()=>{const e=useContext(ThemeContext);return{mode:e.mode,preference:e.preference,setPreference:e.setPreference,toggleColorMode:e.toggleColorMode}};
@@ -1 +1 @@
1
- import{Animated as e,Platform as t}from"react-native";export const createAnimatedValue=(a,r)=>{const n=new e.Value(a,r);return"web"===t.OS?n:(n._tracking=null,Object.seal(n))};export const setNativeValue=(t,a)=>{e.timing(t,{toValue:a,duration:0,useNativeDriver:!0}).start()};
1
+ "use strict";import{Animated,Platform}from"react-native";export const createAnimatedValue=(t,e)=>{const a=new Animated.Value(t,e);return"web"===Platform.OS?a:(a._tracking=null,Object.seal(a))};export const setNativeValue=(t,e)=>{Animated.timing(t,{toValue:e,duration:0,useNativeDriver:!0}).start()};
@@ -1 +1 @@
1
- import{mergeTheme as e}from"./merge.js";import{darkTheme as t,lightTheme as o}from"./tokens.js";let r,m,s="light",n=o;const a=new Set,recompute=()=>{const d="dark"===s?t:o,h="dark"===s?m:r;n=h?e(d,h):d,a.forEach(e=>e())};export const setTheme=(e,t)=>{t&&(s=t),"dark"===s?m=e:r=e,recompute()};export const setColorMode=e=>{s=e,recompute()};export const getColorMode=()=>s;export const getTheme=()=>n;export const resetTheme=()=>{s="light",r=void 0,m=void 0,recompute()};export const subscribeTheme=e=>(a.add(e),()=>{a.delete(e)});export{createAnimatedValue,setNativeValue}from"./animatedValue.js";export{Gradient,gradientAngle,toBackgroundImage}from"./Gradient.js";export{mergeTheme}from"./merge.js";export{ThemeProvider,useTheme,useThemeMode}from"./ThemeContext.js";export{fontFor}from"./textStyle.js";export{darkTheme,lightTheme}from"./tokens.js";
1
+ "use strict";import{mergeTheme}from"./merge.js";import{darkTheme,lightTheme}from"./tokens.js";let lightOverridesGlobal,darkOverridesGlobal,currentMode="light",currentTheme=lightTheme;const subscribers=new Set,recompute=()=>{const e="dark"===currentMode?darkTheme:lightTheme,r="dark"===currentMode?darkOverridesGlobal:lightOverridesGlobal;currentTheme=r?mergeTheme(e,r):e,subscribers.forEach(e=>e())};export const setTheme=(e,r)=>{r&&(currentMode=r),"dark"===currentMode?darkOverridesGlobal=e:lightOverridesGlobal=e,recompute()};export const setColorMode=e=>{currentMode=e,recompute()};export const getColorMode=()=>currentMode;export const getTheme=()=>currentTheme;export const resetTheme=()=>{currentMode="light",lightOverridesGlobal=void 0,darkOverridesGlobal=void 0,recompute()};export const subscribeTheme=e=>(subscribers.add(e),()=>{subscribers.delete(e)});export{createAnimatedValue,setNativeValue}from"./animatedValue.js";export{Gradient,gradientAngle,toBackgroundImage}from"./Gradient.js";export{mergeTheme}from"./merge.js";export{ThemeProvider,useTheme,useThemeMode}from"./ThemeContext.js";export{fontFor}from"./textStyle.js";export{darkTheme,lightTheme}from"./tokens.js";
@@ -1 +1 @@
1
- const isPlainObject=o=>"object"==typeof o&&null!==o&&!Array.isArray(o),deepMerge=(o,e)=>{if(!isPlainObject(o)||!isPlainObject(e))return void 0!==e?e:o;const r={...o};for(const t of Object.keys(e)){const n=e[t],c=o[t];isPlainObject(n)&&isPlainObject(c)?r[t]=deepMerge(c,n):void 0!==n&&(r[t]=n)}return r};export const mergeTheme=(o,e)=>deepMerge(o,e);
1
+ "use strict";const isPlainObject=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),deepMerge=(e,t)=>{if(!isPlainObject(e)||!isPlainObject(t))return void 0!==t?t:e;const i={...e};for(const r of Object.keys(t)){const s=t[r],c=e[r];isPlainObject(s)&&isPlainObject(c)?i[r]=deepMerge(c,s):void 0!==s&&(i[r]=s)}return i};export const mergeTheme=(e,t)=>deepMerge(e,t);
@@ -1 +1 @@
1
- const o={normal:"regular",medium:"medium",semibold:"semibold",bold:"bold"};export const fontFor=(t,n)=>{const e=t.typography.fontFamily?.[o[n]];return e?{fontFamily:e}:{fontWeight:t.typography.fontWeight[n]}};
1
+ "use strict";const FAMILY_KEY={normal:"regular",medium:"medium",semibold:"semibold",bold:"bold"};export const fontFor=(o,t)=>{const e=o.typography.fontFamily?.[FAMILY_KEY[t]];return e?{fontFamily:e}:{fontWeight:o.typography.fontWeight[t]}};
@@ -1 +1 @@
1
- const e={fontSize:{xs:11,sm:13,base:15,lg:17,xl:20,"2xl":24,"3xl":30,"4xl":36},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:1.2,normal:1.4,relaxed:1.6},letterSpacing:{tight:-.2,normal:0,wide:.4}},i={none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},a={none:0,xs:4,sm:6,md:10,lg:14,xl:20,"2xl":28,full:9999},o={sm:{paddingHorizontal:12,paddingVertical:10,minHeight:38,fontSize:13,borderRadius:10,iconSize:14,labelFontSize:11,labelGap:4,messageFontSize:11,messageGap:2},md:{paddingHorizontal:14,paddingVertical:13,minHeight:44,fontSize:14,borderRadius:10,iconSize:16,labelFontSize:12,labelGap:4,messageFontSize:12,messageGap:2},lg:{paddingHorizontal:16,paddingVertical:15,minHeight:52,fontSize:16,borderRadius:10,iconSize:18,labelFontSize:13,labelGap:4,messageFontSize:13,messageGap:2}},d={button:{xs:{paddingHorizontal:10,paddingVertical:4,minHeight:28,fontSize:12,borderRadius:8},sm:{paddingHorizontal:12,paddingVertical:6,minHeight:34,fontSize:14,borderRadius:10},md:{paddingHorizontal:16,paddingVertical:9,minHeight:42,fontSize:16,borderRadius:12},lg:{paddingHorizontal:20,paddingVertical:12,minHeight:50,fontSize:18,borderRadius:14},xl:{paddingHorizontal:24,paddingVertical:14,minHeight:58,fontSize:20,borderRadius:16}},input:{sm:{...o.sm,multilineMinHeight:72},md:{...o.md,multilineMinHeight:92},lg:{...o.lg,multilineMinHeight:110}},searchBar:{sm:{borderRadius:a.full},md:{borderRadius:a.full},lg:{borderRadius:a.full}},emptyState:{sm:{iconSize:48,titleFontSize:"lg",descriptionFontSize:"sm",paddingVertical:"lg"},md:{iconSize:64,titleFontSize:"xl",descriptionFontSize:"base",paddingVertical:"xl"},lg:{iconSize:80,titleFontSize:"2xl",descriptionFontSize:"base",paddingVertical:"2xl"}},field:{defaultVariant:"outlined",sm:o.sm,md:o.md,lg:o.lg},listItem:{sm:{paddingVertical:"sm",titleFontSize:"sm",subtitleFontSize:"xs",minHeight:44},md:{paddingVertical:"md",titleFontSize:"base",subtitleFontSize:"sm",minHeight:56},lg:{paddingVertical:"lg",titleFontSize:"lg",subtitleFontSize:"sm",minHeight:72}},badge:{sm:{fontSize:10,minWidth:16,height:16,paddingHorizontal:5,dotSize:8},md:{fontSize:11,minWidth:20,height:20,paddingHorizontal:6,dotSize:10},borderWidth:1.5,anchorOffset:4},chip:{sm:{paddingHorizontal:10,paddingVertical:4,fontSize:12,minHeight:26,closeSize:16,closeFontSize:12,gap:6},md:{paddingHorizontal:12,paddingVertical:6,fontSize:13,minHeight:32,closeSize:18,closeFontSize:13,gap:8}},checkbox:{sm:{boxSize:16},md:{boxSize:20},lg:{boxSize:24},labelGap:10},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},labelGap:10},switch:{sm:{trackWidth:42,trackHeight:26,thumbSize:22,padding:2},md:{trackWidth:51,trackHeight:31,thumbSize:27,padding:2},lg:{trackWidth:60,trackHeight:36,thumbSize:32,padding:2},thumbColor:"#FFFFFF"},otpInput:{sm:{cell:36,fontSize:16,borderRadius:8,gap:8},md:{cell:48,fontSize:20,borderRadius:10,gap:10},lg:{cell:56,fontSize:24,borderRadius:12,gap:12}},dialog:{iconWrapperSize:48,iconWrapperBorderRadius:24,actionButtonMinHeight:44},toast:{iconCircleSize:28,iconCircleBorderRadius:14,iconGlyphFontSize:16,tintBarWidth:4},formField:{inlineLabelWidth:"35%"}},t={duration:{instant:80,fast:160,normal:240,slow:360,slower:500},easing:{standard:[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]},spring:{gentle:{damping:26,stiffness:240,mass:.9},bouncy:{damping:16,stiffness:200,mass:.7},snappy:{damping:20,stiffness:300,mass:.7}}};export const lightTheme={mode:"light",colors:{primary:"#5B5BD6",primaryHover:"#4F4FBF",primaryPressed:"#4040A8",primaryMuted:"#EEEEFC",secondary:"#F4F4F8",secondaryHover:"#E9E9F0",success:"#1FAD66",warning:"#F59E0B",error:"#E5484D",info:"#3B82F6",onPrimary:"#FFFFFF",onSecondary:"#0F0F1A",onSuccess:"#FFFFFF",onWarning:"#0F0F1A",onError:"#FFFFFF",onInfo:"#FFFFFF",onOverlay:"#FFFFFF",text:{primary:"#0F0F1A",secondary:"#52525B",tertiary:"#8B8B95",inverse:"#FFFFFF",strong:"#252F4A",disabled:"#B4B4BB",link:"#5B5BD6"},background:{primary:"#FFFFFF",secondary:"#F8F8FB",tertiary:"#F1F1F5",elevated:"#FFFFFF",overlay:"rgba(15, 15, 26, 0.5)",inverse:"#0F0F1A"},border:{primary:"#E5E5EC",secondary:"#EFEFF3",focus:"#5B5BD6",error:"#E5484D",width:1},field:{background:"#F9FBFC",backgroundFocused:"#FFFFFF",backgroundDisabled:"#F5F6FA",border:"#EBEDF3",borderFocused:"#BED2F9",borderError:"#FDBFCE",label:"#242F4A",text:"#252F4A",textDisabled:"#C4CADA",placeholder:"#99A1B7",placeholderDisabled:"#C4CADA",icon:"#99A1B7",iconFocused:"#4B5675",iconDisabled:"#C4CADA",caret:"#5B8DEE",message:"#E82545"},surface:{pressed:"rgba(15, 15, 26, 0.06)",hovered:"rgba(15, 15, 26, 0.04)",selected:"rgba(91, 91, 214, 0.1)",disabled:"#F1F1F5"},glass:{fill:"rgba(255, 255, 255, 0.28)",border:"rgba(255, 255, 255, 0.45)",on:"#0F0F1A",badge:"#FFFFFF"},skeleton:{background:"#EBEDF3",highlight:"#F5F6FA"},avatarPalette:["#5B5BD6","#0A7979","#A45A05","#CD226E","#2462EB","#7C3AED","#047C57","#D42222"]},typography:e,spacing:i,radius:a,shadows:{none:{},xs:{shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.04,shadowRadius:2,elevation:1},sm:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.06,shadowRadius:4,elevation:2},md:{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.08,shadowRadius:8,elevation:4},lg:{shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.1,shadowRadius:16,elevation:8},xl:{shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.14,shadowRadius:24,elevation:12},"2xl":{shadowColor:"#000",shadowOffset:{width:0,height:20},shadowOpacity:.18,shadowRadius:32,elevation:20}},motion:t,components:d,gradients:{}};export const darkTheme={mode:"dark",colors:{primary:"#7C7CE8",primaryHover:"#9292EE",primaryPressed:"#A8A8F2",primaryMuted:"#1F1F3D",secondary:"#1F1F26",secondaryHover:"#2A2A33",success:"#30C780",warning:"#FBBF24",error:"#F87171",info:"#60A5FA",onPrimary:"#0F0F1A",onSecondary:"#FAFAFA",onSuccess:"#0F0F1A",onWarning:"#0F0F1A",onError:"#0F0F1A",onInfo:"#0F0F1A",onOverlay:"#FFFFFF",text:{primary:"#FAFAFA",secondary:"#B4B4BB",tertiary:"#71717A",inverse:"#0F0F1A",strong:"#E2E2E2",disabled:"#52525B",link:"#9292EE"},background:{primary:"#0B0B12",secondary:"#13131C",tertiary:"#1C1C26",elevated:"#1C1C26",overlay:"rgba(0, 0, 0, 0.65)",inverse:"#FAFAFA"},border:{primary:"#27272F",secondary:"#1C1C26",focus:"#7C7CE8",error:"#F87171",width:1},field:{background:"#13131C",backgroundFocused:"#0B0B12",backgroundDisabled:"#1C1C26",border:"#27272F",borderFocused:"#3D5FB0",borderError:"#8A2F42",label:"#E4E6EE",text:"#FAFAFA",textDisabled:"#52525B",placeholder:"#71717A",placeholderDisabled:"#52525B",icon:"#8B8B95",iconFocused:"#D4D4DB",iconDisabled:"#52525B",caret:"#7C9EF0",message:"#F87171"},surface:{pressed:"rgba(255, 255, 255, 0.08)",hovered:"rgba(255, 255, 255, 0.05)",selected:"rgba(124, 124, 232, 0.18)",disabled:"#1C1C26"},glass:{fill:"rgba(255, 255, 255, 0.28)",border:"rgba(255, 255, 255, 0.45)",on:"#0F0F1A",badge:"#FFFFFF"},skeleton:{background:"#1C1C26",highlight:"#27272F"},avatarPalette:["#8B8BEE","#2DD4BF","#FCD34D","#F472B6","#60A5FA","#A78BFA","#34D399","#F87171"]},typography:e,spacing:i,radius:a,shadows:{none:{},xs:{shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.3,shadowRadius:2,elevation:1},sm:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:2},md:{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:8,elevation:4},lg:{shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.55,shadowRadius:16,elevation:8},xl:{shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12},"2xl":{shadowColor:"#000",shadowOffset:{width:0,height:20},shadowOpacity:.7,shadowRadius:32,elevation:20}},motion:t,components:d,gradients:{}};
1
+ "use strict";const typography={fontSize:{xs:11,sm:13,base:15,lg:17,xl:20,"2xl":24,"3xl":30,"4xl":36},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:1.2,normal:1.4,relaxed:1.6},letterSpacing:{tight:-.2,normal:0,wide:.4}},spacing={none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius={none:0,xs:4,sm:6,md:10,lg:14,xl:20,"2xl":28,full:9999},FIELD_RADIUS=10,fieldSizes={sm:{paddingHorizontal:12,paddingVertical:10,minHeight:38,fontSize:13,borderRadius:10,iconSize:14,labelFontSize:11,labelGap:4,messageFontSize:11,messageGap:2},md:{paddingHorizontal:14,paddingVertical:13,minHeight:44,fontSize:14,borderRadius:10,iconSize:16,labelFontSize:12,labelGap:4,messageFontSize:12,messageGap:2},lg:{paddingHorizontal:16,paddingVertical:15,minHeight:52,fontSize:16,borderRadius:10,iconSize:18,labelFontSize:13,labelGap:4,messageFontSize:13,messageGap:2}},components={button:{xs:{paddingHorizontal:10,paddingVertical:4,minHeight:28,fontSize:12,borderRadius:8},sm:{paddingHorizontal:12,paddingVertical:6,minHeight:34,fontSize:14,borderRadius:10},md:{paddingHorizontal:16,paddingVertical:9,minHeight:42,fontSize:16,borderRadius:12},lg:{paddingHorizontal:20,paddingVertical:12,minHeight:50,fontSize:18,borderRadius:14},xl:{paddingHorizontal:24,paddingVertical:14,minHeight:58,fontSize:20,borderRadius:16}},input:{sm:{...fieldSizes.sm,multilineMinHeight:72},md:{...fieldSizes.md,multilineMinHeight:92},lg:{...fieldSizes.lg,multilineMinHeight:110}},searchBar:{sm:{borderRadius:radius.full},md:{borderRadius:radius.full},lg:{borderRadius:radius.full}},emptyState:{sm:{iconSize:48,titleFontSize:"lg",descriptionFontSize:"sm",paddingVertical:"lg"},md:{iconSize:64,titleFontSize:"xl",descriptionFontSize:"base",paddingVertical:"xl"},lg:{iconSize:80,titleFontSize:"2xl",descriptionFontSize:"base",paddingVertical:"2xl"}},field:{defaultVariant:"outlined",sm:fieldSizes.sm,md:fieldSizes.md,lg:fieldSizes.lg},listItem:{sm:{paddingVertical:"sm",titleFontSize:"sm",subtitleFontSize:"xs",minHeight:44},md:{paddingVertical:"md",titleFontSize:"base",subtitleFontSize:"sm",minHeight:56},lg:{paddingVertical:"lg",titleFontSize:"lg",subtitleFontSize:"sm",minHeight:72}},badge:{sm:{fontSize:10,minWidth:16,height:16,paddingHorizontal:5,dotSize:8},md:{fontSize:11,minWidth:20,height:20,paddingHorizontal:6,dotSize:10},borderWidth:1.5,anchorOffset:4},chip:{sm:{paddingHorizontal:10,paddingVertical:4,fontSize:12,minHeight:26,closeSize:16,closeFontSize:12,gap:6},md:{paddingHorizontal:12,paddingVertical:6,fontSize:13,minHeight:32,closeSize:18,closeFontSize:13,gap:8}},checkbox:{sm:{boxSize:16},md:{boxSize:20},lg:{boxSize:24},labelGap:10},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},labelGap:10},switch:{sm:{trackWidth:42,trackHeight:26,thumbSize:22,padding:2},md:{trackWidth:51,trackHeight:31,thumbSize:27,padding:2},lg:{trackWidth:60,trackHeight:36,thumbSize:32,padding:2},thumbColor:"#FFFFFF"},otpInput:{sm:{cell:36,fontSize:16,borderRadius:8,gap:8},md:{cell:48,fontSize:20,borderRadius:10,gap:10},lg:{cell:56,fontSize:24,borderRadius:12,gap:12}},dialog:{iconWrapperSize:48,iconWrapperBorderRadius:24,actionButtonMinHeight:44},toast:{iconCircleSize:28,iconCircleBorderRadius:14,iconGlyphFontSize:16,tintBarWidth:4},formField:{inlineLabelWidth:"35%"}},motion={duration:{instant:80,fast:160,normal:240,slow:360,slower:500},easing:{standard:[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]},spring:{gentle:{damping:26,stiffness:240,mass:.9},bouncy:{damping:16,stiffness:200,mass:.7},snappy:{damping:20,stiffness:300,mass:.7}}},lightShadows={none:{},xs:{shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.04,shadowRadius:2,elevation:1},sm:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.06,shadowRadius:4,elevation:2},md:{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.08,shadowRadius:8,elevation:4},lg:{shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.1,shadowRadius:16,elevation:8},xl:{shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.14,shadowRadius:24,elevation:12},"2xl":{shadowColor:"#000",shadowOffset:{width:0,height:20},shadowOpacity:.18,shadowRadius:32,elevation:20}},darkShadows={none:{},xs:{shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.3,shadowRadius:2,elevation:1},sm:{shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:2},md:{shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:8,elevation:4},lg:{shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.55,shadowRadius:16,elevation:8},xl:{shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12},"2xl":{shadowColor:"#000",shadowOffset:{width:0,height:20},shadowOpacity:.7,shadowRadius:32,elevation:20}};export const lightTheme={mode:"light",colors:{primary:"#5B5BD6",primaryHover:"#4F4FBF",primaryPressed:"#4040A8",primaryMuted:"#EEEEFC",secondary:"#F4F4F8",secondaryHover:"#E9E9F0",success:"#1FAD66",warning:"#F59E0B",error:"#E5484D",info:"#3B82F6",onPrimary:"#FFFFFF",onSecondary:"#0F0F1A",onSuccess:"#FFFFFF",onWarning:"#0F0F1A",onError:"#FFFFFF",onInfo:"#FFFFFF",onOverlay:"#FFFFFF",text:{primary:"#0F0F1A",secondary:"#52525B",tertiary:"#8B8B95",inverse:"#FFFFFF",strong:"#252F4A",disabled:"#B4B4BB",link:"#5B5BD6"},background:{primary:"#FFFFFF",secondary:"#F8F8FB",tertiary:"#F1F1F5",elevated:"#FFFFFF",overlay:"rgba(15, 15, 26, 0.5)",inverse:"#0F0F1A"},border:{primary:"#E5E5EC",secondary:"#EFEFF3",focus:"#5B5BD6",error:"#E5484D",width:1},field:{background:"#F9FBFC",backgroundFocused:"#FFFFFF",backgroundDisabled:"#F5F6FA",border:"#EBEDF3",borderFocused:"#BED2F9",borderError:"#FDBFCE",label:"#242F4A",text:"#252F4A",textDisabled:"#C4CADA",placeholder:"#99A1B7",placeholderDisabled:"#C4CADA",icon:"#99A1B7",iconFocused:"#4B5675",iconDisabled:"#C4CADA",caret:"#5B8DEE",message:"#E82545"},surface:{pressed:"rgba(15, 15, 26, 0.06)",hovered:"rgba(15, 15, 26, 0.04)",selected:"rgba(91, 91, 214, 0.1)",disabled:"#F1F1F5"},glass:{fill:"rgba(255, 255, 255, 0.28)",border:"rgba(255, 255, 255, 0.45)",on:"#0F0F1A",badge:"#FFFFFF"},skeleton:{background:"#EBEDF3",highlight:"#F5F6FA"},avatarPalette:["#5B5BD6","#0A7979","#A45A05","#CD226E","#2462EB","#7C3AED","#047C57","#D42222"]},typography:typography,spacing:spacing,radius:radius,shadows:lightShadows,motion:motion,components:components,gradients:{}};export const darkTheme={mode:"dark",colors:{primary:"#7C7CE8",primaryHover:"#9292EE",primaryPressed:"#A8A8F2",primaryMuted:"#1F1F3D",secondary:"#1F1F26",secondaryHover:"#2A2A33",success:"#30C780",warning:"#FBBF24",error:"#F87171",info:"#60A5FA",onPrimary:"#0F0F1A",onSecondary:"#FAFAFA",onSuccess:"#0F0F1A",onWarning:"#0F0F1A",onError:"#0F0F1A",onInfo:"#0F0F1A",onOverlay:"#FFFFFF",text:{primary:"#FAFAFA",secondary:"#B4B4BB",tertiary:"#71717A",inverse:"#0F0F1A",strong:"#E2E2E2",disabled:"#52525B",link:"#9292EE"},background:{primary:"#0B0B12",secondary:"#13131C",tertiary:"#1C1C26",elevated:"#1C1C26",overlay:"rgba(0, 0, 0, 0.65)",inverse:"#FAFAFA"},border:{primary:"#27272F",secondary:"#1C1C26",focus:"#7C7CE8",error:"#F87171",width:1},field:{background:"#13131C",backgroundFocused:"#0B0B12",backgroundDisabled:"#1C1C26",border:"#27272F",borderFocused:"#3D5FB0",borderError:"#8A2F42",label:"#E4E6EE",text:"#FAFAFA",textDisabled:"#52525B",placeholder:"#71717A",placeholderDisabled:"#52525B",icon:"#8B8B95",iconFocused:"#D4D4DB",iconDisabled:"#52525B",caret:"#7C9EF0",message:"#F87171"},surface:{pressed:"rgba(255, 255, 255, 0.08)",hovered:"rgba(255, 255, 255, 0.05)",selected:"rgba(124, 124, 232, 0.18)",disabled:"#1C1C26"},glass:{fill:"rgba(255, 255, 255, 0.28)",border:"rgba(255, 255, 255, 0.45)",on:"#0F0F1A",badge:"#FFFFFF"},skeleton:{background:"#1C1C26",highlight:"#27272F"},avatarPalette:["#8B8BEE","#2DD4BF","#FCD34D","#F472B6","#60A5FA","#A78BFA","#34D399","#F87171"]},typography:typography,spacing:spacing,radius:radius,shadows:darkShadows,motion:motion,components:components,gradients:{}};
@@ -1 +1 @@
1
- export{};
1
+ "use strict";export{};
@@ -1 +1 @@
1
- export const ACCENT_PRESSED_TINT="rgba(0, 0, 0, 0.12)";export const tintOf=(t,r,n)=>{const e=/^#([0-9a-f]{6})$/i.exec(t);if(!e)return n;const o=Math.round(255*r).toString(16).padStart(2,"0");return`#${e[1]}${o}`};const channelsOf=t=>{const r=/^#([0-9a-f]{6})$/i.exec(t);if(!r)return null;const n=Number.parseInt(r[1],16);return[n>>16&255,n>>8&255,255&n]};export const blendOf=(t,r,n,e)=>{const o=channelsOf(t),a=channelsOf(n);if(!o||!a)return e;return`#${o.map((t,n)=>Math.round(t*r+a[n]*(1-r))).map(t=>t.toString(16).padStart(2,"0")).join("")}`.toUpperCase()};
1
+ "use strict";export const ACCENT_PRESSED_TINT="rgba(0, 0, 0, 0.12)";export const tintOf=(t,n,r)=>{const e=/^#([0-9a-f]{6})$/i.exec(t);if(!e)return r;const o=Math.round(255*n).toString(16).padStart(2,"0");return`#${e[1]}${o}`};const channelsOf=t=>{const n=/^#([0-9a-f]{6})$/i.exec(t);if(!n)return null;const r=Number.parseInt(n[1],16);return[r>>16&255,r>>8&255,255&r]};export const blendOf=(t,n,r,e)=>{const o=channelsOf(t),a=channelsOf(r);if(!o||!a)return e;return`#${o.map((t,r)=>Math.round(t*n+a[r]*(1-n))).map(t=>t.toString(16).padStart(2,"0")).join("")}`.toUpperCase()};
@@ -1 +1 @@
1
- export const smoothCorners={borderCurve:"continuous"};
1
+ "use strict";export const smoothCorners={borderCurve:"continuous"};
@@ -1 +1 @@
1
- export{Breakpoints,isScreenSize,isTablet,ScreenDimensions,useScreenDimensions}from"./responsive.js";
1
+ "use strict";export{Breakpoints,isScreenSize,isTablet,ScreenDimensions,useScreenDimensions}from"./responsive.js";
@@ -1 +1 @@
1
- import{triggerHaptic as e}from"./hapticUtils.js";const t={tap:"impactLight",select:"selection",longPress:"impactMedium",created:"impactMedium",deleted:"notificationWarning",restored:"notificationSuccess",toggledOn:"impactMedium",toggledOff:"impactLight",succeeded:"notificationSuccess",warned:"notificationWarning",failed:"notificationError"};let c=!0;export const configureFeedback=e=>{c=e.haptics};export const isFeedbackEnabled=()=>c;const fire=i=>{c&&e(t[i])};export const hapticForIntent=e=>t[e];export const feedback={tap:()=>fire("tap"),select:()=>fire("select"),longPress:()=>fire("longPress"),created:()=>fire("created"),deleted:()=>fire("deleted"),restored:()=>fire("restored"),toggled:e=>fire(e?"toggledOn":"toggledOff"),succeeded:()=>fire("succeeded"),warned:()=>fire("warned"),failed:()=>fire("failed"),fire:fire};
1
+ "use strict";import{triggerHaptic}from"./hapticUtils.js";const INTENT_HAPTIC={tap:"impactLight",select:"selection",longPress:"impactMedium",created:"impactMedium",deleted:"notificationWarning",restored:"notificationSuccess",toggledOn:"impactMedium",toggledOff:"impactLight",succeeded:"notificationSuccess",warned:"notificationWarning",failed:"notificationError"};let hapticsEnabled=!0;export const configureFeedback=e=>{hapticsEnabled=e.haptics};export const isFeedbackEnabled=()=>hapticsEnabled;const fire=e=>{hapticsEnabled&&triggerHaptic(INTENT_HAPTIC[e])};export const hapticForIntent=e=>INTENT_HAPTIC[e];export const feedback={tap:()=>fire("tap"),select:()=>fire("select"),longPress:()=>fire("longPress"),created:()=>fire("created"),deleted:()=>fire("deleted"),restored:()=>fire("restored"),toggled:e=>fire(e?"toggledOn":"toggledOff"),succeeded:()=>fire("succeeded"),warned:()=>fire("warned"),failed:()=>fire("failed"),fire:fire};
@@ -1 +1 @@
1
- import*as t from"expo-haptics";import{Platform as i,Vibration as c}from"react-native";let n=null;const fallback=t=>{if("android"===i.OS){const i={selection:5,impactLight:10,impactMedium:20,impactHeavy:30,notificationSuccess:15,notificationWarning:25,notificationError:40};try{c.vibrate(i[t]??10)}catch{}}},e={selection:()=>t.selectionAsync(),impactLight:()=>t.impactAsync(t.ImpactFeedbackStyle.Light),impactMedium:()=>t.impactAsync(t.ImpactFeedbackStyle.Medium),impactHeavy:()=>t.impactAsync(t.ImpactFeedbackStyle.Heavy),notificationSuccess:()=>t.notificationAsync(t.NotificationFeedbackType.Success),notificationWarning:()=>t.notificationAsync(t.NotificationFeedbackType.Warning),notificationError:()=>t.notificationAsync(t.NotificationFeedbackType.Error)};export const triggerHaptic=(t="selection")=>{if(n)try{return void n(t)}catch{}const i=e[t];i?i().catch(()=>fallback(t)):fallback(t)};export const setHapticImplementation=t=>{n=t};export const resolveHaptic=(t,i)=>!1===t?null:t??i;
1
+ "use strict";import*as Haptics from"expo-haptics";import{Platform,Vibration}from"react-native";let hapticImpl=null;const fallback=t=>{if("android"===Platform.OS){const i={selection:5,impactLight:10,impactMedium:20,impactHeavy:30,notificationSuccess:15,notificationWarning:25,notificationError:40};try{Vibration.vibrate(i[t]??10)}catch{}}},EXPO_HANDLERS={selection:()=>Haptics.selectionAsync(),impactLight:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light),impactMedium:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),impactHeavy:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy),notificationSuccess:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),notificationWarning:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Warning),notificationError:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error)};export const triggerHaptic=(t="selection")=>{if(hapticImpl)try{return void hapticImpl(t)}catch{}const i=EXPO_HANDLERS[t];i?i().catch(()=>fallback(t)):fallback(t)};export const setHapticImplementation=t=>{hapticImpl=t};export const resolveHaptic=(t,i)=>!1===t?null:t??i;
@@ -1 +1 @@
1
- export const hashString=t=>{let n=2166136261,r=16777619;for(let o=0;o<t.length;o+=1){const e=t.charCodeAt(o);n=Math.imul(n^e,16777619)>>>0,r=(Math.imul(r+e,2654435761)^r>>>7)>>>0}return`${n.toString(16)}${r.toString(16)}${t.length.toString(16)}`};
1
+ "use strict";export const hashString=t=>{let r=2166136261,n=16777619;for(let e=0;e<t.length;e+=1){const o=t.charCodeAt(e);r=Math.imul(r^o,16777619)>>>0,n=(Math.imul(n+o,2654435761)^n>>>7)>>>0}return`${r.toString(16)}${n.toString(16)}${t.length.toString(16)}`};
@@ -1 +1 @@
1
- export{blendOf,tintOf}from"./color.js";export{smoothCorners}from"./corners.js";export{configureFeedback,feedback,hapticForIntent,isFeedbackEnabled}from"./feedback.js";export{resolveHaptic,setHapticImplementation,triggerHaptic}from"./hapticUtils.js";export{mergeRefs}from"./mergeRefs.js";export{Breakpoints,isScreenSize,isTablet,Responsive,ScreenDimensions,useScreenDimensions}from"./responsive.js";export{shadowStyle}from"./shadows.js";export{Margin,Padding,Spacing}from"./spacing.js";export{SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,squircleApplies,squircleHostRadius,squirclePath}from"./squircle.js";export{warnUnknownProps}from"./warnUnknownProps.js";
1
+ "use strict";export{blendOf,tintOf}from"./color.js";export{smoothCorners}from"./corners.js";export{configureFeedback,feedback,hapticForIntent,isFeedbackEnabled}from"./feedback.js";export{resolveHaptic,setHapticImplementation,triggerHaptic}from"./hapticUtils.js";export{mergeRefs}from"./mergeRefs.js";export{Breakpoints,isScreenSize,isTablet,Responsive,ScreenDimensions,useScreenDimensions}from"./responsive.js";export{shadowStyle}from"./shadows.js";export{Margin,Padding,Spacing}from"./spacing.js";export{SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,squircleApplies,squircleHostRadius,squirclePath}from"./squircle.js";export{warnUnknownProps}from"./warnUnknownProps.js";
@@ -1 +1 @@
1
- export const mergeRefs=(...o)=>e=>{for(const n of o)"function"==typeof n?n(e):null!=n&&(n.current=e)};
1
+ "use strict";export const mergeRefs=(...t)=>e=>{for(const o of t)"function"==typeof o?o(e):null!=o&&(o.current=e)};
@@ -1 +1 @@
1
- import{Dimensions as t,PixelRatio as e,Platform as i,useWindowDimensions as n}from"react-native";export const Breakpoints={xs:0,sm:360,md:414,lg:768,xl:1024};const window=()=>t.get("window");export const ScreenDimensions={get width(){return window().width},get height(){return window().height},get pixelRatio(){return e.get()},get fontScale(){return e.getFontScale()}};const responsiveFor=(t,n)=>{const{widthScale:o,heightScale:h,minScale:r}=((t,e)=>{const i=t/390,n=e/844;return{widthScale:i,heightScale:n,minScale:Math.min(i,n)}})(t,n);return{width:t=>Math.round(t*o),height:t=>Math.round(t*h),size:t=>Math.round(t*r),font:t=>((t,n)=>{const o=t*n;return"ios"===i.OS?Math.round(e.roundToNearestPixel(o)):Math.round(e.roundToNearestPixel(o))-1})(t,r)}};export const isScreenSize=t=>window().width>=Breakpoints[t];export const isTablet=()=>window().width>=Breakpoints.lg;export const Responsive={width:t=>responsiveFor(window().width,window().height).width(t),height:t=>responsiveFor(window().width,window().height).height(t),size:t=>responsiveFor(window().width,window().height).size(t),font:t=>responsiveFor(window().width,window().height).font(t)};export const useScreenDimensions=()=>{const{width:t,height:i,fontScale:o}=n();return{width:t,height:i,pixelRatio:e.get(),fontScale:o,isTablet:t>=Breakpoints.lg,isScreenSize:e=>t>=Breakpoints[e],responsive:responsiveFor(t,i)}};
1
+ "use strict";import{Dimensions,PixelRatio,Platform,useWindowDimensions}from"react-native";const BASE_WIDTH=390,BASE_HEIGHT=844;export const Breakpoints={xs:0,sm:360,md:414,lg:768,xl:1024};const window=()=>Dimensions.get("window");export const ScreenDimensions={get width(){return window().width},get height(){return window().height},get pixelRatio(){return PixelRatio.get()},get fontScale(){return PixelRatio.getFontScale()}};const scalesFor=(e,i)=>{const t=e/390,o=i/844;return{widthScale:t,heightScale:o,minScale:Math.min(t,o)}},scaleFont=(e,i)=>{const t=e*i;return"ios"===Platform.OS?Math.round(PixelRatio.roundToNearestPixel(t)):Math.round(PixelRatio.roundToNearestPixel(t))-1},responsiveFor=(e,i)=>{const{widthScale:t,heightScale:o,minScale:n}=scalesFor(e,i);return{width:e=>Math.round(e*t),height:e=>Math.round(e*o),size:e=>Math.round(e*n),font:e=>scaleFont(e,n)}};export const isScreenSize=e=>window().width>=Breakpoints[e];export const isTablet=()=>window().width>=Breakpoints.lg;export const Responsive={width:e=>responsiveFor(window().width,window().height).width(e),height:e=>responsiveFor(window().width,window().height).height(e),size:e=>responsiveFor(window().width,window().height).size(e),font:e=>responsiveFor(window().width,window().height).font(e)};export const useScreenDimensions=()=>{const{width:e,height:i,fontScale:t}=useWindowDimensions();return{width:e,height:i,pixelRatio:PixelRatio.get(),fontScale:t,isTablet:e>=Breakpoints.lg,isScreenSize:i=>e>=Breakpoints[i],responsive:responsiveFor(e,i)}};
@@ -1 +1 @@
1
- import{Platform as t}from"react-native";export const shadowStyle=(t,e)=>t[e];export const supportsBoxShadow=()=>"android"!==t.OS||"number"==typeof t.Version&&t.Version>=28;export const toBoxShadow=t=>{const{shadowColor:e,shadowOffset:o,shadowOpacity:r,shadowRadius:s}=t;if("string"!=typeof e||!r)return;const n=(t=>{const e=t.replace("#",""),o=3===e.length?e.split("").map(t=>t+t).join(""):e;return/^[0-9a-fA-F]{6}$/.test(o)?[Number.parseInt(o.slice(0,2),16),Number.parseInt(o.slice(2,4),16),Number.parseInt(o.slice(4,6),16)]:null})(e);if(!n)return;return`${o?.width??0}px ${o?.height??0}px ${2*(s??0)}px 0px rgba(${n[0]}, ${n[1]}, ${n[2]}, ${r})`};
1
+ "use strict";import{Platform}from"react-native";export const shadowStyle=(t,o)=>t[o];export const supportsBoxShadow=()=>"android"!==Platform.OS||"number"==typeof Platform.Version&&Platform.Version>=28;const hexToRgb=t=>{const o=t.replace("#",""),r=3===o.length?o.split("").map(t=>t+t).join(""):o;return/^[0-9a-fA-F]{6}$/.test(r)?[Number.parseInt(r.slice(0,2),16),Number.parseInt(r.slice(2,4),16),Number.parseInt(r.slice(4,6),16)]:null};export const toBoxShadow=t=>{const{shadowColor:o,shadowOffset:r,shadowOpacity:e,shadowRadius:s}=t;if("string"!=typeof o||!e)return;const a=hexToRgb(o);if(!a)return;return`${r?.width??0}px ${r?.height??0}px ${2*(s??0)}px 0px rgba(${a[0]}, ${a[1]}, ${a[2]}, ${e})`};
@@ -1 +1 @@
1
- import{getTheme as n}from"../theme/index.js";export const Spacing={get none(){return n().spacing.none},get xxs(){return n().spacing.xxs},get xs(){return n().spacing.xs},get sm(){return n().spacing.sm},get md(){return n().spacing.md},get lg(){return n().spacing.lg},get xl(){return n().spacing.xl},get"2xl"(){return n().spacing["2xl"]},get"3xl"(){return n().spacing["3xl"]},get"4xl"(){return n().spacing["4xl"]}};export const Padding={all:g=>({padding:n().spacing[g]}),horizontal:g=>({paddingHorizontal:n().spacing[g]}),vertical:g=>({paddingVertical:n().spacing[g]}),top:g=>({paddingTop:n().spacing[g]}),bottom:g=>({paddingBottom:n().spacing[g]}),left:g=>({paddingLeft:n().spacing[g]}),right:g=>({paddingRight:n().spacing[g]})};export const Margin={all:g=>({margin:n().spacing[g]}),horizontal:g=>({marginHorizontal:n().spacing[g]}),vertical:g=>({marginVertical:n().spacing[g]}),top:g=>({marginTop:n().spacing[g]}),bottom:g=>({marginBottom:n().spacing[g]}),left:g=>({marginLeft:n().spacing[g]}),right:g=>({marginRight:n().spacing[g]})};
1
+ "use strict";import{getTheme}from"../theme/index.js";export const Spacing={get none(){return getTheme().spacing.none},get xxs(){return getTheme().spacing.xxs},get xs(){return getTheme().spacing.xs},get sm(){return getTheme().spacing.sm},get md(){return getTheme().spacing.md},get lg(){return getTheme().spacing.lg},get xl(){return getTheme().spacing.xl},get"2xl"(){return getTheme().spacing["2xl"]},get"3xl"(){return getTheme().spacing["3xl"]},get"4xl"(){return getTheme().spacing["4xl"]}};export const Padding={all:e=>({padding:getTheme().spacing[e]}),horizontal:e=>({paddingHorizontal:getTheme().spacing[e]}),vertical:e=>({paddingVertical:getTheme().spacing[e]}),top:e=>({paddingTop:getTheme().spacing[e]}),bottom:e=>({paddingBottom:getTheme().spacing[e]}),left:e=>({paddingLeft:getTheme().spacing[e]}),right:e=>({paddingRight:getTheme().spacing[e]})};export const Margin={all:e=>({margin:getTheme().spacing[e]}),horizontal:e=>({marginHorizontal:getTheme().spacing[e]}),vertical:e=>({marginVertical:getTheme().spacing[e]}),top:e=>({marginTop:getTheme().spacing[e]}),bottom:e=>({marginBottom:getTheme().spacing[e]}),left:e=>({marginLeft:getTheme().spacing[e]}),right:e=>({marginRight:getTheme().spacing[e]})};
@@ -1 +1 @@
1
- export const SQUIRCLE_SMOOTHING=.6;export const SQUIRCLE_MIN_RADIUS=6;export const squircleApplies=($,t,a)=>a>=6&&$>0&&t>0&&2*a<Math.min($,t);export const squircleHostRadius=($,t,a)=>Math.min(2*a,Math.min($,t)/2);const toRadians=$=>$*Math.PI/180,num=$=>{const t=$.toFixed(4);return"-0.0000"===t?"0.0000":t};export function squirclePath({width:$,height:t,radius:a,smoothing:n=.6,inset:c=0}){const e=Math.max(0,$-2*c),i=Math.max(0,t-2*c),r=c,o=c,h=Math.max(0,a-c),s=Math.min(e,i)/2,M=Math.min(h,s);if(M<=0)return`M ${num(r)} ${num(o)} L ${num(r+e)} ${num(o)} L ${num(r+e)} ${num(o+i)} L ${num(r)} ${num(o+i)} Z`;const u=(($,t,a)=>{let n=(1+t)*$;const c=a/$-1,e=Math.min(t,c);n=Math.min(n,a);const i=90*(1-e),r=Math.sin(toRadians(i/2))*$*Math.SQRT2,o=(90-i)/2,h=45*e,s=$*Math.tan(toRadians(o/2))*Math.cos(toRadians(h)),M=s*Math.tan(toRadians(h)),u=(n-r-s-M)/3;return{a:2*u,b:u,c:s,d:M,p:n,arcSectionLength:r,cornerRadius:$}})(M,Math.min(1,Math.max(0,n)),s),{p:d}=u;return`M ${num(r+e-d)} ${num(o)} ${(({cornerRadius:$,a:t,b:a,c:n,d:c,arcSectionLength:e})=>`c ${num(t)} 0 ${num(t+a)} 0 ${num(t+a+n)} ${num(c)} a ${num($)} ${num($)} 0 0 1 ${num(e)} ${num(e)} c ${num(c)} ${num(n)} ${num(c)} ${num(a+n)} ${num(c)} ${num(t+a+n)}`)(u)} L ${num(r+e)} ${num(o+i-d)} ${(({cornerRadius:$,a:t,b:a,c:n,d:c,arcSectionLength:e})=>`c 0 ${num(t)} 0 ${num(t+a)} ${num(-c)} ${num(t+a+n)} a ${num($)} ${num($)} 0 0 1 ${num(-e)} ${num(e)} c ${num(-n)} ${num(c)} ${num(-(a+n))} ${num(c)} ${num(-(t+a+n))} ${num(c)}`)(u)} L ${num(r+d)} ${num(o+i)} ${(({cornerRadius:$,a:t,b:a,c:n,d:c,arcSectionLength:e})=>`c ${num(-t)} 0 ${num(-(t+a))} 0 ${num(-(t+a+n))} ${num(-c)} a ${num($)} ${num($)} 0 0 1 ${num(-e)} ${num(-e)} c ${num(-c)} ${num(-n)} ${num(-c)} ${num(-(a+n))} ${num(-c)} ${num(-(t+a+n))}`)(u)} L ${num(r)} ${num(o+d)} ${(({cornerRadius:$,a:t,b:a,c:n,d:c,arcSectionLength:e})=>`c 0 ${num(-t)} 0 ${num(-(t+a))} ${num(c)} ${num(-(t+a+n))} a ${num($)} ${num($)} 0 0 1 ${num(e)} ${num(-e)} c ${num(n)} ${num(-c)} ${num(a+n)} ${num(-c)} ${num(t+a+n)} ${num(-c)}`)(u)} Z`}
1
+ "use strict";export const SQUIRCLE_SMOOTHING=.6;export const SQUIRCLE_MIN_RADIUS=6;export const squircleApplies=(n,m,u)=>u>=6&&n>0&&m>0&&2*u<Math.min(n,m);export const squircleHostRadius=(n,m,u)=>Math.min(2*u,Math.min(n,m)/2);const toRadians=n=>n*Math.PI/180,num=n=>{const m=n.toFixed(4);return"-0.0000"===m?"0.0000":m},cornerParams=(n,m,u)=>{let t=(1+m)*n;const $=u/n-1,a=Math.min(m,$);t=Math.min(t,u);const o=90*(1-a),c=Math.sin(toRadians(o/2))*n*Math.SQRT2,i=(90-o)/2,e=45*a,r=n*Math.tan(toRadians(i/2))*Math.cos(toRadians(e)),s=r*Math.tan(toRadians(e)),h=(t-c-r-s)/3;return{a:2*h,b:h,c:r,d:s,p:t,arcSectionLength:c,cornerRadius:n}},topRight=({cornerRadius:n,a:m,b:u,c:t,d:$,arcSectionLength:a})=>`c ${num(m)} 0 ${num(m+u)} 0 ${num(m+u+t)} ${num($)} a ${num(n)} ${num(n)} 0 0 1 ${num(a)} ${num(a)} c ${num($)} ${num(t)} ${num($)} ${num(u+t)} ${num($)} ${num(m+u+t)}`,bottomRight=({cornerRadius:n,a:m,b:u,c:t,d:$,arcSectionLength:a})=>`c 0 ${num(m)} 0 ${num(m+u)} ${num(-$)} ${num(m+u+t)} a ${num(n)} ${num(n)} 0 0 1 ${num(-a)} ${num(a)} c ${num(-t)} ${num($)} ${num(-(u+t))} ${num($)} ${num(-(m+u+t))} ${num($)}`,bottomLeft=({cornerRadius:n,a:m,b:u,c:t,d:$,arcSectionLength:a})=>`c ${num(-m)} 0 ${num(-(m+u))} 0 ${num(-(m+u+t))} ${num(-$)} a ${num(n)} ${num(n)} 0 0 1 ${num(-a)} ${num(-a)} c ${num(-$)} ${num(-t)} ${num(-$)} ${num(-(u+t))} ${num(-$)} ${num(-(m+u+t))}`,topLeft=({cornerRadius:n,a:m,b:u,c:t,d:$,arcSectionLength:a})=>`c 0 ${num(-m)} 0 ${num(-(m+u))} ${num($)} ${num(-(m+u+t))} a ${num(n)} ${num(n)} 0 0 1 ${num(a)} ${num(-a)} c ${num(t)} ${num(-$)} ${num(u+t)} ${num(-$)} ${num(m+u+t)} ${num(-$)}`;export function squirclePath({width:n,height:m,radius:u,smoothing:t=.6,inset:$=0}){const a=Math.max(0,n-2*$),o=Math.max(0,m-2*$),c=$,i=$,e=Math.max(0,u-$),r=Math.min(a,o)/2,s=Math.min(e,r);if(s<=0)return`M ${num(c)} ${num(i)} L ${num(c+a)} ${num(i)} L ${num(c+a)} ${num(i+o)} L ${num(c)} ${num(i+o)} Z`;const h=cornerParams(s,Math.min(1,Math.max(0,t)),r),{p:M}=h;return`M ${num(c+a-M)} ${num(i)} ${topRight(h)} L ${num(c+a)} ${num(i+o-M)} ${bottomRight(h)} L ${num(c+M)} ${num(i+o)} ${bottomLeft(h)} L ${num(c)} ${num(i+M)} ${topLeft(h)} Z`}
@@ -1 +1 @@
1
- import{Logger as e}from"@webority/mobile-core";export const warnUnknownProps=(o,t)=>{if(!__DEV__||!t)return;const r=Object.keys(t).filter(e=>!isAllowed(e));0!==r.length&&e.warn(`[${o}] received prop(s) it does not accept: ${r.join(", ")}. They were ignored — check for a rename or a typo against the component's props.`)};const o=new Set(["children","key","ref","style","testID","collapsable","nativeID","pointerEvents","removeClippedSubviews","renderToHardwareTextureAndroid","shouldRasterizeIOS","needsOffscreenAlphaCompositing","hitSlop","onLayout","importantForAccessibility","role"]),t=["accessibility","aria-","on","data-"],isAllowed=e=>o.has(e)||t.some(o=>e.startsWith(o));
1
+ "use strict";import{Logger}from"@webority/mobile-core";export const warnUnknownProps=(e,o)=>{if(!__DEV__||!o)return;const r=Object.keys(o).filter(e=>!isAllowed(e));0!==r.length&&Logger.warn(`[${e}] received prop(s) it does not accept: ${r.join(", ")}. They were ignored — check for a rename or a typo against the component's props.`)};const ALLOWED_EXACT=new Set(["children","key","ref","style","testID","collapsable","nativeID","pointerEvents","removeClippedSubviews","renderToHardwareTextureAndroid","shouldRasterizeIOS","needsOffscreenAlphaCompositing","hitSlop","onLayout","importantForAccessibility","role"]),ALLOWED_PREFIXES=["accessibility","aria-","on","data-"],isAllowed=e=>ALLOWED_EXACT.has(e)||ALLOWED_PREFIXES.some(o=>e.startsWith(o));
@@ -20,7 +20,12 @@ export type ButtonVariant = 'solid' | 'soft' | 'outline' | 'ghost' | 'link' | 'g
20
20
  export type ButtonTone = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'neutral';
21
21
  export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
22
22
  export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'> {
23
+ /** The label, and the button's accessible name unless `accessibilityLabel` is set. */
23
24
  title?: string;
25
+ /**
26
+ * Custom content drawn in place of the label when there is no `title`. Never the label as text:
27
+ * development builds throw on a text child, which would otherwise draw a blank, unnamed button.
28
+ */
24
29
  children?: React.ReactNode;
25
30
  variant?: ButtonVariant;
26
31
  tone?: ButtonTone;
@@ -20,7 +20,12 @@ export type ButtonVariant = 'solid' | 'soft' | 'outline' | 'ghost' | 'link' | 'g
20
20
  export type ButtonTone = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'neutral';
21
21
  export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
22
22
  export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'> {
23
+ /** The label, and the button's accessible name unless `accessibilityLabel` is set. */
23
24
  title?: string;
25
+ /**
26
+ * Custom content drawn in place of the label when there is no `title`. Never the label as text:
27
+ * development builds throw on a text child, which would otherwise draw a blank, unnamed button.
28
+ */
24
29
  children?: React.ReactNode;
25
30
  variant?: ButtonVariant;
26
31
  tone?: ButtonTone;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/mobile-ui",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Beautiful, animated, accessible React Native components, theme and form engine for Webority projects.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -68,7 +68,7 @@
68
68
  "typecheck": "tsc --noEmit"
69
69
  },
70
70
  "peerDependencies": {
71
- "@webority/mobile-core": ">=0.1.0 <0.2.0",
71
+ "@webority/mobile-core": ">=0.2.0 <0.3.0",
72
72
  "expo": ">=57.0.0",
73
73
  "expo-file-system": ">=57.0.0",
74
74
  "expo-haptics": ">=57.0.0",