@ethlete/components 1.0.0-next.93 → 1.0.0-next.95
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 +30 -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/design/select.ts +2 -2
- package/fesm2022/ethlete-components.mjs +331 -95
- 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-card.component.css +10 -1
- package/src/lib/match/match-participant.component.css +36 -0
- package/src/lib/picture/picture.component.css +15 -0
- package/src/lib/scrollable/headless/scrollable-buttons.component.css +33 -5
- package/src/lib/scrollable/headless/scrollable-masks.component.css +18 -3
- package/src/lib/scrollable/scrollable.component.css +0 -1
- package/src/lib/table/table-expander-cell.component.css +6 -0
- package/types/ethlete-components.d.ts +145 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.0-next.95
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Match card: `showStartTime` keeps the kick-off in the compact row, and `MatchLabels` gains `tbdHome` / `tbdAway` for per-side empty-slot labels (`et-match-participant` takes a `side` input).
|
|
8
|
+
- Add `emblemFallback` (`'initial' | 'shield'`) to `et-match-participant` and `et-match-card`, plus `provideMatchDefaults`. `'shield'` replaces the initial's circle with a neutral crest outline holding the initial.
|
|
9
|
+
- Add `--et-picture-img-transform` and `--et-picture-img-transition` to `et-picture`, so a hover zoom can transform only the inner image while the picture clips it.
|
|
10
|
+
- Add the `--et-scrollable-mask-size` custom property for the et-scrollable edge fade, with the legacy `--mask-size` as fallback, and a `buttons.maskSize` default in `provideScrollableConfig`.
|
|
11
|
+
- Add the `--et-scrollable-buttons-extent` custom property to size the et-scrollable button box independently of the fill. Fix `--et-scrollable-buttons-end-space` applying always: it now applies only while the list can scroll and is not at the end.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- The clear (×) button of `etInputClear`, select, phone, date, time, date-time, date-range, time-range, date-time-range, duration and cascader inputs now shows whenever the field has a value and is interactive, not only while focused.
|
|
16
|
+
- Float the form-field label while a single et-select shows its null option. The clear button stays hidden for it.
|
|
17
|
+
|
|
18
|
+
## 1.0.0-next.94
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- Export `FocusRingStylesComponent` from the public API and document the `--et-focus-ring-color`, `--et-focus-ring-offset` and `--et-focus-ring-width` tokens on it.
|
|
23
|
+
- `et-form-field` has a `variant` input. `variant="ghost"` draws a select (and other text controls) without a resting border and with a muted value, for toolbars and table cells.
|
|
24
|
+
- `provideScrollableConfig` takes `buttons.color` and `buttons.variant` as app-wide defaults for the scroll buttons (the `color` input still wins), and the `'inside'` buttons expose `--et-scrollable-buttons-offset` and `--et-scrollable-buttons-end-space` custom properties.
|
|
25
|
+
- Add a per-instance `scrollableButtons` input to tab groups and nav tabs; `[etScrollableButtons]` breakpoint maps now hide the buttons below their lowest breakpoint instead of showing them.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Carousel dots get a pressed look and the selected dot keeps its accent under hover and press. The table expander fades its background and gets a pressed look.
|
|
30
|
+
- Filled buttons now press near their rest colour.
|
|
31
|
+
- Checkbox, radio, checkbox group and selection cards now draw their focus ring, checked border and checked hover with the ink colour.
|
|
32
|
+
|
|
3
33
|
## 1.0.0-next.93
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
|
@@ -7,15 +7,17 @@ import {
|
|
|
7
7
|
bracketParticipants,
|
|
8
8
|
bracketStyles,
|
|
9
9
|
} from '@ethlete/components/design/bracket';
|
|
10
|
-
import { definePart, drawing } from '@design-system';
|
|
10
|
+
import { definePart, drawing, interactionRows } from '@design-system';
|
|
11
11
|
import frame from './bracket.css?inline';
|
|
12
12
|
|
|
13
|
+
type Interaction = 'hover' | 'active' | 'focus-visible';
|
|
14
|
+
|
|
13
15
|
type Props = {
|
|
14
16
|
stage: 'in-progress' | 'decided' | 'groups-done';
|
|
15
17
|
density?: 'compact';
|
|
16
18
|
mirrored?: boolean;
|
|
17
19
|
journey?: { participantId: string; pinned?: boolean };
|
|
18
|
-
legend?: { focused?: string; focusVisible?: string };
|
|
20
|
+
legend?: { focused?: string; focusVisible?: string; forced?: { participantId: string; interaction: Interaction } };
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
const NBR: BracketMockParticipant = { id: 'nbr', name: 'Northbridge Rovers', code: 'NBR', seed: 1 };
|
|
@@ -77,18 +79,40 @@ const roundsOf = (stage: Props['stage']): BracketMockRound[] => {
|
|
|
77
79
|
];
|
|
78
80
|
};
|
|
79
81
|
|
|
82
|
+
const MARK = 'data-et-control="legend-toggle" data-can-animate';
|
|
83
|
+
|
|
80
84
|
const legendOf = (legend: NonNullable<Props['legend']>) => {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
const forced =
|
|
86
|
+
legend.forced ??
|
|
87
|
+
(legend.focusVisible ? { participantId: legend.focusVisible, interaction: 'focus-visible' as const } : undefined);
|
|
88
|
+
const name = PARTICIPANTS.find((participant) => participant.id === forced?.participantId)?.name;
|
|
89
|
+
|
|
90
|
+
return bracketParticipants({ participants: PARTICIPANTS, focusedParticipantId: legend.focused })
|
|
91
|
+
.replaceAll('<button ', `<button ${MARK} `)
|
|
92
|
+
.replace(
|
|
93
|
+
new RegExp(`<button ${MARK} ([^>]*)><div class="et-button-icon"></div><div class="et-button-contents">${name}<`),
|
|
94
|
+
`<button ${MARK} data-et-force="${forced?.interaction}" $1><div class="et-button-icon"></div><div class="et-button-contents">${name}<`,
|
|
95
|
+
);
|
|
90
96
|
};
|
|
91
97
|
|
|
98
|
+
const { states: interactionStates, grid } = interactionRows<
|
|
99
|
+
Props,
|
|
100
|
+
'legend-toggle' | 'legend-toggle-pressed',
|
|
101
|
+
Interaction
|
|
102
|
+
>(
|
|
103
|
+
{
|
|
104
|
+
'legend-toggle': { stage: 'decided', legend: {} },
|
|
105
|
+
'legend-toggle-pressed': { stage: 'decided', legend: { focused: 'evu' } },
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
interactions: ['hover', 'active', 'focus-visible'],
|
|
109
|
+
force: (props, interaction) => ({
|
|
110
|
+
...props,
|
|
111
|
+
legend: { ...props.legend, forced: { participantId: 'evu', interaction } },
|
|
112
|
+
}),
|
|
113
|
+
},
|
|
114
|
+
);
|
|
115
|
+
|
|
92
116
|
const render = (props: Props) => {
|
|
93
117
|
const options: BracketMockOptions = {
|
|
94
118
|
rounds: roundsOf(props.stage),
|
|
@@ -106,7 +130,7 @@ const render = (props: Props) => {
|
|
|
106
130
|
export default definePart({
|
|
107
131
|
note: "The SDK bracket (et-bracket) in flow, first drawing, drawn by the mock from @ethlete/components/design/bracket with the real markup and CSS: the bracket, its default round header, default match cell (et-match-card at compact), default final card (trophy, round name, champion line), continue cell and participants legend sheets, plus the match card, icon and button sheets; cell positions and connector paths come from @ethlete/bracket (createBracket, the single elimination grid, drawMan) as in the lib; default settings and labels, en-US kick-off. Emblems are the participant's letter fallback; the move transitions at rest. Fixtures are fictional: an eight-club single elimination knockout (Northbridge Rovers NBR 1, Harbor City HBC 2, Eastvale United EVU 3, Millbrook Athletic MBA 4, Riverside Wanderers RSW 5, Stonegate FC SGF 6, Westport Albion WPA 7, Lakeside Town LST 8) over Quarter-finals, Semi-finals and Final; the brand theme only. Framed as a page with 16px padding at 1040 and 1680 (the default bracket is 980px wide, the grid does not follow the frame width). States: in-progress (quarter-finals and one semi-final finished, the other semi-final live 1 : 1 with the LIVE badge, the final with Northbridge Rovers against TBD and the kick-off, champion not decided), decided (Westport Albion beat Northbridge Rovers 2 : 1, the champion line), journey-hover (the hover journey of Riverside Wanderers: the rest at half opacity, the semi-final where they went out dashed and their row struck through), journey-pinned (the pinned journey of the champion with the participants legend, its toggle pressed; the rest at a quarter opacity), legend-focus-visible (the Eastvale United toggle forced), compact (density compact, in-progress), continue (quarter-finals and semi-finals with the continue cell, 2 winners advance, dashed connectors) and mirrored (decided, folded in half, compact, so it fits 1040). Numbers (light / dark), from shot pixels at scale 2 at 1040, brand mint, a: winner bar (primary) vs card 1.33 / 13.50; live dot (primary) vs its badge tint 1.24 / 9.67, vs card 1.33 / 13.28; badge tint vs card 1.07 / 1.37; final frame edge (45 % mint) vs page 1.22 / 3.90, vs the glow beside it 1.15 / 2.98, vs its own tint 1.18 / 3.50; the final tint (6 %) vs page 1.03 / 1.11; pressed legend toggle (mint fill) vs page 1.33 / 13.50, its label 15.82 / 15.82; legend toggle focus ring (primary) vs page 1.37 / 13.06; outline toggle edge and label (ink) 7.68 light. Q98 numbers only: connectors, card edges, the continue cell's dashed edge and the journey endpoint's dashed outline vs page 1.26 / 1.73. The journey dimming lowers text under 4.5:1 by design: at half opacity the check reports a dimmed winner code at 3.41 / 2.68 and the dimmed Final label at 2.14 / 3.93, at a quarter opacity 1.73 / 2.21, the struck-through row that went out (0.55 opacity) 2.62 / 2.98; exempted with contrast exceptions, an open point, no decided rule. Decided rules that arise: Q88 (the legend toggle focus ring; the default cells are not links, so no card ring) and Q99a (the winner bar, the live dot and the final frame edge take ink in light; the pressed legend toggle is a mint fill, so it takes a 1px inset ink edge). The ink edge on a mint fill arises, so Q102 arises: b draws the edge in both schemes, c keeps dark as today (light-dark(ink, transparent)). The badge tint and the final tint are band tints, not fills, so they are kept, and the final glow is kept. Q101 does not arise: the only filled button is a pressed toggle, whose hover keeps the fill in the lib. Findings for later: (1) lib bug: the live meta row grows the bracket's compact card past matchHeight: the live semi-final is 87px tall in its 75px cell (65 in 52 at compact), so it hangs 12px (13px) below its cell, the incoming connector meets it 6px above its centre and the gap to the card below shrinks. Drawn as is in every variant. (2) In the mirrored compact layout the final card in its 200px column shows full names and cuts the loser ('Northbridge Rove…') next to the score, where every other compact cell shows codes. (3) The eliminated row's line-through also strikes the emblem letter and the score. (4) The lit journey path keeps the grey connector colour (1.26 / 1.73), so it reads only by the rest fading; the dimmed text is under 4.5:1 (numbers above). (5) In dark the final glow lightens the page beside the frame edge, so the edge drops from 3.90 against the bare page to 2.98 against the glow. Later rounds, left out here: double elimination, swiss and round robin layouts, the third-place match, the mirrored layout at default density, the rounds list and adaptive layout, the skeleton, the prediction pick card, a custom match component on a link (card hover and focus ring), emblems as images, scheduled cells with kick-off times, long names, RTL and the move transitions. Omitted option value (Q182): alignRoundHeaders center draws the same pixels as start, because the default round header fills its column and is already centred.",
|
|
108
132
|
consumerAction: 'a press on a team runs the handler the consumer binds',
|
|
109
|
-
madeBy: ['claude-opus-5-5'],
|
|
133
|
+
madeBy: ['claude-opus-5-5', 'design check'],
|
|
110
134
|
states: {
|
|
111
135
|
'in-progress': { stage: 'in-progress' },
|
|
112
136
|
decided: { stage: 'decided' },
|
|
@@ -116,7 +140,7 @@ export default definePart({
|
|
|
116
140
|
journey: { participantId: 'wpa', pinned: true },
|
|
117
141
|
legend: { focused: 'wpa' },
|
|
118
142
|
},
|
|
119
|
-
|
|
143
|
+
...interactionStates,
|
|
120
144
|
compact: { stage: 'in-progress', density: 'compact' },
|
|
121
145
|
continue: { stage: 'groups-done' },
|
|
122
146
|
mirrored: { stage: 'decided', density: 'compact', mirrored: true },
|
|
@@ -129,14 +153,26 @@ export default definePart({
|
|
|
129
153
|
'The hover journey of Riverside Wanderers; check that the rest dims and their lost semi-final is dashed and struck through.',
|
|
130
154
|
'journey-pinned':
|
|
131
155
|
'The pinned journey of the champion with the legend; check the pressed toggle and the rest at a quarter opacity.',
|
|
132
|
-
'legend-
|
|
133
|
-
|
|
156
|
+
'legend-toggle': 'The legend with every toggle at rest; check the outline edge and label against the other looks.',
|
|
157
|
+
'legend-toggle-hover': 'The Eastvale United toggle hovered; check its hover tint.',
|
|
158
|
+
'legend-toggle-active': 'The Eastvale United toggle pressed; check that it goes past hover.',
|
|
159
|
+
'legend-toggle-focus-visible':
|
|
160
|
+
'The Eastvale United toggle under keyboard focus; check the focus ring in the primary colour.',
|
|
161
|
+
'legend-toggle-pressed': 'The legend with Eastvale United pinned; check the filled toggle and the dimmed rest.',
|
|
162
|
+
'legend-toggle-pressed-hover': 'The pinned Eastvale United toggle hovered; check that it keeps its fill.',
|
|
163
|
+
'legend-toggle-pressed-active': 'The pinned Eastvale United toggle pressed; check the press look on the fill.',
|
|
164
|
+
'legend-toggle-pressed-focus-visible':
|
|
165
|
+
'The pinned Eastvale United toggle under keyboard focus; check the ring around the fill.',
|
|
134
166
|
compact:
|
|
135
167
|
'The in-progress bracket at compact density; check that cells shrink and the live card still fits its cell.',
|
|
136
168
|
continue:
|
|
137
169
|
'Quarter- and semi-finals with the continue cell; check the dashed connectors and the 2 winners advance cell.',
|
|
138
170
|
mirrored: 'The decided bracket folded in half at compact density; check that both halves meet at the final card.',
|
|
139
171
|
},
|
|
172
|
+
grid,
|
|
173
|
+
controls: {
|
|
174
|
+
'legend-toggle': { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
175
|
+
},
|
|
140
176
|
widths: [1040, 1680],
|
|
141
177
|
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
142
178
|
render: (props: Props) =>
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.et-button {
|
|
3
|
-
--_et-focus-ring-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.et-button:where([data-variant='filled']):not([disabled], [aria-disabled='true']):active {
|
|
7
|
-
--_et-button-background: color-mix(
|
|
8
|
-
in srgb,
|
|
9
|
-
rgb(var(--et-color-primary)) 96%,
|
|
10
|
-
var(--et-theme-color-on-primary-solid)
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
2
|
.et-icon-button:where([data-variant='filled']) {
|
|
15
3
|
--et-button-shadow: inset 0 0 0 1px light-dark(var(--et-theme-color-ink-solid), transparent);
|
|
16
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { carousel, carouselStyles, type CarouselMockOptions } from '@ethlete/components/design/carousel';
|
|
2
|
-
import { definePart, drawing } from '@design-system';
|
|
2
|
+
import { definePart, drawing, interactionRows } from '@design-system';
|
|
3
3
|
import frame from './carousel.css?inline';
|
|
4
4
|
|
|
5
5
|
type Interaction = 'hover' | 'active' | 'focus-visible';
|
|
@@ -10,14 +10,16 @@ type Props = Omit<CarouselMockOptions, 'slides'> & {
|
|
|
10
10
|
previous?: Interaction;
|
|
11
11
|
next?: Interaction;
|
|
12
12
|
playToggle?: Interaction;
|
|
13
|
-
dot?: { index: number; interaction
|
|
13
|
+
dot?: { index: number; interaction?: Interaction };
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const TITLES = ['Kick-off', 'First half', 'Half time', 'Second half', 'Full time'];
|
|
17
17
|
const LONG_CAPTION =
|
|
18
18
|
'A long caption that wraps over several lines inside the slide, the way a match report teaser runs on past a single line of text.';
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const mark = (name: string, action: string) => `data-et-control="${name}" data-et-action="${action}" data-can-animate`;
|
|
21
|
+
|
|
22
|
+
const INDEX_CHANGE = 'emit:activeIndexChange';
|
|
21
23
|
|
|
22
24
|
const force = (interaction: Interaction | undefined) => (interaction ? `data-et-force="${interaction}"` : '');
|
|
23
25
|
|
|
@@ -30,13 +32,13 @@ const render = ({ count = 5, longCaption = false, previous, next, playToggle, do
|
|
|
30
32
|
carousel({
|
|
31
33
|
...options,
|
|
32
34
|
slides: Array.from({ length: count }, (_, index) => ({ content: slideContent(index, count, longCaption) })),
|
|
33
|
-
previousAttributes: `${INDEX_CHANGE} ${force(previous)}`,
|
|
34
|
-
nextAttributes: `${INDEX_CHANGE} ${force(next)}`,
|
|
35
|
-
playToggleAttributes:
|
|
35
|
+
previousAttributes: `${mark('arrow', INDEX_CHANGE)} ${force(previous)}`,
|
|
36
|
+
nextAttributes: `${mark('arrow', INDEX_CHANGE)} ${force(next)}`,
|
|
37
|
+
playToggleAttributes: `${mark('play-toggle', options.playing === false ? 'autoplay-playing' : 'autoplay-paused')} ${force(playToggle)}`,
|
|
36
38
|
dotAttributes: Object.fromEntries(
|
|
37
39
|
Array.from({ length: count }, (_, index) => [
|
|
38
40
|
index,
|
|
39
|
-
`${INDEX_CHANGE} ${dot?.index === index ? force(dot.interaction) : ''}`,
|
|
41
|
+
`${mark('dot', INDEX_CHANGE)} ${dot?.index === index ? force(dot.interaction) : ''}`,
|
|
40
42
|
]),
|
|
41
43
|
),
|
|
42
44
|
}).replaceAll(
|
|
@@ -44,6 +46,23 @@ const render = ({ count = 5, longCaption = false, previous, next, playToggle, do
|
|
|
44
46
|
'data-et-skip="CLIPPED" class="et-carousel-dot-progress-half"',
|
|
45
47
|
);
|
|
46
48
|
|
|
49
|
+
const { states: interactionStates, grid } = interactionRows<Props, 'arrow' | 'dot' | 'play-toggle', Interaction>(
|
|
50
|
+
{
|
|
51
|
+
arrow: { active: 2 },
|
|
52
|
+
dot: { active: 2, dot: { index: 3 } },
|
|
53
|
+
'play-toggle': { active: 1, autoplay: true },
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
interactions: ['hover', 'active', 'focus-visible'],
|
|
57
|
+
force: (props, interaction) => ({
|
|
58
|
+
...props,
|
|
59
|
+
...(props.dot ? { dot: { ...props.dot, interaction } } : {}),
|
|
60
|
+
...(props.autoplay ? { playToggle: interaction } : {}),
|
|
61
|
+
...(!props.dot && !props.autoplay ? { next: interaction } : {}),
|
|
62
|
+
}),
|
|
63
|
+
},
|
|
64
|
+
);
|
|
65
|
+
|
|
47
66
|
export default definePart({
|
|
48
67
|
note: 'scale of the decided shape, Q182, lead merge',
|
|
49
68
|
madeBy: ['claude-opus-5-5'],
|
|
@@ -53,17 +72,11 @@ export default definePart({
|
|
|
53
72
|
'last-slide': { active: 4 },
|
|
54
73
|
'no-loop-first': { loop: false },
|
|
55
74
|
'no-loop-last': { loop: false, active: 4 },
|
|
56
|
-
|
|
57
|
-
'next-active': { active: 2, next: 'active' },
|
|
58
|
-
'next-focus-visible': { active: 2, next: 'focus-visible' },
|
|
59
|
-
'dot-hover': { active: 2, dot: { index: 3, interaction: 'hover' } },
|
|
75
|
+
...interactionStates,
|
|
60
76
|
'active-dot-hover': { active: 2, dot: { index: 2, interaction: 'hover' } },
|
|
61
|
-
'dot-focus-visible': { active: 2, dot: { index: 3, interaction: 'focus-visible' } },
|
|
62
77
|
'active-dot-focus-visible': { active: 2, dot: { index: 2, interaction: 'focus-visible' } },
|
|
63
78
|
'autoplay-playing': { active: 1, autoplay: true },
|
|
64
79
|
'autoplay-paused': { active: 1, autoplay: true, playing: false },
|
|
65
|
-
'play-toggle-hover': { active: 1, autoplay: true, playToggle: 'hover' },
|
|
66
|
-
'play-toggle-focus-visible': { active: 1, autoplay: true, playToggle: 'focus-visible' },
|
|
67
80
|
'multiple-items': { itemSize: 'half', slideGap: 16, active: 1 },
|
|
68
81
|
'item-size-third': { itemSize: 'third', slideGap: 16, active: 1 },
|
|
69
82
|
'center-aligned': { itemSize: 'half', slideGap: 16, slideAlign: 'center', active: 2 },
|
|
@@ -72,23 +85,28 @@ export default definePart({
|
|
|
72
85
|
'single-slide': { count: 1 },
|
|
73
86
|
},
|
|
74
87
|
describe: {
|
|
88
|
+
arrow: 'The next arrow at rest; check its tint and size against the hover, pressed and focus looks.',
|
|
89
|
+
'arrow-hover': 'The next arrow hovered; check its hover tint.',
|
|
90
|
+
'arrow-active': 'The next arrow pressed; check that it goes past hover.',
|
|
91
|
+
'arrow-focus-visible': 'The next arrow with keyboard focus; check the focus ring around it.',
|
|
92
|
+
dot: 'The fourth dot at rest; check its tint and size against the hover, pressed and focus looks.',
|
|
93
|
+
'dot-hover': 'The fourth dot hovered; check its hover tint.',
|
|
94
|
+
'dot-active': 'The fourth dot pressed; check that it goes past hover.',
|
|
95
|
+
'dot-focus-visible': 'The fourth dot with keyboard focus; check the focus ring around the dot.',
|
|
96
|
+
'play-toggle': 'The play toggle at rest; check its tint and size against the hover, pressed and focus looks.',
|
|
97
|
+
'play-toggle-hover': 'The play toggle hovered; check its hover tint.',
|
|
98
|
+
'play-toggle-active': 'The play toggle pressed; check that it goes past hover.',
|
|
99
|
+
'play-toggle-focus-visible': 'The play toggle with keyboard focus; check the focus ring around it.',
|
|
75
100
|
'first-slide': 'The first of five slides with arrows and dots; check that the first dot is active.',
|
|
76
101
|
'middle-slide': 'The third slide active; check that the third dot is active and both arrows show.',
|
|
77
102
|
'last-slide': 'The fifth slide active; check the last dot and that next still shows for the loop.',
|
|
78
103
|
'no-loop-first': 'The first slide without loop; check that previous is disabled.',
|
|
79
104
|
'no-loop-last': 'The last slide without loop; check that next is disabled.',
|
|
80
|
-
'next-hover': 'The next arrow hovered; check its hover tint.',
|
|
81
|
-
'next-active': 'The next arrow pressed; check that it goes past hover.',
|
|
82
|
-
'next-focus-visible': 'The next arrow with keyboard focus; check the focus ring around it.',
|
|
83
|
-
'dot-hover': 'The fourth dot hovered; check its hover look against the active dot.',
|
|
84
105
|
'active-dot-hover': 'The active dot hovered; check that it keeps its active look.',
|
|
85
|
-
'dot-focus-visible': 'The fourth dot with keyboard focus; check the focus ring around the dot.',
|
|
86
106
|
'active-dot-focus-visible': 'The active dot with keyboard focus; check the ring around the active dot.',
|
|
87
107
|
'autoplay-playing':
|
|
88
108
|
'Autoplay running on the second slide; check the pause toggle and the progress in the active dot.',
|
|
89
109
|
'autoplay-paused': 'Autoplay paused; check the play icon and the halted progress.',
|
|
90
|
-
'play-toggle-hover': 'The play toggle hovered; check its hover tint.',
|
|
91
|
-
'play-toggle-focus-visible': 'The play toggle with keyboard focus; check the focus ring around it.',
|
|
92
110
|
'multiple-items': 'Two slides per view with a 16 px gap; check the gap and that both slides show whole.',
|
|
93
111
|
'item-size-third': 'Three slides per view; check that the slides share the width evenly.',
|
|
94
112
|
'center-aligned': 'Half-width slides centred on the third; check that the active slide sits in the middle.',
|
|
@@ -96,25 +114,40 @@ export default definePart({
|
|
|
96
114
|
'long-caption': 'A slide with a caption over several lines; check that the text wraps inside the slide.',
|
|
97
115
|
'single-slide': 'A carousel with one slide; check how arrows and dots show with nothing to move to.',
|
|
98
116
|
},
|
|
117
|
+
grid,
|
|
118
|
+
omits: [
|
|
119
|
+
{
|
|
120
|
+
option: 'itemSize',
|
|
121
|
+
value: 'full',
|
|
122
|
+
reason: 'The default size, which every other state draws without setting it.',
|
|
123
|
+
},
|
|
124
|
+
{ option: 'itemSize', value: 'half', reason: 'Drawn as the multiple-items state, outside the grid.' },
|
|
125
|
+
{ option: 'itemSize', value: 'third', reason: 'Drawn as the item-size-third state, outside the grid.' },
|
|
126
|
+
{
|
|
127
|
+
option: 'slideAlign',
|
|
128
|
+
value: 'start',
|
|
129
|
+
reason: 'The default alignment, which every other state draws without setting it.',
|
|
130
|
+
},
|
|
131
|
+
{ option: 'slideAlign', value: 'center', reason: 'Drawn as the center-aligned state, outside the grid.' },
|
|
132
|
+
],
|
|
133
|
+
controls: {
|
|
134
|
+
arrow: { kind: 'button', input: ['pointer', 'keyboard'], disabled: true },
|
|
135
|
+
dot: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
136
|
+
'play-toggle': { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
137
|
+
},
|
|
99
138
|
widths: [480],
|
|
100
139
|
frame: (body) => `<div class="carousel-frame">${body}</div>`,
|
|
101
140
|
scrolls: [
|
|
141
|
+
...(Object.keys(interactionStates) as (keyof typeof interactionStates)[]),
|
|
102
142
|
'first-slide',
|
|
103
143
|
'middle-slide',
|
|
104
144
|
'last-slide',
|
|
105
145
|
'no-loop-first',
|
|
106
146
|
'no-loop-last',
|
|
107
|
-
'next-hover',
|
|
108
|
-
'next-active',
|
|
109
|
-
'next-focus-visible',
|
|
110
|
-
'dot-hover',
|
|
111
147
|
'active-dot-hover',
|
|
112
|
-
'dot-focus-visible',
|
|
113
148
|
'active-dot-focus-visible',
|
|
114
149
|
'autoplay-playing',
|
|
115
150
|
'autoplay-paused',
|
|
116
|
-
'play-toggle-hover',
|
|
117
|
-
'play-toggle-focus-visible',
|
|
118
151
|
'multiple-items',
|
|
119
152
|
'item-size-third',
|
|
120
153
|
'center-aligned',
|
|
@@ -8,58 +8,3 @@
|
|
|
8
8
|
color: var(--et-surface-color-solid);
|
|
9
9
|
font-size: 1.4rem;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
@layer components {
|
|
13
|
-
et-checkbox.et-focus-ring,
|
|
14
|
-
et-choice-field[data-error]
|
|
15
|
-
et-checkbox.et-checkbox:focus-visible:not([aria-checked='true']):not([aria-checked='mixed']) {
|
|
16
|
-
--_et-focus-ring-color: var(--et-theme-color-ink-solid);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
et-checkbox:is([aria-checked='true'], [aria-checked='mixed']) .et-checkbox-box {
|
|
20
|
-
outline: 1px solid light-dark(var(--et-theme-color-ink-solid), transparent);
|
|
21
|
-
outline-offset: -1px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
et-choice-field[data-variant='card']
|
|
25
|
-
et-checkbox:focus-visible:not([aria-checked='true']):not([aria-checked='mixed'])
|
|
26
|
-
.et-checkbox-box {
|
|
27
|
-
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
et-choice-field
|
|
31
|
-
.et-selection-card:where([aria-checked='true'], :has(:is([aria-checked='true'], [aria-checked='mixed']))) {
|
|
32
|
-
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
et-choice-field .et-selection-card:where(:focus-visible, :has(:focus-visible)) {
|
|
36
|
-
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
37
|
-
outline-color: var(--et-theme-color-ink-solid);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
et-checkbox-option.et-checkbox-option:focus-visible .et-checkbox-option-box,
|
|
41
|
-
.et-checkbox-group-select-all.et-checkbox-group-select-all:focus-visible .et-checkbox-group-select-all-box {
|
|
42
|
-
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
43
|
-
outline-color: var(--et-theme-color-ink-solid);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
et-checkbox-option[aria-checked='true']:not(:focus-visible) .et-checkbox-option-box,
|
|
47
|
-
.et-checkbox-group-select-all:is([aria-checked='true'], [aria-checked='mixed']):not(:focus-visible)
|
|
48
|
-
.et-checkbox-group-select-all-box {
|
|
49
|
-
outline: 1px solid light-dark(var(--et-theme-color-ink-solid), transparent);
|
|
50
|
-
outline-offset: -1px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@media (hover: hover) {
|
|
54
|
-
et-checkbox:is([aria-checked='true'], [aria-checked='mixed']):hover,
|
|
55
|
-
.et-color-interactive-container:hover et-checkbox:is([aria-checked='true'], [aria-checked='mixed']),
|
|
56
|
-
et-checkbox-option[aria-checked='true']:hover,
|
|
57
|
-
.et-checkbox-group-select-all:is([aria-checked='true'], [aria-checked='mixed']):hover {
|
|
58
|
-
--et-theme-color-primary-rgb: var(--et-color-primary-active);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.et-label-required-marker {
|
|
63
|
-
color: var(--et-theme-color-ink-solid);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -92,7 +92,7 @@ const render = (props: Props) =>
|
|
|
92
92
|
export default definePart({
|
|
93
93
|
note: "The SDK checkbox (et-checkbox) in flow, first drawing, drawn by the mock from @ethlete/components/design/checkbox with the real markup and CSS: et-checkbox alone and inside et-choice-field (label, et-description, hint, error, required marker), the card variant (et-selection-card), and et-checkbox-group with et-checkbox-group-select-all and et-checkbox-option, plus the color-interactive and focus-ring sheets; the brand theme, danger as the error theme. Fixtures are fictional: a match-report preferences form (Send me the match report, One email per match, no ads., hint We send it after the final whistle.; I accept the terms of use, required, error Accept the terms to continue.; card Weekly digest, A summary of every match day, each Monday.; group Notify me about with All events over Kick-off, Goals, Half-time, Full-time; horizontal group Show matches: Home, Away, Neutral ground). Framed as a page with 16px padding at 360 and 640. States: a grid of unchecked, checked and indeterminate by rest, hover, focus-visible, active, disabled and readonly (all labelled); box-only (checked, no label); support (description and hint); invalid and invalid-focus-visible; card-rest, card-checked, card-hover, card-focus-visible, card-checked-focus-visible; group-unchecked, group-partial (2 of 4, select-all mixed), group-checked, group-option-hover, group-option-pressed (force hover and active), group-option-focus-visible, group-select-all-focus-visible and group-horizontal. Numbers (light / dark), from shot pixels at scale 2 at 360, brand mint, a: unchecked box border (surface border) vs page 1.26 / 1.73, the same for the option and select-all boxes and the card edge; hover border 10.37 / 13.07; checked and indeterminate fill (primary) vs page 1.33 / 13.50, check and dash on it 15.82; checked hover fill (-hover) 1.37 / 13.06, 1.03 from rest; active fill 2.24 / 8.01; focus-visible fill (-focus) 1.37 / 13.06; focus ring on a checked or indeterminate box (primary -focus) 1.37 / 13.06, on an unchecked box (surface text colour) 17.93 / 17.18; card checked edge and card ring (primary) 1.33 / 13.50; option and select-all ring 1.37 / 13.06; invalid box border (danger) 4.83 / 3.71, its focus ring (danger -focus) 6.47 / 2.77; disabled checked fill 2.20 / 1.70, disabled unchecked border 1.12 / 1.27 (exempt under 1.4.11). Decided rules that arise: Q88 (the checked and indeterminate ring, the invalid ring, the card ring, the option and select-all rings in ink; the unchecked ring is the surface text colour, not a primary ring, so it stays), Q99a (the card checked and focus edge and the focused option, select-all and card box borders take light-dark(ink, primary); the checked and indeterminate box, the checked option box and the checked or mixed select-all box are mint fills, so they take a 1px inset ink edge, an outline at -1px as in the table round; on the option and select-all the focus ring owns the outline, so the edge leaves while it shows) and Q101 (a filled checked or indeterminate box hovers to -active). The ink edge on a mint fill arises, so Q102 arises: b draws the edges in both schemes, c keeps dark as today (light-dark(ink, transparent)). The error border is the danger theme, not mint, and passes 3:1, so it is kept. Findings for later: (1) lib bug: .et-checkbox-box, .et-checkbox-option-box and .et-checkbox-group-select-all-box were content-box, so --et-checkbox-size 20px drew a 24px box (48 sheet px at scale 2) in an app without a global border-box reset, and the hint and error started 4px left of the label column. Fixed in the lib (box-sizing: border-box on the three boxes): every box draws 20px (40 sheet px), and the label, description and hint share one column (44 CSS px from the frame edge). (2) WCAG 1.4.11: the unchecked box border is 1.26 / 1.73 vs page, under 3:1; it is the only edge of an unchecked box (the same question as the switch off track, switch r1, open). Not drawn. (3) The required marker takes the error theme primary: 3.71:1 in dark, under 4.5:1; exempted here. (4) Focus-visible lightens the checked fill to -focus (1.37 vs page, light), so a focused checked box reads paler than at rest; the ink ring carries the state in b and c. (5) Readonly draws exactly like rest (no affordance by design); a checked readonly box cannot be told from an editable one. (6) Mock: et-description now has its own stylesheet (description.component.css, f5722a1f5), so the mock's inline copy can import it instead. Later rounds, left out here: the sizes sm and lg, the card with the control at start, a coloured (non-brand) checkbox, the group's bulk-edit mixed state (dashed option boxes, a primary mark that Q99a would reach), a disabled or readonly group, a group with error and the group card variant, long labels that wrap, RTL and the check and uncheck animation.",
|
|
94
94
|
consumerAction: 'a form control whose value the consumer binds',
|
|
95
|
-
madeBy: ['claude-opus-5-5', 'design check'],
|
|
95
|
+
madeBy: ['claude-opus-5-5', 'design check', 'claude-sonnet-5-5'],
|
|
96
96
|
states: {
|
|
97
97
|
...gridStates,
|
|
98
98
|
'box-only': { checkbox: { id: 'box-only', checked: true } },
|
|
@@ -84,6 +84,7 @@ export default definePart({
|
|
|
84
84
|
'focus-visible': 'An interactive finished match with keyboard focus; check that a focus ring wraps the whole card.',
|
|
85
85
|
},
|
|
86
86
|
widths: [280, 480, 720],
|
|
87
|
+
controls: {},
|
|
87
88
|
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
88
89
|
render: (props: Props) =>
|
|
89
90
|
drawing({
|
|
@@ -8,39 +8,3 @@
|
|
|
8
8
|
color: var(--et-surface-color-solid);
|
|
9
9
|
font-size: 1.4rem;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
@layer components {
|
|
13
|
-
et-radio:focus-visible .et-radio-circle {
|
|
14
|
-
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
15
|
-
outline-color: var(--et-theme-color-ink-solid);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
et-radio[aria-checked='true'] .et-radio-circle,
|
|
19
|
-
et-radio-group[data-mixed] .et-radio-circle {
|
|
20
|
-
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
et-radio[aria-checked='true'] .et-radio-circle::after {
|
|
24
|
-
outline: 1px solid light-dark(var(--et-theme-color-ink-solid), transparent);
|
|
25
|
-
outline-offset: -1px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
et-radio.et-selection-card:where([aria-checked='true']) {
|
|
29
|
-
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
et-radio.et-selection-card:where(:focus-visible) {
|
|
33
|
-
border-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
34
|
-
outline-color: var(--et-theme-color-ink-solid);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@media (hover: hover) {
|
|
38
|
-
et-radio[aria-checked='true']:hover {
|
|
39
|
-
--et-theme-color-primary-rgb: var(--et-color-primary-active);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.et-label-required-marker {
|
|
44
|
-
color: var(--et-theme-color-ink-solid);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -89,7 +89,7 @@ const INVALID = {
|
|
|
89
89
|
export default definePart({
|
|
90
90
|
note: 'The SDK radio group (et-radio-group with et-radio) in flow, first drawing, drawn by the mock from @ethlete/components/design/radio-group with the real markup and CSS: et-label, et-radio in the plain and the card variant (et-selection-card), et-description, et-form-support with hint and error, the required marker, plus the color-interactive sheet; the brand theme, danger as the error theme. Fixtures are fictional: a match reminder form (Kick-off reminder: One hour before, Fifteen minutes before, At kick-off; hint We send it as a push notification.; required with error Pick a reminder to continue.; mixed hint The selected matches disagree.; card group Match report format: Short, The score and the scorers. / Full, Every event, with the line-ups.; horizontal group Show matches at: Home, Away, Neutral ground; grid label Remind me one hour before). Framed as a page with 16px padding at 360 and 640. States: a grid of unchecked and checked by rest, hover, focus-visible, active, disabled and readonly (one-option groups); group-none, group-checked, group-support (descriptions and hint), group-option-hover, group-option-pressed, group-option-focus-visible, group-mixed (bulk edit, dashed circles), group-disabled, group-readonly, invalid, invalid-focus-visible, invalid-checked, group-horizontal, card-rest, card-checked, card-hover, card-focus-visible and card-checked-focus-visible. Numbers (light / dark), from shot pixels at scale 2 at 360, brand mint, a: circle 20px with a 2px border and a 10px dot (border-box, fixed in 00072d935); unchecked circle border (surface border) vs page 1.26 / 1.73; checked ring and dot (primary) 1.33 / 13.50; checked hover dot and ring (-hover via color-interactive; the lib hover rule skips a checked radio) 1.37 / 13.06, 1.03 from rest; active 2.24 / 8.01; focus ring and focused border (primary -focus), checked or unchecked, 1.37 / 13.06; card checked edge and ring (primary) 1.33 / 13.50; mixed dashed border (primary) 1.33 / 13.50; invalid circle border (danger) 4.83 / 3.71; disabled checked ring 2.12 / 1.65, disabled label 1.41 / 1.65 (exempt under 1.4.11). Decided rules that arise: Q88 (every radio focus ring in ink, the unchecked one too, since unlike the checkbox it is primary, not the surface text colour; the invalid ring takes the danger ink; the card ring in ink), Q99a (the checked circle border, the focused circle border, the mixed dashed border and the card checked and focus edge take light-dark(ink, primary); the checked dot is a mint fill, so it takes a 1px inset ink edge, an outline at -1px) and Q101 (a checked radio hovers to -active). The ink edge on a mint fill arises, so Q102 arises: b draws the dot edge in both schemes, c keeps dark as today (light-dark(ink, transparent)). The error border is the danger theme, not mint, and passes 3:1, so it is kept. Findings for later: no new lib CSS bug; the radio circle box-sizing bug is fixed (00072d935, measured 40 sheet px = 20px). (1) WCAG 1.4.11: the unchecked circle border is 1.26 / 1.73 vs page, under 3:1, the only edge of an unchecked radio (the same open question as the checkbox box and the switch off track). Not drawn. (2) The required marker takes the error theme primary: 3.71:1 in dark, under 4.5:1; exempted here as in checkbox r1. (3) A checked radio has no hover rule of its own; only color-interactive shifts it to -hover, 1.03 from rest, so hover on a checked radio is invisible in a; Q101 fixes it in b and c. (4) Readonly draws exactly like rest, as with the checkbox. (5) A disabled group dims its options (opacity 0.5 and the disabled label colour, both at once) but not the group label, which keeps 7.81 in light; the same holds for the checkbox group. Later rounds, left out here: the sizes sm and lg, the card with the control at start and the card slots, a coloured (non-brand) radio, the warning state, a disabled option inside an enabled group, a pending (aria-busy) group, long labels that wrap, RTL and the check animation.',
|
|
91
91
|
consumerAction: 'a form control whose value the consumer binds',
|
|
92
|
-
madeBy: ['claude-opus-5-5'],
|
|
92
|
+
madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
|
|
93
93
|
states: {
|
|
94
94
|
...gridStates,
|
|
95
95
|
'group-none': { group: reminderGroup(null) },
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { scrollable, scrollableStyles } from '@ethlete/components/design/scrollable';
|
|
2
|
-
import { definePart, drawing } from '@design-system';
|
|
2
|
+
import { definePart, drawing, interactionRows } from '@design-system';
|
|
3
3
|
import frame from './scrollable.css?inline';
|
|
4
4
|
|
|
5
5
|
type Position = 'start' | 'middle' | 'end';
|
|
6
|
-
type Interaction = 'hover' | 'active';
|
|
6
|
+
type Interaction = 'hover' | 'active' | 'focus-visible';
|
|
7
7
|
|
|
8
8
|
const ITEM_SIZES = ['same', 'full', 'half', 'third', 'quarter'] as const;
|
|
9
9
|
type ItemSize = (typeof ITEM_SIZES)[number];
|
|
@@ -70,7 +70,7 @@ const render = (props: Props) => {
|
|
|
70
70
|
itemSize: props.itemSize,
|
|
71
71
|
itemGap: GAP,
|
|
72
72
|
color: props.color,
|
|
73
|
-
endButtonAttributes: props.endButton ? `data-et-force="${props.endButton}"` :
|
|
73
|
+
endButtonAttributes: `data-et-control="end-button" data-can-animate ${props.endButton ? `data-et-force="${props.endButton}"` : ''}`,
|
|
74
74
|
containerAttributes: `style="--scrollable-offset: -${offset}px"`,
|
|
75
75
|
items: Array.from({ length: items }, (_, index) => ({
|
|
76
76
|
tag: 'button',
|
|
@@ -87,6 +87,14 @@ const render = (props: Props) => {
|
|
|
87
87
|
});
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
+
const { states: interactionStates, grid } = interactionRows<Props, 'end-button', Interaction>(
|
|
91
|
+
{ 'end-button': { position: 'middle' } },
|
|
92
|
+
{
|
|
93
|
+
interactions: ['hover', 'active', 'focus-visible'],
|
|
94
|
+
force: (props, interaction) => ({ ...props, endButton: interaction }),
|
|
95
|
+
},
|
|
96
|
+
);
|
|
97
|
+
|
|
90
98
|
export default definePart({
|
|
91
99
|
note: 'scale of the decided shape, Q182, lead merge',
|
|
92
100
|
consumerAction: 'the buttons inside are content the consumer projects',
|
|
@@ -98,8 +106,7 @@ export default definePart({
|
|
|
98
106
|
'vertical-start': { direction: 'vertical' },
|
|
99
107
|
'vertical-middle': { direction: 'vertical', position: 'middle' },
|
|
100
108
|
'vertical-end': { direction: 'vertical', position: 'end' },
|
|
101
|
-
|
|
102
|
-
'button-active': { position: 'middle', endButton: 'active' },
|
|
109
|
+
...interactionStates,
|
|
103
110
|
'border-mask': { position: 'middle', maskVariant: 'border' },
|
|
104
111
|
'vertical-border-mask': { direction: 'vertical', position: 'middle', maskVariant: 'border' },
|
|
105
112
|
'navigation-start': { navigation: true },
|
|
@@ -127,8 +134,12 @@ export default definePart({
|
|
|
127
134
|
'vertical-start': 'A vertical list at the start; check that only the bottom shows a mask and a button.',
|
|
128
135
|
'vertical-middle': 'The vertical list in the middle; check that masks and buttons show at top and bottom.',
|
|
129
136
|
'vertical-end': 'The vertical list at the end; check that only the top shows a mask and a button.',
|
|
130
|
-
'button
|
|
131
|
-
|
|
137
|
+
'end-button':
|
|
138
|
+
'The middle row with the end button at rest; check its size and tint against the hover, pressed and focus looks.',
|
|
139
|
+
'end-button-hover': 'The middle row with the end button hovered; check that only the end button shows hover.',
|
|
140
|
+
'end-button-active': 'The middle row with the end button pressed; check that the press look is deeper than hover.',
|
|
141
|
+
'end-button-focus-visible':
|
|
142
|
+
'The middle row with the end button focused by keyboard; check the focus ring around it.',
|
|
132
143
|
'border-mask': 'The middle row with the border mask; check that edges show a border line instead of a gradient.',
|
|
133
144
|
'vertical-border-mask': 'The vertical list with the border mask; check the border lines at top and bottom.',
|
|
134
145
|
'navigation-start': 'The row at the start with navigation dots; check that the first dot is active.',
|
|
@@ -150,6 +161,10 @@ export default definePart({
|
|
|
150
161
|
'item-size-third': 'Items at a third; check that three items fill the viewport with two gaps.',
|
|
151
162
|
'item-size-quarter': 'Items at a quarter; check that four items fill the viewport with three gaps.',
|
|
152
163
|
},
|
|
164
|
+
grid,
|
|
165
|
+
controls: {
|
|
166
|
+
'end-button': { kind: 'button', input: ['pointer', 'keyboard'], disabled: true },
|
|
167
|
+
},
|
|
153
168
|
widths: [480],
|
|
154
169
|
scrolls: [
|
|
155
170
|
'horizontal-start',
|
|
@@ -158,8 +173,7 @@ export default definePart({
|
|
|
158
173
|
'vertical-start',
|
|
159
174
|
'vertical-middle',
|
|
160
175
|
'vertical-end',
|
|
161
|
-
|
|
162
|
-
'button-active',
|
|
176
|
+
...(Object.keys(interactionStates) as (keyof typeof interactionStates)[]),
|
|
163
177
|
'border-mask',
|
|
164
178
|
'vertical-border-mask',
|
|
165
179
|
'navigation-start',
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
+
et-form-field[data-text-shell] {
|
|
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
|
et-form-field:where(:not([data-readonly]):not([data-disabled])) .et-form-field-control-frame:active {
|
|
3
9
|
border-color: var(--et-surface-interaction-active-solid, currentColor);
|
|
4
10
|
}
|