@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
|
@@ -14,7 +14,7 @@ mail rules (leaf = field/operator/value, combinators AND/OR) and mux-magic's job
|
|
|
14
14
|
combinator** are fully opaque here — `Combinator` and `Leaf` only ever pass through to the
|
|
15
15
|
consumer's `renderLeaf` and `combinatorOptions`.
|
|
16
16
|
|
|
17
|
-
<Canvas of={QueryBuilderStories.
|
|
17
|
+
<Canvas of={QueryBuilderStories.Playground} />
|
|
18
18
|
|
|
19
19
|
## Props
|
|
20
20
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SerializedTree } from "@charcuterie/logic"
|
|
2
2
|
import { createTree, useTree } from "@charcuterie/logic"
|
|
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"
|
|
@@ -194,7 +195,8 @@ type Story = StoryObj<typeof meta>
|
|
|
194
195
|
* A flat group of two conditions joined by ALL. Change the combinator,
|
|
195
196
|
* edit a condition, or add another with "+ Add condition".
|
|
196
197
|
*/
|
|
197
|
-
export const
|
|
198
|
+
export const Playground: Story = {
|
|
199
|
+
parameters: playgroundParameters,
|
|
198
200
|
render: () => (
|
|
199
201
|
<QueryBuilderHarness initialTree={FLAT_TREE} />
|
|
200
202
|
),
|
|
@@ -10,13 +10,13 @@ import * as stories from "./QueryBuilder.stories.tsx"
|
|
|
10
10
|
const {
|
|
11
11
|
AllStates,
|
|
12
12
|
CustomCombinator,
|
|
13
|
-
|
|
13
|
+
Playground,
|
|
14
14
|
Interactive,
|
|
15
15
|
} = composeStories(stories)
|
|
16
16
|
|
|
17
17
|
test("the root group exposes its combinator as a named 'Match' control", async () => {
|
|
18
18
|
const { canvas, canvasElement } =
|
|
19
|
-
await mountStory(
|
|
19
|
+
await mountStory(Playground)
|
|
20
20
|
|
|
21
21
|
// One root group, so exactly one combinator picker. It is a
|
|
22
22
|
// `Listbox` trigger, so the control is a button that opens a
|
|
@@ -16,7 +16,7 @@ each option carries a real sentence and an in-line strip would wrap. Choosing be
|
|
|
16
16
|
is layout, not behaviour, which is why the keyboard model is identical and lives in the same
|
|
17
17
|
two hooks.
|
|
18
18
|
|
|
19
|
-
<Canvas of={RadioGroupStories.
|
|
19
|
+
<Canvas of={RadioGroupStories.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 { controlSizeArgType } from "../argTypes.storyHelpers.ts"
|
|
@@ -98,7 +99,8 @@ export default meta
|
|
|
98
99
|
|
|
99
100
|
type Story = StoryObj<typeof meta>
|
|
100
101
|
|
|
101
|
-
export const
|
|
102
|
+
export const Playground: Story = {
|
|
103
|
+
parameters: playgroundParameters,
|
|
102
104
|
args: { items: NAMING_ITEMS, label: "Naming scheme" },
|
|
103
105
|
}
|
|
104
106
|
|
|
@@ -9,7 +9,7 @@ import * as stories from "./RadioGroup.stories.tsx"
|
|
|
9
9
|
|
|
10
10
|
const {
|
|
11
11
|
AllStates,
|
|
12
|
-
|
|
12
|
+
Playground,
|
|
13
13
|
Interactive,
|
|
14
14
|
Responsive,
|
|
15
15
|
Tiles,
|
|
@@ -30,7 +30,7 @@ const getOptions = (group: HTMLElement) =>
|
|
|
30
30
|
|
|
31
31
|
test("it is a radio group with exactly one option checked", async () => {
|
|
32
32
|
const { canvas, canvasElement } =
|
|
33
|
-
await mountStory(
|
|
33
|
+
await mountStory(Playground)
|
|
34
34
|
|
|
35
35
|
const group = expectAgentDrivable(canvas, {
|
|
36
36
|
name: "Naming scheme",
|
package/src/Rail/Rail.mdx
CHANGED
|
@@ -9,7 +9,7 @@ import * as RailStories from "./Rail.stories";
|
|
|
9
9
|
A side column — the app's sections, a filter panel, the selected job's detail. `side` places
|
|
10
10
|
it, `landmark` decides what it is, and `label` is required.
|
|
11
11
|
|
|
12
|
-
<Canvas of={RailStories.
|
|
12
|
+
<Canvas of={RailStories.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 { toStoryChoice } from "../argTypes.storyHelpers.ts"
|
|
@@ -40,7 +41,8 @@ type Story = StoryObj<typeof meta>
|
|
|
40
41
|
* name: "Sections" })` is what distinguishes its "Settings" link
|
|
41
42
|
* from the header's "Settings" button.
|
|
42
43
|
*/
|
|
43
|
-
export const
|
|
44
|
+
export const Playground: Story = {
|
|
45
|
+
parameters: playgroundParameters,
|
|
44
46
|
args: {
|
|
45
47
|
label: "Sections",
|
|
46
48
|
landmark: "navigation",
|
package/src/Rail/Rail.test.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "../viewport.testHelpers.ts"
|
|
13
13
|
import * as stories from "./Rail.stories.tsx"
|
|
14
14
|
|
|
15
|
-
const { AllVariants,
|
|
15
|
+
const { AllVariants, Playground, Interactive, Responsive } =
|
|
16
16
|
composeStories(stories)
|
|
17
17
|
|
|
18
18
|
afterAll(async () => {
|
|
@@ -144,7 +144,7 @@ test("the rail scopes its own links away from the header's", async () => {
|
|
|
144
144
|
})
|
|
145
145
|
|
|
146
146
|
test("a single start rail is clean under axe", async () => {
|
|
147
|
-
const { canvasElement } = await mountStory(
|
|
147
|
+
const { canvasElement } = await mountStory(Playground)
|
|
148
148
|
|
|
149
149
|
await expectNoAxeViolations(canvasElement)
|
|
150
150
|
})
|
|
@@ -14,7 +14,7 @@ they typed into a `TimecodeInput` beside it. So the shape this is built for is a
|
|
|
14
14
|
timeline — a bar spanning the whole runtime, two thumbs, and the chosen span painted
|
|
15
15
|
between them.
|
|
16
16
|
|
|
17
|
-
<Canvas of={RangeSliderStories.
|
|
17
|
+
<Canvas of={RangeSliderStories.Playground} />
|
|
18
18
|
|
|
19
19
|
## Props
|
|
20
20
|
|
|
@@ -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
|
|
|
@@ -98,7 +99,8 @@ export default meta
|
|
|
98
99
|
|
|
99
100
|
type Story = StoryObj<typeof meta>
|
|
100
101
|
|
|
101
|
-
export const
|
|
102
|
+
export const Playground: Story = {
|
|
103
|
+
parameters: playgroundParameters,
|
|
102
104
|
args: {
|
|
103
105
|
label: "Clip",
|
|
104
106
|
max: 2_700,
|
|
@@ -7,8 +7,12 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./RangeSlider.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const {
|
|
11
|
-
|
|
10
|
+
const {
|
|
11
|
+
AllStates,
|
|
12
|
+
BesideTheSlider,
|
|
13
|
+
Playground,
|
|
14
|
+
Interactive,
|
|
15
|
+
} = composeStories(stories)
|
|
12
16
|
|
|
13
17
|
/** A fraction along the bar, as viewport coordinates. */
|
|
14
18
|
const pointerAt =
|
|
@@ -39,7 +43,7 @@ const readThumbStyles = (thumb: Element) => {
|
|
|
39
43
|
|
|
40
44
|
test("it is two named sliders inside one named group", async () => {
|
|
41
45
|
const { canvas, canvasElement } =
|
|
42
|
-
await mountStory(
|
|
46
|
+
await mountStory(Playground)
|
|
43
47
|
|
|
44
48
|
const start = expectAgentDrivable(canvas, {
|
|
45
49
|
name: "Clip start",
|
|
@@ -8,7 +8,7 @@ import * as ReorderListStories from "./ReorderList.stories";
|
|
|
8
8
|
|
|
9
9
|
A vertical list put in a different order — by two buttons, or by dragging a handle.
|
|
10
10
|
|
|
11
|
-
<Canvas of={ReorderListStories.
|
|
11
|
+
<Canvas of={ReorderListStories.Playground} />
|
|
12
12
|
|
|
13
13
|
## Props
|
|
14
14
|
|
|
@@ -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
|
|
|
@@ -133,7 +134,8 @@ type Story = StoryObj<typeof meta>
|
|
|
133
134
|
* A checklist in the order it will be worked through. Press ↑ or ↓,
|
|
134
135
|
* or press and hold the position and drag it somewhere else.
|
|
135
136
|
*/
|
|
136
|
-
export const
|
|
137
|
+
export const Playground: Story = {
|
|
138
|
+
parameters: playgroundParameters,
|
|
137
139
|
render: () => <StoryList />,
|
|
138
140
|
}
|
|
139
141
|
|
|
@@ -10,7 +10,7 @@ import { expectNoAxeViolations } from "../expectNoAxeViolations.testHelpers.ts"
|
|
|
10
10
|
import { mountStory } from "../mountStory.testHelpers.ts"
|
|
11
11
|
import * as stories from "./ReorderList.stories.tsx"
|
|
12
12
|
|
|
13
|
-
const {
|
|
13
|
+
const { Playground, SingleItem } = composeStories(stories)
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* The rows come back in the DOM order the list draws them, which is
|
|
@@ -25,7 +25,7 @@ const getRowLabels = (canvas: ReturnType<typeof within>) =>
|
|
|
25
25
|
.filter((text: string) => text !== "")
|
|
26
26
|
|
|
27
27
|
test("moves a row later with the button, and says where it went", async () => {
|
|
28
|
-
const { canvas } = await mountStory(
|
|
28
|
+
const { canvas } = await mountStory(Playground)
|
|
29
29
|
|
|
30
30
|
await userEvent.click(
|
|
31
31
|
canvas.getByRole("button", {
|
|
@@ -56,7 +56,7 @@ test("moves a row later with the button, and says where it went", async () => {
|
|
|
56
56
|
})
|
|
57
57
|
|
|
58
58
|
test("moves a row earlier, and the ends stay disabled", async () => {
|
|
59
|
-
const { canvas } = await mountStory(
|
|
59
|
+
const { canvas } = await mountStory(Playground)
|
|
60
60
|
|
|
61
61
|
expect(
|
|
62
62
|
canvas.getByRole("button", {
|
|
@@ -93,7 +93,7 @@ test("a one-row list offers no drag handle", async () => {
|
|
|
93
93
|
})
|
|
94
94
|
|
|
95
95
|
test("the handle takes the gesture away from the browser's scroll", async () => {
|
|
96
|
-
const { canvas } = await mountStory(
|
|
96
|
+
const { canvas } = await mountStory(Playground)
|
|
97
97
|
|
|
98
98
|
const grip = canvas.getAllByTitle("Drag to reorder")[0]
|
|
99
99
|
|
|
@@ -118,7 +118,7 @@ test("the handle takes the gesture away from the browser's scroll", async () =>
|
|
|
118
118
|
* passes or fails for a reason the component does not have.
|
|
119
119
|
*/
|
|
120
120
|
test("drags a row past the one below it", async () => {
|
|
121
|
-
const { canvas } = await mountStory(
|
|
121
|
+
const { canvas } = await mountStory(Playground)
|
|
122
122
|
|
|
123
123
|
const grip = canvas.getAllByTitle("Drag to reorder")[0]
|
|
124
124
|
|
|
@@ -159,7 +159,7 @@ test("drags a row past the one below it", async () => {
|
|
|
159
159
|
* and every stray tap on a row reorders the list.
|
|
160
160
|
*/
|
|
161
161
|
test("a press with no movement reorders nothing", async () => {
|
|
162
|
-
const { canvas } = await mountStory(
|
|
162
|
+
const { canvas } = await mountStory(Playground)
|
|
163
163
|
|
|
164
164
|
const grip = canvas.getAllByTitle("Drag to reorder")[0]
|
|
165
165
|
|
|
@@ -184,7 +184,7 @@ test("a press with no movement reorders nothing", async () => {
|
|
|
184
184
|
})
|
|
185
185
|
|
|
186
186
|
test("has no axe violations", async () => {
|
|
187
|
-
const { canvasElement } = await mountStory(
|
|
187
|
+
const { canvasElement } = await mountStory(Playground)
|
|
188
188
|
|
|
189
189
|
await expectNoAxeViolations(canvasElement)
|
|
190
190
|
})
|
|
@@ -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
|
|
|
@@ -28,7 +29,9 @@ 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,
|
|
34
|
+
}
|
|
32
35
|
|
|
33
36
|
export const Routed: Story = {
|
|
34
37
|
decorators: [
|
|
@@ -6,10 +6,10 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
6
6
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
7
7
|
import * as stories from "./UnstyledLink.stories.tsx"
|
|
8
8
|
|
|
9
|
-
const {
|
|
9
|
+
const { Playground, Routed } = composeStories(stories)
|
|
10
10
|
|
|
11
11
|
test("keeps the caller's paint and works without a router", async () => {
|
|
12
|
-
const { canvas } = await mountStory(
|
|
12
|
+
const { canvas } = await mountStory(Playground)
|
|
13
13
|
const link = expectAgentDrivable(canvas, {
|
|
14
14
|
name: "Jobs",
|
|
15
15
|
role: "link",
|
|
@@ -15,4 +15,4 @@ because the clear button is a primary pointer target rather than a compact toolb
|
|
|
15
15
|
Use `Field` for a visible label, or pass `aria-label` when the surrounding layout already
|
|
16
16
|
names the search.
|
|
17
17
|
|
|
18
|
-
<Canvas of={Stories.
|
|
18
|
+
<Canvas of={Stories.Playground} />
|
|
@@ -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
|
|
|
@@ -61,7 +62,8 @@ const meta = {
|
|
|
61
62
|
export default meta
|
|
62
63
|
type Story = StoryObj<typeof meta>
|
|
63
64
|
|
|
64
|
-
export const
|
|
65
|
+
export const Playground: Story = {
|
|
66
|
+
parameters: playgroundParameters,
|
|
65
67
|
render: () => <ControlledSearch />,
|
|
66
68
|
}
|
|
67
69
|
|
|
@@ -15,7 +15,7 @@ something without revealing anything had nothing to reuse and hand-rolled its ow
|
|
|
15
15
|
rip-deck's `ColumnPicker` is that hand-roll
|
|
16
16
|
([decision](../../../docs/decisions/2026-07-30-tab-selection-is-a-single-picker.md)).
|
|
17
17
|
|
|
18
|
-
<Canvas of={SegmentedControlStories.
|
|
18
|
+
<Canvas of={SegmentedControlStories.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"
|
|
@@ -38,7 +39,8 @@ export default meta
|
|
|
38
39
|
|
|
39
40
|
type Story = StoryObj<typeof meta>
|
|
40
41
|
|
|
41
|
-
export const
|
|
42
|
+
export const Playground: Story = {
|
|
43
|
+
parameters: playgroundParameters,
|
|
42
44
|
args: { items: COLUMN_ITEMS, label: "Columns" },
|
|
43
45
|
}
|
|
44
46
|
|
|
@@ -7,7 +7,7 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./SegmentedControl.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllStates,
|
|
10
|
+
const { AllStates, Playground, FullWidth, Interactive } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -25,7 +25,7 @@ const getOptions = (group: HTMLElement) =>
|
|
|
25
25
|
|
|
26
26
|
test("it is a radio group with exactly one option checked", async () => {
|
|
27
27
|
const { canvas, canvasElement } =
|
|
28
|
-
await mountStory(
|
|
28
|
+
await mountStory(Playground)
|
|
29
29
|
|
|
30
30
|
const group = expectAgentDrivable(canvas, {
|
|
31
31
|
name: "Columns",
|
package/src/Select/Select.mdx
CHANGED
|
@@ -37,7 +37,7 @@ that differ only in their Tailwind classes, and **six hand-rolled `role="listbox
|
|
|
37
37
|
controls**. This component is the first twelve. The other six are a different pattern —
|
|
38
38
|
see below.
|
|
39
39
|
|
|
40
|
-
<Canvas of={SelectStories.
|
|
40
|
+
<Canvas of={SelectStories.Playground} />
|
|
41
41
|
|
|
42
42
|
## Props
|
|
43
43
|
|
|
@@ -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"
|
|
@@ -72,7 +73,8 @@ export default meta
|
|
|
72
73
|
|
|
73
74
|
type Story = StoryObj<typeof meta>
|
|
74
75
|
|
|
75
|
-
export const
|
|
76
|
+
export const Playground: Story = {
|
|
77
|
+
parameters: playgroundParameters,
|
|
76
78
|
args: { label: "Rip profile", options: PROFILES },
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -7,12 +7,12 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./Select.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllStates, AllVariants,
|
|
10
|
+
const { AllStates, AllVariants, Playground, Sized } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
test("a select is named, and therefore findable", async () => {
|
|
14
14
|
const { canvas, canvasElement } =
|
|
15
|
-
await mountStory(
|
|
15
|
+
await mountStory(Playground)
|
|
16
16
|
|
|
17
17
|
// Twelve of the fleet's fourteen native selects have neither a
|
|
18
18
|
// `<label for>` nor an `aria-label`, so this query returns nothing
|
|
@@ -26,7 +26,7 @@ test("a select is named, and therefore findable", async () => {
|
|
|
26
26
|
})
|
|
27
27
|
|
|
28
28
|
test("choosing reports the value outward", async () => {
|
|
29
|
-
const { canvas } = await mountStory(
|
|
29
|
+
const { canvas } = await mountStory(Playground)
|
|
30
30
|
|
|
31
31
|
const select = expectAgentDrivable(canvas, {
|
|
32
32
|
name: "Rip profile",
|
|
@@ -64,7 +64,7 @@ test("the initial value seeds the DOM and nothing more", async () => {
|
|
|
64
64
|
})
|
|
65
65
|
|
|
66
66
|
test("a disabled option stays announced", async () => {
|
|
67
|
-
const { canvas } = await mountStory(
|
|
67
|
+
const { canvas } = await mountStory(Playground)
|
|
68
68
|
|
|
69
69
|
const select = expectAgentDrivable(canvas, {
|
|
70
70
|
name: "Rip profile",
|
package/src/Shell/Shell.mdx
CHANGED
|
@@ -23,7 +23,7 @@ The owner's ask, verbatim:
|
|
|
23
23
|
> "We need a header component. Apps are all doing it differently, and there's no
|
|
24
24
|
> standardized way to do a sticky header + narrow view... A Unified App Shell basically."
|
|
25
25
|
|
|
26
|
-
<Canvas of={ShellStories.
|
|
26
|
+
<Canvas of={ShellStories.Playground} />
|
|
27
27
|
|
|
28
28
|
## Props
|
|
29
29
|
|
|
@@ -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"
|
|
@@ -53,7 +54,8 @@ type Story = StoryObj<typeof meta>
|
|
|
53
54
|
* need. Copy it verbatim; only the contents of `actions` and
|
|
54
55
|
* `Main` differ per app.
|
|
55
56
|
*/
|
|
56
|
-
export const
|
|
57
|
+
export const Playground: Story = {
|
|
58
|
+
parameters: playgroundParameters,
|
|
57
59
|
render: (shellProps) => (
|
|
58
60
|
<Shell {...shellProps}>
|
|
59
61
|
<Header
|
package/src/Shell/Shell.test.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import * as stories from "./Shell.stories.tsx"
|
|
14
14
|
|
|
15
15
|
const {
|
|
16
|
-
|
|
16
|
+
Playground,
|
|
17
17
|
Interactive,
|
|
18
18
|
Responsive,
|
|
19
19
|
Scrollable,
|
|
@@ -270,7 +270,7 @@ test("header and main are capped at the same width", async () => {
|
|
|
270
270
|
await setViewport(DESKTOP)
|
|
271
271
|
|
|
272
272
|
const { canvas, canvasElement } =
|
|
273
|
-
await mountStory(
|
|
273
|
+
await mountStory(Playground)
|
|
274
274
|
|
|
275
275
|
// The inner rows, not the landmarks: the `<header>` and
|
|
276
276
|
// `<main>` are both full-bleed on purpose, and it is the row
|
|
@@ -23,7 +23,7 @@ means a screen reader reading three empty bars, and an agent finding a "loading"
|
|
|
23
23
|
cannot act on.
|
|
24
24
|
|
|
25
25
|
**The load has to be announced by the region that owns it** — a `Spinner`, or `aria-busy`
|
|
26
|
-
on the container. The `
|
|
26
|
+
on the container. The `Playground` story asserts the skeleton is hidden from assistive
|
|
27
27
|
technology, and `Interactive` asserts it contributes no roles at all. Both are assertions
|
|
28
28
|
axe cannot make for you: there is nothing invalid about a visible placeholder.
|
|
29
29
|
|
|
@@ -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 {
|
|
@@ -26,7 +27,8 @@ type Story = StoryObj<typeof meta>
|
|
|
26
27
|
* is hidden from AT entirely — otherwise a screen reader reads three
|
|
27
28
|
* empty bars.
|
|
28
29
|
*/
|
|
29
|
-
export const
|
|
30
|
+
export const Playground: Story = {
|
|
31
|
+
parameters: playgroundParameters,
|
|
30
32
|
args: { blockSize: "1.5rem", inlineSize: "12rem" },
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -6,10 +6,10 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
6
6
|
import { expectHiddenFromAgents } from "../testing/index.ts"
|
|
7
7
|
import * as stories from "./Skeleton.stories.tsx"
|
|
8
8
|
|
|
9
|
-
const {
|
|
9
|
+
const { Playground, Interactive } = composeStories(stories)
|
|
10
10
|
|
|
11
11
|
test("a skeleton is hidden from assistive technology", async () => {
|
|
12
|
-
const { canvasElement } = await mountStory(
|
|
12
|
+
const { canvasElement } = await mountStory(Playground)
|
|
13
13
|
|
|
14
14
|
const skeleton = canvasElement.querySelector(
|
|
15
15
|
"div[aria-hidden]",
|
package/src/Slider/Slider.mdx
CHANGED
|
@@ -13,7 +13,7 @@ could not have a scrubber and the choice was a native range input or a hand-roll
|
|
|
13
13
|
a single app. `ProgressBar` looks like the answer and is not — it is **output**, it takes
|
|
14
14
|
no input, and `role="progressbar"` tells assistive technology exactly that.
|
|
15
15
|
|
|
16
|
-
<Canvas of={SliderStories.
|
|
16
|
+
<Canvas of={SliderStories.Playground} />
|
|
17
17
|
|
|
18
18
|
## Props
|
|
19
19
|
|
|
@@ -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
|
|
|
@@ -76,7 +77,8 @@ export default meta
|
|
|
76
77
|
|
|
77
78
|
type Story = StoryObj<typeof meta>
|
|
78
79
|
|
|
79
|
-
export const
|
|
80
|
+
export const Playground: Story = {
|
|
81
|
+
parameters: playgroundParameters,
|
|
80
82
|
args: { label: "Volume", value: 40 },
|
|
81
83
|
}
|
|
82
84
|
|
|
@@ -7,12 +7,12 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./Slider.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllStates,
|
|
10
|
+
const { AllStates, Playground, Interactive } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
test("it is a slider 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 slider = expectAgentDrivable(canvas, {
|
|
18
18
|
name: "Volume",
|
|
@@ -11,7 +11,7 @@ explicit about that, and the reason is that sorting *data* is app logic that dif
|
|
|
11
11
|
column type, while announcing *that* a column is sorted is markup every table gets wrong the
|
|
12
12
|
same way.
|
|
13
13
|
|
|
14
|
-
<Canvas of={SortableTableHeaderStories.
|
|
14
|
+
<Canvas of={SortableTableHeaderStories.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 { useState } from "react"
|
|
3
4
|
|
|
@@ -40,7 +41,8 @@ export default meta
|
|
|
40
41
|
|
|
41
42
|
type Story = StoryObj<typeof meta>
|
|
42
43
|
|
|
43
|
-
export const
|
|
44
|
+
export const Playground: Story = {
|
|
45
|
+
parameters: playgroundParameters,
|
|
44
46
|
args: { children: "Title", direction: "ascending" },
|
|
45
47
|
render: (args) => (
|
|
46
48
|
<table className={TABLE_CLASS}>
|
|
@@ -7,7 +7,7 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./SortableTableHeader.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllVariants,
|
|
10
|
+
const { AllVariants, Playground, Interactive } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -19,7 +19,7 @@ const { AllVariants, Default, Interactive } =
|
|
|
19
19
|
*/
|
|
20
20
|
test("the cell announces the sort, not the glyph", async () => {
|
|
21
21
|
const { canvas, canvasElement } =
|
|
22
|
-
await mountStory(
|
|
22
|
+
await mountStory(Playground)
|
|
23
23
|
|
|
24
24
|
const title = expectAgentDrivable(canvas, {
|
|
25
25
|
name: "Title",
|
|
@@ -68,7 +68,7 @@ test("an unsorted sortable column says `none`", async () => {
|
|
|
68
68
|
* to anything reading the table's structure.
|
|
69
69
|
*/
|
|
70
70
|
test("the header is a columnheader containing a button", async () => {
|
|
71
|
-
const { canvas } = await mountStory(
|
|
71
|
+
const { canvas } = await mountStory(Playground)
|
|
72
72
|
|
|
73
73
|
const header = expectAgentDrivable(canvas, {
|
|
74
74
|
name: "Title",
|
package/src/Spinner/Spinner.mdx
CHANGED
|
@@ -9,7 +9,7 @@ import * as SpinnerStories from "./Spinner.stories";
|
|
|
9
9
|
**Zero of these exist anywhere in the fleet.** Not one repo has a spinner; every app
|
|
10
10
|
renders bare `"loading…"` text. Best effort-to-payoff component in M3.
|
|
11
11
|
|
|
12
|
-
<Canvas of={SpinnerStories.
|
|
12
|
+
<Canvas of={SpinnerStories.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 { controlSizeArgType } from "../argTypes.storyHelpers.ts"
|
|
@@ -31,7 +32,8 @@ type Story = StoryObj<typeof meta>
|
|
|
31
32
|
* this beats a rotating `<div>`: the state is announced even though
|
|
32
33
|
* nothing is printed.
|
|
33
34
|
*/
|
|
34
|
-
export const
|
|
35
|
+
export const Playground: Story = {
|
|
36
|
+
parameters: playgroundParameters,
|
|
35
37
|
args: {},
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -6,10 +6,10 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
6
6
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
7
7
|
import * as stories from "./Spinner.stories.tsx"
|
|
8
8
|
|
|
9
|
-
const {
|
|
9
|
+
const { Playground, Interactive } = composeStories(stories)
|
|
10
10
|
|
|
11
11
|
test("the hidden label is the accessible name", async () => {
|
|
12
|
-
const { canvas } = await mountStory(
|
|
12
|
+
const { canvas } = await mountStory(Playground)
|
|
13
13
|
|
|
14
14
|
// A live region takes **no** accessible name from its content, so
|
|
15
15
|
// `Spinner` sets both — text for the announcement, `aria-label`
|