@swisspost/design-system-components 7.2.0 → 7.2.1

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 (134) hide show
  1. package/dist/cjs/{index-0fc0bf5f.js → index-49177437.js} +232 -214
  2. package/dist/cjs/index.cjs.js +16 -16
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{package-b133ab48.js → package-198f981b.js} +1 -1
  5. package/dist/cjs/{post-accordion-a079c21b.js → post-accordion-f81a31b2.js} +2 -2
  6. package/dist/cjs/{post-accordion-item-30c6ec06.js → post-accordion-item-994583fc.js} +2 -2
  7. package/dist/cjs/post-accordion-item.cjs.entry.js +3 -3
  8. package/dist/cjs/post-accordion.cjs.entry.js +3 -3
  9. package/dist/cjs/{post-alert-b5cfc4c6.js → post-alert-b160762a.js} +3 -3
  10. package/dist/cjs/post-alert.cjs.entry.js +3 -3
  11. package/dist/cjs/{post-card-control-80ff0fbb.js → post-card-control-5f309278.js} +2 -2
  12. package/dist/cjs/post-card-control.cjs.entry.js +3 -3
  13. package/dist/cjs/{post-collapsible-9bcaf6f1.js → post-collapsible-bf63b152.js} +2 -2
  14. package/dist/cjs/post-collapsible.cjs.entry.js +3 -3
  15. package/dist/cjs/post-components.cjs.js +2 -2
  16. package/dist/cjs/{post-icon-87e7972e.js → post-icon-e5af0dff.js} +2 -2
  17. package/dist/cjs/post-icon.cjs.entry.js +3 -3
  18. package/dist/cjs/{post-popover-0a73553e.js → post-popover-bb1cf2dc.js} +2 -2
  19. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  20. package/dist/cjs/{post-popovercontainer-a1df1705.js → post-popovercontainer-814f2053.js} +31 -22
  21. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  22. package/dist/cjs/{post-rating-2337c023.js → post-rating-7e29df2c.js} +2 -2
  23. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  24. package/dist/cjs/{post-tab-header-ac4137cb.js → post-tab-header-1d896a9b.js} +2 -2
  25. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  26. package/dist/cjs/{post-tab-panel-307eacef.js → post-tab-panel-47481b1e.js} +2 -2
  27. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  28. package/dist/cjs/{post-tabs-92435b40.js → post-tabs-35d27649.js} +3 -3
  29. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  30. package/dist/cjs/{post-tag-0237216a.js → post-tag-27049429.js} +2 -2
  31. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  32. package/dist/cjs/{post-tooltip-7fcd3f15.js → post-tooltip-95c1e078.js} +2 -2
  33. package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
  34. package/dist/collection/collection-manifest.json +1 -1
  35. package/dist/collection/components/post-alert/post-alert.js +1 -1
  36. package/dist/collection/components/post-popover/post-popover.js +1 -1
  37. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +1 -1
  38. package/dist/collection/components/post-tabs/post-tabs.js +3 -1
  39. package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
  40. package/dist/components/package.js +1 -1
  41. package/dist/components/post-alert2.js +1 -1
  42. package/dist/components/post-popovercontainer2.js +29 -20
  43. package/dist/components/post-tabs2.js +1 -1
  44. package/dist/docs.json +25 -8
  45. package/dist/esm/{index-d9331ff3.js → index-b40b8259.js} +232 -214
  46. package/dist/esm/index.js +16 -16
  47. package/dist/esm/loader.js +2 -2
  48. package/dist/esm/{package-37b02bc3.js → package-baed1bbc.js} +1 -1
  49. package/dist/esm/{post-accordion-7eaa090e.js → post-accordion-63757789.js} +2 -2
  50. package/dist/esm/{post-accordion-item-d5466ca0.js → post-accordion-item-ff713ffa.js} +2 -2
  51. package/dist/esm/post-accordion-item.entry.js +3 -3
  52. package/dist/esm/post-accordion.entry.js +3 -3
  53. package/dist/esm/{post-alert-5bc0d11c.js → post-alert-90030a07.js} +3 -3
  54. package/dist/esm/post-alert.entry.js +3 -3
  55. package/dist/esm/{post-card-control-d64be740.js → post-card-control-a77d7957.js} +2 -2
  56. package/dist/esm/post-card-control.entry.js +3 -3
  57. package/dist/esm/{post-collapsible-0bb7ca9a.js → post-collapsible-2fd13f4e.js} +2 -2
  58. package/dist/esm/post-collapsible.entry.js +3 -3
  59. package/dist/esm/post-components.js +3 -3
  60. package/dist/esm/{post-icon-8d59faf7.js → post-icon-725a0fba.js} +2 -2
  61. package/dist/esm/post-icon.entry.js +3 -3
  62. package/dist/esm/{post-popover-0ebc24f5.js → post-popover-23ed2cdf.js} +2 -2
  63. package/dist/esm/post-popover.entry.js +3 -3
  64. package/dist/esm/{post-popovercontainer-5c0ba050.js → post-popovercontainer-f5625d65.js} +31 -22
  65. package/dist/esm/post-popovercontainer.entry.js +3 -3
  66. package/dist/esm/{post-rating-40195437.js → post-rating-0bfc12ec.js} +2 -2
  67. package/dist/esm/post-rating.entry.js +3 -3
  68. package/dist/esm/{post-tab-header-ff165ebb.js → post-tab-header-5be0820b.js} +2 -2
  69. package/dist/esm/post-tab-header.entry.js +3 -3
  70. package/dist/esm/{post-tab-panel-d40b9704.js → post-tab-panel-a2a06c2d.js} +2 -2
  71. package/dist/esm/post-tab-panel.entry.js +3 -3
  72. package/dist/esm/{post-tabs-6ee5542b.js → post-tabs-c1cf60cd.js} +3 -3
  73. package/dist/esm/post-tabs.entry.js +3 -3
  74. package/dist/esm/{post-tag-e76f88e5.js → post-tag-1158169f.js} +2 -2
  75. package/dist/esm/post-tag.entry.js +3 -3
  76. package/dist/esm/{post-tooltip-990b8b2b.js → post-tooltip-966fde7a.js} +2 -2
  77. package/dist/esm/post-tooltip.entry.js +3 -3
  78. package/dist/post-components/index.esm.js +1 -1
  79. package/dist/post-components/p-09c9ec65.entry.js +1 -0
  80. package/dist/post-components/p-105f8fe5.entry.js +1 -0
  81. package/dist/post-components/{p-287f66b9.js → p-11e13d7d.js} +1 -1
  82. package/dist/post-components/p-1d351eda.js +2 -0
  83. package/dist/post-components/p-408e8d5c.entry.js +1 -0
  84. package/dist/post-components/{p-ee12644d.js → p-40cbd3a9.js} +1 -1
  85. package/dist/post-components/p-418e4351.entry.js +1 -0
  86. package/dist/post-components/{p-aef9ee8b.js → p-41bd4480.js} +1 -1
  87. package/dist/post-components/{p-3ce051c9.js → p-4f16eac0.js} +1 -1
  88. package/dist/post-components/{p-deb19ca0.js → p-6fa5a17d.js} +1 -1
  89. package/dist/post-components/p-803678de.entry.js +1 -0
  90. package/dist/post-components/p-8ba9721a.entry.js +1 -0
  91. package/dist/post-components/p-92636363.js +1 -0
  92. package/dist/post-components/p-9ac48e84.entry.js +1 -0
  93. package/dist/post-components/p-9c5b9e7c.entry.js +1 -0
  94. package/dist/post-components/{p-f86b2ea1.js → p-9c842093.js} +1 -1
  95. package/dist/post-components/{p-3f2c54ad.js → p-b3a7e242.js} +1 -1
  96. package/dist/post-components/p-b5f6a7b5.entry.js +1 -0
  97. package/dist/post-components/p-b675a470.entry.js +1 -0
  98. package/dist/post-components/p-ba275788.entry.js +1 -0
  99. package/dist/post-components/p-c2906b17.js +1 -0
  100. package/dist/post-components/{p-0637689e.js → p-c3e6894d.js} +1 -1
  101. package/dist/post-components/{p-d6e0e495.js → p-cbca927d.js} +1 -1
  102. package/dist/post-components/p-ce4fff0a.js +1 -0
  103. package/dist/post-components/p-daf27e9c.entry.js +1 -0
  104. package/dist/post-components/{p-69bd634e.js → p-f11cb5ab.js} +1 -1
  105. package/dist/post-components/p-f4b64493.entry.js +1 -0
  106. package/dist/post-components/p-f665b245.entry.js +1 -0
  107. package/dist/post-components/p-f80d0c5f.js +1 -0
  108. package/dist/post-components/p-fa1125d9.js +1 -0
  109. package/dist/post-components/post-components.esm.js +1 -1
  110. package/dist/types/components/post-tabs/post-tabs.d.ts +2 -0
  111. package/dist/types/stencil-public-runtime.d.ts +0 -2
  112. package/loader/index.d.ts +3 -0
  113. package/package.json +9 -9
  114. package/dist/collection/index.spec.js +0 -27
  115. package/dist/post-components/p-0ba99d76.entry.js +0 -1
  116. package/dist/post-components/p-0e97fb19.entry.js +0 -1
  117. package/dist/post-components/p-19ee1efc.entry.js +0 -1
  118. package/dist/post-components/p-23e7f6e3.entry.js +0 -1
  119. package/dist/post-components/p-305ab60c.js +0 -1
  120. package/dist/post-components/p-62229794.entry.js +0 -1
  121. package/dist/post-components/p-7dc73c43.entry.js +0 -1
  122. package/dist/post-components/p-7e59cbd2.js +0 -1
  123. package/dist/post-components/p-8559d3c0.entry.js +0 -1
  124. package/dist/post-components/p-941e5ef0.js +0 -1
  125. package/dist/post-components/p-95003bde.entry.js +0 -1
  126. package/dist/post-components/p-a1da0539.js +0 -1
  127. package/dist/post-components/p-a5d9115f.entry.js +0 -1
  128. package/dist/post-components/p-a9aa57f0.entry.js +0 -1
  129. package/dist/post-components/p-c21da8cb.js +0 -1
  130. package/dist/post-components/p-c655db7c.entry.js +0 -1
  131. package/dist/post-components/p-ca2ff4bb.entry.js +0 -1
  132. package/dist/post-components/p-d2eafe06.entry.js +0 -1
  133. package/dist/post-components/p-d9eab6d9.js +0 -2
  134. package/dist/post-components/p-ff0b0a9a.entry.js +0 -1
@@ -120,12 +120,21 @@ function getPaddingObject(padding) {
120
120
  };
121
121
  }
122
122
  function rectToClientRect(rect) {
123
+ const {
124
+ x,
125
+ y,
126
+ width,
127
+ height
128
+ } = rect;
123
129
  return {
124
- ...rect,
125
- top: rect.y,
126
- left: rect.x,
127
- right: rect.x + rect.width,
128
- bottom: rect.y + rect.height
130
+ width,
131
+ height,
132
+ top: y,
133
+ left: x,
134
+ right: x + width,
135
+ bottom: y + height,
136
+ x,
137
+ y
129
138
  };
130
139
  }
131
140
 
@@ -1192,6 +1201,15 @@ function isOverflowElement(element) {
1192
1201
  function isTableElement(element) {
1193
1202
  return ['table', 'td', 'th'].includes(getNodeName(element));
1194
1203
  }
1204
+ function isTopLayer(element) {
1205
+ return [':popover-open', ':modal'].some(selector => {
1206
+ try {
1207
+ return element.matches(selector);
1208
+ } catch (e) {
1209
+ return false;
1210
+ }
1211
+ });
1212
+ }
1195
1213
  function isContainingBlock(element) {
1196
1214
  const webkit = isWebKit();
1197
1215
  const css = getComputedStyle(element);
@@ -1202,11 +1220,13 @@ function isContainingBlock(element) {
1202
1220
  function getContainingBlock(element) {
1203
1221
  let currentNode = getParentNode(element);
1204
1222
  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1223
+ if (isTopLayer(currentNode)) {
1224
+ return null;
1225
+ }
1205
1226
  if (isContainingBlock(currentNode)) {
1206
1227
  return currentNode;
1207
- } else {
1208
- currentNode = getParentNode(currentNode);
1209
1228
  }
1229
+ currentNode = getParentNode(currentNode);
1210
1230
  }
1211
1231
  return null;
1212
1232
  }
@@ -1228,8 +1248,8 @@ function getNodeScroll(element) {
1228
1248
  };
1229
1249
  }
1230
1250
  return {
1231
- scrollLeft: element.pageXOffset,
1232
- scrollTop: element.pageYOffset
1251
+ scrollLeft: element.scrollX,
1252
+ scrollTop: element.scrollY
1233
1253
  };
1234
1254
  }
1235
1255
  function getParentNode(node) {
@@ -1401,17 +1421,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1401
1421
  });
1402
1422
  }
1403
1423
 
1404
- const topLayerSelectors = [':popover-open', ':modal'];
1405
- function isTopLayer(element) {
1406
- return topLayerSelectors.some(selector => {
1407
- try {
1408
- return element.matches(selector);
1409
- } catch (e) {
1410
- return false;
1411
- }
1412
- });
1413
- }
1414
-
1415
1424
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1416
1425
  let {
1417
1426
  elements,
@@ -145,7 +145,7 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
145
145
  nextTab.focus();
146
146
  }
147
147
  render() {
148
- return (h(Host, { key: '38a0e3f686dab8cc1ea9dc23cc6e275fe0e6b45d', "data-version": version }, h("div", { key: 'c67273069e5d3ba858bd6c5da8684bbd2f8c398b', class: "tabs-wrapper" }, h("div", { key: 'fc3e725607107f3b5d3c969e4107c229ca8f8c66', class: "tabs", role: "tablist" }, h("slot", { key: 'caf8d1a6901327d0b8faebb36ce239d7368e2a22', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'f8cf7c8c8cbb3fd308cebc34513b16926f8e5c81', class: "tab-content" }, h("slot", { key: '7f7ff954545f85e6caab71d7265017607e25262b', onSlotchange: () => this.moveMisplacedTabs() }))));
148
+ return (h(Host, { key: 'f7aabebf0645b5d9db9028a0b1807e49d6f4e994', "data-version": version }, h("div", { key: 'b62f738a4df453f9acf94825f2d1626dc40c4eb1', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'a9bd32fc939cfdff73d2c48982551cceedb5bd2a', class: "tabs", role: "tablist" }, h("slot", { key: '4a8c2bc4815debd4d6951acbce224d3f1fd6b169', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'c7b2543a1decdc2bfe7a683b7bd193586485d012', class: "tab-content", part: "content" }, h("slot", { key: 'af19b3e89f8ca0cecf59f4426e4b5d3ac4efbc75', onSlotchange: () => this.moveMisplacedTabs() }))));
149
149
  }
150
150
  get host() { return this; }
151
151
  static get style() { return PostTabsStyle0; }
package/dist/docs.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2024-06-27T09:31:25",
2
+ "timestamp": "2024-07-10T09:47:50",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.18.3",
5
+ "version": "4.19.1",
6
6
  "typescriptVersion": "5.4.5"
7
7
  },
8
8
  "components": [
@@ -1303,7 +1303,7 @@
1303
1303
  "Placement": {
1304
1304
  "location": "import",
1305
1305
  "path": "@floating-ui/dom",
1306
- "id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
1306
+ "id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.7/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
1307
1307
  }
1308
1308
  }
1309
1309
  },
@@ -1552,7 +1552,7 @@
1552
1552
  "Placement": {
1553
1553
  "location": "import",
1554
1554
  "path": "@floating-ui/dom",
1555
- "id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
1555
+ "id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.7/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
1556
1556
  }
1557
1557
  }
1558
1558
  },
@@ -2048,6 +2048,14 @@
2048
2048
  {
2049
2049
  "name": "slot",
2050
2050
  "text": "default - Slot for placing tab panels. Each tab panel should be a <post-tab-panel> element."
2051
+ },
2052
+ {
2053
+ "name": "part",
2054
+ "text": "tabs - Add custom styles for the tab header container."
2055
+ },
2056
+ {
2057
+ "name": "part",
2058
+ "text": "content - Add custom styles for the tab panel container."
2051
2059
  }
2052
2060
  ],
2053
2061
  "usage": {},
@@ -2152,7 +2160,16 @@
2152
2160
  "docs": "Slot for placing tab headers. Each tab header should be a <post-tab-header> element."
2153
2161
  }
2154
2162
  ],
2155
- "parts": [],
2163
+ "parts": [
2164
+ {
2165
+ "name": "content",
2166
+ "docs": "Add custom styles for the tab panel container."
2167
+ },
2168
+ {
2169
+ "name": "tabs",
2170
+ "docs": "Add custom styles for the tab header container."
2171
+ }
2172
+ ],
2156
2173
  "dependents": [],
2157
2174
  "dependencies": [],
2158
2175
  "dependencyGraph": {}
@@ -2321,7 +2338,7 @@
2321
2338
  "Placement": {
2322
2339
  "location": "import",
2323
2340
  "path": "@floating-ui/dom",
2324
- "id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
2341
+ "id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.7/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
2325
2342
  }
2326
2343
  }
2327
2344
  },
@@ -2536,10 +2553,10 @@
2536
2553
  "docstring": "",
2537
2554
  "path": "src/components/post-alert/alert-types.ts"
2538
2555
  },
2539
- "../../node_modules/.pnpm/@floating-ui+dom@1.6.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement": {
2556
+ "../../node_modules/.pnpm/@floating-ui+dom@1.6.7/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement": {
2540
2557
  "declaration": "any",
2541
2558
  "docstring": "",
2542
- "path": "../../node_modules/.pnpm/@floating-ui+dom@1.6.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts"
2559
+ "path": "../../node_modules/.pnpm/@floating-ui+dom@1.6.7/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts"
2543
2560
  }
2544
2561
  }
2545
2562
  }