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

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 (76) 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 +1366 -671
  11. package/dist/suite.mjs +1304 -610
  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.test.ts +20 -0
  20. package/src/suite/components/ai-panel.tsx +494 -103
  21. package/src/suite/components/suite-app-layout.tsx +48 -28
  22. package/src/suite/components/suite-layout.tsx +84 -40
  23. package/src/suite/components/suite-mobile-drawer.tsx +35 -22
  24. package/src/suite/components/suite-notification-bell.tsx +9 -3
  25. package/src/suite/components/suite-settings-layout.tsx +82 -0
  26. package/src/suite/components/suite-settings-mobile-nav.tsx +18 -17
  27. package/src/suite/components/suite-skeleton.tsx +3 -3
  28. package/src/suite/components/today-calibrating.tsx +11 -35
  29. package/src/suite/components/today-page-frame.tsx +19 -11
  30. package/src/suite/components/today-ui.tsx +276 -19
  31. package/src/suite/index.ts +41 -25
  32. package/src/suite/lib/apps.ts +32 -2
  33. package/src/suite/lib/use-sidebar-width.ts +114 -0
  34. package/src/components/sections/AccordionShowcase.tsx +0 -45
  35. package/src/components/sections/AlertShowcase.tsx +0 -40
  36. package/src/components/sections/AvatarShowcase.tsx +0 -80
  37. package/src/components/sections/BadgeShowcase.tsx +0 -65
  38. package/src/components/sections/ButtonShowcase.tsx +0 -308
  39. package/src/components/sections/CalendarShowcase.tsx +0 -35
  40. package/src/components/sections/CardShowcase.tsx +0 -159
  41. package/src/components/sections/CodeMockupShowcase.tsx +0 -56
  42. package/src/components/sections/ColorPalette.tsx +0 -117
  43. package/src/components/sections/CommandPaletteShowcase.tsx +0 -48
  44. package/src/components/sections/CountdownShowcase.tsx +0 -43
  45. package/src/components/sections/DiffShowcase.tsx +0 -70
  46. package/src/components/sections/DrawerShowcase.tsx +0 -97
  47. package/src/components/sections/DropdownShowcase.tsx +0 -98
  48. package/src/components/sections/EmptyStateShowcase.tsx +0 -50
  49. package/src/components/sections/FilterChipsShowcase.tsx +0 -98
  50. package/src/components/sections/FormShowcase.tsx +0 -127
  51. package/src/components/sections/HoverCardShowcase.tsx +0 -50
  52. package/src/components/sections/IconShowcase.tsx +0 -121
  53. package/src/components/sections/IndicatorShowcase.tsx +0 -52
  54. package/src/components/sections/KbdShowcase.tsx +0 -57
  55. package/src/components/sections/ModalShowcase.tsx +0 -211
  56. package/src/components/sections/NavigationShowcase.tsx +0 -199
  57. package/src/components/sections/NewComponentsShowcase.tsx +0 -1052
  58. package/src/components/sections/ProductLayoutsShowcase.tsx +0 -78
  59. package/src/components/sections/ProgressShowcase.tsx +0 -82
  60. package/src/components/sections/QuillChartShowcase.tsx +0 -92
  61. package/src/components/sections/QuillDashboardShowcase.tsx +0 -149
  62. package/src/components/sections/SegmentedControlShowcase.tsx +0 -49
  63. package/src/components/sections/SetupThemeShowcase.tsx +0 -262
  64. package/src/components/sections/SidebarShowcase.tsx +0 -152
  65. package/src/components/sections/StackShowcase.tsx +0 -33
  66. package/src/components/sections/StepperShowcase.tsx +0 -37
  67. package/src/components/sections/SuiteShowcase.tsx +0 -669
  68. package/src/components/sections/SwapShowcase.tsx +0 -99
  69. package/src/components/sections/TabShowcase.tsx +0 -84
  70. package/src/components/sections/TableShowcase.tsx +0 -142
  71. package/src/components/sections/TimelineShowcase.tsx +0 -83
  72. package/src/components/sections/ToastShowcase.tsx +0 -108
  73. package/src/components/sections/TooltipShowcase.tsx +0 -38
  74. package/src/components/sections/UtilityShowcase.tsx +0 -81
  75. package/src/styles/excel-themes.css +0 -110
  76. package/src/styles/lemon-primitives.css +0 -550
@@ -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
- }
@@ -1,211 +0,0 @@
1
- "use client";
2
-
3
- import { useState } from "react";
4
- import { IconCheck, IconClose, IconPlus } from "@/components/icons";
5
- import { Button, ComponentDocs, Input, Modal, Select, ShowcaseWrapper, Textarea } from "@/components/ui";
6
-
7
- export default function ModalShowcase() {
8
- const [openModal, setOpenModal] = useState<string | null>(null);
9
-
10
- const close = () => setOpenModal(null);
11
-
12
- const code = `import { Button, IconCheck, IconClose, IconPlus, Input, Modal, Select, Textarea } from "@xenide-io/the-old-ui-theme";
13
-
14
- <div className="ph-panel space-y-4">
15
- <h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Patterns</h3>
16
-
17
- <div className="flex flex-wrap gap-3">
18
- <Button variant="secondary" onClick={() => setOpenModal("info")}>
19
- Info
20
- </Button>
21
- <Button variant="success" onClick={() => setOpenModal("success")}>
22
- Success
23
- </Button>
24
- <Button variant="danger" onClick={() => setOpenModal("error")}>
25
- Error
26
- </Button>
27
- <Button variant="primary" icon={<IconPlus className="h-4 w-4" aria-hidden />} onClick={() => setOpenModal("form")}>
28
- Form modal
29
- </Button>
30
- </div>
31
-
32
- <Modal
33
- open={openModal === "info"}
34
- onClose={close}
35
- title="Configure capture"
36
- description="Lightweight overlay + white sheet — Lemon modals skew toward tight copy and decisive buttons."
37
- footer={<Button variant="secondary" onClick={close}>Close</Button>}
38
- />
39
-
40
- <Modal
41
- open={openModal === "success"}
42
- onClose={close}
43
- showCloseButton={false}
44
- footer={<Button variant="success" onClick={close}>Continue</Button>}
45
- >
46
- <div className="flex items-start gap-3">
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)]">
48
- <IconCheck className="h-5 w-5" />
49
- </div>
50
- <div>
51
- <h3 className="text-lg font-bold text-ph-success">Saved</h3>
52
- <p className="mt-1 text-sm text-ph-subtle">Your dashboard layout synced to the team.</p>
53
- </div>
54
- </div>
55
- </Modal>
56
-
57
- <Modal
58
- open={openModal === "error"}
59
- onClose={close}
60
- showCloseButton={false}
61
- footer={
62
- <>
63
- <Button variant="ghost" onClick={close}>Cancel</Button>
64
- <Button variant="danger" onClick={close}>View logs</Button>
65
- </>
66
- }
67
- >
68
- <div className="flex items-start gap-3">
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)]">
70
- <IconClose className="h-5 w-5" />
71
- </div>
72
- <div>
73
- <h3 className="text-lg font-bold text-ph-danger">Query failed</h3>
74
- <p className="mt-1 text-sm text-ph-subtle">ClickHouse returned a timeout — retry or narrow the date range.</p>
75
- </div>
76
- </div>
77
- </Modal>
78
-
79
- <Modal
80
- open={openModal === "form"}
81
- onClose={close}
82
- size="lg"
83
- title="Create feature flag"
84
- footer={
85
- <>
86
- <Button variant="ghost" onClick={close}>Cancel</Button>
87
- <Button variant="primary" onClick={close}>Create</Button>
88
- </>
89
- }
90
- >
91
- <div className="space-y-4">
92
- <Input label="Key" placeholder="billing-ui-v3" />
93
- <Textarea label="Description" placeholder="Expose the rewritten billing funnel" className="h-28" />
94
- <Select label="Rollout">
95
- <option>10% staged</option>
96
- <option>Everyone</option>
97
- </Select>
98
- </div>
99
- </Modal>
100
- </div>`;
101
-
102
- return (
103
- <ShowcaseWrapper
104
- title="Modals"
105
- description="Accessible modal shell with open state, title, description, size, close button, and footer props."
106
- code={code}
107
- filename="ModalExample.tsx"
108
- docs={
109
- <ComponentDocs
110
- rows={[
111
- { name: "open", type: "boolean", defaultValue: "false", description: "Controls modal visibility." },
112
- { name: "onClose", type: "() => void", description: "Called by overlay and close button." },
113
- { name: "size", type: "sm | md | lg | xl | full", defaultValue: "md", description: "Controls panel max width." },
114
- { name: "title", type: "string", description: "Accessible dialog heading." },
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." },
118
- ]}
119
- />
120
- }
121
- >
122
- <div className="ph-panel space-y-4">
123
- <h3 className="text-sm font-semibold uppercase tracking-wider text-ph-mutedtext">Patterns</h3>
124
-
125
- <div className="flex flex-wrap gap-3">
126
- <Button variant="secondary" onClick={() => setOpenModal("info")}>
127
- Info
128
- </Button>
129
- <Button variant="success" onClick={() => setOpenModal("success")}>
130
- Success
131
- </Button>
132
- <Button variant="danger" onClick={() => setOpenModal("error")}>
133
- Error
134
- </Button>
135
- <Button variant="primary" icon={<IconPlus className="h-4 w-4" aria-hidden />} onClick={() => setOpenModal("form")}>
136
- Form modal
137
- </Button>
138
- </div>
139
-
140
- <Modal
141
- open={openModal === "info"}
142
- onClose={close}
143
- title="Configure capture"
144
- description="Lightweight overlay + white sheet — Lemon modals skew toward tight copy and decisive buttons."
145
- footer={<Button variant="secondary" onClick={close}>Close</Button>}
146
- />
147
-
148
- <Modal
149
- open={openModal === "success"}
150
- onClose={close}
151
- showCloseButton={false}
152
- footer={<Button variant="success" onClick={close}>Continue</Button>}
153
- >
154
- <div className="flex items-start gap-3">
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)]">
156
- <IconCheck className="h-5 w-5" />
157
- </div>
158
- <div>
159
- <h3 className="text-lg font-bold text-ph-success">Saved</h3>
160
- <p className="mt-1 text-sm text-ph-subtle">Your dashboard layout synced to the team.</p>
161
- </div>
162
- </div>
163
- </Modal>
164
-
165
- <Modal
166
- open={openModal === "error"}
167
- onClose={close}
168
- showCloseButton={false}
169
- footer={
170
- <>
171
- <Button variant="ghost" onClick={close}>Cancel</Button>
172
- <Button variant="danger" onClick={close}>View logs</Button>
173
- </>
174
- }
175
- >
176
- <div className="flex items-start gap-3">
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)]">
178
- <IconClose className="h-5 w-5" />
179
- </div>
180
- <div>
181
- <h3 className="text-lg font-bold text-ph-danger">Query failed</h3>
182
- <p className="mt-1 text-sm text-ph-subtle">ClickHouse returned a timeout — retry or narrow the date range.</p>
183
- </div>
184
- </div>
185
- </Modal>
186
-
187
- <Modal
188
- open={openModal === "form"}
189
- onClose={close}
190
- size="lg"
191
- title="Create feature flag"
192
- footer={
193
- <>
194
- <Button variant="ghost" onClick={close}>Cancel</Button>
195
- <Button variant="primary" onClick={close}>Create</Button>
196
- </>
197
- }
198
- >
199
- <div className="space-y-4">
200
- <Input label="Key" placeholder="billing-ui-v3" />
201
- <Textarea label="Description" placeholder="Expose the rewritten billing funnel" className="h-28" />
202
- <Select label="Rollout">
203
- <option>10% staged</option>
204
- <option>Everyone</option>
205
- </Select>
206
- </div>
207
- </Modal>
208
- </div>
209
- </ShowcaseWrapper>
210
- );
211
- }