@ethlete/components 1.0.0-next.87 → 1.0.0-next.89

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/design/sdk/components/accent-on-light/accent-on-light.ts +4 -0
  3. package/design/sdk/components/accordion/accordion.ts +11 -0
  4. package/design/sdk/components/action-sheet/action-sheet.ts +12 -0
  5. package/design/sdk/components/anchored-dialog/anchored-dialog.ts +9 -0
  6. package/design/sdk/components/avatar/avatar.ts +16 -0
  7. package/design/sdk/components/badge/badge.ts +12 -0
  8. package/design/sdk/components/banner/banner.ts +16 -0
  9. package/design/sdk/components/bracket/bracket.ts +16 -0
  10. package/design/sdk/components/breadcrumb/breadcrumb.ts +14 -0
  11. package/design/sdk/components/button/button.ts +112 -7
  12. package/design/sdk/components/calendar/calendar.ts +25 -0
  13. package/design/sdk/components/card/card.ts +9 -0
  14. package/design/sdk/components/carousel/carousel.ts +25 -0
  15. package/design/sdk/components/chart/chart.ts +23 -0
  16. package/design/sdk/components/checkbox/checkbox.ts +42 -1
  17. package/design/sdk/components/chip/chip.ts +46 -8
  18. package/design/sdk/components/copy-button/copy-button.ts +14 -0
  19. package/design/sdk/components/description-list/description-list.ts +10 -0
  20. package/design/sdk/components/dialog/dialog.ts +13 -0
  21. package/design/sdk/components/divider/divider.ts +5 -0
  22. package/design/sdk/components/empty-state/empty-state.ts +9 -0
  23. package/design/sdk/components/floating-action/floating-action.ts +14 -0
  24. package/design/sdk/components/form-field/form-field.ts +93 -0
  25. package/design/sdk/components/grid/grid.ts +12 -0
  26. package/design/sdk/components/input/input.ts +50 -0
  27. package/design/sdk/components/kbd/kbd.ts +12 -0
  28. package/design/sdk/components/loader/loader.ts +11 -0
  29. package/design/sdk/components/masonry/masonry.ts +7 -0
  30. package/design/sdk/components/match/match.ts +16 -0
  31. package/design/sdk/components/menu/menu.ts +16 -0
  32. package/design/sdk/components/notification/notification.ts +18 -0
  33. package/design/sdk/components/otp-input/otp-input.ts +21 -0
  34. package/design/sdk/components/pagination/pagination.ts +21 -0
  35. package/design/sdk/components/picture/picture.ts +15 -0
  36. package/design/sdk/components/progress-steps/progress-steps.ts +16 -0
  37. package/design/sdk/components/query-error/query-error.ts +22 -0
  38. package/design/sdk/components/radio-group/radio-group.ts +42 -1
  39. package/design/sdk/components/scheduler/scheduler.ts +12 -0
  40. package/design/sdk/components/scrollable/scrollable.ts +30 -0
  41. package/design/sdk/components/scrollbar/scrollbar.ts +15 -0
  42. package/design/sdk/components/select/select.ts +17 -0
  43. package/design/sdk/components/select-panel/select-panel.ts +18 -0
  44. package/design/sdk/components/skeleton/skeleton.ts +7 -0
  45. package/design/sdk/components/slider/slider.ts +34 -0
  46. package/design/sdk/components/standings/standings.ts +12 -0
  47. package/design/sdk/components/stat-tile/stat-tile.ts +12 -0
  48. package/design/sdk/components/stream/stream.ts +11 -0
  49. package/design/sdk/components/switch/switch.ts +22 -0
  50. package/design/sdk/components/table/table.ts +34 -0
  51. package/design/sdk/components/tabs/tabs.ts +21 -0
  52. package/design/sdk/components/textarea/textarea.ts +32 -0
  53. package/design/sdk/components/timeline/timeline.ts +11 -0
  54. package/design/sdk/components/toolbar/toolbar.ts +15 -0
  55. package/design/sdk/components/tooltip/tooltip.ts +11 -0
  56. package/design/sdk/components/tree/tree.ts +12 -0
  57. package/design/sdk/foundations/colors/colors.ts +22 -0
  58. package/design/sdk/foundations/elevation/elevation.ts +6 -0
  59. package/design/sdk/foundations/icons/icons.ts +6 -0
  60. package/design/sdk/ready.json +123 -11
  61. package/fesm2022/ethlete-components.mjs +435 -95
  62. package/fesm2022/ethlete-components.mjs.map +1 -1
  63. package/package.json +2 -2
  64. package/src/lib/accordion/accordion-group.component.css +1 -1
  65. package/src/lib/accordion/accordion.component.css +19 -5
  66. package/src/lib/bracket/bracket-default-section-title.component.css +14 -0
  67. package/src/lib/bracket/bracket.component.css +18 -0
  68. package/src/lib/button/button-properties-styles.component.css +46 -0
  69. package/src/lib/button/button.component.css +3 -2
  70. package/src/lib/button/fab.component.css +8 -2
  71. package/src/lib/button/icon-button.component.css +3 -3
  72. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +5 -4
  73. package/src/lib/icon/headless/icon-styles.component.css +1 -1
  74. package/src/lib/progress-steps/progress-step.component.css +12 -0
  75. package/src/lib/scrollable/scrollable.component.css +44 -0
  76. package/src/lib/table/table.component.css +5 -2
  77. package/src/lib/tabs/tab-bar-styles.component.css +8 -8
  78. package/src/lib/timeline/timeline-item.component.css +13 -1
  79. package/types/ethlete-components.d.ts +135 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-next.89
4
+
5
+ ### Minor Changes
6
+
7
+ - Add an `align` input (`'center' | 'start'`) to `et-progress-steps`, and the `--et-timeline-upcoming-ring-width` and `--et-timeline-current-ring-width` tokens to `et-timeline` for a hollow upcoming dot and a tunable current ring.
8
+ - Add a `sunken` `fill` to `et-form-field` that paints the surface one elevation below its parent, and the `--et-form-field-control-min-height-sm` / `-md` / `-lg` tokens that set a size's minimum field height app-wide
9
+ - Add the `--et-table-header-border-color` token to recolour or drop (`transparent`) the rule under the `et-table` header in any appearance.
10
+ - Add the `--et-accordion-title-font-size`, `--et-accordion-title-font-weight`, `--et-accordion-hint-font-weight` and `--et-accordion-header-padding-block` tokens to `et-accordion`, and a `lastDivider` input to `et-accordion-group` that keeps the hairline under the last accordion.
11
+ - Add the `--et-button-outline-hover-background`, `--et-button-outline-active-background`, `--et-button-transparent-hover-background` and `--et-button-transparent-active-background` tokens to `et-button`, `et-icon-button` and `et-fab`, so the outline and transparent variants can take an exact hover, focus and active color.
12
+ - Add the `--et-button-outline-hover-border-color` and `--et-button-outline-active-border-color` tokens to `et-button`, `et-icon-button` and `et-fab`, so the outline variant's border can change color, or turn transparent, on hover, focus and active.
13
+ - Add the `--et-accordion-header-padding-inline` token to `et-accordion`: it sets the header's side padding apart from the panel's, so the header can reach past the panel content without a class rule.
14
+
15
+ ### Patch Changes
16
+
17
+ - Keep the baseline of `et-nav-tabs` and `et-tab-group` under the whole tab bar while the tabs scroll. It used to move with the scrolled tabs, ending before the right edge and starting after the start scroll button.
18
+
19
+ ## 1.0.0-next.88
20
+
21
+ ### Minor Changes
22
+
23
+ - Add `finalAlignment` to `et-bracket`: `'center'` draws a double elimination's finals between the upper and the lower bracket final.
24
+ - `et-table` columns take `rowLinkLabel`, which marks the column a row link takes its accessible name from. Without it, a row link skips image-only cells when it picks its name.
25
+ - `et-bracket` can title the upper bracket, lower bracket and finals of a double elimination with `showSectionTitles`; the titles stay at the start while the bracket scrolls sideways, and `sectionTitleComponent` swaps in your own.
26
+ - Add the `streamSlotLoadingComponent` input to stream player slots to override `StreamConfig.loadingComponent` per slot (`null` shows none).
27
+
28
+ ### Patch Changes
29
+
30
+ - The `etScrollableButtons` next and previous buttons now scroll on through the scroll container's own padding and only disable once the track is truly at its edge, so the last items are reachable.
31
+ - With `itemSize: 'auto'`, an `et-scrollable` child with a percent width (e.g. `width: 50%`) now sizes against the visible scroll container instead of collapsing to a sliver.
32
+ - With `itemSize: 'auto'`, a percent margin on an `et-scrollable` child (e.g. `margin-inline-end: 10%` on the last one) now resolves against the scroll container, so trailing space no longer needs a `scrollableClass`.
33
+ - An `etIcon` is now `display: inline-flex`, so it no longer stretches to the full width of a block parent.
34
+ - A carousel with autoplay and fewer than two slides no longer throws ET3802 in dev mode: it does not play, so it needs no pause control.
35
+ - Updated dependencies:
36
+ - @ethlete/bracket@1.0.0-next.6
37
+
3
38
  ## 1.0.0-next.87
4
39
 
5
40
  ### Minor Changes
@@ -6,5 +6,9 @@ export default definePart({
6
6
  note: 'The brand mint on light controls: checkbox checked, mixed and off, switch on, a radio group, a segmented button group and a choice-field card, drawn by the real components under one accent rule.',
7
7
  madeBy: ['claude-opus-5-5'],
8
8
  states: { default: {} },
9
+ describe: {
10
+ default:
11
+ 'Checkbox, switch, radio group, segmented buttons and a choice card in the brand mint on light; check that every checked mark stays visible against the light page.',
12
+ },
9
13
  render: async () => drawing({ body: await controls(), styles }),
10
14
  });
@@ -50,6 +50,17 @@ export default definePart({
50
50
  'header-active': { open: true, shipping: 'active' },
51
51
  'header-focus-visible': { open: true, shipping: 'focus-visible' },
52
52
  },
53
+ describe: {
54
+ collapsed:
55
+ 'Four closed items, the second with a hint, the last disabled; check the dividers, chevrons and the muted disabled header.',
56
+ expanded:
57
+ 'Match rules opened with its text; check that the chevron turns and the panel text sits under its header.',
58
+ disabled: 'The disabled Archive header hovered; check that it shows no hover tint and keeps the muted text.',
59
+ 'header-hover': 'The Shipping header hovered; check the 7 % tint inside the inset with the 8 px radius.',
60
+ 'header-active': 'The Shipping header pressed; check that the tint deepens to 14 % past hover.',
61
+ 'header-focus-visible':
62
+ 'The Shipping header with keyboard focus; check the 2 px inset outline in the primary colour.',
63
+ },
53
64
  widths: [480],
54
65
  controls: {
55
66
  rules: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -73,6 +73,18 @@ export default definePart({
73
73
  'action-focus-visible': { action: 'focus-visible' },
74
74
  'cancel-focus-visible': { cancel: 'focus-visible' },
75
75
  },
76
+ describe: {
77
+ default:
78
+ 'The sheet over a dimmed page with title, message, four actions and Cancel; check that it sits flush at the bottom and Delete match is red.',
79
+ 'without-header':
80
+ 'The sheet with only its actions and Cancel; check that the list starts at the top edge without a gap.',
81
+ 'action-hover': 'Edit match hovered; check that the row takes the hover tint across the full width.',
82
+ 'action-active': 'Edit match pressed; check that the tint goes a step past hover.',
83
+ 'action-focus-visible':
84
+ 'Edit match with keyboard focus; check that the focus ring shows inside the sheet and is not cut.',
85
+ 'cancel-focus-visible':
86
+ 'Cancel with keyboard focus; check that the focus ring shows around the last row and is not cut at the bottom.',
87
+ },
76
88
  widths: [390],
77
89
  instant:
78
90
  'Rows take their hover and press tint at once; the sheet enters and leaves with the overlay strategy motion.',
@@ -41,6 +41,15 @@ export default definePart({
41
41
  'no-arrow': { kind: 'filter', placement: 'bottom-start', arrow: false },
42
42
  'top-start': { kind: 'open-points', placement: 'top-start', modal: false },
43
43
  },
44
+ describe: {
45
+ 'open-points':
46
+ 'The open points popover under its trigger, end-aligned, with an arrow; check that the arrow points at the trigger and the list reads.',
47
+ filter:
48
+ 'The modal filter popover start-aligned with checkboxes and Apply; check the checked boxes and that Apply sits in the footer.',
49
+ 'no-arrow': 'The filter popover without its arrow; check that the pane keeps its gap to the trigger.',
50
+ 'top-start':
51
+ 'The open points popover above its trigger, start-aligned; check that the arrow flips to the bottom edge and points at the trigger.',
52
+ },
44
53
  widths: [480],
45
54
  controls: {
46
55
  option: { kind: 'row', input: ['pointer', 'keyboard'] },
@@ -66,6 +66,22 @@ export default definePart({
66
66
  ],
67
67
  },
68
68
  },
69
+ describe: {
70
+ themes:
71
+ 'Initials avatars in the default, brand, warning and danger themes as circles; check that each fill differs and the initials read on it.',
72
+ 'themes-square':
73
+ 'The themed initials avatars as squares; check the corner radius and that the initials read on each fill.',
74
+ forms:
75
+ 'Image, initials, given initials, icon and empty avatars as circles; check that each fallback fills the circle evenly.',
76
+ 'forms-square':
77
+ 'The image, initials, icon and empty avatars as squares; check that the image is cropped to the square.',
78
+ sizes: 'The initials avatar from xs to xl as circles; check that the text scales with each step.',
79
+ 'sizes-square':
80
+ 'The initials avatar from xs to xl as squares; check that the radius and text scale with each step.',
81
+ group: 'A group of four overlapping avatars; check the overlap and the ring that separates them.',
82
+ 'group-overflow':
83
+ 'Two groups that show three and four avatars plus a count; check the +n counter and the small square group.',
84
+ },
69
85
  widths: [480],
70
86
  frame: (body) => `<div class="avatar-frame">${body}</div>`,
71
87
  render: (props: Props) =>
@@ -43,6 +43,18 @@ export default definePart({
43
43
  'tonal-sizes': sizes('tonal'),
44
44
  'outline-sizes': sizes('outline'),
45
45
  },
46
+ describe: {
47
+ filled: 'Filled badges in the default, brand, warning and danger themes; check that each label reads on its fill.',
48
+ tonal: 'Tonal badges in the four themes; check that each tint differs and the coloured label reads on it.',
49
+ outline: 'Outlined badges in the four themes; check that each border shows against the page and the label reads.',
50
+ 'filled-icons':
51
+ 'Filled badges with a check icon at the start and a star at the end; check the icon gap and alignment.',
52
+ 'tonal-icons': 'Tonal badges with a start and an end icon; check that the icons take the label colour.',
53
+ 'outline-icons': 'Outlined badges with a start and an end icon; check the icon gap and that the border wraps both.',
54
+ 'filled-sizes': 'Filled badges at sm, md and lg; check that height, padding and text scale per step.',
55
+ 'tonal-sizes': 'Tonal badges at sm, md and lg; check that height, padding and text scale per step.',
56
+ 'outline-sizes': 'Outlined badges at sm, md and lg; check that height, padding and text scale per step.',
57
+ },
46
58
  widths: [480],
47
59
  frame: (body) => `<div class="badge-frame">${body}</div>`,
48
60
  render: (props: Props) =>
@@ -74,6 +74,22 @@ export default definePart({
74
74
  'error-action-focus-visible': { type: 'error', action: 'focus-visible' },
75
75
  all: { type: 'all' },
76
76
  },
77
+ describe: {
78
+ info: 'The info banner with heading, text, View fixtures and close; check the icon, the action and the close button in one row.',
79
+ success: 'The success banner without an action; check its icon and colour and that the text fills the row.',
80
+ warning: 'The warning banner with Upgrade; check that the warning tint and the text keep their contrast.',
81
+ error: 'The error banner with Retry in the danger colour; check the icon and that Retry reads on the tint.',
82
+ 'without-dismiss': 'The info banner without its close button; check that the text and action take the freed space.',
83
+ 'close-hover': 'The info close button hovered; check the round hover tint behind the icon.',
84
+ 'close-focus-visible': 'The info close button with keyboard focus; check that the focus ring shows around it.',
85
+ 'action-hover': 'View fixtures hovered; check that the action shows its hover look.',
86
+ 'action-focus-visible': 'View fixtures with keyboard focus; check that the focus ring shows around it.',
87
+ 'error-close-focus-visible':
88
+ 'The error close button with keyboard focus; check that the ring stays visible on the danger tint.',
89
+ 'error-action-focus-visible':
90
+ 'Retry with keyboard focus on the error banner; check that the ring stays visible on the danger tint.',
91
+ all: 'The four banner types stacked; check that info, success, warning and error each read as their own colour.',
92
+ },
77
93
  widths: [480],
78
94
  controls: {
79
95
  close: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -120,6 +120,22 @@ export default definePart({
120
120
  continue: { stage: 'groups-done' },
121
121
  mirrored: { stage: 'decided', density: 'compact', mirrored: true },
122
122
  },
123
+ describe: {
124
+ 'in-progress':
125
+ 'Quarter-finals done, one semi-final live at 1 : 1, the final still open; check the LIVE badge, the kick-off and the connectors.',
126
+ decided: 'Westport Albion beat Northbridge Rovers 2 : 1 in the final; check the winner bars and the champion line.',
127
+ 'journey-hover':
128
+ 'The hover journey of Riverside Wanderers; check that the rest dims and their lost semi-final is dashed and struck through.',
129
+ 'journey-pinned':
130
+ 'The pinned journey of the champion with the legend; check the pressed toggle and the rest at a quarter opacity.',
131
+ 'legend-focus-visible':
132
+ 'The legend with the Eastvale United toggle under keyboard focus; check the focus ring in the primary colour.',
133
+ compact:
134
+ 'The in-progress bracket at compact density; check that cells shrink and the live card still fits its cell.',
135
+ continue:
136
+ 'Quarter- and semi-finals with the continue cell; check the dashed connectors and the 2 winners advance cell.',
137
+ mirrored: 'The decided bracket folded in half at compact density; check that both halves meet at the final card.',
138
+ },
123
139
  widths: [1040, 1680],
124
140
  frame: (body) => `<div class="t-frame">${body}</div>`,
125
141
  render: (props: Props) =>
@@ -68,6 +68,20 @@ export default definePart({
68
68
  'overflow-focus-visible': { long: true, overflow: 'focus-visible' },
69
69
  'overflow-open': { long: true, open: true },
70
70
  },
71
+ describe: {
72
+ default:
73
+ 'Home, Competitions and the current Regionalliga Nordost; check the separators and the current page in plain text.',
74
+ 'link-hover': 'Competitions hovered; check the hover look of the link.',
75
+ 'link-active': 'Competitions pressed; check that the press differs from hover.',
76
+ 'link-focus-visible': 'Competitions with keyboard focus; check the focus ring around the link.',
77
+ 'current-page': 'The current page crumb hovered; check that it shows no link hover.',
78
+ long: 'A six-crumb trail with the middle four folded into the overflow button; check that Home, the button and the match fit one line.',
79
+ 'overflow-hover': 'The overflow button hovered; check its hover tint.',
80
+ 'overflow-active': 'The overflow button pressed; check that the tint goes past hover.',
81
+ 'overflow-focus-visible': 'The overflow button with keyboard focus; check the focus ring around it.',
82
+ 'overflow-open':
83
+ 'The overflow panel open with the four hidden crumbs; check that it sits under the button and lists them in order.',
84
+ },
71
85
  widths: [480],
72
86
  controls: {
73
87
  link: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -38,7 +38,7 @@ type Size = (typeof SIZES)[number];
38
38
 
39
39
  const interactive = interactionRows<
40
40
  Props,
41
- 'filled' | 'outline' | 'tonal' | 'transparent' | 'pressed' | 'danger' | 'small' | 'disabled',
41
+ 'filled' | 'outline' | 'tonal' | 'transparent' | 'pressed' | 'danger' | 'small',
42
42
  ButtonInteraction
43
43
  >(
44
44
  {
@@ -49,7 +49,6 @@ const interactive = interactionRows<
49
49
  pressed: { label: 'Grid', variant: 'outline', pressed: true },
50
50
  danger: { label: 'Delete', variant: 'filled', color: 'danger' },
51
51
  small: { label: 'Save', variant: 'filled', size: 'sm' },
52
- disabled: { label: 'Save', variant: 'filled', disabled: true },
53
52
  },
54
53
  { interactions: ['hover', 'active', 'focus-visible'], force: (props, interaction) => ({ ...props, interaction }) },
55
54
  );
@@ -61,17 +60,23 @@ const iconOnly = interactionRows<Props, `icon-${(typeof VARIANTS)[number]}`, But
61
60
  { interactions: ['hover', 'active', 'focus-visible'], force: (props, interaction) => ({ ...props, interaction }) },
62
61
  );
63
62
 
64
- const sizeStates = Object.fromEntries(
65
- SIZES.map((size) => [`size-${size}`, { label: 'Add', icon: plus, variant: 'filled', size }]),
66
- ) as Record<`size-${Size}`, Props>;
63
+ const sized = interactionRows<Props, `size-${Size}`, ButtonInteraction>(
64
+ Object.fromEntries(
65
+ SIZES.map((size) => [`size-${size}`, { label: 'Add', icon: plus, variant: 'filled', size }]),
66
+ ) as Record<`size-${Size}`, Props>,
67
+ { interactions: ['hover', 'active', 'focus-visible'], force: (props, interaction) => ({ ...props, interaction }) },
68
+ );
67
69
 
68
- export const states = { ...interactive.states, ...iconOnly.states, ...sizeStates };
70
+ const disabled: Props = { label: 'Save', variant: 'filled', disabled: true };
71
+
72
+ export const states = { ...interactive.states, disabled, ...iconOnly.states, ...sized.states };
69
73
  export const grid = {
70
74
  columns: interactive.grid.columns,
71
75
  rows: {
72
76
  ...interactive.grid.rows,
77
+ disabled: { rest: 'disabled' as const },
73
78
  ...Object.fromEntries(VARIANTS.map((variant) => [`icon ${variant}`, iconOnly.grid.rows[`icon-${variant}`]])),
74
- ...Object.fromEntries(SIZES.map((size) => [`size ${size}`, { rest: `size-${size}` as const }])),
79
+ ...Object.fromEntries(SIZES.map((size) => [`size ${size}`, sized.grid.rows[`size-${size}`]])),
75
80
  },
76
81
  };
77
82
 
@@ -80,6 +85,106 @@ export default definePart({
80
85
  madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5', 'design check'],
81
86
  states,
82
87
  grid,
88
+ describe: {
89
+ filled: 'The filled Save button; check the accent fill and the on-colour label.',
90
+ 'filled-hover':
91
+ 'The filled Save button, hovered; check that its look changes from rest and the label keeps its contrast.',
92
+ 'filled-active': 'The filled Save button, pressed; check that it goes a step past hover.',
93
+ 'filled-focus-visible': 'The filled Save button, with keyboard focus; check the focus ring outside its edge.',
94
+ outline: 'The outlined Cancel button; check that the border shows against the page with no fill.',
95
+ 'outline-hover':
96
+ 'The outlined Cancel button, hovered; check that its look changes from rest and the label keeps its contrast.',
97
+ 'outline-active': 'The outlined Cancel button, pressed; check that it goes a step past hover.',
98
+ 'outline-focus-visible': 'The outlined Cancel button, with keyboard focus; check the focus ring outside its edge.',
99
+ tonal: 'The tonal Filter button; check the light accent tint and the accent label.',
100
+ 'tonal-hover':
101
+ 'The tonal Filter button, hovered; check that its look changes from rest and the label keeps its contrast.',
102
+ 'tonal-active': 'The tonal Filter button, pressed; check that it goes a step past hover.',
103
+ 'tonal-focus-visible': 'The tonal Filter button, with keyboard focus; check the focus ring outside its edge.',
104
+ transparent: 'The transparent More button; check that only the label shows, without fill or border.',
105
+ 'transparent-hover':
106
+ 'The transparent More button, hovered; check that its look changes from rest and the label keeps its contrast.',
107
+ 'transparent-active': 'The transparent More button, pressed; check that it goes a step past hover.',
108
+ 'transparent-focus-visible':
109
+ 'The transparent More button, with keyboard focus; check the focus ring outside its edge.',
110
+ pressed: 'The pressed outline Grid toggle; check that the pressed look differs from the plain outline button.',
111
+ 'pressed-hover':
112
+ 'The pressed outline Grid toggle, hovered; check that its look changes from rest and the label keeps its contrast.',
113
+ 'pressed-active': 'The pressed outline Grid toggle, pressed; check that it goes a step past hover.',
114
+ 'pressed-focus-visible':
115
+ 'The pressed outline Grid toggle, with keyboard focus; check the focus ring outside its edge.',
116
+ danger: 'The filled Delete button in the danger colour; check the danger fill and that the label reads on it.',
117
+ 'danger-hover':
118
+ 'The filled Delete button in the danger colour, hovered; check that its look changes from rest and the label keeps its contrast.',
119
+ 'danger-active': 'The filled Delete button in the danger colour, pressed; check that it goes a step past hover.',
120
+ 'danger-focus-visible':
121
+ 'The filled Delete button in the danger colour, with keyboard focus; check the focus ring outside its edge.',
122
+ small: 'The small filled Save button; check the smaller height, padding and text.',
123
+ 'small-hover':
124
+ 'The small filled Save button, hovered; check that its look changes from rest and the label keeps its contrast.',
125
+ 'small-active': 'The small filled Save button, pressed; check that it goes a step past hover.',
126
+ 'small-focus-visible': 'The small filled Save button, with keyboard focus; check the focus ring outside its edge.',
127
+ disabled: 'The disabled filled Save button; check that the fill fades and the label stays readable.',
128
+ 'icon-filled': 'The filled icon-only Add button; check that the plus sits centred in a square button.',
129
+ 'icon-filled-hover':
130
+ 'The filled icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
131
+ 'icon-filled-active': 'The filled icon-only Add button, pressed; check that it goes a step past hover.',
132
+ 'icon-filled-focus-visible':
133
+ 'The filled icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
134
+ 'icon-outline': 'The outline icon-only Add button; check that the plus sits centred in a square button.',
135
+ 'icon-outline-hover':
136
+ 'The outline icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
137
+ 'icon-outline-active': 'The outline icon-only Add button, pressed; check that it goes a step past hover.',
138
+ 'icon-outline-focus-visible':
139
+ 'The outline icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
140
+ 'icon-tonal': 'The tonal icon-only Add button; check that the plus sits centred in a square button.',
141
+ 'icon-tonal-hover':
142
+ 'The tonal icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
143
+ 'icon-tonal-active': 'The tonal icon-only Add button, pressed; check that it goes a step past hover.',
144
+ 'icon-tonal-focus-visible':
145
+ 'The tonal icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
146
+ 'icon-transparent': 'The transparent icon-only Add button; check that the plus sits centred in a square button.',
147
+ 'icon-transparent-hover':
148
+ 'The transparent icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
149
+ 'icon-transparent-active': 'The transparent icon-only Add button, pressed; check that it goes a step past hover.',
150
+ 'icon-transparent-focus-visible':
151
+ 'The transparent icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
152
+ 'size-xs':
153
+ 'The filled Add button with a plus at size xs; check its height, padding, icon and text against the next step.',
154
+ 'size-xs-hover':
155
+ 'The filled Add button with a plus at size xs, hovered; check that its look changes from rest and the label keeps its contrast.',
156
+ 'size-xs-active': 'The filled Add button with a plus at size xs, pressed; check that it goes a step past hover.',
157
+ 'size-xs-focus-visible':
158
+ 'The filled Add button with a plus at size xs, with keyboard focus; check the focus ring outside its edge.',
159
+ 'size-sm':
160
+ 'The filled Add button with a plus at size sm; check its height, padding, icon and text against the next step.',
161
+ 'size-sm-hover':
162
+ 'The filled Add button with a plus at size sm, hovered; check that its look changes from rest and the label keeps its contrast.',
163
+ 'size-sm-active': 'The filled Add button with a plus at size sm, pressed; check that it goes a step past hover.',
164
+ 'size-sm-focus-visible':
165
+ 'The filled Add button with a plus at size sm, with keyboard focus; check the focus ring outside its edge.',
166
+ 'size-md':
167
+ 'The filled Add button with a plus at size md; check its height, padding, icon and text against the next step.',
168
+ 'size-md-hover':
169
+ 'The filled Add button with a plus at size md, hovered; check that its look changes from rest and the label keeps its contrast.',
170
+ 'size-md-active': 'The filled Add button with a plus at size md, pressed; check that it goes a step past hover.',
171
+ 'size-md-focus-visible':
172
+ 'The filled Add button with a plus at size md, with keyboard focus; check the focus ring outside its edge.',
173
+ 'size-lg':
174
+ 'The filled Add button with a plus at size lg; check its height, padding, icon and text against the next step.',
175
+ 'size-lg-hover':
176
+ 'The filled Add button with a plus at size lg, hovered; check that its look changes from rest and the label keeps its contrast.',
177
+ 'size-lg-active': 'The filled Add button with a plus at size lg, pressed; check that it goes a step past hover.',
178
+ 'size-lg-focus-visible':
179
+ 'The filled Add button with a plus at size lg, with keyboard focus; check the focus ring outside its edge.',
180
+ 'size-xl':
181
+ 'The filled Add button with a plus at size xl; check its height, padding, icon and text against the next step.',
182
+ 'size-xl-hover':
183
+ 'The filled Add button with a plus at size xl, hovered; check that its look changes from rest and the label keeps its contrast.',
184
+ 'size-xl-active': 'The filled Add button with a plus at size xl, pressed; check that it goes a step past hover.',
185
+ 'size-xl-focus-visible':
186
+ 'The filled Add button with a plus at size xl, with keyboard focus; check the focus ring outside its edge.',
187
+ },
83
188
  controls: { button: { kind: 'button', input: ['pointer', 'keyboard'], disabled: true } },
84
189
  render: (props: Props) =>
85
190
  drawing({
@@ -87,6 +87,31 @@ export default definePart({
87
87
  'label-focus-visible': { label: 'focus-visible' },
88
88
  'long-label': { compact: true, selected: true },
89
89
  },
90
+ describe: {
91
+ rest: 'September 2026 with today on the 14th; check the today mark, the weekday header and the month label.',
92
+ selected: 'The 17th selected; check the filled day and that today keeps its own mark.',
93
+ 'selected-hover': 'The selected 17th hovered; check that the fill shows its hover step.',
94
+ 'selected-focus-visible': 'The selected 17th with keyboard focus; check that the ring shows around the filled day.',
95
+ range: 'The range from the 9th to the 16th; check the filled ends and the band between them.',
96
+ 'range-focus-visible': 'The range start with keyboard focus; check that the ring shows over the range end.',
97
+ 'day-hover': 'The 22nd hovered; check its hover tint.',
98
+ 'day-focus-visible': 'The 22nd with keyboard focus; check the focus ring around the day.',
99
+ disabled: 'Four weekend days disabled; check that they fade and the others stay normal.',
100
+ limits: 'Days outside the 7th to the 24th out of range, the 17th selected; check that the out-of-range days fade.',
101
+ 'week-numbers':
102
+ 'The month with a week number column and the 17th selected; check that the numbers align with their rows.',
103
+ comparison: 'A range of the 15th to the 18th beside a comparison week; check that the two ranges read apart.',
104
+ 'year-view': 'The months of 2026 with May selected; check the filled month and the grid of twelve.',
105
+ 'year-view-hover': 'The year view with March hovered; check its hover tint.',
106
+ 'year-view-focus-visible': 'The year view with March under keyboard focus; check the focus ring around it.',
107
+ 'multi-year-view': 'A span of years with 2024 selected; check the filled year and the grid.',
108
+ 'nav-hover': 'The next-month button hovered; check its hover tint.',
109
+ 'nav-focus-visible': 'The next-month button with keyboard focus; check the focus ring around it.',
110
+ 'label-hover': 'The month label button hovered; check its hover tint.',
111
+ 'label-focus-visible': 'The month label button with keyboard focus; check the focus ring around it.',
112
+ 'long-label':
113
+ 'The month at a 32 px cell size with the 17th selected; check that the header label fits and the grid stays square.',
114
+ },
90
115
  widths: [480],
91
116
  frame: (body) => `<div class="t-frame">${body}</div>`,
92
117
  render: (props: Props) =>
@@ -48,6 +48,15 @@ export default definePart({
48
48
  'confirm-focus-visible': { variant: 'outlined', confirm: 'focus-visible' },
49
49
  'cancel-focus-visible': { variant: 'outlined', cancel: 'focus-visible' },
50
50
  },
51
+ describe: {
52
+ outlined: 'The outlined card with title, subtitle, text, Cancel and Open; check the border against the page.',
53
+ elevated: 'The elevated card; check the shadow and the raised fill against the page.',
54
+ filled: 'The filled card; check that its fill differs from the page without a border.',
55
+ media: 'The outlined card with a media image on top; check that the image fills the top edge inside the radius.',
56
+ plain: 'A plain outlined card with Revenue and an amount only; check the padding without actions.',
57
+ 'confirm-focus-visible': 'Open with keyboard focus; check the focus ring around the button inside the card.',
58
+ 'cancel-focus-visible': 'Cancel with keyboard focus; check the focus ring around the outline button.',
59
+ },
51
60
  widths: [480],
52
61
  controls: {
53
62
  cancel: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -65,6 +65,31 @@ export default definePart({
65
65
  'long-caption': { longCaption: true },
66
66
  'single-slide': { count: 1 },
67
67
  },
68
+ describe: {
69
+ 'first-slide': 'The first of five slides with arrows and dots; check that the first dot is active.',
70
+ 'middle-slide': 'The third slide active; check that the third dot is active and both arrows show.',
71
+ 'last-slide': 'The fifth slide active; check the last dot and that next still shows for the loop.',
72
+ 'no-loop-first': 'The first slide without loop; check that previous is disabled.',
73
+ 'no-loop-last': 'The last slide without loop; check that next is disabled.',
74
+ 'next-hover': 'The next arrow hovered; check its hover tint.',
75
+ 'next-active': 'The next arrow pressed; check that it goes past hover.',
76
+ 'next-focus-visible': 'The next arrow with keyboard focus; check the focus ring around it.',
77
+ 'dot-hover': 'The fourth dot hovered; check its hover look against the active dot.',
78
+ 'active-dot-hover': 'The active dot hovered; check that it keeps its active look.',
79
+ 'dot-focus-visible': 'The fourth dot with keyboard focus; check the focus ring around the dot.',
80
+ 'active-dot-focus-visible': 'The active dot with keyboard focus; check the ring around the active dot.',
81
+ 'autoplay-playing':
82
+ 'Autoplay running on the second slide; check the pause toggle and the progress in the active dot.',
83
+ 'autoplay-paused': 'Autoplay paused; check the play icon and the halted progress.',
84
+ 'play-toggle-hover': 'The play toggle hovered; check its hover tint.',
85
+ 'play-toggle-focus-visible': 'The play toggle with keyboard focus; check the focus ring around it.',
86
+ 'multiple-items': 'Two slides per view with a 16 px gap; check the gap and that both slides show whole.',
87
+ 'item-size-third': 'Three slides per view; check that the slides share the width evenly.',
88
+ 'center-aligned': 'Half-width slides centred on the third; check that the active slide sits in the middle.',
89
+ 'no-controls': 'The carousel without arrows and dots; check that only the slide shows.',
90
+ 'long-caption': 'A slide with a caption over several lines; check that the text wraps inside the slide.',
91
+ 'single-slide': 'A carousel with one slide; check how arrows and dots show with nothing to move to.',
92
+ },
68
93
  widths: [480],
69
94
  frame: (body) => `<div class="carousel-frame">${body}</div>`,
70
95
  render: (props: Props) =>
@@ -89,6 +89,29 @@ export default definePart({
89
89
  'pie-empty': { kind: 'pie', empty: true },
90
90
  'pie-long-label': { kind: 'pie', longLabel: true },
91
91
  },
92
+ describe: {
93
+ bar: 'A bar chart from Jan to Jun in the accent; check the bars, the axis labels and the grid lines.',
94
+ 'bar-series': 'Bars for 2025 and 2026 with a legend; check the two mix steps and their legend keys.',
95
+ 'bar-hover': 'The Apr bar hovered; check the hover tint behind it.',
96
+ 'bar-focus-visible': 'The Apr bar with keyboard focus; check the 2 px focus ring.',
97
+ 'bar-tooltip':
98
+ 'The Mar 2025 bar hovered with its tooltip; check that the tooltip names the month, series and value.',
99
+ 'bar-empty': 'A bar chart without data; check the No sales in this period text inside the plot.',
100
+ 'bar-long-label': 'Bars with long month labels; check that the labels thin to every second one and do not overlap.',
101
+ line: 'A line of visits from Mon to Sun; check the line stroke, the axis and the grid.',
102
+ 'line-series': 'Visits and Sign-ups with a legend; check that the two lines and their keys read apart.',
103
+ 'line-points': 'The visits line with a dot on every point; check that the dots sit on the line.',
104
+ 'line-hover': 'Thu hovered on two lines; check the crosshair and the slice dots.',
105
+ 'line-focus-visible': 'Thu with keyboard focus; check the focus box around the slice.',
106
+ 'line-tooltip': 'Wed hovered with the multi-series tooltip; check both values and keys in the tooltip.',
107
+ pie: 'A pie of four traffic sources with a legend; check the four slices and their legend keys.',
108
+ donut: 'The sources as a donut with the total in the middle; check the ring width and the total.',
109
+ 'pie-hover': 'The Search slice hovered; check its hover look.',
110
+ 'pie-focus-visible': 'The Search slice with keyboard focus; check the focus ring around the slice.',
111
+ 'pie-tooltip': 'The Direct slice hovered with its tooltip; check the label and value in the tooltip.',
112
+ 'pie-empty': 'A pie where every value is zero; check the empty ring.',
113
+ 'pie-long-label': 'A pie with a long legend label; check that the label is cut with an ellipsis.',
114
+ },
92
115
  widths: [480],
93
116
  frame: (body) => `<div class="t-frame">${body}</div>`,
94
117
  render: (props: Props) =>
@@ -44,7 +44,7 @@ const gridStates = Object.fromEntries(
44
44
  (Object.keys(ROWS) as Row[]).flatMap((row) =>
45
45
  COLUMNS.map((column) => [stateOf(row, column), { checkbox: cellOf(row, column) }]),
46
46
  ),
47
- ) as Record<string, Props>;
47
+ ) as Record<Row | `${Row}-${Exclude<Column, 'rest'>}`, Props>;
48
48
 
49
49
  const CARD: CheckboxMockOptions = {
50
50
  id: 'card',
@@ -142,6 +142,47 @@ export default definePart({
142
142
  'group-select-all-focus-visible': { group: eventsGroup(2, { selectAllForce: ['focus-visible'] }) },
143
143
  'group-horizontal': { group: venueGroup },
144
144
  },
145
+ describe: {
146
+ unchecked: 'The unchecked checkbox; check the box edge, the mark and the label.',
147
+ 'unchecked-hover': 'The unchecked checkbox hovered; check the hover tint around the box.',
148
+ 'unchecked-focus-visible': 'The unchecked checkbox with keyboard focus; check the focus ring around the box.',
149
+ 'unchecked-active': 'The unchecked checkbox pressed; check that the press goes past hover.',
150
+ 'unchecked-disabled': 'The unchecked checkbox disabled; check that box and label fade.',
151
+ 'unchecked-readonly': 'The unchecked checkbox readonly; check that it reads as not editable but stays legible.',
152
+ checked: 'The checked checkbox; check the box edge, the mark and the label.',
153
+ 'checked-hover': 'The checked checkbox hovered; check the hover tint around the box.',
154
+ 'checked-focus-visible': 'The checked checkbox with keyboard focus; check the focus ring around the box.',
155
+ 'checked-active': 'The checked checkbox pressed; check that the press goes past hover.',
156
+ 'checked-disabled': 'The checked checkbox disabled; check that box and label fade.',
157
+ 'checked-readonly': 'The checked checkbox readonly; check that it reads as not editable but stays legible.',
158
+ indeterminate: 'The mixed checkbox; check the box edge, the mark and the label.',
159
+ 'indeterminate-hover': 'The mixed checkbox hovered; check the hover tint around the box.',
160
+ 'indeterminate-focus-visible': 'The mixed checkbox with keyboard focus; check the focus ring around the box.',
161
+ 'indeterminate-active': 'The mixed checkbox pressed; check that the press goes past hover.',
162
+ 'indeterminate-disabled': 'The mixed checkbox disabled; check that box and label fade.',
163
+ 'indeterminate-readonly': 'The mixed checkbox readonly; check that it reads as not editable but stays legible.',
164
+ 'box-only': 'A checked box without a label; check that the box alone keeps its size and touch area.',
165
+ support: 'The checkbox with a description and a hint; check that both sit under the label in muted text.',
166
+ invalid: 'A required unchecked box with its error; check the danger edge and the error text under it.',
167
+ 'invalid-focus-visible':
168
+ 'The invalid box with keyboard focus; check that the focus ring and the error colour both show.',
169
+ 'card-rest': 'The Weekly digest card with its description and the box at the end; check the card edge and padding.',
170
+ 'card-checked': 'The card checked; check that the card edge and the box take the accent.',
171
+ 'card-hover': 'The card hovered; check the hover tint over the whole card.',
172
+ 'card-focus-visible': 'The card with keyboard focus; check the focus ring around the card.',
173
+ 'card-checked-focus-visible':
174
+ 'The checked card with keyboard focus; check that the ring and the checked edge both show.',
175
+ 'group-unchecked':
176
+ 'The Notify me about group with All events and four options off; check the indent under All events.',
177
+ 'group-partial': 'Two of four options checked; check that All events shows the mixed mark.',
178
+ 'group-checked': 'All four options checked; check that All events shows the check.',
179
+ 'group-option-hover': 'The Goals option hovered; check its hover tint.',
180
+ 'group-option-pressed': 'The Goals option pressed; check that the press goes past hover.',
181
+ 'group-option-focus-visible': 'The Goals option with keyboard focus; check the focus ring around its box.',
182
+ 'group-select-all-focus-visible':
183
+ 'All events with keyboard focus over a partial group; check the ring around the mixed box.',
184
+ 'group-horizontal': 'The Show matches group in one row; check the gaps between Home, Away and Neutral ground.',
185
+ },
145
186
  grid: {
146
187
  columns: COLUMNS,
147
188
  rows: Object.fromEntries(