@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.
Files changed (133) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-5HSOBJ4F.mjs +5968 -0
  3. package/dist/index-BgG8Homu.d.mts +1461 -0
  4. package/dist/index-BgG8Homu.d.ts +1461 -0
  5. package/dist/index.d.mts +206 -100
  6. package/dist/index.d.ts +206 -100
  7. package/dist/index.js +4275 -1455
  8. package/dist/index.mjs +689 -735
  9. package/dist/tailwind-preset.js +7 -0
  10. package/dist/tailwind-preset.mjs +7 -0
  11. package/dist/ui.d.mts +3 -2
  12. package/dist/ui.d.ts +3 -2
  13. package/dist/ui.js +3449 -701
  14. package/dist/ui.mjs +106 -3
  15. package/package.json +20 -16
  16. package/src/app/globals.css +1953 -266
  17. package/src/components/charts/index.ts +9 -8
  18. package/src/components/charts/quill/BarChart.tsx +85 -0
  19. package/src/components/charts/quill/FunnelChart.tsx +49 -0
  20. package/src/components/charts/quill/InsightShell.tsx +27 -0
  21. package/src/components/charts/quill/MetricCard.tsx +44 -0
  22. package/src/components/charts/quill/PieChart.tsx +81 -0
  23. package/src/components/charts/quill/Sparkline.tsx +57 -0
  24. package/src/components/charts/quill/TimeSeriesLineChart.tsx +62 -0
  25. package/src/components/charts/quill/index.ts +9 -0
  26. package/src/components/icons/IconBase.tsx +20 -12
  27. package/src/components/icons/createIconBase.tsx +12 -7
  28. package/src/components/icons/icons.tsx +210 -18
  29. package/src/components/icons/index.ts +3 -0
  30. package/src/components/icons/lemon-brand-icons.tsx +16 -0
  31. package/src/components/icons/lemon-category-icons.tsx +72 -0
  32. package/src/components/icons/lemon-icons.tsx +57 -0
  33. package/src/components/sections/AlertShowcase.tsx +2 -1
  34. package/src/components/sections/BadgeShowcase.tsx +1 -1
  35. package/src/components/sections/ButtonShowcase.tsx +6 -10
  36. package/src/components/sections/CardShowcase.tsx +22 -6
  37. package/src/components/sections/DropdownShowcase.tsx +4 -6
  38. package/src/components/sections/FilterChipsShowcase.tsx +74 -26
  39. package/src/components/sections/FormShowcase.tsx +2 -1
  40. package/src/components/sections/IconShowcase.tsx +195 -212
  41. package/src/components/sections/KbdShowcase.tsx +47 -21
  42. package/src/components/sections/ModalShowcase.tsx +7 -6
  43. package/src/components/sections/NewComponentsShowcase.tsx +1052 -0
  44. package/src/components/sections/ProductLayoutsShowcase.tsx +78 -0
  45. package/src/components/sections/ProgressShowcase.tsx +50 -53
  46. package/src/components/sections/QuillChartShowcase.tsx +92 -0
  47. package/src/components/sections/QuillDashboardShowcase.tsx +149 -0
  48. package/src/components/sections/SidebarShowcase.tsx +151 -0
  49. package/src/components/sections/SwapShowcase.tsx +13 -5
  50. package/src/components/sections/TableShowcase.tsx +2 -0
  51. package/src/components/sections/TooltipShowcase.tsx +19 -25
  52. package/src/components/ui/Alert.tsx +28 -19
  53. package/src/components/ui/AlertDialog.tsx +62 -0
  54. package/src/components/ui/AppLayout.tsx +27 -0
  55. package/src/components/ui/AuthLayout.tsx +58 -0
  56. package/src/components/ui/Autocomplete.tsx +106 -0
  57. package/src/components/ui/Badge.tsx +10 -5
  58. package/src/components/ui/Banner.tsx +63 -0
  59. package/src/components/ui/Button.tsx +22 -12
  60. package/src/components/ui/ButtonChrome.tsx +1 -1
  61. package/src/components/ui/ButtonGroup.tsx +16 -0
  62. package/src/components/ui/Calendar.tsx +6 -7
  63. package/src/components/ui/Card.tsx +21 -11
  64. package/src/components/ui/Chip.tsx +46 -0
  65. package/src/components/ui/Collapsible.tsx +46 -0
  66. package/src/components/ui/CollapsibleSection.tsx +11 -11
  67. package/src/components/ui/Combobox.tsx +119 -0
  68. package/src/components/ui/ContextMenu.tsx +81 -0
  69. package/src/components/ui/DataTable.tsx +133 -0
  70. package/src/components/ui/DatePicker.tsx +96 -0
  71. package/src/components/ui/Dialog.tsx +75 -0
  72. package/src/components/ui/Divider.tsx +39 -0
  73. package/src/components/ui/Dot.tsx +32 -0
  74. package/src/components/ui/DropdownMenu.tsx +189 -65
  75. package/src/components/ui/FilterBar.tsx +165 -0
  76. package/src/components/ui/FilterChips.tsx +65 -35
  77. package/src/components/ui/FilterControls.tsx +30 -0
  78. package/src/components/ui/FormField.tsx +69 -0
  79. package/src/components/ui/Input.tsx +166 -140
  80. package/src/components/ui/InputGroup.tsx +16 -0
  81. package/src/components/ui/Kbd.tsx +88 -13
  82. package/src/components/ui/Lettermark.tsx +47 -0
  83. package/src/components/ui/Link.tsx +32 -0
  84. package/src/components/ui/Loader.tsx +96 -0
  85. package/src/components/ui/LoadingBar.tsx +25 -0
  86. package/src/components/ui/Menubar.tsx +66 -0
  87. package/src/components/ui/Metric.tsx +34 -0
  88. package/src/components/ui/Modal.tsx +66 -36
  89. package/src/components/ui/NumberField.tsx +76 -0
  90. package/src/components/ui/Popover.tsx +73 -0
  91. package/src/components/ui/ProgressCircle.tsx +63 -0
  92. package/src/components/ui/Resizable.tsx +71 -0
  93. package/src/components/ui/Row.tsx +51 -0
  94. package/src/components/ui/ScrollArea.tsx +54 -0
  95. package/src/components/ui/SettingsLayout.tsx +94 -0
  96. package/src/components/ui/ShowcaseWrapper.tsx +4 -16
  97. package/src/components/ui/Sidebar.tsx +77 -0
  98. package/src/components/ui/Snack.tsx +48 -0
  99. package/src/components/ui/Spinner.tsx +30 -0
  100. package/src/components/ui/Splotch.tsx +33 -0
  101. package/src/components/ui/Stepper.tsx +5 -6
  102. package/src/components/ui/Table.tsx +2 -0
  103. package/src/components/ui/Tag.tsx +65 -0
  104. package/src/components/ui/Toggle.tsx +62 -0
  105. package/src/components/ui/Tooltip.test.tsx +58 -0
  106. package/src/components/ui/Tooltip.tsx +211 -0
  107. package/src/components/ui/Widget.tsx +31 -0
  108. package/src/components/ui/first-slice.test.tsx +98 -0
  109. package/src/components/ui/index.ts +335 -22
  110. package/src/components/ui/interaction-primitives.test.tsx +77 -0
  111. package/src/components/ui/kbd-icons.test.tsx +90 -0
  112. package/src/components/ui/product-patterns.test.tsx +77 -0
  113. package/src/styles/themes.css +411 -1
  114. package/tailwind-preset.ts +7 -0
  115. package/dist/chunk-SHF57J7U.mjs +0 -2910
  116. package/dist/index-CmS6hcUk.d.mts +0 -753
  117. package/dist/index-CmS6hcUk.d.ts +0 -753
  118. package/src/components/charts/ph-insight-charts.tsx +0 -162
  119. package/src/components/dashboard/DashboardFiltersBar.tsx +0 -19
  120. package/src/components/dashboard/DashboardGrid.tsx +0 -23
  121. package/src/components/dashboard/DashboardInsightPlaceholder.tsx +0 -37
  122. package/src/components/dashboard/DashboardKpiCard.tsx +0 -25
  123. package/src/components/dashboard/DashboardToolbar.tsx +0 -23
  124. package/src/components/dashboard/DashboardWell.tsx +0 -10
  125. package/src/components/dashboard/InsightMiniCard.tsx +0 -26
  126. package/src/components/dashboard/InsightShell.tsx +0 -37
  127. package/src/components/dashboard/InsightShellHeader.tsx +0 -22
  128. package/src/components/dashboard/MiniTrendBars.tsx +0 -51
  129. package/src/components/dashboard/index.ts +0 -31
  130. package/src/components/dashboard/types.ts +0 -9
  131. package/src/components/sections/ChartShowcase.tsx +0 -190
  132. package/src/components/sections/DashboardShowcase.tsx +0 -191
  133. package/src/components/sections/StatShowcase.tsx +0 -129
@@ -1,247 +1,230 @@
1
- /**
2
- * Bespoke Lemon glyphs from PostHog open source — filled Material / product paths,
3
- * not Lucide stroke icons.
4
- */
1
+ import type { ComponentType, CSSProperties } from "react";
5
2
  import {
6
- IconActivity,
7
- IconAreaChart,
8
- IconArrowDown,
9
- IconArrowUp,
10
- IconBell,
11
- IconBellOff,
12
- IconBolt,
13
- IconBox,
14
- IconCancel,
15
- IconCheck,
16
- IconCheckCircle,
17
- IconChevronDown,
18
- IconChevronLeft,
19
- IconChevronRight,
20
- IconClipboardEdit,
21
- IconClose,
22
- IconCohort,
23
- IconCopy,
24
- IconCumulativeChart,
25
- IconDatabase,
26
- IconDownload,
27
- IconEdit,
28
- IconErrorOutline,
29
- IconExclamation,
30
- IconFlag,
31
- IconFlare,
32
- IconFlask,
33
- IconGift,
34
- IconGridView,
35
- IconHandClick,
36
- IconHome,
37
- IconLayers,
38
- IconListView,
39
- IconLogout,
40
- IconMail,
41
- IconMoon,
42
- IconPanelRight,
43
- IconPerson,
44
- IconPlayCircle,
45
- IconPlus,
46
- IconPremium,
47
- IconQueryEditor,
48
- IconRadar,
49
- IconRecording,
50
- IconRobot,
51
- IconRocket,
52
- IconSave,
53
- IconSearch,
54
- IconSelectEvents,
55
- IconStar,
56
- IconSubArrowRight,
57
- IconSun,
58
- IconSurveys,
59
- IconSync,
60
- IconTableChart,
61
- IconTerminal,
62
- IconToggle,
63
- IconTrash,
64
- IconTuning,
65
- IconUpload,
66
- IconVolume,
67
- IconVolumeOff,
68
- PH_ICONS,
69
- type IconName,
3
+ CANONICAL_ICONS,
4
+ OLD_UI_ICONS,
5
+ IconAreaChart, IconDatabase, IconFlag, IconFlask, IconGridView, IconRecording, IconSurveys,
6
+ IconChrome, IconFirefox, IconSafari, IconFacebook, IconGoogle, IconGitlab, IconSlack, IconMicrosoftTeams,
7
+ IconMacOS, IconAppleIOS, IconWindows, IconLinux, IconAndroidOS,
8
+ IconWeb, IconMonitor, IconBold, IconItalic, IconLink, IconPreview, IconEyeHidden,
9
+ IconFullScreen, IconMenu, IconGhost, IconReplay, IconHeatmap, IconPauseCircle,
10
+ IconSkipBackward, IconSkipStart, IconSkipEnd, IconDragHandle, IconFingerprint, IconNodeJS, IconStamphog,
11
+ IconPalette, IconMegaphone, IconMap, IconMapPin, IconCoffee, IconBook, IconCalendar,
12
+ IconClock, IconGlobe, IconCloud, IconBug, IconCrown, IconConfetti, IconLightBulb,
13
+ IconHourglass, IconStore, IconCart, IconEye, IconPeople, IconGroups, IconDocument,
14
+ IconAI, IconArchive, IconAtSign, IconBinary, IconGear, IconChat, IconFolder,
15
+ IconHeart, IconHomeFilled, IconImage, IconLock, IconMic, IconMusic, IconPhone,
16
+ IconRefresh, IconReply, IconReport, IconFilter, IconPlus, IconCheck, IconClose,
17
+ type CanonicalIconName,
18
+ type IconProps,
70
19
  } from "@/components/icons";
71
- import { ShowcaseWrapper } from "@/components/ui";
20
+ import { Kbd, ShowcaseWrapper } from "@/components/ui";
72
21
 
73
- const iconCells: { name: IconName; Icon: (typeof PH_ICONS)[IconName] }[] = [
74
- { name: "activity", Icon: IconActivity },
75
- { name: "areaChart", Icon: IconAreaChart },
76
- { name: "arrowUp", Icon: IconArrowUp },
77
- { name: "arrowDown", Icon: IconArrowDown },
78
- { name: "bell", Icon: IconBell },
79
- { name: "bellOff", Icon: IconBellOff },
80
- { name: "bolt", Icon: IconBolt },
81
- { name: "box", Icon: IconBox },
82
- { name: "cancel", Icon: IconCancel },
83
- { name: "check", Icon: IconCheck },
84
- { name: "checkCircle", Icon: IconCheckCircle },
85
- { name: "chevronDown", Icon: IconChevronDown },
86
- { name: "chevronLeft", Icon: IconChevronLeft },
87
- { name: "chevronRight", Icon: IconChevronRight },
88
- { name: "clipboard", Icon: IconClipboardEdit },
89
- { name: "close", Icon: IconClose },
90
- { name: "cohort", Icon: IconCohort },
91
- { name: "copy", Icon: IconCopy },
92
- { name: "cumulativeChart", Icon: IconCumulativeChart },
93
- { name: "database", Icon: IconDatabase },
94
- { name: "download", Icon: IconDownload },
95
- { name: "edit", Icon: IconEdit },
96
- { name: "errorOutline", Icon: IconErrorOutline },
97
- { name: "exclamation", Icon: IconExclamation },
98
- { name: "flag", Icon: IconFlag },
99
- { name: "flare", Icon: IconFlare },
100
- { name: "flask", Icon: IconFlask },
101
- { name: "gift", Icon: IconGift },
102
- { name: "grid", Icon: IconGridView },
103
- { name: "handClick", Icon: IconHandClick },
104
- { name: "home", Icon: IconHome },
105
- { name: "layers", Icon: IconLayers },
106
- { name: "list", Icon: IconListView },
107
- { name: "logout", Icon: IconLogout },
108
- { name: "mail", Icon: IconMail },
109
- { name: "moon", Icon: IconMoon },
110
- { name: "panelRight", Icon: IconPanelRight },
111
- { name: "person", Icon: IconPerson },
112
- { name: "play", Icon: IconPlayCircle },
113
- { name: "plus", Icon: IconPlus },
114
- { name: "premium", Icon: IconPremium },
115
- { name: "queryEditor", Icon: IconQueryEditor },
116
- { name: "radar", Icon: IconRadar },
117
- { name: "recording", Icon: IconRecording },
118
- { name: "robot", Icon: IconRobot },
119
- { name: "rocket", Icon: IconRocket },
120
- { name: "save", Icon: IconSave },
121
- { name: "search", Icon: IconSearch },
122
- { name: "selectEvents", Icon: IconSelectEvents },
123
- { name: "settings", Icon: IconTuning },
124
- { name: "star", Icon: IconStar },
125
- { name: "subArrowRight", Icon: IconSubArrowRight },
126
- { name: "sun", Icon: IconSun },
127
- { name: "surveys", Icon: IconSurveys },
128
- { name: "sync", Icon: IconSync },
129
- { name: "tableChart", Icon: IconTableChart },
130
- { name: "terminal", Icon: IconTerminal },
131
- { name: "toggle", Icon: IconToggle },
132
- { name: "trash", Icon: IconTrash },
133
- { name: "upload", Icon: IconUpload },
134
- { name: "volume", Icon: IconVolume },
135
- { name: "volumeOff", Icon: IconVolumeOff },
136
- ];
22
+ const iconCells = Object.entries(CANONICAL_ICONS) as Array<[
23
+ CanonicalIconName,
24
+ ComponentType<IconProps>,
25
+ ]>;
26
+
27
+ const originalIcons = Object.entries(OLD_UI_ICONS) as Array<[
28
+ keyof typeof OLD_UI_ICONS,
29
+ ComponentType<IconProps>,
30
+ ]>;
137
31
 
138
- const colourTiles = [
139
- { label: "Session replay", Icon: IconRecording, fg: "--ph-product-session-replay" as const },
140
- { label: "Product analytics", Icon: IconAreaChart, fg: "--ph-product-product-analytics" as const },
141
- { label: "Data pipeline", Icon: IconGridView, fg: "--ph-product-data-pipeline" as const },
142
- { label: "Feature flags", Icon: IconFlag, fg: "--ph-product-feature-flags" as const },
143
- { label: "Experiments", Icon: IconFlask, fg: "--ph-product-experiments" as const },
144
- { label: "Data warehouse", Icon: IconDatabase, fg: "--ph-product-data-warehouse" as const },
145
- { label: "Surveys", Icon: IconSurveys, fg: "--ph-product-surveys" as const },
32
+ const categoryIcons = [
33
+ { Icon: IconPalette, label: "Palette" }, { Icon: IconMegaphone, label: "Megaphone" },
34
+ { Icon: IconMap, label: "Map" }, { Icon: IconMapPin, label: "Pin" },
35
+ { Icon: IconCoffee, label: "Coffee" }, { Icon: IconBook, label: "Book" },
36
+ { Icon: IconCalendar, label: "Calendar" }, { Icon: IconClock, label: "Clock" },
37
+ { Icon: IconGlobe, label: "Globe" }, { Icon: IconCloud, label: "Cloud" },
38
+ { Icon: IconBug, label: "Bug" }, { Icon: IconCrown, label: "Crown" },
39
+ { Icon: IconConfetti, label: "Confetti" }, { Icon: IconLightBulb, label: "Bulb" },
40
+ { Icon: IconHourglass, label: "Hourglass" }, { Icon: IconStore, label: "Store" },
41
+ { Icon: IconCart, label: "Cart" }, { Icon: IconEye, label: "Eye" },
42
+ { Icon: IconPeople, label: "People" }, { Icon: IconGroups, label: "Groups" },
43
+ { Icon: IconDocument, label: "Document" }, { Icon: IconAI, label: "AI" },
44
+ { Icon: IconArchive, label: "Archive" }, { Icon: IconAtSign, label: "At" },
45
+ { Icon: IconBinary, label: "Binary" }, { Icon: IconGear, label: "Gear" },
46
+ { Icon: IconChat, label: "Chat" }, { Icon: IconFolder, label: "Folder" },
47
+ { Icon: IconHeart, label: "Heart" }, { Icon: IconImage, label: "Image" },
48
+ { Icon: IconLock, label: "Lock" }, { Icon: IconMic, label: "Mic" },
49
+ { Icon: IconMusic, label: "Music" }, { Icon: IconPhone, label: "Phone" },
50
+ { Icon: IconRefresh, label: "Refresh" }, { Icon: IconReply, label: "Reply" },
51
+ { Icon: IconReport, label: "Report" }, { Icon: IconFilter, label: "Filter" },
146
52
  ];
147
53
 
148
- export default function IconShowcase() {
149
- const code = `import { IconActivity, IconAreaChart, IconArrowDown, IconArrowUp, IconBell, IconBellOff, IconBolt, IconBox, IconCancel, IconCheck, IconCheckCircle, IconChevronDown, IconChevronLeft, IconChevronRight, IconClipboardEdit, IconClose, IconCohort, IconCopy, IconCumulativeChart, IconDatabase, IconDownload, IconEdit, IconErrorOutline, IconExclamation, IconFlag, IconFlare, IconFlask, IconGift, IconGridView, IconHandClick, IconHome, IconLayers, IconListView, IconLogout, IconMail, IconMoon, IconPanelRight, IconPerson, IconPlayCircle, IconPlus, IconPremium, IconQueryEditor, IconRadar, IconRecording, IconRobot, IconRocket, IconSave, IconSearch, IconSelectEvents, IconStar, IconSubArrowRight, IconSun, IconSurveys, IconSync, IconTableChart, IconTerminal, IconToggle, IconTrash, IconTuning, IconUpload, IconVolume, IconVolumeOff, PH_ICONS, type IconName } from "the-old-ui";
54
+ const lemonIcons = [
55
+ { Icon: IconChrome, label: "Chrome" },
56
+ { Icon: IconFirefox, label: "Firefox" },
57
+ { Icon: IconSafari, label: "Safari" },
58
+ { Icon: IconFacebook, label: "Facebook" },
59
+ { Icon: IconGoogle, label: "Google" },
60
+ { Icon: IconGitlab, label: "Gitlab" },
61
+ { Icon: IconSlack, label: "Slack" },
62
+ { Icon: IconMicrosoftTeams, label: "Teams" },
63
+ { Icon: IconMacOS, label: "macOS" },
64
+ { Icon: IconAppleIOS, label: "iOS" },
65
+ { Icon: IconWindows, label: "Windows" },
66
+ { Icon: IconLinux, label: "Linux" },
67
+ { Icon: IconAndroidOS, label: "Android" },
68
+ { Icon: IconWeb, label: "Web" },
69
+ { Icon: IconMonitor, label: "Monitor" },
70
+ { Icon: IconBold, label: "Bold" },
71
+ { Icon: IconItalic, label: "Italic" },
72
+ { Icon: IconLink, label: "Link" },
73
+ { Icon: IconPreview, label: "Preview" },
74
+ { Icon: IconEyeHidden, label: "EyeHidden" },
75
+ { Icon: IconFullScreen, label: "FullScreen" },
76
+ { Icon: IconMenu, label: "Menu" },
77
+ { Icon: IconGhost, label: "Ghost" },
78
+ { Icon: IconReplay, label: "Replay" },
79
+ { Icon: IconHeatmap, label: "Heatmap" },
80
+ { Icon: IconPauseCircle, label: "Pause" },
81
+ { Icon: IconSkipBackward, label: "SkipBack" },
82
+ { Icon: IconSkipStart, label: "SkipStart" },
83
+ { Icon: IconSkipEnd, label: "SkipEnd" },
84
+ { Icon: IconDragHandle, label: "DragHandle" },
85
+ { Icon: IconFingerprint, label: "Fingerprint" },
86
+ { Icon: IconNodeJS, label: "NodeJS" },
87
+ { Icon: IconStamphog, label: "Stamphog" },
88
+ ];
150
89
 
151
- <div className="space-y-8">
152
- <div className="ph-panel space-y-4">
153
- <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Bespoke Lemon glyphs</h3>
154
- <p className="text-sm leading-relaxed text-ph-subtle">
155
- Paths mirror PostHog&apos;s Lemon UI filled{" "}
156
- <code className="ph-kbd">currentColor</code> SVGs at <code className="ph-kbd">1em</code>, vendored in{" "}
157
- <code className="ph-kbd">the-old-ui</code> (no Lucide).
158
- </p>
90
+ const productTiles = [
91
+ { label: "Session replay", Icon: IconRecording, color: "--ph-product-session-replay" },
92
+ { label: "Product analytics", Icon: IconAreaChart, color: "--ph-product-product-analytics" },
93
+ { label: "Data pipeline", Icon: IconGridView, color: "--ph-product-data-pipeline" },
94
+ { label: "Feature flags", Icon: IconFlag, color: "--ph-product-feature-flags" },
95
+ { label: "Experiments", Icon: IconFlask, color: "--ph-product-experiments" },
96
+ { label: "Data warehouse", Icon: IconDatabase, color: "--ph-product-data-warehouse" },
97
+ { label: "Surveys", Icon: IconSurveys, color: "--ph-product-surveys" },
98
+ ];
159
99
 
160
- <div className="grid grid-cols-3 gap-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8">
161
- {iconCells.map(({ name, Icon }) => (
162
- <div
163
- key={name}
164
- className="flex flex-col items-center gap-2 rounded-[var(--ph-radius-app)] border border-ph-border bg-ph-surface p-4 text-center"
165
- style={{ boxShadow: "var(--ph-shadow-elevation-3000)" }}
166
- >
167
- <Icon className="h-6 w-6 text-ph-ink" />
168
- <span className="text-[10px] font-medium uppercase tracking-wide text-ph-mutedtext">{name}</span>
169
- </div>
170
- ))}
171
- </div>
172
- </div>
100
+ export default function IconShowcase() {
101
+ const code = `import {
102
+ IconCommandCursor,
103
+ IconDataReel,
104
+ IconInsightBoard,
105
+ IconOldWindow,
106
+ } from "@xenide-io/the-old-ui-theme";
173
107
 
174
- <div className="ph-panel space-y-4">
175
- <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Product rail hues</h3>
176
- <p className="text-sm leading-relaxed text-ph-subtle">
177
- In-app nav tiles use saturated backgrounds with light glyphs — tokens map to{" "}
178
- <code className="ph-kbd">--ph-product-*</code> in <code className="ph-kbd">globals.css</code>.
179
- </p>
180
- <div className="grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-7">
181
- {colourTiles.map(({ label, Icon, fg }) => (
182
- <div
183
- key={label}
184
- className="ph-icon-tile border-white/15 text-white"
185
- style={{ backgroundColor: \`var(\${fg})\` }}
186
- >
187
- <Icon className="mb-1 h-7 w-7 drop-shadow-sm" />
188
- <span className="max-w-full truncate px-1 text-center normal-case tracking-normal">{label}</span>
189
- </div>
190
- ))}
191
- </div>
192
- </div>
108
+ <div className="flex items-center gap-4 text-ph-ink">
109
+ <IconOldWindow size={16} />
110
+ <IconCommandCursor size={20} />
111
+ <IconDataReel size={24} />
112
+ <IconInsightBoard size={24} aria-label="Insights" />
193
113
  </div>`;
194
114
 
195
115
  return (
196
116
  <ShowcaseWrapper
197
117
  title="Icons"
198
- description="Bespoke Lemon glyphs from PostHog open source — filled Material / product paths, not Lucide stroke icons."
118
+ description="A canonical filled SVG registry with PostHog/Material foundations and clearly identified Old UI originals."
199
119
  code={code}
200
120
  filename="IconExample.tsx"
201
121
  >
202
122
  <div className="space-y-8">
203
- <div className="ph-panel space-y-4">
204
- <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Bespoke Lemon glyphs</h3>
205
- <p className="text-sm leading-relaxed text-ph-subtle">
206
- Paths mirror PostHog&apos;s Lemon UI — filled{" "}
207
- <code className="ph-kbd">currentColor</code> SVGs at <code className="ph-kbd">1em</code>, vendored in{" "}
208
- <code className="ph-kbd">the-old-ui</code> (no Lucide).
209
- </p>
123
+ <section className="ph-panel space-y-4">
124
+ <div>
125
+ <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Old UI originals</h3>
126
+ <p className="mt-2 max-w-3xl text-sm leading-relaxed text-ph-subtle">
127
+ 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.
128
+ </p>
129
+ </div>
130
+ <div className="grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-6">
131
+ {originalIcons.map(([name, Icon]) => (
132
+ <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">
133
+ <div className="flex h-9 items-center gap-2 text-ph-ink">
134
+ <Icon size={16} />
135
+ <Icon size={24} />
136
+ </div>
137
+ <span className="max-w-full break-words text-xs font-medium text-ph-subtle">{formatName(name)}</span>
138
+ </div>
139
+ ))}
140
+ </div>
141
+ </section>
210
142
 
143
+ <section className="ph-panel space-y-4">
144
+ <div>
145
+ <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Canonical registry</h3>
146
+ <p className="mt-2 max-w-3xl text-sm leading-relaxed text-ph-subtle">
147
+ 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.
148
+ </p>
149
+ </div>
211
150
  <div className="grid grid-cols-3 gap-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8">
212
- {iconCells.map(({ name, Icon }) => (
213
- <div
214
- key={name}
215
- className="flex flex-col items-center gap-2 rounded-[var(--ph-radius-app)] border border-ph-border bg-ph-surface p-4 text-center"
216
- style={{ boxShadow: "var(--ph-shadow-elevation-3000)" }}
217
- >
218
- <Icon className="h-6 w-6 text-ph-ink" />
219
- <span className="text-[10px] font-medium uppercase tracking-wide text-ph-mutedtext">{name}</span>
151
+ {iconCells.map(([name, Icon]) => (
152
+ <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">
153
+ <div className="flex h-8 items-center gap-2 text-ph-ink">
154
+ <Icon size={16} />
155
+ <Icon size={24} />
156
+ </div>
157
+ <span className="max-w-full break-words text-[10px] font-medium tracking-wide text-ph-mutedtext">{name}</span>
220
158
  </div>
221
159
  ))}
222
160
  </div>
223
- </div>
161
+ </section>
224
162
 
225
- <div className="ph-panel space-y-4">
226
- <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Product rail hues</h3>
227
- <p className="text-sm leading-relaxed text-ph-subtle">
228
- In-app nav tiles use saturated backgrounds with light glyphs — tokens map to{" "}
229
- <code className="ph-kbd">--ph-product-*</code> in <code className="ph-kbd">globals.css</code>.
230
- </p>
163
+ <section className="ph-panel space-y-4">
164
+ <div>
165
+ <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Common icons (PostHog categories)</h3>
166
+ <p className="mt-2 max-w-3xl text-sm leading-relaxed text-ph-subtle">
167
+ Everyday UI icons ported from PostHog&apos;s categories set.
168
+ </p>
169
+ </div>
170
+ <div className="grid grid-cols-4 gap-3 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-10">
171
+ {categoryIcons.map(({ Icon, label }) => (
172
+ <div key={label} 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">
173
+ <div className="flex h-8 items-center gap-2 text-ph-ink">
174
+ <Icon size={16} />
175
+ <Icon size={24} />
176
+ </div>
177
+ <span className="max-w-full break-words text-[10px] font-medium tracking-wide text-ph-mutedtext">{label}</span>
178
+ </div>
179
+ ))}
180
+ </div>
181
+ </section>
182
+
183
+ <section className="ph-panel space-y-4">
184
+ <div>
185
+ <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Lemon icons (PostHog port)</h3>
186
+ <p className="mt-2 max-w-3xl text-sm leading-relaxed text-ph-subtle">
187
+ Browser, OS, brand, and UI icons ported from PostHog&apos;s lemon-ui icon set.
188
+ </p>
189
+ </div>
190
+ <div className="grid grid-cols-4 gap-3 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-10">
191
+ {lemonIcons.map(({ Icon, label }) => (
192
+ <div key={label} 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">
193
+ <div className="flex h-8 items-center gap-2 text-ph-ink">
194
+ <Icon size={16} />
195
+ <Icon size={24} />
196
+ </div>
197
+ <span className="max-w-full break-words text-[10px] font-medium tracking-wide text-ph-mutedtext">{label}</span>
198
+ </div>
199
+ ))}
200
+ </div>
201
+ </section>
202
+
203
+ <section className="ph-panel space-y-4">
204
+ <div>
205
+ <h3 className="text-xs font-semibold uppercase tracking-wider text-ph-mutedtext">Product hues</h3>
206
+ <p className="mt-2 max-w-3xl text-sm leading-relaxed text-ph-subtle">
207
+ Product color is used as a subtle tint and icon accent instead of assuming white foregrounds on every theme.
208
+ </p>
209
+ </div>
231
210
  <div className="grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-7">
232
- {colourTiles.map(({ label, Icon, fg }) => (
211
+ {productTiles.map(({ label, Icon, color }) => (
233
212
  <div
234
213
  key={label}
235
- className="ph-icon-tile border-white/15 text-white"
236
- style={{ backgroundColor: `var(${fg})` }}
214
+ className="ph-icon-tile ph-product-icon-tile"
215
+ style={{ "--ph-icon-tile-color": `var(${color})` } as CSSProperties}
237
216
  >
238
- <Icon className="mb-1 h-7 w-7 drop-shadow-sm" />
239
- <span className="max-w-full truncate px-1 text-center normal-case tracking-normal">{label}</span>
217
+ <Icon className="mb-1" size={28} />
218
+ <span className="max-w-full px-1 text-center normal-case tracking-normal">{label}</span>
240
219
  </div>
241
220
  ))}
242
221
  </div>
243
- </div>
222
+ </section>
244
223
  </div>
245
224
  </ShowcaseWrapper>
246
225
  );
247
226
  }
227
+
228
+ function formatName(name: string) {
229
+ return name.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (letter) => letter.toUpperCase());
230
+ }
@@ -1,30 +1,56 @@
1
- import { Kbd, Panel, ShowcaseWrapper } from "@/components/ui";
1
+ import { ComponentDocs, Kbd, Panel, ShowcaseWrapper } from "@/components/ui";
2
2
 
3
3
  export default function KbdShowcase() {
4
- const code = `import { Kbd, Panel } from "the-old-ui";
4
+ const code = `import { Kbd, Panel } from "@xenide-io/the-old-ui-theme";
5
5
 
6
- <Panel className="flex flex-wrap items-center gap-3 text-ph-subtle">
7
- <Kbd keys={["⌘", "K"]} />
8
- <span className="text-xs font-semibold text-ph-mutedtext">/</span>
9
- <Kbd keys={["", "", "E"]} />
10
- <span className="text-xs font-semibold text-ph-mutedtext">/</span>
11
- <Kbd variant="token">HogQL</Kbd>
12
- <p className="w-full pt-5 text-xs text-ph-mutedtext">
13
- Keyboard hints and code tokens are rendered through the same reusable component.
14
- </p>
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>
15
17
  </Panel>`;
16
18
 
17
19
  return (
18
- <ShowcaseWrapper title="Keyboard glyphs" code={code} filename="KbdExample.tsx">
19
- <Panel className="flex flex-wrap items-center gap-3 text-ph-subtle">
20
- <Kbd keys={["⌘", "K"]} />
21
- <span className="text-xs font-semibold text-ph-mutedtext">/</span>
22
- <Kbd keys={["", "⇧", "E"]} />
23
- <span className="text-xs font-semibold text-ph-mutedtext">/</span>
24
- <Kbd variant="token">HogQL</Kbd>
25
- <p className="w-full pt-5 text-xs text-ph-mutedtext">
26
- Keyboard hints and code tokens are rendered through the same reusable component.
27
- </p>
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>
28
54
  </Panel>
29
55
  </ShowcaseWrapper>
30
56
  );
@@ -9,8 +9,7 @@ export default function ModalShowcase() {
9
9
 
10
10
  const close = () => setOpenModal(null);
11
11
 
12
- const code = `import { IconCheck, IconClose, IconPlus } from "the-old-ui";
13
- import { Button, Input, Modal, Select, Textarea } from "the-old-ui";
12
+ const code = `import { Button, IconCheck, IconClose, IconPlus, Input, Modal, Select, Textarea } from "@xenide-io/the-old-ui-theme";
14
13
 
15
14
  <div className="ph-panel space-y-4">
16
15
  <h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Patterns</h3>
@@ -45,7 +44,7 @@ import { Button, Input, Modal, Select, Textarea } from "the-old-ui";
45
44
  footer={<Button variant="success" onClick={close}>Continue</Button>}
46
45
  >
47
46
  <div className="flex items-start gap-3">
48
- <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-emerald-100 text-ph-success">
47
+ <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-[var(--ph-success-bg)] text-[var(--ph-success-text)]">
49
48
  <IconCheck className="h-5 w-5" />
50
49
  </div>
51
50
  <div>
@@ -67,7 +66,7 @@ import { Button, Input, Modal, Select, Textarea } from "the-old-ui";
67
66
  }
68
67
  >
69
68
  <div className="flex items-start gap-3">
70
- <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-red-100 text-ph-danger">
69
+ <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-[var(--ph-danger-bg)] text-[var(--ph-danger-text)]">
71
70
  <IconClose className="h-5 w-5" />
72
71
  </div>
73
72
  <div>
@@ -114,6 +113,8 @@ import { Button, Input, Modal, Select, Textarea } from "the-old-ui";
114
113
  { name: "size", type: "sm | md | lg | xl | full", defaultValue: "md", description: "Controls panel max width." },
115
114
  { name: "title", type: "string", description: "Accessible dialog heading." },
116
115
  { name: "footer", type: "ReactNode", description: "Renders action row with consistent spacing." },
116
+ { name: "closeOnOutsideClick", type: "boolean", defaultValue: "true", description: "Controls pointer dismissal outside the dialog." },
117
+ { name: "closeOnEscape", type: "boolean", defaultValue: "true", description: "Controls Escape-key dismissal." },
117
118
  ]}
118
119
  />
119
120
  }
@@ -151,7 +152,7 @@ import { Button, Input, Modal, Select, Textarea } from "the-old-ui";
151
152
  footer={<Button variant="success" onClick={close}>Continue</Button>}
152
153
  >
153
154
  <div className="flex items-start gap-3">
154
- <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-emerald-100 text-ph-success">
155
+ <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-[var(--ph-success-bg)] text-[var(--ph-success-text)]">
155
156
  <IconCheck className="h-5 w-5" />
156
157
  </div>
157
158
  <div>
@@ -173,7 +174,7 @@ import { Button, Input, Modal, Select, Textarea } from "the-old-ui";
173
174
  }
174
175
  >
175
176
  <div className="flex items-start gap-3">
176
- <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-red-100 text-ph-danger">
177
+ <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-[var(--ph-danger-bg)] text-[var(--ph-danger-text)]">
177
178
  <IconClose className="h-5 w-5" />
178
179
  </div>
179
180
  <div>