@thewhileloop/whileui 1.2.2 → 2.0.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 (688) hide show
  1. package/README.md +248 -85
  2. package/dist/blocks/chat/chat.d.ts +3 -4
  3. package/dist/blocks/chat/chat.js +29 -17
  4. package/dist/blocks/chat/index.d.ts +0 -1
  5. package/dist/blocks/chat/index.js +0 -1
  6. package/dist/blocks/commerce/checkout-summary.d.ts +1 -2
  7. package/dist/blocks/commerce/checkout-summary.js +16 -4
  8. package/dist/blocks/commerce/feature-gate.d.ts +1 -2
  9. package/dist/blocks/commerce/feature-gate.js +14 -4
  10. package/dist/blocks/commerce/index.d.ts +0 -1
  11. package/dist/blocks/commerce/index.js +0 -1
  12. package/dist/blocks/commerce/metric-card.d.ts +3 -4
  13. package/dist/blocks/commerce/metric-card.js +7 -3
  14. package/dist/blocks/commerce/plan-toggle.d.ts +1 -2
  15. package/dist/blocks/commerce/plan-toggle.js +11 -9
  16. package/dist/blocks/commerce/pricing-card.d.ts +1 -2
  17. package/dist/blocks/commerce/pricing-card.js +23 -6
  18. package/dist/blocks/commerce/product-card.d.ts +1 -2
  19. package/dist/blocks/commerce/product-card.js +23 -9
  20. package/dist/blocks/commerce/subscription-card.d.ts +1 -2
  21. package/dist/blocks/commerce/subscription-card.js +6 -3
  22. package/dist/blocks/commerce/upgrade-banner.d.ts +1 -2
  23. package/dist/blocks/commerce/upgrade-banner.js +13 -3
  24. package/dist/blocks/commerce/usage-bar.d.ts +1 -2
  25. package/dist/blocks/commerce/usage-bar.js +4 -2
  26. package/dist/blocks/datepicker/date-range-picker-modal.d.ts +2 -3
  27. package/dist/blocks/datepicker/date-range-picker-modal.js +33 -7
  28. package/dist/blocks/datepicker/datepicker-inline.d.ts +1 -2
  29. package/dist/blocks/datepicker/datepicker-inline.js +9 -3
  30. package/dist/blocks/datepicker/datepicker-modal.d.ts +2 -3
  31. package/dist/blocks/datepicker/datepicker-modal.js +49 -17
  32. package/dist/blocks/datepicker/index.d.ts +0 -1
  33. package/dist/blocks/datepicker/index.js +0 -1
  34. package/dist/blocks/datepicker/use-calendar-theme.d.ts +0 -1
  35. package/dist/blocks/datepicker/use-calendar-theme.js +0 -1
  36. package/dist/blocks/layout/action-bar.d.ts +1 -2
  37. package/dist/blocks/layout/action-bar.js +0 -1
  38. package/dist/blocks/layout/app-shell.d.ts +1 -2
  39. package/dist/blocks/layout/app-shell.js +11 -5
  40. package/dist/blocks/layout/confirm-action-sheet.d.ts +1 -2
  41. package/dist/blocks/layout/confirm-action-sheet.js +18 -6
  42. package/dist/blocks/layout/content-skeleton.d.ts +1 -2
  43. package/dist/blocks/layout/content-skeleton.js +22 -9
  44. package/dist/blocks/layout/docked-input.d.ts +11 -0
  45. package/dist/blocks/layout/docked-input.js +27 -0
  46. package/dist/blocks/layout/empty-state.d.ts +1 -2
  47. package/dist/blocks/layout/empty-state.js +10 -5
  48. package/dist/blocks/layout/error-boundary.d.ts +1 -2
  49. package/dist/blocks/layout/error-boundary.js +0 -2
  50. package/dist/blocks/layout/error-state.d.ts +1 -2
  51. package/dist/blocks/layout/error-state.js +0 -2
  52. package/dist/blocks/layout/form-modal-screen.d.ts +1 -2
  53. package/dist/blocks/layout/form-modal-screen.js +24 -21
  54. package/dist/blocks/layout/index.d.ts +2 -2
  55. package/dist/blocks/layout/index.js +2 -2
  56. package/dist/blocks/layout/keyboard-aware-screen.d.ts +14 -0
  57. package/dist/blocks/layout/keyboard-aware-screen.js +12 -0
  58. package/dist/blocks/layout/loading-screen.d.ts +1 -2
  59. package/dist/blocks/layout/loading-screen.js +6 -8
  60. package/dist/blocks/layout/page-skeleton.d.ts +1 -2
  61. package/dist/blocks/layout/page-skeleton.js +38 -20
  62. package/dist/blocks/layout/pull-to-refresh-scroll-view.d.ts +8 -4
  63. package/dist/blocks/layout/pull-to-refresh-scroll-view.js +17 -4
  64. package/dist/blocks/layout/screen-skeleton.d.ts +1 -2
  65. package/dist/blocks/layout/screen-skeleton.js +0 -1
  66. package/dist/blocks/layout/sheet.d.ts +9 -9
  67. package/dist/blocks/layout/sheet.js +51 -21
  68. package/dist/blocks/layout/smart-input.d.ts +6 -1
  69. package/dist/blocks/layout/smart-input.js +121 -9
  70. package/dist/blocks/lists/index.d.ts +0 -2
  71. package/dist/blocks/lists/index.js +0 -2
  72. package/dist/blocks/lists/list-item.d.ts +1 -2
  73. package/dist/blocks/lists/list-item.js +20 -6
  74. package/dist/blocks/lists/notification-item.d.ts +1 -2
  75. package/dist/blocks/lists/notification-item.js +19 -6
  76. package/dist/blocks/lists/timeline-feed.d.ts +1 -2
  77. package/dist/blocks/lists/timeline-feed.js +4 -2
  78. package/dist/blocks/media/index.d.ts +0 -1
  79. package/dist/blocks/media/index.js +0 -1
  80. package/dist/blocks/media/smart-image.d.ts +0 -1
  81. package/dist/blocks/media/smart-image.js +24 -8
  82. package/dist/blocks/navigation/bottom-nav.d.ts +1 -2
  83. package/dist/blocks/navigation/bottom-nav.js +7 -4
  84. package/dist/blocks/navigation/drawer-menu.d.ts +1 -2
  85. package/dist/blocks/navigation/drawer-menu.js +52 -15
  86. package/dist/blocks/navigation/floating-bottom-nav.d.ts +1 -2
  87. package/dist/blocks/navigation/floating-bottom-nav.js +14 -5
  88. package/dist/blocks/navigation/header.d.ts +2 -3
  89. package/dist/blocks/navigation/header.js +13 -5
  90. package/dist/blocks/navigation/index.d.ts +0 -2
  91. package/dist/blocks/navigation/index.js +0 -2
  92. package/dist/blocks/navigation/tab-bar.d.ts +1 -2
  93. package/dist/blocks/navigation/tab-bar.js +22 -10
  94. package/dist/blocks/splash/index.d.ts +0 -1
  95. package/dist/blocks/splash/index.js +0 -1
  96. package/dist/blocks/splash/splash-screen.d.ts +3 -4
  97. package/dist/blocks/splash/splash-screen.js +15 -11
  98. package/dist/components/accordion/accordion.d.ts +4 -5
  99. package/dist/components/accordion/accordion.js +6 -7
  100. package/dist/components/accordion/index.d.ts +0 -1
  101. package/dist/components/accordion/index.js +0 -1
  102. package/dist/components/alert/alert.d.ts +2 -3
  103. package/dist/components/alert/alert.js +19 -8
  104. package/dist/components/alert/index.d.ts +0 -1
  105. package/dist/components/alert/index.js +0 -1
  106. package/dist/components/alert-dialog/alert-dialog.d.ts +16 -12
  107. package/dist/components/alert-dialog/alert-dialog.js +184 -49
  108. package/dist/components/alert-dialog/index.d.ts +0 -1
  109. package/dist/components/alert-dialog/index.js +0 -1
  110. package/dist/components/aspect-ratio/aspect-ratio.d.ts +1 -2
  111. package/dist/components/aspect-ratio/aspect-ratio.js +0 -3
  112. package/dist/components/aspect-ratio/index.d.ts +0 -1
  113. package/dist/components/aspect-ratio/index.js +0 -1
  114. package/dist/components/avatar/avatar.d.ts +2 -3
  115. package/dist/components/avatar/avatar.js +7 -8
  116. package/dist/components/avatar/index.d.ts +0 -1
  117. package/dist/components/avatar/index.js +0 -1
  118. package/dist/components/badge/badge.d.ts +6 -7
  119. package/dist/components/badge/badge.js +21 -9
  120. package/dist/components/badge/index.d.ts +0 -1
  121. package/dist/components/badge/index.js +0 -1
  122. package/dist/components/button/button.d.ts +11 -10
  123. package/dist/components/button/button.js +62 -33
  124. package/dist/components/button/index.d.ts +0 -1
  125. package/dist/components/button/index.js +0 -1
  126. package/dist/components/card/card.d.ts +5 -3
  127. package/dist/components/card/card.js +28 -14
  128. package/dist/components/card/index.d.ts +0 -1
  129. package/dist/components/card/index.js +0 -1
  130. package/dist/components/checkbox/checkbox.d.ts +1 -2
  131. package/dist/components/checkbox/checkbox.js +15 -2
  132. package/dist/components/checkbox/index.d.ts +0 -1
  133. package/dist/components/checkbox/index.js +0 -1
  134. package/dist/components/collapsible/collapsible.d.ts +4 -4
  135. package/dist/components/collapsible/collapsible.js +8 -11
  136. package/dist/components/collapsible/index.d.ts +0 -1
  137. package/dist/components/collapsible/index.js +0 -1
  138. package/dist/components/container/container.d.ts +146 -0
  139. package/dist/components/container/container.js +43 -0
  140. package/dist/components/container/index.d.ts +1 -0
  141. package/dist/components/container/index.js +1 -0
  142. package/dist/components/context-menu/context-menu.d.ts +6 -7
  143. package/dist/components/context-menu/context-menu.js +42 -12
  144. package/dist/components/context-menu/index.d.ts +0 -1
  145. package/dist/components/context-menu/index.js +0 -1
  146. package/dist/components/data-row/data-row.d.ts +0 -1
  147. package/dist/components/data-row/data-row.js +35 -17
  148. package/dist/components/data-row/index.d.ts +0 -1
  149. package/dist/components/data-row/index.js +0 -1
  150. package/dist/components/dialog/dialog.d.ts +8 -9
  151. package/dist/components/dialog/dialog.js +48 -24
  152. package/dist/components/dialog/index.d.ts +0 -1
  153. package/dist/components/dialog/index.js +0 -1
  154. package/dist/components/dropdown-menu/dropdown-menu.d.ts +6 -7
  155. package/dist/components/dropdown-menu/dropdown-menu.js +45 -11
  156. package/dist/components/dropdown-menu/index.d.ts +0 -1
  157. package/dist/components/dropdown-menu/index.js +0 -1
  158. package/dist/components/form-field/form-field.d.ts +0 -1
  159. package/dist/components/form-field/form-field.js +26 -13
  160. package/dist/components/form-field/index.d.ts +0 -1
  161. package/dist/components/form-field/index.js +0 -1
  162. package/dist/components/hover-card/hover-card.d.ts +1 -2
  163. package/dist/components/hover-card/hover-card.js +12 -3
  164. package/dist/components/hover-card/index.d.ts +0 -1
  165. package/dist/components/hover-card/index.js +0 -1
  166. package/dist/components/input/index.d.ts +0 -1
  167. package/dist/components/input/index.js +0 -1
  168. package/dist/components/input/input.d.ts +2 -3
  169. package/dist/components/input/input.js +18 -3
  170. package/dist/components/label/index.d.ts +0 -1
  171. package/dist/components/label/index.js +0 -1
  172. package/dist/components/label/label.d.ts +0 -1
  173. package/dist/components/label/label.js +0 -1
  174. package/dist/components/labeled-field/index.d.ts +0 -1
  175. package/dist/components/labeled-field/index.js +0 -1
  176. package/dist/components/labeled-field/labeled-field.d.ts +1 -2
  177. package/dist/components/labeled-field/labeled-field.js +10 -2
  178. package/dist/components/menubar/index.d.ts +0 -1
  179. package/dist/components/menubar/index.js +0 -1
  180. package/dist/components/menubar/menubar.d.ts +7 -8
  181. package/dist/components/menubar/menubar.js +48 -15
  182. package/dist/components/numeric-input/index.d.ts +0 -1
  183. package/dist/components/numeric-input/index.js +0 -1
  184. package/dist/components/numeric-input/numeric-input.d.ts +6 -5
  185. package/dist/components/numeric-input/numeric-input.js +55 -26
  186. package/dist/components/otp-input/index.d.ts +0 -1
  187. package/dist/components/otp-input/index.js +0 -1
  188. package/dist/components/otp-input/otp-input.d.ts +3 -4
  189. package/dist/components/otp-input/otp-input.js +13 -9
  190. package/dist/components/popover/index.d.ts +0 -1
  191. package/dist/components/popover/index.js +0 -1
  192. package/dist/components/popover/popover.d.ts +4 -2
  193. package/dist/components/popover/popover.js +21 -4
  194. package/dist/components/pressable/index.d.ts +0 -1
  195. package/dist/components/pressable/index.js +0 -1
  196. package/dist/components/pressable/pressable.d.ts +7 -1
  197. package/dist/components/pressable/pressable.js +47 -4
  198. package/dist/components/progress/index.d.ts +0 -1
  199. package/dist/components/progress/index.js +0 -1
  200. package/dist/components/progress/progress.d.ts +0 -1
  201. package/dist/components/progress/progress.js +5 -2
  202. package/dist/components/radio-group/index.d.ts +0 -1
  203. package/dist/components/radio-group/index.js +0 -1
  204. package/dist/components/radio-group/radio-group.d.ts +2 -3
  205. package/dist/components/radio-group/radio-group.js +16 -7
  206. package/dist/components/row/index.d.ts +0 -1
  207. package/dist/components/row/index.js +0 -1
  208. package/dist/components/row/row.d.ts +0 -1
  209. package/dist/components/row/row.js +0 -1
  210. package/dist/components/segmented-control/index.d.ts +0 -1
  211. package/dist/components/segmented-control/index.js +0 -1
  212. package/dist/components/segmented-control/segmented-control.d.ts +7 -8
  213. package/dist/components/segmented-control/segmented-control.js +57 -24
  214. package/dist/components/select/index.d.ts +0 -1
  215. package/dist/components/select/index.js +0 -1
  216. package/dist/components/select/select.d.ts +15 -7
  217. package/dist/components/select/select.js +53 -11
  218. package/dist/components/separator/index.d.ts +0 -1
  219. package/dist/components/separator/index.js +0 -1
  220. package/dist/components/separator/separator.d.ts +0 -1
  221. package/dist/components/separator/separator.js +0 -1
  222. package/dist/components/skeleton/index.d.ts +0 -1
  223. package/dist/components/skeleton/index.js +0 -1
  224. package/dist/components/skeleton/skeleton.d.ts +3 -4
  225. package/dist/components/skeleton/skeleton.js +7 -8
  226. package/dist/components/spinner/index.d.ts +0 -1
  227. package/dist/components/spinner/index.js +0 -1
  228. package/dist/components/spinner/spinner.d.ts +1 -2
  229. package/dist/components/spinner/spinner.js +4 -2
  230. package/dist/components/stack/index.d.ts +0 -1
  231. package/dist/components/stack/index.js +0 -1
  232. package/dist/components/stack/stack.d.ts +0 -1
  233. package/dist/components/stack/stack.js +0 -1
  234. package/dist/components/switch/index.d.ts +0 -1
  235. package/dist/components/switch/index.js +0 -1
  236. package/dist/components/switch/switch.d.ts +1 -2
  237. package/dist/components/switch/switch.js +21 -2
  238. package/dist/components/tabs/index.d.ts +0 -1
  239. package/dist/components/tabs/index.js +0 -1
  240. package/dist/components/tabs/tabs.d.ts +6 -7
  241. package/dist/components/tabs/tabs.js +42 -12
  242. package/dist/components/text/index.d.ts +0 -1
  243. package/dist/components/text/index.js +0 -1
  244. package/dist/components/text/text.d.ts +0 -1
  245. package/dist/components/text/text.js +0 -1
  246. package/dist/components/textarea/index.d.ts +0 -1
  247. package/dist/components/textarea/index.js +0 -1
  248. package/dist/components/textarea/textarea.d.ts +2 -3
  249. package/dist/components/textarea/textarea.js +16 -8
  250. package/dist/components/toast/index.d.ts +0 -1
  251. package/dist/components/toast/index.js +0 -1
  252. package/dist/components/toast/toast.d.ts +5 -6
  253. package/dist/components/toast/toast.js +40 -24
  254. package/dist/components/toggle/index.d.ts +0 -1
  255. package/dist/components/toggle/index.js +0 -1
  256. package/dist/components/toggle/toggle.d.ts +6 -7
  257. package/dist/components/toggle/toggle.js +32 -16
  258. package/dist/components/toggle-group/index.d.ts +0 -1
  259. package/dist/components/toggle-group/index.js +0 -1
  260. package/dist/components/toggle-group/toggle-group.d.ts +7 -8
  261. package/dist/components/toggle-group/toggle-group.js +36 -19
  262. package/dist/components/tooltip/index.d.ts +0 -1
  263. package/dist/components/tooltip/index.js +0 -1
  264. package/dist/components/tooltip/tooltip.d.ts +1 -2
  265. package/dist/components/tooltip/tooltip.js +20 -3
  266. package/dist/components/view/index.d.ts +0 -1
  267. package/dist/components/view/index.js +0 -1
  268. package/dist/components/view/view.d.ts +0 -1
  269. package/dist/components/view/view.js +0 -1
  270. package/dist/index.d.ts +9 -3
  271. package/dist/index.js +9 -7
  272. package/dist/lib/cn.d.ts +0 -1
  273. package/dist/lib/cn.js +0 -1
  274. package/dist/lib/compose-event-handlers.d.ts +15 -0
  275. package/dist/lib/compose-event-handlers.js +20 -0
  276. package/dist/lib/focus-ring.d.ts +25 -0
  277. package/dist/lib/focus-ring.js +25 -0
  278. package/dist/lib/font-context.d.ts +1 -1
  279. package/dist/lib/font-context.js +6 -4
  280. package/dist/lib/frosted-surface.d.ts +0 -1
  281. package/dist/lib/frosted-surface.js +31 -6
  282. package/dist/lib/interaction-tokens.d.ts +12 -1
  283. package/dist/lib/interaction-tokens.js +27 -13
  284. package/dist/lib/motion-policy.d.ts +25 -0
  285. package/dist/lib/motion-policy.js +97 -0
  286. package/dist/lib/overlay-insets.d.ts +17 -0
  287. package/dist/lib/overlay-insets.js +23 -0
  288. package/dist/lib/portal.d.ts +0 -1
  289. package/dist/lib/portal.js +0 -1
  290. package/dist/lib/react-native-classname.d.ts +0 -1
  291. package/dist/lib/react-native-classname.js +0 -1
  292. package/dist/lib/recipes.d.ts +30 -0
  293. package/dist/lib/recipes.js +138 -0
  294. package/dist/lib/tap-only.d.ts +11 -0
  295. package/dist/lib/tap-only.js +24 -0
  296. package/dist/lib/theme-bridge.d.ts +0 -1
  297. package/dist/lib/theme-bridge.js +11 -3
  298. package/dist/lib/theme-colors.d.ts +2 -46
  299. package/dist/lib/theme-colors.js +25 -226
  300. package/dist/lib/theme-contract.d.ts +78 -0
  301. package/dist/lib/theme-contract.js +481 -0
  302. package/dist/lib/theme-derive.d.ts +4 -0
  303. package/dist/lib/theme-derive.js +80 -0
  304. package/dist/lib/theme-presets.d.ts +31 -0
  305. package/dist/lib/theme-presets.js +221 -0
  306. package/dist/lib/tv.d.ts +0 -1
  307. package/dist/lib/tv.js +0 -1
  308. package/dist/lib/visual-token-contract.d.ts +110 -0
  309. package/dist/lib/visual-token-contract.js +583 -0
  310. package/dist/lib/visual-tokens.d.ts +2 -38
  311. package/dist/lib/visual-tokens.js +22 -75
  312. package/dist/tokens.d.ts +4 -0
  313. package/dist/tokens.js +6 -0
  314. package/dist/vite.d.ts +0 -1
  315. package/dist/vite.js +0 -1
  316. package/package.json +30 -20
  317. package/dist/blocks/auth/forgot-password-form.d.ts +0 -10
  318. package/dist/blocks/auth/forgot-password-form.d.ts.map +0 -1
  319. package/dist/blocks/auth/forgot-password-form.js +0 -17
  320. package/dist/blocks/auth/forgot-password-form.js.map +0 -1
  321. package/dist/blocks/auth/index.d.ts +0 -8
  322. package/dist/blocks/auth/index.d.ts.map +0 -1
  323. package/dist/blocks/auth/index.js +0 -8
  324. package/dist/blocks/auth/index.js.map +0 -1
  325. package/dist/blocks/auth/reset-password-form.d.ts +0 -9
  326. package/dist/blocks/auth/reset-password-form.d.ts.map +0 -1
  327. package/dist/blocks/auth/reset-password-form.js +0 -16
  328. package/dist/blocks/auth/reset-password-form.js.map +0 -1
  329. package/dist/blocks/auth/sign-in-form.d.ts +0 -17
  330. package/dist/blocks/auth/sign-in-form.d.ts.map +0 -1
  331. package/dist/blocks/auth/sign-in-form.js +0 -19
  332. package/dist/blocks/auth/sign-in-form.js.map +0 -1
  333. package/dist/blocks/auth/sign-up-form.d.ts +0 -17
  334. package/dist/blocks/auth/sign-up-form.d.ts.map +0 -1
  335. package/dist/blocks/auth/sign-up-form.js +0 -21
  336. package/dist/blocks/auth/sign-up-form.js.map +0 -1
  337. package/dist/blocks/auth/social-connections.d.ts +0 -10
  338. package/dist/blocks/auth/social-connections.d.ts.map +0 -1
  339. package/dist/blocks/auth/social-connections.js +0 -8
  340. package/dist/blocks/auth/social-connections.js.map +0 -1
  341. package/dist/blocks/auth/user-menu.d.ts +0 -12
  342. package/dist/blocks/auth/user-menu.d.ts.map +0 -1
  343. package/dist/blocks/auth/user-menu.js +0 -10
  344. package/dist/blocks/auth/user-menu.js.map +0 -1
  345. package/dist/blocks/auth/verify-email-form.d.ts +0 -10
  346. package/dist/blocks/auth/verify-email-form.d.ts.map +0 -1
  347. package/dist/blocks/auth/verify-email-form.js +0 -17
  348. package/dist/blocks/auth/verify-email-form.js.map +0 -1
  349. package/dist/blocks/chat/chat.d.ts.map +0 -1
  350. package/dist/blocks/chat/chat.js.map +0 -1
  351. package/dist/blocks/chat/index.d.ts.map +0 -1
  352. package/dist/blocks/chat/index.js.map +0 -1
  353. package/dist/blocks/commerce/checkout-summary.d.ts.map +0 -1
  354. package/dist/blocks/commerce/checkout-summary.js.map +0 -1
  355. package/dist/blocks/commerce/feature-gate.d.ts.map +0 -1
  356. package/dist/blocks/commerce/feature-gate.js.map +0 -1
  357. package/dist/blocks/commerce/index.d.ts.map +0 -1
  358. package/dist/blocks/commerce/index.js.map +0 -1
  359. package/dist/blocks/commerce/metric-card.d.ts.map +0 -1
  360. package/dist/blocks/commerce/metric-card.js.map +0 -1
  361. package/dist/blocks/commerce/plan-toggle.d.ts.map +0 -1
  362. package/dist/blocks/commerce/plan-toggle.js.map +0 -1
  363. package/dist/blocks/commerce/pricing-card.d.ts.map +0 -1
  364. package/dist/blocks/commerce/pricing-card.js.map +0 -1
  365. package/dist/blocks/commerce/product-card.d.ts.map +0 -1
  366. package/dist/blocks/commerce/product-card.js.map +0 -1
  367. package/dist/blocks/commerce/subscription-card.d.ts.map +0 -1
  368. package/dist/blocks/commerce/subscription-card.js.map +0 -1
  369. package/dist/blocks/commerce/upgrade-banner.d.ts.map +0 -1
  370. package/dist/blocks/commerce/upgrade-banner.js.map +0 -1
  371. package/dist/blocks/commerce/usage-bar.d.ts.map +0 -1
  372. package/dist/blocks/commerce/usage-bar.js.map +0 -1
  373. package/dist/blocks/datepicker/date-range-picker-modal.d.ts.map +0 -1
  374. package/dist/blocks/datepicker/date-range-picker-modal.js.map +0 -1
  375. package/dist/blocks/datepicker/datepicker-inline.d.ts.map +0 -1
  376. package/dist/blocks/datepicker/datepicker-inline.js.map +0 -1
  377. package/dist/blocks/datepicker/datepicker-modal.d.ts.map +0 -1
  378. package/dist/blocks/datepicker/datepicker-modal.js.map +0 -1
  379. package/dist/blocks/datepicker/index.d.ts.map +0 -1
  380. package/dist/blocks/datepicker/index.js.map +0 -1
  381. package/dist/blocks/datepicker/use-calendar-theme.d.ts.map +0 -1
  382. package/dist/blocks/datepicker/use-calendar-theme.js.map +0 -1
  383. package/dist/blocks/layout/action-bar.d.ts.map +0 -1
  384. package/dist/blocks/layout/action-bar.js.map +0 -1
  385. package/dist/blocks/layout/app-shell.d.ts.map +0 -1
  386. package/dist/blocks/layout/app-shell.js.map +0 -1
  387. package/dist/blocks/layout/confirm-action-sheet.d.ts.map +0 -1
  388. package/dist/blocks/layout/confirm-action-sheet.js.map +0 -1
  389. package/dist/blocks/layout/content-skeleton.d.ts.map +0 -1
  390. package/dist/blocks/layout/content-skeleton.js.map +0 -1
  391. package/dist/blocks/layout/empty-state.d.ts.map +0 -1
  392. package/dist/blocks/layout/empty-state.js.map +0 -1
  393. package/dist/blocks/layout/error-boundary.d.ts.map +0 -1
  394. package/dist/blocks/layout/error-boundary.js.map +0 -1
  395. package/dist/blocks/layout/error-state.d.ts.map +0 -1
  396. package/dist/blocks/layout/error-state.js.map +0 -1
  397. package/dist/blocks/layout/form-modal-screen.d.ts.map +0 -1
  398. package/dist/blocks/layout/form-modal-screen.js.map +0 -1
  399. package/dist/blocks/layout/index.d.ts.map +0 -1
  400. package/dist/blocks/layout/index.js.map +0 -1
  401. package/dist/blocks/layout/loading-screen.d.ts.map +0 -1
  402. package/dist/blocks/layout/loading-screen.js.map +0 -1
  403. package/dist/blocks/layout/onboarding-screen.d.ts +0 -19
  404. package/dist/blocks/layout/onboarding-screen.d.ts.map +0 -1
  405. package/dist/blocks/layout/onboarding-screen.js +0 -35
  406. package/dist/blocks/layout/onboarding-screen.js.map +0 -1
  407. package/dist/blocks/layout/page-skeleton.d.ts.map +0 -1
  408. package/dist/blocks/layout/page-skeleton.js.map +0 -1
  409. package/dist/blocks/layout/pull-to-refresh-scroll-view.d.ts.map +0 -1
  410. package/dist/blocks/layout/pull-to-refresh-scroll-view.js.map +0 -1
  411. package/dist/blocks/layout/screen-skeleton.d.ts.map +0 -1
  412. package/dist/blocks/layout/screen-skeleton.js.map +0 -1
  413. package/dist/blocks/layout/sheet.d.ts.map +0 -1
  414. package/dist/blocks/layout/sheet.js.map +0 -1
  415. package/dist/blocks/layout/smart-image.d.ts +0 -9
  416. package/dist/blocks/layout/smart-image.d.ts.map +0 -1
  417. package/dist/blocks/layout/smart-image.js +0 -23
  418. package/dist/blocks/layout/smart-image.js.map +0 -1
  419. package/dist/blocks/layout/smart-input.d.ts.map +0 -1
  420. package/dist/blocks/layout/smart-input.js.map +0 -1
  421. package/dist/blocks/lists/index.d.ts.map +0 -1
  422. package/dist/blocks/lists/index.js.map +0 -1
  423. package/dist/blocks/lists/list-item.d.ts.map +0 -1
  424. package/dist/blocks/lists/list-item.js.map +0 -1
  425. package/dist/blocks/lists/notification-item.d.ts.map +0 -1
  426. package/dist/blocks/lists/notification-item.js.map +0 -1
  427. package/dist/blocks/lists/swipeable-item.d.ts +0 -17
  428. package/dist/blocks/lists/swipeable-item.d.ts.map +0 -1
  429. package/dist/blocks/lists/swipeable-item.js +0 -65
  430. package/dist/blocks/lists/swipeable-item.js.map +0 -1
  431. package/dist/blocks/lists/timeline-feed.d.ts.map +0 -1
  432. package/dist/blocks/lists/timeline-feed.js.map +0 -1
  433. package/dist/blocks/media/index.d.ts.map +0 -1
  434. package/dist/blocks/media/index.js.map +0 -1
  435. package/dist/blocks/media/smart-image.d.ts.map +0 -1
  436. package/dist/blocks/media/smart-image.js.map +0 -1
  437. package/dist/blocks/navigation/bottom-nav.d.ts.map +0 -1
  438. package/dist/blocks/navigation/bottom-nav.js.map +0 -1
  439. package/dist/blocks/navigation/drawer-menu.d.ts.map +0 -1
  440. package/dist/blocks/navigation/drawer-menu.js.map +0 -1
  441. package/dist/blocks/navigation/floating-bottom-nav.d.ts.map +0 -1
  442. package/dist/blocks/navigation/floating-bottom-nav.js.map +0 -1
  443. package/dist/blocks/navigation/header.d.ts.map +0 -1
  444. package/dist/blocks/navigation/header.js.map +0 -1
  445. package/dist/blocks/navigation/index.d.ts.map +0 -1
  446. package/dist/blocks/navigation/index.js.map +0 -1
  447. package/dist/blocks/navigation/navigation-sidebar.d.ts +0 -25
  448. package/dist/blocks/navigation/navigation-sidebar.d.ts.map +0 -1
  449. package/dist/blocks/navigation/navigation-sidebar.js +0 -18
  450. package/dist/blocks/navigation/navigation-sidebar.js.map +0 -1
  451. package/dist/blocks/navigation/tab-bar.d.ts.map +0 -1
  452. package/dist/blocks/navigation/tab-bar.js.map +0 -1
  453. package/dist/blocks/profile/account-card.d.ts +0 -11
  454. package/dist/blocks/profile/account-card.d.ts.map +0 -1
  455. package/dist/blocks/profile/account-card.js +0 -10
  456. package/dist/blocks/profile/account-card.js.map +0 -1
  457. package/dist/blocks/profile/index.d.ts +0 -5
  458. package/dist/blocks/profile/index.d.ts.map +0 -1
  459. package/dist/blocks/profile/index.js +0 -5
  460. package/dist/blocks/profile/index.js.map +0 -1
  461. package/dist/blocks/profile/profile-header.d.ts +0 -27
  462. package/dist/blocks/profile/profile-header.d.ts.map +0 -1
  463. package/dist/blocks/profile/profile-header.js +0 -11
  464. package/dist/blocks/profile/profile-header.js.map +0 -1
  465. package/dist/blocks/profile/settings-item.d.ts +0 -15
  466. package/dist/blocks/profile/settings-item.d.ts.map +0 -1
  467. package/dist/blocks/profile/settings-item.js +0 -11
  468. package/dist/blocks/profile/settings-item.js.map +0 -1
  469. package/dist/blocks/profile/settings-section.d.ts +0 -7
  470. package/dist/blocks/profile/settings-section.d.ts.map +0 -1
  471. package/dist/blocks/profile/settings-section.js +0 -9
  472. package/dist/blocks/profile/settings-section.js.map +0 -1
  473. package/dist/blocks/splash/index.d.ts.map +0 -1
  474. package/dist/blocks/splash/index.js.map +0 -1
  475. package/dist/blocks/splash/splash-screen.d.ts.map +0 -1
  476. package/dist/blocks/splash/splash-screen.js.map +0 -1
  477. package/dist/components/accordion/accordion.d.ts.map +0 -1
  478. package/dist/components/accordion/accordion.js.map +0 -1
  479. package/dist/components/accordion/index.d.ts.map +0 -1
  480. package/dist/components/accordion/index.js.map +0 -1
  481. package/dist/components/alert/alert.d.ts.map +0 -1
  482. package/dist/components/alert/alert.js.map +0 -1
  483. package/dist/components/alert/index.d.ts.map +0 -1
  484. package/dist/components/alert/index.js.map +0 -1
  485. package/dist/components/alert-dialog/alert-dialog.d.ts.map +0 -1
  486. package/dist/components/alert-dialog/alert-dialog.js.map +0 -1
  487. package/dist/components/alert-dialog/index.d.ts.map +0 -1
  488. package/dist/components/alert-dialog/index.js.map +0 -1
  489. package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +0 -1
  490. package/dist/components/aspect-ratio/aspect-ratio.js.map +0 -1
  491. package/dist/components/aspect-ratio/index.d.ts.map +0 -1
  492. package/dist/components/aspect-ratio/index.js.map +0 -1
  493. package/dist/components/avatar/avatar.d.ts.map +0 -1
  494. package/dist/components/avatar/avatar.js.map +0 -1
  495. package/dist/components/avatar/index.d.ts.map +0 -1
  496. package/dist/components/avatar/index.js.map +0 -1
  497. package/dist/components/badge/badge.d.ts.map +0 -1
  498. package/dist/components/badge/badge.js.map +0 -1
  499. package/dist/components/badge/index.d.ts.map +0 -1
  500. package/dist/components/badge/index.js.map +0 -1
  501. package/dist/components/box/box.d.ts +0 -143
  502. package/dist/components/box/box.d.ts.map +0 -1
  503. package/dist/components/box/box.js +0 -38
  504. package/dist/components/box/box.js.map +0 -1
  505. package/dist/components/box/index.d.ts +0 -2
  506. package/dist/components/box/index.d.ts.map +0 -1
  507. package/dist/components/box/index.js +0 -2
  508. package/dist/components/box/index.js.map +0 -1
  509. package/dist/components/button/button.d.ts.map +0 -1
  510. package/dist/components/button/button.js.map +0 -1
  511. package/dist/components/button/index.d.ts.map +0 -1
  512. package/dist/components/button/index.js.map +0 -1
  513. package/dist/components/card/card.d.ts.map +0 -1
  514. package/dist/components/card/card.js.map +0 -1
  515. package/dist/components/card/index.d.ts.map +0 -1
  516. package/dist/components/card/index.js.map +0 -1
  517. package/dist/components/checkbox/checkbox.d.ts.map +0 -1
  518. package/dist/components/checkbox/checkbox.js.map +0 -1
  519. package/dist/components/checkbox/index.d.ts.map +0 -1
  520. package/dist/components/checkbox/index.js.map +0 -1
  521. package/dist/components/collapsible/collapsible.d.ts.map +0 -1
  522. package/dist/components/collapsible/collapsible.js.map +0 -1
  523. package/dist/components/collapsible/index.d.ts.map +0 -1
  524. package/dist/components/collapsible/index.js.map +0 -1
  525. package/dist/components/context-menu/context-menu.d.ts.map +0 -1
  526. package/dist/components/context-menu/context-menu.js.map +0 -1
  527. package/dist/components/context-menu/index.d.ts.map +0 -1
  528. package/dist/components/context-menu/index.js.map +0 -1
  529. package/dist/components/data-row/data-row.d.ts.map +0 -1
  530. package/dist/components/data-row/data-row.js.map +0 -1
  531. package/dist/components/data-row/index.d.ts.map +0 -1
  532. package/dist/components/data-row/index.js.map +0 -1
  533. package/dist/components/dialog/dialog.d.ts.map +0 -1
  534. package/dist/components/dialog/dialog.js.map +0 -1
  535. package/dist/components/dialog/index.d.ts.map +0 -1
  536. package/dist/components/dialog/index.js.map +0 -1
  537. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +0 -1
  538. package/dist/components/dropdown-menu/dropdown-menu.js.map +0 -1
  539. package/dist/components/dropdown-menu/index.d.ts.map +0 -1
  540. package/dist/components/dropdown-menu/index.js.map +0 -1
  541. package/dist/components/form-field/form-field.d.ts.map +0 -1
  542. package/dist/components/form-field/form-field.js.map +0 -1
  543. package/dist/components/form-field/index.d.ts.map +0 -1
  544. package/dist/components/form-field/index.js.map +0 -1
  545. package/dist/components/hover-card/hover-card.d.ts.map +0 -1
  546. package/dist/components/hover-card/hover-card.js.map +0 -1
  547. package/dist/components/hover-card/index.d.ts.map +0 -1
  548. package/dist/components/hover-card/index.js.map +0 -1
  549. package/dist/components/input/index.d.ts.map +0 -1
  550. package/dist/components/input/index.js.map +0 -1
  551. package/dist/components/input/input.d.ts.map +0 -1
  552. package/dist/components/input/input.js.map +0 -1
  553. package/dist/components/label/index.d.ts.map +0 -1
  554. package/dist/components/label/index.js.map +0 -1
  555. package/dist/components/label/label.d.ts.map +0 -1
  556. package/dist/components/label/label.js.map +0 -1
  557. package/dist/components/labeled-field/index.d.ts.map +0 -1
  558. package/dist/components/labeled-field/index.js.map +0 -1
  559. package/dist/components/labeled-field/labeled-field.d.ts.map +0 -1
  560. package/dist/components/labeled-field/labeled-field.js.map +0 -1
  561. package/dist/components/layout/index.d.ts +0 -2
  562. package/dist/components/layout/index.d.ts.map +0 -1
  563. package/dist/components/layout/index.js +0 -2
  564. package/dist/components/layout/index.js.map +0 -1
  565. package/dist/components/layout/layout.d.ts +0 -395
  566. package/dist/components/layout/layout.d.ts.map +0 -1
  567. package/dist/components/layout/layout.js +0 -93
  568. package/dist/components/layout/layout.js.map +0 -1
  569. package/dist/components/menubar/index.d.ts.map +0 -1
  570. package/dist/components/menubar/index.js.map +0 -1
  571. package/dist/components/menubar/menubar.d.ts.map +0 -1
  572. package/dist/components/menubar/menubar.js.map +0 -1
  573. package/dist/components/numeric-input/index.d.ts.map +0 -1
  574. package/dist/components/numeric-input/index.js.map +0 -1
  575. package/dist/components/numeric-input/numeric-input.d.ts.map +0 -1
  576. package/dist/components/numeric-input/numeric-input.js.map +0 -1
  577. package/dist/components/otp-input/index.d.ts.map +0 -1
  578. package/dist/components/otp-input/index.js.map +0 -1
  579. package/dist/components/otp-input/otp-input.d.ts.map +0 -1
  580. package/dist/components/otp-input/otp-input.js.map +0 -1
  581. package/dist/components/popover/index.d.ts.map +0 -1
  582. package/dist/components/popover/index.js.map +0 -1
  583. package/dist/components/popover/popover.d.ts.map +0 -1
  584. package/dist/components/popover/popover.js.map +0 -1
  585. package/dist/components/pressable/index.d.ts.map +0 -1
  586. package/dist/components/pressable/index.js.map +0 -1
  587. package/dist/components/pressable/pressable.d.ts.map +0 -1
  588. package/dist/components/pressable/pressable.js.map +0 -1
  589. package/dist/components/progress/index.d.ts.map +0 -1
  590. package/dist/components/progress/index.js.map +0 -1
  591. package/dist/components/progress/progress.d.ts.map +0 -1
  592. package/dist/components/progress/progress.js.map +0 -1
  593. package/dist/components/radio-group/index.d.ts.map +0 -1
  594. package/dist/components/radio-group/index.js.map +0 -1
  595. package/dist/components/radio-group/radio-group.d.ts.map +0 -1
  596. package/dist/components/radio-group/radio-group.js.map +0 -1
  597. package/dist/components/row/index.d.ts.map +0 -1
  598. package/dist/components/row/index.js.map +0 -1
  599. package/dist/components/row/row.d.ts.map +0 -1
  600. package/dist/components/row/row.js.map +0 -1
  601. package/dist/components/segmented-control/index.d.ts.map +0 -1
  602. package/dist/components/segmented-control/index.js.map +0 -1
  603. package/dist/components/segmented-control/segmented-control.d.ts.map +0 -1
  604. package/dist/components/segmented-control/segmented-control.js.map +0 -1
  605. package/dist/components/select/index.d.ts.map +0 -1
  606. package/dist/components/select/index.js.map +0 -1
  607. package/dist/components/select/select.d.ts.map +0 -1
  608. package/dist/components/select/select.js.map +0 -1
  609. package/dist/components/separator/index.d.ts.map +0 -1
  610. package/dist/components/separator/index.js.map +0 -1
  611. package/dist/components/separator/separator.d.ts.map +0 -1
  612. package/dist/components/separator/separator.js.map +0 -1
  613. package/dist/components/skeleton/index.d.ts.map +0 -1
  614. package/dist/components/skeleton/index.js.map +0 -1
  615. package/dist/components/skeleton/skeleton.d.ts.map +0 -1
  616. package/dist/components/skeleton/skeleton.js.map +0 -1
  617. package/dist/components/spinner/index.d.ts.map +0 -1
  618. package/dist/components/spinner/index.js.map +0 -1
  619. package/dist/components/spinner/spinner.d.ts.map +0 -1
  620. package/dist/components/spinner/spinner.js.map +0 -1
  621. package/dist/components/stack/index.d.ts.map +0 -1
  622. package/dist/components/stack/index.js.map +0 -1
  623. package/dist/components/stack/stack.d.ts.map +0 -1
  624. package/dist/components/stack/stack.js.map +0 -1
  625. package/dist/components/switch/index.d.ts.map +0 -1
  626. package/dist/components/switch/index.js.map +0 -1
  627. package/dist/components/switch/switch.d.ts.map +0 -1
  628. package/dist/components/switch/switch.js.map +0 -1
  629. package/dist/components/tabs/index.d.ts.map +0 -1
  630. package/dist/components/tabs/index.js.map +0 -1
  631. package/dist/components/tabs/tabs.d.ts.map +0 -1
  632. package/dist/components/tabs/tabs.js.map +0 -1
  633. package/dist/components/text/index.d.ts.map +0 -1
  634. package/dist/components/text/index.js.map +0 -1
  635. package/dist/components/text/text.d.ts.map +0 -1
  636. package/dist/components/text/text.js.map +0 -1
  637. package/dist/components/textarea/index.d.ts.map +0 -1
  638. package/dist/components/textarea/index.js.map +0 -1
  639. package/dist/components/textarea/textarea.d.ts.map +0 -1
  640. package/dist/components/textarea/textarea.js.map +0 -1
  641. package/dist/components/toast/index.d.ts.map +0 -1
  642. package/dist/components/toast/index.js.map +0 -1
  643. package/dist/components/toast/toast.d.ts.map +0 -1
  644. package/dist/components/toast/toast.js.map +0 -1
  645. package/dist/components/toggle/index.d.ts.map +0 -1
  646. package/dist/components/toggle/index.js.map +0 -1
  647. package/dist/components/toggle/toggle.d.ts.map +0 -1
  648. package/dist/components/toggle/toggle.js.map +0 -1
  649. package/dist/components/toggle-group/index.d.ts.map +0 -1
  650. package/dist/components/toggle-group/index.js.map +0 -1
  651. package/dist/components/toggle-group/toggle-group.d.ts.map +0 -1
  652. package/dist/components/toggle-group/toggle-group.js.map +0 -1
  653. package/dist/components/tooltip/index.d.ts.map +0 -1
  654. package/dist/components/tooltip/index.js.map +0 -1
  655. package/dist/components/tooltip/tooltip.d.ts.map +0 -1
  656. package/dist/components/tooltip/tooltip.js.map +0 -1
  657. package/dist/components/view/index.d.ts.map +0 -1
  658. package/dist/components/view/index.js.map +0 -1
  659. package/dist/components/view/view.d.ts.map +0 -1
  660. package/dist/components/view/view.js.map +0 -1
  661. package/dist/index.d.ts.map +0 -1
  662. package/dist/index.js.map +0 -1
  663. package/dist/lib/cn.d.ts.map +0 -1
  664. package/dist/lib/cn.js.map +0 -1
  665. package/dist/lib/font-context.d.ts.map +0 -1
  666. package/dist/lib/font-context.js.map +0 -1
  667. package/dist/lib/frosted-surface.d.ts.map +0 -1
  668. package/dist/lib/frosted-surface.js.map +0 -1
  669. package/dist/lib/index.d.ts +0 -6
  670. package/dist/lib/index.d.ts.map +0 -1
  671. package/dist/lib/index.js +0 -6
  672. package/dist/lib/index.js.map +0 -1
  673. package/dist/lib/interaction-tokens.d.ts.map +0 -1
  674. package/dist/lib/interaction-tokens.js.map +0 -1
  675. package/dist/lib/portal.d.ts.map +0 -1
  676. package/dist/lib/portal.js.map +0 -1
  677. package/dist/lib/react-native-classname.d.ts.map +0 -1
  678. package/dist/lib/react-native-classname.js.map +0 -1
  679. package/dist/lib/theme-bridge.d.ts.map +0 -1
  680. package/dist/lib/theme-bridge.js.map +0 -1
  681. package/dist/lib/theme-colors.d.ts.map +0 -1
  682. package/dist/lib/theme-colors.js.map +0 -1
  683. package/dist/lib/tv.d.ts.map +0 -1
  684. package/dist/lib/tv.js.map +0 -1
  685. package/dist/lib/visual-tokens.d.ts.map +0 -1
  686. package/dist/lib/visual-tokens.js.map +0 -1
  687. package/dist/vite.d.ts.map +0 -1
  688. package/dist/vite.js.map +0 -1
@@ -1,20 +1,132 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
3
- import { View, TextInput, KeyboardAvoidingView, Platform } from 'react-native';
2
+ import { forwardRef, useEffect, useRef, useState } from 'react';
3
+ import { AccessibilityInfo, View, TextInput } from 'react-native';
4
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
5
  import { cn } from '../../lib/cn';
6
+ import { focusRing } from '../../lib/focus-ring';
6
7
  import { useThemeColors } from '../../lib/theme-colors';
7
8
  import { useInteractionTokens } from '../../lib/interaction-tokens';
8
9
  import { useVisualTokens } from '../../lib/visual-tokens';
9
- export const SmartInput = forwardRef(function SmartInput({ leftSlot, centerSlot, rightSlot, variant = 'bar', className, inputClassName, submitBehavior = 'newline', safeArea = true, placeholderTextColor, editable = true, ...props }, ref) {
10
+ import { controlRecipe, shadowStyle, surfaceRadius, typographyStyle } from '../../lib/recipes';
11
+ // The examples list is joined into one string so it can be an effect dependency without
12
+ // re-running on every render. A NUL byte cannot appear in a placeholder.
13
+ const SEPARATOR = '\0';
14
+ function useReducedMotion() {
15
+ const [reduceMotion, setReduceMotion] = useState(false);
16
+ useEffect(() => {
17
+ void AccessibilityInfo.isReduceMotionEnabled().then(setReduceMotion);
18
+ const subscription = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduceMotion);
19
+ return () => subscription.remove();
20
+ }, []);
21
+ return reduceMotion;
22
+ }
23
+ function useRotatingPlaceholder({ active, examplesKey, prefix, typingInterval, pauseDuration, clearInterval: clearIntervalMs, }) {
24
+ const [animatedPlaceholder, setAnimatedPlaceholder] = useState('');
25
+ const exampleIndexRef = useRef(0);
26
+ const reduceMotion = useReducedMotion();
27
+ useEffect(() => {
28
+ const examples = examplesKey ? examplesKey.split(SEPARATOR) : [];
29
+ // The reduced-motion placeholder is derived below, not animated — there is no timer
30
+ // to start and nothing for this effect to do.
31
+ if (!active || reduceMotion || examples.length === 0)
32
+ return;
33
+ let charIndex = 0;
34
+ let elapsed = 0;
35
+ let phase = 'typing';
36
+ let exampleIndex = exampleIndexRef.current;
37
+ const resolution = Math.max(16, Math.min(typingInterval, clearIntervalMs));
38
+ // Clearing before the first tick is part of starting the timer: without it the
39
+ // previous example's tail stays on screen until the next interval fires.
40
+ // eslint-disable-next-line react-hooks/set-state-in-effect
41
+ setAnimatedPlaceholder('');
42
+ const timer = setInterval(() => {
43
+ elapsed += resolution;
44
+ const target = `${prefix}${examples[exampleIndex % examples.length]}`;
45
+ const phaseDuration = phase === 'typing'
46
+ ? Math.max(typingInterval, 1)
47
+ : phase === 'pause'
48
+ ? Math.max(pauseDuration, 1)
49
+ : Math.max(clearIntervalMs, 1);
50
+ if (elapsed < phaseDuration)
51
+ return;
52
+ elapsed = 0;
53
+ if (phase === 'typing') {
54
+ charIndex += 1;
55
+ setAnimatedPlaceholder(target.slice(0, charIndex));
56
+ if (charIndex >= target.length)
57
+ phase = 'pause';
58
+ return;
59
+ }
60
+ if (phase === 'pause') {
61
+ phase = 'clearing';
62
+ return;
63
+ }
64
+ charIndex -= 1;
65
+ setAnimatedPlaceholder(target.slice(0, Math.max(0, charIndex)));
66
+ if (charIndex <= 0) {
67
+ phase = 'typing';
68
+ exampleIndex += 1;
69
+ exampleIndexRef.current = exampleIndex;
70
+ }
71
+ }, resolution);
72
+ return () => clearInterval(timer);
73
+ }, [active, clearIntervalMs, examplesKey, pauseDuration, prefix, reduceMotion, typingInterval]);
74
+ if (!active)
75
+ return '';
76
+ if (reduceMotion) {
77
+ const examples = examplesKey ? examplesKey.split(SEPARATOR) : [];
78
+ return examples.length > 0 ? `${prefix}${examples[0]}` : prefix;
79
+ }
80
+ return animatedPlaceholder || prefix;
81
+ }
82
+ export const SmartInput = forwardRef(function SmartInput({ leftSlot, centerSlot, rightSlot, variant = 'bar', className, inputClassName, submitBehavior = 'newline', safeArea = true, placeholderExamples, placeholderPrefix = 'e.g. ', placeholderTypingInterval = 65, placeholderPauseDuration = 2200, placeholderClearInterval = 25, placeholderTextColor, placeholder, value, defaultValue, onChangeText, editable = true, style, ...props }, ref) {
10
83
  const insets = useSafeAreaInsets();
11
84
  const colors = useThemeColors();
12
85
  const interaction = useInteractionTokens();
13
86
  const visual = useVisualTokens();
14
- const bottomPadding = safeArea ? Math.max(insets.bottom, 12) : 12;
15
- return (_jsx(KeyboardAvoidingView, { behavior: Platform.OS === 'ios' ? 'padding' : undefined, className: "w-full", children: _jsxs(View, { className: cn('w-full flex-row items-center gap-2 px-3 py-2 bg-background', variant === 'bar' && 'border-t border-border', variant === 'card' && 'rounded-2xl border border-border shadow-md', className), style: { paddingBottom: bottomPadding }, children: [leftSlot && _jsx(View, { className: "shrink-0", children: leftSlot }), centerSlot && _jsx(View, { className: "shrink-0", children: centerSlot }), _jsx(TextInput, { ref: ref, style: [
16
- { maxHeight: visual.smartInputMaxHeight },
17
- !editable ? { opacity: interaction.disabledOpacity } : null,
18
- ], className: cn('flex-1 min-h-11 px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground outline-none', variant === 'bar' && 'rounded-xl border border-border bg-muted', variant === 'card' && 'rounded-xl bg-transparent', inputClassName), multiline: true, submitBehavior: submitBehavior, textAlignVertical: "top", placeholderTextColor: placeholderTextColor ?? colors.placeholder, editable: editable, ...props }), rightSlot && _jsx(View, { className: "shrink-0", children: rightSlot })] }) }));
87
+ const bottomPadding = safeArea
88
+ ? Math.max(insets.bottom, visual.controlPaddingYSm)
89
+ : visual.controlPaddingYSm;
90
+ // When the field is controlled its owner already holds the answer, so derive it rather
91
+ // than mirroring it into state — mirroring cost a frame in which the rotating
92
+ // placeholder kept animating over text the user had already typed.
93
+ const [uncontrolledHasText, setUncontrolledHasText] = useState(() => Boolean(defaultValue));
94
+ const hasText = value !== undefined ? Boolean(value) : uncontrolledHasText;
95
+ const examplesKey = placeholderExamples?.join(SEPARATOR) ?? '';
96
+ const animatePlaceholder = placeholder === undefined && !hasText && Boolean(examplesKey);
97
+ const animatedPlaceholder = useRotatingPlaceholder({
98
+ active: animatePlaceholder,
99
+ examplesKey,
100
+ prefix: placeholderPrefix,
101
+ typingInterval: placeholderTypingInterval,
102
+ pauseDuration: placeholderPauseDuration,
103
+ clearInterval: placeholderClearInterval,
104
+ });
105
+ const resolvedPlaceholder = placeholder ?? (hasText || !examplesKey ? undefined : animatedPlaceholder);
106
+ return (_jsxs(View, { className: cn('w-full flex-row items-center gap-2 bg-background', variant === 'bar' && 'border-border', variant === 'card' && 'border-border', className), style: [
107
+ {
108
+ paddingHorizontal: visual.controlPaddingXSm,
109
+ paddingTop: visual.controlPaddingYSm,
110
+ paddingBottom: bottomPadding,
111
+ },
112
+ variant === 'bar' ? { borderTopWidth: visual.borderWidthHairline } : null,
113
+ variant === 'card'
114
+ ? {
115
+ borderRadius: surfaceRadius(visual, 'xl'),
116
+ borderWidth: visual.borderWidthHairline,
117
+ ...shadowStyle(visual, colors, 'md'),
118
+ }
119
+ : null,
120
+ ], children: [leftSlot && _jsx(View, { className: "shrink-0", children: leftSlot }), centerSlot && _jsx(View, { className: "shrink-0", children: centerSlot }), _jsx(TextInput, { ref: ref, style: [
121
+ controlRecipe(visual, 'default'),
122
+ typographyStyle(visual, 'label'),
123
+ variant === 'bar' ? { borderWidth: visual.borderWidthControl } : null,
124
+ { maxHeight: visual.smartInputMaxHeight },
125
+ !editable ? { opacity: interaction.disabledOpacity } : null,
126
+ style,
127
+ ], className: cn('flex-1 text-foreground placeholder:text-muted-foreground', focusRing, variant === 'bar' && 'border-border bg-muted', variant === 'card' && 'bg-transparent', inputClassName), multiline: true, submitBehavior: submitBehavior, textAlignVertical: "top", placeholderTextColor: placeholderTextColor ?? colors.placeholder, placeholder: resolvedPlaceholder, value: value, defaultValue: defaultValue, onChangeText: (text) => {
128
+ if (value === undefined)
129
+ setUncontrolledHasText(Boolean(text));
130
+ onChangeText?.(text);
131
+ }, editable: editable, ...props }), rightSlot && _jsx(View, { className: "shrink-0", children: rightSlot })] }));
19
132
  });
20
- //# sourceMappingURL=smart-input.js.map
@@ -1,5 +1,3 @@
1
1
  export { ListItem, type ListItemProps } from './list-item';
2
- export { SwipeableItem, type SwipeableItemProps, type SwipeAction } from './swipeable-item';
3
2
  export { NotificationItem, type NotificationItemProps } from './notification-item';
4
3
  export { TimelineFeed, type TimelineFeedProps, type TimelineItem } from './timeline-feed';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,3 @@
1
1
  export { ListItem } from './list-item';
2
- export { SwipeableItem } from './swipeable-item';
3
2
  export { NotificationItem } from './notification-item';
4
3
  export { TimelineFeed } from './timeline-feed';
5
- //# sourceMappingURL=index.js.map
@@ -13,5 +13,4 @@ export interface ListItemProps extends Omit<PressableProps, 'children'> {
13
13
  /** Show a skeleton placeholder instead of content. */
14
14
  loading?: boolean;
15
15
  }
16
- export declare function ListItem({ icon, title, subtitle, description, rightIcon, rightText, action, showBorder, compact, loading, className, ...props }: ListItemProps): import("react/jsx-runtime").JSX.Element;
17
- //# sourceMappingURL=list-item.d.ts.map
16
+ export declare function ListItem({ icon, title, subtitle, description, rightIcon, rightText, action, showBorder, compact, loading, className, style: styleProp, ...props }: ListItemProps): React.JSX.Element;
@@ -3,15 +3,29 @@ import { View, Pressable } from 'react-native';
3
3
  import { Text } from '../../components/text';
4
4
  import { Skeleton } from '../../components/skeleton';
5
5
  import { cn } from '../../lib/cn';
6
- // ─── Skeleton ─────────────────────────────────────────────────
6
+ import { focusRing } from '../../lib/focus-ring';
7
+ import { useVisualTokens } from '../../lib/visual-tokens';
8
+ import { surfacePadding, typographyStyle } from '../../lib/recipes';
9
+ function useListRowStyle(compact, showBorder) {
10
+ const visual = useVisualTokens();
11
+ return {
12
+ paddingHorizontal: surfacePadding(visual, 'sm'),
13
+ paddingVertical: compact ? visual.controlPaddingYSm : visual.controlPaddingYDefault,
14
+ borderBottomWidth: showBorder ? visual.borderWidthHairline : 0,
15
+ };
16
+ }
7
17
  function ListItemSkeleton({ showBorder = true, compact = false, className, }) {
8
- return (_jsxs(View, { className: cn('flex-row items-center bg-card px-4', compact ? 'py-2' : 'py-3', showBorder && 'border-b border-border', className), children: [_jsx(Skeleton, { className: "mr-3 h-8 w-8 rounded-lg" }), _jsxs(View, { className: "flex-1 gap-1.5", children: [_jsx(Skeleton, { className: "h-4 w-2/3 rounded-md" }), _jsx(Skeleton, { className: "h-3 w-1/3 rounded-md" })] }), _jsx(Skeleton, { className: "h-4 w-4 rounded-sm" })] }));
18
+ const rowStyle = useListRowStyle(compact, showBorder);
19
+ return (_jsxs(View, { className: cn('flex-row items-center bg-card', showBorder && 'border-border', className), style: rowStyle, children: [_jsx(Skeleton, { className: "mr-3 h-8 w-8" }), _jsxs(View, { className: "flex-1 gap-1.5", children: [_jsx(Skeleton, { className: "h-4 w-2/3" }), _jsx(Skeleton, { className: "h-3 w-1/3" })] }), _jsx(Skeleton, { className: "h-4 w-4" })] }));
9
20
  }
10
- // ─── Component ───────────────────────────────────────────────
11
- export function ListItem({ icon, title, subtitle, description, rightIcon, rightText, action, showBorder = true, compact = false, loading = false, className, ...props }) {
21
+ export function ListItem({ icon, title, subtitle, description, rightIcon, rightText, action, showBorder = true, compact = false, loading = false, className, style: styleProp, ...props }) {
22
+ const visual = useVisualTokens();
23
+ const rowStyle = useListRowStyle(compact, showBorder);
12
24
  if (loading) {
13
25
  return _jsx(ListItemSkeleton, { showBorder: showBorder, compact: compact, className: className });
14
26
  }
15
- return (_jsxs(Pressable, { className: cn('flex-row items-center bg-card px-4', compact ? 'py-2' : 'py-3', showBorder && 'border-b border-border', 'active:bg-muted', className), ...props, children: [icon && _jsx(View, { className: "mr-3 text-muted-foreground", children: icon }), _jsxs(View, { className: "flex-1", children: [_jsx(Text, { className: "text-base text-foreground", children: title }), subtitle && _jsx(Text, { className: "text-sm text-muted-foreground", children: subtitle }), description && (_jsx(Text, { className: "mt-1 text-sm text-muted-foreground", numberOfLines: 2, children: description }))] }), rightText && _jsx(Text, { className: "mr-2 text-sm text-muted-foreground", children: rightText }), rightIcon && _jsx(View, { className: "text-muted-foreground", children: rightIcon }), action, !action && !rightIcon && _jsx(Text, { className: "text-lg text-muted-foreground", children: "\u203A" })] }));
27
+ return (_jsxs(Pressable, { accessibilityRole: props.onPress || props.onLongPress ? 'button' : undefined, className: cn('flex-row items-center bg-card', focusRing, showBorder && 'border-border', 'active:bg-muted', className), style: (state) => {
28
+ const callerStyle = typeof styleProp === 'function' ? styleProp(state) : styleProp;
29
+ return [rowStyle, callerStyle];
30
+ }, ...props, children: [icon && _jsx(View, { className: "mr-3 text-muted-foreground", children: icon }), _jsxs(View, { className: "flex-1", children: [_jsx(Text, { className: "text-foreground", style: typographyStyle(visual, 'body'), children: title }), subtitle && (_jsx(Text, { className: "text-muted-foreground", style: typographyStyle(visual, 'label'), children: subtitle })), description && (_jsx(Text, { className: "mt-1 text-muted-foreground", style: typographyStyle(visual, 'label'), numberOfLines: 2, children: description }))] }), rightText && (_jsx(Text, { className: "mr-2 text-muted-foreground", style: typographyStyle(visual, 'label'), children: rightText })), rightIcon && _jsx(View, { className: "text-muted-foreground", children: rightIcon }), action, !action && !rightIcon && (_jsx(Text, { className: "text-muted-foreground", style: typographyStyle(visual, 'emphasis'), children: "\u203A" }))] }));
16
31
  }
17
- //# sourceMappingURL=list-item.js.map
@@ -12,5 +12,4 @@ export interface NotificationItemProps extends Omit<PressableProps, 'children'>
12
12
  /** Show a skeleton placeholder instead of content. */
13
13
  loading?: boolean;
14
14
  }
15
- export declare function NotificationItem({ icon, avatarUrl, avatarFallback, title, message, time, read, showDot, loading, className, ...props }: NotificationItemProps): import("react/jsx-runtime").JSX.Element;
16
- //# sourceMappingURL=notification-item.d.ts.map
15
+ export declare function NotificationItem({ icon, avatarUrl, avatarFallback, title, message, time, read, showDot, loading, className, style: styleProp, ...props }: NotificationItemProps): React.JSX.Element;
@@ -4,15 +4,28 @@ import { Text } from '../../components/text';
4
4
  import { Avatar, AvatarFallback, AvatarImage } from '../../components/avatar';
5
5
  import { Skeleton } from '../../components/skeleton';
6
6
  import { cn } from '../../lib/cn';
7
- // ─── Skeleton ─────────────────────────────────────────────────
7
+ import { focusRing } from '../../lib/focus-ring';
8
+ import { useVisualTokens } from '../../lib/visual-tokens';
9
+ import { surfacePadding, typographyStyle } from '../../lib/recipes';
10
+ function useNotificationRowStyle() {
11
+ const visual = useVisualTokens();
12
+ return {
13
+ paddingHorizontal: surfacePadding(visual, 'sm'),
14
+ paddingVertical: visual.controlPaddingYDefault,
15
+ };
16
+ }
8
17
  function NotificationItemSkeleton({ className }) {
9
- return (_jsxs(View, { className: cn('flex-row items-start px-4 py-3', className), children: [_jsx(Skeleton, { className: "h-10 w-10 rounded-full" }), _jsxs(View, { className: "ml-3 flex-1 gap-2", children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Skeleton, { className: "h-3.5 w-1/3 rounded-md" }), _jsx(Skeleton, { className: "h-3 w-12 rounded-md" })] }), _jsx(Skeleton, { className: "h-3 w-4/5 rounded-md" })] })] }));
18
+ const rowStyle = useNotificationRowStyle();
19
+ return (_jsxs(View, { className: cn('flex-row items-start', className), style: rowStyle, children: [_jsx(Skeleton, { className: "h-10 w-10 rounded-full" }), _jsxs(View, { className: "ml-3 flex-1 gap-2", children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Skeleton, { className: "h-3.5 w-1/3" }), _jsx(Skeleton, { className: "h-3 w-12" })] }), _jsx(Skeleton, { className: "h-3 w-4/5" })] })] }));
10
20
  }
11
- // ─── Component ───────────────────────────────────────────────
12
- export function NotificationItem({ icon, avatarUrl, avatarFallback, title, message, time, read = false, showDot = true, loading = false, className, ...props }) {
21
+ export function NotificationItem({ icon, avatarUrl, avatarFallback, title, message, time, read = false, showDot = true, loading = false, className, style: styleProp, ...props }) {
22
+ const visual = useVisualTokens();
23
+ const rowStyle = useNotificationRowStyle();
13
24
  if (loading) {
14
25
  return _jsx(NotificationItemSkeleton, { className: className });
15
26
  }
16
- return (_jsxs(Pressable, { className: cn('flex-row items-start px-4 py-3 active:bg-muted', !read && 'bg-primary-soft-subtle', className), ...props, children: [avatarUrl || avatarFallback ? (_jsxs(Avatar, { className: "h-10 w-10", children: [avatarUrl && _jsx(AvatarImage, { src: avatarUrl }), _jsx(AvatarFallback, { children: avatarFallback })] })) : (icon && (_jsx(View, { className: "h-10 w-10 items-center justify-center rounded-full bg-muted", children: icon }))), _jsxs(View, { className: "ml-3 flex-1", children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { className: cn('text-sm', !read ? 'font-semibold text-foreground' : 'text-foreground'), children: title }), _jsxs(View, { className: "flex-row items-center gap-2", children: [_jsx(Text, { className: "text-xs text-muted-foreground", children: time }), !read && showDot && _jsx(View, { className: "h-2 w-2 rounded-full bg-primary" })] })] }), _jsx(Text, { className: "mt-0.5 text-sm text-muted-foreground", numberOfLines: 2, children: message })] })] }));
27
+ return (_jsxs(Pressable, { accessibilityRole: props.onPress || props.onLongPress ? 'button' : undefined, className: cn('flex-row items-start active:bg-muted', focusRing, !read && 'bg-primary-soft-subtle', className), style: (state) => {
28
+ const callerStyle = typeof styleProp === 'function' ? styleProp(state) : styleProp;
29
+ return [rowStyle, callerStyle];
30
+ }, ...props, children: [avatarUrl || avatarFallback ? (_jsxs(Avatar, { className: "h-10 w-10", children: [avatarUrl && _jsx(AvatarImage, { src: avatarUrl }), _jsx(AvatarFallback, { children: avatarFallback })] })) : (icon && (_jsx(View, { className: "h-10 w-10 items-center justify-center rounded-full bg-muted", children: icon }))), _jsxs(View, { className: "ml-3 flex-1", children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { className: cn(!read ? 'font-semibold text-foreground' : 'text-foreground'), style: typographyStyle(visual, 'label'), children: title }), _jsxs(View, { className: "flex-row items-center gap-2", children: [_jsx(Text, { className: "text-muted-foreground", style: typographyStyle(visual, 'caption'), children: time }), !read && showDot && _jsx(View, { className: "h-2 w-2 rounded-full bg-primary" })] })] }), _jsx(Text, { className: "mt-0.5 text-muted-foreground", style: typographyStyle(visual, 'label'), numberOfLines: 2, children: message })] })] }));
17
31
  }
18
- //# sourceMappingURL=notification-item.js.map
@@ -13,6 +13,5 @@ export interface TimelineFeedProps extends ViewProps {
13
13
  items: TimelineItem[];
14
14
  showConnector?: boolean;
15
15
  }
16
- declare function TimelineFeed({ className, items, showConnector, ...props }: TimelineFeedProps): import("react/jsx-runtime").JSX.Element;
16
+ declare function TimelineFeed({ className, items, showConnector, ...props }: TimelineFeedProps): React.JSX.Element;
17
17
  export { TimelineFeed };
18
- //# sourceMappingURL=timeline-feed.d.ts.map
@@ -2,8 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { View, ScrollView } from 'react-native';
3
3
  import { Text } from '../../components/text';
4
4
  import { cn } from '../../lib/cn';
5
+ import { useVisualTokens } from '../../lib/visual-tokens';
6
+ import { surfacePadding } from '../../lib/recipes';
5
7
  function TimelineFeed({ className, items, showConnector = true, ...props }) {
6
- return (_jsx(ScrollView, { className: cn('flex-1', className), ...props, children: _jsx(View, { className: "p-4", children: items.map((item, index) => (_jsxs(View, { className: "flex-row", children: [_jsxs(View, { className: "items-center mr-4", style: { minWidth: 16 }, children: [showConnector && index > 0 && _jsx(View, { className: "w-0.5 bg-border h-4" }), item.icon ? (_jsx(View, { className: "w-8 h-8 rounded-full bg-primary items-center justify-center shrink-0", children: item.icon })) : (_jsx(View, { className: "w-4 h-4 rounded-full bg-primary border-2 border-background shrink-0" })), showConnector && index < items.length - 1 && (_jsx(View, { className: "w-0.5 bg-border flex-1 min-h-4" }))] }), _jsxs(View, { className: cn('flex-1 pb-6', index === items.length - 1 && 'pb-0'), children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { variant: "body", className: "font-medium", children: item.title }), item.time && (_jsx(Text, { variant: "caption", className: "text-muted-foreground", children: item.time }))] }), item.subtitle && (_jsx(Text, { variant: "caption", className: "text-muted-foreground mt-1", children: item.subtitle })), item.content && _jsx(View, { className: "mt-2", children: item.content })] })] }, item.id))) }) }));
8
+ const visual = useVisualTokens();
9
+ return (_jsx(ScrollView, { className: cn('flex-1', className), ...props, children: _jsx(View, { style: { padding: surfacePadding(visual, 'sm') }, children: items.map((item, index) => (_jsxs(View, { className: "flex-row", children: [_jsxs(View, { className: "items-center mr-4", style: { minWidth: 16 }, children: [showConnector && index > 0 && _jsx(View, { className: "w-0.5 bg-border h-4" }), item.icon ? (_jsx(View, { className: "w-8 h-8 rounded-full bg-primary items-center justify-center shrink-0", children: item.icon })) : (_jsx(View, { className: "w-4 h-4 rounded-full bg-primary border-background shrink-0", style: { borderWidth: visual.borderWidthEmphasis } })), showConnector && index < items.length - 1 && (_jsx(View, { className: "w-0.5 bg-border flex-1 min-h-4" }))] }), _jsxs(View, { className: cn('flex-1 pb-6', index === items.length - 1 && 'pb-0'), children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { variant: "body", className: "font-medium", children: item.title }), item.time && (_jsx(Text, { variant: "caption", className: "text-muted-foreground", children: item.time }))] }), item.subtitle && (_jsx(Text, { variant: "caption", className: "text-muted-foreground mt-1", children: item.subtitle })), item.content && _jsx(View, { className: "mt-2", children: item.content })] })] }, item.id))) }) }));
7
10
  }
8
11
  export { TimelineFeed };
9
- //# sourceMappingURL=timeline-feed.js.map
@@ -1,2 +1 @@
1
1
  export { SmartImage, smartImageVariants, type SmartImageProps } from './smart-image';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export { SmartImage, smartImageVariants } from './smart-image';
2
- //# sourceMappingURL=index.js.map
@@ -120,4 +120,3 @@ export interface SmartImageProps extends Omit<ViewProps, 'className'>, VariantPr
120
120
  }
121
121
  declare const SmartImage: React.ForwardRefExoticComponent<SmartImageProps & React.RefAttributes<View>>;
122
122
  export { SmartImage, smartImageVariants };
123
- //# sourceMappingURL=smart-image.d.ts.map
@@ -5,15 +5,16 @@ import { Image } from 'expo-image';
5
5
  import { Skeleton } from '../../components/skeleton';
6
6
  import { cn } from '../../lib/cn';
7
7
  import { tv } from '../../lib/tv';
8
+ import { useVisualTokens } from '../../lib/visual-tokens';
8
9
  const smartImageVariants = tv({
9
10
  base: 'overflow-hidden',
10
11
  variants: {
11
12
  radius: {
12
- none: 'rounded-none',
13
- sm: 'rounded-sm',
14
- md: 'rounded-md',
15
- lg: 'rounded-lg',
16
- xl: 'rounded-xl',
13
+ none: '',
14
+ sm: '',
15
+ md: '',
16
+ lg: '',
17
+ xl: '',
17
18
  full: 'rounded-full',
18
19
  },
19
20
  objectFit: {
@@ -28,9 +29,25 @@ const smartImageVariants = tv({
28
29
  objectFit: 'cover',
29
30
  },
30
31
  });
31
- const SmartImage = React.forwardRef(({ className, source, alt, skeleton = true, skeletonClassName, transition = 200, radius, objectFit, onLoad, onError, fallbackSource, ...props }, ref) => {
32
+ const FULL_RADIUS = 9999;
33
+ function resolveRadius(visual, radius) {
34
+ if (radius === 'none')
35
+ return 0;
36
+ if (radius === 'sm')
37
+ return visual.radiusSm;
38
+ if (radius === 'lg')
39
+ return visual.radiusLg;
40
+ if (radius === 'xl')
41
+ return visual.radiusXl;
42
+ if (radius === 'full')
43
+ return FULL_RADIUS;
44
+ return visual.radiusMd;
45
+ }
46
+ const SmartImage = React.forwardRef(({ className, source, alt, skeleton = true, skeletonClassName, transition = 200, radius, objectFit, onLoad, onError, fallbackSource, style, ...props }, ref) => {
32
47
  const [loading, setLoading] = useState(true);
33
48
  const [error, setError] = useState(false);
49
+ const visual = useVisualTokens();
50
+ const borderRadius = resolveRadius(visual, radius ?? 'md');
34
51
  const handleLoad = () => {
35
52
  setLoading(false);
36
53
  onLoad?.();
@@ -41,8 +58,7 @@ const SmartImage = React.forwardRef(({ className, source, alt, skeleton = true,
41
58
  onError?.();
42
59
  };
43
60
  const imageSource = error && fallbackSource ? fallbackSource : source;
44
- return (_jsxs(View, { ref: ref, className: cn(smartImageVariants({ radius, objectFit }), className), ...props, children: [skeleton && loading && (_jsx(Skeleton, { className: cn('absolute inset-0', radius === 'none' && 'rounded-none', radius === 'sm' && 'rounded-sm', radius === 'md' && 'rounded-md', radius === 'lg' && 'rounded-lg', radius === 'xl' && 'rounded-xl', radius === 'full' && 'rounded-full', skeletonClassName) })), _jsx(Image, { source: imageSource, alt: alt, transition: transition, onLoad: handleLoad, onError: handleError, className: cn('w-full h-full', objectFit === 'cover' && 'object-cover', objectFit === 'contain' && 'object-contain', objectFit === 'fill' && 'object-fill', objectFit === 'scale-down' && 'object-scale-down'), style: { opacity: loading && !error ? 0 : 1 } })] }));
61
+ return (_jsxs(View, { ref: ref, className: cn(smartImageVariants({ radius, objectFit }), className), style: [{ borderRadius }, style], ...props, children: [skeleton && loading && (_jsx(Skeleton, { className: cn('absolute inset-0', skeletonClassName) })), _jsx(Image, { source: imageSource, alt: alt, transition: transition, onLoad: handleLoad, onError: handleError, className: cn('w-full h-full', objectFit === 'cover' && 'object-cover', objectFit === 'contain' && 'object-contain', objectFit === 'fill' && 'object-fill', objectFit === 'scale-down' && 'object-scale-down'), style: { opacity: loading && !error ? 0 : 1 } })] }));
45
62
  });
46
63
  SmartImage.displayName = 'SmartImage';
47
64
  export { SmartImage, smartImageVariants };
48
- //# sourceMappingURL=smart-image.js.map
@@ -15,5 +15,4 @@ export interface BottomNavItemProps extends Omit<PressableProps, 'children'> {
15
15
  item: BottomNavItem;
16
16
  isActive: boolean;
17
17
  }
18
- export declare function BottomNav({ items, activeKey, onSelect, className, ...props }: BottomNavProps): import("react/jsx-runtime").JSX.Element;
19
- //# sourceMappingURL=bottom-nav.d.ts.map
18
+ export declare function BottomNav({ items, activeKey, onSelect, className, ...props }: BottomNavProps): React.JSX.Element;
@@ -4,7 +4,7 @@ import { Text } from '../../components/text';
4
4
  import { cn } from '../../lib/cn';
5
5
  import { useInteractionTokens, withInteractivePressableStyle } from '../../lib/interaction-tokens';
6
6
  import { useVisualTokens } from '../../lib/visual-tokens';
7
- // ─── Components ──────────────────────────────────────────────
7
+ import { typographyStyle } from '../../lib/recipes';
8
8
  function BottomNavItemComponent({ item, isActive, className, style: styleProp, ...props }) {
9
9
  const { label, icon, badge } = item;
10
10
  const interaction = useInteractionTokens();
@@ -12,9 +12,12 @@ function BottomNavItemComponent({ item, isActive, className, style: styleProp, .
12
12
  const interactiveStyle = withInteractivePressableStyle(styleProp, interaction, {
13
13
  pressedVariant: 'default',
14
14
  });
15
- return (_jsxs(Pressable, { className: cn('flex-1 items-center justify-center py-2', className), style: interactiveStyle, ...props, children: [_jsxs(View, { className: "relative", style: !isActive ? { opacity: interaction.inactiveOpacity } : undefined, children: [icon, badge !== undefined && badge > 0 && (_jsx(View, { className: "absolute -right-2 -top-1 h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1", children: _jsx(Text, { className: "font-bold text-destructive-foreground", style: { fontSize: visual.bottomNavBadgeFontSize }, children: badge > 99 ? '99+' : badge }) }))] }), _jsx(Text, { className: cn('mt-1 text-xs font-medium', isActive ? 'text-primary' : 'text-muted-foreground'), children: label })] }));
15
+ return (_jsxs(Pressable, { accessibilityRole: "tab", accessibilityState: { selected: isActive }, "aria-selected": isActive, className: cn('flex-1 items-center justify-center py-2', className), style: interactiveStyle, ...props, children: [_jsxs(View, { className: "relative", style: !isActive ? { opacity: interaction.inactiveOpacity } : undefined, children: [icon, badge !== undefined && badge > 0 && (_jsx(View, { className: "absolute -right-2 -top-1 h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1", children: _jsx(Text, { className: "font-bold text-destructive-foreground", style: { fontSize: visual.bottomNavBadgeFontSize }, children: badge > 99 ? '99+' : badge }) }))] }), _jsx(Text, { className: cn('mt-1 font-medium', isActive ? 'text-primary' : 'text-muted-foreground'), style: typographyStyle(visual, 'caption'), children: label })] }));
16
16
  }
17
17
  export function BottomNav({ items, activeKey, onSelect, className, ...props }) {
18
- return (_jsx(View, { className: cn('flex-row border-t border-border bg-background px-2 pb-6 pt-2', className), ...props, children: items.map((item) => (_jsx(BottomNavItemComponent, { item: item, isActive: activeKey === item.key, onPress: () => onSelect(item.key) }, item.key))) }));
18
+ return (_jsx(View
19
+ // The items below are `tab`s, and ARIA requires a `tablist` parent for that role.
20
+ , {
21
+ // The items below are `tab`s, and ARIA requires a `tablist` parent for that role.
22
+ accessibilityRole: "tablist", className: cn('flex-row border-t border-border bg-background px-2 pb-6 pt-2', className), ...props, children: items.map((item) => (_jsx(BottomNavItemComponent, { item: item, isActive: activeKey === item.key, onPress: () => onSelect(item.key) }, item.key))) }));
19
23
  }
20
- //# sourceMappingURL=bottom-nav.js.map
@@ -25,5 +25,4 @@ export interface DrawerMenuProps extends FrostedSurfaceProps {
25
25
  className?: string;
26
26
  style?: StyleProp<ViewStyle>;
27
27
  }
28
- export declare function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, maxWidth, className, style, frosted, blurIntensity, blurTintToken, }: DrawerMenuProps): import("react/jsx-runtime").JSX.Element | null;
29
- //# sourceMappingURL=drawer-menu.d.ts.map
28
+ export declare function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, maxWidth, className, style, frosted, blurIntensity, blurTintToken, }: DrawerMenuProps): React.JSX.Element | null;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { View, Pressable, Platform, Modal, useWindowDimensions, StyleSheet, } from 'react-native';
3
+ import { View, Pressable, Platform, Modal, I18nManager, ScrollView, useWindowDimensions, StyleSheet, } from 'react-native';
4
4
  import Animated, { useSharedValue, useAnimatedStyle, withTiming, Easing, interpolate, } from 'react-native-reanimated';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { Text } from '../../components/text';
@@ -8,12 +8,17 @@ import { cn } from '../../lib/cn';
8
8
  import { useThemeColors } from '../../lib/theme-colors';
9
9
  import { useInteractionTokens, withInteractivePressableStyle } from '../../lib/interaction-tokens';
10
10
  import { useVisualTokens } from '../../lib/visual-tokens';
11
+ import { shadowStyle, surfaceRadius } from '../../lib/recipes';
12
+ import { useMotionPolicy } from '../../lib/motion-policy';
13
+ import { useTapOnly } from '../../lib/tap-only';
11
14
  import { useFrostedSurface, useFrostedBackdrop, } from '../../lib/frosted-surface';
12
15
  export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, maxWidth, className, style, frosted = false, blurIntensity, blurTintToken, }) {
13
16
  const insets = useSafeAreaInsets();
14
17
  const colors = useThemeColors();
15
18
  const interaction = useInteractionTokens();
16
19
  const visual = useVisualTokens();
20
+ const motion = useMotionPolicy();
21
+ const backdropPress = useTapOnly(onClose);
17
22
  const frostedSurface = useFrostedSurface({
18
23
  frosted,
19
24
  blurIntensity,
@@ -33,16 +38,22 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
33
38
  const effectiveMaxWidth = maxWidth ?? (Platform.OS === 'web' ? visual.drawerMaxWidthWeb : undefined);
34
39
  const drawerWidth = effectiveMaxWidth != null ? Math.min(rawWidth, effectiveMaxWidth) : rawWidth;
35
40
  const frostedInset = frosted ? visual.drawerFrostedInset : 0;
36
- const cornerRadius = frosted ? visual.drawerFrostedRadius : 0;
41
+ const cornerRadius = frosted ? visual.drawerFrostedRadius : surfaceRadius(visual, 'xl');
37
42
  const useFloatingFrostedDrawer = frosted && frostedInset > 0;
38
43
  const contentTopPadding = insets.top + visual.drawerContentTopPadding;
39
44
  const progress = useSharedValue(0);
40
45
  const [mounted, setMounted] = React.useState(visible);
41
46
  const closeTimerRef = React.useRef(null);
42
- React.useEffect(() => {
47
+ // Mounting has to happen in the same commit that `visible` flips, or the drawer's
48
+ // entrance animation loses its first frame. React's documented way to do that is to
49
+ // adjust state during render on a props change rather than in an effect; the close
50
+ // path is the asymmetric one and stays below, on a timer, so the exit can finish.
51
+ const [prevVisible, setPrevVisible] = React.useState(visible);
52
+ if (prevVisible !== visible) {
53
+ setPrevVisible(visible);
43
54
  if (visible)
44
55
  setMounted(true);
45
- }, [visible]);
56
+ }
46
57
  React.useEffect(() => {
47
58
  if (!mounted)
48
59
  return;
@@ -50,8 +61,14 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
50
61
  clearTimeout(closeTimerRef.current);
51
62
  closeTimerRef.current = null;
52
63
  }
64
+ const duration = motion.reduceMotion || !motion.animationsEnabled
65
+ ? 0
66
+ : visible
67
+ ? interaction.drawerOpenDuration
68
+ : interaction.drawerCloseDuration;
53
69
  progress.value = withTiming(visible ? 1 : 0, {
54
- duration: visible ? interaction.drawerOpenDuration : interaction.drawerCloseDuration,
70
+ duration,
71
+ reduceMotion: motion.reanimatedReduceMotion,
55
72
  easing: visible
56
73
  ? Easing.bezier(0.2, 0.8, 0.2, 1) // Swift, decelerating entrance
57
74
  : Easing.bezier(0.4, 0, 1, 1), // Accelerating, sharp exit
@@ -59,7 +76,7 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
59
76
  if (!visible) {
60
77
  closeTimerRef.current = setTimeout(() => {
61
78
  setMounted(false);
62
- }, interaction.drawerCloseDuration);
79
+ }, duration);
63
80
  }
64
81
  return () => {
65
82
  if (closeTimerRef.current) {
@@ -67,13 +84,25 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
67
84
  closeTimerRef.current = null;
68
85
  }
69
86
  };
70
- }, [mounted, visible, progress, interaction.drawerOpenDuration, interaction.drawerCloseDuration]);
87
+ }, [
88
+ mounted,
89
+ visible,
90
+ progress,
91
+ interaction.drawerOpenDuration,
92
+ interaction.drawerCloseDuration,
93
+ motion.animationsEnabled,
94
+ motion.reduceMotion,
95
+ motion.reanimatedReduceMotion,
96
+ ]);
71
97
  const backdropStyle = useAnimatedStyle(() => ({
72
98
  opacity: progress.value,
73
99
  pointerEvents: progress.value > 0 ? 'auto' : 'none',
74
100
  }));
101
+ // React Native swaps `left` for `right` under RTL, so the panel already sits on the
102
+ // trailing edge; the translate has to start off-screen on that same side.
103
+ const offscreenX = I18nManager.isRTL ? drawerWidth : -drawerWidth;
75
104
  const drawerStyle = useAnimatedStyle(() => ({
76
- transform: [{ translateX: interpolate(progress.value, [0, 1], [-drawerWidth, 0]) }],
105
+ transform: [{ translateX: interpolate(progress.value, [0, 1], [offscreenX, 0]) }],
77
106
  }));
78
107
  const containerStyle = useAnimatedStyle(() => ({
79
108
  pointerEvents: progress.value > 0 ? 'auto' : 'none',
@@ -87,7 +116,7 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
87
116
  StyleSheet.absoluteFill,
88
117
  { backgroundColor: frosted ? 'transparent' : colors.overlayStrong },
89
118
  backdropStyle,
90
- ], children: [frostedBackdrop, _jsx(Pressable, { style: StyleSheet.absoluteFill, onPress: onClose })] }), _jsxs(Animated.View, { style: [
119
+ ], children: [frostedBackdrop, _jsx(Pressable, { accessible: false, importantForAccessibility: "no", style: StyleSheet.absoluteFill, ...backdropPress })] }), _jsxs(Animated.View, { style: [
91
120
  {
92
121
  position: 'absolute',
93
122
  top: frostedInset,
@@ -99,23 +128,31 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
99
128
  borderTopLeftRadius: useFloatingFrostedDrawer ? cornerRadius : 0,
100
129
  borderBottomLeftRadius: useFloatingFrostedDrawer ? cornerRadius : 0,
101
130
  },
131
+ shadowStyle(visual, colors, frosted ? 'lg' : 'md'),
102
132
  drawerStyle,
103
133
  frostedSurface.surfaceStyle,
104
134
  style,
105
135
  ], className: cn(frosted
106
- ? 'border border-border shadow-xl relative overflow-hidden'
107
- : 'border-r border-border rounded-r-2xl shadow-lg relative overflow-hidden', frosted ? 'bg-transparent' : 'bg-background', className), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-1 pb-8", style: { paddingTop: contentTopPadding }, children: [header && _jsx(View, { className: "px-5 pb-4 mb-2 border-b border-border", children: header }), _jsx(View, { className: "flex-1 px-3", children: sections.map((section, sectionIndex) => (_jsxs(View, { className: "mb-4", children: [section.title && (_jsx(Text, { className: "font-medium text-muted-foreground uppercase tracking-wide px-3 mb-2", style: { fontSize: visual.navSectionTitleFontSize }, children: section.title })), _jsx(View, { className: "gap-0.5", children: section.items.map((item) => {
136
+ ? 'border border-border relative overflow-hidden'
137
+ : 'border-r border-border relative overflow-hidden', frosted ? 'bg-transparent' : 'bg-background', className), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-1 pb-8", style: { paddingTop: contentTopPadding }, children: [header && _jsx(View, { className: "px-5 pb-4 mb-2 border-b border-border", children: header }), _jsx(ScrollView, { className: "flex-1 px-3", keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, children: sections.map((section, sectionIndex) => (_jsxs(View, { className: "mb-4", children: [section.title && (_jsx(Text, { className: "font-medium text-muted-foreground uppercase tracking-wide px-3 mb-2", style: { fontSize: visual.navSectionTitleFontSize }, children: section.title })), _jsx(View, { className: "gap-0.5", children: section.items.map((item) => {
108
138
  const isActive = activeKey === item.key;
109
- return (_jsxs(Pressable, { onPress: () => handleItemPress(item.key), className: cn('flex-row items-center gap-3 px-4 py-3 mx-1 rounded-xl transition-colors', isActive && 'bg-primary-soft-subtle'), style: withInteractivePressableStyle(undefined, interaction, {
139
+ return (_jsxs(Pressable, { accessibilityRole: "button", onPress: () => handleItemPress(item.key), className: cn('flex-row items-center gap-3 mx-1 transition-colors', isActive && 'bg-primary-soft-subtle'), style: withInteractivePressableStyle({
140
+ borderRadius: visual.radiusLg,
141
+ paddingHorizontal: visual.controlPaddingXDefault,
142
+ paddingVertical: visual.controlPaddingYDefault,
143
+ minHeight: visual.touchTargetMinSize,
144
+ }, interaction, {
110
145
  pressedVariant: 'default',
111
146
  }), children: [item.icon, _jsx(Text, { className: cn('flex-1 font-semibold tracking-tight', item.destructive
112
147
  ? 'text-destructive'
113
148
  : isActive
114
149
  ? 'text-primary'
115
- : 'text-foreground'), style: { fontSize: visual.drawerItemFontSize }, children: item.label }), item.badge !== undefined && (_jsx(View, { className: "bg-primary px-2 py-0.5 rounded-full items-center", style: { minWidth: visual.drawerBadgeMinWidth }, children: _jsx(Text, { className: "font-semibold text-primary-foreground", style: { fontSize: visual.navItemBadgeFontSize }, children: item.badge }) }))] }, item.key));
150
+ : 'text-foreground'), style: { fontSize: visual.drawerItemFontSize }, children: item.label }), item.badge !== undefined && (_jsx(View, { className: "bg-primary px-2 py-0.5 items-center", style: {
151
+ minWidth: visual.drawerBadgeMinWidth,
152
+ borderRadius: visual.badgeRadius,
153
+ }, children: _jsx(Text, { className: "font-semibold text-primary-foreground", style: { fontSize: visual.navItemBadgeFontSize }, children: item.badge }) }))] }, item.key));
116
154
  }) })] }, sectionIndex))) }), footer && _jsx(View, { className: "px-5 py-4 mt-auto border-t border-border", children: footer })] })] })] }));
117
155
  if (Platform.OS !== 'android')
118
156
  return drawerTree;
119
- return (_jsx(Modal, { visible: mounted, transparent: true, animationType: "none", onRequestClose: onClose, statusBarTranslucent: true, presentationStyle: "overFullScreen", children: drawerTree }));
157
+ return (_jsx(Modal, { visible: mounted, transparent: true, animationType: "none", onRequestClose: onClose, statusBarTranslucent: true, navigationBarTranslucent: true, presentationStyle: "overFullScreen", children: drawerTree }));
120
158
  }
121
- //# sourceMappingURL=drawer-menu.js.map
@@ -14,5 +14,4 @@ export interface FloatingBottomNavItemProps extends Omit<PressableProps, 'childr
14
14
  item: FloatingBottomNavItem;
15
15
  isActive: boolean;
16
16
  }
17
- export declare function FloatingBottomNav({ items, activeKey, onSelect, className, ...props }: FloatingBottomNavProps): import("react/jsx-runtime").JSX.Element;
18
- //# sourceMappingURL=floating-bottom-nav.d.ts.map
17
+ export declare function FloatingBottomNav({ items, activeKey, onSelect, className, ...props }: FloatingBottomNavProps): React.JSX.Element;
@@ -2,12 +2,21 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { View, Pressable } from 'react-native';
3
3
  import { Text } from '../../components/text';
4
4
  import { cn } from '../../lib/cn';
5
- // ─── Components ──────────────────────────────────────────────
6
- function FloatingNavItem({ item, isActive, className, ...props }) {
5
+ import { useVisualTokens } from '../../lib/visual-tokens';
6
+ import { useThemeColors } from '../../lib/theme-colors';
7
+ import { shadowStyle, surfaceRadius, typographyStyle } from '../../lib/recipes';
8
+ function FloatingNavItem({ item, isActive, className, style: styleProp, ...props }) {
7
9
  const { label, icon } = item;
8
- return (_jsxs(Pressable, { className: cn('flex-row items-center gap-2 rounded-full px-4 py-2 active:scale-95', isActive && 'bg-primary', className), ...props, children: [_jsx(View, { className: cn(isActive ? 'text-primary-foreground' : 'text-muted-foreground'), children: icon }), isActive && _jsx(Text, { className: "text-sm font-semibold text-primary-foreground", children: label })] }));
10
+ const visual = useVisualTokens();
11
+ const pillStyle = {
12
+ borderRadius: visual.badgeRadius,
13
+ paddingHorizontal: visual.controlPaddingXDefault,
14
+ paddingVertical: visual.controlPaddingYSm,
15
+ };
16
+ return (_jsxs(Pressable, { accessibilityRole: "tab", accessibilityState: { selected: isActive }, "aria-selected": isActive, className: cn('flex-row items-center gap-2 active:scale-95', isActive && 'bg-primary', className), style: (state) => [pillStyle, typeof styleProp === 'function' ? styleProp(state) : styleProp], ...props, children: [_jsx(View, { className: cn(isActive ? 'text-primary-foreground' : 'text-muted-foreground'), children: icon }), isActive && (_jsx(Text, { className: "font-semibold text-primary-foreground", style: typographyStyle(visual, 'label'), children: label }))] }));
9
17
  }
10
18
  export function FloatingBottomNav({ items, activeKey, onSelect, className, ...props }) {
11
- return (_jsx(View, { className: cn('items-center pb-8', className), ...props, children: _jsx(View, { className: "flex-row items-center gap-1 rounded-full bg-card p-1.5 shadow-lg", children: items.map((item) => (_jsx(FloatingNavItem, { item: item, isActive: activeKey === item.key, onPress: () => onSelect(item.key) }, item.key))) }) }));
19
+ const visual = useVisualTokens();
20
+ const colors = useThemeColors();
21
+ return (_jsx(View, { className: cn('items-center pb-8', className), ...props, children: _jsx(View, { accessibilityRole: "tablist", className: "flex-row items-center gap-1 bg-card p-1.5", style: [{ borderRadius: surfaceRadius(visual, 'xl') }, shadowStyle(visual, colors, 'md')], children: items.map((item) => (_jsx(FloatingNavItem, { item: item, isActive: activeKey === item.key, onPress: () => onSelect(item.key) }, item.key))) }) }));
12
22
  }
13
- //# sourceMappingURL=floating-bottom-nav.js.map