@vvedantb/native-ui 0.37.1 → 0.37.2

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 (77) hide show
  1. package/dist/AmbientBackground.jsx +16 -28
  2. package/dist/Avatar.jsx +2 -2
  3. package/dist/BottomSheetContainer.jsx +1 -1
  4. package/dist/BulkActionBar.jsx +1 -1
  5. package/dist/Card.jsx +4 -4
  6. package/dist/Chip.jsx +2 -2
  7. package/dist/DateTimeField.jsx +1 -1
  8. package/dist/Dialog.jsx +3 -3
  9. package/dist/DropdownMenu.jsx +3 -3
  10. package/dist/EmptyState.jsx +4 -4
  11. package/dist/FloatingTabBar.jsx +2 -2
  12. package/dist/LabeledSwitchRow.jsx +2 -2
  13. package/dist/ListRow.jsx +2 -2
  14. package/dist/PinnedBotTile.jsx +2 -2
  15. package/dist/StatGrid.jsx +1 -1
  16. package/dist/Stepper.jsx +2 -2
  17. package/dist/Toast.jsx +1 -1
  18. package/dist/ai/activity-question.jsx +2 -2
  19. package/dist/ai/card-button.jsx +2 -2
  20. package/dist/ai/choice-question.jsx +8 -8
  21. package/dist/ai/message-action-sheet.jsx +2 -2
  22. package/dist/ai/message-quote.jsx +2 -2
  23. package/dist/ai/message.jsx +2 -2
  24. package/dist/ai/reply-quote-chip.jsx +2 -2
  25. package/dist/ai/subagent-cards.jsx +6 -6
  26. package/dist/ai/tool-approval-card.jsx +1 -1
  27. package/dist/auth/AuthScreen.jsx +2 -2
  28. package/dist/examples/ParityGallery.jsx +2 -2
  29. package/dist/generative-ui/components.jsx +2 -2
  30. package/dist/marketing/UpgradeToProCard.jsx +2 -2
  31. package/dist/media/ImageGallery.jsx +2 -2
  32. package/dist/motion.js +3 -2
  33. package/dist/primitives/card.jsx +2 -2
  34. package/dist/primitives/text.jsx +13 -13
  35. package/dist/primitives/toast-drag-gesture.jsx +3 -2
  36. package/dist/settings/MoreFromProjectV.jsx +2 -2
  37. package/dist/settings/SettingsSection.jsx +1 -1
  38. package/dist/settings/ThemeModePicker.jsx +6 -6
  39. package/package.json +1 -1
  40. package/src/AmbientBackground.tsx +8 -26
  41. package/src/Avatar.tsx +2 -2
  42. package/src/BottomSheetContainer.tsx +1 -1
  43. package/src/BulkActionBar.tsx +2 -2
  44. package/src/Card.tsx +5 -5
  45. package/src/Chip.tsx +2 -2
  46. package/src/DateTimeField.tsx +2 -2
  47. package/src/Dialog.tsx +3 -3
  48. package/src/DropdownMenu.tsx +3 -3
  49. package/src/EmptyState.tsx +4 -4
  50. package/src/FloatingTabBar.tsx +2 -2
  51. package/src/LabeledSwitchRow.tsx +2 -2
  52. package/src/ListRow.tsx +2 -2
  53. package/src/PinnedBotTile.tsx +2 -2
  54. package/src/StatGrid.tsx +2 -2
  55. package/src/Stepper.tsx +2 -2
  56. package/src/Toast.tsx +2 -2
  57. package/src/ai/activity-question.tsx +1 -1
  58. package/src/ai/card-button.tsx +1 -1
  59. package/src/ai/choice-question.tsx +10 -10
  60. package/src/ai/message-action-sheet.tsx +2 -2
  61. package/src/ai/message-quote.tsx +2 -2
  62. package/src/ai/message.tsx +2 -2
  63. package/src/ai/reply-quote-chip.tsx +2 -2
  64. package/src/ai/subagent-cards.tsx +5 -5
  65. package/src/ai/tool-approval-card.tsx +4 -4
  66. package/src/auth/AuthScreen.tsx +2 -2
  67. package/src/examples/ParityGallery.tsx +2 -2
  68. package/src/generative-ui/components.tsx +3 -3
  69. package/src/marketing/UpgradeToProCard.tsx +2 -2
  70. package/src/media/ImageGallery.tsx +1 -1
  71. package/src/motion.ts +3 -2
  72. package/src/primitives/card.tsx +3 -3
  73. package/src/primitives/text.tsx +13 -13
  74. package/src/primitives/toast-drag-gesture.tsx +2 -2
  75. package/src/settings/MoreFromProjectV.tsx +2 -2
  76. package/src/settings/SettingsSection.tsx +3 -3
  77. package/src/settings/ThemeModePicker.tsx +9 -14
@@ -29,7 +29,7 @@ const TEXT_2XS = {
29
29
  const FONT_CLASS = {
30
30
  regular: "font-instrument-sans",
31
31
  medium: "font-instrument-sans-medium",
32
- semibold: "font-instrument-sans-semibold"
32
+ semibold: "font-instrument-sans-medium"
33
33
  };
34
34
  function Line(t0) {
35
35
  const $ = _c(18);
@@ -357,7 +357,7 @@ export function MetricElement(t0) {
357
357
  let t6;
358
358
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
359
359
  t4 = sizeStyle("text-lg", "tight");
360
- t5 = typeStyle("semibold");
360
+ t5 = typeStyle("medium");
361
361
  t6 = ["tabular-nums"];
362
362
  $[3] = t4;
363
363
  $[4] = t5;
@@ -92,7 +92,7 @@ export function UpgradeToProCard(t0) {
92
92
  }
93
93
  let t7;
94
94
  if ($[16] !== titleSize) {
95
- t7 = cn("min-w-0 flex-1 font-instrument-sans-semibold", titleSize);
95
+ t7 = cn("min-w-0 flex-1 font-instrument-sans-medium", titleSize);
96
96
  $[16] = titleSize;
97
97
  $[17] = t7;
98
98
  } else {
@@ -116,7 +116,7 @@ export function UpgradeToProCard(t0) {
116
116
  }
117
117
  let t10;
118
118
  if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
119
- t10 = typeStyle("semibold");
119
+ t10 = typeStyle("medium");
120
120
  $[22] = t10;
121
121
  } else {
122
122
  t10 = $[22];
@@ -238,9 +238,9 @@ function ImageGrid(t0) {
238
238
  height: "100%"
239
239
  }} />{tile_1.overflow > 0 ? <View className="absolute inset-0 items-center justify-center" style={{
240
240
  backgroundColor: withAlpha(tokens.color.black, 0.6)
241
- }}><Text className="font-instrument-sans-semibold text-xl" style={[{
241
+ }}><Text className="font-instrument-sans-medium text-xl" style={[{
242
242
  color: tokens.color.white
243
- }, typeStyle("semibold")]}>{`+${tile_1.overflow}`}</Text></View> : null}</Pressable>;
243
+ }, typeStyle("medium")]}>{`+${tile_1.overflow}`}</Text></View> : null}</Pressable>;
244
244
  };
245
245
  $[10] = images;
246
246
  $[11] = onOpen;
package/dist/motion.js CHANGED
@@ -15,10 +15,11 @@ export const SHEET_SPRING = {
15
15
  reduceMotion: ReduceMotion.System
16
16
  };
17
17
 
18
- /** A dragged sheet that springs home: a little bounce, as the finger applied force. Add the release `velocity`. */
18
+ /** A dragged sheet that springs home: critically damped, no bounce. Add the release `velocity`. */
19
19
  export const SHEET_SNAP_SPRING = {
20
20
  duration: 300,
21
- dampingRatio: 0.8,
21
+ dampingRatio: 1,
22
+ overshootClamping: true,
22
23
  reduceMotion: ReduceMotion.System
23
24
  };
24
25
 
@@ -98,7 +98,7 @@ const CardTitle = React.forwardRef((t0, ref) => {
98
98
  }
99
99
  let t1;
100
100
  if ($[4] !== className) {
101
- t1 = cn("font-instrument-sans-semibold leading-none", className);
101
+ t1 = cn("font-instrument-sans-medium leading-none", className);
102
102
  $[4] = className;
103
103
  $[5] = t1;
104
104
  } else {
@@ -106,7 +106,7 @@ const CardTitle = React.forwardRef((t0, ref) => {
106
106
  }
107
107
  let t2;
108
108
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
109
- t2 = typeStyle("semibold");
109
+ t2 = typeStyle("medium");
110
110
  $[6] = t2;
111
111
  } else {
112
112
  t2 = $[6];
@@ -11,23 +11,23 @@ const textVariants = cva(cn("text-foreground text-base", Platform.select({
11
11
  variants: {
12
12
  variant: {
13
13
  default: "",
14
- h1: cn("text-4xl font-instrument-sans-semibold tracking-tight", Platform.select({
14
+ h1: cn("text-4xl font-instrument-sans-medium tracking-tight", Platform.select({
15
15
  web: "scroll-m-20"
16
16
  })),
17
- h2: cn("text-3xl font-instrument-sans-semibold tracking-tight border-border border-b pb-2", Platform.select({
17
+ h2: cn("text-3xl font-instrument-sans-medium tracking-tight border-border border-b pb-2", Platform.select({
18
18
  web: "scroll-m-20"
19
19
  })),
20
- h3: cn("text-2xl font-instrument-sans-semibold tracking-tight", Platform.select({
20
+ h3: cn("text-2xl font-instrument-sans-medium tracking-tight", Platform.select({
21
21
  web: "scroll-m-20"
22
22
  })),
23
- h4: cn("text-xl font-instrument-sans-semibold tracking-tight", Platform.select({
23
+ h4: cn("text-xl font-instrument-sans-medium tracking-tight", Platform.select({
24
24
  web: "scroll-m-20"
25
25
  })),
26
26
  p: "leading-7",
27
27
  blockquote: "border-l-2 border-border pl-4 italic",
28
- code: "bg-muted rounded px-[0.3rem] py-[0.2rem] text-sm font-instrument-sans-semibold",
28
+ code: "bg-muted rounded px-[0.3rem] py-[0.2rem] text-sm font-instrument-sans-medium",
29
29
  lead: "text-xl text-muted-foreground",
30
- large: "text-lg font-instrument-sans-semibold",
30
+ large: "text-lg font-instrument-sans-medium",
31
31
  small: "text-sm font-instrument-sans-medium",
32
32
  muted: "text-sm text-muted-foreground"
33
33
  }
@@ -58,14 +58,14 @@ const ARIA_LEVEL = {
58
58
  // The weight of each variant's `font-instrument-sans-*` class, set as a style
59
59
  // beside it (`typeStyle`): where an app maps every one of those classes to one
60
60
  // family, the class alone draws Regular. Headings are semibold, as the web
61
- // titles; `h1` was `font-extrabold` before 0.3.13.
61
+ // titles; `h1` was `font-medium` before 0.3.13.
62
62
  const WEIGHT = {
63
- h1: typeStyle("semibold"),
64
- h2: typeStyle("semibold"),
65
- h3: typeStyle("semibold"),
66
- h4: typeStyle("semibold"),
67
- code: typeStyle("semibold"),
68
- large: typeStyle("semibold"),
63
+ h1: typeStyle("medium"),
64
+ h2: typeStyle("medium"),
65
+ h3: typeStyle("medium"),
66
+ h4: typeStyle("medium"),
67
+ code: typeStyle("medium"),
68
+ large: typeStyle("medium"),
69
69
  small: typeStyle("medium")
70
70
  };
71
71
  const TextClassContext = React.createContext(undefined);
@@ -8,10 +8,11 @@ import { useWebClickGuard } from "./web-click-guard";
8
8
  // The toast drag on Gesture Handler: the track phase and the release run as
9
9
  // worklets on the UI thread. The rules are plain worklets in `toastDrag`.
10
10
 
11
- /** Back home after a short drag: a little bounce, as the finger applied force. */
11
+ /** Back home after a short drag: critically damped, no bounce. */
12
12
  const HOME_SPRING = {
13
13
  duration: 250,
14
- dampingRatio: 0.8,
14
+ dampingRatio: 1,
15
+ overshootClamping: true,
15
16
  reduceMotion: ReduceMotion.System
16
17
  };
17
18
  /** Away up the screen: no overshoot back into view. */
@@ -73,14 +73,14 @@ export function FromProjectV(t0) {
73
73
  }
74
74
  let t6;
75
75
  if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
76
- t6 = typeStyle("semibold");
76
+ t6 = typeStyle("medium");
77
77
  $[10] = t6;
78
78
  } else {
79
79
  t6 = $[10];
80
80
  }
81
81
  let t7;
82
82
  if ($[11] !== t5) {
83
- t7 = <Text className="text-sm font-instrument-sans-semibold" style={[t5, t6]}>Project V</Text>;
83
+ t7 = <Text className="text-sm font-instrument-sans-medium" style={[t5, t6]}>Project V</Text>;
84
84
  $[11] = t5;
85
85
  $[12] = t7;
86
86
  } else {
@@ -30,7 +30,7 @@ export function SettingsSection(t0) {
30
30
  }
31
31
  let t3;
32
32
  if ($[2] !== scheme || $[3] !== title) {
33
- t3 = typeof title === "string" ? <Text accessibilityRole="header" className="text-sm font-instrument-sans-semibold" style={[textStyle("foreground", scheme), sizeStyle("text-sm"), typeStyle("semibold")]}>{title}</Text> : title;
33
+ t3 = typeof title === "string" ? <Text accessibilityRole="header" className="text-sm font-instrument-sans-medium" style={[textStyle("foreground", scheme), sizeStyle("text-sm"), typeStyle("medium")]}>{title}</Text> : title;
34
34
  $[2] = scheme;
35
35
  $[3] = title;
36
36
  $[4] = t3;
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
2
  import { IconCheck, IconCircleHalf, IconDeviceDesktop, IconMoon, IconSun } from "@tabler/icons-react-native";
3
3
  import { Pressable, StyleSheet, Text, View } from "react-native";
4
- import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
4
+ import Svg, { Path, Rect } from "react-native-svg";
5
5
  import { cn } from "../cn";
6
6
  import { sizeStyle, typeStyle } from "../controlStyles";
7
7
  import { palette, withAlpha } from "../palette";
@@ -28,7 +28,7 @@ const ICONS = {
28
28
  /** Web `bg-zinc-900`. */
29
29
  const ZINC_900 = "#18181b";
30
30
  // Swatches and icons show the theme itself, so they use the web's fixed colours, not tokens.
31
- // System has no swatch colour (it is a gradient) and a muted icon.
31
+ // System has no swatch colour (it is a hard split) and a muted icon.
32
32
  const SWATCHES = {
33
33
  light: "#ffffff",
34
34
  neutral: "#3f3f46",
@@ -41,12 +41,12 @@ const ICON_COLOURS = {
41
41
  dark: "#93c5fd",
42
42
  system: null
43
43
  };
44
- /** The web System swatch, `bg-linear-to-br from-white to-zinc-900`. */
45
- function GradientSwatch() {
44
+ /** The System swatch: white with a hard diagonal half in zinc-900, no gradient. */
45
+ function SplitSwatch() {
46
46
  const $ = _c(1);
47
47
  let t0;
48
48
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
49
- t0 = <Svg width="100%" height="100%" style={StyleSheet.absoluteFill}><Defs><LinearGradient id="theme-mode-system" x1="0" y1="0" x2="1" y2="1"><Stop offset="0" stopColor="#ffffff" /><Stop offset="1" stopColor={ZINC_900} /></LinearGradient></Defs><Rect width="100%" height="100%" fill="url(#theme-mode-system)" /></Svg>;
49
+ t0 = <Svg width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none" style={StyleSheet.absoluteFill}><Rect width="1" height="1" fill="#ffffff" /><Path d="M1 0 L1 1 L0 1 Z" fill={ZINC_900} /></Svg>;
50
50
  $[0] = t0;
51
51
  } else {
52
52
  t0 = $[0];
@@ -96,7 +96,7 @@ export function ThemeModePicker(t0) {
96
96
  backgroundColor: active ? withAlpha(palette.primary[scheme], 0.08) : withAlpha(tokens.color.surfaceSecondary[scheme], 0.4)
97
97
  }}><View className="mx-2 h-12 items-center justify-center self-stretch overflow-hidden rounded-2xl" style={swatch ? {
98
98
  backgroundColor: swatch
99
- } : undefined}>{swatch ? null : <GradientSwatch />}<View className="absolute inset-0 items-center justify-center"><Icon size={22} color={ICON_COLOURS[mode] ?? tokens.color.muted[scheme]} /></View></View>{active ? <View className="absolute right-2 top-2 h-4 w-4 items-center justify-center rounded-full" style={{
99
+ } : undefined}>{swatch ? null : <SplitSwatch />}<View className="absolute inset-0 items-center justify-center"><Icon size={22} color={ICON_COLOURS[mode] ?? tokens.color.muted[scheme]} /></View></View>{active ? <View className="absolute right-2 top-2 h-4 w-4 items-center justify-center rounded-full" style={{
100
100
  backgroundColor: palette.primary[scheme]
101
101
  }}><IconCheck size={10} strokeWidth={3} color={palette.primaryForeground[scheme]} /></View> : null}<Text numberOfLines={1} adjustsFontSizeToFit={true} className={cn("font-instrument-sans-medium", labelSize)} style={[sizeStyle(labelSize), typeStyle("medium"), {
102
102
  color: active ? palette.primary[scheme] : tokens.color.muted[scheme]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vvedantb/native-ui",
3
- "version": "0.37.1",
3
+ "version": "0.37.2",
4
4
  "license": "MIT",
5
5
  "description": "Shared React Native / Expo UI primitives. Floating surfaces, forms, overlays, toasts, settings chrome, tab bar, AI chat parts, the family app marks, a NativeWind preset, the Expo web root and Clerk + Convex auth screens.",
6
6
  "type": "module",
@@ -1,43 +1,25 @@
1
1
  import { StyleSheet, View, type ViewProps } from "react-native";
2
2
  import { cn } from "./cn";
3
- import { loadLinearGradient } from "./gradient";
4
3
  import { tokens } from "./tokens";
5
4
  import { useScheme } from "./useScheme";
6
5
 
7
- const LIGHT = ["#f6f6f7", "#fde8f0", "#f4f5f7"] as const;
8
- const DARK = ["#1c1c1e", "#2a1820", "#1a1a1c"] as const;
9
-
10
- /**
11
- * A soft gradient behind the screen. Without the optional
12
- * `expo-linear-gradient` peer it draws the solid `tokens.color.background`.
13
- */
6
+ /** A flat `tokens.color.background` layer behind the screen. */
14
7
  export function AmbientBackground({
15
8
  children,
16
9
  className,
17
10
  ...props
18
11
  }: ViewProps & { className?: string }) {
19
12
  const scheme = useScheme();
20
- const LinearGradient = loadLinearGradient()?.LinearGradient;
21
13
 
22
14
  return (
23
15
  <View className={cn("flex-1", className)} {...props}>
24
- {LinearGradient ? (
25
- <LinearGradient
26
- pointerEvents="none"
27
- colors={[...(scheme === "dark" ? DARK : LIGHT)]}
28
- start={{ x: 0.05, y: 0 }}
29
- end={{ x: 0.95, y: 1 }}
30
- style={StyleSheet.absoluteFill}
31
- />
32
- ) : (
33
- <View
34
- pointerEvents="none"
35
- style={{
36
- ...StyleSheet.absoluteFill,
37
- backgroundColor: tokens.color.background[scheme],
38
- }}
39
- />
40
- )}
16
+ <View
17
+ pointerEvents="none"
18
+ style={{
19
+ ...StyleSheet.absoluteFill,
20
+ backgroundColor: tokens.color.background[scheme],
21
+ }}
22
+ />
41
23
  {children}
42
24
  </View>
43
25
  );
package/src/Avatar.tsx CHANGED
@@ -125,10 +125,10 @@ export function AvatarFallback({
125
125
  {typeof children === "string" ? (
126
126
  <Text
127
127
  numberOfLines={1}
128
- className={cn("font-instrument-sans-semibold", textClassName)}
128
+ className={cn("font-instrument-sans-medium", textClassName)}
129
129
  style={[
130
130
  { fontSize: Math.round(size * 0.4), color: palette.defaultForeground[scheme] },
131
- typeStyle("semibold"),
131
+ typeStyle("medium"),
132
132
  ]}
133
133
  >
134
134
  {children}
@@ -129,7 +129,7 @@ export function BottomSheetContainer({
129
129
  style={[
130
130
  { flex: 1, fontSize: largerText ? 24 : 20 },
131
131
  textStyle("foreground", scheme),
132
- typeStyle("semibold"),
132
+ typeStyle("medium"),
133
133
  ]}
134
134
  >
135
135
  {title}
@@ -217,8 +217,8 @@ export function BulkActionBar({
217
217
  }}
218
218
  >
219
219
  <Text
220
- className="font-instrument-sans-semibold"
221
- style={[metrics.caption, typeStyle("semibold"), { fontVariant: ["tabular-nums"], color: tokens.color.foreground[scheme] }]}
220
+ className="font-instrument-sans-medium"
221
+ style={[metrics.caption, typeStyle("medium"), { fontVariant: ["tabular-nums"], color: tokens.color.foreground[scheme] }]}
222
222
  >
223
223
  {selectedCount}
224
224
  </Text>
package/src/Card.tsx CHANGED
@@ -65,11 +65,11 @@ export function Card({
65
65
  )}
66
66
  {title ? (
67
67
  <PrimitiveCardTitle
68
- className={cn("font-instrument-sans-semibold leading-tight", titleSize)}
68
+ className={cn("font-instrument-sans-medium leading-tight", titleSize)}
69
69
  style={[
70
70
  textStyle("foreground", scheme),
71
71
  sizeStyle(titleSize, "tight"),
72
- typeStyle("semibold"),
72
+ typeStyle("medium"),
73
73
  ]}
74
74
  >
75
75
  {title}
@@ -112,7 +112,7 @@ export function CardHeader({ className, ...props }: PartProps) {
112
112
  }
113
113
 
114
114
  /**
115
- * Web `font-semibold leading-none` at the inherited 16. The line height is
115
+ * Web `font-medium leading-none` at the inherited 16. The line height is
116
116
  * `leading-tight` (20), not 16: below the face's ascent and descent, iOS and
117
117
  * Android can clip the glyphs.
118
118
  */
@@ -123,11 +123,11 @@ export function CardTitle({ className, style, ...props }: TextPartProps) {
123
123
  return (
124
124
  <Text
125
125
  accessibilityRole="header"
126
- className={cn("font-instrument-sans-semibold leading-tight", size, className)}
126
+ className={cn("font-instrument-sans-medium leading-tight", size, className)}
127
127
  style={[
128
128
  textStyle("foreground", scheme),
129
129
  sizeStyle(size, "tight"),
130
- typeStyle("semibold"),
130
+ typeStyle("medium"),
131
131
  style,
132
132
  ]}
133
133
  {...props}
package/src/Chip.tsx CHANGED
@@ -42,12 +42,12 @@ export function Chip({
42
42
  } ${selected ? "bg-pink-100 dark:bg-pink-900/40" : "bg-secondary"}`}
43
43
  >
44
44
  <Text
45
- className={`font-instrument-sans-semibold ${
45
+ className={`font-instrument-sans-medium ${
46
46
  largerText ? "text-xl" : "text-lg"
47
47
  } ${
48
48
  selected ? "text-pink-700 dark:text-pink-300" : ""
49
49
  }`}
50
- style={[selected ? null : textStyle("muted", scheme), typeStyle("semibold")]}
50
+ style={[selected ? null : textStyle("muted", scheme), typeStyle("medium")]}
51
51
  >
52
52
  {label}
53
53
  </Text>
@@ -100,8 +100,8 @@ export function DateTimeField({
100
100
  style={{ backgroundColor: palette.default[scheme] }}
101
101
  >
102
102
  <Text
103
- className={`${largerText ? "text-xl" : "text-lg"} font-instrument-sans-semibold`}
104
- style={[textColor, typeStyle("semibold")]}
103
+ className={`${largerText ? "text-xl" : "text-lg"} font-instrument-sans-medium`}
104
+ style={[textColor, typeStyle("medium")]}
105
105
  >
106
106
  {button.label}
107
107
  </Text>
package/src/Dialog.tsx CHANGED
@@ -193,7 +193,7 @@ export function DialogHeader({ className, ...props }: PartProps) {
193
193
  // Text colours are styles (`textStyle`), so they follow the colour scheme in
194
194
  // apps whose `text-foreground` does not. Recolour with `style`, not `className`.
195
195
 
196
- /** Web `text-lg font-semibold`. */
196
+ /** Web `text-lg font-medium`. */
197
197
  export function DialogTitle({ className, style, ...props }: TextPartProps) {
198
198
  const largerText = useLargerText();
199
199
  const scheme = useScheme();
@@ -201,11 +201,11 @@ export function DialogTitle({ className, style, ...props }: TextPartProps) {
201
201
  <Text
202
202
  accessibilityRole="header"
203
203
  className={cn(
204
- "font-instrument-sans-semibold",
204
+ "font-instrument-sans-medium",
205
205
  largerText ? "text-2xl" : "text-lg",
206
206
  className,
207
207
  )}
208
- style={[textStyle("foreground", scheme), typeStyle("semibold"), style]}
208
+ style={[textStyle("foreground", scheme), typeStyle("medium"), style]}
209
209
  {...props}
210
210
  />
211
211
  );
@@ -627,17 +627,17 @@ export function DropdownMenuRadioItem({ checked, ...props }: DropdownMenuRadioIt
627
627
 
628
628
  export type DropdownMenuLabelProps = { children: ReactNode; className?: string };
629
629
 
630
- /** A group heading: the web `text-xs font-semibold uppercase tracking-widest text-muted-foreground`, `px-2.5 py-1.5`. */
630
+ /** A group heading: the web `text-xs font-medium uppercase tracking-widest text-muted-foreground`, `px-2.5 py-1.5`. */
631
631
  export function DropdownMenuLabel({ children, className }: DropdownMenuLabelProps) {
632
632
  const scheme = useScheme();
633
633
  const text = sizeStyle(useLargerText() ? "text-base" : "text-xs");
634
634
  return (
635
635
  <Text
636
636
  accessibilityRole="header"
637
- className={cn("font-instrument-sans-semibold uppercase", className)}
637
+ className={cn("font-instrument-sans-medium uppercase", className)}
638
638
  style={[
639
639
  text,
640
- typeStyle("semibold"),
640
+ typeStyle("medium"),
641
641
  {
642
642
  letterSpacing: text.fontSize / 10,
643
643
  color: tokens.color.muted[scheme],
@@ -33,10 +33,10 @@ function EmptyStateView({
33
33
  <Icon size={largerText ? 44 : 40} color={tokens.color.muted[scheme]} />
34
34
  <Text
35
35
  className={cn(
36
- "mt-4 text-center font-instrument-sans-semibold",
36
+ "mt-4 text-center font-instrument-sans-medium",
37
37
  largerText ? "text-xl" : "text-lg",
38
38
  )}
39
- style={[textStyle("foreground", scheme), typeStyle("semibold")]}
39
+ style={[textStyle("foreground", scheme), typeStyle("medium")]}
40
40
  >
41
41
  {title}
42
42
  </Text>
@@ -123,11 +123,11 @@ function Title({ className, style, ...props }: TextProps & { className?: string
123
123
  return (
124
124
  <Text
125
125
  className={cn(
126
- "text-center font-instrument-sans-semibold",
126
+ "text-center font-instrument-sans-medium",
127
127
  largerText ? "text-xl" : "text-lg",
128
128
  className,
129
129
  )}
130
- style={[textStyle("foreground", scheme), typeStyle("semibold"), style]}
130
+ style={[textStyle("foreground", scheme), typeStyle("medium"), style]}
131
131
  {...props}
132
132
  />
133
133
  );
@@ -195,8 +195,8 @@ function TabBarItem({
195
195
  // The bar has a fixed height (`tabBarReserve`), so labels
196
196
  // scale with Dynamic Type only up to what fits in it.
197
197
  maxFontSizeMultiplier={1.5}
198
- className={`font-instrument-sans-semibold ${largerText ? "text-base" : "text-sm"}`}
199
- style={[{ color }, typeStyle("semibold")]}
198
+ className={`font-instrument-sans-medium ${largerText ? "text-base" : "text-sm"}`}
199
+ style={[{ color }, typeStyle("medium")]}
200
200
  >
201
201
  {label}
202
202
  </Text>
@@ -56,11 +56,11 @@ export function LabeledSwitchRow({
56
56
  <View className="min-w-0 flex-1">
57
57
  <Text
58
58
  className={cn(
59
- "font-instrument-sans-semibold",
59
+ "font-instrument-sans-medium",
60
60
  largerText ? "text-xl" : "text-lg",
61
61
  disabled && "opacity-70",
62
62
  )}
63
- style={[textStyle("foreground", scheme), typeStyle("semibold")]}
63
+ style={[textStyle("foreground", scheme), typeStyle("medium")]}
64
64
  >
65
65
  {label}
66
66
  </Text>
package/src/ListRow.tsx CHANGED
@@ -63,11 +63,11 @@ export function ListRow({
63
63
  <Text
64
64
  numberOfLines={2}
65
65
  className={cn(
66
- "font-instrument-sans-semibold",
66
+ "font-instrument-sans-medium",
67
67
  largerText ? "text-xl" : "text-lg",
68
68
  titleEnd != null && "min-w-0 flex-1",
69
69
  )}
70
- style={[textStyle("foreground", scheme), typeStyle("semibold")]}
70
+ style={[textStyle("foreground", scheme), typeStyle("medium")]}
71
71
  >
72
72
  {title}
73
73
  </Text>
@@ -49,8 +49,8 @@ export function PinnedBotTile({ title, leading, unread = false, generating = fal
49
49
  {leading}
50
50
  <Text
51
51
  numberOfLines={2}
52
- className={cn("text-center font-instrument-sans-semibold", largerText ? "text-lg" : "text-base")}
53
- style={[textStyle("foreground", scheme), typeStyle("semibold")]}
52
+ className={cn("text-center font-instrument-sans-medium", largerText ? "text-lg" : "text-base")}
53
+ style={[textStyle("foreground", scheme), typeStyle("medium")]}
54
54
  >
55
55
  {title}
56
56
  </Text>
package/src/StatGrid.tsx CHANGED
@@ -58,11 +58,11 @@ export function StatGrid({ items, columns = 2, testID }: StatGridProps) {
58
58
  {item.label}
59
59
  </Text>
60
60
  <Text
61
- className={cn("font-instrument-sans-semibold", valueSize)}
61
+ className={cn("font-instrument-sans-medium", valueSize)}
62
62
  style={[
63
63
  textStyle("foreground", scheme),
64
64
  sizeStyle(valueSize, "tight"),
65
- typeStyle("semibold"),
65
+ typeStyle("medium"),
66
66
  { fontVariant: ["tabular-nums"] },
67
67
  ]}
68
68
  >
package/src/Stepper.tsx CHANGED
@@ -49,8 +49,8 @@ export function Stepper({
49
49
  />
50
50
  <Text
51
51
  accessibilityLabel={valueLabel}
52
- className={cn("min-w-8 text-center font-instrument-sans-semibold", largerText ? "text-3xl" : "text-2xl")}
53
- style={[textStyle("foreground", scheme), typeStyle("semibold")]}
52
+ className={cn("min-w-8 text-center font-instrument-sans-medium", largerText ? "text-3xl" : "text-2xl")}
53
+ style={[textStyle("foreground", scheme), typeStyle("medium")]}
54
54
  >
55
55
  {value}
56
56
  </Text>
package/src/Toast.tsx CHANGED
@@ -183,8 +183,8 @@ function ToastCard({ item }: { item: ToastItem }) {
183
183
  className="rounded-full bg-secondary px-3 py-1.5 active:opacity-70"
184
184
  >
185
185
  <Text
186
- className="font-instrument-sans-semibold text-sm"
187
- style={[textStyle("foreground", scheme), typeStyle("semibold")]}
186
+ className="font-instrument-sans-medium text-sm"
187
+ style={[textStyle("foreground", scheme), typeStyle("medium")]}
188
188
  >
189
189
  {item.action.label}
190
190
  </Text>
@@ -156,7 +156,7 @@ function RecordRow({
156
156
  ) : mark === "other" ? (
157
157
  <IconPencil size={glyph} strokeWidth={3} color={markColor} />
158
158
  ) : (
159
- <Text className="font-instrument-sans-semibold" style={[{ fontSize: largerText ? 13 : 10, color: markColor }, typeStyle("semibold")]}>
159
+ <Text className="font-instrument-sans-medium" style={[{ fontSize: largerText ? 13 : 10, color: markColor }, typeStyle("medium")]}>
160
160
  {mark}
161
161
  </Text>
162
162
  )}
@@ -47,7 +47,7 @@ export function CardButton({ label, variant, onPress, disabled, accessibilityLab
47
47
  press.style,
48
48
  ]}
49
49
  >
50
- <Text className={cn(size, "font-instrument-sans-semibold")} style={[sizeStyle(size), typeStyle("semibold"), { color: colors.color }]}>
50
+ <Text className={cn(size, "font-instrument-sans-medium")} style={[sizeStyle(size), typeStyle("medium"), { color: colors.color }]}>
51
51
  {label}
52
52
  </Text>
53
53
  </AnimatedPressable>