@charcuterie/ui 4.4.0 → 4.5.1
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/README.md +7 -2
- package/dist/ActionTiles/ActionTiles.d.ts +2 -1
- package/dist/ActionTiles/ActionTiles.d.ts.map +1 -1
- package/dist/ActionTiles/ActionTiles.js +4 -2
- package/dist/ActionTiles/ActionTiles.js.map +1 -1
- package/dist/Card/Card.d.ts +5 -2
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +23 -3
- package/dist/Card/Card.js.map +1 -1
- package/package.json +3 -2
- package/src/Accordion/Accordion.mdx +1 -1
- package/src/Accordion/Accordion.stories.tsx +3 -1
- package/src/Accordion/Accordion.test.tsx +4 -4
- package/src/ActionTiles/ActionTiles.mdx +7 -1
- package/src/ActionTiles/ActionTiles.stories.tsx +3 -1
- package/src/ActionTiles/ActionTiles.test.tsx +3 -3
- package/src/ActionTiles/ActionTiles.tsx +4 -2
- package/src/AdaptiveGrid/AdaptiveGrid.mdx +1 -1
- package/src/AdaptiveGrid/AdaptiveGrid.stories.tsx +3 -1
- package/src/AdaptiveGrid/AdaptiveGrid.test.tsx +5 -5
- package/src/Alert/Alert.mdx +1 -1
- package/src/Alert/Alert.stories.tsx +3 -1
- package/src/Alert/Alert.test.tsx +2 -2
- package/src/Avatar/Avatar.mdx +1 -1
- package/src/Avatar/Avatar.stories.tsx +4 -1
- package/src/Avatar/Avatar.test.tsx +2 -2
- package/src/Badge/Badge.mdx +1 -1
- package/src/Badge/Badge.stories.tsx +3 -1
- package/src/Badge/Badge.test.tsx +3 -3
- package/src/BadgeButton/BadgeButton.mdx +1 -1
- package/src/BadgeButton/BadgeButton.stories.tsx +3 -1
- package/src/BadgeButton/BadgeButton.test.tsx +2 -2
- package/src/Board/Board.mdx +1 -1
- package/src/Board/Board.stories.tsx +4 -1
- package/src/Board/Board.test.tsx +2 -2
- package/src/Button/Button.mdx +1 -1
- package/src/Button/Button.stories.tsx +3 -1
- package/src/Button/Button.test.tsx +2 -2
- package/src/ButtonLink/ButtonLink.mdx +1 -1
- package/src/ButtonLink/ButtonLink.stories.tsx +3 -1
- package/src/ButtonLink/ButtonLink.test.tsx +3 -3
- package/src/Card/Card.mdx +21 -1
- package/src/Card/Card.stories.tsx +91 -1
- package/src/Card/Card.test.tsx +60 -3
- package/src/Card/Card.tsx +24 -2
- package/src/Checkbox/Checkbox.mdx +1 -1
- package/src/Checkbox/Checkbox.stories.tsx +3 -1
- package/src/Checkbox/Checkbox.test.tsx +4 -4
- package/src/ColorSchemeSwitcher/ColorSchemeSwitcher.mdx +1 -1
- package/src/ColorSchemeSwitcher/ColorSchemeSwitcher.stories.tsx +3 -1
- package/src/ColorSchemeSwitcher/ColorSchemeSwitcher.test.tsx +5 -5
- package/src/ColorSchemeToggle/ColorSchemeToggle.mdx +1 -1
- package/src/ColorSchemeToggle/ColorSchemeToggle.stories.tsx +3 -1
- package/src/ColorSchemeToggle/ColorSchemeToggle.test.tsx +5 -5
- package/src/Combobox/Combobox.mdx +1 -1
- package/src/Combobox/Combobox.stories.tsx +3 -1
- package/src/Combobox/Combobox.test.tsx +2 -2
- package/src/CopyButton/CopyButton.mdx +1 -1
- package/src/CopyButton/CopyButton.stories.tsx +4 -1
- package/src/CopyButton/CopyButton.test.tsx +3 -3
- package/src/DataTable/DataTable.mdx +1 -1
- package/src/DataTable/DataTable.stories.tsx +3 -1
- package/src/DataTable/DataTable.test.tsx +3 -3
- package/src/DatePicker/DatePicker.mdx +1 -1
- package/src/DatePicker/DatePicker.stories.tsx +3 -1
- package/src/DatePicker/DatePicker.test.tsx +3 -3
- package/src/DatePicker/plainDate.test.ts +21 -3
- package/src/Dialog/Dialog.mdx +1 -1
- package/src/Dialog/Dialog.stories.tsx +3 -1
- package/src/Dialog/Dialog.test.tsx +2 -2
- package/src/DropRail/DropRail.mdx +1 -1
- package/src/DropRail/DropRail.stories.tsx +4 -1
- package/src/DropRail/DropRail.test.tsx +4 -4
- package/src/EmptyState/EmptyState.mdx +1 -1
- package/src/EmptyState/EmptyState.stories.tsx +3 -1
- package/src/EmptyState/EmptyState.test.tsx +2 -2
- package/src/Field/Field.mdx +1 -1
- package/src/Field/Field.stories.tsx +3 -1
- package/src/Field/Field.test.tsx +4 -4
- package/src/FileDropZone/FileDropZone.mdx +1 -1
- package/src/FileDropZone/FileDropZone.stories.tsx +3 -1
- package/src/FileDropZone/FileDropZone.test.tsx +3 -3
- package/src/Header/Header.mdx +1 -1
- package/src/Header/Header.stories.tsx +3 -1
- package/src/IconButton/IconButton.mdx +1 -1
- package/src/IconButton/IconButton.stories.tsx +3 -1
- package/src/IconButton/IconButton.test.tsx +2 -2
- package/src/Lightbox/Lightbox.mdx +1 -1
- package/src/Lightbox/Lightbox.stories.tsx +3 -1
- package/src/Lightbox/Lightbox.test.tsx +2 -2
- package/src/Listbox/Listbox.mdx +1 -1
- package/src/Listbox/Listbox.stories.tsx +3 -1
- package/src/Listbox/Listbox.test.tsx +5 -5
- package/src/LiveStatusIndicator/LiveStatusIndicator.mdx +1 -1
- package/src/LiveStatusIndicator/LiveStatusIndicator.stories.tsx +3 -1
- package/src/LiveStatusIndicator/LiveStatusIndicator.test.tsx +2 -2
- package/src/LogViewer/LogViewer.mdx +1 -1
- package/src/LogViewer/LogViewer.stories.tsx +3 -1
- package/src/LogViewer/LogViewer.test.tsx +2 -2
- package/src/Main/Main.mdx +1 -1
- package/src/Main/Main.stories.tsx +3 -1
- package/src/Main/Main.test.tsx +3 -3
- package/src/MarkdownEditor/MarkdownEditor.mdx +1 -1
- package/src/MarkdownEditor/MarkdownEditor.stories.tsx +3 -1
- package/src/MarkdownEditor/MarkdownEditor.test.tsx +4 -4
- package/src/MarkdownLine/MarkdownLine.mdx +1 -1
- package/src/MarkdownLine/MarkdownLine.stories.tsx +4 -1
- package/src/MarkdownLine/MarkdownLine.test.tsx +3 -3
- package/src/MediaTile/MediaTile.stories.tsx +3 -1
- package/src/MediaTile/MediaTile.test.tsx +2 -2
- package/src/Menu/Menu.mdx +1 -1
- package/src/Menu/Menu.stories.tsx +3 -1
- package/src/Modal/Modal.mdx +1 -1
- package/src/Modal/Modal.stories.tsx +3 -1
- package/src/Modal/Modal.test.tsx +3 -3
- package/src/Nav/Nav.mdx +1 -1
- package/src/Nav/Nav.stories.tsx +3 -1
- package/src/Nav/Nav.test.tsx +6 -6
- package/src/NavBar/NavBar.mdx +1 -1
- package/src/NavBar/NavBar.stories.tsx +3 -1
- package/src/NavBar/NavBar.test.tsx +3 -3
- package/src/Picker/Picker.mdx +1 -1
- package/src/Picker/Picker.stories.tsx +3 -1
- package/src/Picker/Picker.test.tsx +2 -2
- package/src/Popover/Popover.mdx +1 -1
- package/src/Popover/Popover.stories.tsx +3 -1
- package/src/Popover/Popover.test.tsx +2 -2
- package/src/PortraitTiles/PortraitTiles.mdx +1 -1
- package/src/PortraitTiles/PortraitTiles.stories.tsx +3 -1
- package/src/PortraitTiles/PortraitTiles.test.tsx +5 -5
- package/src/ProgressBar/ProgressBar.mdx +1 -1
- package/src/ProgressBar/ProgressBar.stories.tsx +3 -1
- package/src/ProgressBar/ProgressBar.test.tsx +2 -2
- package/src/QueryBuilder/QueryBuilder.mdx +1 -1
- package/src/QueryBuilder/QueryBuilder.stories.tsx +3 -1
- package/src/QueryBuilder/QueryBuilder.test.tsx +2 -2
- package/src/RadioGroup/RadioGroup.mdx +1 -1
- package/src/RadioGroup/RadioGroup.stories.tsx +3 -1
- package/src/RadioGroup/RadioGroup.test.tsx +2 -2
- package/src/Rail/Rail.mdx +1 -1
- package/src/Rail/Rail.stories.tsx +3 -1
- package/src/Rail/Rail.test.tsx +2 -2
- package/src/RangeSlider/RangeSlider.mdx +1 -1
- package/src/RangeSlider/RangeSlider.stories.tsx +3 -1
- package/src/RangeSlider/RangeSlider.test.tsx +7 -3
- package/src/ReorderList/ReorderList.mdx +1 -1
- package/src/ReorderList/ReorderList.stories.tsx +3 -1
- package/src/ReorderList/ReorderList.test.tsx +7 -7
- package/src/RouterLink/UnstyledLink.stories.tsx +4 -1
- package/src/RouterLink/UnstyledLink.test.tsx +2 -2
- package/src/SearchInput/SearchInput.mdx +1 -1
- package/src/SearchInput/SearchInput.stories.tsx +3 -1
- package/src/SegmentedControl/SegmentedControl.mdx +1 -1
- package/src/SegmentedControl/SegmentedControl.stories.tsx +3 -1
- package/src/SegmentedControl/SegmentedControl.test.tsx +2 -2
- package/src/Select/Select.mdx +1 -1
- package/src/Select/Select.stories.tsx +3 -1
- package/src/Select/Select.test.tsx +4 -4
- package/src/Shell/Shell.mdx +1 -1
- package/src/Shell/Shell.stories.tsx +3 -1
- package/src/Shell/Shell.test.tsx +2 -2
- package/src/Skeleton/Skeleton.mdx +1 -1
- package/src/Skeleton/Skeleton.stories.tsx +3 -1
- package/src/Skeleton/Skeleton.test.tsx +2 -2
- package/src/Slider/Slider.mdx +1 -1
- package/src/Slider/Slider.stories.tsx +3 -1
- package/src/Slider/Slider.test.tsx +2 -2
- package/src/SortableTableHeader/SortableTableHeader.mdx +1 -1
- package/src/SortableTableHeader/SortableTableHeader.stories.tsx +3 -1
- package/src/SortableTableHeader/SortableTableHeader.test.tsx +3 -3
- package/src/Spinner/Spinner.mdx +1 -1
- package/src/Spinner/Spinner.stories.tsx +3 -1
- package/src/Spinner/Spinner.test.tsx +2 -2
- package/src/Stepper/Stepper.mdx +1 -1
- package/src/Stepper/Stepper.stories.tsx +4 -1
- package/src/Stepper/Stepper.test.tsx +7 -7
- package/src/Swatch/Swatch.mdx +1 -1
- package/src/Swatch/Swatch.stories.tsx +4 -1
- package/src/Swatch/Swatch.test.tsx +3 -3
- package/src/Switch/Switch.mdx +1 -1
- package/src/Switch/Switch.stories.tsx +3 -1
- package/src/Switch/Switch.test.tsx +2 -2
- package/src/Tabs/Tabs.mdx +1 -1
- package/src/Tabs/Tabs.stories.tsx +3 -1
- package/src/Tabs/Tabs.test.tsx +3 -3
- package/src/TextLink/TextLink.mdx +1 -1
- package/src/TextLink/TextLink.stories.tsx +3 -1
- package/src/TextLink/TextLink.test.tsx +4 -4
- package/src/TimecodeInput/TimecodeInput.mdx +1 -1
- package/src/TimecodeInput/TimecodeInput.stories.tsx +3 -1
- package/src/Toast/Toast.mdx +1 -1
- package/src/Toast/Toast.stories.tsx +3 -1
- package/src/Toast/Toast.test.tsx +2 -2
- package/src/Toolbar/Toolbar.mdx +1 -1
- package/src/Toolbar/Toolbar.stories.tsx +3 -1
- package/src/Toolbar/Toolbar.test.tsx +5 -5
- package/src/Tooltip/Tooltip.mdx +1 -1
- package/src/Tooltip/Tooltip.stories.tsx +3 -1
- package/src/Tooltip/Tooltip.test.tsx +2 -2
- package/src/VirtualizedGrid/VirtualizedGrid.mdx +1 -1
- package/src/VirtualizedGrid/VirtualizedGrid.stories.tsx +4 -1
- package/src/VirtualizedGrid/VirtualizedGrid.test.tsx +5 -5
- package/src/VisuallyHidden/VisuallyHidden.mdx +1 -1
- package/src/VisuallyHidden/VisuallyHidden.stories.tsx +3 -1
- package/src/markdownEditorCodeMirror/MarkdownEditorCodeMirror.mdx +1 -1
- package/src/markdownEditorCodeMirror/MarkdownEditorCodeMirror.stories.tsx +3 -1
- package/src/markdownEditorCodeMirror/MarkdownEditorCodeMirror.test.tsx +3 -3
- package/src/markdownEditorCodeMirror/MarkdownView.mdx +1 -1
- package/src/markdownEditorCodeMirror/MarkdownView.stories.tsx +4 -1
- package/src/markdownEditorCodeMirror/MarkdownView.test.tsx +44 -20
- package/src/reactRouter/ReactRouterAdapter.stories.tsx +3 -1
- package/src/reactRouter/ReactRouterAdapter.test.tsx +2 -2
package/src/Stepper/Stepper.mdx
CHANGED
|
@@ -12,7 +12,7 @@ Docket asked for this. Its phases — *"these 3 cards have to be done in order"*
|
|
|
12
12
|
hand-rolled numbered rail with a connector drawn in a `::before`, and a `ProgressBar` per
|
|
13
13
|
phase for the count. Neither says which things go together.
|
|
14
14
|
|
|
15
|
-
<Canvas of={StepperStories.
|
|
15
|
+
<Canvas of={StepperStories.Playground} />
|
|
16
16
|
|
|
17
17
|
## Props
|
|
18
18
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
import { useState } from "react"
|
|
3
4
|
import { Button } from "../Button/Button.tsx"
|
|
@@ -54,7 +55,9 @@ type Story = StoryObj<typeof meta>
|
|
|
54
55
|
* as an empty box in the one position where an empty box reads as
|
|
55
56
|
* an error.
|
|
56
57
|
*/
|
|
57
|
-
export const
|
|
58
|
+
export const Playground: Story = {
|
|
59
|
+
parameters: playgroundParameters,
|
|
60
|
+
}
|
|
58
61
|
|
|
59
62
|
export const AllVariants: Story = {
|
|
60
63
|
render: (stepperProps) => (
|
|
@@ -9,13 +9,13 @@ import * as stories from "./Stepper.stories.tsx"
|
|
|
9
9
|
const {
|
|
10
10
|
AllStates,
|
|
11
11
|
CompactCard,
|
|
12
|
-
|
|
12
|
+
Playground,
|
|
13
13
|
Interactive,
|
|
14
14
|
Responsive,
|
|
15
15
|
} = composeStories(stories)
|
|
16
16
|
|
|
17
17
|
test("the sequence is an ordered list with a name", async () => {
|
|
18
|
-
const { canvas } = await mountStory(
|
|
18
|
+
const { canvas } = await mountStory(Playground)
|
|
19
19
|
|
|
20
20
|
// A `<ol>`, not a stack of divs: the ORDER is the meaning, and a
|
|
21
21
|
// screen reader announcing "list, 3 items" is what carries it.
|
|
@@ -28,7 +28,7 @@ test("the sequence is an ordered list with a name", async () => {
|
|
|
28
28
|
})
|
|
29
29
|
|
|
30
30
|
test("each step is a heading at the level the caller asked for", async () => {
|
|
31
|
-
const { canvas } = await mountStory(
|
|
31
|
+
const { canvas } = await mountStory(Playground)
|
|
32
32
|
|
|
33
33
|
await expect(
|
|
34
34
|
canvas.getByRole("heading", { level: 3, name: /Rip/ }),
|
|
@@ -60,7 +60,7 @@ test("every status is a word, not only a colour", async () => {
|
|
|
60
60
|
})
|
|
61
61
|
|
|
62
62
|
test("the marker is the ordinal, so it renders in a font with no tick glyph", async () => {
|
|
63
|
-
const { canvas } = await mountStory(
|
|
63
|
+
const { canvas } = await mountStory(Playground)
|
|
64
64
|
|
|
65
65
|
// Not `✓`. `docs/decisions/2026-07-29-ship-no-icons-and-no-symbol-
|
|
66
66
|
// glyphs.md` — a glyph the font lacks paints as an empty box, and
|
|
@@ -75,7 +75,7 @@ test("the marker is the ordinal, so it renders in a font with no tick glyph", as
|
|
|
75
75
|
* all — a pseudo-element has nothing to count.
|
|
76
76
|
*/
|
|
77
77
|
test("the last step draws no connector", async () => {
|
|
78
|
-
const { canvas } = await mountStory(
|
|
78
|
+
const { canvas } = await mountStory(Playground)
|
|
79
79
|
|
|
80
80
|
const connectors = canvas
|
|
81
81
|
.getAllByRole("listitem")
|
|
@@ -88,7 +88,7 @@ test("the last step draws no connector", async () => {
|
|
|
88
88
|
})
|
|
89
89
|
|
|
90
90
|
test("each step carries its key into the DOM, so a re-order can animate", async () => {
|
|
91
|
-
const { canvas } = await mountStory(
|
|
91
|
+
const { canvas } = await mountStory(Playground)
|
|
92
92
|
|
|
93
93
|
// React's `key` never reaches the markup. Without this attribute
|
|
94
94
|
// a caller who re-orders `steps` has no way to say which `<li>`
|
|
@@ -124,7 +124,7 @@ test("advancing moves which step is current", async () => {
|
|
|
124
124
|
})
|
|
125
125
|
|
|
126
126
|
test("no axe violations, in either orientation", async () => {
|
|
127
|
-
const vertical = await mountStory(
|
|
127
|
+
const vertical = await mountStory(Playground)
|
|
128
128
|
|
|
129
129
|
await expectNoAxeViolations(vertical.canvasElement)
|
|
130
130
|
|
package/src/Swatch/Swatch.mdx
CHANGED
|
@@ -10,7 +10,7 @@ A colour presented **as content**, with a name attached. It is the one colour th
|
|
|
10
10
|
system does not own: the red sticker on a game controller, the accent castkit pulls off an
|
|
11
11
|
album, a user's tag colour. Not a token — a value from data.
|
|
12
12
|
|
|
13
|
-
<Canvas of={SwatchStories.
|
|
13
|
+
<Canvas of={SwatchStories.Playground} />
|
|
14
14
|
|
|
15
15
|
## Props
|
|
16
16
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
|
|
3
4
|
import {
|
|
@@ -44,7 +45,9 @@ type Story = StoryObj<typeof meta>
|
|
|
44
45
|
* because a colour a screen reader cannot see needs a name it can
|
|
45
46
|
* read.
|
|
46
47
|
*/
|
|
47
|
-
export const
|
|
48
|
+
export const Playground: Story = {
|
|
49
|
+
parameters: playgroundParameters,
|
|
50
|
+
}
|
|
48
51
|
|
|
49
52
|
/**
|
|
50
53
|
* `solid` fills; `outline` keeps the hue and drops the fill. The
|
|
@@ -6,10 +6,10 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
6
6
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
7
7
|
import * as stories from "./Swatch.stories.tsx"
|
|
8
8
|
|
|
9
|
-
const {
|
|
9
|
+
const { Playground, InAList } = composeStories(stories)
|
|
10
10
|
|
|
11
11
|
test("a colour is findable by the name a screen reader can read", async () => {
|
|
12
|
-
const { canvas } = await mountStory(
|
|
12
|
+
const { canvas } = await mountStory(Playground)
|
|
13
13
|
|
|
14
14
|
// The whole contract: a `background-color` is nothing to an agent
|
|
15
15
|
// or a screen reader, so the swatch is an `img` with a name.
|
|
@@ -44,7 +44,7 @@ test("the name survives with no visible label", async () => {
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
test("solid rings its fill; the ring is what keeps white visible", async () => {
|
|
47
|
-
const { canvas } = await mountStory(
|
|
47
|
+
const { canvas } = await mountStory(Playground)
|
|
48
48
|
|
|
49
49
|
const dot = canvas.getByRole("img", {
|
|
50
50
|
name: "Red",
|
package/src/Switch/Switch.mdx
CHANGED
|
@@ -15,7 +15,7 @@ immediately — "automatic imports on". ARIA gives the second its own role, and
|
|
|
15
15
|
reader announces "on/off" for a `switch` where it announces "checked/unchecked" for a
|
|
16
16
|
checkbox.
|
|
17
17
|
|
|
18
|
-
<Canvas of={SwitchStories.
|
|
18
|
+
<Canvas of={SwitchStories.Playground} />
|
|
19
19
|
|
|
20
20
|
## Props
|
|
21
21
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
|
|
3
4
|
import { controlSizeArgType } from "../argTypes.storyHelpers.ts"
|
|
@@ -28,7 +29,8 @@ export default meta
|
|
|
28
29
|
|
|
29
30
|
type Story = StoryObj<typeof meta>
|
|
30
31
|
|
|
31
|
-
export const
|
|
32
|
+
export const Playground: Story = {
|
|
33
|
+
parameters: playgroundParameters,
|
|
32
34
|
args: { label: "Automatic imports" },
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -7,12 +7,12 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./Switch.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllStates,
|
|
10
|
+
const { AllStates, Playground, Interactive } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
test("it is a switch a screen reader can name and read", async () => {
|
|
14
14
|
const { canvas, canvasElement } =
|
|
15
|
-
await mountStory(
|
|
15
|
+
await mountStory(Playground)
|
|
16
16
|
|
|
17
17
|
const control = expectAgentDrivable(canvas, {
|
|
18
18
|
name: "Automatic imports",
|
package/src/Tabs/Tabs.mdx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
|
|
3
4
|
import { toStoryChoice } from "../argTypes.storyHelpers.ts"
|
|
@@ -67,7 +68,8 @@ export default meta
|
|
|
67
68
|
|
|
68
69
|
type Story = StoryObj<typeof meta>
|
|
69
70
|
|
|
70
|
-
export const
|
|
71
|
+
export const Playground: Story = {
|
|
72
|
+
parameters: playgroundParameters,
|
|
71
73
|
args: { label: "Bay 3", tabs: BAY_TABS },
|
|
72
74
|
}
|
|
73
75
|
|
package/src/Tabs/Tabs.test.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import * as stories from "./Tabs.stories.tsx"
|
|
|
10
10
|
const {
|
|
11
11
|
AllStates,
|
|
12
12
|
AllVariants,
|
|
13
|
-
|
|
13
|
+
Playground,
|
|
14
14
|
Manual,
|
|
15
15
|
Responsive,
|
|
16
16
|
Routed,
|
|
@@ -20,7 +20,7 @@ const {
|
|
|
20
20
|
|
|
21
21
|
test("selecting a tab wires the panel back to it", async () => {
|
|
22
22
|
const { canvas, canvasElement } =
|
|
23
|
-
await mountStory(
|
|
23
|
+
await mountStory(Playground)
|
|
24
24
|
|
|
25
25
|
const tablist = expectAgentDrivable(canvas, {
|
|
26
26
|
name: "Bay 3",
|
|
@@ -256,7 +256,7 @@ test("manual activation moves focus without selecting", async () => {
|
|
|
256
256
|
})
|
|
257
257
|
|
|
258
258
|
test("automatic activation selects as focus moves, and wraps", async () => {
|
|
259
|
-
const { canvas } = await mountStory(
|
|
259
|
+
const { canvas } = await mountStory(Playground)
|
|
260
260
|
|
|
261
261
|
const tablist = expectAgentDrivable(canvas, {
|
|
262
262
|
name: "Bay 3",
|
|
@@ -18,7 +18,7 @@ header home link because there was nothing else to reach for. All of them are an
|
|
|
18
18
|
here, so middle-click, ctrl-click, "open in new tab", "copy link address", and the browser's
|
|
19
19
|
status bar work without anybody implementing them.
|
|
20
20
|
|
|
21
|
-
<Canvas of={TextLinkStories.
|
|
21
|
+
<Canvas of={TextLinkStories.Playground} />
|
|
22
22
|
|
|
23
23
|
## Props
|
|
24
24
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
import type { ReactNode } from "react"
|
|
3
4
|
|
|
@@ -62,7 +63,8 @@ export default meta
|
|
|
62
63
|
|
|
63
64
|
type Story = StoryObj<typeof meta>
|
|
64
65
|
|
|
65
|
-
export const
|
|
66
|
+
export const Playground: Story = {
|
|
67
|
+
parameters: playgroundParameters,
|
|
66
68
|
args: { children: "the rip queue" },
|
|
67
69
|
}
|
|
68
70
|
|
|
@@ -14,7 +14,7 @@ const {
|
|
|
14
14
|
AllAppearances,
|
|
15
15
|
AllStates,
|
|
16
16
|
BackLink,
|
|
17
|
-
|
|
17
|
+
Playground,
|
|
18
18
|
External,
|
|
19
19
|
Routed,
|
|
20
20
|
} = composeStories(stories)
|
|
@@ -28,7 +28,7 @@ const {
|
|
|
28
28
|
* it for free is the entire argument for rendering an anchor.
|
|
29
29
|
*/
|
|
30
30
|
test("is drivable by role and name", async () => {
|
|
31
|
-
const { canvas } = await mountStory(
|
|
31
|
+
const { canvas } = await mountStory(Playground)
|
|
32
32
|
|
|
33
33
|
const link = expectAgentDrivable(canvas, {
|
|
34
34
|
name: "the rip queue",
|
|
@@ -39,7 +39,7 @@ test("is drivable by role and name", async () => {
|
|
|
39
39
|
})
|
|
40
40
|
|
|
41
41
|
test("Tab reaches it", async () => {
|
|
42
|
-
const { canvas } = await mountStory(
|
|
42
|
+
const { canvas } = await mountStory(Playground)
|
|
43
43
|
|
|
44
44
|
const link = canvas.getByRole("link", {
|
|
45
45
|
name: "the rip queue",
|
|
@@ -210,7 +210,7 @@ test("an injected router takes in-app paths and nothing else", async () => {
|
|
|
210
210
|
})
|
|
211
211
|
|
|
212
212
|
test("with no provider it is still a real anchor", async () => {
|
|
213
|
-
const { canvas } = await mountStory(
|
|
213
|
+
const { canvas } = await mountStory(Playground)
|
|
214
214
|
|
|
215
215
|
const link = canvas.getByRole("link", {
|
|
216
216
|
name: "the rip queue",
|
|
@@ -11,7 +11,7 @@ for a section of a file. The consumer that shaped it is **QueuePilot**, which pl
|
|
|
11
11
|
chosen part of a video
|
|
12
12
|
([decision](../../../../docs/decisions/2026-09-01-a-timecode-is-milliseconds-and-a-section-is-a-mode.md)).
|
|
13
13
|
|
|
14
|
-
<Canvas of={TimecodeInputStories.
|
|
14
|
+
<Canvas of={TimecodeInputStories.Playground} />
|
|
15
15
|
|
|
16
16
|
## Props
|
|
17
17
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
import type { ReactNode } from "react"
|
|
3
4
|
import { useState } from "react"
|
|
@@ -113,7 +114,8 @@ const TimecodeHarness = ({
|
|
|
113
114
|
* Milliseconds are optional both ways: `1:01:00` commits as
|
|
114
115
|
* `01:01:00`, not as `01:01:00.000`.
|
|
115
116
|
*/
|
|
116
|
-
export const
|
|
117
|
+
export const Playground: Story = {
|
|
118
|
+
parameters: playgroundParameters,
|
|
117
119
|
args: { label: "Start at" },
|
|
118
120
|
render: () => <TimecodeHarness label="Start at" />,
|
|
119
121
|
}
|
package/src/Toast/Toast.mdx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
import type { ReactNode } from "react"
|
|
3
4
|
import { useState } from "react"
|
|
@@ -46,7 +47,8 @@ const ToastList = ({
|
|
|
46
47
|
</ul>
|
|
47
48
|
)
|
|
48
49
|
|
|
49
|
-
export const
|
|
50
|
+
export const Playground: Story = {
|
|
51
|
+
parameters: playgroundParameters,
|
|
50
52
|
args: {
|
|
51
53
|
children: "Blade Runner (1982) · 9 titles.",
|
|
52
54
|
title: "Rip finished",
|
package/src/Toast/Toast.test.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { expectAgentDrivable } from "../testing/index.ts"
|
|
|
8
8
|
import * as stories from "./Toast.stories.tsx"
|
|
9
9
|
import { toastTransitions } from "./toastLifecycle.ts"
|
|
10
10
|
|
|
11
|
-
const { AllStates, AllVariants,
|
|
11
|
+
const { AllStates, AllVariants, Playground, Interactive } =
|
|
12
12
|
composeStories(stories)
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -180,7 +180,7 @@ test("a dismiss during the enter frame is not undone by it", async () => {
|
|
|
180
180
|
})
|
|
181
181
|
|
|
182
182
|
test("a pinned toast stays put", async () => {
|
|
183
|
-
const { canvas } = await mountStory(
|
|
183
|
+
const { canvas } = await mountStory(Playground)
|
|
184
184
|
|
|
185
185
|
const dismiss = expectAgentDrivable(canvas, {
|
|
186
186
|
name: "Dismiss Rip finished",
|
package/src/Toolbar/Toolbar.mdx
CHANGED
|
@@ -9,7 +9,7 @@ import * as ToolbarStories from "./Toolbar.stories";
|
|
|
9
9
|
A row of controls that collapses into an overflow when it runs out of room — measured, not
|
|
10
10
|
breakpointed, with **exactly one instance** of every control in the document.
|
|
11
11
|
|
|
12
|
-
<Canvas of={ToolbarStories.
|
|
12
|
+
<Canvas of={ToolbarStories.Playground} />
|
|
13
13
|
|
|
14
14
|
## Props
|
|
15
15
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useMediaQuery } from "@charcuterie/logic"
|
|
2
2
|
import { matchMediaMatcher } from "@charcuterie/logic/browser"
|
|
3
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
3
4
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
4
5
|
import type { ReactNode } from "react"
|
|
5
6
|
import { useState } from "react"
|
|
@@ -150,7 +151,8 @@ type Story = StoryObj<typeof meta>
|
|
|
150
151
|
* collapse is not progressive: almost everything lives in the
|
|
151
152
|
* popover permanently.
|
|
152
153
|
*/
|
|
153
|
-
export const
|
|
154
|
+
export const Playground: Story = {
|
|
155
|
+
parameters: playgroundParameters,
|
|
154
156
|
render: (toolbarProps) => (
|
|
155
157
|
<Frame inlineSize="34rem">
|
|
156
158
|
<Toolbar {...toolbarProps} />
|
|
@@ -15,13 +15,13 @@ import * as stories from "./Toolbar.stories.tsx"
|
|
|
15
15
|
const {
|
|
16
16
|
AllStates,
|
|
17
17
|
AllVariants,
|
|
18
|
-
|
|
18
|
+
Playground,
|
|
19
19
|
InAppShell,
|
|
20
20
|
Interactive,
|
|
21
21
|
} = composeStories(stories)
|
|
22
22
|
|
|
23
23
|
test("the toolbar is named, and its actions are buttons", async () => {
|
|
24
|
-
const { canvas } = await mountStory(
|
|
24
|
+
const { canvas } = await mountStory(Playground)
|
|
25
25
|
|
|
26
26
|
const toolbar = expectAgentDrivable(canvas, {
|
|
27
27
|
name: "Deck actions",
|
|
@@ -43,7 +43,7 @@ test("the toolbar is named, and its actions are buttons", async () => {
|
|
|
43
43
|
* popover permanently.
|
|
44
44
|
*/
|
|
45
45
|
test("a bar with room shows no overflow trigger", async () => {
|
|
46
|
-
const { canvas } = await mountStory(
|
|
46
|
+
const { canvas } = await mountStory(Playground)
|
|
47
47
|
|
|
48
48
|
const toolbar = expectAgentDrivable(canvas, {
|
|
49
49
|
name: "Deck actions",
|
|
@@ -73,7 +73,7 @@ test("a bar with room shows no overflow trigger", async () => {
|
|
|
73
73
|
* the app's own component and most of them forward no `tabIndex`.
|
|
74
74
|
*/
|
|
75
75
|
test("the toolbar is one tab stop", async () => {
|
|
76
|
-
const { canvas } = await mountStory(
|
|
76
|
+
const { canvas } = await mountStory(Playground)
|
|
77
77
|
|
|
78
78
|
const toolbar = expectAgentDrivable(canvas, {
|
|
79
79
|
name: "Deck actions",
|
|
@@ -98,7 +98,7 @@ test("the toolbar is one tab stop", async () => {
|
|
|
98
98
|
})
|
|
99
99
|
|
|
100
100
|
test("the arrow keys move along the row", async () => {
|
|
101
|
-
const { canvas } = await mountStory(
|
|
101
|
+
const { canvas } = await mountStory(Playground)
|
|
102
102
|
|
|
103
103
|
const start = expectAgentDrivable(canvas, {
|
|
104
104
|
name: "Start rip",
|
package/src/Tooltip/Tooltip.mdx
CHANGED
|
@@ -9,7 +9,7 @@ import * as TooltipStories from "./Tooltip.stories";
|
|
|
9
9
|
Replaces mux-magic's `FieldTooltip` — 130 lines of hand-rolled positioning, including a
|
|
10
10
|
`computePosition` that reimplements `flip` and `shift` against `window.innerHeight`.
|
|
11
11
|
|
|
12
|
-
<Canvas of={TooltipStories.
|
|
12
|
+
<Canvas of={TooltipStories.Playground} />
|
|
13
13
|
|
|
14
14
|
## Props
|
|
15
15
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
|
|
3
4
|
import { placementArgType } from "../argTypes.storyHelpers.ts"
|
|
@@ -26,7 +27,8 @@ export default meta
|
|
|
26
27
|
|
|
27
28
|
type Story = StoryObj<typeof meta>
|
|
28
29
|
|
|
29
|
-
export const
|
|
30
|
+
export const Playground: Story = {
|
|
31
|
+
parameters: playgroundParameters,
|
|
30
32
|
args: {
|
|
31
33
|
children: <Button appearance="outline">Retry</Button>,
|
|
32
34
|
label: "Re-reads the disc from title 1.",
|
|
@@ -7,12 +7,12 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./Tooltip.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllVariants,
|
|
10
|
+
const { AllVariants, Playground, Interactive } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
test("nothing is shown until something asks", async () => {
|
|
14
14
|
const { body, canvas, canvasElement } =
|
|
15
|
-
await mountStory(
|
|
15
|
+
await mountStory(Playground)
|
|
16
16
|
|
|
17
17
|
expectAgentDrivable(canvas, {
|
|
18
18
|
name: "Retry",
|
|
@@ -10,7 +10,7 @@ import * as VirtualizedGridStories from "./VirtualizedGrid.stories";
|
|
|
10
10
|
two-box structure, same content cap. The one difference is that a list of 2,000 costs
|
|
11
11
|
about as much as a list of 40.
|
|
12
12
|
|
|
13
|
-
<Canvas of={VirtualizedGridStories.
|
|
13
|
+
<Canvas of={VirtualizedGridStories.Playground} />
|
|
14
14
|
|
|
15
15
|
## Props
|
|
16
16
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
import { useState } from "react"
|
|
3
4
|
|
|
@@ -107,7 +108,9 @@ type Story = StoryObj<typeof meta>
|
|
|
107
108
|
* Inspect the DOM and count: the row elements are the ones on
|
|
108
109
|
* screen plus `overscanRows` above and below.
|
|
109
110
|
*/
|
|
110
|
-
export const
|
|
111
|
+
export const Playground: Story = {
|
|
112
|
+
parameters: playgroundParameters,
|
|
113
|
+
}
|
|
111
114
|
|
|
112
115
|
/**
|
|
113
116
|
* The app-shell contract: `Main` is the one vertical scroll region,
|
|
@@ -38,7 +38,7 @@ import * as stories from "./VirtualizedGrid.stories.tsx"
|
|
|
38
38
|
|
|
39
39
|
const {
|
|
40
40
|
AllStates,
|
|
41
|
-
|
|
41
|
+
Playground,
|
|
42
42
|
InHiddenTabPanel,
|
|
43
43
|
InShellScrollRegion,
|
|
44
44
|
} = composeStories(stories)
|
|
@@ -84,7 +84,7 @@ const getRowIndexes = (canvasElement: HTMLElement) => [
|
|
|
84
84
|
]
|
|
85
85
|
|
|
86
86
|
test("2,000 items mount as a few dozen cells", async () => {
|
|
87
|
-
const { canvasElement } = await mountStory(
|
|
87
|
+
const { canvasElement } = await mountStory(Playground)
|
|
88
88
|
|
|
89
89
|
await waitFor(async () => {
|
|
90
90
|
await expect(
|
|
@@ -102,7 +102,7 @@ test("2,000 items mount as a few dozen cells", async () => {
|
|
|
102
102
|
})
|
|
103
103
|
|
|
104
104
|
test("the page is still as tall as the whole list", async () => {
|
|
105
|
-
const { canvasElement } = await mountStory(
|
|
105
|
+
const { canvasElement } = await mountStory(Playground)
|
|
106
106
|
|
|
107
107
|
await waitFor(async () => {
|
|
108
108
|
await expect(
|
|
@@ -123,7 +123,7 @@ test("the page is still as tall as the whole list", async () => {
|
|
|
123
123
|
})
|
|
124
124
|
|
|
125
125
|
test("scrolling changes which rows exist", async () => {
|
|
126
|
-
const { canvasElement } = await mountStory(
|
|
126
|
+
const { canvasElement } = await mountStory(Playground)
|
|
127
127
|
|
|
128
128
|
await waitFor(async () => {
|
|
129
129
|
await expect(
|
|
@@ -325,7 +325,7 @@ test("a grid inside a hidden panel mounts nothing and reveals without scrolling"
|
|
|
325
325
|
})
|
|
326
326
|
|
|
327
327
|
test("a screen reader is told the real length", async () => {
|
|
328
|
-
const { canvasElement } = await mountStory(
|
|
328
|
+
const { canvasElement } = await mountStory(Playground)
|
|
329
329
|
|
|
330
330
|
await waitFor(async () => {
|
|
331
331
|
await expect(
|
|
@@ -11,7 +11,7 @@ other component in M3 leans on: it is how a `Spinner` says "Loading…" without
|
|
|
11
11
|
how a `ProgressBar`'s label stays discoverable when the design does not show it, and how an
|
|
12
12
|
`IconButton`'s glyph gets a name.
|
|
13
13
|
|
|
14
|
-
<Canvas of={VisuallyHiddenStories.
|
|
14
|
+
<Canvas of={VisuallyHiddenStories.Playground} />
|
|
15
15
|
|
|
16
16
|
## Props
|
|
17
17
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
|
|
3
4
|
import {
|
|
@@ -28,7 +29,8 @@ export default meta
|
|
|
28
29
|
|
|
29
30
|
type Story = StoryObj<typeof meta>
|
|
30
31
|
|
|
31
|
-
export const
|
|
32
|
+
export const Playground: Story = {
|
|
33
|
+
parameters: playgroundParameters,
|
|
32
34
|
args: { children: "Announced, never printed." },
|
|
33
35
|
render: (visuallyHiddenProps) => (
|
|
34
36
|
<StoryGrid columns={2}>
|
|
@@ -16,7 +16,7 @@ It is **opt-in**, from a subpath:
|
|
|
16
16
|
import { MarkdownEditorCodeMirror } from "@charcuterie/ui/markdown-editor-codemirror"
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
<Canvas of={MarkdownEditorCodeMirrorStories.
|
|
19
|
+
<Canvas of={MarkdownEditorCodeMirrorStories.Playground} />
|
|
20
20
|
|
|
21
21
|
## Props
|
|
22
22
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
|
|
3
4
|
import {
|
|
@@ -91,7 +92,8 @@ type Story = StoryObj<typeof meta>
|
|
|
91
92
|
* genuinely larger, `**` is nowhere on screen, the checkboxes are
|
|
92
93
|
* checkboxes, and the bare URL is a link.
|
|
93
94
|
*/
|
|
94
|
-
export const
|
|
95
|
+
export const Playground: Story = {
|
|
96
|
+
parameters: playgroundParameters,
|
|
95
97
|
args: {
|
|
96
98
|
defaultValue: SAMPLE,
|
|
97
99
|
label: "Description",
|
|
@@ -5,7 +5,7 @@ import { test } from "vitest"
|
|
|
5
5
|
import { mountStory } from "../mountStory.testHelpers.ts"
|
|
6
6
|
import * as stories from "./MarkdownEditorCodeMirror.stories.tsx"
|
|
7
7
|
|
|
8
|
-
const { AllStates, CaretReveal,
|
|
8
|
+
const { AllStates, CaretReveal, Playground, Uploading } =
|
|
9
9
|
composeStories(stories)
|
|
10
10
|
|
|
11
11
|
type Canvas = Awaited<
|
|
@@ -169,7 +169,7 @@ test("a click low in an empty field lands in the document", async () => {
|
|
|
169
169
|
* anywhere in this stack would have quietly taken away.
|
|
170
170
|
*/
|
|
171
171
|
test("a document taller than the frame grows it", async () => {
|
|
172
|
-
const { canvas } = await mountStory(
|
|
172
|
+
const { canvas } = await mountStory(Playground)
|
|
173
173
|
|
|
174
174
|
const content = canvas.getByRole("textbox", {
|
|
175
175
|
name: "Description",
|
|
@@ -235,7 +235,7 @@ test("the toolbar offers Image when uploads are wired", async () => {
|
|
|
235
235
|
/** A button that opens a file picker and then has nowhere to send
|
|
236
236
|
* the file is worse than no button. */
|
|
237
237
|
test("the toolbar hides Image when nothing can take the file", async () => {
|
|
238
|
-
const { body, canvas } = await mountStory(
|
|
238
|
+
const { body, canvas } = await mountStory(Playground)
|
|
239
239
|
|
|
240
240
|
const overflow = canvas.queryByRole("button", {
|
|
241
241
|
name: "More actions",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
3
|
import { useState } from "react"
|
|
3
4
|
|
|
@@ -183,7 +184,9 @@ type Story = StoryObj<typeof meta>
|
|
|
183
184
|
* `getAllByRole("toolbar")` returns nothing, because nothing in this
|
|
184
185
|
* component can render one.
|
|
185
186
|
*/
|
|
186
|
-
export const
|
|
187
|
+
export const Playground: Story = {
|
|
188
|
+
parameters: playgroundParameters,
|
|
189
|
+
}
|
|
187
190
|
|
|
188
191
|
/**
|
|
189
192
|
* The same string, in both surfaces, side by side.
|