@ponti-studios/ui 0.1.2 → 0.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/LICENSE +21 -0
- package/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +17 -0
- package/dist/index.js +1028 -638
- package/dist/index.js.map +1 -1
- package/package.json +30 -32
- package/src/animations.css +16 -434
- package/src/components/data-display/accordion.tsx +10 -7
- package/src/components/data-display/filter-chip.tsx +2 -2
- package/src/components/data-display/index.ts +5 -0
- package/src/components/data-display/metric-card.stories.tsx +48 -0
- package/src/components/data-display/metric-card.tsx +20 -0
- package/src/components/data-display/sort-controls.stories.tsx +45 -0
- package/src/components/data-display/sort-controls.tsx +99 -0
- package/src/components/data-display/sort-row.tsx +74 -0
- package/src/components/data-display/table.tsx +5 -5
- package/src/components/feedback/alert.tsx +4 -4
- package/src/components/feedback/empty-state.tsx +6 -6
- package/src/components/feedback/file-upload-status-badge.stories.tsx +28 -0
- package/src/components/feedback/file-upload-status-badge.tsx +33 -0
- package/src/components/feedback/file-upload-status.stories.tsx +57 -0
- package/src/components/feedback/file-upload-status.tsx +152 -0
- package/src/components/feedback/index.ts +9 -0
- package/src/components/feedback/progress-bar.stories.tsx +39 -0
- package/src/components/feedback/progress-bar.tsx +21 -0
- package/src/components/feedback/progress.stories.tsx +8 -6
- package/src/components/feedback/progress.tsx +1 -1
- package/src/components/feedback/skeleton.stories.tsx +36 -0
- package/src/components/feedback/skeleton.tsx +7 -0
- package/src/components/feedback/spinner.tsx +2 -2
- package/src/components/feedback/update-guard.stories.tsx +32 -0
- package/src/components/feedback/update-guard.tsx +280 -0
- package/src/components/forms/calendar.tsx +11 -11
- package/src/components/forms/date-month-select.stories.tsx +26 -0
- package/src/components/forms/date-month-select.tsx +70 -0
- package/src/components/forms/date-picker.tsx +3 -3
- package/src/components/forms/drop-zone.stories.tsx +56 -0
- package/src/components/forms/drop-zone.tsx +146 -0
- package/src/components/forms/entity-select.stories.tsx +65 -0
- package/src/components/forms/entity-select.tsx +79 -0
- package/src/components/forms/field.tsx +3 -3
- package/src/components/forms/group-by-select.stories.tsx +26 -0
- package/src/components/forms/group-by-select.tsx +47 -0
- package/src/components/forms/index.ts +10 -0
- package/src/components/forms/input.stories.tsx +4 -4
- package/src/components/forms/input.tsx +1 -1
- package/src/components/forms/passkey-management.stories.tsx +81 -0
- package/src/components/forms/passkey-management.tsx +138 -0
- package/src/components/forms/radio-group.tsx +14 -13
- package/src/components/forms/select.stories.tsx +4 -4
- package/src/components/forms/select.tsx +45 -53
- package/src/components/forms/slider.stories.tsx +5 -2
- package/src/components/forms/slider.tsx +27 -17
- package/src/components/forms/stepper.tsx +4 -4
- package/src/components/forms/switch.stories.tsx +1 -1
- package/src/components/forms/switch.tsx +2 -2
- package/src/components/forms/textarea.stories.tsx +2 -2
- package/src/components/forms/textarea.tsx +1 -1
- package/src/components/layout/index.ts +3 -0
- package/src/components/layout/scroll-area.stories.tsx +4 -4
- package/src/components/layout/scroll-area.tsx +23 -21
- package/src/components/layout/section-intro.stories.tsx +29 -0
- package/src/components/layout/section-intro.tsx +31 -0
- package/src/components/layout/surface-panel.stories.tsx +32 -0
- package/src/components/layout/surface-panel.tsx +15 -0
- package/src/components/navigation/app-navigation.stories.tsx +2 -2
- package/src/components/navigation/app-navigation.tsx +13 -13
- package/src/components/navigation/index.ts +4 -0
- package/src/components/navigation/pagination-controls.stories.tsx +41 -0
- package/src/components/navigation/pagination-controls.tsx +50 -0
- package/src/components/navigation/route-link.stories.tsx +30 -0
- package/src/components/navigation/route-link.tsx +42 -0
- package/src/components/navigation/tabs.stories.tsx +5 -5
- package/src/components/navigation/tabs.tsx +7 -7
- package/src/components/overlays/alert-dialog.tsx +21 -46
- package/src/components/overlays/command.tsx +51 -82
- package/src/components/overlays/dialog.tsx +5 -5
- package/src/components/overlays/dropdown-menu.stories.tsx +0 -5
- package/src/components/overlays/dropdown-menu.tsx +44 -142
- package/src/components/overlays/popover.stories.tsx +2 -2
- package/src/components/overlays/popover.tsx +34 -16
- package/src/components/overlays/sheet.stories.tsx +2 -2
- package/src/components/overlays/sheet.tsx +35 -17
- package/src/components/primitives/avatar.tsx +3 -3
- package/src/components/primitives/badge.tsx +7 -11
- package/src/components/primitives/button.tsx +41 -13
- package/src/components/primitives/card.stories.tsx +2 -2
- package/src/components/primitives/card.tsx +2 -2
- package/src/components/primitives/index.ts +2 -0
- package/src/components/primitives/label.stories.tsx +1 -1
- package/src/components/primitives/label.tsx +5 -6
- package/src/components/primitives/status-badge.stories.tsx +52 -0
- package/src/components/primitives/status-badge.tsx +33 -0
- package/src/constants/chart-colors.ts +5 -5
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-sort.ts +20 -0
- package/src/index.ts +30 -11
- package/src/styles.css +76 -1040
- package/src/tokens/color-systems.stories.tsx +9 -119
- package/src/tokens/foundations.stories.tsx +21 -113
- package/src/tokens/generated/dark.colors.generated.ts +56 -0
- package/src/tokens/generated/dark.css +54 -0
- package/src/tokens/generated/foundations.css +148 -0
- package/src/tokens/generated/foundations.generated.ts +443 -0
- package/src/tokens/generated/light.colors.generated.ts +56 -0
- package/src/tokens/generated/light.css +54 -0
- package/src/tokens/index.ts +74 -16
- package/src/tokens/layout.stories.tsx +3 -108
- package/src/tokens/colors.ts +0 -156
- package/src/tokens/motion.ts +0 -51
- package/src/tokens/radii.ts +0 -10
- package/src/tokens/shadows.ts +0 -34
- package/src/tokens/spacing.ts +0 -30
- package/src/tokens/typography.ts +0 -42
|
@@ -1,132 +1,22 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
2
|
|
|
3
3
|
import { Button } from "../components/primitives/button";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const meta: Meta = {
|
|
7
|
-
title: "Foundations/Colors",
|
|
8
|
-
parameters: { layout: "fullscreen" },
|
|
9
|
-
};
|
|
4
|
+
import { colorTokenNames } from "./index";
|
|
10
5
|
|
|
6
|
+
const meta: Meta = { title: "Foundations/Colors", parameters: { layout: "fullscreen" } };
|
|
11
7
|
export default meta;
|
|
12
8
|
type Story = StoryObj<typeof meta>;
|
|
13
9
|
|
|
14
|
-
const
|
|
15
|
-
surfaces: colorTokenNames.filter((token) => token.startsWith("surface-")),
|
|
16
|
-
content: colorTokenNames.filter((token) => token.startsWith("text-")),
|
|
17
|
-
structure: colorTokenNames.filter((token) => token.startsWith("border-")),
|
|
18
|
-
intent: colorTokenNames.filter(
|
|
19
|
-
(token) =>
|
|
20
|
-
token.startsWith("accent") ||
|
|
21
|
-
token.startsWith("destructive") ||
|
|
22
|
-
token.startsWith("success") ||
|
|
23
|
-
token.startsWith("warning") ||
|
|
24
|
-
token === "overlay-scrim" ||
|
|
25
|
-
token === "ring-focus",
|
|
26
|
-
),
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
function Swatch({ mode, token }: { mode: ColorMode; token: string }) {
|
|
30
|
-
const value = colorSystems.ponti[mode][token as keyof (typeof colorSystems.ponti)[typeof mode]];
|
|
31
|
-
const foreground = token.startsWith("text-") ? value : colorSystems.ponti[mode]["text-primary"];
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div className="grid min-w-0 gap-2">
|
|
35
|
-
<div
|
|
36
|
-
className="flex min-h-16 items-end overflow-hidden rounded-md border p-2"
|
|
37
|
-
style={{
|
|
38
|
-
background: value,
|
|
39
|
-
color: foreground,
|
|
40
|
-
borderColor: colorSystems.ponti[mode]["border-default"],
|
|
41
|
-
}}
|
|
42
|
-
>
|
|
43
|
-
<span className="font-mono text-[11px] break-all">Aa</span>
|
|
44
|
-
</div>
|
|
45
|
-
<span
|
|
46
|
-
className="font-mono text-[11px] break-all"
|
|
47
|
-
style={{ color: colorSystems.ponti[mode]["text-secondary"] }}
|
|
48
|
-
>
|
|
49
|
-
{token}
|
|
50
|
-
</span>
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function ThemePanel({ mode }: { mode: ColorMode }) {
|
|
56
|
-
const theme = colorSystems.ponti[mode];
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<section
|
|
60
|
-
className="grid min-w-0 gap-6 rounded-xl border p-5"
|
|
61
|
-
style={{
|
|
62
|
-
background: theme["surface-canvas"],
|
|
63
|
-
color: theme["text-primary"],
|
|
64
|
-
borderColor: theme["border-default"],
|
|
65
|
-
}}
|
|
66
|
-
aria-label={`Ponti ${mode} color system`}
|
|
67
|
-
>
|
|
68
|
-
<header className="grid gap-2">
|
|
69
|
-
<p className="font-mono text-xs uppercase" style={{ color: theme["text-secondary"] }}>
|
|
70
|
-
Ponti / {mode}
|
|
71
|
-
</p>
|
|
72
|
-
<h2 className="text-xl font-semibold">Semantic roles</h2>
|
|
73
|
-
<p className="max-w-prose text-sm" style={{ color: theme["text-secondary"] }}>
|
|
74
|
-
Components consume meaning, while this palette supplies the light or dark value.
|
|
75
|
-
</p>
|
|
76
|
-
</header>
|
|
77
|
-
<div className="flex flex-wrap gap-2">
|
|
78
|
-
<Button>Primary action</Button>
|
|
79
|
-
<Button variant="secondary">Secondary action</Button>
|
|
80
|
-
<Button variant="outline">Outline action</Button>
|
|
81
|
-
<Button variant="ghost">Quiet action</Button>
|
|
82
|
-
<Button variant="destructive">Delete item</Button>
|
|
83
|
-
</div>
|
|
84
|
-
<div className="grid gap-6">
|
|
85
|
-
{Object.entries(groups).map(([title, tokens]) => (
|
|
86
|
-
<section key={title} className="grid gap-3">
|
|
87
|
-
<h3 className="text-sm font-semibold capitalize">{title}</h3>
|
|
88
|
-
<div className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4">
|
|
89
|
-
{tokens.map((token) => (
|
|
90
|
-
<Swatch key={token} mode={mode} token={token} />
|
|
91
|
-
))}
|
|
92
|
-
</div>
|
|
93
|
-
</section>
|
|
94
|
-
))}
|
|
95
|
-
</div>
|
|
96
|
-
</section>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export const LightAndDark: Story = {
|
|
101
|
-
render: () => (
|
|
102
|
-
<main className="grid min-h-screen gap-4 bg-slate-100 p-4 md:p-6 dark:bg-slate-950">
|
|
103
|
-
<ThemePanel mode="light" />
|
|
104
|
-
<ThemePanel mode="dark" />
|
|
105
|
-
</main>
|
|
106
|
-
),
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export const ButtonStates: Story = {
|
|
10
|
+
export const SystemAppearance: Story = {
|
|
110
11
|
render: () => (
|
|
111
|
-
<main className="bg-
|
|
12
|
+
<main className="bg-background text-foreground grid min-h-screen gap-8 p-6 md:p-10">
|
|
112
13
|
<header className="grid gap-2">
|
|
113
|
-
<h1 className="text-2xl font-semibold">
|
|
114
|
-
<p className="text-
|
|
115
|
-
Inspect hover, focus, press, disabled, destructive, and loading behavior in the toolbar’s
|
|
116
|
-
light and dark modes.
|
|
117
|
-
</p>
|
|
14
|
+
<h1 className="text-2xl font-semibold">System color roles</h1>
|
|
15
|
+
<p className="text-muted-foreground max-w-prose text-sm">These semantic roles resolve from the operating system’s light or dark appearance. CSS is the single source of their values.</p>
|
|
118
16
|
</header>
|
|
119
|
-
<div className="
|
|
120
|
-
|
|
121
|
-
<
|
|
122
|
-
<Button variant="outline">Outline action</Button>
|
|
123
|
-
<Button variant="ghost">Quiet action</Button>
|
|
124
|
-
<Button variant="destructive">Delete item</Button>
|
|
125
|
-
<Button variant="link">Read more</Button>
|
|
126
|
-
<Button disabled>Disabled action</Button>
|
|
127
|
-
<Button isLoading loadingLabel="Saving">
|
|
128
|
-
Save changes
|
|
129
|
-
</Button>
|
|
17
|
+
<div className="flex flex-wrap gap-2"><Button>Primary action</Button><Button variant="secondary">Secondary action</Button><Button variant="outline">Outline action</Button><Button variant="destructive">Delete item</Button></div>
|
|
18
|
+
<div className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4">
|
|
19
|
+
{colorTokenNames.map((token) => <div key={token} className="border-border grid min-h-20 content-end rounded-md border p-3" style={{ backgroundColor: `var(--color-${token})` }}><span className="bg-background text-foreground w-fit rounded px-1 font-mono text-xs">{token}</span></div>)}
|
|
130
20
|
</div>
|
|
131
21
|
</main>
|
|
132
22
|
),
|
|
@@ -1,59 +1,33 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
2
|
|
|
3
|
-
const meta: Meta = {
|
|
4
|
-
title: "Foundations/System Lab",
|
|
5
|
-
parameters: { layout: "fullscreen" },
|
|
6
|
-
};
|
|
7
|
-
|
|
3
|
+
const meta: Meta = { title: "Foundations/Tailwind Defaults", parameters: { layout: "fullscreen" } };
|
|
8
4
|
export default meta;
|
|
9
5
|
type Story = StoryObj<typeof meta>;
|
|
10
6
|
|
|
11
7
|
export const SpacingAndType: Story = {
|
|
12
8
|
render: () => (
|
|
13
|
-
<main className="
|
|
9
|
+
<main className="grid min-h-screen gap-10 bg-background p-6 text-foreground md:p-10">
|
|
14
10
|
<section className="grid gap-6">
|
|
15
11
|
<header className="grid gap-2">
|
|
16
|
-
<p className="
|
|
17
|
-
<h1 className="
|
|
18
|
-
<p className="
|
|
19
|
-
The specimen uses the shared interval scale and the four local typography roles.
|
|
20
|
-
</p>
|
|
12
|
+
<p className="text-sm text-muted-foreground">Foundations / rhythm</p>
|
|
13
|
+
<h1 className="text-4xl font-semibold tracking-tight">Tailwind defaults, directly.</h1>
|
|
14
|
+
<p className="max-w-2xl text-base text-muted-foreground">The specimen uses the shared Tailwind spacing and type scales.</p>
|
|
21
15
|
</header>
|
|
22
16
|
<div className="grid gap-2">
|
|
23
|
-
{[
|
|
17
|
+
{[1, 2, 3, 4, 6, 8, 12, 16].map((size) => (
|
|
24
18
|
<div key={size} className="flex items-center gap-3">
|
|
25
|
-
<span className="
|
|
26
|
-
<div
|
|
27
|
-
className="bg-accent h-3 rounded-sm"
|
|
28
|
-
style={{ width: size }}
|
|
29
|
-
aria-hidden="true"
|
|
30
|
-
/>
|
|
19
|
+
<span className="w-12 font-mono text-xs tabular-nums text-muted-foreground">{size}</span>
|
|
20
|
+
<div className="h-3 rounded-sm bg-accent" style={{ width: `calc(var(--spacing) * ${size})` }} aria-hidden="true" />
|
|
31
21
|
</div>
|
|
32
22
|
))}
|
|
33
23
|
</div>
|
|
34
24
|
</section>
|
|
35
|
-
<section className="
|
|
36
|
-
<h2 className="
|
|
25
|
+
<section className="grid gap-5 rounded-xl border border-border bg-card p-6">
|
|
26
|
+
<h2 className="text-2xl font-semibold">Typography scale</h2>
|
|
37
27
|
<div className="grid gap-4">
|
|
38
|
-
|
|
39
|
-
<p className=
|
|
40
|
-
|
|
41
|
-
</div>
|
|
42
|
-
<div>
|
|
43
|
-
<p className="text-secondary text-xs uppercase">Body</p>
|
|
44
|
-
<p className="body-1 max-w-2xl">
|
|
45
|
-
Readable content should have room to breathe and should not require the user to decode
|
|
46
|
-
the container.
|
|
47
|
-
</p>
|
|
48
|
-
</div>
|
|
49
|
-
<div>
|
|
50
|
-
<p className="text-secondary text-xs uppercase">Label</p>
|
|
51
|
-
<p className="body-3 font-medium">Current collection</p>
|
|
52
|
-
</div>
|
|
53
|
-
<div>
|
|
54
|
-
<p className="text-secondary text-xs uppercase">Caption</p>
|
|
55
|
-
<p className="body-4 text-secondary">Updated just now</p>
|
|
56
|
-
</div>
|
|
28
|
+
{(["text-xs", "text-sm", "text-base", "text-lg", "text-xl", "text-2xl", "text-4xl"] as const).map((size) => (
|
|
29
|
+
<p key={size} className={`${size} text-foreground`}>{size}</p>
|
|
30
|
+
))}
|
|
57
31
|
</div>
|
|
58
32
|
</section>
|
|
59
33
|
</main>
|
|
@@ -62,28 +36,10 @@ export const SpacingAndType: Story = {
|
|
|
62
36
|
|
|
63
37
|
export const Surfaces: Story = {
|
|
64
38
|
render: () => (
|
|
65
|
-
<main className="
|
|
66
|
-
<header className="grid gap-2">
|
|
67
|
-
<p className="body-4 text-secondary">Foundations / surfaces</p>
|
|
68
|
-
<h1 className="display-1">Quiet layers, clear ownership.</h1>
|
|
69
|
-
</header>
|
|
39
|
+
<main className="grid min-h-screen gap-6 bg-background p-6 text-foreground md:p-10">
|
|
40
|
+
<header className="grid gap-2"><p className="text-sm text-muted-foreground">Foundations / surfaces</p><h1 className="text-4xl font-semibold tracking-tight">Standard semantic layers.</h1></header>
|
|
70
41
|
<div className="grid gap-4 md:grid-cols-2">
|
|
71
|
-
|
|
72
|
-
<h2 className="heading-3">Canvas</h2>
|
|
73
|
-
<p className="body-3 text-secondary">The page background.</p>
|
|
74
|
-
</div>
|
|
75
|
-
<div className="bg-panel border-subtle grid min-h-40 content-start gap-2 rounded-xl border p-5">
|
|
76
|
-
<h2 className="heading-3">Panel</h2>
|
|
77
|
-
<p className="body-3 text-secondary">A contained region.</p>
|
|
78
|
-
</div>
|
|
79
|
-
<div className="bg-raised border-subtle grid min-h-40 content-start gap-2 rounded-xl border p-5">
|
|
80
|
-
<h2 className="heading-3">Raised</h2>
|
|
81
|
-
<p className="body-3 text-secondary">An overlay or elevated layer.</p>
|
|
82
|
-
</div>
|
|
83
|
-
<div className="bg-inset border-subtle grid min-h-40 content-start gap-2 rounded-xl border p-5">
|
|
84
|
-
<h2 className="heading-3">Inset</h2>
|
|
85
|
-
<p className="body-3 text-secondary">A recessed working region.</p>
|
|
86
|
-
</div>
|
|
42
|
+
{[["Background", "bg-background"], ["Card", "bg-card"], ["Popover", "bg-popover"], ["Muted", "bg-muted"]].map(([name, className]) => <div key={name} className={`${className} grid min-h-40 content-start gap-2 rounded-xl border border-border p-5`}><h2 className="text-lg font-semibold">{name}</h2><p className="text-sm text-muted-foreground">{className}</p></div>)}
|
|
87
43
|
</div>
|
|
88
44
|
</main>
|
|
89
45
|
),
|
|
@@ -91,61 +47,13 @@ export const Surfaces: Story = {
|
|
|
91
47
|
|
|
92
48
|
export const Motion: Story = {
|
|
93
49
|
render: () => (
|
|
94
|
-
<main className="
|
|
95
|
-
<header className="grid gap-2">
|
|
96
|
-
<p className="body-4 text-secondary">Foundations / motion</p>
|
|
97
|
-
<h1 className="display-1">Motion should explain, not perform.</h1>
|
|
98
|
-
<p className="body-1 text-secondary max-w-2xl">
|
|
99
|
-
Use the Storybook motion-reduction setting to confirm that nonessential movement
|
|
100
|
-
disappears.
|
|
101
|
-
</p>
|
|
102
|
-
</header>
|
|
50
|
+
<main className="grid min-h-screen gap-8 bg-background p-6 text-foreground md:p-10">
|
|
51
|
+
<header className="grid gap-2"><p className="text-sm text-muted-foreground">Foundations / motion</p><h1 className="text-4xl font-semibold tracking-tight">Motion stays standard and reducible.</h1></header>
|
|
103
52
|
<div className="grid gap-4 sm:grid-cols-3">
|
|
104
|
-
<div className="
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
</div>
|
|
108
|
-
<button className="bg-panel border-subtle text-primary hover:bg-surface-hover active:bg-surface-pressed focus-visible:ring-focus grid min-h-32 place-content-center gap-2 rounded-xl border p-5 text-left focus-visible:ring-2 focus-visible:outline-none motion-safe:transition-colors">
|
|
109
|
-
<span className="heading-3">Press</span>
|
|
110
|
-
<span className="body-4 text-secondary">Immediate feedback</span>
|
|
111
|
-
</button>
|
|
112
|
-
<div className="bg-panel border-subtle grid min-h-32 place-content-center gap-2 rounded-xl border p-5 motion-safe:animate-pulse motion-reduce:animate-none">
|
|
113
|
-
<span className="heading-3">Loading</span>
|
|
114
|
-
<span className="body-4 text-secondary">Geometry remains stable</span>
|
|
115
|
-
</div>
|
|
53
|
+
<div className="motion-safe:animate-in motion-safe:fade-in-0 grid min-h-32 place-content-center gap-2 rounded-xl border border-border bg-card p-5 motion-reduce:animate-none"><span className="text-lg font-semibold">Enter</span><span className="text-sm text-muted-foreground">150ms</span></div>
|
|
54
|
+
<button className="grid min-h-32 place-content-center gap-2 rounded-xl border border-border bg-card p-5 text-left transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none"><span className="text-lg font-semibold">Press</span><span className="text-sm text-muted-foreground">System focus</span></button>
|
|
55
|
+
<div className="grid min-h-32 place-content-center gap-2 rounded-xl border border-border bg-card p-5 motion-safe:animate-pulse motion-reduce:animate-none"><span className="text-lg font-semibold">Loading</span><span className="text-sm text-muted-foreground">Stable geometry</span></div>
|
|
116
56
|
</div>
|
|
117
57
|
</main>
|
|
118
58
|
),
|
|
119
59
|
};
|
|
120
|
-
|
|
121
|
-
export const Accessibility: Story = {
|
|
122
|
-
render: () => (
|
|
123
|
-
<main className="bg-canvas text-primary grid min-h-screen gap-8 p-6 md:p-10">
|
|
124
|
-
<header className="grid gap-2">
|
|
125
|
-
<p className="body-4 text-secondary">Foundations / accessibility</p>
|
|
126
|
-
<h1 className="display-1">The system should be calm for everyone.</h1>
|
|
127
|
-
</header>
|
|
128
|
-
<section className="border-subtle grid max-w-2xl gap-5 rounded-xl border p-6">
|
|
129
|
-
<label className="grid gap-2">
|
|
130
|
-
<span className="body-3 font-medium">Email address</span>
|
|
131
|
-
<input
|
|
132
|
-
className="bg-canvas border-default text-primary focus-visible:ring-focus h-11 rounded-md border px-3 outline-none focus-visible:ring-2"
|
|
133
|
-
placeholder="you@example.com"
|
|
134
|
-
/>
|
|
135
|
-
<span className="body-4 text-secondary">Use a reachable address for notifications.</span>
|
|
136
|
-
</label>
|
|
137
|
-
<div className="flex flex-wrap gap-3">
|
|
138
|
-
<button className="bg-accent text-on-accent focus-visible:ring-focus min-h-11 rounded-md px-4 focus-visible:ring-2 focus-visible:outline-none">
|
|
139
|
-
Continue
|
|
140
|
-
</button>
|
|
141
|
-
<button disabled className="bg-panel text-disabled min-h-11 rounded-md px-4">
|
|
142
|
-
Unavailable
|
|
143
|
-
</button>
|
|
144
|
-
</div>
|
|
145
|
-
<p className="body-4 text-destructive" role="alert">
|
|
146
|
-
Example error: enter a valid email address.
|
|
147
|
-
</p>
|
|
148
|
-
</section>
|
|
149
|
-
</main>
|
|
150
|
-
),
|
|
151
|
-
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
color: {
|
|
7
|
+
"surface-canvas": "#111111",
|
|
8
|
+
"surface-panel": "#1b1b1b",
|
|
9
|
+
"surface-raised": "#222222",
|
|
10
|
+
"surface-inset": "#222222",
|
|
11
|
+
"surface-hover": "#393939",
|
|
12
|
+
"surface-pressed": "#6d6d6d",
|
|
13
|
+
"surface-selected": "#0c2175",
|
|
14
|
+
"surface-disabled": "#393939",
|
|
15
|
+
"overlay-scrim": "#000000",
|
|
16
|
+
"text-primary": "#f2f2f2",
|
|
17
|
+
"text-secondary": "#afafaf",
|
|
18
|
+
"text-tertiary": "#8a8a8a",
|
|
19
|
+
"text-disabled": "#6d6d6d",
|
|
20
|
+
"text-accent": "#5681ff",
|
|
21
|
+
"text-destructive": "#fc432e",
|
|
22
|
+
"text-success": "#099d59",
|
|
23
|
+
"text-warning": "#e06400",
|
|
24
|
+
"text-on-accent": "#ffffff",
|
|
25
|
+
"text-on-destructive": "#ffffff",
|
|
26
|
+
"text-on-success": "#ffffff",
|
|
27
|
+
"text-on-warning": "#000000",
|
|
28
|
+
"border-subtle": "#393939",
|
|
29
|
+
"border-default": "#444444",
|
|
30
|
+
"border-strong": "#6d6d6d",
|
|
31
|
+
"border-focus": "#4069fd",
|
|
32
|
+
"border-accent": "#4069fd",
|
|
33
|
+
"border-destructive": "#fc432e",
|
|
34
|
+
accent: "#4069fd",
|
|
35
|
+
"accent-hover": "#345bf8",
|
|
36
|
+
"accent-pressed": "#345bf8",
|
|
37
|
+
"accent-subtle": "#0c2175",
|
|
38
|
+
destructive: "#df3422",
|
|
39
|
+
"destructive-hover": "#cd2e1d",
|
|
40
|
+
"destructive-pressed": "#cd2e1d",
|
|
41
|
+
"destructive-subtle": "#571107",
|
|
42
|
+
success: "#068850",
|
|
43
|
+
"success-subtle": "#003326",
|
|
44
|
+
warning: "#e06400",
|
|
45
|
+
"warning-subtle": "#501b00",
|
|
46
|
+
"ring-focus": "#4069fd",
|
|
47
|
+
"chart-1": "#5681ff",
|
|
48
|
+
"chart-2": "#099d59",
|
|
49
|
+
"chart-3": "#5681ff",
|
|
50
|
+
"chart-4": "#e06400",
|
|
51
|
+
"chart-5": "#8a8a8a",
|
|
52
|
+
"chart-positive": "#099d59",
|
|
53
|
+
"chart-negative": "#fc432e",
|
|
54
|
+
"chart-neutral": "#8a8a8a",
|
|
55
|
+
},
|
|
56
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--color-surface-canvas: #111111;
|
|
7
|
+
--color-surface-panel: #1b1b1b;
|
|
8
|
+
--color-surface-raised: #222222;
|
|
9
|
+
--color-surface-inset: #222222;
|
|
10
|
+
--color-surface-hover: #393939;
|
|
11
|
+
--color-surface-pressed: #6d6d6d;
|
|
12
|
+
--color-surface-selected: #0c2175;
|
|
13
|
+
--color-surface-disabled: #393939;
|
|
14
|
+
--color-overlay-scrim: #000000;
|
|
15
|
+
--color-text-primary: #f2f2f2;
|
|
16
|
+
--color-text-secondary: #afafaf;
|
|
17
|
+
--color-text-tertiary: #8a8a8a;
|
|
18
|
+
--color-text-disabled: #6d6d6d;
|
|
19
|
+
--color-text-accent: #5681ff;
|
|
20
|
+
--color-text-destructive: #fc432e;
|
|
21
|
+
--color-text-success: #099d59;
|
|
22
|
+
--color-text-warning: #e06400;
|
|
23
|
+
--color-text-on-accent: #ffffff;
|
|
24
|
+
--color-text-on-destructive: #ffffff;
|
|
25
|
+
--color-text-on-success: #ffffff;
|
|
26
|
+
--color-text-on-warning: #000000;
|
|
27
|
+
--color-border-subtle: #393939;
|
|
28
|
+
--color-border-default: #444444;
|
|
29
|
+
--color-border-strong: #6d6d6d;
|
|
30
|
+
--color-border-focus: #4069fd;
|
|
31
|
+
--color-border-accent: #4069fd;
|
|
32
|
+
--color-border-destructive: #fc432e;
|
|
33
|
+
--color-accent: #4069fd;
|
|
34
|
+
--color-accent-hover: #345bf8;
|
|
35
|
+
--color-accent-pressed: #345bf8;
|
|
36
|
+
--color-accent-subtle: #0c2175;
|
|
37
|
+
--color-destructive: #df3422;
|
|
38
|
+
--color-destructive-hover: #cd2e1d;
|
|
39
|
+
--color-destructive-pressed: #cd2e1d;
|
|
40
|
+
--color-destructive-subtle: #571107;
|
|
41
|
+
--color-success: #068850;
|
|
42
|
+
--color-success-subtle: #003326;
|
|
43
|
+
--color-warning: #e06400;
|
|
44
|
+
--color-warning-subtle: #501b00;
|
|
45
|
+
--color-ring-focus: #4069fd;
|
|
46
|
+
--color-chart-1: #5681ff;
|
|
47
|
+
--color-chart-2: #099d59;
|
|
48
|
+
--color-chart-3: #5681ff;
|
|
49
|
+
--color-chart-4: #e06400;
|
|
50
|
+
--color-chart-5: #8a8a8a;
|
|
51
|
+
--color-chart-positive: #099d59;
|
|
52
|
+
--color-chart-negative: #fc432e;
|
|
53
|
+
--color-chart-neutral: #8a8a8a;
|
|
54
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--spacing: 0.25rem;
|
|
7
|
+
--spacing-scale-0: 0rem;
|
|
8
|
+
--spacing-scale-1: 0.25rem;
|
|
9
|
+
--spacing-scale-2: 0.5rem;
|
|
10
|
+
--spacing-scale-3: 0.75rem;
|
|
11
|
+
--spacing-scale-4: 1rem;
|
|
12
|
+
--spacing-scale-5: 1.25rem;
|
|
13
|
+
--spacing-scale-6: 1.5rem;
|
|
14
|
+
--spacing-scale-7: 1.75rem;
|
|
15
|
+
--spacing-scale-8: 2rem;
|
|
16
|
+
--spacing-scale-9: 2.25rem;
|
|
17
|
+
--spacing-scale-10: 2.5rem;
|
|
18
|
+
--spacing-scale-11: 2.75rem;
|
|
19
|
+
--spacing-scale-12: 3rem;
|
|
20
|
+
--spacing-scale-14: 3.5rem;
|
|
21
|
+
--spacing-scale-16: 4rem;
|
|
22
|
+
--spacing-scale-20: 5rem;
|
|
23
|
+
--spacing-scale-24: 6rem;
|
|
24
|
+
--spacing-scale-28: 7rem;
|
|
25
|
+
--spacing-scale-32: 8rem;
|
|
26
|
+
--spacing-scale-36: 9rem;
|
|
27
|
+
--spacing-scale-40: 10rem;
|
|
28
|
+
--spacing-scale-44: 11rem;
|
|
29
|
+
--spacing-scale-48: 12rem;
|
|
30
|
+
--spacing-scale-52: 13rem;
|
|
31
|
+
--spacing-scale-56: 14rem;
|
|
32
|
+
--spacing-scale-60: 15rem;
|
|
33
|
+
--spacing-scale-64: 16rem;
|
|
34
|
+
--spacing-scale-72: 18rem;
|
|
35
|
+
--spacing-scale-80: 20rem;
|
|
36
|
+
--spacing-scale-96: 24rem;
|
|
37
|
+
--spacing-scale-px: 1px;
|
|
38
|
+
--spacing-scale-0-5: 0.125rem;
|
|
39
|
+
--spacing-scale-1-5: 0.375rem;
|
|
40
|
+
--spacing-scale-2-5: 0.625rem;
|
|
41
|
+
--spacing-scale-3-5: 0.875rem;
|
|
42
|
+
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
43
|
+
--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
|
|
44
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
45
|
+
--text-xs: 0.75rem;
|
|
46
|
+
--text-sm: 0.875rem;
|
|
47
|
+
--text-base: 1rem;
|
|
48
|
+
--text-lg: 1.125rem;
|
|
49
|
+
--text-xl: 1.25rem;
|
|
50
|
+
--text-2xl: 1.5rem;
|
|
51
|
+
--text-3xl: 1.875rem;
|
|
52
|
+
--text-4xl: 2.25rem;
|
|
53
|
+
--text-5xl: 3rem;
|
|
54
|
+
--text-6xl: 3.75rem;
|
|
55
|
+
--text-7xl: 4.5rem;
|
|
56
|
+
--text-8xl: 6rem;
|
|
57
|
+
--text-9xl: 8rem;
|
|
58
|
+
--text-line-height-xs: 1.3333333333;
|
|
59
|
+
--text-line-height-sm: 1.4285714286;
|
|
60
|
+
--text-line-height-base: 1.5;
|
|
61
|
+
--text-line-height-lg: 1.5555555556;
|
|
62
|
+
--text-line-height-xl: 1.4;
|
|
63
|
+
--text-line-height-2xl: 1.3333333333;
|
|
64
|
+
--text-line-height-3xl: 1.2;
|
|
65
|
+
--text-line-height-4xl: 1.1111111111;
|
|
66
|
+
--text-line-height-5xl: 1;
|
|
67
|
+
--text-line-height-6xl: 1;
|
|
68
|
+
--text-line-height-7xl: 1;
|
|
69
|
+
--text-line-height-8xl: 1;
|
|
70
|
+
--text-line-height-9xl: 1;
|
|
71
|
+
--font-weight-thin: 100;
|
|
72
|
+
--font-weight-extralight: 200;
|
|
73
|
+
--font-weight-light: 300;
|
|
74
|
+
--font-weight-normal: 400;
|
|
75
|
+
--font-weight-medium: 500;
|
|
76
|
+
--font-weight-semibold: 600;
|
|
77
|
+
--font-weight-bold: 700;
|
|
78
|
+
--font-weight-extrabold: 800;
|
|
79
|
+
--font-weight-black: 900;
|
|
80
|
+
--tracking-tighter: -0.05em;
|
|
81
|
+
--tracking-tight: -0.025em;
|
|
82
|
+
--tracking-normal: 0em;
|
|
83
|
+
--tracking-wide: 0.025em;
|
|
84
|
+
--tracking-wider: 0.05em;
|
|
85
|
+
--tracking-widest: 0.1em;
|
|
86
|
+
--leading-tight: 1.25;
|
|
87
|
+
--leading-snug: 1.375;
|
|
88
|
+
--leading-normal: 1.5;
|
|
89
|
+
--leading-relaxed: 1.625;
|
|
90
|
+
--leading-loose: 2;
|
|
91
|
+
--radius-xs: 0.125rem;
|
|
92
|
+
--radius-sm: 0.25rem;
|
|
93
|
+
--radius-md: 0.375rem;
|
|
94
|
+
--radius-lg: 0.5rem;
|
|
95
|
+
--radius-xl: 0.75rem;
|
|
96
|
+
--radius-2xl: 1rem;
|
|
97
|
+
--radius-3xl: 1.5rem;
|
|
98
|
+
--radius-4xl: 2rem;
|
|
99
|
+
--radius-full: 9999px;
|
|
100
|
+
--shadow-2xs: 0px 1px 0px 0px rgb(0 0 0 / 0.05);
|
|
101
|
+
--shadow-xs: 0px 1px 2px 0px rgb(0 0 0 / 0.05);
|
|
102
|
+
--shadow-sm: 0px 1px 3px 0px rgb(0 0 0 / 0.1), 0px 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
103
|
+
--shadow-md: 0px 4px 6px -1px rgb(0 0 0 / 0.1), 0px 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
104
|
+
--shadow-lg: 0px 10px 15px -3px rgb(0 0 0 / 0.1), 0px 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
105
|
+
--shadow-xl: 0px 20px 25px -5px rgb(0 0 0 / 0.1), 0px 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
106
|
+
--shadow-2xl: 0px 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
107
|
+
--shadow-none: 0px 0px 0px 0px transparent;
|
|
108
|
+
--breakpoint-sm: 40rem;
|
|
109
|
+
--breakpoint-md: 48rem;
|
|
110
|
+
--breakpoint-lg: 64rem;
|
|
111
|
+
--breakpoint-xl: 80rem;
|
|
112
|
+
--breakpoint-2xl: 96rem;
|
|
113
|
+
--container-3xs: 16rem;
|
|
114
|
+
--container-2xs: 18rem;
|
|
115
|
+
--container-xs: 20rem;
|
|
116
|
+
--container-sm: 24rem;
|
|
117
|
+
--container-md: 28rem;
|
|
118
|
+
--container-lg: 32rem;
|
|
119
|
+
--container-xl: 36rem;
|
|
120
|
+
--container-2xl: 42rem;
|
|
121
|
+
--container-3xl: 48rem;
|
|
122
|
+
--container-4xl: 56rem;
|
|
123
|
+
--container-5xl: 64rem;
|
|
124
|
+
--container-6xl: 72rem;
|
|
125
|
+
--container-7xl: 80rem;
|
|
126
|
+
--z-index-0: 0;
|
|
127
|
+
--z-index-10: 10;
|
|
128
|
+
--z-index-20: 20;
|
|
129
|
+
--z-index-30: 30;
|
|
130
|
+
--z-index-40: 40;
|
|
131
|
+
--z-index-50: 50;
|
|
132
|
+
--z-index-auto: auto;
|
|
133
|
+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
134
|
+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
135
|
+
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
136
|
+
--duration-75: 75ms;
|
|
137
|
+
--duration-100: 100ms;
|
|
138
|
+
--duration-150: 150ms;
|
|
139
|
+
--duration-200: 200ms;
|
|
140
|
+
--duration-300: 300ms;
|
|
141
|
+
--duration-500: 500ms;
|
|
142
|
+
--duration-700: 700ms;
|
|
143
|
+
--duration-1000: 1000ms;
|
|
144
|
+
--animate-spin: spin 1s linear infinite;
|
|
145
|
+
--animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
146
|
+
--animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
147
|
+
--animate-bounce: bounce 1s infinite;
|
|
148
|
+
}
|