@swisspost/design-system-components 9.0.0-next.0 → 9.0.0-next.2

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 (163) hide show
  1. package/dist/cjs/index.cjs.js +16 -16
  2. package/dist/cjs/{package-ebef502e.js → package-a7150f64.js} +1 -1
  3. package/dist/cjs/{post-accordion-677c6891.js → post-accordion-62d2fd79.js} +11 -9
  4. package/dist/cjs/{post-accordion-item-8d1d6c81.js → post-accordion-item-7b348fa5.js} +5 -5
  5. package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
  6. package/dist/cjs/post-accordion.cjs.entry.js +2 -2
  7. package/dist/cjs/post-alert-fca3a4a3.js +98 -0
  8. package/dist/cjs/post-alert.cjs.entry.js +2 -2
  9. package/dist/cjs/post-card-control-b4e4b4d5.js +272 -0
  10. package/dist/cjs/post-card-control.cjs.entry.js +2 -2
  11. package/dist/cjs/{post-collapsible-trigger-4f44ca4a.js → post-collapsible-trigger-9dca8493.js} +1 -1
  12. package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -2
  13. package/dist/cjs/{post-icon-dc878de4.js → post-icon-3934be0b.js} +1 -1
  14. package/dist/cjs/post-icon.cjs.entry.js +2 -2
  15. package/dist/cjs/{post-logo-da45aef5.js → post-logo-c3603fc7.js} +1 -1
  16. package/dist/cjs/post-logo.cjs.entry.js +2 -2
  17. package/dist/cjs/post-popover-15f9620a.js +104 -0
  18. package/dist/cjs/post-popover.cjs.entry.js +2 -2
  19. package/dist/cjs/{post-popovercontainer-322d3160.js → post-popovercontainer-7d536276.js} +1 -1
  20. package/dist/cjs/post-popovercontainer.cjs.entry.js +2 -2
  21. package/dist/cjs/{post-rating-ac9e71aa.js → post-rating-db5a397a.js} +2 -2
  22. package/dist/cjs/post-rating.cjs.entry.js +2 -2
  23. package/dist/cjs/{post-tab-header-3baf22e0.js → post-tab-header-29b8d4e1.js} +2 -2
  24. package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
  25. package/dist/cjs/{post-tab-panel-787bcd5d.js → post-tab-panel-d59cf1ec.js} +1 -1
  26. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  27. package/dist/cjs/{post-tabs-1b7aad55.js → post-tabs-7afae61a.js} +1 -1
  28. package/dist/cjs/post-tabs.cjs.entry.js +2 -2
  29. package/dist/cjs/post-tag-b7d0bbff.js +47 -0
  30. package/dist/cjs/post-tag.cjs.entry.js +2 -2
  31. package/dist/cjs/{post-tooltip-d1d2cd3a.js → post-tooltip-432852c7.js} +23 -4
  32. package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
  33. package/dist/collection/components/post-accordion/post-accordion.js +12 -10
  34. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  35. package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -5
  36. package/dist/collection/components/post-alert/post-alert.css +1 -29
  37. package/dist/collection/components/post-card-control/post-card-control.css +1 -29
  38. package/dist/collection/components/post-popover/post-popover.css +0 -28
  39. package/dist/collection/components/post-rating/post-rating.css +0 -28
  40. package/dist/collection/components/post-tab-header/post-tab-header.css +0 -28
  41. package/dist/collection/components/post-tag/post-tag.css +0 -28
  42. package/dist/collection/components/post-tooltip/post-tooltip.js +30 -4
  43. package/dist/components/package.js +1 -1
  44. package/dist/components/post-accordion-item2.js +4 -4
  45. package/dist/components/post-accordion2.js +10 -8
  46. package/dist/components/post-alert2.js +1 -1
  47. package/dist/components/post-card-control2.js +1 -1
  48. package/dist/components/post-popover2.js +1 -1
  49. package/dist/components/post-rating2.js +1 -1
  50. package/dist/components/post-tab-header2.js +1 -1
  51. package/dist/components/post-tag2.js +1 -1
  52. package/dist/components/post-tooltip2.js +22 -3
  53. package/dist/docs.json +19 -6
  54. package/dist/esm/index.js +16 -16
  55. package/dist/esm/package-3d758f77.js +3 -0
  56. package/dist/esm/{post-accordion-19ca8bf9.js → post-accordion-6f4d2b9a.js} +11 -9
  57. package/dist/esm/{post-accordion-item-3232ff67.js → post-accordion-item-6b5a65ad.js} +5 -5
  58. package/dist/esm/post-accordion-item.entry.js +2 -2
  59. package/dist/esm/post-accordion.entry.js +2 -2
  60. package/dist/esm/post-alert-f19db551.js +96 -0
  61. package/dist/esm/post-alert.entry.js +2 -2
  62. package/dist/esm/post-card-control-1b5df6cb.js +270 -0
  63. package/dist/esm/post-card-control.entry.js +2 -2
  64. package/dist/esm/{post-collapsible-trigger-8f54e5b6.js → post-collapsible-trigger-85c2064a.js} +1 -1
  65. package/dist/esm/post-collapsible_2.entry.js +2 -2
  66. package/dist/esm/{post-icon-1a682b9e.js → post-icon-40929043.js} +1 -1
  67. package/dist/esm/post-icon.entry.js +2 -2
  68. package/dist/esm/{post-logo-904c4701.js → post-logo-c6351ba8.js} +1 -1
  69. package/dist/esm/post-logo.entry.js +2 -2
  70. package/dist/esm/post-popover-58149de7.js +102 -0
  71. package/dist/esm/post-popover.entry.js +2 -2
  72. package/dist/esm/{post-popovercontainer-17d2b256.js → post-popovercontainer-8bde9fc3.js} +1 -1
  73. package/dist/esm/post-popovercontainer.entry.js +2 -2
  74. package/dist/esm/{post-rating-8e22d522.js → post-rating-d9fc0b40.js} +2 -2
  75. package/dist/esm/post-rating.entry.js +2 -2
  76. package/dist/esm/{post-tab-header-96287c94.js → post-tab-header-ae8feb19.js} +2 -2
  77. package/dist/esm/post-tab-header.entry.js +2 -2
  78. package/dist/esm/{post-tab-panel-b9605846.js → post-tab-panel-926439f4.js} +1 -1
  79. package/dist/esm/post-tab-panel.entry.js +2 -2
  80. package/dist/esm/{post-tabs-fb024b14.js → post-tabs-13b2d9a6.js} +1 -1
  81. package/dist/esm/post-tabs.entry.js +2 -2
  82. package/dist/esm/post-tag-887d5fbe.js +45 -0
  83. package/dist/esm/post-tag.entry.js +2 -2
  84. package/dist/esm/{post-tooltip-02e413ba.js → post-tooltip-3cde6b53.js} +23 -4
  85. package/dist/esm/post-tooltip.entry.js +2 -2
  86. package/dist/post-components/index.esm.js +1 -1
  87. package/dist/post-components/{p-1c63cb03.js → p-0b71bf5a.js} +1 -1
  88. package/dist/post-components/p-0e09dc41.js +1 -0
  89. package/dist/post-components/{p-079c7726.js → p-19e54be9.js} +1 -1
  90. package/dist/post-components/p-1e8f0f36.js +1 -0
  91. package/dist/post-components/p-22257eff.entry.js +1 -0
  92. package/dist/post-components/p-249ac168.entry.js +1 -0
  93. package/dist/post-components/p-2b10e265.js +1 -0
  94. package/dist/post-components/p-3325086e.js +1 -0
  95. package/dist/post-components/p-3b823fee.entry.js +1 -0
  96. package/dist/post-components/p-45f4c803.entry.js +1 -0
  97. package/dist/post-components/p-47935dbb.js +1 -0
  98. package/dist/post-components/p-486fbbce.entry.js +1 -0
  99. package/dist/post-components/p-4a7fb0f3.entry.js +1 -0
  100. package/dist/post-components/p-5f231c2c.js +1 -0
  101. package/dist/post-components/{p-a0b62b51.js → p-6a28f8b9.js} +1 -1
  102. package/dist/post-components/p-6ed3497a.entry.js +1 -0
  103. package/dist/post-components/p-820c5c19.entry.js +1 -0
  104. package/dist/post-components/{p-e387c0c9.js → p-82dcf8c6.js} +3 -3
  105. package/dist/post-components/p-8aeb549f.entry.js +1 -0
  106. package/dist/post-components/{p-ab6ce1d7.js → p-92aeec3c.js} +1 -1
  107. package/dist/post-components/{p-10b043fc.js → p-9a99cfc7.js} +1 -1
  108. package/dist/post-components/p-aa8a08dc.entry.js +1 -0
  109. package/dist/post-components/p-b99fdec3.js +1 -0
  110. package/dist/post-components/{p-b96307d5.entry.js → p-ba40b28a.entry.js} +1 -1
  111. package/dist/post-components/{p-de2ce222.js → p-c62de925.js} +1 -1
  112. package/dist/post-components/p-d2101b8a.entry.js +1 -0
  113. package/dist/post-components/{p-44564a68.js → p-d7a44f45.js} +1 -1
  114. package/dist/post-components/p-db4b8ea1.entry.js +1 -0
  115. package/dist/post-components/p-eedc6ae8.entry.js +1 -0
  116. package/dist/post-components/p-f217f420.js +1 -0
  117. package/dist/post-components/p-f707d163.entry.js +1 -0
  118. package/dist/post-components/post-components.esm.js +1 -1
  119. package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
  120. package/dist/types/components/post-tooltip/post-tooltip.d.ts +4 -1
  121. package/dist/types/components.d.ts +4 -3
  122. package/loaders/package.js +1 -1
  123. package/loaders/post-accordion-item.js +4 -4
  124. package/loaders/post-accordion.js +10 -8
  125. package/loaders/post-alert.js +1 -1
  126. package/loaders/post-card-control.js +1 -1
  127. package/loaders/post-popover.js +1 -1
  128. package/loaders/post-rating.js +1 -1
  129. package/loaders/post-tab-header.js +1 -1
  130. package/loaders/post-tag.js +1 -1
  131. package/loaders/post-tooltip.js +22 -3
  132. package/package.json +2 -2
  133. package/dist/cjs/post-alert-ea75de0d.js +0 -98
  134. package/dist/cjs/post-card-control-51ee3823.js +0 -272
  135. package/dist/cjs/post-popover-aac764c7.js +0 -104
  136. package/dist/cjs/post-tag-e4bcdb75.js +0 -47
  137. package/dist/esm/package-a8cae03d.js +0 -3
  138. package/dist/esm/post-alert-2636c0e2.js +0 -96
  139. package/dist/esm/post-card-control-0844cad9.js +0 -270
  140. package/dist/esm/post-popover-14d083d4.js +0 -102
  141. package/dist/esm/post-tag-58311692.js +0 -45
  142. package/dist/post-components/p-04e79a2c.entry.js +0 -1
  143. package/dist/post-components/p-05794f1f.entry.js +0 -1
  144. package/dist/post-components/p-2e7cc4c6.entry.js +0 -1
  145. package/dist/post-components/p-370edca6.js +0 -1
  146. package/dist/post-components/p-3c3e8b19.js +0 -1
  147. package/dist/post-components/p-429b886d.js +0 -1
  148. package/dist/post-components/p-47420c6f.entry.js +0 -1
  149. package/dist/post-components/p-4973d1c7.entry.js +0 -1
  150. package/dist/post-components/p-6007889b.entry.js +0 -1
  151. package/dist/post-components/p-69bcb15f.entry.js +0 -1
  152. package/dist/post-components/p-771bd293.js +0 -1
  153. package/dist/post-components/p-8c0372c2.entry.js +0 -1
  154. package/dist/post-components/p-92ce53bc.entry.js +0 -1
  155. package/dist/post-components/p-991dff03.entry.js +0 -1
  156. package/dist/post-components/p-a2fa8c1d.entry.js +0 -1
  157. package/dist/post-components/p-e37ff727.entry.js +0 -1
  158. package/dist/post-components/p-eb3f324e.entry.js +0 -1
  159. package/dist/post-components/p-ec1f1966.js +0 -1
  160. package/dist/post-components/p-ee8845de.js +0 -1
  161. package/dist/post-components/p-fb1fb618.entry.js +0 -1
  162. package/dist/post-components/p-fbc24b84.js +0 -1
  163. package/dist/post-components/p-ff12fd7a.js +0 -1
@@ -1,104 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-c15bd800.js');
4
- const _package = require('./package-ebef502e.js');
5
- const attributeObserver = require('./attribute-observer-10f08c04.js');
6
-
7
- const postPopoverCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;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}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em;flex-grow:1}.btn-close{color:inherit}";
8
- const PostPopoverStyle0 = postPopoverCss;
9
-
10
- /**
11
- * @slot default - Slot for placing content inside the popover.
12
- */
13
- let popoverInstances = 0;
14
- const popoverTargetAttribute = 'data-popover-target';
15
- const globalToggleHandler = (e) => {
16
- const target = e.target;
17
- if (!target || !('getAttribute' in target))
18
- return;
19
- const popoverTarget = target.getAttribute(popoverTargetAttribute);
20
- if (!popoverTarget || ('key' in e && e.key !== 'Enter'))
21
- return;
22
- const popover = document.getElementById(popoverTarget);
23
- popover === null || popover === void 0 ? void 0 : popover.toggle(target);
24
- };
25
- // Initialize a mutation observer for patching accessibility features
26
- const triggerObserver = attributeObserver.getAttributeObserver(popoverTargetAttribute, trigger => {
27
- const force = trigger.hasAttribute(popoverTargetAttribute);
28
- trigger.setAttribute('aria-expanded', force ? 'false' : null);
29
- });
30
- const PostPopover = class {
31
- constructor(hostRef) {
32
- index.registerInstance(this, hostRef);
33
- this.placement = 'top';
34
- this.closeButtonCaption = undefined;
35
- this.arrow = true;
36
- this.localBeforeToggleHandler = this.beforeToggleHandler.bind(this);
37
- }
38
- connectedCallback() {
39
- // Set up accessibility patcher and event listeners for the first component
40
- if (popoverInstances === 0) {
41
- window.addEventListener('pointerup', globalToggleHandler);
42
- window.addEventListener('keydown', globalToggleHandler);
43
- triggerObserver.observe(document.body, {
44
- subtree: true,
45
- childList: true,
46
- attributeFilter: [popoverTargetAttribute],
47
- });
48
- }
49
- popoverInstances++;
50
- this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
51
- }
52
- componentDidLoad() {
53
- this.popoverRef.addEventListener('beforetoggle', this.localBeforeToggleHandler);
54
- }
55
- disconnectedCallback() {
56
- popoverInstances--;
57
- // Remove listeners and observer after the last popover has been destructed
58
- if (popoverInstances === 0) {
59
- window.removeEventListener('click', globalToggleHandler);
60
- window.removeEventListener('keydown', globalToggleHandler);
61
- triggerObserver.disconnect();
62
- }
63
- this.popoverRef.removeEventListener('beforetoggle', this.localBeforeToggleHandler);
64
- this.triggers.forEach(trigger => trigger.removeAttribute('aria-expanded'));
65
- }
66
- /**
67
- * Programmatically display the popover
68
- * @param target An element with [data-popover-target="id"] where the popover should be shown
69
- */
70
- async show(target) {
71
- this.popoverRef.show(target);
72
- target.setAttribute('aria-expanded', 'true');
73
- }
74
- /**
75
- * Programmatically hide this popover
76
- */
77
- async hide() {
78
- this.popoverRef.hide();
79
- this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
80
- }
81
- /**
82
- * Toggle popover display
83
- * @param target An element with [data-popover-target="id"] where the popover should be anchored to
84
- * @param force Pass true to always show or false to always hide
85
- */
86
- async toggle(target, force) {
87
- const newState = await this.popoverRef.toggle(target, force);
88
- this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
89
- target.setAttribute('aria-expanded', `${newState}`);
90
- }
91
- get triggers() {
92
- return document.querySelectorAll(`[${popoverTargetAttribute}="${this.host.id}"]`);
93
- }
94
- beforeToggleHandler() {
95
- this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
96
- }
97
- render() {
98
- return (index.h(index.Host, { key: '6fe379d071ec88a76f99cc10f0fdce0b2f079fbd', "data-version": _package.version }, index.h("post-popovercontainer", { key: '3a5e2896e87e3f2d32c0ad9b1d80327cc585f289', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, index.h("div", { key: '46834ef6a3893fe8823776d8feb20a2fb328e3bc', class: "popover-container" }, index.h("div", { key: '9d61b678c2613e84efc0df805cbb67fbe3d06991', class: "popover-content" }, index.h("slot", { key: '1cfef5daaea3f6370869a3ae648ff36e2dddd82a' })), index.h("button", { key: 'c7a2e12ece46ee63d8004d99427c8c6febc2dc17', class: "btn-close", onClick: () => this.hide() }, index.h("span", { key: '1aee8ffe06b5c4c9bade0185a8832328410fbe4a', class: "visually-hidden" }, this.closeButtonCaption))))));
99
- }
100
- get host() { return index.getElement(this); }
101
- };
102
- PostPopover.style = PostPopoverStyle0;
103
-
104
- exports.PostPopover = PostPopover;
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-c15bd800.js');
4
- const _package = require('./package-ebef502e.js');
5
-
6
- const postTagCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:100%;background-color:var(--post-tag-bg);border:1px solid rgba(0,0,0,0);border-radius:.25rem;font-size:1rem;line-height:1.875rem;white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:1.5rem}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg:#fff;--post-tag-fg:#000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg:#fc0;--post-tag-fg:#000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg:#2c871d;--post-tag-fg:#fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg:#f49e00;--post-tag-fg:#000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg:#a51728;--post-tag-fg:#fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg:#cce4ee;--post-tag-fg:#000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}";
7
- const PostTagStyle0 = postTagCss;
8
-
9
- const PostTag = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.classes = undefined;
13
- this.variant = undefined;
14
- this.size = null;
15
- this.icon = null;
16
- this.setClasses = this.setClasses.bind(this);
17
- }
18
- variantChanged() {
19
- this.setClasses();
20
- }
21
- sizeChanged() {
22
- this.setClasses();
23
- }
24
- setClasses() {
25
- this.classes = [
26
- 'tag',
27
- this.size ? `tag-${this.size}` : null,
28
- this.variant ? `tag-${this.variant}` : null,
29
- ]
30
- .filter(c => c !== null)
31
- .join(' ');
32
- }
33
- connectedCallback() {
34
- this.setClasses();
35
- }
36
- render() {
37
- return (index.h(index.Host, { key: '7426002d3008de53e92edc8ec2fc759569b191bf', "data-version": _package.version }, index.h("div", { key: '1cde8f5c3d2db66f45aaa64091a1b76f1d1468ee', class: this.classes }, this.icon ? index.h("post-icon", { name: this.icon }) : null, index.h("div", { key: 'cc63b7277ba4f4076a46f5038b24699f6818c81b', class: "tag-text" }, index.h("slot", { key: '37b57632add7f7c093e42302e44defef63ccc29f' })))));
38
- }
39
- get host() { return index.getElement(this); }
40
- static get watchers() { return {
41
- "variant": ["variantChanged"],
42
- "size": ["sizeChanged"]
43
- }; }
44
- };
45
- PostTag.style = PostTagStyle0;
46
-
47
- exports.PostTag = PostTag;
@@ -1,3 +0,0 @@
1
- const version = "9.0.0-next.0";
2
-
3
- export { version as v };
@@ -1,96 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-0b56fc28.js';
2
- import { v as version } from './package-a8cae03d.js';
3
- import { f as fadeOut } from './fade-7fd71785.js';
4
- import { a as checkType, b as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index-f41b763f.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:400}.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}:where(.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: '928eeaedc9a897394ef064a218b43a780dc10f0d', 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: '67bcd576fb17374be6e0f9b3633a19aaff884b6a', name: "actions" })),
82
- ];
83
- return (h(Host, { key: 'df4452a660ba217ad57d5ad69ee224a686f5537e', "data-version": version }, h("div", { key: 'f1d346826fee4629356c9e722ac619d9c7a34c17', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '0deb48cddffd2288dd4e2999f291179ca6cdc6b5', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'd252736e70ee4213d7c36e622181b640a8b3c4cb', 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 };