@phcdevworks/spectre-components 1.1.0 → 1.2.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 +559 -153
- package/dist/{base-2rD8EmdC.d.cts → base-B_9DJkh2.d.cts} +6 -0
- package/dist/{base-2rD8EmdC.d.ts → base-B_9DJkh2.d.ts} +6 -0
- package/dist/button.cjs +95 -33
- package/dist/button.cjs.map +1 -1
- package/dist/button.d.cts +27 -19
- package/dist/button.d.ts +27 -19
- package/dist/button.js +95 -33
- package/dist/button.js.map +1 -1
- package/dist/checkbox.cjs +65 -4
- package/dist/checkbox.cjs.map +1 -1
- package/dist/checkbox.d.cts +12 -7
- package/dist/checkbox.d.ts +12 -7
- package/dist/checkbox.js +65 -4
- package/dist/checkbox.js.map +1 -1
- package/dist/fieldset.cjs +95 -5
- package/dist/fieldset.cjs.map +1 -1
- package/dist/fieldset.d.cts +33 -7
- package/dist/fieldset.d.ts +33 -7
- package/dist/fieldset.js +95 -5
- package/dist/fieldset.js.map +1 -1
- package/dist/form-9cZG1E9P.d.cts +10 -0
- package/dist/form-9cZG1E9P.d.ts +10 -0
- package/dist/index.cjs +340 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +340 -84
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +88 -5
- package/dist/input.cjs.map +1 -1
- package/dist/input.d.cts +47 -10
- package/dist/input.d.ts +47 -10
- package/dist/input.js +88 -5
- package/dist/input.js.map +1 -1
- package/dist/label.cjs +69 -3
- package/dist/label.cjs.map +1 -1
- package/dist/label.d.cts +18 -6
- package/dist/label.d.ts +18 -6
- package/dist/label.js +69 -3
- package/dist/label.js.map +1 -1
- package/dist/{projectable-BzDQ4xp_.d.cts → projectable-CIfxi7dv.d.cts} +1 -1
- package/dist/{projectable-s3SgvjGX.d.ts → projectable-Ksv9eoIr.d.ts} +1 -1
- package/dist/radio.cjs +85 -4
- package/dist/radio.cjs.map +1 -1
- package/dist/radio.d.cts +14 -7
- package/dist/radio.d.ts +14 -7
- package/dist/radio.js +85 -4
- package/dist/radio.js.map +1 -1
- package/dist/select.cjs +69 -6
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.cts +14 -9
- package/dist/select.d.ts +14 -9
- package/dist/select.js +69 -6
- package/dist/select.js.map +1 -1
- package/dist/textarea.cjs +84 -5
- package/dist/textarea.cjs.map +1 -1
- package/dist/textarea.d.cts +35 -9
- package/dist/textarea.d.ts +35 -9
- package/dist/textarea.js +84 -5
- package/dist/textarea.js.map +1 -1
- package/package.json +21 -12
- package/dist/form-iI7vV-3W.d.cts +0 -6
- package/dist/form-iI7vV-3W.d.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -1,15 +1,60 @@
|
|
|
1
|
+
import { getButtonClasses, getInputClasses, getInputLabelClasses } from '@phcdevworks/spectre-ui';
|
|
1
2
|
import { LitElement, html, nothing } from 'lit';
|
|
2
3
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
3
|
-
import { getButtonClasses, getInputClasses } from '@phcdevworks/spectre-ui';
|
|
4
4
|
import { live } from 'lit/directives/live.js';
|
|
5
5
|
|
|
6
|
-
// src/
|
|
6
|
+
// src/utils/form.ts
|
|
7
|
+
var spectreInputSizes = ["sm", "md", "lg"];
|
|
8
|
+
function isInputSize(value) {
|
|
9
|
+
return spectreInputSizes.includes(value);
|
|
10
|
+
}
|
|
11
|
+
var spectreButtonVariants = [
|
|
12
|
+
"primary",
|
|
13
|
+
"secondary",
|
|
14
|
+
"ghost",
|
|
15
|
+
"danger",
|
|
16
|
+
"success",
|
|
17
|
+
"cta",
|
|
18
|
+
"accent"
|
|
19
|
+
];
|
|
20
|
+
function isButtonVariant(value) {
|
|
21
|
+
return spectreButtonVariants.includes(value);
|
|
22
|
+
}
|
|
23
|
+
var spectreButtonTypes = ["button", "submit", "reset"];
|
|
24
|
+
function isButtonType(value) {
|
|
25
|
+
return spectreButtonTypes.includes(value);
|
|
26
|
+
}
|
|
27
|
+
var spectreInputTypes = [
|
|
28
|
+
"text",
|
|
29
|
+
"email",
|
|
30
|
+
"password",
|
|
31
|
+
"search",
|
|
32
|
+
"tel",
|
|
33
|
+
"url",
|
|
34
|
+
"number",
|
|
35
|
+
"date",
|
|
36
|
+
"datetime-local",
|
|
37
|
+
"month",
|
|
38
|
+
"time",
|
|
39
|
+
"week"
|
|
40
|
+
];
|
|
41
|
+
function isInputType(value) {
|
|
42
|
+
return spectreInputTypes.includes(value);
|
|
43
|
+
}
|
|
44
|
+
function normalizeInt(value, fallback, min = 0) {
|
|
45
|
+
if (value == null || typeof value !== "number" || !Number.isInteger(value) || value < min) {
|
|
46
|
+
return fallback;
|
|
47
|
+
}
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
7
50
|
var SpectreBaseElement = class extends LitElement {
|
|
8
51
|
constructor() {
|
|
9
52
|
super(...arguments);
|
|
10
53
|
this._ariaLabel = null;
|
|
11
54
|
this._ariaLabelledBy = null;
|
|
12
55
|
this._ariaDescribedBy = null;
|
|
56
|
+
this._autocapitalize = "";
|
|
57
|
+
this._spellcheck = null;
|
|
13
58
|
this._title = "";
|
|
14
59
|
this._id = "";
|
|
15
60
|
}
|
|
@@ -46,6 +91,29 @@ var SpectreBaseElement = class extends LitElement {
|
|
|
46
91
|
this._removeHostAttribute("aria-describedby");
|
|
47
92
|
this.requestUpdate();
|
|
48
93
|
}
|
|
94
|
+
get autocapitalize() {
|
|
95
|
+
return this._autocapitalize;
|
|
96
|
+
}
|
|
97
|
+
set autocapitalize(value) {
|
|
98
|
+
const normalizedValue = value ?? "";
|
|
99
|
+
if (this._autocapitalize === normalizedValue) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
this._autocapitalize = normalizedValue;
|
|
103
|
+
this._removeHostAttribute("autocapitalize");
|
|
104
|
+
this.requestUpdate();
|
|
105
|
+
}
|
|
106
|
+
get spellcheck() {
|
|
107
|
+
return this._spellcheck ?? super.spellcheck;
|
|
108
|
+
}
|
|
109
|
+
set spellcheck(value) {
|
|
110
|
+
if (this._spellcheck === value) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
this._spellcheck = value ?? null;
|
|
114
|
+
this._removeHostAttribute("spellcheck");
|
|
115
|
+
this.requestUpdate();
|
|
116
|
+
}
|
|
49
117
|
get title() {
|
|
50
118
|
return this._title;
|
|
51
119
|
}
|
|
@@ -80,6 +148,8 @@ var SpectreBaseElement = class extends LitElement {
|
|
|
80
148
|
const proxiedAttributes = [
|
|
81
149
|
"id",
|
|
82
150
|
"title",
|
|
151
|
+
"autocapitalize",
|
|
152
|
+
"spellcheck",
|
|
83
153
|
"aria-label",
|
|
84
154
|
"aria-labelledby",
|
|
85
155
|
"aria-describedby"
|
|
@@ -97,6 +167,10 @@ var SpectreBaseElement = class extends LitElement {
|
|
|
97
167
|
return this.id || null;
|
|
98
168
|
case "title":
|
|
99
169
|
return this.title || null;
|
|
170
|
+
case "autocapitalize":
|
|
171
|
+
return this.autocapitalize || null;
|
|
172
|
+
case "spellcheck":
|
|
173
|
+
return this._spellcheck !== null ? String(this._spellcheck) : null;
|
|
100
174
|
case "aria-label":
|
|
101
175
|
return this.ariaLabel;
|
|
102
176
|
case "aria-labelledby":
|
|
@@ -113,6 +187,10 @@ var SpectreBaseElement = class extends LitElement {
|
|
|
113
187
|
return this.id !== "";
|
|
114
188
|
case "title":
|
|
115
189
|
return this.title !== "";
|
|
190
|
+
case "autocapitalize":
|
|
191
|
+
return this.autocapitalize !== "";
|
|
192
|
+
case "spellcheck":
|
|
193
|
+
return this._spellcheck !== null;
|
|
116
194
|
case "aria-label":
|
|
117
195
|
return this.ariaLabel !== null;
|
|
118
196
|
case "aria-labelledby":
|
|
@@ -131,6 +209,12 @@ var SpectreBaseElement = class extends LitElement {
|
|
|
131
209
|
case "title":
|
|
132
210
|
this.title = value;
|
|
133
211
|
break;
|
|
212
|
+
case "autocapitalize":
|
|
213
|
+
this.autocapitalize = value;
|
|
214
|
+
break;
|
|
215
|
+
case "spellcheck":
|
|
216
|
+
this.spellcheck = value !== "false";
|
|
217
|
+
break;
|
|
134
218
|
case "aria-label":
|
|
135
219
|
this.ariaLabel = value;
|
|
136
220
|
break;
|
|
@@ -152,6 +236,12 @@ var SpectreBaseElement = class extends LitElement {
|
|
|
152
236
|
case "title":
|
|
153
237
|
this.title = "";
|
|
154
238
|
break;
|
|
239
|
+
case "autocapitalize":
|
|
240
|
+
this.autocapitalize = "";
|
|
241
|
+
break;
|
|
242
|
+
case "spellcheck":
|
|
243
|
+
this.spellcheck = null;
|
|
244
|
+
break;
|
|
155
245
|
case "aria-label":
|
|
156
246
|
this.ariaLabel = null;
|
|
157
247
|
break;
|
|
@@ -263,32 +353,13 @@ var SpectreProjectableElement = class extends SpectreBaseElement {
|
|
|
263
353
|
this.contentObserver = void 0;
|
|
264
354
|
}
|
|
265
355
|
};
|
|
266
|
-
var spectreButtonVariants = [
|
|
267
|
-
"primary",
|
|
268
|
-
"secondary",
|
|
269
|
-
"ghost",
|
|
270
|
-
"danger",
|
|
271
|
-
"success",
|
|
272
|
-
"cta",
|
|
273
|
-
"accent"
|
|
274
|
-
];
|
|
275
|
-
var spectreButtonSizes = ["sm", "md", "lg"];
|
|
276
|
-
var spectreButtonTypes = ["button", "submit", "reset"];
|
|
277
|
-
function isButtonVariant(value) {
|
|
278
|
-
return spectreButtonVariants.includes(value);
|
|
279
|
-
}
|
|
280
|
-
function isButtonSize(value) {
|
|
281
|
-
return spectreButtonSizes.includes(value);
|
|
282
|
-
}
|
|
283
|
-
function isButtonType(value) {
|
|
284
|
-
return spectreButtonTypes.includes(value);
|
|
285
|
-
}
|
|
286
356
|
var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
287
357
|
constructor() {
|
|
288
358
|
super(...arguments);
|
|
289
359
|
this.autofocus = false;
|
|
290
360
|
this.disabled = false;
|
|
291
361
|
this.fullWidth = false;
|
|
362
|
+
this.iconOnly = false;
|
|
292
363
|
this.loading = false;
|
|
293
364
|
this.loadingLabel = "Loading";
|
|
294
365
|
this.pill = false;
|
|
@@ -297,6 +368,18 @@ var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
|
297
368
|
this.variant = "primary";
|
|
298
369
|
this.value = "";
|
|
299
370
|
}
|
|
371
|
+
get id() {
|
|
372
|
+
return super.id;
|
|
373
|
+
}
|
|
374
|
+
set id(value) {
|
|
375
|
+
super.id = value;
|
|
376
|
+
}
|
|
377
|
+
get title() {
|
|
378
|
+
return super.title;
|
|
379
|
+
}
|
|
380
|
+
set title(value) {
|
|
381
|
+
super.title = value;
|
|
382
|
+
}
|
|
300
383
|
getContentContainer() {
|
|
301
384
|
return this.querySelector("[data-sp-button-native]");
|
|
302
385
|
}
|
|
@@ -308,13 +391,13 @@ var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
|
308
391
|
return el.hasAttribute("data-sp-button-native") || el.hasAttribute("data-sp-button-loading-label") || el.hasAttribute("data-sp-button-label-fallback");
|
|
309
392
|
}
|
|
310
393
|
willUpdate(changedProperties) {
|
|
311
|
-
if (changedProperties.has("variant") && !isButtonVariant(this.variant)) {
|
|
394
|
+
if (changedProperties.has("variant") && (this.variant == null || !isButtonVariant(this.variant))) {
|
|
312
395
|
this.variant = "primary";
|
|
313
396
|
}
|
|
314
|
-
if (changedProperties.has("size") && !
|
|
397
|
+
if (changedProperties.has("size") && (this.size == null || !isInputSize(this.size))) {
|
|
315
398
|
this.size = "md";
|
|
316
399
|
}
|
|
317
|
-
if (changedProperties.has("type") && !isButtonType(this.type)) {
|
|
400
|
+
if (changedProperties.has("type") && (this.type == null || !isButtonType(this.type))) {
|
|
318
401
|
this.type = "button";
|
|
319
402
|
}
|
|
320
403
|
if (changedProperties.has("loadingLabel")) {
|
|
@@ -329,15 +412,16 @@ var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
|
329
412
|
get buttonClasses() {
|
|
330
413
|
return getButtonClasses({
|
|
331
414
|
disabled: this.isDisabled,
|
|
332
|
-
fullWidth: this.fullWidth,
|
|
333
|
-
|
|
334
|
-
|
|
415
|
+
fullWidth: this.fullWidth ?? false,
|
|
416
|
+
iconOnly: this.iconOnly ?? false,
|
|
417
|
+
loading: this.loading ?? false,
|
|
418
|
+
pill: this.pill ?? false,
|
|
335
419
|
size: this.size,
|
|
336
420
|
variant: this.variant
|
|
337
421
|
});
|
|
338
422
|
}
|
|
339
423
|
get isDisabled() {
|
|
340
|
-
return this.disabled || this.loading;
|
|
424
|
+
return (this.disabled ?? false) || (this.loading ?? false);
|
|
341
425
|
}
|
|
342
426
|
get visibleLabelFallback() {
|
|
343
427
|
const trimmedLabel = this.label?.trim();
|
|
@@ -351,12 +435,12 @@ var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
|
351
435
|
}
|
|
352
436
|
renderButtonContent() {
|
|
353
437
|
if (this.loading) {
|
|
354
|
-
return html`<span data-sp-button-loading-label>${this.loadingLabel}</span>`;
|
|
438
|
+
return html`<span class="sp-label" data-sp-button-loading-label>${this.loadingLabel}</span>`;
|
|
355
439
|
}
|
|
356
440
|
if (this.hasProjectedContent) {
|
|
357
441
|
return this.projectedContent;
|
|
358
442
|
}
|
|
359
|
-
return this.visibleLabelFallback ? html`<span data-sp-button-label-fallback>${this.visibleLabelFallback}</span>` : nothing;
|
|
443
|
+
return this.visibleLabelFallback ? html`<span class="sp-label" data-sp-button-label-fallback>${this.visibleLabelFallback}</span>` : nothing;
|
|
360
444
|
}
|
|
361
445
|
render() {
|
|
362
446
|
return html`<button
|
|
@@ -373,7 +457,7 @@ var SpectreButtonElement = class extends SpectreProjectableElement {
|
|
|
373
457
|
name="${ifDefined(this.name || void 0)}"
|
|
374
458
|
title="${ifDefined(this.title || void 0)}"
|
|
375
459
|
type="${this.type}"
|
|
376
|
-
value="${ifDefined(this.value
|
|
460
|
+
value="${ifDefined(this.value)}"
|
|
377
461
|
>
|
|
378
462
|
${this.renderButtonContent()}
|
|
379
463
|
</button>`;
|
|
@@ -384,6 +468,7 @@ SpectreButtonElement.properties = {
|
|
|
384
468
|
disabled: { type: Boolean, reflect: true },
|
|
385
469
|
form: { type: String },
|
|
386
470
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
471
|
+
iconOnly: { attribute: "icon-only", type: Boolean, reflect: true },
|
|
387
472
|
label: { type: String, reflect: true },
|
|
388
473
|
loading: { type: Boolean, reflect: true },
|
|
389
474
|
loadingLabel: { attribute: "loading-label", type: String, reflect: true },
|
|
@@ -402,33 +487,6 @@ function defineSpectreButton(tagName = "sp-button") {
|
|
|
402
487
|
customElements.define(tagName, SpectreButtonElement);
|
|
403
488
|
return SpectreButtonElement;
|
|
404
489
|
}
|
|
405
|
-
var spectreInputSizes = ["sm", "md", "lg"];
|
|
406
|
-
function isInputSize(value) {
|
|
407
|
-
return spectreInputSizes.includes(value);
|
|
408
|
-
}
|
|
409
|
-
var spectreInputTypes = [
|
|
410
|
-
"text",
|
|
411
|
-
"email",
|
|
412
|
-
"password",
|
|
413
|
-
"search",
|
|
414
|
-
"tel",
|
|
415
|
-
"url",
|
|
416
|
-
"number",
|
|
417
|
-
"date",
|
|
418
|
-
"datetime-local",
|
|
419
|
-
"month",
|
|
420
|
-
"time",
|
|
421
|
-
"week"
|
|
422
|
-
];
|
|
423
|
-
function isInputType(value) {
|
|
424
|
-
return spectreInputTypes.includes(value);
|
|
425
|
-
}
|
|
426
|
-
function normalizeInt(value, fallback, min = 0) {
|
|
427
|
-
if (value == null || typeof value !== "number" || !Number.isInteger(value) || value < min) {
|
|
428
|
-
return fallback;
|
|
429
|
-
}
|
|
430
|
-
return value;
|
|
431
|
-
}
|
|
432
490
|
var SpectreInputElement = class extends SpectreBaseElement {
|
|
433
491
|
constructor() {
|
|
434
492
|
super(...arguments);
|
|
@@ -445,11 +503,35 @@ var SpectreInputElement = class extends SpectreBaseElement {
|
|
|
445
503
|
this.type = "text";
|
|
446
504
|
this.value = "";
|
|
447
505
|
}
|
|
506
|
+
get autocapitalize() {
|
|
507
|
+
return super.autocapitalize;
|
|
508
|
+
}
|
|
509
|
+
set autocapitalize(value) {
|
|
510
|
+
super.autocapitalize = value;
|
|
511
|
+
}
|
|
512
|
+
get id() {
|
|
513
|
+
return super.id;
|
|
514
|
+
}
|
|
515
|
+
set id(value) {
|
|
516
|
+
super.id = value;
|
|
517
|
+
}
|
|
518
|
+
get spellcheck() {
|
|
519
|
+
return super.spellcheck;
|
|
520
|
+
}
|
|
521
|
+
set spellcheck(value) {
|
|
522
|
+
super.spellcheck = value;
|
|
523
|
+
}
|
|
524
|
+
get title() {
|
|
525
|
+
return super.title;
|
|
526
|
+
}
|
|
527
|
+
set title(value) {
|
|
528
|
+
super.title = value;
|
|
529
|
+
}
|
|
448
530
|
willUpdate(changedProperties) {
|
|
449
|
-
if (changedProperties.has("size") && !isInputSize(this.size)) {
|
|
531
|
+
if (changedProperties.has("size") && (this.size == null || !isInputSize(this.size))) {
|
|
450
532
|
this.size = "md";
|
|
451
533
|
}
|
|
452
|
-
if (changedProperties.has("type") && !isInputType(this.type)) {
|
|
534
|
+
if (changedProperties.has("type") && (this.type == null || !isInputType(this.type))) {
|
|
453
535
|
this.type = "text";
|
|
454
536
|
}
|
|
455
537
|
if (changedProperties.has("value") && this.value == null) {
|
|
@@ -464,14 +546,14 @@ var SpectreInputElement = class extends SpectreBaseElement {
|
|
|
464
546
|
}
|
|
465
547
|
get inputClasses() {
|
|
466
548
|
return getInputClasses({
|
|
467
|
-
fullWidth: this.fullWidth,
|
|
468
|
-
pill: this.pill,
|
|
549
|
+
fullWidth: this.fullWidth ?? false,
|
|
550
|
+
pill: this.pill ?? false,
|
|
469
551
|
size: this.size,
|
|
470
552
|
state: this.isDisabled ? this.disabled ? "disabled" : "loading" : this.invalid ? "error" : this.success ? "success" : "default"
|
|
471
553
|
});
|
|
472
554
|
}
|
|
473
555
|
get isDisabled() {
|
|
474
|
-
return this.disabled || this.loading;
|
|
556
|
+
return (this.disabled ?? false) || (this.loading ?? false);
|
|
475
557
|
}
|
|
476
558
|
get nativeInput() {
|
|
477
559
|
return this.querySelector("[data-sp-input-native]");
|
|
@@ -497,22 +579,29 @@ var SpectreInputElement = class extends SpectreBaseElement {
|
|
|
497
579
|
aria-invalid="${ifDefined(this.invalid ? "true" : void 0)}"
|
|
498
580
|
aria-label="${ifDefined(this.forwardedAriaLabel)}"
|
|
499
581
|
aria-labelledby="${ifDefined(this.forwardedAriaLabelledBy)}"
|
|
582
|
+
autocapitalize="${ifDefined(this.autocapitalize || void 0)}"
|
|
500
583
|
autocomplete="${ifDefined(this.autocomplete || void 0)}"
|
|
501
584
|
?autofocus="${this.autofocus}"
|
|
502
585
|
class="${this.inputClasses}"
|
|
503
586
|
data-sp-input-native
|
|
504
587
|
?disabled="${this.isDisabled}"
|
|
588
|
+
enterkeyhint="${ifDefined(this.enterkeyhint || void 0)}"
|
|
505
589
|
form="${ifDefined(this.form || void 0)}"
|
|
506
590
|
?readonly="${this.readonly}"
|
|
507
591
|
?required="${this.required}"
|
|
508
592
|
id="${ifDefined(this.id || void 0)}"
|
|
509
593
|
inputmode="${ifDefined(this.inputmode || void 0)}"
|
|
594
|
+
list="${ifDefined(this.list || void 0)}"
|
|
510
595
|
max="${ifDefined(this.max || void 0)}"
|
|
511
596
|
maxlength="${ifDefined(this.maxlength)}"
|
|
512
597
|
min="${ifDefined(this.min || void 0)}"
|
|
513
598
|
minlength="${ifDefined(this.minlength)}"
|
|
514
599
|
name="${ifDefined(this.name || void 0)}"
|
|
600
|
+
pattern="${ifDefined(this.pattern || void 0)}"
|
|
515
601
|
placeholder="${ifDefined(this.placeholder || void 0)}"
|
|
602
|
+
spellcheck="${ifDefined(
|
|
603
|
+
this.spellcheck === void 0 ? void 0 : String(this.spellcheck)
|
|
604
|
+
)}"
|
|
516
605
|
step="${ifDefined(this.step || void 0)}"
|
|
517
606
|
title="${ifDefined(this.title || void 0)}"
|
|
518
607
|
type="${this.type}"
|
|
@@ -523,24 +612,29 @@ var SpectreInputElement = class extends SpectreBaseElement {
|
|
|
523
612
|
}
|
|
524
613
|
};
|
|
525
614
|
SpectreInputElement.properties = {
|
|
615
|
+
autocapitalize: { type: String, reflect: true },
|
|
526
616
|
autocomplete: { type: String, reflect: true },
|
|
527
617
|
autofocus: { type: Boolean, reflect: true },
|
|
528
618
|
disabled: { type: Boolean, reflect: true },
|
|
619
|
+
enterkeyhint: { type: String, reflect: true },
|
|
529
620
|
form: { type: String },
|
|
530
621
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
531
622
|
inputmode: { type: String, reflect: true },
|
|
532
623
|
invalid: { type: Boolean, reflect: true },
|
|
624
|
+
list: { type: String, reflect: true },
|
|
533
625
|
loading: { type: Boolean, reflect: true },
|
|
534
626
|
max: { type: String, reflect: true },
|
|
535
627
|
maxlength: { type: Number, reflect: true },
|
|
536
628
|
min: { type: String, reflect: true },
|
|
537
629
|
minlength: { type: Number, reflect: true },
|
|
538
630
|
name: { type: String, reflect: true },
|
|
631
|
+
pattern: { type: String, reflect: true },
|
|
539
632
|
pill: { type: Boolean, reflect: true },
|
|
540
633
|
placeholder: { type: String, reflect: true },
|
|
541
634
|
readonly: { type: Boolean, reflect: true },
|
|
542
635
|
required: { type: Boolean, reflect: true },
|
|
543
636
|
size: { type: String, reflect: true },
|
|
637
|
+
spellcheck: { type: Boolean, reflect: true },
|
|
544
638
|
step: { type: String, reflect: true },
|
|
545
639
|
success: { type: Boolean, reflect: true },
|
|
546
640
|
type: { type: String, reflect: true },
|
|
@@ -571,8 +665,32 @@ var SpectreTextareaElement = class extends SpectreBaseElement {
|
|
|
571
665
|
this.success = false;
|
|
572
666
|
this.value = "";
|
|
573
667
|
}
|
|
668
|
+
get autocapitalize() {
|
|
669
|
+
return super.autocapitalize;
|
|
670
|
+
}
|
|
671
|
+
set autocapitalize(value) {
|
|
672
|
+
super.autocapitalize = value;
|
|
673
|
+
}
|
|
674
|
+
get id() {
|
|
675
|
+
return super.id;
|
|
676
|
+
}
|
|
677
|
+
set id(value) {
|
|
678
|
+
super.id = value;
|
|
679
|
+
}
|
|
680
|
+
get spellcheck() {
|
|
681
|
+
return super.spellcheck;
|
|
682
|
+
}
|
|
683
|
+
set spellcheck(value) {
|
|
684
|
+
super.spellcheck = value;
|
|
685
|
+
}
|
|
686
|
+
get title() {
|
|
687
|
+
return super.title;
|
|
688
|
+
}
|
|
689
|
+
set title(value) {
|
|
690
|
+
super.title = value;
|
|
691
|
+
}
|
|
574
692
|
willUpdate(changedProperties) {
|
|
575
|
-
if (changedProperties.has("size") && !isInputSize(this.size)) {
|
|
693
|
+
if (changedProperties.has("size") && (this.size == null || !isInputSize(this.size))) {
|
|
576
694
|
this.size = "md";
|
|
577
695
|
}
|
|
578
696
|
if (changedProperties.has("rows")) {
|
|
@@ -590,14 +708,14 @@ var SpectreTextareaElement = class extends SpectreBaseElement {
|
|
|
590
708
|
}
|
|
591
709
|
get textareaClasses() {
|
|
592
710
|
return getInputClasses({
|
|
593
|
-
fullWidth: this.fullWidth,
|
|
594
|
-
pill: this.pill,
|
|
711
|
+
fullWidth: this.fullWidth ?? false,
|
|
712
|
+
pill: this.pill ?? false,
|
|
595
713
|
size: this.size,
|
|
596
714
|
state: this.isDisabled ? this.disabled ? "disabled" : "loading" : this.invalid ? "error" : this.success ? "success" : "default"
|
|
597
715
|
});
|
|
598
716
|
}
|
|
599
717
|
get isDisabled() {
|
|
600
|
-
return this.disabled || this.loading;
|
|
718
|
+
return (this.disabled ?? false) || (this.loading ?? false);
|
|
601
719
|
}
|
|
602
720
|
get nativeTextarea() {
|
|
603
721
|
return this.querySelector("[data-sp-textarea-native]");
|
|
@@ -623,11 +741,13 @@ var SpectreTextareaElement = class extends SpectreBaseElement {
|
|
|
623
741
|
aria-invalid="${ifDefined(this.invalid ? "true" : void 0)}"
|
|
624
742
|
aria-label="${ifDefined(this.forwardedAriaLabel)}"
|
|
625
743
|
aria-labelledby="${ifDefined(this.forwardedAriaLabelledBy)}"
|
|
744
|
+
autocapitalize="${ifDefined(this.autocapitalize || void 0)}"
|
|
626
745
|
autocomplete="${ifDefined(this.autocomplete || void 0)}"
|
|
627
746
|
?autofocus="${this.autofocus}"
|
|
628
747
|
class="${this.textareaClasses}"
|
|
629
748
|
data-sp-textarea-native
|
|
630
749
|
?disabled="${this.isDisabled}"
|
|
750
|
+
enterkeyhint="${ifDefined(this.enterkeyhint || void 0)}"
|
|
631
751
|
form="${ifDefined(this.form || void 0)}"
|
|
632
752
|
inputmode="${ifDefined(this.inputmode || void 0)}"
|
|
633
753
|
?readonly="${this.readonly}"
|
|
@@ -638,6 +758,9 @@ var SpectreTextareaElement = class extends SpectreBaseElement {
|
|
|
638
758
|
name="${ifDefined(this.name || void 0)}"
|
|
639
759
|
placeholder="${ifDefined(this.placeholder || void 0)}"
|
|
640
760
|
rows="${this.rows}"
|
|
761
|
+
spellcheck="${ifDefined(
|
|
762
|
+
this.spellcheck === void 0 ? void 0 : String(this.spellcheck)
|
|
763
|
+
)}"
|
|
641
764
|
title="${ifDefined(this.title || void 0)}"
|
|
642
765
|
.value="${live(this.value)}"
|
|
643
766
|
@change="${this.handleChange}"
|
|
@@ -646,9 +769,11 @@ var SpectreTextareaElement = class extends SpectreBaseElement {
|
|
|
646
769
|
}
|
|
647
770
|
};
|
|
648
771
|
SpectreTextareaElement.properties = {
|
|
772
|
+
autocapitalize: { type: String, reflect: true },
|
|
649
773
|
autocomplete: { type: String, reflect: true },
|
|
650
774
|
autofocus: { type: Boolean, reflect: true },
|
|
651
775
|
disabled: { type: Boolean, reflect: true },
|
|
776
|
+
enterkeyhint: { type: String, reflect: true },
|
|
652
777
|
form: { type: String },
|
|
653
778
|
fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
|
|
654
779
|
inputmode: { type: String, reflect: true },
|
|
@@ -661,8 +786,9 @@ SpectreTextareaElement.properties = {
|
|
|
661
786
|
placeholder: { type: String, reflect: true },
|
|
662
787
|
readonly: { type: Boolean, reflect: true },
|
|
663
788
|
required: { type: Boolean, reflect: true },
|
|
664
|
-
rows: { type: Number },
|
|
789
|
+
rows: { type: Number, reflect: true },
|
|
665
790
|
size: { type: String, reflect: true },
|
|
791
|
+
spellcheck: { type: Boolean, reflect: true },
|
|
666
792
|
success: { type: Boolean, reflect: true },
|
|
667
793
|
value: { type: String }
|
|
668
794
|
};
|
|
@@ -688,6 +814,18 @@ var SpectreSelectElement = class extends SpectreProjectableElement {
|
|
|
688
814
|
this.success = false;
|
|
689
815
|
this.value = "";
|
|
690
816
|
}
|
|
817
|
+
get id() {
|
|
818
|
+
return super.id;
|
|
819
|
+
}
|
|
820
|
+
set id(value) {
|
|
821
|
+
super.id = value;
|
|
822
|
+
}
|
|
823
|
+
get title() {
|
|
824
|
+
return super.title;
|
|
825
|
+
}
|
|
826
|
+
set title(value) {
|
|
827
|
+
super.title = value;
|
|
828
|
+
}
|
|
691
829
|
getContentContainer() {
|
|
692
830
|
return this.querySelector("[data-sp-select-native]");
|
|
693
831
|
}
|
|
@@ -699,7 +837,7 @@ var SpectreSelectElement = class extends SpectreProjectableElement {
|
|
|
699
837
|
return el.hasAttribute("data-sp-select-native");
|
|
700
838
|
}
|
|
701
839
|
willUpdate(changedProperties) {
|
|
702
|
-
if (changedProperties.has("size") && !isInputSize(this.size)) {
|
|
840
|
+
if (changedProperties.has("size") && (this.size == null || !isInputSize(this.size))) {
|
|
703
841
|
this.size = "md";
|
|
704
842
|
}
|
|
705
843
|
if (changedProperties.has("value") && this.value == null) {
|
|
@@ -712,8 +850,12 @@ var SpectreSelectElement = class extends SpectreProjectableElement {
|
|
|
712
850
|
if (!nativeSelect) {
|
|
713
851
|
return;
|
|
714
852
|
}
|
|
715
|
-
|
|
716
|
-
|
|
853
|
+
const valueChanged = changedProperties.has("value");
|
|
854
|
+
const oldValue = changedProperties.get("value");
|
|
855
|
+
if (valueChanged && this.value !== void 0 && (this.value !== "" || oldValue !== void 0 || this.hasAttribute("value"))) {
|
|
856
|
+
if (nativeSelect.value !== this.value) {
|
|
857
|
+
nativeSelect.value = this.value;
|
|
858
|
+
}
|
|
717
859
|
}
|
|
718
860
|
if (this.value === "" && !this.hasAttribute("value")) {
|
|
719
861
|
const nativeValue = nativeSelect.value ?? "";
|
|
@@ -728,14 +870,14 @@ var SpectreSelectElement = class extends SpectreProjectableElement {
|
|
|
728
870
|
}
|
|
729
871
|
get selectClasses() {
|
|
730
872
|
return getInputClasses({
|
|
731
|
-
fullWidth: this.fullWidth,
|
|
732
|
-
pill: this.pill,
|
|
873
|
+
fullWidth: this.fullWidth ?? false,
|
|
874
|
+
pill: this.pill ?? false,
|
|
733
875
|
size: this.size,
|
|
734
876
|
state: this.isDisabled ? this.disabled ? "disabled" : "loading" : this.invalid ? "error" : this.success ? "success" : "default"
|
|
735
877
|
});
|
|
736
878
|
}
|
|
737
879
|
get isDisabled() {
|
|
738
|
-
return this.disabled || this.loading;
|
|
880
|
+
return (this.disabled ?? false) || (this.loading ?? false);
|
|
739
881
|
}
|
|
740
882
|
handleInput(event) {
|
|
741
883
|
const select = event.currentTarget;
|
|
@@ -811,6 +953,18 @@ var SpectreCheckboxElement = class extends SpectreProjectableElement {
|
|
|
811
953
|
this.success = false;
|
|
812
954
|
this.value = "on";
|
|
813
955
|
}
|
|
956
|
+
get id() {
|
|
957
|
+
return super.id;
|
|
958
|
+
}
|
|
959
|
+
set id(value) {
|
|
960
|
+
super.id = value;
|
|
961
|
+
}
|
|
962
|
+
get title() {
|
|
963
|
+
return super.title;
|
|
964
|
+
}
|
|
965
|
+
set title(value) {
|
|
966
|
+
super.title = value;
|
|
967
|
+
}
|
|
814
968
|
getContentContainer() {
|
|
815
969
|
return this.querySelector("[data-sp-checkbox-label]");
|
|
816
970
|
}
|
|
@@ -830,7 +984,7 @@ var SpectreCheckboxElement = class extends SpectreProjectableElement {
|
|
|
830
984
|
return this.querySelector("[data-sp-checkbox-native]");
|
|
831
985
|
}
|
|
832
986
|
get isDisabled() {
|
|
833
|
-
return this.disabled || this.loading;
|
|
987
|
+
return (this.disabled ?? false) || (this.loading ?? false);
|
|
834
988
|
}
|
|
835
989
|
get visibleLabelFallback() {
|
|
836
990
|
const trimmedLabel = this.label?.trim();
|
|
@@ -851,7 +1005,10 @@ var SpectreCheckboxElement = class extends SpectreProjectableElement {
|
|
|
851
1005
|
this.nativeInput?.blur();
|
|
852
1006
|
}
|
|
853
1007
|
render() {
|
|
854
|
-
const labelContent = this.hasProjectedContent ? this.projectedContent : this.visibleLabelFallback ? html`<span
|
|
1008
|
+
const labelContent = this.hasProjectedContent ? this.projectedContent : this.visibleLabelFallback ? html`<span
|
|
1009
|
+
class="${getInputLabelClasses({ disabled: this.isDisabled })}"
|
|
1010
|
+
data-sp-checkbox-label-fallback
|
|
1011
|
+
>${this.visibleLabelFallback}</span>` : nothing;
|
|
855
1012
|
return html`<label data-sp-checkbox-label>
|
|
856
1013
|
<input
|
|
857
1014
|
aria-busy="${this.loading ? "true" : "false"}"
|
|
@@ -911,6 +1068,18 @@ var SpectreRadioElement = class extends SpectreProjectableElement {
|
|
|
911
1068
|
this.success = false;
|
|
912
1069
|
this.value = "on";
|
|
913
1070
|
}
|
|
1071
|
+
get id() {
|
|
1072
|
+
return super.id;
|
|
1073
|
+
}
|
|
1074
|
+
set id(value) {
|
|
1075
|
+
super.id = value;
|
|
1076
|
+
}
|
|
1077
|
+
get title() {
|
|
1078
|
+
return super.title;
|
|
1079
|
+
}
|
|
1080
|
+
set title(value) {
|
|
1081
|
+
super.title = value;
|
|
1082
|
+
}
|
|
914
1083
|
getContentContainer() {
|
|
915
1084
|
return this.querySelector("[data-sp-radio-label]");
|
|
916
1085
|
}
|
|
@@ -930,7 +1099,7 @@ var SpectreRadioElement = class extends SpectreProjectableElement {
|
|
|
930
1099
|
return this.querySelector("[data-sp-radio-native]");
|
|
931
1100
|
}
|
|
932
1101
|
get isDisabled() {
|
|
933
|
-
return this.disabled || this.loading;
|
|
1102
|
+
return (this.disabled ?? false) || (this.loading ?? false);
|
|
934
1103
|
}
|
|
935
1104
|
get visibleLabelFallback() {
|
|
936
1105
|
const trimmedLabel = this.label?.trim();
|
|
@@ -944,6 +1113,26 @@ var SpectreRadioElement = class extends SpectreProjectableElement {
|
|
|
944
1113
|
const input = event.currentTarget;
|
|
945
1114
|
this.checked = input.checked;
|
|
946
1115
|
}
|
|
1116
|
+
updated(changedProperties) {
|
|
1117
|
+
super.updated(changedProperties);
|
|
1118
|
+
if ((changedProperties.has("checked") || changedProperties.has("name")) && this.checked && this.name) {
|
|
1119
|
+
this.syncGroup();
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
syncGroup() {
|
|
1123
|
+
if (!this.name || !this.checked) {
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
const root = this.getRootNode();
|
|
1127
|
+
const radios = root.querySelectorAll(
|
|
1128
|
+
`sp-radio[name="${this.name}"]`
|
|
1129
|
+
);
|
|
1130
|
+
radios.forEach((radio) => {
|
|
1131
|
+
if (radio !== this && radio.checked) {
|
|
1132
|
+
radio.checked = false;
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
947
1136
|
focus(options) {
|
|
948
1137
|
this.nativeInput?.focus(options);
|
|
949
1138
|
}
|
|
@@ -951,7 +1140,10 @@ var SpectreRadioElement = class extends SpectreProjectableElement {
|
|
|
951
1140
|
this.nativeInput?.blur();
|
|
952
1141
|
}
|
|
953
1142
|
render() {
|
|
954
|
-
const labelContent = this.hasProjectedContent ? this.projectedContent : this.visibleLabelFallback ? html`<span
|
|
1143
|
+
const labelContent = this.hasProjectedContent ? this.projectedContent : this.visibleLabelFallback ? html`<span
|
|
1144
|
+
class="${getInputLabelClasses({ disabled: this.isDisabled })}"
|
|
1145
|
+
data-sp-radio-label-fallback
|
|
1146
|
+
>${this.visibleLabelFallback}</span>` : nothing;
|
|
955
1147
|
return html`<label data-sp-radio-label>
|
|
956
1148
|
<input
|
|
957
1149
|
aria-busy="${this.loading ? "true" : "false"}"
|
|
@@ -1000,6 +1192,25 @@ function defineSpectreRadio(tagName = "sp-radio") {
|
|
|
1000
1192
|
return SpectreRadioElement;
|
|
1001
1193
|
}
|
|
1002
1194
|
var SpectreLabelElement = class extends SpectreProjectableElement {
|
|
1195
|
+
constructor() {
|
|
1196
|
+
super(...arguments);
|
|
1197
|
+
this.disabled = false;
|
|
1198
|
+
}
|
|
1199
|
+
get isDisabled() {
|
|
1200
|
+
return this.disabled ?? false;
|
|
1201
|
+
}
|
|
1202
|
+
get id() {
|
|
1203
|
+
return super.id;
|
|
1204
|
+
}
|
|
1205
|
+
set id(value) {
|
|
1206
|
+
super.id = value;
|
|
1207
|
+
}
|
|
1208
|
+
get title() {
|
|
1209
|
+
return super.title;
|
|
1210
|
+
}
|
|
1211
|
+
set title(value) {
|
|
1212
|
+
super.title = value;
|
|
1213
|
+
}
|
|
1003
1214
|
getContentContainer() {
|
|
1004
1215
|
return this.querySelector("[data-sp-label-native]");
|
|
1005
1216
|
}
|
|
@@ -1021,7 +1232,7 @@ var SpectreLabelElement = class extends SpectreProjectableElement {
|
|
|
1021
1232
|
aria-describedby="${ifDefined(this.forwardedAriaDescribedBy)}"
|
|
1022
1233
|
aria-label="${ifDefined(this.forwardedAriaLabel)}"
|
|
1023
1234
|
aria-labelledby="${ifDefined(this.forwardedAriaLabelledBy)}"
|
|
1024
|
-
class="
|
|
1235
|
+
class="${getInputLabelClasses({ disabled: this.isDisabled })}"
|
|
1025
1236
|
data-sp-label-native
|
|
1026
1237
|
for="${ifDefined(this.htmlFor || void 0)}"
|
|
1027
1238
|
id="${ifDefined(this.id || void 0)}"
|
|
@@ -1032,6 +1243,7 @@ var SpectreLabelElement = class extends SpectreProjectableElement {
|
|
|
1032
1243
|
}
|
|
1033
1244
|
};
|
|
1034
1245
|
SpectreLabelElement.properties = {
|
|
1246
|
+
disabled: { type: Boolean, reflect: true },
|
|
1035
1247
|
htmlFor: { attribute: "for", type: String, reflect: true }
|
|
1036
1248
|
};
|
|
1037
1249
|
function defineSpectreLabel(tagName = "sp-label") {
|
|
@@ -1046,6 +1258,28 @@ var SpectreFieldsetElement = class extends SpectreProjectableElement {
|
|
|
1046
1258
|
constructor() {
|
|
1047
1259
|
super(...arguments);
|
|
1048
1260
|
this.disabled = false;
|
|
1261
|
+
this.invalid = false;
|
|
1262
|
+
this.loading = false;
|
|
1263
|
+
this.success = false;
|
|
1264
|
+
}
|
|
1265
|
+
get id() {
|
|
1266
|
+
return super.id;
|
|
1267
|
+
}
|
|
1268
|
+
set id(value) {
|
|
1269
|
+
super.id = value;
|
|
1270
|
+
}
|
|
1271
|
+
get title() {
|
|
1272
|
+
return super.title;
|
|
1273
|
+
}
|
|
1274
|
+
set title(value) {
|
|
1275
|
+
super.title = value;
|
|
1276
|
+
}
|
|
1277
|
+
get visibleLegend() {
|
|
1278
|
+
const trimmedLegend = this.legend?.trim();
|
|
1279
|
+
return trimmedLegend ? trimmedLegend : void 0;
|
|
1280
|
+
}
|
|
1281
|
+
get isDisabled() {
|
|
1282
|
+
return (this.disabled ?? false) || (this.loading ?? false);
|
|
1049
1283
|
}
|
|
1050
1284
|
getContentContainer() {
|
|
1051
1285
|
return this.querySelector("[data-sp-fieldset-native]");
|
|
@@ -1057,6 +1291,20 @@ var SpectreFieldsetElement = class extends SpectreProjectableElement {
|
|
|
1057
1291
|
const el = node;
|
|
1058
1292
|
return el.hasAttribute("data-sp-fieldset-native") || el.hasAttribute("data-sp-fieldset-legend");
|
|
1059
1293
|
}
|
|
1294
|
+
willUpdate(changedProperties) {
|
|
1295
|
+
if (changedProperties.has("disabled") && this.disabled == null) {
|
|
1296
|
+
this.disabled = false;
|
|
1297
|
+
}
|
|
1298
|
+
if (changedProperties.has("invalid") && this.invalid == null) {
|
|
1299
|
+
this.invalid = false;
|
|
1300
|
+
}
|
|
1301
|
+
if (changedProperties.has("loading") && this.loading == null) {
|
|
1302
|
+
this.loading = false;
|
|
1303
|
+
}
|
|
1304
|
+
if (changedProperties.has("success") && this.success == null) {
|
|
1305
|
+
this.success = false;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1060
1308
|
focus(options) {
|
|
1061
1309
|
this.getContentContainer()?.focus(options);
|
|
1062
1310
|
}
|
|
@@ -1065,17 +1313,22 @@ var SpectreFieldsetElement = class extends SpectreProjectableElement {
|
|
|
1065
1313
|
}
|
|
1066
1314
|
render() {
|
|
1067
1315
|
return html`<fieldset
|
|
1316
|
+
aria-busy="${this.loading ? "true" : "false"}"
|
|
1068
1317
|
aria-describedby="${ifDefined(this.forwardedAriaDescribedBy)}"
|
|
1318
|
+
aria-invalid="${ifDefined(this.invalid ? "true" : void 0)}"
|
|
1069
1319
|
aria-label="${ifDefined(this.forwardedAriaLabel)}"
|
|
1070
1320
|
aria-labelledby="${ifDefined(this.forwardedAriaLabelledBy)}"
|
|
1071
1321
|
data-sp-fieldset-native
|
|
1072
|
-
?disabled="${this.
|
|
1322
|
+
?disabled="${this.isDisabled}"
|
|
1073
1323
|
form="${ifDefined(this.form || void 0)}"
|
|
1074
1324
|
id="${ifDefined(this.id || void 0)}"
|
|
1075
1325
|
name="${ifDefined(this.name || void 0)}"
|
|
1076
1326
|
title="${ifDefined(this.title || void 0)}"
|
|
1077
1327
|
>
|
|
1078
|
-
${this.
|
|
1328
|
+
${this.visibleLegend ? html`<legend
|
|
1329
|
+
class="${getInputLabelClasses({ disabled: this.isDisabled })}"
|
|
1330
|
+
data-sp-fieldset-legend
|
|
1331
|
+
>${this.visibleLegend}</legend>` : nothing}
|
|
1079
1332
|
${this.hasProjectedContent ? this.projectedContent : nothing}
|
|
1080
1333
|
</fieldset>`;
|
|
1081
1334
|
}
|
|
@@ -1083,8 +1336,11 @@ var SpectreFieldsetElement = class extends SpectreProjectableElement {
|
|
|
1083
1336
|
SpectreFieldsetElement.properties = {
|
|
1084
1337
|
disabled: { type: Boolean, reflect: true },
|
|
1085
1338
|
form: { type: String },
|
|
1339
|
+
invalid: { type: Boolean, reflect: true },
|
|
1086
1340
|
legend: { type: String, reflect: true },
|
|
1087
|
-
|
|
1341
|
+
loading: { type: Boolean, reflect: true },
|
|
1342
|
+
name: { type: String, reflect: true },
|
|
1343
|
+
success: { type: Boolean, reflect: true }
|
|
1088
1344
|
};
|
|
1089
1345
|
function defineSpectreFieldset(tagName = "sp-fieldset") {
|
|
1090
1346
|
const existingElement = customElements.get(tagName);
|
|
@@ -1107,6 +1363,6 @@ function defineSpectreComponents() {
|
|
|
1107
1363
|
defineSpectreFieldset();
|
|
1108
1364
|
}
|
|
1109
1365
|
|
|
1110
|
-
export { SpectreButtonElement, SpectreCheckboxElement, SpectreFieldsetElement, SpectreInputElement, SpectreLabelElement, SpectreRadioElement, SpectreSelectElement, SpectreTextareaElement, defineSpectreButton, defineSpectreCheckbox, defineSpectreComponents, defineSpectreFieldset, defineSpectreInput, defineSpectreLabel, defineSpectreRadio, defineSpectreSelect, defineSpectreTextarea, spectreButtonSizes, spectreButtonTypes, spectreButtonVariants, spectreInputSizes, spectreInputTypes };
|
|
1366
|
+
export { SpectreButtonElement, SpectreCheckboxElement, SpectreFieldsetElement, SpectreInputElement, SpectreLabelElement, SpectreRadioElement, SpectreSelectElement, SpectreTextareaElement, defineSpectreButton, defineSpectreCheckbox, defineSpectreComponents, defineSpectreFieldset, defineSpectreInput, defineSpectreLabel, defineSpectreRadio, defineSpectreSelect, defineSpectreTextarea, spectreInputSizes as spectreButtonSizes, spectreButtonTypes, spectreButtonVariants, spectreInputSizes, spectreInputTypes };
|
|
1111
1367
|
//# sourceMappingURL=index.js.map
|
|
1112
1368
|
//# sourceMappingURL=index.js.map
|