@swisspost/design-system-components 7.1.0 → 7.2.1

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 (156) hide show
  1. package/dist/cjs/{index-de783b23.js → index-49177437.js} +269 -222
  2. package/dist/cjs/index.cjs.js +16 -16
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{package-dacf5ec2.js → package-198f981b.js} +1 -1
  5. package/dist/cjs/{post-accordion-225de951.js → post-accordion-f81a31b2.js} +2 -2
  6. package/dist/cjs/{post-accordion-item-935e122a.js → post-accordion-item-994583fc.js} +2 -2
  7. package/dist/cjs/post-accordion-item.cjs.entry.js +3 -3
  8. package/dist/cjs/post-accordion.cjs.entry.js +3 -3
  9. package/dist/cjs/{post-alert-6041a34c.js → post-alert-b160762a.js} +3 -3
  10. package/dist/cjs/post-alert.cjs.entry.js +3 -3
  11. package/dist/cjs/{post-card-control-3c089d8e.js → post-card-control-5f309278.js} +5 -4
  12. package/dist/cjs/post-card-control.cjs.entry.js +3 -3
  13. package/dist/cjs/{post-collapsible-562268e9.js → post-collapsible-bf63b152.js} +4 -4
  14. package/dist/cjs/post-collapsible.cjs.entry.js +3 -3
  15. package/dist/cjs/post-components.cjs.js +3 -3
  16. package/dist/cjs/{post-icon-973d5c46.js → post-icon-e5af0dff.js} +2 -2
  17. package/dist/cjs/post-icon.cjs.entry.js +3 -3
  18. package/dist/cjs/{post-popover-b0844e71.js → post-popover-bb1cf2dc.js} +2 -2
  19. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  20. package/dist/cjs/{post-popovercontainer-5bb6a804.js → post-popovercontainer-814f2053.js} +31 -22
  21. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  22. package/dist/cjs/{post-rating-d2845096.js → post-rating-7e29df2c.js} +2 -2
  23. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  24. package/dist/cjs/post-tab-header-1d896a9b.js +32 -0
  25. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  26. package/dist/cjs/{post-tab-panel-25bd8c74.js → post-tab-panel-47481b1e.js} +2 -2
  27. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  28. package/dist/cjs/{post-tabs-4e4ee252.js → post-tabs-35d27649.js} +3 -3
  29. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  30. package/dist/cjs/{post-tag-cbc458ed.js → post-tag-27049429.js} +2 -2
  31. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  32. package/dist/cjs/{post-tooltip-805bc0c0.js → post-tooltip-95c1e078.js} +4 -4
  33. package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
  34. package/dist/collection/collection-manifest.json +1 -1
  35. package/dist/collection/components/post-alert/post-alert.js +1 -1
  36. package/dist/collection/components/post-card-control/post-card-control.js +3 -2
  37. package/dist/collection/components/post-collapsible/post-collapsible.js +3 -4
  38. package/dist/collection/components/post-popover/post-popover.js +1 -1
  39. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +1 -1
  40. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
  41. package/dist/collection/components/post-tabs/post-tabs.js +3 -1
  42. package/dist/collection/components/post-tooltip/post-tooltip.js +3 -3
  43. package/dist/components/package.js +1 -1
  44. package/dist/components/post-alert2.js +1 -1
  45. package/dist/components/post-card-control2.js +3 -2
  46. package/dist/components/post-collapsible2.js +2 -3
  47. package/dist/components/post-popovercontainer2.js +29 -20
  48. package/dist/components/post-tab-header2.js +1 -1
  49. package/dist/components/post-tabs2.js +1 -1
  50. package/dist/components/post-tooltip2.js +2 -2
  51. package/dist/docs.json +25 -8
  52. package/dist/esm/{index-cf1d5611.js → index-b40b8259.js} +269 -222
  53. package/dist/esm/index.js +16 -16
  54. package/dist/esm/loader.js +3 -3
  55. package/dist/esm/{package-a837c1ad.js → package-baed1bbc.js} +1 -1
  56. package/dist/esm/{post-accordion-fdd22c1d.js → post-accordion-63757789.js} +2 -2
  57. package/dist/esm/{post-accordion-item-336f568c.js → post-accordion-item-ff713ffa.js} +2 -2
  58. package/dist/esm/post-accordion-item.entry.js +3 -3
  59. package/dist/esm/post-accordion.entry.js +3 -3
  60. package/dist/esm/{post-alert-f48527d8.js → post-alert-90030a07.js} +3 -3
  61. package/dist/esm/post-alert.entry.js +3 -3
  62. package/dist/esm/{post-card-control-3e6a5855.js → post-card-control-a77d7957.js} +5 -4
  63. package/dist/esm/post-card-control.entry.js +3 -3
  64. package/dist/esm/{post-collapsible-486ab980.js → post-collapsible-2fd13f4e.js} +4 -4
  65. package/dist/esm/post-collapsible.entry.js +3 -3
  66. package/dist/esm/post-components.js +4 -4
  67. package/dist/esm/{post-icon-19fdfc4d.js → post-icon-725a0fba.js} +2 -2
  68. package/dist/esm/post-icon.entry.js +3 -3
  69. package/dist/esm/{post-popover-17164186.js → post-popover-23ed2cdf.js} +2 -2
  70. package/dist/esm/post-popover.entry.js +3 -3
  71. package/dist/esm/{post-popovercontainer-d19f9646.js → post-popovercontainer-f5625d65.js} +31 -22
  72. package/dist/esm/post-popovercontainer.entry.js +3 -3
  73. package/dist/esm/{post-rating-ea204778.js → post-rating-0bfc12ec.js} +2 -2
  74. package/dist/esm/post-rating.entry.js +3 -3
  75. package/dist/esm/post-tab-header-5be0820b.js +30 -0
  76. package/dist/esm/post-tab-header.entry.js +3 -3
  77. package/dist/esm/{post-tab-panel-e6999395.js → post-tab-panel-a2a06c2d.js} +2 -2
  78. package/dist/esm/post-tab-panel.entry.js +3 -3
  79. package/dist/esm/{post-tabs-524c699a.js → post-tabs-c1cf60cd.js} +3 -3
  80. package/dist/esm/post-tabs.entry.js +3 -3
  81. package/dist/esm/{post-tag-e2035a81.js → post-tag-1158169f.js} +2 -2
  82. package/dist/esm/post-tag.entry.js +3 -3
  83. package/dist/esm/{post-tooltip-e4fc9c0c.js → post-tooltip-966fde7a.js} +4 -4
  84. package/dist/esm/post-tooltip.entry.js +3 -3
  85. package/dist/post-components/index.esm.js +1 -1
  86. package/dist/post-components/p-09c9ec65.entry.js +1 -0
  87. package/dist/post-components/p-105f8fe5.entry.js +1 -0
  88. package/dist/post-components/p-11e13d7d.js +1 -0
  89. package/dist/post-components/p-1d351eda.js +2 -0
  90. package/dist/post-components/p-408e8d5c.entry.js +1 -0
  91. package/dist/post-components/{p-c85913ed.js → p-40cbd3a9.js} +3 -3
  92. package/dist/post-components/p-418e4351.entry.js +1 -0
  93. package/dist/post-components/{p-e929ddbc.js → p-41bd4480.js} +1 -1
  94. package/dist/post-components/{p-d2eb0f0b.js → p-4f16eac0.js} +1 -1
  95. package/dist/post-components/p-6fa5a17d.js +1 -0
  96. package/dist/post-components/p-803678de.entry.js +1 -0
  97. package/dist/post-components/p-8ba9721a.entry.js +1 -0
  98. package/dist/post-components/p-92636363.js +1 -0
  99. package/dist/post-components/p-9ac48e84.entry.js +1 -0
  100. package/dist/post-components/p-9c5b9e7c.entry.js +1 -0
  101. package/dist/post-components/{p-ed22dec0.js → p-9c842093.js} +1 -1
  102. package/dist/post-components/{p-2f4c40ee.js → p-b3a7e242.js} +1 -1
  103. package/dist/post-components/p-b5f6a7b5.entry.js +1 -0
  104. package/dist/post-components/p-b675a470.entry.js +1 -0
  105. package/dist/post-components/p-ba275788.entry.js +1 -0
  106. package/dist/post-components/p-c2906b17.js +1 -0
  107. package/dist/post-components/{p-4575a570.js → p-c3e6894d.js} +1 -1
  108. package/dist/post-components/{p-67df1075.js → p-cbca927d.js} +1 -1
  109. package/dist/post-components/p-ce4fff0a.js +1 -0
  110. package/dist/post-components/p-daf27e9c.entry.js +1 -0
  111. package/dist/post-components/{p-3b0988a1.js → p-f11cb5ab.js} +1 -1
  112. package/dist/post-components/p-f4b64493.entry.js +1 -0
  113. package/dist/post-components/p-f665b245.entry.js +1 -0
  114. package/dist/post-components/p-f80d0c5f.js +1 -0
  115. package/dist/post-components/p-fa1125d9.js +1 -0
  116. package/dist/post-components/post-components.esm.js +1 -1
  117. package/dist/types/components/post-collapsible/post-collapsible.d.ts +1 -1
  118. package/dist/types/components/post-tabs/post-tabs.d.ts +2 -0
  119. package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -1
  120. package/dist/types/stencil-public-runtime.d.ts +3 -10
  121. package/loader/cdn.js +1 -3
  122. package/loader/index.cjs.js +1 -3
  123. package/loader/index.d.ts +3 -0
  124. package/loader/index.es2017.js +1 -3
  125. package/loader/index.js +1 -3
  126. package/package.json +11 -11
  127. package/dist/cjs/post-tab-header-6496a51b.js +0 -32
  128. package/dist/collection/index.spec.js +0 -27
  129. package/dist/esm/polyfills/core-js.js +0 -11
  130. package/dist/esm/polyfills/dom.js +0 -79
  131. package/dist/esm/polyfills/es5-html-element.js +0 -1
  132. package/dist/esm/polyfills/index.js +0 -34
  133. package/dist/esm/polyfills/system.js +0 -6
  134. package/dist/esm/post-tab-header-a97cdef2.js +0 -30
  135. package/dist/post-components/p-07cc4853.entry.js +0 -1
  136. package/dist/post-components/p-0e410cec.entry.js +0 -1
  137. package/dist/post-components/p-14e22434.entry.js +0 -1
  138. package/dist/post-components/p-18a2ef27.js +0 -1
  139. package/dist/post-components/p-18b571e3.js +0 -2
  140. package/dist/post-components/p-39a1dcb8.entry.js +0 -1
  141. package/dist/post-components/p-3ee18d14.entry.js +0 -1
  142. package/dist/post-components/p-59da0b80.js +0 -1
  143. package/dist/post-components/p-63277771.entry.js +0 -1
  144. package/dist/post-components/p-74db9b35.entry.js +0 -1
  145. package/dist/post-components/p-7bb79254.entry.js +0 -1
  146. package/dist/post-components/p-8398de7b.entry.js +0 -1
  147. package/dist/post-components/p-9a59f2c7.js +0 -1
  148. package/dist/post-components/p-c4a7208a.js +0 -1
  149. package/dist/post-components/p-caaa5b4c.entry.js +0 -1
  150. package/dist/post-components/p-cf10d355.js +0 -1
  151. package/dist/post-components/p-d1f516dd.js +0 -1
  152. package/dist/post-components/p-d70f33cd.js +0 -1
  153. package/dist/post-components/p-da049db2.entry.js +0 -1
  154. package/dist/post-components/p-db114d1d.entry.js +0 -1
  155. package/dist/post-components/p-ebb54756.entry.js +0 -1
  156. package/dist/post-components/p-f5d8f3fe.entry.js +0 -1
@@ -0,0 +1 @@
1
+ const o="7.2.1";export{o as v}
@@ -0,0 +1 @@
1
+ export{P as post_accordion}from"./p-9c842093.js";import"./p-1d351eda.js";import"./p-ce4fff0a.js";import"./p-247a1668.js";import"./p-611b3c41.js";
@@ -1 +1 @@
1
- import{r as e,h as o,H as t,g as i}from"./p-18b571e3.js";import{v as s}from"./p-cf10d355.js";import{g as r}from"./p-6adeaa6c.js";let n=0;const a="data-popover-target",c=e=>{const o=e.target;if(!o||!("getAttribute"in o))return;const t=o.getAttribute(a);if(!t||"key"in e&&"Enter"!==e.key)return;const i=document.getElementById(t);null==i||i.toggle(o)},l=r(a,(e=>{const o=e.hasAttribute(a);e.setAttribute("aria-expanded",o?"false":null)})),d=class{constructor(o){e(this,o),this.placement="top",this.closeButtonCaption=void 0,this.arrow=!0,this.localBeforeToggleHandler=this.beforeToggleHandler.bind(this)}connectedCallback(){0===n&&(window.addEventListener("pointerup",c),window.addEventListener("keydown",c),l.observe(document.body,{subtree:!0,childList:!0,attributeFilter:[a]})),n++,this.triggers.forEach((e=>e.setAttribute("aria-expanded","false")))}componentDidLoad(){this.popoverRef.addEventListener("beforetoggle",this.localBeforeToggleHandler)}disconnectedCallback(){n--,0===n&&(window.removeEventListener("click",c),window.removeEventListener("keydown",c),l.disconnect()),this.popoverRef.removeEventListener("beforetoggle",this.localBeforeToggleHandler),this.triggers.forEach((e=>e.removeAttribute("aria-expanded")))}async show(e){this.popoverRef.show(e),e.setAttribute("aria-expanded","true")}async hide(){this.popoverRef.hide(),this.triggers.forEach((e=>e.setAttribute("aria-expanded","false")))}async toggle(e,o){const t=await this.popoverRef.toggle(e,o);this.triggers.forEach((e=>e.setAttribute("aria-expanded","false"))),e.setAttribute("aria-expanded",`${t}`)}get triggers(){return document.querySelectorAll(`[${a}="${this.host.id}"]`)}beforeToggleHandler(){this.triggers.forEach((e=>e.setAttribute("aria-expanded","false")))}render(){return o(t,{key:"97db4a92db81f3a84ca272af8f79981cf181024d","data-version":s},o("post-popovercontainer",{key:"291247845dc11572a5722aa949c1dfa74e521edd",arrow:this.arrow,placement:this.placement,ref:e=>this.popoverRef=e},o("div",{key:"92137bf8c92633c8578c89c7b0c8252b0b59e2fa",class:"popover-container"},o("div",{key:"06f79f59e90ca439b552380af0e151084adadf03",class:"popover-content"},o("slot",{key:"c37c742ac7cf24f9440ac3b862761fcd937f7658"})),o("button",{key:"0e6f316574720e0f901af56e0dbb99f86e36c5b4",class:"btn-close",onClick:()=>this.hide()},o("span",{key:"77c41e8e8df74649ce9ca21740c77e78336905e6",class:"visually-hidden"},this.closeButtonCaption)))))}get host(){return i(this)}};d.style="/*!\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}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em;flex-grow:1}";export{d as P}
1
+ import{r as e,h as o,H as t,g as i}from"./p-1d351eda.js";import{v as s}from"./p-ce4fff0a.js";import{g as r}from"./p-6adeaa6c.js";let n=0;const a="data-popover-target",c=e=>{const o=e.target;if(!o||!("getAttribute"in o))return;const t=o.getAttribute(a);if(!t||"key"in e&&"Enter"!==e.key)return;const i=document.getElementById(t);null==i||i.toggle(o)},l=r(a,(e=>{const o=e.hasAttribute(a);e.setAttribute("aria-expanded",o?"false":null)})),d=class{constructor(o){e(this,o),this.placement="top",this.closeButtonCaption=void 0,this.arrow=!0,this.localBeforeToggleHandler=this.beforeToggleHandler.bind(this)}connectedCallback(){0===n&&(window.addEventListener("pointerup",c),window.addEventListener("keydown",c),l.observe(document.body,{subtree:!0,childList:!0,attributeFilter:[a]})),n++,this.triggers.forEach((e=>e.setAttribute("aria-expanded","false")))}componentDidLoad(){this.popoverRef.addEventListener("beforetoggle",this.localBeforeToggleHandler)}disconnectedCallback(){n--,0===n&&(window.removeEventListener("click",c),window.removeEventListener("keydown",c),l.disconnect()),this.popoverRef.removeEventListener("beforetoggle",this.localBeforeToggleHandler),this.triggers.forEach((e=>e.removeAttribute("aria-expanded")))}async show(e){this.popoverRef.show(e),e.setAttribute("aria-expanded","true")}async hide(){this.popoverRef.hide(),this.triggers.forEach((e=>e.setAttribute("aria-expanded","false")))}async toggle(e,o){const t=await this.popoverRef.toggle(e,o);this.triggers.forEach((e=>e.setAttribute("aria-expanded","false"))),e.setAttribute("aria-expanded",`${t}`)}get triggers(){return document.querySelectorAll(`[${a}="${this.host.id}"]`)}beforeToggleHandler(){this.triggers.forEach((e=>e.setAttribute("aria-expanded","false")))}render(){return o(t,{key:"97db4a92db81f3a84ca272af8f79981cf181024d","data-version":s},o("post-popovercontainer",{key:"291247845dc11572a5722aa949c1dfa74e521edd",arrow:this.arrow,placement:this.placement,ref:e=>this.popoverRef=e},o("div",{key:"92137bf8c92633c8578c89c7b0c8252b0b59e2fa",class:"popover-container"},o("div",{key:"06f79f59e90ca439b552380af0e151084adadf03",class:"popover-content"},o("slot",{key:"c37c742ac7cf24f9440ac3b862761fcd937f7658"})),o("button",{key:"0e6f316574720e0f901af56e0dbb99f86e36c5b4",class:"btn-close",onClick:()=>this.hide()},o("span",{key:"77c41e8e8df74649ce9ca21740c77e78336905e6",class:"visually-hidden"},this.closeButtonCaption)))))}get host(){return i(this)}};d.style="/*!\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}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em;flex-grow:1}";export{d as P}
@@ -0,0 +1 @@
1
+ export{P as post_popover}from"./p-f11cb5ab.js";import"./p-1d351eda.js";import"./p-ce4fff0a.js";import"./p-6adeaa6c.js";
@@ -0,0 +1 @@
1
+ export{P as post_rating}from"./p-c3e6894d.js";import"./p-1d351eda.js";import"./p-ce4fff0a.js";
@@ -0,0 +1 @@
1
+ import{r as s,h as t,H as e,g as a}from"./p-1d351eda.js";import{v as o}from"./p-ce4fff0a.js";const r=class{constructor(t){s(this,t),this.panelId=void 0,this.name=void 0}componentWillLoad(){this.panelId=`panel-${this.host.id||crypto.randomUUID()}`}render(){return t(e,{key:"cd74acf8889af916b9b32b57b483bbd74d5a6e20","data-version":o,id:this.panelId,role:"tabpanel"},t("slot",{key:"9d2c3f42b1dd9214aeeee35efc1179372851af13"}))}get host(){return a(this)}};r.style=":host{display:none}";export{r as P}
@@ -0,0 +1 @@
1
+ import{r as a,c as r,h as t,H as o,g as s}from"./p-1d351eda.js";import{v as e}from"./p-ce4fff0a.js";import{f as b,a as c}from"./p-2737eaf5.js";const i=class{constructor(t){a(this,t),this.postChange=r(this,"postChange",7),this.isLoaded=!1,this.activePanel=void 0}get tabs(){return this.host.querySelectorAll("post-tab-header")}componentDidLoad(){this.moveMisplacedTabs(),this.enableTabs();const a=this.activePanel||this.tabs.item(0).panel;this.show(a),this.isLoaded=!0}async show(a){var r;if(a===(null===(r=this.activeTab)||void 0===r?void 0:r.panel))return;const t=this.activeTab,o=this.host.querySelector(`post-tab-header[panel=${a}]`);this.activateTab(o),this.showing&&(this.showing.effect.target.style.display="none",this.showing.finish()),!t||this.showing||this.hiding||this.hidePanel(t.panel),this.hiding&&await this.hiding.finished,this.showSelectedPanel(),this.showing&&await this.showing.finished,this.postChange.emit(this.activeTab.panel)}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((a=>{"tabs"!==a.getAttribute("slot")&&a.setAttribute("slot","tabs")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async a=>{if(await a.componentOnReady(),a.getAttribute("aria-controls"))return;const r=this.getPanel(a.panel);a.setAttribute("aria-controls",r.id),r.setAttribute("aria-labelledby",a.id),a.addEventListener("click",(()=>{this.show(a.panel)})),a.addEventListener("keydown",(r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),this.show(a.panel))})),a.addEventListener("keydown",(({key:r})=>{"ArrowRight"!==r&&"ArrowLeft"!==r||this.navigateTabs(a,r)}))})),this.activeTab&&!this.activeTab.isConnected&&this.show(this.tabs.item(0).panel))}activateTab(a){this.activeTab&&(this.activeTab.setAttribute("aria-selected","false"),this.activeTab.setAttribute("tabindex","-1"),this.activeTab.classList.remove("active")),a.setAttribute("aria-selected","true"),a.setAttribute("tabindex","0"),a.classList.add("active"),this.activeTab=a}hidePanel(a){const r=this.getPanel(a);r&&(this.hiding=b(r),this.hiding.onfinish=()=>{r.style.display="none",this.hiding=null})}showSelectedPanel(){const a=this.getPanel(this.activeTab.panel);a.style.display="block",this.isLoaded&&(this.showing=c(a),this.showing.onfinish=()=>{this.showing=null})}getPanel(a){return this.host.querySelector(`post-tab-panel[name=${a}]`)}navigateTabs(a,r){const t=Array.from(this.tabs).indexOf(a);let o;o="ArrowRight"===r?this.tabs[t+1]||this.tabs[0]:this.tabs[t-1]||this.tabs[this.tabs.length-1],o&&o.focus()}render(){return t(o,{key:"f7aabebf0645b5d9db9028a0b1807e49d6f4e994","data-version":e},t("div",{key:"b62f738a4df453f9acf94825f2d1626dc40c4eb1",class:"tabs-wrapper",part:"tabs"},t("div",{key:"a9bd32fc939cfdff73d2c48982551cceedb5bd2a",class:"tabs",role:"tablist"},t("slot",{key:"4a8c2bc4815debd4d6951acbce224d3f1fd6b169",name:"tabs",onSlotchange:()=>this.enableTabs()}))),t("div",{key:"c7b2543a1decdc2bfe7a683b7bd193586485d012",class:"tab-content",part:"content"},t("slot",{key:"af19b3e89f8ca0cecf59f4426e4b5d3ac4efbc75",onSlotchange:()=>this.moveMisplacedTabs()})))}get host(){return s(this)}};i.style='.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 0.02)}.tabs-wrapper::after{content:"";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{margin:0;padding:0;list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-white .tabs-wrapper{background-color:#fff}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-black .tabs-wrapper{background-color:#000}.bg-primary .tabs-wrapper{background-color:#333}.bg-secondary .tabs-wrapper{background-color:#666}.bg-success .tabs-wrapper{background-color:#2c871d}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-error .tabs-wrapper{background-color:#a51728}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}.bg-error-background .tabs-wrapper{background-color:#ffdade}.bg-nightblue .tabs-wrapper{background-color:#004976}.bg-nightblue-bright .tabs-wrapper{background-color:#0076a8}.bg-petrol .tabs-wrapper{background-color:#006d68}.bg-petrol-bright .tabs-wrapper{background-color:#00968f}.bg-coral .tabs-wrapper{background-color:#9e2a2f}.bg-coral-bright .tabs-wrapper{background-color:#e03c31}.bg-olive .tabs-wrapper{background-color:#716135}.bg-olive-bright .tabs-wrapper{background-color:#aa9d2e}.bg-purple .tabs-wrapper{background-color:#80276c}.bg-purple-bright .tabs-wrapper{background-color:#c5299b}.bg-aubergine .tabs-wrapper{background-color:#523178}.bg-aubergine-bright .tabs-wrapper{background-color:#7566a0}:host{display:block}';export{i as P}
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-18b571e3.js";export{s as setNonce}from"./p-18b571e3.js";import{g as l}from"./p-e1255160.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-07cc4853",[[1,"post-accordion-item",{collapsed:[4],headingLevel:[2,"heading-level"],id:[32],isOpen:[32],toggle:[64]},[[0,"postToggle","onCollapseToggle"]],{headingLevel:["validateHeadingLevel"]}]]],["p-63277771",[[1,"post-alert",{dismissible:[4],dismissLabel:[1,"dismiss-label"],fixed:[4],icon:[1],type:[1],alertId:[32],classes:[32],hasActions:[32],hasHeading:[32],onDismissButtonClick:[32],dismiss:[64]},null,{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],fixed:["validateFixed"],icon:["validateIcon"],type:["validateType"]}]]],["p-39a1dcb8",[[65,"post-card-control",{label:[1],description:[1],type:[1],name:[1],value:[1],checked:[1028],disabled:[1028],validity:[1025],icon:[1],focused:[32],reset:[64],groupReset:[64]},null,{label:["validateControlLabel"],type:["validateControlType"],checked:["updateControlChecked"],disabled:["updateControlDisbled"]}]]],["p-14e22434",[[1,"post-popovercontainer",{placement:[1],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-f5d8f3fe",[[1,"post-popover",{placement:[1],closeButtonCaption:[1,"close-button-caption"],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-7bb79254",[[1,"post-icon",{animation:[1],base:[1],flipH:[4,"flip-h"],flipV:[4,"flip-v"],name:[1],rotate:[2],scale:[2],svgStyles:[32],svgOutput:[32]},null,{animation:["validateAnimation"],base:["validateBase"],flipH:["validateFlipH"],flipV:["validateFlipV"],name:["validateName"],rotate:["validateRotate"],scale:["validateScale"]}]]],["p-0e410cec",[[1,"post-rating",{label:[1],stars:[2],currentRating:[1026,"current-rating"],readonly:[4],hoveredIndex:[32]}]]],["p-ebb54756",[[1,"post-tag",{variant:[1],size:[1],icon:[1],classes:[32]},null,{variant:["variantChanged"],size:["sizeChanged"]}]]],["p-3ee18d14",[[1,"post-tooltip",{placement:[1],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-db114d1d",[[1,"post-accordion",{headingLevel:[2,"heading-level"],multiple:[4],toggle:[64],expandAll:[64],collapseAll:[64]},[[0,"postToggle","collapseToggleHandler"]],{headingLevel:["validateHeadingLevel"]}]]],["p-8398de7b",[[1,"post-tab-header",{panel:[1],tabId:[32]},null,{panel:["validateFor"]}]]],["p-caaa5b4c",[[1,"post-tab-panel",{name:[1],panelId:[32]}]]],["p-74db9b35",[[1,"post-tabs",{activePanel:[1,"active-panel"],show:[64]}]]],["p-da049db2",[[1,"post-collapsible",{collapsed:[4],id:[32],isOpen:[32],toggle:[64]},null,{collapsed:["validateCollapsed"]}]]]],e))));
1
+ import{p as e,b as a}from"./p-1d351eda.js";export{s as setNonce}from"./p-1d351eda.js";import{g as l}from"./p-e1255160.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-ba275788",[[1,"post-accordion-item",{collapsed:[4],headingLevel:[2,"heading-level"],id:[32],isOpen:[32],toggle:[64]},[[0,"postToggle","onCollapseToggle"]],{headingLevel:["validateHeadingLevel"]}]]],["p-b5f6a7b5",[[1,"post-alert",{dismissible:[4],dismissLabel:[1,"dismiss-label"],fixed:[4],icon:[1],type:[1],alertId:[32],classes:[32],hasActions:[32],hasHeading:[32],onDismissButtonClick:[32],dismiss:[64]},null,{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],fixed:["validateFixed"],icon:["validateIcon"],type:["validateType"]}]]],["p-418e4351",[[65,"post-card-control",{label:[1],description:[1],type:[1],name:[1],value:[1],checked:[1028],disabled:[1028],validity:[1025],icon:[1],focused:[32],reset:[64],groupReset:[64]},null,{label:["validateControlLabel"],type:["validateControlType"],checked:["updateControlChecked"],disabled:["updateControlDisbled"]}]]],["p-b675a470",[[1,"post-popovercontainer",{placement:[1],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-f4b64493",[[1,"post-popover",{placement:[1],closeButtonCaption:[1,"close-button-caption"],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-9ac48e84",[[1,"post-icon",{animation:[1],base:[1],flipH:[4,"flip-h"],flipV:[4,"flip-v"],name:[1],rotate:[2],scale:[2],svgStyles:[32],svgOutput:[32]},null,{animation:["validateAnimation"],base:["validateBase"],flipH:["validateFlipH"],flipV:["validateFlipV"],name:["validateName"],rotate:["validateRotate"],scale:["validateScale"]}]]],["p-f665b245",[[1,"post-rating",{label:[1],stars:[2],currentRating:[1026,"current-rating"],readonly:[4],hoveredIndex:[32]}]]],["p-803678de",[[1,"post-tag",{variant:[1],size:[1],icon:[1],classes:[32]},null,{variant:["variantChanged"],size:["sizeChanged"]}]]],["p-105f8fe5",[[1,"post-tooltip",{placement:[1],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-daf27e9c",[[1,"post-accordion",{headingLevel:[2,"heading-level"],multiple:[4],toggle:[64],expandAll:[64],collapseAll:[64]},[[0,"postToggle","collapseToggleHandler"]],{headingLevel:["validateHeadingLevel"]}]]],["p-09c9ec65",[[1,"post-tab-header",{panel:[1],tabId:[32]},null,{panel:["validateFor"]}]]],["p-408e8d5c",[[1,"post-tab-panel",{name:[1],panelId:[32]}]]],["p-8ba9721a",[[1,"post-tabs",{activePanel:[1,"active-panel"],show:[64]}]]],["p-9c5b9e7c",[[1,"post-collapsible",{collapsed:[4],id:[32],toggle:[64]},null,{collapsed:["validateCollapsed"]}]]]],e))));
@@ -4,10 +4,10 @@ import { EventEmitter } from '../../stencil-public-runtime';
4
4
  */
5
5
  export declare class PostCollapsible {
6
6
  private isLoaded;
7
+ private isOpen;
7
8
  private collapsible;
8
9
  host: HTMLPostCollapsibleElement;
9
10
  id: string;
10
- isOpen: boolean;
11
11
  /**
12
12
  * If `true`, the element is initially collapsed otherwise it is displayed.
13
13
  */
@@ -2,6 +2,8 @@ import { EventEmitter } from '../../stencil-public-runtime';
2
2
  /**
3
3
  * @slot tabs - Slot for placing tab headers. Each tab header should be a <post-tab-header> element.
4
4
  * @slot default - Slot for placing tab panels. Each tab panel should be a <post-tab-panel> element.
5
+ * @part tabs - Add custom styles for the tab header container.
6
+ * @part content - Add custom styles for the tab panel container.
5
7
  */
6
8
  export declare class PostTabs {
7
9
  private activeTab;
@@ -13,7 +13,7 @@ export declare class PostTooltip {
13
13
  * Wheter or not to display a little pointer arrow
14
14
  */
15
15
  readonly arrow?: boolean;
16
- connectedCallback(): void;
16
+ componentDidLoad(): void;
17
17
  /**
18
18
  * Add interest event listeners, but only once, and start
19
19
  * the accessibility patcher
@@ -768,6 +768,7 @@ export declare namespace JSXBase {
768
768
  hrefLang?: string;
769
769
  hreflang?: string;
770
770
  media?: string;
771
+ ping?: string;
771
772
  rel?: string;
772
773
  target?: string;
773
774
  referrerPolicy?: ReferrerPolicy;
@@ -794,7 +795,6 @@ export declare namespace JSXBase {
794
795
  cite?: string;
795
796
  }
796
797
  interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
797
- autoFocus?: boolean;
798
798
  disabled?: boolean;
799
799
  form?: string;
800
800
  formAction?: string;
@@ -921,8 +921,6 @@ export declare namespace JSXBase {
921
921
  autocapitalize?: string;
922
922
  autoComplete?: string;
923
923
  autocomplete?: string;
924
- autoFocus?: boolean;
925
- autofocus?: boolean | string;
926
924
  capture?: string;
927
925
  checked?: boolean;
928
926
  crossOrigin?: string;
@@ -979,8 +977,6 @@ export declare namespace JSXBase {
979
977
  popoverTarget?: string;
980
978
  }
981
979
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
982
- autoFocus?: boolean;
983
- autofocus?: boolean | string;
984
980
  challenge?: string;
985
981
  disabled?: boolean;
986
982
  form?: string;
@@ -993,7 +989,6 @@ export declare namespace JSXBase {
993
989
  interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
994
990
  form?: string;
995
991
  htmlFor?: string;
996
- htmlfor?: string;
997
992
  }
998
993
  interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
999
994
  value?: string | string[] | number;
@@ -1104,7 +1099,6 @@ export declare namespace JSXBase {
1104
1099
  interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
1105
1100
  form?: string;
1106
1101
  htmlFor?: string;
1107
- htmlfor?: string;
1108
1102
  name?: string;
1109
1103
  }
1110
1104
  interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -1129,7 +1123,6 @@ export declare namespace JSXBase {
1129
1123
  type?: string;
1130
1124
  }
1131
1125
  interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
1132
- autoFocus?: boolean;
1133
1126
  disabled?: boolean;
1134
1127
  form?: string;
1135
1128
  multiple?: boolean;
@@ -1164,8 +1157,6 @@ export declare namespace JSXBase {
1164
1157
  interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
1165
1158
  autoComplete?: string;
1166
1159
  autocomplete?: string;
1167
- autoFocus?: boolean;
1168
- autofocus?: boolean | string;
1169
1160
  cols?: number;
1170
1161
  disabled?: boolean;
1171
1162
  form?: string;
@@ -1218,6 +1209,8 @@ export declare namespace JSXBase {
1218
1209
  interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
1219
1210
  innerHTML?: string;
1220
1211
  accessKey?: string;
1212
+ autoFocus?: boolean;
1213
+ autofocus?: boolean | string;
1221
1214
  class?: string | {
1222
1215
  [className: string]: boolean;
1223
1216
  };
package/loader/cdn.js CHANGED
@@ -1,3 +1 @@
1
-
2
- module.exports = require('../dist/cjs/loader.cjs.js');
3
- module.exports.applyPolyfills = function() { return Promise.resolve() };
1
+ module.exports = require('../dist/cjs/loader.cjs.js');
@@ -1,3 +1 @@
1
-
2
- module.exports = require('../dist/cjs/loader.cjs.js');
3
- module.exports.applyPolyfills = function() { return Promise.resolve() };
1
+ module.exports = require('../dist/cjs/loader.cjs.js');
package/loader/index.d.ts CHANGED
@@ -9,6 +9,9 @@ export interface CustomElementsDefineOptions {
9
9
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
10
  }
11
11
  export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
12
+ /**
13
+ * @deprecated
14
+ */
12
15
  export declare function applyPolyfills(): Promise<void>;
13
16
 
14
17
  /**
@@ -1,3 +1 @@
1
-
2
- export * from '../dist/esm/polyfills/index.js';
3
- export * from '../dist/esm/loader.js';
1
+ export * from '../dist/esm/loader.js';
package/loader/index.js CHANGED
@@ -1,4 +1,2 @@
1
-
2
1
  (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
- export * from '../dist/esm/polyfills/index.js';
4
- export * from '../dist/esm/loader.js';
2
+ export * from '../dist/esm/loader.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swisspost/design-system-components",
3
- "version": "7.1.0",
3
+ "version": "7.2.1",
4
4
  "description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.cjs.js",
@@ -23,34 +23,34 @@
23
23
  "linkDirectory": true
24
24
  },
25
25
  "dependencies": {
26
- "@floating-ui/dom": "1.6.5",
26
+ "@floating-ui/dom": "1.6.7",
27
27
  "@oddbird/popover-polyfill": "0.3.7",
28
- "@swisspost/design-system-styles": "7.1.0",
28
+ "@swisspost/design-system-styles": "7.2.1",
29
29
  "ally.js": "1.4.1",
30
30
  "long-press-event": "2.5.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@percy/cli": "1.28.6",
33
+ "@percy/cli": "1.28.8",
34
34
  "@percy/cypress": "3.1.2",
35
35
  "@stencil-community/eslint-plugin": "0.7.2",
36
36
  "@stencil/angular-output-target": "0.8.4",
37
- "@stencil/core": "4.18.0",
37
+ "@stencil/core": "4.19.1",
38
38
  "@stencil/react-output-target": "0.5.3",
39
39
  "@stencil/sass": "3.0.12",
40
40
  "@types/jest": "29.5.12",
41
- "@types/node": "20.12.7",
41
+ "@types/node": "20.14.9",
42
42
  "@typescript-eslint/eslint-plugin": "5.62.0",
43
43
  "@typescript-eslint/parser": "5.62.0",
44
44
  "bootstrap": "5.3.3",
45
- "cypress": "13.9.0",
45
+ "cypress": "13.13.0",
46
46
  "cypress-axe": "1.5.0",
47
- "cypress-storybook": "0.5.1",
47
+ "cypress-storybook": "1.0.0",
48
48
  "eslint": "8.57.0",
49
- "eslint-plugin-react": "7.34.1",
49
+ "eslint-plugin-react": "7.34.3",
50
50
  "rimraf": "5.0.7",
51
51
  "rollup-plugin-postcss": "4.0.2",
52
- "sass": "1.77.1",
53
- "ts-jest": "29.1.2",
52
+ "sass": "1.77.6",
53
+ "ts-jest": "29.1.5",
54
54
  "typescript": "5.3.3"
55
55
  },
56
56
  "keywords": [
@@ -1,32 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-de783b23.js');
4
- const _package = require('./package-dacf5ec2.js');
5
- const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
6
-
7
- const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none;background-color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:var(--post-contrast-color-inverted);color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-secondary .tab-title{background-color:#666}.bg-secondary .tab-title.active{background-color:#666}.bg-secondary .nav-item{background-color:#666}.bg-success .tab-title{background-color:#2c871d}.bg-success .tab-title.active{background-color:#2c871d}.bg-success .nav-item{background-color:#2c871d}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-error .tab-title{background-color:#a51728}.bg-error .tab-title.active{background-color:#a51728}.bg-error .nav-item{background-color:#a51728}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-success-background .tab-title{background-color:#c0debb}.bg-success-background .tab-title.active{background-color:#c0debb}.bg-success-background .nav-item{background-color:#c0debb}.bg-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}.bg-error-background .tab-title{background-color:#ffdade}.bg-error-background .tab-title.active{background-color:#ffdade}.bg-error-background .nav-item{background-color:#ffdade}.bg-nightblue .tab-title{background-color:#004976}.bg-nightblue .tab-title.active{background-color:#004976}.bg-nightblue .nav-item{background-color:#004976}.bg-nightblue-bright .tab-title{background-color:#0076a8}.bg-nightblue-bright .tab-title.active{background-color:#0076a8}.bg-nightblue-bright .nav-item{background-color:#0076a8}.bg-petrol .tab-title{background-color:#006d68}.bg-petrol .tab-title.active{background-color:#006d68}.bg-petrol .nav-item{background-color:#006d68}.bg-petrol-bright .tab-title{background-color:#00968f}.bg-petrol-bright .tab-title.active{background-color:#00968f}.bg-petrol-bright .nav-item{background-color:#00968f}.bg-coral .tab-title{background-color:#9e2a2f}.bg-coral .tab-title.active{background-color:#9e2a2f}.bg-coral .nav-item{background-color:#9e2a2f}.bg-coral-bright .tab-title{background-color:#e03c31}.bg-coral-bright .tab-title.active{background-color:#e03c31}.bg-coral-bright .nav-item{background-color:#e03c31}.bg-olive .tab-title{background-color:#716135}.bg-olive .tab-title.active{background-color:#716135}.bg-olive .nav-item{background-color:#716135}.bg-olive-bright .tab-title{background-color:#aa9d2e}.bg-olive-bright .tab-title.active{background-color:#aa9d2e}.bg-olive-bright .nav-item{background-color:#aa9d2e}.bg-purple .tab-title{background-color:#80276c}.bg-purple .tab-title.active{background-color:#80276c}.bg-purple .nav-item{background-color:#80276c}.bg-purple-bright .tab-title{background-color:#c5299b}.bg-purple-bright .tab-title.active{background-color:#c5299b}.bg-purple-bright .nav-item{background-color:#c5299b}.bg-aubergine .tab-title{background-color:#523178}.bg-aubergine .tab-title.active{background-color:#523178}.bg-aubergine .nav-item{background-color:#523178}.bg-aubergine-bright .tab-title{background-color:#7566a0}.bg-aubergine-bright .tab-title.active{background-color:#7566a0}.bg-aubergine-bright .nav-item{background-color:#7566a0}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button}";
8
- const PostTabHeaderStyle0 = postTabHeaderCss;
9
-
10
- const PostTabHeader = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.tabId = undefined;
14
- this.panel = undefined;
15
- }
16
- validateFor(newValue) {
17
- checkNonEmpty.checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
18
- }
19
- componentWillLoad() {
20
- this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
21
- }
22
- render() {
23
- return (index.h(index.Host, { key: 'eb6ac6a67f4cbf571d38f1de1c8d428a9dea5a53', id: this.tabId, role: "tab", "data-version": _package.version, "aria-selected": "false", tabindex: "-1", class: "tab-title" }, index.h("slot", { key: 'd6559dbcc76ecc8d253fcd4a115b4bc4f78fd496' })));
24
- }
25
- get host() { return index.getElement(this); }
26
- static get watchers() { return {
27
- "panel": ["validateFor"]
28
- }; }
29
- };
30
- PostTabHeader.style = PostTabHeaderStyle0;
31
-
32
- exports.PostTabHeader = PostTabHeader;
@@ -1,27 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- const file = fs.readFileSync('./src/index.ts').toString();
4
- const componentExports = Array.from(file.matchAll(/\/(post-[a-z-]+)';$/gm)).map(m => m[1]);
5
- const componentDefinitions = getComponentDefinitions('./src/components');
6
- function getComponentDefinitions(dir, files = []) {
7
- const fileList = fs.readdirSync(dir);
8
- for (const file of fileList) {
9
- const filePath = `${dir}/${file}`;
10
- const parsed = path.parse(filePath);
11
- if (fs.statSync(filePath).isDirectory()) {
12
- getComponentDefinitions(filePath, files);
13
- }
14
- else if (parsed.ext === '.tsx') {
15
- files.push(parsed.name);
16
- }
17
- }
18
- return files;
19
- }
20
- describe('Index.js', () => {
21
- componentDefinitions.forEach(def => {
22
- const component = componentExports.find(exp => exp === def);
23
- it(`should export component "${def}"`, () => {
24
- expect(component).toBeDefined();
25
- });
26
- });
27
- });