@vvedantb/native-ui 0.37.2 → 0.39.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 (385) hide show
  1. package/README.md +8 -7
  2. package/dist/Avatar.jsx +22 -19
  3. package/dist/BottomSheetContainer.jsx +0 -6
  4. package/dist/BulkActionBar.jsx +0 -24
  5. package/dist/Button.jsx +92 -116
  6. package/dist/Card.jsx +56 -50
  7. package/dist/ColorSwatches.jsx +0 -6
  8. package/dist/Dialog.jsx +0 -12
  9. package/dist/DropdownMenu.jsx +0 -10
  10. package/dist/EmptyState.jsx +0 -3
  11. package/dist/ExpoWebRoot.jsx +0 -6
  12. package/dist/Field.jsx +0 -17
  13. package/dist/FloatingSurface.jsx +95 -80
  14. package/dist/FloatingTabBar.jsx +0 -23
  15. package/dist/IconButton.jsx +0 -1
  16. package/dist/LoadingState.jsx +0 -6
  17. package/dist/PasswordInput.jsx +0 -15
  18. package/dist/PillTabs.jsx +39 -36
  19. package/dist/SearchInput.jsx +0 -13
  20. package/dist/SectionLabel.jsx +0 -1
  21. package/dist/SharedTransition.jsx +0 -3
  22. package/dist/Skeleton.jsx +0 -2
  23. package/dist/Spinner.jsx +0 -2
  24. package/dist/StatusDot.jsx +0 -5
  25. package/dist/Switch.jsx +32 -22
  26. package/dist/Tabs.jsx +27 -26
  27. package/dist/Textarea.jsx +0 -1
  28. package/dist/ThemeToggle.jsx +0 -1
  29. package/dist/Toast.jsx +80 -91
  30. package/dist/UpdateChecker.jsx +0 -1
  31. package/dist/ai/activity-question.jsx +0 -6
  32. package/dist/ai/activity-step-label.js +0 -6
  33. package/dist/ai/activity-step-types.js +0 -4
  34. package/dist/ai/activity-tasks-utils.js +0 -17
  35. package/dist/ai/activity-timeline.js +0 -8
  36. package/dist/ai/attachments.jsx +0 -2
  37. package/dist/ai/chain-of-thought.jsx +0 -3
  38. package/dist/ai/chat-text.js +0 -1
  39. package/dist/ai/chat-thread.jsx +0 -1
  40. package/dist/ai/choice-question.jsx +0 -10
  41. package/dist/ai/code-block.jsx +0 -31
  42. package/dist/ai/collapsible.jsx +0 -14
  43. package/dist/ai/conversation-context.js +0 -3
  44. package/dist/ai/conversation.jsx +2 -48
  45. package/dist/ai/file-chip.jsx +0 -2
  46. package/dist/ai/icon-button.jsx +0 -8
  47. package/dist/ai/index.js +0 -5
  48. package/dist/ai/message-context-menu.jsx +0 -7
  49. package/dist/ai/message.jsx +0 -21
  50. package/dist/ai/prompt-input-menu.jsx +0 -3
  51. package/dist/ai/prompt-input.jsx +0 -27
  52. package/dist/ai/response-text.jsx +0 -6
  53. package/dist/ai/sources.jsx +0 -1
  54. package/dist/ai/suggestion.jsx +0 -1
  55. package/dist/ai/trace.jsx +0 -11
  56. package/dist/ai/unified-diff.jsx +0 -4
  57. package/dist/app-root/AuthGroupGate.jsx +65 -0
  58. package/dist/app-root/SsoCallbackScreen.jsx +97 -0
  59. package/dist/app-root/fonts.js +88 -0
  60. package/dist/app-root/index.js +3 -0
  61. package/dist/auth/AuthScreen.jsx +250 -77
  62. package/dist/auth/GoogleSignInButton.jsx +0 -3
  63. package/dist/auth/SecondFactorScreen.jsx +18 -14
  64. package/dist/auth/SignInScreen.jsx +40 -34
  65. package/dist/auth/authErrors.js +0 -4
  66. package/dist/auth/clerkCore3.js +0 -7
  67. package/dist/auth/index.js +0 -4
  68. package/dist/auth/totp.js +0 -2
  69. package/dist/brand/GoogleMark.jsx +0 -1
  70. package/dist/brand/ProviderIcon.jsx +0 -2
  71. package/dist/brand/index.js +0 -3
  72. package/dist/brand/svg.js +0 -6
  73. package/dist/configureTheme.js +0 -9
  74. package/dist/controlStyles.js +0 -14
  75. package/dist/crash/LastCrashDialog.jsx +56 -0
  76. package/dist/crash/lastCrash.js +192 -0
  77. package/dist/entries/ai.js +0 -3
  78. package/dist/entries/ambient.js +0 -2
  79. package/dist/entries/app-root.js +1 -0
  80. package/dist/entries/auth.js +0 -4
  81. package/dist/entries/bottom-sheet.js +0 -2
  82. package/dist/entries/brand.js +0 -1
  83. package/dist/entries/button.js +0 -1
  84. package/dist/entries/crash.js +2 -0
  85. package/dist/entries/date-time.js +0 -2
  86. package/dist/entries/expo-router.js +0 -3
  87. package/dist/entries/expo-web-root.js +0 -2
  88. package/dist/entries/floating.js +0 -2
  89. package/dist/entries/generative-ui.js +0 -4
  90. package/dist/entries/gesture-handler.js +0 -3
  91. package/dist/entries/keyboard-controller.js +0 -3
  92. package/dist/entries/layout.js +0 -2
  93. package/dist/entries/markdown.js +0 -3
  94. package/dist/entries/marketing.js +0 -1
  95. package/dist/entries/page-title.js +0 -5
  96. package/dist/entries/password-input.js +0 -2
  97. package/dist/entries/paste-input.js +0 -3
  98. package/dist/entries/primitives.js +0 -6
  99. package/dist/entries/search-input.js +0 -2
  100. package/dist/entries/tab-bar.js +0 -2
  101. package/dist/entries/theme.js +4 -2
  102. package/dist/entries/toast.js +0 -3
  103. package/dist/entries/video.js +0 -2
  104. package/dist/entries/webview.js +0 -2
  105. package/dist/examples/AiChatGallery.jsx +0 -11
  106. package/dist/examples/ParityGallery.jsx +0 -12
  107. package/dist/floating.js +0 -8
  108. package/dist/generative-ui/GenerativeUiPanel.jsx +0 -2
  109. package/dist/generative-ui/components.jsx +0 -8
  110. package/dist/glass.js +55 -0
  111. package/dist/glassBlur.jsx +0 -12
  112. package/dist/highlight.js +0 -26
  113. package/dist/index.js +4 -2
  114. package/dist/loadingGrid.js +0 -13
  115. package/dist/markdown/Markdown.jsx +0 -59
  116. package/dist/markdown/MarkdownTable.jsx +0 -18
  117. package/dist/markdown/tableText.js +0 -5
  118. package/dist/marketing/UpgradeToProCard.jsx +0 -5
  119. package/dist/marketing/pricing.js +0 -3
  120. package/dist/media/ImageGallery.jsx +0 -16
  121. package/dist/media/imageZoom.js +0 -4
  122. package/dist/media/zoom-image-gesture.jsx +0 -8
  123. package/dist/media/zoomImage.js +0 -3
  124. package/dist/motion.js +0 -3
  125. package/dist/neutralTheme.js +158 -0
  126. package/dist/pagerSwipe.js +0 -16
  127. package/dist/palette.js +0 -10
  128. package/dist/primitives/button.jsx +0 -5
  129. package/dist/primitives/icon.jsx +0 -4
  130. package/dist/primitives/keyboard-controller.jsx +0 -27
  131. package/dist/primitives/native-only-animated-view.jsx +0 -5
  132. package/dist/primitives/overlay.jsx +0 -2
  133. package/dist/primitives/pager-gesture.jsx +3 -29
  134. package/dist/primitives/paste-input.jsx +0 -5
  135. package/dist/primitives/select.jsx +0 -10
  136. package/dist/primitives/sheet-drag.jsx +0 -3
  137. package/dist/primitives/sheet-gesture.jsx +0 -8
  138. package/dist/primitives/swipe-row-gesture.jsx +3 -45
  139. package/dist/primitives/text.jsx +0 -5
  140. package/dist/primitives/toast-drag-gesture.jsx +4 -24
  141. package/dist/primitives/web-click-guard.js +0 -3
  142. package/dist/primitives/window-layer.jsx +0 -14
  143. package/dist/push.js +0 -6
  144. package/dist/relativeTime.js +0 -13
  145. package/dist/settings/MoreFromProjectV.jsx +0 -5
  146. package/dist/settings/ThemeModePicker.jsx +2 -9
  147. package/dist/settings/projectVMobileApps.js +1 -6
  148. package/dist/sheetDrag.js +0 -10
  149. package/dist/swipeRow.js +0 -15
  150. package/dist/tabBarRoutes.js +0 -4
  151. package/dist/tabIndicator.js +0 -4
  152. package/dist/tailwind-preset.cjs +0 -54
  153. package/dist/tailwind-preset.d.cts +0 -8
  154. package/dist/theme.jsx +29 -21
  155. package/dist/themeModeStore.js +62 -0
  156. package/dist/themeModes.js +9 -0
  157. package/dist/toastChrome.js +0 -6
  158. package/dist/toastDrag.js +0 -14
  159. package/dist/toastStore.js +0 -4
  160. package/dist/updateCheck.js +0 -7
  161. package/dist/video/InlineVideo.jsx +0 -2
  162. package/dist/webview/htmlView.js +0 -5
  163. package/package.json +47 -19
  164. package/src/ArtifactList.tsx +0 -2
  165. package/src/Avatar.tsx +3 -3
  166. package/src/Badge.tsx +0 -1
  167. package/src/BottomSheetContainer.tsx +0 -11
  168. package/src/BulkActionBar.tsx +0 -66
  169. package/src/Button.tsx +4 -40
  170. package/src/CaptureButton.tsx +0 -1
  171. package/src/Card.tsx +3 -15
  172. package/src/Checkbox.tsx +0 -2
  173. package/src/ColorSwatches.tsx +0 -9
  174. package/src/ConfirmDialog.tsx +0 -7
  175. package/src/DateTimeField.tsx +0 -5
  176. package/src/Dialog.tsx +0 -27
  177. package/src/DividedList.tsx +0 -1
  178. package/src/DropdownMenu.tsx +0 -51
  179. package/src/EmptyState.tsx +0 -5
  180. package/src/ExpoWebRoot.tsx +0 -10
  181. package/src/Field.tsx +0 -14
  182. package/src/FloatingFAB.tsx +0 -3
  183. package/src/FloatingSurface.tsx +11 -8
  184. package/src/FloatingTabBar.tsx +0 -25
  185. package/src/IconButton.tsx +0 -5
  186. package/src/Input.tsx +0 -1
  187. package/src/Label.tsx +0 -1
  188. package/src/LabeledSwitchRow.tsx +0 -2
  189. package/src/ListRow.tsx +0 -12
  190. package/src/LoadingState.tsx +0 -12
  191. package/src/MenuSheet.tsx +0 -2
  192. package/src/PageIndicator.tsx +0 -2
  193. package/src/PageTitle.tsx +0 -15
  194. package/src/Pager.tsx +0 -9
  195. package/src/PasswordInput.tsx +0 -24
  196. package/src/PillTabs.tsx +3 -11
  197. package/src/PinnedBotTile.tsx +0 -6
  198. package/src/Progress.tsx +0 -3
  199. package/src/ReactionRow.tsx +0 -8
  200. package/src/ScreenContainer.tsx +0 -4
  201. package/src/SearchInput.tsx +0 -25
  202. package/src/SectionLabel.tsx +0 -2
  203. package/src/Select.tsx +0 -6
  204. package/src/Separator.tsx +0 -2
  205. package/src/SharedTransition.tsx +0 -7
  206. package/src/Sheet.tsx +0 -3
  207. package/src/SheetRow.tsx +0 -12
  208. package/src/Skeleton.tsx +0 -10
  209. package/src/Spinner.tsx +0 -6
  210. package/src/StackPageHeader.tsx +0 -16
  211. package/src/StatGrid.tsx +0 -1
  212. package/src/StatusDot.tsx +0 -6
  213. package/src/SurfaceRow.tsx +0 -12
  214. package/src/SwipeableRow.tsx +0 -4
  215. package/src/Switch.tsx +3 -4
  216. package/src/Tabs.tsx +3 -27
  217. package/src/Textarea.tsx +0 -2
  218. package/src/ThemeToggle.tsx +0 -1
  219. package/src/Toast.tsx +3 -19
  220. package/src/UpdateChecker.tsx +0 -46
  221. package/src/ai/activity-question.tsx +0 -8
  222. package/src/ai/activity-step-detail.tsx +0 -5
  223. package/src/ai/activity-step-label.ts +0 -5
  224. package/src/ai/activity-step-types.ts +0 -24
  225. package/src/ai/activity-step.tsx +0 -4
  226. package/src/ai/activity-tasks-utils.ts +0 -13
  227. package/src/ai/activity-timeline.ts +0 -6
  228. package/src/ai/attachments.tsx +0 -13
  229. package/src/ai/chain-of-thought.tsx +0 -5
  230. package/src/ai/chat-jump-rail.tsx +0 -2
  231. package/src/ai/chat-text.ts +0 -1
  232. package/src/ai/chat-thread.tsx +0 -9
  233. package/src/ai/choice-question.tsx +0 -36
  234. package/src/ai/code-block.tsx +0 -52
  235. package/src/ai/collapsible.tsx +0 -12
  236. package/src/ai/conversation-context.ts +0 -14
  237. package/src/ai/conversation.tsx +0 -58
  238. package/src/ai/file-chip.tsx +0 -1
  239. package/src/ai/icon-button.tsx +0 -17
  240. package/src/ai/index.ts +0 -5
  241. package/src/ai/message-action-sheet.tsx +0 -8
  242. package/src/ai/message-context-menu.tsx +0 -22
  243. package/src/ai/message-quote.tsx +0 -4
  244. package/src/ai/message.tsx +0 -66
  245. package/src/ai/prompt-input-menu.tsx +0 -19
  246. package/src/ai/prompt-input.tsx +0 -97
  247. package/src/ai/reasoning.tsx +0 -6
  248. package/src/ai/reply-quote-chip.tsx +0 -5
  249. package/src/ai/response-text.tsx +0 -8
  250. package/src/ai/shimmer.tsx +0 -2
  251. package/src/ai/sources.tsx +0 -3
  252. package/src/ai/subagent-cards.tsx +0 -13
  253. package/src/ai/suggestion.tsx +0 -4
  254. package/src/ai/tool-approval-card.tsx +0 -14
  255. package/src/ai/trace.tsx +0 -23
  256. package/src/ai/unified-diff.tsx +0 -16
  257. package/src/ai/use-streaming-disclosure.ts +0 -4
  258. package/src/app-root/AuthGroupGate.tsx +38 -0
  259. package/src/app-root/SsoCallbackScreen.tsx +52 -0
  260. package/src/app-root/fonts.ts +53 -0
  261. package/src/app-root/index.ts +6 -0
  262. package/src/auth/AccountScreens.tsx +0 -16
  263. package/src/auth/AuthProviders.tsx +0 -13
  264. package/src/auth/AuthScreen.tsx +95 -6
  265. package/src/auth/GoogleSignInButton.tsx +0 -12
  266. package/src/auth/SecondFactorScreen.tsx +17 -15
  267. package/src/auth/SignInScreen.tsx +103 -105
  268. package/src/auth/authErrors.ts +0 -6
  269. package/src/auth/clerkCore3.ts +0 -6
  270. package/src/auth/index.ts +0 -4
  271. package/src/auth/totp.ts +0 -13
  272. package/src/brand/AppIcons.tsx +0 -6
  273. package/src/brand/AppMark.tsx +0 -5
  274. package/src/brand/AppWordmark.tsx +0 -7
  275. package/src/brand/GoogleMark.tsx +0 -4
  276. package/src/brand/ProviderIcon.tsx +0 -6
  277. package/src/brand/familyApps.ts +0 -2
  278. package/src/brand/index.ts +0 -3
  279. package/src/brand/svg.ts +0 -9
  280. package/src/configureTheme.ts +0 -10
  281. package/src/controlStyles.ts +0 -12
  282. package/src/crash/LastCrashDialog.tsx +36 -0
  283. package/src/crash/lastCrash.ts +218 -0
  284. package/src/entries/ai.ts +0 -3
  285. package/src/entries/ambient.ts +0 -2
  286. package/src/entries/app-root.ts +1 -0
  287. package/src/entries/auth.ts +0 -4
  288. package/src/entries/bottom-sheet.ts +0 -2
  289. package/src/entries/brand.ts +0 -1
  290. package/src/entries/button.ts +0 -1
  291. package/src/entries/crash.ts +13 -0
  292. package/src/entries/date-time.ts +0 -2
  293. package/src/entries/expo-router.ts +0 -3
  294. package/src/entries/expo-web-root.ts +0 -2
  295. package/src/entries/floating.ts +0 -2
  296. package/src/entries/generative-ui.ts +0 -4
  297. package/src/entries/gesture-handler.ts +0 -3
  298. package/src/entries/keyboard-controller.ts +0 -3
  299. package/src/entries/layout.ts +0 -2
  300. package/src/entries/markdown.ts +0 -3
  301. package/src/entries/marketing.ts +0 -1
  302. package/src/entries/page-title.ts +0 -5
  303. package/src/entries/password-input.ts +0 -2
  304. package/src/entries/paste-input.ts +0 -3
  305. package/src/entries/primitives.ts +0 -6
  306. package/src/entries/search-input.ts +0 -2
  307. package/src/entries/tab-bar.ts +0 -2
  308. package/src/entries/theme.ts +8 -2
  309. package/src/entries/toast.ts +0 -3
  310. package/src/entries/video.ts +0 -2
  311. package/src/entries/webview.ts +0 -2
  312. package/src/examples/AiChatGallery.tsx +0 -11
  313. package/src/examples/ParityGallery.tsx +0 -25
  314. package/src/floating.ts +0 -6
  315. package/src/generative-ui/GenerativeUiPanel.tsx +0 -15
  316. package/src/generative-ui/components.tsx +0 -9
  317. package/src/generative-ui/context.ts +0 -2
  318. package/src/glass.ts +31 -0
  319. package/src/glassBlur.tsx +0 -15
  320. package/src/highlight.ts +1 -21
  321. package/src/index.ts +7 -2
  322. package/src/loadingGrid.ts +0 -12
  323. package/src/markdown/Markdown.tsx +0 -71
  324. package/src/markdown/MarkdownTable.tsx +0 -23
  325. package/src/markdown/tableText.ts +0 -3
  326. package/src/marketing/PricingModal.tsx +0 -13
  327. package/src/marketing/UpgradeToProCard.tsx +0 -14
  328. package/src/marketing/pricing.ts +0 -12
  329. package/src/media/ImageGallery.tsx +0 -18
  330. package/src/media/MediaCard.tsx +0 -8
  331. package/src/media/imageZoom.ts +0 -4
  332. package/src/media/zoom-image-gesture.tsx +0 -9
  333. package/src/media/zoomImage.ts +0 -5
  334. package/src/motion.ts +0 -3
  335. package/src/neutralTheme.ts +127 -0
  336. package/src/pagerSwipe.ts +0 -13
  337. package/src/palette.ts +0 -10
  338. package/src/pressScale.ts +0 -7
  339. package/src/primitives/button.tsx +0 -4
  340. package/src/primitives/card.tsx +0 -1
  341. package/src/primitives/icon.tsx +0 -2
  342. package/src/primitives/input.tsx +0 -4
  343. package/src/primitives/keyboard-controller.tsx +0 -25
  344. package/src/primitives/keyboard-parts.tsx +0 -27
  345. package/src/primitives/native-only-animated-view.tsx +0 -5
  346. package/src/primitives/overlay.tsx +0 -25
  347. package/src/primitives/pager-gesture.tsx +0 -20
  348. package/src/primitives/paste-input.tsx +0 -4
  349. package/src/primitives/paste-parts.tsx +0 -1
  350. package/src/primitives/select.tsx +0 -18
  351. package/src/primitives/sheet-drag.tsx +0 -19
  352. package/src/primitives/sheet-gesture.tsx +0 -22
  353. package/src/primitives/swipe-row-gesture.tsx +0 -33
  354. package/src/primitives/switch.tsx +0 -4
  355. package/src/primitives/text.tsx +0 -4
  356. package/src/primitives/toast-drag-gesture.tsx +0 -13
  357. package/src/primitives/web-click-guard.ts +0 -2
  358. package/src/primitives/window-layer.tsx +0 -18
  359. package/src/push.ts +0 -15
  360. package/src/relativeTime.ts +0 -21
  361. package/src/router/RouterStackPageHeader.tsx +0 -1
  362. package/src/settings/MoreFromProjectV.tsx +0 -8
  363. package/src/settings/SettingsEmptyState.tsx +0 -2
  364. package/src/settings/SettingsSection.tsx +0 -3
  365. package/src/settings/SettingsToggleRow.tsx +0 -4
  366. package/src/settings/ThemeModePicker.tsx +2 -16
  367. package/src/settings/projectVMobileApps.ts +0 -8
  368. package/src/sheetDrag.ts +0 -9
  369. package/src/swipeRow.ts +0 -23
  370. package/src/tabBarRoutes.ts +0 -13
  371. package/src/tabIndicator.ts +0 -5
  372. package/src/tailwind-preset.cjs +0 -54
  373. package/src/tailwind-preset.d.cts +0 -8
  374. package/src/theme.tsx +11 -2
  375. package/src/themeModeStore.ts +85 -0
  376. package/src/themeModes.ts +10 -0
  377. package/src/toastChrome.ts +0 -6
  378. package/src/toastDrag.ts +0 -13
  379. package/src/toastStore.ts +0 -7
  380. package/src/updateCheck.ts +0 -15
  381. package/src/video/InlineVideo.tsx +0 -5
  382. package/src/webview/HtmlView.tsx +0 -23
  383. package/src/webview/HtmlView.web.tsx +0 -1
  384. package/src/webview/htmlView.ts +0 -5
  385. package/types/prism-react-renderer.d.ts +22 -0
package/README.md CHANGED
@@ -16,7 +16,7 @@ Peers the app must already have (Expo SDK 57 / RN 0.76+):
16
16
  - `nativewind` `>=4`
17
17
  - `react-native-reanimated`, `react-native-safe-area-context`, `react-native-screens`
18
18
  - `@rn-primitives/slot`, `@rn-primitives/switch`, `@rn-primitives/select`
19
- - `@expo/vector-icons`, `@tabler/icons-react-native`, `lucide-react-native`
19
+ - `@expo/vector-icons`, `@tabler/icons-react-native`
20
20
  - `class-variance-authority`, `clsx`, `tailwind-merge`
21
21
 
22
22
  Optional, only if you import those components:
@@ -27,7 +27,7 @@ Optional, only if you import those components:
27
27
  - `@clerk/expo`, `convex`, `expo-auth-session`, `expo-web-browser` and `expo-router` — `@vvedantb/native-ui/auth` (0.7.0). `expo-router` also for `@vvedantb/native-ui/expo-web-root`.
28
28
  - `react-native-gesture-handler` (`>=2.0.0`) — `@vvedantb/native-ui/gesture-handler` (Unreleased). Wrap the app in `GestureHandlerRootView`, and put `GestureHandlerProvider` from that entry inside it: the sheet drags (`SheetContent`, the compact `DialogContent`) then run on Gesture Handler, on the UI thread, and each overlay's `Modal` gets its own root view (Android needs one in every `Modal`). It also turns on the `SwipeableRow` swipe. Without the provider, the sheets drag with `PanResponder`, with the same rules, and a `SwipeableRow` does not swipe. Only that entry imports the peer, so an app without it bundles as before. In a Metro monorepo, resolve the peer from the app (one copy), as for `react`.
29
29
  - `react-native-keyboard-controller` (`>=1.21.0`) — `@vvedantb/native-ui/keyboard-controller` (Unreleased). Put `KeyboardControllerProvider` from that entry inside the app's `KeyboardProvider`: the chat transcript (`ConversationList`), the dock (`ConversationDock`) and its scroll button then follow the keyboard frame by frame, a drag down on the transcript moves the keyboard with the finger (iOS, Android 11+; Android 10 and below lower it at once), and `PromptInput`, `ChatThread`, the overlays and `KeyboardAvoidingView` pad frame by frame. The dock moves by the keyboard less the bottom inset: its content pads that inset, as `PromptInput` does. Without the provider, every part keeps React Native's `KeyboardAvoidingView`. Only that entry imports the peer. In a Metro monorepo, resolve the peer from the app (one copy): the parts read its provider's context.
30
- - `react-native-svg` — the app marks (`APP_ICONS`, `Icon*`, `AppMark`, `AppWordmark`), `GoogleMark` and `PricingModal`. Apps with the icon peers above already have it: `lucide-react-native` and `@tabler/icons-react-native` both require it.
30
+ - `react-native-svg` — the app marks (`APP_ICONS`, `Icon*`, `AppMark`, `AppWordmark`), `GoogleMark` and `PricingModal`. Apps with the icon peers above already have it: `@tabler/icons-react-native` requires it.
31
31
 
32
32
  Optional and loaded only when installed, so the package imports and runs without them:
33
33
 
@@ -69,7 +69,7 @@ pnpm --filter native-gallery start
69
69
  # or cd apps/native-gallery && npx expo start
70
70
  ```
71
71
 
72
- `tests/galleryRegistry.test.ts` fails when a React component export has no entry in `apps/native-gallery/src/galleryRegistry.ts`. Maestro flows in `apps/native-gallery/.maestro/` drive the dropdown, composer, sheets and select. The `native-ui-gallery-android` GitHub Actions job builds the gallery, boots an API 34 emulator and runs them for pull requests that touch this package or the gallery. A new or changed component needs a gallery entry, a Maestro flow and a hand test on an Android emulator.
72
+ `tests/galleryRegistry.test.ts` fails when a React component export has no entry in `apps/native-gallery/src/galleryRegistry.ts`. Maestro flows in `apps/native-gallery/.maestro/` drive the dropdown, composer, sheets and select. No workflow runs them on a pull request: run `pnpm --filter native-gallery maestro` on an emulator and report the result in the pull request body. The pre-push hook runs the typecheck, lint and tests of this package. A new or changed component needs a gallery entry, a Maestro flow and a hand test on an Android emulator.
73
73
 
74
74
  The `Select` note stays: mount one `<PortalHost />` from `@rn-primitives/portal` at the app root, outside any `Modal`. The gallery does so in `app/_layout.tsx`.
75
75
 
@@ -89,7 +89,7 @@ The root entry exports everything. It still imports `BottomSheetContainer` and `
89
89
  | `@vvedantb/native-ui/toast` | `toast`, `Toaster`, `ToastOptions`, `ToastVariant` | none (from 0.3.12) |
90
90
  | `@vvedantb/native-ui/theme` | `NativeUiProvider`, `useNativeUi`, `useLargerText`, `useAccentColor`, `DEFAULT_ACCENT`, `tokens`, `palette`, `withAlpha`, `configureTheme` (with the `ThemeConfig`, `ThemeColors` and `ThemePalette` types), `fontClass`, `fontFamily` (with the `ThemeFonts` type), `cn`, `Colors` and the colour constants | none |
91
91
  | `@vvedantb/native-ui/floating` | `FloatingSurface`, `GlassSheetBackground`, `LiquidGlass`, `GlassBlurProvider`, `GlassBlurTarget`, `FloatingFAB`, `useReduceTransparency`, the floating metrics and styles | `expo-blur` (loader) |
92
- | `@vvedantb/native-ui/layout` | `ScreenContainer`, `SafeAreaContainer`, `PageTitle`, `PageHeader`, `StackPageHeader` (0.5.0) and their props types, `SectionLabel` (0.5.0), `SettingsSection`, `SettingsField`, `SettingsToggleRow`, `SettingsStack`, `MoreFromProjectV` and `FromProjectV` (0.8.0), `ScreenContainerProps`, `SettingsEmptyState`, `PinnedBotTile`, `BotPinGrid`, `ArtifactList` (0.12.0). Unreleased: `ThemeModePicker`, `THEME_MODES` and `ThemeMode`, the web theme tiles for an Appearance section (needs `react-native-svg`). `ScreenContainer` takes `refreshing`, `onRefresh` and `refreshControl` (0.12.0). `StackPageHeader` takes `centre` (0.12.0) | `expo-blur` (loader) |
92
+ | `@vvedantb/native-ui/layout` | `ScreenContainer`, `SafeAreaContainer`, `PageTitle`, `PageHeader`, `StackPageHeader` (0.5.0) and their props types, `SectionLabel` (0.5.0), `SettingsSection`, `SettingsField`, `SettingsToggleRow`, `SettingsStack`, `MoreFromProjectV` and `FromProjectV` (0.8.0), `ScreenContainerProps`, `SettingsEmptyState`, `PinnedBotTile`, `BotPinGrid`, `ArtifactList` (0.12.0). From 0.35.0: `ThemeModePicker`, `THEME_MODES` and `ThemeMode`, the web theme tiles for an Appearance section (needs `react-native-svg`). The Neutral store, `paintDarkFamily` and `createThemeModeStore` live on `@vvedantb/native-ui/theme`. `ScreenContainer` takes `refreshing`, `onRefresh` and `refreshControl` (0.12.0). `StackPageHeader` takes `centre` (0.12.0) | `expo-blur` (loader) |
93
93
  | `@vvedantb/native-ui/marketing` | `UpgradeToProCard`, `PricingModal` and the pricing types | none |
94
94
  | `@vvedantb/native-ui/ambient` | `AmbientBackground` | `expo-linear-gradient` (loader) |
95
95
  | `@vvedantb/native-ui/blur`, `/haptics` | the loaders | `expo-blur`, `expo-haptics` (loaders) |
@@ -102,6 +102,7 @@ The root entry exports everything. It still imports `BottomSheetContainer` and `
102
102
  | `@vvedantb/native-ui/ai-gallery` | `AiChatGallery`, `AiChatSamples` (from 0.4.0) | none |
103
103
  | `@vvedantb/native-ui/auth` | From 0.7.0: `AuthProviders`, `SignInScreen`, `SignUpScreen`, `ChangePasswordScreen`, `DeleteAccountScreen` (0.32.0), `GoogleSignInButton`, `useGoogleSignIn`, `AuthScreen`, `OrDivider`, `FieldError`, `authErrorMessage`, `SecondFactorScreen`, `useSecondFactor`, `submitTotpSecondFactor`, `submitSecondFactor`, `prepareSecondFactorIfNeeded`, `prepareFirstFactorIfNeeded`, `submitFirstFactor`, `pickFirstFactorStrategy`, `TOTP_MESSAGES` and their props types. See [Auth](#auth-070). Not on the root entry. | `@clerk/expo`, `convex`, `expo-auth-session`, `expo-web-browser`, `expo-router` (import) |
104
104
  | `@vvedantb/native-ui/expo-router` | From 0.12.0: `RouterStackPageHeader`, `RouterStackPageHeaderProps`, `goBackOrReplace`. Not on the root, `/layout` or `/page-title` entries. | `expo-router` (import) |
105
+ | `@vvedantb/native-ui/app-root` | `instrumentSansFontMap`, `useInstrumentSansFonts`, `useHideSplashWhenReady`, `AuthGroupGate`, `SsoCallbackScreen` and their props types. Apps keep their own provider trees. Not on the root entry. | `@clerk/expo`, `expo-router`, `expo-font`, `expo-splash-screen`, `@expo-google-fonts/instrument-sans` (import) |
105
106
  | `@vvedantb/native-ui/expo-web-root` | From 0.7.0: `ExpoWebRoot`, `ExpoWebRootProps`, `ExpoWebRootViewport`, `EXPO_WEB_VIEWPORT`, `expoWebBackgroundCss`. Not on the root entry. | `expo-router` (import of `expo-router/html`) |
106
107
  | `@vvedantb/native-ui/tailwind-preset` | From 0.7.0, CommonJS for `tailwind.config.js`: `nativeUiPreset`, `nativeUiContent`, `cssVar`, `hslVar`, `rgbAlpha`, `cssVariables`, `schemeColors` and a default preset. See [Expo / NativeWind](#expo--nativewind). | `nativewind` (`require`, when installed) |
107
108
 
@@ -384,7 +385,7 @@ configureTheme({ font: { regular: "Inter_400Regular", medium: "Inter_500Medium",
384
385
 
385
386
  **Settings at web sizes (0.14.0).** `SettingsSection`, `SettingsToggleRow`, `SettingsField` and `SettingsEmptyState` take the web type: titles and labels `text-sm` (14 / 20; the section title semibold, the others medium), descriptions and help `text-xs leading-relaxed` (12 / 19.5; the section description `text-sm leading-relaxed`, 14 / 22.75). `SettingsToggleRow` steps up one size with larger text and has no minimum height; its control keeps the 44 target.
386
387
 
387
- **`Button` aliases and `Field` (unreleased).** `variant` also accepts `tertiary` (= `ghost`), `danger` (= `destructive`), `success`, `warning` and `flat`, as the web `Button`. `tinted` stays as a legacy alias (the pink tint of `outline` before 0.3.0). `size` accepts `md` (= `default`/`medium`), and `Spinner` `size="default"` equals `md`. Roles: `primary`/`default` is the one main action, `secondary` an alternative, `tertiary`/`ghost` a dismissive action, `destructive`/`danger` a destructive action, `success` and `warning` show status, and `outline`, `link` and `flat` are visual.
388
+ **`Button` aliases and `Field` (0.36.0).** `variant` also accepts `tertiary` (= `ghost`), `danger` (= `destructive`), `success`, `warning` and `flat`, as the web `Button`. `tinted` stays as a legacy alias (the pink tint of `outline` before 0.3.0). `size` accepts `md` (= `default`/`medium`), and `Spinner` `size="default"` equals `md`. Roles: `primary`/`default` is the one main action, `secondary` an alternative, `tertiary`/`ghost` a dismissive action, `destructive`/`danger` a destructive action, `success` and `warning` show status, and `outline`, `link` and `flat` are visual.
388
389
 
389
390
  `Field`, `FieldLabel`, `FieldControl`, `FieldDescription` and `FieldError` (root and `/primitives`) link a label to a control. `FieldLabel` sets `nativeID`; `FieldControl` sets `accessibilityLabelledBy` while a `FieldLabel` renders, and otherwise keeps the `accessibilityLabel` you pass (the fallback, and what iOS reads). A plain `Input` is unchanged. The `FieldError` in `@vvedantb/native-ui/auth` is a different component (it takes a `message` prop).
390
391
 
@@ -772,7 +773,7 @@ The components keep the web sizes on screen and reach a 44 pt touch target with
772
773
 
773
774
  Text scales with the system font size. Labelled controls have minimum heights, so a large Dynamic Type size grows them instead of clipping the label (the `SearchInput` lock grows with the font scale); only the `FloatingTabBar` labels are capped (1.5×), to fit the fixed bar. With Reduce Motion on, dialogs, sheets, toasts, the `Select` popover, `PricingModal`, `Progress`, `Skeleton` and the `FloatingTabBar` pill do not animate. Dialogs, sheets, toasts, `FloatingTabBar` and `FloatingFAB` stay inside the safe-area insets, and dialog and sheet fields stay above the keyboard on iOS and Android.
774
775
 
775
- The brand marks (`APP_ICONS`, the `Icon*` exports, `AppMark` and `GoogleMark`) are images named by `title`, and hidden from assistive tech without one. From 0.3.14 they set the props each platform reads: `accessibilityRole="image"` and `accessibilityLabel` on iOS and Android, `role="img"` and `aria-label` on web. Without a title they set `accessibilityElementsHidden` and `importantForAccessibility="no-hide-descendants"` on native and `aria-hidden` on web. `testID` is `data-testid` on web. On web `react-native-svg` passes its props straight to the DOM `<svg>`, and React Native Web does not map `accessible`, the `accessibility*` props or `testID` there. So do not put them on an `Svg` or on a Tabler icon: put them on the parent `View` or `Pressable`. The package draws no Lucide icon, as a Lucide icon always sets `testID` on its `Svg`. On web the `Select` options are Radix DOM nodes, so from 0.3.14 they take their name and test id as `aria-label` and `data-testid` there, and as `accessibilityLabel` and `testID` on iOS and Android.
776
+ The brand marks (`APP_ICONS`, the `Icon*` exports, `AppMark` and `GoogleMark`) are images named by `title`, and hidden from assistive tech without one. From 0.3.14 they set the props each platform reads: `accessibilityRole="image"` and `accessibilityLabel` on iOS and Android, `role="img"` and `aria-label` on web. Without a title they set `accessibilityElementsHidden` and `importantForAccessibility="no-hide-descendants"` on native and `aria-hidden` on web. `testID` is `data-testid` on web. On web `react-native-svg` passes its props straight to the DOM `<svg>`, and React Native Web does not map `accessible`, the `accessibility*` props or `testID` there. So do not put them on an `Svg` or on a Tabler icon: put them on the parent `View` or `Pressable`. On web the `Select` options are Radix DOM nodes, so from 0.3.14 they take their name and test id as `aria-label` and `data-testid` there, and as `accessibilityLabel` and `testID` on iOS and Android.
776
777
 
777
778
  `ThemeToggle` (from 0.3.16) is a `HeaderIconButton` that switches between light and dark with NativeWind's `setColorScheme`, the scheme every component reads through `useColorScheme`. It shows and names the scheme it switches to: a moon and "Switch to dark mode" in light, a sun and "Switch to light mode" in dark. It stores nothing: to restore the choice on the next launch, store `useColorScheme().colorScheme` in the app. It takes `testID`. It needs `darkMode: "class"` (see [Theme](#theme)). Without it, from 0.5.0, a press logs that fix with `console.error` and leaves the scheme as it is, instead of throwing from the press handler.
778
779
 
@@ -819,7 +820,7 @@ The brand files `src/brand/svg.ts`, `familyApps.ts` and `vProAppBenefits.ts` are
819
820
 
820
821
  ## Type checking
821
822
 
822
- `pnpm --filter @vvedantb/native-ui typecheck` runs `tsc` against `types/peers.d.ts`, local declarations of the React Native peers, because they are not installed in this repository. The declarations are looser than the real types. Apps type-check the source against the real packages.
823
+ `pnpm --filter @vvedantb/native-ui typecheck` runs `tsc` against `types/peers.d.ts`, local declarations of the React Native peers, because they are not installed in this repository. The declarations are looser than the real types. Apps type-check the source against the real packages. `types/peers.d.ts` is not published: its `declare module "react-native"` would replace an app's real types. The one optional peer that apps may not install, `prism-react-renderer`, has a published module file instead (`types/prism-react-renderer.d.ts`, in `files`). `src/highlight.ts` imports it by relative path, so no `exports` or `typesVersions` entry is needed.
823
824
 
824
825
  ## Publish
825
826
 
package/dist/Avatar.jsx CHANGED
@@ -3,6 +3,7 @@ import { createContext, useContext, useEffect, useRef, useState } from "react";
3
3
  import { Image, StyleSheet, Text, View } from "react-native";
4
4
  import { cn } from "./cn";
5
5
  import { typeStyle } from "./controlStyles";
6
+ import { useGlass } from "./glass";
6
7
  import { palette } from "./palette";
7
8
  import { tokens } from "./tokens";
8
9
  import { useScheme } from "./useScheme";
@@ -16,7 +17,7 @@ function useAvatar(part) {
16
17
  }
17
18
  /** Round frame for `AvatarImage` and `AvatarFallback`, as the web `Avatar`. The fallback shows until the image loads, and stays if it fails. */
18
19
  export function Avatar(t0) {
19
- const $ = _c(27);
20
+ const $ = _c(28);
20
21
  let children;
21
22
  let className;
22
23
  let props;
@@ -45,6 +46,7 @@ export function Avatar(t0) {
45
46
  }
46
47
  const size = t1 === undefined ? 40 : t1;
47
48
  const scheme = useScheme();
49
+ const glass = useGlass("small");
48
50
  const [status, setStatus] = useState("idle");
49
51
  let t2;
50
52
  if ($[6] !== size || $[7] !== status) {
@@ -88,33 +90,34 @@ export function Avatar(t0) {
88
90
  t7 = $[15];
89
91
  }
90
92
  let t8;
91
- if ($[16] !== style || $[17] !== t7) {
92
- t8 = [t7, style];
93
- $[16] = style;
94
- $[17] = t7;
95
- $[18] = t8;
93
+ if ($[16] !== glass || $[17] !== style || $[18] !== t7) {
94
+ t8 = [t7, glass, style];
95
+ $[16] = glass;
96
+ $[17] = style;
97
+ $[18] = t7;
98
+ $[19] = t8;
96
99
  } else {
97
- t8 = $[18];
100
+ t8 = $[19];
98
101
  }
99
102
  let t9;
100
- if ($[19] !== children || $[20] !== props || $[21] !== t3 || $[22] !== t8) {
103
+ if ($[20] !== children || $[21] !== props || $[22] !== t3 || $[23] !== t8) {
101
104
  t9 = <View className={t3} style={t8} {...props}>{children}</View>;
102
- $[19] = children;
103
- $[20] = props;
104
- $[21] = t3;
105
- $[22] = t8;
106
- $[23] = t9;
105
+ $[20] = children;
106
+ $[21] = props;
107
+ $[22] = t3;
108
+ $[23] = t8;
109
+ $[24] = t9;
107
110
  } else {
108
- t9 = $[23];
111
+ t9 = $[24];
109
112
  }
110
113
  let t10;
111
- if ($[24] !== t2 || $[25] !== t9) {
114
+ if ($[25] !== t2 || $[26] !== t9) {
112
115
  t10 = <AvatarContext.Provider value={t2}>{t9}</AvatarContext.Provider>;
113
- $[24] = t2;
114
- $[25] = t9;
115
- $[26] = t10;
116
+ $[25] = t2;
117
+ $[26] = t9;
118
+ $[27] = t10;
116
119
  } else {
117
- t10 = $[26];
120
+ t10 = $[27];
118
121
  }
119
122
  return t10;
120
123
  }
@@ -11,13 +11,7 @@ import { useLargerText } from "./theme";
11
11
  import { tokens } from "./tokens";
12
12
  import { useScheme } from "./useScheme";
13
13
  const SHEET_RADIUS = 20;
14
-
15
- // A single open detent at 40% by default. A caller can pass several detents for
16
- // multi-detent sizing. The closed detent (0) is added by the component.
17
14
  const DEFAULT_DETENTS = ["40%"];
18
-
19
- // A dimming scrim. The library scales this alpha to 0 at the closed detent and to
20
- // full at an open one.
21
15
  const SCRIM_COLOR = "rgba(0, 0, 0, 0.5)";
22
16
 
23
17
  /**
@@ -21,13 +21,6 @@ import { NativeOnlyAnimatedView } from "./primitives/native-only-animated-view";
21
21
 
22
22
  /** The web `sm` breakpoint: below it, bar buttons are icon-only and "selected" is hidden. */
23
23
  export const BULK_BAR_LABEL_MIN_WIDTH = 640;
24
-
25
- /**
26
- * Web `h-9` buttons with a 17 icon and `text-sm`; with larger text 48 high, a
27
- * 22 icon and `text-lg`. In the tab bar slot: 48 high with a 20 icon over a
28
- * `text-xs` label; with larger text 56, a 24 icon and `text-sm`. `caption` is
29
- * the count chip, or the label under a docked icon.
30
- */
31
24
  function barMetrics(largerText, docked) {
32
25
  if (docked) {
33
26
  return largerText ? {
@@ -54,9 +47,6 @@ function barMetrics(largerText, docked) {
54
47
  caption: sizeStyle("text-xs")
55
48
  };
56
49
  }
57
-
58
- // Docked at the bottom: it rises into place and sinks back out, the exit 20%
59
- // quicker.
60
50
  const BAR_ENTER = FadeInDown.duration(150).easing(EASE_OUT);
61
51
  const BAR_EXIT = FadeOutDown.duration(120).easing(EASE_OUT);
62
52
 
@@ -443,13 +433,6 @@ export function BulkActionBar(t0) {
443
433
  }
444
434
  return t27;
445
435
  }
446
-
447
- /**
448
- * A bar button box: the web `h-9 rounded-lg`, at least 44 wide and slopped to
449
- * 44 high, `surface-secondary` while pressed (a 10% danger tint for a
450
- * destructive one), faded to 30% when off. Docked: a pill (as the tab bar's
451
- * active pill), at least 48 wide.
452
- */
453
436
  function barButtonStyle(height, paddingX, pressed, disabled, destructive, docked, scheme) {
454
437
  const pressedFill = destructive ? withAlpha(palette.danger[scheme], 0.1) : tokens.color.surfaceSecondary[scheme];
455
438
  return {
@@ -540,11 +523,6 @@ function BarPressable(t0) {
540
523
  }
541
524
  return t7;
542
525
  }
543
-
544
- /**
545
- * One action: the icon, and on wide screens the short label beside it
546
- * (`text-sm` medium). Docked, the short label sits under the icon (`caption`).
547
- */
548
526
  function BarButton(t0) {
549
527
  const $ = _c(44);
550
528
  const {
@@ -694,8 +672,6 @@ function BarButton(t0) {
694
672
  }
695
673
  return t6;
696
674
  }
697
-
698
- /** The web vertical `Separator`: `mx-1.5 h-5 bg-border`. */
699
675
  function BarDivider() {
700
676
  const $ = _c(2);
701
677
  const scheme = useScheme();
package/dist/Button.jsx CHANGED
@@ -9,15 +9,11 @@ import { cn } from "./cn";
9
9
  import { buttonColors, sizeStyle, typeStyle } from "./controlStyles";
10
10
  import { useDialogLayout } from "./dialogLayout";
11
11
  import { floatingShadow } from "./floating";
12
+ import { useGlass } from "./glass";
12
13
  import { Spinner } from "./Spinner";
13
14
  import { useLargerText } from "./theme";
14
15
  import { tokens } from "./tokens";
15
16
  import { useScheme } from "./useScheme";
16
-
17
- /** `sm`, `default` (or `md`) and `lg` are the web names for `small`, `medium` and `large`. `icon` is a square button. */
18
-
19
- /** The web `shape`. `"pill"` (default) is fully round; `"rounded"` is radius 16, the look before 0.6.0. */
20
-
21
17
  const SIZE_ALIAS = {
22
18
  small: "small",
23
19
  medium: "medium",
@@ -28,13 +24,6 @@ const SIZE_ALIAS = {
28
24
  lg: "large",
29
25
  icon: "icon"
30
26
  };
31
-
32
- // `regular` is the web `Button` (`default` h-10 px-4, `lg` h-11 px-6, `icon`
33
- // h-10 w-10), except `sm`: the web h-8 `text-xs` is a desktop size, so here it
34
- // is 36 high with a 14 label (`text-sm`). `larger` is the larger-text step-up from
35
- // 0.3.2. Labelled sizes are minimum heights (`h-auto` drops the primitive's
36
- // `h-10`), so a large Dynamic Type size grows the button instead of clipping
37
- // the label.
38
27
  const HEIGHT = {
39
28
  regular: {
40
29
  small: "h-auto min-h-9 px-3",
@@ -49,8 +38,6 @@ const HEIGHT = {
49
38
  icon: "h-14 w-14 px-0"
50
39
  }
51
40
  };
52
-
53
- // Each class is also set as a style (`sizeStyle`): web `text-sm` is 14 / 20.
54
41
  const TEXT = {
55
42
  regular: {
56
43
  small: "text-sm",
@@ -65,11 +52,6 @@ const TEXT = {
65
52
  icon: "text-base"
66
53
  }
67
54
  };
68
-
69
- // The web sizes are under the 44 pt touch target; the slop brings each to 44
70
- // or more. `small` (32) slops only above and below: small buttons sit 4 apart
71
- // in a row (Cancel and Delete), and side slop would let one steal the other's
72
- // taps. The larger sizes are 56 or more and need none.
73
55
  const HIT_SLOP = {
74
56
  regular: {
75
57
  small: {
@@ -89,20 +71,10 @@ const HIT_SLOP = {
89
71
  icon: undefined
90
72
  }
91
73
  };
92
-
93
- // The web `shape` (from @vvedantb/ui 0.31.0). `pill` is `rounded-full`:
94
- // `tokens.radius.pill` (999), far more than half the tallest minimum height
95
- // (72), so the ends are half circles. `rounded` is `rounded-lg` (`--radius`, 16). The web
96
- // `rounded` is `rounded-md` on `xs` and `icon-xs`, sizes native does not have,
97
- // so here it is 16 at every size. Styles, because apps' NativeWind themes set
98
- // their own `rounded-lg`.
99
74
  const RADIUS = {
100
75
  pill: tokens.radius.pill,
101
76
  rounded: tokens.radius.lg
102
77
  };
103
-
104
- // Colours come from `buttonColors` as styles, except `tinted` (a legacy
105
- // alias), which keeps the pink classes that `outline` used before 0.3.0.
106
78
  const VARIANT_CLASS = {
107
79
  link: "h-auto border-0 px-0",
108
80
  tinted: "border-0 bg-pink-50 dark:bg-pink-900/20"
@@ -131,7 +103,7 @@ const PRIMITIVE_VARIANT = {
131
103
  * asChild`) can measure it.
132
104
  */
133
105
  export const Button = React.forwardRef(function Button(t0, ref) {
134
- const $ = _c(68);
106
+ const $ = _c(69);
135
107
  let children;
136
108
  let className;
137
109
  let endContent;
@@ -215,6 +187,8 @@ export const Button = React.forwardRef(function Button(t0, ref) {
215
187
  const colors = t6;
216
188
  const contentColor = colors?.color ?? PINK_600;
217
189
  const elevate = shadowType === "shadow" && (variant === "primary" || variant === "default");
190
+ const glass = useGlass("control");
191
+ const filled = variant === "primary" || variant === "default" || variant === "secondary";
218
192
  const t7 = RADIUS[shape];
219
193
  let t8;
220
194
  if ($[18] !== t7) {
@@ -227,129 +201,131 @@ export const Button = React.forwardRef(function Button(t0, ref) {
227
201
  t8 = $[19];
228
202
  }
229
203
  const t9 = elevate ? floatingShadow : null;
230
- let t10;
204
+ const t10 = filled ? glass : null;
205
+ let t11;
231
206
  if ($[20] !== colors) {
232
- t10 = colors ? {
207
+ t11 = colors ? {
233
208
  backgroundColor: colors.backgroundColor,
234
209
  borderColor: colors.borderColor
235
210
  } : null;
236
211
  $[20] = colors;
237
- $[21] = t10;
212
+ $[21] = t11;
238
213
  } else {
239
- t10 = $[21];
214
+ t11 = $[21];
240
215
  }
241
- let t11;
242
- if ($[22] !== t10 || $[23] !== t8 || $[24] !== t9) {
243
- t11 = [t8, t9, t10];
216
+ let t12;
217
+ if ($[22] !== t10 || $[23] !== t11 || $[24] !== t8 || $[25] !== t9) {
218
+ t12 = [t8, t9, t10, t11];
244
219
  $[22] = t10;
245
- $[23] = t8;
246
- $[24] = t9;
247
- $[25] = t11;
220
+ $[23] = t11;
221
+ $[24] = t8;
222
+ $[25] = t9;
223
+ $[26] = t12;
248
224
  } else {
249
- t11 = $[25];
225
+ t12 = $[26];
250
226
  }
251
- const baseStyle = t11;
227
+ const baseStyle = t12;
252
228
  const callerStyle = props.style;
253
- let t12;
254
- if ($[26] !== contentColor || $[27] !== icon || $[28] !== leftIcon || $[29] !== loading || $[30] !== scale || $[31] !== startContent) {
255
- t12 = loading ? <Spinner size="sm" color={contentColor} decorative={true} /> : leftIcon ?? startContent ?? (icon ? <MaterialIcons name={icon} size={scale === "larger" ? 26 : 16} color={contentColor} /> : null);
256
- $[26] = contentColor;
257
- $[27] = icon;
258
- $[28] = leftIcon;
259
- $[29] = loading;
260
- $[30] = scale;
261
- $[31] = startContent;
262
- $[32] = t12;
229
+ let t13;
230
+ if ($[27] !== contentColor || $[28] !== icon || $[29] !== leftIcon || $[30] !== loading || $[31] !== scale || $[32] !== startContent) {
231
+ t13 = loading ? <Spinner size="sm" color={contentColor} decorative={true} /> : leftIcon ?? startContent ?? (icon ? <MaterialIcons name={icon} size={scale === "larger" ? 26 : 16} color={contentColor} /> : null);
232
+ $[27] = contentColor;
233
+ $[28] = icon;
234
+ $[29] = leftIcon;
235
+ $[30] = loading;
236
+ $[31] = scale;
237
+ $[32] = startContent;
238
+ $[33] = t13;
263
239
  } else {
264
- t12 = $[32];
240
+ t13 = $[33];
265
241
  }
266
- const start = t12;
267
- const t13 = PRIMITIVE_VARIANT[variant];
268
- const t14 = HIT_SLOP[scale][resolvedSize];
269
- const t15 = HEIGHT[scale][resolvedSize];
270
- const t16 = resolvedSize !== "icon" && (fullWidth || dialog.stacked ? "w-full" : "self-start");
271
- const t17 = dialog.compact && scale === "regular" && resolvedSize !== "icon" && "min-h-11";
272
- const t18 = VARIANT_CLASS[variant];
273
- let t19;
274
- if ($[33] !== className || $[34] !== t15 || $[35] !== t16 || $[36] !== t17 || $[37] !== t18) {
275
- t19 = cn("relative border", t15, t16, t17, t18, className);
276
- $[33] = className;
277
- $[34] = t15;
242
+ const start = t13;
243
+ const t14 = PRIMITIVE_VARIANT[variant];
244
+ const t15 = HIT_SLOP[scale][resolvedSize];
245
+ const t16 = HEIGHT[scale][resolvedSize];
246
+ const t17 = resolvedSize !== "icon" && (fullWidth || dialog.stacked ? "w-full" : "self-start");
247
+ const t18 = dialog.compact && scale === "regular" && resolvedSize !== "icon" && "min-h-11";
248
+ const t19 = VARIANT_CLASS[variant];
249
+ let t20;
250
+ if ($[34] !== className || $[35] !== t16 || $[36] !== t17 || $[37] !== t18 || $[38] !== t19) {
251
+ t20 = cn("relative border", t16, t17, t18, t19, className);
252
+ $[34] = className;
278
253
  $[35] = t16;
279
254
  $[36] = t17;
280
255
  $[37] = t18;
281
256
  $[38] = t19;
257
+ $[39] = t20;
282
258
  } else {
283
- t19 = $[38];
259
+ t20 = $[39];
284
260
  }
285
- const t20 = loading || props.disabled;
286
- const t21 = props.accessibilityState;
287
- const t22 = Boolean(loading || props.disabled);
288
- const t23 = Boolean(loading);
289
- let t24;
290
- if ($[39] !== props.accessibilityState || $[40] !== t22 || $[41] !== t23) {
291
- t24 = {
292
- ...t21,
293
- disabled: t22,
294
- busy: t23
261
+ const t21 = loading || props.disabled;
262
+ const t22 = props.accessibilityState;
263
+ const t23 = Boolean(loading || props.disabled);
264
+ const t24 = Boolean(loading);
265
+ let t25;
266
+ if ($[40] !== props.accessibilityState || $[41] !== t23 || $[42] !== t24) {
267
+ t25 = {
268
+ ...t22,
269
+ disabled: t23,
270
+ busy: t24
295
271
  };
296
- $[39] = props.accessibilityState;
297
- $[40] = t22;
272
+ $[40] = props.accessibilityState;
298
273
  $[41] = t23;
299
274
  $[42] = t24;
275
+ $[43] = t25;
300
276
  } else {
301
- t24 = $[42];
277
+ t25 = $[43];
302
278
  }
303
- let t25;
304
- if ($[43] !== baseStyle || $[44] !== callerStyle) {
305
- t25 = typeof callerStyle === "function" ? state => [baseStyle, callerStyle(state)] : [baseStyle, callerStyle];
306
- $[43] = baseStyle;
307
- $[44] = callerStyle;
308
- $[45] = t25;
279
+ let t26;
280
+ if ($[44] !== baseStyle || $[45] !== callerStyle) {
281
+ t26 = typeof callerStyle === "function" ? state => [baseStyle, callerStyle(state)] : [baseStyle, callerStyle];
282
+ $[44] = baseStyle;
283
+ $[45] = callerStyle;
284
+ $[46] = t26;
309
285
  } else {
310
- t25 = $[45];
286
+ t26 = $[46];
311
287
  }
312
- let t26;
313
- if ($[46] !== children || $[47] !== colors || $[48] !== resolvedSize || $[49] !== scale || $[50] !== variant) {
314
- t26 = typeof children === "string" || typeof children === "number" ? <PrimitiveText className={cn(TEXT[scale][resolvedSize], "font-instrument-sans-medium", TEXT_CLASS[variant])} style={[colors ? {
288
+ let t27;
289
+ if ($[47] !== children || $[48] !== colors || $[49] !== resolvedSize || $[50] !== scale || $[51] !== variant) {
290
+ t27 = typeof children === "string" || typeof children === "number" ? <PrimitiveText className={cn(TEXT[scale][resolvedSize], "font-instrument-sans-medium", TEXT_CLASS[variant])} style={[colors ? {
315
291
  color: colors.color
316
292
  } : null, sizeStyle(TEXT[scale][resolvedSize]), typeStyle("medium")]}>{children}</PrimitiveText> : children;
317
- $[46] = children;
318
- $[47] = colors;
319
- $[48] = resolvedSize;
320
- $[49] = scale;
321
- $[50] = variant;
322
- $[51] = t26;
293
+ $[47] = children;
294
+ $[48] = colors;
295
+ $[49] = resolvedSize;
296
+ $[50] = scale;
297
+ $[51] = variant;
298
+ $[52] = t27;
323
299
  } else {
324
- t26 = $[51];
300
+ t27 = $[52];
325
301
  }
326
- let t27;
327
- if ($[52] !== endContent || $[53] !== start || $[54] !== t26) {
328
- t27 = <View className="flex-row items-center justify-center gap-2">{start}{t26}{endContent}</View>;
329
- $[52] = endContent;
330
- $[53] = start;
331
- $[54] = t26;
302
+ let t28;
303
+ if ($[53] !== endContent || $[54] !== start || $[55] !== t27) {
304
+ t28 = <View className="flex-row items-center justify-center gap-2">{start}{t27}{endContent}</View>;
305
+ $[53] = endContent;
306
+ $[54] = start;
332
307
  $[55] = t27;
308
+ $[56] = t28;
333
309
  } else {
334
- t27 = $[55];
310
+ t28 = $[56];
335
311
  }
336
- let t28;
337
- if ($[56] !== onPress || $[57] !== props || $[58] !== ref || $[59] !== shape || $[60] !== t13 || $[61] !== t14 || $[62] !== t19 || $[63] !== t20 || $[64] !== t24 || $[65] !== t25 || $[66] !== t27) {
338
- t28 = <PrimitiveButton ref={ref} onPress={onPress} variant={t13} shape={shape} hitSlop={t14} accessibilityRole="button" className={t19} {...props} disabled={t20} accessibilityState={t24} style={t25}>{t27}</PrimitiveButton>;
339
- $[56] = onPress;
340
- $[57] = props;
341
- $[58] = ref;
342
- $[59] = shape;
343
- $[60] = t13;
312
+ let t29;
313
+ if ($[57] !== onPress || $[58] !== props || $[59] !== ref || $[60] !== shape || $[61] !== t14 || $[62] !== t15 || $[63] !== t20 || $[64] !== t21 || $[65] !== t25 || $[66] !== t26 || $[67] !== t28) {
314
+ t29 = <PrimitiveButton ref={ref} onPress={onPress} variant={t14} shape={shape} hitSlop={t15} accessibilityRole="button" className={t20} {...props} disabled={t21} accessibilityState={t25} style={t26}>{t28}</PrimitiveButton>;
315
+ $[57] = onPress;
316
+ $[58] = props;
317
+ $[59] = ref;
318
+ $[60] = shape;
344
319
  $[61] = t14;
345
- $[62] = t19;
320
+ $[62] = t15;
346
321
  $[63] = t20;
347
- $[64] = t24;
322
+ $[64] = t21;
348
323
  $[65] = t25;
349
- $[66] = t27;
324
+ $[66] = t26;
350
325
  $[67] = t28;
326
+ $[68] = t29;
351
327
  } else {
352
- t28 = $[67];
328
+ t29 = $[68];
353
329
  }
354
- return t28;
330
+ return t29;
355
331
  });