@xenide-io/the-old-ui-theme 0.2.9 → 0.3.1
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/README.md +1 -1
- package/dist/chunk-5HSOBJ4F.mjs +5968 -0
- package/dist/index-BgG8Homu.d.mts +1461 -0
- package/dist/index-BgG8Homu.d.ts +1461 -0
- package/dist/index.d.mts +206 -100
- package/dist/index.d.ts +206 -100
- package/dist/index.js +4275 -1455
- package/dist/index.mjs +689 -735
- package/dist/tailwind-preset.js +7 -0
- package/dist/tailwind-preset.mjs +7 -0
- package/dist/ui.d.mts +3 -2
- package/dist/ui.d.ts +3 -2
- package/dist/ui.js +3449 -701
- package/dist/ui.mjs +106 -3
- package/package.json +20 -16
- package/src/app/globals.css +1953 -266
- 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/IconBase.tsx +20 -12
- package/src/components/icons/createIconBase.tsx +12 -7
- package/src/components/icons/icons.tsx +210 -18
- 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/AlertShowcase.tsx +2 -1
- package/src/components/sections/BadgeShowcase.tsx +1 -1
- package/src/components/sections/ButtonShowcase.tsx +6 -10
- package/src/components/sections/CardShowcase.tsx +22 -6
- package/src/components/sections/DropdownShowcase.tsx +4 -6
- package/src/components/sections/FilterChipsShowcase.tsx +74 -26
- package/src/components/sections/FormShowcase.tsx +2 -1
- package/src/components/sections/IconShowcase.tsx +195 -212
- package/src/components/sections/KbdShowcase.tsx +47 -21
- package/src/components/sections/ModalShowcase.tsx +7 -6
- package/src/components/sections/NewComponentsShowcase.tsx +1052 -0
- package/src/components/sections/ProductLayoutsShowcase.tsx +78 -0
- package/src/components/sections/ProgressShowcase.tsx +50 -53
- package/src/components/sections/QuillChartShowcase.tsx +92 -0
- package/src/components/sections/QuillDashboardShowcase.tsx +149 -0
- package/src/components/sections/SidebarShowcase.tsx +151 -0
- package/src/components/sections/SwapShowcase.tsx +13 -5
- package/src/components/sections/TableShowcase.tsx +2 -0
- package/src/components/sections/TooltipShowcase.tsx +19 -25
- package/src/components/ui/Alert.tsx +28 -19
- package/src/components/ui/AlertDialog.tsx +62 -0
- package/src/components/ui/AppLayout.tsx +27 -0
- package/src/components/ui/AuthLayout.tsx +58 -0
- package/src/components/ui/Autocomplete.tsx +106 -0
- package/src/components/ui/Badge.tsx +10 -5
- package/src/components/ui/Banner.tsx +63 -0
- package/src/components/ui/Button.tsx +22 -12
- package/src/components/ui/ButtonChrome.tsx +1 -1
- package/src/components/ui/ButtonGroup.tsx +16 -0
- package/src/components/ui/Calendar.tsx +6 -7
- package/src/components/ui/Card.tsx +21 -11
- package/src/components/ui/Chip.tsx +46 -0
- package/src/components/ui/Collapsible.tsx +46 -0
- package/src/components/ui/CollapsibleSection.tsx +11 -11
- 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/DropdownMenu.tsx +189 -65
- package/src/components/ui/FilterBar.tsx +165 -0
- package/src/components/ui/FilterChips.tsx +65 -35
- package/src/components/ui/FilterControls.tsx +30 -0
- package/src/components/ui/FormField.tsx +69 -0
- package/src/components/ui/Input.tsx +166 -140
- package/src/components/ui/InputGroup.tsx +16 -0
- package/src/components/ui/Kbd.tsx +88 -13
- package/src/components/ui/Lettermark.tsx +47 -0
- package/src/components/ui/Link.tsx +32 -0
- package/src/components/ui/Loader.tsx +96 -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/Modal.tsx +66 -36
- 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/SettingsLayout.tsx +94 -0
- package/src/components/ui/ShowcaseWrapper.tsx +4 -16
- 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/Stepper.tsx +5 -6
- 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/first-slice.test.tsx +98 -0
- package/src/components/ui/index.ts +335 -22
- package/src/components/ui/interaction-primitives.test.tsx +77 -0
- package/src/components/ui/kbd-icons.test.tsx +90 -0
- package/src/components/ui/product-patterns.test.tsx +77 -0
- package/src/styles/themes.css +411 -1
- package/tailwind-preset.ts +7 -0
- package/dist/chunk-SHF57J7U.mjs +0 -2910
- package/dist/index-CmS6hcUk.d.mts +0 -753
- package/dist/index-CmS6hcUk.d.ts +0 -753
- 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,12 +1,12 @@
|
|
|
1
1
|
import { Badge, Button, Card, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
|
|
2
2
|
|
|
3
3
|
export default function CardShowcase() {
|
|
4
|
-
const code = `import { Badge, Button, Card } from "the-old-ui";
|
|
4
|
+
const code = `import { Badge, Button, Card } from "@xenide-io/the-old-ui-theme";
|
|
5
5
|
|
|
6
6
|
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
7
7
|
<Card
|
|
8
8
|
title="Insight saved"
|
|
9
|
-
description="
|
|
9
|
+
description="A quiet, static surface. Depth is reserved for interactive or elevated content."
|
|
10
10
|
actions={
|
|
11
11
|
<>
|
|
12
12
|
<Button variant="secondary" outline>
|
|
@@ -19,7 +19,7 @@ export default function CardShowcase() {
|
|
|
19
19
|
|
|
20
20
|
<Card
|
|
21
21
|
title="With visual"
|
|
22
|
-
description="
|
|
22
|
+
description="Media sits flush to the card edge with a semantic divider."
|
|
23
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
24
|
actions={
|
|
25
25
|
<Button variant="primary" size="sm">
|
|
@@ -60,12 +60,19 @@ export default function CardShowcase() {
|
|
|
60
60
|
description="Grey trays on canvas — mirrors secondary surfaces in-app."
|
|
61
61
|
actions={<Button variant="primary" outline>Inspect</Button>}
|
|
62
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
|
+
/>
|
|
63
70
|
</div>`;
|
|
64
71
|
|
|
65
72
|
return (
|
|
66
73
|
<ShowcaseWrapper
|
|
67
74
|
title="Cards"
|
|
68
|
-
description="
|
|
75
|
+
description="Static by default, with explicit elevated, highlighted, and interactive treatments."
|
|
69
76
|
code={code}
|
|
70
77
|
filename="CardExample.tsx"
|
|
71
78
|
docs={
|
|
@@ -76,6 +83,8 @@ export default function CardShowcase() {
|
|
|
76
83
|
{ name: "description", type: "ReactNode", description: "Optional supporting copy." },
|
|
77
84
|
{ name: "actions", type: "ReactNode", description: "Button row rendered with card action spacing." },
|
|
78
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." },
|
|
79
88
|
]}
|
|
80
89
|
/>
|
|
81
90
|
}
|
|
@@ -83,7 +92,7 @@ export default function CardShowcase() {
|
|
|
83
92
|
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
84
93
|
<Card
|
|
85
94
|
title="Insight saved"
|
|
86
|
-
description="
|
|
95
|
+
description="A quiet, static surface. Depth is reserved for interactive or elevated content."
|
|
87
96
|
actions={
|
|
88
97
|
<>
|
|
89
98
|
<Button variant="secondary" outline>
|
|
@@ -96,7 +105,7 @@ export default function CardShowcase() {
|
|
|
96
105
|
|
|
97
106
|
<Card
|
|
98
107
|
title="With visual"
|
|
99
|
-
description="
|
|
108
|
+
description="Media sits flush to the card edge with a semantic divider."
|
|
100
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>}
|
|
101
110
|
actions={
|
|
102
111
|
<Button variant="primary" size="sm">
|
|
@@ -137,6 +146,13 @@ export default function CardShowcase() {
|
|
|
137
146
|
description="Grey trays on canvas — mirrors secondary surfaces in-app."
|
|
138
147
|
actions={<Button variant="primary" outline>Inspect</Button>}
|
|
139
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
|
+
/>
|
|
140
156
|
</div>
|
|
141
157
|
</ShowcaseWrapper>
|
|
142
158
|
);
|
|
@@ -4,8 +4,8 @@ import { IconCopy, IconEdit, IconLogout, IconPerson, IconTrash, IconTuning } fro
|
|
|
4
4
|
import { DropdownButton, DropdownItem, ShowcaseWrapper } from "@/components/ui";
|
|
5
5
|
|
|
6
6
|
export default function DropdownShowcase() {
|
|
7
|
-
const code = `import { IconCopy, IconEdit, IconLogout, IconPerson, IconTrash, IconTuning } from "the-old-ui";
|
|
8
|
-
import { DropdownButton, DropdownItem } from "the-old-ui";
|
|
7
|
+
const code = `import { IconCopy, IconEdit, IconLogout, IconPerson, IconTrash, IconTuning } from "@xenide-io/the-old-ui-theme";
|
|
8
|
+
import { DropdownButton, DropdownItem } from "@xenide-io/the-old-ui-theme";
|
|
9
9
|
|
|
10
10
|
<div className="ph-panel space-y-6">
|
|
11
11
|
<p className="text-sm text-ph-subtle">
|
|
@@ -51,15 +51,13 @@ import { DropdownButton, DropdownItem } from "the-old-ui";
|
|
|
51
51
|
return (
|
|
52
52
|
<ShowcaseWrapper
|
|
53
53
|
title="Dropdowns"
|
|
54
|
-
description="
|
|
54
|
+
description="Accessible menu buttons with keyboard navigation and automatic viewport-aware side flipping and alignment shifting."
|
|
55
55
|
code={code}
|
|
56
56
|
filename="DropdownExample.tsx"
|
|
57
57
|
>
|
|
58
58
|
<div className="ph-panel space-y-6">
|
|
59
59
|
<p className="text-sm text-ph-subtle">
|
|
60
|
-
|
|
61
|
-
<code className="ph-kbd">the-old-ui</code> — labelled Lemon triggers +{" "}
|
|
62
|
-
<code className="ph-kbd">DropdownItem</code> menu rows.
|
|
60
|
+
Menus prefer the requested side, then flip above or sideways and shift start/end alignment to remain visible.
|
|
63
61
|
</p>
|
|
64
62
|
|
|
65
63
|
<div className="flex flex-wrap items-start gap-6">
|
|
@@ -1,50 +1,98 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ComponentDocs,
|
|
6
|
+
FilterControls,
|
|
7
|
+
FilterMenu,
|
|
8
|
+
ShowcaseWrapper,
|
|
9
|
+
SortMenu,
|
|
10
|
+
} from "@/components/ui";
|
|
11
|
+
|
|
12
|
+
const statusOptions = [
|
|
13
|
+
{ value: "all", label: "Any status" },
|
|
14
|
+
{ value: "active", label: "Active" },
|
|
15
|
+
{ value: "draft", label: "Draft" },
|
|
16
|
+
{ value: "archived", label: "Archived" },
|
|
17
|
+
] as const;
|
|
18
|
+
|
|
19
|
+
const ownerOptions = [
|
|
20
|
+
{ value: "anyone", label: "Anyone" },
|
|
21
|
+
{ value: "me", label: "Owned by me" },
|
|
22
|
+
{ value: "team", label: "My team" },
|
|
23
|
+
] as const;
|
|
24
|
+
|
|
25
|
+
const sortOptions = [
|
|
26
|
+
{ value: "updated", label: "Recently updated" },
|
|
27
|
+
{ value: "created", label: "Recently created" },
|
|
28
|
+
{ value: "name", label: "Name A-Z" },
|
|
29
|
+
] as const;
|
|
5
30
|
|
|
6
31
|
export default function FilterChipsShowcase() {
|
|
7
|
-
const [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
32
|
+
const [status, setStatus] = useState("active");
|
|
33
|
+
const [owner, setOwner] = useState("me");
|
|
34
|
+
const [sort, setSort] = useState("updated");
|
|
35
|
+
|
|
36
|
+
const applied = [
|
|
37
|
+
...(status !== "all"
|
|
38
|
+
? [{ id: "status", label: "Status", value: statusOptions.find((option) => option.value === status)?.label, active: true }]
|
|
39
|
+
: []),
|
|
40
|
+
...(owner !== "anyone"
|
|
41
|
+
? [{ id: "owner", label: "Owner", value: ownerOptions.find((option) => option.value === owner)?.label, active: true }]
|
|
42
|
+
: []),
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
const clear = () => {
|
|
46
|
+
setStatus("all");
|
|
47
|
+
setOwner("anyone");
|
|
48
|
+
setSort("updated");
|
|
17
49
|
};
|
|
18
50
|
|
|
19
|
-
const
|
|
20
|
-
|
|
51
|
+
const remove = (id: string) => {
|
|
52
|
+
if (id === "status") setStatus("all");
|
|
53
|
+
if (id === "owner") setOwner("anyone");
|
|
21
54
|
};
|
|
22
55
|
|
|
23
|
-
const code = `import {
|
|
56
|
+
const code = `import { FilterControls, FilterMenu, SortMenu } from "@xenide-io/the-old-ui-theme";
|
|
24
57
|
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
58
|
+
<FilterControls
|
|
59
|
+
barProps={{ onClear: clearFilters, resultCount: "24 insights" }}
|
|
60
|
+
chipsProps={{ chips: appliedFilters, onRemove: removeFilter }}
|
|
61
|
+
emptyState={<span>No filters applied</span>}
|
|
62
|
+
>
|
|
63
|
+
<FilterMenu label="Status" value={status} options={statusOptions} onValueChange={setStatus} />
|
|
64
|
+
<FilterMenu label="Owner" value={owner} options={ownerOptions} onValueChange={setOwner} />
|
|
65
|
+
<SortMenu label="Sort" value={sort} options={sortOptions} onValueChange={setSort} />
|
|
66
|
+
</FilterControls>`;
|
|
28
67
|
|
|
29
68
|
return (
|
|
30
69
|
<ShowcaseWrapper
|
|
31
|
-
|
|
32
|
-
|
|
70
|
+
id="filters"
|
|
71
|
+
title="Filter and sort"
|
|
72
|
+
description="Controlled, URL-ready filter menus, applied chips, sorting, clear-all, and result feedback. Menus flip and shift at viewport edges."
|
|
33
73
|
code={code}
|
|
34
|
-
filename="
|
|
74
|
+
filename="FilterBarExample.tsx"
|
|
35
75
|
docs={
|
|
36
76
|
<ComponentDocs
|
|
37
77
|
rows={[
|
|
38
|
-
{ name: "
|
|
39
|
-
{ name: "
|
|
40
|
-
{ name: "
|
|
78
|
+
{ name: "FilterControls", type: "FilterControlsProps", description: "Combined filter bar and applied-chip composition without owning state." },
|
|
79
|
+
{ name: "FilterBar", type: "FilterBarProps", description: "Lower-level responsive group for filter, sort, clear, and result controls." },
|
|
80
|
+
{ name: "FilterMenu", type: "FilterMenuProps", description: "Single-choice filter using an adaptive radio menu." },
|
|
81
|
+
{ name: "SortMenu", type: "SortMenuProps", description: "Dedicated sort control kept separate from filter state." },
|
|
82
|
+
{ name: "FilterChips", type: "FilterChipsProps", description: "Applied or toggleable chips with independent keyboard-accessible removal." },
|
|
41
83
|
]}
|
|
42
84
|
/>
|
|
43
85
|
}
|
|
44
86
|
>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
87
|
+
<FilterControls
|
|
88
|
+
barProps={{ onClear: clear, resultCount: "24 insights" }}
|
|
89
|
+
chipsProps={{ chips: applied, onRemove: remove }}
|
|
90
|
+
emptyState={<p className="text-xs text-ph-mutedtext">No filters applied</p>}
|
|
91
|
+
>
|
|
92
|
+
<FilterMenu label="Status" value={status} options={statusOptions} onValueChange={setStatus} />
|
|
93
|
+
<FilterMenu label="Owner" value={owner} options={ownerOptions} onValueChange={setOwner} />
|
|
94
|
+
<SortMenu label="Sort" value={sort} options={sortOptions} onValueChange={setSort} />
|
|
95
|
+
</FilterControls>
|
|
48
96
|
</ShowcaseWrapper>
|
|
49
97
|
);
|
|
50
98
|
}
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "@/components/ui";
|
|
16
16
|
|
|
17
17
|
export default function FormShowcase() {
|
|
18
|
-
const code = `import { Checkbox, FileUpload, Input, Panel, Radio, Range, Rating, SearchGroup, Select, Textarea, Toggle } from "the-old-ui";
|
|
18
|
+
const code = `import { Checkbox, FileUpload, Input, Panel, Radio, Range, Rating, SearchGroup, Select, Textarea, Toggle } from "@xenide-io/the-old-ui-theme";
|
|
19
19
|
|
|
20
20
|
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
21
21
|
<Panel title="Text inputs" className="space-y-6">
|
|
@@ -67,6 +67,7 @@ export default function FormShowcase() {
|
|
|
67
67
|
<ComponentDocs
|
|
68
68
|
title="Input components"
|
|
69
69
|
rows={[
|
|
70
|
+
{ name: "FormField", type: "component", description: "Shared label, description, error, required-state, and generated-ID composition for custom controls." },
|
|
70
71
|
{ name: "Input", type: "text | search | email | password", description: "Labelled input with error, helperText, size, and variant props." },
|
|
71
72
|
{ name: "Select", type: "select", description: "Labelled select with error, helperText, size, and disabled props." },
|
|
72
73
|
{ name: "Textarea", type: "textarea", description: "Labelled multiline input with the same state props as Input." },
|