@xenide-io/the-old-ui-theme 0.4.4 → 0.4.8
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-54ZR4VL5.mjs → chunk-RZXHZWUB.mjs} +44 -17
- package/dist/{index-B5NOyoKS.d.mts → index-Od4pIP4F.d.mts} +7 -1
- package/dist/{index-B5NOyoKS.d.ts → index-Od4pIP4F.d.ts} +7 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +37 -10
- package/dist/index.mjs +1 -1
- package/dist/suite.d.mts +152 -41
- package/dist/suite.d.ts +152 -41
- package/dist/suite.js +1366 -671
- package/dist/suite.mjs +1304 -610
- package/dist/ui.d.mts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +37 -10
- package/dist/ui.mjs +1 -1
- package/package.json +7 -3
- package/src/components/ui/Modal.tsx +70 -26
- package/src/styles/suite-skin.css +284 -24
- package/src/suite/components/ai-panel.test.ts +20 -0
- package/src/suite/components/ai-panel.tsx +494 -103
- package/src/suite/components/suite-app-layout.tsx +48 -28
- package/src/suite/components/suite-layout.tsx +84 -40
- package/src/suite/components/suite-mobile-drawer.tsx +35 -22
- package/src/suite/components/suite-notification-bell.tsx +9 -3
- package/src/suite/components/suite-settings-layout.tsx +82 -0
- package/src/suite/components/suite-settings-mobile-nav.tsx +18 -17
- package/src/suite/components/suite-skeleton.tsx +3 -3
- package/src/suite/components/today-calibrating.tsx +11 -35
- package/src/suite/components/today-page-frame.tsx +19 -11
- package/src/suite/components/today-ui.tsx +276 -19
- package/src/suite/index.ts +41 -25
- package/src/suite/lib/apps.ts +32 -2
- package/src/suite/lib/use-sidebar-width.ts +114 -0
- package/src/components/sections/AccordionShowcase.tsx +0 -45
- package/src/components/sections/AlertShowcase.tsx +0 -40
- package/src/components/sections/AvatarShowcase.tsx +0 -80
- package/src/components/sections/BadgeShowcase.tsx +0 -65
- package/src/components/sections/ButtonShowcase.tsx +0 -308
- package/src/components/sections/CalendarShowcase.tsx +0 -35
- package/src/components/sections/CardShowcase.tsx +0 -159
- package/src/components/sections/CodeMockupShowcase.tsx +0 -56
- package/src/components/sections/ColorPalette.tsx +0 -117
- package/src/components/sections/CommandPaletteShowcase.tsx +0 -48
- package/src/components/sections/CountdownShowcase.tsx +0 -43
- package/src/components/sections/DiffShowcase.tsx +0 -70
- package/src/components/sections/DrawerShowcase.tsx +0 -97
- package/src/components/sections/DropdownShowcase.tsx +0 -98
- package/src/components/sections/EmptyStateShowcase.tsx +0 -50
- package/src/components/sections/FilterChipsShowcase.tsx +0 -98
- package/src/components/sections/FormShowcase.tsx +0 -127
- package/src/components/sections/HoverCardShowcase.tsx +0 -50
- package/src/components/sections/IconShowcase.tsx +0 -121
- package/src/components/sections/IndicatorShowcase.tsx +0 -52
- package/src/components/sections/KbdShowcase.tsx +0 -57
- package/src/components/sections/ModalShowcase.tsx +0 -211
- package/src/components/sections/NavigationShowcase.tsx +0 -199
- package/src/components/sections/NewComponentsShowcase.tsx +0 -1052
- package/src/components/sections/ProductLayoutsShowcase.tsx +0 -78
- package/src/components/sections/ProgressShowcase.tsx +0 -82
- package/src/components/sections/QuillChartShowcase.tsx +0 -92
- package/src/components/sections/QuillDashboardShowcase.tsx +0 -149
- package/src/components/sections/SegmentedControlShowcase.tsx +0 -49
- package/src/components/sections/SetupThemeShowcase.tsx +0 -262
- package/src/components/sections/SidebarShowcase.tsx +0 -152
- package/src/components/sections/StackShowcase.tsx +0 -33
- package/src/components/sections/StepperShowcase.tsx +0 -37
- package/src/components/sections/SuiteShowcase.tsx +0 -669
- package/src/components/sections/SwapShowcase.tsx +0 -99
- package/src/components/sections/TabShowcase.tsx +0 -84
- package/src/components/sections/TableShowcase.tsx +0 -142
- package/src/components/sections/TimelineShowcase.tsx +0 -83
- package/src/components/sections/ToastShowcase.tsx +0 -108
- package/src/components/sections/TooltipShowcase.tsx +0 -38
- package/src/components/sections/UtilityShowcase.tsx +0 -81
- package/src/styles/excel-themes.css +0 -110
- package/src/styles/lemon-primitives.css +0 -550
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IconDownload,
|
|
3
|
-
IconPlayCircle,
|
|
4
|
-
IconPlus,
|
|
5
|
-
IconSave,
|
|
6
|
-
IconSubArrowRight,
|
|
7
|
-
IconTrash,
|
|
8
|
-
IconUpload,
|
|
9
|
-
} from "@/components/icons";
|
|
10
|
-
import { Button, ComponentDocs, DropdownButton, DropdownItem, Panel, ShowcaseWrapper } from "@/components/ui";
|
|
11
|
-
|
|
12
|
-
export default function ButtonShowcase() {
|
|
13
|
-
const code = `import { Button, DropdownButton, DropdownItem, IconDownload, IconPlayCircle, IconPlus, IconSave, IconSubArrowRight, IconTrash, IconUpload, Panel } from "@xenide-io/the-old-ui-theme";
|
|
14
|
-
|
|
15
|
-
<div className="space-y-8">
|
|
16
|
-
<Panel className="space-y-4">
|
|
17
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Toolbar (like HogQL / insights)</h3>
|
|
18
|
-
<div className="flex flex-wrap items-center gap-2 rounded-lemon border border-ph-border bg-ph-surface p-3 shadow-elevation-3000">
|
|
19
|
-
<DropdownButton
|
|
20
|
-
label="Run"
|
|
21
|
-
variant="primary"
|
|
22
|
-
split
|
|
23
|
-
icon={<IconPlayCircle className="h-4 w-4" aria-hidden />}
|
|
24
|
-
>
|
|
25
|
-
<DropdownItem>Run now</DropdownItem>
|
|
26
|
-
<DropdownItem>Run as new insight…</DropdownItem>
|
|
27
|
-
</DropdownButton>
|
|
28
|
-
<DropdownButton
|
|
29
|
-
label="Variables"
|
|
30
|
-
variant="secondary"
|
|
31
|
-
icon={
|
|
32
|
-
<span className="font-mono text-sm leading-none" aria-hidden>
|
|
33
|
-
{"{}"}
|
|
34
|
-
</span>
|
|
35
|
-
}
|
|
36
|
-
>
|
|
37
|
-
<DropdownItem>Manage variables…</DropdownItem>
|
|
38
|
-
<DropdownItem>Insert column…</DropdownItem>
|
|
39
|
-
</DropdownButton>
|
|
40
|
-
<DropdownButton label="Filters" variant="secondary" panelClassName="min-w-[13rem]">
|
|
41
|
-
<DropdownItem>Add filter group</DropdownItem>
|
|
42
|
-
<DropdownItem>Clear all filters</DropdownItem>
|
|
43
|
-
<DropdownItem className="text-ph-mutedtext">Save as cohort…</DropdownItem>
|
|
44
|
-
</DropdownButton>
|
|
45
|
-
<Button variant="secondary" size="sm" shape="square" aria-label="Layout">
|
|
46
|
-
<span className="flex gap-0.5" aria-hidden>
|
|
47
|
-
<span className="h-4 w-1.5 rounded-sm bg-current" />
|
|
48
|
-
<span className="h-4 w-1.5 rounded-sm bg-current opacity-40" />
|
|
49
|
-
</span>
|
|
50
|
-
</Button>
|
|
51
|
-
</div>
|
|
52
|
-
</Panel>
|
|
53
|
-
|
|
54
|
-
<Panel className="space-y-4">
|
|
55
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Lemon 3000 primary & secondary</h3>
|
|
56
|
-
<div className="flex flex-wrap gap-3">
|
|
57
|
-
<Button variant="primary">Primary</Button>
|
|
58
|
-
<Button variant="secondary">Secondary</Button>
|
|
59
|
-
<Button variant="primary" outline>
|
|
60
|
-
Primary outline
|
|
61
|
-
</Button>
|
|
62
|
-
<Button variant="secondary" outline>
|
|
63
|
-
Secondary outline
|
|
64
|
-
</Button>
|
|
65
|
-
</div>
|
|
66
|
-
</Panel>
|
|
67
|
-
|
|
68
|
-
<Panel className="space-y-4">
|
|
69
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Marketing signal vs in-app</h3>
|
|
70
|
-
<div className="flex flex-wrap gap-3">
|
|
71
|
-
<Button variant="primary">App primary (3000)</Button>
|
|
72
|
-
<Button variant="signal">Marketing signal</Button>
|
|
73
|
-
</div>
|
|
74
|
-
</Panel>
|
|
75
|
-
|
|
76
|
-
<Panel className="space-y-4">
|
|
77
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Semantic solids</h3>
|
|
78
|
-
<div className="flex flex-wrap gap-3">
|
|
79
|
-
<Button variant="accent">Accent</Button>
|
|
80
|
-
<Button variant="neutral">Neutral</Button>
|
|
81
|
-
<Button variant="info">Info</Button>
|
|
82
|
-
<Button variant="success">Success</Button>
|
|
83
|
-
<Button variant="warning">Warning</Button>
|
|
84
|
-
<Button variant="danger">Danger</Button>
|
|
85
|
-
</div>
|
|
86
|
-
</Panel>
|
|
87
|
-
|
|
88
|
-
<Panel className="space-y-4">
|
|
89
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">With icons</h3>
|
|
90
|
-
<div className="flex flex-wrap gap-3">
|
|
91
|
-
<Button variant="primary" icon={<IconPlus className="h-4 w-4" aria-hidden />}>
|
|
92
|
-
New project
|
|
93
|
-
</Button>
|
|
94
|
-
<Button variant="primary" sideIcon={<IconSubArrowRight className="h-4 w-4" aria-hidden />}>
|
|
95
|
-
Continue
|
|
96
|
-
</Button>
|
|
97
|
-
<Button variant="secondary" icon={<IconDownload className="h-4 w-4" aria-hidden />}>
|
|
98
|
-
Export
|
|
99
|
-
</Button>
|
|
100
|
-
<Button variant="success" icon={<IconSave className="h-4 w-4" aria-hidden />}>
|
|
101
|
-
Save
|
|
102
|
-
</Button>
|
|
103
|
-
<Button variant="danger" icon={<IconTrash className="h-4 w-4" aria-hidden />}>
|
|
104
|
-
Delete
|
|
105
|
-
</Button>
|
|
106
|
-
<Button variant="ghost" icon={<IconUpload className="h-4 w-4" aria-hidden />}>
|
|
107
|
-
Upload
|
|
108
|
-
</Button>
|
|
109
|
-
</div>
|
|
110
|
-
</Panel>
|
|
111
|
-
|
|
112
|
-
<Panel className="space-y-4">
|
|
113
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Sizes & shapes</h3>
|
|
114
|
-
<div className="flex flex-wrap items-end gap-3">
|
|
115
|
-
<Button variant="primary" size="xs">
|
|
116
|
-
XS
|
|
117
|
-
</Button>
|
|
118
|
-
<Button variant="primary" size="sm">
|
|
119
|
-
SM
|
|
120
|
-
</Button>
|
|
121
|
-
<Button variant="primary">MD</Button>
|
|
122
|
-
<Button variant="primary" size="lg">
|
|
123
|
-
LG
|
|
124
|
-
</Button>
|
|
125
|
-
<Button variant="primary" shape="circle" aria-label="Add">
|
|
126
|
-
<IconPlus className="h-5 w-5" />
|
|
127
|
-
</Button>
|
|
128
|
-
<Button variant="primary" shape="square" aria-label="Add">
|
|
129
|
-
<IconPlus className="h-5 w-5" />
|
|
130
|
-
</Button>
|
|
131
|
-
<Button variant="secondary" shape="wide">
|
|
132
|
-
Wide
|
|
133
|
-
</Button>
|
|
134
|
-
</div>
|
|
135
|
-
</Panel>
|
|
136
|
-
|
|
137
|
-
<Panel className="space-y-4">
|
|
138
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Ghost, link & states</h3>
|
|
139
|
-
<div className="flex flex-wrap items-center gap-4">
|
|
140
|
-
<Button variant="ghost">Tertiary</Button>
|
|
141
|
-
<Button variant="link">Text link button</Button>
|
|
142
|
-
<Button variant="primary" disabled>
|
|
143
|
-
Disabled
|
|
144
|
-
</Button>
|
|
145
|
-
<Button variant="primary" loading>Loading</Button>
|
|
146
|
-
</div>
|
|
147
|
-
</Panel>
|
|
148
|
-
</div>`;
|
|
149
|
-
|
|
150
|
-
return (
|
|
151
|
-
<ShowcaseWrapper
|
|
152
|
-
title="Buttons"
|
|
153
|
-
description="Every filled variant shares the same bordered face, lower frame, hover lift, and pressed depth. Ghost and link actions stay flat."
|
|
154
|
-
code={code}
|
|
155
|
-
filename="ButtonExample.tsx"
|
|
156
|
-
docs={
|
|
157
|
-
<ComponentDocs
|
|
158
|
-
rows={[
|
|
159
|
-
{ 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." },
|
|
160
|
-
{ name: "size", type: "xs | sm | md | lg", defaultValue: "md", description: "Controls density without extra classes." },
|
|
161
|
-
{ name: "shape", type: "default | circle | square | wide", defaultValue: "default", description: "Applies common button shapes without className." },
|
|
162
|
-
{ name: "outline", type: "boolean", defaultValue: "false", description: "Converts solid variants to outline treatment." },
|
|
163
|
-
{ name: "icon", type: "ReactNode", description: "Leading icon slot." },
|
|
164
|
-
{ name: "sideIcon", type: "ReactNode", description: "Trailing icon slot." },
|
|
165
|
-
{ name: "split", type: "boolean", defaultValue: "false", description: "Adds split divider before the trailing slot." },
|
|
166
|
-
{ name: "loading", type: "boolean", defaultValue: "false", description: "Disables the action, exposes aria-busy, and replaces the leading icon with a spinner." },
|
|
167
|
-
{ name: "loadingLabel", type: "ReactNode", description: "Optional label shown while loading; the normal label stays in place by default." },
|
|
168
|
-
]}
|
|
169
|
-
/>
|
|
170
|
-
}
|
|
171
|
-
>
|
|
172
|
-
<div className="space-y-8">
|
|
173
|
-
<Panel className="space-y-4">
|
|
174
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Toolbar (like HogQL / insights)</h3>
|
|
175
|
-
<div className="flex flex-wrap items-center gap-2 rounded-lemon border border-ph-border bg-ph-surface p-3 shadow-elevation-3000">
|
|
176
|
-
<DropdownButton
|
|
177
|
-
label="Run"
|
|
178
|
-
variant="primary"
|
|
179
|
-
split
|
|
180
|
-
icon={<IconPlayCircle className="h-4 w-4" aria-hidden />}
|
|
181
|
-
>
|
|
182
|
-
<DropdownItem>Run now</DropdownItem>
|
|
183
|
-
<DropdownItem>Run as new insight…</DropdownItem>
|
|
184
|
-
</DropdownButton>
|
|
185
|
-
<DropdownButton
|
|
186
|
-
label="Variables"
|
|
187
|
-
variant="secondary"
|
|
188
|
-
icon={
|
|
189
|
-
<span className="font-mono text-sm leading-none" aria-hidden>
|
|
190
|
-
{"{}"}
|
|
191
|
-
</span>
|
|
192
|
-
}
|
|
193
|
-
>
|
|
194
|
-
<DropdownItem>Manage variables…</DropdownItem>
|
|
195
|
-
<DropdownItem>Insert column…</DropdownItem>
|
|
196
|
-
</DropdownButton>
|
|
197
|
-
<DropdownButton label="Filters" variant="secondary" panelClassName="min-w-[13rem]">
|
|
198
|
-
<DropdownItem>Add filter group</DropdownItem>
|
|
199
|
-
<DropdownItem>Clear all filters</DropdownItem>
|
|
200
|
-
<DropdownItem className="text-ph-mutedtext">Save as cohort…</DropdownItem>
|
|
201
|
-
</DropdownButton>
|
|
202
|
-
<Button variant="secondary" size="sm" shape="square" aria-label="Layout">
|
|
203
|
-
<span className="flex gap-0.5" aria-hidden>
|
|
204
|
-
<span className="h-4 w-1.5 rounded-sm bg-current" />
|
|
205
|
-
<span className="h-4 w-1.5 rounded-sm bg-current opacity-40" />
|
|
206
|
-
</span>
|
|
207
|
-
</Button>
|
|
208
|
-
</div>
|
|
209
|
-
</Panel>
|
|
210
|
-
|
|
211
|
-
<Panel className="space-y-4">
|
|
212
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Lemon 3000 primary & secondary</h3>
|
|
213
|
-
<div className="flex flex-wrap gap-3">
|
|
214
|
-
<Button variant="primary">Primary</Button>
|
|
215
|
-
<Button variant="secondary">Secondary</Button>
|
|
216
|
-
<Button variant="primary" outline>
|
|
217
|
-
Primary outline
|
|
218
|
-
</Button>
|
|
219
|
-
<Button variant="secondary" outline>
|
|
220
|
-
Secondary outline
|
|
221
|
-
</Button>
|
|
222
|
-
</div>
|
|
223
|
-
</Panel>
|
|
224
|
-
|
|
225
|
-
<Panel className="space-y-4">
|
|
226
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Marketing signal vs in-app</h3>
|
|
227
|
-
<div className="flex flex-wrap gap-3">
|
|
228
|
-
<Button variant="primary">App primary (3000)</Button>
|
|
229
|
-
<Button variant="signal">Marketing signal</Button>
|
|
230
|
-
</div>
|
|
231
|
-
</Panel>
|
|
232
|
-
|
|
233
|
-
<Panel className="space-y-4">
|
|
234
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Semantic solids</h3>
|
|
235
|
-
<div className="flex flex-wrap gap-3">
|
|
236
|
-
<Button variant="accent">Accent</Button>
|
|
237
|
-
<Button variant="neutral">Neutral</Button>
|
|
238
|
-
<Button variant="info">Info</Button>
|
|
239
|
-
<Button variant="success">Success</Button>
|
|
240
|
-
<Button variant="warning">Warning</Button>
|
|
241
|
-
<Button variant="danger">Danger</Button>
|
|
242
|
-
</div>
|
|
243
|
-
</Panel>
|
|
244
|
-
|
|
245
|
-
<Panel className="space-y-4">
|
|
246
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">With icons</h3>
|
|
247
|
-
<div className="flex flex-wrap gap-3">
|
|
248
|
-
<Button variant="primary" icon={<IconPlus className="h-4 w-4" aria-hidden />}>
|
|
249
|
-
New project
|
|
250
|
-
</Button>
|
|
251
|
-
<Button variant="primary" sideIcon={<IconSubArrowRight className="h-4 w-4" aria-hidden />}>
|
|
252
|
-
Continue
|
|
253
|
-
</Button>
|
|
254
|
-
<Button variant="secondary" icon={<IconDownload className="h-4 w-4" aria-hidden />}>
|
|
255
|
-
Export
|
|
256
|
-
</Button>
|
|
257
|
-
<Button variant="success" icon={<IconSave className="h-4 w-4" aria-hidden />}>
|
|
258
|
-
Save
|
|
259
|
-
</Button>
|
|
260
|
-
<Button variant="danger" icon={<IconTrash className="h-4 w-4" aria-hidden />}>
|
|
261
|
-
Delete
|
|
262
|
-
</Button>
|
|
263
|
-
<Button variant="ghost" icon={<IconUpload className="h-4 w-4" aria-hidden />}>
|
|
264
|
-
Upload
|
|
265
|
-
</Button>
|
|
266
|
-
</div>
|
|
267
|
-
</Panel>
|
|
268
|
-
|
|
269
|
-
<Panel className="space-y-4">
|
|
270
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Sizes & shapes</h3>
|
|
271
|
-
<div className="flex flex-wrap items-end gap-3">
|
|
272
|
-
<Button variant="primary" size="xs">
|
|
273
|
-
XS
|
|
274
|
-
</Button>
|
|
275
|
-
<Button variant="primary" size="sm">
|
|
276
|
-
SM
|
|
277
|
-
</Button>
|
|
278
|
-
<Button variant="primary">MD</Button>
|
|
279
|
-
<Button variant="primary" size="lg">
|
|
280
|
-
LG
|
|
281
|
-
</Button>
|
|
282
|
-
<Button variant="primary" shape="circle" aria-label="Add">
|
|
283
|
-
<IconPlus className="h-5 w-5" />
|
|
284
|
-
</Button>
|
|
285
|
-
<Button variant="primary" shape="square" aria-label="Add">
|
|
286
|
-
<IconPlus className="h-5 w-5" />
|
|
287
|
-
</Button>
|
|
288
|
-
<Button variant="secondary" shape="wide">
|
|
289
|
-
Wide
|
|
290
|
-
</Button>
|
|
291
|
-
</div>
|
|
292
|
-
</Panel>
|
|
293
|
-
|
|
294
|
-
<Panel className="space-y-4">
|
|
295
|
-
<h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Ghost, link & states</h3>
|
|
296
|
-
<div className="flex flex-wrap items-center gap-4">
|
|
297
|
-
<Button variant="ghost">Tertiary</Button>
|
|
298
|
-
<Button variant="link">Text link button</Button>
|
|
299
|
-
<Button variant="primary" disabled>
|
|
300
|
-
Disabled
|
|
301
|
-
</Button>
|
|
302
|
-
<Button variant="primary" loading>Loading</Button>
|
|
303
|
-
</div>
|
|
304
|
-
</Panel>
|
|
305
|
-
</div>
|
|
306
|
-
</ShowcaseWrapper>
|
|
307
|
-
);
|
|
308
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { Badge, Button, Card, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
|
|
2
|
-
|
|
3
|
-
export default function CardShowcase() {
|
|
4
|
-
const code = `import { Badge, Button, Card } from "@xenide-io/the-old-ui-theme";
|
|
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="A quiet, static surface. Depth is reserved for interactive or elevated content."
|
|
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="Media sits flush to the card edge with a semantic divider."
|
|
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
|
-
|
|
64
|
-
<Card
|
|
65
|
-
interactive
|
|
66
|
-
title="Interactive surface"
|
|
67
|
-
description="Hover depth is opt-in for cards containing an action."
|
|
68
|
-
actions={<Button variant="tertiary">Review</Button>}
|
|
69
|
-
/>
|
|
70
|
-
</div>`;
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<ShowcaseWrapper
|
|
74
|
-
title="Cards"
|
|
75
|
-
description="Static by default, with explicit elevated, highlighted, and interactive treatments."
|
|
76
|
-
code={code}
|
|
77
|
-
filename="CardExample.tsx"
|
|
78
|
-
docs={
|
|
79
|
-
<ComponentDocs
|
|
80
|
-
rows={[
|
|
81
|
-
{ name: "variant", type: "default | outlined | elevated | highlighted", defaultValue: "default", description: "Controls the default chrome without requiring classes." },
|
|
82
|
-
{ name: "title", type: "ReactNode", description: "Optional header title." },
|
|
83
|
-
{ name: "description", type: "ReactNode", description: "Optional supporting copy." },
|
|
84
|
-
{ name: "actions", type: "ReactNode", description: "Button row rendered with card action spacing." },
|
|
85
|
-
{ name: "media", type: "ReactNode", description: "Optional visual block rendered above the card body." },
|
|
86
|
-
{ name: "interactive", type: "boolean", defaultValue: "false", description: "Adds hover and focus-within depth for a card containing an action." },
|
|
87
|
-
{ name: "titleAs", type: "h2 | h3 | h4", defaultValue: "h3", description: "Selects the semantic heading level without changing the card style." },
|
|
88
|
-
]}
|
|
89
|
-
/>
|
|
90
|
-
}
|
|
91
|
-
>
|
|
92
|
-
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
93
|
-
<Card
|
|
94
|
-
title="Insight saved"
|
|
95
|
-
description="A quiet, static surface. Depth is reserved for interactive or elevated content."
|
|
96
|
-
actions={
|
|
97
|
-
<>
|
|
98
|
-
<Button variant="secondary" outline>
|
|
99
|
-
Discard
|
|
100
|
-
</Button>
|
|
101
|
-
<Button variant="primary">Open</Button>
|
|
102
|
-
</>
|
|
103
|
-
}
|
|
104
|
-
/>
|
|
105
|
-
|
|
106
|
-
<Card
|
|
107
|
-
title="With visual"
|
|
108
|
-
description="Media sits flush to the card edge with a semantic divider."
|
|
109
|
-
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>}
|
|
110
|
-
actions={
|
|
111
|
-
<Button variant="primary" size="sm">
|
|
112
|
-
View funnel
|
|
113
|
-
</Button>
|
|
114
|
-
}
|
|
115
|
-
/>
|
|
116
|
-
|
|
117
|
-
<Card
|
|
118
|
-
title={
|
|
119
|
-
<>
|
|
120
|
-
Releases <Badge variant="brand">NEW</Badge>
|
|
121
|
-
</>
|
|
122
|
-
}
|
|
123
|
-
description="Dense header row with badge + actions on the trailing edge."
|
|
124
|
-
actions={
|
|
125
|
-
<>
|
|
126
|
-
<Button variant="secondary" size="sm">
|
|
127
|
-
Docs
|
|
128
|
-
</Button>
|
|
129
|
-
<Button variant="primary" size="sm">
|
|
130
|
-
Enable
|
|
131
|
-
</Button>
|
|
132
|
-
</>
|
|
133
|
-
}
|
|
134
|
-
/>
|
|
135
|
-
|
|
136
|
-
<Card
|
|
137
|
-
variant="highlighted"
|
|
138
|
-
title={<span className="text-ph-brand">Highlighted</span>}
|
|
139
|
-
description="Use tinted fill + accent border instead of generic neon glass cards."
|
|
140
|
-
actions={<Button variant="primary" size="sm">Acknowledge</Button>}
|
|
141
|
-
/>
|
|
142
|
-
|
|
143
|
-
<Card
|
|
144
|
-
variant="outlined"
|
|
145
|
-
title="Panel inset"
|
|
146
|
-
description="Grey trays on canvas — mirrors secondary surfaces in-app."
|
|
147
|
-
actions={<Button variant="primary" outline>Inspect</Button>}
|
|
148
|
-
/>
|
|
149
|
-
|
|
150
|
-
<Card
|
|
151
|
-
interactive
|
|
152
|
-
title="Interactive surface"
|
|
153
|
-
description="Hover depth is opt-in for cards containing an action."
|
|
154
|
-
actions={<Button variant="tertiary">Review</Button>}
|
|
155
|
-
/>
|
|
156
|
-
</div>
|
|
157
|
-
</ShowcaseWrapper>
|
|
158
|
-
);
|
|
159
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { IconQueryEditor } from "@/components/icons";
|
|
2
|
-
import { ComponentDocs, ShowcaseWrapper, Terminal } from "@/components/ui";
|
|
3
|
-
|
|
4
|
-
export default function CodeMockupShowcase() {
|
|
5
|
-
const code = `import { Terminal } from "the-old-ui";
|
|
6
|
-
|
|
7
|
-
<Terminal
|
|
8
|
-
title="sandbox · posthog-wizard"
|
|
9
|
-
lines={[
|
|
10
|
-
{ text: "❯ bun add posthog-js", color: "text-neutral-600" },
|
|
11
|
-
{ text: "● added posthog-js@1...", color: "text-emerald-400" },
|
|
12
|
-
{ text: "❯ POSTHOG_KEY=...", color: "text-neutral-600" },
|
|
13
|
-
]}
|
|
14
|
-
/>`;
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<ShowcaseWrapper
|
|
18
|
-
title="Terminal capture"
|
|
19
|
-
description="Terminal and replay shells for documentation, demos, and embedded developer flows."
|
|
20
|
-
code={code}
|
|
21
|
-
filename="TerminalExample.tsx"
|
|
22
|
-
docs={
|
|
23
|
-
<ComponentDocs
|
|
24
|
-
rows={[
|
|
25
|
-
{ name: "title", type: "string", description: "Window title in the header." },
|
|
26
|
-
{ name: "lines", type: "Array<{ text; color? }>", description: "Terminal lines to render." },
|
|
27
|
-
{ name: "children", type: "ReactNode", description: "Custom content instead of lines." },
|
|
28
|
-
]}
|
|
29
|
-
/>
|
|
30
|
-
}
|
|
31
|
-
>
|
|
32
|
-
<div className="space-y-10">
|
|
33
|
-
<Terminal
|
|
34
|
-
title="sandbox · posthog-wizard"
|
|
35
|
-
lines={[
|
|
36
|
-
{ text: "❯ bun add posthog-js", color: "text-neutral-600" },
|
|
37
|
-
{ text: "● added posthog-js@1...", color: "text-emerald-400" },
|
|
38
|
-
{ text: "❯ POSTHOG_KEY=...", color: "text-neutral-600" },
|
|
39
|
-
]}
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
-
<div className="rounded-xl border border-ph-border shadow-ph-md">
|
|
43
|
-
<header className="relative flex items-center justify-center border-b border-ph-border px-10 py-3 text-[11px] font-semibold text-ph-mutedtext">
|
|
44
|
-
<span className="absolute left-5 top-4 h-px w-[88%] rounded-full bg-ph-border opacity-70" />
|
|
45
|
-
Replay preview
|
|
46
|
-
</header>
|
|
47
|
-
<div className="flex flex-col items-center gap-5 bg-ph-toolbar px-6 py-14 text-ph-subtle">
|
|
48
|
-
<IconQueryEditor className="h-14 w-14 opacity-50" />
|
|
49
|
-
<p className="text-center font-semibold text-ph-ink">Session snapshot shell</p>
|
|
50
|
-
<p className="max-w-xs text-center text-xs">Mirrors bordered frame around insight embeds rather than DaisyUI mocks.</p>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</ShowcaseWrapper>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from "react";
|
|
2
|
-
import { ShowcaseWrapper } from "@/components/ui";
|
|
3
|
-
|
|
4
|
-
const brandSurface: { label: string; token: string; style: CSSProperties; textClass: string }[] = [
|
|
5
|
-
{ label: "Brand orange", token: "--ph-accent", style: { background: "var(--ph-accent)" }, textClass: "text-white" },
|
|
6
|
-
{ label: "Brand blue", token: "--ph-blue", style: { background: "var(--ph-blue)" }, textClass: "text-white" },
|
|
7
|
-
{ label: "Purple accent", token: "--ph-purple", style: { background: "var(--ph-purple)" }, textClass: "text-white" },
|
|
8
|
-
{ label: "Canvas (3000-50)", token: "--ph-canvas", style: { background: "var(--ph-canvas)" }, textClass: "text-ph-ink ring-1 ring-inset ring-ph-border" },
|
|
9
|
-
{ label: "Muted surface", token: "--ph-muted", style: { background: "var(--ph-muted)" }, textClass: "text-ph-ink ring-1 ring-inset ring-ph-border" },
|
|
10
|
-
{ label: "White surface", token: "--ph-surface", style: { background: "var(--ph-surface)" }, textClass: "text-ph-ink ring-1 ring-inset ring-ph-border" },
|
|
11
|
-
{ label: "Border", token: "--ph-border", style: { background: "var(--ph-border)" }, textClass: "text-ph-ink" },
|
|
12
|
-
{ label: "Success", token: "--ph-success", style: { background: "var(--ph-success)" }, textClass: "text-white" },
|
|
13
|
-
{ label: "Warning", token: "--ph-warning", style: { background: "var(--ph-warning)" }, textClass: "text-white" },
|
|
14
|
-
{ label: "Danger", token: "--ph-danger", style: { background: "var(--ph-danger)" }, textClass: "text-white" },
|
|
15
|
-
{ label: "Info", token: "--ph-info", style: { background: "var(--ph-info)" }, textClass: "text-white" },
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
const dataSeries = [1, 2, 3, 4, 5, 6, 7].map((n) => ({
|
|
19
|
-
label: `Data ${n}`,
|
|
20
|
-
token: `--ph-data-${n}`,
|
|
21
|
-
style: { background: `var(--ph-data-${n})` } as CSSProperties,
|
|
22
|
-
textClass: "text-white",
|
|
23
|
-
}));
|
|
24
|
-
|
|
25
|
-
const productRail = [
|
|
26
|
-
{ label: "Session replay", token: "--ph-product-session-replay", style: { background: "var(--ph-product-session-replay)" } as CSSProperties },
|
|
27
|
-
{ label: "Product analytics", token: "--ph-product-product-analytics", style: { background: "var(--ph-product-product-analytics)" } as CSSProperties },
|
|
28
|
-
{ label: "Data pipeline", token: "--ph-product-data-pipeline", style: { background: "var(--ph-product-data-pipeline)" } as CSSProperties },
|
|
29
|
-
{ label: "Feature flags", token: "--ph-product-feature-flags", style: { background: "var(--ph-product-feature-flags)" } as CSSProperties },
|
|
30
|
-
{ label: "Experiments", token: "--ph-product-experiments", style: { background: "var(--ph-product-experiments)" } as CSSProperties },
|
|
31
|
-
{ label: "Data warehouse", token: "--ph-product-data-warehouse", style: { background: "var(--ph-product-data-warehouse)" } as CSSProperties },
|
|
32
|
-
{ label: "Surveys", token: "--ph-product-surveys", style: { background: "var(--ph-product-surveys)" } as CSSProperties },
|
|
33
|
-
].map((row) => ({ ...row, textClass: "text-white" }));
|
|
34
|
-
|
|
35
|
-
function SwatchGrid({
|
|
36
|
-
title,
|
|
37
|
-
description,
|
|
38
|
-
items,
|
|
39
|
-
}: {
|
|
40
|
-
title: string;
|
|
41
|
-
description: string;
|
|
42
|
-
items: { label: string; token: string; style: CSSProperties; textClass: string }[];
|
|
43
|
-
}) {
|
|
44
|
-
return (
|
|
45
|
-
<div>
|
|
46
|
-
<h3 className="mb-1 text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">{title}</h3>
|
|
47
|
-
<p className="mb-3 text-sm text-ph-subtle">{description}</p>
|
|
48
|
-
<div className="grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6">
|
|
49
|
-
{items.map((c) => (
|
|
50
|
-
<div
|
|
51
|
-
key={c.token}
|
|
52
|
-
className={`rounded-[var(--ph-radius-app)] p-5 ${c.textClass}`}
|
|
53
|
-
style={{
|
|
54
|
-
...c.style,
|
|
55
|
-
boxShadow: "var(--ph-shadow-elevation-3000)",
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
<p className="text-sm font-semibold">{c.label}</p>
|
|
59
|
-
<p className="mt-1 font-mono text-[11px] opacity-90">{c.token}</p>
|
|
60
|
-
</div>
|
|
61
|
-
))}
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export default function ColorPalette() {
|
|
68
|
-
const code = `/* CSS variables update with the active theme */
|
|
69
|
-
|
|
70
|
-
// Brand & surfaces
|
|
71
|
-
background: var(--ph-accent); // Brand orange
|
|
72
|
-
background: var(--ph-canvas); // Canvas
|
|
73
|
-
background: var(--ph-surface); // White surface
|
|
74
|
-
border-color: var(--ph-border); // Hairline borders
|
|
75
|
-
|
|
76
|
-
// Semantic status
|
|
77
|
-
color: var(--ph-success); // Success green
|
|
78
|
-
color: var(--ph-danger); // Danger red
|
|
79
|
-
color: var(--ph-warning); // Warning amber
|
|
80
|
-
color: var(--ph-info); // Info blue
|
|
81
|
-
|
|
82
|
-
// Data series (charts)
|
|
83
|
-
background: var(--ph-data-1); // Primary
|
|
84
|
-
background: var(--ph-data-2); // Secondary
|
|
85
|
-
// ... up to ph-data-7
|
|
86
|
-
|
|
87
|
-
// Product rail
|
|
88
|
-
background: var(--ph-product-session-replay);
|
|
89
|
-
background: var(--ph-product-product-analytics);`;
|
|
90
|
-
|
|
91
|
-
return (
|
|
92
|
-
<ShowcaseWrapper
|
|
93
|
-
title="Colour tokens"
|
|
94
|
-
description="Tokens update with the Theme select in the header — surfaces, accents, chart series, and product rail colours all swap together."
|
|
95
|
-
code={code}
|
|
96
|
-
filename="Tokens.css"
|
|
97
|
-
>
|
|
98
|
-
<div className="space-y-10">
|
|
99
|
-
<SwatchGrid
|
|
100
|
-
title="Brand & surfaces"
|
|
101
|
-
description="Core UI chrome and semantic status hues."
|
|
102
|
-
items={brandSurface}
|
|
103
|
-
/>
|
|
104
|
-
<SwatchGrid
|
|
105
|
-
title="Insight data series"
|
|
106
|
-
description="Default trend / breakdown palette."
|
|
107
|
-
items={dataSeries}
|
|
108
|
-
/>
|
|
109
|
-
<SwatchGrid
|
|
110
|
-
title="Product rail"
|
|
111
|
-
description="Saturated nav / marketing tiles."
|
|
112
|
-
items={productRail}
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</ShowcaseWrapper>
|
|
116
|
-
);
|
|
117
|
-
}
|