@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,17 +1,84 @@
1
- export { Button as Button, type ButtonProps as ButtonProps, type ButtonShape as ButtonShape, type ButtonSize as ButtonSize, type ButtonVariant as ButtonVariant } from "@/components/ui/Button";
2
- export { ButtonChrome as ButtonChrome, type ButtonChromeProps as ButtonChromeProps } from "@/components/ui/ButtonChrome";
3
- export { Alert as Alert, type AlertProps as AlertProps, type AlertStatus as AlertStatus } from "@/components/ui/Alert";
4
- export { Badge as Badge, type BadgeProps as BadgeProps, type BadgeSize as BadgeSize, type BadgeVariant as BadgeVariant } from "@/components/ui/Badge";
5
- export { Card as Card, type CardProps as CardProps, type CardVariant as CardVariant } from "@/components/ui/Card";
6
- export { Drawer as Drawer, type DrawerProps as DrawerProps, type DrawerSide as DrawerSide, type DrawerSize as DrawerSize } from "@/components/ui/Drawer";
7
- export { Kbd as Kbd, type KbdProps as KbdProps, type KbdVariant as KbdVariant } from "@/components/ui/Kbd";
1
+ "use client";
2
+
3
+ export {
4
+ Button as Button,
5
+ type ButtonProps as ButtonProps,
6
+ type ButtonShape as ButtonShape,
7
+ type ButtonSize as ButtonSize,
8
+ type ButtonVariant as ButtonVariant,
9
+ } from "@/components/ui/Button";
10
+ export {
11
+ ButtonChrome as ButtonChrome,
12
+ type ButtonChromeProps as ButtonChromeProps,
13
+ } from "@/components/ui/ButtonChrome";
14
+ export {
15
+ Alert as Alert,
16
+ type AlertProps as AlertProps,
17
+ type AlertStatus as AlertStatus,
18
+ } from "@/components/ui/Alert";
19
+ export {
20
+ Badge as Badge,
21
+ type BadgeProps as BadgeProps,
22
+ type BadgeSize as BadgeSize,
23
+ type BadgeVariant as BadgeVariant,
24
+ } from "@/components/ui/Badge";
25
+ export {
26
+ Card as Card,
27
+ type CardProps as CardProps,
28
+ type CardVariant as CardVariant,
29
+ } from "@/components/ui/Card";
30
+ export {
31
+ Drawer as Drawer,
32
+ type DrawerProps as DrawerProps,
33
+ type DrawerSide as DrawerSide,
34
+ type DrawerSize as DrawerSize,
35
+ } from "@/components/ui/Drawer";
36
+ export {
37
+ Kbd as Kbd,
38
+ type KbdPlatform as KbdPlatform,
39
+ type KbdProps as KbdProps,
40
+ type KbdVariant as KbdVariant,
41
+ } from "@/components/ui/Kbd";
42
+ export {
43
+ Loader,
44
+ LoadingState,
45
+ Skeleton,
46
+ type LoaderProps,
47
+ type LoaderSize,
48
+ type LoaderVariant,
49
+ type LoadingStateProps,
50
+ type SkeletonProps,
51
+ type SkeletonShape,
52
+ } from "@/components/ui/Loader";
53
+ export {
54
+ AuthCard,
55
+ AuthDivider,
56
+ AuthLayout,
57
+ type AuthCardProps,
58
+ type AuthDividerProps,
59
+ type AuthLayoutProps,
60
+ } from "@/components/ui/AuthLayout";
61
+ export {
62
+ SettingsLayout,
63
+ SettingsNav,
64
+ type SettingsLayoutProps,
65
+ type SettingsNavGroup,
66
+ type SettingsNavItem,
67
+ type SettingsNavProps,
68
+ } from "@/components/ui/SettingsLayout";
8
69
  export {
9
70
  DropdownButton as DropdownButton,
10
71
  DropdownItem as DropdownItem,
11
72
  DropdownMenu as DropdownMenu,
73
+ DropdownRadioGroup as DropdownRadioGroup,
74
+ DropdownRadioItem as DropdownRadioItem,
12
75
  type DropdownAlign as DropdownAlign,
13
76
  type DropdownButtonProps as DropdownButtonProps,
77
+ type DropdownItemProps as DropdownItemProps,
14
78
  type DropdownMenuProps as DropdownMenuProps,
79
+ type DropdownRadioGroupProps as DropdownRadioGroupProps,
80
+ type DropdownRadioItemProps as DropdownRadioItemProps,
81
+ type DropdownSide as DropdownSide,
15
82
  } from "@/components/ui/DropdownMenu";
16
83
  export {
17
84
  Checkbox as Checkbox,
@@ -33,32 +100,133 @@ export {
33
100
  type TextareaProps as TextareaProps,
34
101
  type ToggleProps as ToggleProps,
35
102
  } from "@/components/ui/Input";
36
- export { Modal as Modal, type ModalProps as ModalProps, type ModalSize as ModalSize } from "@/components/ui/Modal";
37
- export { Breadcrumbs as Breadcrumbs, Pagination as Pagination, type BreadcrumbItem as BreadcrumbItem, type BreadcrumbsProps as BreadcrumbsProps, type PaginationProps as PaginationProps } from "@/components/ui/Navigation";
38
- export { Panel as Panel, type PanelProps as PanelProps } from "@/components/ui/Panel";
39
- export { Rating as Rating, type RatingProps as RatingProps } from "@/components/ui/Rating";
40
- export { SearchGroup as SearchGroup, SearchInput as SearchInput, type SearchGroupProps as SearchGroupProps, type SearchInputProps as SearchInputProps } from "@/components/ui/SearchInput";
41
- export { Table as Table, type TableColumn as TableColumn, type TableProps as TableProps } from "@/components/ui/Table";
42
- export { Stat as Stat, type StatProps as StatProps, type StatTone as StatTone } from "@/components/ui/Stat";
43
- export { Toast as Toast, ToastStack as ToastStack, type ToastProps as ToastProps, type ToastStackProps as ToastStackProps, type ToastStatus as ToastStatus } from "@/components/ui/Toast";
44
- export { Tabs as Tabs, type TabItem as TabItem, type TabsProps as TabsProps, type TabsVariant as TabsVariant } from "@/components/ui/Tabs";
103
+ export {
104
+ FormField as FormField,
105
+ type FormFieldControlProps as FormFieldControlProps,
106
+ type FormFieldProps as FormFieldProps,
107
+ } from "@/components/ui/FormField";
108
+ export {
109
+ Modal as Modal,
110
+ type ModalProps as ModalProps,
111
+ type ModalSize as ModalSize,
112
+ } from "@/components/ui/Modal";
113
+ export {
114
+ Breadcrumbs as Breadcrumbs,
115
+ Pagination as Pagination,
116
+ type BreadcrumbItem as BreadcrumbItem,
117
+ type BreadcrumbsProps as BreadcrumbsProps,
118
+ type PaginationProps as PaginationProps,
119
+ } from "@/components/ui/Navigation";
120
+ export {
121
+ Panel as Panel,
122
+ type PanelProps as PanelProps,
123
+ } from "@/components/ui/Panel";
124
+ export {
125
+ Rating as Rating,
126
+ type RatingProps as RatingProps,
127
+ } from "@/components/ui/Rating";
128
+ export {
129
+ SearchGroup as SearchGroup,
130
+ SearchInput as SearchInput,
131
+ type SearchGroupProps as SearchGroupProps,
132
+ type SearchInputProps as SearchInputProps,
133
+ } from "@/components/ui/SearchInput";
134
+ export {
135
+ Table as Table,
136
+ type TableColumn as TableColumn,
137
+ type TableProps as TableProps,
138
+ } from "@/components/ui/Table";
139
+ export {
140
+ Stat as Stat,
141
+ type StatProps as StatProps,
142
+ type StatTone as StatTone,
143
+ } from "@/components/ui/Stat";
144
+ export {
145
+ Toast as Toast,
146
+ ToastStack as ToastStack,
147
+ type ToastProps as ToastProps,
148
+ type ToastStackProps as ToastStackProps,
149
+ type ToastStatus as ToastStatus,
150
+ } from "@/components/ui/Toast";
151
+ export {
152
+ Tabs as Tabs,
153
+ type TabItem as TabItem,
154
+ type TabsProps as TabsProps,
155
+ type TabsVariant as TabsVariant,
156
+ } from "@/components/ui/Tabs";
45
157
  export { ThemeDomSync } from "@/components/ui/ThemeDomSync";
46
- export { ThemeManager, type ThemeManagerProps } from "@/components/ui/ThemeManager";
47
- export { ThemeSwitcher, type ThemeSwitcherProps } from "@/components/ui/ThemeSwitcher";
48
- export { IconBase as Icon, IconByName as IconByName, type IconProps as IconProps, type IconName as IconName } from "@/components/icons";
158
+ export {
159
+ ThemeManager,
160
+ type ThemeManagerProps,
161
+ } from "@/components/ui/ThemeManager";
162
+ export {
163
+ ThemeSwitcher,
164
+ type ThemeSwitcherProps,
165
+ } from "@/components/ui/ThemeSwitcher";
166
+ export {
167
+ IconBase as Icon,
168
+ IconByName as IconByName,
169
+ type CanonicalIconName as CanonicalIconName,
170
+ type IconAliasName as IconAliasName,
171
+ type IconProps as IconProps,
172
+ type IconName as IconName,
173
+ } from "@/components/icons";
49
174
  export { Accordion } from "@/components/ui/Accordion";
50
175
  export { Stepper } from "@/components/ui/Stepper";
51
176
  export { SegmentedControl } from "@/components/ui/SegmentedControl";
52
177
  export { CommandPalette } from "@/components/ui/CommandPalette";
53
178
  export { Calendar } from "@/components/ui/Calendar";
54
179
  export { HoverCard } from "@/components/ui/HoverCard";
180
+ export {
181
+ Tooltip,
182
+ TooltipProvider,
183
+ type TooltipAlign,
184
+ type TooltipProps,
185
+ type TooltipProviderProps,
186
+ type TooltipSide,
187
+ } from "@/components/ui/Tooltip";
55
188
  export { EmptyState } from "@/components/ui/EmptyState";
56
- export { FilterChips } from "@/components/ui/FilterChips";
189
+ export {
190
+ FilterChips,
191
+ type FilterChip,
192
+ type FilterChipsProps,
193
+ } from "@/components/ui/FilterChips";
194
+ export {
195
+ FilterBar,
196
+ FilterMenu,
197
+ SortMenu,
198
+ type FilterBarProps,
199
+ type FilterMenuOption,
200
+ type FilterMenuProps,
201
+ type SortMenuProps,
202
+ } from "@/components/ui/FilterBar";
203
+ export {
204
+ FilterControls,
205
+ type FilterControlsProps,
206
+ } from "@/components/ui/FilterControls";
57
207
  export { CodeBlock } from "@/components/ui/CodeBlock";
58
- export { ComponentDocs, type ComponentDocsProps, type ComponentPropRow } from "@/components/ui/ComponentDocs";
208
+ export {
209
+ ComponentDocs,
210
+ type ComponentDocsProps,
211
+ type ComponentPropRow,
212
+ } from "@/components/ui/ComponentDocs";
59
213
  export { ShowcaseWrapper } from "@/components/ui/ShowcaseWrapper";
60
214
  export { CollapsibleSection } from "@/components/ui/CollapsibleSection";
61
- export { Display, H1, H2, H3, H4, H5, P, Small, Caption, Overline, Lead, Mono, Label } from "@/components/ui/Typography";
215
+ export {
216
+ Display,
217
+ H1,
218
+ H2,
219
+ H3,
220
+ H4,
221
+ H5,
222
+ P,
223
+ Small,
224
+ Caption,
225
+ Overline,
226
+ Lead,
227
+ Mono,
228
+ Label,
229
+ } from "@/components/ui/Typography";
62
230
  export {
63
231
  Avatar as Avatar,
64
232
  AvatarGroup as AvatarGroup,
@@ -90,3 +258,148 @@ export {
90
258
  type TimelineProps as TimelineProps,
91
259
  type TimelineEvent as TimelineEvent,
92
260
  } from "@/components/ui/Timeline";
261
+ export {
262
+ Banner as Banner,
263
+ type BannerProps as BannerProps,
264
+ type BannerType as BannerType,
265
+ } from "@/components/ui/Banner";
266
+ export {
267
+ Dialog as Dialog,
268
+ type DialogProps as DialogProps,
269
+ } from "@/components/ui/Dialog";
270
+ export {
271
+ Divider as Divider,
272
+ type DividerProps as DividerProps,
273
+ } from "@/components/ui/Divider";
274
+ export {
275
+ Tag as Tag,
276
+ type TagProps as TagProps,
277
+ type TagType as TagType,
278
+ } from "@/components/ui/Tag";
279
+ export {
280
+ ProgressCircle as ProgressCircle,
281
+ type ProgressCircleProps as ProgressCircleProps,
282
+ } from "@/components/ui/ProgressCircle";
283
+ export {
284
+ Row as Row,
285
+ type RowProps as RowProps,
286
+ } from "@/components/ui/Row";
287
+ export {
288
+ Widget as Widget,
289
+ type WidgetProps as WidgetProps,
290
+ } from "@/components/ui/Widget";
291
+ export {
292
+ Lettermark as Lettermark,
293
+ type LettermarkProps as LettermarkProps,
294
+ } from "@/components/ui/Lettermark";
295
+ export {
296
+ Splotch as Splotch,
297
+ type SplotchProps as SplotchProps,
298
+ type SplotchColor as SplotchColor,
299
+ } from "@/components/ui/Splotch";
300
+ export {
301
+ Popover as Popover,
302
+ type PopoverProps as PopoverProps,
303
+ } from "@/components/ui/Popover";
304
+ export {
305
+ LoadingBar as LoadingBar,
306
+ type LoadingBarProps as LoadingBarProps,
307
+ } from "@/components/ui/LoadingBar";
308
+ export {
309
+ Link as Link,
310
+ type LinkProps as LinkProps,
311
+ } from "@/components/ui/Link";
312
+ export {
313
+ Spinner as Spinner,
314
+ type SpinnerProps as SpinnerProps,
315
+ } from "@/components/ui/Spinner";
316
+ export {
317
+ Snack as Snack,
318
+ type SnackProps as SnackProps,
319
+ } from "@/components/ui/Snack";
320
+ export {
321
+ Combobox as Combobox,
322
+ type ComboboxProps as ComboboxProps,
323
+ type ComboboxOption as ComboboxOption,
324
+ } from "@/components/ui/Combobox";
325
+ export {
326
+ Autocomplete as Autocomplete,
327
+ type AutocompleteProps as AutocompleteProps,
328
+ type AutocompleteOption as AutocompleteOption,
329
+ } from "@/components/ui/Autocomplete";
330
+ export {
331
+ ContextMenu as ContextMenu,
332
+ type ContextMenuProps as ContextMenuProps,
333
+ type ContextMenuItem as ContextMenuItem,
334
+ } from "@/components/ui/ContextMenu";
335
+ export {
336
+ Resizable as Resizable,
337
+ type ResizableProps as ResizableProps,
338
+ } from "@/components/ui/Resizable";
339
+ export {
340
+ ScrollArea as ScrollArea,
341
+ type ScrollAreaProps as ScrollAreaProps,
342
+ } from "@/components/ui/ScrollArea";
343
+ export {
344
+ NumberField as NumberField,
345
+ type NumberFieldProps as NumberFieldProps,
346
+ } from "@/components/ui/NumberField";
347
+ export {
348
+ InputGroup as InputGroup,
349
+ type InputGroupProps as InputGroupProps,
350
+ } from "@/components/ui/InputGroup";
351
+ export {
352
+ ButtonGroup as ButtonGroup,
353
+ type ButtonGroupProps as ButtonGroupProps,
354
+ } from "@/components/ui/ButtonGroup";
355
+ export {
356
+ ToggleButton as ToggleButton,
357
+ ToggleGroup as ToggleGroup,
358
+ type ToggleButtonProps as ToggleButtonProps,
359
+ type ToggleGroupProps as ToggleGroupProps,
360
+ } from "@/components/ui/Toggle";
361
+ export {
362
+ Menubar as Menubar,
363
+ type MenubarProps as MenubarProps,
364
+ type MenubarItem as MenubarItem,
365
+ } from "@/components/ui/Menubar";
366
+ export {
367
+ AlertDialog as AlertDialog,
368
+ type AlertDialogProps as AlertDialogProps,
369
+ } from "@/components/ui/AlertDialog";
370
+ export {
371
+ Dot as Dot,
372
+ type DotProps as DotProps,
373
+ } from "@/components/ui/Dot";
374
+ export {
375
+ Collapsible as Collapsible,
376
+ type CollapsibleProps as CollapsibleProps,
377
+ } from "@/components/ui/Collapsible";
378
+ export {
379
+ Metric as Metric,
380
+ type MetricProps as MetricProps,
381
+ } from "@/components/ui/Metric";
382
+ export {
383
+ Chip as Chip,
384
+ type ChipProps as ChipProps,
385
+ } from "@/components/ui/Chip";
386
+ export {
387
+ DataTable as DataTable,
388
+ type DataTableProps as DataTableProps,
389
+ type DataTableColumn as DataTableColumn,
390
+ } from "@/components/ui/DataTable";
391
+ export {
392
+ DatePicker as DatePicker,
393
+ type DatePickerProps as DatePickerProps,
394
+ } from "@/components/ui/DatePicker";
395
+ export {
396
+ AppLayout as AppLayout,
397
+ type AppLayoutProps as AppLayoutProps,
398
+ } from "@/components/ui/AppLayout";
399
+
400
+ export {
401
+ Sidebar as Sidebar,
402
+ type SidebarProps as SidebarProps,
403
+ type SidebarGroup as SidebarGroup,
404
+ type SidebarItemDef as SidebarItemDef,
405
+ } from "@/components/ui/Sidebar";
@@ -0,0 +1,77 @@
1
+ import { useState } from "react";
2
+ import { render, screen } from "@testing-library/react";
3
+ import userEvent from "@testing-library/user-event";
4
+ import { describe, expect, it, vi } from "vitest";
5
+ import { DropdownButton, DropdownItem } from "@/components/ui/DropdownMenu";
6
+ import { FilterMenu } from "@/components/ui/FilterBar";
7
+ import { FilterChips } from "@/components/ui/FilterChips";
8
+
9
+ describe("adaptive dropdown", () => {
10
+ it("supports keyboard navigation, selection, closing, and focus restoration", async () => {
11
+ const user = userEvent.setup();
12
+ const onSelect = vi.fn();
13
+
14
+ render(
15
+ <DropdownButton label="Actions">
16
+ <DropdownItem onClick={onSelect}>Export report</DropdownItem>
17
+ <DropdownItem>Duplicate</DropdownItem>
18
+ </DropdownButton>,
19
+ );
20
+
21
+ const trigger = screen.getByRole("button", { name: "Actions" });
22
+ await user.click(trigger);
23
+ expect(screen.getByRole("menu")).toBeInTheDocument();
24
+
25
+ await user.keyboard("{ArrowDown}{Enter}");
26
+ expect(onSelect).toHaveBeenCalledTimes(1);
27
+ expect(screen.queryByRole("menu")).not.toBeInTheDocument();
28
+ expect(trigger).toHaveFocus();
29
+ });
30
+
31
+ it("exposes filter choices as a controlled radio menu", async () => {
32
+ const user = userEvent.setup();
33
+
34
+ function Fixture() {
35
+ const [value, setValue] = useState("active");
36
+ return (
37
+ <FilterMenu
38
+ label="Status"
39
+ value={value}
40
+ onValueChange={setValue}
41
+ options={[
42
+ { value: "active", label: "Active" },
43
+ { value: "draft", label: "Draft" },
44
+ ]}
45
+ />
46
+ );
47
+ }
48
+
49
+ render(<Fixture />);
50
+ await user.click(screen.getByRole("button", { name: "Status: Active" }));
51
+ expect(screen.getByRole("menuitemradio", { name: "Active" })).toHaveAttribute("data-state", "checked");
52
+ await user.click(screen.getByRole("menuitemradio", { name: "Draft" }));
53
+ expect(screen.getByRole("button", { name: "Status: Draft" })).toBeInTheDocument();
54
+ });
55
+ });
56
+
57
+ describe("filter chips", () => {
58
+ it("keeps toggle and removal as independent keyboard controls", async () => {
59
+ const user = userEvent.setup();
60
+ const onToggle = vi.fn();
61
+ const onRemove = vi.fn();
62
+
63
+ render(
64
+ <FilterChips
65
+ chips={[{ id: "status", label: "Status", value: "Active", active: true }]}
66
+ onToggle={onToggle}
67
+ onRemove={onRemove}
68
+ />,
69
+ );
70
+
71
+ const toggle = screen.getByRole("button", { name: "Status Active" });
72
+ expect(toggle).toHaveAttribute("aria-pressed", "true");
73
+ await user.click(screen.getByRole("button", { name: "Remove Status: Active filter" }));
74
+ expect(onRemove).toHaveBeenCalledWith("status");
75
+ expect(onToggle).not.toHaveBeenCalled();
76
+ });
77
+ });
@@ -0,0 +1,90 @@
1
+ import { createRef } from "react";
2
+ import { render, screen } from "@testing-library/react";
3
+ import { describe, expect, it } from "vitest";
4
+ import {
5
+ CANONICAL_ICONS,
6
+ OLD_UI_ICONS,
7
+ PH_ICONS,
8
+ PH_ICON_ALIASES,
9
+ IconByName,
10
+ IconInfo,
11
+ IconOldWindow,
12
+ IconTerminal,
13
+ } from "@/components/icons";
14
+ import { Kbd } from "@/components/ui/Kbd";
15
+
16
+ describe("Kbd", () => {
17
+ it("renders shortcuts as separate, spoken keycaps", () => {
18
+ render(<Kbd keys={["Command", "K"]} platform="mac" />);
19
+ const shortcut = screen.getByLabelText("Command + K");
20
+
21
+ expect(shortcut).toHaveClass("ph-keycap");
22
+ expect(shortcut.querySelectorAll(".ph-shortcut-key")).toHaveLength(2);
23
+ expect(shortcut).toHaveTextContent("⌘K");
24
+ });
25
+
26
+ it("keeps platform conversion explicit and preserves React nodes", () => {
27
+ const { rerender } = render(<Kbd keys={["Control", "K"]} />);
28
+ expect(screen.getByLabelText("Control + K")).toHaveTextContent("ControlK");
29
+
30
+ rerender(<Kbd keys={[<span key="mod">Fn</span>, "K"]} aria-label="Function + K" />);
31
+ expect(screen.getByLabelText("Function + K")).toHaveTextContent("FnK");
32
+ expect(screen.getByLabelText("Function + K")).not.toHaveTextContent("[object Object]");
33
+ });
34
+
35
+ it("distinguishes a physical key from a code token", () => {
36
+ render(
37
+ <>
38
+ <Kbd variant="key">Escape</Kbd>
39
+ <Kbd variant="token">HogQL</Kbd>
40
+ </>,
41
+ );
42
+
43
+ expect(screen.getByText("Escape")).toHaveClass("ph-keycap");
44
+ expect(screen.getByText("HogQL")).toHaveClass("ph-code-token");
45
+ });
46
+ });
47
+
48
+ describe("icons", () => {
49
+ it("hides decorative icons but exposes labeled icons", () => {
50
+ const { rerender } = render(<IconInfo data-testid="icon" />);
51
+ expect(screen.getByTestId("icon")).toHaveAttribute("aria-hidden", "true");
52
+
53
+ rerender(<IconInfo data-testid="icon" aria-label="Information" />);
54
+ expect(screen.getByRole("img", { name: "Information" })).not.toHaveAttribute("aria-hidden");
55
+ });
56
+
57
+ it("honors size, forwards refs, and renders original glyphs", () => {
58
+ const ref = createRef<SVGSVGElement>();
59
+ render(
60
+ <>
61
+ <IconTerminal ref={ref} size={16} data-testid="terminal" />
62
+ <IconOldWindow aria-label="Old window" />
63
+ </>,
64
+ );
65
+
66
+ expect(ref.current).toBe(screen.getByTestId("terminal"));
67
+ expect(screen.getByTestId("terminal")).toHaveStyle({ width: "16px", height: "16px" });
68
+ expect(screen.getByRole("img", { name: "Old window" })).toBeInTheDocument();
69
+ });
70
+
71
+ it("keeps aliases runtime-identical while originals stay canonical", () => {
72
+ expect(PH_ICONS.grid).toBe(CANONICAL_ICONS.gridView);
73
+ expect(PH_ICONS.play).toBe(CANONICAL_ICONS.playCircle);
74
+ expect(PH_ICONS.warning).toBe(CANONICAL_ICONS.exclamation);
75
+ expect(Object.keys(PH_ICON_ALIASES)).toEqual(expect.arrayContaining(["grid", "play", "warning"]));
76
+
77
+ for (const name of Object.keys(OLD_UI_ICONS)) {
78
+ expect(name in CANONICAL_ICONS).toBe(true);
79
+ }
80
+ });
81
+
82
+ it("gives generated icons useful identities and forwards dynamic refs", () => {
83
+ const ref = createRef<SVGSVGElement>();
84
+ render(<IconByName ref={ref} name="grid" data-testid="dynamic-icon" />);
85
+
86
+ expect(CANONICAL_ICONS.areaChart.displayName).toBe("IconAreaChart");
87
+ expect(ref.current).toBe(screen.getByTestId("dynamic-icon"));
88
+ expect(ref.current).toHaveAttribute("aria-hidden", "true");
89
+ });
90
+ });
@@ -0,0 +1,77 @@
1
+ import { render, screen } from "@testing-library/react";
2
+ import { describe, expect, it } from "vitest";
3
+ import { AuthCard, AuthLayout } from "@/components/ui/AuthLayout";
4
+ import { FilterControls } from "@/components/ui/FilterControls";
5
+ import { Loader, LoadingState, Skeleton } from "@/components/ui/Loader";
6
+ import { SettingsLayout, SettingsNav } from "@/components/ui/SettingsLayout";
7
+ import { getTheme, isThemeId, THEMES } from "@/themes/registry";
8
+
9
+ describe("loading patterns", () => {
10
+ it("announces one useful loading status and keeps skeleton geometry decorative", () => {
11
+ render(
12
+ <>
13
+ <Loader variant="dots" label="Loading events" />
14
+ <LoadingState label="Preparing workspace" title="Almost ready" />
15
+ <Skeleton shape="block" data-testid="skeleton" />
16
+ </>,
17
+ );
18
+
19
+ expect(screen.getByRole("status", { name: "Loading events" })).toBeInTheDocument();
20
+ expect(screen.getByRole("status", { name: "Preparing workspace" })).toHaveTextContent("Almost ready");
21
+ expect(screen.getByTestId("skeleton")).toHaveAttribute("aria-hidden", "true");
22
+ });
23
+ });
24
+
25
+ describe("product layouts", () => {
26
+ it("labels auth and settings regions without owning their application state", () => {
27
+ render(
28
+ <>
29
+ <AuthLayout brand="Acme">
30
+ <AuthCard title="Welcome back"><input aria-label="Email" /></AuthCard>
31
+ </AuthLayout>
32
+ <SettingsLayout
33
+ title="Workspace settings"
34
+ navigation={
35
+ <SettingsNav groups={[{
36
+ label: "Workspace",
37
+ items: [{ id: "general", label: "General", href: "/settings", active: true }],
38
+ }]} />
39
+ }
40
+ >
41
+ Settings content
42
+ </SettingsLayout>
43
+ </>,
44
+ );
45
+
46
+ expect(screen.getByRole("heading", { name: "Welcome back" })).toBeInTheDocument();
47
+ expect(screen.getAllByRole("navigation", { name: "Settings" })).toHaveLength(2);
48
+ for (const link of screen.getAllByRole("link", { name: "General" })) {
49
+ expect(link).toHaveAttribute("aria-current", "page");
50
+ }
51
+ });
52
+
53
+ it("composes filter controls and applied chips in one explicit pattern", () => {
54
+ render(
55
+ <FilterControls
56
+ barProps={{ resultCount: "12 results" }}
57
+ chipsProps={{ chips: [{ id: "status", label: "Status", value: "Active", active: true }] }}
58
+ >
59
+ <button type="button">Add filter</button>
60
+ </FilterControls>,
61
+ );
62
+
63
+ expect(screen.getByRole("button", { name: "Add filter" })).toBeInTheDocument();
64
+ expect(screen.getByText("12 results")).toBeInTheDocument();
65
+ expect(screen.getByRole("group", { name: "Applied filters" })).toHaveTextContent("StatusActive");
66
+ });
67
+ });
68
+
69
+ describe("Kraken themes", () => {
70
+ it("registers a complete light and dark pair", () => {
71
+ expect(isThemeId("kraken-light")).toBe(true);
72
+ expect(isThemeId("kraken-dark")).toBe(true);
73
+ expect(getTheme("kraken-light")).toMatchObject({ colorScheme: "light", group: "Kraken" });
74
+ expect(getTheme("kraken-dark")).toMatchObject({ colorScheme: "dark", group: "Kraken" });
75
+ expect(THEMES.filter((theme) => theme.group === "Kraken")).toHaveLength(2);
76
+ });
77
+ });