@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,197 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
import { userEvent, within, expect, waitFor } from "storybook/test"
|
|
4
|
+
import {
|
|
5
|
+
AlertCircleIcon,
|
|
6
|
+
ArrowDownIcon,
|
|
7
|
+
ArrowRightIcon,
|
|
8
|
+
ArrowUpIcon,
|
|
9
|
+
BuildingIcon,
|
|
10
|
+
ShieldIcon,
|
|
11
|
+
UserIcon,
|
|
12
|
+
UsersIcon,
|
|
13
|
+
} from "lucide-react"
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
FacetedFilter,
|
|
17
|
+
type FacetedFilterOption,
|
|
18
|
+
} from "@behavioral-agentic-design-system/core/components/ui/faceted-filter"
|
|
19
|
+
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Option sets (real content — no "Option 1")
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
const STATUS_OPTIONS: FacetedFilterOption[] = [
|
|
24
|
+
{ label: "Active", value: "active", count: 124 },
|
|
25
|
+
{ label: "Inactive", value: "inactive", count: 38 },
|
|
26
|
+
{ label: "Pending", value: "pending", count: 17 },
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
const PRIORITY_OPTIONS: FacetedFilterOption[] = [
|
|
30
|
+
{ label: "Critical", value: "critical", icon: AlertCircleIcon },
|
|
31
|
+
{ label: "High", value: "high", icon: ArrowUpIcon },
|
|
32
|
+
{ label: "Medium", value: "medium", icon: ArrowRightIcon },
|
|
33
|
+
{ label: "Low", value: "low", icon: ArrowDownIcon },
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
const USER_STATUS_OPTIONS: FacetedFilterOption[] = [
|
|
37
|
+
{ label: "Verified", value: "verified", count: 892 },
|
|
38
|
+
{ label: "Unverified", value: "unverified", count: 74 },
|
|
39
|
+
{ label: "Suspended", value: "suspended", count: 12 },
|
|
40
|
+
{ label: "Pending review", value: "pending_review", count: 31 },
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
const ROLE_OPTIONS: FacetedFilterOption[] = [
|
|
44
|
+
{ label: "Admin", value: "admin", icon: ShieldIcon },
|
|
45
|
+
{ label: "Member", value: "member", icon: UserIcon },
|
|
46
|
+
{ label: "Viewer", value: "viewer", icon: UsersIcon },
|
|
47
|
+
{ label: "Billing", value: "billing", icon: BuildingIcon },
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
const TEAM_OPTIONS: FacetedFilterOption[] = [
|
|
51
|
+
{ label: "Engineering", value: "engineering", count: 48 },
|
|
52
|
+
{ label: "Design", value: "design", count: 12 },
|
|
53
|
+
{ label: "Marketing", value: "marketing", count: 19 },
|
|
54
|
+
{ label: "Sales", value: "sales", count: 34 },
|
|
55
|
+
{ label: "Support", value: "support", count: 27 },
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// Controlled wrapper
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
function ControlledFacetedFilter({
|
|
62
|
+
defaultSelected = [],
|
|
63
|
+
...props
|
|
64
|
+
}: React.ComponentProps<typeof FacetedFilter> & {
|
|
65
|
+
defaultSelected?: string[]
|
|
66
|
+
}) {
|
|
67
|
+
const [selected, setSelected] = React.useState<Set<string>>(
|
|
68
|
+
new Set(defaultSelected)
|
|
69
|
+
)
|
|
70
|
+
return (
|
|
71
|
+
<FacetedFilter
|
|
72
|
+
{...props}
|
|
73
|
+
selectedValues={selected}
|
|
74
|
+
onSelectionChange={setSelected}
|
|
75
|
+
/>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
// Meta
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
const meta: Meta<typeof FacetedFilter> = {
|
|
83
|
+
title: "Components/Content and data/FacetedFilter",
|
|
84
|
+
component: FacetedFilter,
|
|
85
|
+
tags: ["autodocs"],
|
|
86
|
+
parameters: {
|
|
87
|
+
layout: "centered",
|
|
88
|
+
docs: {
|
|
89
|
+
description: {
|
|
90
|
+
component:
|
|
91
|
+
"Popover-based multi-select filter for DataTable surfaces. Composes Popover + Command + Checkbox + Badge + Button — no new dependencies.",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export default meta
|
|
98
|
+
type Story = StoryObj<typeof meta>
|
|
99
|
+
|
|
100
|
+
// ---------------------------------------------------------------------------
|
|
101
|
+
// Stories
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
|
|
104
|
+
export const Default: Story = {
|
|
105
|
+
parameters: { controls: { disable: true } },
|
|
106
|
+
render: () => (
|
|
107
|
+
<ControlledFacetedFilter title="Status" options={STATUS_OPTIONS} />
|
|
108
|
+
),
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const WithPreselection: Story = {
|
|
112
|
+
parameters: { controls: { disable: true } },
|
|
113
|
+
render: () => (
|
|
114
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
115
|
+
<ControlledFacetedFilter
|
|
116
|
+
title="Status (1 selected)"
|
|
117
|
+
options={STATUS_OPTIONS}
|
|
118
|
+
defaultSelected={["active"]}
|
|
119
|
+
/>
|
|
120
|
+
<ControlledFacetedFilter
|
|
121
|
+
title="Status (2 selected)"
|
|
122
|
+
options={STATUS_OPTIONS}
|
|
123
|
+
defaultSelected={["active", "pending"]}
|
|
124
|
+
/>
|
|
125
|
+
<ControlledFacetedFilter
|
|
126
|
+
title="Status (3+ selected)"
|
|
127
|
+
options={STATUS_OPTIONS}
|
|
128
|
+
defaultSelected={["active", "inactive", "pending"]}
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
),
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// No other story ever opens the popover — every one renders only the closed
|
|
135
|
+
// trigger, so the per-row selection indicator (the thing corrections.md #026
|
|
136
|
+
// was about) never appeared in a Chromatic snapshot. This story exists
|
|
137
|
+
// specifically to put that row in front of visual regression, not just the
|
|
138
|
+
// lint: clicks the trigger, waits for the real popover content (Popover
|
|
139
|
+
// portals to document.body, same reason Dialog's play function below queries
|
|
140
|
+
// from there), and asserts the pre-checked option's Checkbox primitive
|
|
141
|
+
// reports data-state="checked" — the exact state that used to render as a
|
|
142
|
+
// filled circle instead of a checkbox.
|
|
143
|
+
export const OpenShowingSelection: Story = {
|
|
144
|
+
parameters: { controls: { disable: true } },
|
|
145
|
+
render: () => (
|
|
146
|
+
<ControlledFacetedFilter
|
|
147
|
+
title="Status"
|
|
148
|
+
options={STATUS_OPTIONS}
|
|
149
|
+
defaultSelected={["pending"]}
|
|
150
|
+
/>
|
|
151
|
+
),
|
|
152
|
+
play: async ({ canvasElement }) => {
|
|
153
|
+
const canvas = within(canvasElement)
|
|
154
|
+
await userEvent.click(canvas.getByRole("button", { name: /status/i }))
|
|
155
|
+
const body = within(document.body)
|
|
156
|
+
// Start-anchored, not a bare substring regex (/active/i also matches
|
|
157
|
+
// "Inactive") and not an exact string (the row's accessible name is the
|
|
158
|
+
// label plus the count span's text, e.g. "Pending 17 items").
|
|
159
|
+
const pendingOption = await body.findByRole("option", { name: /^pending\b/i })
|
|
160
|
+
await waitFor(() => expect(pendingOption).toBeVisible())
|
|
161
|
+
const indicator = pendingOption.querySelector('[data-slot="checkbox"]')
|
|
162
|
+
expect(indicator).toHaveAttribute("data-state", "checked")
|
|
163
|
+
const activeOption = body.getByRole("option", { name: /^active\b/i })
|
|
164
|
+
expect(
|
|
165
|
+
activeOption.querySelector('[data-slot="checkbox"]')
|
|
166
|
+
).toHaveAttribute("data-state", "unchecked")
|
|
167
|
+
},
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export const WithIcons: Story = {
|
|
171
|
+
parameters: { controls: { disable: true } },
|
|
172
|
+
render: () => (
|
|
173
|
+
<ControlledFacetedFilter title="Priority" options={PRIORITY_OPTIONS} />
|
|
174
|
+
),
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export const RealisticUse: Story = {
|
|
178
|
+
parameters: { controls: { disable: true } },
|
|
179
|
+
render: () => (
|
|
180
|
+
<div className="flex flex-wrap items-center gap-2 rounded-lg border bg-card p-4">
|
|
181
|
+
<span className="text-sm font-medium text-muted-foreground">
|
|
182
|
+
Filters:
|
|
183
|
+
</span>
|
|
184
|
+
<ControlledFacetedFilter
|
|
185
|
+
title="Status"
|
|
186
|
+
options={USER_STATUS_OPTIONS}
|
|
187
|
+
defaultSelected={["verified"]}
|
|
188
|
+
/>
|
|
189
|
+
<ControlledFacetedFilter title="Role" options={ROLE_OPTIONS} />
|
|
190
|
+
<ControlledFacetedFilter
|
|
191
|
+
title="Team"
|
|
192
|
+
options={TEAM_OPTIONS}
|
|
193
|
+
defaultSelected={["engineering", "design"]}
|
|
194
|
+
/>
|
|
195
|
+
</div>
|
|
196
|
+
),
|
|
197
|
+
}
|
|
@@ -22,6 +22,7 @@ export default meta;
|
|
|
22
22
|
type Story = StoryObj<typeof meta>;
|
|
23
23
|
|
|
24
24
|
export const Default: Story = {
|
|
25
|
+
parameters: { controls: { disable: true } },
|
|
25
26
|
render: () => (
|
|
26
27
|
<Field name="email" required>
|
|
27
28
|
<FieldLabel>Email address</FieldLabel>
|
|
@@ -34,6 +35,7 @@ export const Default: Story = {
|
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
export const Variant_WithError: Story = {
|
|
38
|
+
parameters: { controls: { disable: true } },
|
|
37
39
|
render: () => (
|
|
38
40
|
<Field name="email" required invalid>
|
|
39
41
|
<FieldLabel>Email address</FieldLabel>
|
|
@@ -47,6 +49,7 @@ export const Variant_WithError: Story = {
|
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
export const Variant_Horizontal: Story = {
|
|
52
|
+
parameters: { controls: { disable: true } },
|
|
50
53
|
render: () => (
|
|
51
54
|
<Field name="username" layout="horizontal">
|
|
52
55
|
<FieldLabel className="w-32 shrink-0">Username</FieldLabel>
|
|
@@ -58,6 +61,7 @@ export const Variant_Horizontal: Story = {
|
|
|
58
61
|
};
|
|
59
62
|
|
|
60
63
|
export const Variant_Textarea: Story = {
|
|
64
|
+
parameters: { controls: { disable: true } },
|
|
61
65
|
render: () => (
|
|
62
66
|
<Field name="bio">
|
|
63
67
|
<FieldLabel>Bio</FieldLabel>
|
|
@@ -70,6 +74,7 @@ export const Variant_Textarea: Story = {
|
|
|
70
74
|
};
|
|
71
75
|
|
|
72
76
|
export const Disabled: Story = {
|
|
77
|
+
parameters: { controls: { disable: true } },
|
|
73
78
|
render: () => (
|
|
74
79
|
<Field name="readonly-field" disabled>
|
|
75
80
|
<FieldLabel>Locked field</FieldLabel>
|
|
@@ -82,6 +87,7 @@ export const Disabled: Story = {
|
|
|
82
87
|
};
|
|
83
88
|
|
|
84
89
|
export const RealisticUse: Story = {
|
|
90
|
+
parameters: { controls: { disable: true } },
|
|
85
91
|
render: () => {
|
|
86
92
|
const [email, setEmail] = useState("");
|
|
87
93
|
const [password, setPassword] = useState("");
|
|
@@ -136,6 +142,7 @@ export const RealisticUse: Story = {
|
|
|
136
142
|
};
|
|
137
143
|
|
|
138
144
|
export const FieldGroup_TwoColumn: Story = {
|
|
145
|
+
parameters: { controls: { disable: true } },
|
|
139
146
|
render: () => (
|
|
140
147
|
<FieldGroup columns={2} className="w-full max-w-2xl">
|
|
141
148
|
<Field name="firstName" required>
|
|
@@ -44,6 +44,7 @@ const notificationRow = (id: string, label: string, defaultChecked = false) => (
|
|
|
44
44
|
// border ever strikes through the legend title again, fieldset.tsx's
|
|
45
45
|
// FieldsetLegend float rule regressed — see the 2026-07-06 prod fix.
|
|
46
46
|
export const Default: Story = {
|
|
47
|
+
parameters: { controls: { disable: true } },
|
|
47
48
|
render: () => (
|
|
48
49
|
<Fieldset className="w-96">
|
|
49
50
|
<FieldsetLegend>Notification preferences</FieldsetLegend>
|
|
@@ -58,6 +59,7 @@ export const Default: Story = {
|
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
export const Variant_Unstyled: Story = {
|
|
62
|
+
parameters: { controls: { disable: true } },
|
|
61
63
|
render: () => (
|
|
62
64
|
<Fieldset variant="unstyled" className="w-96">
|
|
63
65
|
<FieldsetLegend>Release channel</FieldsetLegend>
|
|
@@ -87,6 +89,7 @@ export const Variant_Unstyled: Story = {
|
|
|
87
89
|
};
|
|
88
90
|
|
|
89
91
|
export const Size_Sm: Story = {
|
|
92
|
+
parameters: { controls: { disable: true } },
|
|
90
93
|
render: () => (
|
|
91
94
|
<Fieldset size="sm" className="w-80">
|
|
92
95
|
<FieldsetLegend>Plan tier</FieldsetLegend>
|
|
@@ -110,6 +113,7 @@ export const Size_Sm: Story = {
|
|
|
110
113
|
};
|
|
111
114
|
|
|
112
115
|
export const Size_Default: Story = {
|
|
116
|
+
parameters: { controls: { disable: true } },
|
|
113
117
|
render: () => (
|
|
114
118
|
<Fieldset size="default" className="w-80">
|
|
115
119
|
<FieldsetLegend>Plan tier</FieldsetLegend>
|
|
@@ -133,6 +137,7 @@ export const Size_Default: Story = {
|
|
|
133
137
|
};
|
|
134
138
|
|
|
135
139
|
export const Size_Lg: Story = {
|
|
140
|
+
parameters: { controls: { disable: true } },
|
|
136
141
|
render: () => (
|
|
137
142
|
<Fieldset size="lg" className="w-80">
|
|
138
143
|
<FieldsetLegend>Plan tier</FieldsetLegend>
|
|
@@ -156,6 +161,7 @@ export const Size_Lg: Story = {
|
|
|
156
161
|
};
|
|
157
162
|
|
|
158
163
|
export const Disabled: Story = {
|
|
164
|
+
parameters: { controls: { disable: true } },
|
|
159
165
|
render: () => (
|
|
160
166
|
<Fieldset disabled className="w-96">
|
|
161
167
|
<FieldsetLegend>Notification preferences</FieldsetLegend>
|
|
@@ -171,6 +177,7 @@ export const Disabled: Story = {
|
|
|
171
177
|
};
|
|
172
178
|
|
|
173
179
|
export const Invalid: Story = {
|
|
180
|
+
parameters: { controls: { disable: true } },
|
|
174
181
|
render: () => (
|
|
175
182
|
<Fieldset invalid className="w-96">
|
|
176
183
|
<FieldsetLegend>Contact method</FieldsetLegend>
|
|
@@ -195,6 +202,7 @@ export const Invalid: Story = {
|
|
|
195
202
|
};
|
|
196
203
|
|
|
197
204
|
export const RealisticUse: Story = {
|
|
205
|
+
parameters: { controls: { disable: true } },
|
|
198
206
|
render: () => {
|
|
199
207
|
const [country, setCountry] = React.useState("");
|
|
200
208
|
const invalid = country.trim().length === 0;
|
|
@@ -35,10 +35,12 @@ export default meta
|
|
|
35
35
|
type Story = StoryObj<typeof FileButton>
|
|
36
36
|
|
|
37
37
|
export const Default: Story = {
|
|
38
|
+
parameters: { controls: { disable: true } },
|
|
38
39
|
render: () => <FileButton onChange={() => {}} />,
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export const Variant_Solid: Story = {
|
|
43
|
+
parameters: { controls: { disable: true } },
|
|
42
44
|
render: () => (
|
|
43
45
|
<FileButton variant="default" accept="image/*" onChange={() => {}}>
|
|
44
46
|
Upload photo
|
|
@@ -65,6 +67,7 @@ export const Multiple: Story = {
|
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
export const Accepts_PDF: Story = {
|
|
70
|
+
parameters: { controls: { disable: true } },
|
|
68
71
|
render: () => (
|
|
69
72
|
<FileButton accept=".pdf" onChange={() => {}}>
|
|
70
73
|
Attach document
|
|
@@ -73,6 +76,7 @@ export const Accepts_PDF: Story = {
|
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
export const Disabled: Story = {
|
|
79
|
+
parameters: { controls: { disable: true } },
|
|
76
80
|
render: () => <FileButton disabled onChange={() => {}} />,
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -15,35 +15,31 @@ type Story = StoryObj<typeof FileUpload>;
|
|
|
15
15
|
|
|
16
16
|
// ─── Default ─────────────────────────────────────────────────────────────────
|
|
17
17
|
export const Default: Story = {
|
|
18
|
-
|
|
18
|
+
args: { "aria-label": "Upload file" },
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
// ─── Size variants ────────────────────────────────────────────────────────────
|
|
22
22
|
export const Size_Sm: Story = {
|
|
23
|
-
|
|
23
|
+
args: { size: "sm", "aria-label": "Upload file" },
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export const Size_Default: Story = {
|
|
27
|
-
|
|
27
|
+
args: { size: "default", "aria-label": "Upload file" },
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export const Size_Lg: Story = {
|
|
31
|
-
|
|
31
|
+
args: { size: "lg", "aria-label": "Upload file" },
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
// ─── With accept constraint ───────────────────────────────────────────────────
|
|
35
35
|
export const AcceptImages: Story = {
|
|
36
|
-
|
|
37
|
-
<FileUpload
|
|
38
|
-
accept="image/png,image/jpeg,image/webp"
|
|
39
|
-
aria-label="Upload image"
|
|
40
|
-
/>
|
|
41
|
-
),
|
|
36
|
+
args: { accept: "image/png,image/jpeg,image/webp", "aria-label": "Upload image" },
|
|
42
37
|
name: "Accept images only",
|
|
43
38
|
};
|
|
44
39
|
|
|
45
40
|
// ─── With max size ────────────────────────────────────────────────────────────
|
|
46
41
|
export const MaxSize: Story = {
|
|
42
|
+
parameters: { controls: { disable: true } },
|
|
47
43
|
render: () => (
|
|
48
44
|
<FileUpload
|
|
49
45
|
maxSize={5 * 1024 * 1024}
|
|
@@ -55,17 +51,12 @@ export const MaxSize: Story = {
|
|
|
55
51
|
|
|
56
52
|
// ─── Multiple ─────────────────────────────────────────────────────────────────
|
|
57
53
|
export const Multiple: Story = {
|
|
58
|
-
|
|
59
|
-
<FileUpload
|
|
60
|
-
multiple
|
|
61
|
-
aria-label="Upload files"
|
|
62
|
-
/>
|
|
63
|
-
),
|
|
54
|
+
args: { multiple: true, "aria-label": "Upload files" },
|
|
64
55
|
};
|
|
65
56
|
|
|
66
57
|
// ─── Disabled ─────────────────────────────────────────────────────────────────
|
|
67
58
|
export const Disabled: Story = {
|
|
68
|
-
|
|
59
|
+
args: { disabled: true, "aria-label": "Upload file" },
|
|
69
60
|
};
|
|
70
61
|
|
|
71
62
|
// ─── Realistic use: project brief upload ─────────────────────────────────────
|
|
@@ -129,6 +120,14 @@ function ProjectBriefUpload() {
|
|
|
129
120
|
);
|
|
130
121
|
}
|
|
131
122
|
|
|
123
|
+
// Drop a .pdf or a large image here: the zone flashes red for two seconds AND a screen reader hears
|
|
124
|
+
// "1 file not added: wrong type or too large." (a polite live region inside the component).
|
|
125
|
+
export const RejectionIsAnnounced: Story = {
|
|
126
|
+
parameters: { controls: { disable: true } },
|
|
127
|
+
render: () => <FileUpload accept=".png,.jpg" maxSize={50 * 1024} multiple aria-label="Photos, 50 KB each" />,
|
|
128
|
+
};
|
|
129
|
+
|
|
132
130
|
export const RealisticUse: Story = {
|
|
131
|
+
parameters: { controls: { disable: true } },
|
|
133
132
|
render: () => <ProjectBriefUpload />,
|
|
134
133
|
};
|
|
@@ -32,14 +32,7 @@ export const Default: Story = {
|
|
|
32
32
|
|
|
33
33
|
export const Focused: Story = {
|
|
34
34
|
name: "Focused (label floated)",
|
|
35
|
-
|
|
36
|
-
<FloatLabel
|
|
37
|
-
label="Display name"
|
|
38
|
-
type="text"
|
|
39
|
-
autoFocus
|
|
40
|
-
containerClassName="w-72"
|
|
41
|
-
/>
|
|
42
|
-
),
|
|
35
|
+
args: { label: "Display name", type: "text", autoFocus: true, containerClassName: "w-72" },
|
|
43
36
|
};
|
|
44
37
|
|
|
45
38
|
export const Filled: Story = {
|
|
@@ -53,6 +46,7 @@ export const Filled: Story = {
|
|
|
53
46
|
};
|
|
54
47
|
|
|
55
48
|
export const WithError: Story = {
|
|
49
|
+
parameters: { controls: { disable: true } },
|
|
56
50
|
render: () => (
|
|
57
51
|
<div className="grid w-72 gap-2">
|
|
58
52
|
<FloatLabel
|
|
@@ -109,6 +103,7 @@ export const Size_LG: Story = {
|
|
|
109
103
|
|
|
110
104
|
export const RealisticUse: Story = {
|
|
111
105
|
name: "RealisticUse (sign-in form)",
|
|
106
|
+
parameters: { controls: { disable: true } },
|
|
112
107
|
render: () => (
|
|
113
108
|
<Card className="w-80">
|
|
114
109
|
<CardHeader>
|
|
@@ -44,6 +44,7 @@ function DemoFrame({ children }: { children: React.ReactNode }) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export const Default: Story = {
|
|
47
|
+
parameters: { controls: { disable: true } },
|
|
47
48
|
render: () => (
|
|
48
49
|
<DemoFrame>
|
|
49
50
|
<FloatingActionButton
|
|
@@ -55,6 +56,7 @@ export const Default: Story = {
|
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
export const Variant_Secondary: Story = {
|
|
59
|
+
parameters: { controls: { disable: true } },
|
|
58
60
|
render: () => (
|
|
59
61
|
<DemoFrame>
|
|
60
62
|
<FloatingActionButton
|
|
@@ -67,6 +69,7 @@ export const Variant_Secondary: Story = {
|
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
export const WithLabel: Story = {
|
|
72
|
+
parameters: { controls: { disable: true } },
|
|
70
73
|
render: () => (
|
|
71
74
|
<DemoFrame>
|
|
72
75
|
{/* Extended (pill) form — the visible label IS the accessible name. */}
|
|
@@ -79,6 +82,7 @@ export const WithLabel: Story = {
|
|
|
79
82
|
};
|
|
80
83
|
|
|
81
84
|
export const Size_Sm: Story = {
|
|
85
|
+
parameters: { controls: { disable: true } },
|
|
82
86
|
render: () => (
|
|
83
87
|
<DemoFrame>
|
|
84
88
|
{/* 40px — below the 44px SC 2.5.5 floor. Dense/desktop-secondary
|
|
@@ -94,6 +98,7 @@ export const Size_Sm: Story = {
|
|
|
94
98
|
};
|
|
95
99
|
|
|
96
100
|
export const Size_Md: Story = {
|
|
101
|
+
parameters: { controls: { disable: true } },
|
|
97
102
|
render: () => (
|
|
98
103
|
<DemoFrame>
|
|
99
104
|
<FloatingActionButton
|
|
@@ -106,6 +111,7 @@ export const Size_Md: Story = {
|
|
|
106
111
|
};
|
|
107
112
|
|
|
108
113
|
export const Size_Lg: Story = {
|
|
114
|
+
parameters: { controls: { disable: true } },
|
|
109
115
|
render: () => (
|
|
110
116
|
<DemoFrame>
|
|
111
117
|
<FloatingActionButton
|
|
@@ -118,6 +124,7 @@ export const Size_Lg: Story = {
|
|
|
118
124
|
};
|
|
119
125
|
|
|
120
126
|
export const Corner_BottomLeft: Story = {
|
|
127
|
+
parameters: { controls: { disable: true } },
|
|
121
128
|
render: () => (
|
|
122
129
|
<DemoFrame>
|
|
123
130
|
<FloatingActionButton
|
|
@@ -130,6 +137,7 @@ export const Corner_BottomLeft: Story = {
|
|
|
130
137
|
};
|
|
131
138
|
|
|
132
139
|
export const Loading: Story = {
|
|
140
|
+
parameters: { controls: { disable: true } },
|
|
133
141
|
render: () => (
|
|
134
142
|
<DemoFrame>
|
|
135
143
|
{/* Spinner replaces the icon; aria-busy + disabled via Button. The
|
|
@@ -144,6 +152,7 @@ export const Loading: Story = {
|
|
|
144
152
|
};
|
|
145
153
|
|
|
146
154
|
export const Disabled: Story = {
|
|
155
|
+
parameters: { controls: { disable: true } },
|
|
147
156
|
render: () => (
|
|
148
157
|
<DemoFrame>
|
|
149
158
|
<FloatingActionButton
|
|
@@ -182,6 +191,7 @@ const reviewQueue = [
|
|
|
182
191
|
];
|
|
183
192
|
|
|
184
193
|
export const RealisticUse: Story = {
|
|
194
|
+
parameters: { controls: { disable: true } },
|
|
185
195
|
render: () => (
|
|
186
196
|
<div className="relative h-80 w-[420px] overflow-hidden rounded-lg border border-border bg-card [transform:translateZ(0)]">
|
|
187
197
|
<div className="h-full overflow-y-auto p-4" tabIndex={0}>
|
|
@@ -101,6 +101,7 @@ function TabBarDemo() {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
export const Default: Story = {
|
|
104
|
+
parameters: { controls: { disable: true } },
|
|
104
105
|
render: () => <TabBarDemo />,
|
|
105
106
|
};
|
|
106
107
|
|
|
@@ -163,6 +164,7 @@ function PillNavDemo() {
|
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
export const PillNav: Story = {
|
|
167
|
+
parameters: { controls: { disable: true } },
|
|
166
168
|
render: () => <PillNavDemo />,
|
|
167
169
|
};
|
|
168
170
|
|
|
@@ -228,6 +230,7 @@ function VerticalNavDemo() {
|
|
|
228
230
|
}
|
|
229
231
|
|
|
230
232
|
export const VerticalNav: Story = {
|
|
233
|
+
parameters: { controls: { disable: true } },
|
|
231
234
|
render: () => <VerticalNavDemo />,
|
|
232
235
|
};
|
|
233
236
|
|
|
@@ -339,5 +342,6 @@ function RealisticUseDemo() {
|
|
|
339
342
|
}
|
|
340
343
|
|
|
341
344
|
export const RealisticUse: Story = {
|
|
345
|
+
parameters: { controls: { disable: true } },
|
|
342
346
|
render: () => <RealisticUseDemo />,
|
|
343
347
|
};
|
|
@@ -36,6 +36,7 @@ function CanvasBackdrop() {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export const Default: Story = {
|
|
39
|
+
parameters: { controls: { disable: true } },
|
|
39
40
|
render: () => (
|
|
40
41
|
<div className="relative min-h-96">
|
|
41
42
|
<CanvasBackdrop />
|
|
@@ -47,6 +48,7 @@ export const Default: Story = {
|
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
export const WithTitle: Story = {
|
|
51
|
+
parameters: { controls: { disable: true } },
|
|
50
52
|
render: () => (
|
|
51
53
|
<div className="relative min-h-96">
|
|
52
54
|
<CanvasBackdrop />
|
|
@@ -80,10 +82,12 @@ function WithCloseButtonDemo() {
|
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
export const WithCloseButton: Story = {
|
|
85
|
+
parameters: { controls: { disable: true } },
|
|
83
86
|
render: () => <WithCloseButtonDemo />,
|
|
84
87
|
};
|
|
85
88
|
|
|
86
89
|
export const TopLeft: Story = {
|
|
90
|
+
parameters: { controls: { disable: true } },
|
|
87
91
|
render: () => (
|
|
88
92
|
<div className="relative min-h-96">
|
|
89
93
|
<CanvasBackdrop />
|
|
@@ -107,6 +111,7 @@ export const TopLeft: Story = {
|
|
|
107
111
|
*/
|
|
108
112
|
export const AllPositions: Story = {
|
|
109
113
|
tags: ["!manifest"],
|
|
114
|
+
parameters: { controls: { disable: true } },
|
|
110
115
|
render: () => (
|
|
111
116
|
<div className="relative flex flex-col items-start gap-4 p-8">
|
|
112
117
|
<FloatingPanel className="static" title="Bottom right (default)">
|
|
@@ -180,5 +185,6 @@ function RealisticUseDemo() {
|
|
|
180
185
|
}
|
|
181
186
|
|
|
182
187
|
export const RealisticUse: Story = {
|
|
188
|
+
parameters: { controls: { disable: true } },
|
|
183
189
|
render: () => <RealisticUseDemo />,
|
|
184
190
|
};
|
|
@@ -23,6 +23,7 @@ export default meta;
|
|
|
23
23
|
type Story = StoryObj<typeof meta>;
|
|
24
24
|
|
|
25
25
|
export const Default: Story = {
|
|
26
|
+
parameters: { controls: { disable: true } },
|
|
26
27
|
render: () => {
|
|
27
28
|
const [open, setOpen] = React.useState(false);
|
|
28
29
|
return (
|
|
@@ -68,6 +69,7 @@ export const Default: Story = {
|
|
|
68
69
|
};
|
|
69
70
|
|
|
70
71
|
export const Deactivated: Story = {
|
|
72
|
+
parameters: { controls: { disable: true } },
|
|
71
73
|
render: () => (
|
|
72
74
|
<FocusTrap
|
|
73
75
|
active={false}
|
|
@@ -86,6 +88,7 @@ export const Deactivated: Story = {
|
|
|
86
88
|
};
|
|
87
89
|
|
|
88
90
|
export const WithEscapeKey: Story = {
|
|
91
|
+
parameters: { controls: { disable: true } },
|
|
89
92
|
render: () => {
|
|
90
93
|
const [open, setOpen] = React.useState(false);
|
|
91
94
|
const [log, setLog] = React.useState<string[]>([]);
|
|
@@ -131,6 +134,7 @@ export const WithEscapeKey: Story = {
|
|
|
131
134
|
};
|
|
132
135
|
|
|
133
136
|
export const WithInitialFocus: Story = {
|
|
137
|
+
parameters: { controls: { disable: true } },
|
|
134
138
|
render: () => {
|
|
135
139
|
const [open, setOpen] = React.useState(false);
|
|
136
140
|
return (
|
|
@@ -165,6 +169,7 @@ export const WithInitialFocus: Story = {
|
|
|
165
169
|
};
|
|
166
170
|
|
|
167
171
|
export const RealisticUse: Story = {
|
|
172
|
+
parameters: { controls: { disable: true } },
|
|
168
173
|
render: () => {
|
|
169
174
|
const [open, setOpen] = React.useState(false);
|
|
170
175
|
return (
|
|
@@ -32,6 +32,7 @@ type Story = StoryObj<typeof meta>
|
|
|
32
32
|
// Chakra defaults and what OS file managers report — not IEC base-1024.
|
|
33
33
|
|
|
34
34
|
export const Default: Story = {
|
|
35
|
+
parameters: { controls: { disable: true } },
|
|
35
36
|
render: () => (
|
|
36
37
|
<p className="text-sm text-foreground">
|
|
37
38
|
roi-report-2026-06.pdf —{" "}
|
|
@@ -41,6 +42,7 @@ export const Default: Story = {
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
export const Size_Bytes: Story = {
|
|
45
|
+
parameters: { controls: { disable: true } },
|
|
44
46
|
render: () => (
|
|
45
47
|
<p className="text-sm text-foreground">
|
|
46
48
|
favicon.svg — <FormatByte value={500} className="font-medium" />
|
|
@@ -49,6 +51,7 @@ export const Size_Bytes: Story = {
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
export const Size_KB: Story = {
|
|
54
|
+
parameters: { controls: { disable: true } },
|
|
52
55
|
render: () => (
|
|
53
56
|
<p className="text-sm text-foreground">
|
|
54
57
|
Icon sprite chunk — <FormatByte value={2048} className="font-medium" />
|
|
@@ -57,6 +60,7 @@ export const Size_KB: Story = {
|
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
export const Size_GB: Story = {
|
|
63
|
+
parameters: { controls: { disable: true } },
|
|
60
64
|
render: () => (
|
|
61
65
|
<p className="text-sm text-foreground">
|
|
62
66
|
chromatic-snapshots-2026-06.zip —{" "}
|
|
@@ -66,6 +70,7 @@ export const Size_GB: Story = {
|
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
export const Precision_Zero: Story = {
|
|
73
|
+
parameters: { controls: { disable: true } },
|
|
69
74
|
render: () => (
|
|
70
75
|
<div className="space-y-2 text-sm text-foreground">
|
|
71
76
|
<p>
|
|
@@ -85,6 +90,7 @@ export const Precision_Zero: Story = {
|
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
export const RealisticUse: Story = {
|
|
93
|
+
parameters: { controls: { disable: true } },
|
|
88
94
|
render: () => (
|
|
89
95
|
<Card className="w-96">
|
|
90
96
|
<CardHeader>
|