@rak200/ui 0.3.0 → 0.5.0
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 +10 -18
- package/dist/button.d.ts +1 -2
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +1 -2
- package/dist/button.js.map +1 -1
- package/dist/dialog.d.ts +3 -7
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +3 -7
- package/dist/dialog.js.map +1 -1
- package/dist/field.d.ts +5 -3
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +5 -3
- package/dist/field.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +330 -33
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +355 -64
- package/dist/input.js.map +1 -1
- package/dist/menu.d.ts +3 -14
- package/dist/menu.d.ts.map +1 -1
- package/dist/menu.js +3 -14
- package/dist/menu.js.map +1 -1
- package/dist/radio.d.ts +142 -59
- package/dist/radio.d.ts.map +1 -1
- package/dist/radio.js +378 -147
- package/dist/radio.js.map +1 -1
- package/dist/select.d.ts +220 -14
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +381 -26
- package/dist/select.js.map +1 -1
- package/dist/tokens.js +1 -1
- package/dist/tokens.js.map +1 -1
- package/package.json +1 -1
package/dist/select.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, css, html } from 'lit';
|
|
1
|
+
import { LitElement, css, html, nothing } from 'lit';
|
|
2
2
|
import { reference } from './reference.js';
|
|
3
3
|
/**
|
|
4
4
|
* One arm of the caret, and the gap it keeps from the edge.
|
|
@@ -16,14 +16,131 @@ const arm = css `calc(${reference('--ui-space')} * 0.75)`;
|
|
|
16
16
|
* right at the default space token and wrong at every other.
|
|
17
17
|
*/
|
|
18
18
|
const clearance = css `calc(${reference('--ui-space')} * 2 + ${arm} * 2)`;
|
|
19
|
+
/**
|
|
20
|
+
* The event a declaration fires when anything about it changes.
|
|
21
|
+
*
|
|
22
|
+
* **Private to this file**, and a mechanism rather than an API: a host listens to
|
|
23
|
+
* `<ui-select>`, never to this.
|
|
24
|
+
*/
|
|
25
|
+
// Stryker disable next-line StringLiteral: both ends of this event read the constant —
|
|
26
|
+
// the declaration dispatches it and the select listens for it — so a different name, the
|
|
27
|
+
// empty string included, still meets itself. Nothing outside this module names it, which
|
|
28
|
+
// is what makes the mutant provably equivalent rather than merely uncaught.
|
|
29
|
+
const announcement = 'ui-option-changed';
|
|
30
|
+
/**
|
|
31
|
+
* What {@link UiOption} and {@link UiOptgroup} have in common, which is that they draw
|
|
32
|
+
* nothing.
|
|
33
|
+
*
|
|
34
|
+
* **A declaration rather than a control**, and the first of its kind here: every other
|
|
35
|
+
* element in this package renders something a person can see. These two exist so that the
|
|
36
|
+
* choices a host writes stay markup, while the thing the platform actually needs — real
|
|
37
|
+
* `<option>` elements inside a real `<select>` — is built from them.
|
|
38
|
+
*
|
|
39
|
+
* They announce themselves on every update, and that is the half a `MutationObserver`
|
|
40
|
+
* cannot do: `option.selected = true` is a property write, and no observer reports one.
|
|
41
|
+
* Measured on the shape this replaced, where the control simply never moved. Because these
|
|
42
|
+
* are this package's own elements the property is reactive, so the announcement is the
|
|
43
|
+
* platform's own change detection rather than a watcher over somebody else's element.
|
|
44
|
+
*
|
|
45
|
+
* **Arriving and leaving are announced from the slot rather than from a callback**, and
|
|
46
|
+
* that is measured rather than chosen: an event dispatched from `disconnectedCallback` has
|
|
47
|
+
* no path left to bubble along — the option is already out of the tree, and the removal
|
|
48
|
+
* never reached the select. A slot reports both directions, which is the thing it exists
|
|
49
|
+
* to tell you.
|
|
50
|
+
*
|
|
51
|
+
* **Each declaration carries its own slot, and that is why**: a slot reports only the
|
|
52
|
+
* nodes assigned to *it*, so `<ui-select>`'s own slot sees a choice added or removed at the
|
|
53
|
+
* top level and sees nothing at all when one moves inside an `<ui-optgroup>`. Measured, as
|
|
54
|
+
* a removal from inside a group that left the control showing a choice that was gone.
|
|
55
|
+
*/
|
|
56
|
+
class UiDeclaration extends LitElement {
|
|
57
|
+
static { this.styles = css `
|
|
58
|
+
:host {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
`; }
|
|
62
|
+
updated() {
|
|
63
|
+
this.#announce();
|
|
64
|
+
}
|
|
65
|
+
#announce = () => {
|
|
66
|
+
this.dispatchEvent(new Event(announcement, { bubbles: true }));
|
|
67
|
+
};
|
|
68
|
+
render() {
|
|
69
|
+
return html `<slot @slotchange=${this.#announce}></slot>`;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* One choice in a {@link UiSelect}.
|
|
74
|
+
*
|
|
75
|
+
* The text is what the reader sees; `value` is what a form submits. `selected` is the
|
|
76
|
+
* **default** — the choice the control starts on and returns to on reset — which is what
|
|
77
|
+
* `selected` means on a native `<option>`.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```html
|
|
81
|
+
* <ui-option value="brl">Real</ui-option>
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export class UiOption extends UiDeclaration {
|
|
85
|
+
constructor() {
|
|
86
|
+
super(...arguments);
|
|
87
|
+
/**
|
|
88
|
+
* What a form submits when this is the choice made.
|
|
89
|
+
*
|
|
90
|
+
* A plain field rather than the `accessor` keyword, for the reason `src/button.ts`
|
|
91
|
+
* gives beside its own.
|
|
92
|
+
*/
|
|
93
|
+
this.value = '';
|
|
94
|
+
/** Whether this is the choice the control starts on. */
|
|
95
|
+
this.selected = false;
|
|
96
|
+
/** Whether this choice can be made at all. */
|
|
97
|
+
this.disabled = false;
|
|
98
|
+
}
|
|
99
|
+
static { this.properties = {
|
|
100
|
+
value: { type: String, reflect: true },
|
|
101
|
+
selected: { type: Boolean, reflect: true },
|
|
102
|
+
disabled: { type: Boolean, reflect: true },
|
|
103
|
+
}; }
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A named set of choices, which the platform draws as a heading inside the list.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```html
|
|
110
|
+
* <ui-optgroup label="Americas">
|
|
111
|
+
* <ui-option value="brl">Real</ui-option>
|
|
112
|
+
* </ui-optgroup>
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export class UiOptgroup extends UiDeclaration {
|
|
116
|
+
constructor() {
|
|
117
|
+
super(...arguments);
|
|
118
|
+
/** The heading the platform draws above the set. */
|
|
119
|
+
this.label = '';
|
|
120
|
+
/** Whether every choice in the set is unavailable. */
|
|
121
|
+
this.disabled = false;
|
|
122
|
+
}
|
|
123
|
+
static { this.properties = {
|
|
124
|
+
label: { type: String, reflect: true },
|
|
125
|
+
disabled: { type: Boolean, reflect: true },
|
|
126
|
+
}; }
|
|
127
|
+
}
|
|
19
128
|
/**
|
|
20
129
|
* A native `<select>`, styled by the token layer rather than replaced.
|
|
21
130
|
*
|
|
22
|
-
* **The `<select>` is
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
131
|
+
* **The `<select>` is this element's**, rendered into its shadow root with its label, its
|
|
132
|
+
* help and its message, so the IDREFs resolve in one tree scope. What a host writes is the
|
|
133
|
+
* tag, its attributes, and the choices — as {@link UiOption} and {@link UiOptgroup}.
|
|
134
|
+
*
|
|
135
|
+
* **The choices could not stay as `<option>`s**, and that is measured rather than
|
|
136
|
+
* preferred: a `<slot>` inside a `<select>` assigns the nodes and the select sees none of
|
|
137
|
+
* them. `HTMLSelectElement.options` is built from its own children, not from the flattened
|
|
138
|
+
* tree — `options.length` was `0`, `value` empty and `selectedIndex` `-1`, with two options
|
|
139
|
+
* assigned. So the choices are declarations this package owns, and the `<option>` elements
|
|
140
|
+
* the platform needs are built from them.
|
|
141
|
+
*
|
|
142
|
+
* The element joins the form itself, through `ElementInternals`: a control in a shadow root
|
|
143
|
+
* has no form owner.
|
|
27
144
|
*
|
|
28
145
|
* **The native element is the decision, not a shortcut.** A custom listbox is an
|
|
29
146
|
* accessibility project of its own, and it would have to reimplement the platform picker
|
|
@@ -48,25 +165,69 @@ const clearance = css `calc(${reference('--ui-space')} * 2 + ${arm} * 2)`;
|
|
|
48
165
|
*
|
|
49
166
|
* @example
|
|
50
167
|
* ```html
|
|
51
|
-
* <ui-
|
|
52
|
-
* <
|
|
53
|
-
* <ui-
|
|
54
|
-
*
|
|
55
|
-
* <option value="brl">Real</option>
|
|
56
|
-
* <option value="usd">Dollar</option>
|
|
57
|
-
* </select>
|
|
58
|
-
* </ui-select>
|
|
59
|
-
* </ui-field>
|
|
168
|
+
* <ui-select label="Currency" name="currency">
|
|
169
|
+
* <ui-option value="brl">Real</ui-option>
|
|
170
|
+
* <ui-option value="usd">Dollar</ui-option>
|
|
171
|
+
* </ui-select>
|
|
60
172
|
* ```
|
|
61
173
|
*/
|
|
62
174
|
export class UiSelect extends LitElement {
|
|
175
|
+
constructor() {
|
|
176
|
+
super(...arguments);
|
|
177
|
+
/**
|
|
178
|
+
* The accessible name, and the text above the control.
|
|
179
|
+
*
|
|
180
|
+
* A plain field rather than the `accessor` keyword, for the reason `src/button.ts`
|
|
181
|
+
* gives beside its own — and so for every property below.
|
|
182
|
+
*/
|
|
183
|
+
this.label = '';
|
|
184
|
+
/** Supporting text under the control, which survives an error rather than yielding. */
|
|
185
|
+
this.help = '';
|
|
186
|
+
/** The message, which paints the boundary and is announced with the control. */
|
|
187
|
+
this.error = '';
|
|
188
|
+
/**
|
|
189
|
+
* The name the value is submitted under.
|
|
190
|
+
*
|
|
191
|
+
* **Reflected, and that is a requirement rather than a convenience.** A form names a
|
|
192
|
+
* form-associated custom element's entry from the content attribute, so a host who set
|
|
193
|
+
* only the property would submit nothing at all — silently.
|
|
194
|
+
*/
|
|
195
|
+
this.name = '';
|
|
196
|
+
/**
|
|
197
|
+
* The choice currently made.
|
|
198
|
+
*
|
|
199
|
+
* **Empty means _the declared default_ rather than _nothing_**, which is what lets an
|
|
200
|
+
* `<ui-option selected>` mean what `<option selected>` means and a reset return to it.
|
|
201
|
+
* Not reflected, the way a native control's `value` IDL attribute is not.
|
|
202
|
+
*/
|
|
203
|
+
this.value = '';
|
|
204
|
+
/** Whether a form is invalid while no choice is made. */
|
|
205
|
+
this.required = false;
|
|
206
|
+
/** Whether the control refuses interaction, and submits nothing. */
|
|
207
|
+
this.disabled = false;
|
|
208
|
+
/** Whether the control is a list rather than a drop-down. */
|
|
209
|
+
this.multiple = false;
|
|
210
|
+
this.#internals = this.attachInternals();
|
|
211
|
+
this.#redraw = () => {
|
|
212
|
+
this.requestUpdate();
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* `change` is re-dispatched because it is non-composed and stops at the shadow
|
|
216
|
+
* boundary; `input` is composed and leaves on its own, retargeted. Measured on
|
|
217
|
+
* `<ui-checkbox>`, and the same here.
|
|
218
|
+
*/
|
|
219
|
+
this.#changed = (event) => {
|
|
220
|
+
this.value = event.target.value;
|
|
221
|
+
this.dispatchEvent(new Event('change', { bubbles: true }));
|
|
222
|
+
};
|
|
223
|
+
}
|
|
63
224
|
static { this.styles = css `
|
|
64
225
|
:host {
|
|
65
226
|
display: block;
|
|
66
227
|
}
|
|
67
228
|
|
|
68
229
|
/* The box, which src/input.ts also draws and tests/select.test.ts compares. */
|
|
69
|
-
|
|
230
|
+
select {
|
|
70
231
|
box-sizing: border-box;
|
|
71
232
|
inline-size: 100%;
|
|
72
233
|
font: inherit;
|
|
@@ -93,7 +254,7 @@ export class UiSelect extends LitElement {
|
|
|
93
254
|
|
|
94
255
|
It does NOT cost the picker. appearance: none changes how the closed control
|
|
95
256
|
is painted and nothing about what opens, so a phone still opens its own wheel. */
|
|
96
|
-
|
|
257
|
+
select {
|
|
97
258
|
appearance: none;
|
|
98
259
|
padding-inline-end: ${clearance};
|
|
99
260
|
background-repeat: no-repeat;
|
|
@@ -107,7 +268,7 @@ export class UiSelect extends LitElement {
|
|
|
107
268
|
|
|
108
269
|
A multiple select is a list rather than a drop-down, and a caret on a list
|
|
109
270
|
points at nothing, so it is guarded rather than drawn everywhere. */
|
|
110
|
-
|
|
271
|
+
select:not([multiple]) {
|
|
111
272
|
background-image:
|
|
112
273
|
linear-gradient(45deg, transparent 50%, ${reference('--ui-color-text-muted')} 50%),
|
|
113
274
|
linear-gradient(135deg, ${reference('--ui-color-text-muted')} 50%, transparent 50%);
|
|
@@ -121,7 +282,7 @@ export class UiSelect extends LitElement {
|
|
|
121
282
|
logical form — so the one physical thing in this sheet is mirrored explicitly.
|
|
122
283
|
The padding needs no rule: padding-inline-end already follows. Measured, both
|
|
123
284
|
halves. */
|
|
124
|
-
|
|
285
|
+
select:not([multiple]):dir(rtl) {
|
|
125
286
|
background-position:
|
|
126
287
|
left ${reference('--ui-space')} center,
|
|
127
288
|
left calc(${reference('--ui-space')} + ${arm}) center;
|
|
@@ -133,30 +294,220 @@ export class UiSelect extends LitElement {
|
|
|
133
294
|
There is no [readonly] guard here and its absence is measured rather than
|
|
134
295
|
forgotten: readOnly is not a property of a select at all, so the input's
|
|
135
296
|
second guard would be a rule about an attribute the platform never sets. */
|
|
136
|
-
|
|
297
|
+
select:hover:not(:disabled) {
|
|
137
298
|
border-color: ${reference('--ui-color-text')};
|
|
138
299
|
}
|
|
139
300
|
|
|
140
301
|
/* A visible focus ring is not decoration: removing it is the single most common
|
|
141
302
|
way a component stops being usable by keyboard. */
|
|
142
|
-
|
|
303
|
+
select:focus-visible {
|
|
143
304
|
outline: 2px solid ${reference('--ui-color-focus')};
|
|
144
305
|
outline-offset: 2px;
|
|
145
306
|
}
|
|
146
307
|
|
|
147
|
-
|
|
308
|
+
select:disabled {
|
|
148
309
|
cursor: not-allowed;
|
|
149
310
|
opacity: 0.5;
|
|
150
311
|
}
|
|
151
312
|
|
|
152
|
-
/*
|
|
153
|
-
the
|
|
154
|
-
|
|
313
|
+
/* Read off the control's own aria-invalid, which this element now writes: it is
|
|
314
|
+
the same source a screen reader uses. Not :host([error]) — a reflected string
|
|
315
|
+
property whose default is empty puts an empty attribute on the host, and an
|
|
316
|
+
attribute-presence selector matches every element. Measured on ui-checkbox. */
|
|
317
|
+
select[aria-invalid='true'] {
|
|
155
318
|
border-color: ${reference('--ui-color-danger')};
|
|
156
319
|
}
|
|
320
|
+
|
|
321
|
+
/* The rhythm ui-field used to own, written out here rather than shared with
|
|
322
|
+
src/input.ts for the reason the docblock above gives about the box — and
|
|
323
|
+
compared by tests/select.test.ts on the same terms. */
|
|
324
|
+
.stack {
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: column;
|
|
327
|
+
gap: calc(${reference('--ui-space')} / 2);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
label {
|
|
331
|
+
color: ${reference('--ui-color-text')};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
:host([disabled]) label {
|
|
335
|
+
color: ${reference('--ui-color-text-muted')};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.help {
|
|
339
|
+
color: ${reference('--ui-color-text')};
|
|
340
|
+
font-size: ${reference('--ui-text-supporting')};
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* Colour is not the only cue — the message says what is wrong, and aria-invalid
|
|
344
|
+
marks the control whatever the styling does. */
|
|
345
|
+
.error {
|
|
346
|
+
color: ${reference('--ui-color-danger')};
|
|
347
|
+
font-size: ${reference('--ui-text-supporting')};
|
|
348
|
+
}
|
|
157
349
|
`; }
|
|
350
|
+
static { this.formAssociated = true; }
|
|
351
|
+
/**
|
|
352
|
+
* Focus is delegated, so `focus()` and `reportValidity()` reach the control — the host
|
|
353
|
+
* is not a focusable element, and the second is what the browser calls itself when a
|
|
354
|
+
* form with an invalid control is submitted.
|
|
355
|
+
*/
|
|
356
|
+
static { this.shadowRootOptions = {
|
|
357
|
+
...LitElement.shadowRootOptions,
|
|
358
|
+
delegatesFocus: true,
|
|
359
|
+
}; }
|
|
360
|
+
static { this.properties = {
|
|
361
|
+
label: { type: String, reflect: true },
|
|
362
|
+
help: { type: String, reflect: true },
|
|
363
|
+
error: { type: String, reflect: true },
|
|
364
|
+
name: { type: String, reflect: true },
|
|
365
|
+
// Stryker disable next-line ObjectLiteral: `{}` is what Lit's default converter
|
|
366
|
+
// already does for a string — `type` only switches the converter for Boolean,
|
|
367
|
+
// Number, Object and Array — and `reflect` defaults to false either way. The
|
|
368
|
+
// declaration is written out to say which of the two `value` is, not to change it.
|
|
369
|
+
value: { type: String },
|
|
370
|
+
required: { type: Boolean, reflect: true },
|
|
371
|
+
disabled: { type: Boolean, reflect: true },
|
|
372
|
+
multiple: { type: Boolean, reflect: true },
|
|
373
|
+
}; }
|
|
374
|
+
#internals;
|
|
375
|
+
#redraw;
|
|
376
|
+
connectedCallback() {
|
|
377
|
+
super.connectedCallback();
|
|
378
|
+
// The half a slot cannot report: a property write on a choice. It reaches here by
|
|
379
|
+
// bubbling, because the choices are this element's own light-DOM children.
|
|
380
|
+
//
|
|
381
|
+
// There is deliberately no removal in `disconnectedCallback`. A listener an
|
|
382
|
+
// element holds on *itself* cannot outlive it, so there is nothing to leak — and
|
|
383
|
+
// `#redraw` is one stable reference, so re-adding it on a reconnect is discarded
|
|
384
|
+
// by `addEventListener` rather than doubled. The override that removed it was
|
|
385
|
+
// three statements no test could tell apart from their absence.
|
|
386
|
+
this.addEventListener(announcement, this.#redraw);
|
|
387
|
+
}
|
|
388
|
+
/** Every choice a host declared, groups included, in the order they were written. */
|
|
389
|
+
#options() {
|
|
390
|
+
return [...this.querySelectorAll('ui-option')];
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* The choice in force: the host's `value` where it names one, the declared default
|
|
394
|
+
* otherwise.
|
|
395
|
+
*
|
|
396
|
+
* The fallback is the platform's own rule, read off the declarations — the first
|
|
397
|
+
* choice marked `selected`, and failing that the first choice at all, which is what a
|
|
398
|
+
* native `<select>` does with no `selected` option in it.
|
|
399
|
+
*/
|
|
400
|
+
#chosen() {
|
|
401
|
+
const options = this.#options();
|
|
402
|
+
if (options.some((option) => option.value === this.value)) {
|
|
403
|
+
return this.value;
|
|
404
|
+
}
|
|
405
|
+
return (options.find((option) => option.selected) ?? options[0])?.value ?? '';
|
|
406
|
+
}
|
|
407
|
+
/** The validity, taken from the control that computed it. */
|
|
408
|
+
#publish(control) {
|
|
409
|
+
if (this.error !== '') {
|
|
410
|
+
this.#internals.setValidity({ customError: true }, this.error, control);
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
this.#internals.setValidity(control.validity, control.validationMessage, control);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* The value and the validity, which move together here or disagree anywhere.
|
|
417
|
+
*
|
|
418
|
+
* **Iterated rather than asserted**, and there is exactly one control to iterate —
|
|
419
|
+
* `render()` puts it there unconditionally. A query and a null check would put a branch
|
|
420
|
+
* here that no test could reach, which is a coverage hole and an immortal mutant at
|
|
421
|
+
* once rather than safety. `src/input.ts` carries the same shape for the same reason.
|
|
422
|
+
*/
|
|
423
|
+
updated() {
|
|
424
|
+
this.#internals.setFormValue(this.#chosen());
|
|
425
|
+
for (const control of this.renderRoot.querySelectorAll('select')) {
|
|
426
|
+
this.#publish(control);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* `change` is re-dispatched because it is non-composed and stops at the shadow
|
|
431
|
+
* boundary; `input` is composed and leaves on its own, retargeted. Measured on
|
|
432
|
+
* `<ui-checkbox>`, and the same here.
|
|
433
|
+
*/
|
|
434
|
+
#changed;
|
|
435
|
+
/** A form reset, which returns to the choice the declarations name. */
|
|
436
|
+
formResetCallback() {
|
|
437
|
+
this.value = '';
|
|
438
|
+
}
|
|
439
|
+
/** A `<fieldset disabled>` above this element, which reaches it and nothing below. */
|
|
440
|
+
formDisabledCallback(disabled) {
|
|
441
|
+
this.disabled = disabled;
|
|
442
|
+
}
|
|
443
|
+
/** Restoring after a back-navigation, where the browser hands the value back. */
|
|
444
|
+
formStateRestoreCallback(state) {
|
|
445
|
+
this.value = state ?? '';
|
|
446
|
+
}
|
|
447
|
+
/** The form this element participates in, for a host that needs it. */
|
|
448
|
+
get form() {
|
|
449
|
+
return this.#internals.form;
|
|
450
|
+
}
|
|
451
|
+
/** Whether the control currently satisfies its constraints. */
|
|
452
|
+
get validity() {
|
|
453
|
+
return this.#internals.validity;
|
|
454
|
+
}
|
|
455
|
+
/** The message a form would report for it, empty while the control is valid. */
|
|
456
|
+
get validationMessage() {
|
|
457
|
+
return this.#internals.validationMessage;
|
|
458
|
+
}
|
|
459
|
+
/** The ids describing the control, in the order a reader needs them. */
|
|
460
|
+
#described() {
|
|
461
|
+
const ids = [this.error === '' ? '' : 'error', this.help === '' ? '' : 'help'].filter((id) => id !== '');
|
|
462
|
+
return ids.length === 0 ? nothing : ids.join(' ');
|
|
463
|
+
}
|
|
464
|
+
/** One declaration, as the element the platform needs. */
|
|
465
|
+
#draw(node, chosen) {
|
|
466
|
+
if (node instanceof UiOptgroup) {
|
|
467
|
+
return html `<optgroup label=${node.label} ?disabled=${node.disabled}>
|
|
468
|
+
${[...node.children].map((child) => this.#draw(child, chosen))}
|
|
469
|
+
</optgroup>`;
|
|
470
|
+
}
|
|
471
|
+
if (node instanceof UiOption) {
|
|
472
|
+
return html `<option
|
|
473
|
+
value=${node.value}
|
|
474
|
+
?selected=${node.value === chosen}
|
|
475
|
+
?disabled=${node.disabled}
|
|
476
|
+
>
|
|
477
|
+
${node.textContent}
|
|
478
|
+
</option>`;
|
|
479
|
+
}
|
|
480
|
+
return html ``;
|
|
481
|
+
}
|
|
158
482
|
render() {
|
|
159
|
-
|
|
483
|
+
const chosen = this.#chosen();
|
|
484
|
+
return html `
|
|
485
|
+
<div class="stack" part="stack">
|
|
486
|
+
<label for="control" part="label">${this.label}</label>
|
|
487
|
+
<select
|
|
488
|
+
id="control"
|
|
489
|
+
part="control"
|
|
490
|
+
name=${this.name === '' ? nothing : this.name}
|
|
491
|
+
?required=${this.required}
|
|
492
|
+
?disabled=${this.disabled}
|
|
493
|
+
?multiple=${this.multiple}
|
|
494
|
+
aria-invalid=${this.error === '' ? nothing : 'true'}
|
|
495
|
+
aria-describedby=${this.#described()}
|
|
496
|
+
@change=${this.#changed}
|
|
497
|
+
>
|
|
498
|
+
${[...this.children].map((node) => this.#draw(node, chosen))}
|
|
499
|
+
</select>
|
|
500
|
+
${this.help === ''
|
|
501
|
+
? nothing
|
|
502
|
+
: html `<span class="help" id="help" part="help">${this.help}</span>`}
|
|
503
|
+
${this.error === ''
|
|
504
|
+
? nothing
|
|
505
|
+
: html `<span class="error" id="error" part="error">${this.error}</span>`}
|
|
506
|
+
<!-- The structural half, which slotchange reports and no observer has to.
|
|
507
|
+
What it holds draws nothing: a declaration is display: none. -->
|
|
508
|
+
<slot @slotchange=${this.#redraw}></slot>
|
|
509
|
+
</div>
|
|
510
|
+
`;
|
|
160
511
|
}
|
|
161
512
|
}
|
|
162
513
|
// Stryker disable next-line StringLiteral: the registration runs once, at import, inside
|
|
@@ -164,4 +515,8 @@ export class UiSelect extends LitElement {
|
|
|
164
515
|
// active the element is already defined under the original name, and no test can observe
|
|
165
516
|
// the change. Outside the runner's reach, not an equivalent mutant.
|
|
166
517
|
customElements.define('ui-select', UiSelect);
|
|
518
|
+
// Stryker disable next-line StringLiteral: the same, for the same reason.
|
|
519
|
+
customElements.define('ui-option', UiOption);
|
|
520
|
+
// Stryker disable next-line StringLiteral: the same, for the same reason.
|
|
521
|
+
customElements.define('ui-optgroup', UiOptgroup);
|
|
167
522
|
//# sourceMappingURL=select.js.map
|
package/dist/select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../src/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAuC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../src/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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EAAE,QAAQ,CAAC,CAAC;AAE7C,0EAA0E;AAC1E,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC"}
|
package/dist/tokens.js
CHANGED
|
@@ -83,7 +83,7 @@ export const tokens = [
|
|
|
83
83
|
// No duration steps come with them. The scale is ordinal with gaps precisely so a step
|
|
84
84
|
// can be inserted when something needs one, and the dialog needs no duration the state
|
|
85
85
|
// step does not already give it — inventing `--ui-duration-200` before a component
|
|
86
|
-
// judges it against something is
|
|
86
|
+
// judges it against something is a claim this package does not make.
|
|
87
87
|
'--ui-easing-enter',
|
|
88
88
|
'--ui-easing-exit',
|
|
89
89
|
// The icon category, arriving with `ui-icon` rather than with the twelve components
|
package/dist/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,mBAAmB;IACnB,4BAA4B;IAC5B,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,qFAAqF;IACrF,uFAAuF;IACvF,mFAAmF;IACnF,cAAc;IACd,EAAE;IACF,oFAAoF;IACpF,+EAA+E;IAC/E,6EAA6E;IAC7E,oBAAoB;IACpB,oBAAoB;IACpB,oFAAoF;IACpF,mFAAmF;IACnF,kFAAkF;IAClF,iFAAiF;IACjF,oFAAoF;IACpF,wEAAwE;IACxE,EAAE;IACF,iFAAiF;IACjF,oFAAoF;IACpF,iFAAiF;IACjF,qFAAqF;IACrF,+EAA+E;IAC/E,kBAAkB;IAClB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,kFAAkF;IAClF,sFAAsF;IACtF,+CAA+C;IAC/C,EAAE;IACF,uFAAuF;IACvF,sFAAsF;IACtF,uFAAuF;IACvF,oFAAoF;IACpF,4CAA4C;IAC5C,mBAAmB;IACnB,mBAAmB;IACnB,qFAAqF;IACrF,oFAAoF;IACpF,sFAAsF;IACtF,qDAAqD;IACrD,EAAE;IACF,uFAAuF;IACvF,uFAAuF;IACvF,mFAAmF;IACnF,
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,mBAAmB;IACnB,4BAA4B;IAC5B,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,qFAAqF;IACrF,uFAAuF;IACvF,mFAAmF;IACnF,cAAc;IACd,EAAE;IACF,oFAAoF;IACpF,+EAA+E;IAC/E,6EAA6E;IAC7E,oBAAoB;IACpB,oBAAoB;IACpB,oFAAoF;IACpF,mFAAmF;IACnF,kFAAkF;IAClF,iFAAiF;IACjF,oFAAoF;IACpF,wEAAwE;IACxE,EAAE;IACF,iFAAiF;IACjF,oFAAoF;IACpF,iFAAiF;IACjF,qFAAqF;IACrF,+EAA+E;IAC/E,kBAAkB;IAClB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,kFAAkF;IAClF,sFAAsF;IACtF,+CAA+C;IAC/C,EAAE;IACF,uFAAuF;IACvF,sFAAsF;IACtF,uFAAuF;IACvF,oFAAoF;IACpF,4CAA4C;IAC5C,mBAAmB;IACnB,mBAAmB;IACnB,qFAAqF;IACrF,oFAAoF;IACpF,sFAAsF;IACtF,qDAAqD;IACrD,EAAE;IACF,uFAAuF;IACvF,uFAAuF;IACvF,mFAAmF;IACnF,qEAAqE;IACrE,mBAAmB;IACnB,kBAAkB;IAClB,oFAAoF;IACpF,mFAAmF;IACnF,mFAAmF;IACnF,2BAA2B;IAC3B,EAAE;IACF,mFAAmF;IACnF,kFAAkF;IAClF,6EAA6E;IAC7E,EAAE;IACF,8EAA8E;IAC9E,sFAAsF;I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