@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.
Files changed (89) hide show
  1. package/dist/chunk-5HSOBJ4F.mjs +5968 -0
  2. package/dist/{index-D1RTT2Ap.d.mts → index-BgG8Homu.d.mts} +419 -2
  3. package/dist/{index-D1RTT2Ap.d.ts → index-BgG8Homu.d.ts} +419 -2
  4. package/dist/index.d.mts +198 -95
  5. package/dist/index.d.ts +198 -95
  6. package/dist/index.js +2995 -1136
  7. package/dist/index.mjs +629 -735
  8. package/dist/ui.d.mts +1 -1
  9. package/dist/ui.d.ts +1 -1
  10. package/dist/ui.js +1986 -156
  11. package/dist/ui.mjs +76 -3
  12. package/package.json +4 -14
  13. package/src/app/globals.css +976 -2
  14. package/src/components/charts/index.ts +9 -8
  15. package/src/components/charts/quill/BarChart.tsx +85 -0
  16. package/src/components/charts/quill/FunnelChart.tsx +49 -0
  17. package/src/components/charts/quill/InsightShell.tsx +27 -0
  18. package/src/components/charts/quill/MetricCard.tsx +44 -0
  19. package/src/components/charts/quill/PieChart.tsx +81 -0
  20. package/src/components/charts/quill/Sparkline.tsx +57 -0
  21. package/src/components/charts/quill/TimeSeriesLineChart.tsx +62 -0
  22. package/src/components/charts/quill/index.ts +9 -0
  23. package/src/components/icons/icons.tsx +2 -0
  24. package/src/components/icons/index.ts +3 -0
  25. package/src/components/icons/lemon-brand-icons.tsx +16 -0
  26. package/src/components/icons/lemon-category-icons.tsx +72 -0
  27. package/src/components/icons/lemon-icons.tsx +57 -0
  28. package/src/components/sections/IconShowcase.tsx +110 -7
  29. package/src/components/sections/NewComponentsShowcase.tsx +1052 -0
  30. package/src/components/sections/ProductLayoutsShowcase.tsx +57 -117
  31. package/src/components/sections/QuillChartShowcase.tsx +92 -0
  32. package/src/components/sections/QuillDashboardShowcase.tsx +149 -0
  33. package/src/components/sections/SidebarShowcase.tsx +152 -0
  34. package/src/components/sections/TableShowcase.tsx +2 -0
  35. package/src/components/sections/TooltipShowcase.tsx +19 -25
  36. package/src/components/ui/AlertDialog.tsx +62 -0
  37. package/src/components/ui/AppLayout.tsx +27 -0
  38. package/src/components/ui/Autocomplete.tsx +106 -0
  39. package/src/components/ui/Banner.tsx +63 -0
  40. package/src/components/ui/ButtonGroup.tsx +16 -0
  41. package/src/components/ui/Chip.tsx +46 -0
  42. package/src/components/ui/Collapsible.tsx +46 -0
  43. package/src/components/ui/Combobox.tsx +119 -0
  44. package/src/components/ui/ContextMenu.tsx +81 -0
  45. package/src/components/ui/DataTable.tsx +133 -0
  46. package/src/components/ui/DatePicker.tsx +96 -0
  47. package/src/components/ui/Dialog.tsx +75 -0
  48. package/src/components/ui/Divider.tsx +39 -0
  49. package/src/components/ui/Dot.tsx +32 -0
  50. package/src/components/ui/InputGroup.tsx +16 -0
  51. package/src/components/ui/Lettermark.tsx +47 -0
  52. package/src/components/ui/Link.tsx +32 -0
  53. package/src/components/ui/LoadingBar.tsx +25 -0
  54. package/src/components/ui/Menubar.tsx +66 -0
  55. package/src/components/ui/Metric.tsx +34 -0
  56. package/src/components/ui/NumberField.tsx +76 -0
  57. package/src/components/ui/Popover.tsx +73 -0
  58. package/src/components/ui/ProgressCircle.tsx +63 -0
  59. package/src/components/ui/Resizable.tsx +71 -0
  60. package/src/components/ui/Row.tsx +51 -0
  61. package/src/components/ui/ScrollArea.tsx +54 -0
  62. package/src/components/ui/Sidebar.tsx +77 -0
  63. package/src/components/ui/Snack.tsx +48 -0
  64. package/src/components/ui/Spinner.tsx +30 -0
  65. package/src/components/ui/Splotch.tsx +33 -0
  66. package/src/components/ui/Table.tsx +2 -0
  67. package/src/components/ui/Tag.tsx +65 -0
  68. package/src/components/ui/Toggle.tsx +62 -0
  69. package/src/components/ui/Tooltip.test.tsx +58 -0
  70. package/src/components/ui/Tooltip.tsx +211 -0
  71. package/src/components/ui/Widget.tsx +31 -0
  72. package/src/components/ui/index.ts +275 -21
  73. package/dist/chunk-FDMD3IIN.mjs +0 -3831
  74. package/src/components/charts/ph-insight-charts.tsx +0 -162
  75. package/src/components/dashboard/DashboardFiltersBar.tsx +0 -19
  76. package/src/components/dashboard/DashboardGrid.tsx +0 -23
  77. package/src/components/dashboard/DashboardInsightPlaceholder.tsx +0 -37
  78. package/src/components/dashboard/DashboardKpiCard.tsx +0 -25
  79. package/src/components/dashboard/DashboardToolbar.tsx +0 -23
  80. package/src/components/dashboard/DashboardWell.tsx +0 -10
  81. package/src/components/dashboard/InsightMiniCard.tsx +0 -26
  82. package/src/components/dashboard/InsightShell.tsx +0 -37
  83. package/src/components/dashboard/InsightShellHeader.tsx +0 -22
  84. package/src/components/dashboard/MiniTrendBars.tsx +0 -51
  85. package/src/components/dashboard/index.ts +0 -31
  86. package/src/components/dashboard/types.ts +0 -9
  87. package/src/components/sections/ChartShowcase.tsx +0 -190
  88. package/src/components/sections/DashboardShowcase.tsx +0 -191
  89. package/src/components/sections/StatShowcase.tsx +0 -129
@@ -1,191 +0,0 @@
1
- import { IconAreaChart, IconArrowUp, IconCohort, IconPlus } from "@/components/icons";
2
- import {
3
- DashboardFiltersBar,
4
- DashboardGrid,
5
- DashboardInsightPlaceholder,
6
- DashboardKpiCard,
7
- DashboardToolbar,
8
- DashboardWell,
9
- InsightMiniCard,
10
- } from "@/components/dashboard";
11
- import { Button, ShowcaseWrapper } from "@/components/ui";
12
-
13
- const insightCards = [
14
- {
15
- title: "Weekly active users",
16
- subtitle: "Last 14 days · product analytics",
17
- ribbonColour: "var(--ph-product-product-analytics)",
18
- heights: [40, 55, 48, 62, 58, 70, 52, 45, 68, 72, 65, 80, 75, 88],
19
- },
20
- {
21
- title: "Session length",
22
- subtitle: "Median minutes · replay cohort",
23
- ribbonColour: "var(--ph-product-session-replay)",
24
- heights: [52, 48, 45, 50, 55, 60, 58, 54, 50, 48, 55, 60, 58, 62],
25
- },
26
- {
27
- title: "Flag evaluations",
28
- subtitle: "Per minute · infrastructure",
29
- ribbonColour: "var(--ph-product-feature-flags)",
30
- heights: [30, 35, 42, 38, 45, 50, 48, 52, 55, 58, 54, 50, 48, 55],
31
- },
32
- ] as const;
33
-
34
- export default function DashboardShowcase() {
35
- const code = `import { IconAreaChart, IconArrowUp, IconCohort, IconPlus } from "the-old-ui";
36
- import { DashboardFiltersBar, DashboardGrid, DashboardInsightPlaceholder, DashboardKpiCard, DashboardToolbar, DashboardWell, InsightMiniCard } from "the-old-ui";
37
- import { Button } from "the-old-ui";
38
-
39
- <DashboardWell className="space-y-6">
40
- <DashboardToolbar
41
- title="Marketing overview"
42
- description="Mock layout · spacing and elevation only"
43
- actions={
44
- <Button variant="secondary" size="sm">
45
- Edit layout
46
- </Button>
47
- }
48
- />
49
-
50
- <DashboardFiltersBar className="text-xs">
51
- <span className="font-semibold text-ph-ink">Last 14 days</span>
52
- <span className="text-ph-mutedtext">·</span>
53
- <span>Global cohort</span>
54
- <Button variant="ghost" size="xs" className="rounded-md px-2">
55
- Breakdown
56
- </Button>
57
- </DashboardFiltersBar>
58
-
59
- <div className="grid gap-4 md:grid-cols-3">
60
- <DashboardKpiCard
61
- icon={<IconArrowUp className="text-ph-brand" aria-hidden />}
62
- label="Event volume"
63
- value={<span className="text-ph-brand tabular-nums">2.6M</span>}
64
- footer={
65
- <>
66
- <span className="font-semibold text-emerald-700">▲ 21%</span> vs previous window
67
- </>
68
- }
69
- />
70
- <DashboardKpiCard
71
- icon={<IconCohort className="text-ph-blue" aria-hidden />}
72
- label="Weekly active users"
73
- value={<span className="text-ph-blue tabular-nums">12.8K</span>}
74
- footer="Stable vs trailing 28-day baseline"
75
- />
76
- <DashboardKpiCard
77
- icon={<IconAreaChart className="text-ph-purple" aria-hidden />}
78
- label="Experiments exposing"
79
- value={<span className="text-ph-purple tabular-nums">4</span>}
80
- footer="Flags + multivariates counted"
81
- />
82
- </div>
83
-
84
- <DashboardGrid>
85
- {insightCards.map((card) => (
86
- <InsightMiniCard
87
- key={card.title}
88
- title={card.title}
89
- subtitle={card.subtitle}
90
- ribbonColour={card.ribbonColour}
91
- heights={card.heights}
92
- />
93
- ))}
94
- </DashboardGrid>
95
-
96
- <div className="grid gap-4 md:grid-cols-2">
97
- <InsightMiniCard
98
- title="Activation funnel"
99
- subtitle="Mock · drop-off by step"
100
- ribbonColour="var(--ph-product-experiments)"
101
- heights={[88, 72, 58, 44, 32, 28, 24, 22, 20, 18, 16, 15, 14, 13]}
102
- />
103
- <DashboardInsightPlaceholder>
104
- <IconPlus className="h-8 w-8 text-ph-mutedtext group-hover:text-ph-brand" aria-hidden />
105
- <span className="text-sm font-medium text-ph-subtle group-hover:text-ph-ink">Add insight</span>
106
- <span className="max-w-[14rem] text-xs text-ph-mutedtext">Opens the same picker pattern your app uses for new tiles.</span>
107
- </DashboardInsightPlaceholder>
108
- </div>
109
- </DashboardWell>`;
110
-
111
- return (
112
- <ShowcaseWrapper
113
- title="Dashboard shells"
114
- description="Inset canvas (DashboardWell) and raised insight tiles (InsightShell / InsightMiniCard) mirror how the PostHog app frames dashboards."
115
- code={code}
116
- filename="DashboardExample.tsx"
117
- >
118
- <DashboardWell className="space-y-6">
119
- <DashboardToolbar
120
- title="Marketing overview"
121
- description="Mock layout · spacing and elevation only"
122
- actions={
123
- <Button variant="secondary" size="sm">
124
- Edit layout
125
- </Button>
126
- }
127
- />
128
-
129
- <DashboardFiltersBar className="text-xs">
130
- <span className="font-semibold text-ph-ink">Last 14 days</span>
131
- <span className="text-ph-mutedtext">·</span>
132
- <span>Global cohort</span>
133
- <Button variant="ghost" size="xs" className="rounded-md px-2">
134
- Breakdown
135
- </Button>
136
- </DashboardFiltersBar>
137
-
138
- <div className="grid gap-4 md:grid-cols-3">
139
- <DashboardKpiCard
140
- icon={<IconArrowUp className="text-ph-brand" aria-hidden />}
141
- label="Event volume"
142
- value={<span className="text-ph-brand tabular-nums">2.6M</span>}
143
- footer={
144
- <>
145
- <span className="font-semibold text-emerald-700">▲ 21%</span> vs previous window
146
- </>
147
- }
148
- />
149
- <DashboardKpiCard
150
- icon={<IconCohort className="text-ph-blue" aria-hidden />}
151
- label="Weekly active users"
152
- value={<span className="text-ph-blue tabular-nums">12.8K</span>}
153
- footer="Stable vs trailing 28-day baseline"
154
- />
155
- <DashboardKpiCard
156
- icon={<IconAreaChart className="text-ph-purple" aria-hidden />}
157
- label="Experiments exposing"
158
- value={<span className="text-ph-purple tabular-nums">4</span>}
159
- footer="Flags + multivariates counted"
160
- />
161
- </div>
162
-
163
- <DashboardGrid>
164
- {insightCards.map((card) => (
165
- <InsightMiniCard
166
- key={card.title}
167
- title={card.title}
168
- subtitle={card.subtitle}
169
- ribbonColour={card.ribbonColour}
170
- heights={card.heights}
171
- />
172
- ))}
173
- </DashboardGrid>
174
-
175
- <div className="grid gap-4 md:grid-cols-2">
176
- <InsightMiniCard
177
- title="Activation funnel"
178
- subtitle="Mock · drop-off by step"
179
- ribbonColour="var(--ph-product-experiments)"
180
- heights={[88, 72, 58, 44, 32, 28, 24, 22, 20, 18, 16, 15, 14, 13]}
181
- />
182
- <DashboardInsightPlaceholder>
183
- <IconPlus className="h-8 w-8 text-ph-mutedtext group-hover:text-ph-brand" aria-hidden />
184
- <span className="text-sm font-medium text-ph-subtle group-hover:text-ph-ink">Add insight</span>
185
- <span className="max-w-[14rem] text-xs text-ph-mutedtext">Opens the same picker pattern your app uses for new tiles.</span>
186
- </DashboardInsightPlaceholder>
187
- </div>
188
- </DashboardWell>
189
- </ShowcaseWrapper>
190
- );
191
- }
@@ -1,129 +0,0 @@
1
- import { IconAreaChart, IconArrowUp, IconCohort, IconSurveys } from "@/components/icons";
2
- import { Avatar, ChatBubble, ComponentDocs, Panel, Stat, ShowcaseWrapper } from "@/components/ui";
3
-
4
- export default function StatShowcase() {
5
- const code = `import { Avatar, ChatBubble, Panel, Stat } from "the-old-ui";
6
-
7
- <div className="space-y-10">
8
- <div className="grid gap-4 md:grid-cols-3">
9
- <Stat icon={...} label="Total volume" value="2.6M" tone="brand" footer={...} />
10
- </div>
11
-
12
- <Panel className="grid gap-6 lg:grid-cols-2">
13
- <ChatBubble
14
- variant="from"
15
- avatar={<Avatar label="M" color="bg-ph-muted text-ph-mutedtext" icon={...} />}
16
- name="Max"
17
- time="Today · 09:14"
18
- footer="Synced with session replay"
19
- >
20
- Could you summarise the spike on /billing?
21
- </ChatBubble>
22
-
23
- <ChatBubble
24
- variant="self"
25
- avatar={<Avatar label="AI" color="bg-ph-purple text-white" />}
26
- name="PostHog AI"
27
- time="09:15"
28
- footer="Tokens billed per org policy"
29
- >
30
- Checkout completion jumped 41%...
31
- </ChatBubble>
32
- </Panel>
33
- </div>`;
34
-
35
- return (
36
- <ShowcaseWrapper
37
- title="Stats & conversational UI"
38
- description="Stat cards and chat bubble components for dashboards and AI interfaces."
39
- code={code}
40
- filename="StatExample.tsx"
41
- docs={
42
- <ComponentDocs
43
- rows={[
44
- { name: "Stat.icon", type: "ReactNode", description: "Leading icon." },
45
- { name: "Stat.label", type: "ReactNode", description: "Metric label." },
46
- { name: "Stat.value", type: "ReactNode", description: "Metric value." },
47
- { name: "Stat.footer", type: "ReactNode", description: "Supporting text." },
48
- { name: "Stat.tone", type: "default | brand | blue | purple | warning", defaultValue: "default", description: "Colour treatment." },
49
- { name: "ChatBubble.variant", type: "from | self", defaultValue: "from", description: "Bubble alignment and colour." },
50
- { name: "ChatBubble.avatar", type: "ReactNode", description: "Avatar element." },
51
- { name: "ChatBubble.name", type: "string", description: "Sender name." },
52
- { name: "ChatBubble.time", type: "string", description: "Timestamp." },
53
- ]}
54
- />
55
- }
56
- >
57
- <div className="space-y-10">
58
- <div className="grid gap-4 md:grid-cols-3">
59
- <Stat icon={<IconArrowUp className="h-7 w-7" />} label="Total volume" value="2.6M" tone="brand" footer={<><span className="font-semibold text-emerald-700">up 21%</span> vs previous window</>} />
60
- <Stat icon={<IconCohort className="h-7 w-7" />} label="Identified persons" value="89.4K" tone="blue" footer={<>Stable cohort churn <span className="tabular-nums text-ph-mutedtext">1.8%</span></>} />
61
- <Stat icon={<IconAreaChart className="h-7 w-7" />} label="Activation" value="12.6%" tone="purple" footer={<>Powered by experimentation <strong className="text-ph-mutedtext">#flags</strong></>} />
62
- </div>
63
-
64
- <div className="grid gap-4 md:grid-cols-2">
65
- <Stat label="Pageviews" value="1.2M" footer={<><span className="font-semibold text-emerald-700">up 15%</span> vs trailing 7-day</>} />
66
- <Stat label="Experiment guardrail" value="42%" tone="warning" footer={<><span className="font-semibold text-ph-danger">down 3%</span> watch conversion</>} />
67
- </div>
68
-
69
- <Panel className="grid gap-6 lg:grid-cols-2">
70
- <div>
71
- <h3 className="mb-4 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Co-pilot replies</h3>
72
- <div className="space-y-5">
73
- <ChatBubble
74
- variant="from"
75
- avatar={<Avatar
76
- size="sm"
77
- icon={<IconSurveys className="h-5 w-5 text-ph-mutedtext" />}
78
- color="bg-ph-muted text-ph-mutedtext"
79
- />}
80
- name="Max"
81
- time="Today · 09:14"
82
- footer="Synced with session replay 19ab…"
83
- >
84
- Could you summarise the spike on /billing?
85
- </ChatBubble>
86
- <ChatBubble
87
- variant="self"
88
- avatar={<Avatar
89
- size="sm"
90
- label="AI"
91
- color="bg-ph-purple text-white"
92
- />}
93
- name="PostHog AI"
94
- time="09:15"
95
- footer="Tokens billed per org policy"
96
- >
97
- Checkout completion jumped 41% once you shipped the HogProvider race fix yesterday.
98
- </ChatBubble>
99
- </div>
100
- </div>
101
-
102
- <div>
103
- <h3 className="mb-4 text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">FAQ accordion</h3>
104
- <div className="space-y-2">
105
- <details className="ph-details">
106
- <summary>What qualifies as an "active user"?</summary>
107
- <div className="ph-details-inner leading-relaxed">
108
- Any person emitting at least one non-$feature_flag_called event inside the timezone-aware window configured on the insight.
109
- </div>
110
- </details>
111
- <details className="ph-details">
112
- <summary>How do I ship safely with feature flags?</summary>
113
- <div className="ph-details-inner leading-relaxed">
114
- Pair multivariate payloads with enrichment properties, ramp traffic slowly, then wire the HogQL guardrail dashboards your team trusts.
115
- </div>
116
- </details>
117
- <details className="ph-details">
118
- <summary>Can I correlate LLM traces with revenue?</summary>
119
- <div className="ph-details-inner leading-relaxed">
120
- Yes — warehouse joins from <code className="ph-kbd">$ai_generation</code> to Shopify/Snowflake exports are the canonical path PostHog's team dogfoods.
121
- </div>
122
- </details>
123
- </div>
124
- </div>
125
- </Panel>
126
- </div>
127
- </ShowcaseWrapper>
128
- );
129
- }