@swisspost/design-system-components 2.1.0 → 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 (211) 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} +85 -25
  5. package/dist/cjs/{index-8c288b1a.js → index-a1440961.js} +2 -6
  6. package/dist/cjs/index.cjs.js +20 -15
  7. package/dist/cjs/loader.cjs.js +5 -3
  8. package/dist/cjs/{package-96a46572.js → package-45af106a.js} +1 -1
  9. package/dist/cjs/{post-accordion-9d27458a.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-1867015c.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-07a67b83.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-003c0819.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 +3 -3
  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-6a9c4a4f.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-2eb6f376.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-260d0627.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 +5 -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 +28 -0
  54. package/dist/collection/components/post-rating/post-rating.js +7 -7
  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 +2 -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 +2 -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-rating2.js +6 -6
  80. package/dist/components/post-tab-header2.js +2 -2
  81. package/dist/components/post-tab-panel2.js +1 -1
  82. package/dist/components/post-tabs2.js +21 -19
  83. package/dist/components/post-tag.d.ts +11 -0
  84. package/dist/components/post-tag.js +6 -0
  85. package/dist/components/post-tag2.js +70 -0
  86. package/dist/components/post-tooltip2.js +10 -7
  87. package/dist/docs.json +477 -18
  88. package/dist/esm/app-globals-0f993ce5.js +3 -0
  89. package/dist/esm/check-one-of-6b3ef8eb.js +6 -0
  90. package/dist/esm/{index-1708db56.js → index-961099d2.js} +85 -25
  91. package/dist/esm/{index-b444db27.js → index-d1eba94c.js} +1 -5
  92. package/dist/esm/index.js +18 -15
  93. package/dist/esm/loader.js +6 -4
  94. package/dist/esm/{package-50a9c0c3.js → package-1242b80d.js} +1 -1
  95. package/dist/esm/{post-accordion-33fe4f0e.js → post-accordion-bfd058bc.js} +22 -20
  96. package/dist/esm/post-accordion-item-4fa44842.js +51 -0
  97. package/dist/esm/post-accordion-item.entry.js +5 -4
  98. package/dist/esm/post-accordion.entry.js +3 -3
  99. package/dist/esm/post-alert-192d0176.js +96 -0
  100. package/dist/esm/post-alert.entry.js +5 -4
  101. package/dist/esm/post-card-control-b23e1e6f.js +309 -0
  102. package/dist/esm/post-card-control.entry.js +6 -0
  103. package/dist/esm/{post-collapsible-50dc361b.js → post-collapsible-d848eb2a.js} +7 -7
  104. package/dist/esm/post-collapsible.entry.js +5 -4
  105. package/dist/esm/post-components.js +7 -5
  106. package/dist/esm/{post-icon-00f314ae.js → post-icon-811654f7.js} +5 -5
  107. package/dist/esm/post-icon.entry.js +5 -4
  108. package/dist/esm/post-popover-b48a9d7c.js +102 -0
  109. package/dist/esm/post-popover.entry.js +3 -3
  110. package/dist/esm/{post-popovercontainer-62e1fd82.js → post-popovercontainer-7413bb41.js} +26 -45
  111. package/dist/esm/post-popovercontainer.entry.js +3 -3
  112. package/dist/esm/post-rating-806de800.js +86 -0
  113. package/dist/esm/post-rating.entry.js +3 -3
  114. package/dist/esm/post-tab-header-95f0dc6a.js +30 -0
  115. package/dist/esm/post-tab-header.entry.js +3 -3
  116. package/dist/esm/{post-tab-panel-37a1331f.js → post-tab-panel-d7145a70.js} +3 -3
  117. package/dist/esm/post-tab-panel.entry.js +3 -3
  118. package/dist/esm/{post-tabs-c4e65a45.js → post-tabs-f130a7d8.js} +23 -21
  119. package/dist/esm/post-tabs.entry.js +3 -3
  120. package/dist/esm/post-tag-7c329d6c.js +41 -0
  121. package/dist/esm/post-tag.entry.js +3 -0
  122. package/dist/esm/{post-tooltip-033f63fa.js → post-tooltip-942bd014.js} +12 -9
  123. package/dist/esm/post-tooltip.entry.js +3 -3
  124. package/dist/post-components/index.esm.js +1 -1
  125. package/dist/post-components/p-0d4e50a9.js +1 -0
  126. package/dist/post-components/p-1c780bac.entry.js +1 -0
  127. package/dist/post-components/p-2524b6b9.entry.js +1 -0
  128. package/dist/post-components/p-2ee23269.entry.js +1 -0
  129. package/dist/post-components/p-416426cc.js +1 -0
  130. package/dist/post-components/p-41c9c59f.js +1 -0
  131. package/dist/post-components/p-46cea7ee.js +1 -0
  132. package/dist/post-components/p-4aa14704.js +1 -0
  133. package/dist/post-components/p-579f55af.js +1 -0
  134. package/dist/post-components/p-5b2cdcf0.js +2 -0
  135. package/dist/post-components/p-60b02cbb.entry.js +1 -0
  136. package/dist/post-components/p-611b3c41.js +1 -0
  137. package/dist/post-components/p-62407836.entry.js +1 -0
  138. package/dist/post-components/p-6308fd47.js +1 -0
  139. package/dist/post-components/p-6fba8cb2.entry.js +1 -0
  140. package/dist/post-components/p-86acda91.entry.js +1 -0
  141. package/dist/post-components/{p-7e7833f7.js → p-93ba2827.js} +3 -3
  142. package/dist/post-components/p-94b5c41e.entry.js +1 -0
  143. package/dist/post-components/p-a3b54b5f.js +1 -0
  144. package/dist/post-components/p-a4b6b950.js +1 -0
  145. package/dist/post-components/p-b4abbb28.js +1 -0
  146. package/dist/post-components/p-c0f8e385.entry.js +1 -0
  147. package/dist/post-components/p-c4fe5052.entry.js +1 -0
  148. package/dist/post-components/p-c9004503.js +1 -0
  149. package/dist/post-components/p-cd9c10dd.entry.js +1 -0
  150. package/dist/post-components/p-d4cd7bb0.js +1 -0
  151. package/dist/post-components/p-d8d76dd1.entry.js +1 -0
  152. package/dist/post-components/p-e1255160.js +1 -0
  153. package/dist/post-components/p-e819d5fb.entry.js +1 -0
  154. package/dist/post-components/p-f44c172a.js +1 -0
  155. package/dist/post-components/p-f91c0e1b.js +1 -0
  156. package/dist/post-components/p-f9e58309.js +1 -0
  157. package/dist/post-components/p-ffb9a651.entry.js +1 -0
  158. package/dist/post-components/post-components.esm.js +1 -1
  159. package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
  160. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +1 -1
  161. package/dist/types/components/post-alert/alert-types.d.ts +2 -2
  162. package/dist/types/components/post-alert/post-alert.d.ts +2 -2
  163. package/dist/types/components/post-card-control/post-card-control.d.ts +109 -0
  164. package/dist/types/components/post-collapsible/post-collapsible.d.ts +1 -1
  165. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -1
  166. package/dist/types/components/post-rating/post-rating.d.ts +2 -2
  167. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  168. package/dist/types/components/post-tag/post-tag.d.ts +27 -0
  169. package/dist/types/components.d.ts +178 -12
  170. package/dist/types/css-modules.js +0 -0
  171. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/css-modules.d.ts +6 -0
  172. package/dist/types/index.d.ts +2 -0
  173. package/dist/types/utils/index.d.ts +1 -0
  174. package/dist/types/utils/sass-export.d.ts +2 -0
  175. package/package.json +17 -17
  176. package/dist/cjs/post-accordion-item-61fb55fa.js +0 -51
  177. package/dist/cjs/post-alert-a810f5b9.js +0 -98
  178. package/dist/cjs/post-popover-9610b64c.js +0 -104
  179. package/dist/cjs/post-rating-75574abd.js +0 -88
  180. package/dist/cjs/post-tab-header-85424e32.js +0 -32
  181. package/dist/esm/post-accordion-item-1fd95c9f.js +0 -49
  182. package/dist/esm/post-alert-65d67f69.js +0 -96
  183. package/dist/esm/post-popover-40bfd1b7.js +0 -102
  184. package/dist/esm/post-rating-f7a79ed4.js +0 -86
  185. package/dist/esm/post-tab-header-0683252a.js +0 -30
  186. package/dist/post-components/p-00dcad55.js +0 -1
  187. package/dist/post-components/p-01e57281.entry.js +0 -1
  188. package/dist/post-components/p-06c989fb.entry.js +0 -1
  189. package/dist/post-components/p-07ffb6de.entry.js +0 -1
  190. package/dist/post-components/p-10b4cf7a.js +0 -2
  191. package/dist/post-components/p-26c658c1.entry.js +0 -1
  192. package/dist/post-components/p-2a964700.js +0 -1
  193. package/dist/post-components/p-35f14000.js +0 -1
  194. package/dist/post-components/p-3fb09ecd.js +0 -1
  195. package/dist/post-components/p-4b0a45d8.entry.js +0 -1
  196. package/dist/post-components/p-53e8e4e7.entry.js +0 -1
  197. package/dist/post-components/p-598b11b6.js +0 -1
  198. package/dist/post-components/p-5b6ee52a.entry.js +0 -1
  199. package/dist/post-components/p-8139faa4.entry.js +0 -1
  200. package/dist/post-components/p-8cd6d7c2.js +0 -1
  201. package/dist/post-components/p-99a9602e.js +0 -1
  202. package/dist/post-components/p-a2775477.entry.js +0 -1
  203. package/dist/post-components/p-a905b16b.entry.js +0 -1
  204. package/dist/post-components/p-aa02111b.js +0 -1
  205. package/dist/post-components/p-b135d3e2.js +0 -1
  206. package/dist/post-components/p-b81e61ed.entry.js +0 -1
  207. package/dist/post-components/p-d6bc34ff.js +0 -1
  208. package/dist/post-components/p-da2b8e26.entry.js +0 -1
  209. package/dist/post-components/p-f0476913.js +0 -1
  210. package/dist/post-components/p-f0e82e63.js +0 -1
  211. package/dist/post-components/p-ff0e1564.js +0 -1
@@ -10,6 +10,7 @@ const NAMESPACE = 'post-components';
10
10
  */
11
11
  let scopeId;
12
12
  let hostTagName;
13
+ let useNativeShadowDom = false;
13
14
  let isSvgMode = false;
14
15
  let queuePending = false;
15
16
  const createTime = (fnName, tagName = '') => {
@@ -34,6 +35,12 @@ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
34
35
  * support as of Stencil v4.
35
36
  */
36
37
  const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
38
+ const FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
39
+ 'formAssociatedCallback',
40
+ 'formResetCallback',
41
+ 'formDisabledCallback',
42
+ 'formStateRestoreCallback',
43
+ ];
37
44
  /**
38
45
  * Default style mode id
39
46
  */
@@ -924,8 +931,7 @@ const patch = (oldVNode, newVNode, isInitialRender = false) => {
924
931
  const text = newVNode.$text$;
925
932
  if (text === null) {
926
933
  {
927
- if (tag === 'slot')
928
- ;
934
+ if (tag === 'slot' && !useNativeShadowDom) ;
929
935
  else {
930
936
  // either this is the first render of an element OR it's an update
931
937
  // AND we already know it's possible it could have changed
@@ -986,6 +992,7 @@ const nullifyVNodeRefs = (vNode) => {
986
992
  */
987
993
  const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
988
994
  const hostElm = hostRef.$hostElement$;
995
+ const cmpMeta = hostRef.$cmpMeta$;
989
996
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
990
997
  // if `renderFnResults` is a Host node then we can use it directly. If not,
991
998
  // we need to call `h` again to wrap the children of our component in a
@@ -1022,6 +1029,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1022
1029
  {
1023
1030
  scopeId = hostElm['s-sc'];
1024
1031
  }
1032
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1025
1033
  // synchronous patch
1026
1034
  patch(oldVNode, rootVnode, isInitialLoad);
1027
1035
  };
@@ -1215,6 +1223,9 @@ const postUpdateComponent = (hostRef) => {
1215
1223
  const endPostUpdate = createTime('postUpdate', tagName);
1216
1224
  const instance = hostRef.$lazyInstance$ ;
1217
1225
  const ancestorComponent = hostRef.$ancestorComponent$;
1226
+ {
1227
+ safeCall(instance, 'componentDidRender');
1228
+ }
1218
1229
  if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1219
1230
  hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1220
1231
  {
@@ -1341,6 +1352,28 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1341
1352
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1342
1353
  var _a;
1343
1354
  const prototype = Cstr.prototype;
1355
+ /**
1356
+ * proxy form associated custom element lifecycle callbacks
1357
+ * @ref https://web.dev/articles/more-capable-form-controls#lifecycle_callbacks
1358
+ */
1359
+ if (cmpMeta.$flags$ & 64 /* CMP_FLAGS.formAssociated */ && flags & 1 /* PROXY_FLAGS.isElementConstructor */) {
1360
+ FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => Object.defineProperty(prototype, cbName, {
1361
+ value(...args) {
1362
+ const hostRef = getHostRef(this);
1363
+ const instance = hostRef.$lazyInstance$ ;
1364
+ if (!instance) {
1365
+ hostRef.$onReadyPromise$.then((instance) => {
1366
+ const cb = instance[cbName];
1367
+ typeof cb === 'function' && cb.call(instance, ...args);
1368
+ });
1369
+ }
1370
+ else {
1371
+ const cb = instance[cbName];
1372
+ typeof cb === 'function' && cb.call(instance, ...args);
1373
+ }
1374
+ },
1375
+ }));
1376
+ }
1344
1377
  if (cmpMeta.$members$) {
1345
1378
  if (Cstr.watchers) {
1346
1379
  cmpMeta.$watchers$ = Cstr.watchers;
@@ -1488,7 +1521,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1488
1521
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1489
1522
  // Let the runtime know that the component has been initialized
1490
1523
  hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1491
- {
1524
+ const bundleId = cmpMeta.$lazyBundleId$;
1525
+ if (bundleId) {
1492
1526
  // lazy loaded components
1493
1527
  // request the component's implementation to be
1494
1528
  // wired up with the host element
@@ -1535,6 +1569,14 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1535
1569
  endNewInstance();
1536
1570
  fireConnectedCallback(hostRef.$lazyInstance$);
1537
1571
  }
1572
+ else {
1573
+ // sync constructor component
1574
+ Cstr = elm.constructor;
1575
+ // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
1576
+ // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
1577
+ // Stencil has completed instantiating the component.
1578
+ customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
1579
+ }
1538
1580
  if (Cstr.style) {
1539
1581
  // this component has styles but we haven't registered them yet
1540
1582
  let style = Cstr.style;
@@ -1721,6 +1763,12 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1721
1763
  return getHostRef(this).$onReadyPromise$;
1722
1764
  }
1723
1765
  };
1766
+ // if the component is formAssociated we need to set that on the host
1767
+ // element so that it will be ready for `attachInternals` to be called on
1768
+ // it later on
1769
+ if (cmpMeta.$flags$ & 64 /* CMP_FLAGS.formAssociated */) {
1770
+ HostElement.formAssociated = true;
1771
+ }
1724
1772
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
1725
1773
  if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1726
1774
  cmpTags.push(tagName);
@@ -1728,25 +1776,29 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1728
1776
  }
1729
1777
  });
1730
1778
  });
1731
- // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
1732
- if (hasSlotRelocation) {
1733
- dataStyles.innerHTML += SLOT_FB_CSS;
1734
- }
1735
- // Add hydration styles
1736
- {
1737
- dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
1738
- }
1739
- // If we have styles, add them to the DOM
1740
- if (dataStyles.innerHTML.length) {
1741
- dataStyles.setAttribute('data-styles', '');
1742
- // Apply CSP nonce to the style tag if it exists
1743
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1744
- if (nonce != null) {
1745
- dataStyles.setAttribute('nonce', nonce);
1779
+ // Only bother generating CSS if we have components
1780
+ // TODO(STENCIL-1118): Add test cases for CSS content based on conditionals
1781
+ if (cmpTags.length > 0) {
1782
+ // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
1783
+ if (hasSlotRelocation) {
1784
+ dataStyles.textContent += SLOT_FB_CSS;
1785
+ }
1786
+ // Add hydration styles
1787
+ {
1788
+ dataStyles.textContent += cmpTags + HYDRATED_CSS;
1789
+ }
1790
+ // If we have styles, add them to the DOM
1791
+ if (dataStyles.innerHTML.length) {
1792
+ dataStyles.setAttribute('data-styles', '');
1793
+ // Apply CSP nonce to the style tag if it exists
1794
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1795
+ if (nonce != null) {
1796
+ dataStyles.setAttribute('nonce', nonce);
1797
+ }
1798
+ // Insert the styles into the document head
1799
+ // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
1800
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1746
1801
  }
1747
- // Insert the styles into the document head
1748
- // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
1749
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1750
1802
  }
1751
1803
  // Process deferred connectedCallbacks now all components have been registered
1752
1804
  isBootstrapping = false;
@@ -1892,6 +1944,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1892
1944
  return import(
1893
1945
  /* webpackMode: "lazy" */
1894
1946
  './post-alert.entry.js').then(processMod, consoleError);
1947
+ case 'post-card-control':
1948
+ return import(
1949
+ /* webpackMode: "lazy" */
1950
+ './post-card-control.entry.js').then(processMod, consoleError);
1895
1951
  case 'post-popover':
1896
1952
  return import(
1897
1953
  /* webpackMode: "lazy" */
@@ -1912,6 +1968,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1912
1968
  return import(
1913
1969
  /* webpackMode: "lazy" */
1914
1970
  './post-tabs.entry.js').then(processMod, consoleError);
1971
+ case 'post-tag':
1972
+ return import(
1973
+ /* webpackMode: "lazy" */
1974
+ './post-tag.entry.js').then(processMod, consoleError);
1915
1975
  case 'post-tooltip':
1916
1976
  return import(
1917
1977
  /* webpackMode: "lazy" */
@@ -1920,14 +1980,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1920
1980
  return import(
1921
1981
  /* webpackMode: "lazy" */
1922
1982
  './post-collapsible.entry.js').then(processMod, consoleError);
1923
- case 'post-icon':
1924
- return import(
1925
- /* webpackMode: "lazy" */
1926
- './post-icon.entry.js').then(processMod, consoleError);
1927
1983
  case 'post-popovercontainer':
1928
1984
  return import(
1929
1985
  /* webpackMode: "lazy" */
1930
1986
  './post-popovercontainer.entry.js').then(processMod, consoleError);
1987
+ case 'post-icon':
1988
+ return import(
1989
+ /* webpackMode: "lazy" */
1990
+ './post-icon.entry.js').then(processMod, consoleError);
1931
1991
  }
1932
1992
  }
1933
1993
  return import(
@@ -1,4 +1,5 @@
1
1
  import { E as EMPTY_VALUES } from './constants-8d548297.js';
2
+ import { c as checkOneOf } from './check-one-of-6b3ef8eb.js';
2
3
 
3
4
  function emptyOr(check) {
4
5
  return (...args) => {
@@ -8,11 +9,6 @@ function emptyOr(check) {
8
9
  };
9
10
  }
10
11
 
11
- function checkOneOf(value, possibleValues, error) {
12
- if (!possibleValues.includes(value))
13
- throw new Error(error);
14
- }
15
-
16
12
  function checkPattern(value, pattern, errorMessage) {
17
13
  if (typeof value !== 'string' || !pattern.test(value))
18
14
  throw new Error(errorMessage);
package/dist/esm/index.js CHANGED
@@ -1,19 +1,22 @@
1
- export { P as PostAccordion } from './post-accordion-33fe4f0e.js';
2
- export { P as PostAccordionItem } from './post-accordion-item-1fd95c9f.js';
3
- export { P as PostAlert } from './post-alert-65d67f69.js';
4
- export { P as PostCollapsible } from './post-collapsible-50dc361b.js';
5
- export { P as PostIcon } from './post-icon-00f314ae.js';
6
- export { P as PostPopover } from './post-popover-40bfd1b7.js';
7
- export { P as PostPopovercontainer } from './post-popovercontainer-62e1fd82.js';
8
- export { P as PostRating } from './post-rating-f7a79ed4.js';
9
- export { P as PostTabs } from './post-tabs-c4e65a45.js';
10
- export { P as PostTabHeader } from './post-tab-header-0683252a.js';
11
- export { P as PostTabPanel } from './post-tab-panel-37a1331f.js';
12
- export { P as PostTooltip } from './post-tooltip-033f63fa.js';
13
- import './index-1708db56.js';
14
- import './package-50a9c0c3.js';
15
- import './index-b444db27.js';
1
+ export { P as PostAccordion } from './post-accordion-bfd058bc.js';
2
+ export { P as PostAccordionItem } from './post-accordion-item-4fa44842.js';
3
+ export { P as PostAlert } from './post-alert-192d0176.js';
4
+ export { P as PostCardControl } from './post-card-control-b23e1e6f.js';
5
+ export { P as PostCollapsible } from './post-collapsible-d848eb2a.js';
6
+ export { P as PostIcon } from './post-icon-811654f7.js';
7
+ export { P as PostPopover } from './post-popover-b48a9d7c.js';
8
+ export { P as PostPopovercontainer } from './post-popovercontainer-7413bb41.js';
9
+ export { P as PostRating } from './post-rating-806de800.js';
10
+ export { P as PostTabs } from './post-tabs-f130a7d8.js';
11
+ export { P as PostTabHeader } from './post-tab-header-95f0dc6a.js';
12
+ export { P as PostTabPanel } from './post-tab-panel-d7145a70.js';
13
+ export { P as PostTooltip } from './post-tooltip-942bd014.js';
14
+ export { P as PostTag } from './post-tag-7c329d6c.js';
15
+ import './index-961099d2.js';
16
+ import './package-1242b80d.js';
17
+ import './index-d1eba94c.js';
16
18
  import './constants-8d548297.js';
19
+ import './check-one-of-6b3ef8eb.js';
17
20
  import './fade-7fd71785.js';
18
21
  import './check-non-empty-58bd6b17.js';
19
22
  import './attribute-observer-37fa950a.js';
@@ -1,9 +1,11 @@
1
- import { b as bootstrapLazy } from './index-1708db56.js';
2
- export { s as setNonce } from './index-1708db56.js';
1
+ import { b as bootstrapLazy } from './index-961099d2.js';
2
+ export { s as setNonce } from './index-961099d2.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
3
4
 
4
- const defineCustomElements = (win, options) => {
5
+ const defineCustomElements = async (win, options) => {
5
6
  if (typeof window === 'undefined') return undefined;
6
- return bootstrapLazy([["post-accordion-item",[[1,"post-accordion-item",{"collapsed":[4],"headingLevel":[2,"heading-level"],"id":[32],"isOpen":[32],"toggle":[64]},[[0,"collapseChange","onCollapseChange"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert",[[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",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-accordion",[[1,"post-accordion",{"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"collapseChange","collapseChangeHandler"]]]]],["post-tab-header",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible",[[1,"post-collapsible",{"collapsed":[4],"id":[32],"isOpen":[32],"toggle":[64]},null,{"collapsed":["validateCollapsed"]}]]],["post-icon",[[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",[[1,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]]], options);
7
+ await globalScripts();
8
+ return bootstrapLazy([["post-accordion-item",[[1,"post-accordion-item",{"collapsed":[4],"headingLevel":[2,"heading-level"],"id":[32],"isOpen":[32],"toggle":[64]},[[0,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert",[[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",[[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",[[1,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-icon",[[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",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tag",[[1,"post-tag",{"variant":[1],"size":[1],"icon":[1],"classes":[32]},null,{"variant":["variantChanged"],"size":["sizeChanged"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-accordion",[[1,"post-accordion",{"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]]]]],["post-tab-header",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible",[[1,"post-collapsible",{"collapsed":[4],"id":[32],"isOpen":[32],"toggle":[64]},null,{"collapsed":["validateCollapsed"]}]]]], options);
7
9
  };
8
10
 
9
11
  export { defineCustomElements };
@@ -1,3 +1,3 @@
1
- const version = "2.1.0";
1
+ const version = "7.0.0";
2
2
 
3
3
  export { version as v };
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-1708db56.js';
2
- import { v as version } from './package-50a9c0c3.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-961099d2.js';
2
+ import { v as version } from './package-1242b80d.js';
3
3
 
4
4
  const postAccordionCss = ":host{display:block}";
5
5
  const PostAccordionStyle0 = postAccordionCss;
@@ -22,24 +22,26 @@ const PostAccordion = class {
22
22
  throw new Error(`No post-accordion-item found with id #${id}.`);
23
23
  await itemToToggle.toggle();
24
24
  }
25
- collapseChangeHandler(event) {
26
- event.stopPropagation();
27
- const toggledItem = event.target;
28
- const isClosing = this.expandedItems.has(toggledItem);
29
- if (isClosing) {
30
- this.expandedItems.delete(toggledItem);
31
- }
32
- else {
33
- this.expandedItems.add(toggledItem);
25
+ collapseToggleHandler(event) {
26
+ if (event.target.localName === 'post-accordion-item') {
27
+ event.stopPropagation();
28
+ const toggledItem = event.target;
29
+ const isClosing = this.expandedItems.has(toggledItem);
30
+ if (isClosing) {
31
+ this.expandedItems.delete(toggledItem);
32
+ }
33
+ else {
34
+ this.expandedItems.add(toggledItem);
35
+ }
36
+ if (this.multiple || isClosing)
37
+ return;
38
+ // close other open accordion items to have only one opened at a time
39
+ Array.from(this.expandedItems.values())
40
+ .filter(item => item !== toggledItem)
41
+ .forEach(item => {
42
+ item.toggle(false);
43
+ });
34
44
  }
35
- if (this.multiple || isClosing)
36
- return;
37
- // close other open accordion items to have only one opened at a time
38
- Array.from(this.expandedItems.values())
39
- .filter(item => item !== toggledItem)
40
- .forEach(item => {
41
- item.toggle(false);
42
- });
43
45
  }
44
46
  /**
45
47
  * Expands all `post-accordion-item`.
@@ -76,7 +78,7 @@ const PostAccordion = class {
76
78
  });
77
79
  }
78
80
  render() {
79
- return (h(Host, { key: '08d0661a81fef59f3b74cbceceff49920cbfda0c', "data-version": version }, h("div", { key: '2625963e5f2952fd5bd5b4f05a14142a501b272c', class: "accordion" }, h("slot", { key: 'f2514ed051562c17fe852bd2bf39c10282915bfb', onSlotchange: () => this.registerAccordionItems() }))));
81
+ return (h(Host, { key: '4e45abc399bebb6027e8bf6703526f45700559f9', "data-version": version }, h("div", { key: 'aa6224cbdeeba3d3f4080f79800006103e265938', class: "accordion" }, h("slot", { key: '565fe15122467f6fb56eae0eca94d1935b38caca', onSlotchange: () => this.registerAccordionItems() }))));
80
82
  }
81
83
  get host() { return getElement(this); }
82
84
  };
@@ -0,0 +1,51 @@
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-961099d2.js';
2
+ import { v as version } from './package-1242b80d.js';
3
+ import { c as checkEmptyOrOneOf } from './index-d1eba94c.js';
4
+
5
+ const HEADING_LEVELS = [1, 2, 3, 4, 5, 6];
6
+
7
+ const postAccordionItemCss = "post-accordion-item::part(accordion-item),.bg-yellow post-accordion-item::part(accordion-item),.bg-white post-accordion-item::part(accordion-item),.bg-light post-accordion-item::part(accordion-item),.bg-gray post-accordion-item::part(accordion-item),.bg-dark post-accordion-item::part(accordion-item),.bg-black post-accordion-item::part(accordion-item),.bg-primary post-accordion-item::part(accordion-item),.bg-secondary post-accordion-item::part(accordion-item),.bg-success post-accordion-item::part(accordion-item),.bg-warning post-accordion-item::part(accordion-item),.bg-error post-accordion-item::part(accordion-item),.bg-info post-accordion-item::part(accordion-item),.bg-success-background post-accordion-item::part(accordion-item),.bg-warning-background post-accordion-item::part(accordion-item),.bg-error-background post-accordion-item::part(accordion-item),.bg-nightblue post-accordion-item::part(accordion-item),.bg-nightblue-bright post-accordion-item::part(accordion-item),.bg-petrol post-accordion-item::part(accordion-item),.bg-petrol-bright post-accordion-item::part(accordion-item),.bg-coral post-accordion-item::part(accordion-item),.bg-coral-bright post-accordion-item::part(accordion-item),.bg-olive post-accordion-item::part(accordion-item),.bg-olive-bright post-accordion-item::part(accordion-item),.bg-purple post-accordion-item::part(accordion-item),.bg-purple-bright post-accordion-item::part(accordion-item),.bg-aubergine post-accordion-item::part(accordion-item),.bg-aubergine-bright post-accordion-item::part(accordion-item),.accordion-item,.bg-yellow .accordion-item,.bg-white .accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item,.bg-dark .accordion-item,.bg-black .accordion-item,.bg-primary .accordion-item,.bg-secondary .accordion-item,.bg-success .accordion-item,.bg-warning .accordion-item,.bg-error .accordion-item,.bg-info .accordion-item,.bg-success-background .accordion-item,.bg-warning-background .accordion-item,.bg-error-background .accordion-item,.bg-nightblue .accordion-item,.bg-nightblue-bright .accordion-item,.bg-petrol .accordion-item,.bg-petrol-bright .accordion-item,.bg-coral .accordion-item,.bg-coral-bright .accordion-item,.bg-olive .accordion-item,.bg-olive-bright .accordion-item,.bg-purple .accordion-item,.bg-purple-bright .accordion-item,.bg-aubergine .accordion-item,.bg-aubergine-bright .accordion-item{--post-bg-opacity:1;background-color:rgba(var(--post-bg-rgb), var(--post-bg-opacity)) !important;color:var(--post-contrast-color) !important}post-accordion-item::part(accordion-item),.bg-yellow post-accordion-item::part(accordion-item),.bg-white post-accordion-item::part(accordion-item),.bg-light post-accordion-item::part(accordion-item),.bg-gray post-accordion-item::part(accordion-item),.bg-dark post-accordion-item::part(accordion-item),.bg-black post-accordion-item::part(accordion-item),.bg-primary post-accordion-item::part(accordion-item),.bg-secondary post-accordion-item::part(accordion-item),.bg-success post-accordion-item::part(accordion-item),.bg-warning post-accordion-item::part(accordion-item),.bg-error post-accordion-item::part(accordion-item),.bg-info post-accordion-item::part(accordion-item),.bg-success-background post-accordion-item::part(accordion-item),.bg-warning-background post-accordion-item::part(accordion-item),.bg-error-background post-accordion-item::part(accordion-item),.bg-nightblue post-accordion-item::part(accordion-item),.bg-nightblue-bright post-accordion-item::part(accordion-item),.bg-petrol post-accordion-item::part(accordion-item),.bg-petrol-bright post-accordion-item::part(accordion-item),.bg-coral post-accordion-item::part(accordion-item),.bg-coral-bright post-accordion-item::part(accordion-item),.bg-olive post-accordion-item::part(accordion-item),.bg-olive-bright post-accordion-item::part(accordion-item),.bg-purple post-accordion-item::part(accordion-item),.bg-purple-bright post-accordion-item::part(accordion-item),.bg-aubergine post-accordion-item::part(accordion-item),.bg-aubergine-bright post-accordion-item::part(accordion-item),.accordion-item,.bg-yellow .accordion-item,.bg-white .accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item,.bg-dark .accordion-item,.bg-black .accordion-item,.bg-primary .accordion-item,.bg-secondary .accordion-item,.bg-success .accordion-item,.bg-warning .accordion-item,.bg-error .accordion-item,.bg-info .accordion-item,.bg-success-background .accordion-item,.bg-warning-background .accordion-item,.bg-error-background .accordion-item,.bg-nightblue .accordion-item,.bg-nightblue-bright .accordion-item,.bg-petrol .accordion-item,.bg-petrol-bright .accordion-item,.bg-coral .accordion-item,.bg-coral-bright .accordion-item,.bg-olive .accordion-item,.bg-olive-bright .accordion-item,.bg-purple .accordion-item,.bg-purple-bright .accordion-item,.bg-aubergine .accordion-item,.bg-aubergine-bright .accordion-item{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}.accordion-item{--post-bg-rgb:244, 243, 241;border-block:2px solid #666}.bg-yellow .accordion-item{--post-bg-rgb:255, 255, 255}.bg-white .accordion-item{--post-bg-rgb:244, 243, 241}.bg-light .accordion-item{--post-bg-rgb:255, 255, 255}.bg-gray .accordion-item{--post-bg-rgb:255, 255, 255}.bg-dark .accordion-item{--post-bg-rgb:255, 255, 255}.bg-black .accordion-item{--post-bg-rgb:255, 255, 255}.bg-primary .accordion-item{--post-bg-rgb:255, 255, 255}.bg-secondary .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning .accordion-item{--post-bg-rgb:255, 255, 255}.bg-error .accordion-item{--post-bg-rgb:255, 255, 255}.bg-info .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-error-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-nightblue .accordion-item{--post-bg-rgb:255, 255, 255}.bg-nightblue-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-petrol .accordion-item{--post-bg-rgb:255, 255, 255}.bg-petrol-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-coral .accordion-item{--post-bg-rgb:255, 255, 255}.bg-coral-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-olive .accordion-item{--post-bg-rgb:255, 255, 255}.bg-olive-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-purple .accordion-item{--post-bg-rgb:255, 255, 255}.bg-purple-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-aubergine .accordion-item{--post-bg-rgb:255, 255, 255}.bg-aubergine-bright .accordion-item{--post-bg-rgb:255, 255, 255}.accordion-item+.accordion-item{border-block-start:0}.accordion-header{color:#333;font-size:1rem;font-weight:700;line-height:1.5;margin:0}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;width:100%;position:relative;padding-block:1rem;padding-inline-start:1rem;padding-inline-end:3rem;text-align:start;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.accordion-button:focus-visible{outline:2px solid #1976c8}.accordion-button:hover{color:#000;background-color:#e6e6e6}.accordion-button:disabled{opacity:.4;pointer-events:none}.accordion-button::after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%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='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem;position:absolute;inset-inline-end:1rem;inset-block-start:50%;transform:translateY(-50%);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed::after{transform:translateY(-50%) rotate(-180deg)}.accordion-button>.text-truncate{display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:2px solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding:.5rem 1rem 1rem;font-weight:300}.accordion-button>*,.accordion-body>:first-child{margin-block-start:0 !important}.accordion-button>*,.accordion-body>:last-child{margin-block-end:0 !important}:host{display:block}.accordion-button{cursor:pointer}.accordion-button>::slotted(.text-truncate){display:block}post-accordion-item::part(accordion-item){--post-bg-rgb:244, 243, 241}.bg-yellow post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-white post-accordion-item::part(accordion-item){--post-bg-rgb:244, 243, 241}.bg-light post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-gray post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-dark post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-black post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-primary post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-secondary post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-error post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-info post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-error-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-nightblue post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-nightblue-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-petrol post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-petrol-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-coral post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-coral-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-olive post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-olive-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-purple post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-purple-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-aubergine post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-aubergine-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}:host(:not(:first-of-type)) .accordion-item{border-block-start:0}";
8
+ const PostAccordionItemStyle0 = postAccordionItemCss;
9
+
10
+ const PostAccordionItem = class {
11
+ constructor(hostRef) {
12
+ registerInstance(this, hostRef);
13
+ this.id = undefined;
14
+ this.isOpen = undefined;
15
+ this.collapsed = false;
16
+ this.headingLevel = 2;
17
+ }
18
+ validateHeadingLevel(newValue = this.headingLevel) {
19
+ checkEmptyOrOneOf(newValue, HEADING_LEVELS, 'The `headingLevel` property of the `post-accordion-item` must be a number between 1 and 6.');
20
+ }
21
+ connectedCallback() {
22
+ this.validateHeadingLevel();
23
+ }
24
+ componentWillLoad() {
25
+ this.isOpen = !this.collapsed;
26
+ this.id = this.host.id || `a${crypto.randomUUID()}`;
27
+ }
28
+ onCollapseToggle(event) {
29
+ if (event.target.localName === 'post-collapsible') {
30
+ this.isOpen = event.detail;
31
+ }
32
+ }
33
+ /**
34
+ * Triggers the collapse programmatically.
35
+ */
36
+ async toggle(force) {
37
+ return this.collapsible.toggle(force);
38
+ }
39
+ render() {
40
+ var _a;
41
+ const HeadingTag = `h${(_a = this.headingLevel) !== null && _a !== void 0 ? _a : 2}`;
42
+ return (h(Host, { key: '1cae3baea73ec4bb9c1f4096cf0fafda59532052', id: this.id, "data-version": version }, h("div", { key: 'd9df9d0b0bc1a2b5f13a4dafb9368dbd4785b611', part: "accordion-item", class: "accordion-item" }, h(HeadingTag, { key: '41ee8b8b145c8fa1c91c31c1385b818214b8e5a3', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '0794762996913eb8f071b342c1e77f209254f6c8', "aria-controls": `${this.id}--collapse`, "aria-expanded": `${this.isOpen}`, class: `accordion-button${this.isOpen ? '' : ' collapsed'}`, onClick: () => this.toggle(), type: "button" }, h("slot", { key: '9274641e3955c0960856c4dc818b68a2dcf5c805', name: "header" }))), h("post-collapsible", { key: '87abfbaa0d5e9bdd1476f0204fa84b7980e5ae6a', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: 'b0907132bb9cb0684f8e001a13b641bbb3a77db8', class: "accordion-body" }, h("slot", { key: 'c71712f3005bd626d3c708607d4f6617de4a9039' }))))));
43
+ }
44
+ get host() { return getElement(this); }
45
+ static get watchers() { return {
46
+ "headingLevel": ["validateHeadingLevel"]
47
+ }; }
48
+ };
49
+ PostAccordionItem.style = PostAccordionItemStyle0;
50
+
51
+ export { PostAccordionItem as P };
@@ -1,5 +1,6 @@
1
- export { P as post_accordion_item } from './post-accordion-item-1fd95c9f.js';
2
- import './index-1708db56.js';
3
- import './package-50a9c0c3.js';
4
- import './index-b444db27.js';
1
+ export { P as post_accordion_item } from './post-accordion-item-4fa44842.js';
2
+ import './index-961099d2.js';
3
+ import './package-1242b80d.js';
4
+ import './index-d1eba94c.js';
5
5
  import './constants-8d548297.js';
6
+ import './check-one-of-6b3ef8eb.js';
@@ -1,3 +1,3 @@
1
- export { P as post_accordion } from './post-accordion-33fe4f0e.js';
2
- import './index-1708db56.js';
3
- import './package-50a9c0c3.js';
1
+ export { P as post_accordion } from './post-accordion-bfd058bc.js';
2
+ import './index-961099d2.js';
3
+ import './package-1242b80d.js';
@@ -0,0 +1,96 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-961099d2.js';
2
+ import { v as version } from './package-1242b80d.js';
3
+ import { f as fadeOut } from './fade-7fd71785.js';
4
+ import { a as checkType, b as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index-d1eba94c.js';
5
+ import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
6
+
7
+ const ALERT_TYPES = ['primary', 'success', 'warning', 'danger', 'info', 'gray'];
8
+
9
+ const postAlertCss = "/*!\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 */.alert-primary,.alert-success,.alert-warning,.alert-danger,.alert-info,.alert-gray,.alert-notification,.alert-error{background-color:rgb(var(--post-bg-rgb)) !important;color:var(--post-contrast-color) !important}.alert-warning,.alert-info,.alert-gray{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}.alert-primary,.alert-success,.alert-danger,.alert-notification,.alert-error{--post-contrast-color:#fff;--post-focus-color:#fff;--post-contrast-color-inverted:#000;--post-dark:#faf9f8;--post-light:hsl(0, 0%, 20%);--post-gray-80:hsl(0, 0%, 90%);--post-gray-60:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-20:hsl(0, 0%, 40%);--post-gray-10:hsl(0, 0%, 20%);--post-contrast-color-rgb:255, 255, 255;--post-contrast-color-inverted-rgb:0, 0, 0;--post-dark-rgb:250, 249, 248;--post-light-rgb:51, 51, 51;--post-gray-80-rgb:230, 230, 230;--post-gray-60-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-20-rgb:102, 102, 102;--post-gray-10-rgb:51, 51, 51}.alert{position:relative;box-sizing:border-box;min-height:5rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);border-radius:4px;padding:1rem 1.25rem;padding-inline-start:5.5rem;margin-block-end:1rem;font-size:1rem;font-weight:300}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert[class^=pi-],.alert[class*=\" pi-\"]{background-size:3rem;background-position:1.25rem 1rem;background-repeat:no-repeat}.alert[class^=pi-].no-icon,.alert[class*=\" pi-\"].no-icon{background-image:none}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon::before,.alert[class^=pi-]::before,.alert[class*=\" pi-\"]::before{content:unset}.alert.no-icon>post-icon,.alert[class^=pi-]>post-icon,.alert[class*=\" pi-\"]>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.alert{filter:none !important;border:2px solid CanvasText}}.alert:not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert:not(.alert-action) a{font-weight:400}.alert:not(.alert-action) hr{margin-block:.5rem .75rem !important}.alert:not(.alert-action)>:only-child,.alert:not(.alert-action)>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert:not(.alert-action)>*{margin:0}.alert-heading{font-size:1.0625rem;font-weight:700}.alert-dismissible{pointer-events:auto;position:relative;padding-inline-end:4rem}.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:1.25rem}.alert-dismissible>.btn-close:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action{display:flex;flex-direction:row;align-items:center;gap:1.25rem}.alert-action>.alert-content{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert-action>.alert-content a{font-weight:400}.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.alert-action>.alert-content>:only-child,.alert-action>.alert-content>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action>.alert-content>*{margin:0}.alert-action>.alert-buttons{flex:0 0 auto;display:flex;align-items:center;gap:.5rem}@media (min-width: 780px){.alert-action.alert-dismissible>.btn-close{inset-block-start:calc(50% - 0.75rem)}}@media (max-width: 779.98px){.alert-action{flex-direction:column;align-items:stretch;padding-inline:1.25rem}.alert-action>.alert-content{padding-inline-start:4.25rem;padding-inline-end:2.75rem}.alert-action.no-icon>.alert-content{padding-inline-start:0}.alert-action>.alert-buttons{display:flex}.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn):first-child{margin-inline-start:0}}.alert-fixed-bottom{position:fixed;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;margin-bottom:0;border-radius:0;z-index:1030}@media (min-width: 1440px){.alert-fixed-bottom{padding-inline-end:calc((100% - 1439px) / 2 + 120px + 1.25rem);padding-inline-start:calc(\n (100% - 1439px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );background-position-x:calc((100% - 1439px) / 2 + 120px + 1.25rem + 1.5rem)}.alert-fixed-bottom::before{left:calc((100% - 1439px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.no-icon{padding-inline-start:calc((100% - 1439px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.alert-dismissible{padding-inline-end:calc(\n (100% - 1439px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.alert-fixed-bottom.alert-dismissible>.btn-close{inset-inline-end:calc((100% - 1439px) / 2 + 120px + 1.25rem)}}.alert-primary{--post-bg-rgb:51, 51, 51}.alert-primary:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::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='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%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='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-primary:has(>post-icon)::before{content:none}.alert-primary>post-icon{background-color:#333}.alert-success{--post-bg-rgb:44, 135, 29}.alert-success:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::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='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%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='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-success:has(>post-icon)::before{content:none}.alert-success>post-icon{background-color:#2c871d}.alert-warning{--post-bg-rgb:244, 158, 0}.alert-warning:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::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='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%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='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-warning:has(>post-icon)::before{content:none}.alert-warning>post-icon{background-color:#f49e00}.alert-danger{--post-bg-rgb:165, 23, 40}.alert-danger:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::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='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%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='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-danger:has(>post-icon)::before{content:none}.alert-danger>post-icon{background-color:#a51728}.alert-info{--post-bg-rgb:204, 228, 238}.alert-info:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::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='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%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='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-info:has(>post-icon)::before{content:none}.alert-info>post-icon{background-color:#cce4ee}.alert-gray{--post-bg-rgb:244, 243, 241}.alert-gray:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::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='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%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='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-gray:has(>post-icon)::before{content:none}.alert-gray>post-icon{background-color:#f4f3f1}.alert-notification{--post-bg-rgb:51, 51, 51}.alert-notification:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::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='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%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='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-notification:has(>post-icon)::before{content:none}.alert-notification>post-icon{background-color:#333}.alert-error{--post-bg-rgb:165, 23, 40}.alert-error:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::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='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%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='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.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}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}.alert-heading>::slotted(h1){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h2){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h3){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h4){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h5){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h6){font-size:inherit !important;font-weight:inherit !important}";
10
+ const PostAlertStyle0 = postAlertCss;
11
+
12
+ const PostAlert = class {
13
+ constructor(hostRef) {
14
+ registerInstance(this, hostRef);
15
+ this.postDismissed = createEvent(this, "postDismissed", 7);
16
+ this.alertId = crypto.randomUUID();
17
+ this.classes = undefined;
18
+ this.hasActions = undefined;
19
+ this.hasHeading = undefined;
20
+ this.onDismissButtonClick = () => this.dismiss();
21
+ this.dismissible = false;
22
+ this.dismissLabel = undefined;
23
+ this.fixed = false;
24
+ this.icon = undefined;
25
+ this.type = 'primary';
26
+ }
27
+ validateDismissible(isDismissible = this.dismissible) {
28
+ checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
29
+ setTimeout(() => this.validateDismissLabel());
30
+ }
31
+ validateDismissLabel(dismissLabel = this.dismissLabel) {
32
+ if (this.dismissible) {
33
+ checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
34
+ }
35
+ }
36
+ validateFixed(isFixed = this.fixed) {
37
+ checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
38
+ }
39
+ validateIcon(icon = this.icon) {
40
+ checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
41
+ }
42
+ validateType(type = this.type) {
43
+ checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
44
+ }
45
+ connectedCallback() {
46
+ this.validateDismissible();
47
+ this.validateFixed();
48
+ this.validateIcon();
49
+ this.validateType();
50
+ }
51
+ componentWillRender() {
52
+ var _a;
53
+ this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
54
+ this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
55
+ this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
56
+ if (this.dismissible)
57
+ this.classes += ' alert-dismissible';
58
+ if (this.hasActions)
59
+ this.classes += ' alert-action';
60
+ if (this.fixed)
61
+ this.classes += ' alert-fixed-bottom';
62
+ if (this.icon === 'none')
63
+ this.classes += ' no-icon';
64
+ }
65
+ /**
66
+ * Triggers alert dismissal programmatically (same as clicking on the close button (×)).
67
+ */
68
+ async dismiss() {
69
+ const dismissal = fadeOut(this.host);
70
+ await dismissal.finished;
71
+ this.host.remove();
72
+ this.postDismissed.emit();
73
+ }
74
+ render() {
75
+ const defaultAlertContent = [
76
+ this.hasHeading && (h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, h("slot", { key: 'ad38ead73ee945b0ad79e7788f13c9687263250e', name: "heading" }))),
77
+ h("slot", { key: `${this.alertId}-message` }),
78
+ ];
79
+ const actionAlertContent = [
80
+ h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
81
+ h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, h("slot", { key: '2bedfaf767a10f90195a71d95177c5cb6b9ef8a0', name: "actions" })),
82
+ ];
83
+ return (h(Host, { key: 'e6dc7d2ba1a381651b51cf587fb0902d248fc98e', "data-version": version }, h("div", { key: '6e2af1a4db16fb52dc35a80d42059dd4f7cfa656', role: "alert", class: this.classes }, this.dismissible && (h("button", { class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.alertId}-icon`, name: this.icon })), this.hasActions ? actionAlertContent : defaultAlertContent)));
84
+ }
85
+ get host() { return getElement(this); }
86
+ static get watchers() { return {
87
+ "dismissible": ["validateDismissible"],
88
+ "dismissLabel": ["validateDismissLabel"],
89
+ "fixed": ["validateFixed"],
90
+ "icon": ["validateIcon"],
91
+ "type": ["validateType"]
92
+ }; }
93
+ };
94
+ PostAlert.style = PostAlertStyle0;
95
+
96
+ export { PostAlert as P };
@@ -1,7 +1,8 @@
1
- export { P as post_alert } from './post-alert-65d67f69.js';
2
- import './index-1708db56.js';
3
- import './package-50a9c0c3.js';
1
+ export { P as post_alert } from './post-alert-192d0176.js';
2
+ import './index-961099d2.js';
3
+ import './package-1242b80d.js';
4
4
  import './fade-7fd71785.js';
5
- import './index-b444db27.js';
5
+ import './index-d1eba94c.js';
6
6
  import './constants-8d548297.js';
7
+ import './check-one-of-6b3ef8eb.js';
7
8
  import './check-non-empty-58bd6b17.js';