@ethlete/components 1.0.0-next.89 → 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 (65) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/design/sdk/components/accent-on-light/accent-on-light.ts +1 -0
  3. package/design/sdk/components/action-sheet/action-sheet.ts +25 -1
  4. package/design/sdk/components/anchored-dialog/anchored-dialog.css +2 -5
  5. package/design/sdk/components/anchored-dialog/anchored-dialog.ts +13 -8
  6. package/design/sdk/components/badge/badge.css +18 -0
  7. package/design/sdk/components/badge/badge.ts +27 -3
  8. package/design/sdk/components/banner/banner.ts +32 -1
  9. package/design/sdk/components/bracket/bracket.ts +1 -0
  10. package/design/sdk/components/breadcrumb/breadcrumb.ts +1 -1
  11. package/design/sdk/components/button/button.ts +1 -0
  12. package/design/sdk/components/calendar/calendar.ts +31 -4
  13. package/design/sdk/components/card/card.ts +41 -1
  14. package/design/sdk/components/carousel/carousel.ts +35 -5
  15. package/design/sdk/components/chart/chart.ts +8 -2
  16. package/design/sdk/components/checkbox/checkbox.ts +11 -2
  17. package/design/sdk/components/chip/chip.ts +2 -9
  18. package/design/sdk/components/copy-button/copy-button.ts +4 -1
  19. package/design/sdk/components/dialog/dialog.ts +58 -1
  20. package/design/sdk/components/empty-state/empty-state.ts +1 -0
  21. package/design/sdk/components/floating-action/floating-action.ts +1 -0
  22. package/design/sdk/components/form-field/form-field.ts +9 -16
  23. package/design/sdk/components/grid/grid.ts +4 -1
  24. package/design/sdk/components/match/match.ts +1 -0
  25. package/design/sdk/components/menu/menu.ts +1 -0
  26. package/design/sdk/components/notification/notification.ts +1 -0
  27. package/design/sdk/components/pagination/pagination.ts +1 -1
  28. package/design/sdk/components/progress-steps/progress-steps.ts +1 -0
  29. package/design/sdk/components/query-error/query-error.ts +4 -1
  30. package/design/sdk/components/radio-group/radio-group.ts +1 -0
  31. package/design/sdk/components/scheduler/scheduler.ts +22 -1
  32. package/design/sdk/components/scrollable/scrollable.ts +28 -2
  33. package/design/sdk/components/scrollbar/scrollbar.css +1 -1
  34. package/design/sdk/components/scrollbar/scrollbar.ts +13 -0
  35. package/design/sdk/components/select/select.ts +9 -0
  36. package/design/sdk/components/select/shared/select-part.ts +4 -12
  37. package/design/sdk/components/select-panel/select-panel.ts +1 -0
  38. package/design/sdk/components/standings/standings.ts +4 -1
  39. package/design/sdk/components/stream/stream.ts +12 -3
  40. package/design/sdk/components/switch/switch.ts +10 -4
  41. package/design/sdk/components/table/table.ts +94 -12
  42. package/design/sdk/components/tabs/tabs.ts +1 -1
  43. package/design/sdk/components/textarea/textarea.ts +31 -2
  44. package/design/sdk/components/toolbar/toolbar.ts +1 -0
  45. package/design/sdk/components/tree/tree.ts +8 -1
  46. package/design/sdk/foundations/elevation/elevation.ts +1 -0
  47. package/design/sdk/ready.json +334 -87
  48. package/design/sdk/rule-baseline.json +48 -0
  49. package/design/table.ts +11 -4
  50. package/design/tooltip.ts +7 -1
  51. package/fesm2022/ethlete-components.mjs +438 -73
  52. package/fesm2022/ethlete-components.mjs.map +1 -1
  53. package/package.json +1 -1
  54. package/src/lib/bracket/bracket.component.css +4 -1
  55. package/src/lib/forms/choice-field/choice-field.component.css +4 -2
  56. package/src/lib/forms/dropzone/dropzone-crop.component.css +21 -0
  57. package/src/lib/forms/select/select-option-styles.component.css +1 -0
  58. package/src/lib/match/match-card.component.css +8 -2
  59. package/src/lib/match/match-participant.component.css +21 -1
  60. package/src/lib/stream/consent/stream-consent.component.css +1 -0
  61. package/src/lib/stream/error/stream-player-error.component.css +1 -0
  62. package/src/lib/stream/stream-overlay-card-styles.component.css +9 -3
  63. package/src/lib/table/table.component.css +1 -0
  64. package/types/ethlete-components.d.ts +111 -11
  65. package/design/sdk/components/switch/switch.css +0 -37
@@ -44,18 +44,11 @@ const disabledRows = {
44
44
  } satisfies Record<string, Props>;
45
45
 
46
46
  export const rows = { ...interactive.states, ...disabledRows };
47
- export const grid = {
48
- columns: interactive.grid.columns,
49
- rows: {
50
- ...interactive.grid.rows,
51
- disabled: { rest: 'disabled' as const },
52
- 'disabled-selected': { rest: 'disabled-selected' as const },
53
- 'disabled-removable': { rest: 'disabled-removable' as const },
54
- },
55
- };
47
+ export const grid = interactive.grid;
56
48
 
57
49
  export default definePart({
58
50
  note: 'Decided rules only',
51
+ consumerAction: 'a chip whose press and removal the consumer binds',
59
52
  madeBy: ['claude-opus-5-5'],
60
53
  states: {
61
54
  ...rows,
@@ -12,7 +12,10 @@ type Props = {
12
12
  };
13
13
 
14
14
  const mark = (control: 'icon' | 'text', interaction?: Interaction) =>
15
- [`data-et-control="${control}" data-can-animate`, interaction && `data-et-force="${interaction}"`]
15
+ [
16
+ `data-et-control="${control}" data-et-action="emit:copySucceed" data-can-animate`,
17
+ interaction && `data-et-force="${interaction}"`,
18
+ ]
16
19
  .filter(Boolean)
17
20
  .join(' ');
18
21
 
@@ -52,12 +52,20 @@ const render = ({ kind, long, close, confirm, cancel }: Props) =>
52
52
 
53
53
  export default definePart({
54
54
  note: 'Decided rules only',
55
- madeBy: ['claude-opus-5-5'],
55
+ consumerAction: 'its buttons are actions the consumer projects',
56
+ madeBy: ['claude-opus-5-5', 'design check'],
56
57
  states: {
57
58
  default: { kind: 'dialog' },
59
+ cancel: { kind: 'dialog' },
60
+ confirm: { kind: 'dialog' },
58
61
  'close-hover': { kind: 'dialog', close: 'hover' },
62
+ 'close-active': { kind: 'dialog', close: 'active' },
59
63
  'close-focus-visible': { kind: 'dialog', close: 'focus-visible' },
64
+ 'confirm-hover': { kind: 'dialog', confirm: 'hover' },
65
+ 'confirm-active': { kind: 'dialog', confirm: 'active' },
60
66
  'confirm-focus-visible': { kind: 'dialog', confirm: 'focus-visible' },
67
+ 'cancel-hover': { kind: 'dialog', cancel: 'hover' },
68
+ 'cancel-active': { kind: 'dialog', cancel: 'active' },
61
69
  'cancel-focus-visible': { kind: 'dialog', cancel: 'focus-visible' },
62
70
  alert: { kind: 'alert' },
63
71
  'alert-cancel-focus-visible': { kind: 'alert', cancel: 'focus-visible' },
@@ -67,9 +75,16 @@ export default definePart({
67
75
  describe: {
68
76
  default:
69
77
  'Move kick-off over the backdrop with text, close, Cancel and Save; check the title row and the actions at the end.',
78
+ cancel: 'Move kick-off at rest as the Cancel row of the grid; check Cancel at rest.',
79
+ confirm: 'Move kick-off at rest as the Save row of the grid; check Save at rest.',
70
80
  'close-hover': 'The close button hovered; check its round hover tint.',
81
+ 'close-active': 'The close button pressed; check that the round tint goes a step past hover.',
71
82
  'close-focus-visible': 'The close button with keyboard focus; check the focus ring around it.',
83
+ 'confirm-hover': 'Save hovered; check that the filled button takes its hover fill.',
84
+ 'confirm-active': 'Save pressed; check that the fill goes a step past hover.',
72
85
  'confirm-focus-visible': 'Save with keyboard focus; check the focus ring around the filled button.',
86
+ 'cancel-hover': 'Cancel hovered; check that the outline button takes its hover tint.',
87
+ 'cancel-active': 'Cancel pressed; check that the tint goes a step past hover.',
73
88
  'cancel-focus-visible': 'Cancel with keyboard focus; check the focus ring around the outline button.',
74
89
  alert: 'The Delete this match? alert with Cancel and Delete; check the message and the two actions.',
75
90
  'alert-cancel-focus-visible': 'The alert Cancel with keyboard focus; check the focus ring around it.',
@@ -77,6 +92,47 @@ export default definePart({
77
92
  'long-body':
78
93
  'Move the season with eight paragraphs; check that the body scrolls and the dividers show above and below it.',
79
94
  },
95
+ motions: {
96
+ 'close-hover-in': { from: 'default', to: 'close-hover' },
97
+ 'close-hover-out': { from: 'close-hover', to: 'default' },
98
+ 'close-press': { from: 'close-hover', to: 'close-active' },
99
+ 'close-release': { from: 'close-active', to: 'close-hover' },
100
+ 'cancel-hover-in': { from: 'cancel', to: 'cancel-hover' },
101
+ 'cancel-hover-out': { from: 'cancel-hover', to: 'cancel' },
102
+ 'cancel-press': { from: 'cancel-hover', to: 'cancel-active' },
103
+ 'cancel-release': { from: 'cancel-active', to: 'cancel-hover' },
104
+ 'cancel-tap': { from: 'cancel', to: 'cancel-active' },
105
+ 'cancel-lift': { from: 'cancel-active', to: 'cancel' },
106
+ 'confirm-hover-in': { from: 'confirm', to: 'confirm-hover' },
107
+ 'confirm-hover-out': { from: 'confirm-hover', to: 'confirm' },
108
+ 'confirm-press': { from: 'confirm-hover', to: 'confirm-active' },
109
+ 'confirm-release': { from: 'confirm-active', to: 'confirm-hover' },
110
+ 'confirm-tap': { from: 'confirm', to: 'confirm-active' },
111
+ 'confirm-lift': { from: 'confirm-active', to: 'confirm' },
112
+ },
113
+ grid: {
114
+ columns: ['rest', 'hover', 'active', 'focus-visible'] as const,
115
+ rows: {
116
+ close: {
117
+ rest: 'default',
118
+ hover: 'close-hover',
119
+ active: 'close-active',
120
+ 'focus-visible': 'close-focus-visible',
121
+ },
122
+ cancel: {
123
+ rest: 'cancel',
124
+ hover: 'cancel-hover',
125
+ active: 'cancel-active',
126
+ 'focus-visible': 'cancel-focus-visible',
127
+ },
128
+ confirm: {
129
+ rest: 'confirm',
130
+ hover: 'confirm-hover',
131
+ active: 'confirm-active',
132
+ 'focus-visible': 'confirm-focus-visible',
133
+ },
134
+ },
135
+ },
80
136
  widths: [480],
81
137
  controls: {
82
138
  close: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -84,6 +140,7 @@ export default definePart({
84
140
  confirm: { kind: 'button', input: ['pointer', 'keyboard'] },
85
141
  },
86
142
  frame: (body) => `<div class="dialog-frame">${body}</div>`,
143
+ scrolls: ['long-body'],
87
144
  render: (props: Props) =>
88
145
  drawing({
89
146
  body: overlayBackdrop(render(props)),
@@ -34,6 +34,7 @@ const render = ({ form, action }: Props) => emptyState({ ...COPY[form], actionAt
34
34
 
35
35
  export default definePart({
36
36
  note: 'Decided rules only',
37
+ consumerAction: 'its buttons are actions the consumer projects',
37
38
  madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
38
39
  states: {
39
40
  default: { form: 'default' },
@@ -39,6 +39,7 @@ const render = ({ state = 'inline', interaction, filterIcon, color, inset }: Pro
39
39
 
40
40
  export default definePart({
41
41
  note: 'Q138: the floating trigger gets the Q99a 1px inset ink edge in light only, so it reaches 3:1 on a light grey row (4.68) and the page (5.48); dark unchanged.',
42
+ consumerAction: 'its button runs the action the consumer binds',
42
43
  madeBy: ['claude-opus-5-5'],
43
44
  states: {
44
45
  inline: {},
@@ -41,6 +41,12 @@ const axisRows = Object.fromEntries(
41
41
  ),
42
42
  ) as Record<string, Props>;
43
43
 
44
+ const ALIGNMENTS = ['center', 'end'] as const;
45
+
46
+ const alignRows = Object.fromEntries(
47
+ ALIGNMENTS.map((textAlign) => [`text-align-${textAlign}`, { ...axisRow, textAlign }]),
48
+ ) as Record<`text-align-${(typeof ALIGNMENTS)[number]}`, Props>;
49
+
44
50
  const interactive = interactionRows(
45
51
  {
46
52
  empty: { hint: 'Shown on your profile' },
@@ -50,6 +56,7 @@ const interactive = interactionRows(
50
56
  'textarea-filled': { control: 'textarea', value: multiLine },
51
57
  'textarea-error': { control: 'textarea', error: 'This field is required' },
52
58
  ...axisRows,
59
+ ...alignRows,
53
60
  } satisfies Record<string, Props>,
54
61
  {
55
62
  interactions: ['hover', 'focus-visible'],
@@ -57,22 +64,8 @@ const interactive = interactionRows(
57
64
  },
58
65
  );
59
66
 
60
- const ALIGNMENTS = ['center', 'end'] as const;
61
-
62
- const alignStates = Object.fromEntries(
63
- ALIGNMENTS.map((textAlign) => [`text-align-${textAlign}`, { ...axisRow, textAlign }]),
64
- ) as Record<`text-align-${(typeof ALIGNMENTS)[number]}`, Props>;
65
-
66
- const states = { ...interactive.states, ...alignStates };
67
- const grid = {
68
- columns: interactive.grid.columns,
69
- rows: {
70
- ...interactive.grid.rows,
71
- ...Object.fromEntries(
72
- ALIGNMENTS.map((textAlign) => [`textAlign ${textAlign}`, { rest: `text-align-${textAlign}` as const }]),
73
- ),
74
- },
75
- };
67
+ const states = interactive.states;
68
+ const grid = interactive.grid;
76
69
 
77
70
  const markControl = (markup: string, control: FieldControl, interaction: FieldInteraction | undefined) => {
78
71
  const frame = ['data-et-control-part', interaction && `data-et-force="${interaction}"`].filter(Boolean);
@@ -87,7 +87,10 @@ export default definePart({
87
87
  items: itemsOf(props),
88
88
  actions: props.actions,
89
89
  ghost: props.drag ? { col: 1, row: 1, colSpan: 1, rowSpan: 1 } : undefined,
90
- }),
90
+ }).replaceAll(
91
+ 'class="et-grid-item-default-actions__remove',
92
+ 'data-et-action="emit:remove" class="et-grid-item-default-actions__remove',
93
+ ),
91
94
  styles: [gridStyles, frame].join('\n'),
92
95
  }),
93
96
  });
@@ -20,6 +20,7 @@ const finished: MatchMockOptions = {
20
20
 
21
21
  export default definePart({
22
22
  note: 'scale of the decided shape, Q182, lead merge',
23
+ consumerAction: 'its link goes where the consumer points it',
23
24
  madeBy: ['claude-opus-5-5'],
24
25
  states: {
25
26
  finished: { card: finished },
@@ -82,6 +82,7 @@ const { states, grid } = interactionRows(
82
82
 
83
83
  export default definePart({
84
84
  note: 'Decided rules only',
85
+ consumerAction: 'its items are actions the consumer passes in',
85
86
  madeBy: ['claude-opus-5-5'],
86
87
  states: {
87
88
  menu: { rows: FULL },
@@ -69,6 +69,7 @@ const render = ({ status, ...interactions }: Props) =>
69
69
 
70
70
  export default definePart({
71
71
  note: 'The SDK notification (et-notification), drawn by its mock from @ethlete/components/design: one notification per status with title, message, dismiss icon button and, where the status has them, a primary and a secondary text-button action; the four statuses in the stack column. The pane sits one surface level above the page, as the component forces elevation 1. Error takes the danger theme (the semantic error theme); success, info and loading take the theme around them, since the design product registers no success theme.',
72
+ consumerAction: 'its buttons are actions the consumer projects',
72
73
  madeBy: ['claude-opus-5-5'],
73
74
  states: {
74
75
  success: { status: 'success' },
@@ -17,7 +17,7 @@ type Props = Omit<PaginationMockOptions, 'items'> & {
17
17
  forced?: ItemInteraction;
18
18
  };
19
19
 
20
- const MARK = 'data-et-control="item" data-can-animate';
20
+ const MARK = 'data-et-control="item" data-et-action="emit:pageChange" data-can-animate';
21
21
 
22
22
  const items = ({ page, pages, total, target, forced }: Props): PaginationMockItem[] => {
23
23
  const attributes = (entry: number) => (forced && entry === target ? `${MARK} data-et-force="${forced}"` : MARK);
@@ -65,6 +65,7 @@ const steps = (props: Props) => {
65
65
 
66
66
  export default definePart({
67
67
  note: 'Decided rules only',
68
+ consumerAction: 'its steps link where the consumer points them',
68
69
  madeBy: ['claude-opus-5-5'],
69
70
  states: {
70
71
  default: {},
@@ -64,7 +64,10 @@ const SHAPES: Record<Shape, { status: number; title: string; messages: string[];
64
64
  };
65
65
 
66
66
  const mark = (control: string, interaction?: Interaction) =>
67
- [`data-et-control="${control}" data-can-animate`, interaction && `data-et-force="${interaction}"`]
67
+ [
68
+ `data-et-control="${control}" data-et-action="emit:retryRequest" data-can-animate`,
69
+ interaction && `data-et-force="${interaction}"`,
70
+ ]
68
71
  .filter(Boolean)
69
72
  .join(' ');
70
73
 
@@ -88,6 +88,7 @@ const INVALID = {
88
88
 
89
89
  export default definePart({
90
90
  note: 'The SDK radio group (et-radio-group with et-radio) in flow, first drawing, drawn by the mock from @ethlete/components/design/radio-group with the real markup and CSS: et-label, et-radio in the plain and the card variant (et-selection-card), et-description, et-form-support with hint and error, the required marker, plus the color-interactive sheet; the brand theme, danger as the error theme. Fixtures are fictional: a match reminder form (Kick-off reminder: One hour before, Fifteen minutes before, At kick-off; hint We send it as a push notification.; required with error Pick a reminder to continue.; mixed hint The selected matches disagree.; card group Match report format: Short, The score and the scorers. / Full, Every event, with the line-ups.; horizontal group Show matches at: Home, Away, Neutral ground; grid label Remind me one hour before). Framed as a page with 16px padding at 360 and 640. States: a grid of unchecked and checked by rest, hover, focus-visible, active, disabled and readonly (one-option groups); group-none, group-checked, group-support (descriptions and hint), group-option-hover, group-option-pressed, group-option-focus-visible, group-mixed (bulk edit, dashed circles), group-disabled, group-readonly, invalid, invalid-focus-visible, invalid-checked, group-horizontal, card-rest, card-checked, card-hover, card-focus-visible and card-checked-focus-visible. Numbers (light / dark), from shot pixels at scale 2 at 360, brand mint, a: circle 20px with a 2px border and a 10px dot (border-box, fixed in 00072d935); unchecked circle border (surface border) vs page 1.26 / 1.73; checked ring and dot (primary) 1.33 / 13.50; checked hover dot and ring (-hover via color-interactive; the lib hover rule skips a checked radio) 1.37 / 13.06, 1.03 from rest; active 2.24 / 8.01; focus ring and focused border (primary -focus), checked or unchecked, 1.37 / 13.06; card checked edge and ring (primary) 1.33 / 13.50; mixed dashed border (primary) 1.33 / 13.50; invalid circle border (danger) 4.83 / 3.71; disabled checked ring 2.12 / 1.65, disabled label 1.41 / 1.65 (exempt under 1.4.11). Decided rules that arise: Q88 (every radio focus ring in ink, the unchecked one too, since unlike the checkbox it is primary, not the surface text colour; the invalid ring takes the danger ink; the card ring in ink), Q99a (the checked circle border, the focused circle border, the mixed dashed border and the card checked and focus edge take light-dark(ink, primary); the checked dot is a mint fill, so it takes a 1px inset ink edge, an outline at -1px) and Q101 (a checked radio hovers to -active). The ink edge on a mint fill arises, so Q102 arises: b draws the dot edge in both schemes, c keeps dark as today (light-dark(ink, transparent)). The error border is the danger theme, not mint, and passes 3:1, so it is kept. Findings for later: no new lib CSS bug; the radio circle box-sizing bug is fixed (00072d935, measured 40 sheet px = 20px). (1) WCAG 1.4.11: the unchecked circle border is 1.26 / 1.73 vs page, under 3:1, the only edge of an unchecked radio (the same open question as the checkbox box and the switch off track). Not drawn. (2) The required marker takes the error theme primary: 3.71:1 in dark, under 4.5:1; exempted here as in checkbox r1. (3) A checked radio has no hover rule of its own; only color-interactive shifts it to -hover, 1.03 from rest, so hover on a checked radio is invisible in a; Q101 fixes it in b and c. (4) Readonly draws exactly like rest, as with the checkbox. (5) A disabled group dims its options (opacity 0.5 and the disabled label colour, both at once) but not the group label, which keeps 7.81 in light; the same holds for the checkbox group. Later rounds, left out here: the sizes sm and lg, the card with the control at start and the card slots, a coloured (non-brand) radio, the warning state, a disabled option inside an enabled group, a pending (aria-busy) group, long labels that wrap, RTL and the check animation.',
91
+ consumerAction: 'a form control whose value the consumer binds',
91
92
  madeBy: ['claude-opus-5-5'],
92
93
  states: {
93
94
  ...gridStates,
@@ -210,6 +210,27 @@ const render = (props: Props) => {
210
210
  return scheduler({ view: props.view, headerLabel: HEADER_LABELS[props.view], addAction: true, body });
211
211
  };
212
212
 
213
+ const action = (key: string) => `data-et-action="${key}"`;
214
+
215
+ const BUTTON_ACTIONS: [string, string][] = [
216
+ ['et-scheduler-today-button', 'emit:focusedDateChange'],
217
+ ['et-scheduler-nav-button--previous', 'emit:focusedDateChange'],
218
+ ['et-scheduler-nav-button--next', 'emit:focusedDateChange'],
219
+ ['et-scheduler-month-view-overflow-trigger', 'opens:components/menu'],
220
+ ];
221
+
222
+ const declareActions = (markup: string) =>
223
+ BUTTON_ACTIONS.reduce(
224
+ (html, [name, key]) => html.replace(new RegExp(`<button ([^>]*\\b${name}\\b)`), `<button ${action(key)} $1`),
225
+ markup,
226
+ )
227
+ .replaceAll('<et-segmented-button value=', `<et-segmented-button ${action('emit:viewChange')} value=`)
228
+ .replace(/<button [^>]*class="et-scheduler-(appointment|time-grid-block)[^>]*>/g, (appointment) =>
229
+ appointment.includes('data-selected')
230
+ ? appointment
231
+ : appointment.replace('<button ', `<button ${action('emit:selectedAppointmentIdChange')} `),
232
+ );
233
+
213
234
  const skipClipped = (markup: string) =>
214
235
  markup.replaceAll(
215
236
  'class="et-scheduler-time-grid-block',
@@ -246,7 +267,7 @@ export default definePart({
246
267
  frame: (body) => `<div class="t-frame">${body}</div>`,
247
268
  render: (props: Props) =>
248
269
  drawing({
249
- body: skipClipped(render(props)),
270
+ body: skipClipped(declareActions(render(props))),
250
271
  styles: [schedulerStyles, frame].join('\n'),
251
272
  }),
252
273
  });
@@ -68,7 +68,7 @@ const render = (props: Props) => {
68
68
  navigationActive: props.navigation ? active : undefined,
69
69
  darken: props.darken,
70
70
  itemSize: props.itemSize,
71
- itemGap: props.itemSize ? GAP : undefined,
71
+ itemGap: GAP,
72
72
  color: props.color,
73
73
  endButtonAttributes: props.endButton ? `data-et-force="${props.endButton}"` : undefined,
74
74
  containerAttributes: `data-et-skip="CLIPPED" style="--scrollable-offset: -${offset}px"`,
@@ -94,7 +94,8 @@ const render = (props: Props) => {
94
94
 
95
95
  export default definePart({
96
96
  note: 'scale of the decided shape, Q182, lead merge',
97
- madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
97
+ consumerAction: 'the buttons inside are content the consumer projects',
98
+ madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5', 'design check'],
98
99
  states: {
99
100
  'horizontal-start': {},
100
101
  'horizontal-middle': { position: 'middle' },
@@ -155,6 +156,31 @@ export default definePart({
155
156
  'item-size-quarter': 'Items at a quarter; check that four items fill the viewport with three gaps.',
156
157
  },
157
158
  widths: [480],
159
+ scrolls: [
160
+ 'horizontal-start',
161
+ 'horizontal-middle',
162
+ 'horizontal-end',
163
+ 'vertical-start',
164
+ 'vertical-middle',
165
+ 'vertical-end',
166
+ 'button-hover',
167
+ 'button-active',
168
+ 'border-mask',
169
+ 'vertical-border-mask',
170
+ 'navigation-start',
171
+ 'navigation-middle',
172
+ 'navigation-end',
173
+ 'vertical-navigation',
174
+ 'footer-buttons',
175
+ 'footer-button-hover',
176
+ 'danger-navigation',
177
+ 'darken',
178
+ 'item-focus-visible',
179
+ 'item-size-full',
180
+ 'item-size-half',
181
+ 'item-size-third',
182
+ 'item-size-quarter',
183
+ ],
158
184
  render: (props: Props) =>
159
185
  drawing({
160
186
  body: `<div class="scrollable-frame ${props.itemSize ? 'scrollable-frame--sized' : ''}">${render(props)}</div>`,
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  .scrollbar-viewport {
12
- overflow: hidden;
12
+ overflow: auto;
13
13
  }
14
14
 
15
15
  .scrollbar-viewport[data-layout='vertical'] {
@@ -131,6 +131,19 @@ export default definePart({
131
131
  },
132
132
  widths: [480],
133
133
  frame: (body, props) => `<div class="scrollbar-frame"${props.layout === 'rtl' ? ' dir="rtl"' : ''}>${body}</div>`,
134
+ scrolls: [
135
+ 'vertical',
136
+ 'vertical-scrolled',
137
+ 'horizontal',
138
+ 'horizontal-scrolled',
139
+ 'both-axes',
140
+ 'rtl',
141
+ 'short-content',
142
+ 'long-content',
143
+ 'thumb-hover',
144
+ 'dragging',
145
+ 'auto-hidden',
146
+ ],
134
147
  render: (props: Props) =>
135
148
  drawing({
136
149
  body: `<div class="scrollbar-wrapper">${render(props)}</div>`,
@@ -5,6 +5,7 @@ import { grid, moreStates, selectBody, SelectProps, states } from './shared/sele
5
5
 
6
6
  export default definePart<SelectProps>({
7
7
  note: 'scale of the decided shape, Q182, lead merge',
8
+ consumerAction: 'a form control whose value the consumer binds',
8
9
  madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
9
10
  states: { ...states, ...moreStates },
10
11
  describe: {
@@ -22,7 +23,15 @@ export default definePart<SelectProps>({
22
23
  'open-option-hover':
23
24
  'The open select with Drafts under the pointer; check that the pointer highlight shows on Drafts.',
24
25
  'size-sm': 'The filled select at size sm; check that field and text shrink together.',
26
+ 'size-sm-hover': 'The size sm select hovered; check that the border darkens at the smaller field height.',
27
+ 'size-sm-active': 'The size sm select pressed; check the press look on the smaller field frame.',
28
+ 'size-sm-focus-visible':
29
+ 'The size sm select focused by keyboard; check that the focus ring wraps the smaller field.',
25
30
  'size-lg': 'The filled select at size lg; check that field and text grow together.',
31
+ 'size-lg-hover': 'The size lg select hovered; check that the border darkens at the larger field height.',
32
+ 'size-lg-active': 'The size lg select pressed; check the press look on the larger field frame.',
33
+ 'size-lg-focus-visible':
34
+ 'The size lg select focused by keyboard; check that the focus ring wraps the larger field.',
26
35
  },
27
36
  grid,
28
37
  widths: [320],
@@ -36,31 +36,23 @@ const markControl = (markup: string, { interaction, pointerActive }: SelectProps
36
36
  : marked;
37
37
  };
38
38
 
39
- const interactive = interactionRows<SelectProps, 'placeholder' | 'selected', FieldInteraction>(
39
+ const interactive = interactionRows<SelectProps, 'placeholder' | 'selected' | 'size-sm' | 'size-lg', FieldInteraction>(
40
40
  {
41
41
  placeholder: {},
42
42
  selected: { value: 'review' },
43
+ 'size-sm': { value: 'review', size: 'sm' },
44
+ 'size-lg': { value: 'review', size: 'lg' },
43
45
  },
44
46
  { interactions: ['hover', 'active', 'focus-visible'], force: (props, interaction) => ({ ...props, interaction }) },
45
47
  );
46
48
 
47
- const SIZES = ['sm', 'lg'] as const;
48
-
49
49
  export const states = interactive.states;
50
- export const grid = {
51
- columns: interactive.grid.columns,
52
- rows: {
53
- ...interactive.grid.rows,
54
- ...Object.fromEntries(SIZES.map((size) => [`size ${size}`, { rest: `size-${size}` as const }])),
55
- },
56
- };
50
+ export const grid = interactive.grid;
57
51
 
58
52
  export const moreStates = {
59
53
  disabled: { value: 'review', disabled: true },
60
54
  open: { value: 'review', open: true, active: 'merged' },
61
55
  'open-option-hover': { value: 'review', open: true, active: 'drafts', pointerActive: true },
62
- 'size-sm': { value: 'review', size: 'sm' },
63
- 'size-lg': { value: 'review', size: 'lg' },
64
56
  } satisfies Record<string, SelectProps>;
65
57
 
66
58
  export const selectBody = (props: SelectProps) =>
@@ -105,6 +105,7 @@ const { states, grid } = interactionRows(
105
105
 
106
106
  export default definePart({
107
107
  note: 'The SDK select option and open panel, shared by select, page-size-select and phone-input, drawn by the mocks from @ethlete/components/design.',
108
+ consumerAction: 'a form control whose value the consumer binds',
108
109
  madeBy: ['claude-opus-5-5'],
109
110
  states: {
110
111
  ...states,
@@ -137,7 +137,10 @@ export default definePart({
137
137
  frame: (body) => `<div class="t-frame">${body}</div>`,
138
138
  render: (props: Props) =>
139
139
  drawing({
140
- body: props.view === 'table' ? table(props) : pick(props),
140
+ body:
141
+ props.view === 'table'
142
+ ? table(props)
143
+ : pick(props).replaceAll('role="group"', 'role="group" data-et-action="emit:orderChange"'),
141
144
  styles: [standingsStyles, frame].join('\n'),
142
145
  }),
143
146
  });
@@ -8,8 +8,17 @@ type Props = { state: StreamMockState; button?: Interaction };
8
8
 
9
9
  const VIDEO = '<div class="t-video" aria-hidden="true"></div>';
10
10
 
11
- const buttonAttributes = (interaction: Interaction | undefined) =>
12
- ['data-et-control="action" data-can-animate', interaction && `data-et-force="${interaction}"`]
11
+ const ACTIONS: Partial<Record<StreamMockState, string>> = {
12
+ consent: 'loading',
13
+ error: 'loading',
14
+ 'pip-placeholder': 'player',
15
+ };
16
+
17
+ const buttonAttributes = (state: StreamMockState, interaction: Interaction | undefined) =>
18
+ [
19
+ `data-et-control="action" data-et-action="${ACTIONS[state]}" data-can-animate`,
20
+ interaction && `data-et-force="${interaction}"`,
21
+ ]
13
22
  .filter(Boolean)
14
23
  .join(' ');
15
24
 
@@ -47,7 +56,7 @@ export default definePart({
47
56
  body: streamPlayerSlot({
48
57
  state: props.state,
49
58
  player: VIDEO,
50
- buttonAttributes: buttonAttributes(props.button),
59
+ buttonAttributes: buttonAttributes(props.state, props.button),
51
60
  }).replace('<et-spinner ', '<et-spinner data-et-skip="CLIPPED" '),
52
61
  styles: [streamStyles, frame].join('\n'),
53
62
  }),
@@ -1,6 +1,5 @@
1
1
  import { switchControl, type SwitchMockOptions, switchStyles } from '@ethlete/components/design/switch';
2
2
  import { definePart, drawing } from '@design-system';
3
- import offTrack from './switch.css?inline';
4
3
 
5
4
  type Interaction = 'hover' | 'focus-visible' | 'active';
6
5
 
@@ -28,6 +27,7 @@ const columns = ['rest', ...INTERACTIONS, 'disabled'] as const;
28
27
 
29
28
  export default definePart({
30
29
  note: 'The SDK switch, drawn by its mock from @ethlete/components/design: alone off, on and indeterminate in every interaction, and inside an et-choice-field with a label in each size and as a card. The label area skips CLIPPED: its 1.2 line height rounds the 12 and 16 px line box down by under a pixel, with no glyph cut.',
30
+ consumerAction: 'a form control whose value the consumer binds',
31
31
  madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
32
32
  states: {
33
33
  ...rowStates,
@@ -76,10 +76,16 @@ export default definePart({
76
76
  body: switchControl({
77
77
  ...options,
78
78
  color: 'brand',
79
- attributes: [options.attributes, 'data-et-control="switch"', interaction && `data-et-force="${interaction}"`]
79
+ attributes: [
80
+ options.attributes,
81
+ options.label === undefined && 'data-et-control="switch"',
82
+ interaction && `data-et-force="${interaction}"`,
83
+ ]
80
84
  .filter(Boolean)
81
85
  .join(' '),
82
- }).replace('class="et-choice-field-label-area', 'data-et-skip="CLIPPED" class="et-choice-field-label-area'),
83
- styles: [switchStyles, offTrack].join('\n'),
86
+ })
87
+ .replace('<et-choice-field ', '<et-choice-field data-et-control="switch" ')
88
+ .replace('class="et-choice-field-label-area', 'data-et-skip="CLIPPED" class="et-choice-field-label-area'),
89
+ styles: switchStyles,
84
90
  }),
85
91
  });