@photon-ai/pho-ui 1.2.1 → 1.3.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/basic-page-C50WUzYV.js +238 -0
- package/dist/chunks/basic-page-C50WUzYV.js.map +1 -0
- package/dist/chunks/card-9cGnv-VD.js.map +1 -1
- package/dist/chunks/{close-button-Bq9f-H15.js → close-button-B8gF5UNk.js} +3 -3
- package/dist/chunks/close-button-B8gF5UNk.js.map +1 -0
- package/dist/chunks/dialog-Ba0UUE5g.js +155 -0
- package/dist/chunks/dialog-Ba0UUE5g.js.map +1 -0
- package/dist/chunks/{sidebar-BCqq58hV.js → sidebar-DGpEKxOn.js} +3 -3
- package/dist/chunks/{sidebar-BCqq58hV.js.map → sidebar-DGpEKxOn.js.map} +1 -1
- package/dist/components/badge.js +46 -31
- package/dist/components/badge.js.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/index.js +36 -36
- package/dist/sections/basic-page.js +8 -0
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/badge/badge.d.ts +34 -8
- package/dist/src/components/badge/index.d.ts +1 -1
- package/dist/src/components/card/card.d.ts +2 -2
- package/dist/src/components/dialog/dialog.d.ts +16 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/sections/basic-page/basic-page.d.ts +270 -0
- package/dist/src/sections/basic-page/index.d.ts +1 -0
- package/dist/src/sections/sidebar/sidebar.d.ts +1 -1
- package/package.json +4 -4
- package/src/styles/theme.css +20 -0
- package/dist/chunks/close-button-Bq9f-H15.js.map +0 -1
- package/dist/chunks/dialog-DolPKFGS.js +0 -141
- package/dist/chunks/dialog-DolPKFGS.js.map +0 -1
- package/dist/chunks/settings-B0vhLoMi.js +0 -134
- package/dist/chunks/settings-B0vhLoMi.js.map +0 -1
- package/dist/sections/settings.js +0 -8
- package/dist/src/sections/settings/index.d.ts +0 -1
- package/dist/src/sections/settings/settings.d.ts +0 -170
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as r } from "./cn-DTiB6ek_.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
5
|
-
var p = "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";
|
|
6
|
-
function x({ className: e, ...t }) {
|
|
7
|
-
return /* @__PURE__ */ a("div", {
|
|
8
|
-
className: r("mx-auto w-full max-w-2xl py-12", e),
|
|
9
|
-
...t
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function u({ className: e, children: t, ...n }) {
|
|
13
|
-
return /* @__PURE__ */ a("h1", {
|
|
14
|
-
className: r("text-display-base text-pho-primary px-5 font-medium", e),
|
|
15
|
-
...n,
|
|
16
|
-
children: t
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function d({ className: e, ...t }) {
|
|
20
|
-
return /* @__PURE__ */ a("div", {
|
|
21
|
-
className: r("mt-6 flex flex-col gap-10", "*:flex *:flex-col *:gap-3", e),
|
|
22
|
-
...t
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function f({ className: e, ...t }) {
|
|
26
|
-
return /* @__PURE__ */ a("div", {
|
|
27
|
-
className: r("flex flex-col gap-0.5", e),
|
|
28
|
-
...t
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function h({ className: e, children: t, ...n }) {
|
|
32
|
-
return /* @__PURE__ */ a("h2", {
|
|
33
|
-
className: r("text-display-xs text-pho-primary px-5 font-medium", e),
|
|
34
|
-
...n,
|
|
35
|
-
children: t
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function N({ className: e, ...t }) {
|
|
39
|
-
return /* @__PURE__ */ a("p", {
|
|
40
|
-
className: r("text-display-xs text-pho-description px-5 font-normal", e),
|
|
41
|
-
...t
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function y({ className: e, ...t }) {
|
|
45
|
-
return /* @__PURE__ */ a("div", {
|
|
46
|
-
className: r(p, e),
|
|
47
|
-
...t
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function b({ className: e, ...t }) {
|
|
51
|
-
return /* @__PURE__ */ a("div", {
|
|
52
|
-
className: r(c, e),
|
|
53
|
-
...t
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function v({ className: e, children: t, ...n }) {
|
|
57
|
-
return /* @__PURE__ */ a("h2", {
|
|
58
|
-
className: r("text-display-xs text-pho-primary font-medium", e),
|
|
59
|
-
...n,
|
|
60
|
-
children: t
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function g({ className: e, ...t }) {
|
|
64
|
-
return /* @__PURE__ */ a("p", {
|
|
65
|
-
className: r("text-display-xs text-pho-description font-normal", e),
|
|
66
|
-
...t
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
function w({ label: e, description: t, htmlFor: n, className: o, children: i, ...l }) {
|
|
70
|
-
return /* @__PURE__ */ s("div", {
|
|
71
|
-
className: r(m, o),
|
|
72
|
-
...l,
|
|
73
|
-
children: [/* @__PURE__ */ s("div", {
|
|
74
|
-
className: "min-w-0",
|
|
75
|
-
children: [n ? /* @__PURE__ */ a("label", {
|
|
76
|
-
htmlFor: n,
|
|
77
|
-
className: "text-pho-primary block text-base font-normal",
|
|
78
|
-
children: e
|
|
79
|
-
}) : /* @__PURE__ */ a("p", {
|
|
80
|
-
className: "text-pho-primary text-base font-normal",
|
|
81
|
-
children: e
|
|
82
|
-
}), t ? /* @__PURE__ */ a("p", {
|
|
83
|
-
className: "text-pho-description mt-0.5 text-xs",
|
|
84
|
-
children: t
|
|
85
|
-
}) : null]
|
|
86
|
-
}), /* @__PURE__ */ a("div", {
|
|
87
|
-
className: "flex w-full min-w-0 items-center gap-2 sm:w-auto",
|
|
88
|
-
children: i
|
|
89
|
-
})]
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
function T({ className: e, ...t }) {
|
|
93
|
-
return /* @__PURE__ */ a("p", {
|
|
94
|
-
className: r("text-pho-description truncate text-base", e),
|
|
95
|
-
...t
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
function S({ className: e, ...t }) {
|
|
99
|
-
return /* @__PURE__ */ a("p", {
|
|
100
|
-
role: "alert",
|
|
101
|
-
className: r("text-pho-error px-5 pb-3 text-xs", e),
|
|
102
|
-
...t
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function C({ className: e, ...t }) {
|
|
106
|
-
return /* @__PURE__ */ a("div", {
|
|
107
|
-
className: r("flex items-center justify-between gap-6 px-5 py-4", e),
|
|
108
|
-
...t
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
var E = {
|
|
112
|
-
Page: x,
|
|
113
|
-
PageTitle: u,
|
|
114
|
-
Stack: d,
|
|
115
|
-
Header: f,
|
|
116
|
-
SectionTitle: h,
|
|
117
|
-
Description: N,
|
|
118
|
-
Card: y,
|
|
119
|
-
Callout: b,
|
|
120
|
-
CalloutTitle: v,
|
|
121
|
-
CalloutDescription: g,
|
|
122
|
-
Row: w,
|
|
123
|
-
Value: T,
|
|
124
|
-
Alert: S,
|
|
125
|
-
Footer: C
|
|
126
|
-
};
|
|
127
|
-
export {
|
|
128
|
-
E as i,
|
|
129
|
-
p as n,
|
|
130
|
-
m as r,
|
|
131
|
-
c as t
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
//# sourceMappingURL=settings-B0vhLoMi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings-B0vhLoMi.js","names":[],"sources":["../../src/sections/settings/settings.tsx"],"sourcesContent":["import { type ComponentProps, type ReactNode, type Ref } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Settings — Pho's settings-page section: a page title, section titles, and\n * bordered cards of label/control rows.\n *\n * Spacing: wrap the page in `Page` (`max-w-2xl`, vertical padding). `Stack`\n * separates blocks (`gap-10`). Inside a block, children share `gap-3`. Wrap a\n * section title + description in `Header` (`gap-0.5`) so that pair stays tight\n * — don't put them as loose siblings. Parts already carry `px-5`.\n */\n\n/* ------------------------------- class map ------------------------------- */\n\n/** Bordered card that stacks rows with hairline dividers. */\nexport const SETTINGS_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 SETTINGS_CALLOUT =\n \"flex flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5\";\n\n/**\n * One settings 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 SETTINGS_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 settings content width. Hosts\n * `PageTitle` + `Stack` (and any route-level siblings). Prefer this over\n * ad-hoc `max-w-*` wrappers in the app shell.\n */\nfunction Page({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n className={cn(\"mx-auto w-full max-w-2xl py-12\", className)}\n {...props}\n />\n );\n}\n\n/** Page title — largest heading on the surface. */\nfunction PageTitle({\n className,\n children,\n ...props\n}: ComponentProps<\"h1\"> & { ref?: Ref<HTMLHeadingElement> }) {\n return (\n <h1\n className={cn(\n \"text-display-base text-pho-primary 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/** Section heading — same padding as the page title, smaller type. */\nfunction SectionTitle({\n className,\n children,\n ...props\n}: ComponentProps<\"h2\"> & { ref?: Ref<HTMLHeadingElement> }) {\n return (\n <h2\n className={cn(\n \"text-display-xs text-pho-primary 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/** Bordered card that stacks settings rows with hairline dividers. */\nfunction Card({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return <div className={cn(SETTINGS_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(SETTINGS_CALLOUT, className)} {...props} />;\n}\n\n/** Callout heading — same type as `SectionTitle`. */\nfunction CalloutTitle({\n className,\n children,\n ...props\n}: ComponentProps<\"h2\"> & { ref?: Ref<HTMLHeadingElement> }) {\n return (\n <h2\n className={cn(\"text-display-xs text-pho-primary font-medium\", className)}\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 SettingsRowProps extends Omit<ComponentProps<\"div\">, \"title\"> {\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 settings 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}: SettingsRowProps) {\n return (\n <div className={cn(SETTINGS_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 * 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 */\nfunction Footer({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\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\n/* -------------------------------- assembly ------------------------------- */\n\n/**\n * Settings page layout. One stack, one gap rhythm — only title scale differs:\n *\n * ```tsx\n * <Settings.Page>\n * <Settings.PageTitle>Profile</Settings.PageTitle>\n * <Settings.Stack>\n * <form>\n * <Settings.Card>\n * <Settings.Row label=\"Name\" htmlFor=\"first-name\">\n * <Input id=\"first-name\" size=\"sm\" />\n * </Settings.Row>\n * </Settings.Card>\n * </form>\n * <form>\n * <Settings.Header>\n * <Settings.SectionTitle>Agent profile</Settings.SectionTitle>\n * <Settings.Description>…</Settings.Description>\n * </Settings.Header>\n * <Settings.Card>…</Settings.Card>\n * </form>\n * <div>\n * <Settings.SectionTitle>Danger zone</Settings.SectionTitle>\n * <Settings.Card>\n * <Settings.Row label=\"Delete account\" description=\"…\">\n * <Button color=\"destructive\" size=\"sm\">Delete</Button>\n * </Settings.Row>\n * </Settings.Card>\n * </div>\n * <Settings.Callout>\n * <Settings.Header>\n * <Settings.CalloutTitle>Invitations</Settings.CalloutTitle>\n * <Settings.CalloutDescription>…</Settings.CalloutDescription>\n * </Settings.Header>\n * …invite form…\n * </Settings.Callout>\n * </Settings.Stack>\n * </Settings.Page>\n * ```\n */\nexport const Settings = {\n Page,\n PageTitle,\n Stack,\n Header,\n SectionTitle,\n Description,\n Card,\n Callout,\n CalloutTitle,\n CalloutDescription,\n Row,\n Value,\n Alert,\n Footer,\n};\n"],"mappings":";;;;AAgBA,IAAa,IACX,yFAMW,IACX,gFAOW,IACX;AASF,SAAS,EAAK,EACZ,WAAA,GACA,GAAG,EAAA,GACqD;AACxD,SACE,gB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AAC,KAAD;AAAA,IACE,MAAK;AAAA,IACL,WAAW,EAAG,oCAAoC,CAAS;AAAA,IAC3D,GAAI;AAAA,EACL,CAAA;AAEL;AAMA,SAAS,EAAO,EACd,WAAA,GACA,GAAG,EAAA,GACqD;AACxD,SACE,gBAAA,EAAC,OAAD;AAAA,IACE,WAAW,EACT,qDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AA4CA,IAAa,IAAW;AAAA,EACtB,MAAA;AAAA,EACA,WAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,oBAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Settings, SETTINGS_CARD, SETTINGS_CALLOUT, SETTINGS_ROW, type SettingsRowProps, } from './settings';
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode, Ref } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Settings — Pho's settings-page section: a page title, section titles, and
|
|
4
|
-
* bordered cards of label/control rows.
|
|
5
|
-
*
|
|
6
|
-
* Spacing: wrap the page in `Page` (`max-w-2xl`, vertical padding). `Stack`
|
|
7
|
-
* separates blocks (`gap-10`). Inside a block, children share `gap-3`. Wrap a
|
|
8
|
-
* section title + description in `Header` (`gap-0.5`) so that pair stays tight
|
|
9
|
-
* — don't put them as loose siblings. Parts already carry `px-5`.
|
|
10
|
-
*/
|
|
11
|
-
/** Bordered card that stacks rows with hairline dividers. */
|
|
12
|
-
export declare const SETTINGS_CARD = "divide-y divide-pho-secondary rounded-base border border-pho-secondary bg-pho-primary";
|
|
13
|
-
/**
|
|
14
|
-
* Standalone callout surface — featured block (invite form, notice, etc.).
|
|
15
|
-
* Don't wrap in `Card`; this is the outer chrome.
|
|
16
|
-
*/
|
|
17
|
-
export declare const SETTINGS_CALLOUT = "flex flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5";
|
|
18
|
-
/**
|
|
19
|
-
* One settings row — label (+ optional description) left, control right.
|
|
20
|
-
* `min-h-[4.25rem]` (68px) keeps avatar/control rows from collapsing shorter
|
|
21
|
-
* than a comfortable touch target.
|
|
22
|
-
*/
|
|
23
|
-
export declare const SETTINGS_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";
|
|
24
|
-
/**
|
|
25
|
-
* Page chrome — centered column at the settings content width. Hosts
|
|
26
|
-
* `PageTitle` + `Stack` (and any route-level siblings). Prefer this over
|
|
27
|
-
* ad-hoc `max-w-*` wrappers in the app shell.
|
|
28
|
-
*/
|
|
29
|
-
declare function Page({ className, ...props }: ComponentProps<"div"> & {
|
|
30
|
-
ref?: Ref<HTMLDivElement>;
|
|
31
|
-
}): import("react").JSX.Element;
|
|
32
|
-
/** Page title — largest heading on the surface. */
|
|
33
|
-
declare function PageTitle({ className, children, ...props }: ComponentProps<"h1"> & {
|
|
34
|
-
ref?: Ref<HTMLHeadingElement>;
|
|
35
|
-
}): import("react").JSX.Element;
|
|
36
|
-
/**
|
|
37
|
-
* Vertical stack under the page title. Blocks (forms / sections) use `gap-10`;
|
|
38
|
-
* each block lays out its children with `gap-3`.
|
|
39
|
-
*/
|
|
40
|
-
declare function Stack({ className, ...props }: ComponentProps<"div"> & {
|
|
41
|
-
ref?: Ref<HTMLDivElement>;
|
|
42
|
-
}): import("react").JSX.Element;
|
|
43
|
-
/**
|
|
44
|
-
* Title + optional description pair. Keeps that couple tight (`gap-0.5`) so
|
|
45
|
-
* the block's `gap-3` only applies between this header and the card.
|
|
46
|
-
*/
|
|
47
|
-
declare function Header({ className, ...props }: ComponentProps<"div"> & {
|
|
48
|
-
ref?: Ref<HTMLDivElement>;
|
|
49
|
-
}): import("react").JSX.Element;
|
|
50
|
-
/** Section heading — same padding as the page title, smaller type. */
|
|
51
|
-
declare function SectionTitle({ className, children, ...props }: ComponentProps<"h2"> & {
|
|
52
|
-
ref?: Ref<HTMLHeadingElement>;
|
|
53
|
-
}): import("react").JSX.Element;
|
|
54
|
-
/**
|
|
55
|
-
* Supporting copy under a section title. Same display step as the title;
|
|
56
|
-
* color + normal weight keep it secondary. Always wrap with `Header`.
|
|
57
|
-
*/
|
|
58
|
-
declare function Description({ className, ...props }: ComponentProps<"p"> & {
|
|
59
|
-
ref?: Ref<HTMLParagraphElement>;
|
|
60
|
-
}): import("react").JSX.Element;
|
|
61
|
-
/** Bordered card that stacks settings rows with hairline dividers. */
|
|
62
|
-
declare function Card({ className, ...props }: ComponentProps<"div"> & {
|
|
63
|
-
ref?: Ref<HTMLDivElement>;
|
|
64
|
-
}): import("react").JSX.Element;
|
|
65
|
-
/**
|
|
66
|
-
* Standalone callout. Pair with `CalloutTitle` / `CalloutDescription` (and
|
|
67
|
-
* optional actions) for a featured block — e.g. an invite form. Do not wrap
|
|
68
|
-
* in `Card`; this is already the outer surface.
|
|
69
|
-
*/
|
|
70
|
-
declare function Callout({ className, ...props }: ComponentProps<"div"> & {
|
|
71
|
-
ref?: Ref<HTMLDivElement>;
|
|
72
|
-
}): import("react").JSX.Element;
|
|
73
|
-
/** Callout heading — same type as `SectionTitle`. */
|
|
74
|
-
declare function CalloutTitle({ className, children, ...props }: ComponentProps<"h2"> & {
|
|
75
|
-
ref?: Ref<HTMLHeadingElement>;
|
|
76
|
-
}): import("react").JSX.Element;
|
|
77
|
-
/** Supporting copy under a callout title. */
|
|
78
|
-
declare function CalloutDescription({ className, ...props }: ComponentProps<"p"> & {
|
|
79
|
-
ref?: Ref<HTMLParagraphElement>;
|
|
80
|
-
}): import("react").JSX.Element;
|
|
81
|
-
export interface SettingsRowProps extends Omit<ComponentProps<"div">, "title"> {
|
|
82
|
-
/** Left-side field name. */
|
|
83
|
-
label: string;
|
|
84
|
-
/** Optional helper under the label. */
|
|
85
|
-
description?: ReactNode;
|
|
86
|
-
/** Associates the label with a control id. When omitted, the label is not a `<label>`. */
|
|
87
|
-
htmlFor?: string;
|
|
88
|
-
ref?: Ref<HTMLDivElement>;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* One settings row: label (+ optional description) left, control right.
|
|
92
|
-
* Pass `htmlFor` when the row wraps a labelled input; omit it for display/
|
|
93
|
-
* action rows (avatar, danger-zone delete).
|
|
94
|
-
*/
|
|
95
|
-
declare function Row({ label, description, htmlFor, className, children, ...props }: SettingsRowProps): import("react").JSX.Element;
|
|
96
|
-
/** Read-only value on the right side of a row (email, etc.). */
|
|
97
|
-
declare function Value({ className, ...props }: ComponentProps<"p"> & {
|
|
98
|
-
ref?: Ref<HTMLParagraphElement>;
|
|
99
|
-
}): import("react").JSX.Element;
|
|
100
|
-
/**
|
|
101
|
-
* Inline error under a row (still inside the card). Matches card horizontal
|
|
102
|
-
* padding so hosts don't re-apply `px-5`.
|
|
103
|
-
*/
|
|
104
|
-
declare function Alert({ className, ...props }: ComponentProps<"p"> & {
|
|
105
|
-
ref?: Ref<HTMLParagraphElement>;
|
|
106
|
-
}): import("react").JSX.Element;
|
|
107
|
-
/**
|
|
108
|
-
* Trailing bar inside a card — typically a save status + submit button that
|
|
109
|
-
* appears after the form is dirty. Same horizontal/vertical padding as a row.
|
|
110
|
-
*/
|
|
111
|
-
declare function Footer({ className, ...props }: ComponentProps<"div"> & {
|
|
112
|
-
ref?: Ref<HTMLDivElement>;
|
|
113
|
-
}): import("react").JSX.Element;
|
|
114
|
-
/**
|
|
115
|
-
* Settings page layout. One stack, one gap rhythm — only title scale differs:
|
|
116
|
-
*
|
|
117
|
-
* ```tsx
|
|
118
|
-
* <Settings.Page>
|
|
119
|
-
* <Settings.PageTitle>Profile</Settings.PageTitle>
|
|
120
|
-
* <Settings.Stack>
|
|
121
|
-
* <form>
|
|
122
|
-
* <Settings.Card>
|
|
123
|
-
* <Settings.Row label="Name" htmlFor="first-name">
|
|
124
|
-
* <Input id="first-name" size="sm" />
|
|
125
|
-
* </Settings.Row>
|
|
126
|
-
* </Settings.Card>
|
|
127
|
-
* </form>
|
|
128
|
-
* <form>
|
|
129
|
-
* <Settings.Header>
|
|
130
|
-
* <Settings.SectionTitle>Agent profile</Settings.SectionTitle>
|
|
131
|
-
* <Settings.Description>…</Settings.Description>
|
|
132
|
-
* </Settings.Header>
|
|
133
|
-
* <Settings.Card>…</Settings.Card>
|
|
134
|
-
* </form>
|
|
135
|
-
* <div>
|
|
136
|
-
* <Settings.SectionTitle>Danger zone</Settings.SectionTitle>
|
|
137
|
-
* <Settings.Card>
|
|
138
|
-
* <Settings.Row label="Delete account" description="…">
|
|
139
|
-
* <Button color="destructive" size="sm">Delete</Button>
|
|
140
|
-
* </Settings.Row>
|
|
141
|
-
* </Settings.Card>
|
|
142
|
-
* </div>
|
|
143
|
-
* <Settings.Callout>
|
|
144
|
-
* <Settings.Header>
|
|
145
|
-
* <Settings.CalloutTitle>Invitations</Settings.CalloutTitle>
|
|
146
|
-
* <Settings.CalloutDescription>…</Settings.CalloutDescription>
|
|
147
|
-
* </Settings.Header>
|
|
148
|
-
* …invite form…
|
|
149
|
-
* </Settings.Callout>
|
|
150
|
-
* </Settings.Stack>
|
|
151
|
-
* </Settings.Page>
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
export declare const Settings: {
|
|
155
|
-
Page: typeof Page;
|
|
156
|
-
PageTitle: typeof PageTitle;
|
|
157
|
-
Stack: typeof Stack;
|
|
158
|
-
Header: typeof Header;
|
|
159
|
-
SectionTitle: typeof SectionTitle;
|
|
160
|
-
Description: typeof Description;
|
|
161
|
-
Card: typeof Card;
|
|
162
|
-
Callout: typeof Callout;
|
|
163
|
-
CalloutTitle: typeof CalloutTitle;
|
|
164
|
-
CalloutDescription: typeof CalloutDescription;
|
|
165
|
-
Row: typeof Row;
|
|
166
|
-
Value: typeof Value;
|
|
167
|
-
Alert: typeof Alert;
|
|
168
|
-
Footer: typeof Footer;
|
|
169
|
-
};
|
|
170
|
-
export {};
|