@ethlete/components 1.0.0-next.92 → 1.0.0-next.94
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 +21 -0
- package/design/sdk/components/bracket/bracket.ts +51 -15
- package/design/sdk/components/button/button.css +0 -12
- package/design/sdk/components/carousel/carousel.ts +61 -28
- package/design/sdk/components/checkbox/checkbox.css +0 -55
- package/design/sdk/components/checkbox/checkbox.ts +1 -1
- package/design/sdk/components/match/match.ts +1 -0
- package/design/sdk/components/radio-group/radio-group.css +0 -36
- package/design/sdk/components/radio-group/radio-group.ts +1 -1
- package/design/sdk/components/scrollable/scrollable.ts +23 -9
- package/design/sdk/components/select/select.css +6 -0
- package/design/sdk/components/table/table.ts +80 -37
- package/design/sdk/ready.json +160 -56
- package/fesm2022/ethlete-components.mjs +371 -39
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/button/button.component.css +1 -1
- package/src/lib/carousel/carousel.component.css +9 -3
- package/src/lib/forms/checkbox/checkbox.component.css +19 -6
- package/src/lib/forms/form-field/form-field.component.css +6 -0
- package/src/lib/forms/selection-card-styles.component.css +3 -4
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +14 -2
- package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +17 -7
- package/src/lib/forms/selection-list/radio-group/radio-group.component.css +1 -1
- package/src/lib/forms/selection-list/radio-group/radio.component.css +11 -4
- package/src/lib/match/match-participant.component.css +12 -0
- package/src/lib/match/match-scoreline.component.css +53 -0
- package/src/lib/match/match-time.component.css +5 -0
- package/src/lib/scrollable/headless/scrollable-buttons.component.css +27 -4
- package/src/lib/table/table-expander-cell.component.css +6 -0
- package/types/ethlete-components.d.ts +140 -5
package/package.json
CHANGED
|
@@ -195,6 +195,13 @@
|
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
&:active::before {
|
|
199
|
+
background: var(
|
|
200
|
+
--et-carousel-dot-pressed-color,
|
|
201
|
+
color-mix(in srgb, var(--et-surface-interaction-solid, gray) 85%, transparent)
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
198
205
|
&:where([data-active])::before {
|
|
199
206
|
background: var(
|
|
200
207
|
--et-carousel-dot-active-color,
|
|
@@ -202,9 +209,8 @@
|
|
|
202
209
|
);
|
|
203
210
|
}
|
|
204
211
|
|
|
205
|
-
/*
|
|
206
|
-
|
|
207
|
-
&:where([data-active]):hover::before {
|
|
212
|
+
/* `:hover`/`:active` above outrank the `:where()` rule, so the selected dot needs its own state selector. */
|
|
213
|
+
&:where([data-active]):is(:hover, :active)::before {
|
|
208
214
|
background: var(
|
|
209
215
|
--et-carousel-dot-active-color,
|
|
210
216
|
light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid))
|
|
@@ -115,8 +115,12 @@
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
&.et-focus-ring {
|
|
119
|
+
--_et-focus-ring-color: var(--et-theme-color-ink-solid);
|
|
120
|
+
}
|
|
121
|
+
|
|
118
122
|
&:focus-visible:not([aria-checked='true']):not([aria-checked='mixed']) {
|
|
119
|
-
--_et-focus-ring-color: var(--et-
|
|
123
|
+
--_et-focus-ring-color: var(--et-theme-color-ink-solid);
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
&:focus-visible:not([aria-checked='true']):not([aria-checked='mixed']) .et-checkbox-box {
|
|
@@ -128,10 +132,7 @@
|
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
et-choice-field[data-error] &:focus-visible:not([aria-checked='true']):not([aria-checked='mixed']) {
|
|
131
|
-
--_et-focus-ring-color:
|
|
132
|
-
var(--et-theme-color-ink-solid, currentColor),
|
|
133
|
-
var(--et-theme-color-primary-solid, currentColor)
|
|
134
|
-
);
|
|
135
|
+
--_et-focus-ring-color: var(--et-theme-color-ink-solid);
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
et-choice-field[data-error]
|
|
@@ -147,7 +148,7 @@
|
|
|
147
148
|
:where(et-choice-field[data-variant='card'])
|
|
148
149
|
&:focus-visible:not([aria-checked='true']):not([aria-checked='mixed'])
|
|
149
150
|
.et-checkbox-box {
|
|
150
|
-
border-color: var(--et-theme-color-primary-solid);
|
|
151
|
+
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
151
152
|
}
|
|
152
153
|
|
|
153
154
|
&:active:not([aria-disabled='true']):not([data-readonly]):not([aria-checked='true']):not([aria-checked='mixed'])
|
|
@@ -234,6 +235,18 @@
|
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
|
|
238
|
+
&:is([aria-checked='true'], [aria-checked='mixed']) .et-checkbox-box {
|
|
239
|
+
outline: 1px solid light-dark(var(--et-theme-color-ink-solid), transparent);
|
|
240
|
+
outline-offset: -1px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@media (hover: hover) {
|
|
244
|
+
&:is([aria-checked='true'], [aria-checked='mixed']):hover,
|
|
245
|
+
.et-color-interactive-container:hover &:is([aria-checked='true'], [aria-checked='mixed']) {
|
|
246
|
+
--et-theme-color-primary-rgb: var(--et-color-primary-active);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
237
250
|
&[data-can-animate] {
|
|
238
251
|
transition:
|
|
239
252
|
opacity var(--et-checkbox-transition-duration) ease,
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
@layer components.sdk {
|
|
2
|
+
et-form-field:where([data-variant='ghost']) {
|
|
3
|
+
--et-form-field-control-border-color: transparent;
|
|
4
|
+
--et-form-field-value-color: var(--et-surface-color-muted-solid, currentColor);
|
|
5
|
+
--et-form-field-value-color-active: var(--et-surface-color-solid, currentColor);
|
|
6
|
+
}
|
|
7
|
+
|
|
2
8
|
@property --et-form-field-gap {
|
|
3
9
|
syntax: '<length>';
|
|
4
10
|
inherits: true;
|
|
@@ -64,14 +64,13 @@
|
|
|
64
64
|
|
|
65
65
|
/* After hover/active so a chosen card keeps its accent under the cursor. */
|
|
66
66
|
&:where([aria-checked='true'], :has(:is([aria-checked='true'], [aria-checked='mixed']))) {
|
|
67
|
-
border-color: var(--et-theme-color-
|
|
67
|
+
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/* Each host resets its own control's focus ring, so the card shows one ring. */
|
|
71
71
|
&:where(:focus-visible, :has(:focus-visible)) {
|
|
72
|
-
border-color: var(--et-theme-color-
|
|
73
|
-
outline: 2px solid
|
|
74
|
-
light-dark(var(--et-theme-color-ink-solid, currentColor), var(--et-theme-color-primary-solid, currentColor));
|
|
72
|
+
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
73
|
+
outline: 2px solid var(--et-theme-color-ink-solid, currentColor);
|
|
75
74
|
outline-offset: 2px;
|
|
76
75
|
}
|
|
77
76
|
|
|
@@ -74,11 +74,23 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.et-checkbox-group-select-all:focus-visible .et-checkbox-group-select-all-box {
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
78
|
+
outline: 2px solid var(--et-theme-color-ink-solid, currentColor);
|
|
79
79
|
outline-offset: 2px;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
.et-checkbox-group-select-all:is([aria-checked='true'], [aria-checked='mixed']):not(:focus-visible)
|
|
83
|
+
.et-checkbox-group-select-all-box {
|
|
84
|
+
outline: 1px solid light-dark(var(--et-theme-color-ink-solid), transparent);
|
|
85
|
+
outline-offset: -1px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@media (hover: hover) {
|
|
89
|
+
.et-checkbox-group-select-all:is([aria-checked='true'], [aria-checked='mixed']):hover {
|
|
90
|
+
--et-theme-color-primary-rgb: var(--et-color-primary-active);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
82
94
|
.et-checkbox-group-select-all:active:not([aria-disabled='true']):not([aria-readonly='true'])
|
|
83
95
|
.et-checkbox-group-select-all-box {
|
|
84
96
|
transform: scale(0.92);
|
|
@@ -100,13 +100,6 @@
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
&:focus-visible .et-checkbox-option-box {
|
|
104
|
-
border-color: var(--et-theme-color-primary-solid);
|
|
105
|
-
outline: 2px solid
|
|
106
|
-
light-dark(var(--et-theme-color-ink-solid, currentColor), var(--et-theme-color-primary-solid, currentColor));
|
|
107
|
-
outline-offset: 2px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
103
|
&:active:not([aria-disabled='true']):not([data-readonly]) .et-checkbox-option-box {
|
|
111
104
|
transform: scale(0.92);
|
|
112
105
|
}
|
|
@@ -121,6 +114,17 @@
|
|
|
121
114
|
}
|
|
122
115
|
}
|
|
123
116
|
|
|
117
|
+
&[aria-checked='true']:not(:focus-visible) .et-checkbox-option-box {
|
|
118
|
+
outline: 1px solid light-dark(var(--et-theme-color-ink-solid), transparent);
|
|
119
|
+
outline-offset: -1px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@media (hover: hover) {
|
|
123
|
+
&[aria-checked='true']:hover {
|
|
124
|
+
--et-theme-color-primary-rgb: var(--et-color-primary-active);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
124
128
|
&[aria-checked='true'] .et-checkbox-option-box {
|
|
125
129
|
background-color: var(--et-theme-color-primary-solid, currentColor);
|
|
126
130
|
border-color: var(--et-theme-color-primary-solid, currentColor);
|
|
@@ -134,6 +138,12 @@
|
|
|
134
138
|
}
|
|
135
139
|
}
|
|
136
140
|
|
|
141
|
+
&:focus-visible .et-checkbox-option-box {
|
|
142
|
+
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
143
|
+
outline: 2px solid var(--et-theme-color-ink-solid, currentColor);
|
|
144
|
+
outline-offset: 2px;
|
|
145
|
+
}
|
|
146
|
+
|
|
137
147
|
&[data-can-animate] {
|
|
138
148
|
.et-checkbox-option-box {
|
|
139
149
|
transition:
|
|
@@ -98,9 +98,8 @@
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
&:focus-visible .et-radio-circle {
|
|
101
|
-
border-color: var(--et-theme-color-primary-solid);
|
|
102
|
-
outline: 2px solid
|
|
103
|
-
light-dark(var(--et-theme-color-ink-solid, currentColor), var(--et-theme-color-primary-solid, currentColor));
|
|
101
|
+
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
102
|
+
outline: 2px solid var(--et-theme-color-ink-solid, currentColor);
|
|
104
103
|
outline-offset: 2px;
|
|
105
104
|
}
|
|
106
105
|
|
|
@@ -119,11 +118,19 @@
|
|
|
119
118
|
}
|
|
120
119
|
|
|
121
120
|
&[aria-checked='true'] .et-radio-circle {
|
|
122
|
-
border-color: var(--et-theme-color-
|
|
121
|
+
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
123
122
|
background-color: transparent;
|
|
124
123
|
|
|
125
124
|
&::after {
|
|
126
125
|
transform: scale(1);
|
|
126
|
+
outline: 1px solid light-dark(var(--et-theme-color-ink-solid), transparent);
|
|
127
|
+
outline-offset: -1px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media (hover: hover) {
|
|
132
|
+
&[aria-checked='true']:hover {
|
|
133
|
+
--et-theme-color-primary-rgb: var(--et-color-primary-active);
|
|
127
134
|
}
|
|
128
135
|
}
|
|
129
136
|
|
|
@@ -107,6 +107,18 @@
|
|
|
107
107
|
content: attr(data-mark);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
.et-match-participant:has(> [etMatchParticipantEdit]:not([etMatchParticipantEdit='beside']))
|
|
111
|
+
.et-match-participant-names,
|
|
112
|
+
.et-match-participant:has(> [etMatchParticipantEdit]:not([etMatchParticipantEdit='beside']))
|
|
113
|
+
.et-match-participant-name-bone {
|
|
114
|
+
display: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.et-match-participant > [etMatchParticipantEdit] {
|
|
118
|
+
flex: 1;
|
|
119
|
+
min-inline-size: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
110
122
|
/* One column for the two lines, so the emblem stays centred against both of them. */
|
|
111
123
|
.et-match-participant-names {
|
|
112
124
|
display: flex;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@layer components.sdk {
|
|
2
|
+
@property --et-match-scoreline-score-font-size {
|
|
3
|
+
syntax: '<length>';
|
|
4
|
+
inherits: true;
|
|
5
|
+
initial-value: 16px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@property --et-match-scoreline-score-font-weight {
|
|
9
|
+
syntax: '<number>';
|
|
10
|
+
inherits: true;
|
|
11
|
+
initial-value: 700;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@property --et-match-scoreline-time-font-size {
|
|
15
|
+
syntax: '<length>';
|
|
16
|
+
inherits: true;
|
|
17
|
+
initial-value: 10px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@property --et-match-scoreline-gap {
|
|
21
|
+
syntax: '<length>';
|
|
22
|
+
inherits: true;
|
|
23
|
+
initial-value: 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.et-match-scoreline {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: var(--et-match-scoreline-gap);
|
|
31
|
+
color: var(--et-surface-color-solid, currentColor);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.et-match-scoreline-scores {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 4px;
|
|
38
|
+
font-size: var(--et-match-scoreline-score-font-size);
|
|
39
|
+
font-weight: var(--et-match-scoreline-score-font-weight);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.et-match-scoreline-separator {
|
|
43
|
+
color: var(--et-surface-color-muted-solid, currentColor);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.et-match-scoreline-time {
|
|
47
|
+
font-size: var(--et-match-scoreline-time-font-size);
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
letter-spacing: 0.03em;
|
|
50
|
+
text-transform: uppercase;
|
|
51
|
+
color: var(--et-surface-color-muted-solid, currentColor);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
@layer components.sdk {
|
|
2
|
+
@property --et-scrollable-buttons-offset {
|
|
3
|
+
syntax: '<length>';
|
|
4
|
+
inherits: true;
|
|
5
|
+
initial-value: 0px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@property --et-scrollable-buttons-end-space {
|
|
9
|
+
syntax: '<length>';
|
|
10
|
+
inherits: true;
|
|
11
|
+
initial-value: 0px;
|
|
12
|
+
}
|
|
13
|
+
|
|
2
14
|
.et-scrollable-buttons {
|
|
3
15
|
grid-row: 1 / 1;
|
|
4
16
|
grid-column: 1 / 1;
|
|
@@ -16,7 +28,7 @@
|
|
|
16
28
|
&:not([direction]) {
|
|
17
29
|
& .et-scrollable-button--start {
|
|
18
30
|
inset-block-start: calc(50% - var(--_et-scrollable-button-extent) / 2);
|
|
19
|
-
inset-inline:
|
|
31
|
+
inset-inline: var(--et-scrollable-buttons-offset) 0;
|
|
20
32
|
transform: translateX(-10px);
|
|
21
33
|
|
|
22
34
|
& .et-icon--et-chevron {
|
|
@@ -26,7 +38,7 @@
|
|
|
26
38
|
|
|
27
39
|
& .et-scrollable-button--end {
|
|
28
40
|
inset-block-start: calc(50% - var(--_et-scrollable-button-extent) / 2);
|
|
29
|
-
inset-inline: calc(100% - var(--_et-scrollable-button-extent)) 0;
|
|
41
|
+
inset-inline: calc(100% - var(--_et-scrollable-button-extent) - var(--et-scrollable-buttons-offset)) 0;
|
|
30
42
|
transform: translateX(10px);
|
|
31
43
|
|
|
32
44
|
& .et-icon--et-chevron {
|
|
@@ -37,7 +49,7 @@
|
|
|
37
49
|
|
|
38
50
|
&[direction='vertical'] {
|
|
39
51
|
& .et-scrollable-button--start {
|
|
40
|
-
inset-block-start:
|
|
52
|
+
inset-block-start: var(--et-scrollable-buttons-offset);
|
|
41
53
|
inset-inline-start: calc(50% - var(--_et-scrollable-button-extent) / 2);
|
|
42
54
|
transform: translateY(-10px);
|
|
43
55
|
|
|
@@ -47,7 +59,7 @@
|
|
|
47
59
|
}
|
|
48
60
|
|
|
49
61
|
& .et-scrollable-button--end {
|
|
50
|
-
inset-block-end:
|
|
62
|
+
inset-block-end: var(--et-scrollable-buttons-offset);
|
|
51
63
|
inset-inline-start: calc(50% - var(--_et-scrollable-button-extent) / 2);
|
|
52
64
|
transform: translateY(10px);
|
|
53
65
|
|
|
@@ -85,6 +97,17 @@
|
|
|
85
97
|
}
|
|
86
98
|
}
|
|
87
99
|
|
|
100
|
+
&:has(.et-scrollable-buttons--inside) {
|
|
101
|
+
&[direction='horizontal'] > .et-scrollable-wrapper > .et-scrollable-container,
|
|
102
|
+
&:not([direction]) > .et-scrollable-wrapper > .et-scrollable-container {
|
|
103
|
+
padding-inline-end: var(--et-scrollable-buttons-end-space);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&[direction='vertical'] > .et-scrollable-wrapper > .et-scrollable-container {
|
|
107
|
+
padding-block-end: var(--et-scrollable-buttons-end-space);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
88
111
|
&.et-scrollable--sticky-buttons {
|
|
89
112
|
--_sticky-margin: 10%;
|
|
90
113
|
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
border: none;
|
|
30
30
|
border-radius: 4px;
|
|
31
31
|
cursor: pointer;
|
|
32
|
+
transition: background-color 120ms var(--ease-3, ease-out);
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
.et-table-expander:hover,
|
|
@@ -36,6 +37,10 @@
|
|
|
36
37
|
background: color-mix(in srgb, var(--et-surface-interaction-solid, gray) 12%, transparent);
|
|
37
38
|
}
|
|
38
39
|
|
|
40
|
+
.et-table-expander:active {
|
|
41
|
+
background: color-mix(in srgb, var(--et-surface-interaction-solid, gray) 24%, transparent);
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
/* The shared `et-chevron` points up, and the expander wants it pointing at what it opens: right
|
|
40
45
|
while collapsed, down once open. Rotating (rather than swapping icons) is what makes the turn
|
|
41
46
|
animatable. */
|
|
@@ -51,6 +56,7 @@
|
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
.et-table-expander,
|
|
54
60
|
.et-table-expander-icon {
|
|
55
61
|
transition: none;
|
|
56
62
|
}
|