@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.
- package/dist/AmbientBackground.jsx +16 -28
- package/dist/Avatar.jsx +2 -2
- package/dist/BottomSheetContainer.jsx +1 -1
- package/dist/BulkActionBar.jsx +1 -1
- package/dist/Card.jsx +4 -4
- package/dist/Chip.jsx +2 -2
- package/dist/DateTimeField.jsx +1 -1
- package/dist/Dialog.jsx +3 -3
- package/dist/DropdownMenu.jsx +3 -3
- package/dist/EmptyState.jsx +4 -4
- package/dist/FloatingTabBar.jsx +2 -2
- package/dist/LabeledSwitchRow.jsx +2 -2
- package/dist/ListRow.jsx +2 -2
- package/dist/PinnedBotTile.jsx +2 -2
- package/dist/StatGrid.jsx +1 -1
- package/dist/Stepper.jsx +2 -2
- package/dist/Toast.jsx +1 -1
- package/dist/ai/activity-question.jsx +2 -2
- package/dist/ai/card-button.jsx +2 -2
- package/dist/ai/choice-question.jsx +8 -8
- package/dist/ai/message-action-sheet.jsx +2 -2
- package/dist/ai/message-quote.jsx +2 -2
- package/dist/ai/message.jsx +2 -2
- package/dist/ai/reply-quote-chip.jsx +2 -2
- package/dist/ai/subagent-cards.jsx +6 -6
- package/dist/ai/tool-approval-card.jsx +1 -1
- package/dist/auth/AuthScreen.jsx +2 -2
- package/dist/examples/ParityGallery.jsx +2 -2
- package/dist/generative-ui/components.jsx +2 -2
- package/dist/marketing/UpgradeToProCard.jsx +2 -2
- package/dist/media/ImageGallery.jsx +2 -2
- package/dist/motion.js +3 -2
- package/dist/primitives/card.jsx +2 -2
- package/dist/primitives/text.jsx +13 -13
- package/dist/primitives/toast-drag-gesture.jsx +3 -2
- package/dist/settings/MoreFromProjectV.jsx +2 -2
- package/dist/settings/SettingsSection.jsx +1 -1
- package/dist/settings/ThemeModePicker.jsx +6 -6
- package/package.json +1 -1
- package/src/AmbientBackground.tsx +8 -26
- package/src/Avatar.tsx +2 -2
- package/src/BottomSheetContainer.tsx +1 -1
- package/src/BulkActionBar.tsx +2 -2
- package/src/Card.tsx +5 -5
- package/src/Chip.tsx +2 -2
- package/src/DateTimeField.tsx +2 -2
- package/src/Dialog.tsx +3 -3
- package/src/DropdownMenu.tsx +3 -3
- package/src/EmptyState.tsx +4 -4
- package/src/FloatingTabBar.tsx +2 -2
- package/src/LabeledSwitchRow.tsx +2 -2
- package/src/ListRow.tsx +2 -2
- package/src/PinnedBotTile.tsx +2 -2
- package/src/StatGrid.tsx +2 -2
- package/src/Stepper.tsx +2 -2
- package/src/Toast.tsx +2 -2
- package/src/ai/activity-question.tsx +1 -1
- package/src/ai/card-button.tsx +1 -1
- package/src/ai/choice-question.tsx +10 -10
- package/src/ai/message-action-sheet.tsx +2 -2
- package/src/ai/message-quote.tsx +2 -2
- package/src/ai/message.tsx +2 -2
- package/src/ai/reply-quote-chip.tsx +2 -2
- package/src/ai/subagent-cards.tsx +5 -5
- package/src/ai/tool-approval-card.tsx +4 -4
- package/src/auth/AuthScreen.tsx +2 -2
- package/src/examples/ParityGallery.tsx +2 -2
- package/src/generative-ui/components.tsx +3 -3
- package/src/marketing/UpgradeToProCard.tsx +2 -2
- package/src/media/ImageGallery.tsx +1 -1
- package/src/motion.ts +3 -2
- package/src/primitives/card.tsx +3 -3
- package/src/primitives/text.tsx +13 -13
- package/src/primitives/toast-drag-gesture.tsx +2 -2
- package/src/settings/MoreFromProjectV.tsx +2 -2
- package/src/settings/SettingsSection.tsx +3 -3
- 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-
|
|
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("
|
|
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-
|
|
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("
|
|
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-
|
|
241
|
+
}}><Text className="font-instrument-sans-medium text-xl" style={[{
|
|
242
242
|
color: tokens.color.white
|
|
243
|
-
}, typeStyle("
|
|
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:
|
|
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:
|
|
21
|
+
dampingRatio: 1,
|
|
22
|
+
overshootClamping: true,
|
|
22
23
|
reduceMotion: ReduceMotion.System
|
|
23
24
|
};
|
|
24
25
|
|
package/dist/primitives/card.jsx
CHANGED
|
@@ -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-
|
|
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("
|
|
109
|
+
t2 = typeStyle("medium");
|
|
110
110
|
$[6] = t2;
|
|
111
111
|
} else {
|
|
112
112
|
t2 = $[6];
|
package/dist/primitives/text.jsx
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
61
|
+
// titles; `h1` was `font-medium` before 0.3.13.
|
|
62
62
|
const WEIGHT = {
|
|
63
|
-
h1: typeStyle("
|
|
64
|
-
h2: typeStyle("
|
|
65
|
-
h3: typeStyle("
|
|
66
|
-
h4: typeStyle("
|
|
67
|
-
code: typeStyle("
|
|
68
|
-
large: typeStyle("
|
|
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:
|
|
11
|
+
/** Back home after a short drag: critically damped, no bounce. */
|
|
12
12
|
const HOME_SPRING = {
|
|
13
13
|
duration: 250,
|
|
14
|
-
dampingRatio:
|
|
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("
|
|
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-
|
|
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-
|
|
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, {
|
|
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
|
|
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
|
|
45
|
-
function
|
|
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%"
|
|
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 : <
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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-
|
|
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("
|
|
131
|
+
typeStyle("medium"),
|
|
132
132
|
]}
|
|
133
133
|
>
|
|
134
134
|
{children}
|
package/src/BulkActionBar.tsx
CHANGED
|
@@ -217,8 +217,8 @@ export function BulkActionBar({
|
|
|
217
217
|
}}
|
|
218
218
|
>
|
|
219
219
|
<Text
|
|
220
|
-
className="font-instrument-sans-
|
|
221
|
-
style={[metrics.caption, typeStyle("
|
|
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-
|
|
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("
|
|
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-
|
|
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-
|
|
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("
|
|
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-
|
|
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("
|
|
50
|
+
style={[selected ? null : textStyle("muted", scheme), typeStyle("medium")]}
|
|
51
51
|
>
|
|
52
52
|
{label}
|
|
53
53
|
</Text>
|
package/src/DateTimeField.tsx
CHANGED
|
@@ -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-
|
|
104
|
-
style={[textColor, typeStyle("
|
|
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-
|
|
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-
|
|
204
|
+
"font-instrument-sans-medium",
|
|
205
205
|
largerText ? "text-2xl" : "text-lg",
|
|
206
206
|
className,
|
|
207
207
|
)}
|
|
208
|
-
style={[textStyle("foreground", scheme), typeStyle("
|
|
208
|
+
style={[textStyle("foreground", scheme), typeStyle("medium"), style]}
|
|
209
209
|
{...props}
|
|
210
210
|
/>
|
|
211
211
|
);
|
package/src/DropdownMenu.tsx
CHANGED
|
@@ -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-
|
|
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-
|
|
637
|
+
className={cn("font-instrument-sans-medium uppercase", className)}
|
|
638
638
|
style={[
|
|
639
639
|
text,
|
|
640
|
-
typeStyle("
|
|
640
|
+
typeStyle("medium"),
|
|
641
641
|
{
|
|
642
642
|
letterSpacing: text.fontSize / 10,
|
|
643
643
|
color: tokens.color.muted[scheme],
|
package/src/EmptyState.tsx
CHANGED
|
@@ -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-
|
|
36
|
+
"mt-4 text-center font-instrument-sans-medium",
|
|
37
37
|
largerText ? "text-xl" : "text-lg",
|
|
38
38
|
)}
|
|
39
|
-
style={[textStyle("foreground", scheme), typeStyle("
|
|
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-
|
|
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("
|
|
130
|
+
style={[textStyle("foreground", scheme), typeStyle("medium"), style]}
|
|
131
131
|
{...props}
|
|
132
132
|
/>
|
|
133
133
|
);
|
package/src/FloatingTabBar.tsx
CHANGED
|
@@ -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-
|
|
199
|
-
style={[{ color }, typeStyle("
|
|
198
|
+
className={`font-instrument-sans-medium ${largerText ? "text-base" : "text-sm"}`}
|
|
199
|
+
style={[{ color }, typeStyle("medium")]}
|
|
200
200
|
>
|
|
201
201
|
{label}
|
|
202
202
|
</Text>
|
package/src/LabeledSwitchRow.tsx
CHANGED
|
@@ -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-
|
|
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("
|
|
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-
|
|
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("
|
|
70
|
+
style={[textStyle("foreground", scheme), typeStyle("medium")]}
|
|
71
71
|
>
|
|
72
72
|
{title}
|
|
73
73
|
</Text>
|
package/src/PinnedBotTile.tsx
CHANGED
|
@@ -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-
|
|
53
|
-
style={[textStyle("foreground", scheme), typeStyle("
|
|
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-
|
|
61
|
+
className={cn("font-instrument-sans-medium", valueSize)}
|
|
62
62
|
style={[
|
|
63
63
|
textStyle("foreground", scheme),
|
|
64
64
|
sizeStyle(valueSize, "tight"),
|
|
65
|
-
typeStyle("
|
|
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-
|
|
53
|
-
style={[textStyle("foreground", scheme), typeStyle("
|
|
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-
|
|
187
|
-
style={[textStyle("foreground", scheme), typeStyle("
|
|
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-
|
|
159
|
+
<Text className="font-instrument-sans-medium" style={[{ fontSize: largerText ? 13 : 10, color: markColor }, typeStyle("medium")]}>
|
|
160
160
|
{mark}
|
|
161
161
|
</Text>
|
|
162
162
|
)}
|
package/src/ai/card-button.tsx
CHANGED
|
@@ -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-
|
|
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>
|