@ethlete/components 1.0.0-next.88 → 1.0.0-next.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/design/sdk/components/accent-on-light/accent-on-light.ts +5 -0
- package/design/sdk/components/accordion/accordion.ts +11 -0
- package/design/sdk/components/action-sheet/action-sheet.ts +37 -1
- package/design/sdk/components/anchored-dialog/anchored-dialog.css +2 -5
- package/design/sdk/components/anchored-dialog/anchored-dialog.ts +22 -8
- package/design/sdk/components/avatar/avatar.ts +16 -0
- package/design/sdk/components/badge/badge.css +18 -0
- package/design/sdk/components/badge/badge.ts +39 -3
- package/design/sdk/components/banner/banner.ts +48 -1
- package/design/sdk/components/bracket/bracket.ts +17 -0
- package/design/sdk/components/breadcrumb/breadcrumb.ts +15 -1
- package/design/sdk/components/button/button.ts +106 -3
- package/design/sdk/components/calendar/calendar.ts +56 -4
- package/design/sdk/components/card/card.ts +50 -1
- package/design/sdk/components/carousel/carousel.ts +60 -5
- package/design/sdk/components/chart/chart.ts +31 -2
- package/design/sdk/components/checkbox/checkbox.ts +53 -3
- package/design/sdk/components/chip/chip.ts +39 -8
- package/design/sdk/components/copy-button/copy-button.ts +18 -1
- package/design/sdk/components/description-list/description-list.ts +10 -0
- package/design/sdk/components/dialog/dialog.ts +71 -1
- package/design/sdk/components/divider/divider.ts +5 -0
- package/design/sdk/components/empty-state/empty-state.ts +10 -0
- package/design/sdk/components/floating-action/floating-action.ts +15 -0
- package/design/sdk/components/form-field/form-field.ts +102 -16
- package/design/sdk/components/grid/grid.ts +16 -1
- package/design/sdk/components/input/input.ts +50 -0
- package/design/sdk/components/kbd/kbd.ts +12 -0
- package/design/sdk/components/loader/loader.ts +11 -0
- package/design/sdk/components/masonry/masonry.ts +7 -0
- package/design/sdk/components/match/match.ts +17 -0
- package/design/sdk/components/menu/menu.ts +17 -0
- package/design/sdk/components/notification/notification.ts +19 -0
- package/design/sdk/components/otp-input/otp-input.ts +21 -0
- package/design/sdk/components/pagination/pagination.ts +22 -1
- package/design/sdk/components/picture/picture.ts +15 -0
- package/design/sdk/components/progress-steps/progress-steps.ts +17 -0
- package/design/sdk/components/query-error/query-error.ts +26 -1
- package/design/sdk/components/radio-group/radio-group.ts +43 -1
- package/design/sdk/components/scheduler/scheduler.ts +34 -1
- package/design/sdk/components/scrollable/scrollable.ts +58 -2
- package/design/sdk/components/scrollbar/scrollbar.css +1 -1
- package/design/sdk/components/scrollbar/scrollbar.ts +28 -0
- package/design/sdk/components/select/select.ts +26 -0
- package/design/sdk/components/select/shared/select-part.ts +4 -12
- package/design/sdk/components/select-panel/select-panel.ts +19 -0
- package/design/sdk/components/skeleton/skeleton.ts +7 -0
- package/design/sdk/components/slider/slider.ts +34 -0
- package/design/sdk/components/standings/standings.ts +16 -1
- package/design/sdk/components/stat-tile/stat-tile.ts +12 -0
- package/design/sdk/components/stream/stream.ts +23 -3
- package/design/sdk/components/switch/switch.ts +32 -4
- package/design/sdk/components/table/table.ts +128 -12
- package/design/sdk/components/tabs/tabs.ts +22 -1
- package/design/sdk/components/textarea/textarea.ts +63 -2
- package/design/sdk/components/timeline/timeline.ts +11 -0
- package/design/sdk/components/toolbar/toolbar.ts +16 -0
- package/design/sdk/components/tooltip/tooltip.ts +11 -0
- package/design/sdk/components/tree/tree.ts +20 -1
- package/design/sdk/foundations/colors/colors.ts +22 -0
- package/design/sdk/foundations/elevation/elevation.ts +7 -0
- package/design/sdk/foundations/icons/icons.ts +6 -0
- package/design/sdk/ready.json +334 -87
- package/design/sdk/rule-baseline.json +48 -0
- package/design/table.ts +11 -4
- package/design/tooltip.ts +7 -1
- package/fesm2022/ethlete-components.mjs +528 -103
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/accordion/accordion-group.component.css +1 -1
- package/src/lib/accordion/accordion.component.css +19 -5
- package/src/lib/bracket/bracket.component.css +4 -1
- package/src/lib/button/button-properties-styles.component.css +46 -0
- package/src/lib/button/button.component.css +3 -2
- package/src/lib/button/fab.component.css +8 -2
- package/src/lib/button/icon-button.component.css +3 -3
- package/src/lib/forms/choice-field/choice-field.component.css +4 -2
- package/src/lib/forms/dropzone/dropzone-crop.component.css +21 -0
- package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +5 -4
- package/src/lib/forms/select/select-option-styles.component.css +1 -0
- package/src/lib/match/match-card.component.css +8 -2
- package/src/lib/match/match-participant.component.css +21 -1
- package/src/lib/progress-steps/progress-step.component.css +12 -0
- package/src/lib/stream/consent/stream-consent.component.css +1 -0
- package/src/lib/stream/error/stream-player-error.component.css +1 -0
- package/src/lib/stream/stream-overlay-card-styles.component.css +9 -3
- package/src/lib/table/table.component.css +6 -2
- package/src/lib/tabs/tab-bar-styles.component.css +8 -8
- package/src/lib/timeline/timeline-item.component.css +13 -1
- package/types/ethlete-components.d.ts +136 -13
- package/design/sdk/components/switch/switch.css +0 -37
|
@@ -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' },
|
|
@@ -44,6 +45,15 @@ export default definePart({
|
|
|
44
45
|
'action-active': { form: 'default', action: 'active' },
|
|
45
46
|
'action-focus-visible': { form: 'default', action: 'focus-visible' },
|
|
46
47
|
},
|
|
48
|
+
describe: {
|
|
49
|
+
default: 'No results with icon, text and Clear filters; check that everything sits centred.',
|
|
50
|
+
'without-action': 'No results without an action; check the spacing under the text.',
|
|
51
|
+
errored: 'Something went wrong with the triangle icon and Try again; check the icon and the action.',
|
|
52
|
+
'heading-only': 'Nothing here yet without icon or text; check that the heading stands alone, centred.',
|
|
53
|
+
'action-hover': 'Clear filters hovered; check its hover look.',
|
|
54
|
+
'action-active': 'Clear filters pressed; check that the press goes past hover.',
|
|
55
|
+
'action-focus-visible': 'Clear filters with keyboard focus; check the focus ring around it.',
|
|
56
|
+
},
|
|
47
57
|
widths: [480],
|
|
48
58
|
controls: {
|
|
49
59
|
action: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
@@ -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: {},
|
|
@@ -54,6 +55,20 @@ export default definePart({
|
|
|
54
55
|
'floating-over-row': { state: 'floating', overRow: true },
|
|
55
56
|
hidden: { state: 'hidden' },
|
|
56
57
|
},
|
|
58
|
+
describe: {
|
|
59
|
+
inline: 'Filter (2) inline above the results at the top of the page; check that it sits in the flow.',
|
|
60
|
+
floating: 'Scrolled into the results, Filter (2) floats at the bottom end; check its inset and shadow.',
|
|
61
|
+
'floating-hover': 'The floating trigger hovered; check its hover look.',
|
|
62
|
+
'floating-active': 'The floating trigger pressed; check that the press goes past hover.',
|
|
63
|
+
'floating-focus-visible': 'The floating trigger with keyboard focus; check the focus ring around it.',
|
|
64
|
+
'inline-focus-visible': 'The inline trigger with keyboard focus; check the focus ring in the flow.',
|
|
65
|
+
'floating-icon': 'The floating trigger with a filter icon; check the icon and the wider trigger.',
|
|
66
|
+
'floating-inset': 'The floating trigger at a 12 px inset; check that it moves closer to the corner.',
|
|
67
|
+
'floating-danger': 'The floating trigger in the danger colour; check that the label reads on the fill.',
|
|
68
|
+
'floating-danger-hover': 'The danger trigger hovered; check its hover step.',
|
|
69
|
+
'floating-over-row': 'The floating trigger over a result row; check that it stays readable over the row.',
|
|
70
|
+
hidden: 'Scrolled past the results; check that the trigger is gone.',
|
|
71
|
+
},
|
|
57
72
|
widths: [480],
|
|
58
73
|
render: (props: Props) =>
|
|
59
74
|
drawing({
|
|
@@ -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
|
|
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);
|
|
@@ -95,6 +88,99 @@ export default definePart<Props>({
|
|
|
95
88
|
'textarea-disabled': { control: 'textarea', value: multiLine, disabled: true },
|
|
96
89
|
},
|
|
97
90
|
grid,
|
|
91
|
+
describe: {
|
|
92
|
+
empty: 'The empty Name input with a hint; check the label, the empty field and the hint.',
|
|
93
|
+
'empty-hover': 'The empty Name input with a hint, hovered; check that the field edge changes from rest.',
|
|
94
|
+
'empty-focus-visible':
|
|
95
|
+
'The empty Name input with a hint, with keyboard focus; check the focus edge in the primary colour.',
|
|
96
|
+
filled: 'The Name input with Ada Lovelace; check the value inside the field.',
|
|
97
|
+
'filled-hover': 'The Name input with Ada Lovelace, hovered; check that the field edge changes from rest.',
|
|
98
|
+
'filled-focus-visible':
|
|
99
|
+
'The Name input with Ada Lovelace, with keyboard focus; check the focus edge in the primary colour.',
|
|
100
|
+
error: 'The empty Name input with an error; check the danger edge and the error under it.',
|
|
101
|
+
'error-hover': 'The empty Name input with an error, hovered; check that the field edge changes from rest.',
|
|
102
|
+
'error-focus-visible':
|
|
103
|
+
'The empty Name input with an error, with keyboard focus; check the focus edge in the primary colour.',
|
|
104
|
+
'textarea-empty': 'The empty Name textarea with a hint; check the taller field and the hint.',
|
|
105
|
+
'textarea-empty-hover':
|
|
106
|
+
'The empty Name textarea with a hint, hovered; check that the field edge changes from rest.',
|
|
107
|
+
'textarea-empty-focus-visible':
|
|
108
|
+
'The empty Name textarea with a hint, with keyboard focus; check the focus edge in the primary colour.',
|
|
109
|
+
'textarea-filled': 'The Name textarea with two lines; check that both lines show inside the field.',
|
|
110
|
+
'textarea-filled-hover': 'The Name textarea with two lines, hovered; check that the field edge changes from rest.',
|
|
111
|
+
'textarea-filled-focus-visible':
|
|
112
|
+
'The Name textarea with two lines, with keyboard focus; check the focus edge in the primary colour.',
|
|
113
|
+
'textarea-error': 'The empty Name textarea with an error; check the danger edge and the error under it.',
|
|
114
|
+
'textarea-error-hover':
|
|
115
|
+
'The empty Name textarea with an error, hovered; check that the field edge changes from rest.',
|
|
116
|
+
'textarea-error-focus-visible':
|
|
117
|
+
'The empty Name textarea with an error, with keyboard focus; check the focus edge in the primary colour.',
|
|
118
|
+
'appearance-box':
|
|
119
|
+
'The filled Name input with appearance box; check how appearance box draws the field and its label.',
|
|
120
|
+
'appearance-box-hover':
|
|
121
|
+
'The filled Name input with appearance box, hovered; check that the field edge changes from rest.',
|
|
122
|
+
'appearance-box-focus-visible':
|
|
123
|
+
'The filled Name input with appearance box, with keyboard focus; check the focus edge in the primary colour.',
|
|
124
|
+
'appearance-underline':
|
|
125
|
+
'The filled Name input with appearance underline; check how appearance underline draws the field and its label.',
|
|
126
|
+
'appearance-underline-hover':
|
|
127
|
+
'The filled Name input with appearance underline, hovered; check that the field edge changes from rest.',
|
|
128
|
+
'appearance-underline-focus-visible':
|
|
129
|
+
'The filled Name input with appearance underline, with keyboard focus; check the focus edge in the primary colour.',
|
|
130
|
+
'fill-transparent':
|
|
131
|
+
'The filled Name input with fill transparent; check how fill transparent draws the field and its label.',
|
|
132
|
+
'fill-transparent-hover':
|
|
133
|
+
'The filled Name input with fill transparent, hovered; check that the field edge changes from rest.',
|
|
134
|
+
'fill-transparent-focus-visible':
|
|
135
|
+
'The filled Name input with fill transparent, with keyboard focus; check the focus edge in the primary colour.',
|
|
136
|
+
'fill-filled': 'The filled Name input with fill filled; check how fill filled draws the field and its label.',
|
|
137
|
+
'fill-filled-hover':
|
|
138
|
+
'The filled Name input with fill filled, hovered; check that the field edge changes from rest.',
|
|
139
|
+
'fill-filled-focus-visible':
|
|
140
|
+
'The filled Name input with fill filled, with keyboard focus; check the focus edge in the primary colour.',
|
|
141
|
+
'labelMode-static':
|
|
142
|
+
'The filled Name input with labelMode static; check how labelMode static draws the field and its label.',
|
|
143
|
+
'labelMode-static-hover':
|
|
144
|
+
'The filled Name input with labelMode static, hovered; check that the field edge changes from rest.',
|
|
145
|
+
'labelMode-static-focus-visible':
|
|
146
|
+
'The filled Name input with labelMode static, with keyboard focus; check the focus edge in the primary colour.',
|
|
147
|
+
'labelMode-inline':
|
|
148
|
+
'The filled Name input with labelMode inline; check how labelMode inline draws the field and its label.',
|
|
149
|
+
'labelMode-inline-hover':
|
|
150
|
+
'The filled Name input with labelMode inline, hovered; check that the field edge changes from rest.',
|
|
151
|
+
'labelMode-inline-focus-visible':
|
|
152
|
+
'The filled Name input with labelMode inline, with keyboard focus; check the focus edge in the primary colour.',
|
|
153
|
+
'labelMode-floating-inside':
|
|
154
|
+
'The filled Name input with labelMode floating-inside; check how labelMode floating-inside draws the field and its label.',
|
|
155
|
+
'labelMode-floating-inside-hover':
|
|
156
|
+
'The filled Name input with labelMode floating-inside, hovered; check that the field edge changes from rest.',
|
|
157
|
+
'labelMode-floating-inside-focus-visible':
|
|
158
|
+
'The filled Name input with labelMode floating-inside, with keyboard focus; check the focus edge in the primary colour.',
|
|
159
|
+
'labelMode-floating-outside':
|
|
160
|
+
'The filled Name input with labelMode floating-outside; check how labelMode floating-outside draws the field and its label.',
|
|
161
|
+
'labelMode-floating-outside-hover':
|
|
162
|
+
'The filled Name input with labelMode floating-outside, hovered; check that the field edge changes from rest.',
|
|
163
|
+
'labelMode-floating-outside-focus-visible':
|
|
164
|
+
'The filled Name input with labelMode floating-outside, with keyboard focus; check the focus edge in the primary colour.',
|
|
165
|
+
'size-sm': 'The filled Name input with size sm; check how size sm draws the field and its label.',
|
|
166
|
+
'size-sm-hover': 'The filled Name input with size sm, hovered; check that the field edge changes from rest.',
|
|
167
|
+
'size-sm-focus-visible':
|
|
168
|
+
'The filled Name input with size sm, with keyboard focus; check the focus edge in the primary colour.',
|
|
169
|
+
'size-md': 'The filled Name input with size md; check how size md draws the field and its label.',
|
|
170
|
+
'size-md-hover': 'The filled Name input with size md, hovered; check that the field edge changes from rest.',
|
|
171
|
+
'size-md-focus-visible':
|
|
172
|
+
'The filled Name input with size md, with keyboard focus; check the focus edge in the primary colour.',
|
|
173
|
+
'size-lg': 'The filled Name input with size lg; check how size lg draws the field and its label.',
|
|
174
|
+
'size-lg-hover': 'The filled Name input with size lg, hovered; check that the field edge changes from rest.',
|
|
175
|
+
'size-lg-focus-visible':
|
|
176
|
+
'The filled Name input with size lg, with keyboard focus; check the focus edge in the primary colour.',
|
|
177
|
+
'text-align-center': 'The value centred in the field; check that it sits centred.',
|
|
178
|
+
'text-align-end': 'The value aligned to the end; check that it sits at the end.',
|
|
179
|
+
focused: 'The input focused with Ada; check the focus edge and the caret after the value.',
|
|
180
|
+
disabled: 'The disabled input with Ada Lovelace; check that field and label fade.',
|
|
181
|
+
'textarea-focused': 'The textarea focused with Ada; check the focus edge around the taller field.',
|
|
182
|
+
'textarea-disabled': 'The disabled textarea with two lines; check that field, value and label fade.',
|
|
183
|
+
},
|
|
98
184
|
widths: [320],
|
|
99
185
|
controls: {
|
|
100
186
|
input: { kind: 'field', input: ['pointer', 'keyboard'], disabled: true },
|
|
@@ -67,6 +67,18 @@ export default definePart({
|
|
|
67
67
|
resizing: { layout: 'spans', resize: true },
|
|
68
68
|
'long-title': { layout: 'spans', actions: true, longTitle: true },
|
|
69
69
|
},
|
|
70
|
+
describe: {
|
|
71
|
+
rest: 'Four equal tiles in a 4-column grid; check the gaps and the title and subtitle in each tile.',
|
|
72
|
+
spans: 'Five tiles with column and row spans; check that Visitors spans two rows and Activity the full width.',
|
|
73
|
+
'item-hover': 'The Visitors tile hovered; check its hover look.',
|
|
74
|
+
'item-focus-visible': 'The Visitors tile with keyboard focus; check the focus ring around the tile.',
|
|
75
|
+
actions: 'The tiles with their remove actions; check that each action sits in the tile corner.',
|
|
76
|
+
'action-hover': 'The Revenue remove action hovered; check its hover tint.',
|
|
77
|
+
'action-focus-visible': 'The Revenue remove action with keyboard focus; check the focus ring around it.',
|
|
78
|
+
dragging: 'Orders dragged off its cell with the ghost behind; check the lifted tile and the ghost cell.',
|
|
79
|
+
resizing: 'Activity resized to two rows from its bottom edge; check the active edge and the new size.',
|
|
80
|
+
'long-title': 'Revenue with a long title and its action; check that the title is cut before the action.',
|
|
81
|
+
},
|
|
70
82
|
widths: [480],
|
|
71
83
|
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
72
84
|
render: (props: Props) =>
|
|
@@ -75,7 +87,10 @@ export default definePart({
|
|
|
75
87
|
items: itemsOf(props),
|
|
76
88
|
actions: props.actions,
|
|
77
89
|
ghost: props.drag ? { col: 1, row: 1, colSpan: 1, rowSpan: 1 } : undefined,
|
|
78
|
-
})
|
|
90
|
+
}).replaceAll(
|
|
91
|
+
'class="et-grid-item-default-actions__remove',
|
|
92
|
+
'data-et-action="emit:remove" class="et-grid-item-default-actions__remove',
|
|
93
|
+
),
|
|
79
94
|
styles: [gridStyles, frame].join('\n'),
|
|
80
95
|
}),
|
|
81
96
|
});
|
|
@@ -70,6 +70,56 @@ export default definePart({
|
|
|
70
70
|
'size-lg': email({ value: VALUE, size: 'lg' }),
|
|
71
71
|
'align-center': email({ value: VALUE, textAlign: 'center' }),
|
|
72
72
|
},
|
|
73
|
+
describe: {
|
|
74
|
+
empty:
|
|
75
|
+
'The Email field with no value and no placeholder; check that the label sits above an empty, evenly padded box.',
|
|
76
|
+
placeholder:
|
|
77
|
+
'The empty Email field with its placeholder; check that the placeholder reads muted against a typed value.',
|
|
78
|
+
filled:
|
|
79
|
+
'The Email field holding an address; check that the value uses full text color and stays vertically centered.',
|
|
80
|
+
hover: 'The empty Email field under hover; check that the border darkens without shifting the box.',
|
|
81
|
+
'hover-filled': 'The filled Email field under hover; check that the border darkens and the value does not move.',
|
|
82
|
+
focus:
|
|
83
|
+
'The empty Email field with keyboard focus; check that the focus ring shows around the box without resizing it.',
|
|
84
|
+
'focus-filled':
|
|
85
|
+
'The filled Email field with keyboard focus; check that the focus ring shows and the value stays in place.',
|
|
86
|
+
'focus-hover': 'The filled Email field focused and hovered; check that the focus ring wins over the hover border.',
|
|
87
|
+
hint: 'The Email field with a hint below; check that the hint sits under the box in muted, smaller text.',
|
|
88
|
+
description:
|
|
89
|
+
'The Email field with a description; check that the description reads as help text near the label, apart from the box.',
|
|
90
|
+
required: 'The required Email field with a hint; check that the required mark shows next to the label.',
|
|
91
|
+
invalid:
|
|
92
|
+
'A required field with a broken address and an error; check that the border and error text use the danger color.',
|
|
93
|
+
'invalid-hover':
|
|
94
|
+
'The invalid field under hover; check that the danger border stays and does not fall back to neutral.',
|
|
95
|
+
'invalid-focus': 'The invalid field with keyboard focus; check that the focus ring takes the danger color.',
|
|
96
|
+
'invalid-focus-hover':
|
|
97
|
+
'The invalid field focused and hovered; check that the danger focus ring still wins over hover.',
|
|
98
|
+
disabled: 'The empty Email field disabled; check that box, label and placeholder fade and no hover shows.',
|
|
99
|
+
'disabled-filled': 'The filled Email field disabled; check that the value fades with the box but stays readable.',
|
|
100
|
+
readonly:
|
|
101
|
+
'The filled Email field read-only; check that it looks static, unlike the editable box, but the value stays clear.',
|
|
102
|
+
'readonly-hover': 'The read-only field under hover; check that hover gives no edit cue.',
|
|
103
|
+
'readonly-focus':
|
|
104
|
+
'The read-only field with keyboard focus; check that a focus ring still shows for keyboard users.',
|
|
105
|
+
long: 'The Email field holding a very long address; check that the value clips inside the box and never widens it.',
|
|
106
|
+
'icon-affixes':
|
|
107
|
+
'The API key field with a lock and a check icon; check that both icons sit inside the box, centered on the text.',
|
|
108
|
+
'text-affixes':
|
|
109
|
+
'The Website field with https:// and .de affixes; check that the affixes read muted and frame the value.',
|
|
110
|
+
'text-prefix': 'The Price field with a € prefix; check that the prefix sits before the value with a steady gap.',
|
|
111
|
+
search:
|
|
112
|
+
'A search-type field with a query; check that it looks like the other fields, without a stray browser clear icon.',
|
|
113
|
+
password: 'A password field; check that the value shows as masked dots at the same height as text.',
|
|
114
|
+
'align-end':
|
|
115
|
+
'The Amount field aligned to the end with an EUR suffix; check that the value hugs the suffix on the right.',
|
|
116
|
+
mixed: 'The Title field in the mixed state; check that the Mixed values label shows instead of a single value.',
|
|
117
|
+
'no-label':
|
|
118
|
+
'A field without a label, with a lock icon and placeholder; check that the box keeps its height with no label space.',
|
|
119
|
+
'size-sm': 'The filled Email field at size sm; check that the box and text shrink together and stay centered.',
|
|
120
|
+
'size-lg': 'The filled Email field at size lg; check that the box and text grow together and stay centered.',
|
|
121
|
+
'align-center': 'The filled Email field with centered text; check that the value sits in the middle of the box.',
|
|
122
|
+
},
|
|
73
123
|
widths: [320, 360, 640],
|
|
74
124
|
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
75
125
|
render: (props: Props) =>
|
|
@@ -48,6 +48,18 @@ export default definePart({
|
|
|
48
48
|
'shortcut-list-apple': { form: 'shortcut-list', platform: 'apple' },
|
|
49
49
|
'shortcut-list-other': { form: 'shortcut-list', platform: 'other' },
|
|
50
50
|
},
|
|
51
|
+
describe: {
|
|
52
|
+
single: 'A single Esc key cap; check that the cap has its border, padding and baseline shadow.',
|
|
53
|
+
'combo-apple': 'The ⌘ K combination on Apple; check that both caps sit side by side with an even gap.',
|
|
54
|
+
'combo-other':
|
|
55
|
+
'The Ctrl K combination on other platforms; check that the wider Ctrl cap keeps the same height as K.',
|
|
56
|
+
'in-text':
|
|
57
|
+
'Key caps inside a sentence; check that the caps align to the text baseline without stretching the line.',
|
|
58
|
+
'shortcut-list-apple':
|
|
59
|
+
'A list of shortcuts with Apple symbols; check that labels sit left, key caps right, and rows align.',
|
|
60
|
+
'shortcut-list-other':
|
|
61
|
+
'A list of shortcuts with Ctrl, Shift and Alt; check that the longer key names still align on the right.',
|
|
62
|
+
},
|
|
51
63
|
widths: [480],
|
|
52
64
|
frame: (body) => `<div class="kbd-frame">${body}</div>`,
|
|
53
65
|
render: (props: Props) =>
|
|
@@ -58,6 +58,17 @@ export default definePart({
|
|
|
58
58
|
'progress-bar-themed': { form: 'progress-bar-themed' },
|
|
59
59
|
'brand-loader': { form: 'brand-loader' },
|
|
60
60
|
},
|
|
61
|
+
describe: {
|
|
62
|
+
spinner:
|
|
63
|
+
'Indeterminate spinners in three sizes, with and without a track; check that stroke widths scale and tracks show.',
|
|
64
|
+
'spinner-determinate':
|
|
65
|
+
'Determinate spinners at 0, 65 and 100 percent; check that the arc length matches each value.',
|
|
66
|
+
'spinner-themed': 'Spinners in brand, danger and warning; check that each arc and track takes its theme color.',
|
|
67
|
+
'progress-bar': 'Progress bars at 42 and 100 percent and indeterminate; check that the fill matches each value.',
|
|
68
|
+
'progress-bar-themed':
|
|
69
|
+
'Progress bars in brand, danger and warning; check that each fill and track takes its theme color.',
|
|
70
|
+
'brand-loader': 'The brand loader; check that the mark shows whole and centered in the frame.',
|
|
71
|
+
},
|
|
61
72
|
checks: { skip: ['CLIPPED'] },
|
|
62
73
|
widths: [480],
|
|
63
74
|
frame: (body) => `<div class="loader-frame">${body}</div>`,
|
|
@@ -28,6 +28,13 @@ export default definePart({
|
|
|
28
28
|
'single-column': { items: 'few' },
|
|
29
29
|
rtl: { items: 'rest', columnWidth: 130, dir: 'rtl' },
|
|
30
30
|
},
|
|
31
|
+
describe: {
|
|
32
|
+
rest: 'Eight cards of similar height in 130px columns; check that columns fill evenly with equal gaps.',
|
|
33
|
+
uneven: 'Nine cards of very different heights; check that each card goes to the shortest column and no gap opens.',
|
|
34
|
+
narrow: 'The cards in a 280px container; check that the layout drops to fewer columns without overflow.',
|
|
35
|
+
'single-column': 'Three cards with no column width; check that they stack in one column at full width.',
|
|
36
|
+
rtl: 'The cards in right-to-left; check that the first card starts at the right edge.',
|
|
37
|
+
},
|
|
31
38
|
widths: [480],
|
|
32
39
|
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
33
40
|
render: (props: Props) =>
|
|
@@ -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 },
|
|
@@ -66,6 +67,22 @@ export default definePart({
|
|
|
66
67
|
hover: { card: { ...finished, interactive: true, force: 'hover' } },
|
|
67
68
|
'focus-visible': { card: { ...finished, interactive: true, force: 'focus-visible' } },
|
|
68
69
|
},
|
|
70
|
+
describe: {
|
|
71
|
+
finished:
|
|
72
|
+
'A finished match won 2-1 by the home side; check that the winner reads emphasized and the start time shows.',
|
|
73
|
+
live: 'A live match at 1-1; check that the live marker uses the danger color and both scores show.',
|
|
74
|
+
scheduled: 'A scheduled match with no score; check that the start time takes the place of the scores.',
|
|
75
|
+
series:
|
|
76
|
+
'A best-of-3 series won by the away side, with seeds; check that game scores and seeds line up with the teams.',
|
|
77
|
+
outcome:
|
|
78
|
+
'A finished match decided by outcome, not score; check that the away side reads as winner without numbers.',
|
|
79
|
+
tbd: 'A final with the away side not yet known; check that the empty side shows a placeholder, not a broken row.',
|
|
80
|
+
compact: 'The finished match at compact size; check that names and scores shrink but stay readable.',
|
|
81
|
+
expanded: 'The finished match at expanded size; check that the extra room adds detail without stretching rows.',
|
|
82
|
+
wide: 'The finished match at wide size; check that teams and scores spread on one line and stay aligned.',
|
|
83
|
+
hover: 'An interactive finished match under hover; check that the card gives a hover tint without moving.',
|
|
84
|
+
'focus-visible': 'An interactive finished match with keyboard focus; check that a focus ring wraps the whole card.',
|
|
85
|
+
},
|
|
69
86
|
widths: [280, 480, 720],
|
|
70
87
|
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
71
88
|
render: (props: Props) =>
|
|
@@ -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 },
|
|
@@ -89,6 +90,22 @@ export default definePart({
|
|
|
89
90
|
disabled: { rows: [row('Rename'), row('Export as PDF', { disabled: true }), row('Duplicate')] },
|
|
90
91
|
'submenu-open': { rows: [row('Rename'), row('Move to', { submenu: 'open', active: true }), row('Duplicate')] },
|
|
91
92
|
},
|
|
93
|
+
describe: {
|
|
94
|
+
menu: 'The full menu with label, shortcuts, submenu, disabled, checkbox and radio groups and Delete; check alignment and separators.',
|
|
95
|
+
item: 'Three plain items, one with a shortcut, one with a submenu arrow; check that shortcuts and arrow align on the right.',
|
|
96
|
+
'item-hover': 'The items with Duplicate hovered; check that only that row takes the hover tint.',
|
|
97
|
+
'item-active': 'The items with Duplicate pressed; check that the pressed tint is deeper than hover.',
|
|
98
|
+
'item-focus-visible':
|
|
99
|
+
'The items with Duplicate focused by keyboard; check that the row shows the keyboard focus look.',
|
|
100
|
+
checked:
|
|
101
|
+
'A checkbox off, a checkbox on and a checked radio; check that the check and dot marks sit in the leading slot.',
|
|
102
|
+
'checked-hover': 'The checked row hovered; check that the tint shows and the check mark stays visible.',
|
|
103
|
+
'checked-active': 'The checked row pressed; check that the pressed tint keeps the check mark readable.',
|
|
104
|
+
'checked-focus-visible':
|
|
105
|
+
'The checked row focused by keyboard; check that focus shows without hiding the check mark.',
|
|
106
|
+
disabled: 'Export as PDF disabled between two items; check that it fades and its neighbours stay full.',
|
|
107
|
+
'submenu-open': 'Move to with its submenu open; check that the row stays highlighted as the open parent.',
|
|
108
|
+
},
|
|
92
109
|
grid,
|
|
93
110
|
widths: [480],
|
|
94
111
|
controls: {
|
|
@@ -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' },
|
|
@@ -83,6 +84,24 @@ export default definePart({
|
|
|
83
84
|
'success-action-focus-visible': { status: 'success', action: 'focus-visible' },
|
|
84
85
|
stack: { status: 'stack' },
|
|
85
86
|
},
|
|
87
|
+
describe: {
|
|
88
|
+
success:
|
|
89
|
+
'The success notification with Undo; check the status icon, title, message, action and dismiss button align.',
|
|
90
|
+
error:
|
|
91
|
+
'The error notification in danger with Retry and Details; check that the danger theme colors icon and actions.',
|
|
92
|
+
info: 'The info notification with no action; check that the pane closes neatly after the message and dismiss button.',
|
|
93
|
+
loading: 'The loading notification; check that a spinner takes the status icon slot.',
|
|
94
|
+
'close-hover': 'The error notification with the dismiss button hovered; check that only the dismiss button tints.',
|
|
95
|
+
'close-focus-visible':
|
|
96
|
+
'The error notification with the dismiss button focused; check its focus ring is not clipped.',
|
|
97
|
+
'action-focus-visible': 'The error notification with Retry focused; check that the focus ring wraps Retry only.',
|
|
98
|
+
'secondary-focus-visible':
|
|
99
|
+
'The error notification with Details focused; check that the focus ring wraps Details only.',
|
|
100
|
+
'success-close-focus-visible':
|
|
101
|
+
'The success notification with the dismiss button focused; check the ring in the success pane.',
|
|
102
|
+
'success-action-focus-visible': 'The success notification with Undo focused; check that the ring wraps Undo.',
|
|
103
|
+
stack: 'The four statuses stacked; check even gaps and that each pane sits one surface level above the page.',
|
|
104
|
+
},
|
|
86
105
|
widths: [480],
|
|
87
106
|
controls: {
|
|
88
107
|
close: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
@@ -41,6 +41,27 @@ export default definePart({
|
|
|
41
41
|
'pin-partial': pin({ value: '73' }),
|
|
42
42
|
'pin-focus': pin({ value: '73', focused: true }),
|
|
43
43
|
},
|
|
44
|
+
describe: {
|
|
45
|
+
empty: 'Six empty code segments under the label; check that every segment shows its border at an even gap.',
|
|
46
|
+
partial: 'The code with 482 typed; check that the digits fill the first three segments, centered.',
|
|
47
|
+
filled: 'The full code 482193; check that all six digits sit centered and the row does not overflow.',
|
|
48
|
+
hover: 'The partial code under hover; check that the segment borders darken like the text field frame.',
|
|
49
|
+
'focus-empty': 'The empty code focused; check that the first segment takes the primary edge and the caret bar.',
|
|
50
|
+
'focus-partial': 'The partial code focused; check that the fourth segment is the caret segment.',
|
|
51
|
+
'focus-filled': 'The full code focused; check that the last segment keeps the caret edge without a caret bar.',
|
|
52
|
+
hint: 'The code with a hint; check that the hint sits under the segments in muted text.',
|
|
53
|
+
required: 'The required code with a hint; check that the required marker shows next to the label.',
|
|
54
|
+
invalid: 'The required code with an error; check that segment borders and error text use the danger color.',
|
|
55
|
+
'invalid-partial':
|
|
56
|
+
'The invalid code with 48 typed; check that the danger borders stay on filled and empty segments.',
|
|
57
|
+
'invalid-focus': 'The invalid code focused; check that the caret segment and caret bar take the danger ink.',
|
|
58
|
+
disabled: 'The empty code disabled; check that segments and label fade and no hover shows.',
|
|
59
|
+
'disabled-filled': 'The full code disabled; check that the digits fade with the segments but stay readable.',
|
|
60
|
+
readonly: 'The full code read-only; check that it reads static and gives no edit cue.',
|
|
61
|
+
'readonly-focus': 'The partial code read-only and focused; check that no caret segment or caret bar shows.',
|
|
62
|
+
'pin-partial': 'A 4-digit masked PIN with two digits; check that the typed digits show as dots.',
|
|
63
|
+
'pin-focus': 'The masked PIN focused; check that the third segment shows the caret and the dots stay.',
|
|
64
|
+
},
|
|
44
65
|
widths: [320, 360, 640],
|
|
45
66
|
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
46
67
|
render: (props: Props) =>
|
|
@@ -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);
|
|
@@ -62,6 +62,27 @@ export default definePart({
|
|
|
62
62
|
links: { ...MIDDLE, renderAs: 'links' },
|
|
63
63
|
compact: { ...MIDDLE, compactStatus: '10 / 20' },
|
|
64
64
|
},
|
|
65
|
+
describe: {
|
|
66
|
+
first: 'Page 1 of 20; check that first and previous are disabled and the ellipsis sits before 20.',
|
|
67
|
+
middle:
|
|
68
|
+
'Page 10 of 20 with ellipses on both sides; check that page 10 reads as current and all arrows are enabled.',
|
|
69
|
+
last: 'Page 20 of 20; check that next and last are disabled and the ellipsis sits after 1.',
|
|
70
|
+
few: 'Page 2 of 5 with every page shown; check that no ellipsis appears.',
|
|
71
|
+
page: 'Page 10 of 20 at rest; check that page 11 looks like any other plain page.',
|
|
72
|
+
'page-hover': 'Page 11 hovered; check that only page 11 takes the hover tint.',
|
|
73
|
+
'page-active': 'Page 11 pressed; check that the pressed tint is deeper than hover.',
|
|
74
|
+
'page-focus-visible':
|
|
75
|
+
'Page 11 focused by keyboard; check that the focus ring wraps page 11 without shifting neighbours.',
|
|
76
|
+
current: 'Page 10 of 20 at rest; check that the current page 10 stands out from the plain pages.',
|
|
77
|
+
'current-hover': 'The current page hovered; check that it keeps its current look under hover.',
|
|
78
|
+
'current-active': 'The current page pressed; check that it keeps its current look while pressed.',
|
|
79
|
+
'current-focus-visible':
|
|
80
|
+
'The current page focused by keyboard; check that the focus ring shows around the current fill.',
|
|
81
|
+
range: 'Page 10 with the Showing 91–100 of 200 range; check that the range text sits beside the controls.',
|
|
82
|
+
sm: 'Page 10 at size sm; check that buttons and text shrink together.',
|
|
83
|
+
links: 'Page 10 rendered as links; check that it looks the same as the button version.',
|
|
84
|
+
compact: 'Page 10 with the compact 10 / 20 status; check that the status replaces the page list.',
|
|
85
|
+
},
|
|
65
86
|
grid,
|
|
66
87
|
widths: [480],
|
|
67
88
|
controls: {
|
|
@@ -87,6 +87,21 @@ export default definePart({
|
|
|
87
87
|
'error-slot': { error: 'slot' },
|
|
88
88
|
'error-bare': { error: 'bare' },
|
|
89
89
|
},
|
|
90
|
+
describe: {
|
|
91
|
+
default:
|
|
92
|
+
'A 16 / 9 picture with a short caption; check that the image fills the ratio box and the caption sits below.',
|
|
93
|
+
'ratio-4-3': 'The picture at 4 / 3; check that the box is taller and the image crops instead of stretching.',
|
|
94
|
+
'no-ratio': 'The picture with no ratio; check that it takes the natural height of the image.',
|
|
95
|
+
'width-height':
|
|
96
|
+
'The fallback image with width 800 and height 450; check that it scales to the frame at that ratio.',
|
|
97
|
+
'no-caption': 'The picture without a caption; check that no empty space is left below the image.',
|
|
98
|
+
'long-caption': 'The picture with a long caption; check that the caption wraps under the image without overflow.',
|
|
99
|
+
fit: 'Five cells for contain, cover, fill, none and scale-down; check that each image follows its object-fit.',
|
|
100
|
+
loading: 'A picture still loading; check that a skeleton fills the 16 / 9 box.',
|
|
101
|
+
'error-slot': 'A broken image with an error slot; check that This image is unavailable shows in the 16 / 9 box.',
|
|
102
|
+
'error-bare':
|
|
103
|
+
'A broken image with no error slot; check that the box keeps its ratio and shows no broken-image icon.',
|
|
104
|
+
},
|
|
90
105
|
widths: [480],
|
|
91
106
|
frame: (body) => `<div class="picture-frame">${body}</div>`,
|
|
92
107
|
render: (props: Props) =>
|
|
@@ -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: {},
|
|
@@ -78,6 +79,22 @@ export default definePart({
|
|
|
78
79
|
'complete-hover': { set: 'links', complete: 'hover' },
|
|
79
80
|
'complete-focus-visible': { set: 'links', complete: 'focus-visible' },
|
|
80
81
|
},
|
|
82
|
+
describe: {
|
|
83
|
+
default:
|
|
84
|
+
'A four-step checkout on Shipping; check that Account reads complete, Shipping current and the rest upcoming.',
|
|
85
|
+
outcomes: 'Steps ending in success, warning and error; check that each marker takes its icon and theme color.',
|
|
86
|
+
described:
|
|
87
|
+
'Steps with a description under each label; check that descriptions sit under labels and the error reads danger.',
|
|
88
|
+
vertical:
|
|
89
|
+
'Four steps stacked vertically with descriptions; check that the connector line runs between the markers.',
|
|
90
|
+
links: 'The checkout steps as links; check that they look the same as the plain steps at rest.',
|
|
91
|
+
'upcoming-hover': 'The Payment link hovered; check that only the upcoming Payment step shows the hover look.',
|
|
92
|
+
'upcoming-active': 'The Payment link pressed; check that the pressed look is deeper than hover.',
|
|
93
|
+
'upcoming-focus-visible': 'The Payment link focused by keyboard; check that the focus ring wraps the Payment step.',
|
|
94
|
+
'complete-hover': 'The complete Account link hovered; check that it shows hover and keeps its complete marker.',
|
|
95
|
+
'complete-focus-visible':
|
|
96
|
+
'The complete Account link focused by keyboard; check that the ring wraps it, marker included.',
|
|
97
|
+
},
|
|
81
98
|
widths: [480],
|
|
82
99
|
controls: {
|
|
83
100
|
complete: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
@@ -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
|
-
[
|
|
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
|
|
|
@@ -108,6 +111,28 @@ export default definePart({
|
|
|
108
111
|
'brand-retry-hover': { shape: 'retryable', color: 'brand', retry: 'hover' },
|
|
109
112
|
'brand-retry-focus-visible': { shape: 'retryable', color: 'brand', retry: 'focus-visible' },
|
|
110
113
|
},
|
|
114
|
+
describe: {
|
|
115
|
+
message: 'A 403 Forbidden with one message and no retry; check the danger title, status and message.',
|
|
116
|
+
violations: 'A 422 with three violation messages; check that each message shows as its own line.',
|
|
117
|
+
'class-validator': 'A 400 with two class-validator messages; check that both show as separate lines.',
|
|
118
|
+
retryable: 'A 503 that can retry; check that the Retry button shows under the message.',
|
|
119
|
+
'empty-body': 'A 500 with the fallback message; check that the generic text and code show.',
|
|
120
|
+
'echoes-title': 'A 404 whose message echoes the title; check that the title and message both read cleanly.',
|
|
121
|
+
network: 'A network error with status 0 and Retry; check the connection message and the Retry button.',
|
|
122
|
+
'always-allow-retry': 'The 404 with retry forced on; check that Retry shows though the error cannot retry.',
|
|
123
|
+
'long-message':
|
|
124
|
+
'A 409 with a long message and a long URL; check that the text wraps and the URL breaks in the box.',
|
|
125
|
+
'custom-slots':
|
|
126
|
+
'The 403 with custom Try again and Contact support actions; check that both show in place of Retry.',
|
|
127
|
+
'retry-hover': 'The 503 with Retry hovered; check that only Retry takes the hover look.',
|
|
128
|
+
'retry-active': 'The 503 with Retry pressed; check that the pressed look is deeper than hover.',
|
|
129
|
+
'retry-focus-visible': 'The 503 with Retry focused by keyboard; check that the focus ring wraps Retry.',
|
|
130
|
+
'slot-retry-focus-visible':
|
|
131
|
+
'The custom Try again button focused; check that the focus ring wraps the slotted button.',
|
|
132
|
+
'brand-color': 'The 503 in brand instead of danger; check that title and Retry take the brand color.',
|
|
133
|
+
'brand-retry-hover': 'The brand 503 with Retry hovered; check that the hover look uses the brand color.',
|
|
134
|
+
'brand-retry-focus-visible': 'The brand 503 with Retry focused; check that the focus ring uses the brand color.',
|
|
135
|
+
},
|
|
111
136
|
widths: [480],
|
|
112
137
|
controls: {
|
|
113
138
|
retry: { kind: 'button', input: ['pointer', 'keyboard'] },
|