@behavioral-agentic-design-system/core 0.42.0 → 0.47.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 +38 -8
- package/scripts/a11y-lint.cjs +101 -14
- package/scripts/bads-sync.mjs +1 -1
- package/scripts/build-tokens.cjs +122 -7
- package/scripts/check-dark-contrast.mjs +204 -0
- package/scripts/check-flush-edges.mjs +245 -0
- package/scripts/check-spec.mjs +73 -0
- package/scripts/deal-directions.mjs +186 -0
- package/scripts/design-system-advisory/README.md +239 -0
- package/scripts/design-system-advisory/check-copy-punctuation.mjs +44 -0
- package/scripts/design-system-advisory/check-even-padding.mjs +35 -0
- package/scripts/design-system-advisory/check-hand-built-button.mjs +46 -0
- package/scripts/design-system-advisory/check-html-nesting.mjs +51 -0
- package/scripts/design-system-advisory/check-icon-sizing.mjs +79 -0
- package/scripts/design-system-advisory/check-label-case.mjs +92 -0
- package/scripts/design-system-advisory/check-native-form-controls.mjs +53 -0
- package/scripts/design-system-advisory/check-radius.mjs +56 -0
- package/scripts/design-system-advisory/check-raw-values.mjs +61 -0
- package/scripts/design-system-advisory/check-small-text.mjs +72 -0
- package/scripts/design-system-advisory/check-tap-target.mjs +70 -0
- package/scripts/design-system-advisory/defaults.mjs +90 -0
- package/scripts/design-system-advisory/fixtures/clean.tsx.fixture +12 -0
- package/scripts/design-system-advisory/fixtures/violations.tsx.fixture +19 -0
- package/scripts/design-system-advisory/lib.mjs +255 -0
- package/scripts/design-system-advisory/run.mjs +189 -0
- package/scripts/design-system-advisory/workflow.yml +82 -0
- package/scripts/health-report.mjs +20 -14
- package/scripts/lib/copy-strings.mjs +146 -0
- package/scripts/lib/counted-lint.mjs +100 -0
- package/scripts/lib/dark-contrast.mjs +120 -0
- package/scripts/lib/flush-edges.mjs +294 -0
- package/scripts/lib/lab-lint.mjs +62 -0
- package/scripts/lib/marketing-library.mjs +129 -0
- package/scripts/lib/mount-page.mjs +25 -0
- package/scripts/lib/on-system.mjs +249 -0
- package/scripts/lib/random.mjs +22 -0
- package/scripts/lib/source-scan.mjs +173 -0
- package/scripts/lib/spec-parse.d.mts +25 -0
- package/scripts/lib/spec-parse.mjs +188 -0
- package/scripts/lib/tells.mjs +366 -0
- package/scripts/lint-arbitrary-tokens.mjs +47 -0
- package/scripts/lint-component-token-refs.mjs +63 -0
- package/scripts/lint-content-hierarchy.mjs +114 -0
- package/scripts/lint-control-baseline.mjs +72 -0
- package/scripts/lint-copy-punctuation.mjs +60 -0
- package/scripts/lint-css-vars.mjs +175 -0
- package/scripts/lint-even-padding.mjs +58 -0
- package/scripts/lint-html-nesting.mjs +116 -0
- package/scripts/lint-label-case.mjs +219 -0
- package/scripts/lint-live-ctas.mjs +138 -0
- package/scripts/lint-microanimation.mjs +2 -2
- package/scripts/lint-proximity.mjs +181 -0
- package/scripts/lint-slop.mjs +1 -1
- package/scripts/lint-spacing-scale.mjs +78 -0
- package/scripts/lint-target-size.cjs +132 -0
- package/scripts/lint-token-primitives.mjs +307 -0
- package/scripts/on-system-score.mjs +95 -0
- package/scripts/size-audit.cjs +2 -2
- package/scripts/slop-rules.mjs +1 -1
- package/scripts/source-images.mjs +180 -0
- package/scripts/ux-tells.mjs +80 -0
- package/scripts/wcag-audit.cjs +25 -4
- package/src/api/brand-colors.ts +3 -0
- package/src/api/brand-fonts.ts +3 -0
- package/src/api/brand-mark.ts +6 -1
- package/src/api/dev-write-guard.ts +53 -0
- package/src/api/layers/file.ts +9 -4
- package/src/api/onboarding-extract.ts +85 -30
- package/src/api/onboarding.ts +3 -0
- package/src/api/save-tokens.ts +3 -0
- package/src/api/site-auth.ts +14 -2
- package/src/app/layout.tsx +6 -0
- package/src/app/preview/canvas/page.tsx +12 -0
- package/src/app/preview/components/page.tsx +828 -14
- package/src/app/preview/sticker-sheet/page.tsx +329 -0
- package/src/app/preview/sticker-sheet/specimens.tsx +296 -0
- package/src/app/preview/studio/blank-screen.tsx +143 -0
- package/src/app/preview/studio/page.tsx +7 -0
- package/src/app/shell.tsx +164 -47
- package/src/components/Foundations/Colors.stories.tsx +119 -8
- package/src/components/canvas/canvas.tsx +458 -0
- package/src/components/canvas/layout.ts +72 -0
- package/src/components/canvas/parse-canvas.ts +32 -0
- package/src/components/canvas/sample.ts +90 -0
- package/src/components/canvas/spec-frame.tsx +43 -0
- package/src/components/canvas/types.ts +33 -0
- package/src/components/docs-tab.tsx +7 -7
- package/src/components/home-recent.tsx +73 -0
- package/src/components/home-tab.tsx +19 -14
- package/src/components/layers-tab.tsx +2 -2
- package/src/components/markdown-preview.tsx +60 -12
- package/src/components/onboarding-wizard.tsx +1 -1
- package/src/components/studio/control-panel.tsx +299 -0
- package/src/components/studio/control-row.tsx +77 -0
- package/src/components/studio/preview-frame.tsx +165 -0
- package/src/components/studio/preview-pane.tsx +247 -0
- package/src/components/studio/studio.tsx +133 -128
- package/src/components/studio/types.ts +218 -0
- package/src/components/studio/use-studio-tweaks.ts +128 -0
- package/src/components/studio/use-studio-view-state.ts +72 -0
- package/src/components/ui/autocomplete.tsx +1 -1
- package/src/components/ui/avatar.tsx +4 -0
- package/src/components/ui/chart.tsx +134 -42
- package/src/components/ui/checkbox-group.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/color-picker.tsx +20 -4
- package/src/components/ui/combobox.tsx +1 -0
- package/src/components/ui/command.tsx +1 -1
- package/src/components/ui/data-table.tsx +64 -3
- package/src/components/ui/date-field.tsx +1 -1
- package/src/components/ui/date-picker.tsx +2 -0
- package/src/components/ui/date-range-picker.tsx +4 -0
- package/src/components/ui/editable.tsx +1 -0
- package/src/components/ui/faceted-filter.tsx +187 -0
- package/src/components/ui/file-upload.tsx +21 -2
- package/src/components/ui/gauge-chart.tsx +18 -4
- package/src/components/ui/heatmap.tsx +3 -1
- package/src/components/ui/inline-edit.tsx +175 -0
- package/src/components/ui/input-group.tsx +5 -2
- package/src/components/ui/month-picker.tsx +1 -1
- package/src/components/ui/multi-select.tsx +1 -0
- package/src/components/ui/number-input.tsx +28 -5
- package/src/components/ui/otp-input.tsx +208 -0
- package/src/components/ui/phone-input.tsx +274 -0
- package/src/components/ui/radio-group.tsx +2 -2
- package/src/components/ui/search-input.tsx +1 -1
- package/src/components/ui/sparkline.tsx +33 -4
- package/src/components/ui/spinner.tsx +23 -4
- package/src/components/ui/table.tsx +9 -0
- package/src/components/ui/tags-input.tsx +1 -1
- package/src/components/ui/timer.tsx +1 -0
- package/src/components/ui/transfer-list.tsx +13 -26
- package/src/components/ui/week-picker.tsx +1 -13
- package/src/components/ui/year-picker.tsx +1 -1
- package/src/data/component-added.json +966 -0
- package/src/data/docs-index.ts +35 -2
- package/src/data/history.json +161 -161
- package/src/data/sticker-sheet.json +9244 -0
- package/src/docs-trace-globs.json +1 -0
- package/src/hooks/use-global-mono-font.ts +1 -0
- package/src/hooks/use-global-primary-color.ts +1 -0
- package/src/hooks/use-global-sans-font.ts +1 -0
- package/src/hooks/use-global-serif-font.ts +1 -0
- package/src/hooks/use-global-type-scale.ts +17 -2
- package/src/hooks/use-mobile.ts +2 -0
- package/src/hooks/use-sync-type-scale.ts +7 -11
- package/src/lib/chart-motion.ts +41 -0
- package/src/lib/get-icon-color.ts +1 -1
- package/src/lib/spec-parse.ts +4 -0
- package/src/lib/svg-sanitize.ts +19 -9
- package/src/stories/Accordion.stories.tsx +7 -0
- package/src/stories/ActionBar.stories.tsx +5 -0
- package/src/stories/Affix.stories.tsx +4 -0
- package/src/stories/AiBadge.stories.tsx +9 -7
- package/src/stories/Alert.stories.tsx +13 -0
- package/src/stories/AlertDialog.stories.tsx +4 -0
- package/src/stories/Anchor.stories.tsx +5 -0
- package/src/stories/AngleSlider.stories.tsx +6 -3
- package/src/stories/AspectRatio.stories.tsx +4 -0
- package/src/stories/Autocomplete.stories.tsx +8 -0
- package/src/stories/Avatar.stories.tsx +10 -0
- package/src/stories/Badge.stories.tsx +14 -6
- package/src/stories/Blockquote.stories.tsx +6 -0
- package/src/stories/BottomNavigation.stories.tsx +4 -0
- package/src/stories/Breadcrumb.stories.tsx +3 -0
- package/src/stories/Burger.stories.tsx +1 -0
- package/src/stories/Button.stories.tsx +24 -0
- package/src/stories/ButtonGroup.stories.tsx +9 -0
- package/src/stories/Calendar.stories.tsx +3 -0
- package/src/stories/Canvas.stories.tsx +45 -0
- package/src/stories/Card.stories.tsx +4 -0
- package/src/stories/Carousel.stories.tsx +6 -0
- package/src/stories/Cascader.stories.tsx +4 -0
- package/src/stories/Chart.stories.tsx +46 -1
- package/src/stories/ChatBubble.stories.tsx +8 -2
- package/src/stories/ChatMarker.stories.tsx +1 -0
- package/src/stories/Checkbox.stories.tsx +40 -0
- package/src/stories/CheckboxCard.stories.tsx +8 -0
- package/src/stories/CheckboxGroup.stories.tsx +19 -0
- package/src/stories/Chip.stories.tsx +10 -19
- package/src/stories/CircularProgress.stories.tsx +13 -27
- package/src/stories/Clipboard.stories.tsx +6 -0
- package/src/stories/CloseButton.stories.tsx +6 -4
- package/src/stories/Code.stories.tsx +8 -1
- package/src/stories/Collapsible.stories.tsx +2 -0
- package/src/stories/ColorPicker.stories.tsx +46 -0
- package/src/stories/ColorSwatch.stories.tsx +1 -0
- package/src/stories/Combobox.stories.tsx +9 -0
- package/src/stories/Command.stories.tsx +2 -0
- package/src/stories/Container.stories.tsx +8 -0
- package/src/stories/ContextMenu.stories.tsx +9 -0
- package/src/stories/CopyButton.stories.tsx +12 -36
- package/src/stories/DataList.stories.tsx +8 -0
- package/src/stories/DataTable.stories.tsx +39 -0
- package/src/stories/DateField.stories.tsx +28 -0
- package/src/stories/DatePicker.stories.tsx +34 -0
- package/src/stories/DateRangePicker.stories.tsx +32 -0
- package/src/stories/Dialog.stories.tsx +8 -0
- package/src/stories/Drawer.stories.tsx +6 -0
- package/src/stories/DropdownMenu.stories.tsx +2 -0
- package/src/stories/Editable.stories.tsx +12 -0
- package/src/stories/EmptyState.stories.tsx +9 -0
- package/src/stories/FacetedFilter.stories.tsx +197 -0
- package/src/stories/Field.stories.tsx +7 -0
- package/src/stories/Fieldset.stories.tsx +8 -0
- package/src/stories/FileButton.stories.tsx +4 -0
- package/src/stories/FileUpload.stories.tsx +16 -17
- package/src/stories/FloatLabel.stories.tsx +3 -8
- package/src/stories/FloatingActionButton.stories.tsx +10 -0
- package/src/stories/FloatingIndicator.stories.tsx +4 -0
- package/src/stories/FloatingPanel.stories.tsx +6 -0
- package/src/stories/FocusTrap.stories.tsx +5 -0
- package/src/stories/FormatByte.stories.tsx +6 -0
- package/src/stories/FormatDate.stories.tsx +8 -0
- package/src/stories/FormatNumber.stories.tsx +9 -0
- package/src/stories/GaugeChart.stories.tsx +9 -3
- package/src/stories/Heatmap.stories.tsx +11 -0
- package/src/stories/Highlight.stories.tsx +6 -0
- package/src/stories/HoverCard.stories.tsx +4 -0
- package/src/stories/Image.stories.tsx +9 -0
- package/src/stories/Indicator.stories.tsx +19 -0
- package/src/stories/InlineEdit.stories.tsx +106 -0
- package/src/stories/Input.stories.tsx +7 -0
- package/src/stories/InputClearButton.stories.tsx +3 -0
- package/src/stories/InputGroup.stories.tsx +40 -0
- package/src/stories/Kbd.stories.tsx +7 -1
- package/src/stories/KeyboardShortcut.stories.tsx +2 -0
- package/src/stories/Label.stories.tsx +2 -0
- package/src/stories/Link.stories.tsx +9 -0
- package/src/stories/List.stories.tsx +8 -0
- package/src/stories/Listbox.stories.tsx +1 -0
- package/src/stories/LoadingDots.stories.tsx +5 -3
- package/src/stories/LoadingOverlay.stories.tsx +5 -1
- package/src/stories/Mark.stories.tsx +5 -0
- package/src/stories/MarkdownPreview.stories.tsx +53 -0
- package/src/stories/Marquee.stories.tsx +4 -0
- package/src/stories/Masonry.stories.tsx +5 -0
- package/src/stories/Menubar.stories.tsx +3 -0
- package/src/stories/Meter.stories.tsx +11 -17
- package/src/stories/MonthPicker.stories.tsx +26 -1
- package/src/stories/MotionToggle.stories.tsx +1 -0
- package/src/stories/MultiSelect.stories.tsx +9 -0
- package/src/stories/NativeSelect.stories.tsx +1 -0
- package/src/stories/NavLink.stories.tsx +7 -0
- package/src/stories/NavigationMenu.stories.tsx +5 -0
- package/src/stories/NavigationRail.stories.tsx +10 -0
- package/src/stories/Notification.stories.tsx +13 -34
- package/src/stories/NumberInput.stories.tsx +33 -1
- package/src/stories/OtpInput.stories.tsx +110 -0
- package/src/stories/Overlay.stories.tsx +5 -1
- package/src/stories/Pagination.stories.tsx +8 -0
- package/src/stories/PasswordInput.stories.tsx +2 -0
- package/src/stories/PhoneInput.stories.tsx +127 -0
- package/src/stories/PinInput.stories.tsx +9 -2
- package/src/stories/Popover.stories.tsx +2 -0
- package/src/stories/Progress.stories.tsx +6 -1
- package/src/stories/Prose.stories.tsx +8 -0
- package/src/stories/QrCode.stories.tsx +2 -0
- package/src/stories/Questionnaire.stories.tsx +7 -0
- package/src/stories/RadioGroup.stories.tsx +40 -0
- package/src/stories/RatingGroup.stories.tsx +8 -4
- package/src/stories/Resizable.stories.tsx +4 -2
- package/src/stories/Result.stories.tsx +3 -0
- package/src/stories/Reveal.stories.tsx +2 -0
- package/src/stories/RollingNumber.stories.tsx +5 -0
- package/src/stories/ScrollArea.stories.tsx +3 -1
- package/src/stories/SearchInput.stories.tsx +10 -6
- package/src/stories/SegmentedControl.stories.tsx +11 -0
- package/src/stories/Select.stories.tsx +7 -0
- package/src/stories/Separator.stories.tsx +6 -0
- package/src/stories/Sheet.stories.tsx +5 -0
- package/src/stories/Sidebar.stories.tsx +40 -1
- package/src/stories/SimpleGrid.stories.tsx +5 -0
- package/src/stories/Skeleton.stories.tsx +8 -0
- package/src/stories/SkeletonTable.stories.tsx +6 -5
- package/src/stories/SkipLink.stories.tsx +3 -0
- package/src/stories/Slider.stories.tsx +2 -1
- package/src/stories/Sonner.stories.tsx +7 -0
- package/src/stories/Sparkline.stories.tsx +14 -1
- package/src/stories/Spinner.stories.tsx +20 -10
- package/src/stories/Spoiler.stories.tsx +5 -0
- package/src/stories/Squircle.stories.tsx +7 -0
- package/src/stories/Stack.stories.tsx +7 -0
- package/src/stories/StatusBadge.stories.tsx +12 -6
- package/src/stories/Stepper.stories.tsx +5 -0
- package/src/stories/Switch.stories.tsx +4 -0
- package/src/stories/Table.stories.tsx +10 -1
- package/src/stories/Tabs.stories.tsx +8 -0
- package/src/stories/Tag.stories.tsx +13 -5
- package/src/stories/TagsInput.stories.tsx +15 -0
- package/src/stories/Text.stories.tsx +12 -0
- package/src/stories/Textarea.stories.tsx +9 -0
- package/src/stories/ThemeIcon.stories.tsx +6 -3
- package/src/stories/TimePicker.stories.tsx +2 -0
- package/src/stories/Timeline.stories.tsx +12 -0
- package/src/stories/Timer.stories.tsx +30 -0
- package/src/stories/Toggle.stories.tsx +7 -5
- package/src/stories/ToggleGroup.stories.tsx +5 -0
- package/src/stories/ToggleTip.stories.tsx +4 -0
- package/src/stories/Toolbar.stories.tsx +6 -0
- package/src/stories/Tooltip.stories.tsx +3 -0
- package/src/stories/Tour.stories.tsx +3 -0
- package/src/stories/TransferList.stories.tsx +7 -0
- package/src/stories/TreeSelect.stories.tsx +4 -0
- package/src/stories/TreeView.stories.tsx +5 -0
- package/src/stories/TypingIndicator.stories.tsx +4 -0
- package/src/stories/VisuallyHidden.stories.tsx +3 -0
- package/src/stories/Watermark.stories.tsx +6 -0
- package/src/stories/WeekPicker.stories.tsx +25 -1
- package/src/stories/WordRotate.stories.tsx +5 -0
- package/src/stories/YearPicker.stories.tsx +26 -11
- package/src/stories/story-groups.json +22 -16
- package/src/styles.css +50 -2
- package/src/tokens.json +86 -58
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// ChartContainer's dot-
|
|
1
|
+
// ChartContainer's dot-entrance keyframe + per-series --color-* custom
|
|
2
2
|
// properties are generated per instance via a raw <style> tag scoped to a
|
|
3
3
|
// runtime [data-chart=<id>] selector — see the escape-hatch note on that
|
|
4
4
|
// <style> element in chart.tsx for why (scripts/lint-inline-styles.mjs).
|
|
5
5
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
6
|
+
import { expect, waitFor } from "storybook/test";
|
|
6
7
|
import {
|
|
7
8
|
ChartContainer,
|
|
8
9
|
ChartTooltip,
|
|
@@ -50,6 +51,7 @@ const twoSeriesConfig = {
|
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
export const Default: Story = {
|
|
54
|
+
parameters: { controls: { disable: true } },
|
|
53
55
|
render: () => (
|
|
54
56
|
<ChartContainer
|
|
55
57
|
config={{ desktop: { label: "Desktop", color: "var(--chart-1)" } }}
|
|
@@ -72,6 +74,7 @@ export const Default: Story = {
|
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
export const Variant_Line: Story = {
|
|
77
|
+
parameters: { controls: { disable: true } },
|
|
75
78
|
render: () => (
|
|
76
79
|
<ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]">
|
|
77
80
|
<LineChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
|
|
@@ -87,6 +90,7 @@ export const Variant_Line: Story = {
|
|
|
87
90
|
};
|
|
88
91
|
|
|
89
92
|
export const Variant_Area: Story = {
|
|
93
|
+
parameters: { controls: { disable: true } },
|
|
90
94
|
render: () => (
|
|
91
95
|
<ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]">
|
|
92
96
|
<AreaChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
|
|
@@ -111,6 +115,7 @@ export const Variant_Area: Story = {
|
|
|
111
115
|
};
|
|
112
116
|
|
|
113
117
|
export const Variant_Radar: Story = {
|
|
118
|
+
parameters: { controls: { disable: true } },
|
|
114
119
|
render: () => (
|
|
115
120
|
<ChartContainer config={twoSeriesConfig} className="h-72 w-[520px]">
|
|
116
121
|
<RadarChart
|
|
@@ -135,6 +140,7 @@ export const Variant_Radar: Story = {
|
|
|
135
140
|
};
|
|
136
141
|
|
|
137
142
|
export const Variant_WithReferenceDot: Story = {
|
|
143
|
+
parameters: { controls: { disable: true } },
|
|
138
144
|
render: () => (
|
|
139
145
|
<ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]">
|
|
140
146
|
<LineChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
|
|
@@ -149,11 +155,49 @@ export const Variant_WithReferenceDot: Story = {
|
|
|
149
155
|
),
|
|
150
156
|
};
|
|
151
157
|
|
|
158
|
+
// Point dots wait for the stroke. Recharts mounts every dot at its final
|
|
159
|
+
// position as soon as the series mounts, but the line takes the whole draw
|
|
160
|
+
// (5 x --duration-slow) to reach them, so ChartContainer holds the series
|
|
161
|
+
// dots until the draw has finished and then fades them in over
|
|
162
|
+
// --duration-slow. The hover activeDot is never delayed, and reduced-motion
|
|
163
|
+
// users get the dots immediately with no fade.
|
|
164
|
+
export const Variant_LineWithDots: Story = {
|
|
165
|
+
parameters: { controls: { disable: true } },
|
|
166
|
+
tags: ["test"],
|
|
167
|
+
render: () => (
|
|
168
|
+
<ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]">
|
|
169
|
+
<LineChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
|
|
170
|
+
<CartesianGrid vertical={false} />
|
|
171
|
+
<XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
|
|
172
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
173
|
+
<Line type="monotone" dataKey="desktop" stroke="var(--color-desktop)" strokeWidth={2} dot={{ fill: "var(--color-desktop)" }} activeDot={{ r: 5 }} />
|
|
174
|
+
<Line type="monotone" dataKey="mobile" stroke="var(--color-mobile)" strokeWidth={2} dot={{ fill: "var(--color-mobile)" }} activeDot={{ r: 5 }} />
|
|
175
|
+
</LineChart>
|
|
176
|
+
</ChartContainer>
|
|
177
|
+
),
|
|
178
|
+
play: async ({ canvasElement }) => {
|
|
179
|
+
// Every series dot is held until the line has drawn all the way in, and
|
|
180
|
+
// all six months end up visible.
|
|
181
|
+
await waitFor(() => {
|
|
182
|
+
const dots = canvasElement.querySelectorAll(".recharts-line-dots .recharts-dot");
|
|
183
|
+
expect(dots.length).toBe(monthlyData.length * 2);
|
|
184
|
+
});
|
|
185
|
+
const reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
186
|
+
const dot = canvasElement.querySelector(".recharts-line-dots .recharts-dot") as Element;
|
|
187
|
+
if (!reduced) {
|
|
188
|
+
const delay = parseFloat(getComputedStyle(dot).animationDelay) * 1000;
|
|
189
|
+
expect(delay).toBeGreaterThanOrEqual(1000);
|
|
190
|
+
}
|
|
191
|
+
await waitFor(() => expect(Number(getComputedStyle(dot).opacity)).toBe(1), { timeout: 4000 });
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
|
|
152
195
|
// `animate={false}` freezes the chart at its final frame on demand. It is the
|
|
153
196
|
// same output reduced-motion users get automatically: ChartContainer reads the
|
|
154
197
|
// shared `useReducedMotion` hook (hooks/use-reduced-motion) and drops the
|
|
155
198
|
// entrance for them regardless of this prop.
|
|
156
199
|
export const Variant_NoAnimation: Story = {
|
|
200
|
+
parameters: { controls: { disable: true } },
|
|
157
201
|
render: () => (
|
|
158
202
|
<ChartContainer config={twoSeriesConfig} className="h-56 w-[520px]" animate={false}>
|
|
159
203
|
<LineChart data={monthlyData} margin={{ top: 8, right: 16, left: 8, bottom: 0 }}>
|
|
@@ -168,6 +212,7 @@ export const Variant_NoAnimation: Story = {
|
|
|
168
212
|
};
|
|
169
213
|
|
|
170
214
|
export const RealisticUse: Story = {
|
|
215
|
+
parameters: { controls: { disable: true } },
|
|
171
216
|
render: () => (
|
|
172
217
|
<ChartContainer config={twoSeriesConfig} className="h-64 w-[520px]">
|
|
173
218
|
<BarChart data={monthlyData}>
|
|
@@ -63,6 +63,7 @@ const THREAD = [
|
|
|
63
63
|
];
|
|
64
64
|
|
|
65
65
|
export const Default: Story = {
|
|
66
|
+
parameters: { controls: { disable: true } },
|
|
66
67
|
render: () => (
|
|
67
68
|
<div className="w-full max-w-md">
|
|
68
69
|
<ChatBubble position="received">
|
|
@@ -75,6 +76,7 @@ export const Default: Story = {
|
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
export const Variant_Sent: Story = {
|
|
79
|
+
parameters: { controls: { disable: true } },
|
|
78
80
|
render: () => (
|
|
79
81
|
<div className="w-full max-w-md">
|
|
80
82
|
<ChatBubble position="sent">
|
|
@@ -87,6 +89,7 @@ export const Variant_Sent: Story = {
|
|
|
87
89
|
};
|
|
88
90
|
|
|
89
91
|
export const Variant_Received: Story = {
|
|
92
|
+
parameters: { controls: { disable: true } },
|
|
90
93
|
render: () => (
|
|
91
94
|
<div className="w-full max-w-md">
|
|
92
95
|
<ChatBubble position="received">
|
|
@@ -100,7 +103,7 @@ export const Variant_Received: Story = {
|
|
|
100
103
|
};
|
|
101
104
|
|
|
102
105
|
export const Variant_Typing: Story = {
|
|
103
|
-
parameters: {
|
|
106
|
+
parameters: { controls: { disable: true },
|
|
104
107
|
docs: {
|
|
105
108
|
description: {
|
|
106
109
|
story:
|
|
@@ -119,6 +122,7 @@ export const Variant_Typing: Story = {
|
|
|
119
122
|
};
|
|
120
123
|
|
|
121
124
|
export const WithAvatar: Story = {
|
|
125
|
+
parameters: { controls: { disable: true } },
|
|
122
126
|
render: () => (
|
|
123
127
|
<div className="w-full max-w-md">
|
|
124
128
|
<ChatBubble position="received">
|
|
@@ -133,6 +137,7 @@ export const WithAvatar: Story = {
|
|
|
133
137
|
};
|
|
134
138
|
|
|
135
139
|
export const WithReadReceipt: Story = {
|
|
140
|
+
parameters: { controls: { disable: true } },
|
|
136
141
|
render: () => (
|
|
137
142
|
<div className="w-full max-w-md space-y-3">
|
|
138
143
|
{(["sent", "delivered", "read"] as const).map((status) => (
|
|
@@ -153,7 +158,7 @@ export const WithReadReceipt: Story = {
|
|
|
153
158
|
};
|
|
154
159
|
|
|
155
160
|
export const WithActions: Story = {
|
|
156
|
-
parameters: {
|
|
161
|
+
parameters: { controls: { disable: true },
|
|
157
162
|
docs: {
|
|
158
163
|
description: {
|
|
159
164
|
story:
|
|
@@ -185,6 +190,7 @@ export const WithActions: Story = {
|
|
|
185
190
|
};
|
|
186
191
|
|
|
187
192
|
export const RealisticUse: Story = {
|
|
193
|
+
parameters: { controls: { disable: true } },
|
|
188
194
|
render: () => (
|
|
189
195
|
<div
|
|
190
196
|
role="log"
|
|
@@ -40,6 +40,7 @@ export const Variant_Divider: Story = {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export const RealisticUse: Story = {
|
|
43
|
+
parameters: { controls: { disable: true } },
|
|
43
44
|
render: () => (
|
|
44
45
|
<div className="flex w-72 flex-col gap-1 rounded-lg border bg-card p-4">
|
|
45
46
|
<div className="rounded-lg bg-muted px-3 py-2 text-sm">
|
|
@@ -24,6 +24,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
24
24
|
// verified by eye here; this note is the regression guard. Do not remove the
|
|
25
25
|
// `before:*` hit-area utilities without a replacement that keeps the target 44px.
|
|
26
26
|
export const Default: Story = {
|
|
27
|
+
parameters: { controls: { disable: true } },
|
|
27
28
|
render: () => (<div className="flex items-center gap-2">
|
|
28
29
|
<Checkbox id="terms" defaultChecked />
|
|
29
30
|
<Label htmlFor="terms">I agree to the terms</Label>
|
|
@@ -35,6 +36,7 @@ export const Default: Story = {
|
|
|
35
36
|
// aria-checked="mixed" Radix announces). Regression guard for the 2026-07-11
|
|
36
37
|
// CheckboxGroup build's checkbox.tsx indicator fix.
|
|
37
38
|
export const Indeterminate: Story = {
|
|
39
|
+
parameters: { controls: { disable: true } },
|
|
38
40
|
render: () => (
|
|
39
41
|
<div className="flex items-center gap-2">
|
|
40
42
|
<Checkbox id="indeterminate" checked="indeterminate" />
|
|
@@ -56,6 +58,7 @@ export const Disabled: Story = {
|
|
|
56
58
|
* Hit area is 44px in every size (WCAG 2.2 SC 2.5.5 AAA pointer target).
|
|
57
59
|
*/
|
|
58
60
|
export const Size_Sm: Story = {
|
|
61
|
+
parameters: { controls: { disable: true } },
|
|
59
62
|
render: () => (
|
|
60
63
|
<div className="flex items-center gap-2">
|
|
61
64
|
<Checkbox id="size-sm" size="sm" defaultChecked />
|
|
@@ -65,6 +68,7 @@ export const Size_Sm: Story = {
|
|
|
65
68
|
};
|
|
66
69
|
|
|
67
70
|
export const Size_Default: Story = {
|
|
71
|
+
parameters: { controls: { disable: true } },
|
|
68
72
|
render: () => (
|
|
69
73
|
<div className="flex items-center gap-2">
|
|
70
74
|
<Checkbox id="size-default" defaultChecked />
|
|
@@ -74,6 +78,7 @@ export const Size_Default: Story = {
|
|
|
74
78
|
};
|
|
75
79
|
|
|
76
80
|
export const Size_Lg: Story = {
|
|
81
|
+
parameters: { controls: { disable: true } },
|
|
77
82
|
render: () => (
|
|
78
83
|
<div className="space-y-3">
|
|
79
84
|
<div className="flex items-center gap-3">
|
|
@@ -89,6 +94,7 @@ export const Size_Lg: Story = {
|
|
|
89
94
|
};
|
|
90
95
|
|
|
91
96
|
export const Sizes: Story = {
|
|
97
|
+
parameters: { controls: { disable: true } },
|
|
92
98
|
render: () => (
|
|
93
99
|
<div className="space-y-3">
|
|
94
100
|
<div className="flex items-center gap-2">
|
|
@@ -108,6 +114,7 @@ export const Sizes: Story = {
|
|
|
108
114
|
};
|
|
109
115
|
|
|
110
116
|
export const RealisticUse: Story = {
|
|
117
|
+
parameters: { controls: { disable: true } },
|
|
111
118
|
render: () => (
|
|
112
119
|
<div className="space-y-4">
|
|
113
120
|
<div className="flex items-center gap-2">
|
|
@@ -133,3 +140,36 @@ export const RealisticUse: Story = {
|
|
|
133
140
|
),
|
|
134
141
|
};
|
|
135
142
|
|
|
143
|
+
|
|
144
|
+
// Regression story for the unchecked box painting solid white on a dark
|
|
145
|
+
// surface (it was hard-coded bg-white). The `dark` class scopes the dark token
|
|
146
|
+
// set to this wrapper, so it renders the same way in light-mode Storybook.
|
|
147
|
+
export const OnDarkSurface: Story = {
|
|
148
|
+
parameters: { controls: { disable: true } },
|
|
149
|
+
render: () => (
|
|
150
|
+
<div className="dark rounded-lg bg-background p-6 text-foreground">
|
|
151
|
+
<div className="flex flex-col gap-3">
|
|
152
|
+
<div className="flex items-center gap-2">
|
|
153
|
+
<Checkbox id="dark-unchecked" />
|
|
154
|
+
<Label htmlFor="dark-unchecked">Unchecked</Label>
|
|
155
|
+
</div>
|
|
156
|
+
<div className="flex items-center gap-2">
|
|
157
|
+
<Checkbox id="dark-checked" defaultChecked />
|
|
158
|
+
<Label htmlFor="dark-checked">Checked</Label>
|
|
159
|
+
</div>
|
|
160
|
+
<div className="flex items-center gap-2">
|
|
161
|
+
<Checkbox id="dark-indeterminate" checked="indeterminate" />
|
|
162
|
+
<Label htmlFor="dark-indeterminate">Indeterminate</Label>
|
|
163
|
+
</div>
|
|
164
|
+
<div className="flex items-center gap-2">
|
|
165
|
+
<Checkbox id="dark-disabled" disabled />
|
|
166
|
+
<Label htmlFor="dark-disabled">Disabled</Label>
|
|
167
|
+
</div>
|
|
168
|
+
<div className="flex items-center gap-2">
|
|
169
|
+
<Checkbox id="dark-invalid" aria-invalid />
|
|
170
|
+
<Label htmlFor="dark-invalid">Invalid</Label>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
),
|
|
175
|
+
};
|
|
@@ -23,6 +23,7 @@ export default meta;
|
|
|
23
23
|
type Story = StoryObj<typeof CheckboxCard>;
|
|
24
24
|
|
|
25
25
|
export const Default: Story = {
|
|
26
|
+
parameters: { controls: { disable: true } },
|
|
26
27
|
render: () => (
|
|
27
28
|
<CheckboxCard className="w-72">
|
|
28
29
|
<span className="text-sm font-medium text-foreground">
|
|
@@ -36,6 +37,7 @@ export const Default: Story = {
|
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
export const Checked: Story = {
|
|
40
|
+
parameters: { controls: { disable: true } },
|
|
39
41
|
render: () => (
|
|
40
42
|
<CheckboxCard checked className="w-72">
|
|
41
43
|
<span className="text-sm font-medium text-foreground">
|
|
@@ -51,6 +53,7 @@ export const Checked: Story = {
|
|
|
51
53
|
// Size stories omit explicit text-* on children so the card's inherited base
|
|
52
54
|
// font size is what renders — that is the size prop doing its job.
|
|
53
55
|
export const Size_Sm: Story = {
|
|
56
|
+
parameters: { controls: { disable: true } },
|
|
54
57
|
render: () => (
|
|
55
58
|
<CheckboxCard size="sm" className="w-72">
|
|
56
59
|
<span className="font-medium text-foreground">Orphan-token sweep</span>
|
|
@@ -62,6 +65,7 @@ export const Size_Sm: Story = {
|
|
|
62
65
|
};
|
|
63
66
|
|
|
64
67
|
export const Size_Default: Story = {
|
|
68
|
+
parameters: { controls: { disable: true } },
|
|
65
69
|
render: () => (
|
|
66
70
|
<CheckboxCard size="default" className="w-72">
|
|
67
71
|
<span className="font-medium text-foreground">Orphan-token sweep</span>
|
|
@@ -73,6 +77,7 @@ export const Size_Default: Story = {
|
|
|
73
77
|
};
|
|
74
78
|
|
|
75
79
|
export const Size_Lg: Story = {
|
|
80
|
+
parameters: { controls: { disable: true } },
|
|
76
81
|
render: () => (
|
|
77
82
|
<CheckboxCard size="lg" className="w-80">
|
|
78
83
|
<span className="font-medium text-foreground">Orphan-token sweep</span>
|
|
@@ -84,6 +89,7 @@ export const Size_Lg: Story = {
|
|
|
84
89
|
};
|
|
85
90
|
|
|
86
91
|
export const Disabled: Story = {
|
|
92
|
+
parameters: { controls: { disable: true } },
|
|
87
93
|
render: () => (
|
|
88
94
|
<CheckboxCard disabled className="w-72">
|
|
89
95
|
<span className="text-sm font-medium text-foreground">
|
|
@@ -97,6 +103,7 @@ export const Disabled: Story = {
|
|
|
97
103
|
};
|
|
98
104
|
|
|
99
105
|
export const RadioCard_Default: Story = {
|
|
106
|
+
parameters: { controls: { disable: true } },
|
|
100
107
|
render: () => (
|
|
101
108
|
<RadioCard name="plan-single" value="pro" className="w-72">
|
|
102
109
|
<span className="text-sm font-medium text-foreground">Pro</span>
|
|
@@ -108,6 +115,7 @@ export const RadioCard_Default: Story = {
|
|
|
108
115
|
};
|
|
109
116
|
|
|
110
117
|
export const RadioCard_Checked: Story = {
|
|
118
|
+
parameters: { controls: { disable: true } },
|
|
111
119
|
render: () => (
|
|
112
120
|
<RadioCard checked name="plan-single-checked" value="pro" className="w-72">
|
|
113
121
|
<span className="text-sm font-medium text-foreground">Pro</span>
|
|
@@ -44,6 +44,7 @@ const itemRow = (
|
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
export const Default: Story = {
|
|
47
|
+
parameters: { controls: { disable: true } },
|
|
47
48
|
render: () => (
|
|
48
49
|
<CheckboxGroup
|
|
49
50
|
aria-label="Notification preferences"
|
|
@@ -58,6 +59,7 @@ export const Default: Story = {
|
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
export const Disabled: Story = {
|
|
62
|
+
parameters: { controls: { disable: true } },
|
|
61
63
|
render: () => (
|
|
62
64
|
<div className="flex w-72 flex-col gap-6">
|
|
63
65
|
<div className="flex flex-col gap-2">
|
|
@@ -140,6 +142,23 @@ export const Controlled: Story = {
|
|
|
140
142
|
},
|
|
141
143
|
};
|
|
142
144
|
|
|
145
|
+
// A label wider than the box must truncate inside the group, not widen it.
|
|
146
|
+
export const LongLabelInNarrowBox: Story = {
|
|
147
|
+
parameters: { controls: { disable: true } },
|
|
148
|
+
render: () => (
|
|
149
|
+
<div className="w-[240px] rounded-md border p-3">
|
|
150
|
+
<CheckboxGroup aria-label="Notify">
|
|
151
|
+
<div className="flex min-w-0 items-center gap-3">
|
|
152
|
+
<CheckboxGroupItem value="weekly-digest" id="long-1" />
|
|
153
|
+
<Label htmlFor="long-1" className="min-w-0 truncate" title="Send me a weekly digest of every change to the finance and procurement workspace">
|
|
154
|
+
Send me a weekly digest of every change to the finance and procurement workspace
|
|
155
|
+
</Label>
|
|
156
|
+
</div>
|
|
157
|
+
</CheckboxGroup>
|
|
158
|
+
</div>
|
|
159
|
+
),
|
|
160
|
+
};
|
|
161
|
+
|
|
143
162
|
export const RealisticUse: Story = {
|
|
144
163
|
render: function RealisticUseStory() {
|
|
145
164
|
const [value, setValue] = React.useState<string[]>([
|
|
@@ -27,14 +27,15 @@ export default meta;
|
|
|
27
27
|
type Story = StoryObj<typeof Chip>;
|
|
28
28
|
|
|
29
29
|
export const Default: Story = {
|
|
30
|
-
|
|
30
|
+
args: { children: "design tokens" },
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export const Selected: Story = {
|
|
34
|
-
|
|
34
|
+
args: { defaultSelected: true, children: "design tokens" },
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export const Variant_Default: Story = {
|
|
38
|
+
parameters: { controls: { disable: true } },
|
|
38
39
|
render: () => (
|
|
39
40
|
<div className="flex flex-wrap gap-2">
|
|
40
41
|
<Chip variant="default">a11y contract</Chip>
|
|
@@ -46,6 +47,7 @@ export const Variant_Default: Story = {
|
|
|
46
47
|
};
|
|
47
48
|
|
|
48
49
|
export const Variant_Outline: Story = {
|
|
50
|
+
parameters: { controls: { disable: true } },
|
|
49
51
|
render: () => (
|
|
50
52
|
<div className="flex flex-wrap gap-2">
|
|
51
53
|
<Chip variant="outline">visual regression</Chip>
|
|
@@ -57,26 +59,19 @@ export const Variant_Outline: Story = {
|
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
export const Size_Sm: Story = {
|
|
60
|
-
|
|
61
|
-
<Chip size="sm" defaultSelected>
|
|
62
|
-
token drift
|
|
63
|
-
</Chip>
|
|
64
|
-
),
|
|
62
|
+
args: { size: "sm", defaultSelected: true, children: "token drift" },
|
|
65
63
|
};
|
|
66
64
|
|
|
67
65
|
export const Size_Default: Story = {
|
|
68
|
-
|
|
66
|
+
args: { defaultSelected: true, children: "token drift" },
|
|
69
67
|
};
|
|
70
68
|
|
|
71
69
|
export const Size_Lg: Story = {
|
|
72
|
-
|
|
73
|
-
<Chip size="lg" defaultSelected>
|
|
74
|
-
token drift
|
|
75
|
-
</Chip>
|
|
76
|
-
),
|
|
70
|
+
args: { size: "lg", defaultSelected: true, children: "token drift" },
|
|
77
71
|
};
|
|
78
72
|
|
|
79
73
|
export const WithIcon: Story = {
|
|
74
|
+
parameters: { controls: { disable: true } },
|
|
80
75
|
render: () => (
|
|
81
76
|
<div className="flex flex-wrap gap-2">
|
|
82
77
|
<Chip icon={<Palette strokeWidth={1.5} />}>design tokens</Chip>
|
|
@@ -88,15 +83,11 @@ export const WithIcon: Story = {
|
|
|
88
83
|
};
|
|
89
84
|
|
|
90
85
|
export const Disabled: Story = {
|
|
91
|
-
|
|
86
|
+
args: { disabled: true, children: "forced colors" },
|
|
92
87
|
};
|
|
93
88
|
|
|
94
89
|
export const DisabledSelected: Story = {
|
|
95
|
-
|
|
96
|
-
<Chip disabled defaultSelected>
|
|
97
|
-
forced colors
|
|
98
|
-
</Chip>
|
|
99
|
-
),
|
|
90
|
+
args: { disabled: true, defaultSelected: true, children: "forced colors" },
|
|
100
91
|
};
|
|
101
92
|
|
|
102
93
|
export const Controlled: Story = {
|
|
@@ -19,63 +19,46 @@ export default meta
|
|
|
19
19
|
type Story = StoryObj<typeof CircularProgress>
|
|
20
20
|
|
|
21
21
|
export const Default: Story = {
|
|
22
|
-
|
|
23
|
-
<CircularProgress value={65} label="Upload progress" />
|
|
24
|
-
),
|
|
22
|
+
args: { value: 65, label: "Upload progress" },
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
export const Variant_Muted: Story = {
|
|
28
|
-
|
|
29
|
-
<CircularProgress value={40} variant="muted" label="Background task" />
|
|
30
|
-
),
|
|
26
|
+
args: { value: 40, variant: "muted", label: "Background task" },
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
// success/warning now paint the real oklch token: the class was
|
|
34
30
|
// text-[hsl(var(--success))] — hsl() wrapping an oklch value is invalid CSS and
|
|
35
31
|
// silently fell back — fixed to text-[var(--success)] (2026-07-24 paydown).
|
|
36
32
|
export const Variant_Success: Story = {
|
|
37
|
-
|
|
38
|
-
<CircularProgress value={100} variant="success" label="Complete" />
|
|
39
|
-
),
|
|
33
|
+
args: { value: 100, variant: "success", label: "Complete" },
|
|
40
34
|
}
|
|
41
35
|
|
|
42
36
|
export const Variant_Warning: Story = {
|
|
43
|
-
|
|
44
|
-
<CircularProgress value={55} variant="warning" label="Warning level" />
|
|
45
|
-
),
|
|
37
|
+
args: { value: 55, variant: "warning", label: "Warning level" },
|
|
46
38
|
}
|
|
47
39
|
|
|
48
40
|
export const Variant_Destructive: Story = {
|
|
49
|
-
|
|
50
|
-
<CircularProgress value={20} variant="destructive" label="Critical usage" />
|
|
51
|
-
),
|
|
41
|
+
args: { value: 20, variant: "destructive", label: "Critical usage" },
|
|
52
42
|
}
|
|
53
43
|
|
|
54
44
|
export const Size_Sm: Story = {
|
|
55
|
-
|
|
56
|
-
<CircularProgress value={65} size="sm" label="Small progress" />
|
|
57
|
-
),
|
|
45
|
+
args: { value: 65, size: "sm", label: "Small progress" },
|
|
58
46
|
}
|
|
59
47
|
|
|
60
48
|
export const Size_Default: Story = {
|
|
61
|
-
|
|
62
|
-
<CircularProgress value={65} size="default" label="Default progress" />
|
|
63
|
-
),
|
|
49
|
+
args: { value: 65, size: "default", label: "Default progress" },
|
|
64
50
|
}
|
|
65
51
|
|
|
66
52
|
export const Size_Lg: Story = {
|
|
67
|
-
|
|
68
|
-
<CircularProgress value={65} size="lg" label="Large progress" />
|
|
69
|
-
),
|
|
53
|
+
args: { value: 65, size: "lg", label: "Large progress" },
|
|
70
54
|
}
|
|
71
55
|
|
|
72
56
|
export const Indeterminate: Story = {
|
|
73
|
-
|
|
74
|
-
<CircularProgress label="Loading…" />
|
|
75
|
-
),
|
|
57
|
+
args: { label: "Loading…" },
|
|
76
58
|
}
|
|
77
59
|
|
|
78
60
|
export const WithCenterLabel: Story = {
|
|
61
|
+
parameters: { controls: { disable: true } },
|
|
79
62
|
render: () => (
|
|
80
63
|
<CircularProgress value={72} size="lg" label="Storage usage: 72%">
|
|
81
64
|
<span className="text-xs font-semibold">72%</span>
|
|
@@ -92,6 +75,7 @@ export const WithCenterLabel: Story = {
|
|
|
92
75
|
*/
|
|
93
76
|
export const AllSizes: Story = {
|
|
94
77
|
tags: ["!manifest"],
|
|
78
|
+
parameters: { controls: { disable: true } },
|
|
95
79
|
render: () => (
|
|
96
80
|
<div className="flex items-center gap-6">
|
|
97
81
|
<CircularProgress value={65} size="sm" label="sm" />
|
|
@@ -110,6 +94,7 @@ export const AllSizes: Story = {
|
|
|
110
94
|
*/
|
|
111
95
|
export const AllVariants: Story = {
|
|
112
96
|
tags: ["!manifest"],
|
|
97
|
+
parameters: { controls: { disable: true } },
|
|
113
98
|
render: () => (
|
|
114
99
|
<div className="flex items-center gap-6">
|
|
115
100
|
<CircularProgress value={65} variant="default" label="default" />
|
|
@@ -122,6 +107,7 @@ export const AllVariants: Story = {
|
|
|
122
107
|
}
|
|
123
108
|
|
|
124
109
|
export const RealisticUse: Story = {
|
|
110
|
+
parameters: { controls: { disable: true } },
|
|
125
111
|
render: () => {
|
|
126
112
|
const [value, setValue] = React.useState(0)
|
|
127
113
|
React.useEffect(() => {
|
|
@@ -34,6 +34,7 @@ export default meta
|
|
|
34
34
|
type Story = StoryObj<typeof Clipboard>
|
|
35
35
|
|
|
36
36
|
export const Default: Story = {
|
|
37
|
+
parameters: { controls: { disable: true } },
|
|
37
38
|
render: () => (
|
|
38
39
|
<div className="w-96">
|
|
39
40
|
<Clipboard value="pk_live_5K8mN2qR7tLwYjAb4cDeFgHi">
|
|
@@ -47,6 +48,7 @@ export const Default: Story = {
|
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
export const WithLabel: Story = {
|
|
51
|
+
parameters: { controls: { disable: true } },
|
|
50
52
|
render: () => (
|
|
51
53
|
<div className="w-96">
|
|
52
54
|
<Clipboard value="https://design.bads.com/share/tokens-v2-proposal">
|
|
@@ -61,6 +63,7 @@ export const WithLabel: Story = {
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
export const LongValue: Story = {
|
|
66
|
+
parameters: { controls: { disable: true } },
|
|
64
67
|
render: () => (
|
|
65
68
|
<div className="w-80">
|
|
66
69
|
<Clipboard value="https://design.bads.com/docs/getting-started?utm_source=onboarding&utm_campaign=client-fork-2026&session=jordan.reeves">
|
|
@@ -75,6 +78,7 @@ export const LongValue: Story = {
|
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
export const IconTrigger: Story = {
|
|
81
|
+
parameters: { controls: { disable: true } },
|
|
78
82
|
render: () => (
|
|
79
83
|
<div className="w-96">
|
|
80
84
|
<Clipboard value="npm install @behavioral-agentic-design-system/core">
|
|
@@ -89,6 +93,7 @@ export const IconTrigger: Story = {
|
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
export const Disabled: Story = {
|
|
96
|
+
parameters: { controls: { disable: true } },
|
|
92
97
|
render: () => (
|
|
93
98
|
<div className="w-96">
|
|
94
99
|
<Clipboard value="pk_live_5K8mN2qR7tLwYjAb4cDeFgHi" disabled>
|
|
@@ -103,6 +108,7 @@ export const Disabled: Story = {
|
|
|
103
108
|
}
|
|
104
109
|
|
|
105
110
|
export const RealisticUse: Story = {
|
|
111
|
+
parameters: { controls: { disable: true } },
|
|
106
112
|
render: () => {
|
|
107
113
|
const secretKey = "sk-proj-Xk9mNpQ2vR7tLwYjAb4cDeFgHiJkLmNo" // gitleaks:allow
|
|
108
114
|
return (
|
|
@@ -13,10 +13,11 @@ const meta: Meta<typeof CloseButton> = {
|
|
|
13
13
|
export default meta;
|
|
14
14
|
|
|
15
15
|
export const Default: StoryObj = {
|
|
16
|
-
|
|
16
|
+
args: { },
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export const Sizes: StoryObj = {
|
|
20
|
+
parameters: { controls: { disable: true } },
|
|
20
21
|
render: () => (
|
|
21
22
|
<div className="flex items-center gap-3">
|
|
22
23
|
{(["icon-xs", "icon-sm", "icon", "icon-lg", "icon-xl"] as const).map(
|
|
@@ -32,18 +33,19 @@ export const Sizes: StoryObj = {
|
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
export const Variant_Outline: StoryObj = {
|
|
35
|
-
|
|
36
|
+
args: { variant: "outline" },
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
export const Variant_Secondary: StoryObj = {
|
|
39
|
-
|
|
40
|
+
args: { variant: "secondary" },
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
export const Disabled: StoryObj = {
|
|
43
|
-
|
|
44
|
+
args: { disabled: true },
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
export const RealisticUse: StoryObj = {
|
|
48
|
+
parameters: { controls: { disable: true } },
|
|
47
49
|
render: () => (
|
|
48
50
|
<div className="flex w-96 items-start justify-between gap-3 rounded-lg border border-border bg-card p-4">
|
|
49
51
|
<div className="min-w-0">
|