@phcdevworks/spectre-components 0.0.1 → 1.1.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.
Files changed (62) hide show
  1. package/README.md +113 -40
  2. package/dist/base-2rD8EmdC.d.cts +32 -0
  3. package/dist/base-2rD8EmdC.d.ts +32 -0
  4. package/dist/button.cjs +295 -170
  5. package/dist/button.cjs.map +1 -1
  6. package/dist/button.d.cts +30 -61
  7. package/dist/button.d.ts +30 -61
  8. package/dist/button.js +296 -171
  9. package/dist/button.js.map +1 -1
  10. package/dist/checkbox.cjs +286 -71
  11. package/dist/checkbox.cjs.map +1 -1
  12. package/dist/checkbox.d.cts +38 -43
  13. package/dist/checkbox.d.ts +38 -43
  14. package/dist/checkbox.js +287 -72
  15. package/dist/checkbox.js.map +1 -1
  16. package/dist/fieldset.cjs +233 -88
  17. package/dist/fieldset.cjs.map +1 -1
  18. package/dist/fieldset.d.cts +23 -40
  19. package/dist/fieldset.d.ts +23 -40
  20. package/dist/fieldset.js +233 -88
  21. package/dist/fieldset.js.map +1 -1
  22. package/dist/form-iI7vV-3W.d.cts +6 -0
  23. package/dist/form-iI7vV-3W.d.ts +6 -0
  24. package/dist/index.cjs +564 -1029
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +5 -2
  27. package/dist/index.d.ts +5 -2
  28. package/dist/index.js +566 -1030
  29. package/dist/index.js.map +1 -1
  30. package/dist/input.cjs +232 -119
  31. package/dist/input.cjs.map +1 -1
  32. package/dist/input.d.cts +52 -68
  33. package/dist/input.d.ts +52 -68
  34. package/dist/input.js +232 -119
  35. package/dist/input.js.map +1 -1
  36. package/dist/label.cjs +232 -73
  37. package/dist/label.cjs.map +1 -1
  38. package/dist/label.d.cts +13 -22
  39. package/dist/label.d.ts +13 -22
  40. package/dist/label.js +232 -73
  41. package/dist/label.js.map +1 -1
  42. package/dist/projectable-BzDQ4xp_.d.cts +17 -0
  43. package/dist/projectable-s3SgvjGX.d.ts +17 -0
  44. package/dist/radio.cjs +286 -71
  45. package/dist/radio.cjs.map +1 -1
  46. package/dist/radio.d.cts +38 -43
  47. package/dist/radio.d.ts +38 -43
  48. package/dist/radio.js +287 -72
  49. package/dist/radio.js.map +1 -1
  50. package/dist/select.cjs +292 -163
  51. package/dist/select.cjs.map +1 -1
  52. package/dist/select.d.cts +35 -58
  53. package/dist/select.d.ts +35 -58
  54. package/dist/select.js +293 -163
  55. package/dist/select.js.map +1 -1
  56. package/dist/textarea.cjs +191 -290
  57. package/dist/textarea.cjs.map +1 -1
  58. package/dist/textarea.d.cts +41 -58
  59. package/dist/textarea.d.ts +41 -58
  60. package/dist/textarea.js +191 -290
  61. package/dist/textarea.js.map +1 -1
  62. package/package.json +13 -12
package/dist/textarea.cjs CHANGED
@@ -6,227 +6,201 @@ var ifDefined_js = require('lit/directives/if-defined.js');
6
6
  var spectreUi = require('@phcdevworks/spectre-ui');
7
7
 
8
8
  // src/components/textarea/sp-textarea.ts
9
- var spectreInputTypes = [
10
- "text",
11
- "email",
12
- "password",
13
- "search",
14
- "tel",
15
- "url",
16
- "number",
17
- "date",
18
- "datetime-local",
19
- "month",
20
- "time",
21
- "week"
22
- ];
23
- var spectreInputSizes = ["sm", "md", "lg"];
24
- function isInputType(value) {
25
- return spectreInputTypes.includes(value);
26
- }
27
- function isInputSize(value) {
28
- return spectreInputSizes.includes(value);
29
- }
30
- var SpectreInputElement = class extends lit.LitElement {
9
+ var SpectreBaseElement = class extends lit.LitElement {
31
10
  constructor() {
32
11
  super(...arguments);
33
- this.ariaLabel = null;
34
- this.ariaLabelledBy = null;
35
- this.ariaDescribedBy = null;
36
- this.autofocus = false;
37
- this.disabled = false;
38
- this.fullWidth = false;
39
- this.invalid = false;
40
- this.loading = false;
41
- this.pill = false;
42
- this.readonly = false;
43
- this.required = false;
44
- this.size = "md";
45
- this.success = false;
46
- this.title = "";
47
- this.type = "text";
48
- this.value = "";
12
+ this._ariaLabel = null;
13
+ this._ariaLabelledBy = null;
14
+ this._ariaDescribedBy = null;
15
+ this._title = "";
16
+ this._id = "";
17
+ }
18
+ get ariaLabel() {
19
+ return this._ariaLabel;
20
+ }
21
+ set ariaLabel(value) {
22
+ if (this._ariaLabel === value) {
23
+ return;
24
+ }
25
+ this._ariaLabel = value;
26
+ this._removeHostAttribute("aria-label");
27
+ this.requestUpdate();
28
+ }
29
+ get ariaLabelledBy() {
30
+ return this._ariaLabelledBy;
31
+ }
32
+ set ariaLabelledBy(value) {
33
+ if (this._ariaLabelledBy === value) {
34
+ return;
35
+ }
36
+ this._ariaLabelledBy = value;
37
+ this._removeHostAttribute("aria-labelledby");
38
+ this.requestUpdate();
39
+ }
40
+ get ariaDescribedBy() {
41
+ return this._ariaDescribedBy;
42
+ }
43
+ set ariaDescribedBy(value) {
44
+ if (this._ariaDescribedBy === value) {
45
+ return;
46
+ }
47
+ this._ariaDescribedBy = value;
48
+ this._removeHostAttribute("aria-describedby");
49
+ this.requestUpdate();
50
+ }
51
+ get title() {
52
+ return this._title;
53
+ }
54
+ set title(value) {
55
+ const normalizedValue = value ?? "";
56
+ if (this._title === normalizedValue) {
57
+ return;
58
+ }
59
+ this._title = normalizedValue;
60
+ this._removeHostAttribute("title");
61
+ this.requestUpdate();
49
62
  }
50
63
  get id() {
51
- return this._id ?? "";
64
+ return this._id;
52
65
  }
53
66
  set id(value) {
54
- if ((this._id ?? "") === value) {
67
+ const normalizedValue = value ?? "";
68
+ if (this._id === normalizedValue) {
55
69
  return;
56
70
  }
57
- this._id = value;
58
- const host = this;
59
- if (HTMLElement.prototype.hasAttribute.call(host, "id")) {
60
- HTMLElement.prototype.removeAttribute.call(host, "id");
61
- }
71
+ this._id = normalizedValue;
72
+ this._removeHostAttribute("id");
62
73
  this.requestUpdate();
63
74
  }
75
+ // Spectre components intentionally render in light DOM so the global
76
+ // `@phcdevworks/spectre-ui` styling contract can apply directly.
64
77
  createRenderRoot() {
65
78
  return this;
66
79
  }
67
80
  connectedCallback() {
68
81
  super.connectedCallback();
69
- const hostId = super.getAttribute("id");
70
- if (hostId !== null) {
71
- this.id = hostId;
72
- }
82
+ const proxiedAttributes = [
83
+ "id",
84
+ "title",
85
+ "aria-label",
86
+ "aria-labelledby",
87
+ "aria-describedby"
88
+ ];
89
+ proxiedAttributes.forEach((attr) => {
90
+ const value = super.getAttribute(attr);
91
+ if (value !== null) {
92
+ this.setAttribute(attr, value);
93
+ }
94
+ });
73
95
  }
74
96
  getAttribute(qualifiedName) {
75
- if (qualifiedName === "id") {
76
- return this.id || null;
97
+ switch (qualifiedName) {
98
+ case "id":
99
+ return this.id || null;
100
+ case "title":
101
+ return this.title || null;
102
+ case "aria-label":
103
+ return this.ariaLabel;
104
+ case "aria-labelledby":
105
+ return this.ariaLabelledBy;
106
+ case "aria-describedby":
107
+ return this.ariaDescribedBy;
108
+ default:
109
+ return super.getAttribute(qualifiedName);
77
110
  }
78
- return super.getAttribute(qualifiedName);
79
111
  }
80
112
  hasAttribute(qualifiedName) {
81
- if (qualifiedName === "id") {
82
- return this.id !== "";
113
+ switch (qualifiedName) {
114
+ case "id":
115
+ return this.id !== "";
116
+ case "title":
117
+ return this.title !== "";
118
+ case "aria-label":
119
+ return this.ariaLabel !== null;
120
+ case "aria-labelledby":
121
+ return this.ariaLabelledBy !== null;
122
+ case "aria-describedby":
123
+ return this.ariaDescribedBy !== null;
124
+ default:
125
+ return super.hasAttribute(qualifiedName);
83
126
  }
84
- return super.hasAttribute(qualifiedName);
85
127
  }
86
128
  setAttribute(qualifiedName, value) {
87
- if (qualifiedName === "id") {
88
- this.id = value;
89
- return;
129
+ switch (qualifiedName) {
130
+ case "id":
131
+ this.id = value;
132
+ break;
133
+ case "title":
134
+ this.title = value;
135
+ break;
136
+ case "aria-label":
137
+ this.ariaLabel = value;
138
+ break;
139
+ case "aria-labelledby":
140
+ this.ariaLabelledBy = value;
141
+ break;
142
+ case "aria-describedby":
143
+ this.ariaDescribedBy = value;
144
+ break;
145
+ default:
146
+ super.setAttribute(qualifiedName, value);
90
147
  }
91
- super.setAttribute(qualifiedName, value);
92
148
  }
93
149
  removeAttribute(qualifiedName) {
94
- if (qualifiedName === "id") {
95
- this.id = "";
96
- return;
150
+ switch (qualifiedName) {
151
+ case "id":
152
+ this.id = "";
153
+ break;
154
+ case "title":
155
+ this.title = "";
156
+ break;
157
+ case "aria-label":
158
+ this.ariaLabel = null;
159
+ break;
160
+ case "aria-labelledby":
161
+ this.ariaLabelledBy = null;
162
+ break;
163
+ case "aria-describedby":
164
+ this.ariaDescribedBy = null;
165
+ break;
166
+ default:
167
+ super.removeAttribute(qualifiedName);
97
168
  }
98
- super.removeAttribute(qualifiedName);
99
169
  }
100
- willUpdate(changedProperties) {
101
- if (changedProperties.has("size") && !isInputSize(this.size)) {
102
- this.size = "md";
103
- }
104
- if (changedProperties.has("type") && !isInputType(this.type)) {
105
- this.type = "text";
106
- }
107
- if (changedProperties.has("value") && this.value == null) {
108
- this.value = "";
109
- }
110
- if (changedProperties.has("maxlength")) {
111
- if (this.maxlength == null || !Number.isInteger(this.maxlength) || this.maxlength < 0) {
112
- this.maxlength = void 0;
113
- }
114
- }
115
- if (changedProperties.has("minlength")) {
116
- if (this.minlength == null || !Number.isInteger(this.minlength) || this.minlength < 0) {
117
- this.minlength = void 0;
118
- }
170
+ _removeHostAttribute(name) {
171
+ const host = this;
172
+ if (HTMLElement.prototype.hasAttribute.call(host, name)) {
173
+ HTMLElement.prototype.removeAttribute.call(host, name);
119
174
  }
120
175
  }
121
- get inputClasses() {
122
- return spectreUi.getInputClasses({
123
- fullWidth: this.fullWidth,
124
- pill: this.pill,
125
- size: this.size,
126
- state: this.isDisabled ? this.disabled ? "disabled" : "loading" : this.invalid ? "error" : this.success ? "success" : "default"
127
- });
128
- }
129
- get isDisabled() {
130
- return this.disabled || this.loading;
131
- }
132
- get nativeInput() {
133
- return this.querySelector("[data-sp-input-native]");
134
- }
135
176
  get forwardedAriaLabel() {
136
- const ariaLabel = this.ariaLabel?.trim();
137
- return ariaLabel ? ariaLabel : void 0;
177
+ const value = this.ariaLabel?.trim();
178
+ return value ? value : void 0;
138
179
  }
139
180
  get forwardedAriaLabelledBy() {
140
- const ariaLabelledBy = this.ariaLabelledBy?.trim();
141
- return ariaLabelledBy ? ariaLabelledBy : void 0;
181
+ const value = this.ariaLabelledBy?.trim();
182
+ return value ? value : void 0;
142
183
  }
143
184
  get forwardedAriaDescribedBy() {
144
- const ariaDescribedBy = this.ariaDescribedBy?.trim();
145
- return ariaDescribedBy ? ariaDescribedBy : void 0;
185
+ const value = this.ariaDescribedBy?.trim();
186
+ return value ? value : void 0;
146
187
  }
147
- handleInput(event) {
148
- const input = event.currentTarget;
149
- this.value = input.value;
150
- }
151
- handleChange(event) {
152
- const input = event.currentTarget;
153
- this.value = input.value;
154
- }
155
- focus(options) {
156
- this.nativeInput?.focus(options);
157
- }
158
- blur() {
159
- this.nativeInput?.blur();
160
- }
161
- render() {
162
- return lit.html`
163
- <input
164
- aria-busy=${this.loading ? "true" : "false"}
165
- aria-describedby=${ifDefined_js.ifDefined(this.forwardedAriaDescribedBy)}
166
- aria-invalid=${ifDefined_js.ifDefined(this.invalid ? "true" : void 0)}
167
- aria-label=${ifDefined_js.ifDefined(this.forwardedAriaLabel)}
168
- aria-labelledby=${ifDefined_js.ifDefined(this.forwardedAriaLabelledBy)}
169
- autocomplete=${ifDefined_js.ifDefined(this.autocomplete)}
170
- ?autofocus=${this.autofocus}
171
- class=${this.inputClasses}
172
- data-sp-input-native
173
- ?disabled=${this.isDisabled}
174
- ?readonly=${this.readonly}
175
- ?required=${this.required}
176
- id=${ifDefined_js.ifDefined(this.id || void 0)}
177
- inputmode=${ifDefined_js.ifDefined(this.inputmode)}
178
- max=${ifDefined_js.ifDefined(this.max)}
179
- maxlength=${ifDefined_js.ifDefined(this.maxlength)}
180
- min=${ifDefined_js.ifDefined(this.min)}
181
- minlength=${ifDefined_js.ifDefined(this.minlength)}
182
- name=${ifDefined_js.ifDefined(this.name)}
183
- placeholder=${ifDefined_js.ifDefined(this.placeholder)}
184
- step=${ifDefined_js.ifDefined(this.step)}
185
- title=${ifDefined_js.ifDefined(this.title || void 0)}
186
- type=${this.type}
187
- .value=${live_js.live(this.value)}
188
- @change=${this.handleChange}
189
- @input=${this.handleInput}
190
- />
191
- `;
192
- }
193
- };
194
- SpectreInputElement.properties = {
195
- ariaLabel: { attribute: "aria-label", type: String },
196
- ariaLabelledBy: { attribute: "aria-labelledby", type: String },
197
- ariaDescribedBy: { attribute: "aria-describedby", type: String },
198
- autocomplete: { type: String },
199
- autofocus: { type: Boolean, reflect: true },
200
- disabled: { type: Boolean, reflect: true },
201
- fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
202
- inputmode: { type: String },
203
- invalid: { type: Boolean, reflect: true },
204
- loading: { type: Boolean, reflect: true },
205
- max: { type: String },
206
- maxlength: { type: Number },
207
- min: { type: String },
208
- minlength: { type: Number },
209
- name: { type: String },
210
- pill: { type: Boolean, reflect: true },
211
- placeholder: { type: String },
212
- readonly: { type: Boolean, reflect: true },
213
- required: { type: Boolean, reflect: true },
214
- size: { type: String, reflect: true },
215
- step: { type: String },
216
- success: { type: Boolean, reflect: true },
217
- title: { type: String, reflect: true },
218
- type: { type: String, reflect: true },
219
- value: { type: String }
220
188
  };
221
-
222
- // src/components/textarea/sp-textarea.ts
189
+ SpectreBaseElement.properties = {};
190
+ var spectreInputSizes = ["sm", "md", "lg"];
191
+ function isInputSize(value) {
192
+ return spectreInputSizes.includes(value);
193
+ }
194
+ function normalizeInt(value, fallback, min = 0) {
195
+ if (value == null || typeof value !== "number" || !Number.isInteger(value) || value < min) {
196
+ return fallback;
197
+ }
198
+ return value;
199
+ }
223
200
  var DEFAULT_ROWS = 2;
224
- var SpectreTextareaElement = class extends lit.LitElement {
201
+ var SpectreTextareaElement = class extends SpectreBaseElement {
225
202
  constructor() {
226
203
  super(...arguments);
227
- this.ariaLabel = null;
228
- this.ariaLabelledBy = null;
229
- this.ariaDescribedBy = null;
230
204
  this.autofocus = false;
231
205
  this.disabled = false;
232
206
  this.fullWidth = false;
@@ -238,80 +212,23 @@ var SpectreTextareaElement = class extends lit.LitElement {
238
212
  this.rows = DEFAULT_ROWS;
239
213
  this.size = "md";
240
214
  this.success = false;
241
- this.title = "";
242
215
  this.value = "";
243
216
  }
244
- get id() {
245
- return this._id ?? "";
246
- }
247
- set id(value) {
248
- if ((this._id ?? "") === value) {
249
- return;
250
- }
251
- this._id = value;
252
- const host = this;
253
- if (HTMLElement.prototype.hasAttribute.call(host, "id")) {
254
- HTMLElement.prototype.removeAttribute.call(host, "id");
255
- }
256
- this.requestUpdate();
257
- }
258
- createRenderRoot() {
259
- return this;
260
- }
261
- connectedCallback() {
262
- super.connectedCallback();
263
- const hostId = super.getAttribute("id");
264
- if (hostId !== null) {
265
- this.id = hostId;
266
- }
267
- }
268
- getAttribute(qualifiedName) {
269
- if (qualifiedName === "id") {
270
- return this.id || null;
271
- }
272
- return super.getAttribute(qualifiedName);
273
- }
274
- hasAttribute(qualifiedName) {
275
- if (qualifiedName === "id") {
276
- return this.id !== "";
277
- }
278
- return super.hasAttribute(qualifiedName);
279
- }
280
- setAttribute(qualifiedName, value) {
281
- if (qualifiedName === "id") {
282
- this.id = value;
283
- return;
284
- }
285
- super.setAttribute(qualifiedName, value);
286
- }
287
- removeAttribute(qualifiedName) {
288
- if (qualifiedName === "id") {
289
- this.id = "";
290
- return;
291
- }
292
- super.removeAttribute(qualifiedName);
293
- }
294
217
  willUpdate(changedProperties) {
295
218
  if (changedProperties.has("size") && !isInputSize(this.size)) {
296
219
  this.size = "md";
297
220
  }
298
221
  if (changedProperties.has("rows")) {
299
- if (this.rows == null || !Number.isInteger(this.rows) || this.rows < 1) {
300
- this.rows = DEFAULT_ROWS;
301
- }
222
+ this.rows = normalizeInt(this.rows, DEFAULT_ROWS, 1);
302
223
  }
303
224
  if (changedProperties.has("value") && this.value == null) {
304
225
  this.value = "";
305
226
  }
306
227
  if (changedProperties.has("maxlength")) {
307
- if (this.maxlength == null || !Number.isInteger(this.maxlength) || this.maxlength < 0) {
308
- this.maxlength = void 0;
309
- }
228
+ this.maxlength = normalizeInt(this.maxlength, void 0);
310
229
  }
311
230
  if (changedProperties.has("minlength")) {
312
- if (this.minlength == null || !Number.isInteger(this.minlength) || this.minlength < 0) {
313
- this.minlength = void 0;
314
- }
231
+ this.minlength = normalizeInt(this.minlength, void 0);
315
232
  }
316
233
  }
317
234
  get textareaClasses() {
@@ -328,18 +245,6 @@ var SpectreTextareaElement = class extends lit.LitElement {
328
245
  get nativeTextarea() {
329
246
  return this.querySelector("[data-sp-textarea-native]");
330
247
  }
331
- get forwardedAriaLabel() {
332
- const ariaLabel = this.ariaLabel?.trim();
333
- return ariaLabel ? ariaLabel : void 0;
334
- }
335
- get forwardedAriaLabelledBy() {
336
- const ariaLabelledBy = this.ariaLabelledBy?.trim();
337
- return ariaLabelledBy ? ariaLabelledBy : void 0;
338
- }
339
- get forwardedAriaDescribedBy() {
340
- const ariaDescribedBy = this.ariaDescribedBy?.trim();
341
- return ariaDescribedBy ? ariaDescribedBy : void 0;
342
- }
343
248
  handleInput(event) {
344
249
  const textarea = event.currentTarget;
345
250
  this.value = textarea.value;
@@ -355,57 +260,53 @@ var SpectreTextareaElement = class extends lit.LitElement {
355
260
  this.nativeTextarea?.blur();
356
261
  }
357
262
  render() {
358
- return lit.html`
359
- <textarea
360
- aria-busy=${this.loading ? "true" : "false"}
361
- aria-describedby=${ifDefined_js.ifDefined(this.forwardedAriaDescribedBy)}
362
- aria-invalid=${ifDefined_js.ifDefined(this.invalid ? "true" : void 0)}
363
- aria-label=${ifDefined_js.ifDefined(this.forwardedAriaLabel)}
364
- aria-labelledby=${ifDefined_js.ifDefined(this.forwardedAriaLabelledBy)}
365
- autocomplete=${ifDefined_js.ifDefined(this.autocomplete)}
366
- ?autofocus=${this.autofocus}
367
- class=${this.textareaClasses}
368
- data-sp-textarea-native
369
- ?disabled=${this.isDisabled}
370
- inputmode=${ifDefined_js.ifDefined(this.inputmode)}
371
- ?readonly=${this.readonly}
372
- ?required=${this.required}
373
- id=${ifDefined_js.ifDefined(this.id || void 0)}
374
- maxlength=${ifDefined_js.ifDefined(this.maxlength)}
375
- minlength=${ifDefined_js.ifDefined(this.minlength)}
376
- name=${ifDefined_js.ifDefined(this.name)}
377
- placeholder=${ifDefined_js.ifDefined(this.placeholder)}
378
- rows=${this.rows}
379
- title=${ifDefined_js.ifDefined(this.title || void 0)}
380
- .value=${live_js.live(this.value)}
381
- @change=${this.handleChange}
382
- @input=${this.handleInput}
383
- ></textarea>
384
- `;
263
+ return lit.html`<textarea
264
+ aria-busy="${this.loading ? "true" : "false"}"
265
+ aria-describedby="${ifDefined_js.ifDefined(this.forwardedAriaDescribedBy)}"
266
+ aria-invalid="${ifDefined_js.ifDefined(this.invalid ? "true" : void 0)}"
267
+ aria-label="${ifDefined_js.ifDefined(this.forwardedAriaLabel)}"
268
+ aria-labelledby="${ifDefined_js.ifDefined(this.forwardedAriaLabelledBy)}"
269
+ autocomplete="${ifDefined_js.ifDefined(this.autocomplete || void 0)}"
270
+ ?autofocus="${this.autofocus}"
271
+ class="${this.textareaClasses}"
272
+ data-sp-textarea-native
273
+ ?disabled="${this.isDisabled}"
274
+ form="${ifDefined_js.ifDefined(this.form || void 0)}"
275
+ inputmode="${ifDefined_js.ifDefined(this.inputmode || void 0)}"
276
+ ?readonly="${this.readonly}"
277
+ ?required="${this.required}"
278
+ id="${ifDefined_js.ifDefined(this.id || void 0)}"
279
+ maxlength="${ifDefined_js.ifDefined(this.maxlength)}"
280
+ minlength="${ifDefined_js.ifDefined(this.minlength)}"
281
+ name="${ifDefined_js.ifDefined(this.name || void 0)}"
282
+ placeholder="${ifDefined_js.ifDefined(this.placeholder || void 0)}"
283
+ rows="${this.rows}"
284
+ title="${ifDefined_js.ifDefined(this.title || void 0)}"
285
+ .value="${live_js.live(this.value)}"
286
+ @change="${this.handleChange}"
287
+ @input="${this.handleInput}"
288
+ ></textarea>`;
385
289
  }
386
290
  };
387
291
  SpectreTextareaElement.properties = {
388
- ariaLabel: { attribute: "aria-label", type: String },
389
- ariaLabelledBy: { attribute: "aria-labelledby", type: String },
390
- ariaDescribedBy: { attribute: "aria-describedby", type: String },
391
- autocomplete: { type: String },
292
+ autocomplete: { type: String, reflect: true },
392
293
  autofocus: { type: Boolean, reflect: true },
393
294
  disabled: { type: Boolean, reflect: true },
295
+ form: { type: String },
394
296
  fullWidth: { attribute: "full-width", type: Boolean, reflect: true },
395
- inputmode: { type: String },
297
+ inputmode: { type: String, reflect: true },
396
298
  invalid: { type: Boolean, reflect: true },
397
299
  loading: { type: Boolean, reflect: true },
398
- maxlength: { type: Number },
399
- minlength: { type: Number },
400
- name: { type: String },
300
+ maxlength: { type: Number, reflect: true },
301
+ minlength: { type: Number, reflect: true },
302
+ name: { type: String, reflect: true },
401
303
  pill: { type: Boolean, reflect: true },
402
- placeholder: { type: String },
304
+ placeholder: { type: String, reflect: true },
403
305
  readonly: { type: Boolean, reflect: true },
404
306
  required: { type: Boolean, reflect: true },
405
307
  rows: { type: Number },
406
308
  size: { type: String, reflect: true },
407
309
  success: { type: Boolean, reflect: true },
408
- title: { type: String, reflect: true },
409
310
  value: { type: String }
410
311
  };
411
312
  function defineSpectreTextarea(tagName = "sp-textarea") {