@swisspost/design-system-components 7.4.10 → 7.4.11

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 (124) hide show
  1. package/dist/cjs/index.cjs.js +16 -16
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{package-e3ef1673.js → package-90a34c68.js} +1 -1
  4. package/dist/cjs/{post-accordion-99a00c01.js → post-accordion-523563dc.js} +1 -1
  5. package/dist/cjs/{post-accordion-item-7bd51084.js → post-accordion-item-63038f3c.js} +1 -1
  6. package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
  7. package/dist/cjs/post-accordion.cjs.entry.js +2 -2
  8. package/dist/cjs/{post-alert-e513f465.js → post-alert-f2d60637.js} +1 -1
  9. package/dist/cjs/post-alert.cjs.entry.js +2 -2
  10. package/dist/cjs/{post-card-control-3fb7a7d3.js → post-card-control-d24df42e.js} +1 -1
  11. package/dist/cjs/post-card-control.cjs.entry.js +2 -2
  12. package/dist/cjs/{post-collapsible-314729b5.js → post-collapsible-1b667879.js} +1 -1
  13. package/dist/cjs/{post-collapsible-trigger-7dfe15e1.js → post-collapsible-trigger-84783a3c.js} +1 -1
  14. package/dist/cjs/post-collapsible-trigger.cjs.entry.js +2 -2
  15. package/dist/cjs/post-collapsible.cjs.entry.js +2 -2
  16. package/dist/cjs/post-components.cjs.js +1 -1
  17. package/dist/cjs/{post-icon-cb4bf1f6.js → post-icon-097ed746.js} +60 -41
  18. package/dist/cjs/post-icon.cjs.entry.js +2 -2
  19. package/dist/cjs/{post-popover-df5487d2.js → post-popover-c694dc71.js} +1 -1
  20. package/dist/cjs/post-popover.cjs.entry.js +2 -2
  21. package/dist/cjs/{post-popovercontainer-e7928cf8.js → post-popovercontainer-9528d26d.js} +1 -1
  22. package/dist/cjs/post-popovercontainer.cjs.entry.js +2 -2
  23. package/dist/cjs/{post-rating-6056638e.js → post-rating-654ad87a.js} +1 -1
  24. package/dist/cjs/post-rating.cjs.entry.js +2 -2
  25. package/dist/cjs/{post-tab-header-664b4d8b.js → post-tab-header-1da67676.js} +1 -1
  26. package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
  27. package/dist/cjs/{post-tab-panel-2348d23a.js → post-tab-panel-7b2bda81.js} +1 -1
  28. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  29. package/dist/cjs/{post-tabs-04f20575.js → post-tabs-90e0a8f3.js} +1 -1
  30. package/dist/cjs/post-tabs.cjs.entry.js +2 -2
  31. package/dist/cjs/{post-tag-0efcd7a2.js → post-tag-c1dbc1e3.js} +1 -1
  32. package/dist/cjs/post-tag.cjs.entry.js +2 -2
  33. package/dist/cjs/{post-tooltip-abc576e9.js → post-tooltip-876ba174.js} +1 -1
  34. package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
  35. package/dist/collection/components/post-icon/post-icon.js +59 -46
  36. package/dist/components/package.js +1 -1
  37. package/dist/components/post-icon2.js +60 -43
  38. package/dist/docs.json +1 -1
  39. package/dist/esm/index.js +16 -16
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/{package-79261567.js → package-9d6426d1.js} +1 -1
  42. package/dist/esm/{post-accordion-f34d67cf.js → post-accordion-e140a9d4.js} +1 -1
  43. package/dist/esm/{post-accordion-item-28850d05.js → post-accordion-item-03203ecd.js} +1 -1
  44. package/dist/esm/post-accordion-item.entry.js +2 -2
  45. package/dist/esm/post-accordion.entry.js +2 -2
  46. package/dist/esm/{post-alert-29814559.js → post-alert-a9791ef2.js} +1 -1
  47. package/dist/esm/post-alert.entry.js +2 -2
  48. package/dist/esm/{post-card-control-b22b8114.js → post-card-control-8ef31b10.js} +1 -1
  49. package/dist/esm/post-card-control.entry.js +2 -2
  50. package/dist/esm/{post-collapsible-56f08239.js → post-collapsible-fdeee1a8.js} +1 -1
  51. package/dist/esm/{post-collapsible-trigger-b7d0ece3.js → post-collapsible-trigger-bfa217db.js} +1 -1
  52. package/dist/esm/post-collapsible-trigger.entry.js +2 -2
  53. package/dist/esm/post-collapsible.entry.js +2 -2
  54. package/dist/esm/post-components.js +1 -1
  55. package/dist/esm/{post-icon-5d7a3ba9.js → post-icon-27bb7505.js} +60 -41
  56. package/dist/esm/post-icon.entry.js +2 -2
  57. package/dist/esm/{post-popover-dcffb2b0.js → post-popover-77691872.js} +1 -1
  58. package/dist/esm/post-popover.entry.js +2 -2
  59. package/dist/esm/{post-popovercontainer-f2230bfc.js → post-popovercontainer-e81c8c09.js} +1 -1
  60. package/dist/esm/post-popovercontainer.entry.js +2 -2
  61. package/dist/esm/{post-rating-9323ef6a.js → post-rating-23f986bf.js} +1 -1
  62. package/dist/esm/post-rating.entry.js +2 -2
  63. package/dist/esm/{post-tab-header-4527a6a0.js → post-tab-header-ee7a4c4a.js} +1 -1
  64. package/dist/esm/post-tab-header.entry.js +2 -2
  65. package/dist/esm/{post-tab-panel-2c3785fc.js → post-tab-panel-e4514e2c.js} +1 -1
  66. package/dist/esm/post-tab-panel.entry.js +2 -2
  67. package/dist/esm/{post-tabs-a77d768a.js → post-tabs-e7b19b56.js} +1 -1
  68. package/dist/esm/post-tabs.entry.js +2 -2
  69. package/dist/esm/{post-tag-2314a9cd.js → post-tag-83a1f5cd.js} +1 -1
  70. package/dist/esm/post-tag.entry.js +2 -2
  71. package/dist/esm/{post-tooltip-3df5878c.js → post-tooltip-f5942d2f.js} +1 -1
  72. package/dist/esm/post-tooltip.entry.js +2 -2
  73. package/dist/post-components/index.esm.js +1 -1
  74. package/dist/post-components/{p-9c7ac02c.js → p-064c1b18.js} +1 -1
  75. package/dist/post-components/{p-b5e3b27e.js → p-1357ab17.js} +1 -1
  76. package/dist/post-components/{p-96dd256e.js → p-1708b957.js} +1 -1
  77. package/dist/post-components/p-1c5ff741.entry.js +1 -0
  78. package/dist/post-components/{p-1ac427d7.js → p-1e34ed6d.js} +1 -1
  79. package/dist/post-components/p-2b4470d0.entry.js +1 -0
  80. package/dist/post-components/p-2f1db3fb.entry.js +1 -0
  81. package/dist/post-components/p-3704b194.entry.js +1 -0
  82. package/dist/post-components/{p-3ca6e3f8.js → p-38fb68da.js} +1 -1
  83. package/dist/post-components/{p-f8201b09.js → p-394d183e.js} +1 -1
  84. package/dist/post-components/p-4cfba627.entry.js +1 -0
  85. package/dist/post-components/p-57d4644a.entry.js +1 -0
  86. package/dist/post-components/p-5d28247f.entry.js +1 -0
  87. package/dist/post-components/{p-43d269f5.js → p-70c91301.js} +1 -1
  88. package/dist/post-components/p-72f708f1.js +1 -0
  89. package/dist/post-components/{p-537266ee.js → p-82e57348.js} +1 -1
  90. package/dist/post-components/p-93d1dc90.js +1 -0
  91. package/dist/post-components/{p-a8f9e9ae.js → p-9605c5f4.js} +1 -1
  92. package/dist/post-components/p-9a99eb2e.entry.js +1 -0
  93. package/dist/post-components/p-a1c87a90.entry.js +1 -0
  94. package/dist/post-components/p-a598cd4c.entry.js +1 -0
  95. package/dist/post-components/p-a61dd5b4.entry.js +1 -0
  96. package/dist/post-components/p-aaeb6f4f.entry.js +1 -0
  97. package/dist/post-components/{p-d6639fb5.js → p-b16601a9.js} +1 -1
  98. package/dist/post-components/{p-8518f0e6.js → p-b1fcc75c.js} +1 -1
  99. package/dist/post-components/p-bd174894.entry.js +1 -0
  100. package/dist/post-components/{p-5c383dd5.js → p-c0740b36.js} +1 -1
  101. package/dist/post-components/p-c0c02502.entry.js +1 -0
  102. package/dist/post-components/p-ca818834.entry.js +1 -0
  103. package/dist/post-components/{p-ad171101.js → p-e1d56ade.js} +1 -1
  104. package/dist/post-components/{p-60e8abb1.js → p-e6983d7b.js} +1 -1
  105. package/dist/post-components/post-components.esm.js +1 -1
  106. package/dist/types/components/post-icon/post-icon.d.ts +2 -5
  107. package/package.json +2 -2
  108. package/dist/post-components/p-00de1557.js +0 -1
  109. package/dist/post-components/p-316ffe46.js +0 -1
  110. package/dist/post-components/p-31b4bf40.entry.js +0 -1
  111. package/dist/post-components/p-42ffb478.entry.js +0 -1
  112. package/dist/post-components/p-43e2817b.entry.js +0 -1
  113. package/dist/post-components/p-63365290.entry.js +0 -1
  114. package/dist/post-components/p-70a93f32.entry.js +0 -1
  115. package/dist/post-components/p-9a74dc73.entry.js +0 -1
  116. package/dist/post-components/p-9ba0d70e.entry.js +0 -1
  117. package/dist/post-components/p-a4956698.entry.js +0 -1
  118. package/dist/post-components/p-a8dec74c.entry.js +0 -1
  119. package/dist/post-components/p-aa4bd00e.entry.js +0 -1
  120. package/dist/post-components/p-c067adcf.entry.js +0 -1
  121. package/dist/post-components/p-c2f67907.entry.js +0 -1
  122. package/dist/post-components/p-c7259dda.entry.js +0 -1
  123. package/dist/post-components/p-ccd7b0aa.entry.js +0 -1
  124. package/dist/post-components/p-f438d028.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as r,g as a}from"./p-8c7f0075.js";import{v as e}from"./p-00de1557.js";const o=class{constructor(i){t(this,i),this.postInput=s(this,"postInput",7),this.postChange=s(this,"postChange",7),this.hasChanged=!1,this.hoveredIndex=void 0,this.label="Rating",this.stars=5,this.currentRating=0,this.readonly=!1,this.keydownHandler=this.keydownHandler.bind(this),this.blurHandler=this.blurHandler.bind(this),this.hoverHandler=this.hoverHandler.bind(this)}update(t){this.readonly||t<0||t>this.stars||(this.currentRating=this.currentRating!==t?t:0,this.postInput.emit({value:this.currentRating}),this.hasChanged=!0)}keydownHandler(t){switch(t.key){case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.update(this.currentRating-1);break;case"ArrowUp":case"ArrowRight":t.preventDefault(),this.update(this.currentRating+1);break;case"Home":t.preventDefault(),this.update(0);break;case"End":t.preventDefault(),this.update(this.stars);break;case"Enter":case" ":this.blurHandler();break;default:return}}blurHandler(){this.hasChanged&&(this.postChange.emit({value:this.currentRating}),this.hasChanged=!1)}hoverHandler(t,s){this.readonly||("mouseenter"===s.type?this.hoveredIndex=t:"mouseleave"===s.type&&(this.hoveredIndex=void 0))}render(){return i(r,{key:"b175b250377f4bf9be92ad05fb14f7e4a8f7c12f","data-version":e},i("div",{key:"b12eb5ff191d5a4ac5270845f120360f61e0fce0",role:"slider",class:"rating",tabindex:"0","aria-label":this.label,"aria-valuemin":"0","aria-valuemax":this.stars,"aria-valuenow":this.currentRating,"aria-valuetext":`${this.currentRating} out of ${this.stars}`,"aria-readonly":this.readonly?"true":"false",onKeyDown:this.keydownHandler,onBlur:this.blurHandler},Array.from({length:this.stars}).map(((t,s)=>i("div",{key:`star-${t}`,"aria-hidden":"true",class:{star:!0,"before-hover":s<this.hoveredIndex,active:s<Math.round(this.currentRating),hover:s===this.hoveredIndex,"after-active":s>this.hoveredIndex&&s<this.currentRating},onClick:()=>this.update(s+1),onMouseEnter:t=>this.hoverHandler(s,t),onMouseLeave:t=>this.hoverHandler(s,t)},i("post-icon",{name:"2062",class:"stroke"}),i("post-icon",{name:"2574",class:"fill"}))))))}get host(){return a(this)}};o.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 */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -0.25rem;border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:2px;outline:2px solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}';export{o as P}
1
+ import{r as t,c as s,h as i,H as r,g as a}from"./p-8c7f0075.js";import{v as e}from"./p-93d1dc90.js";const o=class{constructor(i){t(this,i),this.postInput=s(this,"postInput",7),this.postChange=s(this,"postChange",7),this.hasChanged=!1,this.hoveredIndex=void 0,this.label="Rating",this.stars=5,this.currentRating=0,this.readonly=!1,this.keydownHandler=this.keydownHandler.bind(this),this.blurHandler=this.blurHandler.bind(this),this.hoverHandler=this.hoverHandler.bind(this)}update(t){this.readonly||t<0||t>this.stars||(this.currentRating=this.currentRating!==t?t:0,this.postInput.emit({value:this.currentRating}),this.hasChanged=!0)}keydownHandler(t){switch(t.key){case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.update(this.currentRating-1);break;case"ArrowUp":case"ArrowRight":t.preventDefault(),this.update(this.currentRating+1);break;case"Home":t.preventDefault(),this.update(0);break;case"End":t.preventDefault(),this.update(this.stars);break;case"Enter":case" ":this.blurHandler();break;default:return}}blurHandler(){this.hasChanged&&(this.postChange.emit({value:this.currentRating}),this.hasChanged=!1)}hoverHandler(t,s){this.readonly||("mouseenter"===s.type?this.hoveredIndex=t:"mouseleave"===s.type&&(this.hoveredIndex=void 0))}render(){return i(r,{key:"b175b250377f4bf9be92ad05fb14f7e4a8f7c12f","data-version":e},i("div",{key:"b12eb5ff191d5a4ac5270845f120360f61e0fce0",role:"slider",class:"rating",tabindex:"0","aria-label":this.label,"aria-valuemin":"0","aria-valuemax":this.stars,"aria-valuenow":this.currentRating,"aria-valuetext":`${this.currentRating} out of ${this.stars}`,"aria-readonly":this.readonly?"true":"false",onKeyDown:this.keydownHandler,onBlur:this.blurHandler},Array.from({length:this.stars}).map(((t,s)=>i("div",{key:`star-${t}`,"aria-hidden":"true",class:{star:!0,"before-hover":s<this.hoveredIndex,active:s<Math.round(this.currentRating),hover:s===this.hoveredIndex,"after-active":s>this.hoveredIndex&&s<this.currentRating},onClick:()=>this.update(s+1),onMouseEnter:t=>this.hoverHandler(s,t),onMouseLeave:t=>this.hoverHandler(s,t)},i("post-icon",{name:"2062",class:"stroke"}),i("post-icon",{name:"2574",class:"fill"}))))))}get host(){return a(this)}};o.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 */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -0.25rem;border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:2px;outline:2px solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}';export{o as P}
@@ -0,0 +1 @@
1
+ export{P as post_tag}from"./p-9605c5f4.js";import"./p-8c7f0075.js";import"./p-93d1dc90.js";
@@ -0,0 +1 @@
1
+ export{P as post_alert}from"./p-1357ab17.js";import"./p-8c7f0075.js";import"./p-93d1dc90.js";import"./p-2737eaf5.js";import"./p-ac500761.js";import"./p-440193f4.js";import"./p-611b3c41.js";import"./p-4a3f67ab.js";import"./p-b095519d.js";
@@ -0,0 +1 @@
1
+ export{P as post_collapsible_trigger}from"./p-b16601a9.js";import"./p-8c7f0075.js";import"./p-93d1dc90.js";import"./p-4a3f67ab.js";import"./p-b095519d.js";import"./p-440193f4.js";
@@ -1 +1 @@
1
- import{r as s,h as t,H as o,g as e}from"./p-8c7f0075.js";import{v as r}from"./p-00de1557.js";const a=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(o,{key:"2b7e8f1853df072796345126b60ed2b6315362a2","data-version":r,id:this.panelId,role:"tabpanel"},t("slot",{key:"77c2b1c1f7d141fd3f9b71c504cdd9a5ce61260b"}))}get host(){return e(this)}};a.style=":host{display:none}";export{a as P}
1
+ import{r as s,h as t,H as o,g as e}from"./p-8c7f0075.js";import{v as r}from"./p-93d1dc90.js";const a=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(o,{key:"2b7e8f1853df072796345126b60ed2b6315362a2","data-version":r,id:this.panelId,role:"tabpanel"},t("slot",{key:"77c2b1c1f7d141fd3f9b71c504cdd9a5ce61260b"}))}get host(){return e(this)}};a.style=":host{display:none}";export{a as P}
@@ -0,0 +1 @@
1
+ import{r as i,h as t,H as a,g as e}from"./p-8c7f0075.js";import{c as n,b as o}from"./p-ac500761.js";import{v as s}from"./p-93d1dc90.js";import{c as r}from"./p-b095519d.js";import{c as l}from"./p-4a3f67ab.js";const c=["cylon","cylon-vertical","spin","spin-reverse","fade","throb"],m=class{constructor(t){i(this,t),this.animation=null,this.base=null,this.flipH=!1,this.flipV=!1,this.name=void 0,this.rotate=null,this.scale=null}validateAnimation(i=this.animation){void 0!==i&&n(i,c,`The post-icon "animation" prop requires one of the following values: ${c.join(", ")}.`)}validateBase(i=this.base){o(i,"string",'The post-icon "base" prop should be a string.')}validateFlipH(i=this.flipH){o(i,"boolean",'The post-icon "flipH" prop should be a boolean.')}validateFlipV(i=this.flipV){o(i,"boolean",'The post-icon "flipV" prop should be a boolean.')}validateName(i=this.name){r(i,'The post-icon "name" prop is required!.'),l(i,"string",'The post-icon "name" prop should be a string.')}validateRotate(i=this.rotate){o(i,"number",'The post-icon "rotate" prop should be a number.')}validateScale(i=this.scale){o(i,"number",'The post-icon "scale" prop should be a number.')}getUrl(){var i,t,a,e,n,o,s;const r=[h(this.base,"both"),h(null===(i=document.head.querySelector('meta[name="design-system-settings"][data-post-icon-base]'))||void 0===i?void 0:i.getAttribute("data-post-icon-base"),"relative"),h(null===(t=document.querySelector("base[href]"))||void 0===t?void 0:t.getAttribute("href"),"both")],l=null!==(n=null===(e=null===(a=r.find((i=>i.definesDomain)))||void 0===a?void 0:a.url)||void 0===e?void 0:e.origin)&&void 0!==n?n:window.location.origin,c=null===(s=null===(o=r.find((i=>i.definesSlug)))||void 0===o?void 0:o.url)||void 0===s?void 0:s.pathname,m=`${this.name}.svg`;let p;return p=c?new URL(`${l}${c}/${m}`).toString():new URL(`https://unpkg.com/@swisspost/design-system-icons/public/post-icons/${m}`).toString(),p;function h(i,t){return{url:a(i),definesDomain:"relative"!==t&&e(i),definesSlug:"absolute"!==t&&function(i){const t=a(i);return Boolean(/^\/.+/.test(null==t?void 0:t.pathname))}(i)};function a(i){return i?e(i)?new URL(i):new URL(i,window.location.origin):null}function e(i){return!!i&&/^https?:\/\//.test(i)}}}getStyles(){const i=this.getUrl();return Object.entries({"-webkit-mask-image":`url(${i})`,"mask-image":`url('${i}')`,transform:(this.scale&&!isNaN(Number(this.scale))?"scale("+this.scale+")":"")+(this.rotate&&!isNaN(Number(this.rotate))?" rotate("+this.rotate+"deg)":"")}).filter((([i,t])=>null!==t)).reduce(((i,[t,a])=>Object.assign(i,{[t]:a})),{})}componentDidLoad(){this.validateBase(),this.validateName(),this.validateFlipH(),this.validateFlipV(),this.validateScale(),this.validateRotate(),this.validateAnimation()}render(){return t(a,{key:"a38838bcd99af618f660ec4ffef4e869cdab3995","data-version":s},t("span",{key:"24ae06bdb0aa65ddca7ac88fac9bb6bb5a12550a",style:this.getStyles()}))}get host(){return e(this)}static get watchers(){return{animation:["validateAnimation"],base:["validateBase"],flipH:["validateFlipH"],flipV:["validateFlipV"],name:["validateName"],rotate:["validateRotate"],scale:["validateScale"]}}};m.style=":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";export{m as P}