@rak200/ui 0.2.8 → 0.2.10
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/README.md +7 -2
- package/dist/checkbox.d.ts +76 -0
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/checkbox.js +298 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/dialog.d.ts +37 -0
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +45 -10
- package/dist/dialog.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,11 @@ npm install @rak200/ui
|
|
|
34
34
|
<span slot="help">In BRL, two decimals.</span>
|
|
35
35
|
</ui-field>
|
|
36
36
|
|
|
37
|
+
<ui-field>
|
|
38
|
+
<label slot="label">Email notifications</label>
|
|
39
|
+
<ui-switch><input type="checkbox" name="notify" checked /></ui-switch>
|
|
40
|
+
</ui-field>
|
|
41
|
+
|
|
37
42
|
<ui-button>Save</ui-button>
|
|
38
43
|
<ui-button variant="secondary">Cancel</ui-button>
|
|
39
44
|
<ui-button disabled>Unavailable</ui-button>
|
|
@@ -71,8 +76,8 @@ components; `docs/` is what describes them.
|
|
|
71
76
|
|
|
72
77
|
## Status
|
|
73
78
|
|
|
74
|
-
**v0.**
|
|
75
|
-
`<ui-textarea>` — and the token layer under them, built to the ecosystem's full quality bar rather than sketched: type-checked at the strictest available
|
|
79
|
+
**v0.** Seven components — `<ui-button>`, `<ui-field>`, `<ui-dialog>`, `<ui-input>`,
|
|
80
|
+
`<ui-textarea>`, `<ui-checkbox>` and `<ui-switch>` — and the token layer under them, built to the ecosystem's full quality bar rather than sketched: type-checked at the strictest available
|
|
76
81
|
setting, formatted, tested in a real browser and **asserted against axe** for WCAG A/AA, 100%
|
|
77
82
|
coverage and **100% mutation score**, scanned, and every public symbol documented. The v0 surface in
|
|
78
83
|
RFC 0016 grows from here — see [ROADMAP.md](ROADMAP.md).
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { LitElement, type CSSResult, type TemplateResult } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* A boolean control, drawn from the token layer rather than replaced.
|
|
4
|
+
*
|
|
5
|
+
* The `<input type="checkbox">` is the host's own and stays in the light DOM; this element
|
|
6
|
+
* is the box around it. {@link UiCheckbox} and {@link UiSwitch} differ in what they draw
|
|
7
|
+
* and in what they announce, never in what they are made of.
|
|
8
|
+
*/
|
|
9
|
+
declare class UiToggle extends LitElement {
|
|
10
|
+
render(): TemplateResult;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A checkbox, styled by the token layer rather than replaced.
|
|
14
|
+
*
|
|
15
|
+
* **The `<input>` is yours.** You write it, you set its attributes, and it stays in the
|
|
16
|
+
* light DOM — so `name`, `checked`, `required` and `disabled` are the platform's business,
|
|
17
|
+
* and it reaches a form submit because it is a native control inside a `<form>`. The same
|
|
18
|
+
* shape `<ui-input>` has, for the same reason.
|
|
19
|
+
*
|
|
20
|
+
* **The indeterminate state is drawn, and that is not a feature being added.**
|
|
21
|
+
* `appearance: none` takes the platform's dash away with the rest of the drawing, so a
|
|
22
|
+
* control the host set `indeterminate` on would render as *unchecked* — a wrong answer
|
|
23
|
+
* rather than a missing one. The dash below is what stops that, and nothing here invites
|
|
24
|
+
* a tri-state that APG says is rare.
|
|
25
|
+
*
|
|
26
|
+
* Composes with {@link UiField}, which finds the control through this wrapper and wires
|
|
27
|
+
* the label, the help, the error and `aria-invalid` to it.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```html
|
|
31
|
+
* <ui-field>
|
|
32
|
+
* <label slot="label">Send a receipt</label>
|
|
33
|
+
* <ui-checkbox><input type="checkbox" name="receipt" /></ui-checkbox>
|
|
34
|
+
* </ui-field>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class UiCheckbox extends UiToggle {
|
|
38
|
+
static readonly styles: CSSResult[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A switch, which is a checkbox that says *on* and *off* rather than *checked*.
|
|
42
|
+
*
|
|
43
|
+
* **The difference is semantic and the drawing follows it**, which is the order that
|
|
44
|
+
* matters: a switch takes effect immediately and a checkbox is a value you submit, so the
|
|
45
|
+
* two are not one component with two skins. `role="switch"` is what carries that to a
|
|
46
|
+
* screen reader, and this element sets it on the slotted control rather than asking the
|
|
47
|
+
* host to remember — forgetting it would leave a control that looks like a switch and
|
|
48
|
+
* announces as a checkbox, with nothing anywhere to read. A role the host wrote is never
|
|
49
|
+
* overwritten, the same way {@link UiField} never overwrites an `id` it did not generate.
|
|
50
|
+
*
|
|
51
|
+
* There is no native switch to delegate to: `<input type="checkbox" switch>` is
|
|
52
|
+
* unsupported in the engine this suite measures, so the element is a checkbox with a role
|
|
53
|
+
* and a drawing. A host who wants the mixed state wants {@link UiCheckbox} — `switch` has
|
|
54
|
+
* no third value, so this element does not draw one.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```html
|
|
58
|
+
* <ui-field>
|
|
59
|
+
* <label slot="label">Email notifications</label>
|
|
60
|
+
* <ui-switch><input type="checkbox" name="notify" checked /></ui-switch>
|
|
61
|
+
* </ui-field>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare class UiSwitch extends UiToggle {
|
|
65
|
+
#private;
|
|
66
|
+
static readonly styles: CSSResult[];
|
|
67
|
+
render(): TemplateResult;
|
|
68
|
+
}
|
|
69
|
+
declare global {
|
|
70
|
+
interface HTMLElementTagNameMap {
|
|
71
|
+
'ui-checkbox': UiCheckbox;
|
|
72
|
+
'ui-switch': UiSwitch;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../src/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AA6IjF;;;;;;GAMG;AACH,cAAM,QAAS,SAAQ,UAAU;IACpB,MAAM,IAAI,cAAc;CAGpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IACpC,gBAAyB,MAAM,EAAE,SAAS,EAAE,CA+B1C;CACL;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,QAAS,SAAQ,QAAQ;;IAClC,gBAAyB,MAAM,EAAE,SAAS,EAAE,CAuC1C;IAEO,MAAM,IAAI,cAAc;CAmBpC;AAWD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,aAAa,EAAE,UAAU,CAAC;QAC1B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACJ"}
|
package/dist/checkbox.js
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { LitElement, css, html } from 'lit';
|
|
2
|
+
import { reference } from './reference.js';
|
|
3
|
+
/**
|
|
4
|
+
* The size both controls are drawn at, and a floor rather than a preference.
|
|
5
|
+
*
|
|
6
|
+
* A native checkbox is 13x13 in this engine, measured, which is under WCAG 2.2's
|
|
7
|
+
* **2.5.8 Target Size (Minimum)** of 24x24 — and escapes it only through that criterion's
|
|
8
|
+
* *user agent control* exception, which covers a target whose size the author has not
|
|
9
|
+
* modified. Drawing it ourselves gives that exception up, so the floor becomes ours to
|
|
10
|
+
* hold, and `max()` is what holds it: a host who shrinks `--ui-space` restyles everything
|
|
11
|
+
* else and cannot shrink a control below the floor without saying so in their own CSS.
|
|
12
|
+
*/
|
|
13
|
+
const size = css `max(24px, calc(${reference('--ui-space')} * 3))`;
|
|
14
|
+
/**
|
|
15
|
+
* The tick, as a mask rather than a picture — and that is what keeps it a token decision.
|
|
16
|
+
*
|
|
17
|
+
* A `data:` URI freezes whatever is inside it, so an SVG drawn with `stroke='#fff'` would
|
|
18
|
+
* be one hardcoded colour in a package whose rule is that a host can override every visual
|
|
19
|
+
* decision. **A mask has no colour**: only its alpha is read, so the black below is a
|
|
20
|
+
* shape and never a value. What the tick shows is the surface behind the control, punched
|
|
21
|
+
* out of the accent fill by `mask-composite: exclude`.
|
|
22
|
+
*
|
|
23
|
+
* The alternative was a mark rendered into the shadow root, and it is not available:
|
|
24
|
+
* `:host(:has(input:checked))` is invalid in this engine — `CSS.supports` says so, so it
|
|
25
|
+
* is a selector that does not exist rather than one that fails to update — and shadow CSS
|
|
26
|
+
* has no other way to read a slotted control's state. Only `::slotted(input:checked)`
|
|
27
|
+
* does, which means the control has to paint its own mark.
|
|
28
|
+
*/
|
|
29
|
+
const tick = css `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E")`;
|
|
30
|
+
/** A mask layer covering the whole control, which the mark is then subtracted from. */
|
|
31
|
+
const whole = css `linear-gradient(#000, #000)`;
|
|
32
|
+
/**
|
|
33
|
+
* What a drawn boolean control looks like, which both elements share.
|
|
34
|
+
*
|
|
35
|
+
* The control is the host's own `<input type="checkbox">`, slotted, for the reason
|
|
36
|
+
* `src/input.ts` gives at length: an IDREF does not cross a shadow boundary, so a control
|
|
37
|
+
* rendered in here could not be labelled by the `<label>` beside it. Everything below
|
|
38
|
+
* reaches it through `::slotted`.
|
|
39
|
+
*
|
|
40
|
+
* **`appearance: none` is the whole cost of this component**, and it is taken knowingly.
|
|
41
|
+
* It buys one drawing for the pair — the same border, radius, focus ring and accent the
|
|
42
|
+
* rest of the kit already uses — and the alternative buys none: there is no native switch
|
|
43
|
+
* to delegate to. `<input type="checkbox" switch>` is unsupported in this engine,
|
|
44
|
+
* measured, so a switch is drawn whatever the checkbox does, and a delegated checkbox
|
|
45
|
+
* beside a drawn switch would argue cosmetically for a difference that is semantic.
|
|
46
|
+
*
|
|
47
|
+
* What it gives up is named where it is paid back: the indeterminate mark below, the
|
|
48
|
+
* target-size floor at {@link size}, and the forced-colors block at the end.
|
|
49
|
+
*/
|
|
50
|
+
const toggle = css `
|
|
51
|
+
:host {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
::slotted(input) {
|
|
56
|
+
appearance: none;
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
/* The user agent puts 3px around a checkbox. Left in, it would sit inside the
|
|
59
|
+
host box and put the control off centre in any layout that aligns to it. */
|
|
60
|
+
margin: 0;
|
|
61
|
+
block-size: ${size};
|
|
62
|
+
background-color: ${reference('--ui-color-surface')};
|
|
63
|
+
background-repeat: no-repeat;
|
|
64
|
+
border: 1px solid ${reference('--ui-color-border')};
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
/* The focus ring is deliberately not in this list, for the reason src/button.ts
|
|
67
|
+
gives beside its own: delaying the affordance that says *this is where you are*
|
|
68
|
+
is the opposite of what it exists to do. */
|
|
69
|
+
transition:
|
|
70
|
+
background-color ${reference('--ui-duration-state')} ${reference('--ui-easing-state')},
|
|
71
|
+
border-color ${reference('--ui-duration-state')} ${reference('--ui-easing-state')};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
::slotted(input:checked) {
|
|
75
|
+
background-color: ${reference('--ui-color-accent')};
|
|
76
|
+
border-color: ${reference('--ui-color-accent')};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Unchecked, the boundary finishes the mix it already started — the same hover
|
|
80
|
+
ui-input has, because it is the same boundary. Checked, the boundary is not what
|
|
81
|
+
the eye is on, so the fill moves instead, the way ui-button's does.
|
|
82
|
+
|
|
83
|
+
The disabled guard is measured rather than assumed: a disabled control still
|
|
84
|
+
matches :hover. */
|
|
85
|
+
::slotted(input:hover:not(:disabled)) {
|
|
86
|
+
border-color: ${reference('--ui-color-text')};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
::slotted(input:checked:hover:not(:disabled)) {
|
|
90
|
+
background-color: ${reference('--ui-color-accent-hover')};
|
|
91
|
+
border-color: ${reference('--ui-color-accent-hover')};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* A visible focus ring is not decoration: removing it is the single most common way a
|
|
95
|
+
component stops being usable by keyboard. */
|
|
96
|
+
::slotted(input:focus-visible) {
|
|
97
|
+
outline: 2px solid ${reference('--ui-color-focus')};
|
|
98
|
+
outline-offset: 2px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
::slotted(input:disabled) {
|
|
102
|
+
cursor: not-allowed;
|
|
103
|
+
opacity: 0.5;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* The error state is not this component's to decide: ui-field sets aria-invalid on
|
|
107
|
+
the control as part of the wiring it already owns, and this rule reads it — so the
|
|
108
|
+
message under the field and the control cannot disagree about whether there is an
|
|
109
|
+
error. Only the boundary moves; a red fill on a switch would read as *on*. */
|
|
110
|
+
::slotted(input[aria-invalid='true']) {
|
|
111
|
+
border-color: ${reference('--ui-color-danger')};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Forced colors replaces every author colour with one from the user's palette, so
|
|
115
|
+
the accent that says *checked* becomes the same Canvas as the surface that says
|
|
116
|
+
*not* — the state disappears, silently, for the people who turned the mode on to
|
|
117
|
+
see states more clearly. Measured in this engine. System colours are the ones
|
|
118
|
+
forced colors keeps, so the checked states name Highlight and the difference
|
|
119
|
+
survives; the mark keeps working untouched, because a mask has no colour to force.
|
|
120
|
+
|
|
121
|
+
Opacity is not a colour and is not forced, so the disabled control would still be
|
|
122
|
+
half-transparent against a palette chosen for contrast. GrayText is what that mode
|
|
123
|
+
has for *unavailable*, and it is a colour rather than a veil. */
|
|
124
|
+
@media (forced-colors: active) {
|
|
125
|
+
::slotted(input:checked),
|
|
126
|
+
::slotted(input:indeterminate) {
|
|
127
|
+
background-color: Highlight;
|
|
128
|
+
border-color: Highlight;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
::slotted(input:disabled) {
|
|
132
|
+
border-color: GrayText;
|
|
133
|
+
opacity: 1;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
`;
|
|
137
|
+
/**
|
|
138
|
+
* A boolean control, drawn from the token layer rather than replaced.
|
|
139
|
+
*
|
|
140
|
+
* The `<input type="checkbox">` is the host's own and stays in the light DOM; this element
|
|
141
|
+
* is the box around it. {@link UiCheckbox} and {@link UiSwitch} differ in what they draw
|
|
142
|
+
* and in what they announce, never in what they are made of.
|
|
143
|
+
*/
|
|
144
|
+
class UiToggle extends LitElement {
|
|
145
|
+
render() {
|
|
146
|
+
return html `<slot></slot>`;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* A checkbox, styled by the token layer rather than replaced.
|
|
151
|
+
*
|
|
152
|
+
* **The `<input>` is yours.** You write it, you set its attributes, and it stays in the
|
|
153
|
+
* light DOM — so `name`, `checked`, `required` and `disabled` are the platform's business,
|
|
154
|
+
* and it reaches a form submit because it is a native control inside a `<form>`. The same
|
|
155
|
+
* shape `<ui-input>` has, for the same reason.
|
|
156
|
+
*
|
|
157
|
+
* **The indeterminate state is drawn, and that is not a feature being added.**
|
|
158
|
+
* `appearance: none` takes the platform's dash away with the rest of the drawing, so a
|
|
159
|
+
* control the host set `indeterminate` on would render as *unchecked* — a wrong answer
|
|
160
|
+
* rather than a missing one. The dash below is what stops that, and nothing here invites
|
|
161
|
+
* a tri-state that APG says is rare.
|
|
162
|
+
*
|
|
163
|
+
* Composes with {@link UiField}, which finds the control through this wrapper and wires
|
|
164
|
+
* the label, the help, the error and `aria-invalid` to it.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```html
|
|
168
|
+
* <ui-field>
|
|
169
|
+
* <label slot="label">Send a receipt</label>
|
|
170
|
+
* <ui-checkbox><input type="checkbox" name="receipt" /></ui-checkbox>
|
|
171
|
+
* </ui-field>
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
export class UiCheckbox extends UiToggle {
|
|
175
|
+
static { this.styles = [
|
|
176
|
+
toggle,
|
|
177
|
+
css `
|
|
178
|
+
::slotted(input) {
|
|
179
|
+
inline-size: ${size};
|
|
180
|
+
border-radius: ${reference('--ui-radius')};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* The mark is a hole: the whole control, minus the shape, so what shows
|
|
184
|
+
through is whatever the control sits on. The docblock on the mask constant
|
|
185
|
+
above says why a hole rather than a colour. */
|
|
186
|
+
::slotted(input:checked) {
|
|
187
|
+
mask-image: ${whole}, ${tick};
|
|
188
|
+
mask-composite: exclude;
|
|
189
|
+
mask-size: 100% 100%;
|
|
190
|
+
mask-repeat: no-repeat;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* A dash needs no drawing: a rectangle is a gradient with a size. */
|
|
194
|
+
::slotted(input:indeterminate) {
|
|
195
|
+
background-color: ${reference('--ui-color-accent')};
|
|
196
|
+
border-color: ${reference('--ui-color-accent')};
|
|
197
|
+
mask-image: ${whole}, ${whole};
|
|
198
|
+
mask-composite: exclude;
|
|
199
|
+
mask-size:
|
|
200
|
+
100% 100%,
|
|
201
|
+
calc(${size} / 2) calc(${size} / 12);
|
|
202
|
+
mask-position: center;
|
|
203
|
+
mask-repeat: no-repeat;
|
|
204
|
+
}
|
|
205
|
+
`,
|
|
206
|
+
]; }
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* A switch, which is a checkbox that says *on* and *off* rather than *checked*.
|
|
210
|
+
*
|
|
211
|
+
* **The difference is semantic and the drawing follows it**, which is the order that
|
|
212
|
+
* matters: a switch takes effect immediately and a checkbox is a value you submit, so the
|
|
213
|
+
* two are not one component with two skins. `role="switch"` is what carries that to a
|
|
214
|
+
* screen reader, and this element sets it on the slotted control rather than asking the
|
|
215
|
+
* host to remember — forgetting it would leave a control that looks like a switch and
|
|
216
|
+
* announces as a checkbox, with nothing anywhere to read. A role the host wrote is never
|
|
217
|
+
* overwritten, the same way {@link UiField} never overwrites an `id` it did not generate.
|
|
218
|
+
*
|
|
219
|
+
* There is no native switch to delegate to: `<input type="checkbox" switch>` is
|
|
220
|
+
* unsupported in the engine this suite measures, so the element is a checkbox with a role
|
|
221
|
+
* and a drawing. A host who wants the mixed state wants {@link UiCheckbox} — `switch` has
|
|
222
|
+
* no third value, so this element does not draw one.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```html
|
|
226
|
+
* <ui-field>
|
|
227
|
+
* <label slot="label">Email notifications</label>
|
|
228
|
+
* <ui-switch><input type="checkbox" name="notify" checked /></ui-switch>
|
|
229
|
+
* </ui-field>
|
|
230
|
+
* ```
|
|
231
|
+
*/
|
|
232
|
+
export class UiSwitch extends UiToggle {
|
|
233
|
+
static { this.styles = [
|
|
234
|
+
toggle,
|
|
235
|
+
css `
|
|
236
|
+
::slotted(input) {
|
|
237
|
+
inline-size: calc(${size} * 5 / 3);
|
|
238
|
+
/* Any radius at or above half the block size rounds the ends fully, so
|
|
239
|
+
the whole size is a pill at every size this control can take. */
|
|
240
|
+
border-radius: ${size};
|
|
241
|
+
/* The track carries the boundary a checkbox gets from its border, so it
|
|
242
|
+
is the border token: the value chosen to clear 3:1 against the
|
|
243
|
+
surface, which is what WCAG 1.4.11 asks of a control's boundary. The
|
|
244
|
+
border is left to the shared sheet, which already paints it that exact
|
|
245
|
+
colour — restating it here changed no pixel, which is how it was
|
|
246
|
+
found: as a mutant no test could possibly kill. */
|
|
247
|
+
background-color: ${reference('--ui-color-border')};
|
|
248
|
+
/* The thumb is a background layer rather than an element, because an
|
|
249
|
+
element would have to live in the shadow root and could not be told
|
|
250
|
+
the control is on. A closest-side radius comes from the layer's
|
|
251
|
+
own size, so one number moves the thumb. */
|
|
252
|
+
background-image: radial-gradient(
|
|
253
|
+
circle closest-side,
|
|
254
|
+
${reference('--ui-color-surface')} 100%,
|
|
255
|
+
transparent 100%
|
|
256
|
+
);
|
|
257
|
+
background-size: calc(${size} * 2 / 3);
|
|
258
|
+
background-position: calc(${size} / 6) center;
|
|
259
|
+
transition:
|
|
260
|
+
background-color ${reference('--ui-duration-state')}
|
|
261
|
+
${reference('--ui-easing-state')},
|
|
262
|
+
border-color ${reference('--ui-duration-state')}
|
|
263
|
+
${reference('--ui-easing-state')},
|
|
264
|
+
background-position ${reference('--ui-duration-state')}
|
|
265
|
+
${reference('--ui-easing-state')};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
::slotted(input:checked) {
|
|
269
|
+
background-position: calc(100% - ${size} / 6) center;
|
|
270
|
+
}
|
|
271
|
+
`,
|
|
272
|
+
]; }
|
|
273
|
+
render() {
|
|
274
|
+
return html `<slot @slotchange=${this.#announce}></slot>`;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Marks the slotted control a switch for anything reading the accessibility tree.
|
|
278
|
+
*
|
|
279
|
+
* On `slotchange` rather than once, because the host may replace the control — a
|
|
280
|
+
* framework re-render is indistinguishable from that here, and a switch that
|
|
281
|
+
* announces itself correctly only until the first re-render is worse than one that
|
|
282
|
+
* never did.
|
|
283
|
+
*/
|
|
284
|
+
#announce() {
|
|
285
|
+
const control = this.querySelector('input');
|
|
286
|
+
if (control !== null && !control.hasAttribute('role')) {
|
|
287
|
+
control.setAttribute('role', 'switch');
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
// Stryker disable next-line StringLiteral: the registration runs once, at import, inside
|
|
292
|
+
// the warm process Stryker switches mutants in — so by the time a mutant on this line is
|
|
293
|
+
// active the element is already defined under the original name, and no test can observe
|
|
294
|
+
// the change. Outside the runner's reach, not an equivalent mutant.
|
|
295
|
+
customElements.define('ui-checkbox', UiCheckbox);
|
|
296
|
+
// Stryker disable next-line StringLiteral: the same, for the same reason.
|
|
297
|
+
customElements.define('ui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C,CAAC;IACL,CAAC;;AAGL,yFAAyF;AACzF,yFAAyF;AACzF,yFAAyF;AACzF,oEAAoE;AACpE,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AAEjD,0EAA0E;AAC1E,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC"}
|
package/dist/dialog.d.ts
CHANGED
|
@@ -1,4 +1,41 @@
|
|
|
1
1
|
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* The `scrollbar-gutter` to hold while the page is locked.
|
|
4
|
+
*
|
|
5
|
+
* **The question is not whether the page scrolls**, which is what this asked first and
|
|
6
|
+
* what `tests/manual/scroll-lock.mjs` caught. A page can scroll and still have no gutter
|
|
7
|
+
* to keep — an overlay scrollbar takes no layout space — and reserving one there pulls the
|
|
8
|
+
* content in by the width of a scrollbar that was never there: the same shift, in the
|
|
9
|
+
* other direction, measured at -15px. The question is whether the scrollbar is *taking
|
|
10
|
+
* space*, and the viewport minus the content width is what answers it.
|
|
11
|
+
*
|
|
12
|
+
* **Taken as arguments rather than read from `window`, and that is the floors talking.**
|
|
13
|
+
* The suite's engine reports no scrollbar width at all, so the reserving branch is
|
|
14
|
+
* unreachable from anything this code could measure itself — and a branch no test can
|
|
15
|
+
* reach is a branch no floor can hold. As a function of two numbers it is decided here and
|
|
16
|
+
* checked directly, while the call site keeps no branch of its own.
|
|
17
|
+
*
|
|
18
|
+
* @param viewport - The viewport's width, scrollbar included.
|
|
19
|
+
* @param content - The width available to content, scrollbar excluded.
|
|
20
|
+
* @param current - What the host already had, returned untouched when there is nothing to
|
|
21
|
+
* reserve — so a page that sets its own gutter keeps it through the lock.
|
|
22
|
+
*/
|
|
23
|
+
export declare function reservedGutter(viewport: number, content: number, current: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Writes the two properties the lock is made of, and the only place either is named.
|
|
26
|
+
*
|
|
27
|
+
* **Handed an element rather than reaching for `document.documentElement`**, for the same
|
|
28
|
+
* reason {@link reservedGutter} is handed numbers. In the engine the suite runs, the root's
|
|
29
|
+
* gutter never changes: the scrollbar takes no space, so the value written is always the
|
|
30
|
+
* value already there and the write is a no-op that nothing can observe — the property name
|
|
31
|
+
* becomes a string no test compares against anything. On an element handed in, both writes
|
|
32
|
+
* are observable, and the names are checked rather than assumed.
|
|
33
|
+
*
|
|
34
|
+
* @param root - The element the lock is written on; `document.documentElement` in use.
|
|
35
|
+
* @param overflow - What to set `overflow` to; the empty string removes the declaration.
|
|
36
|
+
* @param gutter - What to set `scrollbar-gutter` to; likewise.
|
|
37
|
+
*/
|
|
38
|
+
export declare function applyLock(root: HTMLElement, overflow: string, gutter: string): void;
|
|
2
39
|
/**
|
|
3
40
|
* A modal dialog.
|
|
4
41
|
*
|
package/dist/dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAiBjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAGnF;AAiFD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,QAAS,SAAQ,UAAU;;IACpC,gBAAyB,MAAM,0BAwG7B;IAEF,gBAAyB,UAAU;;;;;MAEjC;IAEF;;;;;;;;;;OAUG;IACH,IAAI,UAAS;;IAyCJ,iBAAiB,IAAI,IAAI;IASzB,oBAAoB,IAAI,IAAI;IAU5B,YAAY,IAAI,IAAI;IAIpB,OAAO,IAAI,IAAI;IAiBf,MAAM,IAAI,cAAc;IAIjC;;;;;OAKG;IACH,IAAI,IAAI,IAAI;IAIZ,2FAA2F;IAC3F,KAAK,IAAI,IAAI;CA0FhB;AAQD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACJ"}
|
package/dist/dialog.js
CHANGED
|
@@ -11,6 +11,48 @@ let locks = 0;
|
|
|
11
11
|
* initialiser here would be a value no test could ever observe.
|
|
12
12
|
*/
|
|
13
13
|
let displaced;
|
|
14
|
+
/**
|
|
15
|
+
* The `scrollbar-gutter` to hold while the page is locked.
|
|
16
|
+
*
|
|
17
|
+
* **The question is not whether the page scrolls**, which is what this asked first and
|
|
18
|
+
* what `tests/manual/scroll-lock.mjs` caught. A page can scroll and still have no gutter
|
|
19
|
+
* to keep — an overlay scrollbar takes no layout space — and reserving one there pulls the
|
|
20
|
+
* content in by the width of a scrollbar that was never there: the same shift, in the
|
|
21
|
+
* other direction, measured at -15px. The question is whether the scrollbar is *taking
|
|
22
|
+
* space*, and the viewport minus the content width is what answers it.
|
|
23
|
+
*
|
|
24
|
+
* **Taken as arguments rather than read from `window`, and that is the floors talking.**
|
|
25
|
+
* The suite's engine reports no scrollbar width at all, so the reserving branch is
|
|
26
|
+
* unreachable from anything this code could measure itself — and a branch no test can
|
|
27
|
+
* reach is a branch no floor can hold. As a function of two numbers it is decided here and
|
|
28
|
+
* checked directly, while the call site keeps no branch of its own.
|
|
29
|
+
*
|
|
30
|
+
* @param viewport - The viewport's width, scrollbar included.
|
|
31
|
+
* @param content - The width available to content, scrollbar excluded.
|
|
32
|
+
* @param current - What the host already had, returned untouched when there is nothing to
|
|
33
|
+
* reserve — so a page that sets its own gutter keeps it through the lock.
|
|
34
|
+
*/
|
|
35
|
+
export function reservedGutter(viewport, content, current) {
|
|
36
|
+
return viewport > content ? 'stable' : current;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Writes the two properties the lock is made of, and the only place either is named.
|
|
40
|
+
*
|
|
41
|
+
* **Handed an element rather than reaching for `document.documentElement`**, for the same
|
|
42
|
+
* reason {@link reservedGutter} is handed numbers. In the engine the suite runs, the root's
|
|
43
|
+
* gutter never changes: the scrollbar takes no space, so the value written is always the
|
|
44
|
+
* value already there and the write is a no-op that nothing can observe — the property name
|
|
45
|
+
* becomes a string no test compares against anything. On an element handed in, both writes
|
|
46
|
+
* are observable, and the names are checked rather than assumed.
|
|
47
|
+
*
|
|
48
|
+
* @param root - The element the lock is written on; `document.documentElement` in use.
|
|
49
|
+
* @param overflow - What to set `overflow` to; the empty string removes the declaration.
|
|
50
|
+
* @param gutter - What to set `scrollbar-gutter` to; likewise.
|
|
51
|
+
*/
|
|
52
|
+
export function applyLock(root, overflow, gutter) {
|
|
53
|
+
root.style.overflow = overflow;
|
|
54
|
+
root.style.setProperty('scrollbar-gutter', gutter);
|
|
55
|
+
}
|
|
14
56
|
/**
|
|
15
57
|
* Holds the page still behind a modal, and gives it back when the last one leaves.
|
|
16
58
|
*
|
|
@@ -24,7 +66,7 @@ let displaced;
|
|
|
24
66
|
* back as padding — and the browser this suite runs in has overlay scrollbars, so the
|
|
25
67
|
* width is `0`, every sign error in that arithmetic passes, and the check is theatre.
|
|
26
68
|
* `scrollbar-gutter: stable` asks the browser to keep the space it was already using,
|
|
27
|
-
* with no number to get wrong.
|
|
69
|
+
* with no number to get wrong — {@link reservedGutter} decides whether there is any.
|
|
28
70
|
*
|
|
29
71
|
* Counted rather than flagged, because a dialog opening a dialog is ordinary — a confirm
|
|
30
72
|
* over a form — and the second one closing must not give the page back while the first is
|
|
@@ -40,13 +82,7 @@ function hold() {
|
|
|
40
82
|
overflow: root.style.overflow,
|
|
41
83
|
gutter: root.style.getPropertyValue('scrollbar-gutter'),
|
|
42
84
|
};
|
|
43
|
-
|
|
44
|
-
// reserves space that was not there, which is the same layout shift in the other
|
|
45
|
-
// direction.
|
|
46
|
-
if (root.scrollHeight > root.clientHeight) {
|
|
47
|
-
root.style.setProperty('scrollbar-gutter', 'stable');
|
|
48
|
-
}
|
|
49
|
-
root.style.overflow = 'hidden';
|
|
85
|
+
applyLock(root, 'hidden', reservedGutter(window.innerWidth, root.clientWidth, displaced.gutter));
|
|
50
86
|
}
|
|
51
87
|
/** Gives the page back, once the last dialog has closed. */
|
|
52
88
|
function release() {
|
|
@@ -57,8 +93,7 @@ function release() {
|
|
|
57
93
|
const root = document.documentElement;
|
|
58
94
|
// What the host had, not what this module would have chosen. A page that sets its own
|
|
59
95
|
// `overflow` or reserves its own gutter gets it back rather than being cleared.
|
|
60
|
-
root.
|
|
61
|
-
root.style.setProperty('scrollbar-gutter', displaced.gutter);
|
|
96
|
+
applyLock(root, displaced.overflow, displaced.gutter);
|
|
62
97
|
}
|
|
63
98
|
/** One of the dialog's slots — named, or the default one when the name is empty. */
|
|
64
99
|
function slot(name = '') {
|
package/dist/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../src/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,4FAA4F;AAC5F,MAAM,OAAO,GAAG,SAAS,CAAC;AAE1B,mDAAmD;AACnD,IAAI,KAAK,GAAG,CAAC,CAAC;AAEd;;;;;GAKG;AACH,IAAI,SAA+C,CAAC;AAEpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAS,IAAI;IACT,KAAK,IAAI,CAAC,CAAC;IAEX,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;Q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AC;IACd,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM;QACF,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;QAC5D,MAAM,KAAK,GAAG,KAAK,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;QAE9C,mFAAmF;QACnF,mFAAmF;QACnF,8EAA8E;QAC9E,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;;AAGL,yFAAyF;AACzF,yFAAyF;AACzF,yFAAyF;AACzF,oEAAoE;AACpE,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACH,MAAM,EACN,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,eAAe,EACf,KAAK,KAAK,EACV,KAAK,YAAY,GACpB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACH,MAAM,EACN,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,eAAe,EACf,KAAK,KAAK,EACV,KAAK,YAAY,GACpB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACH,MAAM,EACN,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,eAAe,GAGlB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACH,MAAM,EACN,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,eAAe,GAGlB,MAAM,aAAa,CAAC"}
|