@quieto/ui 0.0.0-stage → 0.1.1

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.
Files changed (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +142 -2
  3. package/custom-elements.json +6121 -0
  4. package/dist/components/qds-accordion/qds-accordion.d.ts +39 -0
  5. package/dist/components/qds-accordion/qds-accordion.d.ts.map +1 -0
  6. package/dist/components/qds-accordion/qds-accordion.js +130 -0
  7. package/dist/components/qds-accordion/qds-accordion.js.map +1 -0
  8. package/dist/components/qds-accordion-item/qds-accordion-item.d.ts +68 -0
  9. package/dist/components/qds-accordion-item/qds-accordion-item.d.ts.map +1 -0
  10. package/dist/components/qds-accordion-item/qds-accordion-item.js +250 -0
  11. package/dist/components/qds-accordion-item/qds-accordion-item.js.map +1 -0
  12. package/dist/components/qds-button/qds-button.d.ts +92 -0
  13. package/dist/components/qds-button/qds-button.d.ts.map +1 -0
  14. package/dist/components/qds-button/qds-button.js +418 -0
  15. package/dist/components/qds-button/qds-button.js.map +1 -0
  16. package/dist/components/qds-card/qds-card.d.ts +48 -0
  17. package/dist/components/qds-card/qds-card.d.ts.map +1 -0
  18. package/dist/components/qds-card/qds-card.js +152 -0
  19. package/dist/components/qds-card/qds-card.js.map +1 -0
  20. package/dist/components/qds-checkbox/qds-checkbox.d.ts +85 -0
  21. package/dist/components/qds-checkbox/qds-checkbox.d.ts.map +1 -0
  22. package/dist/components/qds-checkbox/qds-checkbox.js +316 -0
  23. package/dist/components/qds-checkbox/qds-checkbox.js.map +1 -0
  24. package/dist/components/qds-chip/qds-chip.d.ts +79 -0
  25. package/dist/components/qds-chip/qds-chip.d.ts.map +1 -0
  26. package/dist/components/qds-chip/qds-chip.js +314 -0
  27. package/dist/components/qds-chip/qds-chip.js.map +1 -0
  28. package/dist/components/qds-input/qds-input.d.ts +64 -0
  29. package/dist/components/qds-input/qds-input.d.ts.map +1 -0
  30. package/dist/components/qds-input/qds-input.js +224 -0
  31. package/dist/components/qds-input/qds-input.js.map +1 -0
  32. package/dist/components/qds-modal/qds-modal.d.ts +76 -0
  33. package/dist/components/qds-modal/qds-modal.d.ts.map +1 -0
  34. package/dist/components/qds-modal/qds-modal.js +362 -0
  35. package/dist/components/qds-modal/qds-modal.js.map +1 -0
  36. package/dist/components/qds-progress-bar/qds-progress-bar.d.ts +47 -0
  37. package/dist/components/qds-progress-bar/qds-progress-bar.d.ts.map +1 -0
  38. package/dist/components/qds-progress-bar/qds-progress-bar.js +180 -0
  39. package/dist/components/qds-progress-bar/qds-progress-bar.js.map +1 -0
  40. package/dist/components/qds-radio/qds-radio.d.ts +62 -0
  41. package/dist/components/qds-radio/qds-radio.d.ts.map +1 -0
  42. package/dist/components/qds-radio/qds-radio.js +213 -0
  43. package/dist/components/qds-radio/qds-radio.js.map +1 -0
  44. package/dist/components/qds-radio-group/qds-radio-group.d.ts +72 -0
  45. package/dist/components/qds-radio-group/qds-radio-group.d.ts.map +1 -0
  46. package/dist/components/qds-radio-group/qds-radio-group.js +317 -0
  47. package/dist/components/qds-radio-group/qds-radio-group.js.map +1 -0
  48. package/dist/components/qds-stack/qds-stack.d.ts +46 -0
  49. package/dist/components/qds-stack/qds-stack.d.ts.map +1 -0
  50. package/dist/components/qds-stack/qds-stack.js +149 -0
  51. package/dist/components/qds-stack/qds-stack.js.map +1 -0
  52. package/dist/components/qds-tab/qds-tab.d.ts +55 -0
  53. package/dist/components/qds-tab/qds-tab.d.ts.map +1 -0
  54. package/dist/components/qds-tab/qds-tab.js +162 -0
  55. package/dist/components/qds-tab/qds-tab.js.map +1 -0
  56. package/dist/components/qds-tab-panel/qds-tab-panel.d.ts +32 -0
  57. package/dist/components/qds-tab-panel/qds-tab-panel.d.ts.map +1 -0
  58. package/dist/components/qds-tab-panel/qds-tab-panel.js +72 -0
  59. package/dist/components/qds-tab-panel/qds-tab-panel.js.map +1 -0
  60. package/dist/components/qds-tabs/qds-tabs.d.ts +54 -0
  61. package/dist/components/qds-tabs/qds-tabs.d.ts.map +1 -0
  62. package/dist/components/qds-tabs/qds-tabs.js +196 -0
  63. package/dist/components/qds-tabs/qds-tabs.js.map +1 -0
  64. package/dist/components/qds-text-field/qds-text-field.d.ts +94 -0
  65. package/dist/components/qds-text-field/qds-text-field.d.ts.map +1 -0
  66. package/dist/components/qds-text-field/qds-text-field.js +332 -0
  67. package/dist/components/qds-text-field/qds-text-field.js.map +1 -0
  68. package/dist/components/qds-toggle/qds-toggle.d.ts +68 -0
  69. package/dist/components/qds-toggle/qds-toggle.d.ts.map +1 -0
  70. package/dist/components/qds-toggle/qds-toggle.js +260 -0
  71. package/dist/components/qds-toggle/qds-toggle.js.map +1 -0
  72. package/dist/index.d.ts +50 -0
  73. package/dist/index.d.ts.map +1 -0
  74. package/dist/index.js +40 -0
  75. package/dist/index.js.map +1 -0
  76. package/dist/internal/qds-element.d.ts +31 -0
  77. package/dist/internal/qds-element.d.ts.map +1 -0
  78. package/dist/internal/qds-element.js +68 -0
  79. package/dist/internal/qds-element.js.map +1 -0
  80. package/dist/internal/qds-text-control.d.ts +79 -0
  81. package/dist/internal/qds-text-control.d.ts.map +1 -0
  82. package/dist/internal/qds-text-control.js +159 -0
  83. package/dist/internal/qds-text-control.js.map +1 -0
  84. package/package.json +125 -3
@@ -0,0 +1,332 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { css, html, nothing } from 'lit';
8
+ import { customElement, property, state } from 'lit/decorators.js';
9
+ import { live } from 'lit/directives/live.js';
10
+ import { QdsElement } from '../../internal/qds-element.js';
11
+ import { QdsTextControl } from '../../internal/qds-text-control.js';
12
+ /**
13
+ * A complete text field: a visible label, the input, an optional hint, and an
14
+ * error message.
15
+ *
16
+ * All four live in one shadow root, which is what makes the wiring possible.
17
+ * `<label for>` and `aria-describedby` are ID references, and an ID reference
18
+ * cannot cross a shadow boundary — so a label outside the component could never
19
+ * name the input inside it, and a hint outside could never describe it.
20
+ *
21
+ * Errors come from two places. An `error` message set by the author is always
22
+ * shown. Otherwise, once the user has left the field (or tried to submit the
23
+ * form), the browser's own validation message is shown for any failing
24
+ * constraint — `required`, `type="email"`, `minlength`, `pattern` — so the common
25
+ * cases need no code at all. A `required` field marks its label with an asterisk,
26
+ * hidden from assistive technology, which announces the input as required.
27
+ *
28
+ * @element qds-text-field
29
+ *
30
+ * @slot label - The label, in place of the `label` attribute when it needs markup.
31
+ * @slot hint - The hint, in place of the `hint` attribute when it needs markup, such as a link.
32
+ * @slot start - Content before the text, such as an icon or a prefix.
33
+ * @slot end - Content after the text, such as a unit or a button.
34
+ *
35
+ * @fires {CustomEvent<{ value: string }>} qds-input - Fired on every keystroke.
36
+ * @fires {CustomEvent<{ value: string }>} qds-change - Fired when the value is
37
+ * committed: on blur after editing, or on Enter.
38
+ *
39
+ * @csspart base - The wrapper around the whole field.
40
+ * @csspart label - The label element.
41
+ * @csspart control - The box drawn around the input and its affixes.
42
+ * @csspart input - The native input.
43
+ * @csspart hint - The hint text.
44
+ * @csspart error - The error message.
45
+ *
46
+ * @cssprop [--qds-component-text-field-gap] - Space between the label, control, and messages.
47
+ * @cssprop [--qds-component-text-field-duration] - Border transition duration.
48
+ * @cssprop [--qds-component-text-field-label-font-size] - Label size.
49
+ * @cssprop [--qds-component-text-field-label-font-weight] - Label weight.
50
+ * @cssprop [--qds-component-text-field-label-color-content-{state}] - Label color: `rest`, `disabled`.
51
+ * @cssprop [--qds-component-text-field-hint-font-size] - Hint and error size.
52
+ * @cssprop [--qds-component-text-field-hint-color-content-rest] - Hint color.
53
+ * @cssprop [--qds-component-text-field-error-color-content-rest] - Error message color.
54
+ * @cssprop [--qds-component-text-field-control-gap] - Space between the text and the affixes.
55
+ * @cssprop [--qds-component-text-field-control-padding-block] - Control vertical padding.
56
+ * @cssprop [--qds-component-text-field-control-padding-inline] - Control horizontal padding.
57
+ * @cssprop [--qds-component-text-field-control-font-size] - Input text size.
58
+ * @cssprop [--qds-component-text-field-control-line-height] - Input line height.
59
+ * @cssprop [--qds-component-text-field-control-border-radius] - Control corner radius.
60
+ * @cssprop [--qds-component-text-field-control-border-width] - Control border thickness.
61
+ * @cssprop [--qds-component-text-field-control-color-background-{state}] - Control fill: `rest`, `disabled`.
62
+ * @cssprop [--qds-component-text-field-control-color-border-{state}] - Control border: `rest`, `focus`, `disabled`.
63
+ * @cssprop [--qds-component-text-field-control-color-content-{state}] - Input text: `rest`, `disabled`.
64
+ * @cssprop [--qds-component-text-field-invalid-color-border-rest] - Control border while showing an error.
65
+ * @cssprop [--qds-component-text-field-placeholder-color-content-rest] - Placeholder text.
66
+ * @cssprop [--qds-component-text-field-affix-color-content-rest] - Color of slotted start and end content.
67
+ */
68
+ let QdsTextField = class QdsTextField extends QdsTextControl {
69
+ static { this.styles = [
70
+ QdsElement.baseStyles,
71
+ css `
72
+ :host {
73
+ display: block;
74
+
75
+ --_border: var(--qds-component-text-field-control-color-border-rest, #64748b);
76
+ }
77
+
78
+ .base {
79
+ display: flex;
80
+ flex-direction: column;
81
+ gap: var(--qds-component-text-field-gap, 0.25rem);
82
+ font-family: var(--qds-typography-font-family-sans, inherit);
83
+ }
84
+
85
+ label {
86
+ font-size: var(--qds-component-text-field-label-font-size, 0.875rem);
87
+ font-weight: var(--qds-component-text-field-label-font-weight, 500);
88
+ color: var(--qds-component-text-field-label-color-content-rest, #0f172a);
89
+ }
90
+
91
+ .required {
92
+ margin-inline-start: 0.125em;
93
+ color: var(--qds-component-text-field-error-color-content-rest, #b91c1c);
94
+ }
95
+
96
+ .control {
97
+ display: flex;
98
+ align-items: center;
99
+ gap: var(--qds-component-text-field-control-gap, 0.5rem);
100
+ padding: 0 var(--qds-component-text-field-control-padding-inline, 0.75rem);
101
+
102
+ font-size: var(--qds-component-text-field-control-font-size, 0.875rem);
103
+ line-height: var(--qds-component-text-field-control-line-height, 1.5);
104
+ color: var(--qds-component-text-field-control-color-content-rest, #0f172a);
105
+
106
+ background-color: var(--qds-component-text-field-control-color-background-rest, #f8fafc);
107
+ border: var(--qds-component-text-field-control-border-width, 0.0625rem) solid var(--_border);
108
+ border-radius: var(--qds-component-text-field-control-border-radius, 0.375rem);
109
+ cursor: text;
110
+
111
+ transition: border-color var(--qds-component-text-field-duration, 120ms);
112
+ }
113
+
114
+ .invalid .control {
115
+ --_border: var(--qds-component-text-field-invalid-color-border-rest, #dc2626);
116
+ }
117
+
118
+ .control:focus-within {
119
+ border-color: var(--qds-component-text-field-control-color-border-focus, #2563eb);
120
+ outline: var(--_focus-ring);
121
+ outline-offset: 0.0625rem;
122
+ }
123
+
124
+ input {
125
+ flex: 1;
126
+ min-width: 0;
127
+ margin: 0;
128
+ padding: var(--qds-component-text-field-control-padding-block, 0.5rem) 0;
129
+
130
+ font: inherit;
131
+ color: inherit;
132
+ background: none;
133
+ border: 0;
134
+ outline: none;
135
+ }
136
+
137
+ input::placeholder {
138
+ color: var(--qds-component-text-field-placeholder-color-content-rest, #64748b);
139
+ opacity: 1;
140
+ }
141
+
142
+ ::slotted([slot='start']),
143
+ ::slotted([slot='end']) {
144
+ flex: none;
145
+ color: var(--qds-component-text-field-affix-color-content-rest, #64748b);
146
+ }
147
+
148
+ .hint,
149
+ .error {
150
+ font-size: var(--qds-component-text-field-hint-font-size, 0.75rem);
151
+ }
152
+
153
+ .hint {
154
+ color: var(--qds-component-text-field-hint-color-content-rest, #64748b);
155
+ }
156
+
157
+ .error {
158
+ color: var(--qds-component-text-field-error-color-content-rest, #b91c1c);
159
+ }
160
+
161
+ :host(:disabled) label {
162
+ color: var(--qds-component-text-field-label-color-content-disabled, #64748b);
163
+ }
164
+
165
+ :host(:disabled) .control {
166
+ color: var(--qds-component-text-field-control-color-content-disabled, #64748b);
167
+ background-color: var(--qds-component-text-field-control-color-background-disabled, #f1f5f9);
168
+ border-color: var(--qds-component-text-field-control-color-border-disabled, #e2e8f0);
169
+ cursor: not-allowed;
170
+ }
171
+
172
+ :host(:disabled) input {
173
+ cursor: not-allowed;
174
+ }
175
+
176
+ @media (prefers-reduced-motion: reduce) {
177
+ .control {
178
+ transition: none;
179
+ }
180
+ }
181
+
182
+ @media (forced-colors: active) {
183
+ .control {
184
+ border-color: FieldText;
185
+ }
186
+
187
+ :host(:disabled) .control {
188
+ border-color: GrayText;
189
+ }
190
+ }
191
+ `,
192
+ ]; }
193
+ /**
194
+ * The browser's message for the failing constraint, if any. A plain field, not
195
+ * reactive state: it is read during render and refreshed after it, and making
196
+ * it reactive would schedule a second render from inside updated().
197
+ */
198
+ #nativeError;
199
+ constructor() {
200
+ super();
201
+ /** The visible label. Also the input's accessible name. */
202
+ this.label = '';
203
+ /** Help text shown under the input, and read out with it. */
204
+ this.hint = '';
205
+ /**
206
+ * An error message to show, for errors the browser cannot detect, such as a
207
+ * server-side check. Shown immediately, and marks the field invalid to
208
+ * assistive technology, but does not block form submission.
209
+ */
210
+ this.error = '';
211
+ /**
212
+ * Whether native validation messages may be shown yet: after the user leaves
213
+ * the field, or tries to submit the form. Before that, a required field that
214
+ * nobody has touched is not an error.
215
+ */
216
+ this.touched = false;
217
+ /**
218
+ * The browser's message for the failing constraint, if any. A plain field, not
219
+ * reactive state: it is read during render and refreshed after it, and making
220
+ * it reactive would schedule a second render from inside updated().
221
+ */
222
+ this.#nativeError = '';
223
+ this.hasHintSlot = false;
224
+ // The form fires `invalid` at each failing control when submission is
225
+ // attempted. Treat that as touching the field, so its message appears.
226
+ this.addEventListener('invalid', () => (this.touched = true));
227
+ }
228
+ /** Same as the native `reportValidity()`, and shows the field's message. */
229
+ reportValidity() {
230
+ this.touched = true;
231
+ return super.reportValidity();
232
+ }
233
+ /** The message currently shown, or an empty string. */
234
+ get #shownError() {
235
+ return this.error || (this.touched ? this.#nativeError : '');
236
+ }
237
+ firstUpdated() {
238
+ // Not left to slotchange alone: server-rendered content is already slotted
239
+ // when the element hydrates, so slotchange never fires for it.
240
+ //
241
+ // This has to be a separate, later update. The first client update of a
242
+ // server-rendered element adopts the existing DOM rather than writing to it,
243
+ // so a value that differs from the server's is silently not applied — the
244
+ // hint would stay hidden. Waiting for updateComplete makes it an ordinary
245
+ // follow-up render rather than a change scheduled from inside an update.
246
+ void this.updateComplete.then(() => {
247
+ this.hasHintSlot = this.querySelector(':scope > [slot="hint"]') !== null;
248
+ });
249
+ }
250
+ /** Called by the form on reset: restore the declared value and hide messages again. */
251
+ formResetCallback() {
252
+ super.formResetCallback();
253
+ this.touched = false;
254
+ }
255
+ syncValidity() {
256
+ super.syncValidity();
257
+ const { validationMessage } = this.input;
258
+ // A programmatic value change can alter the message after this render
259
+ // already showed the old one. Re-render only then, and only if it is shown.
260
+ const stale = this.touched && !this.error && this.#nativeError !== validationMessage;
261
+ this.#nativeError = validationMessage;
262
+ if (stale)
263
+ this.requestUpdate();
264
+ }
265
+ render() {
266
+ const error = this.#shownError;
267
+ const hasHint = Boolean(this.hint) || this.hasHintSlot;
268
+ const describedBy = [hasHint ? 'hint' : '', error ? 'error' : ''].filter(Boolean).join(' ');
269
+ return html `
270
+ <div class=${error ? 'base invalid' : 'base'} part="base">
271
+ <label for="input" part="label">
272
+ <slot name="label">${this.label}</slot>
273
+ ${this.required ? html `<span class="required" aria-hidden="true">*</span>` : nothing}
274
+ </label>
275
+ <div class="control" part="control" @click=${this.focusInput}>
276
+ <slot name="start"></slot>
277
+ <input
278
+ id="input"
279
+ part="input"
280
+ type=${this.type}
281
+ .value=${live(this.value)}
282
+ name=${this.name || nothing}
283
+ placeholder=${this.placeholder || nothing}
284
+ aria-describedby=${describedBy || nothing}
285
+ aria-invalid=${error ? 'true' : nothing}
286
+ autocomplete=${this.autocomplete ?? nothing}
287
+ minlength=${this.minlength ?? nothing}
288
+ maxlength=${this.maxlength ?? nothing}
289
+ pattern=${this.pattern ?? nothing}
290
+ ?disabled=${this.disabled || this.formDisabled}
291
+ ?readonly=${this.readonly}
292
+ ?required=${this.required}
293
+ @input=${this.handleInput}
294
+ @change=${this.handleChange}
295
+ @blur=${() => (this.touched = true)}
296
+ />
297
+ <slot name="end"></slot>
298
+ </div>
299
+ <div id="hint" class="hint" part="hint" ?hidden=${!hasHint}>
300
+ <slot
301
+ name="hint"
302
+ @slotchange=${(event) => {
303
+ this.hasHintSlot = event.target.assignedNodes().length > 0;
304
+ }}
305
+ >${this.hint}</slot
306
+ >
307
+ </div>
308
+ ${error ? html `<div id="error" class="error" part="error">${error}</div>` : nothing}
309
+ </div>
310
+ `;
311
+ }
312
+ };
313
+ __decorate([
314
+ property()
315
+ ], QdsTextField.prototype, "label", void 0);
316
+ __decorate([
317
+ property()
318
+ ], QdsTextField.prototype, "hint", void 0);
319
+ __decorate([
320
+ property()
321
+ ], QdsTextField.prototype, "error", void 0);
322
+ __decorate([
323
+ state()
324
+ ], QdsTextField.prototype, "touched", void 0);
325
+ __decorate([
326
+ state()
327
+ ], QdsTextField.prototype, "hasHintSlot", void 0);
328
+ QdsTextField = __decorate([
329
+ customElement('qds-text-field')
330
+ ], QdsTextField);
331
+ export { QdsTextField };
332
+ //# sourceMappingURL=qds-text-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qds-text-field.js","sourceRoot":"","sources":["../../../src/components/qds-text-field/qds-text-field.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,M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B,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CAgQxB"}
@@ -0,0 +1,68 @@
1
+ import { type PropertyValues, type TemplateResult } from 'lit';
2
+ import { QdsElement } from '../../internal/qds-element.js';
3
+ /**
4
+ * An on/off switch.
5
+ *
6
+ * Use a toggle for a setting that takes effect immediately, and a checkbox for a
7
+ * choice that is only applied when a form is submitted. It is announced as a
8
+ * switch ("on"/"off") rather than a checkbox ("checked"/"not checked"), which is
9
+ * the whole difference to a screen reader user.
10
+ *
11
+ * Rendered as a native `<button role="switch">`, so Space and Enter both toggle
12
+ * it and it is focusable without a tabindex.
13
+ *
14
+ * @element qds-toggle
15
+ *
16
+ * @slot - The label.
17
+ *
18
+ * @fires {CustomEvent<{ checked: boolean }>} qds-change - Fired when the user
19
+ * toggles the switch. Not fired for programmatic changes.
20
+ *
21
+ * @csspart base - The native button carrying the switch role.
22
+ * @csspart track - The pill the thumb slides along.
23
+ * @csspart thumb - The sliding circle.
24
+ * @csspart label - The wrapper around the default slot.
25
+ *
26
+ * @cssprop [--qds-component-toggle-gap] - Space between the track and the label.
27
+ * @cssprop [--qds-component-toggle-font-size] - Label size.
28
+ * @cssprop [--qds-component-toggle-line-height] - Label line height.
29
+ * @cssprop [--qds-component-toggle-duration] - Thumb and color transition duration.
30
+ * @cssprop [--qds-component-toggle-track-width] - Track width.
31
+ * @cssprop [--qds-component-toggle-track-height] - Track height. The thumb is this minus twice the padding.
32
+ * @cssprop [--qds-component-toggle-track-padding] - Space between the thumb and the track edge.
33
+ * @cssprop [--qds-component-toggle-track-border-radius] - Track corner radius.
34
+ * @cssprop [--qds-component-toggle-track-color-background-{state}] - Track fill: `unchecked`, `checked`, `hover` (checked, under the pointer), `disabled`.
35
+ * @cssprop [--qds-component-toggle-thumb-color-background-{state}] - Thumb fill: `rest`, `disabled`.
36
+ * @cssprop [--qds-component-toggle-label-color-content-{state}] - Label color: `rest`, `disabled`.
37
+ */
38
+ export declare class QdsToggle extends QdsElement {
39
+ #private;
40
+ static shadowRootOptions: ShadowRootInit;
41
+ static formAssociated: boolean;
42
+ static styles: import("lit").CSSResult[];
43
+ /** Whether the switch is on. The `checked` attribute sets the initial state, restored on form reset. */
44
+ checked: boolean;
45
+ /** Prevents interaction and excludes the value from form submission. */
46
+ disabled: boolean;
47
+ /** Field name used when the form is submitted. */
48
+ name: string;
49
+ /** Value submitted while on. */
50
+ value: string;
51
+ /** Disabled by its own attribute or by an ancestor `<fieldset disabled>`. */
52
+ private formDisabled;
53
+ constructor();
54
+ /** The form this toggle belongs to, if any. */
55
+ get form(): HTMLFormElement | null;
56
+ protected willUpdate(changed: PropertyValues<this>): void;
57
+ /** Called by the form on reset: restore the state the markup declared. */
58
+ formResetCallback(): void;
59
+ /** Called when this element's disabled state changes, from its own attribute or a fieldset. */
60
+ formDisabledCallback(disabled: boolean): void;
61
+ render(): TemplateResult;
62
+ }
63
+ declare global {
64
+ interface HTMLElementTagNameMap {
65
+ 'qds-toggle': QdsToggle;
66
+ }
67
+ }
68
+ //# sourceMappingURL=qds-toggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qds-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/qds-toggle/qds-toggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBACa,SAAU,SAAQ,UAAU;;IACvC,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEF,MAAM,CAAC,cAAc,UAAQ;IAE7B,OAAgB,MAAM,4BAkIpB;IAEF,wGAAwG;IAExG,OAAO,UAAS;IAEhB,wEAAwE;IAExE,QAAQ,UAAS;IAEjB,kDAAkD;IAElD,IAAI,SAAM;IAEV,gCAAgC;IAEhC,KAAK,SAAQ;IAEb,6EAA6E;IAE7E,OAAO,CAAC,YAAY,CAAS;;IAS7B,+CAA+C;IAC/C,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;cAEkB,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAMlE,0EAA0E;IAC1E,iBAAiB,IAAI,IAAI;IAIzB,+FAA+F;IAC/F,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAkBpC,MAAM,IAAI,cAAc;CAelC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -0,0 +1,260 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { css, html } from 'lit';
8
+ import { customElement, property, state } from 'lit/decorators.js';
9
+ import { QdsElement } from '../../internal/qds-element.js';
10
+ /**
11
+ * An on/off switch.
12
+ *
13
+ * Use a toggle for a setting that takes effect immediately, and a checkbox for a
14
+ * choice that is only applied when a form is submitted. It is announced as a
15
+ * switch ("on"/"off") rather than a checkbox ("checked"/"not checked"), which is
16
+ * the whole difference to a screen reader user.
17
+ *
18
+ * Rendered as a native `<button role="switch">`, so Space and Enter both toggle
19
+ * it and it is focusable without a tabindex.
20
+ *
21
+ * @element qds-toggle
22
+ *
23
+ * @slot - The label.
24
+ *
25
+ * @fires {CustomEvent<{ checked: boolean }>} qds-change - Fired when the user
26
+ * toggles the switch. Not fired for programmatic changes.
27
+ *
28
+ * @csspart base - The native button carrying the switch role.
29
+ * @csspart track - The pill the thumb slides along.
30
+ * @csspart thumb - The sliding circle.
31
+ * @csspart label - The wrapper around the default slot.
32
+ *
33
+ * @cssprop [--qds-component-toggle-gap] - Space between the track and the label.
34
+ * @cssprop [--qds-component-toggle-font-size] - Label size.
35
+ * @cssprop [--qds-component-toggle-line-height] - Label line height.
36
+ * @cssprop [--qds-component-toggle-duration] - Thumb and color transition duration.
37
+ * @cssprop [--qds-component-toggle-track-width] - Track width.
38
+ * @cssprop [--qds-component-toggle-track-height] - Track height. The thumb is this minus twice the padding.
39
+ * @cssprop [--qds-component-toggle-track-padding] - Space between the thumb and the track edge.
40
+ * @cssprop [--qds-component-toggle-track-border-radius] - Track corner radius.
41
+ * @cssprop [--qds-component-toggle-track-color-background-{state}] - Track fill: `unchecked`, `checked`, `hover` (checked, under the pointer), `disabled`.
42
+ * @cssprop [--qds-component-toggle-thumb-color-background-{state}] - Thumb fill: `rest`, `disabled`.
43
+ * @cssprop [--qds-component-toggle-label-color-content-{state}] - Label color: `rest`, `disabled`.
44
+ */
45
+ let QdsToggle = class QdsToggle extends QdsElement {
46
+ static { this.shadowRootOptions = {
47
+ ...QdsElement.shadowRootOptions,
48
+ delegatesFocus: true,
49
+ }; }
50
+ static { this.formAssociated = true; }
51
+ static { this.styles = [
52
+ QdsElement.baseStyles,
53
+ css `
54
+ :host {
55
+ display: inline-block;
56
+
57
+ --_track-width: var(--qds-component-toggle-track-width, 3rem);
58
+ --_track-height: var(--qds-component-toggle-track-height, 1.5rem);
59
+ --_padding: var(--qds-component-toggle-track-padding, 0.25rem);
60
+ --_thumb: calc(var(--_track-height) - 2 * var(--_padding));
61
+ --_duration: var(--qds-component-toggle-duration, 120ms);
62
+ }
63
+
64
+ button {
65
+ display: inline-flex;
66
+ align-items: center;
67
+ gap: var(--qds-component-toggle-gap, 0.5rem);
68
+
69
+ margin: 0;
70
+ padding: 0;
71
+
72
+ font-family: var(--qds-typography-font-family-sans, inherit);
73
+ font-size: var(--qds-component-toggle-font-size, 0.875rem);
74
+ line-height: var(--qds-component-toggle-line-height, 1.375);
75
+ text-align: start;
76
+ color: var(--qds-component-toggle-label-color-content-rest, #0f172a);
77
+
78
+ background: none;
79
+ border: 0;
80
+ cursor: pointer;
81
+ -webkit-appearance: none;
82
+ appearance: none;
83
+ }
84
+
85
+ .track {
86
+ display: inline-flex;
87
+ align-items: center;
88
+ flex: none;
89
+ width: var(--_track-width);
90
+ height: var(--_track-height);
91
+ padding: var(--_padding);
92
+ border-radius: var(--qds-component-toggle-track-border-radius, 9999px);
93
+ background-color: var(--qds-component-toggle-track-color-background-unchecked, #64748b);
94
+ transition: background-color var(--_duration);
95
+ }
96
+
97
+ .thumb {
98
+ width: var(--_thumb);
99
+ height: var(--_thumb);
100
+ border-radius: 50%;
101
+ background-color: var(--qds-component-toggle-thumb-color-background-rest, #f8fafc);
102
+ transition: translate var(--_duration);
103
+ }
104
+
105
+ [aria-checked='true'] .track {
106
+ background-color: var(--qds-component-toggle-track-color-background-checked, #2563eb);
107
+ }
108
+
109
+ [aria-checked='true']:where(:hover) .track {
110
+ background-color: var(--qds-component-toggle-track-color-background-hover, #1d4ed8);
111
+ }
112
+
113
+ /*
114
+ * Logical travel: the distance is the same either way, and the sign flips
115
+ * under RTL so "on" is always toward the inline end.
116
+ */
117
+ [aria-checked='true'] .thumb {
118
+ translate: calc(var(--_track-width) - var(--_thumb) - 2 * var(--_padding));
119
+ }
120
+
121
+ :host(:dir(rtl)) [aria-checked='true'] .thumb {
122
+ translate: calc(-1 * (var(--_track-width) - var(--_thumb) - 2 * var(--_padding)));
123
+ }
124
+
125
+ button:focus-visible {
126
+ outline: none;
127
+ }
128
+
129
+ button:focus-visible .track {
130
+ outline: var(--_focus-ring);
131
+ outline-offset: 0.125rem;
132
+ }
133
+
134
+ button:disabled {
135
+ color: var(--qds-component-toggle-label-color-content-disabled, #64748b);
136
+ cursor: not-allowed;
137
+ }
138
+
139
+ button:disabled .track {
140
+ background-color: var(--qds-component-toggle-track-color-background-disabled, #f1f5f9);
141
+ }
142
+
143
+ button:disabled .thumb {
144
+ background-color: var(--qds-component-toggle-thumb-color-background-disabled, #f8fafc);
145
+ }
146
+
147
+ @media (prefers-reduced-motion: reduce) {
148
+ .track,
149
+ .thumb {
150
+ transition: none;
151
+ }
152
+ }
153
+
154
+ /*
155
+ * Forced colors flattens the track and thumb to the same color, leaving
156
+ * only position to tell on from off. Outline the track and fill the thumb
157
+ * with a system color so the thumb stays visible.
158
+ */
159
+ @media (forced-colors: active) {
160
+ .track {
161
+ border: 0.0625rem solid ButtonText;
162
+ }
163
+
164
+ .thumb {
165
+ background-color: ButtonText;
166
+ }
167
+
168
+ [aria-checked='true'] .thumb {
169
+ background-color: Highlight;
170
+ }
171
+
172
+ button:disabled .track {
173
+ border-color: GrayText;
174
+ }
175
+
176
+ button:disabled .thumb {
177
+ background-color: GrayText;
178
+ }
179
+ }
180
+ `,
181
+ ]; }
182
+ #internals;
183
+ constructor() {
184
+ super();
185
+ /** Whether the switch is on. The `checked` attribute sets the initial state, restored on form reset. */
186
+ this.checked = false;
187
+ /** Prevents interaction and excludes the value from form submission. */
188
+ this.disabled = false;
189
+ /** Field name used when the form is submitted. */
190
+ this.name = '';
191
+ /** Value submitted while on. */
192
+ this.value = 'on';
193
+ /** Disabled by its own attribute or by an ancestor `<fieldset disabled>`. */
194
+ this.formDisabled = false;
195
+ this.#internals = this.attachInternals();
196
+ }
197
+ /** The form this toggle belongs to, if any. */
198
+ get form() {
199
+ return this.#internals.form;
200
+ }
201
+ willUpdate(changed) {
202
+ if (changed.has('checked') || changed.has('value')) {
203
+ this.#internals.setFormValue(this.checked ? this.value : null);
204
+ }
205
+ }
206
+ /** Called by the form on reset: restore the state the markup declared. */
207
+ formResetCallback() {
208
+ this.checked = this.hasAttribute('checked');
209
+ }
210
+ /** Called when this element's disabled state changes, from its own attribute or a fieldset. */
211
+ formDisabledCallback(disabled) {
212
+ this.formDisabled = disabled;
213
+ }
214
+ #handleClick() {
215
+ this.checked = !this.checked;
216
+ // Synchronously, not left to willUpdate: a qds-change listener reading
217
+ // FormData would otherwise see the previous state.
218
+ this.#internals.setFormValue(this.checked ? this.value : null);
219
+ this.dispatchEvent(new CustomEvent('qds-change', {
220
+ detail: { checked: this.checked },
221
+ bubbles: true,
222
+ composed: true,
223
+ }));
224
+ }
225
+ render() {
226
+ return html `
227
+ <button
228
+ part="base"
229
+ type="button"
230
+ role="switch"
231
+ aria-checked=${String(this.checked)}
232
+ ?disabled=${this.disabled || this.formDisabled}
233
+ @click=${this.#handleClick}
234
+ >
235
+ <span class="track" part="track"><span class="thumb" part="thumb"></span></span>
236
+ <span part="label"><slot></slot></span>
237
+ </button>
238
+ `;
239
+ }
240
+ };
241
+ __decorate([
242
+ property({ type: Boolean })
243
+ ], QdsToggle.prototype, "checked", void 0);
244
+ __decorate([
245
+ property({ type: Boolean, reflect: true })
246
+ ], QdsToggle.prototype, "disabled", void 0);
247
+ __decorate([
248
+ property()
249
+ ], QdsToggle.prototype, "name", void 0);
250
+ __decorate([
251
+ property()
252
+ ], QdsToggle.prototype, "value", void 0);
253
+ __decorate([
254
+ state()
255
+ ], QdsToggle.prototype, "formDisabled", void 0);
256
+ QdsToggle = __decorate([
257
+ customElement('qds-toggle')
258
+ ], QdsToggle);
259
+ export { QdsToggle };
260
+ //# sourceMappingURL=qds-toggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qds-toggle.js","sourceRoot":"","sources":["../../../src/components/qds-toggle/qds-toggle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEI,IAAM,SAAS,GAA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