@xenide-io/the-old-ui-theme 0.3.0 → 0.3.2
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-5HSOBJ4F.mjs +5968 -0
- package/dist/{index-D1RTT2Ap.d.mts → index-BgG8Homu.d.mts} +419 -2
- package/dist/{index-D1RTT2Ap.d.ts → index-BgG8Homu.d.ts} +419 -2
- package/dist/index.d.mts +198 -95
- package/dist/index.d.ts +198 -95
- package/dist/index.js +2995 -1136
- package/dist/index.mjs +629 -735
- package/dist/ui.d.mts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +1986 -156
- package/dist/ui.mjs +76 -3
- package/package.json +4 -14
- package/src/app/globals.css +976 -2
- package/src/components/charts/index.ts +9 -8
- package/src/components/charts/quill/BarChart.tsx +85 -0
- package/src/components/charts/quill/FunnelChart.tsx +49 -0
- package/src/components/charts/quill/InsightShell.tsx +27 -0
- package/src/components/charts/quill/MetricCard.tsx +44 -0
- package/src/components/charts/quill/PieChart.tsx +81 -0
- package/src/components/charts/quill/Sparkline.tsx +57 -0
- package/src/components/charts/quill/TimeSeriesLineChart.tsx +62 -0
- package/src/components/charts/quill/index.ts +9 -0
- package/src/components/icons/icons.tsx +2 -0
- package/src/components/icons/index.ts +3 -0
- package/src/components/icons/lemon-brand-icons.tsx +16 -0
- package/src/components/icons/lemon-category-icons.tsx +72 -0
- package/src/components/icons/lemon-icons.tsx +57 -0
- package/src/components/sections/IconShowcase.tsx +110 -7
- package/src/components/sections/NewComponentsShowcase.tsx +1052 -0
- package/src/components/sections/ProductLayoutsShowcase.tsx +57 -117
- package/src/components/sections/QuillChartShowcase.tsx +92 -0
- package/src/components/sections/QuillDashboardShowcase.tsx +149 -0
- package/src/components/sections/SidebarShowcase.tsx +152 -0
- package/src/components/sections/TableShowcase.tsx +2 -0
- package/src/components/sections/TooltipShowcase.tsx +19 -25
- package/src/components/ui/AlertDialog.tsx +62 -0
- package/src/components/ui/AppLayout.tsx +27 -0
- package/src/components/ui/Autocomplete.tsx +106 -0
- package/src/components/ui/Banner.tsx +63 -0
- package/src/components/ui/ButtonGroup.tsx +16 -0
- package/src/components/ui/Chip.tsx +46 -0
- package/src/components/ui/Collapsible.tsx +46 -0
- package/src/components/ui/Combobox.tsx +119 -0
- package/src/components/ui/ContextMenu.tsx +81 -0
- package/src/components/ui/DataTable.tsx +133 -0
- package/src/components/ui/DatePicker.tsx +96 -0
- package/src/components/ui/Dialog.tsx +75 -0
- package/src/components/ui/Divider.tsx +39 -0
- package/src/components/ui/Dot.tsx +32 -0
- package/src/components/ui/InputGroup.tsx +16 -0
- package/src/components/ui/Lettermark.tsx +47 -0
- package/src/components/ui/Link.tsx +32 -0
- package/src/components/ui/LoadingBar.tsx +25 -0
- package/src/components/ui/Menubar.tsx +66 -0
- package/src/components/ui/Metric.tsx +34 -0
- package/src/components/ui/NumberField.tsx +76 -0
- package/src/components/ui/Popover.tsx +73 -0
- package/src/components/ui/ProgressCircle.tsx +63 -0
- package/src/components/ui/Resizable.tsx +71 -0
- package/src/components/ui/Row.tsx +51 -0
- package/src/components/ui/ScrollArea.tsx +54 -0
- package/src/components/ui/Sidebar.tsx +77 -0
- package/src/components/ui/Snack.tsx +48 -0
- package/src/components/ui/Spinner.tsx +30 -0
- package/src/components/ui/Splotch.tsx +33 -0
- package/src/components/ui/Table.tsx +2 -0
- package/src/components/ui/Tag.tsx +65 -0
- package/src/components/ui/Toggle.tsx +62 -0
- package/src/components/ui/Tooltip.test.tsx +58 -0
- package/src/components/ui/Tooltip.tsx +211 -0
- package/src/components/ui/Widget.tsx +31 -0
- package/src/components/ui/index.ts +275 -21
- package/dist/chunk-FDMD3IIN.mjs +0 -3831
- package/src/components/charts/ph-insight-charts.tsx +0 -162
- package/src/components/dashboard/DashboardFiltersBar.tsx +0 -19
- package/src/components/dashboard/DashboardGrid.tsx +0 -23
- package/src/components/dashboard/DashboardInsightPlaceholder.tsx +0 -37
- package/src/components/dashboard/DashboardKpiCard.tsx +0 -25
- package/src/components/dashboard/DashboardToolbar.tsx +0 -23
- package/src/components/dashboard/DashboardWell.tsx +0 -10
- package/src/components/dashboard/InsightMiniCard.tsx +0 -26
- package/src/components/dashboard/InsightShell.tsx +0 -37
- package/src/components/dashboard/InsightShellHeader.tsx +0 -22
- package/src/components/dashboard/MiniTrendBars.tsx +0 -51
- package/src/components/dashboard/index.ts +0 -31
- package/src/components/dashboard/types.ts +0 -9
- package/src/components/sections/ChartShowcase.tsx +0 -190
- package/src/components/sections/DashboardShowcase.tsx +0 -191
- package/src/components/sections/StatShowcase.tsx +0 -129
|
@@ -1,137 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
AuthCard,
|
|
3
|
-
AuthDivider,
|
|
4
|
-
AuthLayout,
|
|
5
|
-
Badge,
|
|
6
|
-
Button,
|
|
7
|
-
Checkbox,
|
|
8
|
-
Input,
|
|
9
|
-
LoadingState,
|
|
10
|
-
Panel,
|
|
11
|
-
SettingsLayout,
|
|
12
|
-
SettingsNav,
|
|
13
|
-
ShowcaseWrapper,
|
|
14
|
-
Toggle,
|
|
15
|
-
} from "@/components/ui";
|
|
16
|
-
import { IconDataReel, IconMail, IconPerson, IconTuning } from "@/components/icons";
|
|
1
|
+
"use client";
|
|
17
2
|
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
label: "Workspace",
|
|
21
|
-
items: [
|
|
22
|
-
{ id: "general", label: "General", href: "#settings", icon: <IconTuning className="h-4 w-4" aria-hidden />, active: true },
|
|
23
|
-
{ id: "members", label: "Members", href: "#settings", icon: <IconPerson className="h-4 w-4" aria-hidden />, badge: "12" },
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: "Data",
|
|
28
|
-
items: [
|
|
29
|
-
{ id: "sources", label: "Sources", href: "#settings", icon: <IconDataReel className="h-4 w-4" aria-hidden /> },
|
|
30
|
-
{ id: "email", label: "Email reports", href: "#settings", icon: <IconMail className="h-4 w-4" aria-hidden /> },
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
] as const;
|
|
3
|
+
import { AuthLayout, AuthCard, SettingsLayout, ShowcaseWrapper, Button } from "@/components/ui";
|
|
34
4
|
|
|
35
5
|
export default function ProductLayoutsShowcase() {
|
|
36
|
-
const authCode = `import { AuthCard, AuthDivider, AuthLayout, Button, Input } from "@xenide-io/the-old-ui-theme";
|
|
37
|
-
|
|
38
|
-
<AuthLayout brand="Acme Analytics" footer="Privacy · Terms">
|
|
39
|
-
<AuthCard title="Welcome back" description="Sign in to your workspace">
|
|
40
|
-
<Input label="Work email" type="email" autoComplete="email" />
|
|
41
|
-
<Input label="Password" type="password" autoComplete="current-password" />
|
|
42
|
-
<Button variant="primary" className="w-full">Sign in</Button>
|
|
43
|
-
<AuthDivider />
|
|
44
|
-
<Button variant="secondary" className="w-full">Continue with SSO</Button>
|
|
45
|
-
</AuthCard>
|
|
46
|
-
</AuthLayout>`;
|
|
47
|
-
|
|
48
|
-
const settingsCode = `import { SettingsLayout, SettingsNav } from "@xenide-io/the-old-ui-theme";
|
|
49
|
-
|
|
50
|
-
<SettingsLayout
|
|
51
|
-
title="Workspace settings"
|
|
52
|
-
navigation={<SettingsNav groups={settingsGroups} />}
|
|
53
|
-
>
|
|
54
|
-
{/* Route-specific settings panels */}
|
|
55
|
-
</SettingsLayout>`;
|
|
56
|
-
|
|
57
6
|
return (
|
|
58
7
|
<>
|
|
59
8
|
<ShowcaseWrapper
|
|
60
9
|
id="auth"
|
|
61
|
-
title="
|
|
62
|
-
description="
|
|
63
|
-
code={
|
|
64
|
-
|
|
10
|
+
title="Auth Layout"
|
|
11
|
+
description="Split-panel authentication shell with brand aside and form column."
|
|
12
|
+
code={`import { AuthLayout, AuthCard } from "@xenide-io/the-old-ui-theme";
|
|
13
|
+
|
|
14
|
+
<AuthLayout>
|
|
15
|
+
<AuthCard title="Sign in" description="Welcome back">
|
|
16
|
+
<input className="ph-input" placeholder="Email" />
|
|
17
|
+
<input className="ph-input" type="password" placeholder="Password" />
|
|
18
|
+
<Button variant="primary">Sign in</Button>
|
|
19
|
+
</AuthCard>
|
|
20
|
+
</AuthLayout>`}
|
|
65
21
|
>
|
|
66
|
-
<div className="
|
|
67
|
-
<AuthLayout
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
<p className="max-w-xs text-sm opacity-80">One focused authentication step at a time, with room for product context.</p>
|
|
74
|
-
</div>
|
|
75
|
-
}
|
|
76
|
-
footer={<>Privacy · Terms · Status</>}
|
|
77
|
-
>
|
|
78
|
-
<AuthCard
|
|
79
|
-
title="Welcome back"
|
|
80
|
-
description="Sign in to your workspace"
|
|
81
|
-
footer={<>New to the workspace? <a href="#auth" className="font-medium text-ph-brand">Create an account</a></>}
|
|
82
|
-
>
|
|
83
|
-
<Input label="Work email" type="email" autoComplete="email" placeholder="you@company.com" />
|
|
84
|
-
<Input label="Password" type="password" autoComplete="current-password" />
|
|
85
|
-
<div className="flex items-center justify-between gap-3">
|
|
86
|
-
<Checkbox label="Remember me" />
|
|
87
|
-
<a href="#auth" className="text-xs font-medium text-ph-brand">Forgot password?</a>
|
|
22
|
+
<div className="max-h-[32rem] overflow-hidden rounded-xl border border-ph-border">
|
|
23
|
+
<AuthLayout>
|
|
24
|
+
<AuthCard title="Sign in" description="Welcome back to your workspace.">
|
|
25
|
+
<div className="space-y-3">
|
|
26
|
+
<input className="ph-input" placeholder="Email" />
|
|
27
|
+
<input className="ph-input" type="password" placeholder="Password" />
|
|
28
|
+
<Button variant="primary" className="w-full">Sign in</Button>
|
|
88
29
|
</div>
|
|
89
|
-
<Button variant="primary" className="w-full">Sign in</Button>
|
|
90
|
-
<AuthDivider />
|
|
91
|
-
<Button variant="secondary" className="w-full">Continue with SSO</Button>
|
|
92
30
|
</AuthCard>
|
|
93
31
|
</AuthLayout>
|
|
94
|
-
|
|
95
|
-
<div className="grid gap-5">
|
|
96
|
-
<AuthCard title="Check your inbox" description="We sent a six-digit code to alex@company.com">
|
|
97
|
-
<Input label="Verification code" inputMode="numeric" autoComplete="one-time-code" placeholder="000000" />
|
|
98
|
-
<Button variant="primary" className="w-full">Verify email</Button>
|
|
99
|
-
</AuthCard>
|
|
100
|
-
<AuthCard title="Preparing workspace" description="Authentication completed successfully.">
|
|
101
|
-
<LoadingState
|
|
102
|
-
label="Preparing your workspace"
|
|
103
|
-
title="Loading your workspace"
|
|
104
|
-
description="Connecting data sources and restoring your last view."
|
|
105
|
-
variant="dots"
|
|
106
|
-
/>
|
|
107
|
-
</AuthCard>
|
|
108
|
-
</div>
|
|
109
32
|
</div>
|
|
110
33
|
</ShowcaseWrapper>
|
|
111
34
|
|
|
112
35
|
<ShowcaseWrapper
|
|
113
36
|
id="settings"
|
|
114
|
-
title="Settings
|
|
115
|
-
description="
|
|
116
|
-
code={
|
|
117
|
-
|
|
37
|
+
title="Settings Layout"
|
|
38
|
+
description="Sidebar navigation and content area for settings pages."
|
|
39
|
+
code={`import { SettingsLayout, SettingsNav } from "@xenide-io/the-old-ui-theme";
|
|
40
|
+
|
|
41
|
+
<SettingsLayout
|
|
42
|
+
title="Settings"
|
|
43
|
+
navigation={<SettingsNav groups={groups} activeId="general" />}
|
|
44
|
+
>
|
|
45
|
+
<p>Settings content</p>
|
|
46
|
+
</SettingsLayout>`}
|
|
118
47
|
>
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
48
|
+
<div className="max-h-[28rem] overflow-hidden rounded-xl border border-ph-border">
|
|
49
|
+
<SettingsLayout
|
|
50
|
+
title="Project Settings"
|
|
51
|
+
description="Manage your workspace preferences"
|
|
52
|
+
navigation={
|
|
53
|
+
<div className="ph-settings-nav space-y-5">
|
|
54
|
+
<div>
|
|
55
|
+
<h3 className="mb-1 px-2 text-[10px] font-semibold uppercase tracking-wider text-ph-mutedtext">General</h3>
|
|
56
|
+
<div className="space-y-0.5">
|
|
57
|
+
<a className="ph-settings-nav__item ph-settings-nav__item--active">Overview</a>
|
|
58
|
+
<a className="ph-settings-nav__item">Display</a>
|
|
59
|
+
<a className="ph-settings-nav__item">Notifications</a>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div>
|
|
63
|
+
<h3 className="mb-1 px-2 text-[10px] font-semibold uppercase tracking-wider text-ph-mutedtext">Team</h3>
|
|
64
|
+
<div className="space-y-0.5">
|
|
65
|
+
<a className="ph-settings-nav__item">Members</a>
|
|
66
|
+
<a className="ph-settings-nav__item">Roles</a>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
}
|
|
71
|
+
>
|
|
72
|
+
<p className="text-sm text-ph-subtle">General settings content goes here.</p>
|
|
73
|
+
</SettingsLayout>
|
|
74
|
+
</div>
|
|
135
75
|
</ShowcaseWrapper>
|
|
136
76
|
</>
|
|
137
77
|
);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { ShowcaseWrapper } from "@/components/ui";
|
|
4
|
+
import { TimeSeriesLineChart, BarChart, PieChart, Sparkline, MetricCard, FunnelChart, InsightShell } from "@/components/charts/quill";
|
|
5
|
+
|
|
6
|
+
const lineCode = 'import { TimeSeriesLineChart } from "@xenide-io/the-old-ui-theme";\n\n<TimeSeriesLineChart\n labels={["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}\n series={[\n { key: "views", label: "Pageviews", data: [4200, 5100, 4800, 6200, 5900, 3100, 2800] },\n { key: "signups", label: "Signups", data: [920, 990, 940, 1040, 1012, 540, 510] },\n ]}\n/>';
|
|
7
|
+
|
|
8
|
+
const barCode = 'import { BarChart } from "@xenide-io/the-old-ui-theme";\n\n<BarChart\n labels={["A","B","C","D"]}\n series={[\n { key: "s1", label: "Series 1", data: [30, 45, 25, 60] },\n { key: "s2", label: "Series 2", data: [20, 35, 40, 30] },\n ]}\n/>';
|
|
9
|
+
|
|
10
|
+
const pieCode = 'import { PieChart } from "@xenide-io/the-old-ui-theme";\n\n<PieChart\n slices={[\n { key: "a", label: "Direct", value: 40 },\n { key: "b", label: "Organic", value: 30 },\n { key: "c", label: "Referral", value: 20 },\n { key: "d", label: "Social", value: 10 },\n ]}\n/>';
|
|
11
|
+
|
|
12
|
+
const metricCode = 'import { MetricCard, Sparkline } from "@xenide-io/the-old-ui-theme";\n\n<MetricCard\n value="89.2k"\n label="Page Views"\n change={{ value: 12 }}\n sparklineData={[65, 72, 68, 80, 95, 88, 92]}\n/>';
|
|
13
|
+
|
|
14
|
+
export default function QuillChartShowcase() {
|
|
15
|
+
return (
|
|
16
|
+
<>
|
|
17
|
+
<ShowcaseWrapper
|
|
18
|
+
id="quill-timeline"
|
|
19
|
+
title="Quill TimeSeriesLineChart"
|
|
20
|
+
description="Canvas-based trend line chart with optional grid and crosshair."
|
|
21
|
+
code={lineCode}
|
|
22
|
+
>
|
|
23
|
+
<TimeSeriesLineChart
|
|
24
|
+
labels={["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}
|
|
25
|
+
series={[
|
|
26
|
+
{ key: "views", label: "Pageviews", data: [4200, 5100, 4800, 6200, 5900, 3100, 2800] },
|
|
27
|
+
{ key: "signups", label: "Signups", data: [920, 990, 940, 1040, 1012, 540, 510] },
|
|
28
|
+
]}
|
|
29
|
+
/>
|
|
30
|
+
</ShowcaseWrapper>
|
|
31
|
+
|
|
32
|
+
<ShowcaseWrapper
|
|
33
|
+
id="quill-barchart"
|
|
34
|
+
title="Quill BarChart"
|
|
35
|
+
description="Vertical bar chart with multi-series support."
|
|
36
|
+
code={barCode}
|
|
37
|
+
>
|
|
38
|
+
<BarChart
|
|
39
|
+
labels={["A","B","C","D"]}
|
|
40
|
+
series={[
|
|
41
|
+
{ key: "s1", label: "Series 1", data: [30, 45, 25, 60] },
|
|
42
|
+
{ key: "s2", label: "Series 2", data: [20, 35, 40, 30] },
|
|
43
|
+
]}
|
|
44
|
+
/>
|
|
45
|
+
</ShowcaseWrapper>
|
|
46
|
+
|
|
47
|
+
<ShowcaseWrapper
|
|
48
|
+
id="quill-piechart"
|
|
49
|
+
title="Quill PieChart"
|
|
50
|
+
description="Donut chart with slice labels and legend."
|
|
51
|
+
code={pieCode}
|
|
52
|
+
>
|
|
53
|
+
<PieChart
|
|
54
|
+
slices={[
|
|
55
|
+
{ key: "a", label: "Direct", value: 40 },
|
|
56
|
+
{ key: "b", label: "Organic", value: 30 },
|
|
57
|
+
{ key: "c", label: "Referral", value: 20 },
|
|
58
|
+
{ key: "d", label: "Social", value: 10 },
|
|
59
|
+
]}
|
|
60
|
+
/>
|
|
61
|
+
</ShowcaseWrapper>
|
|
62
|
+
|
|
63
|
+
<ShowcaseWrapper
|
|
64
|
+
id="quill-metriccard"
|
|
65
|
+
title="Quill MetricCard and Sparkline"
|
|
66
|
+
description="Metric stat card with sparkline trend."
|
|
67
|
+
code={metricCode}
|
|
68
|
+
>
|
|
69
|
+
<div className="grid gap-4 sm:grid-cols-3">
|
|
70
|
+
<MetricCard
|
|
71
|
+
value="89.2k"
|
|
72
|
+
label="Page Views"
|
|
73
|
+
change={{ value: 12 }}
|
|
74
|
+
sparklineData={[65, 72, 68, 80, 95, 88, 92]}
|
|
75
|
+
/>
|
|
76
|
+
<MetricCard
|
|
77
|
+
value="2,847"
|
|
78
|
+
label="Active Users"
|
|
79
|
+
change={{ value: 3 }}
|
|
80
|
+
sparklineData={[42, 48, 45, 52, 50, 48, 55]}
|
|
81
|
+
/>
|
|
82
|
+
<MetricCard
|
|
83
|
+
value="23.1%"
|
|
84
|
+
label="Conversion Rate"
|
|
85
|
+
change={{ value: -1.2, positive: false }}
|
|
86
|
+
sparklineData={[24, 23, 23.5, 22.8, 23.2, 22.5, 23.1]}
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
</ShowcaseWrapper>
|
|
90
|
+
</>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { ShowcaseWrapper } from "@/components/ui";
|
|
4
|
+
import { InsightShell, MetricCard } from "@/components/charts/quill";
|
|
5
|
+
import { TimeSeriesLineChart, BarChart, PieChart, FunnelChart, Sparkline } from "@/components/charts/quill";
|
|
6
|
+
|
|
7
|
+
export default function QuillDashboardShowcase() {
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<ShowcaseWrapper
|
|
11
|
+
id="quill-dashboard"
|
|
12
|
+
title="Quill Dashboard Shells"
|
|
13
|
+
description="InsightShell panels for wrapping Quill charts."
|
|
14
|
+
code={`import { InsightShell } from "@xenide-io/the-old-ui-theme";
|
|
15
|
+
import { TimeSeriesLineChart } from "@xenide-io/the-old-ui-theme";`}
|
|
16
|
+
>
|
|
17
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
18
|
+
<InsightShell title="Weekly Active Users" subtitle="Last 14 days" ribbonColor="var(--ph-data-1)">
|
|
19
|
+
<TimeSeriesLineChart
|
|
20
|
+
labels={["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}
|
|
21
|
+
series={[{ key: "wau", label: "WAU", data: [4200, 5100, 4800, 6200, 5900, 3100, 2800] }]}
|
|
22
|
+
height={180}
|
|
23
|
+
/>
|
|
24
|
+
</InsightShell>
|
|
25
|
+
<InsightShell title="Conversion Funnel" subtitle="Step-by-step dropoff" ribbonColor="var(--ph-data-2)">
|
|
26
|
+
<FunnelChart
|
|
27
|
+
steps={[
|
|
28
|
+
{ label: "Page Visit", count: 12000 },
|
|
29
|
+
{ label: "Sign Up", count: 5400 },
|
|
30
|
+
{ label: "Onboarding", count: 3200 },
|
|
31
|
+
{ label: "Active Use", count: 1800 },
|
|
32
|
+
]}
|
|
33
|
+
/>
|
|
34
|
+
</InsightShell>
|
|
35
|
+
</div>
|
|
36
|
+
</ShowcaseWrapper>
|
|
37
|
+
|
|
38
|
+
<ShowcaseWrapper
|
|
39
|
+
id="quill-funnel"
|
|
40
|
+
title="Quill Funnel Chart"
|
|
41
|
+
description="Conversion funnel with dropoff percentages."
|
|
42
|
+
code={`import { FunnelChart } from "@xenide-io/the-old-ui-theme";
|
|
43
|
+
|
|
44
|
+
<FunnelChart
|
|
45
|
+
steps={[
|
|
46
|
+
{ label: "Visitors", count: 12000 },
|
|
47
|
+
{ label: "Signups", count: 5400 },
|
|
48
|
+
{ label: "Activated", count: 1800 },
|
|
49
|
+
]}
|
|
50
|
+
/>`}
|
|
51
|
+
>
|
|
52
|
+
<div className="max-w-md">
|
|
53
|
+
<FunnelChart
|
|
54
|
+
steps={[
|
|
55
|
+
{ label: "Website Visits", count: 45000 },
|
|
56
|
+
{ label: "Product Page", count: 28000 },
|
|
57
|
+
{ label: "Added to Cart", count: 12000 },
|
|
58
|
+
{ label: "Checkout Started", count: 6500 },
|
|
59
|
+
{ label: "Purchase Complete", count: 4200 },
|
|
60
|
+
]}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</ShowcaseWrapper>
|
|
64
|
+
|
|
65
|
+
<ShowcaseWrapper
|
|
66
|
+
id="quill-metrics-grid"
|
|
67
|
+
title="Quill Metrics Grid"
|
|
68
|
+
description="Metric cards with sparklines for dashboard KPIs."
|
|
69
|
+
code={`import { MetricCard } from "@xenide-io/the-old-ui-theme";`}
|
|
70
|
+
>
|
|
71
|
+
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
|
72
|
+
<MetricCard
|
|
73
|
+
value="$128.4k"
|
|
74
|
+
label="Revenue"
|
|
75
|
+
change={{ value: 12.5 }}
|
|
76
|
+
sparklineData={[80, 95, 88, 102, 110, 108, 128]}
|
|
77
|
+
/>
|
|
78
|
+
<MetricCard
|
|
79
|
+
value="4,847"
|
|
80
|
+
label="Active Users"
|
|
81
|
+
change={{ value: 8.3 }}
|
|
82
|
+
sparklineData={[42, 48, 45, 52, 50, 48, 55]}
|
|
83
|
+
/>
|
|
84
|
+
<MetricCard
|
|
85
|
+
value="32.1%"
|
|
86
|
+
label="Conversion"
|
|
87
|
+
change={{ value: -2.1, positive: false }}
|
|
88
|
+
sparklineData={[34, 33, 33.5, 32.8, 32.2, 31.5, 32.1]}
|
|
89
|
+
/>
|
|
90
|
+
<MetricCard
|
|
91
|
+
value="2.4s"
|
|
92
|
+
label="Avg. Load Time"
|
|
93
|
+
change={{ value: -15, positive: true }}
|
|
94
|
+
sparklineData={[3.2, 2.8, 2.9, 2.6, 2.5, 2.4, 2.4]}
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</ShowcaseWrapper>
|
|
98
|
+
|
|
99
|
+
<ShowcaseWrapper
|
|
100
|
+
id="quill-charts-overview"
|
|
101
|
+
title="Quill Charts Overview"
|
|
102
|
+
description="All Quill chart types in one place."
|
|
103
|
+
code={`import { BarChart, PieChart, Sparkline } from "@xenide-io/the-old-ui-theme";`}
|
|
104
|
+
>
|
|
105
|
+
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
|
106
|
+
<InsightShell title="Bar Chart" subtitle="Multi-series bars">
|
|
107
|
+
<BarChart
|
|
108
|
+
labels={["A","B","C","D"]}
|
|
109
|
+
series={[
|
|
110
|
+
{ key: "s1", label: "S1", data: [30, 45, 25, 60] },
|
|
111
|
+
{ key: "s2", label: "S2", data: [20, 35, 40, 30] },
|
|
112
|
+
]}
|
|
113
|
+
height={180}
|
|
114
|
+
/>
|
|
115
|
+
</InsightShell>
|
|
116
|
+
<InsightShell title="Pie Chart" subtitle="Distribution">
|
|
117
|
+
<div className="flex justify-center">
|
|
118
|
+
<PieChart
|
|
119
|
+
slices={[
|
|
120
|
+
{ key: "a", label: "Direct", value: 40 },
|
|
121
|
+
{ key: "b", label: "Organic", value: 30 },
|
|
122
|
+
{ key: "c", label: "Referral", value: 20 },
|
|
123
|
+
{ key: "d", label: "Social", value: 10 },
|
|
124
|
+
]}
|
|
125
|
+
size={180}
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
</InsightShell>
|
|
129
|
+
<InsightShell title="Sparklines" subtitle="Inline mini-trends">
|
|
130
|
+
<div className="space-y-4">
|
|
131
|
+
{[
|
|
132
|
+
{ label: "Page Views", data: [65, 72, 68, 80, 95, 88, 92], color: "var(--ph-data-1)" },
|
|
133
|
+
{ label: "Signups", data: [20, 25, 22, 30, 28, 35, 40], color: "var(--ph-data-2)" },
|
|
134
|
+
{ label: "Revenue", data: [80, 95, 88, 102, 110, 108, 128], color: "var(--ph-data-3)" },
|
|
135
|
+
].map((s) => (
|
|
136
|
+
<div key={s.label} className="flex items-center gap-3">
|
|
137
|
+
<Sparkline data={s.data} color={s.color} width={80} height={24} />
|
|
138
|
+
<div className="min-w-0">
|
|
139
|
+
<p className="text-xs font-medium text-ph-ink">{s.label}</p>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
))}
|
|
143
|
+
</div>
|
|
144
|
+
</InsightShell>
|
|
145
|
+
</div>
|
|
146
|
+
</ShowcaseWrapper>
|
|
147
|
+
</>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { AppLayout, Sidebar, ShowcaseWrapper, Badge, Button } from "@/components/ui";
|
|
5
|
+
import { Home, Bell, Flag, User, Search, Zap } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
const sampleGroups = [
|
|
8
|
+
{
|
|
9
|
+
label: "Main",
|
|
10
|
+
items: [
|
|
11
|
+
{ label: "Home", icon: <Home className="h-4 w-4" />, active: true },
|
|
12
|
+
{ label: "Activity", icon: <Bell className="h-4 w-4" />, badge: <Badge variant="danger" size="sm">3</Badge> },
|
|
13
|
+
{ label: "Explore", icon: <Search className="h-4 w-4" /> },
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: "Workspace",
|
|
18
|
+
items: [
|
|
19
|
+
{ label: "Projects", icon: <Flag className="h-4 w-4" /> },
|
|
20
|
+
{ label: "People", icon: <User className="h-4 w-4" /> },
|
|
21
|
+
{ label: "Automations", icon: <Zap className="h-4 w-4" /> },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
export default function SidebarShowcase() {
|
|
27
|
+
const [collapsed, setCollapsed] = useState(false);
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
<ShowcaseWrapper
|
|
32
|
+
id="sidebar-demo"
|
|
33
|
+
title="Sidebar + AppLayout"
|
|
34
|
+
description="Full sidebar and content layout with grouped navigation, icons, badges, and collapse support."
|
|
35
|
+
code={`import { AppLayout, Sidebar } from "@xenide-io/the-old-ui-theme";
|
|
36
|
+
|
|
37
|
+
<AppLayout
|
|
38
|
+
sidebar={
|
|
39
|
+
<Sidebar
|
|
40
|
+
groups={[
|
|
41
|
+
{ label: "Main", items: [
|
|
42
|
+
{ label: "Home", icon: <Home className="h-4 w-4" />, active: true },
|
|
43
|
+
{ label: "Activity", icon: <Bell className="h-4 w-4" />, badge: <Badge>3</Badge> },
|
|
44
|
+
]},
|
|
45
|
+
]}
|
|
46
|
+
header={<div className="font-bold">My App</div>}
|
|
47
|
+
footer={<span className="text-xs text-ph-mutedtext">v1.0</span>}
|
|
48
|
+
/>
|
|
49
|
+
}
|
|
50
|
+
>
|
|
51
|
+
<div className="p-6">
|
|
52
|
+
<h1>Main content area</h1>
|
|
53
|
+
</div>
|
|
54
|
+
</AppLayout>`}
|
|
55
|
+
>
|
|
56
|
+
<div className="space-y-4">
|
|
57
|
+
<Button
|
|
58
|
+
variant="secondary"
|
|
59
|
+
size="sm"
|
|
60
|
+
onClick={() => setCollapsed(!collapsed)}
|
|
61
|
+
>
|
|
62
|
+
{collapsed ? "Expand sidebar" : "Collapse sidebar"}
|
|
63
|
+
</Button>
|
|
64
|
+
<div className="overflow-hidden rounded-lg border border-ph-border" style={{ height: 360 }}>
|
|
65
|
+
<AppLayout
|
|
66
|
+
sidebarWidth={collapsed ? 56 : 220}
|
|
67
|
+
sidebar={
|
|
68
|
+
<Sidebar
|
|
69
|
+
groups={sampleGroups}
|
|
70
|
+
collapsed={collapsed}
|
|
71
|
+
header={
|
|
72
|
+
<div className="flex items-center gap-2">
|
|
73
|
+
<div className="h-6 w-6 rounded bg-ph-brand flex items-center justify-center text-xs font-bold text-[var(--ph-on-accent)]">T</div>
|
|
74
|
+
{!collapsed && <span className="text-sm font-bold text-ph-ink">The Old UI</span>}
|
|
75
|
+
</div>
|
|
76
|
+
}
|
|
77
|
+
footer={
|
|
78
|
+
!collapsed ? <span className="text-xs text-ph-mutedtext px-2">v0.3.2</span> : null
|
|
79
|
+
}
|
|
80
|
+
/>
|
|
81
|
+
}
|
|
82
|
+
>
|
|
83
|
+
<div className="flex h-full items-center justify-center bg-ph-canvas">
|
|
84
|
+
<p className="text-sm text-ph-mutedtext">Content area — click sidebar items</p>
|
|
85
|
+
</div>
|
|
86
|
+
</AppLayout>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</ShowcaseWrapper>
|
|
90
|
+
|
|
91
|
+
<ShowcaseWrapper
|
|
92
|
+
id="sidebar-props"
|
|
93
|
+
title="Sidebar Props"
|
|
94
|
+
description="Sidebar component API reference."
|
|
95
|
+
code={`// SidebarGroup
|
|
96
|
+
interface SidebarGroup {
|
|
97
|
+
label: string;
|
|
98
|
+
items: SidebarItemDef[];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// SidebarItemDef
|
|
102
|
+
interface SidebarItemDef {
|
|
103
|
+
label: string;
|
|
104
|
+
icon?: ReactNode;
|
|
105
|
+
href?: string;
|
|
106
|
+
badge?: ReactNode;
|
|
107
|
+
active?: boolean;
|
|
108
|
+
onClick?: () => void;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// SidebarProps
|
|
112
|
+
interface SidebarProps {
|
|
113
|
+
groups: SidebarGroup[];
|
|
114
|
+
className?: string;
|
|
115
|
+
header?: ReactNode;
|
|
116
|
+
footer?: ReactNode;
|
|
117
|
+
collapsed?: boolean;
|
|
118
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// AppLayoutProps
|
|
122
|
+
interface AppLayoutProps {
|
|
123
|
+
sidebar: ReactNode;
|
|
124
|
+
children: ReactNode;
|
|
125
|
+
sidebarWidth?: number;
|
|
126
|
+
className?: string;
|
|
127
|
+
}`}
|
|
128
|
+
>
|
|
129
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
130
|
+
<div className="ph-panel space-y-2">
|
|
131
|
+
<h3 className="text-sm font-semibold text-ph-ink">AppLayout</h3>
|
|
132
|
+
<p className="text-xs text-ph-subtle">CSS grid wrapper with fixed sidebar + fluid content.</p>
|
|
133
|
+
<ul className="space-y-1 text-xs text-ph-subtle">
|
|
134
|
+
<li><span className="font-medium text-ph-ink">sidebar</span> — ReactNode for left column</li>
|
|
135
|
+
<li><span className="font-medium text-ph-ink">sidebarWidth</span> — px width (default 240)</li>
|
|
136
|
+
<li><span className="font-medium text-ph-ink">children</span> — main content area</li>
|
|
137
|
+
</ul>
|
|
138
|
+
</div>
|
|
139
|
+
<div className="ph-panel space-y-2">
|
|
140
|
+
<h3 className="text-sm font-semibold text-ph-ink">Sidebar</h3>
|
|
141
|
+
<p className="text-xs text-ph-subtle">Grouped navigation with icons, badges, collapse.</p>
|
|
142
|
+
<ul className="space-y-1 text-xs text-ph-subtle">
|
|
143
|
+
<li><span className="font-medium text-ph-ink">groups</span> — labeled sections with items</li>
|
|
144
|
+
<li><span className="font-medium text-ph-ink">collapsed</span> — icon-only mode</li>
|
|
145
|
+
<li><span className="font-medium text-ph-ink">header/footer</span> — top/bottom slots</li>
|
|
146
|
+
</ul>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</ShowcaseWrapper>
|
|
150
|
+
</>
|
|
151
|
+
);
|
|
152
|
+
}
|
|
@@ -1,44 +1,38 @@
|
|
|
1
|
-
import { Button, ShowcaseWrapper } from "@/components/ui";
|
|
1
|
+
import { Button, ShowcaseWrapper, Tooltip, TooltipProvider } from "@/components/ui";
|
|
2
2
|
|
|
3
3
|
export default function TooltipShowcase() {
|
|
4
|
-
const code = `import { Button } from "the-old-ui";
|
|
4
|
+
const code = `import { Button, Tooltip, TooltipProvider } from "the-old-ui";
|
|
5
5
|
|
|
6
|
-
<
|
|
7
|
-
<div className="flex flex-wrap items-center gap-10">
|
|
8
|
-
<
|
|
6
|
+
<TooltipProvider delayDuration={300}>
|
|
7
|
+
<div className="ph-panel flex flex-wrap items-center gap-10">
|
|
8
|
+
<Tooltip content="Run a HogQL query (Command + /)" side="top">
|
|
9
9
|
<Button variant="secondary">Hover me</Button>
|
|
10
|
-
|
|
11
|
-
HogQL <span className="ph-shortcut border-neutral-700 bg-neutral-800 text-neutral-100">⌘ /</span>
|
|
12
|
-
</span>
|
|
13
|
-
</div>
|
|
10
|
+
</Tooltip>
|
|
14
11
|
|
|
15
|
-
<
|
|
16
|
-
Dashed chrome
|
|
17
|
-
</
|
|
12
|
+
<Tooltip content="Available on hover and keyboard focus" side="bottom">
|
|
13
|
+
<button type="button" className="ph-tip cursor-help">Dashed chrome</button>
|
|
14
|
+
</Tooltip>
|
|
18
15
|
</div>
|
|
19
|
-
</
|
|
16
|
+
</TooltipProvider>`;
|
|
20
17
|
|
|
21
18
|
return (
|
|
22
19
|
<ShowcaseWrapper
|
|
23
20
|
title="Tooltips"
|
|
24
|
-
description="
|
|
21
|
+
description="Accessible supporting text on an adaptive inverse surface. Tooltips open on hover or focus, avoid viewport collisions, and dismiss with Escape."
|
|
25
22
|
code={code}
|
|
26
23
|
filename="TooltipExample.tsx"
|
|
27
24
|
>
|
|
28
|
-
<
|
|
29
|
-
<div className="flex flex-wrap items-center gap-10">
|
|
30
|
-
<
|
|
25
|
+
<TooltipProvider delayDuration={300}>
|
|
26
|
+
<div className="ph-panel flex flex-wrap items-center gap-10">
|
|
27
|
+
<Tooltip content="Run a HogQL query (Command + /)" side="top">
|
|
31
28
|
<Button variant="secondary">Hover me</Button>
|
|
32
|
-
|
|
33
|
-
HogQL <span className="ph-shortcut border-neutral-700 bg-neutral-800 text-neutral-100">⌘ /</span>
|
|
34
|
-
</span>
|
|
35
|
-
</div>
|
|
29
|
+
</Tooltip>
|
|
36
30
|
|
|
37
|
-
<
|
|
38
|
-
Dashed chrome
|
|
39
|
-
</
|
|
31
|
+
<Tooltip content="Available on hover and keyboard focus" side="bottom">
|
|
32
|
+
<button type="button" className="ph-tip cursor-help">Dashed chrome</button>
|
|
33
|
+
</Tooltip>
|
|
40
34
|
</div>
|
|
41
|
-
</
|
|
35
|
+
</TooltipProvider>
|
|
42
36
|
</ShowcaseWrapper>
|
|
43
37
|
);
|
|
44
38
|
}
|