@esri/calcite-components 1.0.0-next.383 → 1.0.0-next.387

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 (63) hide show
  1. package/dist/calcite/calcite.esm.js +1 -1
  2. package/dist/calcite/p-25351c26.system.entry.js +5 -0
  3. package/dist/calcite/p-320b25d0.system.entry.js +5 -0
  4. package/dist/calcite/p-4690db7c.entry.js +5 -0
  5. package/dist/calcite/{p-8f6aac19.entry.js → p-54a979b5.entry.js} +1 -1
  6. package/dist/calcite/p-800e974a.entry.js +5 -0
  7. package/dist/calcite/{p-80e56ba6.system.entry.js → p-8546fe61.system.entry.js} +2 -2
  8. package/dist/calcite/p-95810140.system.js +1 -1
  9. package/dist/calcite/{p-feacdfdf.system.entry.js → p-ba7c83e5.system.entry.js} +1 -1
  10. package/dist/calcite/p-cc4e845c.entry.js +5 -0
  11. package/dist/calcite/p-e86abc5f.entry.js +5 -0
  12. package/dist/calcite/p-ef628ec2.system.entry.js +5 -0
  13. package/dist/cjs/calcite-combobox_3.cjs.entry.js +26 -26
  14. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +2 -1
  15. package/dist/cjs/calcite-popover_2.cjs.entry.js +21 -15
  16. package/dist/cjs/calcite-radio-button.cjs.entry.js +1 -1
  17. package/dist/cjs/calcite-tooltip_2.cjs.entry.js +13 -7
  18. package/dist/cjs/calcite.cjs.js +1 -1
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/collection/components/combobox/combobox.js +27 -28
  21. package/dist/collection/components/dropdown/dropdown.js +2 -1
  22. package/dist/collection/components/popover/popover.css +9 -1
  23. package/dist/collection/components/popover/popover.js +3 -2
  24. package/dist/collection/components/popover/resources.js +1 -0
  25. package/dist/collection/components/popover-manager/popover-manager.js +18 -13
  26. package/dist/collection/components/radio-button/radio-button.js +1 -1
  27. package/dist/collection/components/tooltip-manager/tooltip-manager.js +13 -7
  28. package/dist/components/calcite-combobox.js +26 -27
  29. package/dist/components/calcite-popover-manager.js +18 -13
  30. package/dist/components/calcite-radio-button.js +1 -1
  31. package/dist/components/dropdown.js +2 -1
  32. package/dist/components/popover.js +2 -2
  33. package/dist/components/resources.js +1 -0
  34. package/dist/components/tooltip-manager.js +13 -7
  35. package/dist/custom-elements/index.js +64 -51
  36. package/dist/esm/calcite-combobox_3.entry.js +26 -26
  37. package/dist/esm/calcite-dropdown_3.entry.js +2 -1
  38. package/dist/esm/calcite-popover_2.entry.js +21 -15
  39. package/dist/esm/calcite-radio-button.entry.js +1 -1
  40. package/dist/esm/calcite-tooltip_2.entry.js +13 -7
  41. package/dist/esm/calcite.js +1 -1
  42. package/dist/esm/loader.js +1 -1
  43. package/dist/esm-es5/calcite-combobox_3.entry.js +1 -1
  44. package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
  45. package/dist/esm-es5/calcite-popover_2.entry.js +1 -1
  46. package/dist/esm-es5/calcite-radio-button.entry.js +1 -1
  47. package/dist/esm-es5/calcite-tooltip_2.entry.js +1 -1
  48. package/dist/esm-es5/calcite.js +1 -1
  49. package/dist/esm-es5/loader.js +1 -1
  50. package/dist/extras/docs-json.json +1 -1
  51. package/dist/types/components/combobox/combobox.d.ts +1 -2
  52. package/dist/types/components/popover/resources.d.ts +1 -0
  53. package/dist/types/components/popover-manager/popover-manager.d.ts +1 -1
  54. package/dist/types/components/tooltip-manager/tooltip-manager.d.ts +1 -1
  55. package/hydrate/index.js +63 -51
  56. package/package.json +12 -12
  57. package/dist/calcite/p-0c20a4e3.entry.js +0 -5
  58. package/dist/calcite/p-2d88c0ba.entry.js +0 -5
  59. package/dist/calcite/p-2f81a73d.system.entry.js +0 -5
  60. package/dist/calcite/p-6b529df3.system.entry.js +0 -5
  61. package/dist/calcite/p-a37ecb59.entry.js +0 -5
  62. package/dist/calcite/p-b4e55803.entry.js +0 -5
  63. package/dist/calcite/p-c36161b9.system.entry.js +0 -5
@@ -221,10 +221,9 @@ let Combobox = class extends HTMLElement {
221
221
  this.activeDescendant = "";
222
222
  this.text = "";
223
223
  this.open = this.active;
224
- /** specifies the item wrapper height; it is updated when maxItems is > 0 **/
225
- this.maxScrollerHeight = 0;
226
224
  this.textInput = null;
227
225
  this.mutationObserver = createObserver("mutation", () => this.updateItems());
226
+ this.resizeObserver = createObserver("resize", () => this.setMaxScrollerHeight());
228
227
  this.guid = guid();
229
228
  this.inputHeight = 0;
230
229
  this.ignoreSelectedEventsFlag = false;
@@ -323,9 +322,14 @@ let Combobox = class extends HTMLElement {
323
322
  }
324
323
  };
325
324
  this.setMaxScrollerHeight = () => {
326
- if (this.active) {
327
- this.maxScrollerHeight = this.getMaxScrollerHeight(this.getCombinedItems());
325
+ const { active, listContainerEl } = this;
326
+ if (!listContainerEl || !active) {
327
+ return;
328
328
  }
329
+ this.reposition();
330
+ const maxScrollerHeight = this.getMaxScrollerHeight();
331
+ listContainerEl.style.maxHeight = maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : "";
332
+ this.reposition();
329
333
  };
330
334
  this.calciteChipDismissHandler = (event, comboboxItem) => {
331
335
  this.active = false;
@@ -366,6 +370,7 @@ let Combobox = class extends HTMLElement {
366
370
  this.menuEl = el;
367
371
  };
368
372
  this.setListContainerEl = (el) => {
373
+ this.resizeObserver.observe(el);
369
374
  this.listContainerEl = el;
370
375
  };
371
376
  this.setReferenceEl = (el) => {
@@ -445,15 +450,9 @@ let Combobox = class extends HTMLElement {
445
450
  }
446
451
  else if (!oldValue && newValue) {
447
452
  this.el.addEventListener("calciteComboboxOpen", this.toggleOpenEnd);
448
- // give the combobox height, then reposition prior to opening
449
- requestAnimationFrame(() => {
450
- this.reposition();
451
- this.setMaxScrollerHeight();
452
- this.open = true;
453
- });
453
+ this.open = true;
454
454
  }
455
455
  this.reposition();
456
- this.setMaxScrollerHeight();
457
456
  }
458
457
  maxItemsHandler() {
459
458
  this.setMaxScrollerHeight();
@@ -542,8 +541,9 @@ let Combobox = class extends HTMLElement {
542
541
  }
543
542
  }
544
543
  disconnectedCallback() {
545
- var _a;
544
+ var _a, _b;
546
545
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
546
+ (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
547
547
  this.destroyPopper();
548
548
  disconnectLabel(this);
549
549
  disconnectForm(this);
@@ -586,19 +586,22 @@ let Combobox = class extends HTMLElement {
586
586
  }
587
587
  this.popper = null;
588
588
  }
589
- getMaxScrollerHeight(items) {
589
+ getMaxScrollerHeight() {
590
+ const items = this.getCombinedItems().filter((item) => !item.hidden);
590
591
  const { maxItems } = this;
591
592
  let itemsToProcess = 0;
592
593
  let maxScrollerHeight = 0;
593
- items.forEach((item) => {
594
- if (itemsToProcess < maxItems && maxItems > 0) {
595
- const height = this.calculateSingleItemHeight(item);
596
- if (height > 0) {
597
- maxScrollerHeight += height;
598
- itemsToProcess++;
594
+ if (items.length > maxItems) {
595
+ items.forEach((item) => {
596
+ if (itemsToProcess < maxItems && maxItems > 0) {
597
+ const height = this.calculateSingleItemHeight(item);
598
+ if (height > 0) {
599
+ maxScrollerHeight += height;
600
+ itemsToProcess++;
601
+ }
599
602
  }
600
- }
601
- });
603
+ });
604
+ }
602
605
  return maxScrollerHeight;
603
606
  }
604
607
  calculateSingleItemHeight(item) {
@@ -846,16 +849,13 @@ let Combobox = class extends HTMLElement {
846
849
  return this.visibleItems.map((item) => (h("li", { "aria-selected": (!!item.selected).toString(), id: item.guid ? `${itemUidPrefix}${item.guid}` : null, role: "option", tabindex: "-1" }, item.textLabel)));
847
850
  }
848
851
  renderPopperContainer() {
849
- const { active, maxScrollerHeight, setMenuEl, setListContainerEl, hideList, open } = this;
852
+ const { active, setMenuEl, setListContainerEl, hideList, open } = this;
850
853
  const classes = {
851
854
  "list-container": true,
852
855
  [CSS.animation]: true,
853
856
  [CSS.animationActive]: active
854
857
  };
855
- const style = {
856
- maxHeight: maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : ""
857
- };
858
- return (h("div", { "aria-hidden": "true", class: { "popper-container": true, "popper-container--active": open }, ref: setMenuEl }, h("div", { class: classes, onTransitionEnd: this.transitionEnd, ref: setListContainerEl, style: style }, h("ul", { class: { list: true, "list--hide": hideList } }, h("slot", null)))));
858
+ return (h("div", { "aria-hidden": "true", class: { "popper-container": true, "popper-container--active": open }, ref: setMenuEl }, h("div", { class: classes, onTransitionEnd: this.transitionEnd, ref: setListContainerEl }, h("ul", { class: { list: true, "list--hide": hideList } }, h("slot", null)))));
859
859
  }
860
860
  renderIconStart() {
861
861
  const { selectionMode, needsIcon, selectedItems } = this;
@@ -910,7 +910,6 @@ Combobox = /*@__PURE__*/ proxyCustomElement(Combobox, [1, "calcite-combobox", {
910
910
  "activeDescendant": [32],
911
911
  "text": [32],
912
912
  "open": [32],
913
- "maxScrollerHeight": [32],
914
913
  "reposition": [64],
915
914
  "setFocus": [64]
916
915
  }, [[4, "click", "documentClickHandler"], [0, "calciteComboboxItemChange", "calciteComboboxItemChangeHandler"]]]);
@@ -32,10 +32,16 @@ let PopoverManager = class extends HTMLElement {
32
32
  // Private Methods
33
33
  //
34
34
  //--------------------------------------------------------------------------
35
- this.getRelatedPopover = (element) => {
36
- var _a;
37
- const { selector, el } = this;
38
- const id = (_a = element.closest(selector)) === null || _a === void 0 ? void 0 : _a.getAttribute(POPOVER_REFERENCE);
35
+ this.queryPopover = (composedPath) => {
36
+ const { el } = this;
37
+ if (!composedPath.includes(el)) {
38
+ return null;
39
+ }
40
+ const referenceElement = composedPath.find((pathEl) => { var _a; return (_a = pathEl === null || pathEl === void 0 ? void 0 : pathEl.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(pathEl, POPOVER_REFERENCE); });
41
+ if (!referenceElement) {
42
+ return null;
43
+ }
44
+ const id = referenceElement.getAttribute(POPOVER_REFERENCE);
39
45
  return queryElementRoots(el, { id });
40
46
  };
41
47
  }
@@ -53,20 +59,19 @@ let PopoverManager = class extends HTMLElement {
53
59
  //
54
60
  //--------------------------------------------------------------------------
55
61
  closeOpenPopovers(event) {
56
- const target = event.target;
57
62
  const { autoClose, el } = this;
58
63
  const popoverSelector = "calcite-popover";
59
- const isTargetInsidePopover = target.closest(popoverSelector);
60
- const relatedPopover = this.getRelatedPopover(target);
61
- if (autoClose && !isTargetInsidePopover) {
64
+ const composedPath = event.composedPath();
65
+ const popover = this.queryPopover(composedPath);
66
+ if (popover) {
67
+ popover.toggle();
68
+ return;
69
+ }
70
+ if (autoClose) {
62
71
  queryElementsRoots(el, popoverSelector)
63
- .filter((popover) => popover.open && popover !== relatedPopover)
72
+ .filter((popover) => popover.open && !composedPath.includes(popover))
64
73
  .forEach((popover) => popover.toggle(false));
65
74
  }
66
- if (!el.contains(target) || !relatedPopover) {
67
- return;
68
- }
69
- relatedPopover.toggle();
70
75
  }
71
76
  get el() { return this; }
72
77
  static get style() { return popoverManagerCss; }
@@ -58,7 +58,7 @@ let RadioButton = class extends HTMLElement {
58
58
  items[selectedIndex].click();
59
59
  };
60
60
  this.queryButtons = () => {
61
- return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((radioButton) => radioButton.name === this.name);
61
+ return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter((radioButton) => radioButton.name === this.name);
62
62
  };
63
63
  this.isDefaultSelectable = () => {
64
64
  const radioButtons = this.queryButtons();
@@ -85,8 +85,10 @@ let Dropdown = class extends HTMLElement {
85
85
  if (!scrollerEl || !active) {
86
86
  return;
87
87
  }
88
+ this.reposition();
88
89
  const maxScrollerHeight = this.getMaxScrollerHeight();
89
90
  scrollerEl.style.maxHeight = maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : "";
91
+ this.reposition();
90
92
  };
91
93
  this.setScrollerEl = (scrollerEl) => {
92
94
  this.resizeObserver.observe(scrollerEl);
@@ -144,7 +146,6 @@ let Dropdown = class extends HTMLElement {
144
146
  this.reposition();
145
147
  }
146
148
  maxItemsHandler() {
147
- this.reposition();
148
149
  this.setMaxScrollerHeight();
149
150
  }
150
151
  placementHandler() {
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './action.js';
12
12
  import { d as defineCustomElement$2 } from './icon.js';
13
13
  import { d as defineCustomElement$1 } from './loader.js';
14
14
 
15
- const popoverCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0)}.calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}:host([data-popper-placement^=bottom]) .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}:host([data-popper-placement^=top]) .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}:host([data-popper-placement^=left]) .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}:host([data-popper-placement^=right]) .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}:host([data-popper-placement]) .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.arrow,.arrow::before{position:absolute;width:8px;height:8px;z-index:-1}.arrow::before{content:\"\";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-popper-placement^=top]) .arrow{bottom:-4px}:host([data-popper-placement^=bottom]) .arrow{top:-4px}:host([data-popper-placement^=left]) .arrow{right:-4px}:host([data-popper-placement^=right]) .arrow{left:-4px}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-popper-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:start;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-bottom-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-item-align:center;align-self:center;white-space:normal;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);overflow:hidden}.container.has-header{-ms-flex-direction:column;flex-direction:column}.content{display:-ms-flexbox;display:flex;height:100%;width:100%;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-item-align:center;align-self:center;overflow:hidden}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}";
15
+ const popoverCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0)}.calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}:host([data-popper-placement^=bottom]) .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}:host([data-popper-placement^=top]) .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}:host([data-popper-placement^=left]) .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}:host([data-popper-placement^=right]) .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}:host([data-popper-placement]) .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.arrow,.arrow::before{position:absolute;width:8px;height:8px;z-index:-1}.arrow::before{content:\"\";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-popper-placement^=top]) .arrow{bottom:-4px}:host([data-popper-placement^=bottom]) .arrow{top:-4px}:host([data-popper-placement^=left]) .arrow{right:-4px}:host([data-popper-placement^=right]) .arrow{left:-4px}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-popper-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:start;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-bottom-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-item-align:center;align-self:center;white-space:normal;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}.container.has-header{-ms-flex-direction:column;flex-direction:column}.content{display:-ms-flexbox;display:flex;height:100%;width:100%;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-item-align:center;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}";
16
16
 
17
17
  let Popover = class extends HTMLElement {
18
18
  constructor() {
@@ -249,7 +249,7 @@ let Popover = class extends HTMLElement {
249
249
  // --------------------------------------------------------------------------
250
250
  renderCloseButton() {
251
251
  const { dismissible, closeButton, intlClose } = this;
252
- return dismissible || closeButton ? (h("calcite-action", { class: CSS.closeButton, onClick: this.hide, ref: (closeButtonEl) => (this.closeButtonEl = closeButtonEl), text: intlClose }, h("calcite-icon", { icon: "x", scale: "m" }))) : null;
252
+ return dismissible || closeButton ? (h("div", { class: CSS.closeButtonContainer }, h("calcite-action", { class: CSS.closeButton, onClick: this.hide, ref: (closeButtonEl) => (this.closeButtonEl = closeButtonEl), text: intlClose }, h("calcite-icon", { icon: "x", scale: "m" })))) : null;
253
253
  }
254
254
  renderHeader() {
255
255
  const { heading, headingLevel } = this;
@@ -6,6 +6,7 @@ const CSS = {
6
6
  container: "container",
7
7
  arrow: "arrow",
8
8
  imageContainer: "image-container",
9
+ closeButtonContainer: "close-button-container",
9
10
  closeButton: "close-button",
10
11
  content: "content",
11
12
  hasHeader: "has-header",
@@ -29,10 +29,16 @@ let TooltipManager = class extends HTMLElement {
29
29
  // Private Methods
30
30
  //
31
31
  // --------------------------------------------------------------------------
32
- this.queryTooltip = (element) => {
33
- var _a;
34
- const { selector, el } = this;
35
- const id = (_a = element.closest(selector)) === null || _a === void 0 ? void 0 : _a.getAttribute(TOOLTIP_REFERENCE);
32
+ this.queryTooltip = (composedPath) => {
33
+ const { el } = this;
34
+ if (!composedPath.includes(el)) {
35
+ return null;
36
+ }
37
+ const referenceElement = composedPath.find((pathEl) => { var _a; return (_a = pathEl === null || pathEl === void 0 ? void 0 : pathEl.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(pathEl, TOOLTIP_REFERENCE); });
38
+ if (!referenceElement) {
39
+ return null;
40
+ }
41
+ const id = referenceElement.getAttribute(TOOLTIP_REFERENCE);
36
42
  return queryElementRoots(el, { id });
37
43
  };
38
44
  this.clearHoverTimeout = (tooltip) => {
@@ -89,7 +95,7 @@ let TooltipManager = class extends HTMLElement {
89
95
  }
90
96
  };
91
97
  this.hoverEvent = (event, value) => {
92
- const tooltip = this.queryTooltip(event.target);
98
+ const tooltip = this.queryTooltip(event.composedPath());
93
99
  this.activeTooltipHover(event);
94
100
  if (!tooltip) {
95
101
  return;
@@ -97,7 +103,7 @@ let TooltipManager = class extends HTMLElement {
97
103
  this.hoverTooltip({ tooltip, value });
98
104
  };
99
105
  this.focusEvent = (event, value) => {
100
- const tooltip = this.queryTooltip(event.target);
106
+ const tooltip = this.queryTooltip(event.composedPath());
101
107
  if (!tooltip || tooltip === this.clickedTooltip) {
102
108
  this.clickedTooltip = null;
103
109
  return;
@@ -134,7 +140,7 @@ let TooltipManager = class extends HTMLElement {
134
140
  this.hoverEvent(event, false);
135
141
  }
136
142
  clickHandler(event) {
137
- const clickedTooltip = this.queryTooltip(event.target);
143
+ const clickedTooltip = this.queryTooltip(event.composedPath());
138
144
  this.clickedTooltip = clickedTooltip;
139
145
  if (clickedTooltip) {
140
146
  this.toggleTooltip(clickedTooltip, false);
@@ -9346,10 +9346,9 @@ let Combobox = class extends HTMLElement$1 {
9346
9346
  this.activeDescendant = "";
9347
9347
  this.text = "";
9348
9348
  this.open = this.active;
9349
- /** specifies the item wrapper height; it is updated when maxItems is > 0 **/
9350
- this.maxScrollerHeight = 0;
9351
9349
  this.textInput = null;
9352
9350
  this.mutationObserver = createObserver("mutation", () => this.updateItems());
9351
+ this.resizeObserver = createObserver("resize", () => this.setMaxScrollerHeight());
9353
9352
  this.guid = guid();
9354
9353
  this.inputHeight = 0;
9355
9354
  this.ignoreSelectedEventsFlag = false;
@@ -9448,9 +9447,14 @@ let Combobox = class extends HTMLElement$1 {
9448
9447
  }
9449
9448
  };
9450
9449
  this.setMaxScrollerHeight = () => {
9451
- if (this.active) {
9452
- this.maxScrollerHeight = this.getMaxScrollerHeight(this.getCombinedItems());
9450
+ const { active, listContainerEl } = this;
9451
+ if (!listContainerEl || !active) {
9452
+ return;
9453
9453
  }
9454
+ this.reposition();
9455
+ const maxScrollerHeight = this.getMaxScrollerHeight();
9456
+ listContainerEl.style.maxHeight = maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : "";
9457
+ this.reposition();
9454
9458
  };
9455
9459
  this.calciteChipDismissHandler = (event, comboboxItem) => {
9456
9460
  this.active = false;
@@ -9491,6 +9495,7 @@ let Combobox = class extends HTMLElement$1 {
9491
9495
  this.menuEl = el;
9492
9496
  };
9493
9497
  this.setListContainerEl = (el) => {
9498
+ this.resizeObserver.observe(el);
9494
9499
  this.listContainerEl = el;
9495
9500
  };
9496
9501
  this.setReferenceEl = (el) => {
@@ -9570,15 +9575,9 @@ let Combobox = class extends HTMLElement$1 {
9570
9575
  }
9571
9576
  else if (!oldValue && newValue) {
9572
9577
  this.el.addEventListener("calciteComboboxOpen", this.toggleOpenEnd);
9573
- // give the combobox height, then reposition prior to opening
9574
- requestAnimationFrame(() => {
9575
- this.reposition();
9576
- this.setMaxScrollerHeight();
9577
- this.open = true;
9578
- });
9578
+ this.open = true;
9579
9579
  }
9580
9580
  this.reposition();
9581
- this.setMaxScrollerHeight();
9582
9581
  }
9583
9582
  maxItemsHandler() {
9584
9583
  this.setMaxScrollerHeight();
@@ -9667,8 +9666,9 @@ let Combobox = class extends HTMLElement$1 {
9667
9666
  }
9668
9667
  }
9669
9668
  disconnectedCallback() {
9670
- var _a;
9669
+ var _a, _b;
9671
9670
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
9671
+ (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
9672
9672
  this.destroyPopper();
9673
9673
  disconnectLabel(this);
9674
9674
  disconnectForm(this);
@@ -9711,19 +9711,22 @@ let Combobox = class extends HTMLElement$1 {
9711
9711
  }
9712
9712
  this.popper = null;
9713
9713
  }
9714
- getMaxScrollerHeight(items) {
9714
+ getMaxScrollerHeight() {
9715
+ const items = this.getCombinedItems().filter((item) => !item.hidden);
9715
9716
  const { maxItems } = this;
9716
9717
  let itemsToProcess = 0;
9717
9718
  let maxScrollerHeight = 0;
9718
- items.forEach((item) => {
9719
- if (itemsToProcess < maxItems && maxItems > 0) {
9720
- const height = this.calculateSingleItemHeight(item);
9721
- if (height > 0) {
9722
- maxScrollerHeight += height;
9723
- itemsToProcess++;
9719
+ if (items.length > maxItems) {
9720
+ items.forEach((item) => {
9721
+ if (itemsToProcess < maxItems && maxItems > 0) {
9722
+ const height = this.calculateSingleItemHeight(item);
9723
+ if (height > 0) {
9724
+ maxScrollerHeight += height;
9725
+ itemsToProcess++;
9726
+ }
9724
9727
  }
9725
- }
9726
- });
9728
+ });
9729
+ }
9727
9730
  return maxScrollerHeight;
9728
9731
  }
9729
9732
  calculateSingleItemHeight(item) {
@@ -9971,16 +9974,13 @@ let Combobox = class extends HTMLElement$1 {
9971
9974
  return this.visibleItems.map((item) => (h("li", { "aria-selected": (!!item.selected).toString(), id: item.guid ? `${itemUidPrefix}${item.guid}` : null, role: "option", tabindex: "-1" }, item.textLabel)));
9972
9975
  }
9973
9976
  renderPopperContainer() {
9974
- const { active, maxScrollerHeight, setMenuEl, setListContainerEl, hideList, open } = this;
9977
+ const { active, setMenuEl, setListContainerEl, hideList, open } = this;
9975
9978
  const classes = {
9976
9979
  "list-container": true,
9977
9980
  [CSS$D.animation]: true,
9978
9981
  [CSS$D.animationActive]: active
9979
9982
  };
9980
- const style = {
9981
- maxHeight: maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : ""
9982
- };
9983
- return (h("div", { "aria-hidden": "true", class: { "popper-container": true, "popper-container--active": open }, ref: setMenuEl }, h("div", { class: classes, onTransitionEnd: this.transitionEnd, ref: setListContainerEl, style: style }, h("ul", { class: { list: true, "list--hide": hideList } }, h("slot", null)))));
9983
+ return (h("div", { "aria-hidden": "true", class: { "popper-container": true, "popper-container--active": open }, ref: setMenuEl }, h("div", { class: classes, onTransitionEnd: this.transitionEnd, ref: setListContainerEl }, h("ul", { class: { list: true, "list--hide": hideList } }, h("slot", null)))));
9984
9984
  }
9985
9985
  renderIconStart() {
9986
9986
  const { selectionMode, needsIcon, selectedItems } = this;
@@ -11512,8 +11512,10 @@ let Dropdown = class extends HTMLElement$1 {
11512
11512
  if (!scrollerEl || !active) {
11513
11513
  return;
11514
11514
  }
11515
+ this.reposition();
11515
11516
  const maxScrollerHeight = this.getMaxScrollerHeight();
11516
11517
  scrollerEl.style.maxHeight = maxScrollerHeight > 0 ? `${maxScrollerHeight}px` : "";
11518
+ this.reposition();
11517
11519
  };
11518
11520
  this.setScrollerEl = (scrollerEl) => {
11519
11521
  this.resizeObserver.observe(scrollerEl);
@@ -11571,7 +11573,6 @@ let Dropdown = class extends HTMLElement$1 {
11571
11573
  this.reposition();
11572
11574
  }
11573
11575
  maxItemsHandler() {
11574
- this.reposition();
11575
11576
  this.setMaxScrollerHeight();
11576
11577
  }
11577
11578
  placementHandler() {
@@ -16406,6 +16407,7 @@ const CSS$g = {
16406
16407
  container: "container",
16407
16408
  arrow: "arrow",
16408
16409
  imageContainer: "image-container",
16410
+ closeButtonContainer: "close-button-container",
16409
16411
  closeButton: "close-button",
16410
16412
  content: "content",
16411
16413
  hasHeader: "has-header",
@@ -16421,7 +16423,7 @@ const ARIA_CONTROLS = "aria-controls";
16421
16423
  const ARIA_EXPANDED = "aria-expanded";
16422
16424
  const HEADING_LEVEL$2 = 2;
16423
16425
 
16424
- const popoverCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0)}.calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}:host([data-popper-placement^=bottom]) .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}:host([data-popper-placement^=top]) .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}:host([data-popper-placement^=left]) .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}:host([data-popper-placement^=right]) .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}:host([data-popper-placement]) .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.arrow,.arrow::before{position:absolute;width:8px;height:8px;z-index:-1}.arrow::before{content:\"\";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-popper-placement^=top]) .arrow{bottom:-4px}:host([data-popper-placement^=bottom]) .arrow{top:-4px}:host([data-popper-placement^=left]) .arrow{right:-4px}:host([data-popper-placement^=right]) .arrow{left:-4px}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-popper-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:start;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-bottom-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-item-align:center;align-self:center;white-space:normal;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);overflow:hidden}.container.has-header{-ms-flex-direction:column;flex-direction:column}.content{display:-ms-flexbox;display:flex;height:100%;width:100%;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-item-align:center;align-self:center;overflow:hidden}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}";
16426
+ const popoverCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0)}.calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}:host([data-popper-placement^=bottom]) .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}:host([data-popper-placement^=top]) .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}:host([data-popper-placement^=left]) .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}:host([data-popper-placement^=right]) .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}:host([data-popper-placement]) .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.arrow,.arrow::before{position:absolute;width:8px;height:8px;z-index:-1}.arrow::before{content:\"\";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-popper-placement^=top]) .arrow{bottom:-4px}:host([data-popper-placement^=bottom]) .arrow{top:-4px}:host([data-popper-placement^=left]) .arrow{right:-4px}:host([data-popper-placement^=right]) .arrow{left:-4px}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-popper-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:start;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-bottom-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-item-align:center;align-self:center;white-space:normal;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}.container.has-header{-ms-flex-direction:column;flex-direction:column}.content{display:-ms-flexbox;display:flex;height:100%;width:100%;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-item-align:center;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}";
16425
16427
 
16426
16428
  let Popover = class extends HTMLElement$1 {
16427
16429
  constructor() {
@@ -16658,7 +16660,7 @@ let Popover = class extends HTMLElement$1 {
16658
16660
  // --------------------------------------------------------------------------
16659
16661
  renderCloseButton() {
16660
16662
  const { dismissible, closeButton, intlClose } = this;
16661
- return dismissible || closeButton ? (h("calcite-action", { class: CSS$g.closeButton, onClick: this.hide, ref: (closeButtonEl) => (this.closeButtonEl = closeButtonEl), text: intlClose }, h("calcite-icon", { icon: "x", scale: "m" }))) : null;
16663
+ return dismissible || closeButton ? (h("div", { class: CSS$g.closeButtonContainer }, h("calcite-action", { class: CSS$g.closeButton, onClick: this.hide, ref: (closeButtonEl) => (this.closeButtonEl = closeButtonEl), text: intlClose }, h("calcite-icon", { icon: "x", scale: "m" })))) : null;
16662
16664
  }
16663
16665
  renderHeader() {
16664
16666
  const { heading, headingLevel } = this;
@@ -16715,10 +16717,16 @@ let PopoverManager = class extends HTMLElement$1 {
16715
16717
  // Private Methods
16716
16718
  //
16717
16719
  //--------------------------------------------------------------------------
16718
- this.getRelatedPopover = (element) => {
16719
- var _a;
16720
- const { selector, el } = this;
16721
- const id = (_a = element.closest(selector)) === null || _a === void 0 ? void 0 : _a.getAttribute(POPOVER_REFERENCE);
16720
+ this.queryPopover = (composedPath) => {
16721
+ const { el } = this;
16722
+ if (!composedPath.includes(el)) {
16723
+ return null;
16724
+ }
16725
+ const referenceElement = composedPath.find((pathEl) => { var _a; return (_a = pathEl === null || pathEl === void 0 ? void 0 : pathEl.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(pathEl, POPOVER_REFERENCE); });
16726
+ if (!referenceElement) {
16727
+ return null;
16728
+ }
16729
+ const id = referenceElement.getAttribute(POPOVER_REFERENCE);
16722
16730
  return queryElementRoots(el, { id });
16723
16731
  };
16724
16732
  }
@@ -16736,20 +16744,19 @@ let PopoverManager = class extends HTMLElement$1 {
16736
16744
  //
16737
16745
  //--------------------------------------------------------------------------
16738
16746
  closeOpenPopovers(event) {
16739
- const target = event.target;
16740
16747
  const { autoClose, el } = this;
16741
16748
  const popoverSelector = "calcite-popover";
16742
- const isTargetInsidePopover = target.closest(popoverSelector);
16743
- const relatedPopover = this.getRelatedPopover(target);
16744
- if (autoClose && !isTargetInsidePopover) {
16749
+ const composedPath = event.composedPath();
16750
+ const popover = this.queryPopover(composedPath);
16751
+ if (popover) {
16752
+ popover.toggle();
16753
+ return;
16754
+ }
16755
+ if (autoClose) {
16745
16756
  queryElementsRoots(el, popoverSelector)
16746
- .filter((popover) => popover.open && popover !== relatedPopover)
16757
+ .filter((popover) => popover.open && !composedPath.includes(popover))
16747
16758
  .forEach((popover) => popover.toggle(false));
16748
16759
  }
16749
- if (!el.contains(target) || !relatedPopover) {
16750
- return;
16751
- }
16752
- relatedPopover.toggle();
16753
16760
  }
16754
16761
  get el() { return this; }
16755
16762
  static get style() { return popoverManagerCss; }
@@ -16831,7 +16838,7 @@ let RadioButton = class extends HTMLElement$1 {
16831
16838
  items[selectedIndex].click();
16832
16839
  };
16833
16840
  this.queryButtons = () => {
16834
- return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((radioButton) => radioButton.name === this.name);
16841
+ return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter((radioButton) => radioButton.name === this.name);
16835
16842
  };
16836
16843
  this.isDefaultSelectable = () => {
16837
16844
  const radioButtons = this.queryButtons();
@@ -24588,10 +24595,16 @@ let TooltipManager = class extends HTMLElement$1 {
24588
24595
  // Private Methods
24589
24596
  //
24590
24597
  // --------------------------------------------------------------------------
24591
- this.queryTooltip = (element) => {
24592
- var _a;
24593
- const { selector, el } = this;
24594
- const id = (_a = element.closest(selector)) === null || _a === void 0 ? void 0 : _a.getAttribute(TOOLTIP_REFERENCE);
24598
+ this.queryTooltip = (composedPath) => {
24599
+ const { el } = this;
24600
+ if (!composedPath.includes(el)) {
24601
+ return null;
24602
+ }
24603
+ const referenceElement = composedPath.find((pathEl) => { var _a; return (_a = pathEl === null || pathEl === void 0 ? void 0 : pathEl.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(pathEl, TOOLTIP_REFERENCE); });
24604
+ if (!referenceElement) {
24605
+ return null;
24606
+ }
24607
+ const id = referenceElement.getAttribute(TOOLTIP_REFERENCE);
24595
24608
  return queryElementRoots(el, { id });
24596
24609
  };
24597
24610
  this.clearHoverTimeout = (tooltip) => {
@@ -24648,7 +24661,7 @@ let TooltipManager = class extends HTMLElement$1 {
24648
24661
  }
24649
24662
  };
24650
24663
  this.hoverEvent = (event, value) => {
24651
- const tooltip = this.queryTooltip(event.target);
24664
+ const tooltip = this.queryTooltip(event.composedPath());
24652
24665
  this.activeTooltipHover(event);
24653
24666
  if (!tooltip) {
24654
24667
  return;
@@ -24656,7 +24669,7 @@ let TooltipManager = class extends HTMLElement$1 {
24656
24669
  this.hoverTooltip({ tooltip, value });
24657
24670
  };
24658
24671
  this.focusEvent = (event, value) => {
24659
- const tooltip = this.queryTooltip(event.target);
24672
+ const tooltip = this.queryTooltip(event.composedPath());
24660
24673
  if (!tooltip || tooltip === this.clickedTooltip) {
24661
24674
  this.clickedTooltip = null;
24662
24675
  return;
@@ -24693,7 +24706,7 @@ let TooltipManager = class extends HTMLElement$1 {
24693
24706
  this.hoverEvent(event, false);
24694
24707
  }
24695
24708
  clickHandler(event) {
24696
- const clickedTooltip = this.queryTooltip(event.target);
24709
+ const clickedTooltip = this.queryTooltip(event.composedPath());
24697
24710
  this.clickedTooltip = clickedTooltip;
24698
24711
  if (clickedTooltip) {
24699
24712
  this.toggleTooltip(clickedTooltip, false);
@@ -25526,7 +25539,7 @@ const CalciteChip = /*@__PURE__*/proxyCustomElement(Chip, [1,"calcite-chip",{"ap
25526
25539
  const CalciteColorPicker = /*@__PURE__*/proxyCustomElement(ColorPicker, [1,"calcite-color-picker",{"allowEmpty":[4,"allow-empty"],"appearance":[513],"color":[1040],"format":[1],"hideHex":[4,"hide-hex"],"hideChannels":[4,"hide-channels"],"hideSaved":[4,"hide-saved"],"intlB":[1,"intl-b"],"intlBlue":[1,"intl-blue"],"intlDeleteColor":[1,"intl-delete-color"],"intlG":[1,"intl-g"],"intlGreen":[1,"intl-green"],"intlH":[1,"intl-h"],"intlHsv":[1,"intl-hsv"],"intlHex":[1,"intl-hex"],"intlHue":[1,"intl-hue"],"intlNoColor":[1,"intl-no-color"],"intlR":[1,"intl-r"],"intlRed":[1,"intl-red"],"intlRgb":[1,"intl-rgb"],"intlS":[1,"intl-s"],"intlSaturation":[1,"intl-saturation"],"intlSaveColor":[1,"intl-save-color"],"intlSaved":[1,"intl-saved"],"intlV":[1,"intl-v"],"intlValue":[1,"intl-value"],"scale":[513],"storageId":[1,"storage-id"],"value":[1025],"colorFieldAndSliderInteractive":[32],"channelMode":[32],"channels":[32],"dimensions":[32],"savedColors":[32],"colorFieldScopeTop":[32],"colorFieldScopeLeft":[32],"scopeOrientation":[32],"hueScopeLeft":[32],"hueScopeTop":[32]},[[2,"keydown","handleChannelKeyUpOrDown"],[2,"keyup","handleChannelKeyUpOrDown"]]]);
25527
25540
  const CalciteColorPickerHexInput = /*@__PURE__*/proxyCustomElement(ColorPickerHexInput, [1,"calcite-color-picker-hex-input",{"allowEmpty":[4,"allow-empty"],"intlHex":[1,"intl-hex"],"intlNoColor":[1,"intl-no-color"],"scale":[513],"value":[1537],"internalColor":[32]},[[2,"keydown","onInputKeyDown"]]]);
25528
25541
  const CalciteColorPickerSwatch = /*@__PURE__*/proxyCustomElement(ColorPickerSwatch, [1,"calcite-color-picker-swatch",{"active":[516],"color":[1],"scale":[513]}]);
25529
- const CalciteCombobox = /*@__PURE__*/proxyCustomElement(Combobox, [1,"calcite-combobox",{"active":[1540],"disabled":[516],"label":[1],"placeholder":[1],"maxItems":[2,"max-items"],"name":[513],"allowCustomValues":[4,"allow-custom-values"],"overlayPositioning":[1,"overlay-positioning"],"required":[4],"selectionMode":[513,"selection-mode"],"scale":[513],"value":[1025],"intlRemoveTag":[1,"intl-remove-tag"],"items":[32],"groupItems":[32],"selectedItems":[32],"visibleItems":[32],"needsIcon":[32],"hideList":[32],"activeItemIndex":[32],"activeChipIndex":[32],"activeDescendant":[32],"text":[32],"open":[32],"maxScrollerHeight":[32]},[[4,"click","documentClickHandler"],[0,"calciteComboboxItemChange","calciteComboboxItemChangeHandler"]]]);
25542
+ const CalciteCombobox = /*@__PURE__*/proxyCustomElement(Combobox, [1,"calcite-combobox",{"active":[1540],"disabled":[516],"label":[1],"placeholder":[1],"maxItems":[2,"max-items"],"name":[513],"allowCustomValues":[4,"allow-custom-values"],"overlayPositioning":[1,"overlay-positioning"],"required":[4],"selectionMode":[513,"selection-mode"],"scale":[513],"value":[1025],"intlRemoveTag":[1,"intl-remove-tag"],"items":[32],"groupItems":[32],"selectedItems":[32],"visibleItems":[32],"needsIcon":[32],"hideList":[32],"activeItemIndex":[32],"activeChipIndex":[32],"activeDescendant":[32],"text":[32],"open":[32]},[[4,"click","documentClickHandler"],[0,"calciteComboboxItemChange","calciteComboboxItemChangeHandler"]]]);
25530
25543
  const CalciteComboboxItem = /*@__PURE__*/proxyCustomElement(ComboboxItem, [1,"calcite-combobox-item",{"disabled":[516],"selected":[1540],"active":[4],"ancestors":[1040],"guid":[1],"icon":[1],"textLabel":[513,"text-label"],"value":[8],"constant":[516]}]);
25531
25544
  const CalciteComboboxItemGroup = /*@__PURE__*/proxyCustomElement(ComboboxItemGroup, [1,"calcite-combobox-item-group",{"ancestors":[1040],"label":[1]}]);
25532
25545
  const CalciteDatePicker = /*@__PURE__*/proxyCustomElement(DatePicker, [1,"calcite-date-picker",{"activeRange":[1,"active-range"],"value":[1025],"headingLevel":[2,"heading-level"],"valueAsDate":[1040],"startAsDate":[1040],"endAsDate":[1040],"minAsDate":[1040],"maxAsDate":[1040],"min":[1025],"max":[1025],"intlPrevMonth":[1,"intl-prev-month"],"intlNextMonth":[1,"intl-next-month"],"intlYear":[1,"intl-year"],"locale":[1],"scale":[513],"range":[516],"start":[1025],"end":[1025],"proximitySelectionDisabled":[4,"proximity-selection-disabled"],"activeDate":[32],"activeStartDate":[32],"activeEndDate":[32],"localeData":[32],"hoverRange":[32]}]);