@swisspost/design-system-components 9.0.2 → 9.0.3

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 (131) hide show
  1. package/dist/cjs/index.cjs.js +17 -17
  2. package/dist/cjs/{package-50bf984c.js → package-5ee5fe83.js} +1 -1
  3. package/dist/cjs/{post-accordion-a1a67fe9.js → post-accordion-9b899815.js} +1 -1
  4. package/dist/cjs/{post-accordion-item-5cee82d3.js → post-accordion-item-b6c9964a.js} +1 -1
  5. package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
  6. package/dist/cjs/post-accordion.cjs.entry.js +2 -2
  7. package/dist/cjs/{post-alert-ffd5a819.js → post-alert-268a495d.js} +1 -1
  8. package/dist/cjs/post-alert.cjs.entry.js +2 -2
  9. package/dist/cjs/{post-card-control-b2088c83.js → post-card-control-68ae617e.js} +1 -1
  10. package/dist/cjs/post-card-control.cjs.entry.js +2 -2
  11. package/dist/cjs/{post-collapsible-trigger-02e00228.js → post-collapsible-trigger-261c2f39.js} +1 -1
  12. package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -2
  13. package/dist/cjs/{post-icon-6ee76a68.js → post-icon-8d216122.js} +1 -1
  14. package/dist/cjs/post-icon.cjs.entry.js +2 -2
  15. package/dist/cjs/{post-logo-65ccaf3b.js → post-logo-10605a3e.js} +1 -1
  16. package/dist/cjs/post-logo.cjs.entry.js +2 -2
  17. package/dist/cjs/{post-popover-79dc99ac.js → post-popover-107fb291.js} +1 -1
  18. package/dist/cjs/post-popover.cjs.entry.js +2 -2
  19. package/dist/cjs/{post-popovercontainer-143415c5.js → post-popovercontainer-c0ff61d0.js} +99 -48
  20. package/dist/cjs/post-popovercontainer.cjs.entry.js +2 -2
  21. package/dist/cjs/{post-rating-fceee056.js → post-rating-88558157.js} +1 -1
  22. package/dist/cjs/post-rating.cjs.entry.js +2 -2
  23. package/dist/cjs/{post-tab-header-7b1c0cc2.js → post-tab-header-d37d1e70.js} +1 -1
  24. package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
  25. package/dist/cjs/{post-tab-panel-09044912.js → post-tab-panel-cf6187fa.js} +1 -1
  26. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  27. package/dist/cjs/{post-tabs-7e910585.js → post-tabs-bca7d2d7.js} +1 -1
  28. package/dist/cjs/post-tabs.cjs.entry.js +2 -2
  29. package/dist/cjs/{post-tag-975194dd.js → post-tag-407cfc5b.js} +1 -1
  30. package/dist/cjs/post-tag.cjs.entry.js +2 -2
  31. package/dist/cjs/{post-tooltip-0a620738.js → post-tooltip-d8f4cd0d.js} +1 -1
  32. package/dist/cjs/{post-tooltip-trigger-32910e44.js → post-tooltip-trigger-94e84223.js} +15 -16
  33. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +2 -2
  34. package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
  35. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +14 -15
  36. package/dist/components/package.js +1 -1
  37. package/dist/components/post-popovercontainer2.js +98 -47
  38. package/dist/components/post-tooltip-trigger2.js +14 -15
  39. package/dist/docs.json +1 -1
  40. package/dist/esm/index.js +17 -17
  41. package/dist/esm/{package-e199a39d.js → package-8f0ae314.js} +1 -1
  42. package/dist/esm/{post-accordion-35147f4e.js → post-accordion-18fa6132.js} +1 -1
  43. package/dist/esm/{post-accordion-item-e2dd3a5a.js → post-accordion-item-419fcfe2.js} +1 -1
  44. package/dist/esm/post-accordion-item.entry.js +2 -2
  45. package/dist/esm/post-accordion.entry.js +2 -2
  46. package/dist/esm/{post-alert-c643ddc8.js → post-alert-253b376b.js} +1 -1
  47. package/dist/esm/post-alert.entry.js +2 -2
  48. package/dist/esm/{post-card-control-558c0eb2.js → post-card-control-0010aad4.js} +1 -1
  49. package/dist/esm/post-card-control.entry.js +2 -2
  50. package/dist/esm/{post-collapsible-trigger-dab62771.js → post-collapsible-trigger-66131243.js} +1 -1
  51. package/dist/esm/post-collapsible_2.entry.js +2 -2
  52. package/dist/esm/{post-icon-04077f8b.js → post-icon-b054352c.js} +1 -1
  53. package/dist/esm/post-icon.entry.js +2 -2
  54. package/dist/esm/{post-logo-04f83c6f.js → post-logo-38005da6.js} +1 -1
  55. package/dist/esm/post-logo.entry.js +2 -2
  56. package/dist/esm/{post-popover-a45d8ccf.js → post-popover-b6200ea0.js} +1 -1
  57. package/dist/esm/post-popover.entry.js +2 -2
  58. package/dist/esm/{post-popovercontainer-6b908f81.js → post-popovercontainer-dced2841.js} +99 -48
  59. package/dist/esm/post-popovercontainer.entry.js +2 -2
  60. package/dist/esm/{post-rating-dfd671c2.js → post-rating-a3b7e183.js} +1 -1
  61. package/dist/esm/post-rating.entry.js +2 -2
  62. package/dist/esm/{post-tab-header-35ee01d9.js → post-tab-header-49bdb6b7.js} +1 -1
  63. package/dist/esm/post-tab-header.entry.js +2 -2
  64. package/dist/esm/{post-tab-panel-53a52f41.js → post-tab-panel-2be8c912.js} +1 -1
  65. package/dist/esm/post-tab-panel.entry.js +2 -2
  66. package/dist/esm/{post-tabs-dfdbfe58.js → post-tabs-0695851c.js} +1 -1
  67. package/dist/esm/post-tabs.entry.js +2 -2
  68. package/dist/esm/{post-tag-6b8fc996.js → post-tag-92e433d8.js} +1 -1
  69. package/dist/esm/post-tag.entry.js +2 -2
  70. package/dist/esm/{post-tooltip-d1739fcd.js → post-tooltip-b7c47a15.js} +1 -1
  71. package/dist/esm/{post-tooltip-trigger-25718071.js → post-tooltip-trigger-d6fae10a.js} +15 -16
  72. package/dist/esm/post-tooltip-trigger.entry.js +2 -2
  73. package/dist/esm/post-tooltip.entry.js +2 -2
  74. package/dist/post-components/index.esm.js +1 -1
  75. package/dist/post-components/{p-0058b862.js → p-067e9412.js} +1 -1
  76. package/dist/post-components/p-0a59a271.entry.js +1 -0
  77. package/dist/post-components/{p-abb4d5e4.js → p-20e1604b.js} +1 -1
  78. package/dist/post-components/p-22506477.entry.js +1 -0
  79. package/dist/post-components/{p-b1fcc296.entry.js → p-248aaa99.entry.js} +1 -1
  80. package/dist/post-components/p-26d034ef.entry.js +1 -0
  81. package/dist/post-components/{p-e76edf25.js → p-27080bfb.js} +1 -1
  82. package/dist/post-components/{p-1f440d9d.js → p-2fb07f77.js} +1 -1
  83. package/dist/post-components/{p-e99c825b.js → p-3369da47.js} +1 -1
  84. package/dist/post-components/{p-0cd2e5d0.js → p-420b004b.js} +2 -2
  85. package/dist/post-components/p-45c6f495.js +1 -0
  86. package/dist/post-components/p-50eeae43.entry.js +1 -0
  87. package/dist/post-components/p-51537cc0.entry.js +1 -0
  88. package/dist/post-components/{p-97f1379e.js → p-54468eb1.js} +1 -1
  89. package/dist/post-components/{p-7171667d.js → p-59cbed23.js} +1 -1
  90. package/dist/post-components/p-61808438.entry.js +1 -0
  91. package/dist/post-components/p-65392ded.entry.js +1 -0
  92. package/dist/post-components/p-667d7521.entry.js +1 -0
  93. package/dist/post-components/p-72500d90.entry.js +1 -0
  94. package/dist/post-components/{p-876f1954.js → p-815f19ca.js} +1 -1
  95. package/dist/post-components/p-8217faac.js +1 -0
  96. package/dist/post-components/p-a05b39f5.js +1 -0
  97. package/dist/post-components/p-bd58b67d.entry.js +1 -0
  98. package/dist/post-components/{p-b963d836.js → p-d376359a.js} +1 -1
  99. package/dist/post-components/{p-f62ba0e1.js → p-e45ba9a7.js} +1 -1
  100. package/dist/post-components/{p-5c26f706.js → p-e568d74d.js} +1 -1
  101. package/dist/post-components/p-e5b6268f.entry.js +1 -0
  102. package/dist/post-components/p-ee55eec3.entry.js +1 -0
  103. package/dist/post-components/p-efd36fcb.js +1 -0
  104. package/dist/post-components/p-f589212f.entry.js +1 -0
  105. package/dist/post-components/p-f6a89108.entry.js +1 -0
  106. package/dist/post-components/p-f81fe53a.entry.js +1 -0
  107. package/dist/post-components/{p-c8d1bd9a.js → p-feeb3e96.js} +1 -1
  108. package/dist/post-components/post-components.esm.js +1 -1
  109. package/loaders/package.js +1 -1
  110. package/loaders/post-popovercontainer2.js +98 -47
  111. package/loaders/post-tooltip-trigger.js +14 -15
  112. package/package.json +2 -2
  113. package/dist/post-components/p-08f23aa4.js +0 -1
  114. package/dist/post-components/p-0e5efc5b.entry.js +0 -1
  115. package/dist/post-components/p-14b573f8.entry.js +0 -1
  116. package/dist/post-components/p-1c8656e9.entry.js +0 -1
  117. package/dist/post-components/p-3792f15a.entry.js +0 -1
  118. package/dist/post-components/p-3dacfa68.entry.js +0 -1
  119. package/dist/post-components/p-5736d28f.entry.js +0 -1
  120. package/dist/post-components/p-5be93321.js +0 -1
  121. package/dist/post-components/p-664ff6f8.entry.js +0 -1
  122. package/dist/post-components/p-6c845f02.entry.js +0 -1
  123. package/dist/post-components/p-79631d8f.entry.js +0 -1
  124. package/dist/post-components/p-7e0f3b4d.entry.js +0 -1
  125. package/dist/post-components/p-7fcf3c80.entry.js +0 -1
  126. package/dist/post-components/p-9bf94cb3.js +0 -1
  127. package/dist/post-components/p-9e89e8db.entry.js +0 -1
  128. package/dist/post-components/p-b77e45f0.entry.js +0 -1
  129. package/dist/post-components/p-dc027837.js +0 -1
  130. package/dist/post-components/p-e1a039ae.entry.js +0 -1
  131. package/dist/post-components/p-fdedcd9d.entry.js +0 -1
@@ -25,14 +25,11 @@ export class PostTooltipTrigger {
25
25
  validateControlFor() {
26
26
  checkType(this.for, // The actual property value
27
27
  'string', // The expected type
28
- 'The "for" property must be a string' // A meaningful error message
29
- );
28
+ 'The "for" property must be a string');
30
29
  }
31
30
  get tooltip() {
32
31
  const ref = document.getElementById(this.for);
33
- return (ref === null || ref === void 0 ? void 0 : ref.localName) === 'post-tooltip'
34
- ? ref
35
- : null;
32
+ return (ref === null || ref === void 0 ? void 0 : ref.localName) === 'post-tooltip' ? ref : null;
36
33
  }
37
34
  componentDidLoad() {
38
35
  this.setupTrigger();
@@ -140,22 +137,24 @@ export class PostTooltipTrigger {
140
137
  handleLeave(event) {
141
138
  const newTarget = event.relatedTarget;
142
139
  if ((this.tooltip && newTarget && this.tooltip.contains(newTarget)) ||
143
- (newTarget === this.trigger)) {
140
+ newTarget === this.trigger) {
144
141
  return;
145
142
  }
146
143
  this.interestLostHandler();
147
144
  }
148
145
  interestHandler() {
149
146
  var _a;
150
- if (this.delay > 0) {
151
- this.delayTimeout = window.setTimeout(() => {
152
- var _a;
147
+ if (this.trigger) {
148
+ if (this.delay > 0) {
149
+ this.delayTimeout = window.setTimeout(() => {
150
+ var _a;
151
+ (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.show(this.trigger);
152
+ this.delayTimeout = null;
153
+ }, this.delay);
154
+ }
155
+ else {
153
156
  (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.show(this.trigger);
154
- this.delayTimeout = null;
155
- }, this.delay);
156
- }
157
- else {
158
- (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.show(this.trigger);
157
+ }
159
158
  }
160
159
  }
161
160
  interestLostHandler() {
@@ -167,7 +166,7 @@ export class PostTooltipTrigger {
167
166
  (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.hide();
168
167
  }
169
168
  render() {
170
- return (h(Host, { key: 'a37c76972c4db24292fa95ddacf097055dea70f0', "data-version": version }, h("slot", { key: '51de3cd7dedfc1c5fe5ef86fbf0ab953d07945cb', onSlotchange: () => this.handleSlotChange() })));
169
+ return (h(Host, { key: '5e30c67f3ac854cb8c589978319ded51673c3380', "data-version": version }, h("slot", { key: '3aea5ba44638a4b2b904125c10bd22b9c20474f3', onSlotchange: () => this.handleSlotChange() })));
171
170
  }
172
171
  static get is() { return "post-tooltip-trigger"; }
173
172
  static get encapsulation() { return "shadow"; }
@@ -1,3 +1,3 @@
1
- const version = "9.0.2";
1
+ const version = "9.0.3";
2
2
 
3
3
  export { version as v };
@@ -45,8 +45,9 @@ function getOppositeAxis(axis) {
45
45
  function getAxisLength(axis) {
46
46
  return axis === 'y' ? 'height' : 'width';
47
47
  }
48
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
48
49
  function getSideAxis(placement) {
49
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
50
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
50
51
  }
51
52
  function getAlignmentAxis(placement) {
52
53
  return getOppositeAxis(getSideAxis(placement));
@@ -71,19 +72,19 @@ function getExpandedPlacements(placement) {
71
72
  function getOppositeAlignmentPlacement(placement) {
72
73
  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
73
74
  }
75
+ const lrPlacement = ['left', 'right'];
76
+ const rlPlacement = ['right', 'left'];
77
+ const tbPlacement = ['top', 'bottom'];
78
+ const btPlacement = ['bottom', 'top'];
74
79
  function getSideList(side, isStart, rtl) {
75
- const lr = ['left', 'right'];
76
- const rl = ['right', 'left'];
77
- const tb = ['top', 'bottom'];
78
- const bt = ['bottom', 'top'];
79
80
  switch (side) {
80
81
  case 'top':
81
82
  case 'bottom':
82
- if (rtl) return isStart ? rl : lr;
83
- return isStart ? lr : rl;
83
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
84
+ return isStart ? lrPlacement : rlPlacement;
84
85
  case 'left':
85
86
  case 'right':
86
- return isStart ? tb : bt;
87
+ return isStart ? tbPlacement : btPlacement;
87
88
  default:
88
89
  return [];
89
90
  }
@@ -323,9 +324,10 @@ async function detectOverflow(state, options) {
323
324
  strategy
324
325
  }));
325
326
  const rect = elementContext === 'floating' ? {
326
- ...rects.floating,
327
327
  x,
328
- y
328
+ y,
329
+ width: rects.floating.width,
330
+ height: rects.floating.height
329
331
  } : rects.reference;
330
332
  const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
331
333
  const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
@@ -575,10 +577,12 @@ const flip$1 = function (options) {
575
577
  return {};
576
578
  }
577
579
  const side = getSide(placement);
580
+ const initialSideAxis = getSideAxis(initialPlacement);
578
581
  const isBasePlacement = getSide(initialPlacement) === initialPlacement;
579
582
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
580
583
  const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
581
- if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
584
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
585
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
582
586
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
583
587
  }
584
588
  const placements = [initialPlacement, ...fallbackPlacements];
@@ -603,16 +607,22 @@ const flip$1 = function (options) {
603
607
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
604
608
  const nextPlacement = placements[nextIndex];
605
609
  if (nextPlacement) {
606
- // Try next placement and re-run the lifecycle.
607
- return {
608
- data: {
609
- index: nextIndex,
610
- overflows: overflowsData
611
- },
612
- reset: {
613
- placement: nextPlacement
614
- }
615
- };
610
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
611
+ if (!ignoreCrossAxisOverflow ||
612
+ // We leave the current main axis only if every placement on that axis
613
+ // overflows the main axis.
614
+ overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
615
+ // Try next placement and re-run the lifecycle.
616
+ return {
617
+ data: {
618
+ index: nextIndex,
619
+ overflows: overflowsData
620
+ },
621
+ reset: {
622
+ placement: nextPlacement
623
+ }
624
+ };
625
+ }
616
626
  }
617
627
 
618
628
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -624,8 +634,17 @@ const flip$1 = function (options) {
624
634
  switch (fallbackStrategy) {
625
635
  case 'bestFit':
626
636
  {
627
- var _overflowsData$map$so;
628
- const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
637
+ var _overflowsData$filter2;
638
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
639
+ if (hasFallbackAxisSideDirection) {
640
+ const currentSideAxis = getSideAxis(d.placement);
641
+ return currentSideAxis === initialSideAxis ||
642
+ // Create a bias to the `y` side axis due to horizontal
643
+ // reading directions favoring greater width.
644
+ currentSideAxis === 'y';
645
+ }
646
+ return true;
647
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
629
648
  if (placement) {
630
649
  resetPlacement = placement;
631
650
  }
@@ -849,6 +868,8 @@ const inline$1 = function (options) {
849
868
  };
850
869
  };
851
870
 
871
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
872
+
852
873
  // For type backwards-compatibility, the `OffsetOptions` type was also
853
874
  // Derivable.
854
875
 
@@ -862,9 +883,11 @@ async function convertValueToCoords(state, options) {
862
883
  const side = getSide(placement);
863
884
  const alignment = getAlignment(placement);
864
885
  const isVertical = getSideAxis(placement) === 'y';
865
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
886
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
866
887
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
867
888
  const rawValue = evaluate(options, state);
889
+
890
+ // eslint-disable-next-line prefer-const
868
891
  let {
869
892
  mainAxis,
870
893
  crossAxis,
@@ -874,10 +897,9 @@ async function convertValueToCoords(state, options) {
874
897
  crossAxis: 0,
875
898
  alignmentAxis: null
876
899
  } : {
877
- mainAxis: 0,
878
- crossAxis: 0,
879
- alignmentAxis: null,
880
- ...rawValue
900
+ mainAxis: rawValue.mainAxis || 0,
901
+ crossAxis: rawValue.crossAxis || 0,
902
+ alignmentAxis: rawValue.alignmentAxis
881
903
  };
882
904
  if (alignment && typeof alignmentAxis === 'number') {
883
905
  crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
@@ -999,7 +1021,11 @@ const shift$1 = function (options) {
999
1021
  ...limitedCoords,
1000
1022
  data: {
1001
1023
  x: limitedCoords.x - x,
1002
- y: limitedCoords.y - y
1024
+ y: limitedCoords.y - y,
1025
+ enabled: {
1026
+ [mainAxis]: checkMainAxis,
1027
+ [crossAxis]: checkCrossAxis
1028
+ }
1003
1029
  }
1004
1030
  };
1005
1031
  }
@@ -1057,7 +1083,7 @@ const limitShift$1 = function (options) {
1057
1083
  if (checkCrossAxis) {
1058
1084
  var _middlewareData$offse, _middlewareData$offse2;
1059
1085
  const len = mainAxis === 'y' ? 'width' : 'height';
1060
- const isOriginSide = ['top', 'left'].includes(getSide(placement));
1086
+ const isOriginSide = originSides.has(getSide(placement));
1061
1087
  const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
1062
1088
  const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
1063
1089
  if (crossAxisCoord < limitMin) {
@@ -1088,6 +1114,7 @@ const size$1 = function (options) {
1088
1114
  name: 'size',
1089
1115
  options,
1090
1116
  async fn(state) {
1117
+ var _state$middlewareData, _state$middlewareData2;
1091
1118
  const {
1092
1119
  placement,
1093
1120
  rects,
@@ -1115,17 +1142,18 @@ const size$1 = function (options) {
1115
1142
  widthSide = side;
1116
1143
  heightSide = alignment === 'end' ? 'top' : 'bottom';
1117
1144
  }
1118
- const overflowAvailableHeight = height - overflow[heightSide];
1119
- const overflowAvailableWidth = width - overflow[widthSide];
1145
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
1146
+ const maximumClippingWidth = width - overflow.left - overflow.right;
1147
+ const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
1148
+ const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
1120
1149
  const noShift = !state.middlewareData.shift;
1121
1150
  let availableHeight = overflowAvailableHeight;
1122
1151
  let availableWidth = overflowAvailableWidth;
1123
- if (isYAxis) {
1124
- const maximumClippingWidth = width - overflow.left - overflow.right;
1125
- availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
1126
- } else {
1127
- const maximumClippingHeight = height - overflow.top - overflow.bottom;
1128
- availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
1152
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
1153
+ availableWidth = maximumClippingWidth;
1154
+ }
1155
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
1156
+ availableHeight = maximumClippingHeight;
1129
1157
  }
1130
1158
  if (noShift && !alignment) {
1131
1159
  const xMin = max(overflow.left, 0);
@@ -1156,6 +1184,9 @@ const size$1 = function (options) {
1156
1184
  };
1157
1185
  };
1158
1186
 
1187
+ function hasWindow() {
1188
+ return typeof window !== 'undefined';
1189
+ }
1159
1190
  function getNodeName(node) {
1160
1191
  if (isNode(node)) {
1161
1192
  return (node.nodeName || '').toLowerCase();
@@ -1174,21 +1205,30 @@ function getDocumentElement(node) {
1174
1205
  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1175
1206
  }
1176
1207
  function isNode(value) {
1208
+ if (!hasWindow()) {
1209
+ return false;
1210
+ }
1177
1211
  return value instanceof Node || value instanceof getWindow(value).Node;
1178
1212
  }
1179
1213
  function isElement(value) {
1214
+ if (!hasWindow()) {
1215
+ return false;
1216
+ }
1180
1217
  return value instanceof Element || value instanceof getWindow(value).Element;
1181
1218
  }
1182
1219
  function isHTMLElement(value) {
1220
+ if (!hasWindow()) {
1221
+ return false;
1222
+ }
1183
1223
  return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1184
1224
  }
1185
1225
  function isShadowRoot(value) {
1186
- // Browsers without `ShadowRoot` support.
1187
- if (typeof ShadowRoot === 'undefined') {
1226
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
1188
1227
  return false;
1189
1228
  }
1190
1229
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1191
1230
  }
1231
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
1192
1232
  function isOverflowElement(element) {
1193
1233
  const {
1194
1234
  overflow,
@@ -1196,26 +1236,32 @@ function isOverflowElement(element) {
1196
1236
  overflowY,
1197
1237
  display
1198
1238
  } = getComputedStyle(element);
1199
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
1239
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
1200
1240
  }
1241
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
1201
1242
  function isTableElement(element) {
1202
- return ['table', 'td', 'th'].includes(getNodeName(element));
1243
+ return tableElements.has(getNodeName(element));
1203
1244
  }
1245
+ const topLayerSelectors = [':popover-open', ':modal'];
1204
1246
  function isTopLayer(element) {
1205
- return [':popover-open', ':modal'].some(selector => {
1247
+ return topLayerSelectors.some(selector => {
1206
1248
  try {
1207
1249
  return element.matches(selector);
1208
- } catch (e) {
1250
+ } catch (_e) {
1209
1251
  return false;
1210
1252
  }
1211
1253
  });
1212
1254
  }
1255
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
1256
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
1257
+ const containValues = ['paint', 'layout', 'strict', 'content'];
1213
1258
  function isContainingBlock(elementOrCss) {
1214
1259
  const webkit = isWebKit();
1215
1260
  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
1216
1261
 
1217
1262
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1218
- return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
1263
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
1264
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
1219
1265
  }
1220
1266
  function getContainingBlock(element) {
1221
1267
  let currentNode = getParentNode(element);
@@ -1233,8 +1279,9 @@ function isWebKit() {
1233
1279
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
1234
1280
  return CSS.supports('-webkit-backdrop-filter', 'none');
1235
1281
  }
1282
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
1236
1283
  function isLastTraversableNode(node) {
1237
- return ['html', 'body', '#document'].includes(getNodeName(node));
1284
+ return lastTraversableNodeNames.has(getNodeName(node));
1238
1285
  }
1239
1286
  function getComputedStyle(element) {
1240
1287
  return getWindow(element).getComputedStyle(element);
@@ -1288,10 +1335,14 @@ function getOverflowAncestors(node, list, traverseIframes) {
1288
1335
  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1289
1336
  const win = getWindow(scrollableAncestor);
1290
1337
  if (isBody) {
1291
- return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
1338
+ const frameElement = getFrameElement(win);
1339
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1292
1340
  }
1293
1341
  return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1294
1342
  }
1343
+ function getFrameElement(win) {
1344
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1345
+ }
1295
1346
 
1296
1347
  function getCssDimensions(element) {
1297
1348
  const css = getComputedStyle(element);
@@ -4796,14 +4796,11 @@ const PostTooltipTrigger = /*@__PURE__*/ proxyCustomElement(class PostTooltipTri
4796
4796
  validateControlFor() {
4797
4797
  checkType(this.for, // The actual property value
4798
4798
  'string', // The expected type
4799
- 'The "for" property must be a string' // A meaningful error message
4800
- );
4799
+ 'The "for" property must be a string');
4801
4800
  }
4802
4801
  get tooltip() {
4803
4802
  const ref = document.getElementById(this.for);
4804
- return (ref === null || ref === void 0 ? void 0 : ref.localName) === 'post-tooltip'
4805
- ? ref
4806
- : null;
4803
+ return (ref === null || ref === void 0 ? void 0 : ref.localName) === 'post-tooltip' ? ref : null;
4807
4804
  }
4808
4805
  componentDidLoad() {
4809
4806
  this.setupTrigger();
@@ -4911,22 +4908,24 @@ const PostTooltipTrigger = /*@__PURE__*/ proxyCustomElement(class PostTooltipTri
4911
4908
  handleLeave(event) {
4912
4909
  const newTarget = event.relatedTarget;
4913
4910
  if ((this.tooltip && newTarget && this.tooltip.contains(newTarget)) ||
4914
- (newTarget === this.trigger)) {
4911
+ newTarget === this.trigger) {
4915
4912
  return;
4916
4913
  }
4917
4914
  this.interestLostHandler();
4918
4915
  }
4919
4916
  interestHandler() {
4920
4917
  var _a;
4921
- if (this.delay > 0) {
4922
- this.delayTimeout = window.setTimeout(() => {
4923
- var _a;
4918
+ if (this.trigger) {
4919
+ if (this.delay > 0) {
4920
+ this.delayTimeout = window.setTimeout(() => {
4921
+ var _a;
4922
+ (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.show(this.trigger);
4923
+ this.delayTimeout = null;
4924
+ }, this.delay);
4925
+ }
4926
+ else {
4924
4927
  (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.show(this.trigger);
4925
- this.delayTimeout = null;
4926
- }, this.delay);
4927
- }
4928
- else {
4929
- (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.show(this.trigger);
4928
+ }
4930
4929
  }
4931
4930
  }
4932
4931
  interestLostHandler() {
@@ -4938,7 +4937,7 @@ const PostTooltipTrigger = /*@__PURE__*/ proxyCustomElement(class PostTooltipTri
4938
4937
  (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.hide();
4939
4938
  }
4940
4939
  render() {
4941
- return (h(Host, { key: 'a37c76972c4db24292fa95ddacf097055dea70f0', "data-version": version$1 }, h("slot", { key: '51de3cd7dedfc1c5fe5ef86fbf0ab953d07945cb', onSlotchange: () => this.handleSlotChange() })));
4940
+ return (h(Host, { key: '5e30c67f3ac854cb8c589978319ded51673c3380', "data-version": version$1 }, h("slot", { key: '3aea5ba44638a4b2b904125c10bd22b9c20474f3', onSlotchange: () => this.handleSlotChange() })));
4942
4941
  }
4943
4942
  get host() { return this; }
4944
4943
  static get watchers() { return {
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-06-23T09:38:43",
2
+ "timestamp": "2025-07-28T08:26:52",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.19.2",
package/dist/esm/index.js CHANGED
@@ -1,21 +1,21 @@
1
- export { P as PostAccordion } from './post-accordion-35147f4e.js';
2
- export { P as PostAccordionItem } from './post-accordion-item-e2dd3a5a.js';
3
- export { P as PostAlert } from './post-alert-c643ddc8.js';
4
- export { P as PostCardControl } from './post-card-control-558c0eb2.js';
5
- export { P as PostCollapsible, a as PostCollapsibleTrigger } from './post-collapsible-trigger-dab62771.js';
6
- export { P as PostIcon } from './post-icon-04077f8b.js';
7
- export { P as PostLogo } from './post-logo-04f83c6f.js';
8
- export { P as PostPopover } from './post-popover-a45d8ccf.js';
9
- export { P as PostPopovercontainer } from './post-popovercontainer-6b908f81.js';
10
- export { P as PostRating } from './post-rating-dfd671c2.js';
11
- export { P as PostTabs } from './post-tabs-dfdbfe58.js';
12
- export { P as PostTabHeader } from './post-tab-header-35ee01d9.js';
13
- export { P as PostTabPanel } from './post-tab-panel-53a52f41.js';
14
- export { P as PostTooltip } from './post-tooltip-d1739fcd.js';
15
- export { P as PostTooltipTrigger } from './post-tooltip-trigger-25718071.js';
16
- export { P as PostTag } from './post-tag-6b8fc996.js';
1
+ export { P as PostAccordion } from './post-accordion-18fa6132.js';
2
+ export { P as PostAccordionItem } from './post-accordion-item-419fcfe2.js';
3
+ export { P as PostAlert } from './post-alert-253b376b.js';
4
+ export { P as PostCardControl } from './post-card-control-0010aad4.js';
5
+ export { P as PostCollapsible, a as PostCollapsibleTrigger } from './post-collapsible-trigger-66131243.js';
6
+ export { P as PostIcon } from './post-icon-b054352c.js';
7
+ export { P as PostLogo } from './post-logo-38005da6.js';
8
+ export { P as PostPopover } from './post-popover-b6200ea0.js';
9
+ export { P as PostPopovercontainer } from './post-popovercontainer-dced2841.js';
10
+ export { P as PostRating } from './post-rating-a3b7e183.js';
11
+ export { P as PostTabs } from './post-tabs-0695851c.js';
12
+ export { P as PostTabHeader } from './post-tab-header-49bdb6b7.js';
13
+ export { P as PostTabPanel } from './post-tab-panel-2be8c912.js';
14
+ export { P as PostTooltip } from './post-tooltip-b7c47a15.js';
15
+ export { P as PostTooltipTrigger } from './post-tooltip-trigger-d6fae10a.js';
16
+ export { P as PostTag } from './post-tag-92e433d8.js';
17
17
  import './index-e1b64755.js';
18
- import './package-e199a39d.js';
18
+ import './package-8f0ae314.js';
19
19
  import './heading-levels-5b7b4349.js';
20
20
  import './check-one-of-6b3ef8eb.js';
21
21
  import './index-69587a51.js';
@@ -1,3 +1,3 @@
1
- const version = "9.0.2";
1
+ const version = "9.0.3";
2
2
 
3
3
  export { version as v };
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-e1b64755.js';
2
- import { v as version } from './package-e199a39d.js';
2
+ import { v as version } from './package-8f0ae314.js';
3
3
  import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
4
4
  import { c as checkOneOf } from './check-one-of-6b3ef8eb.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-e1b64755.js';
2
- import { v as version } from './package-e199a39d.js';
2
+ import { v as version } from './package-8f0ae314.js';
3
3
  import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
4
4
  import { c as checkEmptyOrOneOf } from './index-69587a51.js';
5
5
 
@@ -1,6 +1,6 @@
1
- export { P as post_accordion_item } from './post-accordion-item-e2dd3a5a.js';
1
+ export { P as post_accordion_item } from './post-accordion-item-419fcfe2.js';
2
2
  import './index-e1b64755.js';
3
- import './package-e199a39d.js';
3
+ import './package-8f0ae314.js';
4
4
  import './heading-levels-5b7b4349.js';
5
5
  import './index-69587a51.js';
6
6
  import './constants-8d548297.js';
@@ -1,5 +1,5 @@
1
- export { P as post_accordion } from './post-accordion-35147f4e.js';
1
+ export { P as post_accordion } from './post-accordion-18fa6132.js';
2
2
  import './index-e1b64755.js';
3
- import './package-e199a39d.js';
3
+ import './package-8f0ae314.js';
4
4
  import './heading-levels-5b7b4349.js';
5
5
  import './check-one-of-6b3ef8eb.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-e1b64755.js';
2
- import { v as version } from './package-e199a39d.js';
2
+ import { v as version } from './package-8f0ae314.js';
3
3
  import { f as fadeOut } from './fade-7fd71785.js';
4
4
  import { a as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index-69587a51.js';
5
5
  import { c as checkType } from './check-type-8828dbe4.js';
@@ -1,6 +1,6 @@
1
- export { P as post_alert } from './post-alert-c643ddc8.js';
1
+ export { P as post_alert } from './post-alert-253b376b.js';
2
2
  import './index-e1b64755.js';
3
- import './package-e199a39d.js';
3
+ import './package-8f0ae314.js';
4
4
  import './fade-7fd71785.js';
5
5
  import './index-69587a51.js';
6
6
  import './constants-8d548297.js';