@charcuterie/ui 4.5.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/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 +2 -1
- 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 +1 -1
- package/src/ActionTiles/ActionTiles.stories.tsx +3 -1
- package/src/ActionTiles/ActionTiles.test.tsx +3 -3
- 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/README.md
CHANGED
|
@@ -284,8 +284,13 @@ rename breaks only the rendered page).
|
|
|
284
284
|
([decision](../../docs/decisions/2026-08-21-a-deprecation-is-a-badge-in-place-and-the-sidebar-has-groups.md)).
|
|
285
285
|
2. Colours from `intentStyles.ts`, sizes from `controlStyles.ts`. No hex, no `*-slate-*`
|
|
286
286
|
(a test checks).
|
|
287
|
-
3. The five stories: `
|
|
288
|
-
widths, via `ContainerBoard`), `Interactive` (the complete keyboard path).
|
|
287
|
+
3. The five stories: `Playground`, `AllVariants`, `AllStates`, `Responsive` (three
|
|
288
|
+
container widths, via `ContainerBoard`), `Interactive` (the complete keyboard path).
|
|
289
|
+
**`Playground` is the only one that carries `parameters: playgroundParameters`.** The
|
|
290
|
+
addon panel is closed on every story in this Storybook, and that line is how the one
|
|
291
|
+
story whose `args` drive a single instance opens it again. The other four render their
|
|
292
|
+
own matrix, so a control moves at most one cell of the board
|
|
293
|
+
([decision](../../docs/decisions/2026-09-13-the-addon-panel-is-closed-except-on-the-playground-story.md)).
|
|
289
294
|
4. Export from `src/index.ts` — the one sanctioned barrel. Components import each other
|
|
290
295
|
directly, never through it.
|
|
291
296
|
5. **If it is an overlay, portal it to the body** — `FloatingPortal`, through
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -41,7 +41,10 @@ export declare const ELEVATION_CLASS: Record<ElevationStep, string>;
|
|
|
41
41
|
*
|
|
42
42
|
* `aria-labelledby` rather than `aria-label`, because the heading is
|
|
43
43
|
* on screen already and stating the name twice is how the two drift
|
|
44
|
-
* apart.
|
|
44
|
+
* apart. A card with **no** `heading` keeps the `aria-labelledby`
|
|
45
|
+
* the call site passed, for the app that draws its own title row
|
|
46
|
+
* inside the card — the name still points at text on screen, which
|
|
47
|
+
* is the same rule one level out.
|
|
45
48
|
*
|
|
46
49
|
* **Density is not a prop here.** mux-magic's inventory turned up a
|
|
47
50
|
* `CardDensityProvider` in the withdrawn bambuddy evidence, and it
|
|
@@ -51,5 +54,5 @@ export declare const ELEVATION_CLASS: Record<ElevationStep, string>;
|
|
|
51
54
|
* because a card wrapping a poster grid genuinely has none, which is
|
|
52
55
|
* a layout fact rather than a density one.
|
|
53
56
|
*/
|
|
54
|
-
export declare const Card: ({ accentEdge, actions, children, className, elevation, footer, heading, headingLevel, padding, style, surface, ...sectionProps }: CardProps) => ReactNode;
|
|
57
|
+
export declare const Card: ({ "aria-labelledby": ariaLabelledBy, accentEdge, actions, children, className, elevation, footer, heading, headingLevel, padding, style, surface, ...sectionProps }: CardProps) => ReactNode;
|
|
55
58
|
//# sourceMappingURL=Card.d.ts.map
|
package/dist/Card/Card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACV,MAAM,OAAO,CAAA;AAGd,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAMzD,MAAM,MAAM,WAAW,GAAG,OAAO,CAC/B,WAAW,EACX,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAC7B,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;AAErD,MAAM,MAAM,SAAS,GAAG,qBAAqB,CAAC,SAAS,CAAC,GAAG;IACzD;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,uDAAuD;IACvD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB,CAAA;AAQD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,aAAa,EACb,MAAM,CAMP,CAAA;AASD
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACV,MAAM,OAAO,CAAA;AAGd,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAMzD,MAAM,MAAM,WAAW,GAAG,OAAO,CAC/B,WAAW,EACX,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAC7B,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;AAErD,MAAM,MAAM,SAAS,GAAG,qBAAqB,CAAC,SAAS,CAAC,GAAG;IACzD;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,uDAAuD;IACvD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB,CAAA;AAQD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,aAAa,EACb,MAAM,CAMP,CAAA;AASD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,IAAI,GAAI,qKAclB,SAAS,KAAG,SAqFd,CAAA"}
|
package/dist/Card/Card.js
CHANGED
|
@@ -36,7 +36,10 @@ const PADDING_CLASS = {
|
|
|
36
36
|
*
|
|
37
37
|
* `aria-labelledby` rather than `aria-label`, because the heading is
|
|
38
38
|
* on screen already and stating the name twice is how the two drift
|
|
39
|
-
* apart.
|
|
39
|
+
* apart. A card with **no** `heading` keeps the `aria-labelledby`
|
|
40
|
+
* the call site passed, for the app that draws its own title row
|
|
41
|
+
* inside the card — the name still points at text on screen, which
|
|
42
|
+
* is the same rule one level out.
|
|
40
43
|
*
|
|
41
44
|
* **Density is not a prop here.** mux-magic's inventory turned up a
|
|
42
45
|
* `CardDensityProvider` in the withdrawn bambuddy evidence, and it
|
|
@@ -46,7 +49,7 @@ const PADDING_CLASS = {
|
|
|
46
49
|
* because a card wrapping a poster grid genuinely has none, which is
|
|
47
50
|
* a layout fact rather than a density one.
|
|
48
51
|
*/
|
|
49
|
-
export const Card = ({ accentEdge, actions, children, className, elevation = "low", footer, heading, headingLevel = 2, padding = "md", style, surface = "raised", ...sectionProps }) => {
|
|
52
|
+
export const Card = ({ "aria-labelledby": ariaLabelledBy, accentEdge, actions, children, className, elevation = "low", footer, heading, headingLevel = 2, padding = "md", style, surface = "raised", ...sectionProps }) => {
|
|
50
53
|
const headingId = useUniqueId();
|
|
51
54
|
// The caller's own `style` wins. An accent colour is one custom
|
|
52
55
|
// property, and silently dropping whatever else the call site set
|
|
@@ -57,8 +60,25 @@ export const Card = ({ accentEdge, actions, children, className, elevation = "lo
|
|
|
57
60
|
const mergedStyle = accentEdgeStyle == null
|
|
58
61
|
? style
|
|
59
62
|
: { ...accentEdgeStyle, ...style };
|
|
63
|
+
// The caller's own pointer is the FALLBACK, not the loser. This
|
|
64
|
+
// attribute is written *after* the spread, so `undefined` here
|
|
65
|
+
// does not mean "leave whatever the call site passed": it
|
|
66
|
+
// overwrites it, React then drops the attribute entirely, and the
|
|
67
|
+
// card's accessible name falls back to its whole subtree with
|
|
68
|
+
// nothing failing — not typecheck, not axe, not a render. A
|
|
69
|
+
// `role="button"` tile in mail-sifter naming itself
|
|
70
|
+
// `aria-labelledby="recent-tile-heading"` announced as "Recent
|
|
71
|
+
// Mail 6 40 arrived in the last 24 hours, 34 done".
|
|
72
|
+
//
|
|
73
|
+
// `heading` still wins when it is given, because that is the name
|
|
74
|
+
// the reader can see and this component renders it. Do not
|
|
75
|
+
// "simplify" this back to a ternary ending in `undefined`.
|
|
76
|
+
//
|
|
77
|
+
// `aria-label` needs no equivalent: the component never writes
|
|
78
|
+
// one, so the spread carries the caller's through untouched.
|
|
79
|
+
const labelledById = heading ? headingId : ariaLabelledBy;
|
|
60
80
|
const Heading = `h${headingLevel}`;
|
|
61
|
-
return (_jsxs("section", { ...sectionProps, "aria-labelledby":
|
|
81
|
+
return (_jsxs("section", { ...sectionProps, "aria-labelledby": labelledById, className: toClassName(
|
|
62
82
|
// `@container` here, not on a wrapper, is what lets the
|
|
63
83
|
// header stack at narrow widths *inside a wide viewport* —
|
|
64
84
|
// a card in a sidebar and the same card full-bleed are the
|
package/dist/Card/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAUhD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EACL,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,qBAAqB,CAAA;AA8B5B,MAAM,aAAa,GAAgC;IACjD,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,mBAAmB;IAC3B,MAAM,EAAE,mBAAmB;CAC5B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAGxB;IACF,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,YAAY;IACjB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,aAAa;CACpB,CAAA;AAED,MAAM,aAAa,GAAgC;IACjD,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;CACV,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charcuterie/ui",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "The Charcuterie components. Tokens for look, @charcuterie/logic for state, ARIA that agents can actually drive.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
+
"@charcuterie/storybook-config": "0.4.0",
|
|
97
98
|
"@codemirror/commands": "^6",
|
|
98
99
|
"@codemirror/lang-markdown": "^6",
|
|
99
100
|
"@codemirror/language": "^6",
|
|
@@ -9,7 +9,7 @@ import * as AccordionStories from "./Accordion.stories";
|
|
|
9
9
|
Eleven sites in the fleet. The plan called it "nearly free once `Tabs` exists" — it is, the
|
|
10
10
|
exclusive mode is `VisibilityGroup` and nothing else — but the saving is not why it ships.
|
|
11
11
|
|
|
12
|
-
<Canvas of={AccordionStories.
|
|
12
|
+
<Canvas of={AccordionStories.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 { Badge } from "../Badge/Badge.tsx"
|
|
@@ -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: { expandedKeys: ["disc"], items: JOB_SECTIONS },
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -7,12 +7,12 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./Accordion.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllStates, AllVariants,
|
|
10
|
+
const { AllStates, AllVariants, Playground } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
test("a trigger says what it controls and whether it is open", async () => {
|
|
14
14
|
const { canvas, canvasElement } =
|
|
15
|
-
await mountStory(
|
|
15
|
+
await mountStory(Playground)
|
|
16
16
|
|
|
17
17
|
const disc = expectAgentDrivable(canvas, {
|
|
18
18
|
name: "Disc",
|
|
@@ -57,7 +57,7 @@ test("a trigger says what it controls and whether it is open", async () => {
|
|
|
57
57
|
* frame later.
|
|
58
58
|
*/
|
|
59
59
|
test("the initially expanded section is expanded on the first paint", async () => {
|
|
60
|
-
const { canvas } = await mountStory(
|
|
60
|
+
const { canvas } = await mountStory(Playground)
|
|
61
61
|
|
|
62
62
|
const expanded = canvas
|
|
63
63
|
.queryAllByRole("button")
|
|
@@ -72,7 +72,7 @@ test("the initially expanded section is expanded on the first paint", async () =
|
|
|
72
72
|
})
|
|
73
73
|
|
|
74
74
|
test("exclusive means opening one closes the other", async () => {
|
|
75
|
-
const { canvas } = await mountStory(
|
|
75
|
+
const { canvas } = await mountStory(Playground)
|
|
76
76
|
|
|
77
77
|
const log = expectAgentDrivable(canvas, {
|
|
78
78
|
name: "Log",
|
|
@@ -15,7 +15,7 @@ named this case under *"What this deliberately does not cover"*: mux-magic's "Pi
|
|
|
15
15
|
tiles are `<a href>` and points-market's are `<Link>`, and *"a link is not a radio, and
|
|
16
16
|
giving one `aria-checked` would be worse than the paint it replaced"*.
|
|
17
17
|
|
|
18
|
-
<Canvas of={ActionTilesStories.
|
|
18
|
+
<Canvas of={ActionTilesStories.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"
|
|
@@ -142,7 +143,8 @@ export default meta
|
|
|
142
143
|
|
|
143
144
|
type Story = StoryObj<typeof meta>
|
|
144
145
|
|
|
145
|
-
export const
|
|
146
|
+
export const Playground: Story = {
|
|
147
|
+
parameters: playgroundParameters,
|
|
146
148
|
args: { items: QUEUE_TYPE_ITEMS, label: "Queue type" },
|
|
147
149
|
}
|
|
148
150
|
|
|
@@ -11,7 +11,7 @@ const {
|
|
|
11
11
|
AllStates,
|
|
12
12
|
AutoHues,
|
|
13
13
|
BesideTheRadioTile,
|
|
14
|
-
|
|
14
|
+
Playground,
|
|
15
15
|
Interactive,
|
|
16
16
|
Links,
|
|
17
17
|
NamedHues,
|
|
@@ -41,7 +41,7 @@ const getAccentEdgeLayer = (boxShadow: string) =>
|
|
|
41
41
|
|
|
42
42
|
test("it is a named group of pressable tiles", async () => {
|
|
43
43
|
const { canvas, canvasElement } =
|
|
44
|
-
await mountStory(
|
|
44
|
+
await mountStory(Playground)
|
|
45
45
|
|
|
46
46
|
const group = expectAgentDrivable(canvas, {
|
|
47
47
|
name: "Queue type",
|
|
@@ -64,7 +64,7 @@ test("it is a named group of pressable tiles", async () => {
|
|
|
64
64
|
})
|
|
65
65
|
|
|
66
66
|
test("a tile's hint is part of its accessible name", async () => {
|
|
67
|
-
const { canvas } = await mountStory(
|
|
67
|
+
const { canvas } = await mountStory(Playground)
|
|
68
68
|
|
|
69
69
|
// The reason the hint is rendered inside the tile rather than
|
|
70
70
|
// beside it: a hint a screen reader never reads is a hint half the
|
|
@@ -14,7 +14,7 @@ That is the opposite of every wrapping grid in the fleet today. `auto-fill, minm
|
|
|
14
14
|
takes every column the width allows, which is how you end up with seven items strung
|
|
15
15
|
across an ultrawide and nothing below the fold.
|
|
16
16
|
|
|
17
|
-
<Canvas of={AdaptiveGridStories.
|
|
17
|
+
<Canvas of={AdaptiveGridStories.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
|
|
|
@@ -89,7 +90,8 @@ type Story = StoryObj<typeof meta>
|
|
|
89
90
|
* carry nine — and the content cap widens from 56rem to 72rem to
|
|
90
91
|
* hold them.
|
|
91
92
|
*/
|
|
92
|
-
export const
|
|
93
|
+
export const Playground: Story = {
|
|
94
|
+
parameters: playgroundParameters,
|
|
93
95
|
args: { blockSizeResolver: fixedBlockSize(1080) },
|
|
94
96
|
}
|
|
95
97
|
|
|
@@ -36,7 +36,7 @@ import * as stories from "./AdaptiveGrid.stories.tsx"
|
|
|
36
36
|
* all.
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
const { AllStates, AllVariants,
|
|
39
|
+
const { AllStates, AllVariants, Playground, Responsive } =
|
|
40
40
|
composeStories(stories)
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -109,7 +109,7 @@ test("the grid re-columns when its container resizes", async () => {
|
|
|
109
109
|
// need two stacks; at 700px wide only one column fits, and at
|
|
110
110
|
// 1280px the second one it wanted is finally allowed.
|
|
111
111
|
const { canvasElement } = await mountAtInlineSize(
|
|
112
|
-
|
|
112
|
+
Playground,
|
|
113
113
|
700,
|
|
114
114
|
)
|
|
115
115
|
|
|
@@ -147,7 +147,7 @@ test("height buys the column, and width only caps it", async () => {
|
|
|
147
147
|
|
|
148
148
|
test("the content cap widens with the columns", async () => {
|
|
149
149
|
const { canvasElement } = await mountAtInlineSize(
|
|
150
|
-
|
|
150
|
+
Playground,
|
|
151
151
|
1280,
|
|
152
152
|
)
|
|
153
153
|
|
|
@@ -163,7 +163,7 @@ test("the content cap widens with the columns", async () => {
|
|
|
163
163
|
|
|
164
164
|
test("the measured box is never the capped box", async () => {
|
|
165
165
|
const { canvasElement } = await mountAtInlineSize(
|
|
166
|
-
|
|
166
|
+
Playground,
|
|
167
167
|
1280,
|
|
168
168
|
)
|
|
169
169
|
|
|
@@ -203,7 +203,7 @@ test("one item is one column at a reading measure", async () => {
|
|
|
203
203
|
|
|
204
204
|
test("a long unbroken string does not push a track wide", async () => {
|
|
205
205
|
const { canvasElement } = await mountAtInlineSize(
|
|
206
|
-
|
|
206
|
+
Playground,
|
|
207
207
|
1280,
|
|
208
208
|
)
|
|
209
209
|
|
package/src/Alert/Alert.mdx
CHANGED
|
@@ -11,7 +11,7 @@ four times — `TowerAlerts`, `UsbAlertBanner`, `LoadedDiscsBanner`, `VerdictBad
|
|
|
11
11
|
of those carry a byte-identical `TONE_CLASS` map of hardcoded hexes with no light mode.
|
|
12
12
|
mux-magic spells the same idea a third way in `statusClassMap`.
|
|
13
13
|
|
|
14
|
-
<Canvas of={AlertStories.
|
|
14
|
+
<Canvas of={AlertStories.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 {
|
|
@@ -47,7 +48,8 @@ type Story = StoryObj<typeof meta>
|
|
|
47
48
|
* rip-deck's grouped tower alert, verbatim: one trouble, the bays it
|
|
48
49
|
* touches, and whether the house speakers already said it out loud.
|
|
49
50
|
*/
|
|
50
|
-
export const
|
|
51
|
+
export const Playground: Story = {
|
|
52
|
+
parameters: playgroundParameters,
|
|
51
53
|
args: {
|
|
52
54
|
description: "4 bays · 3, 4, 5, 6 · confirmed",
|
|
53
55
|
heading:
|
package/src/Alert/Alert.test.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./Alert.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllStates,
|
|
10
|
+
const { AllStates, Playground, Interactive, Responsive } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
test("a labelled alert is a landmark an agent can scope to", async () => {
|
|
@@ -34,7 +34,7 @@ test("a labelled alert is a landmark an agent can scope to", async () => {
|
|
|
34
34
|
|
|
35
35
|
test("an unlabelled alert is not a landmark", async () => {
|
|
36
36
|
const { canvas, canvasElement } =
|
|
37
|
-
await mountStory(
|
|
37
|
+
await mountStory(Playground)
|
|
38
38
|
|
|
39
39
|
// A block, deliberately. Nine bay cards each holding a named
|
|
40
40
|
// region called "Part of the tower-wide problem above." is axe's
|
package/src/Avatar/Avatar.mdx
CHANGED
|
@@ -10,7 +10,7 @@ A person, as a coloured chip — a glyph or an initial, with the name attached w
|
|
|
10
10
|
assistive technology and a hover can reach it. It exists to **delete a printed name**: a
|
|
11
11
|
board whose cards all say "Owner" has spent a column on a word that a colour says faster.
|
|
12
12
|
|
|
13
|
-
<Canvas of={AvatarStories.
|
|
13
|
+
<Canvas of={AvatarStories.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 { categoricalArgType } from "../argTypes.storyHelpers.ts"
|
|
@@ -75,7 +76,9 @@ type Story = StoryObj<typeof meta>
|
|
|
75
76
|
* a screen reader and on hover for a pointer, and it is not printed
|
|
76
77
|
* anywhere — `getByRole("img", { name: "Ada Lovelace" })` resolves.
|
|
77
78
|
*/
|
|
78
|
-
export const
|
|
79
|
+
export const Playground: Story = {
|
|
80
|
+
parameters: playgroundParameters,
|
|
81
|
+
}
|
|
79
82
|
|
|
80
83
|
/**
|
|
81
84
|
* The three appearances, and the ten colours the scale holds.
|
|
@@ -7,7 +7,7 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
7
7
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
8
8
|
import * as stories from "./Avatar.stories.tsx"
|
|
9
9
|
|
|
10
|
-
const { AllStates, AllVariants,
|
|
10
|
+
const { AllStates, AllVariants, Playground, InAList } =
|
|
11
11
|
composeStories(stories)
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -18,7 +18,7 @@ const { AllStates, AllVariants, Default, InAList } =
|
|
|
18
18
|
* text is the one regression that matters.
|
|
19
19
|
*/
|
|
20
20
|
test("the name is readable by an agent and never printed", async () => {
|
|
21
|
-
const { canvas } = await mountStory(
|
|
21
|
+
const { canvas } = await mountStory(Playground)
|
|
22
22
|
|
|
23
23
|
const avatar = expectAgentDrivable(canvas, {
|
|
24
24
|
name: "Ada Lovelace",
|
package/src/Badge/Badge.mdx
CHANGED
|
@@ -11,7 +11,7 @@ Four repos, and rip-deck declares the **identical** `TONE_CLASS` map twice —
|
|
|
11
11
|
copy-paste. mux-magic's `statusClassMap` is the same idea spelled a third way, keyed by a
|
|
12
12
|
bare `string`, so an unrecognised status renders with no colour and no error.
|
|
13
13
|
|
|
14
|
-
<Canvas of={BadgeStories.
|
|
14
|
+
<Canvas of={BadgeStories.Playground} />
|
|
15
15
|
|
|
16
16
|
## Props
|
|
17
17
|
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
asyncTransitions,
|
|
3
3
|
useStatus,
|
|
4
4
|
} from "@charcuterie/logic"
|
|
5
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
5
6
|
import {
|
|
6
7
|
CATEGORICAL_HUES,
|
|
7
8
|
CATEGORICAL_INDEXES,
|
|
@@ -64,7 +65,8 @@ type Story = StoryObj<typeof meta>
|
|
|
64
65
|
* else, not a live region — so the handle an agent reads off the row
|
|
65
66
|
* is its text.
|
|
66
67
|
*/
|
|
67
|
-
export const
|
|
68
|
+
export const Playground: Story = {
|
|
69
|
+
parameters: playgroundParameters,
|
|
68
70
|
args: { children: "running", intent: "info" },
|
|
69
71
|
}
|
|
70
72
|
|
package/src/Badge/Badge.test.tsx
CHANGED
|
@@ -11,13 +11,13 @@ import meta, * as stories from "./Badge.stories.tsx"
|
|
|
11
11
|
const {
|
|
12
12
|
Categorical,
|
|
13
13
|
CategoricalLabels,
|
|
14
|
-
|
|
14
|
+
Playground,
|
|
15
15
|
Interactive,
|
|
16
16
|
Responsive,
|
|
17
17
|
} = composeStories(stories)
|
|
18
18
|
|
|
19
19
|
test("the text is queryable, which is what an agent matches on", async () => {
|
|
20
|
-
const { canvas } = await mountStory(
|
|
20
|
+
const { canvas } = await mountStory(Playground)
|
|
21
21
|
|
|
22
22
|
// No role, deliberately — a badge is a word about something else,
|
|
23
23
|
// not a live region. So there is nothing to `getByRole` and the
|
|
@@ -115,7 +115,7 @@ test("a truncated badge never paints outside its container", async () => {
|
|
|
115
115
|
})
|
|
116
116
|
|
|
117
117
|
test("a short badge gets no tooltip", async () => {
|
|
118
|
-
const { canvasElement } = await mountStory(
|
|
118
|
+
const { canvasElement } = await mountStory(Playground)
|
|
119
119
|
|
|
120
120
|
// The measurement has to be able to say *no*, or `title` is just
|
|
121
121
|
// unconditional and every pill in a bay list grows a tooltip.
|
|
@@ -16,7 +16,7 @@ opens the panel that changes it, so each one is pressable — and all six were s
|
|
|
16
16
|
had no way to make `Badge` pressable. The same shape turns up on a start-point chip, a
|
|
17
17
|
group chip and a pool's Exclude chip.
|
|
18
18
|
|
|
19
|
-
<Canvas of={BadgeButtonStories.
|
|
19
|
+
<Canvas of={BadgeButtonStories.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 {
|
|
@@ -53,7 +54,8 @@ type Story = StoryObj<typeof meta>
|
|
|
53
54
|
* finds it — which is what an agent, and every test in the fleet,
|
|
54
55
|
* actually matches on.
|
|
55
56
|
*/
|
|
56
|
-
export const
|
|
57
|
+
export const Playground: Story = {
|
|
58
|
+
parameters: playgroundParameters,
|
|
57
59
|
args: { children: "1 episode", intent: "accent" },
|
|
58
60
|
}
|
|
59
61
|
|
|
@@ -10,7 +10,7 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
10
10
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
11
11
|
import meta, * as stories from "./BadgeButton.stories.tsx"
|
|
12
12
|
|
|
13
|
-
const { BesideABadge,
|
|
13
|
+
const { BesideABadge, Playground, InATileFooter } =
|
|
14
14
|
composeStories(stories)
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -18,7 +18,7 @@ const { BesideABadge, Default, InATileFooter } =
|
|
|
18
18
|
* is a component rather than a `className` on `Badge`.
|
|
19
19
|
*/
|
|
20
20
|
test("is a button, not a span", async () => {
|
|
21
|
-
const { canvas } = await mountStory(
|
|
21
|
+
const { canvas } = await mountStory(Playground)
|
|
22
22
|
|
|
23
23
|
const chip = expectAgentDrivable(canvas, {
|
|
24
24
|
name: "1 episode",
|
package/src/Board/Board.mdx
CHANGED
|
@@ -9,7 +9,7 @@ import * as BoardStories from "./Board.stories";
|
|
|
9
9
|
Lanes of cards, sized by their **container**, moved by keyboard or by pointer — and with
|
|
10
10
|
**no drag-and-drop dependency**.
|
|
11
11
|
|
|
12
|
-
<Canvas of={BoardStories.
|
|
12
|
+
<Canvas of={BoardStories.Playground} />
|
|
13
13
|
|
|
14
14
|
<Canvas of={BoardStories.CardMenuItems} />
|
|
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
|
import type { ReactNode } from "react"
|
|
3
4
|
import { useState } from "react"
|
|
@@ -473,7 +474,9 @@ type Story = StoryObj<typeof meta>
|
|
|
473
474
|
* a real mode rather than a story convenience: a board on a wall
|
|
474
475
|
* display should not be advertising affordances nobody can use.
|
|
475
476
|
*/
|
|
476
|
-
export const
|
|
477
|
+
export const Playground: Story = {
|
|
478
|
+
parameters: playgroundParameters,
|
|
479
|
+
}
|
|
477
480
|
|
|
478
481
|
/**
|
|
479
482
|
* Parallel project pools as horizontal bands. Every lane stays on
|
package/src/Board/Board.test.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
AccentEdge,
|
|
17
17
|
AllStates,
|
|
18
18
|
CardMenuItems,
|
|
19
|
-
|
|
19
|
+
Playground,
|
|
20
20
|
InBoardScreen,
|
|
21
21
|
Interactive,
|
|
22
22
|
MarkdownTitles,
|
|
@@ -188,7 +188,7 @@ test("the priority bar's meaning is available as text", async () => {
|
|
|
188
188
|
* a promise.
|
|
189
189
|
*/
|
|
190
190
|
test("a board with no onMove has no move handles", async () => {
|
|
191
|
-
const { canvas } = await mountStory(
|
|
191
|
+
const { canvas } = await mountStory(Playground)
|
|
192
192
|
|
|
193
193
|
await expect(
|
|
194
194
|
canvas.queryAllByRole("button", { name: /^Move / }),
|
package/src/Button/Button.mdx
CHANGED
|
@@ -14,7 +14,7 @@ Six intents x four appearances x three sizes, all of it from tier-2 tokens — s
|
|
|
14
14
|
swap or a density flip repaints every button on the page with no prop change and no
|
|
15
15
|
re-render.
|
|
16
16
|
|
|
17
|
-
<Canvas of={ButtonStories.
|
|
17
|
+
<Canvas of={ButtonStories.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
|
|
|
3
4
|
import {
|
|
@@ -57,7 +58,8 @@ export default meta
|
|
|
57
58
|
|
|
58
59
|
type Story = StoryObj<typeof meta>
|
|
59
60
|
|
|
60
|
-
export const
|
|
61
|
+
export const Playground: Story = {
|
|
62
|
+
parameters: playgroundParameters,
|
|
61
63
|
args: { children: "Start rip" },
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -9,11 +9,11 @@ import { mountStory } from "../mountStory.testHelpers.ts"
|
|
|
9
9
|
import { expectAgentDrivable } from "../testing/index.ts"
|
|
10
10
|
import meta, * as stories from "./Button.stories.tsx"
|
|
11
11
|
|
|
12
|
-
const { AllStates,
|
|
12
|
+
const { AllStates, Playground, Loading } =
|
|
13
13
|
composeStories(stories)
|
|
14
14
|
|
|
15
15
|
test("is drivable by role and name", async () => {
|
|
16
|
-
const { canvas } = await mountStory(
|
|
16
|
+
const { canvas } = await mountStory(Playground)
|
|
17
17
|
|
|
18
18
|
expectAgentDrivable(canvas, {
|
|
19
19
|
name: "Start rip",
|
|
@@ -16,7 +16,7 @@ cannot be middle-clicked, ctrl-clicked, opened in a new tab, or copied — and m
|
|
|
16
16
|
solves the same problem in the other direction, with 14 raw `<a href="/…">` that force a
|
|
17
17
|
full page reload through its own SPA router.
|
|
18
18
|
|
|
19
|
-
<Canvas of={ButtonLinkStories.
|
|
19
|
+
<Canvas of={ButtonLinkStories.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
|
import type { ReactNode } from "react"
|
|
3
4
|
|
|
@@ -77,7 +78,8 @@ export default meta
|
|
|
77
78
|
|
|
78
79
|
type Story = StoryObj<typeof meta>
|
|
79
80
|
|
|
80
|
-
export const
|
|
81
|
+
export const Playground: Story = {
|
|
82
|
+
parameters: playgroundParameters,
|
|
81
83
|
args: { children: "Configure" },
|
|
82
84
|
}
|
|
83
85
|
|
|
@@ -14,7 +14,7 @@ const {
|
|
|
14
14
|
AllStates,
|
|
15
15
|
AllVariants,
|
|
16
16
|
BesideAButton,
|
|
17
|
-
|
|
17
|
+
Playground,
|
|
18
18
|
External,
|
|
19
19
|
Routed,
|
|
20
20
|
} = composeStories(stories)
|
|
@@ -29,7 +29,7 @@ const {
|
|
|
29
29
|
* whole argument.
|
|
30
30
|
*/
|
|
31
31
|
test("is a link, not a button", async () => {
|
|
32
|
-
const { canvas } = await mountStory(
|
|
32
|
+
const { canvas } = await mountStory(Playground)
|
|
33
33
|
|
|
34
34
|
const link = expectAgentDrivable(canvas, {
|
|
35
35
|
name: "Configure",
|
|
@@ -51,7 +51,7 @@ test("is a link, not a button", async () => {
|
|
|
51
51
|
})
|
|
52
52
|
|
|
53
53
|
test("Tab reaches it", async () => {
|
|
54
|
-
const { canvas } = await mountStory(
|
|
54
|
+
const { canvas } = await mountStory(Playground)
|
|
55
55
|
|
|
56
56
|
const link = canvas.getByRole("link", {
|
|
57
57
|
name: "Configure",
|