@vonage/vivid 4.2.0 → 4.4.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 (155) hide show
  1. package/appearance-ui/index.cjs +1 -2
  2. package/appearance-ui/index.js +1 -2
  3. package/custom-elements.json +435 -41
  4. package/index.cjs +1 -0
  5. package/index.js +1 -1
  6. package/lib/button/button.d.ts +1 -0
  7. package/lib/dialog/dialog.d.ts +1 -0
  8. package/lib/empty-state/definition.d.ts +1 -0
  9. package/lib/empty-state/empty-state.d.ts +5 -0
  10. package/lib/enums.d.ts +4 -0
  11. package/lib/popup/popup.d.ts +5 -0
  12. package/lib/range-slider/range-slider.d.ts +2 -0
  13. package/lib/slider/slider.d.ts +5 -0
  14. package/lib/slider/slider.template.d.ts +2 -2
  15. package/lib/switch/switch.d.ts +1 -1
  16. package/package.json +1 -1
  17. package/shared/affix.cjs +1 -2
  18. package/shared/affix.js +1 -2
  19. package/shared/anchored.cjs +1 -2
  20. package/shared/anchored.js +1 -2
  21. package/shared/calendar-event.cjs +1 -2
  22. package/shared/calendar-event.js +1 -2
  23. package/shared/definition.cjs +2 -3
  24. package/shared/definition.js +2 -3
  25. package/shared/definition11.cjs +29 -13
  26. package/shared/definition11.js +29 -14
  27. package/shared/definition12.cjs +1 -1
  28. package/shared/definition12.js +1 -1
  29. package/shared/definition13.cjs +1 -2
  30. package/shared/definition13.js +1 -2
  31. package/shared/definition14.cjs +1 -2
  32. package/shared/definition14.js +1 -2
  33. package/shared/definition15.cjs +1 -2
  34. package/shared/definition15.js +1 -2
  35. package/shared/definition16.cjs +1 -2
  36. package/shared/definition16.js +1 -2
  37. package/shared/definition17.cjs +4 -8
  38. package/shared/definition17.js +4 -8
  39. package/shared/definition18.cjs +14 -22
  40. package/shared/definition18.js +14 -22
  41. package/shared/definition19.cjs +29 -50
  42. package/shared/definition19.js +29 -50
  43. package/shared/definition20.cjs +1 -2
  44. package/shared/definition20.js +1 -2
  45. package/shared/definition21.cjs +68 -32
  46. package/shared/definition21.js +68 -32
  47. package/shared/definition23.cjs +19 -5
  48. package/shared/definition23.js +20 -6
  49. package/shared/definition24.cjs +2 -3
  50. package/shared/definition24.js +2 -3
  51. package/shared/definition25.cjs +23 -48
  52. package/shared/definition25.js +23 -48
  53. package/shared/definition26.cjs +1 -2
  54. package/shared/definition26.js +1 -2
  55. package/shared/definition28.cjs +1 -2
  56. package/shared/definition28.js +1 -2
  57. package/shared/definition29.cjs +19 -39
  58. package/shared/definition29.js +19 -39
  59. package/shared/definition3.cjs +1 -2
  60. package/shared/definition3.js +1 -2
  61. package/shared/definition30.cjs +1 -1
  62. package/shared/definition30.js +1 -1
  63. package/shared/definition31.cjs +1 -2
  64. package/shared/definition31.js +1 -2
  65. package/shared/definition34.cjs +1 -2
  66. package/shared/definition34.js +1 -2
  67. package/shared/definition35.cjs +14 -26
  68. package/shared/definition35.js +14 -26
  69. package/shared/definition36.cjs +1 -2
  70. package/shared/definition36.js +1 -2
  71. package/shared/definition37.cjs +8 -16
  72. package/shared/definition37.js +8 -16
  73. package/shared/definition38.cjs +1 -2
  74. package/shared/definition38.js +1 -2
  75. package/shared/definition39.cjs +1 -2
  76. package/shared/definition39.js +1 -2
  77. package/shared/definition4.cjs +7 -13
  78. package/shared/definition4.js +7 -13
  79. package/shared/definition40.cjs +1 -2
  80. package/shared/definition40.js +1 -2
  81. package/shared/definition42.cjs +172 -106
  82. package/shared/definition42.js +172 -106
  83. package/shared/definition43.cjs +7 -6
  84. package/shared/definition43.js +5 -4
  85. package/shared/definition44.cjs +4 -8
  86. package/shared/definition44.js +4 -8
  87. package/shared/definition45.cjs +1 -2
  88. package/shared/definition45.js +1 -2
  89. package/shared/definition46.cjs +96 -12
  90. package/shared/definition46.js +97 -13
  91. package/shared/definition47.cjs +1 -2
  92. package/shared/definition47.js +1 -2
  93. package/shared/definition48.cjs +2 -3
  94. package/shared/definition48.js +2 -3
  95. package/shared/definition5.cjs +1 -2
  96. package/shared/definition5.js +1 -2
  97. package/shared/definition50.cjs +1 -2
  98. package/shared/definition50.js +1 -2
  99. package/shared/definition51.cjs +5 -10
  100. package/shared/definition51.js +5 -10
  101. package/shared/definition52.cjs +1 -2
  102. package/shared/definition52.js +1 -2
  103. package/shared/definition53.cjs +1 -2
  104. package/shared/definition53.js +1 -2
  105. package/shared/definition54.cjs +9 -21
  106. package/shared/definition54.js +9 -21
  107. package/shared/definition55.cjs +24 -43
  108. package/shared/definition55.js +24 -43
  109. package/shared/definition56.cjs +24 -39
  110. package/shared/definition56.js +24 -39
  111. package/shared/definition57.cjs +22 -45
  112. package/shared/definition57.js +22 -45
  113. package/shared/definition58.cjs +18 -37
  114. package/shared/definition58.js +18 -37
  115. package/shared/definition59.cjs +1 -2
  116. package/shared/definition59.js +1 -2
  117. package/shared/definition6.cjs +1 -2
  118. package/shared/definition6.js +1 -2
  119. package/shared/definition62.cjs +1 -2
  120. package/shared/definition62.js +1 -2
  121. package/shared/definition63.cjs +156 -4
  122. package/shared/definition63.js +157 -6
  123. package/shared/definition7.cjs +1 -2
  124. package/shared/definition7.js +1 -2
  125. package/shared/definition8.cjs +1 -2
  126. package/shared/definition8.js +1 -2
  127. package/shared/definition9.cjs +1 -2
  128. package/shared/definition9.js +1 -2
  129. package/shared/enums.cjs +6 -0
  130. package/shared/enums.js +6 -1
  131. package/shared/icon.cjs +2 -3
  132. package/shared/icon.js +2 -3
  133. package/shared/index2.cjs +3 -6
  134. package/shared/index2.js +3 -6
  135. package/shared/listbox.cjs +1 -2
  136. package/shared/listbox.js +1 -2
  137. package/shared/patterns/anchored.d.ts +4 -4
  138. package/shared/patterns/chevron.d.ts +2 -0
  139. package/shared/presentationDate.cjs +2 -3
  140. package/shared/presentationDate.js +2 -3
  141. package/shared/radio.cjs +1 -2
  142. package/shared/radio.js +1 -2
  143. package/shared/slider.template.cjs +27 -4
  144. package/shared/slider.template.js +27 -4
  145. package/shared/text-anchor.cjs +1 -2
  146. package/shared/text-anchor.js +1 -2
  147. package/shared/video-player.cjs +4 -8
  148. package/shared/video-player.js +4 -8
  149. package/styles/core/all.css +1 -1
  150. package/styles/core/theme.css +1 -1
  151. package/styles/core/typography.css +1 -1
  152. package/styles/tokens/theme-dark.css +4 -4
  153. package/styles/tokens/theme-light.css +4 -4
  154. package/styles/tokens/vivid-2-compat.css +1 -1
  155. package/vivid.api.json +3228 -1108
@@ -16,7 +16,7 @@ const when = require('./when.cjs');
16
16
  const repeat = require('./repeat.cjs');
17
17
  const classNames = require('./class-names.cjs');
18
18
 
19
- const styles = ":host{display:inline-block}.base,.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;border-top:1px solid var(--vvd-color-neutral-200);gap:8px}.time-pickers{display:flex;overflow:hidden;padding:4px;block-size:188px;gap:4px}.time-pickers .picker{position:relative;display:flex;overflow:hidden;flex-direction:column;padding:0;border-radius:4px;margin:0;gap:4px;inline-size:50px;list-style:none;scrollbar-width:thin}.time-pickers .picker:hover{overflow-y:auto}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:156px;content:\"\"}.time-pickers .picker:focus-visible{--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}.time-pickers .item{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .item{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .item{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.time-pickers .item:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .item:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}";
19
+ const styles = ":host{display:inline-block}.base,.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;border-top:1px solid var(--vvd-color-neutral-200);gap:8px}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:188px;gap:4px}.time-pickers .picker{position:relative;display:flex;overflow:hidden;flex-direction:column;padding:0;border-radius:4px;margin:0;gap:4px;inline-size:50px;list-style:none;scrollbar-width:thin}.time-pickers .picker:hover{overflow-y:auto}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:156px;content:\"\"}.time-pickers .picker:focus-visible{--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}.time-pickers .item{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .item{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .item{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.time-pickers .item:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .item:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}";
20
20
 
21
21
  class _TimePicker extends index.FoundationElement {
22
22
  }
@@ -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}`
@@ -14,7 +14,7 @@ import { w as when } from './when.js';
14
14
  import { r as repeat } from './repeat.js';
15
15
  import { c as classNames } from './class-names.js';
16
16
 
17
- const styles = ":host{display:inline-block}.base,.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;border-top:1px solid var(--vvd-color-neutral-200);gap:8px}.time-pickers{display:flex;overflow:hidden;padding:4px;block-size:188px;gap:4px}.time-pickers .picker{position:relative;display:flex;overflow:hidden;flex-direction:column;padding:0;border-radius:4px;margin:0;gap:4px;inline-size:50px;list-style:none;scrollbar-width:thin}.time-pickers .picker:hover{overflow-y:auto}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:156px;content:\"\"}.time-pickers .picker:focus-visible{--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}.time-pickers .item{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .item{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .item{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.time-pickers .item:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .item:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}";
17
+ const styles = ":host{display:inline-block}.base,.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;border-top:1px solid var(--vvd-color-neutral-200);gap:8px}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:188px;gap:4px}.time-pickers .picker{position:relative;display:flex;overflow:hidden;flex-direction:column;padding:0;border-radius:4px;margin:0;gap:4px;inline-size:50px;list-style:none;scrollbar-width:thin}.time-pickers .picker:hover{overflow-y:auto}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:156px;content:\"\"}.time-pickers .picker:focus-visible{--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}.time-pickers .item{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .item{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .item{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.time-pickers .item:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .item:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}";
18
18
 
19
19
  class _TimePicker extends FoundationElement {
20
20
  }
@@ -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));
@@ -8,109 +8,86 @@ const styles = ":host{display:var(--_popup-display, inline)}:host([slotted-ancho
8
8
 
9
9
  var __defProp = Object.defineProperty;
10
10
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
+ var __typeError = (msg) => {
12
+ throw TypeError(msg);
13
+ };
11
14
  var __decorateClass = (decorators, target, key, kind) => {
12
15
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
13
16
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
14
17
  if (decorator = decorators[i])
15
18
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
16
- if (kind && result)
17
- __defProp(target, key, result);
19
+ if (kind && result) __defProp(target, key, result);
18
20
  return result;
19
21
  };
20
- var __accessCheck = (obj, member, msg) => {
21
- if (!member.has(obj))
22
- throw TypeError("Cannot " + msg);
23
- };
24
- var __privateGet = (obj, member, getter) => {
25
- __accessCheck(obj, member, "read from private field");
26
- return getter ? getter.call(obj) : member.get(obj);
27
- };
28
- var __privateAdd = (obj, member, value) => {
29
- if (member.has(obj))
30
- throw TypeError("Cannot add the same private member more than once");
31
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
32
- };
33
- var __privateMethod = (obj, member, method) => {
34
- __accessCheck(obj, member, "access private method");
35
- return method;
36
- };
37
- var _ANCHOR_ARIA_LABEL_SUFFIX, _setupAnchor, setupAnchor_fn, _updateAnchor, updateAnchor_fn, _cleanupAnchor, cleanupAnchor_fn, _openIfClosed, _updateListeners, updateListeners_fn, _closeOnClickOutside, _closeOnEscape;
22
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
23
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
24
+ 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);
25
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
26
+ var _ANCHOR_ARIA_LABEL_SUFFIX, _Toggletip_instances, setupAnchor_fn, updateAnchor_fn, cleanupAnchor_fn, _openIfClosed, updateListeners_fn, _closeOnClickOutside, _closeOnEscape;
38
27
  let Toggletip = class extends FoundationElement {
39
28
  constructor() {
40
29
  super(...arguments);
41
- __privateAdd(this, _setupAnchor);
42
- __privateAdd(this, _updateAnchor);
43
- __privateAdd(this, _cleanupAnchor);
44
- __privateAdd(this, _updateListeners);
30
+ __privateAdd(this, _Toggletip_instances);
45
31
  __privateAdd(this, _ANCHOR_ARIA_LABEL_SUFFIX, " ; Show more information");
46
32
  this.alternate = false;
47
33
  this.placement = "right";
48
34
  this.open = false;
49
35
  __privateAdd(this, _openIfClosed, () => {
50
- if (!this.open)
51
- DOM.queueUpdate(() => this.open = true);
36
+ if (!this.open) DOM.queueUpdate(() => this.open = true);
52
37
  });
53
38
  __privateAdd(this, _closeOnClickOutside, (e) => {
54
39
  const clickedOutside = !this.contains(e.target);
55
40
  const clickedOnAnchor = this._anchorEl?.contains(e.target);
56
- if (clickedOutside || clickedOnAnchor)
57
- this.open = false;
41
+ if (clickedOutside || clickedOnAnchor) this.open = false;
58
42
  });
59
43
  __privateAdd(this, _closeOnEscape, (e) => {
60
- if (e.key === "Escape")
61
- this.open = false;
44
+ if (e.key === "Escape") this.open = false;
62
45
  });
63
46
  }
64
47
  openChanged(oldValue, newValue) {
65
- if (oldValue === void 0)
66
- return;
48
+ if (oldValue === void 0) return;
67
49
  if (newValue) {
68
50
  this.setAttribute("role", "status");
69
51
  } else {
70
52
  this.removeAttribute("role");
71
53
  }
72
- __privateMethod(this, _updateListeners, updateListeners_fn).call(this);
54
+ __privateMethod(this, _Toggletip_instances, updateListeners_fn).call(this);
73
55
  if (this._anchorEl) {
74
- __privateMethod(this, _updateAnchor, updateAnchor_fn).call(this, this._anchorEl);
56
+ __privateMethod(this, _Toggletip_instances, updateAnchor_fn).call(this, this._anchorEl);
75
57
  }
76
58
  }
77
59
  connectedCallback() {
78
60
  super.connectedCallback();
79
- __privateMethod(this, _updateListeners, updateListeners_fn).call(this);
61
+ __privateMethod(this, _Toggletip_instances, updateListeners_fn).call(this);
80
62
  }
81
63
  disconnectedCallback() {
82
64
  super.disconnectedCallback();
83
- __privateMethod(this, _updateListeners, updateListeners_fn).call(this);
65
+ __privateMethod(this, _Toggletip_instances, updateListeners_fn).call(this);
84
66
  }
85
67
  /**
86
68
  * @internal
87
69
  */
88
70
  _anchorElChanged(oldValue, newValue) {
89
- if (oldValue)
90
- __privateMethod(this, _cleanupAnchor, cleanupAnchor_fn).call(this, oldValue);
91
- if (newValue)
92
- __privateMethod(this, _setupAnchor, setupAnchor_fn).call(this, newValue);
71
+ if (oldValue) __privateMethod(this, _Toggletip_instances, cleanupAnchor_fn).call(this, oldValue);
72
+ if (newValue) __privateMethod(this, _Toggletip_instances, setupAnchor_fn).call(this, newValue);
93
73
  }
94
74
  };
95
75
  _ANCHOR_ARIA_LABEL_SUFFIX = new WeakMap();
96
- _setupAnchor = new WeakSet();
76
+ _Toggletip_instances = new WeakSet();
97
77
  setupAnchor_fn = function(a) {
98
78
  a.addEventListener("click", __privateGet(this, _openIfClosed), true);
99
79
  a.ariaLabel = (a.ariaLabel ?? "") + __privateGet(this, _ANCHOR_ARIA_LABEL_SUFFIX);
100
- __privateMethod(this, _updateAnchor, updateAnchor_fn).call(this, a);
80
+ __privateMethod(this, _Toggletip_instances, updateAnchor_fn).call(this, a);
101
81
  };
102
- _updateAnchor = new WeakSet();
103
82
  updateAnchor_fn = function(a) {
104
83
  a.setAttribute("aria-expanded", this.open.toString());
105
84
  };
106
- _cleanupAnchor = new WeakSet();
107
85
  cleanupAnchor_fn = function(a) {
108
86
  a.removeEventListener("click", __privateGet(this, _openIfClosed), true);
109
87
  if (a.ariaLabel)
110
88
  a.ariaLabel = a.ariaLabel.replace(__privateGet(this, _ANCHOR_ARIA_LABEL_SUFFIX), "");
111
89
  };
112
90
  _openIfClosed = new WeakMap();
113
- _updateListeners = new WeakSet();
114
91
  updateListeners_fn = function() {
115
92
  document.removeEventListener("click", __privateGet(this, _closeOnClickOutside));
116
93
  document.removeEventListener("keydown", __privateGet(this, _closeOnEscape));