@behavioral-agentic-design-system/core 0.17.0 → 0.19.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 (79) hide show
  1. package/package.json +1 -1
  2. package/scripts/check-stories.mjs +12 -5
  3. package/scripts/fix-stories.mjs +6 -6
  4. package/scripts/generate-stories.cjs +7 -7
  5. package/src/app/preview/components/page.tsx +119 -98
  6. package/src/components/ui/color-picker.tsx +318 -9
  7. package/src/stories/Accordion.stories.tsx +152 -0
  8. package/src/stories/Alert.stories.tsx +102 -0
  9. package/src/stories/AlertDialog.stories.tsx +125 -0
  10. package/src/stories/AspectRatio.stories.tsx +82 -0
  11. package/src/stories/Avatar.stories.tsx +36 -0
  12. package/src/stories/Badge.stories.tsx +54 -0
  13. package/src/stories/Breadcrumb.stories.tsx +36 -0
  14. package/src/stories/Button.stories.tsx +144 -0
  15. package/src/stories/ButtonGroup.stories.tsx +176 -0
  16. package/src/stories/Calendar.stories.tsx +67 -0
  17. package/src/stories/Card.stories.tsx +43 -0
  18. package/src/stories/Carousel.stories.tsx +233 -0
  19. package/src/stories/Chart.stories.tsx +174 -0
  20. package/src/stories/Checkbox.stories.tsx +32 -0
  21. package/src/stories/CircularProgress.stories.tsx +136 -0
  22. package/src/stories/Code.stories.tsx +131 -0
  23. package/src/stories/Collapsible.stories.tsx +27 -0
  24. package/src/stories/ColorPicker.stories.tsx +186 -0
  25. package/src/stories/Combobox.stories.tsx +168 -0
  26. package/src/stories/Command.stories.tsx +40 -0
  27. package/src/stories/ContextMenu.stories.tsx +293 -0
  28. package/src/stories/CopyButton.stories.tsx +111 -0
  29. package/src/stories/DatePicker.stories.tsx +176 -0
  30. package/src/stories/DateRangePicker.stories.tsx +95 -0
  31. package/src/stories/Dialog.stories.tsx +186 -0
  32. package/src/stories/DropdownMenu.stories.tsx +47 -0
  33. package/src/stories/EmptyState.stories.tsx +199 -0
  34. package/src/stories/Field.stories.tsx +155 -0
  35. package/src/stories/FileUpload.stories.tsx +134 -0
  36. package/src/stories/HoverCard.stories.tsx +149 -0
  37. package/src/stories/Indicator.stories.tsx +255 -0
  38. package/src/stories/Input.stories.tsx +69 -0
  39. package/src/stories/Kbd.stories.tsx +123 -0
  40. package/src/stories/Label.stories.tsx +27 -0
  41. package/src/stories/List.stories.tsx +159 -0
  42. package/src/stories/Menubar.stories.tsx +190 -0
  43. package/src/stories/MultiSelect.stories.tsx +107 -0
  44. package/src/stories/NativeSelect.stories.tsx +107 -0
  45. package/src/stories/NavigationMenu.stories.tsx +322 -0
  46. package/src/stories/NumberInput.stories.tsx +100 -0
  47. package/src/stories/Pagination.stories.tsx +201 -0
  48. package/src/stories/PasswordInput.stories.tsx +62 -0
  49. package/src/stories/PinInput.stories.tsx +136 -0
  50. package/src/stories/Popover.stories.tsx +37 -0
  51. package/src/stories/Progress.stories.tsx +64 -0
  52. package/src/stories/RadioGroup.stories.tsx +39 -0
  53. package/src/stories/RatingGroup.stories.tsx +102 -0
  54. package/src/stories/Resizable.stories.tsx +28 -0
  55. package/src/stories/Reveal.stories.tsx +63 -0
  56. package/src/stories/ScrollArea.stories.tsx +76 -0
  57. package/src/stories/SegmentedControl.stories.tsx +182 -0
  58. package/src/stories/Select.stories.tsx +62 -0
  59. package/src/stories/Separator.stories.tsx +28 -0
  60. package/src/stories/Sheet.stories.tsx +193 -0
  61. package/src/stories/Sidebar.stories.tsx +53 -0
  62. package/src/stories/Skeleton.stories.tsx +32 -0
  63. package/src/stories/Slider.stories.tsx +67 -0
  64. package/src/stories/Sonner.stories.tsx +146 -0
  65. package/src/stories/Spinner.stories.tsx +94 -0
  66. package/src/stories/Stepper.stories.tsx +228 -0
  67. package/src/stories/Switch.stories.tsx +58 -0
  68. package/src/stories/Table.stories.tsx +38 -0
  69. package/src/stories/Tabs.stories.tsx +128 -0
  70. package/src/stories/Tag.stories.tsx +51 -0
  71. package/src/stories/TagsInput.stories.tsx +154 -0
  72. package/src/stories/Textarea.stories.tsx +31 -0
  73. package/src/stories/TimePicker.stories.tsx +54 -0
  74. package/src/stories/Timeline.stories.tsx +263 -0
  75. package/src/stories/Toggle.stories.tsx +45 -0
  76. package/src/stories/ToggleGroup.stories.tsx +39 -0
  77. package/src/stories/Toolbar.stories.tsx +295 -0
  78. package/src/stories/Tooltip.stories.tsx +37 -0
  79. package/src/stories/TreeView.stories.tsx +293 -0
@@ -0,0 +1,67 @@
1
+ // Note: calendar day cells use the shadcn default font-normal weight (see the
2
+ // `allow-font-normal-small` escape hatch in calendar.tsx). A font-medium bump to
3
+ // satisfy the SADS-1 weight floor is a deferred design decision on this shared
4
+ // primitive, not a mechanical fix.
5
+ import type { Meta, StoryObj } from "@storybook/react";
6
+ import { useState } from "react";
7
+ import { Calendar } from "@behavioral-agentic-design-system/core/components/ui/calendar";
8
+ import type { DateRange } from "react-day-picker";
9
+
10
+ const meta: Meta<typeof Calendar> = {
11
+ title: "Components/Calendar",
12
+ component: Calendar,
13
+ parameters: { layout: "centered" },
14
+ tags: ["autodocs"],
15
+ };
16
+
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+
20
+ export const Default: Story = {
21
+ render: () => {
22
+ const [selected, setSelected] = useState<Date | undefined>(new Date());
23
+ return (
24
+ <Calendar
25
+ mode="single"
26
+ selected={selected}
27
+ onSelect={setSelected}
28
+ className="rounded-md border"
29
+ />
30
+ );
31
+ },
32
+ };
33
+
34
+ export const Range: Story = {
35
+ render: () => {
36
+ const today = new Date();
37
+ const start = new Date(today);
38
+ const end = new Date(today);
39
+ end.setDate(end.getDate() + 6);
40
+ const [selected, setSelected] = useState<DateRange | undefined>({
41
+ from: start,
42
+ to: end,
43
+ });
44
+ return (
45
+ <Calendar
46
+ mode="range"
47
+ selected={selected}
48
+ onSelect={setSelected}
49
+ className="rounded-md border"
50
+ />
51
+ );
52
+ },
53
+ };
54
+
55
+ export const RealisticUse: Story = {
56
+ render: () => {
57
+ const [selected, setSelected] = useState<Date | undefined>(new Date());
58
+ return (
59
+ <Calendar
60
+ mode="single"
61
+ selected={selected}
62
+ onSelect={setSelected}
63
+ className="rounded-md border"
64
+ />
65
+ );
66
+ },
67
+ };
@@ -0,0 +1,43 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle, CardFooter } from "@behavioral-agentic-design-system/core/components/ui/card";
3
+ import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
4
+
5
+ const meta: Meta<typeof Card> = {
6
+ title: "Components/Card",
7
+ component: Card,
8
+ parameters: { layout: "centered" },
9
+ tags: ["autodocs"],
10
+ };
11
+
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+
15
+ export const Default: Story = {
16
+ render: () => (<Card className="w-[360px]">
17
+ <CardHeader>
18
+ <CardTitle>Total Revenue</CardTitle>
19
+ <CardDescription>+20.1% from last month</CardDescription>
20
+ </CardHeader>
21
+ <CardContent>
22
+ <p className="text-3xl font-semibold tabular-nums">$15,231.89</p>
23
+ </CardContent>
24
+ <CardFooter>
25
+ <Button size="sm">View report</Button>
26
+ </CardFooter>
27
+ </Card>),
28
+ };
29
+
30
+ export const RealisticUse: Story = {
31
+ render: () => (<Card className="w-[360px]">
32
+ <CardHeader>
33
+ <CardTitle>Total Revenue</CardTitle>
34
+ <CardDescription>+20.1% from last month</CardDescription>
35
+ </CardHeader>
36
+ <CardContent>
37
+ <p className="text-3xl font-semibold tabular-nums">$15,231.89</p>
38
+ </CardContent>
39
+ <CardFooter>
40
+ <Button size="sm">View report</Button>
41
+ </CardFooter>
42
+ </Card>),
43
+ };
@@ -0,0 +1,233 @@
1
+ // scrollbar-none (Tailwind v4.3 utility) replaces [scrollbar-width:none] [&::-webkit-scrollbar]:hidden
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import {
4
+ Carousel,
5
+ CarouselContent,
6
+ CarouselItem,
7
+ CarouselNext,
8
+ CarouselPrevious,
9
+ CarouselIndicators,
10
+ } from "@behavioral-agentic-design-system/core/components/ui/carousel";
11
+ import { Card, CardContent } from "@behavioral-agentic-design-system/core/components/ui/card";
12
+
13
+ const meta: Meta<typeof Carousel> = {
14
+ title: "Components/Carousel",
15
+ component: Carousel,
16
+ parameters: {
17
+ layout: "centered",
18
+ docs: {
19
+ description: {
20
+ component:
21
+ "CSS scroll-snap carousel. No external dependencies. The scroll container (CarouselContent) carries tabIndex={0} and the keyboard handler — focus it then use Arrow keys, Home, End. When overlay CarouselPrevious/CarouselNext are direct children, the scroll track is narrowed (side margin) so the 44px arrow circles sit in empty side gutters over the page background — the adjacent slide is clipped at the track edge, so no card peeks under an arrow. Indicator dots are true circles in every state — the active dot differs by fill, not shape — sized large and clustered tightly, each with a 44px-tall tap area sized by explicit width (not padding) so a host's global [role=tab] reset can't spread them. Slides carry a gap-4 so adjacent cards have breathing room as you scroll between them. The active indicator is tracked by a global-argmax over every slide's intersection ratio, so it advances once per card boundary without fluttering mid-scroll. Prev/Next scroll only the carousel's own track (never Element.scrollIntoView), so activating a control never scrolls the surrounding page.",
22
+ },
23
+ },
24
+ },
25
+ tags: ["autodocs"],
26
+ };
27
+
28
+ export default meta;
29
+ type Story = StoryObj<typeof meta>;
30
+
31
+ // Real content from content/personas/bads.json primary pool
32
+ const SLIDES_FEATURES = [
33
+ {
34
+ heading: "Token-first design",
35
+ body: "One tokens.json drives every color, spacing, and motion value across all components and forks.",
36
+ },
37
+ {
38
+ heading: "WCAG 2.2 AAA out of the box",
39
+ body: "7:1 contrast, 44 px touch targets, focus-visible rings on every interactive element.",
40
+ },
41
+ {
42
+ heading: "Agent-ready layers",
43
+ body: "Each layer ships a machine-readable manifest so Claude or any LLM can retrieve the right rule on demand.",
44
+ },
45
+ {
46
+ heading: "Portable by design",
47
+ body: "Fork BADS for a new client engagement, rename, and customize tokens — no lock-in, full git history.",
48
+ },
49
+ ];
50
+
51
+ const SLIDES_TEAM = [
52
+ { name: "Jordan Reeves", role: "Lead designer", initials: "JR" },
53
+ { name: "Seo-yun Park", role: "Front-end engineer", initials: "SP" },
54
+ { name: "Marcus Lindqvist", role: "Design system architect", initials: "ML" },
55
+ { name: "Anika Patel", role: "Accessibility specialist", initials: "AP" },
56
+ { name: "Tomás Herrera", role: "Brand strategist", initials: "TH" },
57
+ ];
58
+
59
+ export const Default: Story = {
60
+ render: () => (
61
+ <div className="w-[512px]">
62
+ <Carousel aria-label="BADS feature highlights">
63
+ <CarouselContent>
64
+ {SLIDES_FEATURES.map((slide, i) => (
65
+ <CarouselItem key={i} index={i}>
66
+ <Card>
67
+ <CardContent className="flex flex-col gap-2 p-6">
68
+ <p className="text-sm font-semibold text-foreground">{slide.heading}</p>
69
+ <p className="text-sm text-muted-foreground">{slide.body}</p>
70
+ </CardContent>
71
+ </Card>
72
+ </CarouselItem>
73
+ ))}
74
+ </CarouselContent>
75
+ <CarouselPrevious />
76
+ <CarouselNext />
77
+ </Carousel>
78
+ </div>
79
+ ),
80
+ };
81
+
82
+ export const Variant_WithIndicators: Story = {
83
+ render: () => (
84
+ <div className="w-[512px]">
85
+ <Carousel aria-label="BADS feature highlights with indicators">
86
+ <CarouselContent>
87
+ {SLIDES_FEATURES.map((slide, i) => (
88
+ <CarouselItem key={i} index={i}>
89
+ <Card>
90
+ <CardContent className="flex flex-col gap-2 p-6">
91
+ <p className="text-sm font-semibold">{slide.heading}</p>
92
+ <p className="text-sm text-muted-foreground">{slide.body}</p>
93
+ </CardContent>
94
+ </Card>
95
+ </CarouselItem>
96
+ ))}
97
+ </CarouselContent>
98
+ <CarouselPrevious />
99
+ <CarouselNext />
100
+ <CarouselIndicators />
101
+ </Carousel>
102
+ </div>
103
+ ),
104
+ };
105
+
106
+ export const Variant_NoControls: Story = {
107
+ name: "Variant_NoControls (keyboard + swipe only)",
108
+ render: () => (
109
+ <div className="w-[512px]">
110
+ <Carousel aria-label="Team members">
111
+ <CarouselContent>
112
+ {SLIDES_TEAM.map((member, i) => (
113
+ <CarouselItem key={i} index={i}>
114
+ <Card>
115
+ <CardContent className="flex items-center gap-4 p-6">
116
+ <div className="flex size-11 shrink-0 items-center justify-center rounded-full bg-primary text-sm font-semibold text-primary-foreground">
117
+ {member.initials}
118
+ </div>
119
+ <div>
120
+ <p className="text-sm font-medium">{member.name}</p>
121
+ <p className="text-xs text-muted-foreground">{member.role}</p>
122
+ </div>
123
+ </CardContent>
124
+ </Card>
125
+ </CarouselItem>
126
+ ))}
127
+ </CarouselContent>
128
+ <CarouselIndicators />
129
+ </Carousel>
130
+ </div>
131
+ ),
132
+ };
133
+
134
+ export const Size_Wide: Story = {
135
+ render: () => (
136
+ <div className="w-[560px]">
137
+ <Carousel aria-label="Wide carousel — two items visible">
138
+ <CarouselContent className="gap-4">
139
+ {SLIDES_FEATURES.map((slide, i) => (
140
+ <CarouselItem key={i} index={i} className="basis-1/2">
141
+ <Card className="h-full">
142
+ <CardContent className="flex flex-col gap-2 p-5">
143
+ <p className="text-sm font-semibold">{slide.heading}</p>
144
+ <p className="text-xs text-muted-foreground">{slide.body}</p>
145
+ </CardContent>
146
+ </Card>
147
+ </CarouselItem>
148
+ ))}
149
+ </CarouselContent>
150
+ <CarouselPrevious />
151
+ <CarouselNext />
152
+ </Carousel>
153
+ </div>
154
+ ),
155
+ };
156
+
157
+ export const Variant_Vertical: Story = {
158
+ render: () => (
159
+ <div className="h-60 w-80">
160
+ <Carousel orientation="vertical" aria-label="Vertical feature carousel" className="h-full">
161
+ <CarouselContent className="h-60">
162
+ {SLIDES_FEATURES.map((slide, i) => (
163
+ <CarouselItem key={i} index={i} className="basis-full h-60">
164
+ <Card className="h-full">
165
+ <CardContent className="flex flex-col gap-2 p-6">
166
+ <p className="text-sm font-semibold">{slide.heading}</p>
167
+ <p className="text-sm text-muted-foreground">{slide.body}</p>
168
+ </CardContent>
169
+ </Card>
170
+ </CarouselItem>
171
+ ))}
172
+ </CarouselContent>
173
+ </Carousel>
174
+ </div>
175
+ ),
176
+ };
177
+
178
+ export const RealisticUse: Story = {
179
+ name: "RealisticUse — onboarding flow",
180
+ render: () => (
181
+ <div className="w-96 rounded-xl border bg-card p-6 shadow-sm">
182
+ <div className="mb-4">
183
+ <p className="text-xs font-medium uppercase tracking-widest text-muted-foreground">
184
+ Getting started
185
+ </p>
186
+ <p className="mt-1 text-lg font-semibold text-foreground">
187
+ Welcome to BADS
188
+ </p>
189
+ </div>
190
+ <Carousel aria-label="Onboarding steps">
191
+ <CarouselContent>
192
+ {[
193
+ {
194
+ step: "1 of 4",
195
+ title: "Set up your tokens",
196
+ body: "Edit tokens.json and run pnpm build:tokens. Colors, spacing, and motion all update from one source.",
197
+ },
198
+ {
199
+ step: "2 of 4",
200
+ title: "Explore components",
201
+ body: "41 primitives ship out of the box — all WCAG 2.2 AAA, all keyboard-navigable, all motion-token driven.",
202
+ },
203
+ {
204
+ step: "3 of 4",
205
+ title: "Fork for a client",
206
+ body: "Run pnpm rename and answer two questions. The system re-brands itself in under 30 seconds.",
207
+ },
208
+ {
209
+ step: "4 of 4",
210
+ title: "Ship with confidence",
211
+ body: "Pre-commit hooks enforce a11y, token discipline, and story coverage on every commit.",
212
+ },
213
+ ].map((s, i) => (
214
+ <CarouselItem key={i} index={i}>
215
+ <div className="flex flex-col gap-2 py-2">
216
+ <p className="text-xs text-muted-foreground">{s.step}</p>
217
+ <p className="text-sm font-semibold">{s.title}</p>
218
+ <p className="text-sm text-muted-foreground">{s.body}</p>
219
+ </div>
220
+ </CarouselItem>
221
+ ))}
222
+ </CarouselContent>
223
+ <div className="mt-4 flex items-center justify-between">
224
+ <CarouselIndicators className="pt-0" />
225
+ <div className="flex gap-2">
226
+ <CarouselPrevious className="static translate-y-0 size-9" />
227
+ <CarouselNext className="static translate-y-0 size-9" />
228
+ </div>
229
+ </div>
230
+ </Carousel>
231
+ </div>
232
+ ),
233
+ };
@@ -0,0 +1,174 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ ChartContainer,
4
+ ChartTooltip,
5
+ ChartTooltipContent,
6
+ } from "@behavioral-agentic-design-system/core/components/ui/chart";
7
+ import {
8
+ Area,
9
+ AreaChart,
10
+ Bar,
11
+ BarChart,
12
+ CartesianGrid,
13
+ Line,
14
+ LineChart,
15
+ PolarAngleAxis,
16
+ PolarGrid,
17
+ Radar,
18
+ RadarChart,
19
+ ReferenceDot,
20
+ XAxis,
21
+ YAxis,
22
+ } from "recharts";
23
+
24
+ const meta: Meta<typeof ChartContainer> = {
25
+ title: "Components/Chart",
26
+ component: ChartContainer,
27
+ parameters: { layout: "centered" },
28
+ tags: ["autodocs"],
29
+ };
30
+
31
+ export default meta;
32
+ type Story = StoryObj<typeof meta>;
33
+
34
+ const monthlyData = [
35
+ { month: "Jan", desktop: 186, mobile: 80 },
36
+ { month: "Feb", desktop: 305, mobile: 200 },
37
+ { month: "Mar", desktop: 237, mobile: 120 },
38
+ { month: "Apr", desktop: 73, mobile: 190 },
39
+ { month: "May", desktop: 209, mobile: 130 },
40
+ { month: "Jun", desktop: 214, mobile: 140 },
41
+ ];
42
+
43
+ const twoSeriesConfig = {
44
+ desktop: { label: "Desktop", color: "var(--chart-1)" },
45
+ mobile: { label: "Mobile", color: "var(--chart-2)" },
46
+ };
47
+
48
+ export const Default: Story = {
49
+ render: () => (
50
+ <ChartContainer
51
+ config={{ desktop: { label: "Desktop", color: "var(--chart-1)" } }}
52
+ className="h-48 w-[420px]"
53
+ >
54
+ <BarChart
55
+ data={[
56
+ { month: "Jan", desktop: 186 },
57
+ { month: "Feb", desktop: 305 },
58
+ { month: "Mar", desktop: 237 },
59
+ ]}
60
+ >
61
+ <CartesianGrid vertical={false} />
62
+ <XAxis dataKey="month" tickLine={false} axisLine={false} />
63
+ <ChartTooltip content={<ChartTooltipContent />} />
64
+ <Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
65
+ </BarChart>
66
+ </ChartContainer>
67
+ ),
68
+ };
69
+
70
+ export const Variant_Line: Story = {
71
+ render: () => (
72
+ <ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]">
73
+ <LineChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
74
+ <CartesianGrid vertical={false} />
75
+ <XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
76
+ <YAxis tickLine={false} axisLine={false} width={32} />
77
+ <ChartTooltip content={<ChartTooltipContent />} />
78
+ <Line type="monotone" dataKey="desktop" stroke="var(--color-desktop)" strokeWidth={2} dot={false} />
79
+ <Line type="monotone" dataKey="mobile" stroke="var(--color-mobile)" strokeWidth={2} dot={false} />
80
+ </LineChart>
81
+ </ChartContainer>
82
+ ),
83
+ };
84
+
85
+ export const Variant_Area: Story = {
86
+ render: () => (
87
+ <ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]">
88
+ <AreaChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
89
+ <defs>
90
+ <linearGradient id="fillDesktop" x1="0" y1="0" x2="0" y2="1">
91
+ <stop offset="5%" stopColor="var(--color-desktop)" stopOpacity={0.45} />
92
+ <stop offset="95%" stopColor="var(--color-desktop)" stopOpacity={0.05} />
93
+ </linearGradient>
94
+ <linearGradient id="fillMobile" x1="0" y1="0" x2="0" y2="1">
95
+ <stop offset="5%" stopColor="var(--color-mobile)" stopOpacity={0.45} />
96
+ <stop offset="95%" stopColor="var(--color-mobile)" stopOpacity={0.05} />
97
+ </linearGradient>
98
+ </defs>
99
+ <CartesianGrid vertical={false} />
100
+ <XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
101
+ <ChartTooltip content={<ChartTooltipContent />} />
102
+ <Area dataKey="desktop" type="monotone" fill="url(#fillDesktop)" stroke="var(--color-desktop)" strokeWidth={2} />
103
+ <Area dataKey="mobile" type="monotone" fill="url(#fillMobile)" stroke="var(--color-mobile)" strokeWidth={2} />
104
+ </AreaChart>
105
+ </ChartContainer>
106
+ ),
107
+ };
108
+
109
+ export const Variant_Radar: Story = {
110
+ render: () => (
111
+ <ChartContainer config={twoSeriesConfig} className="h-72 w-[520px]">
112
+ <RadarChart
113
+ data={[
114
+ { axis: "Mon", desktop: 186, mobile: 80 },
115
+ { axis: "Tue", desktop: 305, mobile: 200 },
116
+ { axis: "Wed", desktop: 237, mobile: 120 },
117
+ { axis: "Thu", desktop: 73, mobile: 190 },
118
+ { axis: "Fri", desktop: 209, mobile: 130 },
119
+ { axis: "Sat", desktop: 214, mobile: 140 },
120
+ { axis: "Sun", desktop: 290, mobile: 240 },
121
+ ]}
122
+ >
123
+ <PolarGrid />
124
+ <PolarAngleAxis dataKey="axis" />
125
+ <ChartTooltip content={<ChartTooltipContent />} />
126
+ <Radar dataKey="desktop" stroke="var(--color-desktop)" fill="var(--color-desktop)" fillOpacity={0.2} />
127
+ <Radar dataKey="mobile" stroke="var(--color-mobile)" fill="var(--color-mobile)" fillOpacity={0.2} />
128
+ </RadarChart>
129
+ </ChartContainer>
130
+ ),
131
+ };
132
+
133
+ export const Variant_WithReferenceDot: Story = {
134
+ render: () => (
135
+ <ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]">
136
+ <LineChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
137
+ <CartesianGrid vertical={false} />
138
+ <XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
139
+ <YAxis tickLine={false} axisLine={false} width={32} />
140
+ <ChartTooltip content={<ChartTooltipContent />} />
141
+ <Line type="monotone" dataKey="desktop" stroke="var(--color-desktop)" strokeWidth={2} dot={false} />
142
+ <ReferenceDot x="Feb" y={305} r={6} fill="var(--color-desktop)" stroke="var(--background)" strokeWidth={2} />
143
+ </LineChart>
144
+ </ChartContainer>
145
+ ),
146
+ };
147
+
148
+ export const Variant_NoAnimation: Story = {
149
+ render: () => (
150
+ <ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]" animate={false}>
151
+ <LineChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
152
+ <CartesianGrid vertical={false} />
153
+ <XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
154
+ <ChartTooltip content={<ChartTooltipContent />} />
155
+ <Line type="monotone" dataKey="desktop" stroke="var(--color-desktop)" strokeWidth={2} dot={false} />
156
+ <Line type="monotone" dataKey="mobile" stroke="var(--color-mobile)" strokeWidth={2} dot={false} />
157
+ </LineChart>
158
+ </ChartContainer>
159
+ ),
160
+ };
161
+
162
+ export const RealisticUse: Story = {
163
+ render: () => (
164
+ <ChartContainer config={twoSeriesConfig} className="h-64 w-[520px]">
165
+ <BarChart data={monthlyData}>
166
+ <CartesianGrid vertical={false} />
167
+ <XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
168
+ <ChartTooltip content={<ChartTooltipContent />} />
169
+ <Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
170
+ <Bar dataKey="mobile" fill="var(--color-mobile)" radius={4} />
171
+ </BarChart>
172
+ </ChartContainer>
173
+ ),
174
+ };
@@ -0,0 +1,32 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Checkbox } from "@behavioral-agentic-design-system/core/components/ui/checkbox";
3
+ import { Label } from "@behavioral-agentic-design-system/core/components/ui/label";
4
+
5
+ const meta: Meta<typeof Checkbox> = {
6
+ title: "Components/Checkbox",
7
+ component: Checkbox,
8
+ parameters: { layout: "centered" },
9
+ tags: ["autodocs"],
10
+ };
11
+
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+
15
+ export const Default: Story = {
16
+ render: () => (<div className="flex items-center gap-2">
17
+ <Checkbox id="terms" defaultChecked />
18
+ <Label htmlFor="terms">I agree to the terms</Label>
19
+ </div>),
20
+ };
21
+
22
+ export const Disabled: Story = {
23
+ args: { disabled: true, "aria-label": "I agree to the terms" } as any,
24
+ };
25
+
26
+ export const RealisticUse: Story = {
27
+ render: () => (<div className="flex items-center gap-2">
28
+ <Checkbox id="terms-realistic" defaultChecked />
29
+ <Label htmlFor="terms-realistic">I agree to the terms</Label>
30
+ </div>),
31
+ };
32
+
@@ -0,0 +1,136 @@
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import * as React from "react"
3
+ import { CircularProgress } from "@behavioral-agentic-design-system/core/components/ui/circular-progress"
4
+
5
+ const meta: Meta<typeof CircularProgress> = {
6
+ title: "Components/CircularProgress",
7
+ component: CircularProgress,
8
+ parameters: {
9
+ layout: "centered",
10
+ docs: {
11
+ description: {
12
+ component:
13
+ "SVG ring progress indicator. Determinate (value 0–100) animates strokeDashoffset via var(--duration-base) + var(--ease-out). Indeterminate (no value) spins via animate-spin. role=progressbar with aria-valuenow/min/max satisfies WCAG 2.1 1.3.1. Not interactive — target-size n/a.",
14
+ },
15
+ },
16
+ },
17
+ }
18
+ export default meta
19
+ type Story = StoryObj<typeof CircularProgress>
20
+
21
+ export const Default: Story = {
22
+ render: () => (
23
+ <CircularProgress value={65} label="Upload progress" />
24
+ ),
25
+ }
26
+
27
+ export const Variant_Muted: Story = {
28
+ render: () => (
29
+ <CircularProgress value={40} variant="muted" label="Background task" />
30
+ ),
31
+ }
32
+
33
+ export const Variant_Success: Story = {
34
+ render: () => (
35
+ <CircularProgress value={100} variant="success" label="Complete" />
36
+ ),
37
+ }
38
+
39
+ export const Variant_Warning: Story = {
40
+ render: () => (
41
+ <CircularProgress value={55} variant="warning" label="Warning level" />
42
+ ),
43
+ }
44
+
45
+ export const Variant_Destructive: Story = {
46
+ render: () => (
47
+ <CircularProgress value={20} variant="destructive" label="Critical usage" />
48
+ ),
49
+ }
50
+
51
+ export const Size_Sm: Story = {
52
+ render: () => (
53
+ <CircularProgress value={65} size="sm" label="Small progress" />
54
+ ),
55
+ }
56
+
57
+ export const Size_Default: Story = {
58
+ render: () => (
59
+ <CircularProgress value={65} size="default" label="Default progress" />
60
+ ),
61
+ }
62
+
63
+ export const Size_Lg: Story = {
64
+ render: () => (
65
+ <CircularProgress value={65} size="lg" label="Large progress" />
66
+ ),
67
+ }
68
+
69
+ export const Indeterminate: Story = {
70
+ render: () => (
71
+ <CircularProgress label="Loading…" />
72
+ ),
73
+ }
74
+
75
+ export const WithCenterLabel: Story = {
76
+ render: () => (
77
+ <CircularProgress value={72} size="lg" label="Storage usage: 72%">
78
+ <span className="text-xs font-semibold">72%</span>
79
+ </CircularProgress>
80
+ ),
81
+ }
82
+
83
+ export const AllSizes: Story = {
84
+ render: () => (
85
+ <div className="flex items-center gap-6">
86
+ <CircularProgress value={65} size="sm" label="sm" />
87
+ <CircularProgress value={65} size="default" label="default" />
88
+ <CircularProgress value={65} size="lg" label="lg" />
89
+ </div>
90
+ ),
91
+ }
92
+
93
+ export const AllVariants: Story = {
94
+ render: () => (
95
+ <div className="flex items-center gap-6">
96
+ <CircularProgress value={65} variant="default" label="default" />
97
+ <CircularProgress value={65} variant="muted" label="muted" />
98
+ <CircularProgress value={100} variant="success" label="success" />
99
+ <CircularProgress value={55} variant="warning" label="warning" />
100
+ <CircularProgress value={20} variant="destructive" label="destructive" />
101
+ </div>
102
+ ),
103
+ }
104
+
105
+ export const RealisticUse: Story = {
106
+ render: () => {
107
+ const [value, setValue] = React.useState(0)
108
+ React.useEffect(() => {
109
+ const interval = setInterval(() => {
110
+ setValue((v) => {
111
+ if (v >= 100) {
112
+ clearInterval(interval)
113
+ return 100
114
+ }
115
+ return v + 5
116
+ })
117
+ }, 200)
118
+ return () => clearInterval(interval)
119
+ }, [])
120
+ return (
121
+ <div className="flex flex-col items-center gap-4">
122
+ <CircularProgress
123
+ value={value}
124
+ size="lg"
125
+ label={`Upload progress: ${value}%`}
126
+ variant={value === 100 ? "success" : "default"}
127
+ >
128
+ <span className="text-xs font-semibold">{value}%</span>
129
+ </CircularProgress>
130
+ <p className="text-sm text-muted-foreground">
131
+ {value === 100 ? "Upload complete" : "Uploading…"}
132
+ </p>
133
+ </div>
134
+ )
135
+ },
136
+ }