@ethlete/components 1.0.0-next.90 → 1.0.0-next.92
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 +48 -0
- package/design/notification.ts +1 -1
- package/design/sdk/components/carousel/carousel.ts +0 -1
- package/design/sdk/components/checkbox/checkbox.ts +1 -8
- package/design/sdk/components/input/input.css +5 -5
- package/design/sdk/components/input/input.ts +1 -1
- package/design/sdk/components/loader/loader.ts +0 -1
- package/design/sdk/components/otp-input/otp-input.css +1 -1
- package/design/sdk/components/otp-input/otp-input.ts +1 -1
- package/design/sdk/components/scheduler/scheduler.ts +2 -8
- package/design/sdk/components/scrollable/scrollable.ts +2 -7
- package/design/sdk/components/scrollbar/scrollbar.ts +3 -3
- package/design/sdk/components/stream/stream.ts +1 -1
- package/design/sdk/components/switch/switch.ts +4 -1
- package/design/sdk/components/textarea/textarea.css +5 -5
- package/design/sdk/components/textarea/textarea.ts +1 -6
- package/design/sdk/foundations/colors/colors.css +2 -2
- package/design/sdk/ready.json +15 -40
- package/fesm2022/ethlete-components.mjs +600 -153
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/generators/icons/generator.js +35 -1
- package/package.json +1 -1
- package/src/lib/accordion/accordion.component.css +26 -5
- package/src/lib/forms/checkbox/checkbox.component.css +8 -3
- package/src/lib/forms/choice-field/choice-field-card-styles.component.css +7 -0
- package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +11 -8
- package/src/lib/forms/otp-input/otp-input.component.css +11 -2
- package/src/lib/forms/selection-card-styles.component.css +15 -3
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +7 -2
- package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +9 -2
- package/src/lib/forms/selection-list/radio-group/radio.component.css +9 -2
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +47 -3
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +8 -2
- package/src/lib/progress-steps/progress-step.component.css +51 -7
- package/src/lib/scrollable/headless/scrollable-buttons.component.css +65 -0
- package/src/lib/scrollable/headless/scrollable-masks.component.css +17 -7
- package/src/lib/standings/standings.component.css +40 -7
- package/src/lib/stream/pip/pip-window.component.css +3 -4
- package/src/lib/tabs/tab-bar-styles.component.css +34 -4
- package/types/ethlete-components.d.ts +200 -17
|
@@ -49,8 +49,14 @@ export default async function generate(tree, schema) {
|
|
|
49
49
|
const requested = normalizeIcons(config.icons, defaultVariants);
|
|
50
50
|
const resolved = [];
|
|
51
51
|
const missing = [];
|
|
52
|
+
let aliases;
|
|
52
53
|
for (const icon of requested) {
|
|
53
|
-
|
|
54
|
+
let svgPath = join(source.svgsDir, icon.variant, `${icon.name}.svg`);
|
|
55
|
+
if (!existsSync(svgPath)) {
|
|
56
|
+
aliases ??= readAliases(source.svgsDir);
|
|
57
|
+
const canonical = aliases.get(icon.name);
|
|
58
|
+
svgPath = canonical ? join(source.svgsDir, icon.variant, `${canonical}.svg`) : svgPath;
|
|
59
|
+
}
|
|
54
60
|
if (!existsSync(svgPath)) {
|
|
55
61
|
missing.push(`${icon.name} (${icon.variant})`);
|
|
56
62
|
continue;
|
|
@@ -86,6 +92,34 @@ function resolveSource(requested) {
|
|
|
86
92
|
}
|
|
87
93
|
return null;
|
|
88
94
|
}
|
|
95
|
+
/** Maps each Font Awesome alias (`times`) to its canonical name (`xmark`) from `metadata/icons.yml`. */
|
|
96
|
+
function readAliases(svgsDir) {
|
|
97
|
+
const aliases = new Map();
|
|
98
|
+
const metadataPath = join(dirname(svgsDir), 'metadata', 'icons.yml');
|
|
99
|
+
if (!existsSync(metadataPath))
|
|
100
|
+
return aliases;
|
|
101
|
+
let icon;
|
|
102
|
+
let inNames = false;
|
|
103
|
+
for (const line of readFileSync(metadataPath, 'utf-8').split(/\r?\n/)) {
|
|
104
|
+
const top = /^'?([^\s':]+)'?:\s*$/.exec(line);
|
|
105
|
+
if (top) {
|
|
106
|
+
icon = top[1];
|
|
107
|
+
inNames = false;
|
|
108
|
+
}
|
|
109
|
+
else if (/^ {4}names:\s*$/.test(line)) {
|
|
110
|
+
inNames = true;
|
|
111
|
+
}
|
|
112
|
+
else if (inNames && /^ {6}- /.test(line)) {
|
|
113
|
+
const alias = line.slice(8).trim().replace(/^'|'$/g, '');
|
|
114
|
+
if (icon && !aliases.has(alias))
|
|
115
|
+
aliases.set(alias, icon);
|
|
116
|
+
}
|
|
117
|
+
else if (!/^ {6,}/.test(line)) {
|
|
118
|
+
inNames = false;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return aliases;
|
|
122
|
+
}
|
|
89
123
|
function normalizeIcons(entries, defaultVariants) {
|
|
90
124
|
const seen = new Set();
|
|
91
125
|
const result = [];
|
package/package.json
CHANGED
|
@@ -75,7 +75,10 @@
|
|
|
75
75
|
|
|
76
76
|
.et-accordion-heading {
|
|
77
77
|
--_et-accordion-header-padding-block: var(--et-accordion-header-padding-block, var(--et-accordion-padding-block));
|
|
78
|
-
--_et-accordion-tint-inset:
|
|
78
|
+
--_et-accordion-tint-inset: var(
|
|
79
|
+
--et-accordion-header-tint-inset,
|
|
80
|
+
min(4px, var(--_et-accordion-header-padding-block))
|
|
81
|
+
);
|
|
79
82
|
|
|
80
83
|
display: block;
|
|
81
84
|
padding-block: var(--_et-accordion-tint-inset);
|
|
@@ -87,9 +90,14 @@
|
|
|
87
90
|
display: flex;
|
|
88
91
|
align-items: center;
|
|
89
92
|
gap: var(--et-accordion-gap);
|
|
90
|
-
inline-size: 100
|
|
93
|
+
inline-size: calc(100% + 2 * var(--et-accordion-header-outset-inline, 0px));
|
|
94
|
+
margin-inline: calc(-1 * var(--et-accordion-header-outset-inline, 0px));
|
|
91
95
|
padding: calc(var(--_et-accordion-header-padding-block) - var(--_et-accordion-tint-inset))
|
|
92
96
|
var(--et-accordion-header-padding-inline, var(--et-accordion-padding-inline));
|
|
97
|
+
padding-inline-end: var(
|
|
98
|
+
--et-accordion-header-padding-inline-end,
|
|
99
|
+
var(--et-accordion-header-padding-inline, var(--et-accordion-padding-inline))
|
|
100
|
+
);
|
|
93
101
|
border: 0;
|
|
94
102
|
border-radius: var(--et-accordion-radius);
|
|
95
103
|
background: transparent;
|
|
@@ -102,16 +110,26 @@
|
|
|
102
110
|
|
|
103
111
|
@media (hover: hover) {
|
|
104
112
|
&:hover {
|
|
105
|
-
background:
|
|
113
|
+
background: var(
|
|
114
|
+
--et-accordion-header-hover-background,
|
|
115
|
+
color-mix(in srgb, var(--et-surface-interaction-solid, gray) 7%, transparent)
|
|
116
|
+
);
|
|
106
117
|
|
|
107
118
|
&:not([aria-disabled='true']) {
|
|
108
119
|
--_et-accordion-secondary-color: var(--et-surface-color-solid, CanvasText);
|
|
120
|
+
|
|
121
|
+
.et-accordion-label {
|
|
122
|
+
text-decoration: var(--et-accordion-header-hover-text-decoration, none);
|
|
123
|
+
}
|
|
109
124
|
}
|
|
110
125
|
}
|
|
111
126
|
}
|
|
112
127
|
|
|
113
128
|
&:active {
|
|
114
|
-
background:
|
|
129
|
+
background: var(
|
|
130
|
+
--et-accordion-header-active-background,
|
|
131
|
+
color-mix(in srgb, var(--et-surface-interaction-solid, gray) 14%, transparent)
|
|
132
|
+
);
|
|
115
133
|
}
|
|
116
134
|
|
|
117
135
|
&:focus-visible {
|
|
@@ -145,7 +163,9 @@
|
|
|
145
163
|
flex: none;
|
|
146
164
|
inline-size: var(--et-accordion-chevron-size);
|
|
147
165
|
block-size: var(--et-accordion-chevron-size);
|
|
148
|
-
color: var(--_et-accordion-secondary-color);
|
|
166
|
+
color: var(--et-accordion-chevron-color, var(--_et-accordion-secondary-color));
|
|
167
|
+
stroke: currentColor;
|
|
168
|
+
stroke-width: var(--et-accordion-chevron-stroke-width, 0);
|
|
149
169
|
rotate: 180deg;
|
|
150
170
|
}
|
|
151
171
|
|
|
@@ -210,6 +230,7 @@
|
|
|
210
230
|
}
|
|
211
231
|
|
|
212
232
|
.et-accordion-panel-body {
|
|
233
|
+
padding-block-start: var(--et-accordion-panel-padding-block-start, 0px);
|
|
213
234
|
padding-block-end: var(--et-accordion-padding-block);
|
|
214
235
|
padding-inline: var(--et-accordion-padding-inline);
|
|
215
236
|
}
|
|
@@ -57,7 +57,12 @@
|
|
|
57
57
|
place-items: center;
|
|
58
58
|
width: var(--et-checkbox-size);
|
|
59
59
|
height: var(--et-checkbox-size);
|
|
60
|
-
border: var(--et-checkbox-border-width) solid
|
|
60
|
+
border: var(--et-checkbox-border-width) solid
|
|
61
|
+
color-mix(
|
|
62
|
+
in oklab,
|
|
63
|
+
var(--et-surface-color-solid, currentColor) 43%,
|
|
64
|
+
var(--et-surface-background-solid, transparent)
|
|
65
|
+
);
|
|
61
66
|
border-radius: var(--et-checkbox-border-radius);
|
|
62
67
|
}
|
|
63
68
|
|
|
@@ -71,7 +76,7 @@
|
|
|
71
76
|
:where(et-choice-field:has(.et-choice-field-label-area:hover))
|
|
72
77
|
&:not([aria-disabled='true']):not([data-readonly]):not([aria-checked='true']):not([aria-checked='mixed'])
|
|
73
78
|
.et-checkbox-box {
|
|
74
|
-
border-color: var(--et-surface-
|
|
79
|
+
border-color: var(--et-surface-color-solid, currentColor);
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
|
|
@@ -154,7 +159,7 @@
|
|
|
154
159
|
:where(et-choice-field:has(.et-choice-field-label-area:active))
|
|
155
160
|
&:not([aria-disabled='true']):not([data-readonly]):not([aria-checked='true']):not([aria-checked='mixed'])
|
|
156
161
|
.et-checkbox-box {
|
|
157
|
-
border-color: var(--et-surface-
|
|
162
|
+
border-color: var(--et-surface-color-solid, currentColor);
|
|
158
163
|
transform: scale(0.95);
|
|
159
164
|
}
|
|
160
165
|
|
|
@@ -48,6 +48,13 @@
|
|
|
48
48
|
color: var(--et-surface-color-solid, currentColor);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
@media (hover: hover) {
|
|
52
|
+
&:where(:has(.et-choice-field-control:hover)):where(:not(:has([aria-disabled='true'], [data-readonly])))
|
|
53
|
+
.et-choice-field-label-area {
|
|
54
|
+
color: var(--et-surface-color-solid, currentColor);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
51
58
|
/* Opacity on top of the shared border/background transition, for the one-unit dim above. */
|
|
52
59
|
&[data-can-animate] .et-choice-field-control {
|
|
53
60
|
transition:
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
&[data-text-shell] {
|
|
51
51
|
--_et-form-field-frame-border: var(
|
|
52
52
|
--et-form-field-control-border-color,
|
|
53
|
-
|
|
53
|
+
color-mix(
|
|
54
|
+
in oklab,
|
|
55
|
+
var(--et-surface-color-solid, currentColor) 43%,
|
|
56
|
+
var(--et-surface-background-solid, transparent)
|
|
57
|
+
)
|
|
54
58
|
);
|
|
55
59
|
--_et-form-field-frame-border-hover: var(
|
|
56
60
|
--et-form-field-control-border-color-hover,
|
|
57
|
-
color-
|
|
58
|
-
in srgb,
|
|
59
|
-
var(--et-surface-interaction-solid, currentColor) 75%,
|
|
60
|
-
var(--et-surface-color-solid, currentColor)
|
|
61
|
-
)
|
|
61
|
+
var(--_et-form-field-label-color-active)
|
|
62
62
|
);
|
|
63
63
|
--_et-form-field-frame-focus: var(
|
|
64
64
|
--et-form-field-control-border-color-focus,
|
|
@@ -68,8 +68,11 @@
|
|
|
68
68
|
--et-form-field-control-border-color-focus,
|
|
69
69
|
var(--et-surface-color-solid, currentColor)
|
|
70
70
|
);
|
|
71
|
-
--_et-form-field-label-color: var(--et-surface-color-muted-solid, currentColor);
|
|
72
|
-
--_et-form-field-label-color-active: var(
|
|
71
|
+
--_et-form-field-label-color: var(--et-form-field-label-color, var(--et-surface-color-muted-solid, currentColor));
|
|
72
|
+
--_et-form-field-label-color-active: var(
|
|
73
|
+
--et-form-field-label-color-active,
|
|
74
|
+
var(--et-surface-color-solid, currentColor)
|
|
75
|
+
);
|
|
73
76
|
|
|
74
77
|
&[data-error] {
|
|
75
78
|
--_et-form-field-frame-border: var(--et-theme-color-primary-solid);
|
|
@@ -103,7 +103,12 @@
|
|
|
103
103
|
inline-size: var(--et-otp-input-segment-size);
|
|
104
104
|
min-inline-size: 0;
|
|
105
105
|
aspect-ratio: 1;
|
|
106
|
-
border: 1px solid
|
|
106
|
+
border: 1px solid
|
|
107
|
+
color-mix(
|
|
108
|
+
in oklab,
|
|
109
|
+
var(--et-surface-color-solid, currentColor) 43%,
|
|
110
|
+
var(--et-surface-background-solid, transparent)
|
|
111
|
+
);
|
|
107
112
|
border-radius: var(--et-otp-input-segment-radius);
|
|
108
113
|
font-size: calc(var(--et-otp-input-segment-size) * 0.45);
|
|
109
114
|
font-variant-numeric: tabular-nums;
|
|
@@ -167,7 +172,11 @@
|
|
|
167
172
|
|
|
168
173
|
@media (hover: hover) {
|
|
169
174
|
&:not(:has(.et-otp-input-native:read-only)):hover .et-otp-input-segment:not([data-caret]) {
|
|
170
|
-
border-color: var(--et-surface-
|
|
175
|
+
border-color: var(--et-surface-color-solid, currentColor);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&:not([data-error]):not(:has(.et-otp-input-native:read-only)):hover > et-label {
|
|
179
|
+
color: var(--et-surface-color-solid, currentColor);
|
|
171
180
|
}
|
|
172
181
|
|
|
173
182
|
&[data-error]:not(:has(.et-otp-input-native:read-only)):hover .et-otp-input-segment:not([data-caret]) {
|
|
@@ -44,17 +44,22 @@
|
|
|
44
44
|
padding: var(--et-selection-card-padding);
|
|
45
45
|
border-radius: var(--et-selection-card-border-radius);
|
|
46
46
|
background-color: var(--et-surface-background-solid, transparent);
|
|
47
|
-
border: var(--et-selection-card-border-width) solid
|
|
47
|
+
border: var(--et-selection-card-border-width) solid
|
|
48
|
+
color-mix(
|
|
49
|
+
in oklab,
|
|
50
|
+
var(--et-surface-color-solid, currentColor) 43%,
|
|
51
|
+
var(--et-surface-background-solid, transparent)
|
|
52
|
+
);
|
|
48
53
|
|
|
49
54
|
/* Every state guard sits in `:where()` so source order decides; the checked rule below relies on it. */
|
|
50
55
|
@media (hover: hover) {
|
|
51
56
|
&:where(:hover:not([aria-disabled='true'], [data-readonly]):not(:has([aria-disabled='true'], [data-readonly]))) {
|
|
52
|
-
border-color: var(--et-surface-
|
|
57
|
+
border-color: var(--et-surface-color-solid, currentColor);
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
&:where(:active:not([aria-disabled='true'], [data-readonly]):not(:has([aria-disabled='true'], [data-readonly]))) {
|
|
57
|
-
border-color: var(--et-surface-
|
|
62
|
+
border-color: var(--et-surface-color-solid, currentColor);
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
/* After hover/active so a chosen card keeps its accent under the cursor. */
|
|
@@ -100,6 +105,13 @@
|
|
|
100
105
|
color: var(--et-surface-color-solid, currentColor);
|
|
101
106
|
}
|
|
102
107
|
|
|
108
|
+
@media (hover: hover) {
|
|
109
|
+
&:where(:hover:not([aria-disabled='true'], [data-readonly]):not(:has([aria-disabled='true'], [data-readonly])))
|
|
110
|
+
.et-selection-card-label {
|
|
111
|
+
color: var(--et-surface-color-solid, currentColor);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
103
115
|
/* Outside `:where()` on purpose: these must outweigh the plain variant's host-level control rules. */
|
|
104
116
|
|
|
105
117
|
&:active:not([aria-disabled='true']):not([data-readonly]) .et-selection-card-control {
|
|
@@ -15,7 +15,12 @@
|
|
|
15
15
|
place-items: center;
|
|
16
16
|
inline-size: var(--et-checkbox-option-size, 20px);
|
|
17
17
|
block-size: var(--et-checkbox-option-size, 20px);
|
|
18
|
-
border: var(--et-checkbox-option-border-width, 2px) solid
|
|
18
|
+
border: var(--et-checkbox-option-border-width, 2px) solid
|
|
19
|
+
color-mix(
|
|
20
|
+
in oklab,
|
|
21
|
+
var(--et-surface-color-solid, currentColor) 43%,
|
|
22
|
+
var(--et-surface-background-solid, transparent)
|
|
23
|
+
);
|
|
19
24
|
border-radius: var(--et-checkbox-option-border-radius, 4px);
|
|
20
25
|
transition:
|
|
21
26
|
border-color var(--et-checkbox-option-transition-duration, 150ms) ease,
|
|
@@ -63,7 +68,7 @@
|
|
|
63
68
|
[aria-disabled='true']
|
|
64
69
|
):not([aria-readonly='true'])
|
|
65
70
|
.et-checkbox-group-select-all-box {
|
|
66
|
-
border-color: var(--et-surface-
|
|
71
|
+
border-color: var(--et-surface-color-solid, currentColor);
|
|
67
72
|
background-color: color-mix(in srgb, var(--et-surface-interaction-solid, currentColor) 8%, transparent);
|
|
68
73
|
}
|
|
69
74
|
}
|
|
@@ -55,7 +55,14 @@
|
|
|
55
55
|
block-size: var(--et-checkbox-option-size);
|
|
56
56
|
border-radius: var(--et-checkbox-option-border-radius);
|
|
57
57
|
border: var(--et-checkbox-option-border-width) solid
|
|
58
|
-
var(
|
|
58
|
+
var(
|
|
59
|
+
--_et-control-border,
|
|
60
|
+
color-mix(
|
|
61
|
+
in oklab,
|
|
62
|
+
var(--et-surface-color-solid, currentColor) 43%,
|
|
63
|
+
var(--et-surface-background-solid, transparent)
|
|
64
|
+
)
|
|
65
|
+
);
|
|
59
66
|
background-color: transparent;
|
|
60
67
|
display: grid;
|
|
61
68
|
place-items: center;
|
|
@@ -88,7 +95,7 @@
|
|
|
88
95
|
|
|
89
96
|
@media (hover: hover) {
|
|
90
97
|
&:hover:not([aria-disabled='true']):not([data-readonly]):not([aria-checked='true']) .et-checkbox-option-box {
|
|
91
|
-
border-color: var(--_et-control-border, var(--et-surface-
|
|
98
|
+
border-color: var(--_et-control-border, var(--et-surface-color-solid, currentColor));
|
|
92
99
|
background-color: color-mix(in srgb, var(--et-surface-interaction-solid, currentColor) 8%, transparent);
|
|
93
100
|
}
|
|
94
101
|
}
|
|
@@ -55,7 +55,14 @@
|
|
|
55
55
|
block-size: var(--et-radio-size);
|
|
56
56
|
border-radius: 50%;
|
|
57
57
|
border: var(--et-radio-border-width) solid
|
|
58
|
-
var(
|
|
58
|
+
var(
|
|
59
|
+
--_et-control-border,
|
|
60
|
+
color-mix(
|
|
61
|
+
in oklab,
|
|
62
|
+
var(--et-surface-color-solid, currentColor) 43%,
|
|
63
|
+
var(--et-surface-background-solid, transparent)
|
|
64
|
+
)
|
|
65
|
+
);
|
|
59
66
|
background-color: transparent;
|
|
60
67
|
display: grid;
|
|
61
68
|
place-items: center;
|
|
@@ -85,7 +92,7 @@
|
|
|
85
92
|
|
|
86
93
|
@media (hover: hover) {
|
|
87
94
|
&:hover:not([aria-disabled='true']):not([data-readonly]):not([aria-checked='true']) .et-radio-circle {
|
|
88
|
-
border-color: var(--_et-control-border, var(--et-surface-
|
|
95
|
+
border-color: var(--_et-control-border, var(--et-surface-color-solid, currentColor));
|
|
89
96
|
background-color: color-mix(in srgb, var(--et-surface-interaction-solid, currentColor) 8%, transparent);
|
|
90
97
|
}
|
|
91
98
|
}
|
package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css
CHANGED
|
@@ -53,6 +53,15 @@
|
|
|
53
53
|
initial-value: 0px;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
:where(
|
|
57
|
+
.et-scrollable[item-size='auto']:is([direction='horizontal'], :not([direction]))
|
|
58
|
+
> .et-scrollable-wrapper
|
|
59
|
+
> .et-scrollable-container
|
|
60
|
+
> et-segmented-button-group
|
|
61
|
+
) {
|
|
62
|
+
inline-size: max-content;
|
|
63
|
+
}
|
|
64
|
+
|
|
56
65
|
et-segmented-button-group {
|
|
57
66
|
display: flex;
|
|
58
67
|
flex-direction: column;
|
|
@@ -111,20 +120,33 @@
|
|
|
111
120
|
|
|
112
121
|
.et-segmented-button-group-buttons {
|
|
113
122
|
display: inline-grid;
|
|
114
|
-
|
|
123
|
+
/* An unset columns token leaves the template at none and the flow at column; a set one makes the flow value
|
|
124
|
+
invalid, so it falls back to row. Do not give the token a fallback. */
|
|
125
|
+
grid-auto-flow: var(--et-segmented-button-group-columns, column);
|
|
115
126
|
grid-auto-columns: minmax(0, max-content);
|
|
127
|
+
grid-template-columns: repeat(var(--et-segmented-button-group-columns), minmax(0, max-content));
|
|
116
128
|
align-self: flex-start;
|
|
117
129
|
min-width: 0;
|
|
118
130
|
max-width: 100%;
|
|
119
131
|
gap: 2px;
|
|
120
132
|
padding: var(--et-segmented-button-group-track-padding);
|
|
121
133
|
border-radius: var(--et-segmented-button-group-track-radius);
|
|
122
|
-
background-color:
|
|
134
|
+
background-color: var(
|
|
135
|
+
--et-segmented-button-group-track-background,
|
|
136
|
+
color-mix(in srgb, var(--et-surface-interaction-solid, currentColor) 8%, transparent)
|
|
137
|
+
);
|
|
123
138
|
}
|
|
124
139
|
|
|
125
140
|
&:where([data-stretch]) .et-segmented-button-group-buttons {
|
|
126
141
|
display: grid;
|
|
127
|
-
grid-auto-columns: minmax(
|
|
142
|
+
grid-auto-columns: minmax(
|
|
143
|
+
var(--et-segmented-button-group-segment-min-width),
|
|
144
|
+
var(--et-segmented-button-group-stretch-track, 1fr)
|
|
145
|
+
);
|
|
146
|
+
grid-template-columns: repeat(
|
|
147
|
+
var(--et-segmented-button-group-columns),
|
|
148
|
+
minmax(var(--et-segmented-button-group-segment-min-width), var(--et-segmented-button-group-stretch-track, 1fr))
|
|
149
|
+
);
|
|
128
150
|
align-self: stretch;
|
|
129
151
|
}
|
|
130
152
|
|
|
@@ -132,6 +154,28 @@
|
|
|
132
154
|
min-width: var(--et-segmented-button-group-segment-min-width);
|
|
133
155
|
}
|
|
134
156
|
|
|
157
|
+
&:where([data-overflow='scroll']) .et-segmented-button-group-scrollable {
|
|
158
|
+
align-self: stretch;
|
|
159
|
+
min-width: 0;
|
|
160
|
+
max-width: 100%;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:where([data-overflow='scroll']:not([data-stretch])) .et-segmented-button-group-scrollable {
|
|
164
|
+
align-self: flex-start;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&:where([data-overflow='scroll']) .et-segmented-button-group-buttons {
|
|
168
|
+
flex: 1 0 auto;
|
|
169
|
+
max-width: none;
|
|
170
|
+
grid-auto-columns: max-content;
|
|
171
|
+
grid-template-columns: none;
|
|
172
|
+
grid-auto-flow: column;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&:where([data-overflow='scroll'][data-stretch]) .et-segmented-button-group-buttons {
|
|
176
|
+
grid-auto-columns: minmax(max-content, var(--et-segmented-button-group-stretch-track, 1fr));
|
|
177
|
+
}
|
|
178
|
+
|
|
135
179
|
&[data-error] .et-segmented-button-group-buttons {
|
|
136
180
|
box-shadow: inset 0 0 0 1px var(--et-theme-color-primary-solid);
|
|
137
181
|
}
|
|
@@ -47,6 +47,12 @@
|
|
|
47
47
|
initial-value: auto;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
@property --et-segmented-button-font-weight {
|
|
51
|
+
syntax: '<number>';
|
|
52
|
+
inherits: true;
|
|
53
|
+
initial-value: 500;
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
@property --et-segmented-button-gap {
|
|
51
57
|
syntax: '<length>';
|
|
52
58
|
inherits: true;
|
|
@@ -77,9 +83,9 @@
|
|
|
77
83
|
}
|
|
78
84
|
outline: none;
|
|
79
85
|
background: transparent;
|
|
80
|
-
color: var(--et-surface-color-muted-solid, currentColor);
|
|
86
|
+
color: var(--et-segmented-button-inactive-color, var(--et-surface-color-muted-solid, currentColor));
|
|
81
87
|
font-size: var(--et-segmented-button-font-size);
|
|
82
|
-
font-weight:
|
|
88
|
+
font-weight: var(--et-segmented-button-font-weight);
|
|
83
89
|
line-height: 1.4;
|
|
84
90
|
white-space: nowrap;
|
|
85
91
|
-webkit-user-select: none;
|
|
@@ -11,6 +11,18 @@
|
|
|
11
11
|
initial-value: 2px;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
@property --et-progress-step-connector-width {
|
|
15
|
+
syntax: '<length>';
|
|
16
|
+
inherits: true;
|
|
17
|
+
initial-value: 2px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@property --et-progress-step-current-dot-size {
|
|
21
|
+
syntax: '<length>';
|
|
22
|
+
inherits: true;
|
|
23
|
+
initial-value: 0px;
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
@property --et-progress-step-label-font-size {
|
|
15
27
|
syntax: '<length>';
|
|
16
28
|
inherits: true;
|
|
@@ -38,13 +50,13 @@
|
|
|
38
50
|
&:not(:last-child)::after {
|
|
39
51
|
content: '';
|
|
40
52
|
position: absolute;
|
|
41
|
-
inset-block-start: calc(var(--et-progress-step-marker-size) / 2
|
|
53
|
+
inset-block-start: calc((var(--et-progress-step-marker-size) - var(--et-progress-step-connector-width)) / 2);
|
|
42
54
|
inset-inline-start: 50%;
|
|
43
55
|
/* +gap: the connector spans from this marker's center to the next one's, and steps sit
|
|
44
56
|
`--et-progress-steps-gap` apart - without it the line falls short by exactly that gap. */
|
|
45
57
|
inline-size: calc(100% + var(--et-progress-steps-gap, 8px));
|
|
46
|
-
block-size:
|
|
47
|
-
background: var(--et-surface-border-solid, currentColor);
|
|
58
|
+
block-size: var(--et-progress-step-connector-width);
|
|
59
|
+
background: var(--et-progress-step-connector-color, var(--et-surface-border-solid, currentColor));
|
|
48
60
|
transition: background-color 200ms ease;
|
|
49
61
|
}
|
|
50
62
|
|
|
@@ -57,7 +69,7 @@
|
|
|
57
69
|
[data-state='error'],
|
|
58
70
|
[data-state='skipped']
|
|
59
71
|
):not(:last-child)::after {
|
|
60
|
-
background: var(--et-theme-color-ink-solid);
|
|
72
|
+
background: var(--et-progress-step-connector-complete-color, var(--et-theme-color-ink-solid));
|
|
61
73
|
}
|
|
62
74
|
|
|
63
75
|
.et-progress-step-marker {
|
|
@@ -68,6 +80,7 @@
|
|
|
68
80
|
justify-content: center;
|
|
69
81
|
inline-size: var(--et-progress-step-marker-size);
|
|
70
82
|
block-size: var(--et-progress-step-marker-size);
|
|
83
|
+
flex-shrink: 0;
|
|
71
84
|
border-radius: 50%;
|
|
72
85
|
border: var(--et-progress-step-marker-ring-width) solid
|
|
73
86
|
var(--et-progress-step-marker-ring-color, var(--et-surface-border-solid, currentColor));
|
|
@@ -95,7 +108,21 @@
|
|
|
95
108
|
|
|
96
109
|
&[data-state='current'] .et-progress-step-marker {
|
|
97
110
|
border-color: var(--et-progress-step-marker-ring-color, var(--et-theme-color-ink-solid));
|
|
111
|
+
background: var(--et-progress-step-current-marker-background, var(--et-surface-background-solid, Canvas));
|
|
98
112
|
color: var(--et-theme-color-ink-solid, currentColor);
|
|
113
|
+
|
|
114
|
+
&::after {
|
|
115
|
+
content: '';
|
|
116
|
+
position: absolute;
|
|
117
|
+
inline-size: var(--et-progress-step-current-dot-size);
|
|
118
|
+
block-size: var(--et-progress-step-current-dot-size);
|
|
119
|
+
border-radius: 50%;
|
|
120
|
+
background: var(--et-progress-step-current-dot-color, var(--et-theme-color-ink-solid, currentColor));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.et-progress-step-marker-number::before {
|
|
124
|
+
content: var(--et-progress-step-current-marker-content, counter(et-progress-step));
|
|
125
|
+
}
|
|
99
126
|
}
|
|
100
127
|
|
|
101
128
|
&:is([data-state='complete'], [data-state='success'], [data-state='warning'], [data-state='error'])
|
|
@@ -113,6 +140,14 @@
|
|
|
113
140
|
content: counter(et-progress-step);
|
|
114
141
|
}
|
|
115
142
|
|
|
143
|
+
&[data-state='upcoming'] .et-progress-step-marker {
|
|
144
|
+
background: var(--et-progress-step-upcoming-marker-background, var(--et-surface-background-solid, Canvas));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&[data-state='upcoming'] .et-progress-step-marker-number::before {
|
|
148
|
+
content: var(--et-progress-step-upcoming-marker-content, counter(et-progress-step));
|
|
149
|
+
}
|
|
150
|
+
|
|
116
151
|
/* Keep the label's font-size on this element, not on the label: the vertical orientation's
|
|
117
152
|
optical centering below measures `1lh` here, and inheriting the page's size instead would
|
|
118
153
|
leave the label sitting off-center against its marker. */
|
|
@@ -134,6 +169,7 @@
|
|
|
134
169
|
[etProgressStepDescription] {
|
|
135
170
|
margin: 0;
|
|
136
171
|
font-size: var(--et-progress-step-description-font-size);
|
|
172
|
+
line-height: var(--et-progress-step-description-line-height, inherit);
|
|
137
173
|
color: var(--et-surface-color-muted-solid, currentColor);
|
|
138
174
|
}
|
|
139
175
|
|
|
@@ -141,14 +177,22 @@
|
|
|
141
177
|
margin-block-start: 4px;
|
|
142
178
|
}
|
|
143
179
|
|
|
180
|
+
&[data-state='upcoming'] .et-progress-step-label {
|
|
181
|
+
font-weight: var(--et-progress-step-upcoming-label-font-weight, inherit);
|
|
182
|
+
}
|
|
183
|
+
|
|
144
184
|
&[data-state='current'] .et-progress-step-label {
|
|
145
185
|
color: var(--et-surface-color-solid, currentColor);
|
|
146
186
|
font-weight: 600;
|
|
147
187
|
}
|
|
148
188
|
|
|
189
|
+
&[data-state='complete'] .et-progress-step-label {
|
|
190
|
+
font-weight: var(--et-progress-step-complete-label-font-weight, inherit);
|
|
191
|
+
}
|
|
192
|
+
|
|
149
193
|
&:is([data-state='success'], [data-state='warning'], [data-state='error']) .et-progress-step-label {
|
|
150
194
|
color: var(--et-theme-color-ink-solid, currentColor);
|
|
151
|
-
font-weight: 600;
|
|
195
|
+
font-weight: var(--et-progress-step-complete-label-font-weight, 600);
|
|
152
196
|
}
|
|
153
197
|
|
|
154
198
|
.et-progress-steps:where([data-align='start']) & {
|
|
@@ -175,8 +219,8 @@
|
|
|
175
219
|
|
|
176
220
|
&:not(:last-child)::after {
|
|
177
221
|
inset-block-start: var(--et-progress-step-marker-size);
|
|
178
|
-
inset-inline-start: calc(var(--et-progress-step-marker-size) / 2
|
|
179
|
-
inline-size:
|
|
222
|
+
inset-inline-start: calc((var(--et-progress-step-marker-size) - var(--et-progress-step-connector-width)) / 2);
|
|
223
|
+
inline-size: var(--et-progress-step-connector-width);
|
|
180
224
|
block-size: calc(100% - var(--et-progress-step-marker-size) + var(--et-progress-steps-gap, 8px));
|
|
181
225
|
}
|
|
182
226
|
|
|
@@ -112,6 +112,71 @@
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
&.et-scrollable--inline-buttons.et-scrollable--can-scroll {
|
|
116
|
+
& > .et-scrollable-wrapper {
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: 4px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
& .et-scrollable-buttons {
|
|
122
|
+
display: contents;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
& .et-scrollable-button {
|
|
126
|
+
position: static;
|
|
127
|
+
opacity: 1;
|
|
128
|
+
pointer-events: all;
|
|
129
|
+
transform: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&[direction='horizontal'],
|
|
133
|
+
&:not([direction]) {
|
|
134
|
+
& > .et-scrollable-wrapper {
|
|
135
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
136
|
+
|
|
137
|
+
& > .et-scrollable-container,
|
|
138
|
+
& > .et-scrollable-masks {
|
|
139
|
+
grid-column: 2;
|
|
140
|
+
grid-row: 1;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
& .et-scrollable-button--start {
|
|
144
|
+
grid-column: 1;
|
|
145
|
+
grid-row: 1;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
& .et-scrollable-button--end {
|
|
149
|
+
grid-column: 3;
|
|
150
|
+
grid-row: 1;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&[direction='vertical'] {
|
|
156
|
+
& > .et-scrollable-wrapper {
|
|
157
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
158
|
+
justify-items: center;
|
|
159
|
+
|
|
160
|
+
& > .et-scrollable-container,
|
|
161
|
+
& > .et-scrollable-masks {
|
|
162
|
+
grid-row: 2;
|
|
163
|
+
grid-column: 1;
|
|
164
|
+
justify-self: stretch;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
& .et-scrollable-button--start {
|
|
168
|
+
grid-row: 1;
|
|
169
|
+
grid-column: 1;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
& .et-scrollable-button--end {
|
|
173
|
+
grid-row: 3;
|
|
174
|
+
grid-column: 1;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
115
180
|
/* Wins the equal-weight tie with the direction rules above only by coming after them - keep the
|
|
116
181
|
footer overrides in this file, below them. */
|
|
117
182
|
& .et-scrollable-footer {
|