@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
|
@@ -13,27 +13,28 @@ export default meta;
|
|
|
13
13
|
type Story = StoryObj<typeof meta>;
|
|
14
14
|
|
|
15
15
|
export const Default: Story = {
|
|
16
|
+
parameters: { controls: { disable: true } },
|
|
16
17
|
render: () => (<Toggle aria-label="Toggle bold"><Bold className="h-4 w-4" /></Toggle>),
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export const Variant_Default: Story = {
|
|
20
|
-
|
|
21
|
+
args: { variant: "default", children: "Default" },
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export const Variant_Outline: Story = {
|
|
24
|
-
|
|
25
|
+
args: { variant: "outline", children: "Outline" },
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
export const Size_Default: Story = {
|
|
28
|
-
|
|
29
|
+
args: { size: "default", children: "Default" },
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
export const Size_Sm: Story = {
|
|
32
|
-
|
|
33
|
+
args: { size: "sm", children: "Sm" },
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
export const Size_Lg: Story = {
|
|
36
|
-
|
|
37
|
+
args: { size: "lg", children: "Lg" },
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
export const Disabled: Story = {
|
|
@@ -41,5 +42,6 @@ export const Disabled: Story = {
|
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
export const RealisticUse: Story = {
|
|
45
|
+
parameters: { controls: { disable: true } },
|
|
44
46
|
render: () => (<Toggle aria-label="Toggle bold"><Bold className="h-4 w-4" /></Toggle>),
|
|
45
47
|
};
|
|
@@ -13,6 +13,7 @@ export default meta;
|
|
|
13
13
|
type Story = StoryObj<typeof meta>;
|
|
14
14
|
|
|
15
15
|
export const Default: Story = {
|
|
16
|
+
parameters: { controls: { disable: true } },
|
|
16
17
|
render: () => (<ToggleGroup type="multiple">
|
|
17
18
|
<ToggleGroupItem value="bold" aria-label="Bold"><Bold className="h-4 w-4" /></ToggleGroupItem>
|
|
18
19
|
<ToggleGroupItem value="italic" aria-label="Italic"><Italic className="h-4 w-4" /></ToggleGroupItem>
|
|
@@ -21,6 +22,7 @@ export const Default: Story = {
|
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export const Orientation_Vertical: Story = {
|
|
25
|
+
parameters: { controls: { disable: true } },
|
|
24
26
|
render: () => (
|
|
25
27
|
<ToggleGroup type="single" orientation="vertical" variant="outline">
|
|
26
28
|
<ToggleGroupItem value="bold" aria-label="Bold"><Bold className="h-4 w-4" /></ToggleGroupItem>
|
|
@@ -31,6 +33,7 @@ export const Orientation_Vertical: Story = {
|
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
export const Orientation_Vertical_Spaced: Story = {
|
|
36
|
+
parameters: { controls: { disable: true } },
|
|
34
37
|
render: () => (
|
|
35
38
|
<ToggleGroup type="single" orientation="vertical" spacing={1}>
|
|
36
39
|
<ToggleGroupItem value="bold" aria-label="Bold"><Bold className="h-4 w-4" /></ToggleGroupItem>
|
|
@@ -41,6 +44,7 @@ export const Orientation_Vertical_Spaced: Story = {
|
|
|
41
44
|
};
|
|
42
45
|
|
|
43
46
|
export const Disabled: Story = {
|
|
47
|
+
parameters: { controls: { disable: true } },
|
|
44
48
|
render: () => (
|
|
45
49
|
<ToggleGroup type="multiple" disabled>
|
|
46
50
|
<ToggleGroupItem value="bold" aria-label="Bold"><Bold className="h-4 w-4" /></ToggleGroupItem>
|
|
@@ -51,6 +55,7 @@ export const Disabled: Story = {
|
|
|
51
55
|
};
|
|
52
56
|
|
|
53
57
|
export const RealisticUse: Story = {
|
|
58
|
+
parameters: { controls: { disable: true } },
|
|
54
59
|
render: () => (<ToggleGroup type="multiple">
|
|
55
60
|
<ToggleGroupItem value="bold" aria-label="Bold"><Bold className="h-4 w-4" /></ToggleGroupItem>
|
|
56
61
|
<ToggleGroupItem value="italic" aria-label="Italic"><Italic className="h-4 w-4" /></ToggleGroupItem>
|
|
@@ -16,6 +16,7 @@ const meta: Meta<typeof ToggleTip> = {
|
|
|
16
16
|
export default meta;
|
|
17
17
|
|
|
18
18
|
export const Default: StoryObj = {
|
|
19
|
+
parameters: { controls: { disable: true } },
|
|
19
20
|
render: () => (
|
|
20
21
|
<ToggleTip content="Semantic tokens alias primitives, so one brand change propagates everywhere.">
|
|
21
22
|
<Button variant="ghost" size="icon" aria-label="More about semantic tokens">
|
|
@@ -26,6 +27,7 @@ export const Default: StoryObj = {
|
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export const Disabled: StoryObj = {
|
|
30
|
+
parameters: { controls: { disable: true } },
|
|
29
31
|
render: () => (
|
|
30
32
|
<ToggleTip
|
|
31
33
|
disabled
|
|
@@ -39,6 +41,7 @@ export const Disabled: StoryObj = {
|
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
export const WithFormLabel: StoryObj = {
|
|
44
|
+
parameters: { controls: { disable: true } },
|
|
42
45
|
render: () => (
|
|
43
46
|
<div className="w-80 space-y-3">
|
|
44
47
|
<div className="flex items-center gap-1">
|
|
@@ -62,6 +65,7 @@ export const WithFormLabel: StoryObj = {
|
|
|
62
65
|
};
|
|
63
66
|
|
|
64
67
|
export const RealisticUse: StoryObj = {
|
|
68
|
+
parameters: { controls: { disable: true } },
|
|
65
69
|
render: () => (
|
|
66
70
|
<div className="w-96 space-y-4 rounded-lg border border-border bg-card p-4">
|
|
67
71
|
<p className="text-sm font-medium text-foreground">Fork settings</p>
|
|
@@ -33,6 +33,7 @@ export default meta;
|
|
|
33
33
|
type Story = StoryObj<typeof meta>;
|
|
34
34
|
|
|
35
35
|
export const Default: Story = {
|
|
36
|
+
parameters: { controls: { disable: true } },
|
|
36
37
|
render: () => (
|
|
37
38
|
<Toolbar aria-label="Text formatting">
|
|
38
39
|
<ToolbarButton aria-label="Bold">
|
|
@@ -49,6 +50,7 @@ export const Default: Story = {
|
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
export const WithSeparator: Story = {
|
|
53
|
+
parameters: { controls: { disable: true } },
|
|
52
54
|
render: () => (
|
|
53
55
|
<Toolbar aria-label="Rich text editor toolbar">
|
|
54
56
|
<ToolbarButton aria-label="Bold">
|
|
@@ -82,6 +84,7 @@ export const WithSeparator: Story = {
|
|
|
82
84
|
};
|
|
83
85
|
|
|
84
86
|
export const WithActiveState: Story = {
|
|
87
|
+
parameters: { controls: { disable: true } },
|
|
85
88
|
render: () => {
|
|
86
89
|
const [bold, setBold] = React.useState(true);
|
|
87
90
|
const [italic, setItalic] = React.useState(false);
|
|
@@ -139,6 +142,7 @@ export const WithActiveState: Story = {
|
|
|
139
142
|
};
|
|
140
143
|
|
|
141
144
|
export const Vertical: Story = {
|
|
145
|
+
parameters: { controls: { disable: true } },
|
|
142
146
|
render: () => (
|
|
143
147
|
<Toolbar orientation="vertical" aria-label="Document actions">
|
|
144
148
|
<ToolbarButton aria-label="Undo">
|
|
@@ -159,6 +163,7 @@ export const Vertical: Story = {
|
|
|
159
163
|
};
|
|
160
164
|
|
|
161
165
|
export const Disabled: Story = {
|
|
166
|
+
parameters: { controls: { disable: true } },
|
|
162
167
|
render: () => (
|
|
163
168
|
<Toolbar aria-label="Disabled toolbar">
|
|
164
169
|
<ToolbarButton aria-label="Bold" disabled>
|
|
@@ -182,6 +187,7 @@ export const RealisticUse: Story = {
|
|
|
182
187
|
</div>
|
|
183
188
|
),
|
|
184
189
|
],
|
|
190
|
+
parameters: { controls: { disable: true } },
|
|
185
191
|
render: () => {
|
|
186
192
|
const [bold, setBold] = React.useState(false);
|
|
187
193
|
const [italic, setItalic] = React.useState(false);
|
|
@@ -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: () => (<TooltipProvider>
|
|
23
24
|
<Tooltip>
|
|
24
25
|
<TooltipTrigger asChild><Button variant="outline">Hover me</Button></TooltipTrigger>
|
|
@@ -28,6 +29,7 @@ export const Default: Story = {
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
export const RealisticUse: Story = {
|
|
32
|
+
parameters: { controls: { disable: true } },
|
|
31
33
|
render: () => (<TooltipProvider>
|
|
32
34
|
<Tooltip>
|
|
33
35
|
<TooltipTrigger asChild><Button variant="outline">Hover me</Button></TooltipTrigger>
|
|
@@ -43,6 +45,7 @@ export const RealisticUse: Story = {
|
|
|
43
45
|
// is the canonical demonstration of the correct pattern; see tooltip.tsx's
|
|
44
46
|
// inverted-surface note and the Tooltip registry antiPattern.
|
|
45
47
|
export const DeEmphasizedText: Story = {
|
|
48
|
+
parameters: { controls: { disable: true } },
|
|
46
49
|
render: () => (<TooltipProvider>
|
|
47
50
|
<Tooltip>
|
|
48
51
|
<TooltipTrigger asChild><Button variant="outline">Contrast ratio</Button></TooltipTrigger>
|
|
@@ -74,6 +74,7 @@ function TourDemo({
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
export const Default: Story = {
|
|
77
|
+
parameters: { controls: { disable: true } },
|
|
77
78
|
render: () => (
|
|
78
79
|
<TourDemo
|
|
79
80
|
idPrefix="tour-default"
|
|
@@ -102,6 +103,7 @@ export const Default: Story = {
|
|
|
102
103
|
};
|
|
103
104
|
|
|
104
105
|
export const Placement_TopAndLeft: Story = {
|
|
106
|
+
parameters: { controls: { disable: true } },
|
|
105
107
|
render: () => (
|
|
106
108
|
<TourDemo
|
|
107
109
|
idPrefix="tour-placement"
|
|
@@ -125,6 +127,7 @@ export const Placement_TopAndLeft: Story = {
|
|
|
125
127
|
};
|
|
126
128
|
|
|
127
129
|
export const Centered_WelcomeStep: Story = {
|
|
130
|
+
parameters: { controls: { disable: true } },
|
|
128
131
|
render: () => (
|
|
129
132
|
<TourDemo
|
|
130
133
|
idPrefix="tour-centered"
|
|
@@ -53,6 +53,7 @@ function ControlledTransferList(
|
|
|
53
53
|
// ────────────────────────────────────────────────────────────────────────────
|
|
54
54
|
|
|
55
55
|
export const Default: Story = {
|
|
56
|
+
parameters: { controls: { disable: true } },
|
|
56
57
|
render: () => (
|
|
57
58
|
// Right panel starts empty — "No items" placeholder renders with role="option"
|
|
58
59
|
// aria-disabled="true" to satisfy listbox's aria-required-children contract.
|
|
@@ -63,7 +64,12 @@ export const Default: Story = {
|
|
|
63
64
|
),
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
// The checked-state visual (corrections.md #026 — was a hand-rolled div
|
|
68
|
+
// rendering as a circle, not a checkbox) doesn't need its own story: unlike
|
|
69
|
+
// FacetedFilter's popover, these rows render directly, so initialSelected
|
|
70
|
+
// below already puts real checked Checkbox primitives in front of Chromatic.
|
|
66
71
|
export const WithSearch: Story = {
|
|
72
|
+
parameters: { controls: { disable: true } },
|
|
67
73
|
render: () => (
|
|
68
74
|
<ControlledTransferList
|
|
69
75
|
searchable
|
|
@@ -132,6 +138,7 @@ export const Controlled: Story = {
|
|
|
132
138
|
// → move active item (aria-activedescendant), Space/Enter → toggle, Tab → move
|
|
133
139
|
// to transfer buttons. Items are NOT individually tabbable (no nested-interactive).
|
|
134
140
|
export const KeyboardNav: Story = {
|
|
141
|
+
parameters: { controls: { disable: true } },
|
|
135
142
|
render: () => (
|
|
136
143
|
<div className="space-y-2">
|
|
137
144
|
<p className="text-xs text-muted-foreground max-w-sm">
|
|
@@ -114,6 +114,7 @@ const docsTree: TreeSelectNode[] = [
|
|
|
114
114
|
];
|
|
115
115
|
|
|
116
116
|
export const Default: Story = {
|
|
117
|
+
parameters: { controls: { disable: true } },
|
|
117
118
|
render: () => {
|
|
118
119
|
const [value, setValue] = React.useState<string | string[]>("");
|
|
119
120
|
return (
|
|
@@ -135,6 +136,7 @@ export const Default: Story = {
|
|
|
135
136
|
};
|
|
136
137
|
|
|
137
138
|
export const Multiple: Story = {
|
|
139
|
+
parameters: { controls: { disable: true } },
|
|
138
140
|
render: () => {
|
|
139
141
|
const [value, setValue] = React.useState<string | string[]>([
|
|
140
142
|
"jordan-reeves",
|
|
@@ -162,6 +164,7 @@ export const Multiple: Story = {
|
|
|
162
164
|
};
|
|
163
165
|
|
|
164
166
|
export const Disabled: Story = {
|
|
167
|
+
parameters: { controls: { disable: true } },
|
|
165
168
|
render: () => (
|
|
166
169
|
<div className="w-80">
|
|
167
170
|
<TreeSelect
|
|
@@ -176,6 +179,7 @@ export const Disabled: Story = {
|
|
|
176
179
|
};
|
|
177
180
|
|
|
178
181
|
export const RealisticUse: Story = {
|
|
182
|
+
parameters: { controls: { disable: true } },
|
|
179
183
|
render: () => {
|
|
180
184
|
const [destination, setDestination] = React.useState<string | string[]>("");
|
|
181
185
|
const [reviewerValues, setReviewerValues] = React.useState<string | string[]>(
|
|
@@ -27,6 +27,7 @@ export default meta;
|
|
|
27
27
|
type Story = StoryObj<typeof Tree>;
|
|
28
28
|
|
|
29
29
|
export const Default: Story = {
|
|
30
|
+
parameters: { controls: { disable: true } },
|
|
30
31
|
render: () => (
|
|
31
32
|
<div className="w-64">
|
|
32
33
|
<Tree defaultExpanded={["docs"]}>
|
|
@@ -71,6 +72,7 @@ export const Default: Story = {
|
|
|
71
72
|
};
|
|
72
73
|
|
|
73
74
|
export const WithIcons: Story = {
|
|
75
|
+
parameters: { controls: { disable: true } },
|
|
74
76
|
render: () => (
|
|
75
77
|
<div className="w-72">
|
|
76
78
|
<Tree defaultExpanded={["project", "assets"]}>
|
|
@@ -110,6 +112,7 @@ export const WithIcons: Story = {
|
|
|
110
112
|
};
|
|
111
113
|
|
|
112
114
|
export const Flat: Story = {
|
|
115
|
+
parameters: { controls: { disable: true } },
|
|
113
116
|
render: () => (
|
|
114
117
|
<div className="w-56">
|
|
115
118
|
<Tree>
|
|
@@ -131,6 +134,7 @@ export const Flat: Story = {
|
|
|
131
134
|
};
|
|
132
135
|
|
|
133
136
|
export const DeepNesting: Story = {
|
|
137
|
+
parameters: { controls: { disable: true } },
|
|
134
138
|
render: () => (
|
|
135
139
|
<div className="w-72">
|
|
136
140
|
<Tree defaultExpanded={["l1", "l2", "l3"]}>
|
|
@@ -213,6 +217,7 @@ export const Controlled: Story = {
|
|
|
213
217
|
};
|
|
214
218
|
|
|
215
219
|
export const RealisticUse: Story = {
|
|
220
|
+
parameters: { controls: { disable: true } },
|
|
216
221
|
render: () => (
|
|
217
222
|
<div className="w-72 rounded-lg border border-border bg-card p-3">
|
|
218
223
|
<p className="mb-2 px-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
@@ -30,6 +30,7 @@ export default meta;
|
|
|
30
30
|
type Story = StoryObj<typeof meta>;
|
|
31
31
|
|
|
32
32
|
export const Default: Story = {
|
|
33
|
+
parameters: { controls: { disable: true } },
|
|
33
34
|
render: () => (
|
|
34
35
|
<div className="flex flex-col items-start gap-2">
|
|
35
36
|
<TypingIndicator />
|
|
@@ -41,6 +42,7 @@ export const Default: Story = {
|
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
export const Size_sm: Story = {
|
|
45
|
+
parameters: { controls: { disable: true } },
|
|
44
46
|
render: () => (
|
|
45
47
|
<div className="flex flex-col items-start gap-2">
|
|
46
48
|
<TypingIndicator size="sm" />
|
|
@@ -52,6 +54,7 @@ export const Size_sm: Story = {
|
|
|
52
54
|
};
|
|
53
55
|
|
|
54
56
|
export const Size_lg: Story = {
|
|
57
|
+
parameters: { controls: { disable: true } },
|
|
55
58
|
render: () => (
|
|
56
59
|
<div className="flex flex-col items-start gap-2">
|
|
57
60
|
<TypingIndicator size="lg" />
|
|
@@ -63,6 +66,7 @@ export const Size_lg: Story = {
|
|
|
63
66
|
};
|
|
64
67
|
|
|
65
68
|
export const CustomLabel: Story = {
|
|
69
|
+
parameters: { controls: { disable: true } },
|
|
66
70
|
render: () => (
|
|
67
71
|
<div className="flex flex-col items-start gap-2">
|
|
68
72
|
<TypingIndicator label="BADS assistant is thinking…" />
|
|
@@ -27,6 +27,7 @@ type Story = StoryObj<typeof VisuallyHidden>;
|
|
|
27
27
|
// (or run a screen reader) to confirm the hidden content is present.
|
|
28
28
|
|
|
29
29
|
export const Default: Story = {
|
|
30
|
+
parameters: { controls: { disable: true } },
|
|
30
31
|
render: () => (
|
|
31
32
|
<div className="max-w-sm space-y-2">
|
|
32
33
|
<p className="text-sm text-foreground">
|
|
@@ -46,6 +47,7 @@ export const Default: Story = {
|
|
|
46
47
|
};
|
|
47
48
|
|
|
48
49
|
export const WithAsChild: Story = {
|
|
50
|
+
parameters: { controls: { disable: true } },
|
|
49
51
|
render: () => (
|
|
50
52
|
<div className="max-w-sm space-y-2">
|
|
51
53
|
<p className="text-sm text-foreground">
|
|
@@ -64,6 +66,7 @@ export const WithAsChild: Story = {
|
|
|
64
66
|
};
|
|
65
67
|
|
|
66
68
|
export const RealisticUse: Story = {
|
|
69
|
+
parameters: { controls: { disable: true } },
|
|
67
70
|
render: () => (
|
|
68
71
|
<Card className="w-80">
|
|
69
72
|
<CardContent className="space-y-4 p-4">
|
|
@@ -43,6 +43,7 @@ const MARK_SVG =
|
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
export const Default: Story = {
|
|
46
|
+
parameters: { controls: { disable: true } },
|
|
46
47
|
render: () => (
|
|
47
48
|
<Watermark content="Internal review — do not distribute">
|
|
48
49
|
<Card className="w-[28rem]">
|
|
@@ -69,6 +70,7 @@ export const Default: Story = {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
export const Size_Sm: Story = {
|
|
73
|
+
parameters: { controls: { disable: true } },
|
|
72
74
|
render: () => (
|
|
73
75
|
<Watermark
|
|
74
76
|
content="seoyun_park · 2026-05-26"
|
|
@@ -93,6 +95,7 @@ export const Size_Sm: Story = {
|
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
export const Size_Lg: Story = {
|
|
98
|
+
parameters: { controls: { disable: true } },
|
|
96
99
|
render: () => (
|
|
97
100
|
<Watermark
|
|
98
101
|
content="DRAFT"
|
|
@@ -125,6 +128,7 @@ export const Size_Lg: Story = {
|
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
export const WithImage: Story = {
|
|
131
|
+
parameters: { controls: { disable: true } },
|
|
128
132
|
render: () => (
|
|
129
133
|
<Watermark image={MARK_SVG} gap={[110, 90]} opacity={0.1}>
|
|
130
134
|
<Card className="w-[28rem]">
|
|
@@ -146,6 +150,7 @@ export const WithImage: Story = {
|
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
export const MultiLine: Story = {
|
|
153
|
+
parameters: { controls: { disable: true } },
|
|
149
154
|
render: () => (
|
|
150
155
|
<Watermark
|
|
151
156
|
content={["Confidential", "anika.patel@stripe.com"]}
|
|
@@ -169,6 +174,7 @@ export const MultiLine: Story = {
|
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
export const RealisticUse: Story = {
|
|
177
|
+
parameters: { controls: { disable: true } },
|
|
172
178
|
render: () => (
|
|
173
179
|
<Watermark content="CONFIDENTIAL — internal pricing" rotate={-30}>
|
|
174
180
|
<Card className="w-[30rem]">
|
|
@@ -21,10 +21,11 @@ export default meta
|
|
|
21
21
|
type Story = StoryObj<typeof meta>
|
|
22
22
|
|
|
23
23
|
export const Default: Story = {
|
|
24
|
-
|
|
24
|
+
args: { className: "rounded-md border" },
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export const WithValue: Story = {
|
|
28
|
+
parameters: { controls: { disable: true } },
|
|
28
29
|
render: () => {
|
|
29
30
|
// Sprint start — week of 2026-09-07 (persona pool dates, bads.json).
|
|
30
31
|
const [week, setWeek] = React.useState<Date>(new Date(2026, 8, 7))
|
|
@@ -39,6 +40,7 @@ export const WithValue: Story = {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export const Disabled: Story = {
|
|
43
|
+
parameters: { controls: { disable: true } },
|
|
42
44
|
render: () => (
|
|
43
45
|
<WeekPicker
|
|
44
46
|
disabled
|
|
@@ -49,6 +51,7 @@ export const Disabled: Story = {
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
export const RealisticUse: Story = {
|
|
54
|
+
parameters: { controls: { disable: true } },
|
|
52
55
|
render: () => {
|
|
53
56
|
const [sprintWeek, setSprintWeek] = React.useState<Date | undefined>(
|
|
54
57
|
undefined
|
|
@@ -88,3 +91,24 @@ export const RealisticUse: Story = {
|
|
|
88
91
|
)
|
|
89
92
|
},
|
|
90
93
|
}
|
|
94
|
+
|
|
95
|
+
// Controlled from an empty state: `useState<Date>()` starts as undefined, which used to read as
|
|
96
|
+
// "uncontrolled", so a later Clear showed the first pick again.
|
|
97
|
+
export const ControlledStartsEmpty: Story = {
|
|
98
|
+
parameters: { controls: { disable: true } },
|
|
99
|
+
render: () => {
|
|
100
|
+
const [value, setValue] = React.useState<Date>()
|
|
101
|
+
return (
|
|
102
|
+
<div className="flex flex-col items-start gap-3">
|
|
103
|
+
<WeekPicker value={value} onValueChange={(v) => setValue(v)} />
|
|
104
|
+
<button
|
|
105
|
+
type="button"
|
|
106
|
+
className="min-h-11 rounded-md border px-4 text-sm font-medium"
|
|
107
|
+
onClick={() => setValue(undefined)}
|
|
108
|
+
>
|
|
109
|
+
Clear
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
)
|
|
113
|
+
},
|
|
114
|
+
}
|
|
@@ -22,6 +22,7 @@ export default meta
|
|
|
22
22
|
type Story = StoryObj<typeof WordRotate>
|
|
23
23
|
|
|
24
24
|
export const Default: Story = {
|
|
25
|
+
parameters: { controls: { disable: true } },
|
|
25
26
|
render: () => (
|
|
26
27
|
<p className="text-2xl font-semibold text-foreground">
|
|
27
28
|
Design systems that are{" "}
|
|
@@ -31,6 +32,7 @@ export const Default: Story = {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export const FastInterval: Story = {
|
|
35
|
+
parameters: { controls: { disable: true } },
|
|
34
36
|
render: () => (
|
|
35
37
|
<p className="text-2xl font-semibold text-foreground">
|
|
36
38
|
Status:{" "}
|
|
@@ -44,6 +46,7 @@ export const FastInterval: Story = {
|
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
export const SlowInterval: Story = {
|
|
49
|
+
parameters: { controls: { disable: true } },
|
|
47
50
|
render: () => (
|
|
48
51
|
<p className="text-2xl font-semibold text-foreground">
|
|
49
52
|
Designed for{" "}
|
|
@@ -56,6 +59,7 @@ export const SlowInterval: Story = {
|
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
export const SingleWord: Story = {
|
|
62
|
+
parameters: { controls: { disable: true } },
|
|
59
63
|
render: () => (
|
|
60
64
|
// words.length === 1: no interval fires, word is static — correct for
|
|
61
65
|
// cases where the word list is dynamically derived and might have 1 item.
|
|
@@ -67,6 +71,7 @@ export const SingleWord: Story = {
|
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
export const RealisticUse: Story = {
|
|
74
|
+
parameters: { controls: { disable: true } },
|
|
70
75
|
render: () => (
|
|
71
76
|
<div className="flex max-w-lg flex-col gap-6 rounded-lg border border-border bg-card p-8">
|
|
72
77
|
<div className="flex flex-col gap-2">
|
|
@@ -21,10 +21,11 @@ export default meta;
|
|
|
21
21
|
type Story = StoryObj<typeof meta>;
|
|
22
22
|
|
|
23
23
|
export const Default: Story = {
|
|
24
|
-
|
|
24
|
+
args: { className: "rounded-md border" },
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export const Prefilled: Story = {
|
|
28
|
+
parameters: { controls: { disable: true } },
|
|
28
29
|
render: () => {
|
|
29
30
|
// Persona pool date (content/personas/bads.json → primary.dates): 2026-05-26.
|
|
30
31
|
const [year, setYear] = useState<number | undefined>(2026);
|
|
@@ -40,19 +41,11 @@ export const Prefilled: Story = {
|
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
export const Disabled: Story = {
|
|
43
|
-
|
|
44
|
-
// When disabled: grid div gets tabIndex=0 (keyboard-reachable without
|
|
45
|
-
// placing tabIndex=0 on a non-focusable button); year label uses
|
|
46
|
-
// text-muted-foreground instead of opacity-50 to maintain contrast.
|
|
47
|
-
<YearPicker
|
|
48
|
-
disabled
|
|
49
|
-
defaultValue={2026}
|
|
50
|
-
className="rounded-md border"
|
|
51
|
-
/>
|
|
52
|
-
),
|
|
44
|
+
args: { disabled: true, defaultValue: 2026, className: "rounded-md border" },
|
|
53
45
|
};
|
|
54
46
|
|
|
55
47
|
export const WithMinMax: Story = {
|
|
48
|
+
parameters: { controls: { disable: true } },
|
|
56
49
|
render: () => {
|
|
57
50
|
// Engagement range: minYear=2020, maxYear=2030. Out-of-range cells
|
|
58
51
|
// render at opacity-40 and are pointer-events-none.
|
|
@@ -70,6 +63,7 @@ export const WithMinMax: Story = {
|
|
|
70
63
|
};
|
|
71
64
|
|
|
72
65
|
export const RealisticUse: Story = {
|
|
66
|
+
parameters: { controls: { disable: true } },
|
|
73
67
|
render: () => {
|
|
74
68
|
// Persona: Jordan Reeves (content/personas/bads.json → primary.names[0]).
|
|
75
69
|
// Use case: graduation year for a professional profile.
|
|
@@ -98,3 +92,24 @@ export const RealisticUse: Story = {
|
|
|
98
92
|
);
|
|
99
93
|
},
|
|
100
94
|
};
|
|
95
|
+
|
|
96
|
+
// Controlled from an empty state: `useState<number>()` starts as undefined, which used to read as
|
|
97
|
+
// "uncontrolled", so a later Clear showed the first pick again.
|
|
98
|
+
export const ControlledStartsEmpty: Story = {
|
|
99
|
+
parameters: { controls: { disable: true } },
|
|
100
|
+
render: () => {
|
|
101
|
+
const [value, setValue] = useState<number>()
|
|
102
|
+
return (
|
|
103
|
+
<div className="flex flex-col items-start gap-3">
|
|
104
|
+
<YearPicker value={value} onValueChange={(v) => setValue(v)} />
|
|
105
|
+
<button
|
|
106
|
+
type="button"
|
|
107
|
+
className="min-h-11 rounded-md border px-4 text-sm font-medium"
|
|
108
|
+
onClick={() => setValue(undefined)}
|
|
109
|
+
>
|
|
110
|
+
Clear
|
|
111
|
+
</button>
|
|
112
|
+
</div>
|
|
113
|
+
)
|
|
114
|
+
},
|
|
115
|
+
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"story files.",
|
|
16
16
|
"",
|
|
17
17
|
"GROUP NAMES ARE FOR PEOPLE SCANNING A SIDEBAR. They are not an architectural",
|
|
18
|
-
"statement and they are not the layer model
|
|
18
|
+
"statement and they are not the layer model — they answer 'where would someone",
|
|
19
19
|
"look for this', which is why Accordion sits under Layout rather than Actions",
|
|
20
20
|
"and Carousel sits under Layout rather than Content.",
|
|
21
21
|
"",
|
|
@@ -36,25 +36,28 @@
|
|
|
36
36
|
"Clipboard"
|
|
37
37
|
],
|
|
38
38
|
"Forms": [
|
|
39
|
+
"Editable",
|
|
40
|
+
"Field",
|
|
41
|
+
"Fieldset",
|
|
42
|
+
"FileUpload",
|
|
43
|
+
"FloatLabel",
|
|
44
|
+
"InlineEdit",
|
|
39
45
|
"Input",
|
|
40
|
-
"InputGroup",
|
|
41
46
|
"InputClearButton",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
47
|
+
"InputGroup",
|
|
48
|
+
"JsonInput",
|
|
49
|
+
"Label",
|
|
50
|
+
"NumberInput",
|
|
51
|
+
"OTPInput",
|
|
44
52
|
"PasswordInput",
|
|
45
53
|
"PasswordStrengthInput",
|
|
46
|
-
"
|
|
54
|
+
"PhoneInput",
|
|
47
55
|
"PinInput",
|
|
48
|
-
"TagsInput",
|
|
49
|
-
"Editable",
|
|
50
|
-
"Field",
|
|
51
|
-
"Fieldset",
|
|
52
|
-
"Label",
|
|
53
|
-
"FloatLabel",
|
|
54
|
-
"FileUpload",
|
|
55
|
-
"SignaturePad",
|
|
56
56
|
"Questionnaire",
|
|
57
|
-
"
|
|
57
|
+
"SearchInput",
|
|
58
|
+
"SignaturePad",
|
|
59
|
+
"TagsInput",
|
|
60
|
+
"Textarea"
|
|
58
61
|
],
|
|
59
62
|
"Selection": [
|
|
60
63
|
"Select",
|
|
@@ -158,11 +161,13 @@
|
|
|
158
161
|
"Carousel",
|
|
159
162
|
"Card",
|
|
160
163
|
"PageHeader",
|
|
161
|
-
"SortableList"
|
|
164
|
+
"SortableList",
|
|
165
|
+
"Canvas"
|
|
162
166
|
],
|
|
163
167
|
"Content and data": [
|
|
164
168
|
"Table",
|
|
165
169
|
"DataTable",
|
|
170
|
+
"FacetedFilter",
|
|
166
171
|
"DataList",
|
|
167
172
|
"Chart",
|
|
168
173
|
"Timeline",
|
|
@@ -188,7 +193,8 @@
|
|
|
188
193
|
"Icon",
|
|
189
194
|
"ProgressStack",
|
|
190
195
|
"GaugeChart",
|
|
191
|
-
"Heatmap"
|
|
196
|
+
"Heatmap",
|
|
197
|
+
"MarkdownPreview"
|
|
192
198
|
],
|
|
193
199
|
"Badges and avatars": [
|
|
194
200
|
"Avatar",
|