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

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 (87) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/design/notification.ts +1 -1
  3. package/design/sdk/components/accent-on-light/accent-on-light.ts +1 -0
  4. package/design/sdk/components/action-sheet/action-sheet.ts +25 -1
  5. package/design/sdk/components/anchored-dialog/anchored-dialog.css +2 -5
  6. package/design/sdk/components/anchored-dialog/anchored-dialog.ts +13 -8
  7. package/design/sdk/components/badge/badge.css +18 -0
  8. package/design/sdk/components/badge/badge.ts +27 -3
  9. package/design/sdk/components/banner/banner.ts +32 -1
  10. package/design/sdk/components/bracket/bracket.ts +1 -0
  11. package/design/sdk/components/breadcrumb/breadcrumb.ts +1 -1
  12. package/design/sdk/components/button/button.ts +1 -0
  13. package/design/sdk/components/calendar/calendar.ts +31 -4
  14. package/design/sdk/components/card/card.ts +41 -1
  15. package/design/sdk/components/carousel/carousel.ts +35 -6
  16. package/design/sdk/components/chart/chart.ts +8 -2
  17. package/design/sdk/components/checkbox/checkbox.ts +11 -2
  18. package/design/sdk/components/chip/chip.ts +2 -9
  19. package/design/sdk/components/copy-button/copy-button.ts +4 -1
  20. package/design/sdk/components/dialog/dialog.ts +58 -1
  21. package/design/sdk/components/empty-state/empty-state.ts +1 -0
  22. package/design/sdk/components/floating-action/floating-action.ts +1 -0
  23. package/design/sdk/components/form-field/form-field.ts +9 -16
  24. package/design/sdk/components/grid/grid.ts +4 -1
  25. package/design/sdk/components/input/input.css +5 -5
  26. package/design/sdk/components/input/input.ts +1 -1
  27. package/design/sdk/components/loader/loader.ts +0 -1
  28. package/design/sdk/components/match/match.ts +1 -0
  29. package/design/sdk/components/menu/menu.ts +1 -0
  30. package/design/sdk/components/notification/notification.ts +1 -0
  31. package/design/sdk/components/otp-input/otp-input.css +1 -1
  32. package/design/sdk/components/otp-input/otp-input.ts +1 -1
  33. package/design/sdk/components/pagination/pagination.ts +1 -1
  34. package/design/sdk/components/progress-steps/progress-steps.ts +1 -0
  35. package/design/sdk/components/query-error/query-error.ts +4 -1
  36. package/design/sdk/components/radio-group/radio-group.ts +1 -0
  37. package/design/sdk/components/scheduler/scheduler.ts +22 -7
  38. package/design/sdk/components/scrollable/scrollable.ts +30 -9
  39. package/design/sdk/components/scrollbar/scrollbar.css +1 -1
  40. package/design/sdk/components/scrollbar/scrollbar.ts +16 -3
  41. package/design/sdk/components/select/select.ts +9 -0
  42. package/design/sdk/components/select/shared/select-part.ts +4 -12
  43. package/design/sdk/components/select-panel/select-panel.ts +1 -0
  44. package/design/sdk/components/standings/standings.ts +4 -1
  45. package/design/sdk/components/stream/stream.ts +13 -4
  46. package/design/sdk/components/switch/switch.ts +13 -4
  47. package/design/sdk/components/table/table.ts +94 -12
  48. package/design/sdk/components/tabs/tabs.ts +1 -1
  49. package/design/sdk/components/textarea/textarea.css +5 -5
  50. package/design/sdk/components/textarea/textarea.ts +27 -3
  51. package/design/sdk/components/toolbar/toolbar.ts +1 -0
  52. package/design/sdk/components/tree/tree.ts +8 -1
  53. package/design/sdk/foundations/colors/colors.css +2 -2
  54. package/design/sdk/foundations/elevation/elevation.ts +1 -0
  55. package/design/sdk/ready.json +309 -87
  56. package/design/sdk/rule-baseline.json +48 -0
  57. package/design/table.ts +11 -4
  58. package/design/tooltip.ts +7 -1
  59. package/fesm2022/ethlete-components.mjs +843 -177
  60. package/fesm2022/ethlete-components.mjs.map +1 -1
  61. package/generators/icons/generator.js +35 -1
  62. package/package.json +1 -1
  63. package/src/lib/accordion/accordion.component.css +26 -5
  64. package/src/lib/bracket/bracket.component.css +4 -1
  65. package/src/lib/forms/checkbox/checkbox.component.css +8 -3
  66. package/src/lib/forms/choice-field/choice-field-card-styles.component.css +7 -0
  67. package/src/lib/forms/choice-field/choice-field.component.css +4 -2
  68. package/src/lib/forms/dropzone/dropzone-crop.component.css +21 -0
  69. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +11 -8
  70. package/src/lib/forms/otp-input/otp-input.component.css +11 -2
  71. package/src/lib/forms/select/select-option-styles.component.css +1 -0
  72. package/src/lib/forms/selection-card-styles.component.css +15 -3
  73. package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +7 -2
  74. package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +9 -2
  75. package/src/lib/forms/selection-list/radio-group/radio.component.css +9 -2
  76. package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +47 -3
  77. package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +8 -2
  78. package/src/lib/match/match-card.component.css +8 -2
  79. package/src/lib/match/match-participant.component.css +21 -1
  80. package/src/lib/progress-steps/progress-step.component.css +51 -7
  81. package/src/lib/standings/standings.component.css +40 -7
  82. package/src/lib/stream/consent/stream-consent.component.css +1 -0
  83. package/src/lib/stream/error/stream-player-error.component.css +1 -0
  84. package/src/lib/stream/stream-overlay-card-styles.component.css +9 -3
  85. package/src/lib/table/table.component.css +1 -0
  86. package/types/ethlete-components.d.ts +195 -16
  87. package/design/sdk/components/switch/switch.css +0 -37
package/CHANGELOG.md CHANGED
@@ -1,5 +1,66 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-next.91
4
+
5
+ ### Minor Changes
6
+
7
+ - Add accordion tokens for the header outset, the hover tint inset, the chevron color and stroke width and the panel's top padding.
8
+ - Add accordion trigger hover and active background tokens, a header end inset token and provideAccordionConfig for an app-wide lastDivider default.
9
+ - `et-button` and `et-icon-button` take a `pressedVariant` input that sets the variant shown while `pressed`; without it the fixed per-flavor swap stays. `variant="outline" pressedVariant="outline"` keeps an outline toggle outlined, with border and text in the `pressedColor` theme.
10
+ - Add `--et-form-field-label-color` and `--et-form-field-label-color-active` to set the form field label colour at rest and when focused or filled.
11
+ - The `icons` generator now resolves Font Awesome alias names (`times`, `cog`, `home`, …), so an icon list written for Font Awesome 7 also generates on Font Awesome 6.
12
+ - Add progress-steps tokens: connector width and colours, an opt-in filled current marker with a dot, done and upcoming label font weights, and the description line height.
13
+ - `et-segmented-button-group` now defaults to `overflow="scroll"`: segments shrink to their full label, then the track scrolls; `'truncate'` keeps the ellipsis look.
14
+ - Add an `overflow` input (`'truncate' | 'scroll'`) to `et-segmented-button-group`: `'scroll'` keeps full labels, scrolls the track and centers the selected segment.
15
+ - Add segmented button group tokens: inactive label colour and weight, track background, stretch track size and column count.
16
+ - Add `etStandingsFormTooltip` to `et-standings`: an `ng-template` that replaces the text tooltip of a labelled form result with your own content, receiving the form entry and the row.
17
+ - Add an optional `strength` (0-1) to `StandingsZone`, exposed as `--et-standings-zone-strength` on the zone band and its legend swatch, so two zones of one type can differ. Unset renders as before.
18
+
19
+ ### Patch Changes
20
+
21
+ - An anchored dialog with an `arrowAnchor` now grows from and shrinks to that anchor, not the centre of its origin.
22
+ - Fix `et-segmented-button-group` collapsing to its padding as a direct child of an auto-sized `et-scrollable`.
23
+ - Add `--et-progress-step-upcoming-marker-content` and `--et-progress-step-upcoming-marker-background` to style the marker of upcoming progress steps, for example an empty ring.
24
+ - Add `--et-accordion-header-hover-text-decoration` (default `none`) to decorate the accordion title on header hover, for example an underline.
25
+ - Text fields draw a quieter resting frame, about 3:1 against their surface in light and dark, instead of a near-white frame in dark mode.
26
+ - `ButtonComponent.pressedVariant` is the input and reads `undefined` unless set; `ACCORDION_CONFIG_TOKEN` is gone, use `injectAccordionConfig()`.
27
+ - Accordion, progress step and segmented button tokens now put the element or state before the part, e.g. `--et-accordion-header-hover-background`.
28
+ - Text fields draw their hovered frame near 4.5:1 against the surface in light and dark, using the same surface text mix as the resting frame, instead of a near-white frame in dark mode.
29
+ - Checkbox, radio, selection card and OTP borders now rest near 3:1 like text fields, and every control's border hovers in its label's hover colour.
30
+ - Name icon-only controls by aria-label instead of a native title
31
+ - An overflowing `et-nav-tabs` now opens with the active link centered instead of at scroll position 0.
32
+ - A progress step marker stays round when the step's label or description fills the row.
33
+ - A custom `etStandingsFormTooltip` template no longer throws on hover: the form entry's label is passed as the tooltip's accessible description.
34
+
35
+ ## 1.0.0-next.90
36
+
37
+ ### Minor Changes
38
+
39
+ - 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`.
40
+ - 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.
41
+ - 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.
42
+ - 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.
43
+ - `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`.
44
+ - `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.
45
+
46
+ ### Patch Changes
47
+
48
+ - The table design mock takes `selectAllAttributes` and a row's `selectAttributes`, extra attributes on its selection checkboxes.
49
+ - `et-choice-field`: the control slot is a flex container, so a checkbox or switch no longer sits in a text line box that
50
+ made the row taller than the control (in both the inline and the subgrid layout).
51
+ - `et-match-card`: the participant country line keeps its flag beside the name and stays start-aligned on both rows, even
52
+ inside a centered container.
53
+ - `et-match-participant`: new tokens for the emblem frame - `--et-match-participant-emblem-radius`,
54
+ `--et-match-participant-emblem-border-width`, `--et-match-participant-emblem-border-color`, and for the empty frame of a
55
+ participant still to be decided `--et-match-participant-tbd-emblem-border-width` and
56
+ `--et-match-participant-tbd-emblem-border-style` (e.g. `dashed`). The defaults keep today's look.
57
+ - `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.
58
+ - `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.
59
+ - `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.
60
+ - The stream consent gate and error overlay now fit a player under 200px tall: tighter spacing, and the icon reliably hides.
61
+ - 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.
62
+ - Add `anchor` to the `tooltip()` design mock; the design frame now places anchored mock panes and arrows on whole pixels like the overlay runtime.
63
+
3
64
  ## 1.0.0-next.89
4
65
 
5
66
  ### Minor Changes
@@ -77,7 +77,7 @@ export const notificationStyles = /* @__PURE__ */ [
77
77
  const spinner = () => {
78
78
  const circle = `<svg viewBox="0 0 8 8" class="et-spinner-circle-graphic" xmlns="http://www.w3.org/2000/svg" focusable="false"><circle r="3" cx="50%" cy="50%"></circle></svg>`;
79
79
 
80
- return `<et-spinner data-et-skip="CLIPPED" class="et-notification-spinner et-notification-mock-spinner et-color--inherited et-spinner" role="progressbar" aria-label="Loading"><div class="et-spinner-indeterminate"><div class="et-spinner-indeterminate-container" aria-hidden="true"><div class="et-spinner-layer"><div class="et-spinner-circle-clipper et-spinner-circle-left">${circle}</div><div class="et-spinner-gap-patch">${circle}</div><div class="et-spinner-circle-clipper et-spinner-circle-right">${circle}</div></div></div></div></et-spinner>`;
80
+ return `<et-spinner class="et-notification-spinner et-notification-mock-spinner et-color--inherited et-spinner" role="progressbar" aria-label="Loading"><div class="et-spinner-indeterminate"><div class="et-spinner-indeterminate-container" aria-hidden="true"><div class="et-spinner-layer"><div class="et-spinner-circle-clipper et-spinner-circle-left">${circle}</div><div class="et-spinner-gap-patch">${circle}</div><div class="et-spinner-circle-clipper et-spinner-circle-right">${circle}</div></div></div></div></et-spinner>`;
81
81
  };
82
82
 
83
83
  const dismissButton = (color: string | undefined, attributes?: string) => {
@@ -4,6 +4,7 @@ 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: {} },
9
10
  describe: {
@@ -64,13 +64,17 @@ 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
  },
76
80
  describe: {
@@ -78,13 +82,33 @@ export default definePart({
78
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.',
79
83
  'without-header':
80
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.',
81
86
  'action-hover': 'Edit match hovered; check that the row takes the hover tint across the full width.',
82
87
  'action-active': 'Edit match pressed; check that the tint goes a step past hover.',
83
88
  'action-focus-visible':
84
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.',
85
92
  'cancel-focus-visible':
86
93
  'Cancel with keyboard focus; check that the focus ring shows around the last row and is not cut at the bottom.',
87
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
+ },
88
112
  widths: [390],
89
113
  instant:
90
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,16 +27,19 @@ 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' },
@@ -52,7 +57,7 @@ export default definePart({
52
57
  },
53
58
  widths: [480],
54
59
  controls: {
55
- option: { kind: 'row', input: ['pointer', 'keyboard'] },
60
+ option: { kind: 'button', part: 'components/checkbox' },
56
61
  apply: { kind: 'button', part: 'components/button' },
57
62
  },
58
63
  frame: (body, { placement = 'bottom-end' }) =>
@@ -78,7 +83,7 @@ export default definePart({
78
83
  modal,
79
84
  content: pane,
80
85
  }),
81
- styles: [anchoredDialogStyles, apply.styles, edge].join('\n'),
86
+ styles: [anchoredDialogStyles, apply.styles, checkboxGroupStyles, edge].join('\n'),
82
87
  });
83
88
  },
84
89
  });
@@ -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,6 +54,9 @@ 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'),
45
60
  },
46
61
  describe: {
47
62
  filled: 'Filled badges in the default, brand, warning and danger themes; check that each label reads on its fill.',
@@ -54,12 +69,21 @@ export default definePart({
54
69
  'filled-sizes': 'Filled badges at sm, md and lg; check that height, padding and text scale per step.',
55
70
  'tonal-sizes': 'Tonal badges at sm, md and lg; check that height, padding and text scale per step.',
56
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.',
57
78
  },
58
79
  widths: [480],
80
+ controls: {},
59
81
  frame: (body) => `<div class="badge-frame">${body}</div>`,
60
82
  render: (props: Props) =>
61
83
  drawing({
62
- 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))),
63
87
  styles: [badgeStyles, frame].join('\n'),
64
88
  }),
65
89
  });
@@ -59,16 +59,20 @@ 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' },
@@ -80,9 +84,12 @@ export default definePart({
80
84
  warning: 'The warning banner with Upgrade; check that the warning tint and the text keep their contrast.',
81
85
  error: 'The error banner with Retry in the danger colour; check the icon and that Retry reads on the tint.',
82
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.',
83
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.',
84
90
  'close-focus-visible': 'The info close button with keyboard focus; check that the focus ring shows around it.',
85
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.',
86
93
  'action-focus-visible': 'View fixtures with keyboard focus; check that the focus ring shows around it.',
87
94
  'error-close-focus-visible':
88
95
  'The error close button with keyboard focus; check that the ring stays visible on the danger tint.',
@@ -90,6 +97,30 @@ export default definePart({
90
97
  'Retry with keyboard focus on the error banner; check that the ring stays visible on the danger tint.',
91
98
  all: 'The four banner types stacked; check that info, success, warning and error each read as their own colour.',
92
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
+ },
93
124
  widths: [480],
94
125
  controls: {
95
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' },
@@ -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
 
@@ -82,6 +82,7 @@ export const grid = {
82
82
 
83
83
  export default definePart({
84
84
  note: 'scale of the decided shape, Q182, lead merge',
85
+ consumerAction: 'a button whose click the consumer binds',
85
86
  madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5', 'design check'],
86
87
  states,
87
88
  grid,
@@ -4,8 +4,10 @@ import frame from './calendar.css?inline';
4
4
 
5
5
  type Interaction = 'hover' | 'focus-visible';
6
6
 
7
+ type View = NonNullable<CalendarMockOptions['view']>;
8
+
7
9
  type Props = {
8
- view?: CalendarMockOptions['view'];
10
+ view?: View;
9
11
  selected?: boolean;
10
12
  range?: boolean;
11
13
  day?: Interaction;
@@ -25,11 +27,33 @@ const TODAY = '2026-09-14';
25
27
  const force = (interaction: Interaction | undefined, key: string) =>
26
28
  interaction ? { [key]: `data-et-force="${interaction}"` } : {};
27
29
 
30
+ const ZOOM_OUT: Record<View, string> = { month: 'year-view', year: 'multi-year-view', multiYear: 'selected' };
31
+
32
+ const action = (key: string) => `data-et-action="${key}"`;
33
+
34
+ const cellAction = (view: View, range: boolean) =>
35
+ view === 'year'
36
+ ? 'emit:monthSelect'
37
+ : view === 'multiYear'
38
+ ? 'emit:yearSelect'
39
+ : range
40
+ ? 'emit:rangeValueChange'
41
+ : 'emit:valueChange';
42
+
43
+ const declareCells = (html: string, key: string) =>
44
+ html.replace(/<button [^>]*class="et-calendar-cell[^>]*>/g, (cell) =>
45
+ cell.includes('aria-disabled') ? cell : cell.replace('<button ', `<button ${action(key)} `),
46
+ );
47
+
48
+ const withAction = (key: string | undefined, extra?: string) =>
49
+ [key && action(key), extra].filter(Boolean).join(' ') || undefined;
50
+
28
51
  const render = (props: Props) => {
29
52
  const view = props.view ?? 'month';
30
53
  const coarseKey = view === 'year' ? '2026-03' : '2021';
54
+ const navigate = props.limits ? undefined : 'emit:activeMonthChange';
31
55
 
32
- return calendar({
56
+ const html = calendar({
33
57
  view,
34
58
  month: '2026-09',
35
59
  today: TODAY,
@@ -55,10 +79,13 @@ const render = (props: Props) => {
55
79
  ...force(props.selectedDay, '2026-09-17'),
56
80
  ...force(props.rangeDay, '2026-09-09'),
57
81
  },
58
- nextAttributes: props.nav ? `data-et-force="${props.nav}"` : undefined,
59
- labelAttributes: props.label ? `data-et-force="${props.label}"` : undefined,
82
+ previousAttributes: withAction(navigate),
83
+ nextAttributes: withAction(navigate, props.nav ? `data-et-force="${props.nav}"` : undefined),
84
+ labelAttributes: withAction(ZOOM_OUT[view], props.label ? `data-et-force="${props.label}"` : undefined),
60
85
  attributes: props.compact ? 'style="--et-calendar-cell-size: 32px"' : undefined,
61
86
  });
87
+
88
+ return declareCells(html, cellAction(view, Boolean(props.range || props.comparison)));
62
89
  };
63
90
 
64
91
  export default definePart({
@@ -38,14 +38,20 @@ const content = (props: Props) => {
38
38
 
39
39
  export default definePart({
40
40
  note: 'Decided rules only',
41
- madeBy: ['claude-opus-5-5'],
41
+ consumerAction: 'its buttons are actions the consumer projects',
42
+ madeBy: ['claude-opus-5-5', 'design check'],
42
43
  states: {
43
44
  outlined: { variant: 'outlined' },
44
45
  elevated: { variant: 'elevated' },
45
46
  filled: { variant: 'filled' },
46
47
  media: { variant: 'outlined', form: 'media' },
47
48
  plain: { variant: 'outlined', form: 'plain' },
49
+ confirm: { variant: 'outlined' },
50
+ 'confirm-hover': { variant: 'outlined', confirm: 'hover' },
51
+ 'confirm-active': { variant: 'outlined', confirm: 'active' },
48
52
  'confirm-focus-visible': { variant: 'outlined', confirm: 'focus-visible' },
53
+ 'cancel-hover': { variant: 'outlined', cancel: 'hover' },
54
+ 'cancel-active': { variant: 'outlined', cancel: 'active' },
49
55
  'cancel-focus-visible': { variant: 'outlined', cancel: 'focus-visible' },
50
56
  },
51
57
  describe: {
@@ -54,9 +60,43 @@ export default definePart({
54
60
  filled: 'The filled card; check that its fill differs from the page without a border.',
55
61
  media: 'The outlined card with a media image on top; check that the image fills the top edge inside the radius.',
56
62
  plain: 'A plain outlined card with Revenue and an amount only; check the padding without actions.',
63
+ confirm: 'The outlined card at rest as the Open row of the grid; check Open at rest.',
64
+ 'confirm-hover': 'Open hovered; check that the filled button takes its hover fill inside the card.',
65
+ 'confirm-active': 'Open pressed; check that the fill goes a step past hover.',
57
66
  'confirm-focus-visible': 'Open with keyboard focus; check the focus ring around the button inside the card.',
67
+ 'cancel-hover': 'Cancel hovered; check that the outline button takes its hover tint inside the card.',
68
+ 'cancel-active': 'Cancel pressed; check that the tint goes a step past hover.',
58
69
  'cancel-focus-visible': 'Cancel with keyboard focus; check the focus ring around the outline button.',
59
70
  },
71
+ motions: {
72
+ 'cancel-hover-in': { from: 'outlined', to: 'cancel-hover' },
73
+ 'cancel-hover-out': { from: 'cancel-hover', to: 'outlined' },
74
+ 'cancel-press': { from: 'cancel-hover', to: 'cancel-active' },
75
+ 'cancel-release': { from: 'cancel-active', to: 'cancel-hover' },
76
+ 'confirm-hover-in': { from: 'confirm', to: 'confirm-hover' },
77
+ 'confirm-hover-out': { from: 'confirm-hover', to: 'confirm' },
78
+ 'confirm-press': { from: 'confirm-hover', to: 'confirm-active' },
79
+ 'confirm-release': { from: 'confirm-active', to: 'confirm-hover' },
80
+ 'confirm-tap': { from: 'confirm', to: 'confirm-active' },
81
+ 'confirm-lift': { from: 'confirm-active', to: 'confirm' },
82
+ },
83
+ grid: {
84
+ columns: ['rest', 'hover', 'active', 'focus-visible'] as const,
85
+ rows: {
86
+ cancel: {
87
+ rest: 'outlined',
88
+ hover: 'cancel-hover',
89
+ active: 'cancel-active',
90
+ 'focus-visible': 'cancel-focus-visible',
91
+ },
92
+ confirm: {
93
+ rest: 'confirm',
94
+ hover: 'confirm-hover',
95
+ active: 'confirm-active',
96
+ 'focus-visible': 'confirm-focus-visible',
97
+ },
98
+ },
99
+ },
60
100
  widths: [480],
61
101
  controls: {
62
102
  cancel: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -17,7 +17,9 @@ const TITLES = ['Kick-off', 'First half', 'Half time', 'Second half', 'Full time
17
17
  const LONG_CAPTION =
18
18
  'A long caption that wraps over several lines inside the slide, the way a match report teaser runs on past a single line of text.';
19
19
 
20
- const force = (interaction: Interaction | undefined) => (interaction ? `data-et-force="${interaction}"` : undefined);
20
+ const INDEX_CHANGE = 'data-et-action="emit:activeIndexChange"';
21
+
22
+ const force = (interaction: Interaction | undefined) => (interaction ? `data-et-force="${interaction}"` : '');
21
23
 
22
24
  const slideContent = (index: number, count: number, longCaption: boolean) =>
23
25
  `<div class="carousel-slide"><p class="carousel-slide-title">${index + 1}. ${TITLES[index % TITLES.length]}</p>` +
@@ -28,11 +30,15 @@ const render = ({ count = 5, longCaption = false, previous, next, playToggle, do
28
30
  carousel({
29
31
  ...options,
30
32
  slides: Array.from({ length: count }, (_, index) => ({ content: slideContent(index, count, longCaption) })),
31
- previousAttributes: force(previous),
32
- nextAttributes: force(next),
33
- playToggleAttributes: force(playToggle),
34
- dotAttributes: dot ? { [dot.index]: `data-et-force="${dot.interaction}"` } : undefined,
35
- trackAttributes: 'data-et-skip="CLIPPED"',
33
+ previousAttributes: `${INDEX_CHANGE} ${force(previous)}`,
34
+ nextAttributes: `${INDEX_CHANGE} ${force(next)}`,
35
+ playToggleAttributes: `data-et-action="${options.playing === false ? 'autoplay-playing' : 'autoplay-paused'}" ${force(playToggle)}`,
36
+ dotAttributes: Object.fromEntries(
37
+ Array.from({ length: count }, (_, index) => [
38
+ index,
39
+ `${INDEX_CHANGE} ${dot?.index === index ? force(dot.interaction) : ''}`,
40
+ ]),
41
+ ),
36
42
  }).replaceAll(
37
43
  'class="et-carousel-dot-progress-half"',
38
44
  'data-et-skip="CLIPPED" class="et-carousel-dot-progress-half"',
@@ -92,6 +98,29 @@ export default definePart({
92
98
  },
93
99
  widths: [480],
94
100
  frame: (body) => `<div class="carousel-frame">${body}</div>`,
101
+ scrolls: [
102
+ 'first-slide',
103
+ 'middle-slide',
104
+ 'last-slide',
105
+ 'no-loop-first',
106
+ 'no-loop-last',
107
+ 'next-hover',
108
+ 'next-active',
109
+ 'next-focus-visible',
110
+ 'dot-hover',
111
+ 'active-dot-hover',
112
+ 'dot-focus-visible',
113
+ 'active-dot-focus-visible',
114
+ 'autoplay-playing',
115
+ 'autoplay-paused',
116
+ 'play-toggle-hover',
117
+ 'play-toggle-focus-visible',
118
+ 'multiple-items',
119
+ 'item-size-third',
120
+ 'center-aligned',
121
+ 'no-controls',
122
+ 'long-caption',
123
+ ],
95
124
  render: (props: Props) =>
96
125
  drawing({
97
126
  body: render(props),
@@ -36,7 +36,13 @@ const LONG_SOURCES = [
36
36
 
37
37
  const PLOT_WIDTH = 410;
38
38
 
39
- const render = (props: Props) => {
39
+ const declareMarks = (html: string) =>
40
+ html.replace(
41
+ /<g class="et-(bar-chart-bar|line-chart-slice|pie-chart-slice)\b/g,
42
+ (mark) => `${mark.slice(0, 2)} data-et-action="emit:markActivate"${mark.slice(2)}`,
43
+ );
44
+
45
+ const marks = (props: Props) => {
40
46
  if (props.kind === 'bar') {
41
47
  return barChart({
42
48
  plotWidth: PLOT_WIDTH,
@@ -116,7 +122,7 @@ export default definePart({
116
122
  frame: (body) => `<div class="t-frame">${body}</div>`,
117
123
  render: (props: Props) =>
118
124
  drawing({
119
- body: render(props),
125
+ body: declareMarks(marks(props)),
120
126
  styles: [chartStyles, frame].join('\n'),
121
127
  }),
122
128
  });