@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,12 +1,12 @@
1
1
  import { Badge, Button, Card, ComponentDocs, ShowcaseWrapper } from "@/components/ui";
2
2
 
3
3
  export default function CardShowcase() {
4
- const code = `import { Badge, Button, Card } from "the-old-ui";
4
+ const code = `import { Badge, Button, Card } from "@xenide-io/the-old-ui-theme";
5
5
 
6
6
  <div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
7
7
  <Card
8
8
  title="Insight saved"
9
- description="White surface, hairline border, orange hover ring — mimics dashboard tiles."
9
+ description="A quiet, static surface. Depth is reserved for interactive or elevated content."
10
10
  actions={
11
11
  <>
12
12
  <Button variant="secondary" outline>
@@ -19,7 +19,7 @@ export default function CardShowcase() {
19
19
 
20
20
  <Card
21
21
  title="With visual"
22
- description="Same card shell — media sits flush to the border like product cards."
22
+ description="Media sits flush to the card edge with a semantic divider."
23
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
24
  actions={
25
25
  <Button variant="primary" size="sm">
@@ -60,12 +60,19 @@ export default function CardShowcase() {
60
60
  description="Grey trays on canvas — mirrors secondary surfaces in-app."
61
61
  actions={<Button variant="primary" outline>Inspect</Button>}
62
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
+ />
63
70
  </div>`;
64
71
 
65
72
  return (
66
73
  <ShowcaseWrapper
67
74
  title="Cards"
68
- description="Reusable card shell with title, description, actions, media, footer, and variant props."
75
+ description="Static by default, with explicit elevated, highlighted, and interactive treatments."
69
76
  code={code}
70
77
  filename="CardExample.tsx"
71
78
  docs={
@@ -76,6 +83,8 @@ export default function CardShowcase() {
76
83
  { name: "description", type: "ReactNode", description: "Optional supporting copy." },
77
84
  { name: "actions", type: "ReactNode", description: "Button row rendered with card action spacing." },
78
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." },
79
88
  ]}
80
89
  />
81
90
  }
@@ -83,7 +92,7 @@ export default function CardShowcase() {
83
92
  <div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
84
93
  <Card
85
94
  title="Insight saved"
86
- description="White surface, hairline border, orange hover ring — mimics dashboard tiles."
95
+ description="A quiet, static surface. Depth is reserved for interactive or elevated content."
87
96
  actions={
88
97
  <>
89
98
  <Button variant="secondary" outline>
@@ -96,7 +105,7 @@ export default function CardShowcase() {
96
105
 
97
106
  <Card
98
107
  title="With visual"
99
- description="Same card shell — media sits flush to the border like product cards."
108
+ description="Media sits flush to the card edge with a semantic divider."
100
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>}
101
110
  actions={
102
111
  <Button variant="primary" size="sm">
@@ -137,6 +146,13 @@ export default function CardShowcase() {
137
146
  description="Grey trays on canvas — mirrors secondary surfaces in-app."
138
147
  actions={<Button variant="primary" outline>Inspect</Button>}
139
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
+ />
140
156
  </div>
141
157
  </ShowcaseWrapper>
142
158
  );
@@ -4,8 +4,8 @@ import { IconCopy, IconEdit, IconLogout, IconPerson, IconTrash, IconTuning } fro
4
4
  import { DropdownButton, DropdownItem, ShowcaseWrapper } from "@/components/ui";
5
5
 
6
6
  export default function DropdownShowcase() {
7
- const code = `import { IconCopy, IconEdit, IconLogout, IconPerson, IconTrash, IconTuning } from "the-old-ui";
8
- import { DropdownButton, DropdownItem } from "the-old-ui";
7
+ const code = `import { IconCopy, IconEdit, IconLogout, IconPerson, IconTrash, IconTuning } from "@xenide-io/the-old-ui-theme";
8
+ import { DropdownButton, DropdownItem } from "@xenide-io/the-old-ui-theme";
9
9
 
10
10
  <div className="ph-panel space-y-6">
11
11
  <p className="text-sm text-ph-subtle">
@@ -51,15 +51,13 @@ import { DropdownButton, DropdownItem } from "the-old-ui";
51
51
  return (
52
52
  <ShowcaseWrapper
53
53
  title="Dropdowns"
54
- description="Use DropdownButton from the-old-ui — labelled Lemon triggers + DropdownItem menu rows."
54
+ description="Accessible menu buttons with keyboard navigation and automatic viewport-aware side flipping and alignment shifting."
55
55
  code={code}
56
56
  filename="DropdownExample.tsx"
57
57
  >
58
58
  <div className="ph-panel space-y-6">
59
59
  <p className="text-sm text-ph-subtle">
60
- Use <code className="ph-kbd">DropdownButton</code> from{" "}
61
- <code className="ph-kbd">the-old-ui</code> — labelled Lemon triggers +{" "}
62
- <code className="ph-kbd">DropdownItem</code> menu rows.
60
+ Menus prefer the requested side, then flip above or sideways and shift start/end alignment to remain visible.
63
61
  </p>
64
62
 
65
63
  <div className="flex flex-wrap items-start gap-6">
@@ -1,50 +1,98 @@
1
1
  "use client";
2
2
 
3
3
  import { useState } from "react";
4
- import { ComponentDocs, FilterChips, ShowcaseWrapper } from "@/components/ui";
4
+ import {
5
+ ComponentDocs,
6
+ FilterControls,
7
+ FilterMenu,
8
+ ShowcaseWrapper,
9
+ SortMenu,
10
+ } from "@/components/ui";
11
+
12
+ const statusOptions = [
13
+ { value: "all", label: "Any status" },
14
+ { value: "active", label: "Active" },
15
+ { value: "draft", label: "Draft" },
16
+ { value: "archived", label: "Archived" },
17
+ ] as const;
18
+
19
+ const ownerOptions = [
20
+ { value: "anyone", label: "Anyone" },
21
+ { value: "me", label: "Owned by me" },
22
+ { value: "team", label: "My team" },
23
+ ] as const;
24
+
25
+ const sortOptions = [
26
+ { value: "updated", label: "Recently updated" },
27
+ { value: "created", label: "Recently created" },
28
+ { value: "name", label: "Name A-Z" },
29
+ ] as const;
5
30
 
6
31
  export default function FilterChipsShowcase() {
7
- const [chips, setChips] = useState([
8
- { id: "1", label: "Active", active: true },
9
- { id: "2", label: "Archived", active: false },
10
- { id: "3", label: "Draft", active: false },
11
- { id: "4", label: "Pending", active: true },
12
- { id: "5", label: "Failed", active: false },
13
- ]);
14
-
15
- const toggleChip = (id: string) => {
16
- setChips((prev) => prev.map((chip) => (chip.id === id ? { ...chip, active: !chip.active } : chip)));
32
+ const [status, setStatus] = useState("active");
33
+ const [owner, setOwner] = useState("me");
34
+ const [sort, setSort] = useState("updated");
35
+
36
+ const applied = [
37
+ ...(status !== "all"
38
+ ? [{ id: "status", label: "Status", value: statusOptions.find((option) => option.value === status)?.label, active: true }]
39
+ : []),
40
+ ...(owner !== "anyone"
41
+ ? [{ id: "owner", label: "Owner", value: ownerOptions.find((option) => option.value === owner)?.label, active: true }]
42
+ : []),
43
+ ];
44
+
45
+ const clear = () => {
46
+ setStatus("all");
47
+ setOwner("anyone");
48
+ setSort("updated");
17
49
  };
18
50
 
19
- const removeChip = (id: string) => {
20
- setChips((prev) => prev.filter((chip) => chip.id !== id));
51
+ const remove = (id: string) => {
52
+ if (id === "status") setStatus("all");
53
+ if (id === "owner") setOwner("anyone");
21
54
  };
22
55
 
23
- const code = `import { FilterChips } from "the-old-ui";
56
+ const code = `import { FilterControls, FilterMenu, SortMenu } from "@xenide-io/the-old-ui-theme";
24
57
 
25
- <div className="ph-panel">
26
- <FilterChips chips={chips} onToggle={toggleChip} onRemove={removeChip} />
27
- </div>`;
58
+ <FilterControls
59
+ barProps={{ onClear: clearFilters, resultCount: "24 insights" }}
60
+ chipsProps={{ chips: appliedFilters, onRemove: removeFilter }}
61
+ emptyState={<span>No filters applied</span>}
62
+ >
63
+ <FilterMenu label="Status" value={status} options={statusOptions} onValueChange={setStatus} />
64
+ <FilterMenu label="Owner" value={owner} options={ownerOptions} onValueChange={setOwner} />
65
+ <SortMenu label="Sort" value={sort} options={sortOptions} onValueChange={setSort} />
66
+ </FilterControls>`;
28
67
 
29
68
  return (
30
69
  <ShowcaseWrapper
31
- title="Filter Chips"
32
- description="Controlled chips for active filters, facets, and quick toggles."
70
+ id="filters"
71
+ title="Filter and sort"
72
+ description="Controlled, URL-ready filter menus, applied chips, sorting, clear-all, and result feedback. Menus flip and shift at viewport edges."
33
73
  code={code}
34
- filename="FilterChipsExample.tsx"
74
+ filename="FilterBarExample.tsx"
35
75
  docs={
36
76
  <ComponentDocs
37
77
  rows={[
38
- { name: "chips", type: "{ id; label; active }[]", description: "Chips to render." },
39
- { name: "onToggle", type: "(id: string) => void", description: "Called when a chip is clicked." },
40
- { name: "onRemove", type: "(id: string) => void", description: "Shows remove control when provided." },
78
+ { name: "FilterControls", type: "FilterControlsProps", description: "Combined filter bar and applied-chip composition without owning state." },
79
+ { name: "FilterBar", type: "FilterBarProps", description: "Lower-level responsive group for filter, sort, clear, and result controls." },
80
+ { name: "FilterMenu", type: "FilterMenuProps", description: "Single-choice filter using an adaptive radio menu." },
81
+ { name: "SortMenu", type: "SortMenuProps", description: "Dedicated sort control kept separate from filter state." },
82
+ { name: "FilterChips", type: "FilterChipsProps", description: "Applied or toggleable chips with independent keyboard-accessible removal." },
41
83
  ]}
42
84
  />
43
85
  }
44
86
  >
45
- <div className="ph-panel">
46
- <FilterChips chips={chips} onToggle={toggleChip} onRemove={removeChip} />
47
- </div>
87
+ <FilterControls
88
+ barProps={{ onClear: clear, resultCount: "24 insights" }}
89
+ chipsProps={{ chips: applied, onRemove: remove }}
90
+ emptyState={<p className="text-xs text-ph-mutedtext">No filters applied</p>}
91
+ >
92
+ <FilterMenu label="Status" value={status} options={statusOptions} onValueChange={setStatus} />
93
+ <FilterMenu label="Owner" value={owner} options={ownerOptions} onValueChange={setOwner} />
94
+ <SortMenu label="Sort" value={sort} options={sortOptions} onValueChange={setSort} />
95
+ </FilterControls>
48
96
  </ShowcaseWrapper>
49
97
  );
50
98
  }
@@ -15,7 +15,7 @@ import {
15
15
  } from "@/components/ui";
16
16
 
17
17
  export default function FormShowcase() {
18
- const code = `import { Checkbox, FileUpload, Input, Panel, Radio, Range, Rating, SearchGroup, Select, Textarea, Toggle } from "the-old-ui";
18
+ const code = `import { Checkbox, FileUpload, Input, Panel, Radio, Range, Rating, SearchGroup, Select, Textarea, Toggle } from "@xenide-io/the-old-ui-theme";
19
19
 
20
20
  <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
21
21
  <Panel title="Text inputs" className="space-y-6">
@@ -67,6 +67,7 @@ export default function FormShowcase() {
67
67
  <ComponentDocs
68
68
  title="Input components"
69
69
  rows={[
70
+ { name: "FormField", type: "component", description: "Shared label, description, error, required-state, and generated-ID composition for custom controls." },
70
71
  { name: "Input", type: "text | search | email | password", description: "Labelled input with error, helperText, size, and variant props." },
71
72
  { name: "Select", type: "select", description: "Labelled select with error, helperText, size, and disabled props." },
72
73
  { name: "Textarea", type: "textarea", description: "Labelled multiline input with the same state props as Input." },