@swisspost/design-system-components 2.1.0 → 7.1.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 (224) 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/heading-levels-608d432e.js +5 -0
  5. package/dist/cjs/{index-8c288b1a.js → index-a1440961.js} +2 -6
  6. package/dist/cjs/index-de783b23.js +1394 -0
  7. package/dist/cjs/index.cjs.js +21 -15
  8. package/dist/cjs/loader.cjs.js +5 -3
  9. package/dist/cjs/{package-96a46572.js → package-dacf5ec2.js} +1 -1
  10. package/dist/cjs/{post-accordion-9d27458a.js → post-accordion-225de951.js} +40 -23
  11. package/dist/cjs/post-accordion-item-935e122a.js +52 -0
  12. package/dist/cjs/post-accordion-item.cjs.entry.js +6 -4
  13. package/dist/cjs/post-accordion.cjs.entry.js +5 -3
  14. package/dist/cjs/post-alert-6041a34c.js +98 -0
  15. package/dist/cjs/post-alert.cjs.entry.js +5 -4
  16. package/dist/cjs/post-card-control-3c089d8e.js +314 -0
  17. package/dist/cjs/post-card-control.cjs.entry.js +14 -0
  18. package/dist/cjs/{post-collapsible-1867015c.js → post-collapsible-562268e9.js} +7 -7
  19. package/dist/cjs/post-collapsible.cjs.entry.js +5 -4
  20. package/dist/cjs/post-components.cjs.js +13 -11
  21. package/dist/cjs/{post-icon-07a67b83.js → post-icon-973d5c46.js} +5 -5
  22. package/dist/cjs/post-icon.cjs.entry.js +5 -4
  23. package/dist/cjs/post-popover-b0844e71.js +104 -0
  24. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  25. package/dist/cjs/{post-popovercontainer-003c0819.js → post-popovercontainer-5bb6a804.js} +254 -55
  26. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  27. package/dist/cjs/post-rating-d2845096.js +88 -0
  28. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  29. package/dist/cjs/post-tab-header-6496a51b.js +32 -0
  30. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  31. package/dist/cjs/{post-tab-panel-6a9c4a4f.js → post-tab-panel-25bd8c74.js} +3 -3
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  33. package/dist/cjs/{post-tabs-2eb6f376.js → post-tabs-4e4ee252.js} +23 -21
  34. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  35. package/dist/cjs/post-tag-cbc458ed.js +47 -0
  36. package/dist/cjs/post-tag.cjs.entry.js +11 -0
  37. package/dist/cjs/{post-tooltip-260d0627.js → post-tooltip-805bc0c0.js} +13 -9
  38. package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
  39. package/dist/collection/collection-manifest.json +5 -3
  40. package/dist/collection/components/post-accordion/post-accordion.js +68 -25
  41. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  42. package/dist/collection/components/post-accordion-item/post-accordion-item.js +17 -12
  43. package/dist/collection/components/post-alert/alert-types.js +1 -1
  44. package/dist/collection/components/post-alert/post-alert.css +2 -2
  45. package/dist/collection/components/post-alert/post-alert.js +9 -9
  46. package/dist/collection/components/post-card-control/post-card-control.css +31 -0
  47. package/dist/collection/components/post-card-control/post-card-control.js +523 -0
  48. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  49. package/dist/collection/components/post-collapsible/post-collapsible.js +6 -6
  50. package/dist/collection/components/post-icon/post-icon.js +4 -4
  51. package/dist/collection/components/post-popover/post-popover.css +29 -1
  52. package/dist/collection/components/post-popover/post-popover.js +3 -3
  53. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  54. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +7 -7
  55. package/dist/collection/components/post-rating/post-rating.css +28 -0
  56. package/dist/collection/components/post-rating/post-rating.js +8 -8
  57. package/dist/collection/components/post-tab-header/post-tab-header.css +30 -2
  58. package/dist/collection/components/post-tab-header/post-tab-header.js +3 -3
  59. package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -2
  60. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  61. package/dist/collection/components/post-tabs/post-tabs.js +23 -21
  62. package/dist/collection/components/post-tag/post-tag.css +31 -0
  63. package/dist/collection/components/post-tag/post-tag.js +119 -0
  64. package/dist/collection/components/post-tooltip/post-tooltip.js +12 -9
  65. package/dist/collection/index.js +2 -0
  66. package/dist/collection/types/heading-levels.js +1 -0
  67. package/dist/collection/types/index.js +1 -0
  68. package/dist/collection/utils/index.js +1 -0
  69. package/dist/collection/utils/sass-export.js +16 -0
  70. package/dist/components/check-one-of.js +6 -0
  71. package/dist/components/heading-levels.js +3 -0
  72. package/dist/components/index.js +2 -0
  73. package/dist/components/index2.js +1 -5
  74. package/dist/components/package.js +1 -1
  75. package/dist/components/post-accordion-item2.js +9 -8
  76. package/dist/components/post-accordion2.js +42 -22
  77. package/dist/components/post-alert2.js +7 -7
  78. package/dist/components/post-card-control.d.ts +11 -0
  79. package/dist/components/post-card-control.js +6 -0
  80. package/dist/components/post-card-control2.js +345 -0
  81. package/dist/components/post-collapsible2.js +4 -4
  82. package/dist/components/post-icon2.js +2 -2
  83. package/dist/components/post-popover2.js +2 -2
  84. package/dist/components/post-popovercontainer2.js +252 -53
  85. package/dist/components/post-rating2.js +6 -6
  86. package/dist/components/post-tab-header2.js +2 -2
  87. package/dist/components/post-tab-panel2.js +1 -1
  88. package/dist/components/post-tabs2.js +21 -19
  89. package/dist/components/post-tag.d.ts +11 -0
  90. package/dist/components/post-tag.js +6 -0
  91. package/dist/components/post-tag2.js +74 -0
  92. package/dist/components/post-tooltip2.js +11 -7
  93. package/dist/docs.d.ts +34 -0
  94. package/dist/docs.json +538 -25
  95. package/dist/esm/app-globals-0f993ce5.js +3 -0
  96. package/dist/esm/check-one-of-6b3ef8eb.js +6 -0
  97. package/dist/esm/heading-levels-5b7b4349.js +3 -0
  98. package/dist/esm/index-cf1d5611.js +1365 -0
  99. package/dist/esm/{index-b444db27.js → index-d1eba94c.js} +1 -5
  100. package/dist/esm/index.js +19 -15
  101. package/dist/esm/loader.js +6 -4
  102. package/dist/esm/{package-50a9c0c3.js → package-a837c1ad.js} +1 -1
  103. package/dist/esm/{post-accordion-33fe4f0e.js → post-accordion-fdd22c1d.js} +40 -23
  104. package/dist/esm/post-accordion-item-336f568c.js +50 -0
  105. package/dist/esm/post-accordion-item.entry.js +6 -4
  106. package/dist/esm/post-accordion.entry.js +5 -3
  107. package/dist/esm/post-alert-f48527d8.js +96 -0
  108. package/dist/esm/post-alert.entry.js +5 -4
  109. package/dist/esm/post-card-control-3e6a5855.js +312 -0
  110. package/dist/esm/post-card-control.entry.js +6 -0
  111. package/dist/esm/{post-collapsible-50dc361b.js → post-collapsible-486ab980.js} +7 -7
  112. package/dist/esm/post-collapsible.entry.js +5 -4
  113. package/dist/esm/post-components.js +14 -12
  114. package/dist/esm/{post-icon-00f314ae.js → post-icon-19fdfc4d.js} +5 -5
  115. package/dist/esm/post-icon.entry.js +5 -4
  116. package/dist/esm/post-popover-17164186.js +102 -0
  117. package/dist/esm/post-popover.entry.js +3 -3
  118. package/dist/esm/{post-popovercontainer-62e1fd82.js → post-popovercontainer-d19f9646.js} +254 -55
  119. package/dist/esm/post-popovercontainer.entry.js +3 -3
  120. package/dist/esm/post-rating-ea204778.js +86 -0
  121. package/dist/esm/post-rating.entry.js +3 -3
  122. package/dist/esm/post-tab-header-a97cdef2.js +30 -0
  123. package/dist/esm/post-tab-header.entry.js +3 -3
  124. package/dist/esm/{post-tab-panel-37a1331f.js → post-tab-panel-e6999395.js} +3 -3
  125. package/dist/esm/post-tab-panel.entry.js +3 -3
  126. package/dist/esm/{post-tabs-c4e65a45.js → post-tabs-524c699a.js} +23 -21
  127. package/dist/esm/post-tabs.entry.js +3 -3
  128. package/dist/esm/post-tag-e2035a81.js +45 -0
  129. package/dist/esm/post-tag.entry.js +3 -0
  130. package/dist/esm/{post-tooltip-033f63fa.js → post-tooltip-e4fc9c0c.js} +13 -9
  131. package/dist/esm/post-tooltip.entry.js +3 -3
  132. package/dist/post-components/index.esm.js +1 -1
  133. package/dist/post-components/p-07cc4853.entry.js +1 -0
  134. package/dist/post-components/p-0e410cec.entry.js +1 -0
  135. package/dist/post-components/p-14e22434.entry.js +1 -0
  136. package/dist/post-components/p-18a2ef27.js +1 -0
  137. package/dist/post-components/p-18b571e3.js +2 -0
  138. package/dist/post-components/p-247a1668.js +1 -0
  139. package/dist/post-components/p-2f4c40ee.js +1 -0
  140. package/dist/post-components/p-39a1dcb8.entry.js +1 -0
  141. package/dist/post-components/p-3b0988a1.js +1 -0
  142. package/dist/post-components/p-3ee18d14.entry.js +1 -0
  143. package/dist/post-components/p-4575a570.js +1 -0
  144. package/dist/post-components/p-59da0b80.js +1 -0
  145. package/dist/post-components/p-611b3c41.js +1 -0
  146. package/dist/post-components/p-63277771.entry.js +1 -0
  147. package/dist/post-components/p-67df1075.js +1 -0
  148. package/dist/post-components/p-74db9b35.entry.js +1 -0
  149. package/dist/post-components/p-7bb79254.entry.js +1 -0
  150. package/dist/post-components/p-8398de7b.entry.js +1 -0
  151. package/dist/post-components/p-9a59f2c7.js +1 -0
  152. package/dist/post-components/p-c4a7208a.js +1 -0
  153. package/dist/post-components/{p-7e7833f7.js → p-c85913ed.js} +3 -3
  154. package/dist/post-components/p-caaa5b4c.entry.js +1 -0
  155. package/dist/post-components/p-cf10d355.js +1 -0
  156. package/dist/post-components/p-d1f516dd.js +1 -0
  157. package/dist/post-components/p-d2eb0f0b.js +1 -0
  158. package/dist/post-components/p-d70f33cd.js +1 -0
  159. package/dist/post-components/p-da049db2.entry.js +1 -0
  160. package/dist/post-components/p-db114d1d.entry.js +1 -0
  161. package/dist/post-components/p-e1255160.js +1 -0
  162. package/dist/post-components/p-e929ddbc.js +1 -0
  163. package/dist/post-components/p-ebb54756.entry.js +1 -0
  164. package/dist/post-components/p-ed22dec0.js +1 -0
  165. package/dist/post-components/p-f5d8f3fe.entry.js +1 -0
  166. package/dist/post-components/p-f91c0e1b.js +1 -0
  167. package/dist/post-components/post-components.esm.js +1 -1
  168. package/dist/types/components/post-accordion/post-accordion.d.ts +8 -2
  169. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +3 -2
  170. package/dist/types/components/post-alert/alert-types.d.ts +2 -2
  171. package/dist/types/components/post-alert/post-alert.d.ts +2 -2
  172. package/dist/types/components/post-card-control/post-card-control.d.ts +112 -0
  173. package/dist/types/components/post-collapsible/post-collapsible.d.ts +1 -1
  174. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -1
  175. package/dist/types/components/post-rating/post-rating.d.ts +2 -2
  176. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  177. package/dist/types/components/post-tag/post-tag.d.ts +27 -0
  178. package/dist/types/components.d.ts +191 -15
  179. package/dist/types/css-modules.js +0 -0
  180. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/css-modules.d.ts +6 -0
  181. package/dist/types/index.d.ts +2 -0
  182. package/dist/types/types/heading-levels.d.ts +2 -0
  183. package/dist/types/types/index.d.ts +1 -0
  184. package/dist/types/utils/index.d.ts +1 -0
  185. package/dist/types/utils/sass-export.d.ts +2 -0
  186. package/package.json +22 -22
  187. package/dist/cjs/index-f243643b.js +0 -2051
  188. package/dist/cjs/post-accordion-item-61fb55fa.js +0 -51
  189. package/dist/cjs/post-alert-a810f5b9.js +0 -98
  190. package/dist/cjs/post-popover-9610b64c.js +0 -104
  191. package/dist/cjs/post-rating-75574abd.js +0 -88
  192. package/dist/cjs/post-tab-header-85424e32.js +0 -32
  193. package/dist/esm/index-1708db56.js +0 -2022
  194. package/dist/esm/post-accordion-item-1fd95c9f.js +0 -49
  195. package/dist/esm/post-alert-65d67f69.js +0 -96
  196. package/dist/esm/post-popover-40bfd1b7.js +0 -102
  197. package/dist/esm/post-rating-f7a79ed4.js +0 -86
  198. package/dist/esm/post-tab-header-0683252a.js +0 -30
  199. package/dist/post-components/p-00dcad55.js +0 -1
  200. package/dist/post-components/p-01e57281.entry.js +0 -1
  201. package/dist/post-components/p-06c989fb.entry.js +0 -1
  202. package/dist/post-components/p-07ffb6de.entry.js +0 -1
  203. package/dist/post-components/p-10b4cf7a.js +0 -2
  204. package/dist/post-components/p-26c658c1.entry.js +0 -1
  205. package/dist/post-components/p-2a964700.js +0 -1
  206. package/dist/post-components/p-35f14000.js +0 -1
  207. package/dist/post-components/p-3fb09ecd.js +0 -1
  208. package/dist/post-components/p-4b0a45d8.entry.js +0 -1
  209. package/dist/post-components/p-53e8e4e7.entry.js +0 -1
  210. package/dist/post-components/p-598b11b6.js +0 -1
  211. package/dist/post-components/p-5b6ee52a.entry.js +0 -1
  212. package/dist/post-components/p-8139faa4.entry.js +0 -1
  213. package/dist/post-components/p-8cd6d7c2.js +0 -1
  214. package/dist/post-components/p-99a9602e.js +0 -1
  215. package/dist/post-components/p-a2775477.entry.js +0 -1
  216. package/dist/post-components/p-a905b16b.entry.js +0 -1
  217. package/dist/post-components/p-aa02111b.js +0 -1
  218. package/dist/post-components/p-b135d3e2.js +0 -1
  219. package/dist/post-components/p-b81e61ed.entry.js +0 -1
  220. package/dist/post-components/p-d6bc34ff.js +0 -1
  221. package/dist/post-components/p-da2b8e26.entry.js +0 -1
  222. package/dist/post-components/p-f0476913.js +0 -1
  223. package/dist/post-components/p-f0e82e63.js +0 -1
  224. package/dist/post-components/p-ff0e1564.js +0 -1
@@ -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,18 +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-fdd22c1d.js';
2
+ export { P as PostAccordionItem } from './post-accordion-item-336f568c.js';
3
+ export { P as PostAlert } from './post-alert-f48527d8.js';
4
+ export { P as PostCardControl } from './post-card-control-3e6a5855.js';
5
+ export { P as PostCollapsible } from './post-collapsible-486ab980.js';
6
+ export { P as PostIcon } from './post-icon-19fdfc4d.js';
7
+ export { P as PostPopover } from './post-popover-17164186.js';
8
+ export { P as PostPopovercontainer } from './post-popovercontainer-d19f9646.js';
9
+ export { P as PostRating } from './post-rating-ea204778.js';
10
+ export { P as PostTabs } from './post-tabs-524c699a.js';
11
+ export { P as PostTabHeader } from './post-tab-header-a97cdef2.js';
12
+ export { P as PostTabPanel } from './post-tab-panel-e6999395.js';
13
+ export { P as PostTooltip } from './post-tooltip-e4fc9c0c.js';
14
+ export { P as PostTag } from './post-tag-e2035a81.js';
15
+ import './index-cf1d5611.js';
16
+ import './package-a837c1ad.js';
17
+ import './heading-levels-5b7b4349.js';
18
+ import './check-one-of-6b3ef8eb.js';
19
+ import './index-d1eba94c.js';
16
20
  import './constants-8d548297.js';
17
21
  import './fade-7fd71785.js';
18
22
  import './check-non-empty-58bd6b17.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-cf1d5611.js';
2
+ export { s as setNonce } from './index-cf1d5611.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",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["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.1.0";
2
2
 
3
3
  export { version as v };
@@ -1,5 +1,7 @@
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-cf1d5611.js';
2
+ import { v as version } from './package-a837c1ad.js';
3
+ import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
4
+ import { c as checkOneOf } from './check-one-of-6b3ef8eb.js';
3
5
 
4
6
  const postAccordionCss = ":host{display:block}";
5
7
  const PostAccordionStyle0 = postAccordionCss;
@@ -8,10 +10,41 @@ const PostAccordion = class {
8
10
  constructor(hostRef) {
9
11
  registerInstance(this, hostRef);
10
12
  this.expandedItems = new Set();
13
+ this.headingLevel = undefined;
11
14
  this.multiple = false;
12
15
  }
16
+ validateHeadingLevel(newValue = this.headingLevel) {
17
+ if (!newValue)
18
+ return;
19
+ checkOneOf(newValue, HEADING_LEVELS, 'The `heading-level` property of the `post-accordion` must be a number between 1 and 6.');
20
+ this.accordionItems.forEach(item => {
21
+ item.setAttribute('heading-level', String(newValue));
22
+ });
23
+ }
13
24
  componentWillLoad() {
14
25
  this.registerAccordionItems();
26
+ this.validateHeadingLevel();
27
+ }
28
+ collapseToggleHandler(event) {
29
+ if (event.target.localName === 'post-accordion-item') {
30
+ event.stopPropagation();
31
+ const toggledItem = event.target;
32
+ const isClosing = this.expandedItems.has(toggledItem);
33
+ if (isClosing) {
34
+ this.expandedItems.delete(toggledItem);
35
+ }
36
+ else {
37
+ this.expandedItems.add(toggledItem);
38
+ }
39
+ if (this.multiple || isClosing)
40
+ return;
41
+ // close other open accordion items to have only one opened at a time
42
+ Array.from(this.expandedItems.values())
43
+ .filter(item => item !== toggledItem)
44
+ .forEach(item => {
45
+ item.toggle(false);
46
+ });
47
+ }
15
48
  }
16
49
  /**
17
50
  * Toggles the `post-accordion-item` with the given id.
@@ -22,29 +55,10 @@ const PostAccordion = class {
22
55
  throw new Error(`No post-accordion-item found with id #${id}.`);
23
56
  await itemToToggle.toggle();
24
57
  }
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);
34
- }
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
- }
44
58
  /**
45
59
  * Expands all `post-accordion-item`.
46
60
  *
47
- * If `close-others` is `true` and all items are closed, it will open the first one.
61
+ * If `multiple="true"` is not set and all items are closed, it will open the first one.
48
62
  * Otherwise, it will keep the opened one.
49
63
  */
50
64
  async expandAll() {
@@ -76,9 +90,12 @@ const PostAccordion = class {
76
90
  });
77
91
  }
78
92
  render() {
79
- return (h(Host, { key: '08d0661a81fef59f3b74cbceceff49920cbfda0c', "data-version": version }, h("div", { key: '2625963e5f2952fd5bd5b4f05a14142a501b272c', class: "accordion" }, h("slot", { key: 'f2514ed051562c17fe852bd2bf39c10282915bfb', onSlotchange: () => this.registerAccordionItems() }))));
93
+ return (h(Host, { key: 'db4caaa1a64791d3a1dc622cf865a162b3cfd733', "data-version": version }, h("div", { key: '62ebf7e00b534b9b68137ac4ab57b92bd290bc21', class: "accordion" }, h("slot", { key: '61c69386c1ba9e7f53dd3465dd7eb06ac646e35b', onSlotchange: () => this.registerAccordionItems() }))));
80
94
  }
81
95
  get host() { return getElement(this); }
96
+ static get watchers() { return {
97
+ "headingLevel": ["validateHeadingLevel"]
98
+ }; }
82
99
  };
83
100
  PostAccordion.style = PostAccordionStyle0;
84
101
 
@@ -0,0 +1,50 @@
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-cf1d5611.js';
2
+ import { v as version } from './package-a837c1ad.js';
3
+ import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
4
+ import { c as checkEmptyOrOneOf } from './index-d1eba94c.js';
5
+
6
+ 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;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}";
7
+ const PostAccordionItemStyle0 = postAccordionItemCss;
8
+
9
+ const PostAccordionItem = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ this.id = undefined;
13
+ this.isOpen = undefined;
14
+ this.collapsed = false;
15
+ this.headingLevel = 2;
16
+ }
17
+ validateHeadingLevel(newValue = this.headingLevel) {
18
+ checkEmptyOrOneOf(newValue, HEADING_LEVELS, 'The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.');
19
+ }
20
+ connectedCallback() {
21
+ this.validateHeadingLevel();
22
+ }
23
+ componentWillLoad() {
24
+ this.isOpen = !this.collapsed;
25
+ this.id = this.host.id || `a${crypto.randomUUID()}`;
26
+ }
27
+ onCollapseToggle(event) {
28
+ if (event.target.localName === 'post-accordion-item') {
29
+ this.isOpen = event.detail;
30
+ }
31
+ }
32
+ /**
33
+ * Triggers the collapse programmatically.
34
+ */
35
+ async toggle(force) {
36
+ return this.collapsible.toggle(force);
37
+ }
38
+ render() {
39
+ var _a;
40
+ const HeadingTag = `h${(_a = this.headingLevel) !== null && _a !== void 0 ? _a : 2}`;
41
+ return (h(Host, { key: 'e45b2ab47cfc1e6195080edde87938f6567f5a98', id: this.id, "data-version": version }, h("div", { key: 'd9758adaa568f973bdee728411e935aae3e4bafc', part: "accordion-item", class: "accordion-item" }, h(HeadingTag, { key: '2890b79baf5a28de9c6ed07a8daf10c8a85d0487', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '6838f109b913a55c58399883eab07197b6f975f7', "aria-controls": `${this.id}--collapse`, "aria-expanded": `${this.isOpen}`, class: `accordion-button${this.isOpen ? '' : ' collapsed'}`, onClick: () => this.toggle(), type: "button" }, h("slot", { key: '5fb0fb5dfb3dee14f81c3893ff4fc174d6c87d32', name: "header" }))), h("post-collapsible", { key: '6668cd6e3311033f4bdbcf3d070b79f8cedcc52e', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '764eb9e10a22d49e75271b76f2cde439b336eb44', class: "accordion-body" }, h("slot", { key: 'aef9bdb1ac0282b762c2d43f4b46d033398bbcae' }))))));
42
+ }
43
+ get host() { return getElement(this); }
44
+ static get watchers() { return {
45
+ "headingLevel": ["validateHeadingLevel"]
46
+ }; }
47
+ };
48
+ PostAccordionItem.style = PostAccordionItemStyle0;
49
+
50
+ export { PostAccordionItem as P };
@@ -1,5 +1,7 @@
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-336f568c.js';
2
+ import './index-cf1d5611.js';
3
+ import './package-a837c1ad.js';
4
+ import './heading-levels-5b7b4349.js';
5
+ import './index-d1eba94c.js';
5
6
  import './constants-8d548297.js';
7
+ import './check-one-of-6b3ef8eb.js';
@@ -1,3 +1,5 @@
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-fdd22c1d.js';
2
+ import './index-cf1d5611.js';
3
+ import './package-a837c1ad.js';
4
+ import './heading-levels-5b7b4349.js';
5
+ import './check-one-of-6b3ef8eb.js';
@@ -0,0 +1,96 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-cf1d5611.js';
2
+ import { v as version } from './package-a837c1ad.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;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: '21d19b64b4bce19fd4b07696dc246750dbb165ce', 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: 'ab1785ac06297249f1af9b4eb1afaab0551ba5e1', name: "actions" })),
82
+ ];
83
+ return (h(Host, { key: '5f0d259c805770fc4a5693c0dc0ad6ef5b7a1336', "data-version": version }, h("div", { key: '7e83a8c3d0e189e58e86f3a0060545ac216b350c', role: "alert", class: this.classes }, this.dismissible && (h("button", { key: '65285210d6a88cf31c9c0aa1d0d7242ea7c2c5d1', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'eef7bf9b17ff3c13c76022d81deab393dd32e732', 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-f48527d8.js';
2
+ import './index-cf1d5611.js';
3
+ import './package-a837c1ad.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';