@vonage/vivid 4.1.0 → 4.3.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 (138) hide show
  1. package/appearance-ui/index.cjs +1 -2
  2. package/appearance-ui/index.js +1 -2
  3. package/custom-elements.json +62 -0
  4. package/lib/button/button.d.ts +1 -0
  5. package/lib/switch/switch.d.ts +1 -1
  6. package/package.json +1 -1
  7. package/shared/affix.cjs +1 -2
  8. package/shared/affix.js +1 -2
  9. package/shared/anchored.cjs +1 -2
  10. package/shared/anchored.js +1 -2
  11. package/shared/calendar-event.cjs +1 -2
  12. package/shared/calendar-event.js +1 -2
  13. package/shared/definition.cjs +1 -2
  14. package/shared/definition.js +1 -2
  15. package/shared/definition11.cjs +29 -13
  16. package/shared/definition11.js +29 -14
  17. package/shared/definition12.cjs +1 -1
  18. package/shared/definition12.js +1 -1
  19. package/shared/definition13.cjs +1 -2
  20. package/shared/definition13.js +1 -2
  21. package/shared/definition14.cjs +1 -2
  22. package/shared/definition14.js +1 -2
  23. package/shared/definition15.cjs +1 -2
  24. package/shared/definition15.js +1 -2
  25. package/shared/definition16.cjs +1 -2
  26. package/shared/definition16.js +1 -2
  27. package/shared/definition17.cjs +5 -9
  28. package/shared/definition17.js +5 -9
  29. package/shared/definition18.cjs +14 -22
  30. package/shared/definition18.js +14 -22
  31. package/shared/definition19.cjs +29 -50
  32. package/shared/definition19.js +29 -50
  33. package/shared/definition20.cjs +1 -2
  34. package/shared/definition20.js +1 -2
  35. package/shared/definition21.cjs +1 -2
  36. package/shared/definition21.js +1 -2
  37. package/shared/definition23.cjs +1 -2
  38. package/shared/definition23.js +1 -2
  39. package/shared/definition24.cjs +2 -3
  40. package/shared/definition24.js +2 -3
  41. package/shared/definition25.cjs +22 -47
  42. package/shared/definition25.js +22 -47
  43. package/shared/definition26.cjs +1 -2
  44. package/shared/definition26.js +1 -2
  45. package/shared/definition28.cjs +1 -2
  46. package/shared/definition28.js +1 -2
  47. package/shared/definition29.cjs +69 -39
  48. package/shared/definition29.js +69 -39
  49. package/shared/definition3.cjs +1 -2
  50. package/shared/definition3.js +1 -2
  51. package/shared/definition31.cjs +1 -2
  52. package/shared/definition31.js +1 -2
  53. package/shared/definition34.cjs +1 -2
  54. package/shared/definition34.js +1 -2
  55. package/shared/definition35.cjs +14 -26
  56. package/shared/definition35.js +14 -26
  57. package/shared/definition36.cjs +1 -2
  58. package/shared/definition36.js +1 -2
  59. package/shared/definition37.cjs +8 -16
  60. package/shared/definition37.js +8 -16
  61. package/shared/definition38.cjs +1 -2
  62. package/shared/definition38.js +1 -2
  63. package/shared/definition39.cjs +1 -2
  64. package/shared/definition39.js +1 -2
  65. package/shared/definition4.cjs +7 -13
  66. package/shared/definition4.js +7 -13
  67. package/shared/definition40.cjs +1 -2
  68. package/shared/definition40.js +1 -2
  69. package/shared/definition42.cjs +52 -91
  70. package/shared/definition42.js +52 -91
  71. package/shared/definition43.cjs +7 -6
  72. package/shared/definition43.js +5 -4
  73. package/shared/definition44.cjs +4 -8
  74. package/shared/definition44.js +4 -8
  75. package/shared/definition45.cjs +1 -2
  76. package/shared/definition45.js +1 -2
  77. package/shared/definition46.cjs +1 -2
  78. package/shared/definition46.js +1 -2
  79. package/shared/definition47.cjs +1 -2
  80. package/shared/definition47.js +1 -2
  81. package/shared/definition48.cjs +2 -3
  82. package/shared/definition48.js +2 -3
  83. package/shared/definition5.cjs +1 -2
  84. package/shared/definition5.js +1 -2
  85. package/shared/definition50.cjs +1 -2
  86. package/shared/definition50.js +1 -2
  87. package/shared/definition51.cjs +5 -10
  88. package/shared/definition51.js +5 -10
  89. package/shared/definition52.cjs +1 -2
  90. package/shared/definition52.js +1 -2
  91. package/shared/definition53.cjs +1 -2
  92. package/shared/definition53.js +1 -2
  93. package/shared/definition54.cjs +9 -21
  94. package/shared/definition54.js +9 -21
  95. package/shared/definition55.cjs +24 -43
  96. package/shared/definition55.js +24 -43
  97. package/shared/definition56.cjs +23 -38
  98. package/shared/definition56.js +23 -38
  99. package/shared/definition57.cjs +22 -45
  100. package/shared/definition57.js +22 -45
  101. package/shared/definition58.cjs +18 -37
  102. package/shared/definition58.js +18 -37
  103. package/shared/definition59.cjs +1 -2
  104. package/shared/definition59.js +1 -2
  105. package/shared/definition6.cjs +1 -2
  106. package/shared/definition6.js +1 -2
  107. package/shared/definition62.cjs +1 -2
  108. package/shared/definition62.js +1 -2
  109. package/shared/definition63.cjs +1 -2
  110. package/shared/definition63.js +1 -2
  111. package/shared/definition7.cjs +1 -2
  112. package/shared/definition7.js +1 -2
  113. package/shared/definition8.cjs +1 -2
  114. package/shared/definition8.js +1 -2
  115. package/shared/definition9.cjs +1 -2
  116. package/shared/definition9.js +1 -2
  117. package/shared/icon.cjs +2 -3
  118. package/shared/icon.js +2 -3
  119. package/shared/index2.cjs +3 -6
  120. package/shared/index2.js +3 -6
  121. package/shared/listbox.cjs +1 -2
  122. package/shared/listbox.js +1 -2
  123. package/shared/patterns/chevron.d.ts +2 -0
  124. package/shared/presentationDate.cjs +1 -2
  125. package/shared/presentationDate.js +1 -2
  126. package/shared/radio.cjs +1 -2
  127. package/shared/radio.js +1 -2
  128. package/shared/text-anchor.cjs +1 -2
  129. package/shared/text-anchor.js +1 -2
  130. package/shared/video-player.cjs +4 -8
  131. package/shared/video-player.js +4 -8
  132. package/styles/core/all.css +1 -1
  133. package/styles/core/theme.css +1 -1
  134. package/styles/core/typography.css +1 -1
  135. package/styles/tokens/theme-dark.css +4 -4
  136. package/styles/tokens/theme-light.css +4 -4
  137. package/styles/tokens/vivid-2-compat.css +1 -1
  138. package/vivid.api.json +3021 -1112
@@ -14,8 +14,7 @@ var __decorateClass = (decorators, target, key, kind) => {
14
14
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
15
15
  if (decorator = decorators[i])
16
16
  result = (decorator(target, key, result) ) || result;
17
- if (result)
18
- __defProp(target, key, result);
17
+ if (result) __defProp(target, key, result);
19
18
  return result;
20
19
  };
21
20
  class Note extends FoundationElement {
@@ -28,29 +28,21 @@ class FormAssociatedNumberField extends formAssociated.FormAssociated(_NumberFie
28
28
 
29
29
  var __defProp = Object.defineProperty;
30
30
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
31
+ var __typeError = (msg) => {
32
+ throw TypeError(msg);
33
+ };
31
34
  var __decorateClass = (decorators, target, key, kind) => {
32
35
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
33
36
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
34
37
  if (decorator = decorators[i])
35
38
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
36
- if (kind && result)
37
- __defProp(target, key, result);
39
+ if (kind && result) __defProp(target, key, result);
38
40
  return result;
39
41
  };
40
- var __accessCheck = (obj, member, msg) => {
41
- if (!member.has(obj))
42
- throw TypeError("Cannot " + msg);
43
- };
44
- var __privateAdd = (obj, member, value) => {
45
- if (member.has(obj))
46
- throw TypeError("Cannot add the same private member more than once");
47
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
48
- };
49
- var __privateMethod = (obj, member, method) => {
50
- __accessCheck(obj, member, "access private method");
51
- return method;
52
- };
53
- var _valueToPresentationValue, valueToPresentationValue_fn, _inputToPresentationValue, inputToPresentationValue_fn, _presentationValueToValue, presentationValueToValue_fn;
42
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
43
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
44
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
45
+ var _NumberField_instances, valueToPresentationValue_fn, inputToPresentationValue_fn, presentationValueToValue_fn;
54
46
  const STEP_DIRECTION = {
55
47
  up: 1,
56
48
  down: -1
@@ -75,9 +67,7 @@ const validNumber = /^-?((\d*\.\d+)|(\d+))$/;
75
67
  let NumberField = class extends FormAssociatedNumberField {
76
68
  constructor() {
77
69
  super(...arguments);
78
- __privateAdd(this, _valueToPresentationValue);
79
- __privateAdd(this, _inputToPresentationValue);
80
- __privateAdd(this, _presentationValueToValue);
70
+ __privateAdd(this, _NumberField_instances);
81
71
  this.readOnly = false;
82
72
  this.autofocus = false;
83
73
  // eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
@@ -139,7 +129,7 @@ let NumberField = class extends FormAssociatedNumberField {
139
129
  return;
140
130
  }
141
131
  if (this.control && !this.isUserInput) {
142
- this._presentationValue = __privateMethod(this, _valueToPresentationValue, valueToPresentationValue_fn).call(this, this.value);
132
+ this._presentationValue = __privateMethod(this, _NumberField_instances, valueToPresentationValue_fn).call(this, this.value);
143
133
  }
144
134
  super.valueChanged(previous, this.value);
145
135
  if (previous !== void 0 && !this.isUserInput) {
@@ -181,7 +171,7 @@ let NumberField = class extends FormAssociatedNumberField {
181
171
  super.connectedCallback();
182
172
  this.proxy.setAttribute("type", "number");
183
173
  this.validate();
184
- this._presentationValue = __privateMethod(this, _valueToPresentationValue, valueToPresentationValue_fn).call(this, this.value);
174
+ this._presentationValue = __privateMethod(this, _NumberField_instances, valueToPresentationValue_fn).call(this, this.value);
185
175
  if (this.autofocus) {
186
176
  index.DOM.queueUpdate(() => {
187
177
  this.focus();
@@ -202,12 +192,12 @@ let NumberField = class extends FormAssociatedNumberField {
202
192
  * @internal
203
193
  */
204
194
  handleTextInput() {
205
- this._presentationValue = __privateMethod(this, _inputToPresentationValue, inputToPresentationValue_fn).call(this, this.control.value);
195
+ this._presentationValue = __privateMethod(this, _NumberField_instances, inputToPresentationValue_fn).call(this, this.control.value);
206
196
  if (this.control.value !== this._presentationValue) {
207
197
  this.control.value = this._presentationValue;
208
198
  }
209
199
  this.isUserInput = true;
210
- this.value = __privateMethod(this, _presentationValueToValue, presentationValueToValue_fn).call(this, this._presentationValue);
200
+ this.value = __privateMethod(this, _NumberField_instances, presentationValueToValue_fn).call(this, this._presentationValue);
211
201
  this.isUserInput = false;
212
202
  }
213
203
  /**
@@ -239,18 +229,16 @@ let NumberField = class extends FormAssociatedNumberField {
239
229
  return true;
240
230
  }
241
231
  };
242
- _valueToPresentationValue = new WeakSet();
232
+ _NumberField_instances = new WeakSet();
243
233
  valueToPresentationValue_fn = function(value) {
244
234
  return value.replace(
245
235
  ".",
246
236
  this.locale.common.useCommaAsDecimalSeparator ? "," : "."
247
237
  );
248
238
  };
249
- _inputToPresentationValue = new WeakSet();
250
239
  inputToPresentationValue_fn = function(input) {
251
240
  return input.replace(this._numberPatterns.invalidCharacters, "").replace(this._numberPatterns.additionalDecimalSeparators, "");
252
241
  };
253
- _presentationValueToValue = new WeakSet();
254
242
  presentationValueToValue_fn = function(presentationValue) {
255
243
  const candidate = presentationValue.replace(this._numberPatterns.trailingDecimalSeparator, "").replace(this._numberPatterns.decimalSeparator, ".");
256
244
  return validNumber.test(candidate) ? candidate : "";
@@ -26,29 +26,21 @@ class FormAssociatedNumberField extends FormAssociated(_NumberField) {
26
26
 
27
27
  var __defProp = Object.defineProperty;
28
28
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
29
+ var __typeError = (msg) => {
30
+ throw TypeError(msg);
31
+ };
29
32
  var __decorateClass = (decorators, target, key, kind) => {
30
33
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
31
34
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
32
35
  if (decorator = decorators[i])
33
36
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
34
- if (kind && result)
35
- __defProp(target, key, result);
37
+ if (kind && result) __defProp(target, key, result);
36
38
  return result;
37
39
  };
38
- var __accessCheck = (obj, member, msg) => {
39
- if (!member.has(obj))
40
- throw TypeError("Cannot " + msg);
41
- };
42
- var __privateAdd = (obj, member, value) => {
43
- if (member.has(obj))
44
- throw TypeError("Cannot add the same private member more than once");
45
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
46
- };
47
- var __privateMethod = (obj, member, method) => {
48
- __accessCheck(obj, member, "access private method");
49
- return method;
50
- };
51
- var _valueToPresentationValue, valueToPresentationValue_fn, _inputToPresentationValue, inputToPresentationValue_fn, _presentationValueToValue, presentationValueToValue_fn;
40
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
41
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
42
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
43
+ var _NumberField_instances, valueToPresentationValue_fn, inputToPresentationValue_fn, presentationValueToValue_fn;
52
44
  const STEP_DIRECTION = {
53
45
  up: 1,
54
46
  down: -1
@@ -73,9 +65,7 @@ const validNumber = /^-?((\d*\.\d+)|(\d+))$/;
73
65
  let NumberField = class extends FormAssociatedNumberField {
74
66
  constructor() {
75
67
  super(...arguments);
76
- __privateAdd(this, _valueToPresentationValue);
77
- __privateAdd(this, _inputToPresentationValue);
78
- __privateAdd(this, _presentationValueToValue);
68
+ __privateAdd(this, _NumberField_instances);
79
69
  this.readOnly = false;
80
70
  this.autofocus = false;
81
71
  // eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
@@ -137,7 +127,7 @@ let NumberField = class extends FormAssociatedNumberField {
137
127
  return;
138
128
  }
139
129
  if (this.control && !this.isUserInput) {
140
- this._presentationValue = __privateMethod(this, _valueToPresentationValue, valueToPresentationValue_fn).call(this, this.value);
130
+ this._presentationValue = __privateMethod(this, _NumberField_instances, valueToPresentationValue_fn).call(this, this.value);
141
131
  }
142
132
  super.valueChanged(previous, this.value);
143
133
  if (previous !== void 0 && !this.isUserInput) {
@@ -179,7 +169,7 @@ let NumberField = class extends FormAssociatedNumberField {
179
169
  super.connectedCallback();
180
170
  this.proxy.setAttribute("type", "number");
181
171
  this.validate();
182
- this._presentationValue = __privateMethod(this, _valueToPresentationValue, valueToPresentationValue_fn).call(this, this.value);
172
+ this._presentationValue = __privateMethod(this, _NumberField_instances, valueToPresentationValue_fn).call(this, this.value);
183
173
  if (this.autofocus) {
184
174
  DOM.queueUpdate(() => {
185
175
  this.focus();
@@ -200,12 +190,12 @@ let NumberField = class extends FormAssociatedNumberField {
200
190
  * @internal
201
191
  */
202
192
  handleTextInput() {
203
- this._presentationValue = __privateMethod(this, _inputToPresentationValue, inputToPresentationValue_fn).call(this, this.control.value);
193
+ this._presentationValue = __privateMethod(this, _NumberField_instances, inputToPresentationValue_fn).call(this, this.control.value);
204
194
  if (this.control.value !== this._presentationValue) {
205
195
  this.control.value = this._presentationValue;
206
196
  }
207
197
  this.isUserInput = true;
208
- this.value = __privateMethod(this, _presentationValueToValue, presentationValueToValue_fn).call(this, this._presentationValue);
198
+ this.value = __privateMethod(this, _NumberField_instances, presentationValueToValue_fn).call(this, this._presentationValue);
209
199
  this.isUserInput = false;
210
200
  }
211
201
  /**
@@ -237,18 +227,16 @@ let NumberField = class extends FormAssociatedNumberField {
237
227
  return true;
238
228
  }
239
229
  };
240
- _valueToPresentationValue = new WeakSet();
230
+ _NumberField_instances = new WeakSet();
241
231
  valueToPresentationValue_fn = function(value) {
242
232
  return value.replace(
243
233
  ".",
244
234
  this.locale.common.useCommaAsDecimalSeparator ? "," : "."
245
235
  );
246
236
  };
247
- _inputToPresentationValue = new WeakSet();
248
237
  inputToPresentationValue_fn = function(input) {
249
238
  return input.replace(this._numberPatterns.invalidCharacters, "").replace(this._numberPatterns.additionalDecimalSeparators, "");
250
239
  };
251
- _presentationValueToValue = new WeakSet();
252
240
  presentationValueToValue_fn = function(presentationValue) {
253
241
  const candidate = presentationValue.replace(this._numberPatterns.trailingDecimalSeparator, "").replace(this._numberPatterns.decimalSeparator, ".");
254
242
  return validNumber.test(candidate) ? candidate : "";
@@ -210,8 +210,7 @@ var __decorateClass = (decorators, target, key, kind) => {
210
210
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
211
211
  if (decorator = decorators[i])
212
212
  result = (decorator(target, key, result) ) || result;
213
- if (result)
214
- __defProp(target, key, result);
213
+ if (result) __defProp(target, key, result);
215
214
  return result;
216
215
  };
217
216
  class ListboxOption extends ListboxOption$1 {
@@ -208,8 +208,7 @@ var __decorateClass = (decorators, target, key, kind) => {
208
208
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
209
209
  if (decorator = decorators[i])
210
210
  result = (decorator(target, key, result) ) || result;
211
- if (result)
212
- __defProp(target, key, result);
211
+ if (result) __defProp(target, key, result);
213
212
  return result;
214
213
  };
215
214
  class ListboxOption extends ListboxOption$1 {
@@ -19,8 +19,7 @@ var __decorateClass = (decorators, target, key, kind) => {
19
19
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
20
20
  if (decorator = decorators[i])
21
21
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
22
- if (kind && result)
23
- __defProp(target, key, result);
22
+ if (kind && result) __defProp(target, key, result);
24
23
  return result;
25
24
  };
26
25
  const MAX_DIGITS_AND_PLACEHOLDERS = 7;
@@ -54,26 +53,20 @@ class Pagination extends index.FoundationElement {
54
53
  return new Array(
55
54
  this.total < MAX_DIGITS_AND_PLACEHOLDERS ? this.total : MAX_DIGITS_AND_PLACEHOLDERS
56
55
  ).fill(0).map((_, i, arr) => {
57
- if (i === 0)
58
- return 1;
59
- if (i === arr.length - 1)
60
- return this.total;
56
+ if (i === 0) return 1;
57
+ if (i === arr.length - 1) return this.total;
61
58
  if (this.selectedIndex !== void 0 && this.total > MAX_DIGITS_AND_PLACEHOLDERS) {
62
59
  if (this.selectedIndex < 4) {
63
- if (i === MAX_DIGITS_AND_PLACEHOLDERS - 2)
64
- return "...";
60
+ if (i === MAX_DIGITS_AND_PLACEHOLDERS - 2) return "...";
65
61
  }
66
62
  if (this.selectedIndex >= 4 && this.selectedIndex <= this.total - 5) {
67
63
  if (i > 1 && i < MAX_DIGITS_AND_PLACEHOLDERS - 2)
68
64
  return this.selectedIndex + (i - 2);
69
- if (i === 1 || i === MAX_DIGITS_AND_PLACEHOLDERS - 2)
70
- return "...";
65
+ if (i === 1 || i === MAX_DIGITS_AND_PLACEHOLDERS - 2) return "...";
71
66
  }
72
67
  if (this.selectedIndex > this.total - 5) {
73
- if (i > 1)
74
- return this.total - (6 - i);
75
- if (i === 1)
76
- return "...";
68
+ if (i > 1) return this.total - (6 - i);
69
+ if (i === 1) return "...";
77
70
  }
78
71
  }
79
72
  return i + 1;
@@ -86,8 +79,7 @@ class Pagination extends index.FoundationElement {
86
79
  this.selectedIndex = 0;
87
80
  }
88
81
  selectedIndexChanged(oldValue, newValue) {
89
- if (oldValue === void 0)
90
- return;
82
+ if (oldValue === void 0) return;
91
83
  this.$emit("pagination-change", {
92
84
  selectedIndex: newValue,
93
85
  total: this.total,
@@ -17,8 +17,7 @@ var __decorateClass = (decorators, target, key, kind) => {
17
17
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
18
18
  if (decorator = decorators[i])
19
19
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
20
- if (kind && result)
21
- __defProp(target, key, result);
20
+ if (kind && result) __defProp(target, key, result);
22
21
  return result;
23
22
  };
24
23
  const MAX_DIGITS_AND_PLACEHOLDERS = 7;
@@ -52,26 +51,20 @@ class Pagination extends FoundationElement {
52
51
  return new Array(
53
52
  this.total < MAX_DIGITS_AND_PLACEHOLDERS ? this.total : MAX_DIGITS_AND_PLACEHOLDERS
54
53
  ).fill(0).map((_, i, arr) => {
55
- if (i === 0)
56
- return 1;
57
- if (i === arr.length - 1)
58
- return this.total;
54
+ if (i === 0) return 1;
55
+ if (i === arr.length - 1) return this.total;
59
56
  if (this.selectedIndex !== void 0 && this.total > MAX_DIGITS_AND_PLACEHOLDERS) {
60
57
  if (this.selectedIndex < 4) {
61
- if (i === MAX_DIGITS_AND_PLACEHOLDERS - 2)
62
- return "...";
58
+ if (i === MAX_DIGITS_AND_PLACEHOLDERS - 2) return "...";
63
59
  }
64
60
  if (this.selectedIndex >= 4 && this.selectedIndex <= this.total - 5) {
65
61
  if (i > 1 && i < MAX_DIGITS_AND_PLACEHOLDERS - 2)
66
62
  return this.selectedIndex + (i - 2);
67
- if (i === 1 || i === MAX_DIGITS_AND_PLACEHOLDERS - 2)
68
- return "...";
63
+ if (i === 1 || i === MAX_DIGITS_AND_PLACEHOLDERS - 2) return "...";
69
64
  }
70
65
  if (this.selectedIndex > this.total - 5) {
71
- if (i > 1)
72
- return this.total - (6 - i);
73
- if (i === 1)
74
- return "...";
66
+ if (i > 1) return this.total - (6 - i);
67
+ if (i === 1) return "...";
75
68
  }
76
69
  }
77
70
  return i + 1;
@@ -84,8 +77,7 @@ class Pagination extends FoundationElement {
84
77
  this.selectedIndex = 0;
85
78
  }
86
79
  selectedIndexChanged(oldValue, newValue) {
87
- if (oldValue === void 0)
88
- return;
80
+ if (oldValue === void 0) return;
89
81
  this.$emit("pagination-change", {
90
82
  selectedIndex: newValue,
91
83
  total: this.total,
@@ -13,8 +13,7 @@ var __decorateClass = (decorators, target, key, kind) => {
13
13
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
14
14
  if (decorator = decorators[i])
15
15
  result = (decorator(target, key, result) ) || result;
16
- if (result)
17
- __defProp(target, key, result);
16
+ if (result) __defProp(target, key, result);
18
17
  return result;
19
18
  };
20
19
  class ProgressRing extends baseProgress.BaseProgress {
@@ -11,8 +11,7 @@ var __decorateClass = (decorators, target, key, kind) => {
11
11
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
12
12
  if (decorator = decorators[i])
13
13
  result = (decorator(target, key, result) ) || result;
14
- if (result)
15
- __defProp(target, key, result);
14
+ if (result) __defProp(target, key, result);
16
15
  return result;
17
16
  };
18
17
  class ProgressRing extends BaseProgress {
@@ -13,8 +13,7 @@ var __decorateClass = (decorators, target, key, kind) => {
13
13
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
14
14
  if (decorator = decorators[i])
15
15
  result = (decorator(target, key, result) ) || result;
16
- if (result)
17
- __defProp(target, key, result);
16
+ if (result) __defProp(target, key, result);
18
17
  return result;
19
18
  };
20
19
  class Progress extends baseProgress.BaseProgress {
@@ -11,8 +11,7 @@ var __decorateClass = (decorators, target, key, kind) => {
11
11
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
12
12
  if (decorator = decorators[i])
13
13
  result = (decorator(target, key, result) ) || result;
14
- if (result)
15
- __defProp(target, key, result);
14
+ if (result) __defProp(target, key, result);
16
15
  return result;
17
16
  };
18
17
  class Progress extends BaseProgress {
@@ -13,7 +13,7 @@ const button = require('./button.cjs');
13
13
  const when = require('./when.cjs');
14
14
  const classNames = require('./class-names.cjs');
15
15
 
16
- const styles = ".control{position:fixed;z-index:10;border-radius:8px;inline-size:max-content;inset-block-end:0;inset-inline:0 0;margin-block:16px;margin-inline:auto;max-inline-size:var(--alert-max-inline-size, fit-content);min-inline-size:var(--alert-min-inline-size, 420px);transition:opacity .15s cubic-bezier(0,0,.2,1) 0ms,transform .15s cubic-bezier(0,0,.2,1) 0ms}.control.placement-top,.control.placement-top-start,.control.placement-top-end{inset-block:0 auto}.control.placement-top-start,.control.placement-bottom-start{right:auto;inset-inline-end:auto;margin-inline:16px}.control.placement-top-end,.control.placement-bottom-end{inset-inline-start:auto;margin-inline:16px}.control:where(.strategy-static){position:static;margin:0;inline-size:auto}.control:not(.open){opacity:0;transform:scale(.8)}.control.open{opacity:1;transform:scale(1)}@media (width <= 768px){.control{min-inline-size:var(--alert-min-inline-size, auto)}}.base{display:flex;align-items:center;padding:16px;border-radius:8px;background-color:var(--vvd-color-neutral-50);color:var(--vvd-color-canvas-text);column-gap:16px}.base.connotation-success{--_connotation-color-primary: var(--vvd-alert-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-alert-success-primary-text, var(--vvd-color-canvas))}.base.connotation-information{--_connotation-color-primary: var(--vvd-alert-information-primary, var(--vvd-color-information-500));--_connotation-color-primary-text: var(--vvd-alert-information-primary-text, var(--vvd-color-canvas))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-alert-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-alert-alert-primary-text, var(--vvd-color-canvas))}.base.connotation-warning{--_connotation-color-primary: var(--vvd-alert-warning-primary, var(--vvd-color-warning-300));--_connotation-color-primary-text: var(--vvd-alert-warning-primary-text, var(--vvd-color-canvas-text))}.base.connotation-announcement{--_connotation-color-primary: var(--vvd-alert-announcement-primary, var(--vvd-color-announcement-500));--_connotation-color-primary-text: var(--vvd-alert-announcement-primary-text, var(--vvd-color-canvas))}.base:not(.connotation-success,.connotation-information,.connotation-alert,.connotation-warning,.connotation-announcement){--_connotation-color-primary: var(--vvd-alert-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-alert-accent-primary-text, var(--vvd-color-canvas))}.base{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.base .alert-text{margin-inline-end:auto}.base .alert-text .headline{font:var(--vvd-typography-base-bold);margin-block-end:4px}.base .alert-text .main-text{font:var(--vvd-typography-base)}.base slot[name=icon]{flex-shrink:0;color:var(--_appearance-color-fill);font-size:24px;line-height:1}.base .dismiss-button{border-left:1px solid var(--vvd-color-neutral-200);padding-inline-start:8px}";
16
+ const styles = ".control{position:fixed;z-index:10;border-radius:8px;inline-size:max-content;inset-block-end:0;inset-inline:0 0;margin-block:16px;margin-inline:auto;max-inline-size:var(--alert-max-inline-size, fit-content);min-inline-size:var(--alert-min-inline-size, 420px);transition:opacity .15s cubic-bezier(0,0,.2,1) 0ms,transform .15s cubic-bezier(0,0,.2,1) 0ms}.control.placement-top,.control.placement-top-start,.control.placement-top-end{inset-block:0 auto}.control.placement-top-start,.control.placement-bottom-start{right:auto;inset-inline-end:auto;margin-inline:16px}.control.placement-top-end,.control.placement-bottom-end{inset-inline-start:auto;margin-inline:16px}.control:where(.strategy-static){position:static;margin:0;inline-size:auto}.control:not(.open){opacity:0;transform:scale(.8)}.control.open{opacity:1;transform:scale(1)}@media (width <= 768px){.control{min-inline-size:var(--alert-min-inline-size, auto)}}.base{display:flex;align-items:center;padding:16px;border-radius:8px;background-color:var(--vvd-color-neutral-50);color:var(--vvd-color-canvas-text);column-gap:16px}.base.connotation-success{--_connotation-color-primary: var(--vvd-alert-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-alert-success-primary-text, var(--vvd-color-canvas))}.base.connotation-information{--_connotation-color-primary: var(--vvd-alert-information-primary, var(--vvd-color-information-500));--_connotation-color-primary-text: var(--vvd-alert-information-primary-text, var(--vvd-color-canvas))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-alert-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-alert-alert-primary-text, var(--vvd-color-canvas))}.base.connotation-warning{--_connotation-color-primary: var(--vvd-alert-warning-primary, var(--vvd-color-warning-300));--_connotation-color-primary-text: var(--vvd-alert-warning-primary-text, var(--vvd-color-canvas-text))}.base.connotation-announcement{--_connotation-color-primary: var(--vvd-alert-announcement-primary, var(--vvd-color-announcement-500));--_connotation-color-primary-text: var(--vvd-alert-announcement-primary-text, var(--vvd-color-canvas))}.base:not(.connotation-success,.connotation-information,.connotation-alert,.connotation-warning,.connotation-announcement){--_connotation-color-primary: var(--vvd-alert-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-alert-accent-primary-text, var(--vvd-color-canvas))}.base{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.base .alert-text{margin-inline-end:auto}.base .alert-text .headline{font:var(--vvd-typography-base-bold);margin-block-end:4px}.base .alert-text .main-text{font:var(--vvd-typography-base)}.base .alert-text .headline+::slotted([slot=main i]:first-child):before,.base .alert-text .main-text+::slotted([slot=main i]:first-child):before{display:block;margin-top:8px;content:\"\"}.base slot[name=icon]{flex-shrink:0;color:var(--_appearance-color-fill);font-size:24px;line-height:1}.base .dismiss-button{border-left:1px solid var(--vvd-color-neutral-200);padding-inline-start:8px}";
17
17
 
18
18
  var __defProp = Object.defineProperty;
19
19
  var __decorateClass = (decorators, target, key, kind) => {
@@ -21,8 +21,7 @@ var __decorateClass = (decorators, target, key, kind) => {
21
21
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
22
22
  if (decorator = decorators[i])
23
23
  result = (decorator(target, key, result) ) || result;
24
- if (result)
25
- __defProp(target, key, result);
24
+ if (result) __defProp(target, key, result);
26
25
  return result;
27
26
  };
28
27
  const connotationIconMap = /* @__PURE__ */ new Map([
@@ -42,8 +41,7 @@ class Alert extends index.FoundationElement {
42
41
  this.timeoutms = 0;
43
42
  this.open = false;
44
43
  this.#closeOnEscape = (e) => {
45
- if (this.removable && e.key === "Escape")
46
- this.open = false;
44
+ if (this.removable && e.key === "Escape") this.open = false;
47
45
  };
48
46
  this.#onTransitionEnd = () => {
49
47
  if (!this.open) {
@@ -56,8 +54,7 @@ class Alert extends index.FoundationElement {
56
54
  // timeout to close the alert
57
55
  #timeoutID;
58
56
  openChanged(oldValue, newValue) {
59
- if (oldValue === void 0)
60
- return;
57
+ if (oldValue === void 0) return;
61
58
  this.$emit(newValue ? "open" : "close");
62
59
  this.#setupTimeout();
63
60
  if (newValue) {
@@ -86,8 +83,7 @@ class Alert extends index.FoundationElement {
86
83
  }
87
84
  disconnectedCallback() {
88
85
  super.disconnectedCallback();
89
- if (this.#timeoutID)
90
- clearTimeout(this.#timeoutID);
86
+ if (this.#timeoutID) clearTimeout(this.#timeoutID);
91
87
  this.removeEventListener("keydown", this.#closeOnEscape);
92
88
  if (this.controlEl)
93
89
  this.controlEl.removeEventListener(
@@ -99,8 +95,7 @@ class Alert extends index.FoundationElement {
99
95
  return this.icon || connotationIconMap.get(this.connotation);
100
96
  }
101
97
  #setupTimeout() {
102
- if (this.#timeoutID)
103
- clearTimeout(this.#timeoutID);
98
+ if (this.#timeoutID) clearTimeout(this.#timeoutID);
104
99
  if (this.open && this.timeoutms > 0) {
105
100
  this.#timeoutID = setTimeout(() => this.open = false, this.timeoutms);
106
101
  }
@@ -183,8 +178,7 @@ const AlertTemplate = (context) => {
183
178
  index.html`<header class="headline">${(x) => x.headline}</header>`
184
179
  )}
185
180
  ${when.when((x) => x.text, index.html`<div class="main-text">${(x) => x.text}</div>`)}
186
- <slot name="main">
187
- </slot>
181
+ <slot name="main"></slot>
188
182
  </div>
189
183
  <slot class="action-items" name="action-items"></slot>
190
184
  ${when.when((x) => x.removable, renderDismissButton(buttonTag))}
@@ -11,7 +11,7 @@ import { B as Button$1 } from './button.js';
11
11
  import { w as when } from './when.js';
12
12
  import { c as classNames } from './class-names.js';
13
13
 
14
- const styles = ".control{position:fixed;z-index:10;border-radius:8px;inline-size:max-content;inset-block-end:0;inset-inline:0 0;margin-block:16px;margin-inline:auto;max-inline-size:var(--alert-max-inline-size, fit-content);min-inline-size:var(--alert-min-inline-size, 420px);transition:opacity .15s cubic-bezier(0,0,.2,1) 0ms,transform .15s cubic-bezier(0,0,.2,1) 0ms}.control.placement-top,.control.placement-top-start,.control.placement-top-end{inset-block:0 auto}.control.placement-top-start,.control.placement-bottom-start{right:auto;inset-inline-end:auto;margin-inline:16px}.control.placement-top-end,.control.placement-bottom-end{inset-inline-start:auto;margin-inline:16px}.control:where(.strategy-static){position:static;margin:0;inline-size:auto}.control:not(.open){opacity:0;transform:scale(.8)}.control.open{opacity:1;transform:scale(1)}@media (width <= 768px){.control{min-inline-size:var(--alert-min-inline-size, auto)}}.base{display:flex;align-items:center;padding:16px;border-radius:8px;background-color:var(--vvd-color-neutral-50);color:var(--vvd-color-canvas-text);column-gap:16px}.base.connotation-success{--_connotation-color-primary: var(--vvd-alert-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-alert-success-primary-text, var(--vvd-color-canvas))}.base.connotation-information{--_connotation-color-primary: var(--vvd-alert-information-primary, var(--vvd-color-information-500));--_connotation-color-primary-text: var(--vvd-alert-information-primary-text, var(--vvd-color-canvas))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-alert-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-alert-alert-primary-text, var(--vvd-color-canvas))}.base.connotation-warning{--_connotation-color-primary: var(--vvd-alert-warning-primary, var(--vvd-color-warning-300));--_connotation-color-primary-text: var(--vvd-alert-warning-primary-text, var(--vvd-color-canvas-text))}.base.connotation-announcement{--_connotation-color-primary: var(--vvd-alert-announcement-primary, var(--vvd-color-announcement-500));--_connotation-color-primary-text: var(--vvd-alert-announcement-primary-text, var(--vvd-color-canvas))}.base:not(.connotation-success,.connotation-information,.connotation-alert,.connotation-warning,.connotation-announcement){--_connotation-color-primary: var(--vvd-alert-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-alert-accent-primary-text, var(--vvd-color-canvas))}.base{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.base .alert-text{margin-inline-end:auto}.base .alert-text .headline{font:var(--vvd-typography-base-bold);margin-block-end:4px}.base .alert-text .main-text{font:var(--vvd-typography-base)}.base slot[name=icon]{flex-shrink:0;color:var(--_appearance-color-fill);font-size:24px;line-height:1}.base .dismiss-button{border-left:1px solid var(--vvd-color-neutral-200);padding-inline-start:8px}";
14
+ const styles = ".control{position:fixed;z-index:10;border-radius:8px;inline-size:max-content;inset-block-end:0;inset-inline:0 0;margin-block:16px;margin-inline:auto;max-inline-size:var(--alert-max-inline-size, fit-content);min-inline-size:var(--alert-min-inline-size, 420px);transition:opacity .15s cubic-bezier(0,0,.2,1) 0ms,transform .15s cubic-bezier(0,0,.2,1) 0ms}.control.placement-top,.control.placement-top-start,.control.placement-top-end{inset-block:0 auto}.control.placement-top-start,.control.placement-bottom-start{right:auto;inset-inline-end:auto;margin-inline:16px}.control.placement-top-end,.control.placement-bottom-end{inset-inline-start:auto;margin-inline:16px}.control:where(.strategy-static){position:static;margin:0;inline-size:auto}.control:not(.open){opacity:0;transform:scale(.8)}.control.open{opacity:1;transform:scale(1)}@media (width <= 768px){.control{min-inline-size:var(--alert-min-inline-size, auto)}}.base{display:flex;align-items:center;padding:16px;border-radius:8px;background-color:var(--vvd-color-neutral-50);color:var(--vvd-color-canvas-text);column-gap:16px}.base.connotation-success{--_connotation-color-primary: var(--vvd-alert-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-alert-success-primary-text, var(--vvd-color-canvas))}.base.connotation-information{--_connotation-color-primary: var(--vvd-alert-information-primary, var(--vvd-color-information-500));--_connotation-color-primary-text: var(--vvd-alert-information-primary-text, var(--vvd-color-canvas))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-alert-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-alert-alert-primary-text, var(--vvd-color-canvas))}.base.connotation-warning{--_connotation-color-primary: var(--vvd-alert-warning-primary, var(--vvd-color-warning-300));--_connotation-color-primary-text: var(--vvd-alert-warning-primary-text, var(--vvd-color-canvas-text))}.base.connotation-announcement{--_connotation-color-primary: var(--vvd-alert-announcement-primary, var(--vvd-color-announcement-500));--_connotation-color-primary-text: var(--vvd-alert-announcement-primary-text, var(--vvd-color-canvas))}.base:not(.connotation-success,.connotation-information,.connotation-alert,.connotation-warning,.connotation-announcement){--_connotation-color-primary: var(--vvd-alert-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-alert-accent-primary-text, var(--vvd-color-canvas))}.base{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.base .alert-text{margin-inline-end:auto}.base .alert-text .headline{font:var(--vvd-typography-base-bold);margin-block-end:4px}.base .alert-text .main-text{font:var(--vvd-typography-base)}.base .alert-text .headline+::slotted([slot=main i]:first-child):before,.base .alert-text .main-text+::slotted([slot=main i]:first-child):before{display:block;margin-top:8px;content:\"\"}.base slot[name=icon]{flex-shrink:0;color:var(--_appearance-color-fill);font-size:24px;line-height:1}.base .dismiss-button{border-left:1px solid var(--vvd-color-neutral-200);padding-inline-start:8px}";
15
15
 
16
16
  var __defProp = Object.defineProperty;
17
17
  var __decorateClass = (decorators, target, key, kind) => {
@@ -19,8 +19,7 @@ var __decorateClass = (decorators, target, key, kind) => {
19
19
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
20
20
  if (decorator = decorators[i])
21
21
  result = (decorator(target, key, result) ) || result;
22
- if (result)
23
- __defProp(target, key, result);
22
+ if (result) __defProp(target, key, result);
24
23
  return result;
25
24
  };
26
25
  const connotationIconMap = /* @__PURE__ */ new Map([
@@ -40,8 +39,7 @@ class Alert extends FoundationElement {
40
39
  this.timeoutms = 0;
41
40
  this.open = false;
42
41
  this.#closeOnEscape = (e) => {
43
- if (this.removable && e.key === "Escape")
44
- this.open = false;
42
+ if (this.removable && e.key === "Escape") this.open = false;
45
43
  };
46
44
  this.#onTransitionEnd = () => {
47
45
  if (!this.open) {
@@ -54,8 +52,7 @@ class Alert extends FoundationElement {
54
52
  // timeout to close the alert
55
53
  #timeoutID;
56
54
  openChanged(oldValue, newValue) {
57
- if (oldValue === void 0)
58
- return;
55
+ if (oldValue === void 0) return;
59
56
  this.$emit(newValue ? "open" : "close");
60
57
  this.#setupTimeout();
61
58
  if (newValue) {
@@ -84,8 +81,7 @@ class Alert extends FoundationElement {
84
81
  }
85
82
  disconnectedCallback() {
86
83
  super.disconnectedCallback();
87
- if (this.#timeoutID)
88
- clearTimeout(this.#timeoutID);
84
+ if (this.#timeoutID) clearTimeout(this.#timeoutID);
89
85
  this.removeEventListener("keydown", this.#closeOnEscape);
90
86
  if (this.controlEl)
91
87
  this.controlEl.removeEventListener(
@@ -97,8 +93,7 @@ class Alert extends FoundationElement {
97
93
  return this.icon || connotationIconMap.get(this.connotation);
98
94
  }
99
95
  #setupTimeout() {
100
- if (this.#timeoutID)
101
- clearTimeout(this.#timeoutID);
96
+ if (this.#timeoutID) clearTimeout(this.#timeoutID);
102
97
  if (this.open && this.timeoutms > 0) {
103
98
  this.#timeoutID = setTimeout(() => this.open = false, this.timeoutms);
104
99
  }
@@ -181,8 +176,7 @@ const AlertTemplate = (context) => {
181
176
  html`<header class="headline">${(x) => x.headline}</header>`
182
177
  )}
183
178
  ${when((x) => x.text, html`<div class="main-text">${(x) => x.text}</div>`)}
184
- <slot name="main">
185
- </slot>
179
+ <slot name="main"></slot>
186
180
  </div>
187
181
  <slot class="action-items" name="action-items"></slot>
188
182
  ${when((x) => x.removable, renderDismissButton(buttonTag))}
@@ -403,8 +403,7 @@ var __decorateClass = (decorators, target, key, kind) => {
403
403
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
404
404
  if (decorator = decorators[i])
405
405
  result = (decorator(target, key, result) ) || result;
406
- if (result)
407
- __defProp(target, key, result);
406
+ if (result) __defProp(target, key, result);
408
407
  return result;
409
408
  };
410
409
  class RadioGroup extends RadioGroup$1 {
@@ -401,8 +401,7 @@ var __decorateClass = (decorators, target, key, kind) => {
401
401
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
402
402
  if (decorator = decorators[i])
403
403
  result = (decorator(target, key, result) ) || result;
404
- if (result)
405
- __defProp(target, key, result);
404
+ if (result) __defProp(target, key, result);
406
405
  return result;
407
406
  };
408
407
  class RadioGroup extends RadioGroup$1 {