@vvedantb/native-ui 0.37.0 → 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 +310 -154
- 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 +122 -25
- 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
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { StyleSheet, View } from "react-native";
|
|
3
3
|
import { cn } from "./cn";
|
|
4
|
-
import { loadLinearGradient } from "./gradient";
|
|
5
4
|
import { tokens } from "./tokens";
|
|
6
5
|
import { useScheme } from "./useScheme";
|
|
7
|
-
const LIGHT = ["#f6f6f7", "#fde8f0", "#f4f5f7"];
|
|
8
|
-
const DARK = ["#1c1c1e", "#2a1820", "#1a1a1c"];
|
|
9
6
|
|
|
10
|
-
/**
|
|
11
|
-
* A soft gradient behind the screen. Without the optional
|
|
12
|
-
* `expo-linear-gradient` peer it draws the solid `tokens.color.background`.
|
|
13
|
-
*/
|
|
7
|
+
/** A flat `tokens.color.background` layer behind the screen. */
|
|
14
8
|
export function AmbientBackground(t0) {
|
|
15
9
|
const $ = _c(13);
|
|
16
10
|
let children;
|
|
@@ -32,7 +26,6 @@ export function AmbientBackground(t0) {
|
|
|
32
26
|
props = $[3];
|
|
33
27
|
}
|
|
34
28
|
const scheme = useScheme();
|
|
35
|
-
const LinearGradient = loadLinearGradient()?.LinearGradient;
|
|
36
29
|
let t1;
|
|
37
30
|
if ($[4] !== className) {
|
|
38
31
|
t1 = cn("flex-1", className);
|
|
@@ -41,33 +34,28 @@ export function AmbientBackground(t0) {
|
|
|
41
34
|
} else {
|
|
42
35
|
t1 = $[5];
|
|
43
36
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
y: 0
|
|
49
|
-
}} end={{
|
|
50
|
-
x: 0.95,
|
|
51
|
-
y: 1
|
|
52
|
-
}} style={StyleSheet.absoluteFill} /> : <View pointerEvents="none" style={{
|
|
37
|
+
const t2 = tokens.color.background[scheme];
|
|
38
|
+
let t3;
|
|
39
|
+
if ($[6] !== t2) {
|
|
40
|
+
t3 = <View pointerEvents="none" style={{
|
|
53
41
|
...StyleSheet.absoluteFill,
|
|
54
|
-
backgroundColor:
|
|
42
|
+
backgroundColor: t2
|
|
55
43
|
}} />;
|
|
56
|
-
$[6] =
|
|
57
|
-
$[7] =
|
|
44
|
+
$[6] = t2;
|
|
45
|
+
$[7] = t3;
|
|
58
46
|
} else {
|
|
59
|
-
|
|
47
|
+
t3 = $[7];
|
|
60
48
|
}
|
|
61
|
-
let
|
|
62
|
-
if ($[8] !== children || $[9] !== props || $[10] !== t1 || $[11] !==
|
|
63
|
-
|
|
49
|
+
let t4;
|
|
50
|
+
if ($[8] !== children || $[9] !== props || $[10] !== t1 || $[11] !== t3) {
|
|
51
|
+
t4 = <View className={t1} {...props}>{t3}{children}</View>;
|
|
64
52
|
$[8] = children;
|
|
65
53
|
$[9] = props;
|
|
66
54
|
$[10] = t1;
|
|
67
|
-
$[11] =
|
|
68
|
-
$[12] =
|
|
55
|
+
$[11] = t3;
|
|
56
|
+
$[12] = t4;
|
|
69
57
|
} else {
|
|
70
|
-
|
|
58
|
+
t4 = $[12];
|
|
71
59
|
}
|
|
72
|
-
return
|
|
60
|
+
return t4;
|
|
73
61
|
}
|
package/dist/Avatar.jsx
CHANGED
|
@@ -258,10 +258,10 @@ export function AvatarFallback(t0) {
|
|
|
258
258
|
}
|
|
259
259
|
let t5;
|
|
260
260
|
if ($[13] !== children || $[14] !== scheme || $[15] !== size || $[16] !== textClassName) {
|
|
261
|
-
t5 = typeof children === "string" ? <Text numberOfLines={1} className={cn("font-instrument-sans-
|
|
261
|
+
t5 = typeof children === "string" ? <Text numberOfLines={1} className={cn("font-instrument-sans-medium", textClassName)} style={[{
|
|
262
262
|
fontSize: Math.round(size * 0.4),
|
|
263
263
|
color: palette.defaultForeground[scheme]
|
|
264
|
-
}, typeStyle("
|
|
264
|
+
}, typeStyle("medium")]}>{children}</Text> : children;
|
|
265
265
|
$[13] = children;
|
|
266
266
|
$[14] = scheme;
|
|
267
267
|
$[15] = size;
|
package/dist/BulkActionBar.jsx
CHANGED
|
@@ -246,7 +246,7 @@ export function BulkActionBar(t0) {
|
|
|
246
246
|
paddingHorizontal: 8,
|
|
247
247
|
paddingVertical: 2,
|
|
248
248
|
backgroundColor: tokens.color.surfaceSecondary[scheme]
|
|
249
|
-
}}><Text className="font-instrument-sans-
|
|
249
|
+
}}><Text className="font-instrument-sans-medium" style={[metrics.caption, typeStyle("medium"), {
|
|
250
250
|
fontVariant: ["tabular-nums"],
|
|
251
251
|
color: tokens.color.foreground[scheme]
|
|
252
252
|
}]}>{selectedCount}</Text></View>{labelled ? <Text className="font-instrument-sans-medium" style={[metrics.text, typeStyle("medium"), {
|
package/dist/Card.jsx
CHANGED
|
@@ -42,7 +42,7 @@ export function Card(t0) {
|
|
|
42
42
|
}
|
|
43
43
|
let t4;
|
|
44
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-
|
|
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
46
|
$[4] = Icon;
|
|
47
47
|
$[5] = accentColor;
|
|
48
48
|
$[6] = action;
|
|
@@ -146,7 +146,7 @@ export function CardHeader(t0) {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
* Web `font-
|
|
149
|
+
* Web `font-medium leading-none` at the inherited 16. The line height is
|
|
150
150
|
* `leading-tight` (20), not 16: below the face's ascent and descent, iOS and
|
|
151
151
|
* Android can clip the glyphs.
|
|
152
152
|
*/
|
|
@@ -175,7 +175,7 @@ export function CardTitle(t0) {
|
|
|
175
175
|
const size = largerText ? "text-2xl" : "text-base";
|
|
176
176
|
let t1;
|
|
177
177
|
if ($[4] !== className || $[5] !== size) {
|
|
178
|
-
t1 = cn("font-instrument-sans-
|
|
178
|
+
t1 = cn("font-instrument-sans-medium leading-tight", size, className);
|
|
179
179
|
$[4] = className;
|
|
180
180
|
$[5] = size;
|
|
181
181
|
$[6] = t1;
|
|
@@ -200,7 +200,7 @@ export function CardTitle(t0) {
|
|
|
200
200
|
}
|
|
201
201
|
let t4;
|
|
202
202
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
203
|
-
t4 = typeStyle("
|
|
203
|
+
t4 = typeStyle("medium");
|
|
204
204
|
$[11] = t4;
|
|
205
205
|
} else {
|
|
206
206
|
t4 = $[11];
|
package/dist/Chip.jsx
CHANGED
|
@@ -32,7 +32,7 @@ export function Chip(t0) {
|
|
|
32
32
|
const t4 = press.onPressOut;
|
|
33
33
|
const t5 = press.style;
|
|
34
34
|
const t6 = `items-center justify-center rounded-full border border-white/40 dark:border-white/10 ${size} ${selected ? "bg-pink-100 dark:bg-pink-900/40" : "bg-secondary"}`;
|
|
35
|
-
const t7 = `font-instrument-sans-
|
|
35
|
+
const t7 = `font-instrument-sans-medium ${largerText ? "text-xl" : "text-lg"} ${selected ? "text-pink-700 dark:text-pink-300" : ""}`;
|
|
36
36
|
let t8;
|
|
37
37
|
if ($[2] !== scheme || $[3] !== selected) {
|
|
38
38
|
t8 = selected ? null : textStyle("muted", scheme);
|
|
@@ -44,7 +44,7 @@ export function Chip(t0) {
|
|
|
44
44
|
}
|
|
45
45
|
let t9;
|
|
46
46
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
47
|
-
t9 = typeStyle("
|
|
47
|
+
t9 = typeStyle("medium");
|
|
48
48
|
$[5] = t9;
|
|
49
49
|
} else {
|
|
50
50
|
t9 = $[5];
|
package/dist/DateTimeField.jsx
CHANGED
|
@@ -141,7 +141,7 @@ export function DateTimeField(t0) {
|
|
|
141
141
|
if ($[20] !== buttons || $[21] !== largerText || $[22] !== scheme || $[23] !== testID || $[24] !== textColor) {
|
|
142
142
|
t10 = buttons.map(button_0 => <Pressable key={button_0.mode} testID={testID ? `${testID}-${button_0.mode}` : undefined} accessibilityRole="button" accessibilityLabel={button_0.label} onPress={() => setPicker(current => current === button_0.mode ? null : button_0.mode)} className={`${largerText ? "min-h-16" : "min-h-14"} flex-1 justify-center rounded-lg px-4 py-2 active:opacity-70`} style={{
|
|
143
143
|
backgroundColor: palette.default[scheme]
|
|
144
|
-
}}><Text className={`${largerText ? "text-xl" : "text-lg"} font-instrument-sans-
|
|
144
|
+
}}><Text className={`${largerText ? "text-xl" : "text-lg"} font-instrument-sans-medium`} style={[textColor, typeStyle("medium")]}>{button_0.label}</Text></Pressable>);
|
|
145
145
|
$[20] = buttons;
|
|
146
146
|
$[21] = largerText;
|
|
147
147
|
$[22] = scheme;
|
package/dist/Dialog.jsx
CHANGED
|
@@ -364,7 +364,7 @@ export function DialogHeader(t0) {
|
|
|
364
364
|
// Text colours are styles (`textStyle`), so they follow the colour scheme in
|
|
365
365
|
// apps whose `text-foreground` does not. Recolour with `style`, not `className`.
|
|
366
366
|
|
|
367
|
-
/** Web `text-lg font-
|
|
367
|
+
/** Web `text-lg font-medium`. */
|
|
368
368
|
export function DialogTitle(t0) {
|
|
369
369
|
const $ = _c(17);
|
|
370
370
|
let className;
|
|
@@ -390,7 +390,7 @@ export function DialogTitle(t0) {
|
|
|
390
390
|
const t1 = largerText ? "text-2xl" : "text-lg";
|
|
391
391
|
let t2;
|
|
392
392
|
if ($[4] !== className || $[5] !== t1) {
|
|
393
|
-
t2 = cn("font-instrument-sans-
|
|
393
|
+
t2 = cn("font-instrument-sans-medium", t1, className);
|
|
394
394
|
$[4] = className;
|
|
395
395
|
$[5] = t1;
|
|
396
396
|
$[6] = t2;
|
|
@@ -407,7 +407,7 @@ export function DialogTitle(t0) {
|
|
|
407
407
|
}
|
|
408
408
|
let t4;
|
|
409
409
|
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
410
|
-
t4 = typeStyle("
|
|
410
|
+
t4 = typeStyle("medium");
|
|
411
411
|
$[9] = t4;
|
|
412
412
|
} else {
|
|
413
413
|
t4 = $[9];
|