@vvedantb/native-ui 0.5.0 → 0.6.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.
package/README.md CHANGED
@@ -60,8 +60,8 @@ The root entry exports everything. It still imports `BottomSheetContainer` and `
60
60
  | --- | --- | --- |
61
61
  | `@vvedantb/native-ui/tab-bar` | `FloatingTabBar`, `FloatingTabBarProps`, `FLOATING_INSET`, `FLOATING_TAB_BAR_HEIGHT`, `FLOATING_TAB_BAR_HEIGHT_LARGE`, `tabBarReserve` | `expo-blur`, `expo-haptics` (loaders) |
62
62
  | `@vvedantb/native-ui/brand` | `AppMark`, `AppWordmark`, `GoogleMark` (from 0.3.15), `APP_ICONS`, `IconVibot` and the other `Icon*`, the SVG helpers (`APP_MARKS`, `appMarkSvg`, `appTileSvg` and the rest), `FAMILY_APPS`, `familyApp`, `V_PRO_APP_BENEFITS` | none |
63
- | `@vvedantb/native-ui/button` | `Button`, `ButtonProps`, `ButtonSize`, `ButtonVariant` | none |
64
- | `@vvedantb/native-ui/primitives` | `Button`, `Input`, `SearchInput`, `Textarea`, `Label`, `Select`, `Switch`, `LabeledSwitchRow`, `Checkbox`, `Card` and its parts, `Badge`, `StatusDot`, `Avatar`, `Separator`, `Progress`, `Spinner`, `Skeleton`, `EmptyState`, `ListRow`, `Chip`, `HeaderIconButton`, `ThemeToggle` (from 0.3.16), `Tabs`, `PillTabs`, `Dialog`, `AlertDialog`, `ConfirmDialog`, `Sheet`, `toast`, `Toaster`. From 0.5.0: `Text` and `TextClassContext` (only here, not on the root), `ColorSwatches`, `StatGrid`, `SectionLabel`, `SheetRow`, `PageIndicator`, `IconButton`, `CaptureButton`, and the `ListRowProps` and `CardProps` types | `expo-blur`, `expo-haptics` (loaders) |
63
+ | `@vvedantb/native-ui/button` | `Button`, `ButtonProps`, `ButtonShape` (0.6.0), `ButtonSize`, `ButtonVariant` | none |
64
+ | `@vvedantb/native-ui/primitives` | `Button`, `Input`, `SearchInput`, `Textarea`, `Label`, `Select`, `Switch`, `LabeledSwitchRow`, `Checkbox`, `Card` and its parts, `Badge`, `StatusDot`, `Avatar`, `Separator`, `Progress`, `Spinner`, `Skeleton`, `EmptyState`, `ListRow`, `Chip`, `HeaderIconButton`, `ThemeToggle` (from 0.3.16), `Tabs`, `PillTabs`, `Dialog`, `AlertDialog`, `ConfirmDialog`, `Sheet`, `toast`, `Toaster`. From 0.5.0: `Text` and `TextClassContext` (only here, not on the root), `ColorSwatches`, `StatGrid`, `SectionLabel`, `SheetRow`, `PageIndicator`, `IconButton`, `CaptureButton`, and the `ListRowProps` and `CardProps` types. From 0.6.0: the `ButtonShape` type | `expo-blur`, `expo-haptics` (loaders) |
65
65
  | `@vvedantb/native-ui/search-input` | `SearchInput`, `SearchInputProps` | none |
66
66
  | `@vvedantb/native-ui/page-title` | `PageTitle`, `PageHeader`, `PageTitleProps`, `PageHeaderProps` (from 0.3.13), `StackPageHeader`, `StackPageHeaderProps` (from 0.5.0; it brings the Tabler package for its chevron) | none |
67
67
  | `@vvedantb/native-ui/toast` | `toast`, `Toaster`, `ToastOptions`, `ToastVariant` | none (from 0.3.12) |
@@ -154,13 +154,13 @@ import { NativeUiProvider, Button, Card } from "@vvedantb/native-ui";
154
154
 
155
155
  **Switch the scheme through NativeWind only.** Call `useColorScheme().setColorScheme("dark"|"light")` (or use `ThemeToggle`). That updates `useScheme` and, with `darkMode: "class"`, the `<html>` class together. Do **not** toggle `document.documentElement.classList` (or a page-level CSS `.dark` rule) by hand while leaving NativeWind on light: the page background can go dark while every token-styled part stays on the light set. That dual-owner fault is an app bug, not a native-ui colour bug.
156
156
 
157
- `useLargerText()` steps type and tap targets up. Without it, `Button`, `Input`, `Textarea` and the `Select` trigger have the web sizes (`Button` 32 / 40 / 44 high, fields 40); with it they keep the larger 0.3.2 sizes. `accentColor` tints FABs, card icons and progress bars (checked checkboxes use the palette primary, as on the web). Surfaces use the tokens in `src/tokens.ts` for fill, radius (card 24, button 16, field 10, pill 999; rows 20) and spacing (16).
157
+ `useLargerText()` steps type and tap targets up. Without it, `Button`, `Input`, `Textarea` and the `Select` trigger have the web sizes (`Button` 32 / 40 / 44 high, fields 40); with it they keep the larger 0.3.2 sizes. `accentColor` tints FABs, card icons and progress bars (checked checkboxes use the palette primary, as on the web). Surfaces use the tokens in `src/tokens.ts` for fill, radius (card 24, field 10, pill 999; rows 20) and spacing (16). `Button` is a pill (999) by default, and 16 with `shape="rounded"`.
158
158
 
159
159
  ## Components (0.3.0)
160
160
 
161
161
  | Area | Exports |
162
162
  | --- | --- |
163
- | Actions and fields | `Button` (`default`/`primary`, `secondary`, `outline`, `destructive`, `ghost`, `link`, `tinted`; `sm`/`small`, `default`/`medium`, `lg`/`large`, `icon`), `IconButton` (0.5.0), `CaptureButton` (0.5.0), `Input`, `SearchInput` (0.3.9), `Textarea`, `Label`, `Select`, `Switch`, `Checkbox`, `LabeledSwitchRow`, `ColorSwatches` (0.5.0), `DateTimeField` (date-only, empty and clearable from 0.5.0) |
163
+ | Actions and fields | `Button` (`default`/`primary`, `secondary`, `outline`, `destructive`, `ghost`, `link`, `tinted`; `sm`/`small`, `default`/`medium`, `lg`/`large`, `icon`; `shape` `pill`/`rounded` from 0.6.0), `IconButton` (0.5.0), `CaptureButton` (0.5.0), `Input`, `SearchInput` (0.3.9), `Textarea`, `Label`, `Select`, `Switch`, `Checkbox`, `LabeledSwitchRow`, `ColorSwatches` (0.5.0), `DateTimeField` (date-only, empty and clearable from 0.5.0) |
164
164
  | Display | `Card` (+ `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter`; `onPress` from 0.5.0), `Badge`, `StatusDot` (`info` from 0.5.0), `Avatar` (+ `AvatarImage`, `AvatarFallback`, `initials()`), `Separator`, `Progress`, `Spinner`, `CenteredSpinner`, `Skeleton`, `EmptyState` (+ `EmptyState.Root` and parts), `ListRow` (`leading`, `titleEnd`, `control`, `onLongPress` from 0.5.0), `StatGrid` (0.5.0), `SectionLabel` (0.5.0), `Chip`, `Text` (0.5.0, `/primitives` only) |
165
165
  | Navigation | `Tabs` (+ `TabsList`, `TabsTrigger`, `TabsContent`), `PillTabs`, `PageIndicator` (0.5.0), `FloatingTabBar`, `FloatingFAB`, `HeaderIconButton`, `ThemeToggle` (0.3.16), `StackPageHeader` (0.5.0) |
166
166
  | Overlays | `Dialog`, `AlertDialog`, `ConfirmDialog`, `Sheet` (RN `Modal`, each with the web part names), `SheetRow` (0.5.0), `BottomSheetContainer` (`@gorhom/bottom-sheet`) |
@@ -168,6 +168,15 @@ import { NativeUiProvider, Button, Card } from "@vvedantb/native-ui";
168
168
  | Brand and upgrade | `APP_ICONS`, `IconVibot` and the other `Icon*`, `AppMark`, `AppWordmark`, `GoogleMark` (0.3.15), `FAMILY_APPS`, `V_PRO_APP_BENEFITS`, `UpgradeToProCard`, `PricingModal` |
169
169
  | Settings and layout | `PageTitle`, `PageHeader` (0.3.13), `SettingsSection`, `SettingsField`, `SettingsToggleRow`, `SettingsStack`, `ScreenContainer`, `SafeAreaContainer`, `FloatingSurface`, `AmbientBackground` |
170
170
 
171
+ **`Button` `shape` (0.6.0).** `Button` is a pill by default, as the web `Button` from `@vvedantb/ui` 0.31.0: `shape="pill"` is fully round (`tokens.radius.pill`, web `rounded-full`) for every variant and size, so `size="icon"` is a circle. `shape="rounded"` keeps the radius from before 0.6.0: 16 at every size (web `rounded-lg`). The web `rounded` is 14 (`rounded-md`) on `xs` and `icon-xs`; native has neither size. The radius is a style, so a `style` radius such as `style={{ borderRadius: 8 }}` wins over either shape; a `className` radius does not.
172
+
173
+ ```tsx
174
+ <Button>Save</Button> {/* pill */}
175
+ <Button shape="rounded">Save</Button> {/* radius 16, the 0.5.1 look */}
176
+ ```
177
+
178
+ Parts that render `Button` are pills too. As on the web: `AlertDialogAction`, `AlertDialogCancel` and so the `ConfirmDialog` buttons (also full width in the compact sheet), the `PricingModal` CTA, and in `/ai` `MessageAction`, `CodeBlockCopyButton` and `ConversationScrollButton`. `PromptInputSubmit` and `PromptInputButton` are pills as well, so they are circles at 32 and at 44 with larger text. The web keeps them `shape="rounded"`, but its 16 radius on their 32 size draws the same circle. `AlertDialogAction`, `AlertDialogCancel` and `PromptInputButton` pass `shape` on; `MessageAction`, `CodeBlockCopyButton`, `ConversationScrollButton` and `PromptInputSubmit` take no `shape` and stay round. Components that do not render `Button`, such as `IconButton`, `HeaderIconButton`, `CaptureButton`, `UpgradeToProCard`, inputs, cards, dialogs and sheets, keep their radius.
179
+
171
180
  Overlays hold their own open state, or take `open` and `onOpenChange`:
172
181
 
173
182
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vvedantb/native-ui",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
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 and the family app marks.",
6
6
  "type": "module",
package/src/Button.tsx CHANGED
@@ -16,9 +16,12 @@ import { useScheme } from "./useScheme";
16
16
  /** `sm`, `default` and `lg` are the web names for `small`, `medium` and `large`. `icon` is a square button. */
17
17
  type ButtonSize = "small" | "medium" | "large" | "sm" | "default" | "lg" | "icon";
18
18
 
19
+ /** The web `shape`. `"pill"` (default) is fully round; `"rounded"` is radius 16, the look before 0.6.0. */
20
+ type ButtonShape = "pill" | "rounded";
21
+
19
22
  interface ButtonProps extends Omit<
20
23
  React.ComponentPropsWithoutRef<typeof PrimitiveButton>,
21
- "variant" | "size" | "children" | "onPress"
24
+ "variant" | "size" | "shape" | "children" | "onPress"
22
25
  > {
23
26
  onPress?: () => void;
24
27
  variant?: ButtonVariant;
@@ -30,6 +33,13 @@ interface ButtonProps extends Omit<
30
33
  endContent?: React.ReactNode;
31
34
  loading?: boolean;
32
35
  size?: ButtonSize;
36
+ /**
37
+ * Default `"pill"`: fully round at every size and variant, so `icon` is a
38
+ * circle (web `rounded-full`). `"rounded"`: radius 16 at every size, the
39
+ * look before 0.6.0 (web `shape="rounded"`, `rounded-lg`). A `style`
40
+ * radius wins over either.
41
+ */
42
+ shape?: ButtonShape;
33
43
  /**
34
44
  * Default `true`. In the stacked footer of a compact dialog the button fills
35
45
  * the width whatever this says, as on the web.
@@ -84,8 +94,16 @@ const HIT_SLOP = {
84
94
  larger: { small: 8, medium: undefined, large: undefined, icon: 8 },
85
95
  };
86
96
 
87
- /** Web `rounded-lg` (`--radius`, 16). A style, because apps' NativeWind themes set their own `rounded-lg`. */
88
- const RADIUS = tokens.radius.lg;
97
+ // The web `shape` (from @vvedantb/ui 0.31.0). `pill` is `rounded-full`:
98
+ // `tokens.radius.pill` (999), far more than half the tallest minimum height
99
+ // (72), so the ends are half circles. `rounded` is `rounded-lg` (`--radius`, 16). The web
100
+ // `rounded` is `rounded-md` on `xs` and `icon-xs`, sizes native does not have,
101
+ // so here it is 16 at every size. Styles, because apps' NativeWind themes set
102
+ // their own `rounded-lg`.
103
+ const RADIUS: Record<ButtonShape, number> = {
104
+ pill: tokens.radius.pill,
105
+ rounded: tokens.radius.lg,
106
+ };
89
107
 
90
108
  // Colours come from `buttonColors` as styles, except `tinted`, which keeps
91
109
  // the pink classes that `outline` used before 0.3.0.
@@ -110,7 +128,7 @@ const PRIMITIVE_VARIANT = {
110
128
  tinted: "secondary",
111
129
  } as const;
112
130
 
113
- export type { ButtonProps, ButtonSize, ButtonVariant };
131
+ export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant };
114
132
 
115
133
  export function Button({
116
134
  onPress,
@@ -121,6 +139,7 @@ export function Button({
121
139
  endContent,
122
140
  loading,
123
141
  size = "medium",
142
+ shape = "pill",
124
143
  fullWidth = true,
125
144
  children,
126
145
  shadowType = "flat",
@@ -136,7 +155,7 @@ export function Button({
136
155
  const elevate =
137
156
  shadowType === "shadow" && (variant === "primary" || variant === "default");
138
157
  const baseStyle = [
139
- { borderRadius: RADIUS },
158
+ { borderRadius: RADIUS[shape] },
140
159
  elevate ? floatingShadow : null,
141
160
  colors
142
161
  ? { backgroundColor: colors.backgroundColor, borderColor: colors.borderColor }
@@ -159,6 +178,7 @@ export function Button({
159
178
  <PrimitiveButton
160
179
  onPress={onPress}
161
180
  variant={PRIMITIVE_VARIANT[variant]}
181
+ shape={shape}
162
182
  hitSlop={HIT_SLOP[scale][resolvedSize]}
163
183
  accessibilityRole="button"
164
184
  className={cn(
@@ -22,6 +22,7 @@ export type ChatIconButtonProps = Omit<ButtonProps, "children" | "size" | "icon"
22
22
  * A round `Button` at the web `icon-sm` size (32), with the slop to 44. With
23
23
  * larger text it is painted 44 with a 20 icon. The message
24
24
  * actions, the composer tools and its send button, and the code copy button.
25
+ * Round from the `Button` pill default; `shape="rounded"` gives radius 16.
25
26
  */
26
27
  export function ChatIconButton({
27
28
  icon: Icon,
@@ -42,7 +43,6 @@ export function ChatIconButton({
42
43
  accessibilityLabel={label}
43
44
  hitSlop={touchSlop(size)}
44
45
  className={cn(largerText ? "h-11 w-11" : "h-8 w-8", className)}
45
- style={{ borderRadius: size / 2 }}
46
46
  {...props}
47
47
  >
48
48
  <Icon size={largerText ? 20 : 16} color={color} />
@@ -27,6 +27,11 @@ export type PromptInputSubmitProps = {
27
27
  testID?: string;
28
28
  };
29
29
 
30
+ // The web `PromptInputSubmit` and `PromptInputButton` keep `shape="rounded"`
31
+ // (`rounded-lg`, 16) as field addons. At the 32 `icon-sm` size 16 is half the
32
+ // side, so the web draws a circle. These stay pills: the same circle at 32, and
33
+ // still a circle at 44 with larger text, where 16 would draw a rounded square.
34
+
30
35
  /**
31
36
  * Send, or stop while the AI answers: the web `default` `icon-sm` button
32
37
  * (32, round, slop to 44). Send is an up arrow on the primary fill, and the
@@ -101,3 +101,5 @@ export const IconVmem = APP_ICONS.vmem;
101
101
  export const IconVerve = APP_ICONS.verve;
102
102
  export const IconVelth = APP_ICONS.velth;
103
103
  export const IconProjectV = APP_ICONS.projectv;
104
+ export const IconEva = APP_ICONS.eva;
105
+ export const IconBee = APP_ICONS.bee;
@@ -6,8 +6,8 @@ import { useScheme } from "../useScheme";
6
6
  import { APP_ICONS } from "./AppIcons";
7
7
  import type { AppName } from "./svg";
8
8
 
9
- /** The five product apps. `projectv` keeps its Michroma wordmark and never uses `AppWordmark`. */
10
- export type ProductAppName = Exclude<AppName, "projectv">;
9
+ /** The five product apps. `projectv` keeps its Michroma wordmark and never uses `AppWordmark`. `eva` and `bee` are icons only. */
10
+ export type ProductAppName = Exclude<AppName, "projectv" | "eva" | "bee">;
11
11
 
12
12
  export type AppWordmarkProps = {
13
13
  /** Which product app's name to show. The label is always the lowercase app id. */
@@ -1,7 +1,10 @@
1
1
  import type { AppName } from "./svg";
2
2
 
3
+ /** Apps in the Project V family. `eva` and `bee` have marks and icons but are not family apps. */
4
+ export type FamilyAppName = Exclude<AppName, "eva" | "bee">;
5
+
3
6
  export type FamilyApp = {
4
- app: AppName;
7
+ app: FamilyAppName;
5
8
  /** Display name. */
6
9
  name: string;
7
10
  /** Home page of the app. */
@@ -19,6 +22,6 @@ export const FAMILY_APPS: readonly FamilyApp[] = [
19
22
  ];
20
23
 
21
24
  /** Entry of `FAMILY_APPS` for an app. */
22
- export function familyApp(app: AppName): FamilyApp {
25
+ export function familyApp(app: FamilyAppName): FamilyApp {
23
26
  return FAMILY_APPS.find((entry) => entry.app === app)!;
24
27
  }
@@ -1,7 +1,7 @@
1
1
  // `svg.ts`, `familyApps.ts` and `vProAppBenefits.ts` are byte-identical copies of
2
2
  // `@vvedantb/ui` `src/brand/` (pure data, no imports beyond each other). A test
3
3
  // in this package fails when they differ: change both together.
4
- export { APP_ICONS, IconProjectV, IconVelth, IconVerve, IconVhub, IconVibot, IconVmem } from "./AppIcons";
4
+ export { APP_ICONS, IconBee, IconEva, IconProjectV, IconVelth, IconVerve, IconVhub, IconVibot, IconVmem } from "./AppIcons";
5
5
  export type { AppIconComponent, AppIconProps } from "./AppIcons";
6
6
  export { AppMark } from "./AppMark";
7
7
  export type { AppMarkProps } from "./AppMark";
@@ -31,6 +31,6 @@ export {
31
31
  } from "./svg";
32
32
  export type { AppMarkVariant, AppName, MarkShape } from "./svg";
33
33
  export { FAMILY_APPS, familyApp } from "./familyApps";
34
- export type { FamilyApp } from "./familyApps";
34
+ export type { FamilyApp, FamilyAppName } from "./familyApps";
35
35
  export { V_PRO_APP_BENEFITS } from "./vProAppBenefits";
36
36
  export type { PricingPlanAppBenefit } from "./vProAppBenefits";
package/src/brand/svg.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  // Geometry and raw SVG strings for the family app marks. No imports, so the
2
2
  // asset script can load this file directly with Node.
3
3
 
4
- export const APP_NAMES = ["projectv", "vibot", "vhub", "vmem", "verve", "velth"] as const;
4
+ /** Every mark. `eva` and `bee` are marks and icons only: they are not family apps, so `FAMILY_APPS` leaves them out. */
5
+ export const APP_NAMES = ["projectv", "vibot", "vhub", "vmem", "verve", "velth", "eva", "bee"] as const;
5
6
 
6
7
  export type AppName = (typeof APP_NAMES)[number];
7
8
 
@@ -36,7 +37,9 @@ export function markLinecap(app: AppName): "butt" | "round" {
36
37
  /**
37
38
  * Glyphs sized by one rule: longest side = 512 * min(1.2, aspect^0.25), centred halfway between
38
39
  * the bounding-box centre and the centre of mass. `verve` and `velth` are the final vectors.
39
- * The others are traced from the approved 1024px renders.
40
+ * `vibot`, `vhub`, `vmem` and `projectv` are traced from the approved 1024px renders. `eva` (option A,
41
+ * a filled four-point star) and `bee` (option D, an orb with eyes, stripes and antennae) are the final
42
+ * vectors from their design sheet, as drawn there.
40
43
  */
41
44
  export const APP_MARKS: Record<AppName, MarkShape> = {
42
45
  projectv: {
@@ -77,6 +80,22 @@ export const APP_MARKS: Record<AppName, MarkShape> = {
77
80
  "M512 732.3C644.2 652.1 734.3 471.9 724.3 301.6C604.1 371.7 524 552 512 732.3Z",
78
81
  ],
79
82
  },
83
+ eva: {
84
+ kind: "fill",
85
+ paths: ["M242.9 512Q485.1 485.1 512 278.8Q538.9 485.1 781 512Q538.9 538.9 512 745.1Q485.1 538.9 242.9 512Z"],
86
+ },
87
+ bee: {
88
+ kind: "stroke",
89
+ paths: [
90
+ "M304 530.7A208.1 208.1 0 1 1 720.1 530.7A208.1 208.1 0 1 1 304 530.7",
91
+ "M447.5 414.2L447.5 445.4",
92
+ "M576.5 414.2L576.5 445.4",
93
+ "M306.3 561.9L717.7 561.9",
94
+ "M344 653.4L680 653.4",
95
+ "M468.3 341.4Q455.8 291.4 420.5 260.2",
96
+ "M555.7 341.4Q568.2 291.4 603.5 260.2",
97
+ ],
98
+ },
80
99
  };
81
100
 
82
101
  type Point = [number, number];
@@ -180,6 +199,7 @@ export function markBBox(app: AppName): Box {
180
199
  * (x 186 to 789, y 259.96 to 761.7) at side max(width, height) x 1.04 (about 4% padding), rounded outward.
181
200
  * All five use this side, so glyph scale stays equal. Only the size is shared: each app has its own origin in
182
201
  * `APP_MARK_VIEWBOX`. `projectv` is left out so its wide brand mark does not shrink the app glyphs.
202
+ * Historical: this union covers those five only. `eva` and `bee` reuse the 629 side but are not part of it.
183
203
  */
184
204
  export const APP_MARK_CROP_VIEWBOX = "173 197 629 629";
185
205
 
@@ -190,9 +210,9 @@ export const APP_MARK_CROP_VIEWBOX = "173 197 629 629";
190
210
  export const PROJECTV_MARK_VIEWBOX = "171.5 181 687 687";
191
211
 
192
212
  /**
193
- * Plain-mark viewBox per app. Always square. The five apps keep one 629 side (equal scale), and each origin is
194
- * `markBBox(app)` centre minus 314.5 on both axes, so every glyph sits centred in its own frame. `projectv` uses
195
- * its 687 frame, centre minus 343.5. Hardcoded; checked against `markBBox` in tests.
213
+ * Plain-mark viewBox per app. Always square. Every mark except `projectv` keeps one 629 side (equal scale), and each
214
+ * origin is `markBBox(app)` centre minus 314.5 on both axes, so every glyph sits centred in its own frame. `projectv`
215
+ * uses its 687 frame, centre minus 343.5. Hardcoded; checked against `markBBox` in tests.
196
216
  */
197
217
  export const APP_MARK_VIEWBOX: Record<AppName, string> = {
198
218
  projectv: PROJECTV_MARK_VIEWBOX,
@@ -201,6 +221,8 @@ export const APP_MARK_VIEWBOX: Record<AppName, string> = {
201
221
  vmem: "197.24772201231343 196.33100022273135 629 629",
202
222
  verve: "197.5 210.9 629 629",
203
223
  velth: "197.5 202.45 629 629",
224
+ eva: "197.45 197.45 629 629",
225
+ bee: "197.55 187.2807619340906 629 629",
204
226
  };
205
227
 
206
228
  /**
@@ -215,6 +237,8 @@ export const APP_MARK_VIEWBOX_START: Record<AppName, string> = {
215
237
  vmem: "255.5301217210191 196.33100022273135 629 629",
216
238
  verve: "260.4 210.9 629 629",
217
239
  velth: "273.9433593555699 202.45 629 629",
240
+ eva: "242.9 197.45 629 629",
241
+ bee: "278.94999999999993 187.2807619340906 629 629",
218
242
  };
219
243
 
220
244
  /** Width over height of a mark's viewBox. Always about 1, because the viewBoxes are square. Kept for API stability; do not use it for sizing. */
@@ -2,7 +2,7 @@ import type { AppName } from "./svg";
2
2
 
3
3
  /** Benefits for one app, shown under that app's icon and name. */
4
4
  export type PricingPlanAppBenefit = {
5
- app: Exclude<AppName, "projectv">;
5
+ app: Exclude<AppName, "projectv" | "eva" | "bee">;
6
6
  items: readonly string[];
7
7
  };
8
8
 
@@ -1,3 +1,3 @@
1
1
  // `@vvedantb/native-ui/button`.
2
2
  export { Button } from "../Button";
3
- export type { ButtonProps, ButtonSize, ButtonVariant } from "../Button";
3
+ export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant } from "../Button";
@@ -4,7 +4,7 @@
4
4
  // `primitives/text` variants (from 0.5.0); they are not on the root entry.
5
5
  export { Text, TextClassContext } from "../primitives/text";
6
6
  export { Button } from "../Button";
7
- export type { ButtonProps, ButtonSize, ButtonVariant } from "../Button";
7
+ export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant } from "../Button";
8
8
  export { Input } from "../Input";
9
9
  export type { InputProps } from "../Input";
10
10
  export { SearchInput } from "../SearchInput";
@@ -294,6 +294,27 @@ function GalleryScreen() {
294
294
  <Button size="lg" fullWidth={false}>
295
295
  Large
296
296
  </Button>
297
+ <Button size="icon" variant="outline" accessibilityLabel="Copy" onPress={() => toast("Copied")}>
298
+ <IconCopy size={16} color={tokens.color.foreground[scheme]} />
299
+ </Button>
300
+ </View>
301
+ {/* Pills by default, as on the web. `shape="rounded"` keeps radius 16, the look before 0.6.0. */}
302
+ <View className="flex-row flex-wrap items-center gap-2">
303
+ <Button shape="rounded" size="sm" fullWidth={false}>
304
+ Rounded
305
+ </Button>
306
+ <Button shape="rounded" variant="secondary" fullWidth={false}>
307
+ Rounded
308
+ </Button>
309
+ <Button
310
+ shape="rounded"
311
+ size="icon"
312
+ variant="outline"
313
+ accessibilityLabel="Copy"
314
+ onPress={() => toast("Copied")}
315
+ >
316
+ <IconCopy size={16} color={tokens.color.foreground[scheme]} />
317
+ </Button>
297
318
  </View>
298
319
  </Section>
299
320
 
package/src/index.ts CHANGED
@@ -38,7 +38,7 @@ export { FloatingTabBar } from "./FloatingTabBar";
38
38
  export type { FloatingTabBarProps } from "./FloatingTabBar";
39
39
  export { FloatingFAB } from "./FloatingFAB";
40
40
  export { Button } from "./Button";
41
- export type { ButtonProps, ButtonSize, ButtonVariant } from "./Button";
41
+ export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant } from "./Button";
42
42
  export { Input } from "./Input";
43
43
  export type { InputProps } from "./Input";
44
44
  export { SearchInput } from "./SearchInput";
@@ -11,7 +11,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
11
11
  import { IconCheck, IconX } from "@tabler/icons-react-native";
12
12
  import { APP_ICONS, IconProjectV } from "../brand/AppIcons";
13
13
  import type { ProductAppName } from "../brand/AppWordmark";
14
- import { familyApp } from "../brand/familyApps";
14
+ import { familyApp, type FamilyAppName } from "../brand/familyApps";
15
15
  import type { AppName } from "../brand/svg";
16
16
  import { Button } from "../Button";
17
17
  import { cn } from "../cn";
@@ -41,8 +41,8 @@ export type PricingModalProps = {
41
41
  description?: string;
42
42
  /** Cards, top to bottom. */
43
43
  plans: readonly PricingPlan[];
44
- /** App marks at the top left. */
45
- apps?: readonly AppName[];
44
+ /** App marks at the top left. Family apps only: each links to its `FAMILY_APPS` site. */
45
+ apps?: readonly FamilyAppName[];
46
46
  /** App the modal is shown in. Its `appBenefits` group comes first. */
47
47
  currentApp?: ProductAppName;
48
48
  /** Centred headline, for example "One plan. Every V app." */
@@ -6,7 +6,7 @@ import { Platform, Pressable } from "react-native";
6
6
 
7
7
  const buttonVariants = cva(
8
8
  cn(
9
- "group flex-row items-center justify-center gap-2 rounded-lg shadow-none active:opacity-80",
9
+ "group flex-row items-center justify-center gap-2 shadow-none active:opacity-80",
10
10
  Platform.select({
11
11
  web: "outline-none transition-all",
12
12
  }),
@@ -39,10 +39,17 @@ const buttonVariants = cva(
39
39
  lg: "h-11 px-6",
40
40
  icon: "h-10 w-10",
41
41
  },
42
+ // The web `shape`: `pill` (default) is fully round, `rounded` the radius
43
+ // before 0.6.0. `Button` also sets the radius as a style, which wins.
44
+ shape: {
45
+ pill: "rounded-full",
46
+ rounded: "rounded-lg",
47
+ },
42
48
  },
43
49
  defaultVariants: {
44
50
  variant: "default",
45
51
  size: "default",
52
+ shape: "pill",
46
53
  },
47
54
  },
48
55
  );
@@ -80,13 +87,13 @@ type ButtonProps = React.ComponentPropsWithoutRef<typeof Pressable> &
80
87
  const Button = React.forwardRef<
81
88
  React.ElementRef<typeof Pressable>,
82
89
  ButtonProps
83
- >(({ className, variant, size, ...props }, ref) => {
90
+ >(({ className, variant, size, shape, ...props }, ref) => {
84
91
  return (
85
92
  <TextClassContext.Provider value={buttonTextVariants({ variant, size })}>
86
93
  <Pressable
87
94
  ref={ref}
88
95
  className={cn(
89
- buttonVariants({ variant, size }),
96
+ buttonVariants({ variant, size, shape }),
90
97
  props.disabled && "opacity-45",
91
98
  className,
92
99
  )}