@vonage/vivid 3.0.0-next.54 → 3.0.0-next.55

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.
@@ -0,0 +1,294 @@
1
+ import { F as FoundationElement, D as DOM, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable, b as __metadata, v as volatile, c as __classPrivateFieldGet, i as __classPrivateFieldSet } from './index.js';
2
+ import { a as applyMixins } from './apply-mixins.js';
3
+ import { F as FormAssociated } from './form-associated.js';
4
+ import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from './aria-global.js';
5
+ import './web.dom-collections.iterator.js';
6
+
7
+ class _TextField extends FoundationElement {
8
+ }
9
+ /**
10
+ * A form-associated base class for the {@link @microsoft/fast-foundation#(TextField:class)} component.
11
+ *
12
+ * @internal
13
+ */
14
+ class FormAssociatedTextField extends FormAssociated(_TextField) {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.proxy = document.createElement("input");
18
+ }
19
+ }
20
+
21
+ /**
22
+ * Text field sub-types
23
+ * @public
24
+ */
25
+ const TextFieldType = {
26
+ /**
27
+ * An email TextField
28
+ */
29
+ email: "email",
30
+ /**
31
+ * A password TextField
32
+ */
33
+ password: "password",
34
+ /**
35
+ * A telephone TextField
36
+ */
37
+ tel: "tel",
38
+ /**
39
+ * A text TextField
40
+ */
41
+ text: "text",
42
+ /**
43
+ * A URL TextField
44
+ */
45
+ url: "url",
46
+ };
47
+
48
+ /**
49
+ * A Text Field Custom HTML Element.
50
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text | <input type="text" /> element }.
51
+ *
52
+ * @slot start - Content which can be provided before the number field input
53
+ * @slot end - Content which can be provided after the number field input
54
+ * @slot - The default slot for the label
55
+ * @csspart label - The label
56
+ * @csspart root - The element wrapping the control, including start and end slots
57
+ * @csspart control - The text field element
58
+ * @fires change - Fires a custom 'change' event when the value has changed
59
+ *
60
+ * @public
61
+ */
62
+ class TextField extends FormAssociatedTextField {
63
+ constructor() {
64
+ super(...arguments);
65
+ /**
66
+ * Allows setting a type or mode of text.
67
+ * @public
68
+ * @remarks
69
+ * HTML Attribute: type
70
+ */
71
+ this.type = TextFieldType.text;
72
+ }
73
+ readOnlyChanged() {
74
+ if (this.proxy instanceof HTMLInputElement) {
75
+ this.proxy.readOnly = this.readOnly;
76
+ this.validate();
77
+ }
78
+ }
79
+ autofocusChanged() {
80
+ if (this.proxy instanceof HTMLInputElement) {
81
+ this.proxy.autofocus = this.autofocus;
82
+ this.validate();
83
+ }
84
+ }
85
+ placeholderChanged() {
86
+ if (this.proxy instanceof HTMLInputElement) {
87
+ this.proxy.placeholder = this.placeholder;
88
+ }
89
+ }
90
+ typeChanged() {
91
+ if (this.proxy instanceof HTMLInputElement) {
92
+ this.proxy.type = this.type;
93
+ this.validate();
94
+ }
95
+ }
96
+ listChanged() {
97
+ if (this.proxy instanceof HTMLInputElement) {
98
+ this.proxy.setAttribute("list", this.list);
99
+ this.validate();
100
+ }
101
+ }
102
+ maxlengthChanged() {
103
+ if (this.proxy instanceof HTMLInputElement) {
104
+ this.proxy.maxLength = this.maxlength;
105
+ this.validate();
106
+ }
107
+ }
108
+ minlengthChanged() {
109
+ if (this.proxy instanceof HTMLInputElement) {
110
+ this.proxy.minLength = this.minlength;
111
+ this.validate();
112
+ }
113
+ }
114
+ patternChanged() {
115
+ if (this.proxy instanceof HTMLInputElement) {
116
+ this.proxy.pattern = this.pattern;
117
+ this.validate();
118
+ }
119
+ }
120
+ sizeChanged() {
121
+ if (this.proxy instanceof HTMLInputElement) {
122
+ this.proxy.size = this.size;
123
+ }
124
+ }
125
+ spellcheckChanged() {
126
+ if (this.proxy instanceof HTMLInputElement) {
127
+ this.proxy.spellcheck = this.spellcheck;
128
+ }
129
+ }
130
+ /**
131
+ * @internal
132
+ */
133
+ connectedCallback() {
134
+ super.connectedCallback();
135
+ this.proxy.setAttribute("type", this.type);
136
+ this.validate();
137
+ if (this.autofocus) {
138
+ DOM.queueUpdate(() => {
139
+ this.focus();
140
+ });
141
+ }
142
+ }
143
+ /**
144
+ * Selects all the text in the text field
145
+ *
146
+ * @public
147
+ */
148
+ select() {
149
+ this.control.select();
150
+ /**
151
+ * The select event does not permeate the shadow DOM boundary.
152
+ * This fn effectively proxies the select event,
153
+ * emitting a `select` event whenever the internal
154
+ * control emits a `select` event
155
+ */
156
+ this.$emit("select");
157
+ }
158
+ /**
159
+ * Handles the internal control's `input` event
160
+ * @internal
161
+ */
162
+ handleTextInput() {
163
+ this.value = this.control.value;
164
+ }
165
+ /**
166
+ * Change event handler for inner control.
167
+ * @remarks
168
+ * "Change" events are not `composable` so they will not
169
+ * permeate the shadow DOM boundary. This fn effectively proxies
170
+ * the change event, emitting a `change` event whenever the internal
171
+ * control emits a `change` event
172
+ * @internal
173
+ */
174
+ handleChange() {
175
+ this.$emit("change");
176
+ }
177
+ }
178
+ __decorate([
179
+ attr({ attribute: "readonly", mode: "boolean" })
180
+ ], TextField.prototype, "readOnly", void 0);
181
+ __decorate([
182
+ attr({ mode: "boolean" })
183
+ ], TextField.prototype, "autofocus", void 0);
184
+ __decorate([
185
+ attr
186
+ ], TextField.prototype, "placeholder", void 0);
187
+ __decorate([
188
+ attr
189
+ ], TextField.prototype, "type", void 0);
190
+ __decorate([
191
+ attr
192
+ ], TextField.prototype, "list", void 0);
193
+ __decorate([
194
+ attr({ converter: nullableNumberConverter })
195
+ ], TextField.prototype, "maxlength", void 0);
196
+ __decorate([
197
+ attr({ converter: nullableNumberConverter })
198
+ ], TextField.prototype, "minlength", void 0);
199
+ __decorate([
200
+ attr
201
+ ], TextField.prototype, "pattern", void 0);
202
+ __decorate([
203
+ attr({ converter: nullableNumberConverter })
204
+ ], TextField.prototype, "size", void 0);
205
+ __decorate([
206
+ attr({ mode: "boolean" })
207
+ ], TextField.prototype, "spellcheck", void 0);
208
+ __decorate([
209
+ observable
210
+ ], TextField.prototype, "defaultSlottedNodes", void 0);
211
+ /**
212
+ * Includes ARIA states and properties relating to the ARIA textbox role
213
+ *
214
+ * @public
215
+ */
216
+ class DelegatesARIATextbox {
217
+ }
218
+ applyMixins(DelegatesARIATextbox, ARIAGlobalStatesAndProperties);
219
+ applyMixins(TextField, StartEnd, DelegatesARIATextbox);
220
+
221
+ const ElementInternalsKey = 'ElementInternals';
222
+
223
+ const supportsElementInternals = () => ElementInternalsKey in window && 'setFormValue' in window[ElementInternalsKey].prototype;
224
+
225
+ function formElements(constructor) {
226
+ var _Decorated_blurred;
227
+
228
+ class Decorated extends constructor {
229
+ constructor(...args) {
230
+ super(...args);
231
+ this.charCount = false;
232
+ this.userValid = true;
233
+
234
+ _Decorated_blurred.set(this, false);
235
+
236
+ this.validate = () => {
237
+ if (supportsElementInternals() && this.proxy instanceof HTMLElement) {
238
+ this.setValidity(this.proxy.validity, this.proxy.validationMessage, this.control);
239
+ } else {
240
+ super.validate();
241
+ }
242
+
243
+ this.userValid = !this.userValid;
244
+
245
+ if (this.proxy instanceof HTMLElement) {
246
+ this.userValid = __classPrivateFieldGet(this, _Decorated_blurred, "f") && this.dirtyValue ? !this.validationMessage : true;
247
+ }
248
+ };
249
+
250
+ this.addEventListener('blur', () => {
251
+ __classPrivateFieldSet(this, _Decorated_blurred, true, "f");
252
+
253
+ this.validate();
254
+ });
255
+ this.addEventListener('focus', () => {
256
+ __classPrivateFieldSet(this, _Decorated_blurred, false, "f");
257
+ });
258
+ this.addEventListener('invalid', () => {
259
+ if (__classPrivateFieldGet(this, _Decorated_blurred, "f") && this.dirtyValue) return;
260
+
261
+ __classPrivateFieldSet(this, _Decorated_blurred, true, "f");
262
+
263
+ this.dirtyValue = true;
264
+ this.validate();
265
+ });
266
+ }
267
+
268
+ get errorValidationMessage() {
269
+ return this.userValid ? '' : this.validationMessage;
270
+ }
271
+
272
+ }
273
+
274
+ _Decorated_blurred = new WeakMap();
275
+
276
+ __decorate([attr, __metadata("design:type", String)], Decorated.prototype, "label", void 0);
277
+
278
+ __decorate([attr({
279
+ attribute: 'helper-text'
280
+ }), __metadata("design:type", String)], Decorated.prototype, "helperText", void 0);
281
+
282
+ __decorate([attr({
283
+ attribute: 'char-count',
284
+ mode: 'boolean'
285
+ }), __metadata("design:type", Object)], Decorated.prototype, "charCount", void 0);
286
+
287
+ __decorate([observable, __metadata("design:type", Object)], Decorated.prototype, "userValid", void 0);
288
+
289
+ __decorate([volatile, __metadata("design:type", Object), __metadata("design:paramtypes", [])], Decorated.prototype, "errorValidationMessage", null);
290
+
291
+ return Decorated;
292
+ }
293
+
294
+ export { DelegatesARIATextbox as D, TextField as T, formElements as f };
@@ -15,7 +15,7 @@ export declare function formElements<T extends {
15
15
  helperText?: string | undefined;
16
16
  charCount: boolean;
17
17
  userValid: boolean;
18
- "__#5831@#blurred": boolean;
18
+ "__#5963@#blurred": boolean;
19
19
  readonly errorValidationMessage: any;
20
20
  validate: () => void;
21
21
  };
@@ -33,7 +33,7 @@ __decorate([attr({
33
33
  mode: 'boolean'
34
34
  }), __metadata("design:type", Object)], SideDrawer.prototype, "trailing", void 0);
35
35
 
36
- var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 08 Sep 2022 11:04:18 GMT\n */\n.control {\n position: fixed;\n z-index: 1;\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n inline-size: 280px;\n inset-block: 0;\n overflow-y: auto;\n}\n.control.alternate {\n background-color: var(--vvd-color-canvas);\n}\n.control.trailing {\n inset-inline-end: 0;\n}\n.control:not(.open).trailing {\n transform: translateX(100%);\n}\n.control:not(.open):not(.trailing) {\n transform: translateX(-100%);\n}\n.control.open:not(.modal).trailing + .side-drawer-app-content {\n margin-inline-end: var(--side-drawer-app-content-offset, 280px);\n}\n.control.open:not(.modal):not(.trailing) + .side-drawer-app-content {\n margin-inline-start: var(--side-drawer-app-content-offset, 280px);\n}\n@media (prefers-reduced-motion: no-preference) {\n .control {\n transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n}\n\n.scrim {\n background-color: var(--vvd-color-canvas-text);\n opacity: 0.5;\n position: fixed;\n inset: 0;\n}\n.scrim:not(.open) {\n display: none;\n}";
36
+ var css_248z = "/**\n * Do not edit directly\n * Generated on Fri, 09 Sep 2022 10:25:24 GMT\n */\n.control {\n position: fixed;\n z-index: 1;\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n inline-size: 280px;\n inset-block: 0;\n overflow-y: auto;\n}\n.control.alternate {\n background-color: var(--vvd-color-canvas);\n}\n.control.trailing {\n inset-inline-end: 0;\n}\n.control:not(.open).trailing {\n transform: translateX(100%);\n}\n.control:not(.open):not(.trailing) {\n transform: translateX(-100%);\n}\n.control.open:not(.modal).trailing + .side-drawer-app-content {\n margin-inline-end: var(--side-drawer-app-content-offset, 280px);\n}\n.control.open:not(.modal):not(.trailing) + .side-drawer-app-content {\n margin-inline-start: var(--side-drawer-app-content-offset, 280px);\n}\n@media (prefers-reduced-motion: no-preference) {\n .control {\n transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n}\n\n.scrim {\n background-color: var(--vvd-color-canvas-text);\n opacity: 0.5;\n position: fixed;\n inset: 0;\n}\n.scrim:not(.open) {\n display: none;\n}";
37
37
 
38
38
  let _ = t => t,
39
39
  _t,
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 08 Sep 2022 11:04:18 GMT
3
+ * Generated on Fri, 09 Sep 2022 10:25:24 GMT
4
4
  */
5
5
  /**
6
6
  * Do not edit directly
7
- * Generated on Thu, 08 Sep 2022 11:04:18 GMT
7
+ * Generated on Fri, 09 Sep 2022 10:25:24 GMT
8
8
  */
9
9
  :root, .vvd-theme-main, ::part(vvd-theme-main) {
10
10
  --vvd-color-canvas: #000000;
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 08 Sep 2022 11:04:18 GMT
3
+ * Generated on Fri, 09 Sep 2022 10:25:24 GMT
4
4
  */
5
5
  /**
6
6
  * Do not edit directly
7
- * Generated on Thu, 08 Sep 2022 11:04:18 GMT
7
+ * Generated on Fri, 09 Sep 2022 10:25:24 GMT
8
8
  */
9
9
  :root, .vvd-theme-main, ::part(vvd-theme-main) {
10
10
  --vvd-color-canvas: #ffffff;
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 08 Sep 2022 11:04:18 GMT
3
+ * Generated on Fri, 09 Sep 2022 10:25:25 GMT
4
4
  */
5
5
  /**
6
6
  * Do not edit directly
7
- * Generated on Thu, 08 Sep 2022 11:04:18 GMT
7
+ * Generated on Fri, 09 Sep 2022 10:25:24 GMT
8
8
  */
9
9
  :root {
10
10
  --vvd-font-headline: 500 condensed 66px/88px SpeziaCompleteVariableUpright;
@@ -0,0 +1,298 @@
1
+ import '../focus/index.js';
2
+ import { F as FoundationElement, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
3
+ import { D as DelegatesARIATextbox, f as formElements } from '../shared/form-elements.js';
4
+ import { a as applyMixins } from '../shared/apply-mixins.js';
5
+ import { F as FormAssociated } from '../shared/form-associated.js';
6
+ import '../shared/affix.js';
7
+ import { f as focusTemplateFactory } from '../shared/focus2.js';
8
+ import { w as when } from '../shared/when.js';
9
+ import { r as ref } from '../shared/ref.js';
10
+ import { c as classNames } from '../shared/class-names.js';
11
+ import '../shared/focus.js';
12
+ import '../shared/aria-global.js';
13
+ import '../shared/web.dom-collections.iterator.js';
14
+ import '../shared/export.js';
15
+ import '../shared/object-keys.js';
16
+ import '../shared/iterators.js';
17
+ import '../shared/icon.js';
18
+ import '../shared/to-string.js';
19
+ import '../shared/_has.js';
20
+
21
+ class _TextArea extends FoundationElement {
22
+ }
23
+ /**
24
+ * A form-associated base class for the {@link @microsoft/fast-foundation#(TextArea:class)} component.
25
+ *
26
+ * @internal
27
+ */
28
+ class FormAssociatedTextArea extends FormAssociated(_TextArea) {
29
+ constructor() {
30
+ super(...arguments);
31
+ this.proxy = document.createElement("textarea");
32
+ }
33
+ }
34
+
35
+ /**
36
+ * Resize mode for a TextArea
37
+ * @public
38
+ */
39
+ const TextAreaResize = {
40
+ /**
41
+ * No resize.
42
+ */
43
+ none: "none",
44
+ /**
45
+ * Resize vertically and horizontally.
46
+ */
47
+ both: "both",
48
+ /**
49
+ * Resize horizontally.
50
+ */
51
+ horizontal: "horizontal",
52
+ /**
53
+ * Resize vertically.
54
+ */
55
+ vertical: "vertical",
56
+ };
57
+
58
+ /**
59
+ * A Text Area Custom HTML Element.
60
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.
61
+ *
62
+ * @slot - The default slot for the label
63
+ * @csspart label - The label
64
+ * @csspart root - The element wrapping the control
65
+ * @csspart control - The textarea element
66
+ * @fires change - Emits a custom 'change' event when the textarea emits a change event
67
+ *
68
+ * @public
69
+ */
70
+ class TextArea$1 extends FormAssociatedTextArea {
71
+ constructor() {
72
+ super(...arguments);
73
+ /**
74
+ * The resize mode of the element.
75
+ * @public
76
+ * @remarks
77
+ * HTML Attribute: resize
78
+ */
79
+ this.resize = TextAreaResize.none;
80
+ /**
81
+ * Sizes the element horizontally by a number of character columns.
82
+ *
83
+ * @public
84
+ * @remarks
85
+ * HTML Attribute: cols
86
+ */
87
+ this.cols = 20;
88
+ /**
89
+ * @internal
90
+ */
91
+ this.handleTextInput = () => {
92
+ this.value = this.control.value;
93
+ };
94
+ }
95
+ readOnlyChanged() {
96
+ if (this.proxy instanceof HTMLTextAreaElement) {
97
+ this.proxy.readOnly = this.readOnly;
98
+ }
99
+ }
100
+ autofocusChanged() {
101
+ if (this.proxy instanceof HTMLTextAreaElement) {
102
+ this.proxy.autofocus = this.autofocus;
103
+ }
104
+ }
105
+ listChanged() {
106
+ if (this.proxy instanceof HTMLTextAreaElement) {
107
+ this.proxy.setAttribute("list", this.list);
108
+ }
109
+ }
110
+ maxlengthChanged() {
111
+ if (this.proxy instanceof HTMLTextAreaElement) {
112
+ this.proxy.maxLength = this.maxlength;
113
+ }
114
+ }
115
+ minlengthChanged() {
116
+ if (this.proxy instanceof HTMLTextAreaElement) {
117
+ this.proxy.minLength = this.minlength;
118
+ }
119
+ }
120
+ spellcheckChanged() {
121
+ if (this.proxy instanceof HTMLTextAreaElement) {
122
+ this.proxy.spellcheck = this.spellcheck;
123
+ }
124
+ }
125
+ /**
126
+ * Selects all the text in the text area
127
+ *
128
+ * @public
129
+ */
130
+ select() {
131
+ this.control.select();
132
+ /**
133
+ * The select event does not permeate the shadow DOM boundary.
134
+ * This fn effectively proxies the select event,
135
+ * emitting a `select` event whenever the internal
136
+ * control emits a `select` event
137
+ */
138
+ this.$emit("select");
139
+ }
140
+ /**
141
+ * Change event handler for inner control.
142
+ * @remarks
143
+ * "Change" events are not `composable` so they will not
144
+ * permeate the shadow DOM boundary. This fn effectively proxies
145
+ * the change event, emitting a `change` event whenever the internal
146
+ * control emits a `change` event
147
+ * @internal
148
+ */
149
+ handleChange() {
150
+ this.$emit("change");
151
+ }
152
+ }
153
+ __decorate([
154
+ attr({ mode: "boolean" })
155
+ ], TextArea$1.prototype, "readOnly", void 0);
156
+ __decorate([
157
+ attr
158
+ ], TextArea$1.prototype, "resize", void 0);
159
+ __decorate([
160
+ attr({ mode: "boolean" })
161
+ ], TextArea$1.prototype, "autofocus", void 0);
162
+ __decorate([
163
+ attr({ attribute: "form" })
164
+ ], TextArea$1.prototype, "formId", void 0);
165
+ __decorate([
166
+ attr
167
+ ], TextArea$1.prototype, "list", void 0);
168
+ __decorate([
169
+ attr({ converter: nullableNumberConverter })
170
+ ], TextArea$1.prototype, "maxlength", void 0);
171
+ __decorate([
172
+ attr({ converter: nullableNumberConverter })
173
+ ], TextArea$1.prototype, "minlength", void 0);
174
+ __decorate([
175
+ attr
176
+ ], TextArea$1.prototype, "name", void 0);
177
+ __decorate([
178
+ attr
179
+ ], TextArea$1.prototype, "placeholder", void 0);
180
+ __decorate([
181
+ attr({ converter: nullableNumberConverter, mode: "fromView" })
182
+ ], TextArea$1.prototype, "cols", void 0);
183
+ __decorate([
184
+ attr({ converter: nullableNumberConverter, mode: "fromView" })
185
+ ], TextArea$1.prototype, "rows", void 0);
186
+ __decorate([
187
+ attr({ mode: "boolean" })
188
+ ], TextArea$1.prototype, "spellcheck", void 0);
189
+ __decorate([
190
+ observable
191
+ ], TextArea$1.prototype, "defaultSlottedNodes", void 0);
192
+ applyMixins(TextArea$1, DelegatesARIATextbox);
193
+
194
+ var css_248z = "/**\n * Do not edit directly\n * Generated on Fri, 09 Sep 2022 10:25:24 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n display: inline-grid;\n width: 100%;\n gap: 4px;\n grid-template-columns: min-content 1fr max-content;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-canvas-text);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transaprent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base:where(.error):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-alert-500);\n --_appearance-color-fill: var(--vvd-color-alert-100);\n --_appearance-color-outline: var(--vvd-color-alert-500);\n}\n.base:where(.error):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n --_low-ink-color: var(--vvd-color-neutral-600);\n}\n.base.disabled {\n --_low-ink-color: var(--vvd-color-neutral-400);\n pointer-events: none;\n}\n\n.label {\n contain: inline-size;\n font: var(--vvd-font-base);\n grid-column: 1/4;\n grid-row: 1;\n line-height: 20px;\n}\n.base:not(.disabled) .label {\n color: var(--vvd-color-canvas-text);\n}\n.base.disabled .label {\n color: var(--vvd-color-neutral-400);\n}\n\n.fieldset {\n position: relative;\n display: flex;\n align-items: center;\n border-radius: 6px;\n grid-column: 1/4;\n}\n\n.control {\n width: 100%;\n padding: 4px 16px;\n border: 0 none;\n background-color: var(--_appearance-color-fill);\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-font-base);\n min-block-size: 40px;\n transition: box-shadow 0.2s, background-color 0.2s, color 0.2s;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control::placeholder {\n color: var(--_low-ink-color);\n}\n\n.helper-text {\n color: var(--_low-ink-color);\n font: var(--vvd-font-base-condensed);\n grid-column: 1/4;\n}\n\n.error-message {\n display: flex;\n color: var(--vvd-color-canvas-text);\n contain: inline-size;\n font: var(--vvd-font-base-condensed);\n grid-column: 2/4;\n}\n.error-message-icon {\n color: var(--vvd-color-alert-500);\n font-size: 16px;\n grid-column: 1/2;\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.fieldset:not(:focus-visible, :focus-within) > .focus-indicator {\n display: none;\n}";
195
+
196
+ let TextArea = class TextArea extends TextArea$1 {};
197
+
198
+ __decorate([attr, __metadata("design:type", String)], TextArea.prototype, "wrap", void 0);
199
+
200
+ TextArea = __decorate([formElements], TextArea);
201
+
202
+ let _ = t => t,
203
+ _t,
204
+ _t2,
205
+ _t3,
206
+ _t4;
207
+
208
+ const getClasses = ({
209
+ value,
210
+ errorValidationMessage,
211
+ disabled,
212
+ placeholder,
213
+ readOnly
214
+ }) => classNames('base', ['readonly', readOnly], ['placeholder', Boolean(placeholder)], ['disabled', disabled], ['error', Boolean(errorValidationMessage)], ['has-value', Boolean(value)]);
215
+
216
+ function renderLabel() {
217
+ return html(_t || (_t = _`
218
+ <label for="control" class="label">
219
+ ${0}
220
+ </label>`), x => x.label);
221
+ }
222
+
223
+ function renderHelperText() {
224
+ return html(_t2 || (_t2 = _`<span class="helper-text">${0}</span>`), x => x.helperText);
225
+ }
226
+
227
+ function renderErrorMessage() {
228
+ return html(_t3 || (_t3 = _`
229
+ <vwc-icon class="error-message-icon" type="info-negative"></vwc-icon>
230
+ <span class="error-message">${0}</span>
231
+ `), x => x.errorValidationMessage);
232
+ }
233
+
234
+ const TextAreaTemplate = context => {
235
+ const focusTemplate = focusTemplateFactory(context);
236
+ return html(_t4 || (_t4 = _`
237
+ <div class="${0}">
238
+ ${0}
239
+ <div class="fieldset">
240
+ <textarea class="control"
241
+ ?autofocus="${0}"
242
+ placeholder="${0}"
243
+ name="${0}"
244
+ maxlength="${0}"
245
+ rows="${0}"
246
+ cols="${0}"
247
+ wrap="${0}"
248
+ ?readonly="${0}"
249
+ ?required="${0}"
250
+ ?spellcheck="${0}"
251
+ :value="${0}"
252
+ aria-atomic="${0}"
253
+ aria-busy="${0}"
254
+ aria-controls="${0}"
255
+ aria-current="${0}"
256
+ aria-describedby="${0}"
257
+ aria-details="${0}"
258
+ aria-disabled="${0}"
259
+ aria-errormessage="${0}"
260
+ aria-flowto="${0}"
261
+ aria-haspopup="${0}"
262
+ aria-hidden="${0}"
263
+ aria-invalid="${0}"
264
+ aria-keyshortcuts="${0}"
265
+ aria-label="${0}"
266
+ aria-labelledby="${0}"
267
+ aria-live="${0}"
268
+ aria-owns="${0}"
269
+ aria-relevant="${0}"
270
+ aria-roledescription="${0}"
271
+ @input="${0}"
272
+ @change="${0}"
273
+ ${0}
274
+ >
275
+ </textarea>
276
+ ${0}
277
+ </div>
278
+ ${0}
279
+ ${0}
280
+ </div>
281
+ `), getClasses, when(x => x.label, renderLabel()), x => x.autofocus, x => x.placeholder ? x.placeholder : null, x => x.name ? x.name : null, x => x.maxlength ? x.maxlength : null, x => x.rows ? x.rows : null, x => x.cols ? x.cols : null, x => x.wrap ? x.wrap : null, x => x.readOnly, x => x.required, x => x.spellcheck, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaRelevant, x => x.ariaRoledescription, x => x.handleTextInput(), x => x.handleChange(), ref('control'), () => focusTemplate, when(x => {
282
+ var _a;
283
+
284
+ return !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
285
+ }, renderHelperText()), when(x => x.errorValidationMessage, renderErrorMessage()));
286
+ };
287
+
288
+ const vividTextArea = TextArea.compose({
289
+ baseName: 'text-area',
290
+ template: TextAreaTemplate,
291
+ styles: css_248z,
292
+ shadowOptions: {
293
+ delegatesFocus: true
294
+ }
295
+ });
296
+ designSystem.register(vividTextArea());
297
+
298
+ export { vividTextArea };