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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/design/sdk/components/accent-on-light/accent-on-light.ts +4 -0
  3. package/design/sdk/components/accordion/accordion.ts +11 -0
  4. package/design/sdk/components/action-sheet/action-sheet.ts +12 -0
  5. package/design/sdk/components/anchored-dialog/anchored-dialog.ts +9 -0
  6. package/design/sdk/components/avatar/avatar.ts +16 -0
  7. package/design/sdk/components/badge/badge.ts +12 -0
  8. package/design/sdk/components/banner/banner.ts +16 -0
  9. package/design/sdk/components/bracket/bracket.ts +16 -0
  10. package/design/sdk/components/breadcrumb/breadcrumb.ts +14 -0
  11. package/design/sdk/components/button/button.ts +112 -7
  12. package/design/sdk/components/calendar/calendar.ts +25 -0
  13. package/design/sdk/components/card/card.ts +9 -0
  14. package/design/sdk/components/carousel/carousel.ts +25 -0
  15. package/design/sdk/components/chart/chart.ts +23 -0
  16. package/design/sdk/components/checkbox/checkbox.ts +42 -1
  17. package/design/sdk/components/chip/chip.ts +46 -8
  18. package/design/sdk/components/copy-button/copy-button.ts +14 -0
  19. package/design/sdk/components/description-list/description-list.ts +10 -0
  20. package/design/sdk/components/dialog/dialog.ts +13 -0
  21. package/design/sdk/components/divider/divider.ts +5 -0
  22. package/design/sdk/components/empty-state/empty-state.ts +9 -0
  23. package/design/sdk/components/floating-action/floating-action.ts +14 -0
  24. package/design/sdk/components/form-field/form-field.ts +93 -0
  25. package/design/sdk/components/grid/grid.ts +12 -0
  26. package/design/sdk/components/input/input.ts +50 -0
  27. package/design/sdk/components/kbd/kbd.ts +12 -0
  28. package/design/sdk/components/loader/loader.ts +11 -0
  29. package/design/sdk/components/masonry/masonry.ts +7 -0
  30. package/design/sdk/components/match/match.ts +16 -0
  31. package/design/sdk/components/menu/menu.ts +16 -0
  32. package/design/sdk/components/notification/notification.ts +18 -0
  33. package/design/sdk/components/otp-input/otp-input.ts +21 -0
  34. package/design/sdk/components/pagination/pagination.ts +21 -0
  35. package/design/sdk/components/picture/picture.ts +15 -0
  36. package/design/sdk/components/progress-steps/progress-steps.ts +16 -0
  37. package/design/sdk/components/query-error/query-error.ts +22 -0
  38. package/design/sdk/components/radio-group/radio-group.ts +42 -1
  39. package/design/sdk/components/scheduler/scheduler.ts +12 -0
  40. package/design/sdk/components/scrollable/scrollable.ts +30 -0
  41. package/design/sdk/components/scrollbar/scrollbar.ts +15 -0
  42. package/design/sdk/components/select/select.ts +17 -0
  43. package/design/sdk/components/select-panel/select-panel.ts +18 -0
  44. package/design/sdk/components/skeleton/skeleton.ts +7 -0
  45. package/design/sdk/components/slider/slider.ts +34 -0
  46. package/design/sdk/components/standings/standings.ts +12 -0
  47. package/design/sdk/components/stat-tile/stat-tile.ts +12 -0
  48. package/design/sdk/components/stream/stream.ts +11 -0
  49. package/design/sdk/components/switch/switch.ts +22 -0
  50. package/design/sdk/components/table/table.ts +34 -0
  51. package/design/sdk/components/tabs/tabs.ts +21 -0
  52. package/design/sdk/components/textarea/textarea.ts +32 -0
  53. package/design/sdk/components/timeline/timeline.ts +11 -0
  54. package/design/sdk/components/toolbar/toolbar.ts +15 -0
  55. package/design/sdk/components/tooltip/tooltip.ts +11 -0
  56. package/design/sdk/components/tree/tree.ts +12 -0
  57. package/design/sdk/foundations/colors/colors.ts +22 -0
  58. package/design/sdk/foundations/elevation/elevation.ts +6 -0
  59. package/design/sdk/foundations/icons/icons.ts +6 -0
  60. package/design/sdk/ready.json +123 -11
  61. package/fesm2022/ethlete-components.mjs +435 -95
  62. package/fesm2022/ethlete-components.mjs.map +1 -1
  63. package/package.json +2 -2
  64. package/src/lib/accordion/accordion-group.component.css +1 -1
  65. package/src/lib/accordion/accordion.component.css +19 -5
  66. package/src/lib/bracket/bracket-default-section-title.component.css +14 -0
  67. package/src/lib/bracket/bracket.component.css +18 -0
  68. package/src/lib/button/button-properties-styles.component.css +46 -0
  69. package/src/lib/button/button.component.css +3 -2
  70. package/src/lib/button/fab.component.css +8 -2
  71. package/src/lib/button/icon-button.component.css +3 -3
  72. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +5 -4
  73. package/src/lib/icon/headless/icon-styles.component.css +1 -1
  74. package/src/lib/progress-steps/progress-step.component.css +12 -0
  75. package/src/lib/scrollable/scrollable.component.css +44 -0
  76. package/src/lib/table/table.component.css +5 -2
  77. package/src/lib/tabs/tab-bar-styles.component.css +8 -8
  78. package/src/lib/timeline/timeline-item.component.css +13 -1
  79. package/types/ethlete-components.d.ts +135 -11
@@ -108,6 +108,28 @@ export default definePart({
108
108
  'brand-retry-hover': { shape: 'retryable', color: 'brand', retry: 'hover' },
109
109
  'brand-retry-focus-visible': { shape: 'retryable', color: 'brand', retry: 'focus-visible' },
110
110
  },
111
+ describe: {
112
+ message: 'A 403 Forbidden with one message and no retry; check the danger title, status and message.',
113
+ violations: 'A 422 with three violation messages; check that each message shows as its own line.',
114
+ 'class-validator': 'A 400 with two class-validator messages; check that both show as separate lines.',
115
+ retryable: 'A 503 that can retry; check that the Retry button shows under the message.',
116
+ 'empty-body': 'A 500 with the fallback message; check that the generic text and code show.',
117
+ 'echoes-title': 'A 404 whose message echoes the title; check that the title and message both read cleanly.',
118
+ network: 'A network error with status 0 and Retry; check the connection message and the Retry button.',
119
+ 'always-allow-retry': 'The 404 with retry forced on; check that Retry shows though the error cannot retry.',
120
+ 'long-message':
121
+ 'A 409 with a long message and a long URL; check that the text wraps and the URL breaks in the box.',
122
+ 'custom-slots':
123
+ 'The 403 with custom Try again and Contact support actions; check that both show in place of Retry.',
124
+ 'retry-hover': 'The 503 with Retry hovered; check that only Retry takes the hover look.',
125
+ 'retry-active': 'The 503 with Retry pressed; check that the pressed look is deeper than hover.',
126
+ 'retry-focus-visible': 'The 503 with Retry focused by keyboard; check that the focus ring wraps Retry.',
127
+ 'slot-retry-focus-visible':
128
+ 'The custom Try again button focused; check that the focus ring wraps the slotted button.',
129
+ 'brand-color': 'The 503 in brand instead of danger; check that title and Retry take the brand color.',
130
+ 'brand-retry-hover': 'The brand 503 with Retry hovered; check that the hover look uses the brand color.',
131
+ 'brand-retry-focus-visible': 'The brand 503 with Retry focused; check that the focus ring uses the brand color.',
132
+ },
111
133
  widths: [480],
112
134
  controls: {
113
135
  retry: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -45,7 +45,7 @@ const gridStates = Object.fromEntries(
45
45
  (Object.keys(ROWS) as Row[]).flatMap((row) =>
46
46
  COLUMNS.map((column) => [stateOf(row, column), { group: cellOf(row, column) }]),
47
47
  ),
48
- ) as Record<string, Props>;
48
+ ) as Record<Row | `${Row}-${Exclude<Column, 'rest'>}`, Props>;
49
49
 
50
50
  const marked = (markup: string) =>
51
51
  markup.replace(/<et-radio(?=[\s>])/gu, (tag) => control(`${tag}>`, 'radio').slice(0, -1));
@@ -127,6 +127,47 @@ export default definePart({
127
127
  'card-focus-visible': { group: formatGroup(1, ['focus-visible']) },
128
128
  'card-checked-focus-visible': { group: formatGroup(0, ['focus-visible']) },
129
129
  },
130
+ describe: {
131
+ unchecked: 'One unchecked radio at rest; check that the empty circle border shows next to the label.',
132
+ 'unchecked-hover': 'The unchecked radio hovered; check that the circle border darkens.',
133
+ 'unchecked-focus-visible':
134
+ 'The unchecked radio focused by keyboard; check that the focus ring shows around the circle.',
135
+ 'unchecked-active': 'The unchecked radio pressed; check that the press look shows on the circle.',
136
+ 'unchecked-disabled': 'The unchecked radio disabled; check that circle and label fade.',
137
+ 'unchecked-readonly': 'The unchecked radio read-only; check that it draws like rest.',
138
+ checked: 'One checked radio at rest; check that the primary ring and dot show.',
139
+ 'checked-hover': 'The checked radio hovered; check that ring and dot shift visibly from rest.',
140
+ 'checked-focus-visible':
141
+ 'The checked radio focused by keyboard; check that the focus ring shows around the checked circle.',
142
+ 'checked-active': 'The checked radio pressed; check that ring and dot darken.',
143
+ 'checked-disabled': 'The checked radio disabled; check that ring, dot and label fade but stay recognisable.',
144
+ 'checked-readonly': 'The checked radio read-only; check that it draws like the checked rest.',
145
+ 'group-none':
146
+ 'The three-option Kick-off reminder group with nothing picked; check the group label and even option gaps.',
147
+ 'group-checked': 'The reminder group with One hour before picked; check that only the first option shows the dot.',
148
+ 'group-support':
149
+ 'A group with option descriptions and a hint; check that descriptions sit under labels and the hint below.',
150
+ 'group-option-hover': 'The group with Fifteen minutes before hovered; check that only that circle shows hover.',
151
+ 'group-option-pressed': 'The group with Fifteen minutes before pressed; check the press look on that circle.',
152
+ 'group-option-focus-visible':
153
+ 'The group with the second option picked and focused by keyboard; check the focus ring on its circle.',
154
+ 'group-mixed': 'The group in bulk edit with mixed values; check the dashed circles and the mixed hint.',
155
+ 'group-disabled': 'The whole group disabled; check that options fade and the group label stays.',
156
+ 'group-readonly': 'The whole group read-only; check that it draws like the checked group.',
157
+ invalid: 'The required group with nothing picked and an error; check the danger circles and error text.',
158
+ 'invalid-focus-visible':
159
+ 'The invalid group, nothing picked, second option focused; check that the focus ring takes the danger ink.',
160
+ 'invalid-checked': 'The invalid group with the second option picked; check that the error stays and the dot shows.',
161
+ 'group-horizontal':
162
+ 'The Show matches at group laid out in a row; check that options sit side by side with even gaps.',
163
+ 'card-rest': 'Two card options with descriptions, none picked; check the card borders and the radio at the end.',
164
+ 'card-checked': 'The Short card picked; check that its edge and ring take the checked color.',
165
+ 'card-hover': 'The Full card picked and the Short card hovered; check that only Short shows the hover look.',
166
+ 'card-focus-visible':
167
+ 'The Full card picked and Short focused by keyboard; check that the focus ring wraps the whole Short card.',
168
+ 'card-checked-focus-visible':
169
+ 'The checked Short card focused; check that focus and checked edge both stay visible.',
170
+ },
130
171
  grid: {
131
172
  columns: COLUMNS,
132
173
  rows: Object.fromEntries(
@@ -230,6 +230,18 @@ export default definePart({
230
230
  'month-cell-focus-visible': { view: 'month', cell: 'focus-visible' },
231
231
  agenda: { view: 'agenda' },
232
232
  },
233
+ describe: {
234
+ week: 'The week of March 2 with overlapping, all-day and selected appointments; check the now line on Wednesday and the gridlines.',
235
+ 'week-dragging': 'The week with Retro lifted half an hour; check that it shows the drag shadow and the new time.',
236
+ 'appointment-hover': "Monday's Daily sync hovered; check that only that appointment takes the hover tint.",
237
+ 'appointment-focus-visible': "Monday's Daily sync focused by keyboard; check that the focus ring wraps the block.",
238
+ 'slot-focus-visible': 'The Thursday 11:00 slot focused by keyboard; check that the ring marks one hour cell.',
239
+ day: 'Wednesday alone in the day view; check the today column, the now line at 11:15 and the selected Design review.',
240
+ month: 'March 2026 in the month grid; check the dim outside-month days, the today circle and the +3 more trigger.',
241
+ 'month-cell-focus-visible': 'The month with March 19 focused by keyboard; check that the ring wraps that one cell.',
242
+ agenda:
243
+ 'The agenda from Wednesday to Friday; check the month heading, nested rows with tree guides and the selection.',
244
+ },
233
245
  widths: [560, 800, 1200],
234
246
  frame: (body) => `<div class="t-frame">${body}</div>`,
235
247
  render: (props: Props) =>
@@ -124,6 +124,36 @@ export default definePart({
124
124
  ]),
125
125
  ) as Record<`item-size-${ItemSize}`, Props>),
126
126
  },
127
+ describe: {
128
+ 'horizontal-start': 'Eight items scrolled to the start; check that only the end shows a mask and a scroll button.',
129
+ 'horizontal-middle': 'The row scrolled to the middle; check that masks and buttons show at both ends.',
130
+ 'horizontal-end': 'The row scrolled to the end; check that only the start shows a mask and a scroll button.',
131
+ 'vertical-start': 'A vertical list at the start; check that only the bottom shows a mask and a button.',
132
+ 'vertical-middle': 'The vertical list in the middle; check that masks and buttons show at top and bottom.',
133
+ 'vertical-end': 'The vertical list at the end; check that only the top shows a mask and a button.',
134
+ 'button-hover': 'The middle row with the end button hovered; check that only the end button shows hover.',
135
+ 'button-active': 'The middle row with the end button pressed; check that the press look is deeper than hover.',
136
+ 'border-mask': 'The middle row with the border mask; check that edges show a border line instead of a gradient.',
137
+ 'vertical-border-mask': 'The vertical list with the border mask; check the border lines at top and bottom.',
138
+ 'navigation-start': 'The row at the start with navigation dots; check that the first dot is active.',
139
+ 'navigation-middle': 'The middle row with navigation dots; check that the dot of the most visible item is active.',
140
+ 'navigation-end': 'The row at the end with navigation dots; check that the last dot is active.',
141
+ 'vertical-navigation':
142
+ 'The vertical list with navigation; check that the dots run along the side and one is active.',
143
+ 'footer-buttons':
144
+ 'The middle row with buttons in the footer; check that buttons sit beside the dots, not over items.',
145
+ 'footer-button-hover': 'The footer end button hovered; check that only that footer button shows hover.',
146
+ 'danger-navigation': 'The middle row with navigation in danger; check that the active dot takes the danger color.',
147
+ darken: 'The middle row with darken on; check that partly visible items dim and whole ones stay full.',
148
+ 'item-focus-visible': 'Item 1 focused by keyboard; check that its focus ring is not cut by the container.',
149
+ 'short-content': 'Two items that fit; check that no mask, button or scroll shows.',
150
+ 'short-content-navigation': 'Two items that fit, with navigation on; check that no dots show when nothing scrolls.',
151
+ 'item-size-same': 'Two items at the same size; check that both share the width evenly with the gap.',
152
+ 'item-size-full': 'Items at full size; check that each item fills the viewport width.',
153
+ 'item-size-half': 'Items at half size; check that two items fill the viewport with one gap.',
154
+ 'item-size-third': 'Items at a third; check that three items fill the viewport with two gaps.',
155
+ 'item-size-quarter': 'Items at a quarter; check that four items fill the viewport with three gaps.',
156
+ },
127
157
  widths: [480],
128
158
  render: (props: Props) =>
129
159
  drawing({
@@ -114,6 +114,21 @@ export default definePart({
114
114
  dragging: { layout: 'vertical', scroll: 424, thumb: 'dragging' },
115
115
  'auto-hidden': { layout: 'vertical', visible: false },
116
116
  },
117
+ describe: {
118
+ vertical:
119
+ '24 rows at the top with a vertical bar; check that the thumb sits at the top of the track, inset from the edge.',
120
+ 'vertical-scrolled': 'The rows scrolled halfway; check that the thumb sits in the middle of the track.',
121
+ 'vertical-end': 'The rows scrolled to the end; check that the thumb meets the bottom inset.',
122
+ horizontal: '14 cards at the start with a horizontal bar; check that the thumb starts at the left inset.',
123
+ 'horizontal-scrolled': 'The cards scrolled 600px; check that the thumb moved along the track to match.',
124
+ 'both-axes': 'A grid scrolled on both axes; check that both bars show and do not overlap in the corner.',
125
+ rtl: 'The cards in right-to-left; check that the thumb starts at the right edge.',
126
+ 'short-content': 'Six rows scrolled slightly; check that the thumb is long, close to the track length.',
127
+ 'long-content': '200 rows scrolled deep; check that the thumb keeps its minimum size of 24px.',
128
+ 'thumb-hover': 'The halfway thumb hovered; check that the thumb darkens or grows.',
129
+ dragging: 'The halfway thumb being dragged; check that it shows the dragging look, stronger than hover.',
130
+ 'auto-hidden': 'The rows with the bar auto-hidden; check that no thumb or track shows.',
131
+ },
117
132
  widths: [480],
118
133
  frame: (body, props) => `<div class="scrollbar-frame"${props.layout === 'rtl' ? ' dir="rtl"' : ''}>${body}</div>`,
119
134
  render: (props: Props) =>
@@ -7,6 +7,23 @@ export default definePart<SelectProps>({
7
7
  note: 'scale of the decided shape, Q182, lead merge',
8
8
  madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
9
9
  states: { ...states, ...moreStates },
10
+ describe: {
11
+ placeholder:
12
+ 'A closed select with no value; check that the placeholder reads muted and the chevron sits at the end.',
13
+ 'placeholder-hover': 'The empty select hovered; check that the field border darkens.',
14
+ 'placeholder-active': 'The empty select pressed; check the press look on the field frame.',
15
+ 'placeholder-focus-visible': 'The empty select focused by keyboard; check that the focus ring wraps the field.',
16
+ selected: 'A closed select showing In review; check that the value uses full text color.',
17
+ 'selected-hover': 'The filled select hovered; check that the border darkens and the value stays in place.',
18
+ 'selected-active': 'The filled select pressed; check the press look on the field frame.',
19
+ 'selected-focus-visible': 'The filled select focused by keyboard; check that the focus ring wraps the field.',
20
+ disabled: 'The filled select disabled; check that field, value and chevron fade.',
21
+ open: 'The select open on In review with Merged active by keyboard; check the panel under the field and the marks.',
22
+ 'open-option-hover':
23
+ 'The open select with Drafts under the pointer; check that the pointer highlight shows on Drafts.',
24
+ 'size-sm': 'The filled select at size sm; check that field and text shrink together.',
25
+ 'size-lg': 'The filled select at size lg; check that field and text grow together.',
26
+ },
10
27
  grid,
11
28
  widths: [320],
12
29
  controls: {
@@ -111,6 +111,24 @@ export default definePart({
111
111
  'panel-grouped': { panel: true },
112
112
  'panel-all-selected': { panel: true, allSelected: true },
113
113
  },
114
+ describe: {
115
+ option: 'One unselected In review option in an open panel; check its padding and the empty check slot.',
116
+ 'option-hover': 'The option hovered; check that the row takes the pointer highlight.',
117
+ 'option-active': 'The option pressed; check that the pressed tint is deeper than hover.',
118
+ 'option-focus-visible': 'The option active by keyboard; check that the row shows the keyboard focus look.',
119
+ selected: 'One selected In review option; check that the check mark and selected color show.',
120
+ 'selected-hover': 'The selected option hovered; check that the highlight shows and the check stays visible.',
121
+ 'selected-active': 'The selected option pressed; check that the press look keeps the check readable.',
122
+ 'selected-focus-visible': 'The selected option active by keyboard; check that focus shows with the check mark.',
123
+ 'disabled-hover': 'The disabled option under the pointer; check that it gives no highlight.',
124
+ 'disabled-active': 'The disabled option pressed; check that it gives no press look.',
125
+ 'disabled-focus-visible': 'The disabled option reached by keyboard; check that it shows no focus look.',
126
+ disabled: 'One disabled In review option; check that the label fades and no highlight shows.',
127
+ 'panel-grouped':
128
+ 'A multi-select panel with Select all and two groups; check the group labels, the mixed Select all and Merged active.',
129
+ 'panel-all-selected':
130
+ 'The grouped panel with all selected; check that Select all is checked and disabled Archived stays off.',
131
+ },
114
132
  grid,
115
133
  widths: [280],
116
134
  controls: {
@@ -41,6 +41,13 @@ export default definePart({
41
41
  'in-text': { form: 'in-text', animated: true },
42
42
  static: { form: 'card', animated: false },
43
43
  },
44
+ describe: {
45
+ card: 'An animated card skeleton with avatar, two lines and an image block; check the shimmer and the rounded image.',
46
+ text: 'An animated text skeleton; check that the lines vary in length like a paragraph.',
47
+ shapes: 'A line, a block and circles at 24, 40 and 64px; check that each shape keeps its size and radius.',
48
+ 'in-text': 'A skeleton bar inside a sentence; check that it sits on the text line and is capped at 120px.',
49
+ static: 'The card skeleton without animation; check that no shimmer runs and the shapes match the animated card.',
50
+ },
44
51
  widths: [480],
45
52
  frame: (body) => `<div class="skeleton-frame">${body}</div>`,
46
53
  render: (props: Props) =>
@@ -63,6 +63,40 @@ export default definePart({
63
63
  field: { id: 'quality', label: 'Quality', value: 1, max: 2, marks: QUALITY, orientation: 'vertical' },
64
64
  },
65
65
  },
66
+ describe: {
67
+ min: 'Volume at 0; check that the thumb sits at the start, inside the host, and no fill shows.',
68
+ mid: 'Volume at 40; check that the fill runs from the start to the thumb.',
69
+ max: 'Volume at 100; check that the thumb sits at the end, inside the host, with a full fill.',
70
+ hover: 'The thumb hovered; check the hover look on the thumb.',
71
+ 'focus-visible': 'The thumb focused by keyboard; check that the focus ring wraps the thumb.',
72
+ active: 'The thumb pressed; check the press look on the thumb.',
73
+ dragging: 'The thumb being dragged; check the dragging look on thumb and host.',
74
+ 'value-label': 'Volume 40 with the value bubble; check that the bubble sits above the thumb clear of the label.',
75
+ 'value-label-max':
76
+ 'Volume 100 with the value bubble; check that the bubble clamps at the end and stays in the host.',
77
+ steps: 'Volume in steps of 10 with a hint; check that it looks like the plain slider with the hint below.',
78
+ marks: 'Volume in steps of 10 with ticks; check that a tick sits at every step and active ticks read on the fill.',
79
+ 'labelled-marks':
80
+ 'Quality with Low, Medium and High ticks; check that labels sit under their ticks and the ends clamp.',
81
+ hint: 'Volume with a hint; check that the hint sits under the track in muted text.',
82
+ required: 'The required volume with a hint; check that the required marker shows next to the label.',
83
+ invalid: 'Volume at 95 with an error; check that fill and thumb turn danger and the error text shows.',
84
+ 'invalid-focus-visible': 'The invalid slider focused; check that the focus ring takes the danger ink.',
85
+ disabled: 'The slider disabled; check that rail, fill, thumb and label fade.',
86
+ readonly: 'The slider read-only; check how it differs from the editable slider.',
87
+ 'readonly-focus-visible': 'The read-only slider focused by keyboard; check that a focus ring still shows.',
88
+ mixed: 'Volume in bulk edit with Different volumes; check the dashed rail and the mixed hint.',
89
+ 'no-label': 'A slider with no label; check that the track keeps its height without label space.',
90
+ range: 'A Price range from 20 to 80; check that two thumbs show and the fill runs between them.',
91
+ 'range-value-label': 'The range with value bubbles; check that both bubbles show and do not overlap.',
92
+ 'range-ends': 'The range at 0 and 100 with bubbles; check that both bubbles clamp inside the host.',
93
+ 'range-met': 'Both thumbs met at 50, the end one dragged; check that the thumbs stack cleanly.',
94
+ 'range-focus-visible': 'The range with the end thumb focused; check that only that thumb shows a focus ring.',
95
+ 'range-marks': 'The range 20 to 60 in steps of 20 with ticks; check the ticks and the hint below.',
96
+ vertical:
97
+ 'A vertical volume slider with a bubble; check that the fill runs bottom up and the bubble clears the label.',
98
+ 'vertical-marks': 'Vertical Quality with labelled ticks; check that labels take their own column inside the host.',
99
+ },
66
100
  widths: [320, 360, 640],
67
101
  frame: (body) => `<div class="t-frame">${body}</div>`,
68
102
  render: (props: Props) =>
@@ -121,6 +121,18 @@ export default definePart({
121
121
  'pick-dragging': { view: 'pick', dragging: true },
122
122
  'pick-locked': { view: 'pick', locked: true },
123
123
  },
124
+ describe: {
125
+ table:
126
+ 'Six teams with zones, a legend and Pinewood highlighted; check the zone marks, the form dots and the numbers align.',
127
+ 'table-plain': 'The six teams without zones, highlight or legend; check that rows read evenly with no zone marks.',
128
+ 'table-empty': 'The table with no rows; check that the header stays and the empty body does not collapse oddly.',
129
+ pick: 'The pick list of six teams with two advancing; check the cut line after the second card and the point marks.',
130
+ 'pick-card-hover': 'Harbor City hovered in the pick list; check that only that card shows the hover look.',
131
+ 'pick-card-focus-visible': 'Harbor City focused by keyboard; check that the focus ring wraps that card.',
132
+ 'pick-dragging':
133
+ 'Pinewood lifted and dragged up; check the drag shadow, the ghost slot and the shifted card below.',
134
+ 'pick-locked': 'The pick list locked; check that cards show no drag handle and read as fixed.',
135
+ },
124
136
  widths: [480, 800],
125
137
  frame: (body) => `<div class="t-frame">${body}</div>`,
126
138
  render: (props: Props) =>
@@ -75,6 +75,18 @@ export default definePart({
75
75
  'without-sparkline': { form: 'without-sparkline' },
76
76
  loading: { form: 'loading' },
77
77
  },
78
+ describe: {
79
+ default:
80
+ 'Weekly active users 25.2K, up 6.8% and good, with a sparkline; check that the delta reads positive and the line fits.',
81
+ 'up-bad': 'p95 latency 212 ms, up 18 and bad; check that the delta takes the danger color though it points up.',
82
+ 'down-good': 'Churn rate 3.4%, down 2.1% and good; check that the delta reads positive though it points down.',
83
+ 'down-unrated': 'Page views down 310 with no sentiment; check that the delta stays neutral in color.',
84
+ unchanged: 'Open tickets with a delta of 0; check that the neutral arrow and text show.',
85
+ unit: 'p95 latency 212 with the ms unit and no delta; check that the unit sits after the value, smaller.',
86
+ 'no-value': 'Weekly active users with no value; check that a placeholder holds the value line.',
87
+ 'without-sparkline': 'The default tile without a sparkline; check that the tile closes after the caption.',
88
+ loading: 'The default tile loading; check that skeletons replace value, delta and sparkline at the same size.',
89
+ },
78
90
  widths: [480],
79
91
  frame: (body) => `<div class="stat-tile-frame">${body}</div>`,
80
92
  render: ({ form }: Props) =>
@@ -26,6 +26,17 @@ export default definePart({
26
26
  'consent-active': { state: 'consent', button: 'active' },
27
27
  'consent-focus-visible': { state: 'consent', button: 'focus-visible' },
28
28
  },
29
+ describe: {
30
+ player: 'The stream slot holding the player; check that the video fills the slot at its ratio.',
31
+ consent: 'The consent screen before the player loads; check the message and the action button, centered.',
32
+ loading: 'The stream slot loading; check that the spinner sits centered in the slot.',
33
+ error: 'The stream slot after an error; check the error message, centered in the slot.',
34
+ 'pip-placeholder':
35
+ 'The placeholder while the stream plays picture-in-picture; check its message in the empty slot.',
36
+ 'consent-hover': 'The consent action hovered; check that only the button shows the hover look.',
37
+ 'consent-active': 'The consent action pressed; check that the press look is deeper than hover.',
38
+ 'consent-focus-visible': 'The consent action focused by keyboard; check that the focus ring wraps the button.',
39
+ },
29
40
  widths: [320, 480, 720],
30
41
  controls: {
31
42
  action: { kind: 'button', input: ['pointer', 'keyboard'] },
@@ -37,6 +37,28 @@ export default definePart({
37
37
  'card-off': { label: 'Weekly digest', variant: 'card' },
38
38
  'card-on': { label: 'Weekly digest', variant: 'card', checked: true },
39
39
  },
40
+ describe: {
41
+ off: 'The switch off; check that the off track has a visible edge and the handle sits at the start.',
42
+ 'off-hover': 'The off switch hovered; check that the track shows the hover look.',
43
+ 'off-focus-visible': 'The off switch focused by keyboard; check that the focus ring wraps the track.',
44
+ 'off-active': 'The off switch pressed; check the press look on the track and handle.',
45
+ 'off-disabled': 'The off switch disabled; check that track and handle fade.',
46
+ on: 'The switch on; check that the track fills with the brand color and the handle sits at the end.',
47
+ 'on-hover': 'The on switch hovered; check that the filled track shifts visibly.',
48
+ 'on-focus-visible': 'The on switch focused by keyboard; check that the focus ring wraps the filled track.',
49
+ 'on-active': 'The on switch pressed; check the press look on the filled track.',
50
+ 'on-disabled': 'The on switch disabled; check that it fades but still reads as on.',
51
+ indeterminate: 'The switch indeterminate; check that the handle sits in the middle.',
52
+ 'indeterminate-hover': 'The indeterminate switch hovered; check the hover look on the track.',
53
+ 'indeterminate-focus-visible': 'The indeterminate switch focused by keyboard; check that the focus ring shows.',
54
+ 'indeterminate-active': 'The indeterminate switch pressed; check the press look on the track.',
55
+ 'indeterminate-disabled': 'The indeterminate switch disabled; check that it fades and the handle stays centered.',
56
+ 'label-sm': 'An on switch with a label at size sm; check that switch and label shrink and stay aligned.',
57
+ 'label-md': 'An on switch with a label at size md; check that the label centers on the switch.',
58
+ 'label-lg': 'An on switch with a label at size lg; check that switch and label grow and stay aligned.',
59
+ 'card-off': 'The Weekly digest card with the switch off; check the card border and the switch inside.',
60
+ 'card-on': 'The Weekly digest card with the switch on; check that the card takes the checked look.',
61
+ },
40
62
  grid: {
41
63
  columns,
42
64
  rows: Object.fromEntries(
@@ -151,6 +151,40 @@ export default definePart({
151
151
  'density-lg': { density: 'lg' },
152
152
  'align-center': { center: true },
153
153
  },
154
+ describe: {
155
+ rest: 'Four players sorted by Player ascending; check the header row, the sort arrow and the numbers aligned at the end.',
156
+ 'sort-desc': 'The players sorted by Player descending; check that the sort arrow flips.',
157
+ 'header-hover': 'The Team header hovered; check that only the Team sort label shows hover.',
158
+ 'header-active': 'The Team header pressed; check that the press look is deeper than hover.',
159
+ 'header-focus-visible': 'The Team header focused by keyboard; check that the focus ring wraps its sort label.',
160
+ 'row-hover': 'An interactive table with the second row hovered; check that only that row tints.',
161
+ 'row-active': 'The second row pressed; check that the press tint is deeper than hover.',
162
+ 'cell-focus-visible': 'Cell navigation with the second Team cell focused; check that the ring wraps one cell.',
163
+ divided: 'The divided appearance; check that lines separate the rows.',
164
+ zebra: 'The zebra appearance; check that every other row takes a light stripe.',
165
+ grid: 'The grid appearance; check that lines separate both rows and columns.',
166
+ bare: 'The bare appearance; check that no row lines or stripes show.',
167
+ selection: 'A selection column with two rows selected; check the mixed header checkbox and the selected row tint.',
168
+ 'selection-hover':
169
+ 'The selection table with the selected second row hovered; check that hover and selection both read.',
170
+ expanded:
171
+ 'The second row expanded with its detail; check that the detail sits under the row and Pia has no expander.',
172
+ 'expander-hover': 'The second row expander hovered; check that only the expander button shows hover.',
173
+ 'expander-focus-visible': 'The second row expander focused by keyboard; check that the ring wraps the expander.',
174
+ 'group-header': 'A Season group over Goals and Assists; check that the group label spans its two columns.',
175
+ 'cell-error': 'A failed Goals cell in the second row; check that the dash shows with the danger error mark.',
176
+ empty: 'The table with the empty message; check that the message sits under the header.',
177
+ error: 'The table with the error message; check that it reads as an error under the header.',
178
+ loading: 'Four placeholder rows loading; check that skeleton bars fill the cells at varied widths.',
179
+ busy: 'The table busy at 40 %; check the progress indicator and that the rows stay readable.',
180
+ 'long-value': 'A long name in the second row; check that it truncates or wraps inside its column.',
181
+ 'wide-scroll': 'A seven-column table at its start; check that it scrolls sideways with a shadow at the end edge.',
182
+ 'sticky-column': 'The wide table scrolled; check that Player sticks at the start with shadows on both edges.',
183
+ 'sticky-header': 'Five rows scrolled under a sticky header; check that the header stays on top with its shadow.',
184
+ 'density-sm': 'The table at density sm; check that rows are tighter but cells stay readable.',
185
+ 'density-lg': 'The table at density lg; check that rows are roomier with the same columns.',
186
+ 'align-center': 'Goals and Assists centered; check that numbers and headers sit in the middle of their columns.',
187
+ },
154
188
  widths: [480],
155
189
  frame: (body) => `<div class="t-frame">${body}</div>`,
156
190
  render: (props: Props) =>
@@ -56,6 +56,27 @@ export default definePart({
56
56
  vertical: { tabs: TABS, orientation: 'vertical' },
57
57
  panel: { tabs: TABS, panel: '<p>Three open tasks, two of them due this week.</p>' },
58
58
  },
59
+ describe: {
60
+ tab: 'Overview selected, Activity at rest; check that Activity reads as a plain tab beside the underlined Overview.',
61
+ 'tab-hover': 'The unselected Activity tab hovered; check that only Activity shows the hover look.',
62
+ 'tab-active': 'The unselected Activity tab pressed; check that the press look is deeper than hover.',
63
+ 'tab-focus-visible': 'The unselected Activity tab focused by keyboard; check that the ring wraps Activity.',
64
+ selected: 'Activity selected; check that its underline and label color mark it on the baseline.',
65
+ 'selected-hover': 'The selected Activity tab hovered; check that it keeps its underline under hover.',
66
+ 'selected-active': 'The selected Activity tab pressed; check that the underline stays while pressed.',
67
+ 'selected-focus-visible': 'The selected Activity tab focused by keyboard; check that ring and underline both show.',
68
+ disabled: 'Four tabs with Billing disabled; check that Billing fades and the others stay full.',
69
+ sm: 'The tabs at size sm; check that triggers and text shrink together.',
70
+ lg: 'The tabs at size lg; check that triggers and text grow together.',
71
+ primary: 'The tabs in the primary variant; check the selected look differs from the default variant.',
72
+ icons: 'Tabs with an icon before each label; check that icons center on the labels.',
73
+ 'primary-icons': 'Icon tabs in the primary variant; check icon and label alignment in the selected tab.',
74
+ 'icon-only': 'Tabs showing only icons; check that each trigger keeps an even size and the selected underline.',
75
+ 'primary-icon-only': 'Icon-only tabs in the primary variant; check that the selected icon stands out.',
76
+ 'no-divider': 'The tabs without a divider; check that no baseline shows under the bar.',
77
+ vertical: 'The tabs stacked vertically; check that the selected marker sits on the side.',
78
+ panel: 'The tabs with a panel below; check the gap between bar and panel text.',
79
+ },
59
80
  grid,
60
81
  widths: [480],
61
82
  controls: {
@@ -53,6 +53,38 @@ export default definePart({
53
53
  'size-sm': message({ value: VALUE, size: 'sm' }),
54
54
  'size-lg': message({ value: VALUE, size: 'lg' }),
55
55
  },
56
+ describe: {
57
+ empty:
58
+ 'The Message textarea with no value or placeholder; check that the label sits above an empty, evenly padded box.',
59
+ placeholder: 'The empty textarea with its placeholder; check that the placeholder reads muted.',
60
+ filled: 'The textarea holding three lines; check that the box grows to fit them.',
61
+ hover: 'The empty textarea hovered; check that the border darkens without shifting the box.',
62
+ 'hover-filled': 'The filled textarea hovered; check that the border darkens and the text stays put.',
63
+ focus: 'The empty textarea focused by keyboard; check that the focus ring shows without resizing the box.',
64
+ 'focus-filled': 'The filled textarea focused by keyboard; check that the ring shows around the grown box.',
65
+ 'focus-hover': 'The filled textarea focused and hovered; check that the focus ring wins over hover.',
66
+ hint: 'The textarea with a hint; check that the hint sits under the box in muted text.',
67
+ description: 'The textarea with a description; check that it reads as help text apart from the box.',
68
+ required: 'The required textarea with a hint; check that the required mark shows next to the label.',
69
+ invalid: 'A required textarea with too little text; check that the border and error text use the danger color.',
70
+ 'invalid-hover': 'The invalid textarea hovered; check that the danger border stays.',
71
+ 'invalid-focus': 'The invalid textarea focused; check that the focus ring takes the danger color.',
72
+ disabled: 'The empty textarea disabled; check that box, label and placeholder fade.',
73
+ 'disabled-filled': 'The filled textarea disabled; check that the text fades but stays readable.',
74
+ readonly: 'The filled textarea read-only; check that it looks static and the text stays clear.',
75
+ 'readonly-focus': 'The read-only textarea focused by keyboard; check that a focus ring still shows.',
76
+ 'long-autosize': 'Eight lines with autosize; check that the box grows to show every line with no scrollbar.',
77
+ 'long-max-rows': 'Eight lines capped at four rows; check that the box stops at four rows and scrolls.',
78
+ 'long-max-rows-scrolled':
79
+ 'The capped textarea scrolled down; check that later lines show and the box keeps four rows.',
80
+ 'manual-resize': 'Three lines in a fixed four-row box; check the resize handle in the corner.',
81
+ 'manual-resize-overflow': 'Eight lines in a fixed four-row box; check that the text scrolls inside it.',
82
+ 'single-row': 'A one-row textarea with a placeholder; check that it starts at one line tall.',
83
+ mixed: 'The textarea in the mixed state; check that the Mixed values label shows instead of the text.',
84
+ 'no-label': 'A textarea without a label; check that the box keeps its padding with no label space.',
85
+ 'size-sm': 'The filled textarea at size sm; check that padding and text shrink together.',
86
+ 'size-lg': 'The filled textarea at size lg; check that padding and text grow together.',
87
+ },
56
88
  widths: [320, 360, 640],
57
89
  frame: (body, props) => `<div class="t-frame ${props.scrolled ? 't-scrolled' : ''}">${body}</div>`,
58
90
  render: (props: Props) =>
@@ -78,6 +78,17 @@ export default definePart({
78
78
  'long-content': { long: true, markers: true },
79
79
  single: { count: 1 },
80
80
  },
81
+ describe: {
82
+ default:
83
+ 'Four match events with times, labels and descriptions; check that dots line up on one rail with even gaps.',
84
+ 'with-markers': 'The events with icon markers in their theme colors; check that each icon centers on the rail.',
85
+ 'themed-dots': 'The events with plain dots in their theme colors; check that each dot takes its color.',
86
+ compact: 'The events with labels only; check that rows tighten and the rail stays continuous.',
87
+ 'compact-markers': 'The compact events with icon markers; check that markers fit the tighter rows.',
88
+ 'no-time': 'The events without times; check that the content shifts over and the rail stays aligned.',
89
+ 'long-content': 'A long label and a long URL in the second event; check that both wrap and nothing overflows.',
90
+ single: 'A single event; check that no rail runs past its dot.',
91
+ },
81
92
  widths: [480],
82
93
  render: (props: Props) =>
83
94
  drawing({
@@ -75,6 +75,21 @@ export default definePart({
75
75
  'size-lg': { size: 'lg' },
76
76
  'size-xl': { size: 'xl' },
77
77
  },
78
+ describe: {
79
+ default:
80
+ 'Seven format buttons in three groups with Bold and Bulleted pressed; check the dividers and the pressed fill.',
81
+ hover: 'Pressed Bold and unpressed Italic hovered; check that hover reads on both and Bold stays pressed.',
82
+ active: 'Pressed Bold and unpressed Italic pressed down; check that the press look is deeper than hover on both.',
83
+ 'focus-visible': 'The pressed Bold button focused by keyboard; check that the ring shows around the pressed fill.',
84
+ 'focus-visible-unpressed':
85
+ 'Italic as tab stop and focused by keyboard; check that the ring wraps the unpressed button.',
86
+ disabled: 'Italic disabled; check that only Italic fades.',
87
+ vertical: 'The toolbar stacked vertically; check that dividers turn horizontal between the groups.',
88
+ 'size-xs': 'The toolbar at size xs; check that buttons and icons shrink together.',
89
+ 'size-md': 'The toolbar at size md; check button and icon sizes against the default.',
90
+ 'size-lg': 'The toolbar at size lg; check that buttons and icons grow together.',
91
+ 'size-xl': 'The toolbar at size xl; check that it still fits the 528px frame.',
92
+ },
78
93
  widths: [528],
79
94
  controls: Object.fromEntries(
80
95
  BUTTONS.map(({ control }) => [control, { kind: 'button', input: ['pointer', 'keyboard'] }]),
@@ -20,6 +20,17 @@ export default definePart<TooltipMockOptions>({
20
20
  'bottom-start': { text: 'Copy the link to this board', placement: 'bottom-start' },
21
21
  'top-end': { text: 'Copy the link to this board', placement: 'top-end' },
22
22
  },
23
+ describe: {
24
+ short: 'The tooltip with Copy link; check the pane padding and the arrow.',
25
+ long: 'A long tooltip text; check that it wraps at the 34ch max width.',
26
+ template: 'Template content with a bold shortcut and a line; check the spacing between the two paragraphs.',
27
+ top: 'The tooltip placed on top; check that the arrow points down, centered.',
28
+ right: 'The tooltip placed on the right; check that the arrow points left, centered.',
29
+ bottom: 'The tooltip placed below; check that the arrow points up, centered.',
30
+ left: 'The tooltip placed on the left; check that the arrow points right, centered.',
31
+ 'bottom-start': 'The tooltip below at start; check that the arrow points up, 20px in from the start.',
32
+ 'top-end': 'The tooltip on top at end; check that the arrow points down, 20px in from the end.',
33
+ },
23
34
  render: (options: TooltipMockOptions) =>
24
35
  drawing({
25
36
  body: `<div class="sdk-tooltip-stage">${tooltip(options)}</div>`,
@@ -53,6 +53,18 @@ export default definePart({
53
53
  collapsed: { items: FILES },
54
54
  expanded: { items: FILES, expanded: ['src', 'src/app', 'docs'], value: 'src/app/app.config.ts' },
55
55
  },
56
+ describe: {
57
+ row: 'Three flat rows, none selected; check row padding and that notes.md looks like the others.',
58
+ 'row-hover': 'The notes.md row hovered; check that only that row tints.',
59
+ 'row-active': 'The notes.md row pressed; check that the press tint is deeper than hover.',
60
+ 'row-focus-visible': 'The notes.md row focused by keyboard; check that the focus ring wraps the row.',
61
+ selected: 'The notes.md row selected; check the selected tint on that row.',
62
+ 'selected-hover': 'The selected notes.md row hovered; check that hover and selection both read.',
63
+ 'selected-active': 'The selected notes.md row pressed; check that the selected tint stays readable.',
64
+ 'selected-focus-visible': 'The selected notes.md row focused by keyboard; check that ring and tint both show.',
65
+ collapsed: 'The file tree collapsed; check that folders show closed chevrons and files have none.',
66
+ expanded: 'src, app and docs open with app.config.ts selected; check the indent per level and the dim legacy.ts.',
67
+ },
56
68
  grid,
57
69
  widths: [320],
58
70
  controls: {
@@ -190,5 +190,27 @@ export default definePart<Props>({
190
190
  'contrast-light': { group: 'contrast', surface: 'light' },
191
191
  'contrast-dark': { group: 'contrast', surface: 'dark' },
192
192
  },
193
+ describe: {
194
+ 'surface-light':
195
+ 'The light surface tokens: background, text steps, border, interaction tints and shadow; check that the text steps stay apart and the tints read on the page.',
196
+ 'surface-dark':
197
+ 'The dark surface tokens: background, text steps, border, interaction tints and shadow; check that the text steps stay apart and the tints read on the page.',
198
+ 'brand-light':
199
+ 'The brand colour tokens on the light surface: primary, its ink and on-colour in each interaction step; check that the steps differ and the on-colour reads on the fill.',
200
+ 'brand-dark':
201
+ 'The brand colour tokens on the dark surface in each interaction step; check that the steps differ and the on-colour reads on the fill.',
202
+ 'danger-light':
203
+ 'The danger colour tokens on the light surface in each interaction step; check that the steps differ and the on-colour reads on the fill.',
204
+ 'danger-dark':
205
+ 'The danger colour tokens on the dark surface in each interaction step; check that the steps differ and the on-colour reads on the fill.',
206
+ 'warning-light':
207
+ 'The warning colour tokens on the light surface in each interaction step; check that the ink stays readable and the on-colour reads on the fill.',
208
+ 'warning-dark':
209
+ 'The warning colour tokens on the dark surface in each interaction step; check that the steps differ and the on-colour reads on the fill.',
210
+ 'contrast-light':
211
+ 'The AA contrast pairs of text and fills on the light surface; check that every pair shows its ratio and none falls under its threshold.',
212
+ 'contrast-dark':
213
+ 'The AA contrast pairs of text and fills on the dark surface; check that every pair shows its ratio and none falls under its threshold.',
214
+ },
193
215
  render,
194
216
  });
@@ -6,6 +6,12 @@ export default definePart<ElevationProps>({
6
6
  note: 'How the SDK lifts things off the base surface: a card, an elevated panel and an overlay pane (the select panel mock), side by side and as a pane over a panel. Fills come from the elevated surface tokens; no background colour differs from the product. In the dark scheme a 1 px ring in --et-surface-ring-solid (24 % --et-surface-color-solid over the fill) replaces the border colour. The token is defined here; the generator does not emit it yet.',
7
7
  madeBy: ['claude-opus-5-5'],
8
8
  states: ELEVATION_STATES,
9
+ describe: {
10
+ overview:
11
+ 'A card, an elevated panel and an overlay pane side by side; check that each lifts off the base surface and the dark scheme shows the 1 px ring.',
12
+ stacked:
13
+ 'An overlay pane over an elevated panel; check that the pane stays apart from the panel under it in both schemes.',
14
+ },
9
15
  render: (props: ElevationProps) =>
10
16
  elevationScene(props, { card: 'sdk-ring', panel: 'sdk-ring', pane: 'sdk-ring' }, edge),
11
17
  });