@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
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { OTPInput } from "@behavioral-agentic-design-system/core/components/ui/otp-input";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof OTPInput> = {
|
|
6
|
+
title: "Components/Forms/OTPInput",
|
|
7
|
+
component: OTPInput,
|
|
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: (args) => <OTPInput {...args} />,
|
|
17
|
+
args: { length: 6, numeric: true },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const Size_Sm: Story = {
|
|
21
|
+
render: (args) => <OTPInput {...args} />,
|
|
22
|
+
args: { length: 6, size: "sm" },
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Size_Default: Story = {
|
|
26
|
+
render: (args) => <OTPInput {...args} />,
|
|
27
|
+
args: { length: 6, size: "default" },
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Size_Lg: Story = {
|
|
31
|
+
render: (args) => <OTPInput {...args} />,
|
|
32
|
+
args: { length: 6, size: "lg" },
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const WithSeparator: Story = {
|
|
36
|
+
render: (args) => <OTPInput {...args} />,
|
|
37
|
+
args: { length: 6, separatorAfter: 2 },
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const FourDigit: Story = {
|
|
41
|
+
render: (args) => <OTPInput {...args} />,
|
|
42
|
+
args: { length: 4, numeric: true },
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const Alphanumeric: Story = {
|
|
46
|
+
render: (args) => <OTPInput {...args} />,
|
|
47
|
+
args: { length: 6, numeric: false },
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const Disabled: Story = {
|
|
51
|
+
render: (args) => <OTPInput {...args} />,
|
|
52
|
+
args: { length: 6, disabled: true, value: "123456" } as any,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const Invalid: Story = {
|
|
56
|
+
render: (args) => <OTPInput {...args} />,
|
|
57
|
+
args: { length: 6, invalid: true, value: "12345" } as any,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const RealisticUse: Story = {
|
|
61
|
+
parameters: { controls: { disable: true } },
|
|
62
|
+
render: () => {
|
|
63
|
+
const [value, setValue] = React.useState("");
|
|
64
|
+
const [status, setStatus] = React.useState<"idle" | "verifying" | "success" | "error">("idle");
|
|
65
|
+
|
|
66
|
+
function handleComplete(v: string) {
|
|
67
|
+
setStatus("verifying");
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
setStatus(v === "000000" ? "error" : "success");
|
|
70
|
+
}, 800);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<div className="flex flex-col items-center gap-4 text-center">
|
|
75
|
+
<div className="space-y-1">
|
|
76
|
+
<p className="text-sm font-medium text-foreground">Enter verification code</p>
|
|
77
|
+
<p className="text-sm text-muted-foreground">
|
|
78
|
+
Sent to elara.voss@designcraft.co
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
<OTPInput
|
|
82
|
+
value={value}
|
|
83
|
+
onChange={(v) => {
|
|
84
|
+
setValue(v);
|
|
85
|
+
if (status !== "idle") setStatus("idle");
|
|
86
|
+
}}
|
|
87
|
+
onComplete={handleComplete}
|
|
88
|
+
separatorAfter={2}
|
|
89
|
+
invalid={status === "error"}
|
|
90
|
+
disabled={status === "verifying" || status === "success"}
|
|
91
|
+
aria-label="Email verification code"
|
|
92
|
+
/>
|
|
93
|
+
{status === "verifying" && (
|
|
94
|
+
<p className="text-sm text-muted-foreground">Verifying…</p>
|
|
95
|
+
)}
|
|
96
|
+
{status === "success" && (
|
|
97
|
+
<p className="text-sm text-green-600 dark:text-green-400">Verified successfully</p>
|
|
98
|
+
)}
|
|
99
|
+
{status === "error" && (
|
|
100
|
+
<p className="text-sm text-destructive">Incorrect code. Try again.</p>
|
|
101
|
+
)}
|
|
102
|
+
{status === "idle" && value.length === 0 && (
|
|
103
|
+
<p className="text-xs text-muted-foreground">
|
|
104
|
+
Use <code className="rounded bg-muted px-1 py-0.5 font-mono text-xs">000000</code> to test error state
|
|
105
|
+
</p>
|
|
106
|
+
)}
|
|
107
|
+
</div>
|
|
108
|
+
);
|
|
109
|
+
},
|
|
110
|
+
};
|
|
@@ -44,6 +44,7 @@ function ShareCardBody() {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export const Default: Story = {
|
|
47
|
+
parameters: { controls: { disable: true } },
|
|
47
48
|
render: () => (
|
|
48
49
|
// The consumer wraps the frozen container in `relative`;
|
|
49
50
|
// the overlay covers that nearest positioned ancestor.
|
|
@@ -55,6 +56,7 @@ export const Default: Story = {
|
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
export const WithBlur: Story = {
|
|
59
|
+
parameters: { controls: { disable: true } },
|
|
58
60
|
render: () => (
|
|
59
61
|
<div className="relative">
|
|
60
62
|
<ShareCardBody />
|
|
@@ -82,7 +84,7 @@ function FixedDemo() {
|
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
export const Fixed: Story = {
|
|
85
|
-
parameters: { layout: "fullscreen" },
|
|
87
|
+
parameters: { controls: { disable: true }, layout: "fullscreen" },
|
|
86
88
|
render: () => (
|
|
87
89
|
<div className="p-8">
|
|
88
90
|
<p className="mb-4 text-sm text-muted-foreground">
|
|
@@ -96,6 +98,7 @@ export const Fixed: Story = {
|
|
|
96
98
|
};
|
|
97
99
|
|
|
98
100
|
export const Custom: Story = {
|
|
101
|
+
parameters: { controls: { disable: true } },
|
|
99
102
|
render: () => (
|
|
100
103
|
<div className="relative">
|
|
101
104
|
<ShareCardBody />
|
|
@@ -165,5 +168,6 @@ function RealisticUseDemo() {
|
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
export const RealisticUse: Story = {
|
|
171
|
+
parameters: { controls: { disable: true } },
|
|
168
172
|
render: () => <RealisticUseDemo />,
|
|
169
173
|
};
|
|
@@ -28,6 +28,7 @@ export default meta;
|
|
|
28
28
|
type Story = StoryObj<typeof meta>;
|
|
29
29
|
|
|
30
30
|
export const Default: Story = {
|
|
31
|
+
parameters: { controls: { disable: true } },
|
|
31
32
|
render: () => (
|
|
32
33
|
<Pagination className="w-[500px]">
|
|
33
34
|
<PaginationContent>
|
|
@@ -60,6 +61,7 @@ export const Default: Story = {
|
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
export const Variant_Compact: Story = {
|
|
64
|
+
parameters: { controls: { disable: true } },
|
|
63
65
|
render: () => (
|
|
64
66
|
<Pagination className="w-[360px]">
|
|
65
67
|
<PaginationContent>
|
|
@@ -86,6 +88,7 @@ export const Variant_Compact: Story = {
|
|
|
86
88
|
};
|
|
87
89
|
|
|
88
90
|
export const Variant_SimpleArrows: Story = {
|
|
91
|
+
parameters: { controls: { disable: true } },
|
|
89
92
|
render: () => (
|
|
90
93
|
<Pagination className="w-[260px]">
|
|
91
94
|
<PaginationContent>
|
|
@@ -106,6 +109,7 @@ export const Variant_SimpleArrows: Story = {
|
|
|
106
109
|
};
|
|
107
110
|
|
|
108
111
|
export const Disabled: Story = {
|
|
112
|
+
parameters: { controls: { disable: true } },
|
|
109
113
|
render: () => (
|
|
110
114
|
<Pagination className="w-[500px]">
|
|
111
115
|
<PaginationContent>
|
|
@@ -152,6 +156,7 @@ const MEMBERS = [
|
|
|
152
156
|
* non-CTA chrome only, not stand-alone navigation paginators.
|
|
153
157
|
*/
|
|
154
158
|
export const Size_Sm: Story = {
|
|
159
|
+
parameters: { controls: { disable: true } },
|
|
155
160
|
render: () => (
|
|
156
161
|
<Pagination size="sm" className="w-[500px]">
|
|
157
162
|
<PaginationContent>
|
|
@@ -186,6 +191,7 @@ export const Size_Sm: Story = {
|
|
|
186
191
|
* breathing room is appropriate: full-bleed article paginators, marketing pages.
|
|
187
192
|
*/
|
|
188
193
|
export const Size_Lg: Story = {
|
|
194
|
+
parameters: { controls: { disable: true } },
|
|
189
195
|
render: () => (
|
|
190
196
|
<Pagination size="lg" className="w-[560px]">
|
|
191
197
|
<PaginationContent>
|
|
@@ -217,6 +223,7 @@ export const Size_Lg: Story = {
|
|
|
217
223
|
|
|
218
224
|
/** All three sizes stacked — sm / default / lg comparison. */
|
|
219
225
|
export const Sizes: Story = {
|
|
226
|
+
parameters: { controls: { disable: true } },
|
|
220
227
|
render: () => (
|
|
221
228
|
<div className="space-y-6">
|
|
222
229
|
{(["sm", "default", "lg"] as const).map((size) => (
|
|
@@ -254,6 +261,7 @@ export const Sizes: Story = {
|
|
|
254
261
|
};
|
|
255
262
|
|
|
256
263
|
export const RealisticUse: Story = {
|
|
264
|
+
parameters: { controls: { disable: true } },
|
|
257
265
|
render: () => (
|
|
258
266
|
<div className="w-[640px] space-y-4">
|
|
259
267
|
<p className="text-sm text-muted-foreground">47 members · Page 2 of 10</p>
|
|
@@ -52,6 +52,7 @@ export const AriaInvalid: Story = {
|
|
|
52
52
|
|
|
53
53
|
export const Variant_SubmitReset: Story = {
|
|
54
54
|
name: "Variant_SubmitReset",
|
|
55
|
+
parameters: { controls: { disable: true } },
|
|
55
56
|
render: () => (
|
|
56
57
|
<form
|
|
57
58
|
className="w-80 space-y-3"
|
|
@@ -72,6 +73,7 @@ export const Variant_SubmitReset: Story = {
|
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
export const RealisticUse: Story = {
|
|
76
|
+
parameters: { controls: { disable: true } },
|
|
75
77
|
render: () => (
|
|
76
78
|
<div className="w-80 space-y-4">
|
|
77
79
|
<div className="space-y-1.5">
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { PhoneInput } from "@behavioral-agentic-design-system/core/components/ui/phone-input";
|
|
4
|
+
import {
|
|
5
|
+
Field,
|
|
6
|
+
FieldLabel,
|
|
7
|
+
FieldHelper,
|
|
8
|
+
FieldError,
|
|
9
|
+
} from "@behavioral-agentic-design-system/core/components/ui/field";
|
|
10
|
+
|
|
11
|
+
const meta: Meta<typeof PhoneInput> = {
|
|
12
|
+
title: "Components/Forms/PhoneInput",
|
|
13
|
+
component: PhoneInput,
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: "centered",
|
|
16
|
+
},
|
|
17
|
+
tags: ["autodocs"],
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
|
|
23
|
+
export const Default: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
"aria-label": "Phone number",
|
|
26
|
+
defaultCountry: "US",
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const WithValue: Story = {
|
|
31
|
+
name: "With value (controlled)",
|
|
32
|
+
parameters: { controls: { disable: true } },
|
|
33
|
+
render: () => {
|
|
34
|
+
const [phone, setPhone] = React.useState("+14155550182");
|
|
35
|
+
return (
|
|
36
|
+
<div className="w-72">
|
|
37
|
+
<PhoneInput
|
|
38
|
+
aria-label="Phone number"
|
|
39
|
+
value={phone}
|
|
40
|
+
onChange={setPhone}
|
|
41
|
+
/>
|
|
42
|
+
<p className="mt-2 text-sm text-muted-foreground">
|
|
43
|
+
E.164: <code className="font-mono">{phone || "(empty)"}</code>
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const Disabled: Story = {
|
|
51
|
+
args: {
|
|
52
|
+
"aria-label": "Phone number",
|
|
53
|
+
disabled: true,
|
|
54
|
+
defaultCountry: "GB",
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const Error: Story = {
|
|
59
|
+
name: "Error state",
|
|
60
|
+
parameters: { controls: { disable: true } },
|
|
61
|
+
render: () => (
|
|
62
|
+
<div className="w-72">
|
|
63
|
+
<Field name="phone" invalid>
|
|
64
|
+
<FieldLabel>Phone number</FieldLabel>
|
|
65
|
+
<PhoneInput id="phone" aria-label="Phone number" error defaultCountry="US" />
|
|
66
|
+
<FieldError>Please enter a valid phone number.</FieldError>
|
|
67
|
+
</Field>
|
|
68
|
+
</div>
|
|
69
|
+
),
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// Canada and the United States share +1. A controlled field must keep the country the user picked, and
|
|
73
|
+
// emit digits only: typing "(415) 555-0182" reports "+14155550182".
|
|
74
|
+
export const ControlledKeepsCountry: Story = {
|
|
75
|
+
name: "Controlled, keeps Canada, emits E.164",
|
|
76
|
+
parameters: { controls: { disable: true } },
|
|
77
|
+
render: () => {
|
|
78
|
+
const [value, setValue] = React.useState("");
|
|
79
|
+
return (
|
|
80
|
+
<div className="flex w-80 flex-col gap-3">
|
|
81
|
+
<PhoneInput aria-label="Mobile number" value={value} onChange={setValue} name="phone" />
|
|
82
|
+
<p className="text-sm text-muted-foreground">Value: {value || "empty"}</p>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const DifferentCountries: Story = {
|
|
89
|
+
name: "Different default countries",
|
|
90
|
+
parameters: { controls: { disable: true } },
|
|
91
|
+
render: () => (
|
|
92
|
+
<div className="flex w-80 flex-col gap-3">
|
|
93
|
+
<PhoneInput aria-label="UK number" defaultCountry="GB" />
|
|
94
|
+
<PhoneInput aria-label="Australian number" defaultCountry="AU" />
|
|
95
|
+
<PhoneInput aria-label="German number" defaultCountry="DE" />
|
|
96
|
+
<PhoneInput aria-label="Brazilian number" defaultCountry="BR" />
|
|
97
|
+
</div>
|
|
98
|
+
),
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const RealisticUse: Story = {
|
|
102
|
+
name: "Realistic use: account settings — Jordan Reeves",
|
|
103
|
+
parameters: { controls: { disable: true } },
|
|
104
|
+
render: () => {
|
|
105
|
+
const [phone, setPhone] = React.useState("+14155550182");
|
|
106
|
+
return (
|
|
107
|
+
<div className="w-80">
|
|
108
|
+
<Field name="phone-realistic">
|
|
109
|
+
<FieldLabel>Phone number</FieldLabel>
|
|
110
|
+
<PhoneInput
|
|
111
|
+
id="phone-realistic"
|
|
112
|
+
aria-label="Phone number"
|
|
113
|
+
value={phone}
|
|
114
|
+
onChange={setPhone}
|
|
115
|
+
defaultCountry="US"
|
|
116
|
+
/>
|
|
117
|
+
<FieldHelper>
|
|
118
|
+
Used for two-factor authentication and account recovery.
|
|
119
|
+
</FieldHelper>
|
|
120
|
+
</Field>
|
|
121
|
+
<p className="mt-3 text-xs text-muted-foreground">
|
|
122
|
+
Stored value: <code className="font-mono">{phone || "(empty)"}</code>
|
|
123
|
+
</p>
|
|
124
|
+
</div>
|
|
125
|
+
);
|
|
126
|
+
},
|
|
127
|
+
};
|
|
@@ -21,40 +21,46 @@ function Controlled(props: Omit<React.ComponentProps<typeof PinInput>, "value" |
|
|
|
21
21
|
|
|
22
22
|
// ─── Default ─────────────────────────────────────────────────────────────────
|
|
23
23
|
export const Default: Story = {
|
|
24
|
+
parameters: { controls: { disable: true } },
|
|
24
25
|
render: () => <Controlled length={6} />,
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
// ─── Size variants ────────────────────────────────────────────────────────────
|
|
28
29
|
export const Size_Sm: Story = {
|
|
30
|
+
parameters: { controls: { disable: true } },
|
|
29
31
|
render: () => <Controlled length={6} size="sm" />,
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
export const Size_Default: Story = {
|
|
35
|
+
parameters: { controls: { disable: true } },
|
|
33
36
|
render: () => <Controlled length={6} size="default" />,
|
|
34
37
|
};
|
|
35
38
|
|
|
36
39
|
export const Size_Lg: Story = {
|
|
40
|
+
parameters: { controls: { disable: true } },
|
|
37
41
|
render: () => <Controlled length={6} size="lg" />,
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
// ─── Length variant ───────────────────────────────────────────────────────────
|
|
41
45
|
export const Length_4: Story = {
|
|
46
|
+
parameters: { controls: { disable: true } },
|
|
42
47
|
render: () => <Controlled length={4} />,
|
|
43
48
|
name: "4-digit PIN",
|
|
44
49
|
};
|
|
45
50
|
|
|
46
51
|
// ─── Disabled ─────────────────────────────────────────────────────────────────
|
|
47
52
|
export const Disabled: Story = {
|
|
48
|
-
|
|
53
|
+
args: { length: 6, value: "4", disabled: true },
|
|
49
54
|
};
|
|
50
55
|
|
|
51
56
|
// ─── Invalid ──────────────────────────────────────────────────────────────────
|
|
52
57
|
export const Invalid: Story = {
|
|
53
|
-
|
|
58
|
+
args: { length: 6, value: "123456", "aria-invalid": true },
|
|
54
59
|
};
|
|
55
60
|
|
|
56
61
|
// ─── Password type ────────────────────────────────────────────────────────────
|
|
57
62
|
export const Type_Password: Story = {
|
|
63
|
+
parameters: { controls: { disable: true } },
|
|
58
64
|
render: () => <Controlled length={4} type="password" aria-label="Enter 4-digit PIN" />,
|
|
59
65
|
name: "Password (PIN)",
|
|
60
66
|
};
|
|
@@ -132,5 +138,6 @@ function VerifyEmail() {
|
|
|
132
138
|
}
|
|
133
139
|
|
|
134
140
|
export const RealisticUse: Story = {
|
|
141
|
+
parameters: { controls: { disable: true } },
|
|
135
142
|
render: () => <VerifyEmail />,
|
|
136
143
|
};
|
|
@@ -19,6 +19,7 @@ export default meta;
|
|
|
19
19
|
type Story = StoryObj<typeof meta>;
|
|
20
20
|
|
|
21
21
|
export const Default: Story = {
|
|
22
|
+
parameters: { controls: { disable: true } },
|
|
22
23
|
render: () => (<Popover>
|
|
23
24
|
<PopoverTrigger asChild><Button variant="outline">Open popover</Button></PopoverTrigger>
|
|
24
25
|
<PopoverContent className="w-64">
|
|
@@ -55,6 +56,7 @@ export const Variant_WithArrow: Story = {
|
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
export const RealisticUse: Story = {
|
|
59
|
+
parameters: { controls: { disable: true } },
|
|
58
60
|
render: () => (<Popover>
|
|
59
61
|
<PopoverTrigger asChild><Button variant="outline">Open popover</Button></PopoverTrigger>
|
|
60
62
|
<PopoverContent showArrow className="w-64">
|
|
@@ -7,7 +7,7 @@ import { Progress } from "@behavioral-agentic-design-system/core/components/ui/p
|
|
|
7
7
|
* storybook rule, plus one story per new prop surface (label / showValue).
|
|
8
8
|
* Track surface uses `bg-primary/30 dark:bg-primary/60`, an asymmetric alpha
|
|
9
9
|
* that lands at typical-progress-track contrast in light mode and AAA-passing
|
|
10
|
-
* 6.79:1 in dark mode (documented exception in
|
|
10
|
+
* 6.79:1 in dark mode (documented exception in AGENTS.md → Known AAA
|
|
11
11
|
* exceptions).
|
|
12
12
|
*
|
|
13
13
|
* The `label` prop becomes the accessible name (generated-id aria-labelledby)
|
|
@@ -76,6 +76,7 @@ export const WithLabelAndValue: Story = {
|
|
|
76
76
|
* The fill is max-aware on the labeled path (14 of 36 ≈ 39% filled).
|
|
77
77
|
*/
|
|
78
78
|
export const CustomValueFormat: Story = {
|
|
79
|
+
parameters: { controls: { disable: true } },
|
|
79
80
|
render: () => (
|
|
80
81
|
<div className="w-72">
|
|
81
82
|
<Progress
|
|
@@ -123,6 +124,7 @@ export const Size_Xl: Story = {
|
|
|
123
124
|
};
|
|
124
125
|
|
|
125
126
|
export const Sizes: Story = {
|
|
127
|
+
parameters: { controls: { disable: true } },
|
|
126
128
|
render: () => (
|
|
127
129
|
<div className="w-72 space-y-6">
|
|
128
130
|
<Progress value={45} size="sm" aria-label="Small progress" />
|
|
@@ -176,6 +178,7 @@ export const Intent_Info: Story = {
|
|
|
176
178
|
};
|
|
177
179
|
|
|
178
180
|
export const Intents: Story = {
|
|
181
|
+
parameters: { controls: { disable: true } },
|
|
179
182
|
render: () => (
|
|
180
183
|
<div className="w-72 space-y-4">
|
|
181
184
|
<Progress value={60} intent="default" aria-label="Default progress" />
|
|
@@ -222,6 +225,7 @@ export const Animated: Story = {
|
|
|
222
225
|
* default, success, warning, error, and info fills without adjustment.
|
|
223
226
|
*/
|
|
224
227
|
export const StripedIntents: Story = {
|
|
228
|
+
parameters: { controls: { disable: true } },
|
|
225
229
|
render: () => (
|
|
226
230
|
<div className="w-72 space-y-4">
|
|
227
231
|
<Progress value={60} striped aria-label="Default striped" />
|
|
@@ -234,6 +238,7 @@ export const StripedIntents: Story = {
|
|
|
234
238
|
};
|
|
235
239
|
|
|
236
240
|
export const RealisticUse: Story = {
|
|
241
|
+
parameters: { controls: { disable: true } },
|
|
237
242
|
render: () => (
|
|
238
243
|
<div className="w-72 space-y-6">
|
|
239
244
|
<Progress value={28} label="Uploading brand-fonts.woff2" showValue />
|
|
@@ -24,6 +24,7 @@ type Story = StoryObj<typeof meta>
|
|
|
24
24
|
// is the BADS stack described in its own voice. Never Lorem, never Acme.
|
|
25
25
|
|
|
26
26
|
export const Default: Story = {
|
|
27
|
+
parameters: { controls: { disable: true } },
|
|
27
28
|
render: () => (
|
|
28
29
|
<Prose className="max-w-prose">
|
|
29
30
|
<h2>Why design tokens</h2>
|
|
@@ -44,6 +45,7 @@ export const Default: Story = {
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export const WithHeadings: Story = {
|
|
48
|
+
parameters: { controls: { disable: true } },
|
|
47
49
|
render: () => (
|
|
48
50
|
<Prose className="max-w-prose">
|
|
49
51
|
<h1>Getting started with BADS</h1>
|
|
@@ -70,6 +72,7 @@ export const WithHeadings: Story = {
|
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
export const WithCode: Story = {
|
|
75
|
+
parameters: { controls: { disable: true } },
|
|
73
76
|
render: () => (
|
|
74
77
|
<Prose className="max-w-prose">
|
|
75
78
|
<p>
|
|
@@ -92,6 +95,7 @@ export const WithCode: Story = {
|
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
export const WithLists: Story = {
|
|
98
|
+
parameters: { controls: { disable: true } },
|
|
95
99
|
render: () => (
|
|
96
100
|
<Prose className="max-w-prose">
|
|
97
101
|
<p>Every registry entry ships with an a11y contract covering:</p>
|
|
@@ -117,6 +121,7 @@ export const WithLists: Story = {
|
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
export const WithBlockquote: Story = {
|
|
124
|
+
parameters: { controls: { disable: true } },
|
|
120
125
|
render: () => (
|
|
121
126
|
<Prose className="max-w-prose">
|
|
122
127
|
<p>
|
|
@@ -137,6 +142,7 @@ export const WithBlockquote: Story = {
|
|
|
137
142
|
}
|
|
138
143
|
|
|
139
144
|
export const WithTable: Story = {
|
|
145
|
+
parameters: { controls: { disable: true } },
|
|
140
146
|
render: () => (
|
|
141
147
|
<Prose className="max-w-prose">
|
|
142
148
|
<p>The ROI report reads these costs straight from the registry:</p>
|
|
@@ -177,6 +183,7 @@ export const WithTable: Story = {
|
|
|
177
183
|
// asChild swaps the wrapper <div> for the child element, so the landmark
|
|
178
184
|
// is the consumer's choice — here a semantic <article>.
|
|
179
185
|
export const AsChild_Usage: Story = {
|
|
186
|
+
parameters: { controls: { disable: true } },
|
|
180
187
|
render: () => (
|
|
181
188
|
<Prose asChild className="max-w-prose">
|
|
182
189
|
<article aria-label="Release notes">
|
|
@@ -191,6 +198,7 @@ export const AsChild_Usage: Story = {
|
|
|
191
198
|
}
|
|
192
199
|
|
|
193
200
|
export const RealisticUse: Story = {
|
|
201
|
+
parameters: { controls: { disable: true } },
|
|
194
202
|
render: () => (
|
|
195
203
|
<Card className="w-[560px]">
|
|
196
204
|
<CardContent className="pt-6">
|
|
@@ -71,6 +71,7 @@ export const Size_Lg: Story = {
|
|
|
71
71
|
* densities side by side.
|
|
72
72
|
*/
|
|
73
73
|
export const ErrorCorrection_Levels: Story = {
|
|
74
|
+
parameters: { controls: { disable: true } },
|
|
74
75
|
render: () => (
|
|
75
76
|
<div className="flex flex-wrap items-start gap-6">
|
|
76
77
|
{(["L", "M", "Q", "H"] as const).map((level) => (
|
|
@@ -112,6 +113,7 @@ export const LongValue: Story = {
|
|
|
112
113
|
};
|
|
113
114
|
|
|
114
115
|
export const RealisticUse: Story = {
|
|
116
|
+
parameters: { controls: { disable: true } },
|
|
115
117
|
render: () => {
|
|
116
118
|
const shareUrl = "https://design.bads.com/share/tokens-v2-proposal";
|
|
117
119
|
return (
|
|
@@ -24,6 +24,7 @@ type Story = StoryObj<typeof Questionnaire>
|
|
|
24
24
|
// ─── Single question ──────────────────────────────────────────────────────────
|
|
25
25
|
|
|
26
26
|
export const Default: Story = {
|
|
27
|
+
parameters: { controls: { disable: true } },
|
|
27
28
|
render: () => (
|
|
28
29
|
<div className="w-96">
|
|
29
30
|
<Questionnaire
|
|
@@ -85,6 +86,7 @@ const ONBOARDING_SINGLE: QuestionnaireQuestion[] = [
|
|
|
85
86
|
]
|
|
86
87
|
|
|
87
88
|
export const Variant_Single: Story = {
|
|
89
|
+
parameters: { controls: { disable: true } },
|
|
88
90
|
render: () => {
|
|
89
91
|
const [answers, setAnswers] = React.useState<Record<string, string | string[] | null> | null>(null)
|
|
90
92
|
return (
|
|
@@ -102,6 +104,7 @@ export const Variant_Single: Story = {
|
|
|
102
104
|
// ─── Variant: multiple choice ─────────────────────────────────────────────────
|
|
103
105
|
|
|
104
106
|
export const Variant_Multiple: Story = {
|
|
107
|
+
parameters: { controls: { disable: true } },
|
|
105
108
|
render: () => (
|
|
106
109
|
<div className="w-96">
|
|
107
110
|
<Questionnaire
|
|
@@ -128,6 +131,7 @@ export const Variant_Multiple: Story = {
|
|
|
128
131
|
// ─── Variant: freeform ────────────────────────────────────────────────────────
|
|
129
132
|
|
|
130
133
|
export const Variant_Freeform: Story = {
|
|
134
|
+
parameters: { controls: { disable: true } },
|
|
131
135
|
render: () => (
|
|
132
136
|
<div className="w-96">
|
|
133
137
|
<Questionnaire
|
|
@@ -147,6 +151,7 @@ export const Variant_Freeform: Story = {
|
|
|
147
151
|
// ─── Variant: skippable ───────────────────────────────────────────────────────
|
|
148
152
|
|
|
149
153
|
export const Variant_Skippable: Story = {
|
|
154
|
+
parameters: { controls: { disable: true } },
|
|
150
155
|
render: () => (
|
|
151
156
|
<div className="w-96">
|
|
152
157
|
<Questionnaire
|
|
@@ -211,6 +216,7 @@ const MIXED_QUESTIONS: QuestionnaireQuestion[] = [
|
|
|
211
216
|
]
|
|
212
217
|
|
|
213
218
|
export const Variant_Mixed: Story = {
|
|
219
|
+
parameters: { controls: { disable: true } },
|
|
214
220
|
render: () => {
|
|
215
221
|
const [answers, setAnswers] = React.useState<Record<string, string | string[] | null> | null>(null)
|
|
216
222
|
return (
|
|
@@ -260,6 +266,7 @@ const AGENT_QUESTIONS: QuestionnaireQuestion[] = [
|
|
|
260
266
|
]
|
|
261
267
|
|
|
262
268
|
export const RealisticUse: Story = {
|
|
269
|
+
parameters: { controls: { disable: true } },
|
|
263
270
|
render: () => {
|
|
264
271
|
const [answers, setAnswers] = React.useState<Record<string, string | string[] | null> | null>(null)
|
|
265
272
|
return (
|