@behavioral-agentic-design-system/core 0.18.0 → 0.21.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.
- package/package.json +1 -1
- package/src/app/preview/components/page.tsx +247 -234
- package/src/app/shell.tsx +57 -4
- package/src/components/onboarding-wizard.tsx +1 -1
- package/src/components/ui/color-picker.tsx +454 -74
- package/src/stories/Accordion.stories.tsx +12 -9
- package/src/stories/ButtonGroup.stories.tsx +16 -16
- package/src/stories/ColorPicker.stories.tsx +53 -1
- package/src/stories/DatePicker.stories.tsx +2 -2
- package/src/stories/EmptyState.stories.tsx +21 -21
- package/src/stories/List.stories.tsx +28 -28
- package/src/stories/RatingGroup.stories.tsx +2 -2
- package/src/stories/SegmentedControl.stories.tsx +3 -3
- package/src/stories/TagsInput.stories.tsx +21 -21
- package/src/stories/Timeline.stories.tsx +50 -50
|
@@ -37,10 +37,10 @@ type Story = StoryObj<typeof ButtonGroup>
|
|
|
37
37
|
|
|
38
38
|
export const Default: Story = {
|
|
39
39
|
render: () => (
|
|
40
|
-
<ButtonGroup aria-label="
|
|
41
|
-
<Button variant="outline">All
|
|
42
|
-
<Button variant="outline">
|
|
43
|
-
<Button variant="outline">
|
|
40
|
+
<ButtonGroup aria-label="Component filter">
|
|
41
|
+
<Button variant="outline">All</Button>
|
|
42
|
+
<Button variant="outline">Published</Button>
|
|
43
|
+
<Button variant="outline">Draft</Button>
|
|
44
44
|
</ButtonGroup>
|
|
45
45
|
),
|
|
46
46
|
}
|
|
@@ -63,21 +63,21 @@ export const WithIcons: Story = {
|
|
|
63
63
|
|
|
64
64
|
export const Vertical: Story = {
|
|
65
65
|
render: () => (
|
|
66
|
-
<ButtonGroup orientation="vertical" aria-label="
|
|
67
|
-
<Button variant="outline">
|
|
68
|
-
<Button variant="outline">
|
|
69
|
-
<Button variant="outline">
|
|
70
|
-
<Button variant="outline">
|
|
66
|
+
<ButtonGroup orientation="vertical" aria-label="Design system views">
|
|
67
|
+
<Button variant="outline">Figma</Button>
|
|
68
|
+
<Button variant="outline">Storybook</Button>
|
|
69
|
+
<Button variant="outline">Code</Button>
|
|
70
|
+
<Button variant="outline">Tokens</Button>
|
|
71
71
|
</ButtonGroup>
|
|
72
72
|
),
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export const Variant_Default: Story = {
|
|
76
76
|
render: () => (
|
|
77
|
-
<ButtonGroup aria-label="
|
|
78
|
-
<Button variant="default">
|
|
79
|
-
<Button variant="default">
|
|
80
|
-
<Button variant="default">
|
|
77
|
+
<ButtonGroup aria-label="Release channel">
|
|
78
|
+
<Button variant="default">Stable</Button>
|
|
79
|
+
<Button variant="default">Beta</Button>
|
|
80
|
+
<Button variant="default">Alpha</Button>
|
|
81
81
|
</ButtonGroup>
|
|
82
82
|
),
|
|
83
83
|
}
|
|
@@ -155,15 +155,15 @@ export const RealisticUse: Story = {
|
|
|
155
155
|
|
|
156
156
|
{/* Reaction row */}
|
|
157
157
|
<div className="space-y-1.5">
|
|
158
|
-
<p className="text-xs font-medium text-muted-foreground">
|
|
159
|
-
<ButtonGroup aria-label="Rate this
|
|
158
|
+
<p className="text-xs font-medium text-muted-foreground">Feedback</p>
|
|
159
|
+
<ButtonGroup aria-label="Rate this component">
|
|
160
160
|
<Button variant="outline">
|
|
161
161
|
<ThumbsUpIcon strokeWidth={1.5} />
|
|
162
162
|
Helpful
|
|
163
163
|
</Button>
|
|
164
164
|
<Button variant="outline">
|
|
165
165
|
<ThumbsDownIcon strokeWidth={1.5} />
|
|
166
|
-
|
|
166
|
+
Not helpful
|
|
167
167
|
</Button>
|
|
168
168
|
<Button variant="outline">
|
|
169
169
|
<ShareIcon strokeWidth={1.5} />
|
|
@@ -46,6 +46,58 @@ export const WithCustomInput: Story = {
|
|
|
46
46
|
),
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
+
// Selection is shown by an offset ring (radio convention), not a checkmark —
|
|
50
|
+
// a check reads as a multi-select checkbox, but swatches are single-select.
|
|
51
|
+
export const Selected: Story = {
|
|
52
|
+
render: () => (
|
|
53
|
+
<ColorPicker
|
|
54
|
+
swatches={BRAND_SWATCHES}
|
|
55
|
+
defaultValue="#8b5cf6"
|
|
56
|
+
aria-label="A color is selected"
|
|
57
|
+
/>
|
|
58
|
+
),
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const AddViaWheel: Story = {
|
|
62
|
+
render: function AddViaWheelPicker() {
|
|
63
|
+
const [color, setColor] = React.useState("#8b5cf6");
|
|
64
|
+
return (
|
|
65
|
+
<div className="space-y-3">
|
|
66
|
+
<p className="text-xs text-muted-foreground">
|
|
67
|
+
Click the dashed <span className="font-medium text-foreground">+</span> tile to open the
|
|
68
|
+
color wheel and add a custom swatch.
|
|
69
|
+
</p>
|
|
70
|
+
<ColorPicker
|
|
71
|
+
value={color}
|
|
72
|
+
onValueChange={setColor}
|
|
73
|
+
wheel
|
|
74
|
+
swatches={BRAND_SWATCHES}
|
|
75
|
+
aria-label="Pick a swatch or add a custom color"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const AddOnlyWheel: Story = {
|
|
83
|
+
render: function AddOnlyPicker() {
|
|
84
|
+
const [color, setColor] = React.useState("");
|
|
85
|
+
return (
|
|
86
|
+
<div className="space-y-3">
|
|
87
|
+
<p className="text-xs text-muted-foreground">
|
|
88
|
+
No presets — build the palette from scratch with the <span className="font-medium text-foreground">+</span> tile.
|
|
89
|
+
</p>
|
|
90
|
+
<ColorPicker
|
|
91
|
+
value={color}
|
|
92
|
+
onValueChange={setColor}
|
|
93
|
+
wheel
|
|
94
|
+
aria-label="Add a custom color"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
|
|
49
101
|
export const PastelPalette: Story = {
|
|
50
102
|
render: () => (
|
|
51
103
|
<ColorPicker
|
|
@@ -145,7 +197,7 @@ export const RealisticUse: Story = {
|
|
|
145
197
|
style={{ backgroundColor: tagTextColor(tagColor) }}
|
|
146
198
|
aria-hidden
|
|
147
199
|
/>
|
|
148
|
-
|
|
200
|
+
Tokens
|
|
149
201
|
</div>
|
|
150
202
|
</div>
|
|
151
203
|
</CardContent>
|
|
@@ -134,9 +134,9 @@ export const RealisticUse: Story = {
|
|
|
134
134
|
return (
|
|
135
135
|
<div className="w-[320px] space-y-4 rounded-lg border border-border bg-card p-4">
|
|
136
136
|
<div className="space-y-1">
|
|
137
|
-
<p className="text-sm font-semibold">Schedule
|
|
137
|
+
<p className="text-sm font-semibold">Schedule a release</p>
|
|
138
138
|
<p className="text-xs text-muted-foreground">
|
|
139
|
-
Choose start and end dates for the
|
|
139
|
+
Choose start and end dates for the release window
|
|
140
140
|
</p>
|
|
141
141
|
</div>
|
|
142
142
|
<div className="space-y-3">
|
|
@@ -43,9 +43,9 @@ export const Default: Story = {
|
|
|
43
43
|
<EmptyStateIcon>
|
|
44
44
|
<InboxIcon />
|
|
45
45
|
</EmptyStateIcon>
|
|
46
|
-
<EmptyStateTitle>No
|
|
46
|
+
<EmptyStateTitle>No review comments yet</EmptyStateTitle>
|
|
47
47
|
<EmptyStateDescription>
|
|
48
|
-
|
|
48
|
+
Feedback from your design reviews will show up here after your first pull request.
|
|
49
49
|
</EmptyStateDescription>
|
|
50
50
|
</EmptyState>
|
|
51
51
|
),
|
|
@@ -57,14 +57,14 @@ export const WithAction: Story = {
|
|
|
57
57
|
<EmptyStateIcon>
|
|
58
58
|
<CalendarIcon />
|
|
59
59
|
</EmptyStateIcon>
|
|
60
|
-
<EmptyStateTitle>No
|
|
60
|
+
<EmptyStateTitle>No design reviews scheduled</EmptyStateTitle>
|
|
61
61
|
<EmptyStateDescription>
|
|
62
|
-
|
|
62
|
+
Schedule your first review to start tracking feedback and sign-off.
|
|
63
63
|
</EmptyStateDescription>
|
|
64
64
|
<EmptyStateAction>
|
|
65
65
|
<Button>
|
|
66
66
|
<PlusIcon strokeWidth={1.5} />
|
|
67
|
-
Schedule
|
|
67
|
+
Schedule review
|
|
68
68
|
</Button>
|
|
69
69
|
</EmptyStateAction>
|
|
70
70
|
</EmptyState>
|
|
@@ -77,16 +77,16 @@ export const WithDualActions: Story = {
|
|
|
77
77
|
<EmptyStateIcon>
|
|
78
78
|
<UsersIcon />
|
|
79
79
|
</EmptyStateIcon>
|
|
80
|
-
<EmptyStateTitle>No
|
|
80
|
+
<EmptyStateTitle>No members in this workspace</EmptyStateTitle>
|
|
81
81
|
<EmptyStateDescription>
|
|
82
|
-
|
|
82
|
+
Invite teammates individually, or import your team from your directory.
|
|
83
83
|
</EmptyStateDescription>
|
|
84
84
|
<EmptyStateAction>
|
|
85
85
|
<Button>
|
|
86
86
|
<PlusIcon strokeWidth={1.5} />
|
|
87
|
-
|
|
87
|
+
Invite member
|
|
88
88
|
</Button>
|
|
89
|
-
<Button variant="outline">Import
|
|
89
|
+
<Button variant="outline">Import team</Button>
|
|
90
90
|
</EmptyStateAction>
|
|
91
91
|
</EmptyState>
|
|
92
92
|
),
|
|
@@ -98,9 +98,9 @@ export const SearchEmpty: Story = {
|
|
|
98
98
|
<EmptyStateIcon>
|
|
99
99
|
<SearchIcon />
|
|
100
100
|
</EmptyStateIcon>
|
|
101
|
-
<EmptyStateTitle>No results for "
|
|
101
|
+
<EmptyStateTitle>No results for "date range picker"</EmptyStateTitle>
|
|
102
102
|
<EmptyStateDescription>
|
|
103
|
-
Try different keywords or check the
|
|
103
|
+
Try different keywords or check the component name spelling.
|
|
104
104
|
</EmptyStateDescription>
|
|
105
105
|
<EmptyStateAction>
|
|
106
106
|
<Button variant="outline">Clear search</Button>
|
|
@@ -115,7 +115,7 @@ export const ErrorState: Story = {
|
|
|
115
115
|
<EmptyStateIcon className="bg-destructive/10 text-destructive">
|
|
116
116
|
<WifiOffIcon />
|
|
117
117
|
</EmptyStateIcon>
|
|
118
|
-
<EmptyStateTitle>Couldn't load
|
|
118
|
+
<EmptyStateTitle>Couldn't load components</EmptyStateTitle>
|
|
119
119
|
<EmptyStateDescription>
|
|
120
120
|
Check your connection and try again. Your data is safe.
|
|
121
121
|
</EmptyStateDescription>
|
|
@@ -133,7 +133,7 @@ export const Size_Sm: Story = {
|
|
|
133
133
|
<ClipboardListIcon />
|
|
134
134
|
</EmptyStateIcon>
|
|
135
135
|
<EmptyStateTitle>No notes</EmptyStateTitle>
|
|
136
|
-
<EmptyStateDescription>Add a note to this
|
|
136
|
+
<EmptyStateDescription>Add a note to this component.</EmptyStateDescription>
|
|
137
137
|
</EmptyState>
|
|
138
138
|
),
|
|
139
139
|
}
|
|
@@ -158,9 +158,9 @@ export const Size_Lg: Story = {
|
|
|
158
158
|
<EmptyStateIcon className="size-16 [&>svg]:size-8">
|
|
159
159
|
<TrophyIcon />
|
|
160
160
|
</EmptyStateIcon>
|
|
161
|
-
<EmptyStateTitle>
|
|
161
|
+
<EmptyStateTitle>Release notes are not ready yet</EmptyStateTitle>
|
|
162
162
|
<EmptyStateDescription>
|
|
163
|
-
|
|
163
|
+
The v2.4.0 changelog will appear here once the release owner publishes it.
|
|
164
164
|
</EmptyStateDescription>
|
|
165
165
|
</EmptyState>
|
|
166
166
|
),
|
|
@@ -172,12 +172,12 @@ export const RealisticUse: Story = {
|
|
|
172
172
|
{/* Card header */}
|
|
173
173
|
<div className="px-5 py-4 border-b border-border flex items-center justify-between">
|
|
174
174
|
<div>
|
|
175
|
-
<p className="text-sm font-semibold">Upcoming
|
|
176
|
-
<p className="text-xs text-muted-foreground mt-0.5">
|
|
175
|
+
<p className="text-sm font-semibold">Upcoming releases</p>
|
|
176
|
+
<p className="text-xs text-muted-foreground mt-0.5">Aurora Design System</p>
|
|
177
177
|
</div>
|
|
178
178
|
<Button variant="outline" size="sm">
|
|
179
179
|
<PlusIcon strokeWidth={1.5} />
|
|
180
|
-
Add
|
|
180
|
+
Add release
|
|
181
181
|
</Button>
|
|
182
182
|
</div>
|
|
183
183
|
{/* Empty state body */}
|
|
@@ -185,12 +185,12 @@ export const RealisticUse: Story = {
|
|
|
185
185
|
<EmptyStateIcon>
|
|
186
186
|
<CalendarIcon />
|
|
187
187
|
</EmptyStateIcon>
|
|
188
|
-
<EmptyStateTitle>No
|
|
188
|
+
<EmptyStateTitle>No releases scheduled yet</EmptyStateTitle>
|
|
189
189
|
<EmptyStateDescription>
|
|
190
|
-
|
|
190
|
+
Plan your first release in the changelog, then track it here.
|
|
191
191
|
</EmptyStateDescription>
|
|
192
192
|
<EmptyStateAction>
|
|
193
|
-
<Button size="sm">
|
|
193
|
+
<Button size="sm">Plan a release</Button>
|
|
194
194
|
<Button variant="ghost" size="sm">Learn more</Button>
|
|
195
195
|
</EmptyStateAction>
|
|
196
196
|
</EmptyState>
|
|
@@ -32,10 +32,10 @@ type Story = StoryObj<typeof List>
|
|
|
32
32
|
export const Default: Story = {
|
|
33
33
|
render: () => (
|
|
34
34
|
<List className="w-64">
|
|
35
|
-
<ListItem>
|
|
36
|
-
<ListItem>
|
|
37
|
-
<ListItem>
|
|
38
|
-
<ListItem>
|
|
35
|
+
<ListItem>Migrate to v3 tokens</ListItem>
|
|
36
|
+
<ListItem>Review PR #142 before the release cut</ListItem>
|
|
37
|
+
<ListItem>Deprecate legacy Button variants</ListItem>
|
|
38
|
+
<ListItem>Publish Storybook to the docs site</ListItem>
|
|
39
39
|
</List>
|
|
40
40
|
),
|
|
41
41
|
}
|
|
@@ -43,11 +43,11 @@ export const Default: Story = {
|
|
|
43
43
|
export const WithIcons: Story = {
|
|
44
44
|
render: () => (
|
|
45
45
|
<List className="w-64">
|
|
46
|
-
<ListItem icon={<CheckIcon />}>
|
|
47
|
-
<ListItem icon={<CheckIcon />}>
|
|
48
|
-
<ListItem icon={<CheckIcon />}>Monthly
|
|
46
|
+
<ListItem icon={<CheckIcon />}>Design tokens included</ListItem>
|
|
47
|
+
<ListItem icon={<CheckIcon />}>Automated accessibility audits</ListItem>
|
|
48
|
+
<ListItem icon={<CheckIcon />}>Monthly release notes</ListItem>
|
|
49
49
|
<ListItem icon={<XIcon className="text-destructive" />}>
|
|
50
|
-
|
|
50
|
+
Figma sync not included
|
|
51
51
|
</ListItem>
|
|
52
52
|
</List>
|
|
53
53
|
),
|
|
@@ -57,16 +57,16 @@ export const Ordered: Story = {
|
|
|
57
57
|
render: () => (
|
|
58
58
|
<List type="ol" className="w-64">
|
|
59
59
|
<ListItem icon={<span className="font-mono text-xs text-muted-foreground select-none">01</span>}>
|
|
60
|
-
|
|
60
|
+
Sync tokens from Figma
|
|
61
61
|
</ListItem>
|
|
62
62
|
<ListItem icon={<span className="font-mono text-xs text-muted-foreground select-none">02</span>}>
|
|
63
|
-
|
|
63
|
+
Run the token build script
|
|
64
64
|
</ListItem>
|
|
65
65
|
<ListItem icon={<span className="font-mono text-xs text-muted-foreground select-none">03</span>}>
|
|
66
|
-
|
|
66
|
+
Update the component registry
|
|
67
67
|
</ListItem>
|
|
68
68
|
<ListItem icon={<span className="font-mono text-xs text-muted-foreground select-none">04</span>}>
|
|
69
|
-
|
|
69
|
+
Open a PR before the Friday release cut
|
|
70
70
|
</ListItem>
|
|
71
71
|
</List>
|
|
72
72
|
),
|
|
@@ -75,10 +75,10 @@ export const Ordered: Story = {
|
|
|
75
75
|
export const Spacing_Sm: Story = {
|
|
76
76
|
render: () => (
|
|
77
77
|
<List spacing="sm" className="w-64">
|
|
78
|
-
<ListItem icon={<ZapIcon />}>
|
|
79
|
-
<ListItem icon={<ZapIcon />}>
|
|
80
|
-
<ListItem icon={<ZapIcon />}>
|
|
81
|
-
<ListItem icon={<ZapIcon />}>
|
|
78
|
+
<ListItem icon={<ZapIcon />}>Lint tokens</ListItem>
|
|
79
|
+
<ListItem icon={<ZapIcon />}>Build styles</ListItem>
|
|
80
|
+
<ListItem icon={<ZapIcon />}>Run a11y audit</ListItem>
|
|
81
|
+
<ListItem icon={<ZapIcon />}>Publish package</ListItem>
|
|
82
82
|
</List>
|
|
83
83
|
),
|
|
84
84
|
}
|
|
@@ -107,21 +107,21 @@ export const Nested: Story = {
|
|
|
107
107
|
render: () => (
|
|
108
108
|
<List className="w-72">
|
|
109
109
|
<ListItem icon={<FileTextIcon />}>
|
|
110
|
-
<span className="font-medium">
|
|
110
|
+
<span className="font-medium">Release milestones</span>
|
|
111
111
|
<List spacing="sm" className="mt-2">
|
|
112
112
|
<ListItem icon={<CircleIcon className="size-2" />}>
|
|
113
|
-
|
|
113
|
+
Alpha: Dec to Feb
|
|
114
114
|
</ListItem>
|
|
115
115
|
<ListItem icon={<CircleIcon className="size-2" />}>
|
|
116
|
-
|
|
116
|
+
Stable: Mar to Apr
|
|
117
117
|
</ListItem>
|
|
118
118
|
</List>
|
|
119
119
|
</ListItem>
|
|
120
120
|
<ListItem icon={<FileTextIcon />}>
|
|
121
|
-
<span className="font-medium">
|
|
121
|
+
<span className="font-medium">Foundation tokens</span>
|
|
122
122
|
<List spacing="sm" className="mt-2">
|
|
123
|
-
<ListItem icon={<CircleIcon className="size-2" />}>
|
|
124
|
-
<ListItem icon={<CircleIcon className="size-2" />}>
|
|
123
|
+
<ListItem icon={<CircleIcon className="size-2" />}>Color and spacing</ListItem>
|
|
124
|
+
<ListItem icon={<CircleIcon className="size-2" />}>Typography scale</ListItem>
|
|
125
125
|
</List>
|
|
126
126
|
</ListItem>
|
|
127
127
|
</List>
|
|
@@ -132,26 +132,26 @@ export const RealisticUse: Story = {
|
|
|
132
132
|
render: () => (
|
|
133
133
|
<div className="w-80 rounded-lg border border-border bg-card p-5 space-y-4">
|
|
134
134
|
<div>
|
|
135
|
-
<h3 className="text-sm font-semibold">
|
|
135
|
+
<h3 className="text-sm font-semibold">Pro plan includes</h3>
|
|
136
136
|
<p className="text-xs text-muted-foreground mt-0.5">
|
|
137
137
|
Everything in Standard, plus:
|
|
138
138
|
</p>
|
|
139
139
|
</div>
|
|
140
140
|
<List spacing="sm">
|
|
141
141
|
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>
|
|
142
|
-
Unlimited
|
|
142
|
+
Unlimited component builds, all projects
|
|
143
143
|
</ListItem>
|
|
144
144
|
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>
|
|
145
|
-
|
|
145
|
+
Automated accessibility audits (monthly)
|
|
146
146
|
</ListItem>
|
|
147
147
|
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>
|
|
148
|
-
Priority
|
|
148
|
+
Priority Figma token sync
|
|
149
149
|
</ListItem>
|
|
150
150
|
<ListItem icon={<ShieldCheckIcon className="text-primary" />}>
|
|
151
|
-
|
|
151
|
+
Chromatic visual regression + hosting
|
|
152
152
|
</ListItem>
|
|
153
153
|
<ListItem icon={<XIcon className="text-muted-foreground" />}>
|
|
154
|
-
<span className="text-muted-foreground">
|
|
154
|
+
<span className="text-muted-foreground">Custom theming not included</span>
|
|
155
155
|
</ListItem>
|
|
156
156
|
</List>
|
|
157
157
|
</div>
|
|
@@ -70,8 +70,8 @@ export const RealisticUse: Story = {
|
|
|
70
70
|
return (
|
|
71
71
|
<div className="w-72 rounded-lg border border-border bg-card p-4 space-y-4">
|
|
72
72
|
<div className="space-y-1">
|
|
73
|
-
<p className="text-sm font-semibold">Rate
|
|
74
|
-
<p className="text-xs text-muted-foreground">
|
|
73
|
+
<p className="text-sm font-semibold">Rate this component</p>
|
|
74
|
+
<p className="text-xs text-muted-foreground">Design System · Button v2.4.0</p>
|
|
75
75
|
</div>
|
|
76
76
|
{submitted ? (
|
|
77
77
|
<div className="space-y-2">
|
|
@@ -153,7 +153,7 @@ export const FiveItems: Story = {
|
|
|
153
153
|
),
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
-
// Realistic use:
|
|
156
|
+
// Realistic use: design-system release view toggle
|
|
157
157
|
export const RealisticUse: Story = {
|
|
158
158
|
render: () => {
|
|
159
159
|
const [view, setView] = React.useState("upcoming");
|
|
@@ -161,12 +161,12 @@ export const RealisticUse: Story = {
|
|
|
161
161
|
<div className="flex flex-col gap-4 w-72">
|
|
162
162
|
<div>
|
|
163
163
|
<p className="text-xs text-muted-foreground mb-2">
|
|
164
|
-
|
|
164
|
+
Design System · Releases
|
|
165
165
|
</p>
|
|
166
166
|
<SegmentedControl
|
|
167
167
|
value={view}
|
|
168
168
|
onValueChange={setView}
|
|
169
|
-
label="
|
|
169
|
+
label="Release view"
|
|
170
170
|
>
|
|
171
171
|
<SegmentedControlItem value="upcoming">Upcoming</SegmentedControlItem>
|
|
172
172
|
<SegmentedControlItem value="past">Past</SegmentedControlItem>
|
|
@@ -39,8 +39,8 @@ export const Default: Story = {
|
|
|
39
39
|
export const WithInitialTags: Story = {
|
|
40
40
|
render: () => (
|
|
41
41
|
<Controlled
|
|
42
|
-
initialTags={["
|
|
43
|
-
placeholder="Add
|
|
42
|
+
initialTags={["accessibility", "tokens", "patterns"]}
|
|
43
|
+
placeholder="Add a topic…"
|
|
44
44
|
/>
|
|
45
45
|
),
|
|
46
46
|
};
|
|
@@ -50,7 +50,7 @@ export const WithInitialTags: Story = {
|
|
|
50
50
|
export const Disabled: Story = {
|
|
51
51
|
render: () => (
|
|
52
52
|
<Controlled
|
|
53
|
-
initialTags={["
|
|
53
|
+
initialTags={["color tokens", "spacing scale"]}
|
|
54
54
|
disabled
|
|
55
55
|
placeholder="Disabled"
|
|
56
56
|
/>
|
|
@@ -60,9 +60,9 @@ export const Disabled: Story = {
|
|
|
60
60
|
export const MaxTags: Story = {
|
|
61
61
|
render: () => (
|
|
62
62
|
<Controlled
|
|
63
|
-
initialTags={["
|
|
63
|
+
initialTags={["draft", "review"]}
|
|
64
64
|
maxTags={4}
|
|
65
|
-
placeholder="Add
|
|
65
|
+
placeholder="Add status (max 4)…"
|
|
66
66
|
/>
|
|
67
67
|
),
|
|
68
68
|
};
|
|
@@ -83,21 +83,21 @@ export const WithSuggestions: Story = {
|
|
|
83
83
|
render: () => (
|
|
84
84
|
<div className="w-80 space-y-2">
|
|
85
85
|
<p className="text-xs text-muted-foreground">
|
|
86
|
-
Type to filter — try "
|
|
86
|
+
Type to filter — try "but" or "acc"
|
|
87
87
|
</p>
|
|
88
88
|
<Controlled
|
|
89
|
-
placeholder="Add a
|
|
89
|
+
placeholder="Add a component or token…"
|
|
90
90
|
suggestions={[
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
91
|
+
"Button",
|
|
92
|
+
"Accordion",
|
|
93
|
+
"Tooltip",
|
|
94
|
+
"Dialog",
|
|
95
|
+
"Color",
|
|
96
|
+
"Spacing",
|
|
97
|
+
"Motion",
|
|
98
|
+
"Accessibility",
|
|
99
|
+
"Tokens",
|
|
100
|
+
"Storybook",
|
|
101
101
|
]}
|
|
102
102
|
/>
|
|
103
103
|
</div>
|
|
@@ -110,7 +110,7 @@ export const CommaDelimiter: Story = {
|
|
|
110
110
|
<p className="text-xs text-muted-foreground">Type and press Enter or comma to add</p>
|
|
111
111
|
<Controlled
|
|
112
112
|
delimiters={[","]}
|
|
113
|
-
placeholder="
|
|
113
|
+
placeholder="component, token, pattern…"
|
|
114
114
|
/>
|
|
115
115
|
</div>
|
|
116
116
|
),
|
|
@@ -120,15 +120,15 @@ export const Empty: Story = {
|
|
|
120
120
|
render: () => <Controlled placeholder="Type and press Enter…" />,
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
// Realistic use:
|
|
123
|
+
// Realistic use: design system docs, article tag filter
|
|
124
124
|
export const RealisticUse: Story = {
|
|
125
125
|
render: () => {
|
|
126
|
-
const [tags, setTags] = React.useState<string[]>(["
|
|
126
|
+
const [tags, setTags] = React.useState<string[]>(["Accessibility", "Tokens"]);
|
|
127
127
|
return (
|
|
128
128
|
<div className="w-96 space-y-4">
|
|
129
129
|
<div>
|
|
130
130
|
<p className="text-xs text-muted-foreground mb-1">
|
|
131
|
-
|
|
131
|
+
Design system docs · Filter articles by tag
|
|
132
132
|
</p>
|
|
133
133
|
<label className="text-sm font-medium">Active filters</label>
|
|
134
134
|
<div className="mt-1.5">
|