@ethlete/components 1.0.0-next.88 → 1.0.0-next.90

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 (92) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/design/sdk/components/accent-on-light/accent-on-light.ts +5 -0
  3. package/design/sdk/components/accordion/accordion.ts +11 -0
  4. package/design/sdk/components/action-sheet/action-sheet.ts +37 -1
  5. package/design/sdk/components/anchored-dialog/anchored-dialog.css +2 -5
  6. package/design/sdk/components/anchored-dialog/anchored-dialog.ts +22 -8
  7. package/design/sdk/components/avatar/avatar.ts +16 -0
  8. package/design/sdk/components/badge/badge.css +18 -0
  9. package/design/sdk/components/badge/badge.ts +39 -3
  10. package/design/sdk/components/banner/banner.ts +48 -1
  11. package/design/sdk/components/bracket/bracket.ts +17 -0
  12. package/design/sdk/components/breadcrumb/breadcrumb.ts +15 -1
  13. package/design/sdk/components/button/button.ts +106 -3
  14. package/design/sdk/components/calendar/calendar.ts +56 -4
  15. package/design/sdk/components/card/card.ts +50 -1
  16. package/design/sdk/components/carousel/carousel.ts +60 -5
  17. package/design/sdk/components/chart/chart.ts +31 -2
  18. package/design/sdk/components/checkbox/checkbox.ts +53 -3
  19. package/design/sdk/components/chip/chip.ts +39 -8
  20. package/design/sdk/components/copy-button/copy-button.ts +18 -1
  21. package/design/sdk/components/description-list/description-list.ts +10 -0
  22. package/design/sdk/components/dialog/dialog.ts +71 -1
  23. package/design/sdk/components/divider/divider.ts +5 -0
  24. package/design/sdk/components/empty-state/empty-state.ts +10 -0
  25. package/design/sdk/components/floating-action/floating-action.ts +15 -0
  26. package/design/sdk/components/form-field/form-field.ts +102 -16
  27. package/design/sdk/components/grid/grid.ts +16 -1
  28. package/design/sdk/components/input/input.ts +50 -0
  29. package/design/sdk/components/kbd/kbd.ts +12 -0
  30. package/design/sdk/components/loader/loader.ts +11 -0
  31. package/design/sdk/components/masonry/masonry.ts +7 -0
  32. package/design/sdk/components/match/match.ts +17 -0
  33. package/design/sdk/components/menu/menu.ts +17 -0
  34. package/design/sdk/components/notification/notification.ts +19 -0
  35. package/design/sdk/components/otp-input/otp-input.ts +21 -0
  36. package/design/sdk/components/pagination/pagination.ts +22 -1
  37. package/design/sdk/components/picture/picture.ts +15 -0
  38. package/design/sdk/components/progress-steps/progress-steps.ts +17 -0
  39. package/design/sdk/components/query-error/query-error.ts +26 -1
  40. package/design/sdk/components/radio-group/radio-group.ts +43 -1
  41. package/design/sdk/components/scheduler/scheduler.ts +34 -1
  42. package/design/sdk/components/scrollable/scrollable.ts +58 -2
  43. package/design/sdk/components/scrollbar/scrollbar.css +1 -1
  44. package/design/sdk/components/scrollbar/scrollbar.ts +28 -0
  45. package/design/sdk/components/select/select.ts +26 -0
  46. package/design/sdk/components/select/shared/select-part.ts +4 -12
  47. package/design/sdk/components/select-panel/select-panel.ts +19 -0
  48. package/design/sdk/components/skeleton/skeleton.ts +7 -0
  49. package/design/sdk/components/slider/slider.ts +34 -0
  50. package/design/sdk/components/standings/standings.ts +16 -1
  51. package/design/sdk/components/stat-tile/stat-tile.ts +12 -0
  52. package/design/sdk/components/stream/stream.ts +23 -3
  53. package/design/sdk/components/switch/switch.ts +32 -4
  54. package/design/sdk/components/table/table.ts +128 -12
  55. package/design/sdk/components/tabs/tabs.ts +22 -1
  56. package/design/sdk/components/textarea/textarea.ts +63 -2
  57. package/design/sdk/components/timeline/timeline.ts +11 -0
  58. package/design/sdk/components/toolbar/toolbar.ts +16 -0
  59. package/design/sdk/components/tooltip/tooltip.ts +11 -0
  60. package/design/sdk/components/tree/tree.ts +20 -1
  61. package/design/sdk/foundations/colors/colors.ts +22 -0
  62. package/design/sdk/foundations/elevation/elevation.ts +7 -0
  63. package/design/sdk/foundations/icons/icons.ts +6 -0
  64. package/design/sdk/ready.json +334 -87
  65. package/design/sdk/rule-baseline.json +48 -0
  66. package/design/table.ts +11 -4
  67. package/design/tooltip.ts +7 -1
  68. package/fesm2022/ethlete-components.mjs +528 -103
  69. package/fesm2022/ethlete-components.mjs.map +1 -1
  70. package/package.json +1 -1
  71. package/src/lib/accordion/accordion-group.component.css +1 -1
  72. package/src/lib/accordion/accordion.component.css +19 -5
  73. package/src/lib/bracket/bracket.component.css +4 -1
  74. package/src/lib/button/button-properties-styles.component.css +46 -0
  75. package/src/lib/button/button.component.css +3 -2
  76. package/src/lib/button/fab.component.css +8 -2
  77. package/src/lib/button/icon-button.component.css +3 -3
  78. package/src/lib/forms/choice-field/choice-field.component.css +4 -2
  79. package/src/lib/forms/dropzone/dropzone-crop.component.css +21 -0
  80. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +5 -4
  81. package/src/lib/forms/select/select-option-styles.component.css +1 -0
  82. package/src/lib/match/match-card.component.css +8 -2
  83. package/src/lib/match/match-participant.component.css +21 -1
  84. package/src/lib/progress-steps/progress-step.component.css +12 -0
  85. package/src/lib/stream/consent/stream-consent.component.css +1 -0
  86. package/src/lib/stream/error/stream-player-error.component.css +1 -0
  87. package/src/lib/stream/stream-overlay-card-styles.component.css +9 -3
  88. package/src/lib/table/table.component.css +6 -2
  89. package/src/lib/tabs/tab-bar-styles.component.css +8 -8
  90. package/src/lib/timeline/timeline-item.component.css +13 -1
  91. package/types/ethlete-components.d.ts +136 -13
  92. package/design/sdk/components/switch/switch.css +0 -37
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-next.90
4
+
5
+ ### Minor Changes
6
+
7
+ - Add the `--et-bracket-journey-endpoint-outline` token to `et-bracket`, so the dashed outline around the match a highlighted journey ends in can be restyled, or hidden with `none`.
8
+ - Add `--et-choice-field-label-font-weight`, `--et-choice-field-label-letter-spacing` and `--et-select-option-letter-spacing`, mirroring the form-field label tokens. Defaults are unchanged.
9
+ - Dropzone: free and round crop frames, a minimum image size that rejects small images as `imageTooSmall`, and the drop area hides while a crop is pending.
10
+ - A single `et-select` with an option whose value is `null` now shows that option's label in the trigger for a `null` value instead of the placeholder. Without such an option, a `null` value still shows the placeholder.
11
+ - `et-standings` takes optional `extraColumns` filled from each row's `extraStats`, form entries with a `label` shown as a tooltip, and a `participantLink` that renders each participant as an `href` or `routerLink`.
12
+ - `et-switch` takes its name from a native `<label>` that wraps it or points at its `id`, and keeps an `aria-label` or `aria-labelledby` bound on its host.
13
+
14
+ ### Patch Changes
15
+
16
+ - The table design mock takes `selectAllAttributes` and a row's `selectAttributes`, extra attributes on its selection checkboxes.
17
+ - `et-choice-field`: the control slot is a flex container, so a checkbox or switch no longer sits in a text line box that
18
+ made the row taller than the control (in both the inline and the subgrid layout).
19
+ - `et-match-card`: the participant country line keeps its flag beside the name and stays start-aligned on both rows, even
20
+ inside a centered container.
21
+ - `et-match-participant`: new tokens for the emblem frame - `--et-match-participant-emblem-radius`,
22
+ `--et-match-participant-emblem-border-width`, `--et-match-participant-emblem-border-color`, and for the empty frame of a
23
+ participant still to be decided `--et-match-participant-tbd-emblem-border-width` and
24
+ `--et-match-participant-tbd-emblem-border-style` (e.g. `dashed`). The defaults keep today's look.
25
+ - `et-select` and `et-cascader` handle panel keys such as Escape as soon as the panel reopens, also while the previous panel is still animating out. Before, keys pressed in that window were lost.
26
+ - `et-select` closes on Escape again when the panel was reopened while the previous panel was still animating out (for example ArrowDown right after picking an option in an inline search). Before, the Escape was swallowed and the list stayed expanded.
27
+ - `et-select` no longer keeps a static `aria-label` or `aria-labelledby` on its host element, so only the combobox (trigger or search input) carries the accessible name.
28
+ - The stream consent gate and error overlay now fit a player under 200px tall: tighter spacing, and the icon reliably hides.
29
+ - The table's empty and error message no longer widens a table without a global `box-sizing: border-box` reset past its viewport, so it no longer scrolls sideways.
30
+ - Add `anchor` to the `tooltip()` design mock; the design frame now places anchored mock panes and arrows on whole pixels like the overlay runtime.
31
+
32
+ ## 1.0.0-next.89
33
+
34
+ ### Minor Changes
35
+
36
+ - 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.
37
+ - 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
38
+ - Add the `--et-table-header-border-color` token to recolour or drop (`transparent`) the rule under the `et-table` header in any appearance.
39
+ - 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.
40
+ - 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.
41
+ - 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.
42
+ - 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.
43
+
44
+ ### Patch Changes
45
+
46
+ - 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.
47
+
3
48
  ## 1.0.0-next.88
4
49
 
5
50
  ### Minor Changes
@@ -4,7 +4,12 @@ import styles from './accent-on-light.css?inline';
4
4
 
5
5
  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
+ consumerAction: 'a showcase of form controls whose values the consumer binds',
7
8
  madeBy: ['claude-opus-5-5'],
8
9
  states: { default: {} },
10
+ describe: {
11
+ default:
12
+ '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.',
13
+ },
9
14
  render: async () => drawing({ body: await controls(), styles }),
10
15
  });
@@ -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'] },
@@ -64,15 +64,51 @@ const sheet = ({ header: withHeader = true, action, cancel }: Props) =>
64
64
 
65
65
  export default definePart({
66
66
  note: 'Full-width sheet flush to the bottom edge, Cancel as the last row',
67
- madeBy: ['claude-opus-5-5'],
67
+ consumerAction: 'its actions are the items the consumer passes in',
68
+ madeBy: ['claude-opus-5-5', 'design check'],
68
69
  states: {
69
70
  default: {},
70
71
  'without-header': { header: false },
72
+ cancel: {},
71
73
  'action-hover': { action: 'hover' },
72
74
  'action-active': { action: 'active' },
73
75
  'action-focus-visible': { action: 'focus-visible' },
76
+ 'cancel-hover': { cancel: 'hover' },
77
+ 'cancel-active': { cancel: 'active' },
74
78
  'cancel-focus-visible': { cancel: 'focus-visible' },
75
79
  },
80
+ describe: {
81
+ default:
82
+ '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.',
83
+ 'without-header':
84
+ 'The sheet with only its actions and Cancel; check that the list starts at the top edge without a gap.',
85
+ cancel: 'The sheet at rest as the Cancel row of the grid; check that Cancel reads as the last row.',
86
+ 'action-hover': 'Edit match hovered; check that the row takes the hover tint across the full width.',
87
+ 'action-active': 'Edit match pressed; check that the tint goes a step past hover.',
88
+ 'action-focus-visible':
89
+ 'Edit match with keyboard focus; check that the focus ring shows inside the sheet and is not cut.',
90
+ 'cancel-hover': 'Cancel hovered; check that the last row takes the hover tint across the full width.',
91
+ 'cancel-active': 'Cancel pressed; check that the tint goes a step past hover.',
92
+ 'cancel-focus-visible':
93
+ 'Cancel with keyboard focus; check that the focus ring shows around the last row and is not cut at the bottom.',
94
+ },
95
+ grid: {
96
+ columns: ['rest', 'hover', 'active', 'focus-visible'] as const,
97
+ rows: {
98
+ action: {
99
+ rest: 'default',
100
+ hover: 'action-hover',
101
+ active: 'action-active',
102
+ 'focus-visible': 'action-focus-visible',
103
+ },
104
+ cancel: {
105
+ rest: 'cancel',
106
+ hover: 'cancel-hover',
107
+ active: 'cancel-active',
108
+ 'focus-visible': 'cancel-focus-visible',
109
+ },
110
+ },
111
+ },
76
112
  widths: [390],
77
113
  instant:
78
114
  'Rows take their hover and press tint at once; the sheet enters and leaves with the overlay strategy motion.',
@@ -47,11 +47,8 @@
47
47
  padding: 0.6rem 1.2rem;
48
48
  }
49
49
 
50
- .anchored-dialog-list label {
51
- display: flex;
52
- gap: 0.8rem;
53
- align-items: center;
54
- flex: 1;
50
+ .anchored-dialog-group {
51
+ padding: 0.8rem 1.2rem;
55
52
  }
56
53
 
57
54
  .anchored-dialog-footer {
@@ -1,4 +1,6 @@
1
1
  import { anchoredDialog, anchoredDialogStyles } from '@ethlete/components/design/anchored-dialog';
2
+ import { checkboxGroup, checkboxGroupStyles } from '@ethlete/components/design/checkbox';
3
+ import { control } from '@ethlete/components/design/control';
2
4
  import { definePart, drawing } from '@design-system';
3
5
  import button from '@system/components/button';
4
6
  import edge from './anchored-dialog.css?inline';
@@ -25,25 +27,37 @@ const FILTERS = [
25
27
  { label: 'Has comments', checked: true },
26
28
  ];
27
29
 
30
+ const options = () =>
31
+ checkboxGroup({ id: 'filter', options: FILTERS }).replace(/<et-checkbox-option(?=[\s>])/gu, (tag) =>
32
+ control(`${tag}>`, 'option').slice(0, -1),
33
+ );
34
+
28
35
  const filter = (apply: string) => `<header class="anchored-dialog-header"><span>Filter</span></header>
29
- <ul class="anchored-dialog-list">${FILTERS.map(
30
- ({ label, checked }) =>
31
- `<li><label><input type="checkbox" data-et-control="option"${checked ? ' checked' : ''} />${label}</label></li>`,
32
- ).join('')}</ul>
33
- <footer class="anchored-dialog-footer">${apply}</footer>`;
36
+ <div class="anchored-dialog-group">${options()}</div>
37
+ <footer class="anchored-dialog-footer">${control(apply, 'apply')}</footer>`;
34
38
 
35
39
  export default definePart({
36
40
  note: 'An open popover anchored to its trigger: surface pane, arrow, free content',
37
- madeBy: ['claude-sonnet-5-5', 'claude-opus-5-5'],
41
+ consumerAction: 'the field inside is content the consumer projects',
42
+ madeBy: ['claude-sonnet-5-5', 'claude-opus-5-5', 'design check'],
38
43
  states: {
39
44
  'open-points': { kind: 'open-points', modal: false },
40
45
  filter: { kind: 'filter', placement: 'bottom-start' },
41
46
  'no-arrow': { kind: 'filter', placement: 'bottom-start', arrow: false },
42
47
  'top-start': { kind: 'open-points', placement: 'top-start', modal: false },
43
48
  },
49
+ describe: {
50
+ 'open-points':
51
+ 'The open points popover under its trigger, end-aligned, with an arrow; check that the arrow points at the trigger and the list reads.',
52
+ filter:
53
+ 'The modal filter popover start-aligned with checkboxes and Apply; check the checked boxes and that Apply sits in the footer.',
54
+ 'no-arrow': 'The filter popover without its arrow; check that the pane keeps its gap to the trigger.',
55
+ 'top-start':
56
+ 'The open points popover above its trigger, start-aligned; check that the arrow flips to the bottom edge and points at the trigger.',
57
+ },
44
58
  widths: [480],
45
59
  controls: {
46
- option: { kind: 'row', input: ['pointer', 'keyboard'] },
60
+ option: { kind: 'button', part: 'components/checkbox' },
47
61
  apply: { kind: 'button', part: 'components/button' },
48
62
  },
49
63
  frame: (body, { placement = 'bottom-end' }) =>
@@ -69,7 +83,7 @@ export default definePart({
69
83
  modal,
70
84
  content: pane,
71
85
  }),
72
- styles: [anchoredDialogStyles, apply.styles, edge].join('\n'),
86
+ styles: [anchoredDialogStyles, apply.styles, checkboxGroupStyles, edge].join('\n'),
73
87
  });
74
88
  },
75
89
  });
@@ -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) =>
@@ -11,3 +11,21 @@
11
11
  --_et-badge-border-color: var(--et-theme-color-ink-solid);
12
12
  }
13
13
  }
14
+
15
+ .badge-frame-narrow {
16
+ inline-size: 16rem;
17
+ }
18
+
19
+ @layer components {
20
+ .et-badge[data-long-label] {
21
+ --et-badge-max-width: 12rem;
22
+ }
23
+
24
+ .et-badge[data-long-label] .et-badge-label {
25
+ min-inline-size: 0;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ white-space: nowrap;
29
+ text-box: normal;
30
+ }
31
+ }
@@ -7,7 +7,7 @@ const icon = (name: string) => SDK_ICONS.find((each) => each.name === name);
7
7
 
8
8
  type Variant = NonNullable<BadgeMockOptions['variant']>;
9
9
 
10
- type Props = { badges: BadgeMockOptions[] };
10
+ type Props = { badges: BadgeMockOptions[]; narrow?: boolean };
11
11
 
12
12
  const themed = (variant: Variant, size?: BadgeMockOptions['size']): Props => ({
13
13
  badges: [
@@ -29,9 +29,21 @@ const sizes = (variant: Variant): Props => ({
29
29
  badges: (['sm', 'md', 'lg'] as const).map((size) => ({ label: size, variant, size })),
30
30
  });
31
31
 
32
+ const longLabel = (variant: Variant): Props => ({
33
+ narrow: true,
34
+ badges: [
35
+ {
36
+ label: 'Awaiting confirmation from the tournament organiser',
37
+ variant,
38
+ color: 'warning',
39
+ attributes: 'data-long-label',
40
+ },
41
+ ],
42
+ });
43
+
32
44
  export default definePart({
33
45
  note: 'Decided rules only',
34
- madeBy: ['claude-opus-5-5'],
46
+ madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
35
47
  states: {
36
48
  filled: themed('filled'),
37
49
  tonal: themed('tonal'),
@@ -42,12 +54,36 @@ export default definePart({
42
54
  'filled-sizes': sizes('filled'),
43
55
  'tonal-sizes': sizes('tonal'),
44
56
  'outline-sizes': sizes('outline'),
57
+ 'filled-long-label': longLabel('filled'),
58
+ 'tonal-long-label': longLabel('tonal'),
59
+ 'outline-long-label': longLabel('outline'),
60
+ },
61
+ describe: {
62
+ filled: 'Filled badges in the default, brand, warning and danger themes; check that each label reads on its fill.',
63
+ tonal: 'Tonal badges in the four themes; check that each tint differs and the coloured label reads on it.',
64
+ outline: 'Outlined badges in the four themes; check that each border shows against the page and the label reads.',
65
+ 'filled-icons':
66
+ 'Filled badges with a check icon at the start and a star at the end; check the icon gap and alignment.',
67
+ 'tonal-icons': 'Tonal badges with a start and an end icon; check that the icons take the label colour.',
68
+ 'outline-icons': 'Outlined badges with a start and an end icon; check the icon gap and that the border wraps both.',
69
+ 'filled-sizes': 'Filled badges at sm, md and lg; check that height, padding and text scale per step.',
70
+ 'tonal-sizes': 'Tonal badges at sm, md and lg; check that height, padding and text scale per step.',
71
+ 'outline-sizes': 'Outlined badges at sm, md and lg; check that height, padding and text scale per step.',
72
+ 'filled-long-label':
73
+ 'A filled warning badge with a label longer than its 12rem cap; check that the label stays on one line and ends in an ellipsis.',
74
+ 'tonal-long-label':
75
+ 'A tonal warning badge with a label longer than its cap; check that the label stays on one line and ends in an ellipsis.',
76
+ 'outline-long-label':
77
+ 'An outlined warning badge with a label longer than its cap; check the one-line label with its ellipsis inside the border.',
45
78
  },
46
79
  widths: [480],
80
+ controls: {},
47
81
  frame: (body) => `<div class="badge-frame">${body}</div>`,
48
82
  render: (props: Props) =>
49
83
  drawing({
50
- body: badgeRow(props.badges.map((each) => badge(each))),
84
+ body: props.narrow
85
+ ? `<div class="badge-frame-narrow">${badgeRow(props.badges.map((each) => badge(each)))}</div>`
86
+ : badgeRow(props.badges.map((each) => badge(each))),
51
87
  styles: [badgeStyles, frame].join('\n'),
52
88
  }),
53
89
  });
@@ -59,21 +59,68 @@ const render = ({ type, ...rest }: Props) =>
59
59
 
60
60
  export default definePart({
61
61
  note: 'Decided rules only',
62
- madeBy: ['claude-opus-5-5'],
62
+ consumerAction: 'its buttons are actions the consumer projects',
63
+ madeBy: ['claude-opus-5-5', 'design check'],
63
64
  states: {
64
65
  info: { type: 'info' },
65
66
  success: { type: 'success' },
66
67
  warning: { type: 'warning' },
67
68
  error: { type: 'error' },
68
69
  'without-dismiss': { type: 'info', dismissible: false },
70
+ action: { type: 'info' },
69
71
  'close-hover': { type: 'info', close: 'hover' },
72
+ 'close-active': { type: 'info', close: 'active' },
70
73
  'close-focus-visible': { type: 'info', close: 'focus-visible' },
71
74
  'action-hover': { type: 'info', action: 'hover' },
75
+ 'action-active': { type: 'info', action: 'active' },
72
76
  'action-focus-visible': { type: 'info', action: 'focus-visible' },
73
77
  'error-close-focus-visible': { type: 'error', close: 'focus-visible' },
74
78
  'error-action-focus-visible': { type: 'error', action: 'focus-visible' },
75
79
  all: { type: 'all' },
76
80
  },
81
+ describe: {
82
+ info: 'The info banner with heading, text, View fixtures and close; check the icon, the action and the close button in one row.',
83
+ success: 'The success banner without an action; check its icon and colour and that the text fills the row.',
84
+ warning: 'The warning banner with Upgrade; check that the warning tint and the text keep their contrast.',
85
+ error: 'The error banner with Retry in the danger colour; check the icon and that Retry reads on the tint.',
86
+ 'without-dismiss': 'The info banner without its close button; check that the text and action take the freed space.',
87
+ action: 'The info banner at rest as the action row of the grid; check View fixtures at rest.',
88
+ 'close-hover': 'The info close button hovered; check the round hover tint behind the icon.',
89
+ 'close-active': 'The info close button pressed; check that the round tint goes a step past hover.',
90
+ 'close-focus-visible': 'The info close button with keyboard focus; check that the focus ring shows around it.',
91
+ 'action-hover': 'View fixtures hovered; check that the action shows its hover look.',
92
+ 'action-active': 'View fixtures pressed; check that the action goes a step past its hover look.',
93
+ 'action-focus-visible': 'View fixtures with keyboard focus; check that the focus ring shows around it.',
94
+ 'error-close-focus-visible':
95
+ 'The error close button with keyboard focus; check that the ring stays visible on the danger tint.',
96
+ 'error-action-focus-visible':
97
+ 'Retry with keyboard focus on the error banner; check that the ring stays visible on the danger tint.',
98
+ all: 'The four banner types stacked; check that info, success, warning and error each read as their own colour.',
99
+ },
100
+ motions: {
101
+ 'close-hover-in': { from: 'info', to: 'close-hover' },
102
+ 'close-hover-out': { from: 'close-hover', to: 'info' },
103
+ 'close-press': { from: 'close-hover', to: 'close-active' },
104
+ 'close-release': { from: 'close-active', to: 'close-hover' },
105
+ 'action-hover-in': { from: 'action', to: 'action-hover' },
106
+ 'action-hover-out': { from: 'action-hover', to: 'action' },
107
+ 'action-press': { from: 'action-hover', to: 'action-active' },
108
+ 'action-release': { from: 'action-active', to: 'action-hover' },
109
+ 'action-tap': { from: 'action', to: 'action-active' },
110
+ 'action-lift': { from: 'action-active', to: 'action' },
111
+ },
112
+ grid: {
113
+ columns: ['rest', 'hover', 'active', 'focus-visible'] as const,
114
+ rows: {
115
+ close: { rest: 'info', hover: 'close-hover', active: 'close-active', 'focus-visible': 'close-focus-visible' },
116
+ action: {
117
+ rest: 'action',
118
+ hover: 'action-hover',
119
+ active: 'action-active',
120
+ 'focus-visible': 'action-focus-visible',
121
+ },
122
+ },
123
+ },
77
124
  widths: [480],
78
125
  controls: {
79
126
  close: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -105,6 +105,7 @@ const render = (props: Props) => {
105
105
 
106
106
  export default definePart({
107
107
  note: "The SDK bracket (et-bracket) in flow, first drawing, drawn by the mock from @ethlete/components/design/bracket with the real markup and CSS: the bracket, its default round header, default match cell (et-match-card at compact), default final card (trophy, round name, champion line), continue cell and participants legend sheets, plus the match card, icon and button sheets; cell positions and connector paths come from @ethlete/bracket (createBracket, the single elimination grid, drawMan) as in the lib; default settings and labels, en-US kick-off. Emblems are the participant's letter fallback; the move transitions at rest. Fixtures are fictional: an eight-club single elimination knockout (Northbridge Rovers NBR 1, Harbor City HBC 2, Eastvale United EVU 3, Millbrook Athletic MBA 4, Riverside Wanderers RSW 5, Stonegate FC SGF 6, Westport Albion WPA 7, Lakeside Town LST 8) over Quarter-finals, Semi-finals and Final; the brand theme only. Framed as a page with 16px padding at 1040 and 1680 (the default bracket is 980px wide, the grid does not follow the frame width). States: in-progress (quarter-finals and one semi-final finished, the other semi-final live 1 : 1 with the LIVE badge, the final with Northbridge Rovers against TBD and the kick-off, champion not decided), decided (Westport Albion beat Northbridge Rovers 2 : 1, the champion line), journey-hover (the hover journey of Riverside Wanderers: the rest at half opacity, the semi-final where they went out dashed and their row struck through), journey-pinned (the pinned journey of the champion with the participants legend, its toggle pressed; the rest at a quarter opacity), legend-focus-visible (the Eastvale United toggle forced), compact (density compact, in-progress), continue (quarter-finals and semi-finals with the continue cell, 2 winners advance, dashed connectors) and mirrored (decided, folded in half, compact, so it fits 1040). Numbers (light / dark), from shot pixels at scale 2 at 1040, brand mint, a: winner bar (primary) vs card 1.33 / 13.50; live dot (primary) vs its badge tint 1.24 / 9.67, vs card 1.33 / 13.28; badge tint vs card 1.07 / 1.37; final frame edge (45 % mint) vs page 1.22 / 3.90, vs the glow beside it 1.15 / 2.98, vs its own tint 1.18 / 3.50; the final tint (6 %) vs page 1.03 / 1.11; pressed legend toggle (mint fill) vs page 1.33 / 13.50, its label 15.82 / 15.82; legend toggle focus ring (primary) vs page 1.37 / 13.06; outline toggle edge and label (ink) 7.68 light. Q98 numbers only: connectors, card edges, the continue cell's dashed edge and the journey endpoint's dashed outline vs page 1.26 / 1.73. The journey dimming lowers text under 4.5:1 by design: at half opacity the check reports a dimmed winner code at 3.41 / 2.68 and the dimmed Final label at 2.14 / 3.93, at a quarter opacity 1.73 / 2.21, the struck-through row that went out (0.55 opacity) 2.62 / 2.98; exempted with contrast exceptions, an open point, no decided rule. Decided rules that arise: Q88 (the legend toggle focus ring; the default cells are not links, so no card ring) and Q99a (the winner bar, the live dot and the final frame edge take ink in light; the pressed legend toggle is a mint fill, so it takes a 1px inset ink edge). The ink edge on a mint fill arises, so Q102 arises: b draws the edge in both schemes, c keeps dark as today (light-dark(ink, transparent)). The badge tint and the final tint are band tints, not fills, so they are kept, and the final glow is kept. Q101 does not arise: the only filled button is a pressed toggle, whose hover keeps the fill in the lib. Findings for later: (1) lib bug: the live meta row grows the bracket's compact card past matchHeight: the live semi-final is 87px tall in its 75px cell (65 in 52 at compact), so it hangs 12px (13px) below its cell, the incoming connector meets it 6px above its centre and the gap to the card below shrinks. Drawn as is in every variant. (2) In the mirrored compact layout the final card in its 200px column shows full names and cuts the loser ('Northbridge Rove…') next to the score, where every other compact cell shows codes. (3) The eliminated row's line-through also strikes the emblem letter and the score. (4) The lit journey path keeps the grey connector colour (1.26 / 1.73), so it reads only by the rest fading; the dimmed text is under 4.5:1 (numbers above). (5) In dark the final glow lightens the page beside the frame edge, so the edge drops from 3.90 against the bare page to 2.98 against the glow. Later rounds, left out here: double elimination, swiss and round robin layouts, the third-place match, the mirrored layout at default density, the rounds list and adaptive layout, the skeleton, the prediction pick card, a custom match component on a link (card hover and focus ring), emblems as images, scheduled cells with kick-off times, long names, RTL and the move transitions. Omitted option value (Q182): alignRoundHeaders center draws the same pixels as start, because the default round header fills its column and is already centred.",
108
+ consumerAction: 'a press on a team runs the handler the consumer binds',
108
109
  madeBy: ['claude-opus-5-5'],
109
110
  states: {
110
111
  'in-progress': { stage: 'in-progress' },
@@ -120,6 +121,22 @@ export default definePart({
120
121
  continue: { stage: 'groups-done' },
121
122
  mirrored: { stage: 'decided', density: 'compact', mirrored: true },
122
123
  },
124
+ describe: {
125
+ 'in-progress':
126
+ 'Quarter-finals done, one semi-final live at 1 : 1, the final still open; check the LIVE badge, the kick-off and the connectors.',
127
+ decided: 'Westport Albion beat Northbridge Rovers 2 : 1 in the final; check the winner bars and the champion line.',
128
+ 'journey-hover':
129
+ 'The hover journey of Riverside Wanderers; check that the rest dims and their lost semi-final is dashed and struck through.',
130
+ 'journey-pinned':
131
+ 'The pinned journey of the champion with the legend; check the pressed toggle and the rest at a quarter opacity.',
132
+ 'legend-focus-visible':
133
+ 'The legend with the Eastvale United toggle under keyboard focus; check the focus ring in the primary colour.',
134
+ compact:
135
+ 'The in-progress bracket at compact density; check that cells shrink and the live card still fits its cell.',
136
+ continue:
137
+ 'Quarter- and semi-finals with the continue cell; check the dashed connectors and the 2 winners advance cell.',
138
+ mirrored: 'The decided bracket folded in half at compact density; check that both halves meet at the final card.',
139
+ },
123
140
  widths: [1040, 1680],
124
141
  frame: (body) => `<div class="t-frame">${body}</div>`,
125
142
  render: (props: Props) =>
@@ -49,7 +49,7 @@ const longMarkup = (props: Props) => {
49
49
  return `<div class="breadcrumb-overflow-stage">${panel}${breadcrumb({
50
50
  crumbs: trail,
51
51
  collapsed: hiddenCrumbs,
52
- overflowAttributes: mark('overflow', props.overflow),
52
+ overflowAttributes: `${mark('overflow', props.overflow)} data-et-action="${props.open ? 'long' : 'overflow-open'}"`,
53
53
  })}</div>`;
54
54
  };
55
55
 
@@ -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
  );
@@ -68,11 +67,14 @@ const sized = interactionRows<Props, `size-${Size}`, ButtonInteraction>(
68
67
  { interactions: ['hover', 'active', 'focus-visible'], force: (props, interaction) => ({ ...props, interaction }) },
69
68
  );
70
69
 
71
- export const states = { ...interactive.states, ...iconOnly.states, ...sized.states };
70
+ const disabled: Props = { label: 'Save', variant: 'filled', disabled: true };
71
+
72
+ export const states = { ...interactive.states, disabled, ...iconOnly.states, ...sized.states };
72
73
  export const grid = {
73
74
  columns: interactive.grid.columns,
74
75
  rows: {
75
76
  ...interactive.grid.rows,
77
+ disabled: { rest: 'disabled' as const },
76
78
  ...Object.fromEntries(VARIANTS.map((variant) => [`icon ${variant}`, iconOnly.grid.rows[`icon-${variant}`]])),
77
79
  ...Object.fromEntries(SIZES.map((size) => [`size ${size}`, sized.grid.rows[`size-${size}`]])),
78
80
  },
@@ -80,9 +82,110 @@ export const grid = {
80
82
 
81
83
  export default definePart({
82
84
  note: 'scale of the decided shape, Q182, lead merge',
85
+ consumerAction: 'a button whose click the consumer binds',
83
86
  madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5', 'design check'],
84
87
  states,
85
88
  grid,
89
+ describe: {
90
+ filled: 'The filled Save button; check the accent fill and the on-colour label.',
91
+ 'filled-hover':
92
+ 'The filled Save button, hovered; check that its look changes from rest and the label keeps its contrast.',
93
+ 'filled-active': 'The filled Save button, pressed; check that it goes a step past hover.',
94
+ 'filled-focus-visible': 'The filled Save button, with keyboard focus; check the focus ring outside its edge.',
95
+ outline: 'The outlined Cancel button; check that the border shows against the page with no fill.',
96
+ 'outline-hover':
97
+ 'The outlined Cancel button, hovered; check that its look changes from rest and the label keeps its contrast.',
98
+ 'outline-active': 'The outlined Cancel button, pressed; check that it goes a step past hover.',
99
+ 'outline-focus-visible': 'The outlined Cancel button, with keyboard focus; check the focus ring outside its edge.',
100
+ tonal: 'The tonal Filter button; check the light accent tint and the accent label.',
101
+ 'tonal-hover':
102
+ 'The tonal Filter button, hovered; check that its look changes from rest and the label keeps its contrast.',
103
+ 'tonal-active': 'The tonal Filter button, pressed; check that it goes a step past hover.',
104
+ 'tonal-focus-visible': 'The tonal Filter button, with keyboard focus; check the focus ring outside its edge.',
105
+ transparent: 'The transparent More button; check that only the label shows, without fill or border.',
106
+ 'transparent-hover':
107
+ 'The transparent More button, hovered; check that its look changes from rest and the label keeps its contrast.',
108
+ 'transparent-active': 'The transparent More button, pressed; check that it goes a step past hover.',
109
+ 'transparent-focus-visible':
110
+ 'The transparent More button, with keyboard focus; check the focus ring outside its edge.',
111
+ pressed: 'The pressed outline Grid toggle; check that the pressed look differs from the plain outline button.',
112
+ 'pressed-hover':
113
+ 'The pressed outline Grid toggle, hovered; check that its look changes from rest and the label keeps its contrast.',
114
+ 'pressed-active': 'The pressed outline Grid toggle, pressed; check that it goes a step past hover.',
115
+ 'pressed-focus-visible':
116
+ 'The pressed outline Grid toggle, with keyboard focus; check the focus ring outside its edge.',
117
+ danger: 'The filled Delete button in the danger colour; check the danger fill and that the label reads on it.',
118
+ 'danger-hover':
119
+ 'The filled Delete button in the danger colour, hovered; check that its look changes from rest and the label keeps its contrast.',
120
+ 'danger-active': 'The filled Delete button in the danger colour, pressed; check that it goes a step past hover.',
121
+ 'danger-focus-visible':
122
+ 'The filled Delete button in the danger colour, with keyboard focus; check the focus ring outside its edge.',
123
+ small: 'The small filled Save button; check the smaller height, padding and text.',
124
+ 'small-hover':
125
+ 'The small filled Save button, hovered; check that its look changes from rest and the label keeps its contrast.',
126
+ 'small-active': 'The small filled Save button, pressed; check that it goes a step past hover.',
127
+ 'small-focus-visible': 'The small filled Save button, with keyboard focus; check the focus ring outside its edge.',
128
+ disabled: 'The disabled filled Save button; check that the fill fades and the label stays readable.',
129
+ 'icon-filled': 'The filled icon-only Add button; check that the plus sits centred in a square button.',
130
+ 'icon-filled-hover':
131
+ 'The filled icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
132
+ 'icon-filled-active': 'The filled icon-only Add button, pressed; check that it goes a step past hover.',
133
+ 'icon-filled-focus-visible':
134
+ 'The filled icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
135
+ 'icon-outline': 'The outline icon-only Add button; check that the plus sits centred in a square button.',
136
+ 'icon-outline-hover':
137
+ 'The outline icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
138
+ 'icon-outline-active': 'The outline icon-only Add button, pressed; check that it goes a step past hover.',
139
+ 'icon-outline-focus-visible':
140
+ 'The outline icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
141
+ 'icon-tonal': 'The tonal icon-only Add button; check that the plus sits centred in a square button.',
142
+ 'icon-tonal-hover':
143
+ 'The tonal icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
144
+ 'icon-tonal-active': 'The tonal icon-only Add button, pressed; check that it goes a step past hover.',
145
+ 'icon-tonal-focus-visible':
146
+ 'The tonal icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
147
+ 'icon-transparent': 'The transparent icon-only Add button; check that the plus sits centred in a square button.',
148
+ 'icon-transparent-hover':
149
+ 'The transparent icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
150
+ 'icon-transparent-active': 'The transparent icon-only Add button, pressed; check that it goes a step past hover.',
151
+ 'icon-transparent-focus-visible':
152
+ 'The transparent icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
153
+ 'size-xs':
154
+ 'The filled Add button with a plus at size xs; check its height, padding, icon and text against the next step.',
155
+ 'size-xs-hover':
156
+ 'The filled Add button with a plus at size xs, hovered; check that its look changes from rest and the label keeps its contrast.',
157
+ 'size-xs-active': 'The filled Add button with a plus at size xs, pressed; check that it goes a step past hover.',
158
+ 'size-xs-focus-visible':
159
+ 'The filled Add button with a plus at size xs, with keyboard focus; check the focus ring outside its edge.',
160
+ 'size-sm':
161
+ 'The filled Add button with a plus at size sm; check its height, padding, icon and text against the next step.',
162
+ 'size-sm-hover':
163
+ 'The filled Add button with a plus at size sm, hovered; check that its look changes from rest and the label keeps its contrast.',
164
+ 'size-sm-active': 'The filled Add button with a plus at size sm, pressed; check that it goes a step past hover.',
165
+ 'size-sm-focus-visible':
166
+ 'The filled Add button with a plus at size sm, with keyboard focus; check the focus ring outside its edge.',
167
+ 'size-md':
168
+ 'The filled Add button with a plus at size md; check its height, padding, icon and text against the next step.',
169
+ 'size-md-hover':
170
+ 'The filled Add button with a plus at size md, hovered; check that its look changes from rest and the label keeps its contrast.',
171
+ 'size-md-active': 'The filled Add button with a plus at size md, pressed; check that it goes a step past hover.',
172
+ 'size-md-focus-visible':
173
+ 'The filled Add button with a plus at size md, with keyboard focus; check the focus ring outside its edge.',
174
+ 'size-lg':
175
+ 'The filled Add button with a plus at size lg; check its height, padding, icon and text against the next step.',
176
+ 'size-lg-hover':
177
+ 'The filled Add button with a plus at size lg, hovered; check that its look changes from rest and the label keeps its contrast.',
178
+ 'size-lg-active': 'The filled Add button with a plus at size lg, pressed; check that it goes a step past hover.',
179
+ 'size-lg-focus-visible':
180
+ 'The filled Add button with a plus at size lg, with keyboard focus; check the focus ring outside its edge.',
181
+ 'size-xl':
182
+ 'The filled Add button with a plus at size xl; check its height, padding, icon and text against the next step.',
183
+ 'size-xl-hover':
184
+ 'The filled Add button with a plus at size xl, hovered; check that its look changes from rest and the label keeps its contrast.',
185
+ 'size-xl-active': 'The filled Add button with a plus at size xl, pressed; check that it goes a step past hover.',
186
+ 'size-xl-focus-visible':
187
+ 'The filled Add button with a plus at size xl, with keyboard focus; check the focus ring outside its edge.',
188
+ },
86
189
  controls: { button: { kind: 'button', input: ['pointer', 'keyboard'], disabled: true } },
87
190
  render: (props: Props) =>
88
191
  drawing({