@vonage/vivid 3.13.0 → 3.15.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 (134) hide show
  1. package/accordion/index.js +1 -0
  2. package/accordion-item/index.js +1 -0
  3. package/alert/index.js +1 -0
  4. package/avatar/index.js +1 -0
  5. package/badge/index.js +1 -0
  6. package/banner/index.js +1 -0
  7. package/breadcrumb-item/index.js +1 -0
  8. package/button/index.js +1 -0
  9. package/card/index.js +1 -0
  10. package/checkbox/index.js +4 -0
  11. package/combobox/index.js +1 -0
  12. package/custom-elements.json +1855 -117
  13. package/data-grid/index.js +4 -0
  14. package/dialog/index.js +1 -0
  15. package/empty-state/index.js +14 -0
  16. package/fab/index.js +2 -1
  17. package/header/index.js +1 -1
  18. package/icon/index.js +1 -0
  19. package/index.js +34 -30
  20. package/layout/index.js +1 -1
  21. package/lib/alert/alert.d.ts +4 -6
  22. package/lib/checkbox/checkbox.d.ts +6 -3
  23. package/lib/components.d.ts +2 -0
  24. package/lib/data-grid/data-grid-cell.d.ts +2 -0
  25. package/lib/data-grid/data-grid-row.d.ts +1 -0
  26. package/lib/data-grid/data-grid.d.ts +5 -0
  27. package/lib/empty-state/definition.d.ts +3 -0
  28. package/lib/empty-state/empty-state.d.ts +5 -0
  29. package/lib/empty-state/empty-state.template.d.ts +4 -0
  30. package/lib/empty-state/index.d.ts +1 -0
  31. package/lib/select/select.d.ts +3 -2
  32. package/listbox/index.js +2 -1
  33. package/menu/index.js +4 -3
  34. package/menu-item/index.js +4 -1
  35. package/nav/index.js +1 -1
  36. package/nav-disclosure/index.js +2 -1
  37. package/nav-item/index.js +2 -1
  38. package/note/index.js +2 -1
  39. package/number-field/index.js +2 -1
  40. package/option/index.js +1 -0
  41. package/package.json +1 -1
  42. package/pagination/index.js +15 -312
  43. package/popup/index.js +1 -0
  44. package/progress/index.js +1 -1
  45. package/radio/index.js +1 -1
  46. package/radio-group/index.js +1 -1
  47. package/select/index.js +2 -1
  48. package/shared/definition.js +1 -1
  49. package/shared/definition10.js +1 -1
  50. package/shared/definition11.js +1 -1
  51. package/shared/definition12.js +1 -1
  52. package/shared/definition14.js +1 -1
  53. package/shared/definition15.js +1 -1
  54. package/shared/definition16.js +2 -2
  55. package/shared/definition17.js +1 -1
  56. package/shared/definition18.js +23 -8
  57. package/shared/definition19.js +1 -1
  58. package/shared/definition2.js +1 -1
  59. package/shared/definition20.js +1 -1
  60. package/shared/definition21.js +1 -1
  61. package/shared/definition22.js +217 -11
  62. package/shared/definition23.js +2 -2
  63. package/shared/definition24.js +1 -1
  64. package/shared/definition25.js +39 -76
  65. package/shared/definition26.js +76 -47
  66. package/shared/definition27.js +46 -36
  67. package/shared/definition28.js +39 -49
  68. package/shared/definition29.js +48 -344
  69. package/shared/definition3.js +1 -1
  70. package/shared/definition30.js +273 -288
  71. package/shared/definition31.js +366 -14
  72. package/shared/definition32.js +13 -67
  73. package/shared/definition33.js +66 -21
  74. package/shared/definition34.js +21 -39
  75. package/shared/definition35.js +31 -432
  76. package/shared/definition36.js +432 -76
  77. package/shared/definition37.js +223 -34
  78. package/shared/definition38.js +82 -425
  79. package/shared/definition39.js +30 -628
  80. package/shared/definition4.js +1 -1
  81. package/shared/definition40.js +420 -73
  82. package/shared/definition41.js +530 -484
  83. package/shared/definition42.js +76 -133
  84. package/shared/definition43.js +577 -40
  85. package/shared/definition44.js +135 -20
  86. package/shared/definition45.js +42 -423
  87. package/shared/definition46.js +22 -112
  88. package/shared/definition47.js +440 -18
  89. package/shared/definition48.js +92 -247
  90. package/shared/definition49.js +20 -112
  91. package/shared/definition5.js +1 -1
  92. package/shared/definition50.js +259 -590
  93. package/shared/definition51.js +110 -91
  94. package/shared/definition52.js +602 -67
  95. package/shared/definition53.js +89 -294
  96. package/shared/definition54.js +80 -0
  97. package/shared/definition55.js +305 -0
  98. package/shared/definition6.js +52 -78
  99. package/shared/definition7.js +1 -1
  100. package/shared/definition8.js +1 -1
  101. package/shared/definition9.js +1 -1
  102. package/shared/engine-is-node.js +8 -0
  103. package/shared/es.object.assign.js +1 -1
  104. package/shared/es.regexp.to-string.js +1 -1
  105. package/shared/es.string.includes.js +83 -0
  106. package/shared/form-elements.js +2 -2
  107. package/shared/icon.js +13 -17
  108. package/shared/index.js +1 -1
  109. package/shared/patterns/form-elements/form-elements.d.ts +4 -4
  110. package/shared/string-trim.js +1 -1
  111. package/shared/text-field.js +1 -1
  112. package/shared/to-string.js +1 -1
  113. package/side-drawer/index.js +1 -1
  114. package/slider/index.js +1 -1
  115. package/styles/core/all.css +1 -1
  116. package/styles/core/theme.css +1 -1
  117. package/styles/core/typography.css +1 -1
  118. package/styles/fonts/spezia-variable.css +2 -2
  119. package/styles/tokens/theme-dark.css +4 -4
  120. package/styles/tokens/theme-light.css +4 -4
  121. package/switch/index.js +2 -1
  122. package/tab/index.js +2 -1
  123. package/tab-panel/index.js +1 -1
  124. package/tabs/index.js +4 -3
  125. package/tag/index.js +2 -1
  126. package/tag-group/index.js +1 -1
  127. package/text-anchor/index.js +1 -0
  128. package/text-area/index.js +2 -1
  129. package/text-field/index.js +2 -1
  130. package/toggletip/index.js +2 -1
  131. package/tooltip/index.js +2 -1
  132. package/tree-item/index.js +2 -1
  133. package/tree-view/index.js +1 -1
  134. package/vivid.api.json +210 -0
@@ -1,615 +1,284 @@
1
- import { l as fails$5, g as global$3, K as functionCall, k as functionUncurryThis, a9 as shared$1, aa as objectCreate, L as internalState, G as _export, w as wellKnownSymbol$2, H as defineBuiltIn$1, ab as createNonEnumerableProperty$1, T as requireObjectCoercible$2, ac as toIntegerOrInfinity$2, a2 as toObject$1, q as anObject$2, m as isCallable$2, c as classofRaw, s as isNullOrUndefined$1, ad as toLength$1, P as getMethod$1, F as FoundationElement, Y as DOM, U as __classPrivateFieldGet, W as __classPrivateFieldSet, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
2
- import { P as Popup, p as popupRegistries } from './definition20.js';
3
- import { r as regexpFlags$1 } from './es.regexp.to-string.js';
4
- import { t as toString$3 } from './to-string.js';
5
- import { f as functionUncurryThisClause, a as functionApply } from './icon.js';
1
+ import { F as FoundationElement, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable, b as __metadata, h as html, r as registerFactory } from './index.js';
2
+ import { i as iconRegistries } from './definition3.js';
3
+ import { f as focusRegistries } from './definition4.js';
4
+ import './affix.js';
5
+ import './focus.js';
6
+ import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, g as getFeedbackTemplate } from './form-elements.js';
7
+ import { D as DelegatesARIATextbox } from './text-field2.js';
8
+ import { a as applyMixins } from './apply-mixins.js';
9
+ import { F as FormAssociated } from './form-associated.js';
6
10
  import { w as when } from './when.js';
11
+ import { r as ref } from './ref.js';
7
12
  import { c as classNames } from './class-names.js';
8
13
 
9
- var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 17 May 2023 03:28:45 GMT\n */\n.control {\n display: inline-block;\n}\n\n.content-wrapper {\n width: var(--toggletip-inline-size, auto);\n padding: 16px;\n}\n\n.headline {\n font: var(--vvd-typography-base-bold);\n}\n\n.action-items {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n::slotted([slot=action-items]) {\n margin-block-start: 16px;\n}";
10
-
11
- var fails$4 = fails$5;
12
- var global$2 = global$3;
13
-
14
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
15
- var $RegExp$2 = global$2.RegExp;
16
-
17
- var UNSUPPORTED_Y$1 = fails$4(function () {
18
- var re = $RegExp$2('a', 'y');
19
- re.lastIndex = 2;
20
- return re.exec('abcd') != null;
21
- });
22
-
23
- // UC Browser bug
24
- // https://github.com/zloirock/core-js/issues/1008
25
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
26
- return !$RegExp$2('a', 'y').sticky;
27
- });
28
-
29
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
30
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
31
- var re = $RegExp$2('^r', 'gy');
32
- re.lastIndex = 2;
33
- return re.exec('str') != null;
34
- });
35
-
36
- var regexpStickyHelpers = {
37
- BROKEN_CARET: BROKEN_CARET,
38
- MISSED_STICKY: MISSED_STICKY,
39
- UNSUPPORTED_Y: UNSUPPORTED_Y$1
40
- };
41
-
42
- var fails$3 = fails$5;
43
- var global$1 = global$3;
44
-
45
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
46
- var $RegExp$1 = global$1.RegExp;
47
-
48
- var regexpUnsupportedDotAll = fails$3(function () {
49
- var re = $RegExp$1('.', 's');
50
- return !(re.dotAll && re.exec('\n') && re.flags === 's');
51
- });
52
-
53
- var fails$2 = fails$5;
54
- var global = global$3;
55
-
56
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
57
- var $RegExp = global.RegExp;
58
-
59
- var regexpUnsupportedNcg = fails$2(function () {
60
- var re = $RegExp('(?<a>b)', 'g');
61
- return re.exec('b').groups.a !== 'b' ||
62
- 'b'.replace(re, '$<a>c') !== 'bc';
63
- });
64
-
65
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
66
- /* eslint-disable regexp/no-useless-quantifier -- testing */
67
- var call$2 = functionCall;
68
- var uncurryThis$4 = functionUncurryThis;
69
- var toString$2 = toString$3;
70
- var regexpFlags = regexpFlags$1;
71
- var stickyHelpers = regexpStickyHelpers;
72
- var shared = shared$1.exports;
73
- var create = objectCreate;
74
- var getInternalState = internalState.get;
75
- var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
76
- var UNSUPPORTED_NCG = regexpUnsupportedNcg;
77
-
78
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
79
- var nativeExec = RegExp.prototype.exec;
80
- var patchedExec = nativeExec;
81
- var charAt$3 = uncurryThis$4(''.charAt);
82
- var indexOf = uncurryThis$4(''.indexOf);
83
- var replace$1 = uncurryThis$4(''.replace);
84
- var stringSlice$3 = uncurryThis$4(''.slice);
85
-
86
- var UPDATES_LAST_INDEX_WRONG = (function () {
87
- var re1 = /a/;
88
- var re2 = /b*/g;
89
- call$2(nativeExec, re1, 'a');
90
- call$2(nativeExec, re2, 'a');
91
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
92
- })();
93
-
94
- var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
95
-
96
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
97
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
98
-
99
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
100
-
101
- if (PATCH) {
102
- patchedExec = function exec(string) {
103
- var re = this;
104
- var state = getInternalState(re);
105
- var str = toString$2(string);
106
- var raw = state.raw;
107
- var result, reCopy, lastIndex, match, i, object, group;
108
-
109
- if (raw) {
110
- raw.lastIndex = re.lastIndex;
111
- result = call$2(patchedExec, raw, str);
112
- re.lastIndex = raw.lastIndex;
113
- return result;
114
- }
115
-
116
- var groups = state.groups;
117
- var sticky = UNSUPPORTED_Y && re.sticky;
118
- var flags = call$2(regexpFlags, re);
119
- var source = re.source;
120
- var charsAdded = 0;
121
- var strCopy = str;
122
-
123
- if (sticky) {
124
- flags = replace$1(flags, 'y', '');
125
- if (indexOf(flags, 'g') === -1) {
126
- flags += 'g';
127
- }
128
-
129
- strCopy = stringSlice$3(str, re.lastIndex);
130
- // Support anchored sticky behavior.
131
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
132
- source = '(?: ' + source + ')';
133
- strCopy = ' ' + strCopy;
134
- charsAdded++;
135
- }
136
- // ^(? + rx + ) is needed, in combination with some str slicing, to
137
- // simulate the 'y' flag.
138
- reCopy = new RegExp('^(?:' + source + ')', flags);
139
- }
140
-
141
- if (NPCG_INCLUDED) {
142
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
14
+ class _TextArea extends FoundationElement {
15
+ }
16
+ /**
17
+ * A form-associated base class for the {@link @microsoft/fast-foundation#(TextArea:class)} component.
18
+ *
19
+ * @internal
20
+ */
21
+ class FormAssociatedTextArea extends FormAssociated(_TextArea) {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.proxy = document.createElement("textarea");
143
25
  }
144
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
26
+ }
145
27
 
146
- match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
28
+ /**
29
+ * Resize mode for a TextArea
30
+ * @public
31
+ */
32
+ const TextAreaResize = {
33
+ /**
34
+ * No resize.
35
+ */
36
+ none: "none",
37
+ /**
38
+ * Resize vertically and horizontally.
39
+ */
40
+ both: "both",
41
+ /**
42
+ * Resize horizontally.
43
+ */
44
+ horizontal: "horizontal",
45
+ /**
46
+ * Resize vertically.
47
+ */
48
+ vertical: "vertical",
49
+ };
147
50
 
148
- if (sticky) {
149
- if (match) {
150
- match.input = stringSlice$3(match.input, charsAdded);
151
- match[0] = stringSlice$3(match[0], charsAdded);
152
- match.index = re.lastIndex;
153
- re.lastIndex += match[0].length;
154
- } else re.lastIndex = 0;
155
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
156
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
51
+ /**
52
+ * A Text Area Custom HTML Element.
53
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.
54
+ *
55
+ * @slot - The default slot for the label
56
+ * @csspart label - The label
57
+ * @csspart root - The element wrapping the control
58
+ * @csspart control - The textarea element
59
+ * @fires change - Emits a custom 'change' event when the textarea emits a change event
60
+ *
61
+ * @public
62
+ */
63
+ class TextArea$1 extends FormAssociatedTextArea {
64
+ constructor() {
65
+ super(...arguments);
66
+ /**
67
+ * The resize mode of the element.
68
+ * @public
69
+ * @remarks
70
+ * HTML Attribute: resize
71
+ */
72
+ this.resize = TextAreaResize.none;
73
+ /**
74
+ * Sizes the element horizontally by a number of character columns.
75
+ *
76
+ * @public
77
+ * @remarks
78
+ * HTML Attribute: cols
79
+ */
80
+ this.cols = 20;
81
+ /**
82
+ * @internal
83
+ */
84
+ this.handleTextInput = () => {
85
+ this.value = this.control.value;
86
+ };
157
87
  }
158
- if (NPCG_INCLUDED && match && match.length > 1) {
159
- // Fix browsers whose `exec` methods don't consistently return `undefined`
160
- // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
161
- call$2(nativeReplace, match[0], reCopy, function () {
162
- for (i = 1; i < arguments.length - 2; i++) {
163
- if (arguments[i] === undefined) match[i] = undefined;
88
+ readOnlyChanged() {
89
+ if (this.proxy instanceof HTMLTextAreaElement) {
90
+ this.proxy.readOnly = this.readOnly;
164
91
  }
165
- });
166
- }
167
-
168
- if (match && groups) {
169
- match.groups = object = create(null);
170
- for (i = 0; i < groups.length; i++) {
171
- group = groups[i];
172
- object[group[0]] = match[group[1]];
173
- }
174
92
  }
175
-
176
- return match;
177
- };
178
- }
179
-
180
- var regexpExec$2 = patchedExec;
181
-
182
- var $ = _export;
183
- var exec = regexpExec$2;
184
-
185
- // `RegExp.prototype.exec` method
186
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
187
- $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
188
- exec: exec
189
- });
190
-
191
- // TODO: Remove from `core-js@4` since it's moved to entry points
192
-
193
- var uncurryThis$3 = functionUncurryThisClause;
194
- var defineBuiltIn = defineBuiltIn$1;
195
- var regexpExec$1 = regexpExec$2;
196
- var fails$1 = fails$5;
197
- var wellKnownSymbol$1 = wellKnownSymbol$2;
198
- var createNonEnumerableProperty = createNonEnumerableProperty$1;
199
-
200
- var SPECIES = wellKnownSymbol$1('species');
201
- var RegExpPrototype = RegExp.prototype;
202
-
203
- var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
204
- var SYMBOL = wellKnownSymbol$1(KEY);
205
-
206
- var DELEGATES_TO_SYMBOL = !fails$1(function () {
207
- // String methods call symbol-named RegEp methods
208
- var O = {};
209
- O[SYMBOL] = function () { return 7; };
210
- return ''[KEY](O) != 7;
211
- });
212
-
213
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
214
- // Symbol-named RegExp methods call .exec
215
- var execCalled = false;
216
- var re = /a/;
217
-
218
- if (KEY === 'split') {
219
- // We can't use real regex here since it causes deoptimization
220
- // and serious performance degradation in V8
221
- // https://github.com/zloirock/core-js/issues/306
222
- re = {};
223
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
224
- // a new one. We need to return the patched regex when creating the new one.
225
- re.constructor = {};
226
- re.constructor[SPECIES] = function () { return re; };
227
- re.flags = '';
228
- re[SYMBOL] = /./[SYMBOL];
93
+ autofocusChanged() {
94
+ if (this.proxy instanceof HTMLTextAreaElement) {
95
+ this.proxy.autofocus = this.autofocus;
96
+ }
229
97
  }
230
-
231
- re.exec = function () { execCalled = true; return null; };
232
-
233
- re[SYMBOL]('');
234
- return !execCalled;
235
- });
236
-
237
- if (
238
- !DELEGATES_TO_SYMBOL ||
239
- !DELEGATES_TO_EXEC ||
240
- FORCED
241
- ) {
242
- var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
243
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
244
- var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
245
- var $exec = regexp.exec;
246
- if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
247
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
248
- // The native String method already delegates to @@method (this
249
- // polyfilled function), leasing to infinite recursion.
250
- // We avoid it by directly calling the native @@method method.
251
- return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
98
+ listChanged() {
99
+ if (this.proxy instanceof HTMLTextAreaElement) {
100
+ this.proxy.setAttribute("list", this.list);
252
101
  }
253
- return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
254
- }
255
- return { done: false };
256
- });
257
-
258
- defineBuiltIn(String.prototype, KEY, methods[0]);
259
- defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
260
- }
261
-
262
- if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
263
- };
264
-
265
- var uncurryThis$2 = functionUncurryThis;
266
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
267
- var toString$1 = toString$3;
268
- var requireObjectCoercible$1 = requireObjectCoercible$2;
269
-
270
- var charAt$2 = uncurryThis$2(''.charAt);
271
- var charCodeAt = uncurryThis$2(''.charCodeAt);
272
- var stringSlice$2 = uncurryThis$2(''.slice);
273
-
274
- var createMethod = function (CONVERT_TO_STRING) {
275
- return function ($this, pos) {
276
- var S = toString$1(requireObjectCoercible$1($this));
277
- var position = toIntegerOrInfinity$1(pos);
278
- var size = S.length;
279
- var first, second;
280
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
281
- first = charCodeAt(S, position);
282
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
283
- || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
284
- ? CONVERT_TO_STRING
285
- ? charAt$2(S, position)
286
- : first
287
- : CONVERT_TO_STRING
288
- ? stringSlice$2(S, position, position + 2)
289
- : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
290
- };
291
- };
292
-
293
- var stringMultibyte = {
294
- // `String.prototype.codePointAt` method
295
- // https://tc39.es/ecma262/#sec-string.prototype.codepointat
296
- codeAt: createMethod(false),
297
- // `String.prototype.at` method
298
- // https://github.com/mathiasbynens/String.prototype.at
299
- charAt: createMethod(true)
300
- };
301
-
302
- var charAt$1 = stringMultibyte.charAt;
303
-
304
- // `AdvanceStringIndex` abstract operation
305
- // https://tc39.es/ecma262/#sec-advancestringindex
306
- var advanceStringIndex$1 = function (S, index, unicode) {
307
- return index + (unicode ? charAt$1(S, index).length : 1);
308
- };
309
-
310
- var uncurryThis$1 = functionUncurryThis;
311
- var toObject = toObject$1;
312
-
313
- var floor = Math.floor;
314
- var charAt = uncurryThis$1(''.charAt);
315
- var replace = uncurryThis$1(''.replace);
316
- var stringSlice$1 = uncurryThis$1(''.slice);
317
- var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
318
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
319
-
320
- // `GetSubstitution` abstract operation
321
- // https://tc39.es/ecma262/#sec-getsubstitution
322
- var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
323
- var tailPos = position + matched.length;
324
- var m = captures.length;
325
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
326
- if (namedCaptures !== undefined) {
327
- namedCaptures = toObject(namedCaptures);
328
- symbols = SUBSTITUTION_SYMBOLS;
329
- }
330
- return replace(replacement, symbols, function (match, ch) {
331
- var capture;
332
- switch (charAt(ch, 0)) {
333
- case '$': return '$';
334
- case '&': return matched;
335
- case '`': return stringSlice$1(str, 0, position);
336
- case "'": return stringSlice$1(str, tailPos);
337
- case '<':
338
- capture = namedCaptures[stringSlice$1(ch, 1, -1)];
339
- break;
340
- default: // \d\d?
341
- var n = +ch;
342
- if (n === 0) return match;
343
- if (n > m) {
344
- var f = floor(n / 10);
345
- if (f === 0) return match;
346
- if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
347
- return match;
102
+ }
103
+ maxlengthChanged() {
104
+ if (this.proxy instanceof HTMLTextAreaElement) {
105
+ this.proxy.maxLength = this.maxlength;
348
106
  }
349
- capture = captures[n - 1];
350
107
  }
351
- return capture === undefined ? '' : capture;
352
- });
353
- };
354
-
355
- var call$1 = functionCall;
356
- var anObject$1 = anObject$2;
357
- var isCallable$1 = isCallable$2;
358
- var classof = classofRaw;
359
- var regexpExec = regexpExec$2;
360
-
361
- var $TypeError = TypeError;
362
-
363
- // `RegExpExec` abstract operation
364
- // https://tc39.es/ecma262/#sec-regexpexec
365
- var regexpExecAbstract = function (R, S) {
366
- var exec = R.exec;
367
- if (isCallable$1(exec)) {
368
- var result = call$1(exec, R, S);
369
- if (result !== null) anObject$1(result);
370
- return result;
371
- }
372
- if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
373
- throw $TypeError('RegExp#exec called on incompatible receiver');
374
- };
375
-
376
- var apply = functionApply;
377
- var call = functionCall;
378
- var uncurryThis = functionUncurryThis;
379
- var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
380
- var fails = fails$5;
381
- var anObject = anObject$2;
382
- var isCallable = isCallable$2;
383
- var isNullOrUndefined = isNullOrUndefined$1;
384
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
385
- var toLength = toLength$1;
386
- var toString = toString$3;
387
- var requireObjectCoercible = requireObjectCoercible$2;
388
- var advanceStringIndex = advanceStringIndex$1;
389
- var getMethod = getMethod$1;
390
- var getSubstitution = getSubstitution$1;
391
- var regExpExec = regexpExecAbstract;
392
- var wellKnownSymbol = wellKnownSymbol$2;
393
-
394
- var REPLACE = wellKnownSymbol('replace');
395
- var max = Math.max;
396
- var min = Math.min;
397
- var concat = uncurryThis([].concat);
398
- var push = uncurryThis([].push);
399
- var stringIndexOf = uncurryThis(''.indexOf);
400
- var stringSlice = uncurryThis(''.slice);
401
-
402
- var maybeToString = function (it) {
403
- return it === undefined ? it : String(it);
404
- };
405
-
406
- // IE <= 11 replaces $0 with the whole match, as if it was $&
407
- // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
408
- var REPLACE_KEEPS_$0 = (function () {
409
- // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
410
- return 'a'.replace(/./, '$0') === '$0';
411
- })();
412
-
413
- // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
414
- var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
415
- if (/./[REPLACE]) {
416
- return /./[REPLACE]('a', '$0') === '';
417
- }
418
- return false;
419
- })();
420
-
421
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
422
- var re = /./;
423
- re.exec = function () {
424
- var result = [];
425
- result.groups = { a: '7' };
426
- return result;
427
- };
428
- // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
429
- return ''.replace(re, '$<a>') !== '7';
430
- });
431
-
432
- // @@replace logic
433
- fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
434
- var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
435
-
436
- return [
437
- // `String.prototype.replace` method
438
- // https://tc39.es/ecma262/#sec-string.prototype.replace
439
- function replace(searchValue, replaceValue) {
440
- var O = requireObjectCoercible(this);
441
- var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
442
- return replacer
443
- ? call(replacer, searchValue, O, replaceValue)
444
- : call(nativeReplace, toString(O), searchValue, replaceValue);
445
- },
446
- // `RegExp.prototype[@@replace]` method
447
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
448
- function (string, replaceValue) {
449
- var rx = anObject(this);
450
- var S = toString(string);
451
-
452
- if (
453
- typeof replaceValue == 'string' &&
454
- stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
455
- stringIndexOf(replaceValue, '$<') === -1
456
- ) {
457
- var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
458
- if (res.done) return res.value;
459
- }
460
-
461
- var functionalReplace = isCallable(replaceValue);
462
- if (!functionalReplace) replaceValue = toString(replaceValue);
463
-
464
- var global = rx.global;
465
- if (global) {
466
- var fullUnicode = rx.unicode;
467
- rx.lastIndex = 0;
468
- }
469
- var results = [];
470
- while (true) {
471
- var result = regExpExec(rx, S);
472
- if (result === null) break;
473
-
474
- push(results, result);
475
- if (!global) break;
476
-
477
- var matchStr = toString(result[0]);
478
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
479
- }
480
-
481
- var accumulatedResult = '';
482
- var nextSourcePosition = 0;
483
- for (var i = 0; i < results.length; i++) {
484
- result = results[i];
485
-
486
- var matched = toString(result[0]);
487
- var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
488
- var captures = [];
489
- // NOTE: This is equivalent to
490
- // captures = result.slice(1).map(maybeToString)
491
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
492
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
493
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
494
- for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
495
- var namedCaptures = result.groups;
496
- if (functionalReplace) {
497
- var replacerArgs = concat([matched], captures, position, S);
498
- if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
499
- var replacement = toString(apply(replaceValue, undefined, replacerArgs));
500
- } else {
501
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
108
+ minlengthChanged() {
109
+ if (this.proxy instanceof HTMLTextAreaElement) {
110
+ this.proxy.minLength = this.minlength;
502
111
  }
503
- if (position >= nextSourcePosition) {
504
- accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
505
- nextSourcePosition = position + matched.length;
112
+ }
113
+ spellcheckChanged() {
114
+ if (this.proxy instanceof HTMLTextAreaElement) {
115
+ this.proxy.spellcheck = this.spellcheck;
506
116
  }
507
- }
508
- return accumulatedResult + stringSlice(S, nextSourcePosition);
509
117
  }
510
- ];
511
- }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
512
-
513
- var _Toggletip_instances, _Toggletip_anchorEl, _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX, _Toggletip_setupAnchor, _Toggletip_cleanupAnchor, _Toggletip_openIfClosed, _Toggletip_closeOnClickOutside, _Toggletip_closeOnEscape;
514
- class Toggletip extends FoundationElement {
515
- constructor() {
516
- super(...arguments);
517
- _Toggletip_instances.add(this);
518
- _Toggletip_anchorEl.set(this, null);
519
- _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX.set(this, ' ; Show more information');
520
- this.alternate = false;
521
- this.placement = 'right';
522
- this.anchor = '';
523
- this.open = false;
524
- _Toggletip_openIfClosed.set(this, () => {
525
- if (!this.open) DOM.queueUpdate(() => this.open = true);
526
- });
527
- _Toggletip_closeOnClickOutside.set(this, e => {
528
- if (!this.contains(e.target)) this.open = false;
529
- });
530
- _Toggletip_closeOnEscape.set(this, e => {
531
- if (e.key === 'Escape') this.open = false;
532
- });
533
- }
534
- anchorChanged(_, newValue) {
535
- if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) __classPrivateFieldGet(this, _Toggletip_instances, "m", _Toggletip_cleanupAnchor).call(this, __classPrivateFieldGet(this, _Toggletip_anchorEl, "f"));
536
- __classPrivateFieldSet(this, _Toggletip_anchorEl, newValue instanceof HTMLElement ? newValue : document.getElementById(newValue), "f");
537
- if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) __classPrivateFieldGet(this, _Toggletip_instances, "m", _Toggletip_setupAnchor).call(this, __classPrivateFieldGet(this, _Toggletip_anchorEl, "f"));
538
- }
539
- openChanged(oldValue, newValue) {
540
- if (oldValue === undefined) return;
541
- if (newValue) {
542
- document.addEventListener('click', __classPrivateFieldGet(this, _Toggletip_closeOnClickOutside, "f"));
543
- document.addEventListener('keydown', __classPrivateFieldGet(this, _Toggletip_closeOnEscape, "f"));
544
- this.setAttribute('role', 'status');
545
- } else {
546
- document.removeEventListener('click', __classPrivateFieldGet(this, _Toggletip_closeOnClickOutside, "f"));
547
- document.removeEventListener('keydown', __classPrivateFieldGet(this, _Toggletip_closeOnEscape, "f"));
548
- this.removeAttribute('role');
118
+ /**
119
+ * Selects all the text in the text area
120
+ *
121
+ * @public
122
+ */
123
+ select() {
124
+ this.control.select();
125
+ /**
126
+ * The select event does not permeate the shadow DOM boundary.
127
+ * This fn effectively proxies the select event,
128
+ * emitting a `select` event whenever the internal
129
+ * control emits a `select` event
130
+ */
131
+ this.$emit("select");
549
132
  }
550
- if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) {
551
- __classPrivateFieldGet(this, _Toggletip_anchorEl, "f").ariaExpanded = this.open.toString();
133
+ /**
134
+ * Change event handler for inner control.
135
+ * @remarks
136
+ * "Change" events are not `composable` so they will not
137
+ * permeate the shadow DOM boundary. This fn effectively proxies
138
+ * the change event, emitting a `change` event whenever the internal
139
+ * control emits a `change` event
140
+ * @internal
141
+ */
142
+ handleChange() {
143
+ this.$emit("change");
144
+ }
145
+ /** {@inheritDoc (FormAssociated:interface).validate} */
146
+ validate() {
147
+ super.validate(this.control);
552
148
  }
553
- }
554
- disconnectedCallback() {
555
- super.disconnectedCallback();
556
- if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) __classPrivateFieldGet(this, _Toggletip_instances, "m", _Toggletip_cleanupAnchor).call(this, __classPrivateFieldGet(this, _Toggletip_anchorEl, "f"));
557
- document.removeEventListener('keydown', __classPrivateFieldGet(this, _Toggletip_closeOnEscape, "f"));
558
- }
559
149
  }
560
- _Toggletip_anchorEl = new WeakMap(), _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX = new WeakMap(), _Toggletip_openIfClosed = new WeakMap(), _Toggletip_closeOnClickOutside = new WeakMap(), _Toggletip_closeOnEscape = new WeakMap(), _Toggletip_instances = new WeakSet(), _Toggletip_setupAnchor = function _Toggletip_setupAnchor(a) {
561
- var _a;
562
- a.addEventListener('click', __classPrivateFieldGet(this, _Toggletip_openIfClosed, "f"), true);
563
- a.ariaLabel = ((_a = a.ariaLabel) !== null && _a !== void 0 ? _a : '') + __classPrivateFieldGet(this, _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX, "f");
564
- }, _Toggletip_cleanupAnchor = function _Toggletip_cleanupAnchor(a) {
565
- a.removeEventListener('click', __classPrivateFieldGet(this, _Toggletip_openIfClosed, "f"), true);
566
- if (a.ariaLabel) a.ariaLabel = a.ariaLabel.replace(__classPrivateFieldGet(this, _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX, "f"), '');
567
- };
568
- __decorate([attr, __metadata("design:type", String)], Toggletip.prototype, "headline", void 0);
569
- __decorate([attr({
570
- mode: 'boolean'
571
- }), __metadata("design:type", Object)], Toggletip.prototype, "alternate", void 0);
572
- __decorate([attr({
573
- mode: 'fromView'
574
- }), __metadata("design:type", String)], Toggletip.prototype, "placement", void 0);
575
- __decorate([attr({
576
- mode: 'fromView'
577
- }), __metadata("design:type", Object)], Toggletip.prototype, "anchor", void 0);
578
- __decorate([attr({
579
- mode: 'boolean'
580
- }), __metadata("design:type", Object)], Toggletip.prototype, "open", void 0);
581
-
582
- let _2 = t => t,
150
+ __decorate([
151
+ attr({ mode: "boolean" })
152
+ ], TextArea$1.prototype, "readOnly", void 0);
153
+ __decorate([
154
+ attr
155
+ ], TextArea$1.prototype, "resize", void 0);
156
+ __decorate([
157
+ attr({ mode: "boolean" })
158
+ ], TextArea$1.prototype, "autofocus", void 0);
159
+ __decorate([
160
+ attr({ attribute: "form" })
161
+ ], TextArea$1.prototype, "formId", void 0);
162
+ __decorate([
163
+ attr
164
+ ], TextArea$1.prototype, "list", void 0);
165
+ __decorate([
166
+ attr({ converter: nullableNumberConverter })
167
+ ], TextArea$1.prototype, "maxlength", void 0);
168
+ __decorate([
169
+ attr({ converter: nullableNumberConverter })
170
+ ], TextArea$1.prototype, "minlength", void 0);
171
+ __decorate([
172
+ attr
173
+ ], TextArea$1.prototype, "name", void 0);
174
+ __decorate([
175
+ attr
176
+ ], TextArea$1.prototype, "placeholder", void 0);
177
+ __decorate([
178
+ attr({ converter: nullableNumberConverter, mode: "fromView" })
179
+ ], TextArea$1.prototype, "cols", void 0);
180
+ __decorate([
181
+ attr({ converter: nullableNumberConverter, mode: "fromView" })
182
+ ], TextArea$1.prototype, "rows", void 0);
183
+ __decorate([
184
+ attr({ mode: "boolean" })
185
+ ], TextArea$1.prototype, "spellcheck", void 0);
186
+ __decorate([
187
+ observable
188
+ ], TextArea$1.prototype, "defaultSlottedNodes", void 0);
189
+ applyMixins(TextArea$1, DelegatesARIATextbox);
190
+
191
+ var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 06 Jun 2023 10:38:32 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n display: inline-grid;\n width: inherit;\n grid-template-columns: 1fr max-content;\n row-gap: 4px;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-intermediate);\n}\n.base.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-firm);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)).appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: var(--vvd-color-neutral-200);\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: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.readonly):where(:not(:disabled, .disabled)) {\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):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-600);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base.connotation-success {\n /* @cssprop [--vvd-text-area-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-text-area-success-primary, var(--vvd-color-success-500));\n /* @cssprop [--vvd-text-area-success-backdrop=var(--vvd-color-success-50)] */\n --_connotation-color-backdrop: var(--vvd-text-area-success-backdrop, var(--vvd-color-success-50));\n /* @cssprop [--vvd-text-area-success-intermediate=var(--vvd-color-success-500)] */\n --_connotation-color-intermediate: var(--vvd-text-area-success-intermediate, var(--vvd-color-success-500));\n /* @cssprop [--vvd-text-area-success-firm=var(--vvd-color-success-600)] */\n --_connotation-color-firm: var(--vvd-text-area-success-firm, var(--vvd-color-success-600));\n /* @cssprop [--vvd-text-area-success-faint=var(--vvd-color-success-50)] */\n --_connotation-color-faint: var(--vvd-text-area-success-faint, var(--vvd-color-success-50));\n /* @cssprop [--vvd-text-area-success-soft=var(--vvd-color-success-100)] */\n --_connotation-color-soft: var(--vvd-text-area-success-soft, var(--vvd-color-success-100));\n}\n.base.connotation-alert {\n /* @cssprop [--vvd-text-area-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-text-area-alert-primary, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-text-area-alert-backdrop=var(--vvd-color-alert-50)] */\n --_connotation-color-backdrop: var(--vvd-text-area-alert-backdrop, var(--vvd-color-alert-50));\n /* @cssprop [--vvd-text-area-alert-intermediate=var(--vvd-color-alert-500)] */\n --_connotation-color-intermediate: var(--vvd-text-area-alert-intermediate, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-text-area-alert-firm=var(--vvd-color-alert-600)] */\n --_connotation-color-firm: var(--vvd-text-area-alert-firm, var(--vvd-color-alert-600));\n /* @cssprop [--vvd-text-area-alert-faint=var(--vvd-color-alert-50)] */\n --_connotation-color-faint: var(--vvd-text-area-alert-faint, var(--vvd-color-alert-50));\n /* @cssprop [--vvd-text-area-alert-soft=var(--vvd-color-alert-100)] */\n --_connotation-color-soft: var(--vvd-text-area-alert-soft, var(--vvd-color-alert-100));\n}\n.base:not(.connotation-success, .connotation-alert) {\n /* @cssprop [--vvd-text-area-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-text-area-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-text-area-accent-backdrop=var(--vvd-color-canvas)] */\n --_connotation-color-backdrop: var(--vvd-text-area-accent-backdrop, var(--vvd-color-canvas));\n /* @cssprop [--vvd-text-area-accent-intermediate=var(--vvd-color-neutral-500)] */\n --_connotation-color-intermediate: var(--vvd-text-area-accent-intermediate, var(--vvd-color-neutral-500));\n /* @cssprop [--vvd-text-area-accent-firm=var(--vvd-color-canvas-text)] */\n --_connotation-color-firm: var(--vvd-text-area-accent-firm, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-text-area-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-text-area-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-text-area-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-text-area-accent-soft, var(--vvd-color-neutral-100));\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(--_appearance-color-text);\n pointer-events: none;\n}\n\n.label {\n color: var(--vvd-color-canvas-text);\n contain: inline-size;\n font: var(--vvd-typography-base);\n grid-column: 1/2;\n grid-row: 1;\n line-height: 20px;\n}\n\n.char-count {\n color: var(--_low-ink-color);\n font: var(--vvd-typography-base);\n grid-column: 2/-1;\n}\n\n.control {\n padding: 8px 16px;\n border: 0 none;\n appearance: none; /* for box-shadow visibility on IOS */\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-typography-base);\n grid-column: 1/-1;\n min-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n resize: none;\n transition: box-shadow 0.2s, background-color 0.2s, color 0.2s;\n}\n.control:disabled {\n cursor: not-allowed;\n opacity: 1; /* 2. correct opacity on iOS */\n pointer-events: none;\n -webkit-text-fill-color: var(--_appearance-color-text); /* 1. sets text fill to current `color` for safari */\n}\n.control::placeholder, .control:disabled::placeholder {\n opacity: 1; /* 2. correct opacity on iOS */\n pointer-events: none;\n -webkit-text-fill-color: var(--_low-ink-color); /* 1. sets text fill to current `color` for safari */\n}\n.control:focus {\n outline: 2px solid var(--focus-stroke-color, currentColor);\n outline-offset: -2px;\n}\n:host([resize=both]) .control {\n resize: both;\n}\n:host([resize=horizontal]) .control {\n resize: horizontal;\n}\n:host([resize=vertical]) .control {\n resize: vertical;\n}";
192
+
193
+ let TextArea = class TextArea extends TextArea$1 {};
194
+ __decorate([attr, __metadata("design:type", String)], TextArea.prototype, "wrap", void 0);
195
+ TextArea = __decorate([errorText, formElements], TextArea);
196
+ applyMixins(TextArea, FormElementCharCount, FormElementHelperText, FormElementSuccessText);
197
+
198
+ let _ = t => t,
583
199
  _t,
584
- _t2;
585
- const getClasses = _ => classNames('control');
586
- const ToggletipTemplate = context => {
587
- const popup = context.tagFor(Popup);
588
- return html(_t || (_t = _2`
589
- <${0}
590
- class="${0}"
591
- arrow
592
- :anchor="${0}"
593
- :open="${0}"
594
- ?alternate="${0}"
595
- placement="${0}"
596
- exportparts="vvd-theme-alternate"
597
- >
598
- <div class="content-wrapper">
200
+ _t2,
201
+ _t3;
202
+ const getClasses = ({
203
+ value,
204
+ errorValidationMessage,
205
+ disabled,
206
+ placeholder,
207
+ readOnly,
208
+ successText
209
+ }) => classNames('base', ['readonly', readOnly], ['placeholder', Boolean(placeholder)], ['disabled', disabled], ['error connotation-alert', Boolean(errorValidationMessage)], ['has-value', Boolean(value)], ['success connotation-success', !!successText]);
210
+ function renderLabel() {
211
+ return html(_t || (_t = _`
212
+ <label for="control" class="label">
213
+ ${0}
214
+ </label>`), x => x.label);
215
+ }
216
+ function renderCharCount() {
217
+ return html(_t2 || (_t2 = _`
218
+ <span class="char-count">${0} / ${0}</span>
219
+ `), x => x.value ? x.value.length : 0, x => x.maxlength);
220
+ }
221
+ const TextAreaTemplate = context => {
222
+ return html(_t3 || (_t3 = _`
223
+ <div class="${0}">
224
+ ${0}
225
+ ${0}
226
+ <textarea class="control"
227
+ ?autofocus="${0}"
228
+ placeholder="${0}"
229
+ name="${0}"
230
+ maxlength="${0}"
231
+ rows="${0}"
232
+ cols="${0}"
233
+ wrap="${0}"
234
+ ?readonly="${0}"
235
+ ?disabled="${0}"
236
+ ?required="${0}"
237
+ ?spellcheck="${0}"
238
+ :value="${0}"
239
+ aria-atomic="${0}"
240
+ aria-busy="${0}"
241
+ aria-controls="${0}"
242
+ aria-current="${0}"
243
+ aria-describedby="${0}"
244
+ aria-details="${0}"
245
+ aria-disabled="${0}"
246
+ aria-errormessage="${0}"
247
+ aria-flowto="${0}"
248
+ aria-haspopup="${0}"
249
+ aria-hidden="${0}"
250
+ aria-invalid="${0}"
251
+ aria-keyshortcuts="${0}"
252
+ aria-label="${0}"
253
+ aria-labelledby="${0}"
254
+ aria-live="${0}"
255
+ aria-owns="${0}"
256
+ aria-relevant="${0}"
257
+ aria-roledescription="${0}"
258
+ @input="${0}"
259
+ @change="${0}"
599
260
  ${0}
600
- <slot></slot>
601
- <footer class="action-items"><slot name="action-items"></slot></footer>
602
- </div>
603
- </${0}>
604
- `), popup, getClasses, x => x.anchor, x => x.open, x => !x.alternate, x => x.placement, when(x => x.headline, html(_t2 || (_t2 = _2`<header class="headline">${0}</header>`), x => x.headline)), popup);
261
+ >
262
+ </textarea>
263
+ ${0}
264
+ ${0}
265
+ ${0}
266
+ </div>
267
+ `), getClasses, when(x => x.charCount && x.maxlength, renderCharCount()), 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.disabled, 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'), when(x => {
268
+ var _a;
269
+ return !x.successText && !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
270
+ }, getFeedbackTemplate('helper', context)), when(x => !x.successText && x.errorValidationMessage, getFeedbackTemplate('error', context)), when(x => x.successText, getFeedbackTemplate('success', context)));
605
271
  };
606
272
 
607
- const toggletipDefinition = Toggletip.compose({
608
- baseName: 'toggletip',
609
- template: ToggletipTemplate,
610
- styles: css_248z
273
+ const textAreaDefinition = TextArea.compose({
274
+ baseName: 'text-area',
275
+ template: TextAreaTemplate,
276
+ styles: css_248z,
277
+ shadowOptions: {
278
+ delegatesFocus: true
279
+ }
611
280
  });
612
- const toggletipRegistries = [toggletipDefinition(), ...popupRegistries];
613
- const registerToggletip = registerFactory(toggletipRegistries);
281
+ const textAreaRegistries = [textAreaDefinition(), ...iconRegistries, ...focusRegistries];
282
+ const registerTextArea = registerFactory(textAreaRegistries);
614
283
 
615
- export { toggletipRegistries as a, registerToggletip as r, toggletipDefinition as t };
284
+ export { textAreaRegistries as a, registerTextArea as r, textAreaDefinition as t };