@photon-ai/pho-ui 1.3.0 → 1.5.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/dist/chunks/IconArrowUpRight-DGgKzQwV.js +14 -0
- package/dist/chunks/IconArrowUpRight-DGgKzQwV.js.map +1 -0
- package/dist/chunks/IconChevronLeft-CSWMKQ4C.js +11 -0
- package/dist/chunks/IconChevronLeft-CSWMKQ4C.js.map +1 -0
- package/dist/chunks/basic-page-awtvmT-6.js +270 -0
- package/dist/chunks/basic-page-awtvmT-6.js.map +1 -0
- package/dist/chunks/combobox-rLdS6fl-.js +117 -0
- package/dist/chunks/combobox-rLdS6fl-.js.map +1 -0
- package/dist/chunks/dialog--PQoodig.js +247 -0
- package/dist/chunks/dialog--PQoodig.js.map +1 -0
- package/dist/chunks/{sidebar-DGpEKxOn.js → sidebar-DLYTxo2j.js} +72 -64
- package/dist/chunks/sidebar-DLYTxo2j.js.map +1 -0
- package/dist/chunks/status-view-CcbctPqR.js +65 -0
- package/dist/chunks/status-view-CcbctPqR.js.map +1 -0
- package/dist/components/combobox.js +2 -114
- package/dist/components/command.js +278 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/phone-input.js +16982 -0
- package/dist/components/phone-input.js.map +1 -0
- package/dist/components/status-view.js +8 -0
- package/dist/index.js +52 -44
- package/dist/sections/basic-page.js +7 -4
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/command/command.d.ts +114 -0
- package/dist/src/components/command/index.d.ts +1 -0
- package/dist/src/components/dialog/dialog.d.ts +81 -1
- package/dist/src/components/phone-input/country-alpha3.d.ts +250 -0
- package/dist/src/components/phone-input/country-search.d.ts +8 -0
- package/dist/src/components/phone-input/index.d.ts +1 -0
- package/dist/src/components/phone-input/phone-input.d.ts +41 -0
- package/dist/src/components/status-view/index.d.ts +1 -0
- package/dist/src/components/status-view/status-view.d.ts +74 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/sections/basic-page/basic-page.d.ts +70 -2
- package/dist/src/sections/basic-page/index.d.ts +1 -1
- package/dist/src/sections/sidebar/sidebar.d.ts +8 -3
- package/dist/src/utils/animated-height.d.ts +10 -0
- package/package.json +16 -1
- package/dist/chunks/basic-page-C50WUzYV.js +0 -238
- package/dist/chunks/basic-page-C50WUzYV.js.map +0 -1
- package/dist/chunks/dialog-Ba0UUE5g.js +0 -155
- package/dist/chunks/dialog-Ba0UUE5g.js.map +0 -1
- package/dist/chunks/sidebar-DGpEKxOn.js.map +0 -1
- package/dist/components/combobox.js.map +0 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Hugs its content (`w-fit`) and centers itself in the host (`mx-auto`); text
|
|
4
|
+
* stays start-aligned so the icon / title / description share one left edge.
|
|
5
|
+
* `max-w-lg` only caps long prose at Dialog width before it wraps.
|
|
6
|
+
*/
|
|
7
|
+
export declare const STATUS_VIEW = "mx-auto flex w-fit max-w-lg min-w-0 flex-col items-start justify-center text-left";
|
|
8
|
+
/** Title + description group — flex column; gap comes from the size axis. */
|
|
9
|
+
export declare const STATUS_VIEW_COPY = "flex flex-col";
|
|
10
|
+
/**
|
|
11
|
+
* Size axis — retunes every slot. Title + description share Dialog's
|
|
12
|
+
* `font-display` ladder: `base` matches Dialog (`gap-1`); `sm` steps one rung
|
|
13
|
+
* down (`gap-0`) for cards and panels.
|
|
14
|
+
*/
|
|
15
|
+
export declare const STATUS_VIEW_SIZES: {
|
|
16
|
+
sm: {
|
|
17
|
+
description: string;
|
|
18
|
+
classes: {
|
|
19
|
+
root: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
copy: string;
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
actions: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
base: {
|
|
28
|
+
description: string;
|
|
29
|
+
classes: {
|
|
30
|
+
root: string;
|
|
31
|
+
icon: string;
|
|
32
|
+
copy: string;
|
|
33
|
+
title: string;
|
|
34
|
+
description: string;
|
|
35
|
+
actions: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type StatusViewSize = keyof typeof STATUS_VIEW_SIZES;
|
|
40
|
+
interface StatusViewBaseProps {
|
|
41
|
+
/** Decorative glyph above the title, usually a Tabler icon. Sized by the view (`*:size-*`), inked `text-pho-secondary`. */
|
|
42
|
+
icon?: ReactNode;
|
|
43
|
+
/** One short line naming the state ("No API keys yet", "Page not found"). */
|
|
44
|
+
title: ReactNode;
|
|
45
|
+
/** Supporting prose — what it means or what to do next. */
|
|
46
|
+
description?: ReactNode;
|
|
47
|
+
/** Optional action row (buttons / links). Empty states usually omit it. */
|
|
48
|
+
actions?: ReactNode;
|
|
49
|
+
/** Size variant. @default "base" */
|
|
50
|
+
size?: StatusViewSize;
|
|
51
|
+
}
|
|
52
|
+
export interface StatusViewProps extends StatusViewBaseProps, Omit<ComponentProps<"div">, keyof StatusViewBaseProps | "children"> {
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* StatusView — the standing-in view for a region with nothing to show or
|
|
56
|
+
* nothing that worked: icon over title over description, with an optional
|
|
57
|
+
* action row. The block shrink-wraps and centers itself while its text stays
|
|
58
|
+
* left-aligned; the host owns the footprint (a card body, or a `min-h-screen`
|
|
59
|
+
* flex-centered page). Use `size="sm"` inside cards, the default `base` for
|
|
60
|
+
* whole pages.
|
|
61
|
+
*
|
|
62
|
+
* Empty and error states share this one component — they differ only in what
|
|
63
|
+
* you pass:
|
|
64
|
+
*
|
|
65
|
+
* - **Empty** — usually no `icon` and no `actions`; the create affordance
|
|
66
|
+
* lives elsewhere on the page.
|
|
67
|
+
* - **Error** — pass a warning `icon`, `role="alert"` so it announces, and
|
|
68
|
+
* `actions` offering a way out (retry, reload, a route back).
|
|
69
|
+
*/
|
|
70
|
+
export declare function StatusView({ icon, title, description, actions, size, className, ...props }: StatusViewProps): import("react").JSX.Element;
|
|
71
|
+
export declare namespace StatusView {
|
|
72
|
+
var displayName: string;
|
|
73
|
+
}
|
|
74
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -11,5 +11,6 @@ export * from './components/input';
|
|
|
11
11
|
export * from './components/input-group';
|
|
12
12
|
export * from './components/card';
|
|
13
13
|
export * from './components/dialog';
|
|
14
|
+
export * from './components/status-view';
|
|
14
15
|
export * from './sections/sidebar';
|
|
15
16
|
export * from './sections/basic-page';
|
|
@@ -30,6 +30,29 @@ export declare const BASIC_PAGE_CALLOUT = "flex flex-col gap-3 rounded-base bord
|
|
|
30
30
|
* than a comfortable touch target.
|
|
31
31
|
*/
|
|
32
32
|
export declare const BASIC_PAGE_ROW = "flex min-h-[4.25rem] flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6";
|
|
33
|
+
/**
|
|
34
|
+
* One card row that can host subviews. Same padding rhythm as a plain row —
|
|
35
|
+
* an optional trailing `ItemPanel` breaks out of it on its own.
|
|
36
|
+
*/
|
|
37
|
+
export declare const BASIC_PAGE_ITEM = "flex flex-col gap-3 px-5 py-4";
|
|
38
|
+
/**
|
|
39
|
+
* Secondary strip closing an `Item` that is last in its card. Negative
|
|
40
|
+
* margins escape the item's `px-5 pb-4` so the gray sheet runs edge-to-edge
|
|
41
|
+
* and owns the row's bottom padding. The body above stays square and the
|
|
42
|
+
* sheet's top is flush against it; only the bottom rounds, nesting into the
|
|
43
|
+
* card's 12px corner (11px inside the 1px border). Content lands back on the
|
|
44
|
+
* item's left gutter.
|
|
45
|
+
*/
|
|
46
|
+
export declare const BASIC_PAGE_ITEM_PANEL = "-mx-5 -mb-4 flex items-center rounded-b-[calc(0.75rem-1px)] bg-pho-secondary py-1 pr-3 pl-5";
|
|
47
|
+
/**
|
|
48
|
+
* Mid-list variant — the full-bleed sheet only reads well against the card's
|
|
49
|
+
* bottom corner, so when later rows follow, the panel becomes an inset chip
|
|
50
|
+
* instead: fully rounded at the small-control radius, overhanging the text
|
|
51
|
+
* gutter by 8px per side (content stays aligned with the body above), and
|
|
52
|
+
* leaving the row's own bottom padding and the card's hairline divider alone.
|
|
53
|
+
* `-mt-1.5` collapses the item's `gap-3` (12px) to an effective `gap-1.5` (6px).
|
|
54
|
+
*/
|
|
55
|
+
export declare const BASIC_PAGE_ITEM_PANEL_DIVIDED = "-mx-2 -mt-1.5 flex items-center rounded-sm bg-pho-secondary px-2 py-0.5";
|
|
33
56
|
/**
|
|
34
57
|
* Page chrome — centered column at the standard content width. Hosts
|
|
35
58
|
* `Title` + `Stack` (and any route-level siblings). Prefer this over
|
|
@@ -92,13 +115,56 @@ declare function SectionFooter({ className, ...props }: ComponentProps<"p"> & {
|
|
|
92
115
|
declare function Card({ className, ...props }: ComponentProps<"div"> & {
|
|
93
116
|
ref?: Ref<HTMLDivElement>;
|
|
94
117
|
}): import("react").JSX.Element;
|
|
118
|
+
/**
|
|
119
|
+
* One card row that can host subviews. Padding matches a plain row, so use it
|
|
120
|
+
* for any row that may grow an `ItemPanel` — primary content goes straight in
|
|
121
|
+
* as children; the panel, when present, is the last child.
|
|
122
|
+
*
|
|
123
|
+
* ```tsx
|
|
124
|
+
* <BasicPage.Card>
|
|
125
|
+
* <BasicPage.Item>
|
|
126
|
+
* …name, meta, actions…
|
|
127
|
+
* <BasicPage.ItemPanel divided>…secret / expanded content…</BasicPage.ItemPanel>
|
|
128
|
+
* </BasicPage.Item>
|
|
129
|
+
* …later siblings (pass `divided` on the panel above)…
|
|
130
|
+
* </BasicPage.Card>
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
declare function Item({ className, ...props }: ComponentProps<"div"> & {
|
|
134
|
+
ref?: Ref<HTMLDivElement>;
|
|
135
|
+
}): import("react").JSX.Element;
|
|
136
|
+
export interface BasicPageItemPanelProps extends ComponentProps<"div"> {
|
|
137
|
+
/**
|
|
138
|
+
* Set when later card rows follow this item. The panel then renders as an
|
|
139
|
+
* inset rounded chip (keeping the card's own divider) instead of the
|
|
140
|
+
* full-bleed bottom sheet, which only reads well against the card's corner.
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
divided?: boolean;
|
|
144
|
+
ref?: Ref<HTMLDivElement>;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Secondary strip at the end of an `Item`. When the item closes the card,
|
|
148
|
+
* it's a gray sheet flush under the body, full-bleed and owning the row's
|
|
149
|
+
* bottom padding, rounding only into the card's bottom corner. Pass `divided`
|
|
150
|
+
* when later card rows follow — the panel becomes an inset rounded chip and
|
|
151
|
+
* the card's hairline divider stays in charge. Content is already a centered
|
|
152
|
+
* flex row either way.
|
|
153
|
+
*/
|
|
154
|
+
declare function ItemPanel({ divided, className, ...props }: BasicPageItemPanelProps): import("react").JSX.Element;
|
|
95
155
|
/**
|
|
96
156
|
* Standalone callout. Pair with `CalloutTitle` / `CalloutDescription` (and
|
|
97
157
|
* optional actions) for a featured block — e.g. an invite form. Do not wrap
|
|
98
158
|
* in `Card`; this is already the outer surface.
|
|
159
|
+
*
|
|
160
|
+
* Pass `icon` for a decorative glyph anchored to the header block (first
|
|
161
|
+
* child) — typically a Tabler outline icon. The icon is aria-hidden; keep
|
|
162
|
+
* meaning in the title/description.
|
|
99
163
|
*/
|
|
100
|
-
declare function Callout({ className, ...props }: ComponentProps<"div"> & {
|
|
164
|
+
declare function Callout({ className, icon, children, ...props }: ComponentProps<"div"> & {
|
|
101
165
|
ref?: Ref<HTMLDivElement>;
|
|
166
|
+
/** Decorative icon, top-right of the header (first child). */
|
|
167
|
+
icon?: ReactNode;
|
|
102
168
|
}): import("react").JSX.Element;
|
|
103
169
|
/** Callout heading — same type as `SectionTitle`. Hashable via slug `id`. */
|
|
104
170
|
declare function CalloutTitle({ id, className, children, ...props }: ComponentProps<"h2"> & {
|
|
@@ -219,7 +285,7 @@ declare function RowLink({ label, description, leading, href, className, childre
|
|
|
219
285
|
* </BasicPage.Row>
|
|
220
286
|
* </BasicPage.Card>
|
|
221
287
|
* </div>
|
|
222
|
-
* <BasicPage.Callout>
|
|
288
|
+
* <BasicPage.Callout icon={<IconMail stroke={1.25} />}>
|
|
223
289
|
* <BasicPage.Header>
|
|
224
290
|
* <BasicPage.CalloutTitle>Invitations</BasicPage.CalloutTitle>
|
|
225
291
|
* <BasicPage.CalloutDescription>…</BasicPage.CalloutDescription>
|
|
@@ -258,6 +324,8 @@ export declare const BasicPage: {
|
|
|
258
324
|
Description: typeof Description;
|
|
259
325
|
SectionFooter: typeof SectionFooter;
|
|
260
326
|
Card: typeof Card;
|
|
327
|
+
Item: typeof Item;
|
|
328
|
+
ItemPanel: typeof ItemPanel;
|
|
261
329
|
Callout: typeof Callout;
|
|
262
330
|
CalloutTitle: typeof CalloutTitle;
|
|
263
331
|
CalloutDescription: typeof CalloutDescription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BasicPage, BASIC_PAGE_CARD, BASIC_PAGE_CALLOUT, BASIC_PAGE_ROW, type BasicPageRowProps, type BasicPageRowLinkProps, type BasicPageBackProps, type BasicPageFooterProps, } from './basic-page';
|
|
1
|
+
export { BasicPage, BASIC_PAGE_CARD, BASIC_PAGE_CALLOUT, BASIC_PAGE_ROW, BASIC_PAGE_ITEM, BASIC_PAGE_ITEM_PANEL, BASIC_PAGE_ITEM_PANEL_DIVIDED, type BasicPageRowProps, type BasicPageRowLinkProps, type BasicPageBackProps, type BasicPageFooterProps, type BasicPageItemPanelProps, } from './basic-page';
|
|
@@ -78,13 +78,18 @@ interface ItemBaseProps {
|
|
|
78
78
|
children?: ReactNode;
|
|
79
79
|
className?: string;
|
|
80
80
|
}
|
|
81
|
-
|
|
81
|
+
/**
|
|
82
|
+
* DOM handlers whose React signatures clash with Motion's gesture props.
|
|
83
|
+
* Same omit list as `Button` — rows render through `motion.*`.
|
|
84
|
+
*/
|
|
85
|
+
type MotionHandlerConflicts = "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragExit" | "onDragLeave" | "onDragOver" | "onDrop";
|
|
86
|
+
export interface SidebarItemLinkProps extends ItemBaseProps, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof ItemBaseProps | MotionHandlerConflicts> {
|
|
82
87
|
/** Destination — rendered through the host's `LinkProvider`. */
|
|
83
88
|
href: string;
|
|
84
89
|
/** Leaves the app: opens in a new tab and renders a ↗ cue. */
|
|
85
90
|
external?: boolean;
|
|
86
91
|
}
|
|
87
|
-
export interface SidebarItemButtonProps extends ItemBaseProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ItemBaseProps> {
|
|
92
|
+
export interface SidebarItemButtonProps extends ItemBaseProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ItemBaseProps | MotionHandlerConflicts> {
|
|
88
93
|
href?: undefined;
|
|
89
94
|
external?: undefined;
|
|
90
95
|
}
|
|
@@ -95,7 +100,7 @@ export type SidebarItemProps = SidebarItemLinkProps | SidebarItemButtonProps;
|
|
|
95
100
|
* primary surface; `external` opens a new tab and appends a ↗ cue.
|
|
96
101
|
*/
|
|
97
102
|
declare function Item({ icon, active, className, children, href, external, ...rest }: SidebarItemProps): import("react").JSX.Element;
|
|
98
|
-
export interface SidebarAccountRowProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
103
|
+
export interface SidebarAccountRowProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | MotionHandlerConflicts> {
|
|
99
104
|
/** Display name — also the source for fallback initials. */
|
|
100
105
|
name: string;
|
|
101
106
|
/** Avatar image URL; falls back to initials while loading or on error. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Animates its own height to follow the measured height of `children`, so
|
|
4
|
+
* content swaps (search filtering, skeleton → data) glide instead of jumping.
|
|
5
|
+
* Honors `prefers-reduced-motion` by snapping height with no spring.
|
|
6
|
+
*/
|
|
7
|
+
export declare function AnimatedHeight({ className, children, }: {
|
|
8
|
+
className?: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@photon-ai/pho-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Pho Design System — Photon's React component library, built on Base UI",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -109,6 +109,10 @@
|
|
|
109
109
|
"types": "./dist/src/components/otp-field/index.d.ts",
|
|
110
110
|
"import": "./dist/components/otp-field.js"
|
|
111
111
|
},
|
|
112
|
+
"./components/phone-input": {
|
|
113
|
+
"types": "./dist/src/components/phone-input/index.d.ts",
|
|
114
|
+
"import": "./dist/components/phone-input.js"
|
|
115
|
+
},
|
|
112
116
|
"./components/slider": {
|
|
113
117
|
"types": "./dist/src/components/slider/index.d.ts",
|
|
114
118
|
"import": "./dist/components/slider.js"
|
|
@@ -173,6 +177,10 @@
|
|
|
173
177
|
"types": "./dist/src/components/combobox/index.d.ts",
|
|
174
178
|
"import": "./dist/components/combobox.js"
|
|
175
179
|
},
|
|
180
|
+
"./components/command": {
|
|
181
|
+
"types": "./dist/src/components/command/index.d.ts",
|
|
182
|
+
"import": "./dist/components/command.js"
|
|
183
|
+
},
|
|
176
184
|
"./components/autocomplete": {
|
|
177
185
|
"types": "./dist/src/components/autocomplete/index.d.ts",
|
|
178
186
|
"import": "./dist/components/autocomplete.js"
|
|
@@ -201,6 +209,10 @@
|
|
|
201
209
|
"types": "./dist/src/components/spinner/index.d.ts",
|
|
202
210
|
"import": "./dist/components/spinner.js"
|
|
203
211
|
},
|
|
212
|
+
"./components/status-view": {
|
|
213
|
+
"types": "./dist/src/components/status-view/index.d.ts",
|
|
214
|
+
"import": "./dist/components/status-view.js"
|
|
215
|
+
},
|
|
204
216
|
"./components/notification": {
|
|
205
217
|
"types": "./dist/src/components/notification/index.d.ts",
|
|
206
218
|
"import": "./dist/components/notification.js"
|
|
@@ -418,6 +430,9 @@
|
|
|
418
430
|
"dependencies": {
|
|
419
431
|
"@base-ui/react": "^1.6.0",
|
|
420
432
|
"clsx": "^2.1.1",
|
|
433
|
+
"cmdk": "^1.1.1",
|
|
434
|
+
"country-flag-icons": "^1.6.20",
|
|
435
|
+
"libphonenumber-js": "^1.13.10",
|
|
421
436
|
"motion": "^12.42.0",
|
|
422
437
|
"tailwind-merge": "^3.6.0"
|
|
423
438
|
},
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as o } from "./cn-DTiB6ek_.js";
|
|
3
|
-
import { n as d } from "./link-provider-9TFNyDqO.js";
|
|
4
|
-
import { s as f } from "./close-button-B8gF5UNk.js";
|
|
5
|
-
import { t as p } from "./createReactComponent-BqCmnqfX.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
8
|
-
import { AnimatePresence as x, motion as h, useReducedMotion as v } from "motion/react";
|
|
9
|
-
var g = [["path", {
|
|
10
|
-
d: "M15 6l-6 6l6 6",
|
|
11
|
-
key: "svg-0"
|
|
12
|
-
}]], y = p("outline", "chevron-left", "ChevronLeft", g), N = [["path", {
|
|
13
|
-
d: "M9 6l6 6l-6 6",
|
|
14
|
-
key: "svg-0"
|
|
15
|
-
}]], b = p("outline", "chevron-right", "ChevronRight", N), w = "divide-y divide-pho-secondary rounded-base border border-pho-secondary bg-pho-primary", C = "flex flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5", m = "flex min-h-[4.25rem] flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6";
|
|
16
|
-
function A({ className: e, ...t }) {
|
|
17
|
-
return /* @__PURE__ */ r("div", {
|
|
18
|
-
className: o("relative mx-auto w-full max-w-[44.5rem] px-5 py-12", e),
|
|
19
|
-
...t
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function _(e) {
|
|
23
|
-
return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
24
|
-
}
|
|
25
|
-
function R(e) {
|
|
26
|
-
if (!(typeof e != "string" && typeof e != "number"))
|
|
27
|
-
return _(String(e)) || void 0;
|
|
28
|
-
}
|
|
29
|
-
function c(e, t) {
|
|
30
|
-
if (e !== "")
|
|
31
|
-
return e ?? R(t);
|
|
32
|
-
}
|
|
33
|
-
function k({ id: e, className: t, children: n, ...i }) {
|
|
34
|
-
return /* @__PURE__ */ r("h1", {
|
|
35
|
-
id: c(e, n),
|
|
36
|
-
className: o("text-display-base text-pho-primary scroll-mt-12 px-5 font-medium", t),
|
|
37
|
-
...i,
|
|
38
|
-
children: n
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function L({ className: e, ...t }) {
|
|
42
|
-
return /* @__PURE__ */ r("div", {
|
|
43
|
-
className: o("mt-6 flex flex-col gap-10", "*:flex *:flex-col *:gap-3", e),
|
|
44
|
-
...t
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function E({ className: e, ...t }) {
|
|
48
|
-
return /* @__PURE__ */ r("div", {
|
|
49
|
-
className: o("flex flex-col gap-0.5", e),
|
|
50
|
-
...t
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
function I({ id: e, className: t, children: n, ...i }) {
|
|
54
|
-
return /* @__PURE__ */ r("h2", {
|
|
55
|
-
id: c(e, n),
|
|
56
|
-
className: o("text-display-xs text-pho-primary scroll-mt-12 px-5 font-medium", t),
|
|
57
|
-
...i,
|
|
58
|
-
children: n
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function S({ className: e, ...t }) {
|
|
62
|
-
return /* @__PURE__ */ r("p", {
|
|
63
|
-
className: o("text-display-xs text-pho-description px-5 font-normal", e),
|
|
64
|
-
...t
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function B({ className: e, ...t }) {
|
|
68
|
-
return /* @__PURE__ */ r("p", {
|
|
69
|
-
className: o("text-pho-description px-5 text-xs font-normal", e),
|
|
70
|
-
...t
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function P({ className: e, ...t }) {
|
|
74
|
-
return /* @__PURE__ */ r("div", {
|
|
75
|
-
className: o(w, e),
|
|
76
|
-
...t
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function D({ className: e, ...t }) {
|
|
80
|
-
return /* @__PURE__ */ r("div", {
|
|
81
|
-
className: o(C, e),
|
|
82
|
-
...t
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
function G({ id: e, className: t, children: n, ...i }) {
|
|
86
|
-
return /* @__PURE__ */ r("h2", {
|
|
87
|
-
id: c(e, n),
|
|
88
|
-
className: o("text-display-xs text-pho-primary scroll-mt-12 font-medium", t),
|
|
89
|
-
...i,
|
|
90
|
-
children: n
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
function H({ className: e, ...t }) {
|
|
94
|
-
return /* @__PURE__ */ r("p", {
|
|
95
|
-
className: o("text-display-xs text-pho-description font-normal", e),
|
|
96
|
-
...t
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function T({ label: e, description: t, htmlFor: n, className: i, children: a, ...l }) {
|
|
100
|
-
return /* @__PURE__ */ s("div", {
|
|
101
|
-
className: o(m, i),
|
|
102
|
-
...l,
|
|
103
|
-
children: [/* @__PURE__ */ s("div", {
|
|
104
|
-
className: "min-w-0",
|
|
105
|
-
children: [n ? /* @__PURE__ */ r("label", {
|
|
106
|
-
htmlFor: n,
|
|
107
|
-
className: "text-pho-primary block text-base font-normal",
|
|
108
|
-
children: e
|
|
109
|
-
}) : /* @__PURE__ */ r("p", {
|
|
110
|
-
className: "text-pho-primary text-base font-normal",
|
|
111
|
-
children: e
|
|
112
|
-
}), t ? /* @__PURE__ */ r("p", {
|
|
113
|
-
className: "text-pho-description mt-0.5 text-xs",
|
|
114
|
-
children: t
|
|
115
|
-
}) : null]
|
|
116
|
-
}), /* @__PURE__ */ r("div", {
|
|
117
|
-
className: "flex w-full min-w-0 items-center gap-2 sm:w-auto",
|
|
118
|
-
children: a
|
|
119
|
-
})]
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function j({ className: e, ...t }) {
|
|
123
|
-
return /* @__PURE__ */ r("p", {
|
|
124
|
-
className: o("text-pho-description truncate text-base", e),
|
|
125
|
-
...t
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function z({ className: e, ...t }) {
|
|
129
|
-
return /* @__PURE__ */ r("p", {
|
|
130
|
-
role: "alert",
|
|
131
|
-
className: o("text-pho-error px-5 pb-3 text-xs", e),
|
|
132
|
-
...t
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
var F = {
|
|
136
|
-
type: "spring",
|
|
137
|
-
stiffness: 640,
|
|
138
|
-
damping: 50
|
|
139
|
-
}, M = {
|
|
140
|
-
duration: 0.18,
|
|
141
|
-
ease: "easeOut"
|
|
142
|
-
};
|
|
143
|
-
function O({ show: e, className: t, ...n }) {
|
|
144
|
-
const i = v(), a = /* @__PURE__ */ r("div", {
|
|
145
|
-
className: o("flex items-center justify-between gap-6 px-5 py-4", t),
|
|
146
|
-
...n
|
|
147
|
-
});
|
|
148
|
-
return e === void 0 ? a : /* @__PURE__ */ r(x, {
|
|
149
|
-
initial: !1,
|
|
150
|
-
children: e ? /* @__PURE__ */ r(h.div, {
|
|
151
|
-
className: "overflow-hidden",
|
|
152
|
-
initial: {
|
|
153
|
-
height: 0,
|
|
154
|
-
opacity: 0
|
|
155
|
-
},
|
|
156
|
-
animate: {
|
|
157
|
-
height: "auto",
|
|
158
|
-
opacity: 1
|
|
159
|
-
},
|
|
160
|
-
exit: {
|
|
161
|
-
height: 0,
|
|
162
|
-
opacity: 0
|
|
163
|
-
},
|
|
164
|
-
transition: i ? { duration: 0 } : {
|
|
165
|
-
height: F,
|
|
166
|
-
opacity: M
|
|
167
|
-
},
|
|
168
|
-
children: a
|
|
169
|
-
}) : null
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
function V({ href: e, className: t, children: n = "Back", ...i }) {
|
|
173
|
-
return /* @__PURE__ */ r(f, {
|
|
174
|
-
variant: "ghost",
|
|
175
|
-
size: "sm",
|
|
176
|
-
href: e,
|
|
177
|
-
prefix: /* @__PURE__ */ r(y, {}),
|
|
178
|
-
className: o("absolute top-2 left-[10.25px]", t),
|
|
179
|
-
...i,
|
|
180
|
-
children: n
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
function $({ label: e, description: t, leading: n, href: i, className: a, children: l, ...u }) {
|
|
184
|
-
return /* @__PURE__ */ s(d(), {
|
|
185
|
-
href: i,
|
|
186
|
-
...u,
|
|
187
|
-
className: o(m, "group outline-pho-brand hover:bg-pho-primary-hover cursor-pointer transition-colors focus-visible:outline-2 focus-visible:-outline-offset-2", "first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]", a),
|
|
188
|
-
children: [/* @__PURE__ */ s("div", {
|
|
189
|
-
className: o("flex min-w-0 items-center", n != null && "gap-3"),
|
|
190
|
-
children: [n, /* @__PURE__ */ s("div", {
|
|
191
|
-
className: "min-w-0",
|
|
192
|
-
children: [/* @__PURE__ */ r("div", {
|
|
193
|
-
className: "flex min-w-0 items-center gap-1",
|
|
194
|
-
children: typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ r("p", {
|
|
195
|
-
className: "text-pho-primary truncate text-base font-medium",
|
|
196
|
-
children: e
|
|
197
|
-
}) : e
|
|
198
|
-
}), t ? /* @__PURE__ */ r("div", {
|
|
199
|
-
className: "text-pho-description text-xs",
|
|
200
|
-
children: t
|
|
201
|
-
}) : null]
|
|
202
|
-
})]
|
|
203
|
-
}), /* @__PURE__ */ s("div", {
|
|
204
|
-
className: "flex w-full min-w-0 items-center gap-2 sm:w-auto",
|
|
205
|
-
children: [l, /* @__PURE__ */ r(b, {
|
|
206
|
-
"aria-hidden": !0,
|
|
207
|
-
className: "text-pho-secondary group-hover:text-pho-secondary-hover size-4 shrink-0 transition-colors"
|
|
208
|
-
})]
|
|
209
|
-
})]
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
var Y = {
|
|
213
|
-
Root: A,
|
|
214
|
-
Back: V,
|
|
215
|
-
Title: k,
|
|
216
|
-
Stack: L,
|
|
217
|
-
Header: E,
|
|
218
|
-
SectionTitle: I,
|
|
219
|
-
Description: S,
|
|
220
|
-
SectionFooter: B,
|
|
221
|
-
Card: P,
|
|
222
|
-
Callout: D,
|
|
223
|
-
CalloutTitle: G,
|
|
224
|
-
CalloutDescription: H,
|
|
225
|
-
Row: T,
|
|
226
|
-
RowLink: $,
|
|
227
|
-
Value: j,
|
|
228
|
-
Alert: z,
|
|
229
|
-
Footer: O
|
|
230
|
-
};
|
|
231
|
-
export {
|
|
232
|
-
Y as i,
|
|
233
|
-
w as n,
|
|
234
|
-
m as r,
|
|
235
|
-
C as t
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
//# sourceMappingURL=basic-page-C50WUzYV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basic-page-C50WUzYV.js","names":["__iconNode"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.44.0_react@19.2.7/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs","../../../../node_modules/.pnpm/@tabler+icons-react@3.44.0_react@19.2.7/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs","../../src/sections/basic-page/basic-page.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.44.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M15 6l-6 6l6 6\", \"key\": \"svg-0\" }]];\nconst IconChevronLeft = createReactComponent(\"outline\", \"chevron-left\", \"ChevronLeft\", __iconNode);\n\nexport { __iconNode, IconChevronLeft as default };\n//# sourceMappingURL=IconChevronLeft.mjs.map\n","/**\n * @license @tabler/icons-react v3.44.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M9 6l6 6l-6 6\", \"key\": \"svg-0\" }]];\nconst IconChevronRight = createReactComponent(\"outline\", \"chevron-right\", \"ChevronRight\", __iconNode);\n\nexport { __iconNode, IconChevronRight as default };\n//# sourceMappingURL=IconChevronRight.mjs.map\n","import {\n type AnchorHTMLAttributes,\n type ComponentProps,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { IconChevronLeft, IconChevronRight } from \"@tabler/icons-react\";\nimport { ButtonLink, type ButtonLinkProps } from \"../../components/button\";\nimport { cn } from \"../../utils/cn\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * BasicPage — Pho's standard content page: a page title, section titles, and\n * bordered cards of label/control rows. Settings, billing, members — any\n * single-column management surface.\n *\n * Spacing: wrap the page in `Root` (a 42rem column with `px-5` gutters,\n * vertical padding). `Stack` separates blocks (`gap-10`). Inside a block,\n * children share `gap-3`. Wrap a section title + description in `Header`\n * (`gap-0.5`) so that pair stays tight — don't put them as loose siblings.\n * Parts already carry `px-5`.\n *\n * Navigation: pages may drill into subpages. `RowLink` is a whole-row link\n * (trailing chevron) and `Back` returns to the parent — both render through\n * the host's `LinkProvider`; the URL itself stays the router's job. `Back`\n * floats in `Root`'s top padding, so `Title` never moves between pages that\n * have a back link and pages that don't.\n */\n\n/* ------------------------------- class map ------------------------------- */\n\n/** Bordered card that stacks rows with hairline dividers. */\nexport const BASIC_PAGE_CARD =\n \"divide-y divide-pho-secondary rounded-base border border-pho-secondary bg-pho-primary\";\n\n/**\n * Standalone callout surface — featured block (invite form, notice, etc.).\n * Don't wrap in `Card`; this is the outer chrome.\n */\nexport const BASIC_PAGE_CALLOUT =\n \"flex flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5\";\n\n/**\n * One row — label (+ optional description) left, control right.\n * `min-h-[4.25rem]` (68px) keeps avatar/control rows from collapsing shorter\n * than a comfortable touch target.\n */\nexport const BASIC_PAGE_ROW =\n \"flex min-h-[4.25rem] flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6\";\n\n/* --------------------------------- parts --------------------------------- */\n\n/**\n * Page chrome — centered column at the standard content width. Hosts\n * `Title` + `Stack` (and any route-level siblings). Prefer this over\n * ad-hoc `max-w-*` wrappers in the app shell.\n *\n * `44.5rem` = the 42rem (`2xl`) content column plus the two `px-5` gutters,\n * so wide viewports render exactly as before while narrow ones keep a 20px\n * breathing edge instead of running content into the viewport.\n *\n * `relative` anchors `Back`, which floats in the top padding — the reserved\n * zone that keeps `Title` at the same position on every page.\n */\nfunction Root({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n className={cn(\n \"relative mx-auto w-full max-w-[44.5rem] px-5 py-12\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Slug for hash targets — \"Danger zone\" → `danger-zone`. Empty / non-string\n * children yield no id; pass an explicit `id` to override or `id=\"\"` to opt out.\n */\nfunction slugifyHeading(value: string): string {\n return value\n .normalize(\"NFKD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\n\nfunction headingIdFromChildren(children: ReactNode): string | undefined {\n if (typeof children !== \"string\" && typeof children !== \"number\") {\n return undefined;\n }\n const slug = slugifyHeading(String(children));\n return slug || undefined;\n}\n\n/** Resolve `id`: explicit wins; `\"\"` opts out; else slug from plain-text children. */\nfunction resolveHeadingId(\n id: string | undefined,\n children: ReactNode,\n): string | undefined {\n if (id === \"\") return undefined;\n if (id != null) return id;\n return headingIdFromChildren(children);\n}\n\n/**\n * Page title — largest heading on the surface. Plain-text children get a slug\n * `id` for hash targets (`#profile`); the heading itself is not a link.\n */\nfunction Title({\n id,\n className,\n children,\n ...props\n}: ComponentProps<\"h1\"> & { ref?: Ref<HTMLHeadingElement> }) {\n const headingId = resolveHeadingId(id, children);\n return (\n <h1\n id={headingId}\n className={cn(\n \"text-display-base text-pho-primary scroll-mt-12 px-5 font-medium\",\n className,\n )}\n {...props}\n >\n {children}\n </h1>\n );\n}\n\n/**\n * Vertical stack under the page title. Blocks (forms / sections) use `gap-10`;\n * each block lays out its children with `gap-3`.\n */\nfunction Stack({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n className={cn(\n \"mt-6 flex flex-col gap-10\",\n \"*:flex *:flex-col *:gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Title + optional description pair. Keeps that couple tight (`gap-0.5`) so\n * the block's `gap-3` only applies between this header and the card.\n */\nfunction Header({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return <div className={cn(\"flex flex-col gap-0.5\", className)} {...props} />;\n}\n\n/**\n * Section heading — same padding as the page title, smaller type. Hashable via\n * slug `id` (not a link).\n */\nfunction SectionTitle({\n id,\n className,\n children,\n ...props\n}: ComponentProps<\"h2\"> & { ref?: Ref<HTMLHeadingElement> }) {\n const headingId = resolveHeadingId(id, children);\n return (\n <h2\n id={headingId}\n className={cn(\n \"text-display-xs text-pho-primary scroll-mt-12 px-5 font-medium\",\n className,\n )}\n {...props}\n >\n {children}\n </h2>\n );\n}\n\n/**\n * Supporting copy under a section title. Same display step as the title;\n * color + normal weight keep it secondary. Always wrap with `Header`.\n */\nfunction Description({\n className,\n ...props\n}: ComponentProps<\"p\"> & { ref?: Ref<HTMLParagraphElement> }) {\n return (\n <p\n className={cn(\n \"text-display-xs text-pho-description px-5 font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Optional caption below a section's `Card` (outside the card). One step\n * smaller than `Description` (`text-xs`). Not the card-internal dirty-state\n * `Footer`.\n */\nfunction SectionFooter({\n className,\n ...props\n}: ComponentProps<\"p\"> & { ref?: Ref<HTMLParagraphElement> }) {\n return (\n <p\n className={cn(\"text-pho-description px-5 text-xs font-normal\", className)}\n {...props}\n />\n );\n}\n\n/** Bordered card that stacks rows with hairline dividers. */\nfunction Card({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return <div className={cn(BASIC_PAGE_CARD, className)} {...props} />;\n}\n\n/**\n * Standalone callout. Pair with `CalloutTitle` / `CalloutDescription` (and\n * optional actions) for a featured block — e.g. an invite form. Do not wrap\n * in `Card`; this is already the outer surface.\n */\nfunction Callout({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return <div className={cn(BASIC_PAGE_CALLOUT, className)} {...props} />;\n}\n\n/** Callout heading — same type as `SectionTitle`. Hashable via slug `id`. */\nfunction CalloutTitle({\n id,\n className,\n children,\n ...props\n}: ComponentProps<\"h2\"> & { ref?: Ref<HTMLHeadingElement> }) {\n const headingId = resolveHeadingId(id, children);\n return (\n <h2\n id={headingId}\n className={cn(\n \"text-display-xs text-pho-primary scroll-mt-12 font-medium\",\n className,\n )}\n {...props}\n >\n {children}\n </h2>\n );\n}\n\n/** Supporting copy under a callout title. */\nfunction CalloutDescription({\n className,\n ...props\n}: ComponentProps<\"p\"> & { ref?: Ref<HTMLParagraphElement> }) {\n return (\n <p\n className={cn(\n \"text-display-xs text-pho-description font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport interface BasicPageRowProps extends Omit<\n ComponentProps<\"div\">,\n \"title\"\n> {\n /** Left-side field name. */\n label: string;\n /** Optional helper under the label. */\n description?: ReactNode;\n /** Associates the label with a control id. When omitted, the label is not a `<label>`. */\n htmlFor?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * One row: label (+ optional description) left, control right.\n * Pass `htmlFor` when the row wraps a labelled input; omit it for display/\n * action rows (avatar, danger-zone delete).\n */\nfunction Row({\n label,\n description,\n htmlFor,\n className,\n children,\n ...props\n}: BasicPageRowProps) {\n return (\n <div className={cn(BASIC_PAGE_ROW, className)} {...props}>\n <div className=\"min-w-0\">\n {htmlFor ? (\n <label\n htmlFor={htmlFor}\n className=\"text-pho-primary block text-base font-normal\"\n >\n {label}\n </label>\n ) : (\n <p className=\"text-pho-primary text-base font-normal\">{label}</p>\n )}\n {description ? (\n <p className=\"text-pho-description mt-0.5 text-xs\">{description}</p>\n ) : null}\n </div>\n <div className=\"flex w-full min-w-0 items-center gap-2 sm:w-auto\">\n {children}\n </div>\n </div>\n );\n}\n\n/** Read-only value on the right side of a row (email, etc.). */\nfunction Value({\n className,\n ...props\n}: ComponentProps<\"p\"> & { ref?: Ref<HTMLParagraphElement> }) {\n return (\n <p\n className={cn(\"text-pho-description truncate text-base\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Inline error under a row (still inside the card). Matches card horizontal\n * padding so hosts don't re-apply `px-5`.\n */\nfunction Alert({\n className,\n ...props\n}: ComponentProps<\"p\"> & { ref?: Ref<HTMLParagraphElement> }) {\n return (\n <p\n role=\"alert\"\n className={cn(\"text-pho-error px-5 pb-3 text-xs\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Height spring for the `Footer` reveal — quick and essentially critically\n * damped (an overshooting edge would show clipped content). Same feel as the\n * onboarding / invite card's height-follow spring.\n */\nconst REVEAL_HEIGHT_SPRING = {\n type: \"spring\",\n stiffness: 640,\n damping: 50,\n} as const;\n\n/**\n * Content fade layered over the height reveal, so the bar doesn't pop while\n * the card grows — mirrors the onboarding step-content fade.\n */\nconst REVEAL_FADE = { duration: 0.18, ease: \"easeOut\" } as const;\n\nexport interface BasicPageFooterProps extends ComponentProps<\"div\"> {\n /**\n * Animated presence for dirty-state bars: the card glides open/closed on a\n * height spring while the content fades. Omit for a static, always-visible\n * footer (no animation). No reveal plays on first mount — only on flips.\n */\n show?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * Trailing bar inside a card — typically a save status + submit button that\n * appears after the form is dirty. Same horizontal/vertical padding as a row.\n * Pass `show` (instead of conditional rendering) to animate the bar in and\n * out following the onboarding card's motion language.\n */\nfunction Footer({ show, className, ...props }: BasicPageFooterProps) {\n const reduceMotion = useReducedMotion();\n const bar = (\n <div\n className={cn(\n \"flex items-center justify-between gap-6 px-5 py-4\",\n className,\n )}\n {...props}\n />\n );\n\n if (show === undefined) return bar;\n\n return (\n <AnimatePresence initial={false}>\n {show ? (\n <motion.div\n className=\"overflow-hidden\"\n initial={{ height: 0, opacity: 0 }}\n animate={{ height: \"auto\", opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={\n reduceMotion\n ? { duration: 0 }\n : { height: REVEAL_HEIGHT_SPRING, opacity: REVEAL_FADE }\n }\n >\n {bar}\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n}\n\n/* ------------------------------- navigation ------------------------------ */\n\nexport interface BasicPageBackProps extends Omit<\n ButtonLinkProps,\n \"variant\" | \"size\" | \"shape\" | \"prefix\" | \"suffix\" | \"svgOnly\" | \"href\"\n> {\n /** Parent destination — rendered through the host's `LinkProvider`. */\n href: string;\n /** Label — name the parent page. @default \"Back\" */\n children?: ReactNode;\n}\n\n/**\n * Back link for a subpage — a small ghost `ButtonLink`; place inside `Root`,\n * before `Title`. It floats in `Root`'s reserved top padding (vertically\n * centered in the 48px zone) instead of taking layout space, so `Title` sits\n * at exactly the same position whether or not a page has one.\n *\n * The offsets align the *label* glyph with the title glyph. Title text sits\n * 40px in (`px-5` root gutter + `px-5` title pad); inside a `sm` ghost button\n * the label sits 29.75px in (8px icon-side pad + 15.75px chevron, 1.125em at\n * the 14px `text-base`, + 4px gap + 2px label-span `px-0.5`) — so `left` is\n * the 10.25px difference. `top-2` centers the 32px button in the 48px\n * reserved zone. The chevron and the ghost hover pill hang in the padding —\n * the usual optical alignment for borderless controls.\n */\nfunction Back({\n href,\n className,\n children = \"Back\",\n ...props\n}: BasicPageBackProps) {\n return (\n <ButtonLink\n variant=\"ghost\"\n size=\"sm\"\n href={href}\n prefix={<IconChevronLeft />}\n className={cn(\"absolute top-2 left-[10.25px]\", className)}\n {...props}\n >\n {children}\n </ButtonLink>\n );\n}\n\nexport interface BasicPageRowLinkProps extends Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n \"href\" | \"title\"\n> {\n /** Left-side field name — plain text, or compose with a trailing badge. */\n label: ReactNode;\n /** Optional helper under the label. */\n description?: ReactNode;\n /** Optional media left of the label (e.g. project avatar). */\n leading?: ReactNode;\n /** Subpage destination — rendered through the host's `LinkProvider`. */\n href: string;\n /** Optional trailing value before the chevron (compose with `Value`). */\n children?: ReactNode;\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/**\n * A row that navigates — the whole row is one link into a subpage, with a\n * trailing chevron cue. Same geometry as `Row`; hover lifts the row, and\n * first/last rows follow the card's corner radius.\n */\nfunction RowLink({\n label,\n description,\n leading,\n href,\n className,\n children,\n ...props\n}: BasicPageRowLinkProps) {\n const Link = useLinkComponent();\n return (\n <Link\n href={href}\n {...props}\n className={cn(\n BASIC_PAGE_ROW,\n \"group outline-pho-brand hover:bg-pho-primary-hover cursor-pointer transition-colors focus-visible:outline-2 focus-visible:-outline-offset-2\",\n // Hover wash follows the card's rounding (minus the 1px border).\n \"first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]\",\n className,\n )}\n >\n <div\n className={cn(\"flex min-w-0 items-center\", leading != null && \"gap-3\")}\n >\n {leading}\n <div className=\"min-w-0\">\n <div className=\"flex min-w-0 items-center gap-1\">\n {typeof label === \"string\" || typeof label === \"number\" ? (\n <p className=\"text-pho-primary truncate text-base font-medium\">\n {label}\n </p>\n ) : (\n label\n )}\n </div>\n {description ? (\n <div className=\"text-pho-description text-xs\">{description}</div>\n ) : null}\n </div>\n </div>\n <div className=\"flex w-full min-w-0 items-center gap-2 sm:w-auto\">\n {children}\n <IconChevronRight\n aria-hidden\n className=\"text-pho-secondary group-hover:text-pho-secondary-hover size-4 shrink-0 transition-colors\"\n />\n </div>\n </Link>\n );\n}\n\n/* -------------------------------- assembly ------------------------------- */\n\n/**\n * Basic page layout. One stack, one gap rhythm — only title scale differs:\n *\n * ```tsx\n * <BasicPage.Root>\n * <BasicPage.Title>Profile</BasicPage.Title>\n * <BasicPage.Stack>\n * <form>\n * <BasicPage.Card>\n * <BasicPage.Row label=\"Name\" htmlFor=\"first-name\">\n * <Input id=\"first-name\" size=\"sm\" />\n * </BasicPage.Row>\n * </BasicPage.Card>\n * </form>\n * <form>\n * <BasicPage.Header>\n * <BasicPage.SectionTitle>Agent profile</BasicPage.SectionTitle>\n * <BasicPage.Description>…</BasicPage.Description>\n * </BasicPage.Header>\n * <BasicPage.Card>…</BasicPage.Card>\n * </form>\n * <div>\n * <BasicPage.SectionTitle>Danger zone</BasicPage.SectionTitle>\n * <BasicPage.Card>\n * <BasicPage.Row label=\"Delete account\" description=\"…\">\n * <Button color=\"destructive\" size=\"sm\">Delete</Button>\n * </BasicPage.Row>\n * </BasicPage.Card>\n * </div>\n * <BasicPage.Callout>\n * <BasicPage.Header>\n * <BasicPage.CalloutTitle>Invitations</BasicPage.CalloutTitle>\n * <BasicPage.CalloutDescription>…</BasicPage.CalloutDescription>\n * </BasicPage.Header>\n * …invite form…\n * </BasicPage.Callout>\n * </BasicPage.Stack>\n * </BasicPage.Root>\n * ```\n *\n * Subpage — `Back` above the title, `RowLink` rows to drill in:\n *\n * ```tsx\n * <BasicPage.Root>\n * <BasicPage.Back href=\"/settings\">Settings</BasicPage.Back>\n * <BasicPage.Title>Billing</BasicPage.Title>\n * <BasicPage.Stack>\n * <div>\n * <BasicPage.Card>\n * <BasicPage.RowLink label=\"Invoices\" href=\"/settings/invoices\">\n * <BasicPage.Value>12 documents</BasicPage.Value>\n * </BasicPage.RowLink>\n * </BasicPage.Card>\n * </div>\n * </BasicPage.Stack>\n * </BasicPage.Root>\n * ```\n */\nexport const BasicPage = {\n Root,\n Back,\n Title,\n Stack,\n Header,\n SectionTitle,\n Description,\n SectionFooter,\n Card,\n Callout,\n CalloutTitle,\n CalloutDescription,\n Row,\n RowLink,\n Value,\n Alert,\n Footer,\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;AASA,IAAMA,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAkB,KAAO;AAAQ,CAAC,CAAC,GACjE,IAAkB,EAAqB,WAAW,gBAAgB,eAAeA,CAAU,GCD3F,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAiB,KAAO;AAAQ,CAAC,CAAC,GAChE,IAAmB,EAAqB,WAAW,iBAAiB,gBAAgB,CAAU,GCuBvF,IACX,yFAMW,IACX,gFAOW,IACX;AAgBF,SAAS,EAAK,EACZ,WAAA,GACA,GAAG,EAAA,GACqD;AACxD,SACE,gBAAA,EAAC,OAAD;AAAA,IACE,WAAW,EACT,sDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAMA,SAAS,EAAe,GAAuB;AAC7C,SAAO,EACJ,UAAU,MAAM,EAChB,QAAQ,oBAAoB,EAAE,EAC9B,YAAY,EACZ,QAAQ,eAAe,GAAG,EAC1B,QAAQ,YAAY,EAAE;AAC3B;AAEA,SAAS,EAAsB,GAAyC;AACtE,MAAI,SAAO,KAAa,YAAY,OAAO,KAAa;AAIxD,WADa,EAAe,OAAO,CAAQ,CACpC,KAAQ;AACjB;AAGA,SAAS,EACP,GACA,GACoB;AACpB,MAAI,MAAO;AACX,WAAI,KACG,EAAsB,CAAQ;AACvC;AAMA,SAAS,EAAM,EACb,IAAA,GACA,WAAA,GACA,UAAA,GACA,GAAG,EAAA,GACwD;AAE3D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