@xenide-io/the-old-ui-theme 0.4.4 → 0.4.6

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.
Files changed (75) hide show
  1. package/dist/{chunk-54ZR4VL5.mjs → chunk-RZXHZWUB.mjs} +44 -17
  2. package/dist/{index-B5NOyoKS.d.mts → index-Od4pIP4F.d.mts} +7 -1
  3. package/dist/{index-B5NOyoKS.d.ts → index-Od4pIP4F.d.ts} +7 -1
  4. package/dist/index.d.mts +2 -2
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +37 -10
  7. package/dist/index.mjs +1 -1
  8. package/dist/suite.d.mts +152 -41
  9. package/dist/suite.d.ts +152 -41
  10. package/dist/suite.js +1184 -661
  11. package/dist/suite.mjs +1122 -600
  12. package/dist/ui.d.mts +1 -1
  13. package/dist/ui.d.ts +1 -1
  14. package/dist/ui.js +37 -10
  15. package/dist/ui.mjs +1 -1
  16. package/package.json +7 -3
  17. package/src/components/ui/Modal.tsx +70 -26
  18. package/src/styles/suite-skin.css +284 -24
  19. package/src/suite/components/ai-panel.tsx +269 -103
  20. package/src/suite/components/suite-app-layout.tsx +48 -28
  21. package/src/suite/components/suite-layout.tsx +84 -40
  22. package/src/suite/components/suite-mobile-drawer.tsx +35 -22
  23. package/src/suite/components/suite-notification-bell.tsx +9 -3
  24. package/src/suite/components/suite-settings-layout.tsx +82 -0
  25. package/src/suite/components/suite-settings-mobile-nav.tsx +18 -17
  26. package/src/suite/components/suite-skeleton.tsx +3 -3
  27. package/src/suite/components/today-calibrating.tsx +11 -35
  28. package/src/suite/components/today-page-frame.tsx +19 -11
  29. package/src/suite/components/today-ui.tsx +276 -19
  30. package/src/suite/index.ts +41 -25
  31. package/src/suite/lib/apps.ts +32 -2
  32. package/src/suite/lib/use-sidebar-width.ts +114 -0
  33. package/src/components/sections/AccordionShowcase.tsx +0 -45
  34. package/src/components/sections/AlertShowcase.tsx +0 -40
  35. package/src/components/sections/AvatarShowcase.tsx +0 -80
  36. package/src/components/sections/BadgeShowcase.tsx +0 -65
  37. package/src/components/sections/ButtonShowcase.tsx +0 -308
  38. package/src/components/sections/CalendarShowcase.tsx +0 -35
  39. package/src/components/sections/CardShowcase.tsx +0 -159
  40. package/src/components/sections/CodeMockupShowcase.tsx +0 -56
  41. package/src/components/sections/ColorPalette.tsx +0 -117
  42. package/src/components/sections/CommandPaletteShowcase.tsx +0 -48
  43. package/src/components/sections/CountdownShowcase.tsx +0 -43
  44. package/src/components/sections/DiffShowcase.tsx +0 -70
  45. package/src/components/sections/DrawerShowcase.tsx +0 -97
  46. package/src/components/sections/DropdownShowcase.tsx +0 -98
  47. package/src/components/sections/EmptyStateShowcase.tsx +0 -50
  48. package/src/components/sections/FilterChipsShowcase.tsx +0 -98
  49. package/src/components/sections/FormShowcase.tsx +0 -127
  50. package/src/components/sections/HoverCardShowcase.tsx +0 -50
  51. package/src/components/sections/IconShowcase.tsx +0 -121
  52. package/src/components/sections/IndicatorShowcase.tsx +0 -52
  53. package/src/components/sections/KbdShowcase.tsx +0 -57
  54. package/src/components/sections/ModalShowcase.tsx +0 -211
  55. package/src/components/sections/NavigationShowcase.tsx +0 -199
  56. package/src/components/sections/NewComponentsShowcase.tsx +0 -1052
  57. package/src/components/sections/ProductLayoutsShowcase.tsx +0 -78
  58. package/src/components/sections/ProgressShowcase.tsx +0 -82
  59. package/src/components/sections/QuillChartShowcase.tsx +0 -92
  60. package/src/components/sections/QuillDashboardShowcase.tsx +0 -149
  61. package/src/components/sections/SegmentedControlShowcase.tsx +0 -49
  62. package/src/components/sections/SetupThemeShowcase.tsx +0 -262
  63. package/src/components/sections/SidebarShowcase.tsx +0 -152
  64. package/src/components/sections/StackShowcase.tsx +0 -33
  65. package/src/components/sections/StepperShowcase.tsx +0 -37
  66. package/src/components/sections/SuiteShowcase.tsx +0 -669
  67. package/src/components/sections/SwapShowcase.tsx +0 -99
  68. package/src/components/sections/TabShowcase.tsx +0 -84
  69. package/src/components/sections/TableShowcase.tsx +0 -142
  70. package/src/components/sections/TimelineShowcase.tsx +0 -83
  71. package/src/components/sections/ToastShowcase.tsx +0 -108
  72. package/src/components/sections/TooltipShowcase.tsx +0 -38
  73. package/src/components/sections/UtilityShowcase.tsx +0 -81
  74. package/src/styles/excel-themes.css +0 -110
  75. package/src/styles/lemon-primitives.css +0 -550
@@ -1,98 +0,0 @@
1
- "use client";
2
-
3
- import { IconCopy, IconEdit, IconLogout, IconPerson, IconTrash, IconTuning } from "@/components/icons";
4
- import { DropdownButton, DropdownItem, ShowcaseWrapper } from "@/components/ui";
5
-
6
- export default function DropdownShowcase() {
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
-
10
- <div className="ph-panel space-y-6">
11
- <p className="text-sm text-ph-subtle">
12
- Use <code className="ph-kbd">DropdownButton</code> from{" "}
13
- <code className="ph-kbd">the-old-ui</code> — labelled Lemon triggers +{" "}
14
- <code className="ph-kbd">DropdownItem</code> menu rows.
15
- </p>
16
-
17
- <div className="flex flex-wrap items-start gap-6">
18
- <DropdownButton label="Actions" variant="primary">
19
- <DropdownItem>Refresh cache</DropdownItem>
20
- <DropdownItem>Export HogQL</DropdownItem>
21
- <DropdownItem>Jump to inspector</DropdownItem>
22
- </DropdownButton>
23
-
24
- <DropdownButton label="Account" variant="secondary">
25
- <DropdownItem>
26
- <IconPerson className="h-4 w-4" aria-hidden /> Profile
27
- </DropdownItem>
28
- <DropdownItem>
29
- <IconTuning className="h-4 w-4" aria-hidden /> Project settings
30
- </DropdownItem>
31
- <DropdownItem>
32
- <IconLogout className="h-4 w-4" aria-hidden /> Sign out
33
- </DropdownItem>
34
- </DropdownButton>
35
-
36
- <DropdownButton label="Row menu" variant="accent" outline>
37
- <DropdownItem>
38
- <IconEdit className="h-4 w-4" aria-hidden /> Rename
39
- </DropdownItem>
40
- <DropdownItem>
41
- <IconCopy className="h-4 w-4" aria-hidden /> Duplicate key
42
- </DropdownItem>
43
- <div className="my-1 h-px bg-ph-border" />
44
- <DropdownItem className="text-ph-danger">
45
- <IconTrash className="h-4 w-4" aria-hidden /> Delete
46
- </DropdownItem>
47
- </DropdownButton>
48
- </div>
49
- </div>`;
50
-
51
- return (
52
- <ShowcaseWrapper
53
- title="Dropdowns"
54
- description="Accessible menu buttons with keyboard navigation and automatic viewport-aware side flipping and alignment shifting."
55
- code={code}
56
- filename="DropdownExample.tsx"
57
- >
58
- <div className="ph-panel space-y-6">
59
- <p className="text-sm text-ph-subtle">
60
- Menus prefer the requested side, then flip above or sideways and shift start/end alignment to remain visible.
61
- </p>
62
-
63
- <div className="flex flex-wrap items-start gap-6">
64
- <DropdownButton label="Actions" variant="primary">
65
- <DropdownItem>Refresh cache</DropdownItem>
66
- <DropdownItem>Export HogQL</DropdownItem>
67
- <DropdownItem>Jump to inspector</DropdownItem>
68
- </DropdownButton>
69
-
70
- <DropdownButton label="Account" variant="secondary">
71
- <DropdownItem>
72
- <IconPerson className="h-4 w-4" aria-hidden /> Profile
73
- </DropdownItem>
74
- <DropdownItem>
75
- <IconTuning className="h-4 w-4" aria-hidden /> Project settings
76
- </DropdownItem>
77
- <DropdownItem>
78
- <IconLogout className="h-4 w-4" aria-hidden /> Sign out
79
- </DropdownItem>
80
- </DropdownButton>
81
-
82
- <DropdownButton label="Row menu" variant="accent" outline>
83
- <DropdownItem>
84
- <IconEdit className="h-4 w-4" aria-hidden /> Rename
85
- </DropdownItem>
86
- <DropdownItem>
87
- <IconCopy className="h-4 w-4" aria-hidden /> Duplicate key
88
- </DropdownItem>
89
- <div className="my-1 h-px bg-ph-border" />
90
- <DropdownItem className="text-ph-danger">
91
- <IconTrash className="h-4 w-4" aria-hidden /> Delete
92
- </DropdownItem>
93
- </DropdownButton>
94
- </div>
95
- </div>
96
- </ShowcaseWrapper>
97
- );
98
- }
@@ -1,50 +0,0 @@
1
- "use client";
2
-
3
- import { Button, ComponentDocs, EmptyState, ShowcaseWrapper } from "@/components/ui";
4
- import { IconBox, IconPlus } from "@/components/icons";
5
-
6
- export default function EmptyStateShowcase() {
7
- const code = `import { Button, EmptyState } from "the-old-ui";
8
- import { IconBox, IconPlus } from "the-old-ui";
9
-
10
- <EmptyState
11
- icon={<IconBox className="h-7 w-7" />}
12
- title="No projects yet"
13
- description="Get started by creating your first project to organize your analytics."
14
- action={
15
- <Button icon={<IconPlus className="h-4 w-4" />}>
16
- Create Project
17
- </Button>
18
- }
19
- />`;
20
-
21
- return (
22
- <ShowcaseWrapper
23
- title="Empty State"
24
- description="Reusable blank-state component for zero data, filtered results, or onboarding prompts."
25
- code={code}
26
- filename="EmptyStateExample.tsx"
27
- docs={
28
- <ComponentDocs
29
- rows={[
30
- { name: "icon", type: "ReactNode", description: "Optional visual icon." },
31
- { name: "title", type: "string", description: "Primary message." },
32
- { name: "description", type: "string", description: "Supporting copy." },
33
- { name: "action", type: "ReactNode", description: "Primary CTA slot." },
34
- ]}
35
- />
36
- }
37
- >
38
- <EmptyState
39
- icon={<IconBox className="h-7 w-7" />}
40
- title="No projects yet"
41
- description="Get started by creating your first project to organize your analytics."
42
- action={
43
- <Button icon={<IconPlus className="h-4 w-4" />}>
44
- Create Project
45
- </Button>
46
- }
47
- />
48
- </ShowcaseWrapper>
49
- );
50
- }
@@ -1,98 +0,0 @@
1
- "use client";
2
-
3
- import { useState } from "react";
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;
30
-
31
- export default function FilterChipsShowcase() {
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");
49
- };
50
-
51
- const remove = (id: string) => {
52
- if (id === "status") setStatus("all");
53
- if (id === "owner") setOwner("anyone");
54
- };
55
-
56
- const code = `import { FilterControls, FilterMenu, SortMenu } from "@xenide-io/the-old-ui-theme";
57
-
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>`;
67
-
68
- return (
69
- <ShowcaseWrapper
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."
73
- code={code}
74
- filename="FilterBarExample.tsx"
75
- docs={
76
- <ComponentDocs
77
- rows={[
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." },
83
- ]}
84
- />
85
- }
86
- >
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>
96
- </ShowcaseWrapper>
97
- );
98
- }
@@ -1,127 +0,0 @@
1
- import {
2
- ComponentDocs,
3
- Checkbox,
4
- FileUpload,
5
- Input,
6
- Panel,
7
- Radio,
8
- Range,
9
- Rating,
10
- SearchGroup,
11
- Select,
12
- Textarea,
13
- Toggle,
14
- ShowcaseWrapper,
15
- } from "@/components/ui";
16
-
17
- export default function FormShowcase() {
18
- const code = `import { Checkbox, FileUpload, Input, Panel, Radio, Range, Rating, SearchGroup, Select, Textarea, Toggle } from "@xenide-io/the-old-ui-theme";
19
-
20
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
21
- <Panel title="Text inputs" className="space-y-6">
22
- <Input label="Default" placeholder="Filter events..." />
23
- <Input label="Error" placeholder="hogql query" error="Malformed identifier near line 12" />
24
- <Input label="Ghost toolbar field" type="search" placeholder="Search..." variant="ghost" />
25
- <Input label="Disabled" placeholder="Unavailable" disabled />
26
- </Panel>
27
-
28
- <Panel title="Select & textarea" className="space-y-6">
29
- <Select label="Environment" defaultValue="prod">
30
- <option value="prod">Production</option>
31
- <option value="staging">Staging</option>
32
- <option value="dev">Development</option>
33
- </Select>
34
-
35
- <Textarea label="Description" placeholder="Explain the rollout..." />
36
-
37
- <Checkbox label="Autocapture pageviews" defaultChecked />
38
- <Checkbox label="Record console logs (disabled product)" disabled />
39
-
40
- <div className="flex flex-col gap-2">
41
- <Radio name="cohort" label="Dynamic cohort" defaultChecked />
42
- <Radio name="cohort" label="Static upload" />
43
- </div>
44
-
45
- <Toggle label="Session replay" defaultChecked />
46
- <Toggle label="Error tracking (disabled)" disabled />
47
- </Panel>
48
-
49
- <Panel title="Range, rating, uploads" className="space-y-6 lg:col-span-2">
50
- <Range label="Sample rate" min={0} max={100} defaultValue={42} minLabel="Off" valueLabel="42%" maxLabel="Full" wrapperClassName="max-w-xl" />
51
-
52
- <Rating label="Satisfaction" value={4} />
53
-
54
- <FileUpload label="Source map archive" prompt="Drop tarball or browse" wrapperClassName="max-w-xl" />
55
-
56
- <SearchGroup label="Grouped search" submitLabel="Search records" />
57
- </Panel>
58
- </div>`;
59
-
60
- return (
61
- <ShowcaseWrapper
62
- title="Inputs & Forms"
63
- description="Actual exported input components with built-in labels, error states, helper text, disabled state, and size/variant props."
64
- code={code}
65
- filename="FormExample.tsx"
66
- docs={
67
- <ComponentDocs
68
- title="Input components"
69
- rows={[
70
- { name: "FormField", type: "component", description: "Shared label, description, error, required-state, and generated-ID composition for custom controls." },
71
- { name: "Input", type: "text | search | email | password", description: "Labelled input with error, helperText, size, and variant props." },
72
- { name: "Select", type: "select", description: "Labelled select with error, helperText, size, and disabled props." },
73
- { name: "Textarea", type: "textarea", description: "Labelled multiline input with the same state props as Input." },
74
- { name: "Checkbox", type: "checkbox", description: "Checkbox with label and native input props." },
75
- { name: "Radio", type: "radio", description: "Radio item with label and native input props." },
76
- { name: "Toggle", type: "switch", description: "Switch-style checkbox with row layout." },
77
- { name: "Range", type: "range", description: "Range slider with optional min/value/max labels." },
78
- { name: "Rating", type: "rating", description: "Star rating display/control with value, max, and onChange props." },
79
- { name: "FileUpload", type: "file", description: "Dropzone-style file input wrapper." },
80
- { name: "size", type: "sm | md | lg", defaultValue: "md", description: "Shared density prop for Input, Select, and Textarea." },
81
- { name: "variant", type: "default | ghost", defaultValue: "default", description: "Input visual variant. Ghost is useful in toolbar/search contexts." },
82
- ]}
83
- />
84
- }
85
- >
86
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
87
- <Panel title="Text inputs" className="space-y-6">
88
- <Input label="Default" placeholder="Filter events..." />
89
- <Input label="Error" placeholder="hogql query" error="Malformed identifier near line 12" />
90
- <Input label="Ghost toolbar field" type="search" placeholder="Search..." variant="ghost" />
91
- <Input label="Disabled" placeholder="Unavailable" disabled />
92
- </Panel>
93
-
94
- <Panel title="Select & textarea" className="space-y-6">
95
- <Select label="Environment" defaultValue="prod">
96
- <option value="prod">Production</option>
97
- <option value="staging">Staging</option>
98
- <option value="dev">Development</option>
99
- </Select>
100
-
101
- <Textarea label="Description" placeholder="Explain the rollout..." />
102
-
103
- <Checkbox label="Autocapture pageviews" defaultChecked />
104
- <Checkbox label="Record console logs (disabled product)" disabled />
105
-
106
- <div className="flex flex-col gap-2">
107
- <Radio name="cohort" label="Dynamic cohort" defaultChecked />
108
- <Radio name="cohort" label="Static upload" />
109
- </div>
110
-
111
- <Toggle label="Session replay" defaultChecked />
112
- <Toggle label="Error tracking (disabled)" disabled />
113
- </Panel>
114
-
115
- <Panel title="Range, rating, uploads" className="space-y-6 lg:col-span-2">
116
- <Range label="Sample rate" min={0} max={100} defaultValue={42} minLabel="Off" valueLabel="42%" maxLabel="Full" wrapperClassName="max-w-xl" />
117
-
118
- <Rating label="Satisfaction" value={4} />
119
-
120
- <FileUpload label="Source map archive" prompt="Drop tarball or browse" wrapperClassName="max-w-xl" />
121
-
122
- <SearchGroup label="Grouped search" submitLabel="Search records" />
123
- </Panel>
124
- </div>
125
- </ShowcaseWrapper>
126
- );
127
- }
@@ -1,50 +0,0 @@
1
- "use client";
2
-
3
- import { Badge, Button, ComponentDocs, HoverCard, ShowcaseWrapper } from "@/components/ui";
4
-
5
- export default function HoverCardShowcase() {
6
- const code = `import { Badge, Button, HoverCard } from "the-old-ui";
7
-
8
- <div className="ph-panel flex justify-center py-12">
9
- <HoverCard trigger={<Button>Hover me</Button>}>
10
- <div className="space-y-2">
11
- <h4 className="font-semibold text-ph-ink">User Profile</h4>
12
- <p className="text-sm text-ph-subtle">This is a hover card with rich content that appears on hover.</p>
13
- <div className="flex gap-2 pt-2">
14
- <Badge variant="brand">Admin</Badge>
15
- <Badge variant="neutral">Pro</Badge>
16
- </div>
17
- </div>
18
- </HoverCard>
19
- </div>`;
20
-
21
- return (
22
- <ShowcaseWrapper
23
- title="Hover Card"
24
- description="Rich hover disclosure for contextual details."
25
- code={code}
26
- filename="HoverCardExample.tsx"
27
- docs={
28
- <ComponentDocs
29
- rows={[
30
- { name: "trigger", type: "ReactNode", description: "Element users hover or focus." },
31
- { name: "children", type: "ReactNode", description: "Content shown in the card." },
32
- ]}
33
- />
34
- }
35
- >
36
- <div className="ph-panel flex justify-center py-12">
37
- <HoverCard trigger={<Button>Hover me</Button>}>
38
- <div className="space-y-2">
39
- <h4 className="font-semibold text-ph-ink">User Profile</h4>
40
- <p className="text-sm text-ph-subtle">This is a hover card with rich content that appears on hover.</p>
41
- <div className="flex gap-2 pt-2">
42
- <Badge variant="brand">Admin</Badge>
43
- <Badge variant="neutral">Pro</Badge>
44
- </div>
45
- </div>
46
- </HoverCard>
47
- </div>
48
- </ShowcaseWrapper>
49
- );
50
- }
@@ -1,121 +0,0 @@
1
- import type { ComponentType, CSSProperties } from "react";
2
- import {
3
- CANONICAL_ICONS,
4
- OLD_UI_ICONS,
5
- IconAreaChart, IconDatabase, IconFlag, IconFlask, IconGridView, IconRecording, IconSurveys,
6
- type CanonicalIconName,
7
- type IconProps,
8
- } from "@/components/icons";
9
- import { Kbd, ShowcaseWrapper } from "@/components/ui";
10
-
11
- const iconCells = Object.entries(CANONICAL_ICONS) as Array<[
12
- CanonicalIconName,
13
- ComponentType<IconProps>,
14
- ]>;
15
-
16
- const originalIcons = Object.entries(OLD_UI_ICONS) as Array<[
17
- keyof typeof OLD_UI_ICONS,
18
- ComponentType<IconProps>,
19
- ]>;
20
-
21
- const productTiles = [
22
- { label: "Session replay", Icon: IconRecording, color: "--ph-product-session-replay" },
23
- { label: "Product analytics", Icon: IconAreaChart, color: "--ph-product-product-analytics" },
24
- { label: "Data pipeline", Icon: IconGridView, color: "--ph-product-data-pipeline" },
25
- { label: "Feature flags", Icon: IconFlag, color: "--ph-product-feature-flags" },
26
- { label: "Experiments", Icon: IconFlask, color: "--ph-product-experiments" },
27
- { label: "Data warehouse", Icon: IconDatabase, color: "--ph-product-data-warehouse" },
28
- { label: "Surveys", Icon: IconSurveys, color: "--ph-product-surveys" },
29
- ];
30
-
31
- export default function IconShowcase() {
32
- const code = `import {
33
- IconCommandCursor,
34
- IconDataReel,
35
- IconInsightBoard,
36
- IconOldWindow,
37
- } from "@xenide-io/the-old-ui-theme";
38
-
39
- <div className="flex items-center gap-4 text-ph-ink">
40
- <IconOldWindow size={16} />
41
- <IconCommandCursor size={20} />
42
- <IconDataReel size={24} />
43
- <IconInsightBoard size={24} aria-label="Insights" />
44
- </div>`;
45
-
46
- return (
47
- <ShowcaseWrapper
48
- title="Icons"
49
- description="A canonical filled SVG registry with clearly identified Old UI originals and the new suite icon system."
50
- code={code}
51
- filename="IconExample.tsx"
52
- >
53
- <div className="space-y-8">
54
- <section className="ph-panel space-y-4">
55
- <div>
56
- <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Old UI originals</h3>
57
- <p className="mt-2 max-w-3xl text-sm leading-relaxed text-ph-subtle">
58
- Authored 24px glyphs for retro interface and analytics concepts. Each uses <Kbd variant="token">currentColor</Kbd>, a filled silhouette, and enough negative space to survive at 16px.
59
- </p>
60
- </div>
61
- <div className="grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-6">
62
- {originalIcons.map(([name, Icon]) => (
63
- <div key={name} className="flex flex-col items-center gap-3 rounded-lg border border-ph-border-subtle bg-ph-raised p-4 text-center">
64
- <div className="flex h-9 items-center gap-2 text-ph-ink">
65
- <Icon size={16} />
66
- <Icon size={24} />
67
- </div>
68
- <span className="max-w-full break-words text-xs font-medium text-ph-subtle">{formatName(name)}</span>
69
- </div>
70
- ))}
71
- </div>
72
- </section>
73
-
74
- <section className="ph-panel space-y-4">
75
- <div>
76
- <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Canonical registry</h3>
77
- <p className="mt-2 max-w-3xl text-sm leading-relaxed text-ph-subtle">
78
- Documentation is generated from <Kbd variant="token">CANONICAL_ICONS</Kbd>. Compatibility aliases remain available through <Kbd variant="token">PH_ICONS</Kbd> without duplicating this inventory.
79
- </p>
80
- </div>
81
- <div className="grid grid-cols-3 gap-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8">
82
- {iconCells.map(([name, Icon]) => (
83
- <div key={name} className="flex min-w-0 flex-col items-center gap-2 rounded-lg border border-ph-border-subtle bg-ph-raised p-3 text-center">
84
- <div className="flex h-8 items-center gap-2 text-ph-ink">
85
- <Icon size={16} />
86
- <Icon size={24} />
87
- </div>
88
- <span className="max-w-full break-words text-[10px] font-medium tracking-wide text-ph-mutedtext">{name}</span>
89
- </div>
90
- ))}
91
- </div>
92
- </section>
93
-
94
- <section className="ph-panel space-y-4">
95
- <div>
96
- <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Product hues</h3>
97
- <p className="mt-2 max-w-3xl text-sm leading-relaxed text-ph-subtle">
98
- Product color is used as a subtle tint and icon accent instead of assuming white foregrounds on every theme.
99
- </p>
100
- </div>
101
- <div className="grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-7">
102
- {productTiles.map(({ label, Icon, color }) => (
103
- <div
104
- key={label}
105
- className="ph-icon-tile ph-product-icon-tile"
106
- style={{ "--ph-icon-tile-color": `var(${color})` } as CSSProperties}
107
- >
108
- <Icon className="mb-1" size={28} />
109
- <span className="max-w-full px-1 text-center normal-case tracking-normal">{label}</span>
110
- </div>
111
- ))}
112
- </div>
113
- </section>
114
- </div>
115
- </ShowcaseWrapper>
116
- );
117
- }
118
-
119
- function formatName(name: string) {
120
- return name.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (letter) => letter.toUpperCase());
121
- }
@@ -1,52 +0,0 @@
1
- import { IconBell, IconMail, IconShoppingCart, IconSurveys } from "@/components/icons";
2
- import { ComponentDocs, Indicator, ShowcaseWrapper } from "@/components/ui";
3
-
4
- const indicators = [
5
- { icon: IconBell, label: "Notifications", count: "8", hue: "bg-ph-brand" },
6
- { icon: IconMail, label: "Messages", count: "99+", hue: "bg-ph-blue" },
7
- { icon: IconSurveys, label: "Comments", count: "3", hue: "bg-emerald-600" },
8
- { icon: IconShoppingCart, label: "Cart", count: "!", hue: "bg-ph-danger" },
9
- ] as const;
10
-
11
- export default function IndicatorShowcase() {
12
- const code = `import { Indicator } from "the-old-ui";
13
-
14
- <Indicator badge="8" color="bg-ph-brand">
15
- <Button variant="ghost" shape="circle">
16
- <IconBell className="h-6 w-6" />
17
- </Button>
18
- </Indicator>
19
-
20
- <Indicator dot color="bg-ph-brand">
21
- <Avatar label="JD" />
22
- </Indicator>`;
23
-
24
- return (
25
- <ShowcaseWrapper
26
- title="Badge hotspots"
27
- description="Indicator badges and dots for notifications, status, and counts."
28
- code={code}
29
- filename="IndicatorExample.tsx"
30
- docs={
31
- <ComponentDocs
32
- rows={[
33
- { name: "badge", type: "ReactNode", description: "Badge content (number, text, !)." },
34
- { name: "color", type: "string", defaultValue: "bg-ph-brand", description: "Tailwind colour class." },
35
- { name: "position", type: "top-right | top-left | bottom-right | bottom-left", defaultValue: "top-right", description: "Indicator position." },
36
- { name: "dot", type: "boolean", defaultValue: "false", description: "Show a simple dot instead of badge." },
37
- ]}
38
- />
39
- }
40
- >
41
- <div className="flex flex-wrap gap-10 rounded-xl border border-ph-border bg-ph-muted px-10 py-8">
42
- {indicators.map(({ icon: Icon, label, count, hue }) => (
43
- <Indicator key={label} badge={count} color={hue}>
44
- <div className="flex h-10 w-10 items-center justify-center rounded-full bg-ph-surface shadow-ph">
45
- <Icon className="h-6 w-6 text-ph-mutedtext" />
46
- </div>
47
- </Indicator>
48
- ))}
49
- </div>
50
- </ShowcaseWrapper>
51
- );
52
- }
@@ -1,57 +0,0 @@
1
- import { ComponentDocs, Kbd, Panel, ShowcaseWrapper } from "@/components/ui";
2
-
3
- export default function KbdShowcase() {
4
- const code = `import { Kbd, Panel } from "@xenide-io/the-old-ui-theme";
5
-
6
- <Panel className="space-y-5">
7
- <div className="flex flex-wrap items-center gap-4">
8
- <Kbd keys={["Command", "K"]} platform="mac" />
9
- <Kbd keys={["Control", "K"]} platform="windows" />
10
- <Kbd keys={["Control", "K"]} />
11
- </div>
12
- <div className="flex flex-wrap items-center gap-3">
13
- <Kbd variant="key">Escape</Kbd>
14
- <Kbd variant="key">↵</Kbd>
15
- <Kbd variant="token">HogQL</Kbd>
16
- </div>
17
- </Panel>`;
18
-
19
- return (
20
- <ShowcaseWrapper
21
- title="Keyboard glyphs"
22
- description="PostHog-style joined shortcut caps with crisp lower borders, monospace type, and separate inline code tokens."
23
- code={code}
24
- filename="KbdExample.tsx"
25
- docs={
26
- <ComponentDocs
27
- rows={[
28
- { name: "variant", type: "shortcut | key | token", defaultValue: "shortcut", description: "Chooses a shortcut group, single physical key, or inline code token." },
29
- { name: "keys", type: "readonly ReactNode[]", description: "Joins a shortcut chord inside one compact cap without stringifying React nodes." },
30
- { name: "platform", type: "text | mac | windows", defaultValue: "text", description: "Converts named modifier keys only when explicitly requested." },
31
- { name: "separator", type: "ReactNode", description: "Optional visual separator inside the joined shortcut cap." },
32
- { name: "aria-label", type: "string", description: "Optional spoken shortcut override; textual keys generate one automatically." },
33
- ]}
34
- />
35
- }
36
- >
37
- <Panel className="space-y-5">
38
- <div>
39
- <h3 className="mb-3 text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Platform shortcuts</h3>
40
- <div className="flex flex-wrap items-center gap-4">
41
- <Kbd keys={["Command", "K"]} platform="mac" />
42
- <Kbd keys={["Control", "K"]} platform="windows" />
43
- <Kbd keys={["Control", "K"]} />
44
- </div>
45
- </div>
46
- <div>
47
- <h3 className="mb-3 text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Keys and tokens</h3>
48
- <div className="flex flex-wrap items-center gap-3">
49
- <Kbd variant="key">Escape</Kbd>
50
- <Kbd variant="key">↵</Kbd>
51
- <Kbd variant="token">HogQL</Kbd>
52
- </div>
53
- </div>
54
- </Panel>
55
- </ShowcaseWrapper>
56
- );
57
- }