@xenide-io/the-old-ui-theme 0.2.6 → 0.3.0

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 (126) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-FDMD3IIN.mjs +3831 -0
  3. package/dist/index-D1RTT2Ap.d.mts +1044 -0
  4. package/dist/index-D1RTT2Ap.d.ts +1044 -0
  5. package/dist/index.d.mts +11 -758
  6. package/dist/index.d.ts +11 -758
  7. package/dist/index.js +1749 -768
  8. package/dist/index.mjs +312 -2846
  9. package/dist/tailwind-preset.js +7 -0
  10. package/dist/tailwind-preset.mjs +7 -0
  11. package/dist/ui.d.mts +4 -0
  12. package/dist/ui.d.ts +4 -0
  13. package/dist/ui.js +3864 -0
  14. package/dist/ui.mjs +169 -0
  15. package/package.json +28 -6
  16. package/src/app/globals.css +1005 -227
  17. package/src/components/charts/index.ts +8 -0
  18. package/src/components/charts/ph-insight-charts.tsx +162 -0
  19. package/src/components/dashboard/DashboardFiltersBar.tsx +19 -0
  20. package/src/components/dashboard/DashboardGrid.tsx +23 -0
  21. package/src/components/dashboard/DashboardInsightPlaceholder.tsx +37 -0
  22. package/src/components/dashboard/DashboardKpiCard.tsx +25 -0
  23. package/src/components/dashboard/DashboardToolbar.tsx +23 -0
  24. package/src/components/dashboard/DashboardWell.tsx +10 -0
  25. package/src/components/dashboard/InsightMiniCard.tsx +26 -0
  26. package/src/components/dashboard/InsightShell.tsx +37 -0
  27. package/src/components/dashboard/InsightShellHeader.tsx +22 -0
  28. package/src/components/dashboard/MiniTrendBars.tsx +51 -0
  29. package/src/components/dashboard/index.ts +31 -0
  30. package/src/components/dashboard/types.ts +9 -0
  31. package/src/components/icons/IconBase.tsx +47 -0
  32. package/src/components/icons/createIconBase.tsx +32 -0
  33. package/src/components/icons/icons.tsx +557 -0
  34. package/src/components/icons/index.ts +3 -0
  35. package/src/components/sections/AccordionShowcase.tsx +45 -0
  36. package/src/components/sections/AlertShowcase.tsx +40 -0
  37. package/src/components/sections/AvatarShowcase.tsx +80 -0
  38. package/src/components/sections/BadgeShowcase.tsx +65 -0
  39. package/src/components/sections/ButtonShowcase.tsx +308 -0
  40. package/src/components/sections/CalendarShowcase.tsx +35 -0
  41. package/src/components/sections/CardShowcase.tsx +159 -0
  42. package/src/components/sections/ChartShowcase.tsx +190 -0
  43. package/src/components/sections/CodeMockupShowcase.tsx +56 -0
  44. package/src/components/sections/ColorPalette.tsx +117 -0
  45. package/src/components/sections/CommandPaletteShowcase.tsx +48 -0
  46. package/src/components/sections/CountdownShowcase.tsx +43 -0
  47. package/src/components/sections/DashboardShowcase.tsx +191 -0
  48. package/src/components/sections/DiffShowcase.tsx +70 -0
  49. package/src/components/sections/DrawerShowcase.tsx +97 -0
  50. package/src/components/sections/DropdownShowcase.tsx +98 -0
  51. package/src/components/sections/EmptyStateShowcase.tsx +50 -0
  52. package/src/components/sections/FilterChipsShowcase.tsx +98 -0
  53. package/src/components/sections/FormShowcase.tsx +127 -0
  54. package/src/components/sections/HoverCardShowcase.tsx +50 -0
  55. package/src/components/sections/IconShowcase.tsx +127 -0
  56. package/src/components/sections/IndicatorShowcase.tsx +52 -0
  57. package/src/components/sections/KbdShowcase.tsx +57 -0
  58. package/src/components/sections/ModalShowcase.tsx +211 -0
  59. package/src/components/sections/NavigationShowcase.tsx +199 -0
  60. package/src/components/sections/ProductLayoutsShowcase.tsx +138 -0
  61. package/src/components/sections/ProgressShowcase.tsx +82 -0
  62. package/src/components/sections/SegmentedControlShowcase.tsx +49 -0
  63. package/src/components/sections/SetupThemeShowcase.tsx +262 -0
  64. package/src/components/sections/StackShowcase.tsx +33 -0
  65. package/src/components/sections/StatShowcase.tsx +129 -0
  66. package/src/components/sections/StepperShowcase.tsx +37 -0
  67. package/src/components/sections/SwapShowcase.tsx +99 -0
  68. package/src/components/sections/TabShowcase.tsx +84 -0
  69. package/src/components/sections/TableShowcase.tsx +140 -0
  70. package/src/components/sections/TimelineShowcase.tsx +83 -0
  71. package/src/components/sections/ToastShowcase.tsx +108 -0
  72. package/src/components/sections/TooltipShowcase.tsx +44 -0
  73. package/src/components/sections/UtilityShowcase.tsx +81 -0
  74. package/src/components/ui/Accordion.tsx +77 -0
  75. package/src/components/ui/Alert.tsx +77 -0
  76. package/src/components/ui/AuthLayout.tsx +58 -0
  77. package/src/components/ui/Avatar.tsx +97 -0
  78. package/src/components/ui/Badge.tsx +60 -0
  79. package/src/components/ui/Button.tsx +120 -0
  80. package/src/components/ui/ButtonChrome.tsx +20 -0
  81. package/src/components/ui/Calendar.tsx +115 -0
  82. package/src/components/ui/Card.tsx +70 -0
  83. package/src/components/ui/ChatBubble.tsx +71 -0
  84. package/src/components/ui/CodeBlock.tsx +48 -0
  85. package/src/components/ui/CollapsibleSection.tsx +49 -0
  86. package/src/components/ui/CommandPalette.tsx +137 -0
  87. package/src/components/ui/ComponentDocs.tsx +52 -0
  88. package/src/components/ui/Drawer.tsx +71 -0
  89. package/src/components/ui/DropdownMenu.tsx +262 -0
  90. package/src/components/ui/EmptyState.tsx +33 -0
  91. package/src/components/ui/FilterBar.tsx +165 -0
  92. package/src/components/ui/FilterChips.tsx +80 -0
  93. package/src/components/ui/FilterControls.tsx +30 -0
  94. package/src/components/ui/FormField.tsx +69 -0
  95. package/src/components/ui/HoverCard.tsx +36 -0
  96. package/src/components/ui/Indicator.tsx +61 -0
  97. package/src/components/ui/Input.tsx +385 -0
  98. package/src/components/ui/Kbd.tsx +113 -0
  99. package/src/components/ui/Loader.tsx +96 -0
  100. package/src/components/ui/Modal.tsx +105 -0
  101. package/src/components/ui/Navigation.tsx +94 -0
  102. package/src/components/ui/Panel.tsx +18 -0
  103. package/src/components/ui/Progress.tsx +59 -0
  104. package/src/components/ui/Rating.tsx +65 -0
  105. package/src/components/ui/SearchInput.tsx +106 -0
  106. package/src/components/ui/SegmentedControl.tsx +44 -0
  107. package/src/components/ui/SettingsLayout.tsx +94 -0
  108. package/src/components/ui/ShowcaseWrapper.tsx +124 -0
  109. package/src/components/ui/Stat.tsx +39 -0
  110. package/src/components/ui/Stepper.tsx +74 -0
  111. package/src/components/ui/Table.tsx +55 -0
  112. package/src/components/ui/Tabs.tsx +53 -0
  113. package/src/components/ui/Terminal.tsx +54 -0
  114. package/src/components/ui/ThemeDomSync.tsx +17 -0
  115. package/src/components/ui/ThemeManager.tsx +18 -0
  116. package/src/components/ui/ThemeSwitcher.tsx +46 -0
  117. package/src/components/ui/Timeline.tsx +60 -0
  118. package/src/components/ui/Toast.tsx +70 -0
  119. package/src/components/ui/Typography.tsx +129 -0
  120. package/src/components/ui/first-slice.test.tsx +98 -0
  121. package/src/components/ui/index.ts +151 -0
  122. package/src/components/ui/interaction-primitives.test.tsx +77 -0
  123. package/src/components/ui/kbd-icons.test.tsx +90 -0
  124. package/src/components/ui/product-patterns.test.tsx +77 -0
  125. package/src/styles/themes.css +528 -0
  126. package/tailwind-preset.ts +7 -0
@@ -0,0 +1,80 @@
1
+ import { Avatar, AvatarGroup, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
2
+
3
+ export default function AvatarShowcase() {
4
+ const code = `import { Avatar, AvatarGroup } from "the-old-ui";
5
+
6
+ <div className="grid gap-8 lg:grid-cols-2">
7
+ <div className="ph-panel space-y-4">
8
+ <h3>Sizes</h3>
9
+ <Avatar label="XL" size="xl" color="bg-ph-brand text-white" />
10
+ <Avatar label="LG" size="lg" color="bg-ph-blue text-white" />
11
+ <Avatar label="MD" size="md" color="bg-ph-purple text-white" />
12
+ <Avatar label="SM" size="sm" color="bg-ph-toolbar text-ph-ink" />
13
+ </div>
14
+
15
+ <div className="ph-panel space-y-5">
16
+ <h3>Stacked collaborators</h3>
17
+ <AvatarGroup>
18
+ <Avatar label="MJ" color="bg-orange-400 text-orange-950" />
19
+ <Avatar label="AR" color="bg-sky-500 text-white" />
20
+ <Avatar label="CK" color="bg-violet-600 text-white" />
21
+ </AvatarGroup>
22
+
23
+ <div className="flex gap-4">
24
+ <Avatar label="ON" color="bg-emerald-200 text-emerald-950" status="online" />
25
+ <Avatar label="JD" color="bg-ph-muted text-ph-ink" status="offline" />
26
+ <Avatar label="CP" color="bg-amber-200 text-amber-950" badge="12" />
27
+ </div>
28
+ </div>
29
+ </div>`;
30
+
31
+ return (
32
+ <ShowcaseWrapper
33
+ title="Avatars"
34
+ description="Reusable avatar component with sizes, status indicators, badges, and group stacking."
35
+ code={code}
36
+ filename="AvatarExample.tsx"
37
+ docs={
38
+ <ComponentDocs
39
+ rows={[
40
+ { name: "label", type: "string", description: "Text initials or label." },
41
+ { name: "size", type: "xs | sm | md | lg | xl", defaultValue: "md", description: "Avatar size." },
42
+ { name: "color", type: "string", defaultValue: "bg-ph-brand text-white", description: "Tailwind colour classes." },
43
+ { name: "status", type: "online | offline | away | busy", description: "Status indicator dot." },
44
+ { name: "badge", type: "string", description: "Badge count/text." },
45
+ { name: "icon", type: "ReactNode", description: "Optional icon or image." },
46
+ ]}
47
+ />
48
+ }
49
+ >
50
+ <div className="grid gap-8 lg:grid-cols-2">
51
+ <div className="ph-panel space-y-4">
52
+ <h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Sizes</h3>
53
+ <div className="flex flex-wrap items-end gap-5">
54
+ <Avatar label="XL" size="xl" color="bg-ph-brand text-white" />
55
+ <Avatar label="LG" size="lg" color="bg-ph-blue text-white" />
56
+ <Avatar label="MD" size="md" color="bg-ph-purple text-white" />
57
+ <Avatar label="SM" size="sm" color="bg-ph-toolbar text-ph-ink" />
58
+ <Avatar label="XS" size="xs" color="bg-ph-muted text-ph-ink" />
59
+ </div>
60
+ </div>
61
+
62
+ <div className="ph-panel space-y-5">
63
+ <h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Stacked collaborators</h3>
64
+ <AvatarGroup max={3}>
65
+ <Avatar label="MJ" color="bg-orange-400 text-orange-950" />
66
+ <Avatar label="AR" color="bg-sky-500 text-white" />
67
+ <Avatar label="CK" color="bg-violet-600 text-white" />
68
+ <Avatar label="+9" color="bg-ph-toolbar text-ph-subtle" />
69
+ </AvatarGroup>
70
+
71
+ <div className="flex gap-4">
72
+ <Avatar label="ON" color="bg-emerald-200 text-emerald-950" status="online" />
73
+ <Avatar label="JD" color="bg-ph-muted text-ph-ink" status="offline" />
74
+ <Avatar label="CP" color="bg-amber-200 text-amber-950" badge="12" />
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </ShowcaseWrapper>
79
+ );
80
+ }
@@ -0,0 +1,65 @@
1
+ import { Badge, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
2
+
3
+ export default function BadgeShowcase() {
4
+ const code = `import { Badge } from "@xenide-io/the-old-ui-theme";
5
+
6
+ <div className="ph-panel space-y-6">
7
+ <div>
8
+ <h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Semantic</h3>
9
+ <div className="flex flex-wrap gap-2">
10
+ <Badge variant="brand">Beta</Badge>
11
+ <Badge variant="neutral">Archived</Badge>
12
+ <Badge variant="success">Live</Badge>
13
+ <Badge variant="warning">Queued</Badge>
14
+ <Badge variant="danger">Failed</Badge>
15
+ <Badge variant="info">Docs</Badge>
16
+ </div>
17
+ </div>
18
+ <div>
19
+ <h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Outline</h3>
20
+ <div className="flex flex-wrap gap-2">
21
+ <Badge variant="outline">Feature flag</Badge>
22
+ <Badge variant="outline">Experiment</Badge>
23
+ </div>
24
+ </div>
25
+ </div>`;
26
+
27
+ return (
28
+ <ShowcaseWrapper
29
+ title="Badges"
30
+ description="Use badges for compact status, category, and product metadata. Defaults work without classes; use props for variants."
31
+ code={code}
32
+ filename="BadgeExample.tsx"
33
+ docs={
34
+ <ComponentDocs
35
+ rows={[
36
+ { name: "variant", type: "brand | neutral | success | warning | danger | info | outline", defaultValue: "neutral", description: "Controls semantic colour and border treatment." },
37
+ { name: "size", type: "sm | md", defaultValue: "md", description: "Use sm for dense tables or compact nav." },
38
+ { name: "className", type: "string", description: "Optional escape hatch for layout-only overrides." },
39
+ ]}
40
+ />
41
+ }
42
+ >
43
+ <div className="ph-panel space-y-6">
44
+ <div>
45
+ <h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Semantic</h3>
46
+ <div className="flex flex-wrap gap-2">
47
+ <Badge variant="brand">Beta</Badge>
48
+ <Badge variant="neutral">Archived</Badge>
49
+ <Badge variant="success">Live</Badge>
50
+ <Badge variant="warning">Queued</Badge>
51
+ <Badge variant="danger">Failed</Badge>
52
+ <Badge variant="info">Docs</Badge>
53
+ </div>
54
+ </div>
55
+ <div>
56
+ <h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Outline</h3>
57
+ <div className="flex flex-wrap gap-2">
58
+ <Badge variant="outline">Feature flag</Badge>
59
+ <Badge variant="outline">Experiment</Badge>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </ShowcaseWrapper>
64
+ );
65
+ }
@@ -0,0 +1,308 @@
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
+ }
@@ -0,0 +1,35 @@
1
+ "use client";
2
+
3
+ import { useState } from "react";
4
+ import { Calendar, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
5
+
6
+ export default function CalendarShowcase() {
7
+ const [date, setDate] = useState<Date | undefined>(new Date());
8
+
9
+ const code = `import { Calendar } from "the-old-ui";
10
+
11
+ const [date, setDate] = useState(new Date());
12
+
13
+ <Calendar value={date} onChange={setDate} />`;
14
+
15
+ return (
16
+ <ShowcaseWrapper
17
+ title="Calendar"
18
+ description="Controlled date picker with theme-aware styling and navigation."
19
+ code={code}
20
+ filename="CalendarExample.tsx"
21
+ docs={
22
+ <ComponentDocs
23
+ rows={[
24
+ { name: "value", type: "Date | undefined", description: "Selected date." },
25
+ { name: "onChange", type: "(date?: Date) => void", description: "Called when a date is selected." },
26
+ ]}
27
+ />
28
+ }
29
+ >
30
+ <div className="ph-panel flex justify-center">
31
+ <Calendar value={date} onChange={setDate} />
32
+ </div>
33
+ </ShowcaseWrapper>
34
+ );
35
+ }
@@ -0,0 +1,159 @@
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
+ }