@fluentui/web-components 3.0.0-beta.55 → 3.0.0-beta.56

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 (46) hide show
  1. package/CHANGELOG.md +12 -2
  2. package/dist/dts/anchor-button/index.d.ts +1 -1
  3. package/dist/dts/helpers.tests.d.ts +22 -0
  4. package/dist/dts/index-rollup.d.ts +1 -0
  5. package/dist/dts/index.d.ts +2 -1
  6. package/dist/dts/slider/slider.d.ts +1 -1
  7. package/dist/dts/styles/states/index.d.ts +36 -0
  8. package/dist/dts/textarea/define.d.ts +1 -0
  9. package/dist/dts/textarea/index.d.ts +5 -0
  10. package/dist/dts/textarea/textarea.bench.d.ts +3 -0
  11. package/dist/dts/textarea/textarea.d.ts +390 -0
  12. package/dist/dts/textarea/textarea.definition.d.ts +9 -0
  13. package/dist/dts/textarea/textarea.options.d.ts +47 -0
  14. package/dist/dts/textarea/textarea.styles.d.ts +7 -0
  15. package/dist/dts/textarea/textarea.template.d.ts +12 -0
  16. package/dist/esm/anchor-button/index.js +1 -1
  17. package/dist/esm/anchor-button/index.js.map +1 -1
  18. package/dist/esm/helpers.tests.js +44 -0
  19. package/dist/esm/helpers.tests.js.map +1 -1
  20. package/dist/esm/index-rollup.js +1 -0
  21. package/dist/esm/index-rollup.js.map +1 -1
  22. package/dist/esm/index.js +2 -1
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/slider/slider.js +1 -1
  25. package/dist/esm/styles/states/index.js +40 -0
  26. package/dist/esm/styles/states/index.js.map +1 -1
  27. package/dist/esm/textarea/define.js +4 -0
  28. package/dist/esm/textarea/define.js.map +1 -0
  29. package/dist/esm/textarea/index.js +6 -0
  30. package/dist/esm/textarea/index.js.map +1 -0
  31. package/dist/esm/textarea/textarea.bench.js +10 -0
  32. package/dist/esm/textarea/textarea.bench.js.map +1 -0
  33. package/dist/esm/textarea/textarea.definition.js +20 -0
  34. package/dist/esm/textarea/textarea.definition.js.map +1 -0
  35. package/dist/esm/textarea/textarea.js +605 -0
  36. package/dist/esm/textarea/textarea.js.map +1 -0
  37. package/dist/esm/textarea/textarea.options.js +56 -0
  38. package/dist/esm/textarea/textarea.options.js.map +1 -0
  39. package/dist/esm/textarea/textarea.styles.js +268 -0
  40. package/dist/esm/textarea/textarea.styles.js.map +1 -0
  41. package/dist/esm/textarea/textarea.template.js +54 -0
  42. package/dist/esm/textarea/textarea.template.js.map +1 -0
  43. package/dist/web-components.d.ts +462 -2
  44. package/dist/web-components.js +1090 -538
  45. package/dist/web-components.min.js +284 -280
  46. package/package.json +6 -1
@@ -0,0 +1,605 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, FASTElement, nullableNumberConverter, observable, Observable } from '@microsoft/fast-element';
3
+ import { toggleState } from '../utils/element-internals.js';
4
+ import { TextAreaAppearance, TextAreaAppearancesForDisplayShadow, TextAreaResizableResize, TextAreaResize, } from './textarea.options.js';
5
+ /**
6
+ * A Text Area Custom HTML Element.
7
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | `<textarea>`} element.
8
+ *
9
+ * @slot - The default content/value of the component.
10
+ * @slot label - The content for the `<label>`, it should be a `<fluent-label>` element.
11
+ * @csspart label - The `<label>` element.
12
+ * @csspart root - The container element of the `<textarea>` element.
13
+ * @csspart control - The internal `<textarea>` element.
14
+ * @fires change - Fires after the control loses focus, if the content has changed.
15
+ * @fires select - Fires when the `select()` method is called.
16
+ *
17
+ * @public
18
+ */
19
+ class BaseTextArea extends FASTElement {
20
+ defaultSlottedNodesChanged() {
21
+ const next = this.getContent();
22
+ this.defaultValue = next;
23
+ this.value = next;
24
+ }
25
+ labelSlottedNodesChanged() {
26
+ if (this.labelEl) {
27
+ this.labelEl.hidden = !this.labelSlottedNodes.length;
28
+ }
29
+ this.labelSlottedNodes.forEach(node => {
30
+ node.disabled = this.disabled;
31
+ node.required = this.required;
32
+ });
33
+ }
34
+ autoResizeChanged() {
35
+ this.maybeCreateAutoSizerEl();
36
+ toggleState(this.elementInternals, 'auto-resize', this.autoResize);
37
+ }
38
+ disabledChanged() {
39
+ this.setDisabledSideEffect(this.disabled);
40
+ }
41
+ /**
42
+ * The form element that’s associated to the element, or `null` if no form is associated.
43
+ *
44
+ * @public
45
+ */
46
+ get form() {
47
+ return this.elementInternals.form;
48
+ }
49
+ /**
50
+ * A `NodeList` of `<label>` element associated with the element.
51
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/labels | `labels`} property
52
+ *
53
+ * @public
54
+ */
55
+ get labels() {
56
+ return this.elementInternals.labels;
57
+ }
58
+ readOnlyChanged() {
59
+ this.elementInternals.ariaReadOnly = `${!!this.readOnly}`;
60
+ }
61
+ requiredChanged() {
62
+ var _a;
63
+ this.elementInternals.ariaRequired = `${!!this.required}`;
64
+ if ((_a = this.labelSlottedNodes) === null || _a === void 0 ? void 0 : _a.length) {
65
+ this.labelSlottedNodes.forEach(node => (node.required = this.required));
66
+ }
67
+ }
68
+ resizeChanged(prev, next) {
69
+ if (prev) {
70
+ toggleState(this.elementInternals, `resize-${prev}`, false);
71
+ }
72
+ if (next) {
73
+ toggleState(this.elementInternals, `resize-${next}`, true);
74
+ }
75
+ toggleState(this.elementInternals, `resize`, TextAreaResizableResize.includes(this.resize));
76
+ }
77
+ /**
78
+ * The length of the current value.
79
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement#textLength | 'textLength'} property
80
+ *
81
+ * @public
82
+ */
83
+ get textLength() {
84
+ return this.controlEl.textLength;
85
+ }
86
+ /**
87
+ * The type of the element, which is always "textarea".
88
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/type | `type`} property
89
+ *
90
+ * @public
91
+ */
92
+ get type() {
93
+ return 'textarea';
94
+ }
95
+ /**
96
+ * The element's validity state.
97
+ *
98
+ * @public
99
+ * @remarks
100
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
101
+ */
102
+ get validity() {
103
+ return this.elementInternals.validity;
104
+ }
105
+ /**
106
+ * The validation message.
107
+ *
108
+ * @public
109
+ * @remarks
110
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
111
+ */
112
+ get validationMessage() {
113
+ return this.elementInternals.validationMessage || this.controlEl.validationMessage;
114
+ }
115
+ /**
116
+ * Determines if the control can be submitted for constraint validation.
117
+ *
118
+ * @public
119
+ * @remarks
120
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
121
+ */
122
+ get willValidate() {
123
+ return this.elementInternals.willValidate;
124
+ }
125
+ /**
126
+ * The text content of the element before user interaction.
127
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement#defaultvalue | `defaultValue`} property
128
+ *
129
+ * @public
130
+ * @remarks
131
+ * In order to set the initial/default value, an author should either add the default value in the HTML as the children
132
+ * of the component, or setting this property in JavaScript. Setting `innerHTML`, `innerText`, or `textContent` on this
133
+ * component will not change the default value or the content displayed inside the component.
134
+ */
135
+ get defaultValue() {
136
+ var _a, _b;
137
+ return (_b = (_a = this.controlEl) === null || _a === void 0 ? void 0 : _a.defaultValue) !== null && _b !== void 0 ? _b : this.preConnectControlEl.defaultValue;
138
+ }
139
+ set defaultValue(next) {
140
+ var _a;
141
+ const controlEl = (_a = this.controlEl) !== null && _a !== void 0 ? _a : this.preConnectControlEl;
142
+ controlEl.defaultValue = next;
143
+ if (this.controlEl && !this.userInteracted) {
144
+ this.controlEl.value = next;
145
+ }
146
+ }
147
+ /**
148
+ * The value of the element.
149
+ *
150
+ * @public
151
+ * @remarks
152
+ * Reflects the `value` property.
153
+ */
154
+ get value() {
155
+ var _a, _b;
156
+ return (_b = (_a = this.controlEl) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.preConnectControlEl.value;
157
+ }
158
+ set value(next) {
159
+ var _a;
160
+ const controlEl = (_a = this.controlEl) !== null && _a !== void 0 ? _a : this.preConnectControlEl;
161
+ controlEl.value = next;
162
+ this.setFormValue(next);
163
+ this.setValidity();
164
+ }
165
+ constructor() {
166
+ super();
167
+ /**
168
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
169
+ *
170
+ * @internal
171
+ */
172
+ this.elementInternals = this.attachInternals();
173
+ this.userInteracted = false;
174
+ this.preConnectControlEl = document.createElement('textarea');
175
+ /**
176
+ * Indicates whether the element’s block size (height) should be automatically changed based on the content.
177
+ * Note: When this property’s value is set to be `true`, the element should not have a fixed block-size
178
+ * defined in CSS. Instead, use `min-height` or `min-block-size`.
179
+ *
180
+ * @public
181
+ * @remarks
182
+ * HTML Attribute: `auto-resize`
183
+ */
184
+ this.autoResize = false;
185
+ /**
186
+ * Sets the element's disabled state.
187
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/disabled | `disabled`} attribute
188
+ *
189
+ * @public
190
+ * @remarks
191
+ * HTML Attribute: `disabled`
192
+ */
193
+ this.disabled = false;
194
+ /**
195
+ * Indicates whether the element displays a box shadow. This only has effect when `appearance` is set to be `filled-darker` or `filled-lighter`.
196
+ *
197
+ * @public
198
+ * @remarks
199
+ * HTML Attribute: `display-shadow`
200
+ */
201
+ this.displayShadow = false;
202
+ /**
203
+ * When true, the control will be immutable by user interaction.
204
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/readonly | `readonly`} attribute
205
+ *
206
+ * @public
207
+ * @remarks
208
+ * HTML Attribute: `readonly`
209
+ */
210
+ this.readOnly = false;
211
+ /**
212
+ * The element's required attribute.
213
+ *
214
+ * @public
215
+ * @remarks
216
+ * HTML Attribute: `required`
217
+ */
218
+ this.required = false;
219
+ /**
220
+ * Indicates whether the element can be resized by end users.
221
+ *
222
+ * @public
223
+ * @remarks
224
+ * HTML Attribute: `resize`
225
+ */
226
+ this.resize = TextAreaResize.none;
227
+ /**
228
+ * Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used.
229
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck | `spellcheck`} attribute
230
+ *
231
+ * @public
232
+ * @remarks
233
+ * HTML Attribute: `spellcheck`
234
+ */
235
+ this.spellcheck = false;
236
+ // TODO: Re-enabled this when Reference Target is out.
237
+ // this.elementInternals.role = 'textbox';
238
+ // this.elementInternals.ariaMultiLine = 'true';
239
+ }
240
+ /**
241
+ * @internal
242
+ */
243
+ connectedCallback() {
244
+ super.connectedCallback();
245
+ this.setDefaultValue();
246
+ this.maybeCreateAutoSizerEl();
247
+ this.bindEvents();
248
+ this.observeControlElAttrs();
249
+ }
250
+ /**
251
+ * @internal
252
+ */
253
+ disconnectedCallback() {
254
+ var _a, _b;
255
+ super.disconnectedCallback();
256
+ (_a = this.autoSizerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
257
+ (_b = this.controlElAttrObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
258
+ }
259
+ /**
260
+ * Resets the value to its initial value when the form is reset.
261
+ *
262
+ * @internal
263
+ */
264
+ formResetCallback() {
265
+ this.value = this.defaultValue;
266
+ }
267
+ /**
268
+ * @internal
269
+ */
270
+ formDisabledCallback(disabled) {
271
+ this.setDisabledSideEffect(disabled);
272
+ this.setValidity();
273
+ }
274
+ /**
275
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
276
+ *
277
+ * @internal
278
+ */
279
+ setFormValue(value, state) {
280
+ this.elementInternals.setFormValue(value, value !== null && value !== void 0 ? value : state);
281
+ }
282
+ /**
283
+ * Checks the validity of the element and returns the result.
284
+ *
285
+ * @public
286
+ * @remarks
287
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
288
+ */
289
+ checkValidity() {
290
+ return this.elementInternals.checkValidity();
291
+ }
292
+ /**
293
+ * Reports the validity of the element.
294
+ *
295
+ * @public
296
+ * @remarks
297
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
298
+ */
299
+ reportValidity() {
300
+ return this.elementInternals.reportValidity();
301
+ }
302
+ /**
303
+ * Sets the custom validity message.
304
+ * @param message - The message to set
305
+ *
306
+ * @public
307
+ */
308
+ setCustomValidity(message) {
309
+ this.elementInternals.setValidity({ customError: !!message }, !!message ? message.toString() : undefined);
310
+ this.reportValidity();
311
+ }
312
+ /**
313
+ * Sets the validity of the control.
314
+ *
315
+ * @param flags - Validity flags. If not provided, the control's `validity` will be used.
316
+ * @param message - Optional message to supply. If not provided, the control's `validationMessage` will be used. If the control does not have a `validationMessage`, the message will be empty.
317
+ * @param anchor - Optional anchor to use for the validation message. If not provided, the control will be used.
318
+ *
319
+ * @internal
320
+ */
321
+ setValidity(flags, message, anchor) {
322
+ if (!this.$fastController.isConnected) {
323
+ return;
324
+ }
325
+ if (this.disabled || this.readOnly) {
326
+ this.elementInternals.setValidity({});
327
+ }
328
+ else {
329
+ this.elementInternals.setValidity(flags !== null && flags !== void 0 ? flags : this.controlEl.validity, message !== null && message !== void 0 ? message : this.controlEl.validationMessage, anchor !== null && anchor !== void 0 ? anchor : this.controlEl);
330
+ }
331
+ if (this.userInteracted) {
332
+ this.toggleUserValidityState();
333
+ }
334
+ }
335
+ /**
336
+ * Selects the content in the element.
337
+ *
338
+ * @public
339
+ */
340
+ select() {
341
+ this.controlEl.select();
342
+ }
343
+ setDefaultValue() {
344
+ this.defaultValue = this.innerHTML.trim() || this.preConnectControlEl.defaultValue || '';
345
+ this.value = this.preConnectControlEl.value || this.defaultValue;
346
+ this.setFormValue(this.value);
347
+ this.setValidity();
348
+ this.preConnectControlEl = null;
349
+ }
350
+ bindEvents() {
351
+ this.controlEl.addEventListener('input', () => (this.userInteracted = true), { once: true });
352
+ }
353
+ /**
354
+ * Gets the content inside the light DOM, if any HTML element is present, use its `outerHTML` value.
355
+ */
356
+ getContent() {
357
+ return (this.defaultSlottedNodes
358
+ .map(node => {
359
+ switch (node.nodeType) {
360
+ case Node.ELEMENT_NODE:
361
+ return node.outerHTML;
362
+ case Node.TEXT_NODE:
363
+ return node.textContent.trim();
364
+ default:
365
+ return '';
366
+ }
367
+ })
368
+ .join('') || '');
369
+ }
370
+ observeControlElAttrs() {
371
+ this.controlElAttrObserver = new MutationObserver(() => {
372
+ this.setValidity();
373
+ });
374
+ this.controlElAttrObserver.observe(this.controlEl, {
375
+ attributes: true,
376
+ attributeFilter: ['disabled', 'required', 'readonly', 'maxlength', 'minlength'],
377
+ });
378
+ }
379
+ setDisabledSideEffect(disabled) {
380
+ var _a;
381
+ this.elementInternals.ariaDisabled = `${disabled}`;
382
+ if (this.controlEl) {
383
+ this.controlEl.disabled = disabled;
384
+ }
385
+ if ((_a = this.labelSlottedNodes) === null || _a === void 0 ? void 0 : _a.length) {
386
+ this.labelSlottedNodes.forEach(node => (node.disabled = this.disabled));
387
+ }
388
+ }
389
+ toggleUserValidityState() {
390
+ toggleState(this.elementInternals, 'user-invalid', !this.validity.valid);
391
+ toggleState(this.elementInternals, 'user-valid', this.validity.valid);
392
+ }
393
+ // Technique inspired by https://css-tricks.com/the-cleanest-trick-for-autogrowing-textareas/
394
+ // TODO: This should be removed after `field-sizing: content` is widely supported
395
+ // https://caniuse.com/mdn-css_properties_field-sizing_content
396
+ maybeCreateAutoSizerEl() {
397
+ var _a, _b;
398
+ if (CSS.supports('field-sizing: content')) {
399
+ return;
400
+ }
401
+ if (!this.autoResize) {
402
+ (_a = this.autoSizerEl) === null || _a === void 0 ? void 0 : _a.remove();
403
+ (_b = this.autoSizerObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
404
+ return;
405
+ }
406
+ if (!this.autoSizerEl) {
407
+ this.autoSizerEl = document.createElement('div');
408
+ this.autoSizerEl.classList.add('auto-sizer');
409
+ this.autoSizerEl.ariaHidden = 'true';
410
+ }
411
+ this.shadowRoot.prepend(this.autoSizerEl);
412
+ // The `ResizeObserver` is used to observe when the component gains
413
+ // explicit block size, when so, the `autoSizerEl` element should be
414
+ // removed to let the defined blocked size dictate the component’s block size.
415
+ if (!this.autoSizerObserver) {
416
+ this.autoSizerObserver = new ResizeObserver((_, observer) => {
417
+ var _a;
418
+ const blockSizePropName = window.getComputedStyle(this).writingMode.startsWith('horizontal')
419
+ ? 'height'
420
+ : 'width';
421
+ if (this.style.getPropertyValue(blockSizePropName) !== '') {
422
+ (_a = this.autoSizerEl) === null || _a === void 0 ? void 0 : _a.remove();
423
+ observer.disconnect();
424
+ }
425
+ });
426
+ }
427
+ this.autoSizerObserver.observe(this);
428
+ }
429
+ /**
430
+ * @internal
431
+ */
432
+ handleControlInput() {
433
+ if (this.autoResize && this.autoSizerEl) {
434
+ this.autoSizerEl.textContent = this.value + ' ';
435
+ }
436
+ this.setFormValue(this.value);
437
+ this.setValidity();
438
+ }
439
+ /**
440
+ * @internal
441
+ */
442
+ handleControlChange() {
443
+ this.toggleUserValidityState();
444
+ this.$emit('change');
445
+ }
446
+ /**
447
+ * @internal
448
+ */
449
+ handleControlSelect() {
450
+ this.$emit('select');
451
+ }
452
+ }
453
+ /**
454
+ * The form-associated flag.
455
+ * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
456
+ *
457
+ * @public
458
+ */
459
+ BaseTextArea.formAssociated = true;
460
+ __decorate([
461
+ observable
462
+ ], BaseTextArea.prototype, "defaultSlottedNodes", void 0);
463
+ __decorate([
464
+ observable
465
+ ], BaseTextArea.prototype, "labelSlottedNodes", void 0);
466
+ __decorate([
467
+ attr
468
+ ], BaseTextArea.prototype, "autocomplete", void 0);
469
+ __decorate([
470
+ attr({ attribute: 'auto-resize', mode: 'boolean' })
471
+ ], BaseTextArea.prototype, "autoResize", void 0);
472
+ __decorate([
473
+ attr({ attribute: 'dirname' })
474
+ ], BaseTextArea.prototype, "dirName", void 0);
475
+ __decorate([
476
+ attr({ mode: 'boolean' })
477
+ ], BaseTextArea.prototype, "disabled", void 0);
478
+ __decorate([
479
+ attr({ attribute: 'display-shadow', mode: 'boolean' })
480
+ ], BaseTextArea.prototype, "displayShadow", void 0);
481
+ __decorate([
482
+ attr({ attribute: 'form' })
483
+ ], BaseTextArea.prototype, "initialForm", void 0);
484
+ __decorate([
485
+ attr({ attribute: 'maxlength', converter: nullableNumberConverter })
486
+ ], BaseTextArea.prototype, "maxLength", void 0);
487
+ __decorate([
488
+ attr({ attribute: 'minlength', converter: nullableNumberConverter })
489
+ ], BaseTextArea.prototype, "minLength", void 0);
490
+ __decorate([
491
+ attr
492
+ ], BaseTextArea.prototype, "name", void 0);
493
+ __decorate([
494
+ attr
495
+ ], BaseTextArea.prototype, "placeholder", void 0);
496
+ __decorate([
497
+ attr({ attribute: 'readonly', mode: 'boolean' })
498
+ ], BaseTextArea.prototype, "readOnly", void 0);
499
+ __decorate([
500
+ attr({ mode: 'boolean' })
501
+ ], BaseTextArea.prototype, "required", void 0);
502
+ __decorate([
503
+ attr({ mode: 'fromView' })
504
+ ], BaseTextArea.prototype, "resize", void 0);
505
+ __decorate([
506
+ attr({ mode: 'boolean' })
507
+ ], BaseTextArea.prototype, "spellcheck", void 0);
508
+ export { BaseTextArea };
509
+ export class TextArea extends BaseTextArea {
510
+ constructor() {
511
+ super(...arguments);
512
+ /**
513
+ * Indicates the visual appearance of the element.
514
+ *
515
+ * @public
516
+ * @remarks
517
+ * HTML Attribute: `appearance`
518
+ */
519
+ this.appearance = TextAreaAppearance.outline;
520
+ /**
521
+ * Indicates whether the textarea should be a block-level element.
522
+ *
523
+ * @public
524
+ * @remarks
525
+ * HTML Attribute: `block`
526
+ */
527
+ this.block = false;
528
+ }
529
+ labelSlottedNodesChanged() {
530
+ super.labelSlottedNodesChanged();
531
+ this.labelSlottedNodes.forEach(node => {
532
+ node.size = this.size;
533
+ });
534
+ }
535
+ appearanceChanged(prev, next) {
536
+ if (prev) {
537
+ toggleState(this.elementInternals, `${prev}`, false);
538
+ }
539
+ if (!next || !Array.from(Object.values(TextAreaAppearance)).includes(next)) {
540
+ toggleState(this.elementInternals, TextAreaAppearance.outline, true);
541
+ }
542
+ else {
543
+ toggleState(this.elementInternals, `${next}`, true);
544
+ }
545
+ }
546
+ blockChanged() {
547
+ toggleState(this.elementInternals, 'block', this.block);
548
+ }
549
+ sizeChanged(prev, next) {
550
+ if (prev) {
551
+ toggleState(this.elementInternals, `${prev}`, false);
552
+ }
553
+ if (next) {
554
+ toggleState(this.elementInternals, `${next}`, true);
555
+ }
556
+ }
557
+ /**
558
+ * @internal
559
+ */
560
+ handleChange(_, propertyName) {
561
+ switch (propertyName) {
562
+ case 'size':
563
+ this.labelSlottedNodes.forEach(node => {
564
+ node.size = this.size;
565
+ });
566
+ break;
567
+ case 'appearance':
568
+ case 'displayShadow':
569
+ this.maybeDisplayShadow();
570
+ break;
571
+ }
572
+ }
573
+ /**
574
+ * @internal
575
+ */
576
+ connectedCallback() {
577
+ super.connectedCallback();
578
+ this.maybeDisplayShadow();
579
+ Observable.getNotifier(this).subscribe(this, 'appearance');
580
+ Observable.getNotifier(this).subscribe(this, 'displayShadow');
581
+ Observable.getNotifier(this).subscribe(this, 'size');
582
+ }
583
+ /**
584
+ * @internal
585
+ */
586
+ disconnectedCallback() {
587
+ super.disconnectedCallback();
588
+ Observable.getNotifier(this).unsubscribe(this, 'appearance');
589
+ Observable.getNotifier(this).unsubscribe(this, 'displayShadow');
590
+ Observable.getNotifier(this).unsubscribe(this, 'size');
591
+ }
592
+ maybeDisplayShadow() {
593
+ toggleState(this.elementInternals, 'display-shadow', this.displayShadow && TextAreaAppearancesForDisplayShadow.includes(this.appearance));
594
+ }
595
+ }
596
+ __decorate([
597
+ attr({ mode: 'fromView' })
598
+ ], TextArea.prototype, "appearance", void 0);
599
+ __decorate([
600
+ attr({ mode: 'boolean' })
601
+ ], TextArea.prototype, "block", void 0);
602
+ __decorate([
603
+ attr
604
+ ], TextArea.prototype, "size", void 0);
605
+ //# sourceMappingURL=textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/textarea/textarea.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EACL,kBAAkB,EAClB,mCAAmC,EAEnC,uBAAuB,EACvB,cAAc,GAEf,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;;;GAaG;AACH,MAAa,YAAa,SAAQ,WAAW;IAuCjC,0BAA0B;QAClC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAQS,wBAAwB;QAChC,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;SACtD;QACD,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACpC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAChC,CAAC,CAAC,CAAC;IACL,CAAC;IAgCS,iBAAiB;QACzB,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC9B,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,aAAa,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACrE,CAAC;IAuBS,eAAe;QACvB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAs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AC,UAAU,CAAC,CACpF,CAAC;IACJ,CAAC;CACF;AA5FQ;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;4CACwC;AAqB5D;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;uCACI;AAavB;IADN,IAAI;sCACsB"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Values for the `size` attribute on TextArea elements.
3
+ *
4
+ * @public
5
+ */
6
+ export const TextAreaSize = {
7
+ small: 'small',
8
+ medium: 'medium',
9
+ large: 'large',
10
+ };
11
+ /**
12
+ * Values for the `appearance` attribute on TextArea elements.
13
+ *
14
+ * @public
15
+ */
16
+ export const TextAreaAppearance = {
17
+ outline: 'outline',
18
+ filledLighter: 'filled-lighter',
19
+ filledDarker: 'filled-darker',
20
+ };
21
+ export const TextAreaAppearancesForDisplayShadow = [
22
+ TextAreaAppearance.filledLighter,
23
+ TextAreaAppearance.filledDarker,
24
+ ];
25
+ /**
26
+ * Values for the `autocomplete` attribute on TextArea elements.
27
+ *
28
+ * @public
29
+ */
30
+ export const TextAreaAutocomplete = {
31
+ on: 'on',
32
+ off: 'off',
33
+ };
34
+ /**
35
+ * Values for the `resize` attribute on TextArea elements.
36
+ */
37
+ export const TextAreaResize = {
38
+ none: 'none',
39
+ both: 'both',
40
+ horizontal: 'horizontal',
41
+ vertical: 'vertical',
42
+ };
43
+ export const TextAreaResizableResize = [
44
+ TextAreaResize.both,
45
+ TextAreaResize.horizontal,
46
+ TextAreaResize.vertical,
47
+ ];
48
+ export const TextAreaVerticallyResizableResize = [
49
+ TextAreaResize.both,
50
+ TextAreaResize.vertical,
51
+ ];
52
+ export const TextAreaHorizontallyResizableResize = [
53
+ TextAreaResize.both,
54
+ TextAreaResize.horizontal,
55
+ ];
56
+ //# sourceMappingURL=textarea.options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.options.js","sourceRoot":"","sources":["../../../src/textarea/textarea.options.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,gBAAgB;IAC/B,YAAY,EAAE,eAAe;CACrB,CAAC;AAIX,MAAM,CAAC,MAAM,mCAAmC,GAAkC;IAChF,kBAAkB,CAAC,aAAa;IAChC,kBAAkB,CAAC,YAAY;CAChC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;CACF,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIX,MAAM,CAAC,MAAM,uBAAuB,GAA8B;IAChE,cAAc,CAAC,IAAI;IACnB,cAAc,CAAC,UAAU;IACzB,cAAc,CAAC,QAAQ;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAA8B;IAC1E,cAAc,CAAC,IAAI;IACnB,cAAc,CAAC,QAAQ;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAA8B;IAC5E,cAAc,CAAC,IAAI;IACnB,cAAc,CAAC,UAAU;CAC1B,CAAC"}