@swisspost/design-system-components 2.0.3 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  3. package/dist/cjs/check-one-of-f4f5d0c0.js +8 -0
  4. package/dist/cjs/{index-f243643b.js → index-3b732d59.js} +89 -25
  5. package/dist/cjs/{index-8c288b1a.js → index-a1440961.js} +2 -6
  6. package/dist/cjs/index.cjs.js +21 -14
  7. package/dist/cjs/loader.cjs.js +5 -3
  8. package/dist/cjs/{package-628f6e9c.js → package-45af106a.js} +1 -1
  9. package/dist/cjs/{post-accordion-da546aa2.js → post-accordion-7507f838.js} +22 -20
  10. package/dist/cjs/post-accordion-item-5bf4d98b.js +53 -0
  11. package/dist/cjs/post-accordion-item.cjs.entry.js +5 -4
  12. package/dist/cjs/post-accordion.cjs.entry.js +3 -3
  13. package/dist/cjs/post-alert-9c39c854.js +98 -0
  14. package/dist/cjs/post-alert.cjs.entry.js +5 -4
  15. package/dist/cjs/post-card-control-4a16b3d7.js +311 -0
  16. package/dist/cjs/post-card-control.cjs.entry.js +14 -0
  17. package/dist/cjs/{post-collapsible-278b2a71.js → post-collapsible-00319f1f.js} +7 -7
  18. package/dist/cjs/post-collapsible.cjs.entry.js +5 -4
  19. package/dist/cjs/post-components.cjs.js +6 -4
  20. package/dist/cjs/{post-icon-fd09bc54.js → post-icon-09845341.js} +5 -5
  21. package/dist/cjs/post-icon.cjs.entry.js +5 -4
  22. package/dist/cjs/post-popover-3b6aaeae.js +104 -0
  23. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  24. package/dist/cjs/{post-popovercontainer-5e355de3.js → post-popovercontainer-0b8343ac.js} +26 -45
  25. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  26. package/dist/cjs/post-rating-285f966e.js +88 -0
  27. package/dist/cjs/post-rating.cjs.entry.js +11 -0
  28. package/dist/cjs/post-tab-header-f1c16656.js +32 -0
  29. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  30. package/dist/cjs/{post-tab-panel-67ba226d.js → post-tab-panel-9c20a84e.js} +3 -3
  31. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  32. package/dist/cjs/{post-tabs-71510ced.js → post-tabs-75e71078.js} +23 -21
  33. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  34. package/dist/cjs/post-tag-942085fd.js +43 -0
  35. package/dist/cjs/post-tag.cjs.entry.js +11 -0
  36. package/dist/cjs/{post-tooltip-b6bbb3e4.js → post-tooltip-94d4f21f.js} +12 -9
  37. package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
  38. package/dist/collection/collection-manifest.json +6 -3
  39. package/dist/collection/components/post-accordion/post-accordion.js +22 -20
  40. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  41. package/dist/collection/components/post-accordion-item/post-accordion-item.js +7 -5
  42. package/dist/collection/components/post-alert/alert-types.js +1 -1
  43. package/dist/collection/components/post-alert/post-alert.css +2 -2
  44. package/dist/collection/components/post-alert/post-alert.js +6 -6
  45. package/dist/collection/components/post-card-control/post-card-control.css +31 -0
  46. package/dist/collection/components/post-card-control/post-card-control.js +520 -0
  47. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  48. package/dist/collection/components/post-collapsible/post-collapsible.js +4 -4
  49. package/dist/collection/components/post-icon/post-icon.js +2 -2
  50. package/dist/collection/components/post-popover/post-popover.css +29 -1
  51. package/dist/collection/components/post-popover/post-popover.js +2 -2
  52. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +6 -6
  53. package/dist/collection/components/post-rating/post-rating.css +31 -0
  54. package/dist/collection/components/post-rating/post-rating.js +202 -0
  55. package/dist/collection/components/post-tab-header/post-tab-header.css +29 -1
  56. package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
  57. package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
  58. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  59. package/dist/collection/components/post-tabs/post-tabs.js +21 -19
  60. package/dist/collection/components/post-tag/post-tag.css +31 -0
  61. package/dist/collection/components/post-tag/post-tag.js +115 -0
  62. package/dist/collection/components/post-tooltip/post-tooltip.js +11 -8
  63. package/dist/collection/index.js +3 -0
  64. package/dist/collection/utils/index.js +1 -0
  65. package/dist/collection/utils/sass-export.js +16 -0
  66. package/dist/components/index.js +3 -0
  67. package/dist/components/index2.js +1 -1
  68. package/dist/components/package.js +1 -1
  69. package/dist/components/post-accordion-item2.js +7 -5
  70. package/dist/components/post-accordion2.js +21 -19
  71. package/dist/components/post-alert2.js +7 -7
  72. package/dist/components/post-card-control.d.ts +11 -0
  73. package/dist/components/post-card-control.js +6 -0
  74. package/dist/components/post-card-control2.js +342 -0
  75. package/dist/components/post-collapsible2.js +5 -5
  76. package/dist/components/post-icon2.js +3 -3
  77. package/dist/components/post-popover2.js +2 -2
  78. package/dist/components/post-popovercontainer2.js +24 -43
  79. package/dist/components/post-rating.d.ts +11 -0
  80. package/dist/components/post-rating.js +6 -0
  81. package/dist/components/post-rating2.js +113 -0
  82. package/dist/components/post-tab-header2.js +2 -2
  83. package/dist/components/post-tab-panel2.js +1 -1
  84. package/dist/components/post-tabs2.js +21 -19
  85. package/dist/components/post-tag.d.ts +11 -0
  86. package/dist/components/post-tag.js +6 -0
  87. package/dist/components/post-tag2.js +70 -0
  88. package/dist/components/post-tooltip2.js +10 -7
  89. package/dist/docs.json +622 -16
  90. package/dist/esm/app-globals-0f993ce5.js +3 -0
  91. package/dist/esm/check-one-of-6b3ef8eb.js +6 -0
  92. package/dist/esm/{index-1708db56.js → index-961099d2.js} +89 -25
  93. package/dist/esm/{index-b444db27.js → index-d1eba94c.js} +1 -5
  94. package/dist/esm/index.js +18 -14
  95. package/dist/esm/loader.js +6 -4
  96. package/dist/esm/{package-15929f57.js → package-1242b80d.js} +1 -1
  97. package/dist/esm/{post-accordion-be080240.js → post-accordion-bfd058bc.js} +22 -20
  98. package/dist/esm/post-accordion-item-4fa44842.js +51 -0
  99. package/dist/esm/post-accordion-item.entry.js +5 -4
  100. package/dist/esm/post-accordion.entry.js +3 -3
  101. package/dist/esm/post-alert-192d0176.js +96 -0
  102. package/dist/esm/post-alert.entry.js +5 -4
  103. package/dist/esm/post-card-control-b23e1e6f.js +309 -0
  104. package/dist/esm/post-card-control.entry.js +6 -0
  105. package/dist/esm/{post-collapsible-967bb191.js → post-collapsible-d848eb2a.js} +7 -7
  106. package/dist/esm/post-collapsible.entry.js +5 -4
  107. package/dist/esm/post-components.js +7 -5
  108. package/dist/esm/{post-icon-ba163099.js → post-icon-811654f7.js} +5 -5
  109. package/dist/esm/post-icon.entry.js +5 -4
  110. package/dist/esm/post-popover-b48a9d7c.js +102 -0
  111. package/dist/esm/post-popover.entry.js +3 -3
  112. package/dist/esm/{post-popovercontainer-da870ff0.js → post-popovercontainer-7413bb41.js} +26 -45
  113. package/dist/esm/post-popovercontainer.entry.js +3 -3
  114. package/dist/esm/post-rating-806de800.js +86 -0
  115. package/dist/esm/post-rating.entry.js +3 -0
  116. package/dist/esm/post-tab-header-95f0dc6a.js +30 -0
  117. package/dist/esm/post-tab-header.entry.js +3 -3
  118. package/dist/esm/{post-tab-panel-d89c4c50.js → post-tab-panel-d7145a70.js} +3 -3
  119. package/dist/esm/post-tab-panel.entry.js +3 -3
  120. package/dist/esm/{post-tabs-e995886a.js → post-tabs-f130a7d8.js} +23 -21
  121. package/dist/esm/post-tabs.entry.js +3 -3
  122. package/dist/esm/post-tag-7c329d6c.js +41 -0
  123. package/dist/esm/post-tag.entry.js +3 -0
  124. package/dist/esm/{post-tooltip-0ec6a388.js → post-tooltip-942bd014.js} +12 -9
  125. package/dist/esm/post-tooltip.entry.js +3 -3
  126. package/dist/post-components/index.esm.js +1 -1
  127. package/dist/post-components/p-0d4e50a9.js +1 -0
  128. package/dist/post-components/p-1c780bac.entry.js +1 -0
  129. package/dist/post-components/p-2524b6b9.entry.js +1 -0
  130. package/dist/post-components/p-2ee23269.entry.js +1 -0
  131. package/dist/post-components/p-416426cc.js +1 -0
  132. package/dist/post-components/p-41c9c59f.js +1 -0
  133. package/dist/post-components/p-46cea7ee.js +1 -0
  134. package/dist/post-components/p-4aa14704.js +1 -0
  135. package/dist/post-components/p-579f55af.js +1 -0
  136. package/dist/post-components/p-5b2cdcf0.js +2 -0
  137. package/dist/post-components/p-60b02cbb.entry.js +1 -0
  138. package/dist/post-components/p-611b3c41.js +1 -0
  139. package/dist/post-components/p-62407836.entry.js +1 -0
  140. package/dist/post-components/p-6308fd47.js +1 -0
  141. package/dist/post-components/p-6fba8cb2.entry.js +1 -0
  142. package/dist/post-components/p-86acda91.entry.js +1 -0
  143. package/dist/post-components/{p-94256868.js → p-93ba2827.js} +3 -3
  144. package/dist/post-components/p-94b5c41e.entry.js +1 -0
  145. package/dist/post-components/p-a3b54b5f.js +1 -0
  146. package/dist/post-components/p-a4b6b950.js +1 -0
  147. package/dist/post-components/p-b4abbb28.js +1 -0
  148. package/dist/post-components/p-c0f8e385.entry.js +1 -0
  149. package/dist/post-components/p-c4fe5052.entry.js +1 -0
  150. package/dist/post-components/p-c9004503.js +1 -0
  151. package/dist/post-components/p-cd9c10dd.entry.js +1 -0
  152. package/dist/post-components/p-d4cd7bb0.js +1 -0
  153. package/dist/post-components/p-d8d76dd1.entry.js +1 -0
  154. package/dist/post-components/p-e1255160.js +1 -0
  155. package/dist/post-components/p-e819d5fb.entry.js +1 -0
  156. package/dist/post-components/p-f44c172a.js +1 -0
  157. package/dist/post-components/p-f91c0e1b.js +1 -0
  158. package/dist/post-components/p-f9e58309.js +1 -0
  159. package/dist/post-components/p-ffb9a651.entry.js +1 -0
  160. package/dist/post-components/post-components.esm.js +1 -1
  161. package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
  162. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +1 -1
  163. package/dist/types/components/post-alert/alert-types.d.ts +2 -2
  164. package/dist/types/components/post-alert/post-alert.d.ts +2 -2
  165. package/dist/types/components/post-card-control/post-card-control.d.ts +109 -0
  166. package/dist/types/components/post-collapsible/post-collapsible.d.ts +1 -1
  167. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -1
  168. package/dist/types/components/post-rating/post-rating.d.ts +43 -0
  169. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  170. package/dist/types/components/post-tag/post-tag.d.ts +27 -0
  171. package/dist/types/components.d.ts +243 -8
  172. package/dist/types/css-modules.js +0 -0
  173. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/css-modules.d.ts +6 -0
  174. package/dist/types/index.d.ts +3 -0
  175. package/dist/types/utils/index.d.ts +1 -0
  176. package/dist/types/utils/sass-export.d.ts +2 -0
  177. package/package.json +18 -18
  178. package/dist/cjs/post-accordion-item-33d5593a.js +0 -51
  179. package/dist/cjs/post-alert-26c1bcda.js +0 -98
  180. package/dist/cjs/post-popover-1e454296.js +0 -104
  181. package/dist/cjs/post-tab-header-5c8b9a0d.js +0 -32
  182. package/dist/esm/post-accordion-item-7b3c726b.js +0 -49
  183. package/dist/esm/post-alert-37f853eb.js +0 -96
  184. package/dist/esm/post-popover-69694fa6.js +0 -102
  185. package/dist/esm/post-tab-header-14ed99cd.js +0 -30
  186. package/dist/post-components/p-00ab91d9.entry.js +0 -1
  187. package/dist/post-components/p-04f47e54.entry.js +0 -1
  188. package/dist/post-components/p-10b4cf7a.js +0 -2
  189. package/dist/post-components/p-1f284e66.js +0 -1
  190. package/dist/post-components/p-209e33a5.js +0 -1
  191. package/dist/post-components/p-282e21c2.entry.js +0 -1
  192. package/dist/post-components/p-34a772e3.entry.js +0 -1
  193. package/dist/post-components/p-46c47aa4.entry.js +0 -1
  194. package/dist/post-components/p-51fe19e0.js +0 -1
  195. package/dist/post-components/p-557f0f10.entry.js +0 -1
  196. package/dist/post-components/p-5ecceba0.js +0 -1
  197. package/dist/post-components/p-61d98756.js +0 -1
  198. package/dist/post-components/p-6b3ba10a.js +0 -1
  199. package/dist/post-components/p-82f4f464.entry.js +0 -1
  200. package/dist/post-components/p-98cb0bbd.entry.js +0 -1
  201. package/dist/post-components/p-9ee95668.entry.js +0 -1
  202. package/dist/post-components/p-a0d342e4.entry.js +0 -1
  203. package/dist/post-components/p-a9d59b04.js +0 -1
  204. package/dist/post-components/p-ac7b779e.js +0 -1
  205. package/dist/post-components/p-d9c9ed63.js +0 -1
  206. package/dist/post-components/p-e1bf894f.entry.js +0 -1
  207. package/dist/post-components/p-e8d17225.js +0 -1
  208. package/dist/post-components/p-f0e82e63.js +0 -1
  209. package/dist/post-components/p-f47b0207.js +0 -1
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const postCardControl = require('./post-card-control-4a16b3d7.js');
6
+ require('./index-3b732d59.js');
7
+ require('./check-one-of-f4f5d0c0.js');
8
+ require('./check-non-empty-eeaa8f77.js');
9
+ require('./constants-238701d3.js');
10
+ require('./package-45af106a.js');
11
+
12
+
13
+
14
+ exports.post_card_control = postCardControl.PostCardControl;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-f243643b.js');
4
- const _package = require('./package-628f6e9c.js');
5
- const index$1 = require('./index-8c288b1a.js');
3
+ const index = require('./index-3b732d59.js');
4
+ const _package = require('./package-45af106a.js');
5
+ const index$1 = require('./index-a1440961.js');
6
6
 
7
7
  function isMotionReduced() {
8
8
  return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
@@ -26,13 +26,13 @@ const expand = (el) => {
26
26
  return el.animate([collapsedKeyframe, expandedKeyframe, finalKeyframe], animationOptions);
27
27
  };
28
28
 
29
- const postCollapsibleCss = ":host{display:block}";
29
+ const postCollapsibleCss = ":host{display:block}.collapse{overflow:hidden}";
30
30
  const PostCollapsibleStyle0 = postCollapsibleCss;
31
31
 
32
32
  const PostCollapsible = class {
33
33
  constructor(hostRef) {
34
34
  index.registerInstance(this, hostRef);
35
- this.collapseChange = index.createEvent(this, "collapseChange", 7);
35
+ this.postToggle = index.createEvent(this, "postToggle", 7);
36
36
  this.isLoaded = false;
37
37
  this.id = undefined;
38
38
  this.isOpen = true;
@@ -62,7 +62,7 @@ const PostCollapsible = class {
62
62
  return open;
63
63
  this.isOpen = !this.isOpen;
64
64
  if (this.isLoaded)
65
- this.collapseChange.emit(this.isOpen);
65
+ this.postToggle.emit(this.isOpen);
66
66
  const animation = open ? expand(this.collapsible) : collapse(this.collapsible);
67
67
  if (!this.isLoaded || isMotionReduced())
68
68
  animation.finish();
@@ -71,7 +71,7 @@ const PostCollapsible = class {
71
71
  return this.isOpen;
72
72
  }
73
73
  render() {
74
- return (index.h(index.Host, { key: 'cf0622c0844054ac31023781a393b174ac263397', id: this.id, "data-version": _package.version }, index.h("div", { key: '4138a3402559b59bc2994eace597bbf27623f806', class: "collapse", id: `${this.id}--collapse`, ref: el => (this.collapsible = el) }, index.h("slot", { key: '9a6fd61dcc0925b8ac1bf2353c4a093ae23fac22' }))));
74
+ return (index.h(index.Host, { key: '24c0478b14a05f9d4ed60d2b0ab8c51de191be79', id: this.id, "data-version": _package.version }, index.h("div", { key: 'ee070ba509f73e9ebe5bbc82276fe9be14ed4065', class: "collapse", id: `${this.id}--collapse`, ref: el => (this.collapsible = el) }, index.h("slot", { key: 'a2381f2fe4f777b68219a12efb8cbc90fe5e8206' }))));
75
75
  }
76
76
  get host() { return index.getElement(this); }
77
77
  static get watchers() { return {
@@ -2,11 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const postCollapsible = require('./post-collapsible-278b2a71.js');
6
- require('./index-f243643b.js');
7
- require('./package-628f6e9c.js');
8
- require('./index-8c288b1a.js');
5
+ const postCollapsible = require('./post-collapsible-00319f1f.js');
6
+ require('./index-3b732d59.js');
7
+ require('./package-45af106a.js');
8
+ require('./index-a1440961.js');
9
9
  require('./constants-238701d3.js');
10
+ require('./check-one-of-f4f5d0c0.js');
10
11
 
11
12
 
12
13
 
@@ -2,10 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f243643b.js');
5
+ const index = require('./index-3b732d59.js');
6
+ const appGlobals = require('./app-globals-3a1e7e63.js');
6
7
 
7
8
  /*
8
- Stencil Client Patch Browser v4.12.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.14.0 | MIT Licensed | https://stenciljs.com
9
10
  */
10
11
  const patchBrowser = () => {
11
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('post-components.cjs.js', document.baseURI).href));
@@ -16,8 +17,9 @@ const patchBrowser = () => {
16
17
  return index.promiseResolve(opts);
17
18
  };
18
19
 
19
- patchBrowser().then(options => {
20
- return index.bootstrapLazy([["post-accordion-item.cjs",[[1,"post-accordion-item",{"collapsed":[4],"headingLevel":[2,"heading-level"],"id":[32],"isOpen":[32],"toggle":[64]},[[0,"collapseChange","onCollapseChange"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert.cjs",[[1,"post-alert",{"dismissible":[4],"dismissLabel":[1,"dismiss-label"],"fixed":[4],"icon":[1],"type":[1],"alertId":[32],"classes":[32],"hasActions":[32],"hasHeading":[32],"onDismissButtonClick":[32],"dismiss":[64]},null,{"dismissible":["validateDismissible"],"dismissLabel":["validateDismissLabel"],"fixed":["validateFixed"],"icon":["validateIcon"],"type":["validateType"]}]]],["post-popover.cjs",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-tooltip.cjs",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-accordion.cjs",[[1,"post-accordion",{"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"collapseChange","collapseChangeHandler"]]]]],["post-tab-header.cjs",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel.cjs",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs.cjs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible.cjs",[[1,"post-collapsible",{"collapsed":[4],"id":[32],"isOpen":[32],"toggle":[64]},null,{"collapsed":["validateCollapsed"]}]]],["post-icon.cjs",[[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[1],"rotate":[2],"scale":[2],"svgStyles":[32],"svgOutput":[32]},null,{"animation":["validateAnimation"],"base":["validateBase"],"flipH":["validateFlipH"],"flipV":["validateFlipV"],"name":["validateName"],"rotate":["validateRotate"],"scale":["validateScale"]}]]],["post-popovercontainer.cjs",[[1,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]]], options);
20
+ patchBrowser().then(async (options) => {
21
+ await appGlobals.globalScripts();
22
+ return index.bootstrapLazy([["post-accordion-item.cjs",[[1,"post-accordion-item",{"collapsed":[4],"headingLevel":[2,"heading-level"],"id":[32],"isOpen":[32],"toggle":[64]},[[0,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert.cjs",[[1,"post-alert",{"dismissible":[4],"dismissLabel":[1,"dismiss-label"],"fixed":[4],"icon":[1],"type":[1],"alertId":[32],"classes":[32],"hasActions":[32],"hasHeading":[32],"onDismissButtonClick":[32],"dismiss":[64]},null,{"dismissible":["validateDismissible"],"dismissLabel":["validateDismissLabel"],"fixed":["validateFixed"],"icon":["validateIcon"],"type":["validateType"]}]]],["post-card-control.cjs",[[65,"post-card-control",{"label":[1],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1025],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"type":["validateControlType"],"checked":["updateControlChecked"],"disabled":["updateControlDisbled"]}]]],["post-popovercontainer.cjs",[[1,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-popover.cjs",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-icon.cjs",[[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[1],"rotate":[2],"scale":[2],"svgStyles":[32],"svgOutput":[32]},null,{"animation":["validateAnimation"],"base":["validateBase"],"flipH":["validateFlipH"],"flipV":["validateFlipV"],"name":["validateName"],"rotate":["validateRotate"],"scale":["validateScale"]}]]],["post-rating.cjs",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tag.cjs",[[1,"post-tag",{"variant":[1],"size":[1],"icon":[1],"classes":[32]},null,{"variant":["variantChanged"],"size":["sizeChanged"]}]]],["post-tooltip.cjs",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-accordion.cjs",[[1,"post-accordion",{"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]]]]],["post-tab-header.cjs",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel.cjs",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs.cjs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible.cjs",[[1,"post-collapsible",{"collapsed":[4],"id":[32],"isOpen":[32],"toggle":[64]},null,{"collapsed":["validateCollapsed"]}]]]], options);
21
23
  });
22
24
 
23
25
  exports.setNonce = index.setNonce;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-f243643b.js');
4
- const index$1 = require('./index-8c288b1a.js');
5
- const _package = require('./package-628f6e9c.js');
3
+ const index = require('./index-3b732d59.js');
4
+ const index$1 = require('./index-a1440961.js');
5
+ const _package = require('./package-45af106a.js');
6
6
  const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
7
7
 
8
8
  const postIconCss = ":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";
@@ -72,7 +72,7 @@ const PostIcon = class {
72
72
  const metaBase = (_b = (_a = document.head
73
73
  .querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base')) !== null && _b !== void 0 ? _b : null;
74
74
  const fileBase = `${(_d = (_c = this.base) !== null && _c !== void 0 ? _c : metaBase) !== null && _d !== void 0 ? _d : CDN_URL}/`.replace(/\/\/$/, '/');
75
- const fileName = `${this.name}.svg#icon`;
75
+ const fileName = `${this.name}.svg`;
76
76
  const filePath = `${fileBase}${fileName}`;
77
77
  this.path = new URL(filePath, window.location.origin).toString();
78
78
  }
@@ -86,7 +86,7 @@ const PostIcon = class {
86
86
  })
87
87
  .filter(([_key, value]) => value !== null)
88
88
  .reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
89
- return (index.h(index.Host, { key: '8a892fa9fa24e07995453e0e491328fde76dc496', "data-version": _package.version }, index.h("span", { key: '14761a251eb0ab02df268aa23597151ccb71ebc8', style: svgStyles })));
89
+ return (index.h(index.Host, { key: '67d24132c9748fda27201089dc343db992035d9c', "data-version": _package.version }, index.h("span", { key: '1333b3fd2b809c8baf13f6fbd3aa443e43a1bd66', style: svgStyles })));
90
90
  }
91
91
  get host() { return index.getElement(this); }
92
92
  static get watchers() { return {
@@ -2,11 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const postIcon = require('./post-icon-fd09bc54.js');
6
- require('./index-f243643b.js');
7
- require('./index-8c288b1a.js');
5
+ const postIcon = require('./post-icon-09845341.js');
6
+ require('./index-3b732d59.js');
7
+ require('./index-a1440961.js');
8
8
  require('./constants-238701d3.js');
9
- require('./package-628f6e9c.js');
9
+ require('./check-one-of-f4f5d0c0.js');
10
+ require('./package-45af106a.js');
10
11
  require('./check-non-empty-eeaa8f77.js');
11
12
 
12
13
 
@@ -0,0 +1,104 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-3b732d59.js');
4
+ const _package = require('./package-45af106a.js');
5
+ const attributeObserver = require('./attribute-observer-10f08c04.js');
6
+
7
+ const postPopoverCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;max-width:min(66vw,60rem)}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em}";
8
+ const PostPopoverStyle0 = postPopoverCss;
9
+
10
+ /**
11
+ * @slot default - Slot for placing content inside the popover.
12
+ */
13
+ let popoverInstances = 0;
14
+ const popoverTargetAttribute = 'data-popover-target';
15
+ const globalToggleHandler = (e) => {
16
+ const target = e.target;
17
+ if (!target || !('getAttribute' in target))
18
+ return;
19
+ const popoverTarget = target.getAttribute(popoverTargetAttribute);
20
+ if (!popoverTarget || ('key' in e && e.key !== 'Enter'))
21
+ return;
22
+ const popover = document.getElementById(popoverTarget);
23
+ popover === null || popover === void 0 ? void 0 : popover.toggle(target);
24
+ };
25
+ // Initialize a mutation observer for patching accessibility features
26
+ const triggerObserver = attributeObserver.getAttributeObserver(popoverTargetAttribute, trigger => {
27
+ const force = trigger.hasAttribute(popoverTargetAttribute);
28
+ trigger.setAttribute('aria-expanded', force ? 'false' : null);
29
+ });
30
+ const PostPopover = class {
31
+ constructor(hostRef) {
32
+ index.registerInstance(this, hostRef);
33
+ this.placement = 'top';
34
+ this.closeButtonCaption = undefined;
35
+ this.arrow = true;
36
+ this.localBeforeToggleHandler = this.beforeToggleHandler.bind(this);
37
+ }
38
+ connectedCallback() {
39
+ // Set up accessibility patcher and event listeners for the first component
40
+ if (popoverInstances === 0) {
41
+ window.addEventListener('pointerup', globalToggleHandler);
42
+ window.addEventListener('keydown', globalToggleHandler);
43
+ triggerObserver.observe(document.body, {
44
+ subtree: true,
45
+ childList: true,
46
+ attributeFilter: [popoverTargetAttribute],
47
+ });
48
+ }
49
+ popoverInstances++;
50
+ this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
51
+ }
52
+ componentDidLoad() {
53
+ this.popoverRef.addEventListener('beforetoggle', this.localBeforeToggleHandler);
54
+ }
55
+ disconnectedCallback() {
56
+ popoverInstances--;
57
+ // Remove listeners and observer after the last popover has been destructed
58
+ if (popoverInstances === 0) {
59
+ window.removeEventListener('click', globalToggleHandler);
60
+ window.removeEventListener('keydown', globalToggleHandler);
61
+ triggerObserver.disconnect();
62
+ }
63
+ this.popoverRef.removeEventListener('beforetoggle', this.localBeforeToggleHandler);
64
+ this.triggers.forEach(trigger => trigger.removeAttribute('aria-expanded'));
65
+ }
66
+ /**
67
+ * Programmatically display the popover
68
+ * @param target An element with [data-popover-target="id"] where the popover should be shown
69
+ */
70
+ async show(target) {
71
+ this.popoverRef.show(target);
72
+ target.setAttribute('aria-expanded', 'true');
73
+ }
74
+ /**
75
+ * Programmatically hide this popover
76
+ */
77
+ async hide() {
78
+ this.popoverRef.hide();
79
+ this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
80
+ }
81
+ /**
82
+ * Toggle popover display
83
+ * @param target An element with [data-popover-target="id"] where the popover should be anchored to
84
+ * @param force Pass true to always show or false to always hide
85
+ */
86
+ async toggle(target, force) {
87
+ const newState = await this.popoverRef.toggle(target, force);
88
+ this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
89
+ target.setAttribute('aria-expanded', `${newState}`);
90
+ }
91
+ get triggers() {
92
+ return document.querySelectorAll(`[${popoverTargetAttribute}="${this.host.id}"]`);
93
+ }
94
+ beforeToggleHandler() {
95
+ this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
96
+ }
97
+ render() {
98
+ return (index.h(index.Host, { key: '0ff53c82fb4ea06b0112cce0845e3ae06bdec959', "data-version": _package.version }, index.h("post-popovercontainer", { key: '7375b83987e86015ee3892c5a9a829c6d04f78d3', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, index.h("div", { key: '6c6859eeb8d6abdf82757d8ea785e52ba2640243', class: "popover-container" }, index.h("div", { key: '7c28716d8b3c1d0322cf59781ae514e99ea5360f', class: "popover-content" }, index.h("slot", { key: 'e2c1f5166b2212f408932680cf6b33372404e28e' })), index.h("button", { key: 'ced34214917296d0b2f24a4584c409d9f3ee2d2d', class: "btn-close", onClick: () => this.hide() }, index.h("span", { key: '36ad0884209774bf95ab0cef26ae27a531eca2f8', class: "visually-hidden" }, this.closeButtonCaption))))));
99
+ }
100
+ get host() { return index.getElement(this); }
101
+ };
102
+ PostPopover.style = PostPopoverStyle0;
103
+
104
+ exports.PostPopover = PostPopover;
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const postPopover = require('./post-popover-1e454296.js');
6
- require('./index-f243643b.js');
7
- require('./package-628f6e9c.js');
5
+ const postPopover = require('./post-popover-3b6aaeae.js');
6
+ require('./index-3b732d59.js');
7
+ require('./package-45af106a.js');
8
8
  require('./attribute-observer-10f08c04.js');
9
9
 
10
10
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-f243643b.js');
4
- const _package = require('./package-628f6e9c.js');
3
+ const index = require('./index-3b732d59.js');
4
+ const _package = require('./package-45af106a.js');
5
5
 
6
6
  /**
7
7
  * Custom positioning reference element.
@@ -1201,8 +1201,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1201
1201
  if (domElement) {
1202
1202
  const win = getWindow(domElement);
1203
1203
  const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1204
- let currentIFrame = win.frameElement;
1205
- while (currentIFrame && offsetParent && offsetWin !== win) {
1204
+ let currentWin = win;
1205
+ let currentIFrame = currentWin.frameElement;
1206
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1206
1207
  const iframeScale = getScale(currentIFrame);
1207
1208
  const iframeRect = currentIFrame.getBoundingClientRect();
1208
1209
  const css = getComputedStyle(currentIFrame);
@@ -1214,7 +1215,8 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1214
1215
  height *= iframeScale.y;
1215
1216
  x += left;
1216
1217
  y += top;
1217
- currentIFrame = getWindow(currentIFrame).frameElement;
1218
+ currentWin = getWindow(currentIFrame);
1219
+ currentIFrame = currentWin.frameElement;
1218
1220
  }
1219
1221
  }
1220
1222
  return rectToClientRect({
@@ -1226,27 +1228,14 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1226
1228
  }
1227
1229
 
1228
1230
  const topLayerSelectors = [':popover-open', ':modal'];
1229
- function topLayer(floating) {
1230
- let isTopLayer = false;
1231
- let x = 0;
1232
- let y = 0;
1233
- function setIsTopLayer(selector) {
1231
+ function isTopLayer(floating) {
1232
+ return topLayerSelectors.some(selector => {
1234
1233
  try {
1235
- isTopLayer = isTopLayer || floating.matches(selector);
1236
- } catch (e) {}
1237
- }
1238
- topLayerSelectors.forEach(selector => {
1239
- setIsTopLayer(selector);
1240
- });
1241
- if (isTopLayer) {
1242
- const containingBlock = getContainingBlock(floating);
1243
- if (containingBlock) {
1244
- const rect = containingBlock.getBoundingClientRect();
1245
- x = rect.x;
1246
- y = rect.y;
1234
+ return floating.matches(selector);
1235
+ } catch (e) {
1236
+ return false;
1247
1237
  }
1248
- }
1249
- return [isTopLayer, x, y];
1238
+ });
1250
1239
  }
1251
1240
 
1252
1241
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
@@ -1256,9 +1245,10 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1256
1245
  offsetParent,
1257
1246
  strategy
1258
1247
  } = _ref;
1248
+ const isFixed = strategy === 'fixed';
1259
1249
  const documentElement = getDocumentElement(offsetParent);
1260
- const [isTopLayer] = elements ? topLayer(elements.floating) : [false];
1261
- if (offsetParent === documentElement || isTopLayer) {
1250
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
1251
+ if (offsetParent === documentElement || topLayer && isFixed) {
1262
1252
  return rect;
1263
1253
  }
1264
1254
  let scroll = {
@@ -1268,7 +1258,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1268
1258
  let scale = createCoords(1);
1269
1259
  const offsets = createCoords(0);
1270
1260
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
1271
- if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
1261
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1272
1262
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1273
1263
  scroll = getNodeScroll(offsetParent);
1274
1264
  }
@@ -1459,7 +1449,7 @@ function getDimensions(element) {
1459
1449
  };
1460
1450
  }
1461
1451
 
1462
- function getRectRelativeToOffsetParent(element, offsetParent, strategy, floating) {
1452
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1463
1453
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
1464
1454
  const documentElement = getDocumentElement(offsetParent);
1465
1455
  const isFixed = strategy === 'fixed';
@@ -1481,17 +1471,8 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy, floating
1481
1471
  offsets.x = getWindowScrollBarX(documentElement);
1482
1472
  }
1483
1473
  }
1484
- let x = rect.left + scroll.scrollLeft - offsets.x;
1485
- let y = rect.top + scroll.scrollTop - offsets.y;
1486
- const [isTopLayer, topLayerX, topLayerY] = topLayer(floating);
1487
- if (isTopLayer) {
1488
- x += topLayerX;
1489
- y += topLayerY;
1490
- if (isOffsetParentAnElement) {
1491
- x += offsetParent.clientLeft;
1492
- y += offsetParent.clientTop;
1493
- }
1494
- }
1474
+ const x = rect.left + scroll.scrollLeft - offsets.x;
1475
+ const y = rect.top + scroll.scrollTop - offsets.y;
1495
1476
  return {
1496
1477
  x,
1497
1478
  y,
@@ -1514,7 +1495,7 @@ function getTrueOffsetParent(element, polyfill) {
1514
1495
  // such as table ancestors and cross browser bugs.
1515
1496
  function getOffsetParent(element, polyfill) {
1516
1497
  const window = getWindow(element);
1517
- if (!isHTMLElement(element)) {
1498
+ if (!isHTMLElement(element) || isTopLayer(element)) {
1518
1499
  return window;
1519
1500
  }
1520
1501
  let offsetParent = getTrueOffsetParent(element, polyfill);
@@ -1531,7 +1512,7 @@ const getElementRects = async function (data) {
1531
1512
  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1532
1513
  const getDimensionsFn = this.getDimensions;
1533
1514
  return {
1534
- reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy, data.floating),
1515
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1535
1516
  floating: {
1536
1517
  x: 0,
1537
1518
  y: 0,
@@ -1846,7 +1827,7 @@ const SIDE_MAP = {
1846
1827
  const PostPopovercontainer = class {
1847
1828
  constructor(hostRef) {
1848
1829
  index.registerInstance(this, hostRef);
1849
- this.postPopoverToggled = index.createEvent(this, "postPopoverToggled", 7);
1830
+ this.postToggle = index.createEvent(this, "postToggle", 7);
1850
1831
  this.placement = 'top';
1851
1832
  this.arrow = false;
1852
1833
  }
@@ -1911,7 +1892,7 @@ const PostPopovercontainer = class {
1911
1892
  if (typeof this.clearAutoUpdate === 'function')
1912
1893
  this.clearAutoUpdate();
1913
1894
  }
1914
- this.postPopoverToggled.emit(isOpen);
1895
+ this.postToggle.emit(isOpen);
1915
1896
  }
1916
1897
  /**
1917
1898
  * Start listening for DOM updates, scroll events etc. that have
@@ -1970,9 +1951,9 @@ const PostPopovercontainer = class {
1970
1951
  }
1971
1952
  }
1972
1953
  render() {
1973
- return (index.h(index.Host, { key: '8049387a5ba6eefb3165e84c098ba4ae5b8f443f', "data-version": _package.version }, index.h("div", { key: '63d3095a7992baf46fbc74b5c595654cbdeaba66', class: "popover", part: "popover", ref: (el) => (this.popoverRef = el) }, this.arrow && (index.h("span", { class: "arrow", ref: el => {
1954
+ return (index.h(index.Host, { key: '885b256b85ee57c3114243c980db51bb4c7eef92', "data-version": _package.version }, index.h("div", { key: 'e3ae342b6c0bb6b241141c5ee0d2a95ab0ba169e', class: "popover", part: "popover", ref: (el) => (this.popoverRef = el) }, this.arrow && (index.h("span", { class: "arrow", ref: el => {
1974
1955
  this.arrowRef = el;
1975
- } })), index.h("slot", { key: '74b1746bf48f8aa915c443721c1c2af1c1a3df5d' }))));
1956
+ } })), index.h("slot", { key: 'bc8d1e026b248c4c3cafa28c8cbdabe3610604e7' }))));
1976
1957
  }
1977
1958
  get host() { return index.getElement(this); }
1978
1959
  };
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const postPopovercontainer = require('./post-popovercontainer-5e355de3.js');
6
- require('./index-f243643b.js');
7
- require('./package-628f6e9c.js');
5
+ const postPopovercontainer = require('./post-popovercontainer-0b8343ac.js');
6
+ require('./index-3b732d59.js');
7
+ require('./package-45af106a.js');
8
8
 
9
9
 
10
10
 
@@ -0,0 +1,88 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-3b732d59.js');
4
+ const _package = require('./package-45af106a.js');
5
+
6
+ const postRatingCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -0.25rem;border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:2px;outline:2px solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}";
7
+ const PostRatingStyle0 = postRatingCss;
8
+
9
+ const PostRating = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.postInput = index.createEvent(this, "postInput", 7);
13
+ this.postChange = index.createEvent(this, "postChange", 7);
14
+ this.hasChanged = false;
15
+ this.hoveredIndex = undefined;
16
+ this.label = 'Rating';
17
+ this.stars = 5;
18
+ this.currentRating = 0;
19
+ this.readonly = false;
20
+ this.keydownHandler = this.keydownHandler.bind(this);
21
+ this.blurHandler = this.blurHandler.bind(this);
22
+ this.hoverHandler = this.hoverHandler.bind(this);
23
+ }
24
+ update(value) {
25
+ if (this.readonly || value < 0 || value > this.stars)
26
+ return;
27
+ this.currentRating = this.currentRating !== value ? value : 0; // If a star is clicked the second time, the rating gets set to 0.
28
+ this.postInput.emit({ value: this.currentRating });
29
+ this.hasChanged = true;
30
+ }
31
+ keydownHandler(e) {
32
+ switch (e.key) {
33
+ case 'ArrowDown':
34
+ case 'ArrowLeft':
35
+ e.preventDefault();
36
+ this.update(this.currentRating - 1);
37
+ break;
38
+ case 'ArrowUp':
39
+ case 'ArrowRight':
40
+ e.preventDefault();
41
+ this.update(this.currentRating + 1);
42
+ break;
43
+ case 'Home':
44
+ e.preventDefault();
45
+ this.update(0);
46
+ break;
47
+ case 'End':
48
+ e.preventDefault();
49
+ this.update(this.stars);
50
+ break;
51
+ case 'Enter':
52
+ case ' ':
53
+ this.blurHandler();
54
+ break;
55
+ default:
56
+ return;
57
+ }
58
+ }
59
+ blurHandler() {
60
+ if (this.hasChanged) {
61
+ this.postChange.emit({ value: this.currentRating });
62
+ this.hasChanged = false;
63
+ }
64
+ }
65
+ hoverHandler(index, e) {
66
+ if (this.readonly)
67
+ return;
68
+ if (e.type === 'mouseenter') {
69
+ this.hoveredIndex = index;
70
+ }
71
+ else if (e.type === 'mouseleave') {
72
+ this.hoveredIndex = undefined;
73
+ }
74
+ }
75
+ render() {
76
+ return (index.h(index.Host, { key: '9423629ce4f05cacb20fb3476d036dc175d21f98', "data-version": _package.version }, index.h("div", { key: '99efcd3cad667d24ea27a4c592d5c3b202191ed4', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (index.h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
77
+ 'star': true,
78
+ 'before-hover': i < this.hoveredIndex,
79
+ 'active': i < Math.round(this.currentRating),
80
+ 'hover': i === this.hoveredIndex,
81
+ 'after-active': i > this.hoveredIndex && i < this.currentRating,
82
+ }, onClick: () => this.update(i + 1), onMouseEnter: e => this.hoverHandler(i, e), onMouseLeave: e => this.hoverHandler(i, e) }, index.h("post-icon", { name: "2062", class: "stroke" }), index.h("post-icon", { name: "2574", class: "fill" })))))));
83
+ }
84
+ get host() { return index.getElement(this); }
85
+ };
86
+ PostRating.style = PostRatingStyle0;
87
+
88
+ exports.PostRating = PostRating;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const postRating = require('./post-rating-285f966e.js');
6
+ require('./index-3b732d59.js');
7
+ require('./package-45af106a.js');
8
+
9
+
10
+
11
+ exports.post_rating = postRating.PostRating;
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-3b732d59.js');
4
+ const _package = require('./package-45af106a.js');
5
+ const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
6
+
7
+ const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none;background-color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:var(--post-contrast-color-inverted);color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-secondary .tab-title{background-color:#666}.bg-secondary .tab-title.active{background-color:#666}.bg-secondary .nav-item{background-color:#666}.bg-success .tab-title{background-color:#2c871d}.bg-success .tab-title.active{background-color:#2c871d}.bg-success .nav-item{background-color:#2c871d}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-error .tab-title{background-color:#a51728}.bg-error .tab-title.active{background-color:#a51728}.bg-error .nav-item{background-color:#a51728}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-success-background .tab-title{background-color:#c0debb}.bg-success-background .tab-title.active{background-color:#c0debb}.bg-success-background .nav-item{background-color:#c0debb}.bg-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}.bg-error-background .tab-title{background-color:#ffdade}.bg-error-background .tab-title.active{background-color:#ffdade}.bg-error-background .nav-item{background-color:#ffdade}.bg-nightblue .tab-title{background-color:#004976}.bg-nightblue .tab-title.active{background-color:#004976}.bg-nightblue .nav-item{background-color:#004976}.bg-nightblue-bright .tab-title{background-color:#0076a8}.bg-nightblue-bright .tab-title.active{background-color:#0076a8}.bg-nightblue-bright .nav-item{background-color:#0076a8}.bg-petrol .tab-title{background-color:#006d68}.bg-petrol .tab-title.active{background-color:#006d68}.bg-petrol .nav-item{background-color:#006d68}.bg-petrol-bright .tab-title{background-color:#00968f}.bg-petrol-bright .tab-title.active{background-color:#00968f}.bg-petrol-bright .nav-item{background-color:#00968f}.bg-coral .tab-title{background-color:#9e2a2f}.bg-coral .tab-title.active{background-color:#9e2a2f}.bg-coral .nav-item{background-color:#9e2a2f}.bg-coral-bright .tab-title{background-color:#e03c31}.bg-coral-bright .tab-title.active{background-color:#e03c31}.bg-coral-bright .nav-item{background-color:#e03c31}.bg-olive .tab-title{background-color:#716135}.bg-olive .tab-title.active{background-color:#716135}.bg-olive .nav-item{background-color:#716135}.bg-olive-bright .tab-title{background-color:#aa9d2e}.bg-olive-bright .tab-title.active{background-color:#aa9d2e}.bg-olive-bright .nav-item{background-color:#aa9d2e}.bg-purple .tab-title{background-color:#80276c}.bg-purple .tab-title.active{background-color:#80276c}.bg-purple .nav-item{background-color:#80276c}.bg-purple-bright .tab-title{background-color:#c5299b}.bg-purple-bright .tab-title.active{background-color:#c5299b}.bg-purple-bright .nav-item{background-color:#c5299b}.bg-aubergine .tab-title{background-color:#523178}.bg-aubergine .tab-title.active{background-color:#523178}.bg-aubergine .nav-item{background-color:#523178}.bg-aubergine-bright .tab-title{background-color:#7566a0}.bg-aubergine-bright .tab-title.active{background-color:#7566a0}.bg-aubergine-bright .nav-item{background-color:#7566a0}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button}";
8
+ const PostTabHeaderStyle0 = postTabHeaderCss;
9
+
10
+ const PostTabHeader = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.tabId = undefined;
14
+ this.panel = undefined;
15
+ }
16
+ validateFor(newValue) {
17
+ checkNonEmpty.checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
18
+ }
19
+ componentWillLoad() {
20
+ this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
21
+ }
22
+ render() {
23
+ return (index.h(index.Host, { key: '7574d4ab05fae64a57f718e8c185c3aec1690e0f', id: this.tabId, role: "tab", "data-version": _package.version, "aria-selected": "false", tabindex: "-1", class: "tab-title" }, index.h("slot", { key: 'c8af8275935433eba2d673fe283412a2a9266340' })));
24
+ }
25
+ get host() { return index.getElement(this); }
26
+ static get watchers() { return {
27
+ "panel": ["validateFor"]
28
+ }; }
29
+ };
30
+ PostTabHeader.style = PostTabHeaderStyle0;
31
+
32
+ exports.PostTabHeader = PostTabHeader;
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const postTabHeader = require('./post-tab-header-5c8b9a0d.js');
6
- require('./index-f243643b.js');
7
- require('./package-628f6e9c.js');
5
+ const postTabHeader = require('./post-tab-header-f1c16656.js');
6
+ require('./index-3b732d59.js');
7
+ require('./package-45af106a.js');
8
8
  require('./check-non-empty-eeaa8f77.js');
9
9
  require('./constants-238701d3.js');
10
10