@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
@@ -70,38 +70,23 @@ const generateRandomId = () => v4();
70
70
 
71
71
  var __defProp = Object.defineProperty;
72
72
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
73
+ var __typeError = (msg) => {
74
+ throw TypeError(msg);
75
+ };
73
76
  var __decorateClass = (decorators, target, key, kind) => {
74
77
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
75
78
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
76
79
  if (decorator = decorators[i])
77
80
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
78
- if (kind && result)
79
- __defProp(target, key, result);
81
+ if (kind && result) __defProp(target, key, result);
80
82
  return result;
81
83
  };
82
- var __accessCheck = (obj, member, msg) => {
83
- if (!member.has(obj))
84
- throw TypeError("Cannot " + msg);
85
- };
86
- var __privateGet = (obj, member, getter) => {
87
- __accessCheck(obj, member, "read from private field");
88
- return getter ? getter.call(obj) : member.get(obj);
89
- };
90
- var __privateAdd = (obj, member, value) => {
91
- if (member.has(obj))
92
- throw TypeError("Cannot add the same private member more than once");
93
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
94
- };
95
- var __privateSet = (obj, member, value, setter) => {
96
- __accessCheck(obj, member, "write to private field");
97
- member.set(obj, value);
98
- return value;
99
- };
100
- var __privateMethod = (obj, member, method) => {
101
- __accessCheck(obj, member, "access private method");
102
- return method;
103
- };
104
- var _handleLabelChange, handleLabelChange_fn, _reflectToInput, _helperTextMirrorEl, _helperTextSlotMutationObserver, _updateHelperTextMutationObserver, updateHelperTextMutationObserver_fn, _updateMirroredHelperText, updateMirroredHelperText_fn;
84
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
85
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
86
+ 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);
87
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
88
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
89
+ var _TextField_instances, handleLabelChange_fn, _reflectToInput, _helperTextMirrorEl, _helperTextSlotMutationObserver, updateHelperTextMutationObserver_fn, updateMirroredHelperText_fn;
105
90
  const safariWorkaroundClassName = "_vvd-3-text-field-safari-workaround";
106
91
  const getSafariWorkaroundStyleSheet = memoizeWith(
107
92
  () => "",
@@ -135,23 +120,21 @@ const installSafariWorkaroundStyle = (forElement) => {
135
120
  let TextField = class extends TextField$1 {
136
121
  constructor() {
137
122
  super(...arguments);
138
- __privateAdd(this, _handleLabelChange);
139
- __privateAdd(this, _updateHelperTextMutationObserver);
140
- __privateAdd(this, _updateMirroredHelperText);
123
+ __privateAdd(this, _TextField_instances);
141
124
  /**
142
125
  * @internal
143
126
  */
144
127
  this._labelEl = null;
145
- __privateAdd(this, _reflectToInput, void 0);
146
- __privateAdd(this, _helperTextMirrorEl, void 0);
147
- __privateAdd(this, _helperTextSlotMutationObserver, void 0);
128
+ __privateAdd(this, _reflectToInput);
129
+ __privateAdd(this, _helperTextMirrorEl);
130
+ __privateAdd(this, _helperTextSlotMutationObserver);
148
131
  }
149
132
  /**
150
133
  * @internal
151
134
  */
152
135
  labelChanged() {
153
136
  if (this._labelEl) {
154
- __privateMethod(this, _handleLabelChange, handleLabelChange_fn).call(this, this._labelEl);
137
+ __privateMethod(this, _TextField_instances, handleLabelChange_fn).call(this, this._labelEl);
155
138
  }
156
139
  }
157
140
  connectedCallback() {
@@ -182,11 +165,11 @@ let TextField = class extends TextField$1 {
182
165
  label.slot = "_label";
183
166
  label.htmlFor = controlId;
184
167
  this._labelEl = label;
185
- __privateMethod(this, _handleLabelChange, handleLabelChange_fn).call(this, label);
168
+ __privateMethod(this, _TextField_instances, handleLabelChange_fn).call(this, label);
186
169
  __privateSet(this, _helperTextMirrorEl, document.createElement("div"));
187
170
  __privateGet(this, _helperTextMirrorEl).id = helperTextId;
188
171
  __privateGet(this, _helperTextMirrorEl).slot = "_mirrored-helper-text";
189
- __privateMethod(this, _updateMirroredHelperText, updateMirroredHelperText_fn).call(this);
172
+ __privateMethod(this, _TextField_instances, updateMirroredHelperText_fn).call(this);
190
173
  this.appendChild(__privateGet(this, _helperTextMirrorEl));
191
174
  installSafariWorkaroundStyle(this);
192
175
  }
@@ -221,13 +204,13 @@ let TextField = class extends TextField$1 {
221
204
  "aria-roledescription"
222
205
  );
223
206
  __privateGet(this, _reflectToInput).property("value", "value", true);
224
- __privateMethod(this, _updateHelperTextMutationObserver, updateHelperTextMutationObserver_fn).call(this);
207
+ __privateMethod(this, _TextField_instances, updateHelperTextMutationObserver_fn).call(this);
225
208
  }
226
209
  disconnectedCallback() {
227
210
  super.disconnectedCallback();
228
211
  __privateGet(this, _reflectToInput).destroy();
229
212
  __privateSet(this, _reflectToInput, void 0);
230
- __privateMethod(this, _updateHelperTextMutationObserver, updateHelperTextMutationObserver_fn).call(this);
213
+ __privateMethod(this, _TextField_instances, updateHelperTextMutationObserver_fn).call(this);
231
214
  }
232
215
  focus() {
233
216
  this.control?.focus();
@@ -236,17 +219,17 @@ let TextField = class extends TextField$1 {
236
219
  * @internal
237
220
  */
238
221
  helperTextChanged() {
239
- __privateMethod(this, _updateMirroredHelperText, updateMirroredHelperText_fn).call(this);
222
+ __privateMethod(this, _TextField_instances, updateMirroredHelperText_fn).call(this);
240
223
  }
241
224
  /**
242
225
  * @internal
243
226
  */
244
227
  _helperTextSlottedContentChanged() {
245
- __privateMethod(this, _updateMirroredHelperText, updateMirroredHelperText_fn).call(this);
246
- __privateMethod(this, _updateHelperTextMutationObserver, updateHelperTextMutationObserver_fn).call(this);
228
+ __privateMethod(this, _TextField_instances, updateMirroredHelperText_fn).call(this);
229
+ __privateMethod(this, _TextField_instances, updateHelperTextMutationObserver_fn).call(this);
247
230
  }
248
231
  };
249
- _handleLabelChange = new WeakSet();
232
+ _TextField_instances = new WeakSet();
250
233
  handleLabelChange_fn = function(labelEl) {
251
234
  if (!this.label) {
252
235
  labelEl.remove();
@@ -260,14 +243,13 @@ handleLabelChange_fn = function(labelEl) {
260
243
  _reflectToInput = new WeakMap();
261
244
  _helperTextMirrorEl = new WeakMap();
262
245
  _helperTextSlotMutationObserver = new WeakMap();
263
- _updateHelperTextMutationObserver = new WeakSet();
264
246
  updateHelperTextMutationObserver_fn = function() {
265
247
  const usesHelperTextSlot = this._helperTextSlottedContent.length;
266
248
  const shouldHaveMutationObserver = usesHelperTextSlot && this.isConnected;
267
249
  if (shouldHaveMutationObserver && !__privateGet(this, _helperTextSlotMutationObserver)) {
268
250
  __privateSet(this, _helperTextSlotMutationObserver, new MutationObserver((records) => {
269
251
  if (records.some((record) => record.target !== __privateGet(this, _helperTextMirrorEl))) {
270
- __privateMethod(this, _updateMirroredHelperText, updateMirroredHelperText_fn).call(this);
252
+ __privateMethod(this, _TextField_instances, updateMirroredHelperText_fn).call(this);
271
253
  }
272
254
  }));
273
255
  __privateGet(this, _helperTextSlotMutationObserver).observe(this, {
@@ -281,7 +263,6 @@ updateHelperTextMutationObserver_fn = function() {
281
263
  __privateSet(this, _helperTextSlotMutationObserver, void 0);
282
264
  }
283
265
  };
284
- _updateMirroredHelperText = new WeakSet();
285
266
  updateMirroredHelperText_fn = function() {
286
267
  let helperText = this.helperText ?? "";
287
268
  if (this._helperTextSlottedContent?.length) {
@@ -218,33 +218,22 @@ const getMeridiesOptions = (min, max) => {
218
218
 
219
219
  var __defProp = Object.defineProperty;
220
220
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
221
+ var __typeError = (msg) => {
222
+ throw TypeError(msg);
223
+ };
221
224
  var __decorateClass = (decorators, target, key, kind) => {
222
225
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
223
226
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
224
227
  if (decorator = decorators[i])
225
228
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
226
- if (kind && result)
227
- __defProp(target, key, result);
229
+ if (kind && result) __defProp(target, key, result);
228
230
  return result;
229
231
  };
230
- var __accessCheck = (obj, member, msg) => {
231
- if (!member.has(obj))
232
- throw TypeError("Cannot " + msg);
233
- };
234
- var __privateGet = (obj, member, getter) => {
235
- __accessCheck(obj, member, "read from private field");
236
- return getter ? getter.call(obj) : member.get(obj);
237
- };
238
- var __privateAdd = (obj, member, value) => {
239
- if (member.has(obj))
240
- throw TypeError("Cannot add the same private member more than once");
241
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
242
- };
243
- var __privateMethod = (obj, member, method) => {
244
- __accessCheck(obj, member, "access private method");
245
- return method;
246
- };
247
- var _getFocusableEls, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn, _onFocusIn, _onFocusOut, _dismissOnClickOutside, _openPopupIfPossible, openPopupIfPossible_fn, _scrollToItem, scrollToItem_fn;
232
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
233
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
234
+ 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);
235
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
236
+ var _getFocusableEls, _TimePicker_instances, updateValueDueToUserInteraction_fn, _onFocusIn, _onFocusOut, _dismissOnClickOutside, openPopupIfPossible_fn, scrollToItem_fn;
248
237
  const ValidTimeFilter = {
249
238
  fromView: (value) => {
250
239
  if (value && isValidTimeStr(value)) {
@@ -259,9 +248,7 @@ const ValidTimeFilter = {
259
248
  let TimePicker = class extends FormAssociatedTimePicker {
260
249
  constructor() {
261
250
  super();
262
- __privateAdd(this, _updateValueDueToUserInteraction);
263
- __privateAdd(this, _openPopupIfPossible);
264
- __privateAdd(this, _scrollToItem);
251
+ __privateAdd(this, _TimePicker_instances);
265
252
  this.readOnly = false;
266
253
  this.minutesStep = null;
267
254
  this.secondsStep = null;
@@ -419,11 +406,11 @@ let TimePicker = class extends FormAssociatedTimePicker {
419
406
  */
420
407
  _onTextFieldChange() {
421
408
  if (this._presentationValue === "") {
422
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, "");
409
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, "");
423
410
  return;
424
411
  }
425
412
  try {
426
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, parsePresentationTime(this._presentationValue, this._use12hClock));
413
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, parsePresentationTime(this._presentationValue, this._use12hClock));
427
414
  } catch (_) {
428
415
  return;
429
416
  }
@@ -451,19 +438,19 @@ let TimePicker = class extends FormAssociatedTimePicker {
451
438
  if (this._popupOpen) {
452
439
  this._closePopup();
453
440
  } else {
454
- __privateMethod(this, _openPopupIfPossible, openPopupIfPossible_fn).call(this);
441
+ __privateMethod(this, _TimePicker_instances, openPopupIfPossible_fn).call(this);
455
442
  index.DOM.processUpdates();
456
443
  if (this._selectedHour) {
457
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, "hours", this._selectedHour, "start");
444
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "hours", this._selectedHour, "start");
458
445
  }
459
446
  if (this._selectedMinute) {
460
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, "minutes", this._selectedMinute, "start");
447
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "minutes", this._selectedMinute, "start");
461
448
  }
462
449
  if (this._displaySeconds && this._selectedSecond) {
463
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, "seconds", this._selectedSecond, "start");
450
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "seconds", this._selectedSecond, "start");
464
451
  }
465
452
  if (this._use12hClock && this._selectedMeridiem) {
466
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, "meridies", this._selectedMeridiem, "start");
453
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "meridies", this._selectedMeridiem, "start");
467
454
  }
468
455
  __privateGet(this, _getFocusableEls).call(this)[0].focus();
469
456
  }
@@ -590,8 +577,8 @@ let TimePicker = class extends FormAssociatedTimePicker {
590
577
  const newIndex = (newRawIndex + options.length) % options.length;
591
578
  const newValue = options[newIndex].value;
592
579
  setSelectedValue(newValue);
593
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, picker, newValue, "nearest");
594
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, this.value);
580
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, picker, newValue, "nearest");
581
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, this.value);
595
582
  }
596
583
  return true;
597
584
  }
@@ -600,8 +587,8 @@ let TimePicker = class extends FormAssociatedTimePicker {
600
587
  */
601
588
  _onPickerItemClick(picker, setSelectedValue, value) {
602
589
  setSelectedValue(value);
603
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, picker, value, "start");
604
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, this.value);
590
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, picker, value, "start");
591
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, this.value);
605
592
  const nextPickerEl = this.shadowRoot.querySelector(
606
593
  `#${picker} + .picker`
607
594
  );
@@ -622,7 +609,7 @@ let TimePicker = class extends FormAssociatedTimePicker {
622
609
  * @internal
623
610
  */
624
611
  _onClearClick() {
625
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, "");
612
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, "");
626
613
  this._closePopup();
627
614
  }
628
615
  // --- Validation ---
@@ -660,7 +647,7 @@ let TimePicker = class extends FormAssociatedTimePicker {
660
647
  }
661
648
  };
662
649
  _getFocusableEls = new WeakMap();
663
- _updateValueDueToUserInteraction = new WeakSet();
650
+ _TimePicker_instances = new WeakSet();
664
651
  updateValueDueToUserInteraction_fn = function(newValue) {
665
652
  this.value = newValue;
666
653
  this.$emit("change");
@@ -669,13 +656,11 @@ updateValueDueToUserInteraction_fn = function(newValue) {
669
656
  _onFocusIn = new WeakMap();
670
657
  _onFocusOut = new WeakMap();
671
658
  _dismissOnClickOutside = new WeakMap();
672
- _openPopupIfPossible = new WeakSet();
673
659
  openPopupIfPossible_fn = function() {
674
660
  if (!this.readOnly) {
675
661
  this._popupOpen = true;
676
662
  }
677
663
  };
678
- _scrollToItem = new WeakSet();
679
664
  scrollToItem_fn = function(picker, selectedValue, position) {
680
665
  const element = this.shadowRoot.querySelector(
681
666
  `#${picker}-${selectedValue}`
@@ -216,33 +216,22 @@ const getMeridiesOptions = (min, max) => {
216
216
 
217
217
  var __defProp = Object.defineProperty;
218
218
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
219
+ var __typeError = (msg) => {
220
+ throw TypeError(msg);
221
+ };
219
222
  var __decorateClass = (decorators, target, key, kind) => {
220
223
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
221
224
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
222
225
  if (decorator = decorators[i])
223
226
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
224
- if (kind && result)
225
- __defProp(target, key, result);
227
+ if (kind && result) __defProp(target, key, result);
226
228
  return result;
227
229
  };
228
- var __accessCheck = (obj, member, msg) => {
229
- if (!member.has(obj))
230
- throw TypeError("Cannot " + msg);
231
- };
232
- var __privateGet = (obj, member, getter) => {
233
- __accessCheck(obj, member, "read from private field");
234
- return getter ? getter.call(obj) : member.get(obj);
235
- };
236
- var __privateAdd = (obj, member, value) => {
237
- if (member.has(obj))
238
- throw TypeError("Cannot add the same private member more than once");
239
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
240
- };
241
- var __privateMethod = (obj, member, method) => {
242
- __accessCheck(obj, member, "access private method");
243
- return method;
244
- };
245
- var _getFocusableEls, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn, _onFocusIn, _onFocusOut, _dismissOnClickOutside, _openPopupIfPossible, openPopupIfPossible_fn, _scrollToItem, scrollToItem_fn;
230
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
231
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
232
+ 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);
233
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
234
+ var _getFocusableEls, _TimePicker_instances, updateValueDueToUserInteraction_fn, _onFocusIn, _onFocusOut, _dismissOnClickOutside, openPopupIfPossible_fn, scrollToItem_fn;
246
235
  const ValidTimeFilter = {
247
236
  fromView: (value) => {
248
237
  if (value && isValidTimeStr(value)) {
@@ -257,9 +246,7 @@ const ValidTimeFilter = {
257
246
  let TimePicker = class extends FormAssociatedTimePicker {
258
247
  constructor() {
259
248
  super();
260
- __privateAdd(this, _updateValueDueToUserInteraction);
261
- __privateAdd(this, _openPopupIfPossible);
262
- __privateAdd(this, _scrollToItem);
249
+ __privateAdd(this, _TimePicker_instances);
263
250
  this.readOnly = false;
264
251
  this.minutesStep = null;
265
252
  this.secondsStep = null;
@@ -417,11 +404,11 @@ let TimePicker = class extends FormAssociatedTimePicker {
417
404
  */
418
405
  _onTextFieldChange() {
419
406
  if (this._presentationValue === "") {
420
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, "");
407
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, "");
421
408
  return;
422
409
  }
423
410
  try {
424
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, parsePresentationTime(this._presentationValue, this._use12hClock));
411
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, parsePresentationTime(this._presentationValue, this._use12hClock));
425
412
  } catch (_) {
426
413
  return;
427
414
  }
@@ -449,19 +436,19 @@ let TimePicker = class extends FormAssociatedTimePicker {
449
436
  if (this._popupOpen) {
450
437
  this._closePopup();
451
438
  } else {
452
- __privateMethod(this, _openPopupIfPossible, openPopupIfPossible_fn).call(this);
439
+ __privateMethod(this, _TimePicker_instances, openPopupIfPossible_fn).call(this);
453
440
  DOM.processUpdates();
454
441
  if (this._selectedHour) {
455
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, "hours", this._selectedHour, "start");
442
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "hours", this._selectedHour, "start");
456
443
  }
457
444
  if (this._selectedMinute) {
458
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, "minutes", this._selectedMinute, "start");
445
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "minutes", this._selectedMinute, "start");
459
446
  }
460
447
  if (this._displaySeconds && this._selectedSecond) {
461
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, "seconds", this._selectedSecond, "start");
448
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "seconds", this._selectedSecond, "start");
462
449
  }
463
450
  if (this._use12hClock && this._selectedMeridiem) {
464
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, "meridies", this._selectedMeridiem, "start");
451
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "meridies", this._selectedMeridiem, "start");
465
452
  }
466
453
  __privateGet(this, _getFocusableEls).call(this)[0].focus();
467
454
  }
@@ -588,8 +575,8 @@ let TimePicker = class extends FormAssociatedTimePicker {
588
575
  const newIndex = (newRawIndex + options.length) % options.length;
589
576
  const newValue = options[newIndex].value;
590
577
  setSelectedValue(newValue);
591
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, picker, newValue, "nearest");
592
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, this.value);
578
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, picker, newValue, "nearest");
579
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, this.value);
593
580
  }
594
581
  return true;
595
582
  }
@@ -598,8 +585,8 @@ let TimePicker = class extends FormAssociatedTimePicker {
598
585
  */
599
586
  _onPickerItemClick(picker, setSelectedValue, value) {
600
587
  setSelectedValue(value);
601
- __privateMethod(this, _scrollToItem, scrollToItem_fn).call(this, picker, value, "start");
602
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, this.value);
588
+ __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, picker, value, "start");
589
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, this.value);
603
590
  const nextPickerEl = this.shadowRoot.querySelector(
604
591
  `#${picker} + .picker`
605
592
  );
@@ -620,7 +607,7 @@ let TimePicker = class extends FormAssociatedTimePicker {
620
607
  * @internal
621
608
  */
622
609
  _onClearClick() {
623
- __privateMethod(this, _updateValueDueToUserInteraction, updateValueDueToUserInteraction_fn).call(this, "");
610
+ __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, "");
624
611
  this._closePopup();
625
612
  }
626
613
  // --- Validation ---
@@ -658,7 +645,7 @@ let TimePicker = class extends FormAssociatedTimePicker {
658
645
  }
659
646
  };
660
647
  _getFocusableEls = new WeakMap();
661
- _updateValueDueToUserInteraction = new WeakSet();
648
+ _TimePicker_instances = new WeakSet();
662
649
  updateValueDueToUserInteraction_fn = function(newValue) {
663
650
  this.value = newValue;
664
651
  this.$emit("change");
@@ -667,13 +654,11 @@ updateValueDueToUserInteraction_fn = function(newValue) {
667
654
  _onFocusIn = new WeakMap();
668
655
  _onFocusOut = new WeakMap();
669
656
  _dismissOnClickOutside = new WeakMap();
670
- _openPopupIfPossible = new WeakSet();
671
657
  openPopupIfPossible_fn = function() {
672
658
  if (!this.readOnly) {
673
659
  this._popupOpen = true;
674
660
  }
675
661
  };
676
- _scrollToItem = new WeakSet();
677
662
  scrollToItem_fn = function(picker, selectedValue, position) {
678
663
  const element = this.shadowRoot.querySelector(
679
664
  `#${picker}-${selectedValue}`
@@ -10,109 +10,86 @@ const styles = ":host{display:var(--_popup-display, inline)}:host([slotted-ancho
10
10
 
11
11
  var __defProp = Object.defineProperty;
12
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __typeError = (msg) => {
14
+ throw TypeError(msg);
15
+ };
13
16
  var __decorateClass = (decorators, target, key, kind) => {
14
17
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
15
18
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
16
19
  if (decorator = decorators[i])
17
20
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
18
- if (kind && result)
19
- __defProp(target, key, result);
21
+ if (kind && result) __defProp(target, key, result);
20
22
  return result;
21
23
  };
22
- var __accessCheck = (obj, member, msg) => {
23
- if (!member.has(obj))
24
- throw TypeError("Cannot " + msg);
25
- };
26
- var __privateGet = (obj, member, getter) => {
27
- __accessCheck(obj, member, "read from private field");
28
- return getter ? getter.call(obj) : member.get(obj);
29
- };
30
- var __privateAdd = (obj, member, value) => {
31
- if (member.has(obj))
32
- throw TypeError("Cannot add the same private member more than once");
33
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
34
- };
35
- var __privateMethod = (obj, member, method) => {
36
- __accessCheck(obj, member, "access private method");
37
- return method;
38
- };
39
- var _ANCHOR_ARIA_LABEL_SUFFIX, _setupAnchor, setupAnchor_fn, _updateAnchor, updateAnchor_fn, _cleanupAnchor, cleanupAnchor_fn, _openIfClosed, _updateListeners, updateListeners_fn, _closeOnClickOutside, _closeOnEscape;
24
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
25
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
26
+ 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);
27
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
28
+ var _ANCHOR_ARIA_LABEL_SUFFIX, _Toggletip_instances, setupAnchor_fn, updateAnchor_fn, cleanupAnchor_fn, _openIfClosed, updateListeners_fn, _closeOnClickOutside, _closeOnEscape;
40
29
  let Toggletip = class extends index.FoundationElement {
41
30
  constructor() {
42
31
  super(...arguments);
43
- __privateAdd(this, _setupAnchor);
44
- __privateAdd(this, _updateAnchor);
45
- __privateAdd(this, _cleanupAnchor);
46
- __privateAdd(this, _updateListeners);
32
+ __privateAdd(this, _Toggletip_instances);
47
33
  __privateAdd(this, _ANCHOR_ARIA_LABEL_SUFFIX, " ; Show more information");
48
34
  this.alternate = false;
49
35
  this.placement = "right";
50
36
  this.open = false;
51
37
  __privateAdd(this, _openIfClosed, () => {
52
- if (!this.open)
53
- index.DOM.queueUpdate(() => this.open = true);
38
+ if (!this.open) index.DOM.queueUpdate(() => this.open = true);
54
39
  });
55
40
  __privateAdd(this, _closeOnClickOutside, (e) => {
56
41
  const clickedOutside = !this.contains(e.target);
57
42
  const clickedOnAnchor = this._anchorEl?.contains(e.target);
58
- if (clickedOutside || clickedOnAnchor)
59
- this.open = false;
43
+ if (clickedOutside || clickedOnAnchor) this.open = false;
60
44
  });
61
45
  __privateAdd(this, _closeOnEscape, (e) => {
62
- if (e.key === "Escape")
63
- this.open = false;
46
+ if (e.key === "Escape") this.open = false;
64
47
  });
65
48
  }
66
49
  openChanged(oldValue, newValue) {
67
- if (oldValue === void 0)
68
- return;
50
+ if (oldValue === void 0) return;
69
51
  if (newValue) {
70
52
  this.setAttribute("role", "status");
71
53
  } else {
72
54
  this.removeAttribute("role");
73
55
  }
74
- __privateMethod(this, _updateListeners, updateListeners_fn).call(this);
56
+ __privateMethod(this, _Toggletip_instances, updateListeners_fn).call(this);
75
57
  if (this._anchorEl) {
76
- __privateMethod(this, _updateAnchor, updateAnchor_fn).call(this, this._anchorEl);
58
+ __privateMethod(this, _Toggletip_instances, updateAnchor_fn).call(this, this._anchorEl);
77
59
  }
78
60
  }
79
61
  connectedCallback() {
80
62
  super.connectedCallback();
81
- __privateMethod(this, _updateListeners, updateListeners_fn).call(this);
63
+ __privateMethod(this, _Toggletip_instances, updateListeners_fn).call(this);
82
64
  }
83
65
  disconnectedCallback() {
84
66
  super.disconnectedCallback();
85
- __privateMethod(this, _updateListeners, updateListeners_fn).call(this);
67
+ __privateMethod(this, _Toggletip_instances, updateListeners_fn).call(this);
86
68
  }
87
69
  /**
88
70
  * @internal
89
71
  */
90
72
  _anchorElChanged(oldValue, newValue) {
91
- if (oldValue)
92
- __privateMethod(this, _cleanupAnchor, cleanupAnchor_fn).call(this, oldValue);
93
- if (newValue)
94
- __privateMethod(this, _setupAnchor, setupAnchor_fn).call(this, newValue);
73
+ if (oldValue) __privateMethod(this, _Toggletip_instances, cleanupAnchor_fn).call(this, oldValue);
74
+ if (newValue) __privateMethod(this, _Toggletip_instances, setupAnchor_fn).call(this, newValue);
95
75
  }
96
76
  };
97
77
  _ANCHOR_ARIA_LABEL_SUFFIX = new WeakMap();
98
- _setupAnchor = new WeakSet();
78
+ _Toggletip_instances = new WeakSet();
99
79
  setupAnchor_fn = function(a) {
100
80
  a.addEventListener("click", __privateGet(this, _openIfClosed), true);
101
81
  a.ariaLabel = (a.ariaLabel ?? "") + __privateGet(this, _ANCHOR_ARIA_LABEL_SUFFIX);
102
- __privateMethod(this, _updateAnchor, updateAnchor_fn).call(this, a);
82
+ __privateMethod(this, _Toggletip_instances, updateAnchor_fn).call(this, a);
103
83
  };
104
- _updateAnchor = new WeakSet();
105
84
  updateAnchor_fn = function(a) {
106
85
  a.setAttribute("aria-expanded", this.open.toString());
107
86
  };
108
- _cleanupAnchor = new WeakSet();
109
87
  cleanupAnchor_fn = function(a) {
110
88
  a.removeEventListener("click", __privateGet(this, _openIfClosed), true);
111
89
  if (a.ariaLabel)
112
90
  a.ariaLabel = a.ariaLabel.replace(__privateGet(this, _ANCHOR_ARIA_LABEL_SUFFIX), "");
113
91
  };
114
92
  _openIfClosed = new WeakMap();
115
- _updateListeners = new WeakSet();
116
93
  updateListeners_fn = function() {
117
94
  document.removeEventListener("click", __privateGet(this, _closeOnClickOutside));
118
95
  document.removeEventListener("keydown", __privateGet(this, _closeOnEscape));