@swisspost/design-system-components 9.0.0-next.5 → 9.0.0-next.6

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/dist/cjs/get-root-7a3498ef.js +11 -0
  2. package/dist/cjs/index-e1f32cce.js +4 -4
  3. package/dist/cjs/index.cjs.js +22 -21
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{package-53892d3d.js → package-81d89808.js} +1 -1
  6. package/dist/cjs/{post-accordion-7f627ffd.js → post-accordion-7d2805f4.js} +1 -1
  7. package/dist/cjs/{post-accordion-item-ceb5399f.js → post-accordion-item-0d8b65b1.js} +1 -1
  8. package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
  9. package/dist/cjs/post-accordion.cjs.entry.js +2 -2
  10. package/dist/cjs/{post-avatar-a8123d38.js → post-avatar-0b87e44f.js} +1 -1
  11. package/dist/cjs/post-avatar.cjs.entry.js +2 -2
  12. package/dist/cjs/post-banner-e42f02bd.js +90 -0
  13. package/dist/cjs/{post-alert.cjs.entry.js → post-banner.cjs.entry.js} +3 -3
  14. package/dist/cjs/{post-breadcrumb-item-6e4704e5.js → post-breadcrumb-item-46a8e876.js} +1 -1
  15. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +2 -2
  16. package/dist/cjs/post-card-control-7d3c5545.js +272 -0
  17. package/dist/cjs/post-card-control.cjs.entry.js +2 -2
  18. package/dist/cjs/post-closebutton_10.cjs.entry.js +2 -2
  19. package/dist/cjs/{post-collapsible-trigger-e4862a5b.js → post-collapsible-trigger-ae50d0d4.js} +3 -10
  20. package/dist/cjs/post-collapsible_2.cjs.entry.js +3 -2
  21. package/dist/cjs/post-components.cjs.js +1 -1
  22. package/dist/cjs/{post-language-option-62414842.js → post-language-option-c6049337.js} +1 -1
  23. package/dist/cjs/post-language-option.cjs.entry.js +2 -2
  24. package/dist/cjs/{post-megadropdown-trigger-da912fed.js → post-megadropdown-trigger-97472602.js} +3 -3
  25. package/dist/cjs/{post-menu-54fa65d3.js → post-menu-61c31423.js} +1 -1
  26. package/dist/cjs/{post-menu-item-8c3090b1.js → post-menu-item-4f393cde.js} +1 -1
  27. package/dist/cjs/post-menu-item.cjs.entry.js +2 -2
  28. package/dist/cjs/{post-menu-trigger-71449876.js → post-menu-trigger-44a5f8e9.js} +5 -3
  29. package/dist/cjs/post-menu-trigger.cjs.entry.js +3 -2
  30. package/dist/cjs/post-menu.cjs.entry.js +2 -2
  31. package/dist/cjs/{post-popover-5f639e4f.js → post-popover-44fdb733.js} +2 -2
  32. package/dist/cjs/post-popover.cjs.entry.js +2 -2
  33. package/dist/cjs/{post-rating-3d166fed.js → post-rating-4d5e7c8e.js} +1 -1
  34. package/dist/cjs/post-rating.cjs.entry.js +2 -2
  35. package/dist/cjs/post-tab-header-3fcb40fa.js +32 -0
  36. package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
  37. package/dist/cjs/{post-tab-panel-e5685f3d.js → post-tab-panel-b1a41181.js} +1 -1
  38. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  39. package/dist/cjs/{post-tabs-e871c911.js → post-tabs-092790e4.js} +2 -2
  40. package/dist/cjs/post-tabs.cjs.entry.js +2 -2
  41. package/dist/cjs/{post-tag-62f31d0e.js → post-tag-389a43f7.js} +2 -2
  42. package/dist/cjs/post-tag.cjs.entry.js +2 -2
  43. package/dist/cjs/{post-tooltip-851c342c.js → post-tooltip-c42d6853.js} +1 -1
  44. package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
  45. package/dist/collection/collection-manifest.json +1 -1
  46. package/dist/collection/components/post-avatar/post-avatar.js +1 -1
  47. package/dist/collection/components/post-banner/banner-types.js +1 -0
  48. package/dist/collection/components/post-banner/post-banner.css +3 -0
  49. package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +39 -68
  50. package/dist/collection/components/post-card-control/post-card-control.css +1 -1
  51. package/dist/collection/components/post-card-control/post-card-control.js +8 -8
  52. package/dist/collection/components/post-list/post-list.js +2 -2
  53. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +4 -3
  54. package/dist/collection/components/post-popover/post-popover.css +1 -1
  55. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
  56. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  57. package/dist/collection/components/post-tag/post-tag.js +2 -2
  58. package/dist/collection/index.js +1 -1
  59. package/dist/components/get-root.js +9 -0
  60. package/dist/components/index.js +1 -1
  61. package/dist/components/package.js +1 -1
  62. package/dist/components/{post-alert.d.ts → post-banner.d.ts} +4 -4
  63. package/dist/components/post-banner.js +6 -0
  64. package/dist/components/post-banner2.js +125 -0
  65. package/dist/components/post-card-control2.js +3 -3
  66. package/dist/components/post-collapsible-trigger2.js +1 -8
  67. package/dist/components/post-list2.js +2 -2
  68. package/dist/components/post-menu-trigger2.js +4 -2
  69. package/dist/components/post-popover2.js +1 -1
  70. package/dist/components/post-tab-header2.js +1 -1
  71. package/dist/components/post-tabs2.js +1 -1
  72. package/dist/components/post-tag2.js +1 -1
  73. package/dist/docs.json +149 -175
  74. package/dist/esm/get-root-7af2e0d1.js +9 -0
  75. package/dist/esm/index-e1b64755.js +4 -4
  76. package/dist/esm/index.js +21 -20
  77. package/dist/esm/loader.js +1 -1
  78. package/dist/esm/package-c65b0409.js +3 -0
  79. package/dist/esm/{post-accordion-b2762084.js → post-accordion-c833c272.js} +1 -1
  80. package/dist/esm/{post-accordion-item-82ef1c4a.js → post-accordion-item-19fb4776.js} +1 -1
  81. package/dist/esm/post-accordion-item.entry.js +2 -2
  82. package/dist/esm/post-accordion.entry.js +2 -2
  83. package/dist/esm/{post-avatar-e84c49cb.js → post-avatar-f43ebc89.js} +1 -1
  84. package/dist/esm/post-avatar.entry.js +2 -2
  85. package/dist/esm/post-banner-cf6f756b.js +88 -0
  86. package/dist/esm/{post-alert.entry.js → post-banner.entry.js} +2 -2
  87. package/dist/esm/{post-breadcrumb-item-ff752018.js → post-breadcrumb-item-a93b91a7.js} +1 -1
  88. package/dist/esm/post-breadcrumb-item.entry.js +2 -2
  89. package/dist/esm/post-card-control-017fb9b2.js +270 -0
  90. package/dist/esm/post-card-control.entry.js +2 -2
  91. package/dist/esm/post-closebutton_10.entry.js +2 -2
  92. package/dist/esm/{post-collapsible-trigger-34740fa6.js → post-collapsible-trigger-7b3d0fd3.js} +2 -9
  93. package/dist/esm/post-collapsible_2.entry.js +3 -2
  94. package/dist/esm/post-components.js +1 -1
  95. package/dist/esm/{post-language-option-e2a76752.js → post-language-option-05f53f6f.js} +1 -1
  96. package/dist/esm/post-language-option.entry.js +2 -2
  97. package/dist/esm/{post-megadropdown-trigger-7e577245.js → post-megadropdown-trigger-3112a42b.js} +3 -3
  98. package/dist/esm/{post-menu-e6337859.js → post-menu-05396ff7.js} +1 -1
  99. package/dist/esm/{post-menu-item-c10a0a93.js → post-menu-item-bbbb6a7e.js} +1 -1
  100. package/dist/esm/post-menu-item.entry.js +2 -2
  101. package/dist/esm/{post-menu-trigger-5f31ad60.js → post-menu-trigger-f9f4d299.js} +5 -3
  102. package/dist/esm/post-menu-trigger.entry.js +3 -2
  103. package/dist/esm/post-menu.entry.js +2 -2
  104. package/dist/esm/{post-popover-d78547b4.js → post-popover-1ae328eb.js} +2 -2
  105. package/dist/esm/post-popover.entry.js +2 -2
  106. package/dist/esm/{post-rating-d04d0349.js → post-rating-75171e3a.js} +1 -1
  107. package/dist/esm/post-rating.entry.js +2 -2
  108. package/dist/esm/post-tab-header-d4d40b0e.js +30 -0
  109. package/dist/esm/post-tab-header.entry.js +2 -2
  110. package/dist/esm/{post-tab-panel-d9ecc10e.js → post-tab-panel-79b42d3e.js} +1 -1
  111. package/dist/esm/post-tab-panel.entry.js +2 -2
  112. package/dist/esm/{post-tabs-e98a47e8.js → post-tabs-4d880ed8.js} +2 -2
  113. package/dist/esm/post-tabs.entry.js +2 -2
  114. package/dist/esm/{post-tag-40a65871.js → post-tag-bf91d0a7.js} +2 -2
  115. package/dist/esm/post-tag.entry.js +2 -2
  116. package/dist/esm/{post-tooltip-3b1e121c.js → post-tooltip-7aa14f94.js} +1 -1
  117. package/dist/esm/post-tooltip.entry.js +2 -2
  118. package/dist/post-components/index.esm.js +1 -1
  119. package/dist/post-components/p-314c1090.js +1 -0
  120. package/dist/post-components/p-34e5b9da.entry.js +1 -0
  121. package/dist/post-components/p-3899ed87.js +1 -0
  122. package/dist/post-components/p-3b3b57d0.entry.js +1 -0
  123. package/dist/post-components/p-4221fd16.js +1 -0
  124. package/dist/post-components/{p-1d8a41d3.js → p-470eb29c.js} +1 -1
  125. package/dist/post-components/{p-af8cfb8e.js → p-476a6342.js} +1 -1
  126. package/dist/post-components/p-499f3c12.entry.js +1 -0
  127. package/dist/post-components/{p-879ae242.js → p-4ac02dc1.js} +1 -1
  128. package/dist/post-components/p-4cb59994.js +1 -0
  129. package/dist/post-components/{p-e0dc4fac.js → p-4cca12fe.js} +1 -1
  130. package/dist/post-components/p-56bd7eb7.entry.js +1 -0
  131. package/dist/post-components/p-61b27b51.entry.js +1 -0
  132. package/dist/post-components/p-6e37b9bf.entry.js +1 -0
  133. package/dist/post-components/{p-76dbca34.entry.js → p-7175208c.entry.js} +1 -1
  134. package/dist/post-components/p-71eb2dc7.js +1 -0
  135. package/dist/post-components/p-7391daa3.entry.js +1 -0
  136. package/dist/post-components/{p-6e7bde44.js → p-73a5b344.js} +1 -1
  137. package/dist/post-components/{p-7a20605b.js → p-7a887455.js} +1 -1
  138. package/dist/post-components/p-7a995b7e.entry.js +1 -0
  139. package/dist/post-components/p-888ab913.entry.js +1 -0
  140. package/dist/post-components/p-8927a8e4.entry.js +1 -0
  141. package/dist/post-components/p-8fb11b22.entry.js +1 -0
  142. package/dist/post-components/p-916ec6d5.entry.js +1 -0
  143. package/dist/post-components/p-98d8ba01.js +1 -0
  144. package/dist/post-components/{p-2069e764.js → p-9d94bf34.js} +1 -1
  145. package/dist/post-components/p-a1a1b679.entry.js +1 -0
  146. package/dist/post-components/p-a87d8337.entry.js +1 -0
  147. package/dist/post-components/p-ab0556af.entry.js +1 -0
  148. package/dist/post-components/p-b8d230eb.js +1 -0
  149. package/dist/post-components/{p-42c628fd.js → p-c6ac2e45.js} +1 -1
  150. package/dist/post-components/p-c94a2ae1.entry.js +1 -0
  151. package/dist/post-components/{p-fc2c7222.js → p-cd06fab9.js} +1 -1
  152. package/dist/post-components/p-cf298c46.js +1 -0
  153. package/dist/post-components/p-d2938e9a.entry.js +1 -0
  154. package/dist/post-components/p-d6ac46af.js +1 -0
  155. package/dist/post-components/{p-75514d7d.js → p-d7c37aca.js} +1 -1
  156. package/dist/post-components/p-dddc70f6.entry.js +1 -0
  157. package/dist/post-components/{p-77a757d4.js → p-ed12b51d.js} +1 -1
  158. package/dist/post-components/p-fc91cbc2.js +1 -0
  159. package/dist/post-components/post-components.esm.js +1 -1
  160. package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
  161. package/dist/types/components/post-banner/banner-types.d.ts +2 -0
  162. package/dist/types/components/post-banner/post-banner.d.ts +49 -0
  163. package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
  164. package/dist/types/components/post-list/post-list.d.ts +1 -1
  165. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +1 -0
  166. package/dist/types/components/post-tag/post-tag.d.ts +1 -1
  167. package/dist/types/components.d.ts +71 -79
  168. package/dist/types/index.d.ts +1 -1
  169. package/loaders/get-root.js +9 -0
  170. package/loaders/index.d.ts +2 -2
  171. package/loaders/index.js +1 -1
  172. package/loaders/package.js +1 -1
  173. package/loaders/{post-alert.d.ts → post-banner.d.ts} +4 -4
  174. package/loaders/post-banner.js +128 -0
  175. package/loaders/post-card-control.js +3 -3
  176. package/loaders/post-collapsible-trigger2.js +1 -8
  177. package/loaders/post-list.js +2 -2
  178. package/loaders/post-menu-trigger.js +4 -2
  179. package/loaders/post-popover.js +1 -1
  180. package/loaders/post-tab-header.js +1 -1
  181. package/loaders/post-tabs.js +1 -1
  182. package/loaders/post-tag.js +1 -1
  183. package/package.json +4 -4
  184. package/dist/cjs/post-alert-5333a23c.js +0 -99
  185. package/dist/cjs/post-card-control-b289ddcf.js +0 -272
  186. package/dist/cjs/post-tab-header-03b20f24.js +0 -32
  187. package/dist/collection/components/post-alert/alert-types.js +0 -1
  188. package/dist/collection/components/post-alert/post-alert.css +0 -7
  189. package/dist/components/post-alert.js +0 -6
  190. package/dist/components/post-alert2.js +0 -136
  191. package/dist/esm/package-d0380f19.js +0 -3
  192. package/dist/esm/post-alert-0679e14b.js +0 -97
  193. package/dist/esm/post-card-control-53b9ca94.js +0 -270
  194. package/dist/esm/post-tab-header-6efc530f.js +0 -30
  195. package/dist/post-components/p-029c91d8.entry.js +0 -1
  196. package/dist/post-components/p-03c850fa.entry.js +0 -1
  197. package/dist/post-components/p-3705d2b4.js +0 -1
  198. package/dist/post-components/p-3aaea2a7.js +0 -1
  199. package/dist/post-components/p-3b4342e4.entry.js +0 -1
  200. package/dist/post-components/p-3b5bd4a4.entry.js +0 -1
  201. package/dist/post-components/p-3f785d16.entry.js +0 -1
  202. package/dist/post-components/p-40a57111.entry.js +0 -1
  203. package/dist/post-components/p-41f5f626.entry.js +0 -1
  204. package/dist/post-components/p-43451d07.js +0 -1
  205. package/dist/post-components/p-49a42850.js +0 -1
  206. package/dist/post-components/p-4f1a40dd.entry.js +0 -1
  207. package/dist/post-components/p-70c016ab.js +0 -1
  208. package/dist/post-components/p-77af2367.entry.js +0 -1
  209. package/dist/post-components/p-976c2742.js +0 -1
  210. package/dist/post-components/p-9cda2b0d.entry.js +0 -1
  211. package/dist/post-components/p-9fab4d3c.js +0 -1
  212. package/dist/post-components/p-a0226aec.js +0 -1
  213. package/dist/post-components/p-aa890e24.entry.js +0 -1
  214. package/dist/post-components/p-ac6d9496.js +0 -1
  215. package/dist/post-components/p-ad6e41d5.entry.js +0 -1
  216. package/dist/post-components/p-c95813b2.entry.js +0 -1
  217. package/dist/post-components/p-d3814644.entry.js +0 -1
  218. package/dist/post-components/p-d5b02b44.entry.js +0 -1
  219. package/dist/post-components/p-f404d0bb.entry.js +0 -1
  220. package/dist/post-components/p-f5b933bc.entry.js +0 -1
  221. package/dist/post-components/p-fbda2556.entry.js +0 -1
  222. package/dist/types/components/post-alert/alert-types.d.ts +0 -2
  223. package/dist/types/components/post-alert/post-alert.d.ts +0 -54
  224. package/loaders/post-alert.js +0 -139
@@ -1,136 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { v as version } from './package.js';
3
- import { f as fadeOut } from './fade.js';
4
- import { a as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index2.js';
5
- import { d as defineCustomElement$1 } from './post-icon2.js';
6
- import { c as checkType } from './check-type.js';
7
- import { c as checkNonEmpty } from './check-non-empty.js';
8
-
9
- const ALERT_TYPES = ['primary', 'success', 'warning', 'danger', 'info', 'gray'];
10
-
11
- const postAlertCss = ".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-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}.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:400}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert.no-icon::before{content:unset}.alert.no-icon>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}.alert-action>.alert-content{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 )}.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)::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)::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)::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)::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)::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)::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)::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)::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:var(--post-device-border-radius-round);color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-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:var(--post-core-border-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}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.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}";
12
- const PostAlertStyle0 = postAlertCss;
13
-
14
- const PostAlert = /*@__PURE__*/ proxyCustomElement(class PostAlert extends HTMLElement {
15
- constructor() {
16
- super();
17
- this.__registerHost();
18
- this.__attachShadow();
19
- this.postDismissed = createEvent(this, "postDismissed", 7);
20
- this.alertId = crypto.randomUUID();
21
- this.classes = undefined;
22
- this.hasActions = undefined;
23
- this.hasHeading = undefined;
24
- this.onDismissButtonClick = () => this.dismiss();
25
- this.dismissible = false;
26
- this.dismissLabel = undefined;
27
- this.fixed = false;
28
- this.icon = undefined;
29
- this.type = 'primary';
30
- }
31
- validateDismissible(isDismissible = this.dismissible) {
32
- checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
33
- setTimeout(() => this.validateDismissLabel());
34
- }
35
- validateDismissLabel(dismissLabel = this.dismissLabel) {
36
- if (this.dismissible) {
37
- checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
38
- }
39
- }
40
- validateFixed(isFixed = this.fixed) {
41
- checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
42
- }
43
- validateIcon(icon = this.icon) {
44
- checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
45
- }
46
- validateType(type = this.type) {
47
- checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
48
- }
49
- componentDidLoad() {
50
- this.validateDismissible();
51
- this.validateFixed();
52
- this.validateIcon();
53
- this.validateType();
54
- }
55
- componentWillRender() {
56
- var _a;
57
- this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
58
- this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
59
- this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
60
- if (this.dismissible)
61
- this.classes += ' alert-dismissible';
62
- if (this.hasActions)
63
- this.classes += ' alert-action';
64
- if (this.fixed)
65
- this.classes += ' alert-fixed-bottom';
66
- if (this.icon === 'none')
67
- this.classes += ' no-icon';
68
- }
69
- /**
70
- * Triggers alert dismissal programmatically (same as clicking on the close button (×)).
71
- */
72
- async dismiss() {
73
- const dismissal = fadeOut(this.host);
74
- await dismissal.finished;
75
- this.host.remove();
76
- this.postDismissed.emit();
77
- }
78
- render() {
79
- const defaultAlertContent = [
80
- this.hasHeading && (h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, h("slot", { key: 'a3404eee0322cc2b50125bf4ca08969e33d15763', name: "heading" }))),
81
- h("slot", { key: `${this.alertId}-message` }),
82
- ];
83
- const actionAlertContent = [
84
- h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
85
- h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, h("slot", { key: '50941abd468008cd58a1e05577243d1046a0e20e', name: "actions" })),
86
- ];
87
- return (h(Host, { key: '99c1e3b4cc943d8be2d5abe7b2b27dce03548d15', "data-version": version }, h("div", { key: 'a290771bcc1234684502f524fe6e7e44501fc004', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '57c9cdbec53430b0fc6e121b5928bb14b86c37e0', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: '82d59b6deb736b4053b2b0876c87456c160928ee', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.alertId}-icon`, name: this.icon })), this.hasActions ? actionAlertContent : defaultAlertContent)));
88
- }
89
- get host() { return this; }
90
- static get watchers() { return {
91
- "dismissible": ["validateDismissible"],
92
- "dismissLabel": ["validateDismissLabel"],
93
- "fixed": ["validateFixed"],
94
- "icon": ["validateIcon"],
95
- "type": ["validateType"]
96
- }; }
97
- static get style() { return PostAlertStyle0; }
98
- }, [1, "post-alert", {
99
- "dismissible": [4],
100
- "dismissLabel": [1, "dismiss-label"],
101
- "fixed": [4],
102
- "icon": [1],
103
- "type": [1],
104
- "alertId": [32],
105
- "classes": [32],
106
- "hasActions": [32],
107
- "hasHeading": [32],
108
- "onDismissButtonClick": [32],
109
- "dismiss": [64]
110
- }, undefined, {
111
- "dismissible": ["validateDismissible"],
112
- "dismissLabel": ["validateDismissLabel"],
113
- "fixed": ["validateFixed"],
114
- "icon": ["validateIcon"],
115
- "type": ["validateType"]
116
- }]);
117
- function defineCustomElement() {
118
- if (typeof customElements === "undefined") {
119
- return;
120
- }
121
- const components = ["post-alert", "post-icon"];
122
- components.forEach(tagName => { switch (tagName) {
123
- case "post-alert":
124
- if (!customElements.get(tagName)) {
125
- customElements.define(tagName, PostAlert);
126
- }
127
- break;
128
- case "post-icon":
129
- if (!customElements.get(tagName)) {
130
- defineCustomElement$1();
131
- }
132
- break;
133
- } });
134
- }
135
-
136
- export { PostAlert as P, defineCustomElement as d };
@@ -1,3 +0,0 @@
1
- const version = "9.0.0-next.5";
2
-
3
- export { version as v };
@@ -1,97 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-e1b64755.js';
2
- import { v as version } from './package-d0380f19.js';
3
- import { f as fadeOut } from './fade-7fd71785.js';
4
- import { a as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index-f8a00dc0.js';
5
- import { c as checkType } from './check-type-8828dbe4.js';
6
- import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
7
-
8
- const ALERT_TYPES = ['primary', 'success', 'warning', 'danger', 'info', 'gray'];
9
-
10
- const postAlertCss = ".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-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}.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:400}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert.no-icon::before{content:unset}.alert.no-icon>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}.alert-action>.alert-content{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 )}.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)::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)::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)::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)::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)::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)::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)::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)::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:var(--post-device-border-radius-round);color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-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:var(--post-core-border-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}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.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}";
11
- const PostAlertStyle0 = postAlertCss;
12
-
13
- const PostAlert = class {
14
- constructor(hostRef) {
15
- registerInstance(this, hostRef);
16
- this.postDismissed = createEvent(this, "postDismissed", 7);
17
- this.alertId = crypto.randomUUID();
18
- this.classes = undefined;
19
- this.hasActions = undefined;
20
- this.hasHeading = undefined;
21
- this.onDismissButtonClick = () => this.dismiss();
22
- this.dismissible = false;
23
- this.dismissLabel = undefined;
24
- this.fixed = false;
25
- this.icon = undefined;
26
- this.type = 'primary';
27
- }
28
- validateDismissible(isDismissible = this.dismissible) {
29
- checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
30
- setTimeout(() => this.validateDismissLabel());
31
- }
32
- validateDismissLabel(dismissLabel = this.dismissLabel) {
33
- if (this.dismissible) {
34
- checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
35
- }
36
- }
37
- validateFixed(isFixed = this.fixed) {
38
- checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
39
- }
40
- validateIcon(icon = this.icon) {
41
- checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
42
- }
43
- validateType(type = this.type) {
44
- checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
45
- }
46
- componentDidLoad() {
47
- this.validateDismissible();
48
- this.validateFixed();
49
- this.validateIcon();
50
- this.validateType();
51
- }
52
- componentWillRender() {
53
- var _a;
54
- this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
55
- this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
56
- this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
57
- if (this.dismissible)
58
- this.classes += ' alert-dismissible';
59
- if (this.hasActions)
60
- this.classes += ' alert-action';
61
- if (this.fixed)
62
- this.classes += ' alert-fixed-bottom';
63
- if (this.icon === 'none')
64
- this.classes += ' no-icon';
65
- }
66
- /**
67
- * Triggers alert dismissal programmatically (same as clicking on the close button (×)).
68
- */
69
- async dismiss() {
70
- const dismissal = fadeOut(this.host);
71
- await dismissal.finished;
72
- this.host.remove();
73
- this.postDismissed.emit();
74
- }
75
- render() {
76
- const defaultAlertContent = [
77
- this.hasHeading && (h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, h("slot", { key: 'a3404eee0322cc2b50125bf4ca08969e33d15763', name: "heading" }))),
78
- h("slot", { key: `${this.alertId}-message` }),
79
- ];
80
- const actionAlertContent = [
81
- h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
82
- h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, h("slot", { key: '50941abd468008cd58a1e05577243d1046a0e20e', name: "actions" })),
83
- ];
84
- return (h(Host, { key: '99c1e3b4cc943d8be2d5abe7b2b27dce03548d15', "data-version": version }, h("div", { key: 'a290771bcc1234684502f524fe6e7e44501fc004', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '57c9cdbec53430b0fc6e121b5928bb14b86c37e0', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: '82d59b6deb736b4053b2b0876c87456c160928ee', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.alertId}-icon`, name: this.icon })), this.hasActions ? actionAlertContent : defaultAlertContent)));
85
- }
86
- get host() { return getElement(this); }
87
- static get watchers() { return {
88
- "dismissible": ["validateDismissible"],
89
- "dismissLabel": ["validateDismissLabel"],
90
- "fixed": ["validateFixed"],
91
- "icon": ["validateIcon"],
92
- "type": ["validateType"]
93
- }; }
94
- };
95
- PostAlert.style = PostAlertStyle0;
96
-
97
- export { PostAlert as P };