@xenide-io/the-old-ui-theme 0.2.6 → 0.2.9
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/chunk-SHF57J7U.mjs +2910 -0
- package/dist/index-CmS6hcUk.d.mts +753 -0
- package/dist/index-CmS6hcUk.d.ts +753 -0
- package/dist/index.d.mts +5 -755
- package/dist/index.d.ts +5 -755
- package/dist/index.js +43 -23
- package/dist/index.mjs +252 -2846
- package/dist/ui.d.mts +3 -0
- package/dist/ui.d.ts +3 -0
- package/dist/ui.js +2946 -0
- package/dist/ui.mjs +139 -0
- package/package.json +11 -3
- package/src/components/charts/index.ts +8 -0
- package/src/components/charts/ph-insight-charts.tsx +162 -0
- package/src/components/dashboard/DashboardFiltersBar.tsx +19 -0
- package/src/components/dashboard/DashboardGrid.tsx +23 -0
- package/src/components/dashboard/DashboardInsightPlaceholder.tsx +37 -0
- package/src/components/dashboard/DashboardKpiCard.tsx +25 -0
- package/src/components/dashboard/DashboardToolbar.tsx +23 -0
- package/src/components/dashboard/DashboardWell.tsx +10 -0
- package/src/components/dashboard/InsightMiniCard.tsx +26 -0
- package/src/components/dashboard/InsightShell.tsx +37 -0
- package/src/components/dashboard/InsightShellHeader.tsx +22 -0
- package/src/components/dashboard/MiniTrendBars.tsx +51 -0
- package/src/components/dashboard/index.ts +31 -0
- package/src/components/dashboard/types.ts +9 -0
- package/src/components/icons/IconBase.tsx +39 -0
- package/src/components/icons/createIconBase.tsx +27 -0
- package/src/components/icons/icons.tsx +367 -0
- package/src/components/icons/index.ts +3 -0
- package/src/components/sections/AccordionShowcase.tsx +45 -0
- package/src/components/sections/AlertShowcase.tsx +39 -0
- package/src/components/sections/AvatarShowcase.tsx +80 -0
- package/src/components/sections/BadgeShowcase.tsx +65 -0
- package/src/components/sections/ButtonShowcase.tsx +312 -0
- package/src/components/sections/CalendarShowcase.tsx +35 -0
- package/src/components/sections/CardShowcase.tsx +143 -0
- package/src/components/sections/ChartShowcase.tsx +190 -0
- package/src/components/sections/CodeMockupShowcase.tsx +56 -0
- package/src/components/sections/ColorPalette.tsx +117 -0
- package/src/components/sections/CommandPaletteShowcase.tsx +48 -0
- package/src/components/sections/CountdownShowcase.tsx +43 -0
- package/src/components/sections/DashboardShowcase.tsx +191 -0
- package/src/components/sections/DiffShowcase.tsx +70 -0
- package/src/components/sections/DrawerShowcase.tsx +97 -0
- package/src/components/sections/DropdownShowcase.tsx +100 -0
- package/src/components/sections/EmptyStateShowcase.tsx +50 -0
- package/src/components/sections/FilterChipsShowcase.tsx +50 -0
- package/src/components/sections/FormShowcase.tsx +126 -0
- package/src/components/sections/HoverCardShowcase.tsx +50 -0
- package/src/components/sections/IconShowcase.tsx +247 -0
- package/src/components/sections/IndicatorShowcase.tsx +52 -0
- package/src/components/sections/KbdShowcase.tsx +31 -0
- package/src/components/sections/ModalShowcase.tsx +210 -0
- package/src/components/sections/NavigationShowcase.tsx +199 -0
- package/src/components/sections/ProgressShowcase.tsx +85 -0
- package/src/components/sections/SegmentedControlShowcase.tsx +49 -0
- package/src/components/sections/SetupThemeShowcase.tsx +262 -0
- package/src/components/sections/StackShowcase.tsx +33 -0
- package/src/components/sections/StatShowcase.tsx +129 -0
- package/src/components/sections/StepperShowcase.tsx +37 -0
- package/src/components/sections/SwapShowcase.tsx +91 -0
- package/src/components/sections/TabShowcase.tsx +84 -0
- package/src/components/sections/TableShowcase.tsx +140 -0
- package/src/components/sections/TimelineShowcase.tsx +83 -0
- package/src/components/sections/ToastShowcase.tsx +108 -0
- package/src/components/sections/TooltipShowcase.tsx +44 -0
- package/src/components/sections/UtilityShowcase.tsx +81 -0
- package/src/components/ui/Accordion.tsx +77 -0
- package/src/components/ui/Alert.tsx +68 -0
- package/src/components/ui/Avatar.tsx +97 -0
- package/src/components/ui/Badge.tsx +55 -0
- package/src/components/ui/Button.tsx +110 -0
- package/src/components/ui/ButtonChrome.tsx +20 -0
- package/src/components/ui/Calendar.tsx +116 -0
- package/src/components/ui/Card.tsx +60 -0
- package/src/components/ui/ChatBubble.tsx +71 -0
- package/src/components/ui/CodeBlock.tsx +48 -0
- package/src/components/ui/CollapsibleSection.tsx +49 -0
- package/src/components/ui/CommandPalette.tsx +137 -0
- package/src/components/ui/ComponentDocs.tsx +52 -0
- package/src/components/ui/Drawer.tsx +71 -0
- package/src/components/ui/DropdownMenu.tsx +138 -0
- package/src/components/ui/EmptyState.tsx +33 -0
- package/src/components/ui/FilterChips.tsx +50 -0
- package/src/components/ui/HoverCard.tsx +36 -0
- package/src/components/ui/Indicator.tsx +61 -0
- package/src/components/ui/Input.tsx +359 -0
- package/src/components/ui/Kbd.tsx +38 -0
- package/src/components/ui/Modal.tsx +75 -0
- package/src/components/ui/Navigation.tsx +94 -0
- package/src/components/ui/Panel.tsx +18 -0
- package/src/components/ui/Progress.tsx +59 -0
- package/src/components/ui/Rating.tsx +65 -0
- package/src/components/ui/SearchInput.tsx +106 -0
- package/src/components/ui/SegmentedControl.tsx +44 -0
- package/src/components/ui/ShowcaseWrapper.tsx +136 -0
- package/src/components/ui/Stat.tsx +39 -0
- package/src/components/ui/Stepper.tsx +75 -0
- package/src/components/ui/Table.tsx +55 -0
- package/src/components/ui/Tabs.tsx +53 -0
- package/src/components/ui/Terminal.tsx +54 -0
- package/src/components/ui/ThemeDomSync.tsx +17 -0
- package/src/components/ui/ThemeManager.tsx +18 -0
- package/src/components/ui/ThemeSwitcher.tsx +46 -0
- package/src/components/ui/Timeline.tsx +60 -0
- package/src/components/ui/Toast.tsx +70 -0
- package/src/components/ui/Typography.tsx +129 -0
- package/src/components/ui/index.ts +92 -0
- package/src/styles/themes.css +118 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Badge, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
|
|
2
|
+
|
|
3
|
+
export default function BadgeShowcase() {
|
|
4
|
+
const code = `import { Badge } from "the-old-ui";
|
|
5
|
+
|
|
6
|
+
<div className="ph-panel space-y-6">
|
|
7
|
+
<div>
|
|
8
|
+
<h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Semantic</h3>
|
|
9
|
+
<div className="flex flex-wrap gap-2">
|
|
10
|
+
<Badge variant="brand">Beta</Badge>
|
|
11
|
+
<Badge variant="neutral">Archived</Badge>
|
|
12
|
+
<Badge variant="success">Live</Badge>
|
|
13
|
+
<Badge variant="warning">Queued</Badge>
|
|
14
|
+
<Badge variant="danger">Failed</Badge>
|
|
15
|
+
<Badge variant="info">Docs</Badge>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div>
|
|
19
|
+
<h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Outline</h3>
|
|
20
|
+
<div className="flex flex-wrap gap-2">
|
|
21
|
+
<Badge variant="outline">Feature flag</Badge>
|
|
22
|
+
<Badge variant="outline">Experiment</Badge>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>`;
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<ShowcaseWrapper
|
|
29
|
+
title="Badges"
|
|
30
|
+
description="Use badges for compact status, category, and product metadata. Defaults work without classes; use props for variants."
|
|
31
|
+
code={code}
|
|
32
|
+
filename="BadgeExample.tsx"
|
|
33
|
+
docs={
|
|
34
|
+
<ComponentDocs
|
|
35
|
+
rows={[
|
|
36
|
+
{ name: "variant", type: "brand | neutral | success | warning | danger | info | outline", defaultValue: "neutral", description: "Controls semantic colour and border treatment." },
|
|
37
|
+
{ name: "size", type: "sm | md", defaultValue: "md", description: "Use sm for dense tables or compact nav." },
|
|
38
|
+
{ name: "className", type: "string", description: "Optional escape hatch for layout-only overrides." },
|
|
39
|
+
]}
|
|
40
|
+
/>
|
|
41
|
+
}
|
|
42
|
+
>
|
|
43
|
+
<div className="ph-panel space-y-6">
|
|
44
|
+
<div>
|
|
45
|
+
<h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Semantic</h3>
|
|
46
|
+
<div className="flex flex-wrap gap-2">
|
|
47
|
+
<Badge variant="brand">Beta</Badge>
|
|
48
|
+
<Badge variant="neutral">Archived</Badge>
|
|
49
|
+
<Badge variant="success">Live</Badge>
|
|
50
|
+
<Badge variant="warning">Queued</Badge>
|
|
51
|
+
<Badge variant="danger">Failed</Badge>
|
|
52
|
+
<Badge variant="info">Docs</Badge>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div>
|
|
56
|
+
<h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Outline</h3>
|
|
57
|
+
<div className="flex flex-wrap gap-2">
|
|
58
|
+
<Badge variant="outline">Feature flag</Badge>
|
|
59
|
+
<Badge variant="outline">Experiment</Badge>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</ShowcaseWrapper>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IconDownload,
|
|
3
|
+
IconPlayCircle,
|
|
4
|
+
IconPlus,
|
|
5
|
+
IconSave,
|
|
6
|
+
IconSpinner,
|
|
7
|
+
IconSubArrowRight,
|
|
8
|
+
IconTrash,
|
|
9
|
+
IconUpload,
|
|
10
|
+
} from "@/components/icons";
|
|
11
|
+
import { Button, ComponentDocs, DropdownButton, DropdownItem, Panel, ShowcaseWrapper } from "@/components/ui";
|
|
12
|
+
|
|
13
|
+
export default function ButtonShowcase() {
|
|
14
|
+
const code = `import { IconDownload, IconPlayCircle, IconPlus, IconSave, IconSpinner, IconSubArrowRight, IconTrash, IconUpload } from "the-old-ui";
|
|
15
|
+
import { Button, DropdownButton, DropdownItem, Panel } from "the-old-ui";
|
|
16
|
+
|
|
17
|
+
<div className="space-y-8">
|
|
18
|
+
<Panel className="space-y-4">
|
|
19
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Toolbar (like HogQL / insights)</h3>
|
|
20
|
+
<div className="flex flex-wrap items-center gap-2 rounded-lemon border border-ph-border bg-ph-surface p-3 shadow-elevation-3000">
|
|
21
|
+
<DropdownButton
|
|
22
|
+
label="Run"
|
|
23
|
+
variant="primary"
|
|
24
|
+
split
|
|
25
|
+
icon={<IconPlayCircle className="h-4 w-4" aria-hidden />}
|
|
26
|
+
>
|
|
27
|
+
<DropdownItem>Run now</DropdownItem>
|
|
28
|
+
<DropdownItem>Run as new insight…</DropdownItem>
|
|
29
|
+
</DropdownButton>
|
|
30
|
+
<DropdownButton
|
|
31
|
+
label="Variables"
|
|
32
|
+
variant="secondary"
|
|
33
|
+
icon={
|
|
34
|
+
<span className="font-mono text-sm leading-none" aria-hidden>
|
|
35
|
+
{"{}"}
|
|
36
|
+
</span>
|
|
37
|
+
}
|
|
38
|
+
>
|
|
39
|
+
<DropdownItem>Manage variables…</DropdownItem>
|
|
40
|
+
<DropdownItem>Insert column…</DropdownItem>
|
|
41
|
+
</DropdownButton>
|
|
42
|
+
<DropdownButton label="Filters" variant="secondary" panelClassName="min-w-[13rem]">
|
|
43
|
+
<DropdownItem>Add filter group</DropdownItem>
|
|
44
|
+
<DropdownItem>Clear all filters</DropdownItem>
|
|
45
|
+
<DropdownItem className="text-ph-mutedtext">Save as cohort…</DropdownItem>
|
|
46
|
+
</DropdownButton>
|
|
47
|
+
<Button variant="secondary" size="sm" shape="square" aria-label="Layout">
|
|
48
|
+
<span className="flex gap-0.5" aria-hidden>
|
|
49
|
+
<span className="h-4 w-1.5 rounded-sm bg-current" />
|
|
50
|
+
<span className="h-4 w-1.5 rounded-sm bg-current opacity-40" />
|
|
51
|
+
</span>
|
|
52
|
+
</Button>
|
|
53
|
+
</div>
|
|
54
|
+
</Panel>
|
|
55
|
+
|
|
56
|
+
<Panel className="space-y-4">
|
|
57
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Lemon 3000 primary & secondary</h3>
|
|
58
|
+
<div className="flex flex-wrap gap-3">
|
|
59
|
+
<Button variant="primary">Primary</Button>
|
|
60
|
+
<Button variant="secondary">Secondary</Button>
|
|
61
|
+
<Button variant="primary" outline>
|
|
62
|
+
Primary outline
|
|
63
|
+
</Button>
|
|
64
|
+
<Button variant="secondary" outline>
|
|
65
|
+
Secondary outline
|
|
66
|
+
</Button>
|
|
67
|
+
</div>
|
|
68
|
+
</Panel>
|
|
69
|
+
|
|
70
|
+
<Panel className="space-y-4">
|
|
71
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Marketing signal vs in-app</h3>
|
|
72
|
+
<div className="flex flex-wrap gap-3">
|
|
73
|
+
<Button variant="primary">App primary (3000)</Button>
|
|
74
|
+
<Button variant="signal">Marketing signal</Button>
|
|
75
|
+
</div>
|
|
76
|
+
</Panel>
|
|
77
|
+
|
|
78
|
+
<Panel className="space-y-4">
|
|
79
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Semantic solids</h3>
|
|
80
|
+
<div className="flex flex-wrap gap-3">
|
|
81
|
+
<Button variant="accent">Accent</Button>
|
|
82
|
+
<Button variant="neutral">Neutral</Button>
|
|
83
|
+
<Button variant="info">Info</Button>
|
|
84
|
+
<Button variant="success">Success</Button>
|
|
85
|
+
<Button variant="warning">Warning</Button>
|
|
86
|
+
<Button variant="danger">Danger</Button>
|
|
87
|
+
</div>
|
|
88
|
+
</Panel>
|
|
89
|
+
|
|
90
|
+
<Panel className="space-y-4">
|
|
91
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">With icons</h3>
|
|
92
|
+
<div className="flex flex-wrap gap-3">
|
|
93
|
+
<Button variant="primary" icon={<IconPlus className="h-4 w-4" aria-hidden />}>
|
|
94
|
+
New project
|
|
95
|
+
</Button>
|
|
96
|
+
<Button variant="primary" sideIcon={<IconSubArrowRight className="h-4 w-4" aria-hidden />}>
|
|
97
|
+
Continue
|
|
98
|
+
</Button>
|
|
99
|
+
<Button variant="secondary" icon={<IconDownload className="h-4 w-4" aria-hidden />}>
|
|
100
|
+
Export
|
|
101
|
+
</Button>
|
|
102
|
+
<Button variant="success" icon={<IconSave className="h-4 w-4" aria-hidden />}>
|
|
103
|
+
Save
|
|
104
|
+
</Button>
|
|
105
|
+
<Button variant="danger" icon={<IconTrash className="h-4 w-4" aria-hidden />}>
|
|
106
|
+
Delete
|
|
107
|
+
</Button>
|
|
108
|
+
<Button variant="ghost" icon={<IconUpload className="h-4 w-4" aria-hidden />}>
|
|
109
|
+
Upload
|
|
110
|
+
</Button>
|
|
111
|
+
</div>
|
|
112
|
+
</Panel>
|
|
113
|
+
|
|
114
|
+
<Panel className="space-y-4">
|
|
115
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Sizes & shapes</h3>
|
|
116
|
+
<div className="flex flex-wrap items-end gap-3">
|
|
117
|
+
<Button variant="primary" size="xs">
|
|
118
|
+
XS
|
|
119
|
+
</Button>
|
|
120
|
+
<Button variant="primary" size="sm">
|
|
121
|
+
SM
|
|
122
|
+
</Button>
|
|
123
|
+
<Button variant="primary">MD</Button>
|
|
124
|
+
<Button variant="primary" size="lg">
|
|
125
|
+
LG
|
|
126
|
+
</Button>
|
|
127
|
+
<Button variant="primary" shape="circle" aria-label="Add">
|
|
128
|
+
<IconPlus className="h-5 w-5" />
|
|
129
|
+
</Button>
|
|
130
|
+
<Button variant="primary" shape="square" aria-label="Add">
|
|
131
|
+
<IconPlus className="h-5 w-5" />
|
|
132
|
+
</Button>
|
|
133
|
+
<Button variant="secondary" shape="wide">
|
|
134
|
+
Wide
|
|
135
|
+
</Button>
|
|
136
|
+
</div>
|
|
137
|
+
</Panel>
|
|
138
|
+
|
|
139
|
+
<Panel className="space-y-4">
|
|
140
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Ghost, link & states</h3>
|
|
141
|
+
<div className="flex flex-wrap items-center gap-4">
|
|
142
|
+
<Button variant="ghost">Tertiary</Button>
|
|
143
|
+
<Button variant="link">Text link button</Button>
|
|
144
|
+
<Button variant="primary" disabled>
|
|
145
|
+
Disabled
|
|
146
|
+
</Button>
|
|
147
|
+
<Button variant="primary" icon={<IconSpinner className="h-4 w-4" aria-hidden />}>
|
|
148
|
+
Loading
|
|
149
|
+
</Button>
|
|
150
|
+
</div>
|
|
151
|
+
</Panel>
|
|
152
|
+
</div>`;
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<ShowcaseWrapper
|
|
156
|
+
title="Buttons"
|
|
157
|
+
description="Reusable primitives from the-old-ui — Button, DropdownButton, SearchInput. Primary/secondary Lemon chrome from PostHog LemonButton.scss."
|
|
158
|
+
code={code}
|
|
159
|
+
filename="ButtonExample.tsx"
|
|
160
|
+
docs={
|
|
161
|
+
<ComponentDocs
|
|
162
|
+
rows={[
|
|
163
|
+
{ name: "variant", type: "primary | secondary | tertiary | signal | accent | neutral | info | success | warning | danger | ghost | link", defaultValue: "secondary", description: "Controls semantic colour and Lemon chrome treatment." },
|
|
164
|
+
{ name: "size", type: "xs | sm | md | lg", defaultValue: "md", description: "Controls density without extra classes." },
|
|
165
|
+
{ name: "shape", type: "default | circle | square | wide", defaultValue: "default", description: "Applies common button shapes without className." },
|
|
166
|
+
{ name: "outline", type: "boolean", defaultValue: "false", description: "Converts solid variants to outline treatment." },
|
|
167
|
+
{ name: "icon", type: "ReactNode", description: "Leading icon slot." },
|
|
168
|
+
{ name: "sideIcon", type: "ReactNode", description: "Trailing icon slot." },
|
|
169
|
+
{ name: "split", type: "boolean", defaultValue: "false", description: "Adds split divider before the trailing slot." },
|
|
170
|
+
]}
|
|
171
|
+
/>
|
|
172
|
+
}
|
|
173
|
+
>
|
|
174
|
+
<div className="space-y-8">
|
|
175
|
+
<Panel className="space-y-4">
|
|
176
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Toolbar (like HogQL / insights)</h3>
|
|
177
|
+
<div className="flex flex-wrap items-center gap-2 rounded-lemon border border-ph-border bg-ph-surface p-3 shadow-elevation-3000">
|
|
178
|
+
<DropdownButton
|
|
179
|
+
label="Run"
|
|
180
|
+
variant="primary"
|
|
181
|
+
split
|
|
182
|
+
icon={<IconPlayCircle className="h-4 w-4" aria-hidden />}
|
|
183
|
+
>
|
|
184
|
+
<DropdownItem>Run now</DropdownItem>
|
|
185
|
+
<DropdownItem>Run as new insight…</DropdownItem>
|
|
186
|
+
</DropdownButton>
|
|
187
|
+
<DropdownButton
|
|
188
|
+
label="Variables"
|
|
189
|
+
variant="secondary"
|
|
190
|
+
icon={
|
|
191
|
+
<span className="font-mono text-sm leading-none" aria-hidden>
|
|
192
|
+
{"{}"}
|
|
193
|
+
</span>
|
|
194
|
+
}
|
|
195
|
+
>
|
|
196
|
+
<DropdownItem>Manage variables…</DropdownItem>
|
|
197
|
+
<DropdownItem>Insert column…</DropdownItem>
|
|
198
|
+
</DropdownButton>
|
|
199
|
+
<DropdownButton label="Filters" variant="secondary" panelClassName="min-w-[13rem]">
|
|
200
|
+
<DropdownItem>Add filter group</DropdownItem>
|
|
201
|
+
<DropdownItem>Clear all filters</DropdownItem>
|
|
202
|
+
<DropdownItem className="text-ph-mutedtext">Save as cohort…</DropdownItem>
|
|
203
|
+
</DropdownButton>
|
|
204
|
+
<Button variant="secondary" size="sm" shape="square" aria-label="Layout">
|
|
205
|
+
<span className="flex gap-0.5" aria-hidden>
|
|
206
|
+
<span className="h-4 w-1.5 rounded-sm bg-current" />
|
|
207
|
+
<span className="h-4 w-1.5 rounded-sm bg-current opacity-40" />
|
|
208
|
+
</span>
|
|
209
|
+
</Button>
|
|
210
|
+
</div>
|
|
211
|
+
</Panel>
|
|
212
|
+
|
|
213
|
+
<Panel className="space-y-4">
|
|
214
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Lemon 3000 primary & secondary</h3>
|
|
215
|
+
<div className="flex flex-wrap gap-3">
|
|
216
|
+
<Button variant="primary">Primary</Button>
|
|
217
|
+
<Button variant="secondary">Secondary</Button>
|
|
218
|
+
<Button variant="primary" outline>
|
|
219
|
+
Primary outline
|
|
220
|
+
</Button>
|
|
221
|
+
<Button variant="secondary" outline>
|
|
222
|
+
Secondary outline
|
|
223
|
+
</Button>
|
|
224
|
+
</div>
|
|
225
|
+
</Panel>
|
|
226
|
+
|
|
227
|
+
<Panel className="space-y-4">
|
|
228
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Marketing signal vs in-app</h3>
|
|
229
|
+
<div className="flex flex-wrap gap-3">
|
|
230
|
+
<Button variant="primary">App primary (3000)</Button>
|
|
231
|
+
<Button variant="signal">Marketing signal</Button>
|
|
232
|
+
</div>
|
|
233
|
+
</Panel>
|
|
234
|
+
|
|
235
|
+
<Panel className="space-y-4">
|
|
236
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Semantic solids</h3>
|
|
237
|
+
<div className="flex flex-wrap gap-3">
|
|
238
|
+
<Button variant="accent">Accent</Button>
|
|
239
|
+
<Button variant="neutral">Neutral</Button>
|
|
240
|
+
<Button variant="info">Info</Button>
|
|
241
|
+
<Button variant="success">Success</Button>
|
|
242
|
+
<Button variant="warning">Warning</Button>
|
|
243
|
+
<Button variant="danger">Danger</Button>
|
|
244
|
+
</div>
|
|
245
|
+
</Panel>
|
|
246
|
+
|
|
247
|
+
<Panel className="space-y-4">
|
|
248
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">With icons</h3>
|
|
249
|
+
<div className="flex flex-wrap gap-3">
|
|
250
|
+
<Button variant="primary" icon={<IconPlus className="h-4 w-4" aria-hidden />}>
|
|
251
|
+
New project
|
|
252
|
+
</Button>
|
|
253
|
+
<Button variant="primary" sideIcon={<IconSubArrowRight className="h-4 w-4" aria-hidden />}>
|
|
254
|
+
Continue
|
|
255
|
+
</Button>
|
|
256
|
+
<Button variant="secondary" icon={<IconDownload className="h-4 w-4" aria-hidden />}>
|
|
257
|
+
Export
|
|
258
|
+
</Button>
|
|
259
|
+
<Button variant="success" icon={<IconSave className="h-4 w-4" aria-hidden />}>
|
|
260
|
+
Save
|
|
261
|
+
</Button>
|
|
262
|
+
<Button variant="danger" icon={<IconTrash className="h-4 w-4" aria-hidden />}>
|
|
263
|
+
Delete
|
|
264
|
+
</Button>
|
|
265
|
+
<Button variant="ghost" icon={<IconUpload className="h-4 w-4" aria-hidden />}>
|
|
266
|
+
Upload
|
|
267
|
+
</Button>
|
|
268
|
+
</div>
|
|
269
|
+
</Panel>
|
|
270
|
+
|
|
271
|
+
<Panel className="space-y-4">
|
|
272
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Sizes & shapes</h3>
|
|
273
|
+
<div className="flex flex-wrap items-end gap-3">
|
|
274
|
+
<Button variant="primary" size="xs">
|
|
275
|
+
XS
|
|
276
|
+
</Button>
|
|
277
|
+
<Button variant="primary" size="sm">
|
|
278
|
+
SM
|
|
279
|
+
</Button>
|
|
280
|
+
<Button variant="primary">MD</Button>
|
|
281
|
+
<Button variant="primary" size="lg">
|
|
282
|
+
LG
|
|
283
|
+
</Button>
|
|
284
|
+
<Button variant="primary" shape="circle" aria-label="Add">
|
|
285
|
+
<IconPlus className="h-5 w-5" />
|
|
286
|
+
</Button>
|
|
287
|
+
<Button variant="primary" shape="square" aria-label="Add">
|
|
288
|
+
<IconPlus className="h-5 w-5" />
|
|
289
|
+
</Button>
|
|
290
|
+
<Button variant="secondary" shape="wide">
|
|
291
|
+
Wide
|
|
292
|
+
</Button>
|
|
293
|
+
</div>
|
|
294
|
+
</Panel>
|
|
295
|
+
|
|
296
|
+
<Panel className="space-y-4">
|
|
297
|
+
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Ghost, link & states</h3>
|
|
298
|
+
<div className="flex flex-wrap items-center gap-4">
|
|
299
|
+
<Button variant="ghost">Tertiary</Button>
|
|
300
|
+
<Button variant="link">Text link button</Button>
|
|
301
|
+
<Button variant="primary" disabled>
|
|
302
|
+
Disabled
|
|
303
|
+
</Button>
|
|
304
|
+
<Button variant="primary" icon={<IconSpinner className="h-4 w-4" aria-hidden />}>
|
|
305
|
+
Loading
|
|
306
|
+
</Button>
|
|
307
|
+
</div>
|
|
308
|
+
</Panel>
|
|
309
|
+
</div>
|
|
310
|
+
</ShowcaseWrapper>
|
|
311
|
+
);
|
|
312
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Calendar, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
|
|
5
|
+
|
|
6
|
+
export default function CalendarShowcase() {
|
|
7
|
+
const [date, setDate] = useState<Date | undefined>(new Date());
|
|
8
|
+
|
|
9
|
+
const code = `import { Calendar } from "the-old-ui";
|
|
10
|
+
|
|
11
|
+
const [date, setDate] = useState(new Date());
|
|
12
|
+
|
|
13
|
+
<Calendar value={date} onChange={setDate} />`;
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<ShowcaseWrapper
|
|
17
|
+
title="Calendar"
|
|
18
|
+
description="Controlled date picker with theme-aware styling and navigation."
|
|
19
|
+
code={code}
|
|
20
|
+
filename="CalendarExample.tsx"
|
|
21
|
+
docs={
|
|
22
|
+
<ComponentDocs
|
|
23
|
+
rows={[
|
|
24
|
+
{ name: "value", type: "Date | undefined", description: "Selected date." },
|
|
25
|
+
{ name: "onChange", type: "(date?: Date) => void", description: "Called when a date is selected." },
|
|
26
|
+
]}
|
|
27
|
+
/>
|
|
28
|
+
}
|
|
29
|
+
>
|
|
30
|
+
<div className="ph-panel flex justify-center">
|
|
31
|
+
<Calendar value={date} onChange={setDate} />
|
|
32
|
+
</div>
|
|
33
|
+
</ShowcaseWrapper>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Badge, Button, Card, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
|
|
2
|
+
|
|
3
|
+
export default function CardShowcase() {
|
|
4
|
+
const code = `import { Badge, Button, Card } from "the-old-ui";
|
|
5
|
+
|
|
6
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
7
|
+
<Card
|
|
8
|
+
title="Insight saved"
|
|
9
|
+
description="White surface, hairline border, orange hover ring — mimics dashboard tiles."
|
|
10
|
+
actions={
|
|
11
|
+
<>
|
|
12
|
+
<Button variant="secondary" outline>
|
|
13
|
+
Discard
|
|
14
|
+
</Button>
|
|
15
|
+
<Button variant="primary">Open</Button>
|
|
16
|
+
</>
|
|
17
|
+
}
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<Card
|
|
21
|
+
title="With visual"
|
|
22
|
+
description="Same card shell — media sits flush to the border like product cards."
|
|
23
|
+
media={<div className="flex h-40 items-center justify-center bg-gradient-to-br from-orange-400 via-ph-brand to-ph-blue text-lg font-bold text-white">Hero stripe</div>}
|
|
24
|
+
actions={
|
|
25
|
+
<Button variant="primary" size="sm">
|
|
26
|
+
View funnel
|
|
27
|
+
</Button>
|
|
28
|
+
}
|
|
29
|
+
/>
|
|
30
|
+
|
|
31
|
+
<Card
|
|
32
|
+
title={
|
|
33
|
+
<>
|
|
34
|
+
Releases <Badge variant="brand">NEW</Badge>
|
|
35
|
+
</>
|
|
36
|
+
}
|
|
37
|
+
description="Dense header row with badge + actions on the trailing edge."
|
|
38
|
+
actions={
|
|
39
|
+
<>
|
|
40
|
+
<Button variant="secondary" size="sm">
|
|
41
|
+
Docs
|
|
42
|
+
</Button>
|
|
43
|
+
<Button variant="primary" size="sm">
|
|
44
|
+
Enable
|
|
45
|
+
</Button>
|
|
46
|
+
</>
|
|
47
|
+
}
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
<Card
|
|
51
|
+
variant="highlighted"
|
|
52
|
+
title={<span className="text-ph-brand">Highlighted</span>}
|
|
53
|
+
description="Use tinted fill + accent border instead of generic neon glass cards."
|
|
54
|
+
actions={<Button variant="primary" size="sm">Acknowledge</Button>}
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<Card
|
|
58
|
+
variant="outlined"
|
|
59
|
+
title="Panel inset"
|
|
60
|
+
description="Grey trays on canvas — mirrors secondary surfaces in-app."
|
|
61
|
+
actions={<Button variant="primary" outline>Inspect</Button>}
|
|
62
|
+
/>
|
|
63
|
+
</div>`;
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<ShowcaseWrapper
|
|
67
|
+
title="Cards"
|
|
68
|
+
description="Reusable card shell with title, description, actions, media, footer, and variant props."
|
|
69
|
+
code={code}
|
|
70
|
+
filename="CardExample.tsx"
|
|
71
|
+
docs={
|
|
72
|
+
<ComponentDocs
|
|
73
|
+
rows={[
|
|
74
|
+
{ name: "variant", type: "default | outlined | elevated | highlighted", defaultValue: "default", description: "Controls the default chrome without requiring classes." },
|
|
75
|
+
{ name: "title", type: "ReactNode", description: "Optional header title." },
|
|
76
|
+
{ name: "description", type: "ReactNode", description: "Optional supporting copy." },
|
|
77
|
+
{ name: "actions", type: "ReactNode", description: "Button row rendered with card action spacing." },
|
|
78
|
+
{ name: "media", type: "ReactNode", description: "Optional visual block rendered above the card body." },
|
|
79
|
+
]}
|
|
80
|
+
/>
|
|
81
|
+
}
|
|
82
|
+
>
|
|
83
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
84
|
+
<Card
|
|
85
|
+
title="Insight saved"
|
|
86
|
+
description="White surface, hairline border, orange hover ring — mimics dashboard tiles."
|
|
87
|
+
actions={
|
|
88
|
+
<>
|
|
89
|
+
<Button variant="secondary" outline>
|
|
90
|
+
Discard
|
|
91
|
+
</Button>
|
|
92
|
+
<Button variant="primary">Open</Button>
|
|
93
|
+
</>
|
|
94
|
+
}
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<Card
|
|
98
|
+
title="With visual"
|
|
99
|
+
description="Same card shell — media sits flush to the border like product cards."
|
|
100
|
+
media={<div className="flex h-40 items-center justify-center bg-gradient-to-br from-orange-400 via-ph-brand to-ph-blue text-lg font-bold text-white">Hero stripe</div>}
|
|
101
|
+
actions={
|
|
102
|
+
<Button variant="primary" size="sm">
|
|
103
|
+
View funnel
|
|
104
|
+
</Button>
|
|
105
|
+
}
|
|
106
|
+
/>
|
|
107
|
+
|
|
108
|
+
<Card
|
|
109
|
+
title={
|
|
110
|
+
<>
|
|
111
|
+
Releases <Badge variant="brand">NEW</Badge>
|
|
112
|
+
</>
|
|
113
|
+
}
|
|
114
|
+
description="Dense header row with badge + actions on the trailing edge."
|
|
115
|
+
actions={
|
|
116
|
+
<>
|
|
117
|
+
<Button variant="secondary" size="sm">
|
|
118
|
+
Docs
|
|
119
|
+
</Button>
|
|
120
|
+
<Button variant="primary" size="sm">
|
|
121
|
+
Enable
|
|
122
|
+
</Button>
|
|
123
|
+
</>
|
|
124
|
+
}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
<Card
|
|
128
|
+
variant="highlighted"
|
|
129
|
+
title={<span className="text-ph-brand">Highlighted</span>}
|
|
130
|
+
description="Use tinted fill + accent border instead of generic neon glass cards."
|
|
131
|
+
actions={<Button variant="primary" size="sm">Acknowledge</Button>}
|
|
132
|
+
/>
|
|
133
|
+
|
|
134
|
+
<Card
|
|
135
|
+
variant="outlined"
|
|
136
|
+
title="Panel inset"
|
|
137
|
+
description="Grey trays on canvas — mirrors secondary surfaces in-app."
|
|
138
|
+
actions={<Button variant="primary" outline>Inspect</Button>}
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
</ShowcaseWrapper>
|
|
142
|
+
);
|
|
143
|
+
}
|