@vvedantb/native-ui 0.38.0 → 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 (373) hide show
  1. package/dist/Avatar.jsx +22 -19
  2. package/dist/BottomSheetContainer.jsx +0 -6
  3. package/dist/BulkActionBar.jsx +0 -24
  4. package/dist/Button.jsx +92 -116
  5. package/dist/Card.jsx +56 -50
  6. package/dist/ColorSwatches.jsx +0 -6
  7. package/dist/Dialog.jsx +0 -12
  8. package/dist/DropdownMenu.jsx +0 -10
  9. package/dist/EmptyState.jsx +0 -3
  10. package/dist/ExpoWebRoot.jsx +0 -6
  11. package/dist/Field.jsx +0 -17
  12. package/dist/FloatingSurface.jsx +95 -80
  13. package/dist/FloatingTabBar.jsx +0 -23
  14. package/dist/IconButton.jsx +0 -1
  15. package/dist/LoadingState.jsx +0 -6
  16. package/dist/PasswordInput.jsx +0 -15
  17. package/dist/PillTabs.jsx +39 -36
  18. package/dist/SearchInput.jsx +0 -13
  19. package/dist/SectionLabel.jsx +0 -1
  20. package/dist/SharedTransition.jsx +0 -3
  21. package/dist/Skeleton.jsx +0 -2
  22. package/dist/Spinner.jsx +0 -2
  23. package/dist/StatusDot.jsx +0 -5
  24. package/dist/Switch.jsx +32 -22
  25. package/dist/Tabs.jsx +27 -26
  26. package/dist/Textarea.jsx +0 -1
  27. package/dist/ThemeToggle.jsx +0 -1
  28. package/dist/Toast.jsx +80 -91
  29. package/dist/UpdateChecker.jsx +0 -1
  30. package/dist/ai/activity-question.jsx +0 -6
  31. package/dist/ai/activity-step-label.js +0 -6
  32. package/dist/ai/activity-step-types.js +0 -4
  33. package/dist/ai/activity-tasks-utils.js +0 -17
  34. package/dist/ai/activity-timeline.js +0 -8
  35. package/dist/ai/attachments.jsx +0 -2
  36. package/dist/ai/chain-of-thought.jsx +0 -3
  37. package/dist/ai/chat-text.js +0 -1
  38. package/dist/ai/chat-thread.jsx +0 -1
  39. package/dist/ai/choice-question.jsx +0 -10
  40. package/dist/ai/code-block.jsx +0 -31
  41. package/dist/ai/collapsible.jsx +0 -14
  42. package/dist/ai/conversation-context.js +0 -3
  43. package/dist/ai/conversation.jsx +2 -48
  44. package/dist/ai/file-chip.jsx +0 -2
  45. package/dist/ai/icon-button.jsx +0 -8
  46. package/dist/ai/index.js +0 -5
  47. package/dist/ai/message-context-menu.jsx +0 -7
  48. package/dist/ai/message.jsx +0 -21
  49. package/dist/ai/prompt-input-menu.jsx +0 -3
  50. package/dist/ai/prompt-input.jsx +0 -27
  51. package/dist/ai/response-text.jsx +0 -6
  52. package/dist/ai/sources.jsx +0 -1
  53. package/dist/ai/suggestion.jsx +0 -1
  54. package/dist/ai/trace.jsx +0 -11
  55. package/dist/ai/unified-diff.jsx +0 -4
  56. package/dist/auth/AuthScreen.jsx +0 -5
  57. package/dist/auth/GoogleSignInButton.jsx +0 -3
  58. package/dist/auth/SecondFactorScreen.jsx +0 -2
  59. package/dist/auth/SignInScreen.jsx +0 -17
  60. package/dist/auth/authErrors.js +0 -4
  61. package/dist/auth/clerkCore3.js +0 -7
  62. package/dist/auth/index.js +0 -4
  63. package/dist/auth/totp.js +0 -2
  64. package/dist/brand/GoogleMark.jsx +0 -1
  65. package/dist/brand/ProviderIcon.jsx +0 -2
  66. package/dist/brand/index.js +0 -3
  67. package/dist/brand/svg.js +0 -6
  68. package/dist/configureTheme.js +0 -9
  69. package/dist/controlStyles.js +0 -14
  70. package/dist/crash/lastCrash.js +3 -24
  71. package/dist/entries/ai.js +0 -3
  72. package/dist/entries/ambient.js +0 -2
  73. package/dist/entries/app-root.js +0 -5
  74. package/dist/entries/auth.js +0 -4
  75. package/dist/entries/bottom-sheet.js +0 -2
  76. package/dist/entries/brand.js +0 -1
  77. package/dist/entries/button.js +0 -1
  78. package/dist/entries/crash.js +0 -3
  79. package/dist/entries/date-time.js +0 -2
  80. package/dist/entries/expo-router.js +0 -3
  81. package/dist/entries/expo-web-root.js +0 -2
  82. package/dist/entries/floating.js +0 -2
  83. package/dist/entries/generative-ui.js +0 -4
  84. package/dist/entries/gesture-handler.js +0 -3
  85. package/dist/entries/keyboard-controller.js +0 -3
  86. package/dist/entries/layout.js +0 -2
  87. package/dist/entries/markdown.js +0 -3
  88. package/dist/entries/marketing.js +0 -1
  89. package/dist/entries/page-title.js +0 -5
  90. package/dist/entries/password-input.js +0 -2
  91. package/dist/entries/paste-input.js +0 -3
  92. package/dist/entries/primitives.js +0 -6
  93. package/dist/entries/search-input.js +0 -2
  94. package/dist/entries/tab-bar.js +0 -2
  95. package/dist/entries/theme.js +1 -2
  96. package/dist/entries/toast.js +0 -3
  97. package/dist/entries/video.js +0 -2
  98. package/dist/entries/webview.js +0 -2
  99. package/dist/examples/AiChatGallery.jsx +0 -11
  100. package/dist/examples/ParityGallery.jsx +0 -12
  101. package/dist/floating.js +0 -8
  102. package/dist/generative-ui/GenerativeUiPanel.jsx +0 -2
  103. package/dist/generative-ui/components.jsx +0 -8
  104. package/dist/glass.js +55 -0
  105. package/dist/glassBlur.jsx +0 -12
  106. package/dist/highlight.js +0 -26
  107. package/dist/index.js +1 -2
  108. package/dist/loadingGrid.js +0 -13
  109. package/dist/markdown/Markdown.jsx +0 -59
  110. package/dist/markdown/MarkdownTable.jsx +0 -18
  111. package/dist/markdown/tableText.js +0 -5
  112. package/dist/marketing/UpgradeToProCard.jsx +0 -5
  113. package/dist/marketing/pricing.js +0 -3
  114. package/dist/media/ImageGallery.jsx +0 -16
  115. package/dist/media/imageZoom.js +0 -4
  116. package/dist/media/zoom-image-gesture.jsx +0 -8
  117. package/dist/media/zoomImage.js +0 -3
  118. package/dist/motion.js +0 -3
  119. package/dist/neutralTheme.js +0 -5
  120. package/dist/pagerSwipe.js +0 -16
  121. package/dist/palette.js +0 -10
  122. package/dist/primitives/button.jsx +0 -5
  123. package/dist/primitives/keyboard-controller.jsx +0 -27
  124. package/dist/primitives/native-only-animated-view.jsx +0 -5
  125. package/dist/primitives/overlay.jsx +0 -2
  126. package/dist/primitives/pager-gesture.jsx +3 -29
  127. package/dist/primitives/paste-input.jsx +0 -5
  128. package/dist/primitives/select.jsx +0 -8
  129. package/dist/primitives/sheet-drag.jsx +0 -3
  130. package/dist/primitives/sheet-gesture.jsx +0 -8
  131. package/dist/primitives/swipe-row-gesture.jsx +3 -45
  132. package/dist/primitives/text.jsx +0 -5
  133. package/dist/primitives/toast-drag-gesture.jsx +4 -24
  134. package/dist/primitives/web-click-guard.js +0 -3
  135. package/dist/primitives/window-layer.jsx +0 -14
  136. package/dist/push.js +0 -6
  137. package/dist/relativeTime.js +0 -13
  138. package/dist/settings/MoreFromProjectV.jsx +0 -5
  139. package/dist/settings/ThemeModePicker.jsx +0 -4
  140. package/dist/settings/projectVMobileApps.js +1 -6
  141. package/dist/sheetDrag.js +0 -10
  142. package/dist/swipeRow.js +0 -15
  143. package/dist/tabBarRoutes.js +0 -4
  144. package/dist/tabIndicator.js +0 -4
  145. package/dist/tailwind-preset.cjs +0 -54
  146. package/dist/tailwind-preset.d.cts +0 -8
  147. package/dist/theme.jsx +29 -21
  148. package/dist/themeModeStore.js +0 -5
  149. package/dist/toastChrome.js +0 -6
  150. package/dist/toastDrag.js +0 -14
  151. package/dist/toastStore.js +0 -4
  152. package/dist/updateCheck.js +0 -7
  153. package/dist/video/InlineVideo.jsx +0 -2
  154. package/dist/webview/htmlView.js +0 -5
  155. package/package.json +3 -3
  156. package/src/ArtifactList.tsx +0 -2
  157. package/src/Avatar.tsx +3 -3
  158. package/src/Badge.tsx +0 -1
  159. package/src/BottomSheetContainer.tsx +0 -11
  160. package/src/BulkActionBar.tsx +0 -66
  161. package/src/Button.tsx +4 -40
  162. package/src/CaptureButton.tsx +0 -1
  163. package/src/Card.tsx +3 -15
  164. package/src/Checkbox.tsx +0 -2
  165. package/src/ColorSwatches.tsx +0 -9
  166. package/src/ConfirmDialog.tsx +0 -7
  167. package/src/DateTimeField.tsx +0 -5
  168. package/src/Dialog.tsx +0 -27
  169. package/src/DividedList.tsx +0 -1
  170. package/src/DropdownMenu.tsx +0 -51
  171. package/src/EmptyState.tsx +0 -5
  172. package/src/ExpoWebRoot.tsx +0 -10
  173. package/src/Field.tsx +0 -14
  174. package/src/FloatingFAB.tsx +0 -3
  175. package/src/FloatingSurface.tsx +11 -8
  176. package/src/FloatingTabBar.tsx +0 -25
  177. package/src/IconButton.tsx +0 -5
  178. package/src/Input.tsx +0 -1
  179. package/src/Label.tsx +0 -1
  180. package/src/LabeledSwitchRow.tsx +0 -2
  181. package/src/ListRow.tsx +0 -12
  182. package/src/LoadingState.tsx +0 -12
  183. package/src/MenuSheet.tsx +0 -2
  184. package/src/PageIndicator.tsx +0 -2
  185. package/src/PageTitle.tsx +0 -15
  186. package/src/Pager.tsx +0 -9
  187. package/src/PasswordInput.tsx +0 -24
  188. package/src/PillTabs.tsx +3 -11
  189. package/src/PinnedBotTile.tsx +0 -6
  190. package/src/Progress.tsx +0 -3
  191. package/src/ReactionRow.tsx +0 -8
  192. package/src/ScreenContainer.tsx +0 -4
  193. package/src/SearchInput.tsx +0 -25
  194. package/src/SectionLabel.tsx +0 -2
  195. package/src/Select.tsx +0 -6
  196. package/src/Separator.tsx +0 -2
  197. package/src/SharedTransition.tsx +0 -7
  198. package/src/Sheet.tsx +0 -3
  199. package/src/SheetRow.tsx +0 -12
  200. package/src/Skeleton.tsx +0 -10
  201. package/src/Spinner.tsx +0 -6
  202. package/src/StackPageHeader.tsx +0 -16
  203. package/src/StatGrid.tsx +0 -1
  204. package/src/StatusDot.tsx +0 -6
  205. package/src/SurfaceRow.tsx +0 -12
  206. package/src/SwipeableRow.tsx +0 -4
  207. package/src/Switch.tsx +3 -4
  208. package/src/Tabs.tsx +3 -27
  209. package/src/Textarea.tsx +0 -2
  210. package/src/ThemeToggle.tsx +0 -1
  211. package/src/Toast.tsx +3 -19
  212. package/src/UpdateChecker.tsx +0 -46
  213. package/src/ai/activity-question.tsx +0 -8
  214. package/src/ai/activity-step-detail.tsx +0 -5
  215. package/src/ai/activity-step-label.ts +0 -5
  216. package/src/ai/activity-step-types.ts +0 -24
  217. package/src/ai/activity-step.tsx +0 -4
  218. package/src/ai/activity-tasks-utils.ts +0 -13
  219. package/src/ai/activity-timeline.ts +0 -6
  220. package/src/ai/attachments.tsx +0 -13
  221. package/src/ai/chain-of-thought.tsx +0 -5
  222. package/src/ai/chat-jump-rail.tsx +0 -2
  223. package/src/ai/chat-text.ts +0 -1
  224. package/src/ai/chat-thread.tsx +0 -9
  225. package/src/ai/choice-question.tsx +0 -36
  226. package/src/ai/code-block.tsx +0 -52
  227. package/src/ai/collapsible.tsx +0 -12
  228. package/src/ai/conversation-context.ts +0 -14
  229. package/src/ai/conversation.tsx +0 -58
  230. package/src/ai/file-chip.tsx +0 -1
  231. package/src/ai/icon-button.tsx +0 -17
  232. package/src/ai/index.ts +0 -5
  233. package/src/ai/message-action-sheet.tsx +0 -8
  234. package/src/ai/message-context-menu.tsx +0 -22
  235. package/src/ai/message-quote.tsx +0 -4
  236. package/src/ai/message.tsx +0 -66
  237. package/src/ai/prompt-input-menu.tsx +0 -19
  238. package/src/ai/prompt-input.tsx +0 -97
  239. package/src/ai/reasoning.tsx +0 -6
  240. package/src/ai/reply-quote-chip.tsx +0 -5
  241. package/src/ai/response-text.tsx +0 -8
  242. package/src/ai/shimmer.tsx +0 -2
  243. package/src/ai/sources.tsx +0 -3
  244. package/src/ai/subagent-cards.tsx +0 -13
  245. package/src/ai/suggestion.tsx +0 -4
  246. package/src/ai/tool-approval-card.tsx +0 -14
  247. package/src/ai/trace.tsx +0 -23
  248. package/src/ai/unified-diff.tsx +0 -16
  249. package/src/ai/use-streaming-disclosure.ts +0 -4
  250. package/src/app-root/AuthGroupGate.tsx +0 -8
  251. package/src/app-root/SsoCallbackScreen.tsx +0 -10
  252. package/src/app-root/fonts.ts +0 -2
  253. package/src/auth/AccountScreens.tsx +0 -16
  254. package/src/auth/AuthProviders.tsx +0 -13
  255. package/src/auth/AuthScreen.tsx +0 -12
  256. package/src/auth/GoogleSignInButton.tsx +0 -12
  257. package/src/auth/SecondFactorScreen.tsx +0 -16
  258. package/src/auth/SignInScreen.tsx +0 -68
  259. package/src/auth/authErrors.ts +0 -6
  260. package/src/auth/clerkCore3.ts +0 -6
  261. package/src/auth/index.ts +0 -4
  262. package/src/auth/totp.ts +0 -13
  263. package/src/brand/AppIcons.tsx +0 -6
  264. package/src/brand/AppMark.tsx +0 -5
  265. package/src/brand/AppWordmark.tsx +0 -7
  266. package/src/brand/GoogleMark.tsx +0 -4
  267. package/src/brand/ProviderIcon.tsx +0 -6
  268. package/src/brand/familyApps.ts +0 -2
  269. package/src/brand/index.ts +0 -3
  270. package/src/brand/svg.ts +0 -9
  271. package/src/configureTheme.ts +0 -10
  272. package/src/controlStyles.ts +0 -12
  273. package/src/crash/LastCrashDialog.tsx +0 -6
  274. package/src/crash/lastCrash.ts +0 -21
  275. package/src/entries/ai.ts +0 -3
  276. package/src/entries/ambient.ts +0 -2
  277. package/src/entries/app-root.ts +0 -5
  278. package/src/entries/auth.ts +0 -4
  279. package/src/entries/bottom-sheet.ts +0 -2
  280. package/src/entries/brand.ts +0 -1
  281. package/src/entries/button.ts +0 -1
  282. package/src/entries/crash.ts +0 -3
  283. package/src/entries/date-time.ts +0 -2
  284. package/src/entries/expo-router.ts +0 -3
  285. package/src/entries/expo-web-root.ts +0 -2
  286. package/src/entries/floating.ts +0 -2
  287. package/src/entries/generative-ui.ts +0 -4
  288. package/src/entries/gesture-handler.ts +0 -3
  289. package/src/entries/keyboard-controller.ts +0 -3
  290. package/src/entries/layout.ts +0 -2
  291. package/src/entries/markdown.ts +0 -3
  292. package/src/entries/marketing.ts +0 -1
  293. package/src/entries/page-title.ts +0 -5
  294. package/src/entries/password-input.ts +0 -2
  295. package/src/entries/paste-input.ts +0 -3
  296. package/src/entries/primitives.ts +0 -6
  297. package/src/entries/search-input.ts +0 -2
  298. package/src/entries/tab-bar.ts +0 -2
  299. package/src/entries/theme.ts +2 -2
  300. package/src/entries/toast.ts +0 -3
  301. package/src/entries/video.ts +0 -2
  302. package/src/entries/webview.ts +0 -2
  303. package/src/examples/AiChatGallery.tsx +0 -11
  304. package/src/examples/ParityGallery.tsx +0 -25
  305. package/src/floating.ts +0 -6
  306. package/src/generative-ui/GenerativeUiPanel.tsx +0 -15
  307. package/src/generative-ui/components.tsx +0 -9
  308. package/src/generative-ui/context.ts +0 -2
  309. package/src/glass.ts +31 -0
  310. package/src/glassBlur.tsx +0 -15
  311. package/src/highlight.ts +0 -20
  312. package/src/index.ts +2 -2
  313. package/src/loadingGrid.ts +0 -12
  314. package/src/markdown/Markdown.tsx +0 -71
  315. package/src/markdown/MarkdownTable.tsx +0 -23
  316. package/src/markdown/tableText.ts +0 -3
  317. package/src/marketing/PricingModal.tsx +0 -13
  318. package/src/marketing/UpgradeToProCard.tsx +0 -14
  319. package/src/marketing/pricing.ts +0 -12
  320. package/src/media/ImageGallery.tsx +0 -18
  321. package/src/media/MediaCard.tsx +0 -8
  322. package/src/media/imageZoom.ts +0 -4
  323. package/src/media/zoom-image-gesture.tsx +0 -9
  324. package/src/media/zoomImage.ts +0 -5
  325. package/src/motion.ts +0 -3
  326. package/src/neutralTheme.ts +0 -3
  327. package/src/pagerSwipe.ts +0 -13
  328. package/src/palette.ts +0 -10
  329. package/src/pressScale.ts +0 -7
  330. package/src/primitives/button.tsx +0 -4
  331. package/src/primitives/card.tsx +0 -1
  332. package/src/primitives/input.tsx +0 -4
  333. package/src/primitives/keyboard-controller.tsx +0 -25
  334. package/src/primitives/keyboard-parts.tsx +0 -27
  335. package/src/primitives/native-only-animated-view.tsx +0 -5
  336. package/src/primitives/overlay.tsx +0 -25
  337. package/src/primitives/pager-gesture.tsx +0 -20
  338. package/src/primitives/paste-input.tsx +0 -4
  339. package/src/primitives/paste-parts.tsx +0 -1
  340. package/src/primitives/select.tsx +0 -16
  341. package/src/primitives/sheet-drag.tsx +0 -19
  342. package/src/primitives/sheet-gesture.tsx +0 -22
  343. package/src/primitives/swipe-row-gesture.tsx +0 -33
  344. package/src/primitives/switch.tsx +0 -4
  345. package/src/primitives/text.tsx +0 -4
  346. package/src/primitives/toast-drag-gesture.tsx +0 -13
  347. package/src/primitives/web-click-guard.ts +0 -2
  348. package/src/primitives/window-layer.tsx +0 -18
  349. package/src/push.ts +0 -15
  350. package/src/relativeTime.ts +0 -21
  351. package/src/router/RouterStackPageHeader.tsx +0 -1
  352. package/src/settings/MoreFromProjectV.tsx +0 -8
  353. package/src/settings/SettingsEmptyState.tsx +0 -2
  354. package/src/settings/SettingsSection.tsx +0 -3
  355. package/src/settings/SettingsToggleRow.tsx +0 -4
  356. package/src/settings/ThemeModePicker.tsx +0 -11
  357. package/src/settings/projectVMobileApps.ts +0 -8
  358. package/src/sheetDrag.ts +0 -9
  359. package/src/swipeRow.ts +0 -23
  360. package/src/tabBarRoutes.ts +0 -13
  361. package/src/tabIndicator.ts +0 -5
  362. package/src/tailwind-preset.cjs +0 -54
  363. package/src/tailwind-preset.d.cts +0 -8
  364. package/src/theme.tsx +11 -2
  365. package/src/themeModeStore.ts +0 -9
  366. package/src/toastChrome.ts +0 -6
  367. package/src/toastDrag.ts +0 -13
  368. package/src/toastStore.ts +0 -7
  369. package/src/updateCheck.ts +0 -15
  370. package/src/video/InlineVideo.tsx +0 -5
  371. package/src/webview/HtmlView.tsx +0 -23
  372. package/src/webview/HtmlView.web.tsx +0 -1
  373. package/src/webview/htmlView.ts +0 -5
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
  });
package/dist/Card.jsx CHANGED
@@ -3,10 +3,11 @@ import { Pressable, Text, View } from "react-native";
3
3
  import { Card as PrimitiveCard, CardContent as PrimitiveCardContent, CardHeader as PrimitiveCardHeader, CardTitle as PrimitiveCardTitle } from "./primitives/card";
4
4
  import { cn } from "./cn";
5
5
  import { cardStyle, sizeStyle, textStyle, typeStyle } from "./controlStyles";
6
+ import { useGlass } from "./glass";
6
7
  import { useAccentColor, useLargerText } from "./theme";
7
8
  import { useScheme } from "./useScheme";
8
9
  export function Card(t0) {
9
- const $ = _c(30);
10
+ const $ = _c(33);
10
11
  const {
11
12
  children,
12
13
  title,
@@ -21,6 +22,7 @@ export function Card(t0) {
21
22
  const largerText = useLargerText();
22
23
  const accentColor = useAccentColor();
23
24
  const scheme = useScheme();
25
+ const glass = useGlass("surface");
24
26
  const hasHeader = Boolean(title || action);
25
27
  const titleSize = largerText ? "text-2xl" : "text-base";
26
28
  const t1 = onPress ? undefined : testID;
@@ -41,74 +43,78 @@ export function Card(t0) {
41
43
  t3 = $[3];
42
44
  }
43
45
  let t4;
44
- if ($[4] !== Icon || $[5] !== accentColor || $[6] !== action || $[7] !== description || $[8] !== hasHeader || $[9] !== largerText || $[10] !== scheme || $[11] !== title || $[12] !== titleSize) {
45
- t4 = hasHeader && <PrimitiveCardHeader className="px-4 py-0"><View className="flex-row items-center justify-between"><View className="flex-row items-center gap-2">{Icon && <Icon size={largerText ? 28 : 24} color={accentColor} />}{title ? <PrimitiveCardTitle className={cn("font-instrument-sans-medium leading-tight", titleSize)} style={[textStyle("foreground", scheme), sizeStyle(titleSize, "tight"), typeStyle("medium")]}>{title}</PrimitiveCardTitle> : null}</View>{action}</View>{description ? <CardDescription>{description}</CardDescription> : null}</PrimitiveCardHeader>;
46
- $[4] = Icon;
47
- $[5] = accentColor;
48
- $[6] = action;
49
- $[7] = description;
50
- $[8] = hasHeader;
51
- $[9] = largerText;
52
- $[10] = scheme;
53
- $[11] = title;
54
- $[12] = titleSize;
55
- $[13] = t4;
46
+ if ($[4] !== glass || $[5] !== t3) {
47
+ t4 = [t3, glass];
48
+ $[4] = glass;
49
+ $[5] = t3;
50
+ $[6] = t4;
56
51
  } else {
57
- t4 = $[13];
52
+ t4 = $[6];
58
53
  }
59
- const t5 = hasHeader && "pt-0";
60
- let t6;
61
- if ($[14] !== t5) {
62
- t6 = cn(t5, "px-4");
63
- $[14] = t5;
64
- $[15] = t6;
54
+ let t5;
55
+ if ($[7] !== Icon || $[8] !== accentColor || $[9] !== action || $[10] !== description || $[11] !== hasHeader || $[12] !== largerText || $[13] !== scheme || $[14] !== title || $[15] !== titleSize) {
56
+ t5 = hasHeader && <PrimitiveCardHeader className="px-4 py-0"><View className="flex-row items-center justify-between"><View className="flex-row items-center gap-2">{Icon && <Icon size={largerText ? 28 : 24} color={accentColor} />}{title ? <PrimitiveCardTitle className={cn("font-instrument-sans-medium leading-tight", titleSize)} style={[textStyle("foreground", scheme), sizeStyle(titleSize, "tight"), typeStyle("medium")]}>{title}</PrimitiveCardTitle> : null}</View>{action}</View>{description ? <CardDescription>{description}</CardDescription> : null}</PrimitiveCardHeader>;
57
+ $[7] = Icon;
58
+ $[8] = accentColor;
59
+ $[9] = action;
60
+ $[10] = description;
61
+ $[11] = hasHeader;
62
+ $[12] = largerText;
63
+ $[13] = scheme;
64
+ $[14] = title;
65
+ $[15] = titleSize;
66
+ $[16] = t5;
65
67
  } else {
66
- t6 = $[15];
68
+ t5 = $[16];
67
69
  }
70
+ const t6 = hasHeader && "pt-0";
68
71
  let t7;
69
- if ($[16] !== children || $[17] !== t6) {
70
- t7 = <PrimitiveCardContent className={t6}>{children}</PrimitiveCardContent>;
71
- $[16] = children;
72
+ if ($[17] !== t6) {
73
+ t7 = cn(t6, "px-4");
72
74
  $[17] = t6;
73
75
  $[18] = t7;
74
76
  } else {
75
77
  t7 = $[18];
76
78
  }
77
79
  let t8;
78
- if ($[19] !== t1 || $[20] !== t2 || $[21] !== t3 || $[22] !== t4 || $[23] !== t7) {
79
- t8 = <PrimitiveCard testID={t1} className={t2} style={t3}>{t4}{t7}</PrimitiveCard>;
80
- $[19] = t1;
81
- $[20] = t2;
82
- $[21] = t3;
83
- $[22] = t4;
84
- $[23] = t7;
85
- $[24] = t8;
80
+ if ($[19] !== children || $[20] !== t7) {
81
+ t8 = <PrimitiveCardContent className={t7}>{children}</PrimitiveCardContent>;
82
+ $[19] = children;
83
+ $[20] = t7;
84
+ $[21] = t8;
85
+ } else {
86
+ t8 = $[21];
87
+ }
88
+ let t9;
89
+ if ($[22] !== t1 || $[23] !== t2 || $[24] !== t4 || $[25] !== t5 || $[26] !== t8) {
90
+ t9 = <PrimitiveCard testID={t1} className={t2} style={t4}>{t5}{t8}</PrimitiveCard>;
91
+ $[22] = t1;
92
+ $[23] = t2;
93
+ $[24] = t4;
94
+ $[25] = t5;
95
+ $[26] = t8;
96
+ $[27] = t9;
86
97
  } else {
87
- t8 = $[24];
98
+ t9 = $[27];
88
99
  }
89
- const card = t8;
100
+ const card = t9;
90
101
  if (!onPress) {
91
102
  return card;
92
103
  }
93
- const t9 = accessibilityLabel ?? title;
94
- let t10;
95
- if ($[25] !== card || $[26] !== onPress || $[27] !== t9 || $[28] !== testID) {
96
- t10 = <Pressable testID={testID} accessibilityRole="button" accessibilityLabel={t9} onPress={onPress} className="active:opacity-70">{card}</Pressable>;
97
- $[25] = card;
98
- $[26] = onPress;
99
- $[27] = t9;
100
- $[28] = testID;
101
- $[29] = t10;
104
+ const t10 = accessibilityLabel ?? title;
105
+ let t11;
106
+ if ($[28] !== card || $[29] !== onPress || $[30] !== t10 || $[31] !== testID) {
107
+ t11 = <Pressable testID={testID} accessibilityRole="button" accessibilityLabel={t10} onPress={onPress} className="active:opacity-70">{card}</Pressable>;
108
+ $[28] = card;
109
+ $[29] = onPress;
110
+ $[30] = t10;
111
+ $[31] = testID;
112
+ $[32] = t11;
102
113
  } else {
103
- t10 = $[29];
114
+ t11 = $[32];
104
115
  }
105
- return t10;
116
+ return t11;
106
117
  }
107
-
108
- // Parts for composing a card body with the web part names. They sit inside
109
- // `Card`'s padded content, so they add no side padding of their own. Text
110
- // colours are styles that follow the colour scheme; recolour with `style`.
111
-
112
118
  export function CardHeader(t0) {
113
119
  const $ = _c(8);
114
120
  let className;
@@ -9,7 +9,6 @@ import { withAlpha } from "./palette";
9
9
  import { useLargerText } from "./theme";
10
10
  import { tokens } from "./tokens";
11
11
  import { useScheme } from "./useScheme";
12
- /** Swatch diameters, one step up with larger text. */
13
12
  const DIAMETER = {
14
13
  regular: {
15
14
  sm: 24,
@@ -22,8 +21,6 @@ const DIAMETER = {
22
21
  lg: 48
23
22
  }
24
23
  };
25
-
26
- /** Selection ring width and the gap between the ring and the swatch. */
27
24
  const RING = 2;
28
25
  const RING_GAP = 2;
29
26
 
@@ -42,7 +39,6 @@ export function swatchCheckColor(color) {
42
39
  return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
43
40
  };
44
41
  const luminance = 0.2126 * linear(n >> 16 & 255) + 0.7152 * linear(n >> 8 & 255) + 0.0722 * linear(n & 255);
45
- // Contrast with white is 1.05 / (L + 0.05); with black, (L + 0.05) / 0.05.
46
42
  return 1.05 / (luminance + 0.05) >= (luminance + 0.05) / 0.05 ? tokens.color.white : tokens.color.black;
47
43
  }
48
44
 
@@ -140,8 +136,6 @@ export function ColorSwatches(t0) {
140
136
  }
141
137
  return t7;
142
138
  }
143
-
144
- /** One swatch: a radio that scales a little on press. The slop does not scale. */
145
139
  function Swatch(t0) {
146
140
  const $ = _c(38);
147
141
  const {