@ethlete/components 1.0.0-next.89 → 1.0.0-next.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/design/sdk/components/accent-on-light/accent-on-light.ts +1 -0
- package/design/sdk/components/action-sheet/action-sheet.ts +25 -1
- package/design/sdk/components/anchored-dialog/anchored-dialog.css +2 -5
- package/design/sdk/components/anchored-dialog/anchored-dialog.ts +13 -8
- package/design/sdk/components/badge/badge.css +18 -0
- package/design/sdk/components/badge/badge.ts +27 -3
- package/design/sdk/components/banner/banner.ts +32 -1
- package/design/sdk/components/bracket/bracket.ts +1 -0
- package/design/sdk/components/breadcrumb/breadcrumb.ts +1 -1
- package/design/sdk/components/button/button.ts +1 -0
- package/design/sdk/components/calendar/calendar.ts +31 -4
- package/design/sdk/components/card/card.ts +41 -1
- package/design/sdk/components/carousel/carousel.ts +35 -5
- package/design/sdk/components/chart/chart.ts +8 -2
- package/design/sdk/components/checkbox/checkbox.ts +11 -2
- package/design/sdk/components/chip/chip.ts +2 -9
- package/design/sdk/components/copy-button/copy-button.ts +4 -1
- package/design/sdk/components/dialog/dialog.ts +58 -1
- package/design/sdk/components/empty-state/empty-state.ts +1 -0
- package/design/sdk/components/floating-action/floating-action.ts +1 -0
- package/design/sdk/components/form-field/form-field.ts +9 -16
- package/design/sdk/components/grid/grid.ts +4 -1
- package/design/sdk/components/match/match.ts +1 -0
- package/design/sdk/components/menu/menu.ts +1 -0
- package/design/sdk/components/notification/notification.ts +1 -0
- package/design/sdk/components/pagination/pagination.ts +1 -1
- package/design/sdk/components/progress-steps/progress-steps.ts +1 -0
- package/design/sdk/components/query-error/query-error.ts +4 -1
- package/design/sdk/components/radio-group/radio-group.ts +1 -0
- package/design/sdk/components/scheduler/scheduler.ts +22 -1
- package/design/sdk/components/scrollable/scrollable.ts +28 -2
- package/design/sdk/components/scrollbar/scrollbar.css +1 -1
- package/design/sdk/components/scrollbar/scrollbar.ts +13 -0
- package/design/sdk/components/select/select.ts +9 -0
- package/design/sdk/components/select/shared/select-part.ts +4 -12
- package/design/sdk/components/select-panel/select-panel.ts +1 -0
- package/design/sdk/components/standings/standings.ts +4 -1
- package/design/sdk/components/stream/stream.ts +12 -3
- package/design/sdk/components/switch/switch.ts +10 -4
- package/design/sdk/components/table/table.ts +94 -12
- package/design/sdk/components/tabs/tabs.ts +1 -1
- package/design/sdk/components/textarea/textarea.ts +31 -2
- package/design/sdk/components/toolbar/toolbar.ts +1 -0
- package/design/sdk/components/tree/tree.ts +8 -1
- package/design/sdk/foundations/elevation/elevation.ts +1 -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 +438 -73
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/bracket/bracket.component.css +4 -1
- 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/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/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 +1 -0
- package/types/ethlete-components.d.ts +111 -11
- package/design/sdk/components/switch/switch.css +0 -37
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"HIDDEN-CONTENT": {
|
|
3
|
+
"components/floating-action: floating at 480px: div[data-et-part=components/floating-action]": {
|
|
4
|
+
"finding": "181",
|
|
5
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
6
|
+
},
|
|
7
|
+
"components/floating-action: floating-active at 480px: div[data-et-part=components/floating-action]": {
|
|
8
|
+
"finding": "181",
|
|
9
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
10
|
+
},
|
|
11
|
+
"components/floating-action: floating-danger at 480px: div[data-et-part=components/floating-action]": {
|
|
12
|
+
"finding": "181",
|
|
13
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
14
|
+
},
|
|
15
|
+
"components/floating-action: floating-danger-hover at 480px: div[data-et-part=components/floating-action]": {
|
|
16
|
+
"finding": "181",
|
|
17
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
18
|
+
},
|
|
19
|
+
"components/floating-action: floating-focus-visible at 480px: div[data-et-part=components/floating-action]": {
|
|
20
|
+
"finding": "181",
|
|
21
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
22
|
+
},
|
|
23
|
+
"components/floating-action: floating-hover at 480px: div[data-et-part=components/floating-action]": {
|
|
24
|
+
"finding": "181",
|
|
25
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
26
|
+
},
|
|
27
|
+
"components/floating-action: floating-icon at 480px: div[data-et-part=components/floating-action]": {
|
|
28
|
+
"finding": "181",
|
|
29
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
30
|
+
},
|
|
31
|
+
"components/floating-action: floating-inset at 480px: div[data-et-part=components/floating-action]": {
|
|
32
|
+
"finding": "181",
|
|
33
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
34
|
+
},
|
|
35
|
+
"components/floating-action: floating-over-row at 480px: div[data-et-part=components/floating-action]": {
|
|
36
|
+
"finding": "181",
|
|
37
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
38
|
+
},
|
|
39
|
+
"components/floating-action: inline at 480px: div[data-et-part=components/floating-action]": {
|
|
40
|
+
"finding": "181",
|
|
41
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
42
|
+
},
|
|
43
|
+
"components/floating-action: inline-focus-visible at 480px: div[data-et-part=components/floating-action]": {
|
|
44
|
+
"finding": "181",
|
|
45
|
+
"sketch": "components/floating-action: not opened yet - the page frame scrolls (overflow-y: auto) or grows instead of cutting the rows at its bottom"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
package/design/table.ts
CHANGED
|
@@ -51,6 +51,8 @@ export type TableRowMock = {
|
|
|
51
51
|
attributes?: string;
|
|
52
52
|
/** Extra attributes on the expander button, e.g. design markers. */
|
|
53
53
|
expanderAttributes?: string;
|
|
54
|
+
/** Extra attributes on the row's select checkbox, e.g. design markers. */
|
|
55
|
+
selectAttributes?: string;
|
|
54
56
|
};
|
|
55
57
|
|
|
56
58
|
export type TableMockOptions = {
|
|
@@ -64,6 +66,8 @@ export type TableMockOptions = {
|
|
|
64
66
|
density?: 'sm' | 'md' | 'lg';
|
|
65
67
|
/** Draws the selection column; the value is the select-all checkbox state. */
|
|
66
68
|
selection?: 'unchecked' | 'checked' | 'mixed';
|
|
69
|
+
/** Extra attributes on the select-all checkbox, e.g. design markers. */
|
|
70
|
+
selectAllAttributes?: string;
|
|
67
71
|
/** Draws the expander column (`etTableRowExpansion`). */
|
|
68
72
|
expandable?: boolean;
|
|
69
73
|
/** Draws the group header row (`etTableGroupHeaders`) over the data columns. */
|
|
@@ -107,11 +111,14 @@ export const tableStyles = /* @__PURE__ */ [
|
|
|
107
111
|
}`,
|
|
108
112
|
].join('\n');
|
|
109
113
|
|
|
110
|
-
const checkbox = (
|
|
114
|
+
const checkbox = (
|
|
115
|
+
state: 'unchecked' | 'checked' | 'mixed',
|
|
116
|
+
{ label, attributes }: { label: string; attributes?: string },
|
|
117
|
+
) => {
|
|
111
118
|
const checked = state === 'checked' ? 'true' : state === 'mixed' ? 'mixed' : 'false';
|
|
112
119
|
|
|
113
120
|
return (
|
|
114
|
-
`<et-checkbox class="et-checkbox" role="checkbox" aria-checked="${checked}" aria-label="${label}" tabindex="0">` +
|
|
121
|
+
`<et-checkbox class="et-checkbox" role="checkbox" aria-checked="${checked}" aria-label="${label}" tabindex="0"${attributes ? ` ${attributes}` : ''}>` +
|
|
115
122
|
`<div class="et-checkbox-box">` +
|
|
116
123
|
`<svg class="et-checkbox-checkmark" viewBox="0 0 16 16" aria-hidden="true"><polyline class="et-checkbox-checkmark-path" points="3.5 8 6.5 11 12.5 5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></polyline></svg>` +
|
|
117
124
|
`<svg class="et-checkbox-indeterminate" viewBox="0 0 16 16" aria-hidden="true"><line class="et-checkbox-indeterminate-path" x1="4" y1="8" x2="12" y2="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line></svg>` +
|
|
@@ -165,7 +172,7 @@ const bodyCell = (options: TableMockOptions, column: number) => (cell: TableCell
|
|
|
165
172
|
const leadHeaderCells = (options: TableMockOptions) =>
|
|
166
173
|
[
|
|
167
174
|
options.selection
|
|
168
|
-
? `<div class="et-table-select-cell et-table-header-cell" role="columnheader"><et-table-select-all-cell>${checkbox(options.selection, 'Select all rows')}</et-table-select-all-cell></div>`
|
|
175
|
+
? `<div class="et-table-select-cell et-table-header-cell" role="columnheader"><et-table-select-all-cell>${checkbox(options.selection, { label: 'Select all rows', attributes: options.selectAllAttributes })}</et-table-select-all-cell></div>`
|
|
169
176
|
: '',
|
|
170
177
|
options.expandable ? `<div class="et-table-expander-cell et-table-header-cell" role="columnheader"></div>` : '',
|
|
171
178
|
].join('');
|
|
@@ -179,7 +186,7 @@ const leadBodyCells = (row: TableRowMock, options: TableMockOptions) => {
|
|
|
179
186
|
|
|
180
187
|
return [
|
|
181
188
|
options.selection
|
|
182
|
-
? `<div class="et-table-select-cell et-table-cell" role="cell"><et-table-select-cell>${checkbox(row.selected ? 'checked' : 'unchecked', 'Select row')}</et-table-select-cell></div>`
|
|
189
|
+
? `<div class="et-table-select-cell et-table-cell" role="cell"><et-table-select-cell>${checkbox(row.selected ? 'checked' : 'unchecked', { label: 'Select row', attributes: row.selectAttributes })}</et-table-select-cell></div>`
|
|
183
190
|
: '',
|
|
184
191
|
options.expandable
|
|
185
192
|
? `<div class="et-table-expander-cell et-table-cell" role="cell"><et-table-expander-cell>${expander}</et-table-expander-cell></div>`
|
package/design/tooltip.ts
CHANGED
|
@@ -13,6 +13,11 @@ export type TooltipMockOptions = {
|
|
|
13
13
|
placement?: Placement;
|
|
14
14
|
/** A surface theme name the app registers. Left out, the pane takes the surface one elevation above its parent. */
|
|
15
15
|
surface?: string;
|
|
16
|
+
/**
|
|
17
|
+
* A CSS selector of the drawn trigger. The design frame places the pane and aims the arrow at its centre on whole
|
|
18
|
+
* pixels, as the overlay runtime does, and the render check reports a tip that misses it.
|
|
19
|
+
*/
|
|
20
|
+
anchor?: string;
|
|
16
21
|
/** The tooltip id, which the trigger's `aria-describedby` points at. */
|
|
17
22
|
id?: string;
|
|
18
23
|
/** Extra attributes on the `<et-tooltip>`, e.g. design markers. */
|
|
@@ -83,7 +88,8 @@ export const tooltip = (options: TooltipMockOptions = {}) => {
|
|
|
83
88
|
hasTemplate && 'data-has-template="true"',
|
|
84
89
|
].filter(Boolean);
|
|
85
90
|
|
|
91
|
+
const anchorAttribute = options.anchor ? ` data-et-arrow-anchor="${options.anchor.replaceAll('"', '"')}"` : '';
|
|
86
92
|
const body = hasTemplate ? options.content : `<p class="et-tooltip__text">${options.text ?? ''}</p>`;
|
|
87
93
|
|
|
88
|
-
return `<div class="et-tooltip-mock-frame"><div class="${paneClasses.join(' ')}" data-overlay-placement="${placement}"${surface ? '' : ' data-et-auto-surface'}><et-tooltip ${tooltipAttributes.join(' ')}><div class="et-tooltip__surface"><div class="et-tooltip__content">${body}</div></div></et-tooltip><div et-floating-arrow class="et-overlay-arrow"></div></div></div>`;
|
|
94
|
+
return `<div class="et-tooltip-mock-frame"><div class="${paneClasses.join(' ')}" data-overlay-placement="${placement}"${anchorAttribute}${surface ? '' : ' data-et-auto-surface'}><et-tooltip ${tooltipAttributes.join(' ')}><div class="et-tooltip__surface"><div class="et-tooltip__content">${body}</div></div></et-tooltip><div et-floating-arrow class="et-overlay-arrow"></div></div></div>`;
|
|
89
95
|
};
|