@kinetixui/ui 0.5.0 → 0.6.0

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 (80) hide show
  1. package/dist/index.d.ts +35 -1
  2. package/dist/index.js +202 -99
  3. package/package.json +4 -4
  4. package/src/components/app-bar.tsx +139 -0
  5. package/src/components/chart.tsx +15 -3
  6. package/src/index.ts +9 -0
  7. package/src/stories/Accordion.stories.tsx +2 -2
  8. package/src/stories/Alert.stories.tsx +2 -2
  9. package/src/stories/AlertDialog.stories.tsx +2 -2
  10. package/src/stories/AppBar.stories.tsx +46 -0
  11. package/src/stories/AspectRatio.stories.tsx +2 -2
  12. package/src/stories/AudioPlayer.stories.tsx +2 -2
  13. package/src/stories/Avatar.stories.tsx +2 -2
  14. package/src/stories/AvatarGroup.stories.tsx +2 -2
  15. package/src/stories/Badge.stories.tsx +2 -2
  16. package/src/stories/Breadcrumb.stories.tsx +2 -2
  17. package/src/stories/Button.stories.tsx +1 -1
  18. package/src/stories/Calendar.stories.tsx +2 -2
  19. package/src/stories/Card.stories.tsx +2 -2
  20. package/src/stories/Carousel.stories.tsx +2 -2
  21. package/src/stories/Chart.stories.tsx +2 -2
  22. package/src/stories/Checkbox.stories.tsx +2 -2
  23. package/src/stories/CircularProgress.stories.tsx +2 -2
  24. package/src/stories/CodeBlock.stories.tsx +2 -2
  25. package/src/stories/Collapsible.stories.tsx +2 -2
  26. package/src/stories/Combobox.stories.tsx +2 -2
  27. package/src/stories/Command.stories.tsx +2 -2
  28. package/src/stories/ContextMenu.stories.tsx +2 -2
  29. package/src/stories/DataTable.stories.tsx +2 -2
  30. package/src/stories/DatePicker.stories.tsx +2 -2
  31. package/src/stories/Dialog.stories.tsx +2 -2
  32. package/src/stories/Drawer.stories.tsx +2 -2
  33. package/src/stories/DropdownMenu.stories.tsx +2 -2
  34. package/src/stories/Fab.stories.tsx +2 -2
  35. package/src/stories/Field.stories.tsx +2 -2
  36. package/src/stories/FileUpload.stories.tsx +2 -2
  37. package/src/stories/Footer.stories.tsx +2 -2
  38. package/src/stories/Form.stories.tsx +2 -2
  39. package/src/stories/HoverCard.stories.tsx +2 -2
  40. package/src/stories/Image.stories.tsx +2 -2
  41. package/src/stories/Inform.stories.tsx +2 -2
  42. package/src/stories/Input.stories.tsx +1 -1
  43. package/src/stories/InputGroup.stories.tsx +2 -2
  44. package/src/stories/InputOTP.stories.tsx +2 -2
  45. package/src/stories/Label.stories.tsx +2 -2
  46. package/src/stories/List.stories.tsx +2 -2
  47. package/src/stories/Menubar.stories.tsx +2 -2
  48. package/src/stories/Metric.stories.tsx +2 -2
  49. package/src/stories/Modal.stories.tsx +2 -2
  50. package/src/stories/NavigationBar.stories.tsx +2 -2
  51. package/src/stories/NavigationMenu.stories.tsx +2 -2
  52. package/src/stories/NumberInput.stories.tsx +2 -2
  53. package/src/stories/Pagination.stories.tsx +2 -2
  54. package/src/stories/PasswordInput.stories.tsx +2 -2
  55. package/src/stories/Popover.stories.tsx +2 -2
  56. package/src/stories/Progress.stories.tsx +2 -2
  57. package/src/stories/Quote.stories.tsx +2 -2
  58. package/src/stories/RadioGroup.stories.tsx +2 -2
  59. package/src/stories/Rating.stories.tsx +2 -2
  60. package/src/stories/Resizable.stories.tsx +2 -2
  61. package/src/stories/ScrollArea.stories.tsx +2 -2
  62. package/src/stories/Select.stories.tsx +2 -2
  63. package/src/stories/Separator.stories.tsx +2 -2
  64. package/src/stories/Sheet.stories.tsx +2 -2
  65. package/src/stories/Sidebar.stories.tsx +2 -2
  66. package/src/stories/Skeleton.stories.tsx +2 -2
  67. package/src/stories/Slider.stories.tsx +2 -2
  68. package/src/stories/Sonner.stories.tsx +2 -2
  69. package/src/stories/Spinner.stories.tsx +2 -2
  70. package/src/stories/Stepper.stories.tsx +2 -2
  71. package/src/stories/Switch.stories.tsx +2 -2
  72. package/src/stories/TabBar.stories.tsx +2 -2
  73. package/src/stories/Table.stories.tsx +2 -2
  74. package/src/stories/TableOfContents.stories.tsx +2 -2
  75. package/src/stories/Tabs.stories.tsx +2 -2
  76. package/src/stories/Tag.stories.tsx +2 -2
  77. package/src/stories/Textarea.stories.tsx +1 -1
  78. package/src/stories/Toggle.stories.tsx +2 -2
  79. package/src/stories/ToggleGroup.stories.tsx +2 -2
  80. package/src/stories/Tooltip.stories.tsx +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinetixui/ui",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "private": false,
5
5
  "description": "KinetixUI React components — CVA + Radix + Tailwind on the KinetixUI token contract. Also distributed via the kinetixui CLI as a component registry.",
6
6
  "keywords": [
@@ -89,20 +89,20 @@
89
89
  "react-dom": ">=18"
90
90
  },
91
91
  "devDependencies": {
92
- "@kinetixui/tokens": "0.5.0",
92
+ "@kinetixui/tokens": "0.6.0",
93
93
  "@testing-library/jest-dom": "^6.6.3",
94
94
  "@testing-library/react": "^16.1.0",
95
95
  "@testing-library/user-event": "^14.5.2",
96
96
  "@types/react": "^18.3.17",
97
97
  "@types/react-dom": "^18.3.5",
98
- "@vitejs/plugin-react": "^4.3.4",
98
+ "@vitejs/plugin-react": "^5.2.0",
99
99
  "jsdom": "^25.0.1",
100
100
  "react": "^18.3.1",
101
101
  "react-dom": "^18.3.1",
102
102
  "tailwindcss": "^3.4.17",
103
103
  "tsup": "^8.3.5",
104
104
  "typescript": "^5.7.2",
105
- "vitest": "^2.1.8"
105
+ "vitest": "^5.0.0"
106
106
  },
107
107
  "scripts": {
108
108
  "build": "tsup src/index.ts --format esm --dts --external react --external react-dom",
@@ -0,0 +1,139 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import { Slot } from "@radix-ui/react-slot";
5
+ import { Menu, X } from "lucide-react";
6
+ import { cn } from "../lib/utils";
7
+
8
+ /**
9
+ * AppBar — a web application top bar: a brand slot, a row of primary nav
10
+ * links, and a trailing actions slot inside a sticky bordered header. Below
11
+ * the `md` breakpoint the nav collapses behind a menu toggle into a panel
12
+ * under the bar.
13
+ *
14
+ * <AppBar>
15
+ * <AppBarBrand>Acme</AppBarBrand>
16
+ * <AppBarNav>
17
+ * <AppBarLink href="/" active>Overview</AppBarLink>
18
+ * <AppBarLink href="/reports">Reports</AppBarLink>
19
+ * </AppBarNav>
20
+ * <AppBarActions><Button size="sm">New</Button></AppBarActions>
21
+ * </AppBar>
22
+ *
23
+ * `NavigationBar` is the mobile back-button bar; this is the desktop app shell.
24
+ */
25
+
26
+ interface AppBarCtx {
27
+ open: boolean;
28
+ setOpen: React.Dispatch<React.SetStateAction<boolean>>;
29
+ }
30
+ const Ctx = React.createContext<AppBarCtx | null>(null);
31
+ const useAppBar = () => {
32
+ const ctx = React.useContext(Ctx);
33
+ if (!ctx) throw new Error("AppBar parts must be used within <AppBar>");
34
+ return ctx;
35
+ };
36
+
37
+ const AppBar = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(
38
+ ({ className, children, ...props }, ref) => {
39
+ const [open, setOpen] = React.useState(false);
40
+
41
+ const nav = React.Children.toArray(children).find(
42
+ (c): c is React.ReactElement<React.ComponentProps<typeof AppBarNav>> =>
43
+ React.isValidElement(c) && c.type === AppBarNav,
44
+ );
45
+
46
+ return (
47
+ <Ctx.Provider value={{ open, setOpen }}>
48
+ <header
49
+ ref={ref}
50
+ className={cn(
51
+ "sticky top-0 z-40 w-full border-b border-border bg-background/95 font-sans",
52
+ "backdrop-blur supports-[backdrop-filter]:bg-background/75",
53
+ className,
54
+ )}
55
+ {...props}
56
+ >
57
+ <div className="mx-auto flex h-14 max-w-screen-2xl items-center gap-4 px-4">
58
+ {children}
59
+ {nav && (
60
+ <button
61
+ type="button"
62
+ aria-label={open ? "Close menu" : "Open menu"}
63
+ aria-expanded={open}
64
+ onClick={() => setOpen((o) => !o)}
65
+ className={cn(
66
+ "ml-auto inline-flex size-9 items-center justify-center rounded-md text-foreground outline-none transition-colors md:hidden",
67
+ "hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring",
68
+ )}
69
+ >
70
+ {open ? <X className="size-5" /> : <Menu className="size-5" />}
71
+ </button>
72
+ )}
73
+ </div>
74
+ {nav && open && (
75
+ <nav className="flex flex-col gap-1 border-t border-border p-2 md:hidden">
76
+ {nav.props.children}
77
+ </nav>
78
+ )}
79
+ </header>
80
+ </Ctx.Provider>
81
+ );
82
+ },
83
+ );
84
+ AppBar.displayName = "AppBar";
85
+
86
+ const AppBarBrand = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
87
+ ({ className, ...props }, ref) => (
88
+ <div
89
+ ref={ref}
90
+ className={cn("flex shrink-0 items-center gap-2 text-[15px] font-semibold text-foreground", className)}
91
+ {...props}
92
+ />
93
+ ),
94
+ );
95
+ AppBarBrand.displayName = "AppBarBrand";
96
+
97
+ const AppBarNav = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(
98
+ ({ className, ...props }, ref) => (
99
+ <nav ref={ref} className={cn("hidden items-center gap-1 md:flex", className)} {...props} />
100
+ ),
101
+ );
102
+ AppBarNav.displayName = "AppBarNav";
103
+
104
+ export interface AppBarLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
105
+ /** Marks the current destination — sets `aria-current="page"` and the active style. */
106
+ active?: boolean;
107
+ /** Render as the child element (e.g. a framework `<Link>`), forwarding props. */
108
+ asChild?: boolean;
109
+ }
110
+
111
+ const AppBarLink = React.forwardRef<HTMLAnchorElement, AppBarLinkProps>(
112
+ ({ className, active, asChild, ...props }, ref) => {
113
+ const Comp = asChild ? Slot : "a";
114
+ return (
115
+ <Comp
116
+ ref={ref}
117
+ data-active={active ? "" : undefined}
118
+ aria-current={active ? "page" : undefined}
119
+ className={cn(
120
+ "inline-flex items-center rounded-md px-3 py-1.5 text-sm font-medium outline-none transition-colors",
121
+ "text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
122
+ "data-[active]:bg-accent data-[active]:text-foreground",
123
+ className,
124
+ )}
125
+ {...props}
126
+ />
127
+ );
128
+ },
129
+ );
130
+ AppBarLink.displayName = "AppBarLink";
131
+
132
+ const AppBarActions = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
133
+ ({ className, ...props }, ref) => (
134
+ <div ref={ref} className={cn("ml-auto flex shrink-0 items-center gap-2", className)} {...props} />
135
+ ),
136
+ );
137
+ AppBarActions.displayName = "AppBarActions";
138
+
139
+ export { AppBar, AppBarBrand, AppBarNav, AppBarLink, AppBarActions, useAppBar };
@@ -194,21 +194,33 @@ function ChartSrTable({
194
194
  );
195
195
  }
196
196
 
197
+ // This is the one spot that writes an inline <style>. `id`, the config keys and
198
+ // the colour strings are author-supplied, but harden the interpolation anyway:
199
+ // strip everything but `[\w-]` from identifiers, and drop any colour value that
200
+ // carries characters able to close the declaration or the rule.
201
+ const cssIdent = (s: string) => String(s).replace(/[^\w-]/g, "");
202
+ // keep parens (hsl(), var(), color-mix()…); reject only what can end the
203
+ // declaration, close the rule, open an at-rule, a comment, or the <style>.
204
+ const cssValue = (s: string) => (/[<>{}\[\];@]|\/\*|\*\//.test(s) ? "" : s.trim());
205
+
197
206
  const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
198
207
  const colorConfig = Object.entries(config).filter(([, c]) => c.theme || c.color);
199
208
  if (!colorConfig.length) return null;
200
209
 
210
+ const chartSelector = cssIdent(id);
211
+
201
212
  return (
202
213
  <style
203
214
  dangerouslySetInnerHTML={{
204
215
  __html: Object.entries(THEMES)
205
216
  .map(
206
217
  ([theme, prefix]) => `
207
- ${prefix} [data-chart=${id}] {
218
+ ${prefix} [data-chart=${chartSelector}] {
208
219
  ${colorConfig
209
220
  .map(([key, itemConfig]) => {
210
- const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;
211
- return color ? ` --color-${key}: ${color};` : null;
221
+ const raw = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;
222
+ const color = raw ? cssValue(raw) : "";
223
+ return color ? ` --color-${cssIdent(key)}: ${color};` : null;
212
224
  })
213
225
  .join("\n")}
214
226
  }
package/src/index.ts CHANGED
@@ -284,6 +284,15 @@ export { Stepper, type StepperProps, type StepperStep } from "./components/stepp
284
284
  export { Fab, fabVariants, type FabProps } from "./components/fab";
285
285
  export { TabBar, TabBarItem, type TabBarItemProps } from "./components/tab-bar";
286
286
  export { NavigationBar, type NavigationBarProps } from "./components/navigation-bar";
287
+ export {
288
+ AppBar,
289
+ AppBarBrand,
290
+ AppBarNav,
291
+ AppBarLink,
292
+ AppBarActions,
293
+ useAppBar,
294
+ type AppBarLinkProps,
295
+ } from "./components/app-bar";
287
296
  export {
288
297
  FileUpload,
289
298
  FileUploadItem,
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx · controls: scripts/gen-stories.mjs CONTROLS */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -27,7 +27,7 @@ const meta = {
27
27
  },
28
28
  parameters: {
29
29
  layout: "centered",
30
- docs: { source: { code: `<Accordion type="single" collapsible>\n <AccordionItem value="a">\n <AccordionTrigger>Is it accessible?</AccordionTrigger>\n <AccordionContent>Yes. It follows the WAI-ARIA design pattern.</AccordionContent>\n </AccordionItem>\n</Accordion>`, language: "tsx" } },
30
+ docs: { source: { code: "<Accordion type=\"single\" collapsible>\\n <AccordionItem value=\"a\">\\n <AccordionTrigger>Is it accessible?</AccordionTrigger>\\n <AccordionContent>Yes. It follows the WAI-ARIA design pattern.</AccordionContent>\\n </AccordionItem>\\n</Accordion>", language: "tsx" } },
31
31
  },
32
32
  } satisfies Meta;
33
33
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx · controls: scripts/gen-stories.mjs CONTROLS */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Alert, AlertDescription, AlertTitle } from "@kinetixui/ui";
6
6
  import { Terminal } from "lucide-react";
7
7
 
@@ -22,7 +22,7 @@ const meta = {
22
22
  },
23
23
  parameters: {
24
24
  layout: "centered",
25
- docs: { source: { code: `<Alert>\n <Terminal className="size-4" />\n <AlertTitle>Heads up!</AlertTitle>\n <AlertDescription>You can add components to your app using the CLI.</AlertDescription>\n</Alert>`, language: "tsx" } },
25
+ docs: { source: { code: "<Alert>\\n <Terminal className=\"size-4\" />\\n <AlertTitle>Heads up!</AlertTitle>\\n <AlertDescription>You can add components to your app using the CLI.</AlertDescription>\\n</Alert>", language: "tsx" } },
26
26
  },
27
27
  } satisfies Meta;
28
28
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, Button } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -26,7 +26,7 @@ const meta = {
26
26
  title: "Overlays/AlertDialog",
27
27
  parameters: {
28
28
  layout: "centered",
29
- docs: { source: { code: `<AlertDialog>\n <AlertDialogTrigger asChild><Button variant="Outline">Delete account</Button></AlertDialogTrigger>\n <AlertDialogContent>…</AlertDialogContent>\n</AlertDialog>`, language: "tsx" } },
29
+ docs: { source: { code: "<AlertDialog>\\n <AlertDialogTrigger asChild><Button variant=\"Outline\">Delete account</Button></AlertDialogTrigger>\\n <AlertDialogContent>…</AlertDialogContent>\\n</AlertDialog>", language: "tsx" } },
30
30
  },
31
31
  } satisfies Meta;
32
32
 
@@ -0,0 +1,46 @@
1
+ /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
+ Source of truth: apps/web/src/registry/demos.tsx */
3
+ import * as React from "react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
+ import { AppBar, AppBarActions, AppBarBrand, AppBarLink, AppBarNav } from "@kinetixui/ui";
6
+ import { Bell } from "lucide-react";
7
+
8
+ const Demo = () => (
9
+ <AppBar className="w-full max-w-2xl rounded-md border">
10
+ <AppBarBrand>
11
+ <span className="grid size-6 place-items-center rounded bg-primary text-[11px] font-bold text-primary-foreground">
12
+ A
13
+ </span>
14
+ Acme
15
+ </AppBarBrand>
16
+ <AppBarNav>
17
+ <AppBarLink href="#" active>
18
+ Overview
19
+ </AppBarLink>
20
+ <AppBarLink href="#">Reports</AppBarLink>
21
+ <AppBarLink href="#">Team</AppBarLink>
22
+ </AppBarNav>
23
+ <AppBarActions>
24
+ <button
25
+ type="button"
26
+ aria-label="Notifications"
27
+ className="flex size-9 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground"
28
+ >
29
+ <Bell className="size-4" />
30
+ </button>
31
+ <span className="grid size-8 place-items-center rounded-full bg-muted text-xs font-medium">KZ</span>
32
+ </AppBarActions>
33
+ </AppBar>
34
+ );
35
+
36
+ const meta = {
37
+ title: "Components/AppBar",
38
+ parameters: {
39
+ layout: "centered",
40
+ docs: { source: { code: "<AppBar>\\n <AppBarBrand>Acme</AppBarBrand>\\n <AppBarNav>\\n <AppBarLink href=\"/\" active>Overview</AppBarLink>\\n <AppBarLink href=\"/reports\">Reports</AppBarLink>\\n <AppBarLink href=\"/team\">Team</AppBarLink>\\n </AppBarNav>\\n <AppBarActions>\\n <Button variant=\"Ghost\" size=\"icon\"><Bell /></Button>\\n <Avatar>…</Avatar>\\n </AppBarActions>\\n</AppBar>", language: "tsx" } },
41
+ },
42
+ } satisfies Meta;
43
+
44
+ export default meta;
45
+
46
+ export const Default: StoryObj<typeof meta> = { render: () => <Demo /> };
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx · controls: scripts/gen-stories.mjs CONTROLS */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { AspectRatio } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -17,7 +17,7 @@ const meta = {
17
17
  argTypes: { ratio: { control: { type: "number", step: 0.05 } } },
18
18
  parameters: {
19
19
  layout: "centered",
20
- docs: { source: { code: `<AspectRatio ratio={16 / 9} className="bg-muted rounded-md" />`, language: "tsx" } },
20
+ docs: { source: { code: "<AspectRatio ratio={16 / 9} className=\"bg-muted rounded-md\" />", language: "tsx" } },
21
21
  },
22
22
  } satisfies Meta;
23
23
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { AudioPlayer } from "@kinetixui/ui";
6
6
 
7
7
  const SAMPLE_AUDIO = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3";
@@ -17,7 +17,7 @@ const meta = {
17
17
  title: "Data Display/AudioPlayer",
18
18
  parameters: {
19
19
  layout: "centered",
20
- docs: { source: { code: `<AudioPlayer src="/audio/song.mp3" title="Song 1" artist="Artist" />\n\n<AudioPlayer variant="mini" src="/audio/song.mp3" title="Song 1" artist="Artist" />`, language: "tsx" } },
20
+ docs: { source: { code: "<AudioPlayer src=\"/audio/song.mp3\" title=\"Song 1\" artist=\"Artist\" />\\n\\n<AudioPlayer variant=\"mini\" src=\"/audio/song.mp3\" title=\"Song 1\" artist=\"Artist\" />", language: "tsx" } },
21
21
  },
22
22
  } satisfies Meta;
23
23
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Avatar, AvatarFallback } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -14,7 +14,7 @@ const meta = {
14
14
  title: "Data Display/Avatar",
15
15
  parameters: {
16
16
  layout: "centered",
17
- docs: { source: { code: `<Avatar>\n <AvatarImage src="/avatar.png" alt="@kinetixui" />\n <AvatarFallback>KX</AvatarFallback>\n</Avatar>`, language: "tsx" } },
17
+ docs: { source: { code: "<Avatar>\\n <AvatarImage src=\"/avatar.png\" alt=\"@kinetixui\" />\\n <AvatarFallback>KX</AvatarFallback>\\n</Avatar>", language: "tsx" } },
18
18
  },
19
19
  } satisfies Meta;
20
20
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Avatar, AvatarFallback, AvatarGroup } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -28,7 +28,7 @@ const meta = {
28
28
  title: "Data Display/AvatarGroup",
29
29
  parameters: {
30
30
  layout: "centered",
31
- docs: { source: { code: `<AvatarGroup max={3}>\n <Avatar><AvatarFallback>JD</AvatarFallback></Avatar>\n <Avatar><AvatarFallback>AK</AvatarFallback></Avatar>\n <Avatar><AvatarFallback>MO</AvatarFallback></Avatar>\n</AvatarGroup>`, language: "tsx" } },
31
+ docs: { source: { code: "<AvatarGroup max={3}>\\n <Avatar><AvatarFallback>JD</AvatarFallback></Avatar>\\n <Avatar><AvatarFallback>AK</AvatarFallback></Avatar>\\n <Avatar><AvatarFallback>MO</AvatarFallback></Avatar>\\n</AvatarGroup>", language: "tsx" } },
32
32
  },
33
33
  } satisfies Meta;
34
34
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx · controls: scripts/gen-stories.mjs CONTROLS */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Badge } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -24,7 +24,7 @@ const meta = {
24
24
  },
25
25
  parameters: {
26
26
  layout: "centered",
27
- docs: { source: { code: `<Badge>Default</Badge>\n<Badge variant="secondary">Secondary</Badge>\n<Badge variant="destructive">Destructive</Badge>\n<Badge variant="outline">Outline</Badge>\n<Badge variant="subtle">Subtle</Badge>`, language: "tsx" } },
27
+ docs: { source: { code: "<Badge>Default</Badge>\\n<Badge variant=\"secondary\">Secondary</Badge>\\n<Badge variant=\"destructive\">Destructive</Badge>\\n<Badge variant=\"outline\">Outline</Badge>\\n<Badge variant=\"subtle\">Subtle</Badge>", language: "tsx" } },
28
28
  },
29
29
  } satisfies Meta;
30
30
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "@kinetixui/ui";
6
6
  import { Home } from "lucide-react";
7
7
 
@@ -27,7 +27,7 @@ const meta = {
27
27
  title: "Navigation/Breadcrumb",
28
28
  parameters: {
29
29
  layout: "centered",
30
- docs: { source: { code: `<Breadcrumb>\n <BreadcrumbList>\n <BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem><BreadcrumbPage>Breadcrumb</BreadcrumbPage></BreadcrumbItem>\n </BreadcrumbList>\n</Breadcrumb>`, language: "tsx" } },
30
+ docs: { source: { code: "<Breadcrumb>\\n <BreadcrumbList>\\n <BreadcrumbItem><BreadcrumbLink href=\"/\">Home</BreadcrumbLink></BreadcrumbItem>\\n <BreadcrumbSeparator />\\n <BreadcrumbItem><BreadcrumbPage>Breadcrumb</BreadcrumbPage></BreadcrumbItem>\\n </BreadcrumbList>\\n</Breadcrumb>", language: "tsx" } },
31
31
  },
32
32
  } satisfies Meta;
33
33
 
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
1
+ import type { Meta, StoryObj } from "@storybook/react-vite";
2
2
  import { Button } from "../components/button";
3
3
 
4
4
  const VARIANTS = ["Primary", "Secondary", "Outline", "Destructive", "Ghost", "Link"] as const;
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Calendar } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => {
@@ -16,7 +16,7 @@ const meta = {
16
16
  title: "Form Inputs/Calendar",
17
17
  parameters: {
18
18
  layout: "padded",
19
- docs: { source: { code: `const [date, setDate] = React.useState<Date>()\n<Calendar mode="single" selected={date} onSelect={setDate} className="rounded-md border" />`, language: "tsx" } },
19
+ docs: { source: { code: "const [date, setDate] = React.useState<Date>()\\n<Calendar mode=\"single\" selected={date} onSelect={setDate} className=\"rounded-md border\" />", language: "tsx" } },
20
20
  },
21
21
  } satisfies Meta;
22
22
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Input } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -24,7 +24,7 @@ const meta = {
24
24
  title: "Data Display/Card",
25
25
  parameters: {
26
26
  layout: "centered",
27
- docs: { source: { code: `<Card>\n <CardHeader>\n <CardTitle>Create project</CardTitle>\n <CardDescription>Deploy your new project in one click.</CardDescription>\n </CardHeader>\n <CardContent>…</CardContent>\n <CardFooter>…</CardFooter>\n</Card>`, language: "tsx" } },
27
+ docs: { source: { code: "<Card>\\n <CardHeader>\\n <CardTitle>Create project</CardTitle>\\n <CardDescription>Deploy your new project in one click.</CardDescription>\\n </CardHeader>\\n <CardContent>…</CardContent>\\n <CardFooter>…</CardFooter>\\n</Card>", language: "tsx" } },
28
28
  },
29
29
  } satisfies Meta;
30
30
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -24,7 +24,7 @@ const meta = {
24
24
  title: "Data Display/Carousel",
25
25
  parameters: {
26
26
  layout: "padded",
27
- docs: { source: { code: `<Carousel>\n <CarouselContent>\n {items.map((n) => <CarouselItem key={n}>{n}</CarouselItem>)}\n </CarouselContent>\n <CarouselPrevious />\n <CarouselNext />\n</Carousel>`, language: "tsx" } },
27
+ docs: { source: { code: "<Carousel>\\n <CarouselContent>\\n {items.map((n) => <CarouselItem key={n}>{n}</CarouselItem>)}\\n </CarouselContent>\\n <CarouselPrevious />\\n <CarouselNext />\\n</Carousel>", language: "tsx" } },
28
28
  },
29
29
  } satisfies Meta;
30
30
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { ChartContainer, ChartTooltip, ChartTooltipContent } from "@kinetixui/ui";
6
6
  import { Bar, BarChart, CartesianGrid, XAxis } from "recharts";
7
7
 
@@ -35,7 +35,7 @@ const meta = {
35
35
  title: "Data Display/Chart",
36
36
  parameters: {
37
37
  layout: "padded",
38
- docs: { source: { code: `const config = {\n desktop: { label: "Desktop", color: "hsl(var(--chart-1))" },\n mobile: { label: "Mobile", color: "hsl(var(--chart-2))" },\n}\n<ChartContainer config={config}>\n <BarChart data={data}>\n <CartesianGrid vertical={false} />\n <XAxis dataKey="month" />\n <ChartTooltip content={<ChartTooltipContent />} />\n <Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />\n </BarChart>\n</ChartContainer>`, language: "tsx" } },
38
+ docs: { source: { code: "const config = {\\n desktop: { label: \"Desktop\", color: \"hsl(var(--chart-1))\" },\\n mobile: { label: \"Mobile\", color: \"hsl(var(--chart-2))\" },\\n}\\n<ChartContainer config={config}>\\n <BarChart data={data}>\\n <CartesianGrid vertical={false} />\\n <XAxis dataKey=\"month\" />\\n <ChartTooltip content={<ChartTooltipContent />} />\\n <Bar dataKey=\"desktop\" fill=\"var(--color-desktop)\" radius={4} />\\n </BarChart>\\n</ChartContainer>", language: "tsx" } },
39
39
  },
40
40
  } satisfies Meta;
41
41
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx · controls: scripts/gen-stories.mjs CONTROLS */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Checkbox, Label } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -18,7 +18,7 @@ const meta = {
18
18
  argTypes: { disabled: { control: "boolean" }, defaultChecked: { control: "boolean" } },
19
19
  parameters: {
20
20
  layout: "centered",
21
- docs: { source: { code: `<div className="flex items-center gap-2">\n <Checkbox id="c1" />\n <Label htmlFor="c1">Accept terms and conditions</Label>\n</div>`, language: "tsx" } },
21
+ docs: { source: { code: "<div className=\"flex items-center gap-2\">\\n <Checkbox id=\"c1\" />\\n <Label htmlFor=\"c1\">Accept terms and conditions</Label>\\n</div>", language: "tsx" } },
22
22
  },
23
23
  } satisfies Meta;
24
24
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx · controls: scripts/gen-stories.mjs CONTROLS */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { CircularProgress } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => {
@@ -31,7 +31,7 @@ const meta = {
31
31
  },
32
32
  parameters: {
33
33
  layout: "centered",
34
- docs: { source: { code: `<CircularProgress value={66} showValue />\n<CircularProgress value={66} size={64} strokeWidth={6} showValue />`, language: "tsx" } },
34
+ docs: { source: { code: "<CircularProgress value={66} showValue />\\n<CircularProgress value={66} size={64} strokeWidth={6} showValue />", language: "tsx" } },
35
35
  },
36
36
  } satisfies Meta;
37
37
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Button, CodeBlock } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -16,7 +16,7 @@ const meta = {
16
16
  title: "Foundations/CodeBlock",
17
17
  parameters: {
18
18
  layout: "centered",
19
- docs: { source: { code: `<CodeBlock filename="button.tsx" code={source} />`, language: "tsx" } },
19
+ docs: { source: { code: "<CodeBlock filename=\"button.tsx\" code={source} />", language: "tsx" } },
20
20
  },
21
21
  } satisfies Meta;
22
22
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx · controls: scripts/gen-stories.mjs CONTROLS */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Button, Collapsible, CollapsibleContent, CollapsibleTrigger, Toggle } from "@kinetixui/ui";
6
6
 
7
7
  const Demo = () => (
@@ -26,7 +26,7 @@ const meta = {
26
26
  argTypes: { defaultOpen: { control: "boolean" }, disabled: { control: "boolean" } },
27
27
  parameters: {
28
28
  layout: "centered",
29
- docs: { source: { code: `<Collapsible>\n <CollapsibleTrigger>Toggle</CollapsibleTrigger>\n <CollapsibleContent>…</CollapsibleContent>\n</Collapsible>`, language: "tsx" } },
29
+ docs: { source: { code: "<Collapsible>\\n <CollapsibleTrigger>Toggle</CollapsibleTrigger>\\n <CollapsibleContent>…</CollapsibleContent>\\n</Collapsible>", language: "tsx" } },
30
30
  },
31
31
  } satisfies Meta;
32
32
 
@@ -1,7 +1,7 @@
1
1
  /* AUTO-GENERATED by scripts/gen-stories.mjs — do not edit.
2
2
  Source of truth: apps/web/src/registry/demos.tsx */
3
3
  import * as React from "react";
4
- import type { Meta, StoryObj } from "@storybook/react";
4
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
5
  import { Command as Cmd, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@kinetixui/ui";
6
6
  import { Search } from "lucide-react";
7
7
 
@@ -23,7 +23,7 @@ const meta = {
23
23
  title: "Controls & Actions/Combobox",
24
24
  parameters: {
25
25
  layout: "centered",
26
- docs: { source: { code: `// Popover + Command\n<Popover>\n <PopoverTrigger asChild><Button variant="Outline">Select framework…</Button></PopoverTrigger>\n <PopoverContent className="p-0">\n <Command>…</Command>\n </PopoverContent>\n</Popover>`, language: "tsx" } },
26
+ docs: { source: { code: "// Popover + Command\\n<Popover>\\n <PopoverTrigger asChild><Button variant=\"Outline\">Select framework…</Button></PopoverTrigger>\\n <PopoverContent className=\"p-0\">\\n <Command>…</Command>\\n </PopoverContent>\\n</Popover>", language: "tsx" } },
27
27
  },
28
28
  } satisfies Meta;
29
29