@behavioral-agentic-design-system/core 0.37.0 → 0.39.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 +8 -4
- package/scripts/a11y-lint.cjs +8 -2
- package/scripts/a11y-ratchet.mjs +172 -0
- package/scripts/accent-as-text.mjs +274 -0
- package/scripts/bads-doctor.mjs +2 -1
- package/scripts/check-stories.mjs +265 -52
- package/scripts/contrast.mjs +44 -0
- package/scripts/health-report.mjs +211 -122
- package/scripts/lint-slop.mjs +44 -2
- package/scripts/oklch-to-hex.cjs +7 -1
- package/scripts/ratchet.mjs +326 -0
- package/scripts/slop-rules.mjs +156 -0
- package/scripts/token-nearest.mjs +333 -0
- package/scripts/wcag-audit.cjs +59 -8
- package/src/app/preview/components/page.tsx +363 -0
- package/src/components/Foundations/Typography.stories.tsx +82 -21
- package/src/components/ui/accordion.tsx +67 -5
- package/src/components/ui/alert.tsx +20 -7
- package/src/components/ui/avatar.tsx +18 -4
- package/src/components/ui/breadcrumb.tsx +47 -0
- package/src/components/ui/checkbox-card.tsx +48 -8
- package/src/components/ui/checkbox.tsx +17 -8
- package/src/components/ui/format-date.tsx +107 -0
- package/src/components/ui/progress.tsx +6 -5
- package/src/components/ui/sparkline.tsx +198 -0
- package/src/components/ui/tag.tsx +17 -1
- package/src/components/ui/tags-input.tsx +84 -11
- package/src/components/ui/toggle-group.tsx +13 -0
- package/src/components/ui/week-picker.tsx +463 -0
- package/src/data/docs-index.ts +12 -0
- package/src/lib/theme-editor.ts +7 -1
- package/src/stories/Accordion.stories.tsx +59 -1
- package/src/stories/ActionBar.stories.tsx +1 -1
- package/src/stories/Affix.stories.tsx +1 -1
- package/src/stories/AiBadge.stories.tsx +1 -1
- package/src/stories/Alert.stories.tsx +36 -1
- package/src/stories/AlertDialog.stories.tsx +1 -1
- package/src/stories/Anchor.stories.tsx +1 -1
- package/src/stories/AngleSlider.stories.tsx +1 -1
- package/src/stories/AspectRatio.stories.tsx +1 -1
- package/src/stories/Autocomplete.stories.tsx +1 -1
- package/src/stories/Avatar.stories.tsx +41 -1
- package/src/stories/Badge.stories.tsx +1 -1
- package/src/stories/Blockquote.stories.tsx +1 -1
- package/src/stories/BottomNavigation.stories.tsx +1 -1
- package/src/stories/Breadcrumb.stories.tsx +38 -5
- package/src/stories/Burger.stories.tsx +1 -1
- package/src/stories/Button.stories.tsx +9 -1
- package/src/stories/ButtonGroup.stories.tsx +1 -1
- package/src/stories/Calendar.stories.tsx +1 -1
- package/src/stories/Card.stories.tsx +1 -1
- package/src/stories/Carousel.stories.tsx +1 -1
- package/src/stories/Cascader.stories.tsx +1 -1
- package/src/stories/Chart.stories.tsx +1 -1
- package/src/stories/ChatBubble.stories.tsx +1 -1
- package/src/stories/ChatMarker.stories.tsx +1 -1
- package/src/stories/Checkbox.stories.tsx +36 -5
- package/src/stories/CheckboxCard.stories.tsx +37 -2
- package/src/stories/CheckboxGroup.stories.tsx +1 -1
- package/src/stories/Chip.stories.tsx +1 -1
- package/src/stories/CircularProgress.stories.tsx +17 -1
- package/src/stories/Clipboard.stories.tsx +1 -1
- package/src/stories/CloseButton.stories.tsx +1 -1
- package/src/stories/Code.stories.tsx +1 -1
- package/src/stories/Collapsible.stories.tsx +1 -1
- package/src/stories/ColorPicker.stories.tsx +1 -1
- package/src/stories/ColorSwatch.stories.tsx +1 -1
- package/src/stories/Combobox.stories.tsx +1 -1
- package/src/stories/Command.stories.tsx +1 -1
- package/src/stories/Container.stories.tsx +1 -1
- package/src/stories/ContextMenu.stories.tsx +1 -1
- package/src/stories/CopyButton.stories.tsx +9 -1
- package/src/stories/DataList.stories.tsx +1 -1
- package/src/stories/DataTable.stories.tsx +1 -1
- package/src/stories/DateField.stories.tsx +1 -1
- package/src/stories/DatePicker.stories.tsx +1 -1
- package/src/stories/DateRangePicker.stories.tsx +1 -1
- package/src/stories/Dialog.stories.tsx +1 -1
- package/src/stories/Drawer.stories.tsx +1 -1
- package/src/stories/DropdownMenu.stories.tsx +1 -1
- package/src/stories/Editable.stories.tsx +1 -1
- package/src/stories/EmptyState.stories.tsx +1 -1
- package/src/stories/Field.stories.tsx +1 -1
- package/src/stories/Fieldset.stories.tsx +1 -1
- package/src/stories/FileButton.stories.tsx +1 -1
- package/src/stories/FileUpload.stories.tsx +1 -1
- package/src/stories/FloatLabel.stories.tsx +1 -1
- package/src/stories/FloatingActionButton.stories.tsx +1 -1
- package/src/stories/FloatingIndicator.stories.tsx +1 -1
- package/src/stories/FloatingPanel.stories.tsx +9 -1
- package/src/stories/FocusTrap.stories.tsx +1 -1
- package/src/stories/FormatByte.stories.tsx +1 -1
- package/src/stories/FormatDate.stories.tsx +174 -0
- package/src/stories/FormatNumber.stories.tsx +1 -1
- package/src/stories/Highlight.stories.tsx +1 -1
- package/src/stories/HoverCard.stories.tsx +1 -1
- package/src/stories/Image.stories.tsx +1 -1
- package/src/stories/Indicator.stories.tsx +17 -1
- package/src/stories/Input.stories.tsx +1 -1
- package/src/stories/InputClearButton.stories.tsx +1 -1
- package/src/stories/InputGroup.stories.tsx +1 -1
- package/src/stories/Kbd.stories.tsx +1 -1
- package/src/stories/KeyboardShortcut.stories.tsx +1 -1
- package/src/stories/Label.stories.tsx +1 -1
- package/src/stories/Link.stories.tsx +1 -1
- package/src/stories/List.stories.tsx +1 -1
- package/src/stories/Listbox.stories.tsx +1 -1
- package/src/stories/LoadingDots.stories.tsx +1 -1
- package/src/stories/LoadingOverlay.stories.tsx +1 -1
- package/src/stories/Mark.stories.tsx +1 -1
- package/src/stories/Marquee.stories.tsx +1 -1
- package/src/stories/Masonry.stories.tsx +1 -1
- package/src/stories/Menubar.stories.tsx +1 -1
- package/src/stories/Meter.stories.tsx +1 -1
- package/src/stories/MonthPicker.stories.tsx +1 -1
- package/src/stories/MotionToggle.stories.tsx +1 -1
- package/src/stories/MultiSelect.stories.tsx +1 -1
- package/src/stories/NativeSelect.stories.tsx +1 -1
- package/src/stories/NavLink.stories.tsx +1 -1
- package/src/stories/NavigationMenu.stories.tsx +1 -1
- package/src/stories/NavigationRail.stories.tsx +9 -1
- package/src/stories/Notification.stories.tsx +1 -1
- package/src/stories/NumberInput.stories.tsx +1 -1
- package/src/stories/Overlay.stories.tsx +1 -1
- package/src/stories/Pagination.stories.tsx +1 -1
- package/src/stories/PasswordInput.stories.tsx +1 -1
- package/src/stories/PinInput.stories.tsx +1 -1
- package/src/stories/Popover.stories.tsx +1 -1
- package/src/stories/Progress.stories.tsx +11 -1
- package/src/stories/Prose.stories.tsx +1 -1
- package/src/stories/QrCode.stories.tsx +1 -1
- package/src/stories/Questionnaire.stories.tsx +1 -1
- package/src/stories/RadioGroup.stories.tsx +1 -1
- package/src/stories/RatingGroup.stories.tsx +1 -1
- package/src/stories/Resizable.stories.tsx +1 -1
- package/src/stories/Result.stories.tsx +1 -1
- package/src/stories/Reveal.stories.tsx +1 -1
- package/src/stories/RollingNumber.stories.tsx +1 -1
- package/src/stories/ScrollArea.stories.tsx +1 -1
- package/src/stories/SearchInput.stories.tsx +1 -1
- package/src/stories/SegmentedControl.stories.tsx +1 -1
- package/src/stories/Select.stories.tsx +1 -1
- package/src/stories/Separator.stories.tsx +1 -1
- package/src/stories/Sheet.stories.tsx +1 -1
- package/src/stories/Sidebar.stories.tsx +1 -1
- package/src/stories/SignaturePad.stories.tsx +1 -1
- package/src/stories/SimpleGrid.stories.tsx +1 -1
- package/src/stories/Skeleton.stories.tsx +1 -1
- package/src/stories/SkeletonTable.stories.tsx +1 -1
- package/src/stories/SkipLink.stories.tsx +1 -1
- package/src/stories/Slider.stories.tsx +1 -1
- package/src/stories/Sonner.stories.tsx +1 -1
- package/src/stories/Sparkline.stories.tsx +208 -0
- package/src/stories/Spinner.stories.tsx +9 -1
- package/src/stories/Spoiler.stories.tsx +1 -1
- package/src/stories/Squircle.stories.tsx +1 -1
- package/src/stories/Stack.stories.tsx +1 -1
- package/src/stories/StatusBadge.stories.tsx +1 -1
- package/src/stories/Stepper.stories.tsx +1 -1
- package/src/stories/Switch.stories.tsx +1 -1
- package/src/stories/Table.stories.tsx +1 -1
- package/src/stories/Tabs.stories.tsx +1 -1
- package/src/stories/Tag.stories.tsx +23 -1
- package/src/stories/TagsInput.stories.tsx +46 -1
- package/src/stories/Text.stories.tsx +1 -1
- package/src/stories/Textarea.stories.tsx +1 -1
- package/src/stories/ThemeIcon.stories.tsx +1 -1
- package/src/stories/TimePicker.stories.tsx +1 -1
- package/src/stories/Timeline.stories.tsx +9 -1
- package/src/stories/Timer.stories.tsx +1 -1
- package/src/stories/Toggle.stories.tsx +1 -1
- package/src/stories/ToggleGroup.stories.tsx +21 -1
- package/src/stories/ToggleTip.stories.tsx +1 -1
- package/src/stories/Toolbar.stories.tsx +1 -1
- package/src/stories/Tooltip.stories.tsx +1 -1
- package/src/stories/Tour.stories.tsx +1 -1
- package/src/stories/TransferList.stories.tsx +1 -1
- package/src/stories/TreeSelect.stories.tsx +1 -1
- package/src/stories/TreeView.stories.tsx +1 -1
- package/src/stories/TypingIndicator.stories.tsx +1 -1
- package/src/stories/VisuallyHidden.stories.tsx +1 -1
- package/src/stories/Watermark.stories.tsx +1 -1
- package/src/stories/WeekPicker.stories.tsx +90 -0
- package/src/stories/WordRotate.stories.tsx +1 -1
- package/src/stories/YearPicker.stories.tsx +1 -1
- package/src/stories/story-groups.json +199 -0
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|
|
2
2
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@behavioral-agentic-design-system/core/components/ui/command";
|
|
3
3
|
|
|
4
4
|
const meta: Meta<typeof Command> = {
|
|
5
|
-
title: "Components/Command",
|
|
5
|
+
title: "Components/Navigation/Command",
|
|
6
6
|
component: Command,
|
|
7
7
|
parameters: { layout: "centered" },
|
|
8
8
|
tags: ["autodocs"],
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@behavioral-agentic-design-system/core/components/ui/card";
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof Container> = {
|
|
14
|
-
title: "Components/Container",
|
|
14
|
+
title: "Components/Layout/Container",
|
|
15
15
|
component: Container,
|
|
16
16
|
parameters: { layout: "fullscreen" },
|
|
17
17
|
tags: ["autodocs"],
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import { useState } from "react";
|
|
19
19
|
|
|
20
20
|
const meta: Meta<typeof ContextMenu> = {
|
|
21
|
-
title: "Components/ContextMenu",
|
|
21
|
+
title: "Components/Overlays/ContextMenu",
|
|
22
22
|
component: ContextMenu,
|
|
23
23
|
parameters: { layout: "centered" },
|
|
24
24
|
tags: ["autodocs"],
|
|
@@ -6,7 +6,7 @@ import * as React from "react"
|
|
|
6
6
|
import { CopyButton } from "@behavioral-agentic-design-system/core/components/ui/copy-button"
|
|
7
7
|
|
|
8
8
|
const meta: Meta<typeof CopyButton> = {
|
|
9
|
-
title: "Components/CopyButton",
|
|
9
|
+
title: "Components/Actions/CopyButton",
|
|
10
10
|
component: CopyButton,
|
|
11
11
|
parameters: {
|
|
12
12
|
layout: "centered",
|
|
@@ -101,7 +101,15 @@ export const RealisticUse: Story = {
|
|
|
101
101
|
},
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Every option at once, for a person comparing them side by side.
|
|
106
|
+
*
|
|
107
|
+
* Tagged out of the machine-readable manifest: an assistant reading this as an
|
|
108
|
+
* example learns to render a gallery of variants where a screen was asked for.
|
|
109
|
+
* It stays visible in the sidebar, where a human reads it as the reference it is.
|
|
110
|
+
*/
|
|
104
111
|
export const AllVariants: Story = {
|
|
112
|
+
tags: ["!manifest"],
|
|
105
113
|
render: () => (
|
|
106
114
|
<div className="flex flex-wrap items-center gap-3">
|
|
107
115
|
<CopyButton value="default" variant="default">Default</CopyButton>
|
|
@@ -10,7 +10,7 @@ import { Badge } from "@behavioral-agentic-design-system/core/components/ui/badg
|
|
|
10
10
|
import { Separator } from "@behavioral-agentic-design-system/core/components/ui/separator";
|
|
11
11
|
|
|
12
12
|
const meta: Meta<typeof DataList> = {
|
|
13
|
-
title: "Components/DataList",
|
|
13
|
+
title: "Components/Content and data/DataList",
|
|
14
14
|
component: DataList,
|
|
15
15
|
parameters: {
|
|
16
16
|
layout: "centered",
|
|
@@ -11,7 +11,7 @@ import { Badge } from "@behavioral-agentic-design-system/core/components/ui/badg
|
|
|
11
11
|
// ---------------------------------------------------------------------------
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof DataTable> = {
|
|
14
|
-
title: "Components/DataTable",
|
|
14
|
+
title: "Components/Content and data/DataTable",
|
|
15
15
|
component: DataTable,
|
|
16
16
|
parameters: {
|
|
17
17
|
layout: "padded",
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { Label } from "@behavioral-agentic-design-system/core/components/ui/label"
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof DateField> = {
|
|
14
|
-
title: "Components/DateField",
|
|
14
|
+
title: "Components/Dates and time/DateField",
|
|
15
15
|
component: DateField,
|
|
16
16
|
parameters: { layout: "centered" },
|
|
17
17
|
}
|
|
@@ -6,7 +6,7 @@ import { DatePicker } from "@behavioral-agentic-design-system/core/components/ui
|
|
|
6
6
|
// on DatePicker — they now map to startMonth/endMonth + disabled internally.
|
|
7
7
|
// Story coverage is unchanged; the public API is backward-compatible.
|
|
8
8
|
const meta: Meta<typeof DatePicker> = {
|
|
9
|
-
title: "Components/DatePicker",
|
|
9
|
+
title: "Components/Dates and time/DatePicker",
|
|
10
10
|
component: DatePicker,
|
|
11
11
|
parameters: { layout: "centered" },
|
|
12
12
|
tags: ["autodocs"],
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
// on DateRangePicker — they now map to startMonth/endMonth + disabled internally.
|
|
10
10
|
// Story coverage is unchanged; the public API is backward-compatible.
|
|
11
11
|
const meta: Meta<typeof DateRangePicker> = {
|
|
12
|
-
title: "Components/DateRangePicker",
|
|
12
|
+
title: "Components/Dates and time/DateRangePicker",
|
|
13
13
|
component: DateRangePicker,
|
|
14
14
|
parameters: { layout: "centered" },
|
|
15
15
|
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
20
20
|
|
|
21
21
|
const meta: Meta<typeof Dialog> = {
|
|
22
|
-
title: "Components/Dialog",
|
|
22
|
+
title: "Components/Overlays/Dialog",
|
|
23
23
|
component: Dialog,
|
|
24
24
|
parameters: {
|
|
25
25
|
layout: "centered",
|
|
@@ -14,7 +14,7 @@ import { Textarea } from "@behavioral-agentic-design-system/core/components/ui/t
|
|
|
14
14
|
import { Label } from "@behavioral-agentic-design-system/core/components/ui/label";
|
|
15
15
|
|
|
16
16
|
const meta: Meta<typeof Drawer> = {
|
|
17
|
-
title: "Components/Drawer",
|
|
17
|
+
title: "Components/Overlays/Drawer",
|
|
18
18
|
component: Drawer,
|
|
19
19
|
parameters: { layout: "centered" },
|
|
20
20
|
tags: ["autodocs"],
|
|
@@ -9,7 +9,7 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel,
|
|
|
9
9
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
10
10
|
|
|
11
11
|
const meta: Meta<typeof DropdownMenu> = {
|
|
12
|
-
title: "Components/DropdownMenu",
|
|
12
|
+
title: "Components/Overlays/DropdownMenu",
|
|
13
13
|
component: DropdownMenu,
|
|
14
14
|
parameters: { layout: "centered" },
|
|
15
15
|
tags: ["autodocs"],
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button"
|
|
21
21
|
|
|
22
22
|
const meta: Meta<typeof EmptyState> = {
|
|
23
|
-
title: "Components/EmptyState",
|
|
23
|
+
title: "Components/Feedback/EmptyState",
|
|
24
24
|
component: EmptyState,
|
|
25
25
|
parameters: {
|
|
26
26
|
layout: "centered",
|
|
@@ -13,7 +13,7 @@ import { Textarea } from "@behavioral-agentic-design-system/core/components/ui/t
|
|
|
13
13
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
14
14
|
|
|
15
15
|
const meta: Meta<typeof Field> = {
|
|
16
|
-
title: "Components/Field",
|
|
16
|
+
title: "Components/Forms/Field",
|
|
17
17
|
component: Field,
|
|
18
18
|
parameters: { layout: "padded" },
|
|
19
19
|
tags: ["autodocs"],
|
|
@@ -15,7 +15,7 @@ import { Label } from "@behavioral-agentic-design-system/core/components/ui/labe
|
|
|
15
15
|
import { Input } from "@behavioral-agentic-design-system/core/components/ui/input";
|
|
16
16
|
|
|
17
17
|
const meta: Meta<typeof Fieldset> = {
|
|
18
|
-
title: "Components/Fieldset",
|
|
18
|
+
title: "Components/Forms/Fieldset",
|
|
19
19
|
component: Fieldset,
|
|
20
20
|
parameters: {
|
|
21
21
|
layout: "centered",
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "@behavioral-agentic-design-system/core/components/ui/card"
|
|
20
20
|
|
|
21
21
|
const meta: Meta<typeof FileButton> = {
|
|
22
|
-
title: "Components/FileButton",
|
|
22
|
+
title: "Components/Actions/FileButton",
|
|
23
23
|
component: FileButton,
|
|
24
24
|
parameters: {
|
|
25
25
|
layout: "centered",
|
|
@@ -5,7 +5,7 @@ import { Label } from "@behavioral-agentic-design-system/core/components/ui/labe
|
|
|
5
5
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof FileUpload> = {
|
|
8
|
-
title: "Components/FileUpload",
|
|
8
|
+
title: "Components/Forms/FileUpload",
|
|
9
9
|
component: FileUpload,
|
|
10
10
|
parameters: { layout: "padded" },
|
|
11
11
|
tags: ["autodocs"],
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@behavioral-agentic-design-system/core/components/ui/card";
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof FloatLabel> = {
|
|
14
|
-
title: "Components/FloatLabel",
|
|
14
|
+
title: "Components/Forms/FloatLabel",
|
|
15
15
|
component: FloatLabel,
|
|
16
16
|
parameters: {
|
|
17
17
|
layout: "centered",
|
|
@@ -5,7 +5,7 @@ import { FloatingActionButton } from "@behavioral-agentic-design-system/core/com
|
|
|
5
5
|
import { Badge } from "@behavioral-agentic-design-system/core/components/ui/badge";
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof FloatingActionButton> = {
|
|
8
|
-
title: "Components/FloatingActionButton",
|
|
8
|
+
title: "Components/Actions/FloatingActionButton",
|
|
9
9
|
component: FloatingActionButton,
|
|
10
10
|
parameters: {
|
|
11
11
|
layout: "centered",
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
// ─── Meta ─────────────────────────────────────────────────────────────────────
|
|
21
21
|
|
|
22
22
|
const meta: Meta<typeof FloatingIndicator> = {
|
|
23
|
-
title: "Components/FloatingIndicator",
|
|
23
|
+
title: "Components/Layout/FloatingIndicator",
|
|
24
24
|
component: FloatingIndicator,
|
|
25
25
|
parameters: {
|
|
26
26
|
layout: "centered",
|
|
@@ -4,7 +4,7 @@ import { FloatingPanel } from "@behavioral-agentic-design-system/core/components
|
|
|
4
4
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof FloatingPanel> = {
|
|
7
|
-
title: "Components/FloatingPanel",
|
|
7
|
+
title: "Components/Layout/FloatingPanel",
|
|
8
8
|
component: FloatingPanel,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: "fullscreen",
|
|
@@ -98,7 +98,15 @@ export const TopLeft: Story = {
|
|
|
98
98
|
|
|
99
99
|
// All four corner anchors, rendered static so they stack in one canvas
|
|
100
100
|
// instead of piling onto the same viewport corners.
|
|
101
|
+
/**
|
|
102
|
+
* Every option at once, for a person comparing them side by side.
|
|
103
|
+
*
|
|
104
|
+
* Tagged out of the machine-readable manifest: an assistant reading this as an
|
|
105
|
+
* example learns to render a gallery of variants where a screen was asked for.
|
|
106
|
+
* It stays visible in the sidebar, where a human reads it as the reference it is.
|
|
107
|
+
*/
|
|
101
108
|
export const AllPositions: Story = {
|
|
109
|
+
tags: ["!manifest"],
|
|
102
110
|
render: () => (
|
|
103
111
|
<div className="relative flex flex-col items-start gap-4 p-8">
|
|
104
112
|
<FloatingPanel className="static" title="Bottom right (default)">
|
|
@@ -9,7 +9,7 @@ import { Input } from "@behavioral-agentic-design-system/core/components/ui/inpu
|
|
|
9
9
|
import { Label } from "@behavioral-agentic-design-system/core/components/ui/label";
|
|
10
10
|
|
|
11
11
|
const meta: Meta<typeof FocusTrap> = {
|
|
12
|
-
title: "Components/FocusTrap",
|
|
12
|
+
title: "Components/Layout/FocusTrap",
|
|
13
13
|
component: FocusTrap,
|
|
14
14
|
parameters: { layout: "centered" },
|
|
15
15
|
tags: ["autodocs"],
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@behavioral-agentic-design-system/core/components/ui/card"
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof FormatByte> = {
|
|
14
|
-
title: "Components/FormatByte",
|
|
14
|
+
title: "Components/Content and data/FormatByte",
|
|
15
15
|
component: FormatByte,
|
|
16
16
|
parameters: { layout: "centered" },
|
|
17
17
|
tags: ["autodocs"],
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
import { FormatDate } from "@behavioral-agentic-design-system/core/components/ui/format-date"
|
|
4
|
+
import {
|
|
5
|
+
Card,
|
|
6
|
+
CardContent,
|
|
7
|
+
CardDescription,
|
|
8
|
+
CardHeader,
|
|
9
|
+
CardTitle,
|
|
10
|
+
} from "@behavioral-agentic-design-system/core/components/ui/card"
|
|
11
|
+
|
|
12
|
+
const meta: Meta<typeof FormatDate> = {
|
|
13
|
+
title: "Components/Content and data/FormatDate",
|
|
14
|
+
component: FormatDate,
|
|
15
|
+
parameters: { layout: "centered" },
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
argTypes: {
|
|
18
|
+
locale: { control: "text" },
|
|
19
|
+
dateStyle: {
|
|
20
|
+
control: "select",
|
|
21
|
+
options: ["full", "long", "medium", "short"],
|
|
22
|
+
},
|
|
23
|
+
timeStyle: {
|
|
24
|
+
control: "select",
|
|
25
|
+
options: [undefined, "full", "long", "medium", "short"],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default meta
|
|
31
|
+
type Story = StoryObj<typeof meta>
|
|
32
|
+
|
|
33
|
+
// All dates come from content/personas/bads.json → primary.dates
|
|
34
|
+
// (real-content rule). Default locale is the explicit constant "en-US",
|
|
35
|
+
// never navigator.language, so SSR and client render identical markup.
|
|
36
|
+
|
|
37
|
+
// Engagement kickoff date used throughout these stories.
|
|
38
|
+
const KICKOFF = new Date(2026, 0, 15) // 2026-01-15
|
|
39
|
+
|
|
40
|
+
export const Default: Story = {
|
|
41
|
+
render: () => (
|
|
42
|
+
<p className="text-sm text-foreground">
|
|
43
|
+
Engagement start:{" "}
|
|
44
|
+
<FormatDate value={KICKOFF} className="font-medium" />
|
|
45
|
+
</p>
|
|
46
|
+
),
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const DateStyle_Full: Story = {
|
|
50
|
+
render: () => (
|
|
51
|
+
<p className="text-sm text-foreground">
|
|
52
|
+
<FormatDate value={KICKOFF} dateStyle="full" className="font-medium" />
|
|
53
|
+
</p>
|
|
54
|
+
),
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const DateStyle_Long: Story = {
|
|
58
|
+
render: () => (
|
|
59
|
+
<p className="text-sm text-foreground">
|
|
60
|
+
<FormatDate value={KICKOFF} dateStyle="long" className="font-medium" />
|
|
61
|
+
</p>
|
|
62
|
+
),
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const DateStyle_Short: Story = {
|
|
66
|
+
render: () => (
|
|
67
|
+
<p className="text-sm text-foreground">
|
|
68
|
+
<FormatDate value={KICKOFF} dateStyle="short" className="font-medium" />
|
|
69
|
+
</p>
|
|
70
|
+
),
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const WithTime: Story = {
|
|
74
|
+
render: () => (
|
|
75
|
+
<p className="text-sm text-foreground">
|
|
76
|
+
Report generated:{" "}
|
|
77
|
+
<FormatDate
|
|
78
|
+
value={new Date(2026, 5, 16, 14, 30, 0)}
|
|
79
|
+
dateStyle="long"
|
|
80
|
+
timeStyle="short"
|
|
81
|
+
className="font-medium"
|
|
82
|
+
/>
|
|
83
|
+
</p>
|
|
84
|
+
),
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const WithTimeStyle_Short: Story = {
|
|
88
|
+
render: () => (
|
|
89
|
+
<div className="space-y-2 text-sm text-foreground">
|
|
90
|
+
<p>
|
|
91
|
+
Full time:{" "}
|
|
92
|
+
<FormatDate
|
|
93
|
+
value={new Date(2026, 5, 16, 14, 30, 0)}
|
|
94
|
+
dateStyle="medium"
|
|
95
|
+
timeStyle="full"
|
|
96
|
+
className="font-medium"
|
|
97
|
+
/>
|
|
98
|
+
</p>
|
|
99
|
+
<p>
|
|
100
|
+
Short time:{" "}
|
|
101
|
+
<FormatDate
|
|
102
|
+
value={new Date(2026, 5, 16, 14, 30, 0)}
|
|
103
|
+
dateStyle="medium"
|
|
104
|
+
timeStyle="short"
|
|
105
|
+
className="font-medium"
|
|
106
|
+
/>
|
|
107
|
+
</p>
|
|
108
|
+
</div>
|
|
109
|
+
),
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export const RelativeFallback: Story = {
|
|
113
|
+
render: () => (
|
|
114
|
+
<div className="space-y-2 text-sm">
|
|
115
|
+
<p className="text-foreground">
|
|
116
|
+
With a value:{" "}
|
|
117
|
+
<FormatDate value={KICKOFF} className="font-medium" />
|
|
118
|
+
</p>
|
|
119
|
+
<p className="text-muted-foreground">
|
|
120
|
+
With undefined value (empty span, no error):{" "}
|
|
121
|
+
<FormatDate value={undefined} className="font-medium" />
|
|
122
|
+
<span className="italic"> ← nothing rendered</span>
|
|
123
|
+
</p>
|
|
124
|
+
<p className="text-xs text-muted-foreground">
|
|
125
|
+
When value is undefined or null, FormatDate renders an empty span
|
|
126
|
+
rather than throwing — useful for async / optional dates.
|
|
127
|
+
</p>
|
|
128
|
+
</div>
|
|
129
|
+
),
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export const RealisticUse: Story = {
|
|
133
|
+
render: () => (
|
|
134
|
+
<Card className="w-96">
|
|
135
|
+
<CardHeader>
|
|
136
|
+
<CardTitle>ROI report</CardTitle>
|
|
137
|
+
<CardDescription>
|
|
138
|
+
Austin design systems team — quarterly summary
|
|
139
|
+
</CardDescription>
|
|
140
|
+
</CardHeader>
|
|
141
|
+
<CardContent>
|
|
142
|
+
<article className="space-y-3 text-sm text-foreground">
|
|
143
|
+
<p className="text-xs text-muted-foreground font-medium uppercase tracking-wide">
|
|
144
|
+
Published{" "}
|
|
145
|
+
<FormatDate
|
|
146
|
+
value={new Date(2026, 8, 9)}
|
|
147
|
+
dateStyle="long"
|
|
148
|
+
className="normal-case"
|
|
149
|
+
/>
|
|
150
|
+
</p>
|
|
151
|
+
<p>
|
|
152
|
+
The engagement ran from{" "}
|
|
153
|
+
<FormatDate value={KICKOFF} dateStyle="long" className="font-medium" />{" "}
|
|
154
|
+
through{" "}
|
|
155
|
+
<FormatDate
|
|
156
|
+
value={new Date(2026, 5, 30)}
|
|
157
|
+
dateStyle="long"
|
|
158
|
+
className="font-medium"
|
|
159
|
+
/>
|
|
160
|
+
, delivering 88 components, 1,432 build-hours avoided, and
|
|
161
|
+
$182,450 in documented client savings.
|
|
162
|
+
</p>
|
|
163
|
+
<p className="text-xs text-muted-foreground">
|
|
164
|
+
Next review:{" "}
|
|
165
|
+
<FormatDate
|
|
166
|
+
value={new Date(2026, 11, 1)}
|
|
167
|
+
dateStyle="medium"
|
|
168
|
+
/>
|
|
169
|
+
</p>
|
|
170
|
+
</article>
|
|
171
|
+
</CardContent>
|
|
172
|
+
</Card>
|
|
173
|
+
),
|
|
174
|
+
}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "@behavioral-agentic-design-system/core/components/ui/card"
|
|
17
17
|
|
|
18
18
|
const meta: Meta<typeof FormatNumber> = {
|
|
19
|
-
title: "Components/FormatNumber",
|
|
19
|
+
title: "Components/Content and data/FormatNumber",
|
|
20
20
|
component: FormatNumber,
|
|
21
21
|
parameters: { layout: "centered" },
|
|
22
22
|
tags: ["autodocs"],
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from "@storybook/react"
|
|
|
3
3
|
import { Highlight } from "@behavioral-agentic-design-system/core/components/ui/highlight"
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Highlight> = {
|
|
6
|
-
title: "Components/Highlight",
|
|
6
|
+
title: "Components/Content and data/Highlight",
|
|
7
7
|
component: Highlight,
|
|
8
8
|
parameters: { layout: "centered" },
|
|
9
9
|
tags: ["autodocs"],
|
|
@@ -13,7 +13,7 @@ import { Button } from "@behavioral-agentic-design-system/core/components/ui/but
|
|
|
13
13
|
import { Separator } from "@behavioral-agentic-design-system/core/components/ui/separator";
|
|
14
14
|
|
|
15
15
|
const meta: Meta<typeof HoverCard> = {
|
|
16
|
-
title: "Components/HoverCard",
|
|
16
|
+
title: "Components/Overlays/HoverCard",
|
|
17
17
|
component: HoverCard,
|
|
18
18
|
parameters: { layout: "centered" },
|
|
19
19
|
tags: ["autodocs"],
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
* Not a lightbox, and not a next/image substitute.
|
|
18
18
|
*/
|
|
19
19
|
const meta: Meta<typeof Image> = {
|
|
20
|
-
title: "Components/Image",
|
|
20
|
+
title: "Components/Content and data/Image",
|
|
21
21
|
component: Image,
|
|
22
22
|
parameters: { layout: "centered" },
|
|
23
23
|
tags: ["autodocs"],
|
|
@@ -6,7 +6,7 @@ import { Avatar, AvatarFallback } from "@behavioral-agentic-design-system/core/c
|
|
|
6
6
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button"
|
|
7
7
|
|
|
8
8
|
const meta: Meta<typeof Indicator> = {
|
|
9
|
-
title: "Components/Indicator",
|
|
9
|
+
title: "Components/Badges and avatars/Indicator",
|
|
10
10
|
component: Indicator,
|
|
11
11
|
parameters: {
|
|
12
12
|
layout: "centered",
|
|
@@ -191,7 +191,15 @@ export const Disabled: Story = {
|
|
|
191
191
|
),
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Every option at once, for a person comparing them side by side.
|
|
196
|
+
*
|
|
197
|
+
* Tagged out of the machine-readable manifest: an assistant reading this as an
|
|
198
|
+
* example learns to render a gallery of variants where a screen was asked for.
|
|
199
|
+
* It stays visible in the sidebar, where a human reads it as the reference it is.
|
|
200
|
+
*/
|
|
194
201
|
export const AllPositions: Story = {
|
|
202
|
+
tags: ["!manifest"],
|
|
195
203
|
render: () => (
|
|
196
204
|
<div className="grid grid-cols-3 gap-8 p-4">
|
|
197
205
|
{(["top-left", "top-right", "middle-left", "middle-right", "bottom-left", "bottom-right"] as const).map((pos) => (
|
|
@@ -240,7 +248,15 @@ export const RealisticUse: Story = {
|
|
|
240
248
|
),
|
|
241
249
|
}
|
|
242
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Every option at once, for a person comparing them side by side.
|
|
253
|
+
*
|
|
254
|
+
* Tagged out of the machine-readable manifest: an assistant reading this as an
|
|
255
|
+
* example learns to render a gallery of variants where a screen was asked for.
|
|
256
|
+
* It stays visible in the sidebar, where a human reads it as the reference it is.
|
|
257
|
+
*/
|
|
243
258
|
export const AllVariants: Story = {
|
|
259
|
+
tags: ["!manifest"],
|
|
244
260
|
render: () => (
|
|
245
261
|
<div className="flex flex-wrap items-center gap-6">
|
|
246
262
|
{(["default", "secondary", "destructive", "success", "warning"] as const).map((v) => (
|
|
@@ -7,7 +7,7 @@ import { CalendarIcon, MailIcon, SearchIcon } from "lucide-react";
|
|
|
7
7
|
import { Input } from "@behavioral-agentic-design-system/core/components/ui/input";
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof Input> = {
|
|
10
|
-
title: "Components/Input",
|
|
10
|
+
title: "Components/Forms/Input",
|
|
11
11
|
component: Input,
|
|
12
12
|
parameters: {
|
|
13
13
|
layout: "centered",
|
|
@@ -9,7 +9,7 @@ import { Input } from "@behavioral-agentic-design-system/core/components/ui/inpu
|
|
|
9
9
|
import { Label } from "@behavioral-agentic-design-system/core/components/ui/label";
|
|
10
10
|
|
|
11
11
|
const meta: Meta<typeof InputClearButton> = {
|
|
12
|
-
title: "Components/InputClearButton",
|
|
12
|
+
title: "Components/Forms/InputClearButton",
|
|
13
13
|
component: InputClearButton,
|
|
14
14
|
parameters: { layout: "centered" },
|
|
15
15
|
tags: ["autodocs"],
|
|
@@ -11,7 +11,7 @@ import { CopyButton } from "@behavioral-agentic-design-system/core/components/ui
|
|
|
11
11
|
import { Search, Link2 } from "lucide-react";
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof InputGroup> = {
|
|
14
|
-
title: "Components/InputGroup",
|
|
14
|
+
title: "Components/Forms/InputGroup",
|
|
15
15
|
component: InputGroup,
|
|
16
16
|
parameters: {
|
|
17
17
|
layout: "centered",
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|
|
3
3
|
import { Kbd } from "@behavioral-agentic-design-system/core/components/ui/kbd";
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Kbd> = {
|
|
6
|
-
title: "Components/Kbd",
|
|
6
|
+
title: "Components/Badges and avatars/Kbd",
|
|
7
7
|
component: Kbd,
|
|
8
8
|
parameters: { layout: "centered" },
|
|
9
9
|
tags: ["autodocs"],
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from "@storybook/react"
|
|
|
3
3
|
import { KeyboardShortcut } from "../components/ui/keyboard-shortcut"
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof KeyboardShortcut> = {
|
|
6
|
-
title: "
|
|
6
|
+
title: "Components/Badges and avatars/KeyboardShortcut",
|
|
7
7
|
component: KeyboardShortcut,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
9
|
parameters: {
|
|
@@ -3,7 +3,7 @@ import { Label } from "@behavioral-agentic-design-system/core/components/ui/labe
|
|
|
3
3
|
import { Input } from "@behavioral-agentic-design-system/core/components/ui/input";
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Label> = {
|
|
6
|
-
title: "Components/Label",
|
|
6
|
+
title: "Components/Forms/Label",
|
|
7
7
|
component: Label,
|
|
8
8
|
parameters: { layout: "centered" },
|
|
9
9
|
tags: ["autodocs"],
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { Separator } from "@behavioral-agentic-design-system/core/components/ui/separator"
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof Link> = {
|
|
14
|
-
title: "Components/Link",
|
|
14
|
+
title: "Components/Navigation/Link",
|
|
15
15
|
component: Link,
|
|
16
16
|
parameters: { layout: "centered" },
|
|
17
17
|
tags: ["autodocs"],
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { List, ListItem } from "@behavioral-agentic-design-system/core/components/ui/list"
|
|
13
13
|
|
|
14
14
|
const meta: Meta<typeof List> = {
|
|
15
|
-
title: "Components/List",
|
|
15
|
+
title: "Components/Content and data/List",
|
|
16
16
|
component: List,
|
|
17
17
|
parameters: {
|
|
18
18
|
layout: "centered",
|
|
@@ -23,7 +23,7 @@ import { Label } from "@behavioral-agentic-design-system/core/components/ui/labe
|
|
|
23
23
|
* (use Select, Combobox, DropdownMenu).
|
|
24
24
|
*/
|
|
25
25
|
const meta: Meta<typeof ListboxRoot> = {
|
|
26
|
-
title: "Components/Listbox",
|
|
26
|
+
title: "Components/Selection/Listbox",
|
|
27
27
|
component: ListboxRoot,
|
|
28
28
|
parameters: {
|
|
29
29
|
layout: "centered",
|
|
@@ -4,7 +4,7 @@ import { LoadingDots } from "../components/ui/loading-dots"
|
|
|
4
4
|
import { Button } from "../components/ui/button"
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof LoadingDots> = {
|
|
7
|
-
title: "
|
|
7
|
+
title: "Components/Feedback/LoadingDots",
|
|
8
8
|
component: LoadingDots,
|
|
9
9
|
tags: ["autodocs"],
|
|
10
10
|
parameters: {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "@behavioral-agentic-design-system/core/components/ui/data-list";
|
|
18
18
|
|
|
19
19
|
const meta: Meta<typeof LoadingOverlay> = {
|
|
20
|
-
title: "Components/LoadingOverlay",
|
|
20
|
+
title: "Components/Feedback/LoadingOverlay",
|
|
21
21
|
component: LoadingOverlay,
|
|
22
22
|
parameters: {
|
|
23
23
|
layout: "centered",
|