@swisspost/design-system-components 1.7.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{index-c07c0cdb.js → index-13695f3f.js} +55 -2
  3. package/dist/cjs/index-13695f3f.js.map +1 -0
  4. package/dist/cjs/index.cjs.js +12 -12
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/package-8152e25e.js +7 -0
  7. package/dist/cjs/package-8152e25e.js.map +1 -0
  8. package/dist/cjs/post-accordion-9877919c.js +88 -0
  9. package/dist/cjs/post-accordion-9877919c.js.map +1 -0
  10. package/dist/cjs/post-accordion-item.cjs.entry.js +55 -0
  11. package/dist/cjs/post-accordion-item.cjs.entry.js.map +1 -0
  12. package/dist/cjs/post-accordion.cjs.entry.js +3 -3
  13. package/dist/cjs/{post-alert-6d0b5e58.js → post-alert-d87e6132.js} +4 -4
  14. package/dist/cjs/{post-alert-6d0b5e58.js.map → post-alert-d87e6132.js.map} +1 -1
  15. package/dist/cjs/post-alert.cjs.entry.js +3 -3
  16. package/dist/cjs/post-collapsible-ef0561b4.js +84 -0
  17. package/dist/cjs/post-collapsible-ef0561b4.js.map +1 -0
  18. package/dist/cjs/post-collapsible.cjs.entry.js +3 -3
  19. package/dist/cjs/post-components.cjs.js +3 -3
  20. package/dist/cjs/post-components.cjs.js.map +1 -1
  21. package/dist/cjs/{post-icon-3dbb7728.js → post-icon-e9dcd643.js} +3 -3
  22. package/dist/cjs/{post-icon-3dbb7728.js.map → post-icon-e9dcd643.js.map} +1 -1
  23. package/dist/cjs/post-icon.cjs.entry.js +3 -3
  24. package/dist/cjs/{post-popover-ea22d235.js → post-popover-e114ebe7.js} +3 -3
  25. package/dist/cjs/{post-popover-ea22d235.js.map → post-popover-e114ebe7.js.map} +1 -1
  26. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  27. package/dist/cjs/{post-popovercontainer-42e4ab15.js → post-popovercontainer-20fb22ee.js} +3 -3
  28. package/dist/cjs/{post-popovercontainer-42e4ab15.js.map → post-popovercontainer-20fb22ee.js.map} +1 -1
  29. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  30. package/dist/cjs/{post-tab-header-09074905.js → post-tab-header-34c1cc21.js} +3 -3
  31. package/dist/cjs/{post-tab-header-09074905.js.map → post-tab-header-34c1cc21.js.map} +1 -1
  32. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  33. package/dist/cjs/{post-tab-panel-9547b9ac.js → post-tab-panel-95cf7092.js} +3 -3
  34. package/dist/cjs/{post-tab-panel-9547b9ac.js.map → post-tab-panel-95cf7092.js.map} +1 -1
  35. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  36. package/dist/cjs/{post-tabs-2ec2778e.js → post-tabs-dbe7c341.js} +3 -3
  37. package/dist/cjs/{post-tabs-2ec2778e.js.map → post-tabs-dbe7c341.js.map} +1 -1
  38. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  39. package/dist/cjs/{post-tooltip-c802c51f.js → post-tooltip-659af1e3.js} +9 -6
  40. package/dist/cjs/post-tooltip-659af1e3.js.map +1 -0
  41. package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
  42. package/dist/collection/animations/collapse.js +10 -5
  43. package/dist/collection/animations/collapse.js.map +1 -1
  44. package/dist/collection/collection-manifest.json +4 -3
  45. package/dist/collection/components/post-accordion/post-accordion.js +37 -36
  46. package/dist/collection/components/post-accordion/post-accordion.js.map +1 -1
  47. package/dist/collection/components/post-accordion-item/heading-levels.js.map +1 -0
  48. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -0
  49. package/dist/collection/components/post-accordion-item/post-accordion-item.js +142 -0
  50. package/dist/collection/components/post-accordion-item/post-accordion-item.js.map +1 -0
  51. package/dist/collection/components/post-alert/post-alert.css +1 -1
  52. package/dist/collection/components/post-alert/post-alert.js.map +1 -1
  53. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  54. package/dist/collection/components/post-collapsible/post-collapsible.js +7 -48
  55. package/dist/collection/components/post-collapsible/post-collapsible.js.map +1 -1
  56. package/dist/collection/components/post-popover/post-popover.js.map +1 -1
  57. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js.map +1 -1
  58. package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
  59. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  60. package/dist/collection/components/post-tooltip/post-tooltip.js +23 -2
  61. package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -1
  62. package/dist/collection/utils/property-checkers/check-non-empty.js.map +1 -1
  63. package/dist/collection/utils/property-checkers/check-type.js.map +1 -1
  64. package/dist/components/package.js +1 -1
  65. package/dist/components/post-accordion-item.d.ts +11 -0
  66. package/dist/components/post-accordion-item.js +82 -0
  67. package/dist/components/post-accordion-item.js.map +1 -0
  68. package/dist/components/post-accordion2.js +33 -32
  69. package/dist/components/post-accordion2.js.map +1 -1
  70. package/dist/components/post-alert2.js +1 -1
  71. package/dist/components/post-alert2.js.map +1 -1
  72. package/dist/components/post-collapsible2.js +16 -29
  73. package/dist/components/post-collapsible2.js.map +1 -1
  74. package/dist/components/post-tooltip2.js +7 -3
  75. package/dist/components/post-tooltip2.js.map +1 -1
  76. package/dist/docs.json +189 -72
  77. package/dist/esm/{index-35998e08.js → index-74cf5c9d.js} +55 -2
  78. package/dist/esm/index-74cf5c9d.js.map +1 -0
  79. package/dist/esm/index.js +12 -12
  80. package/dist/esm/loader.js +3 -3
  81. package/dist/esm/package-af0ef704.js +5 -0
  82. package/dist/esm/package-af0ef704.js.map +1 -0
  83. package/dist/esm/post-accordion-3b137073.js +86 -0
  84. package/dist/esm/post-accordion-3b137073.js.map +1 -0
  85. package/dist/esm/post-accordion-item.entry.js +51 -0
  86. package/dist/esm/post-accordion-item.entry.js.map +1 -0
  87. package/dist/esm/post-accordion.entry.js +3 -3
  88. package/dist/esm/{post-alert-7254a70f.js → post-alert-0dcc6ac7.js} +4 -4
  89. package/dist/esm/{post-alert-7254a70f.js.map → post-alert-0dcc6ac7.js.map} +1 -1
  90. package/dist/esm/post-alert.entry.js +3 -3
  91. package/dist/esm/post-collapsible-a418570f.js +82 -0
  92. package/dist/esm/post-collapsible-a418570f.js.map +1 -0
  93. package/dist/esm/post-collapsible.entry.js +3 -3
  94. package/dist/esm/post-components.js +4 -4
  95. package/dist/esm/post-components.js.map +1 -1
  96. package/dist/esm/{post-icon-e0bbf0f5.js → post-icon-302d1767.js} +3 -3
  97. package/dist/esm/{post-icon-e0bbf0f5.js.map → post-icon-302d1767.js.map} +1 -1
  98. package/dist/esm/post-icon.entry.js +3 -3
  99. package/dist/esm/{post-popover-25eb3f76.js → post-popover-5725afc7.js} +3 -3
  100. package/dist/esm/{post-popover-25eb3f76.js.map → post-popover-5725afc7.js.map} +1 -1
  101. package/dist/esm/post-popover.entry.js +3 -3
  102. package/dist/esm/{post-popovercontainer-54117eea.js → post-popovercontainer-1c050e83.js} +3 -3
  103. package/dist/esm/{post-popovercontainer-54117eea.js.map → post-popovercontainer-1c050e83.js.map} +1 -1
  104. package/dist/esm/post-popovercontainer.entry.js +3 -3
  105. package/dist/esm/{post-tab-header-1684b507.js → post-tab-header-ede9f078.js} +3 -3
  106. package/dist/esm/{post-tab-header-1684b507.js.map → post-tab-header-ede9f078.js.map} +1 -1
  107. package/dist/esm/post-tab-header.entry.js +3 -3
  108. package/dist/esm/{post-tab-panel-add26fe5.js → post-tab-panel-16796ee3.js} +3 -3
  109. package/dist/esm/{post-tab-panel-add26fe5.js.map → post-tab-panel-16796ee3.js.map} +1 -1
  110. package/dist/esm/post-tab-panel.entry.js +3 -3
  111. package/dist/esm/{post-tabs-d738e61f.js → post-tabs-16f99043.js} +3 -3
  112. package/dist/esm/{post-tabs-d738e61f.js.map → post-tabs-16f99043.js.map} +1 -1
  113. package/dist/esm/post-tabs.entry.js +3 -3
  114. package/dist/esm/{post-tooltip-57928808.js → post-tooltip-03a6d578.js} +9 -6
  115. package/dist/esm/post-tooltip-03a6d578.js.map +1 -0
  116. package/dist/esm/post-tooltip.entry.js +3 -3
  117. package/dist/post-components/index.esm.js +1 -1
  118. package/dist/post-components/p-06566f88.js +2 -0
  119. package/dist/post-components/p-06566f88.js.map +1 -0
  120. package/dist/post-components/{p-7d32dfb7.js → p-12a0f4b9.js} +2 -2
  121. package/dist/post-components/{p-7d32dfb7.js.map → p-12a0f4b9.js.map} +1 -1
  122. package/dist/post-components/{p-09892ad1.js → p-26dad3c3.js} +2 -2
  123. package/dist/post-components/p-299a3e41.entry.js +2 -0
  124. package/dist/post-components/p-3241987a.entry.js +2 -0
  125. package/dist/post-components/p-3fd14a00.js +2 -0
  126. package/dist/post-components/p-3fd14a00.js.map +1 -0
  127. package/dist/post-components/p-4b950d70.js +2 -0
  128. package/dist/post-components/p-503ac49b.entry.js +2 -0
  129. package/dist/post-components/{p-9bd5f824.js → p-6391f970.js} +2 -2
  130. package/dist/post-components/p-6d0226cd.entry.js +2 -0
  131. package/dist/post-components/p-775859cc.entry.js +2 -0
  132. package/dist/post-components/p-78589fac.entry.js +2 -0
  133. package/dist/post-components/p-78589fac.entry.js.map +1 -0
  134. package/dist/post-components/{p-f994dce8.js → p-803284de.js} +3 -3
  135. package/dist/post-components/{p-f994dce8.js.map → p-803284de.js.map} +1 -1
  136. package/dist/post-components/p-83cedb31.entry.js +2 -0
  137. package/dist/post-components/p-88481640.entry.js +2 -0
  138. package/dist/post-components/p-8f37921c.entry.js +2 -0
  139. package/dist/post-components/{p-6e3158e8.js → p-91236c61.js} +2 -2
  140. package/dist/post-components/{p-bd032124.js → p-91f2291a.js} +2 -2
  141. package/dist/post-components/{p-1f55663e.js → p-93ab273b.js} +2 -2
  142. package/dist/post-components/{p-81591ad0.js → p-b4f01350.js} +1 -1
  143. package/dist/post-components/p-b4f01350.js.map +1 -0
  144. package/dist/post-components/p-d96fbe33.entry.js +2 -0
  145. package/dist/post-components/p-de4704fc.js +2 -0
  146. package/dist/post-components/p-fe7650bc.entry.js +2 -0
  147. package/dist/post-components/post-components.esm.js +1 -1
  148. package/dist/post-components/post-components.esm.js.map +1 -1
  149. package/dist/types/components/post-accordion/post-accordion.d.ts +8 -8
  150. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +24 -0
  151. package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -10
  152. package/dist/types/components/post-tooltip/post-tooltip.d.ts +4 -0
  153. package/dist/types/components.d.ts +51 -18
  154. package/package.json +11 -3
  155. package/dist/cjs/index-c07c0cdb.js.map +0 -1
  156. package/dist/cjs/package-cd0e9960.js +0 -7
  157. package/dist/cjs/package-cd0e9960.js.map +0 -1
  158. package/dist/cjs/post-accordion-f2e00198.js +0 -87
  159. package/dist/cjs/post-accordion-f2e00198.js.map +0 -1
  160. package/dist/cjs/post-collapsible-0b8dce97.js +0 -93
  161. package/dist/cjs/post-collapsible-0b8dce97.js.map +0 -1
  162. package/dist/cjs/post-tooltip-c802c51f.js.map +0 -1
  163. package/dist/collection/components/post-collapsible/heading-levels.js.map +0 -1
  164. package/dist/esm/index-35998e08.js.map +0 -1
  165. package/dist/esm/package-337354c3.js +0 -5
  166. package/dist/esm/package-337354c3.js.map +0 -1
  167. package/dist/esm/post-accordion-c2013bb3.js +0 -85
  168. package/dist/esm/post-accordion-c2013bb3.js.map +0 -1
  169. package/dist/esm/post-collapsible-4464cc98.js +0 -91
  170. package/dist/esm/post-collapsible-4464cc98.js.map +0 -1
  171. package/dist/esm/post-tooltip-57928808.js.map +0 -1
  172. package/dist/post-components/p-05e85f2b.entry.js +0 -2
  173. package/dist/post-components/p-08abd53e.entry.js +0 -2
  174. package/dist/post-components/p-1e9ec4a9.entry.js +0 -2
  175. package/dist/post-components/p-30c60b6c.entry.js +0 -2
  176. package/dist/post-components/p-38d97f62.entry.js +0 -2
  177. package/dist/post-components/p-4c188911.entry.js +0 -2
  178. package/dist/post-components/p-568bb469.entry.js +0 -2
  179. package/dist/post-components/p-65c8bd5c.entry.js +0 -2
  180. package/dist/post-components/p-81591ad0.js.map +0 -1
  181. package/dist/post-components/p-b4b4f59a.js +0 -2
  182. package/dist/post-components/p-c5858d52.entry.js +0 -2
  183. package/dist/post-components/p-dbd07f20.js +0 -2
  184. package/dist/post-components/p-dbd07f20.js.map +0 -1
  185. package/dist/post-components/p-de493e36.js +0 -2
  186. package/dist/post-components/p-eaddd6cc.js +0 -2
  187. package/dist/post-components/p-eaddd6cc.js.map +0 -1
  188. package/dist/post-components/p-ed73d4c0.entry.js +0 -2
  189. /package/dist/collection/components/{post-collapsible → post-accordion-item}/heading-levels.js +0 -0
  190. /package/dist/post-components/{p-09892ad1.js.map → p-26dad3c3.js.map} +0 -0
  191. /package/dist/post-components/{p-05e85f2b.entry.js.map → p-299a3e41.entry.js.map} +0 -0
  192. /package/dist/post-components/{p-08abd53e.entry.js.map → p-3241987a.entry.js.map} +0 -0
  193. /package/dist/post-components/{p-b4b4f59a.js.map → p-4b950d70.js.map} +0 -0
  194. /package/dist/post-components/{p-1e9ec4a9.entry.js.map → p-503ac49b.entry.js.map} +0 -0
  195. /package/dist/post-components/{p-9bd5f824.js.map → p-6391f970.js.map} +0 -0
  196. /package/dist/post-components/{p-30c60b6c.entry.js.map → p-6d0226cd.entry.js.map} +0 -0
  197. /package/dist/post-components/{p-38d97f62.entry.js.map → p-775859cc.entry.js.map} +0 -0
  198. /package/dist/post-components/{p-4c188911.entry.js.map → p-83cedb31.entry.js.map} +0 -0
  199. /package/dist/post-components/{p-568bb469.entry.js.map → p-88481640.entry.js.map} +0 -0
  200. /package/dist/post-components/{p-65c8bd5c.entry.js.map → p-8f37921c.entry.js.map} +0 -0
  201. /package/dist/post-components/{p-6e3158e8.js.map → p-91236c61.js.map} +0 -0
  202. /package/dist/post-components/{p-bd032124.js.map → p-91f2291a.js.map} +0 -0
  203. /package/dist/post-components/{p-1f55663e.js.map → p-93ab273b.js.map} +0 -0
  204. /package/dist/post-components/{p-c5858d52.entry.js.map → p-d96fbe33.entry.js.map} +0 -0
  205. /package/dist/post-components/{p-de493e36.js.map → p-de4704fc.js.map} +0 -0
  206. /package/dist/post-components/{p-ed73d4c0.entry.js.map → p-fe7650bc.entry.js.map} +0 -0
  207. /package/dist/types/components/{post-collapsible → post-accordion-item}/heading-levels.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- export { P as post_popovercontainer } from './post-popovercontainer-54117eea.js';
2
- import './index-35998e08.js';
3
- import './package-337354c3.js';
1
+ export { P as post_popovercontainer } from './post-popovercontainer-1c050e83.js';
2
+ import './index-74cf5c9d.js';
3
+ import './package-af0ef704.js';
4
4
 
5
5
  //# sourceMappingURL=post-popovercontainer.entry.js.map
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-35998e08.js';
2
- import { v as version } from './package-337354c3.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-74cf5c9d.js';
2
+ import { v as version } from './package-af0ef704.js';
3
3
  import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
4
4
 
5
5
  const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;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}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:#fff;color:var(--post-contrast-color)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:#fff;color:var(--post-contrast-color);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:#fff;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-primary,.bg-black,.bg-success,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.bg-error-red) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-primary,.bg-black,.bg-success,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.bg-error-red) .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-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-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-success .tab-title{background-color:#2c911c}.bg-success .tab-title.active{background-color:#2c911c}.bg-success .nav-item{background-color:#2c911c}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-danger .tab-title{background-color:#a51728}.bg-danger .tab-title.active{background-color:#a51728}.bg-danger .nav-item{background-color:#a51728}.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}.bg-success-green .tab-title{background-color:#2c871d}.bg-success-green .tab-title.active{background-color:#2c871d}.bg-success-green .nav-item{background-color:#2c871d}.bg-error-red .tab-title{background-color:#a51728}.bg-error-red .tab-title.active{background-color:#a51728}.bg-error-red .nav-item{background-color:#a51728}.bg-warning-orange .tab-title{background-color:#f49e00}.bg-warning-orange .tab-title.active{background-color:#f49e00}.bg-warning-orange .nav-item{background-color:#f49e00}.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-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-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}[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 * 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;-webkit-appearance:button;appearance:button}";
@@ -28,4 +28,4 @@ PostTabHeader.style = postTabHeaderCss;
28
28
 
29
29
  export { PostTabHeader as P };
30
30
 
31
- //# sourceMappingURL=post-tab-header-1684b507.js.map
31
+ //# sourceMappingURL=post-tab-header-ede9f078.js.map
@@ -1 +1 @@
1
- {"file":"post-tab-header-1684b507.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,oiOAAoiO;;MCShjO,aAAa;;;;;;IAWxB,WAAW,CAAC,QAAyC;QACnD,aAAa,CAAC,QAAQ,EAAE,uDAAuD,CAAC,CAAC;KAClF;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;KAC3D;IAED,MAAM;QACJ,QACE,EAAC,IAAI,oBAAe,OAAO,IACzB,+BAAsB,OAAO,EAAC,KAAK,EAAC,WAAW,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,QAAQ,IACpG,eAAQ,CACD,CACJ,EACP;KACH;;;;;;;;;;","names":[],"sources":["src/components/post-tab-header/post-tab-header.scss?tag=post-tab-header&encapsulation=shadow","src/components/post-tab-header/post-tab-header.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tab-title';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n}\n\n.tab-title {\n @include post.reset-button;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkNonEmpty } from '../../utils';\n\n@Component({\n tag: 'post-tab-header',\n styleUrl: 'post-tab-header.scss',\n shadow: true,\n})\nexport class PostTabHeader {\n @Element() host: HTMLPostTabHeaderElement;\n\n @State() tabId: string;\n\n /**\n * The name of the panel controlled by the tab header.\n */\n @Prop() readonly panel: HTMLPostTabPanelElement['name'];\n\n @Watch('panel')\n validateFor(newValue: HTMLPostTabPanelElement['name']) {\n checkNonEmpty(newValue, 'The \"panel\" prop is required for the post-tab-header.');\n }\n\n componentWillLoad() {\n this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <button aria-selected=\"false\" class=\"tab-title\" id={this.tabId} role=\"tab\" tabindex=\"-1\" type=\"button\">\n <slot />\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"post-tab-header-ede9f078.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,oiOAAoiO;;MCShjO,aAAa;;;;;;IAWxB,WAAW,CAAC,QAAyC;QACnD,aAAa,CAAC,QAAQ,EAAE,uDAAuD,CAAC,CAAC;KAClF;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;KAC3D;IAED,MAAM;QACJ,QACE,EAAC,IAAI,oBAAe,OAAO,IACzB,+BAAsB,OAAO,EAAC,KAAK,EAAC,WAAW,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,QAAQ,IACpG,eAAQ,CACD,CACJ,EACP;KACH;;;;;;;;;;","names":[],"sources":["src/components/post-tab-header/post-tab-header.scss?tag=post-tab-header&encapsulation=shadow","src/components/post-tab-header/post-tab-header.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tab-title';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n}\n\n.tab-title {\n @include post.reset-button;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkNonEmpty } from '../../utils';\n\n@Component({\n tag: 'post-tab-header',\n styleUrl: 'post-tab-header.scss',\n shadow: true,\n})\nexport class PostTabHeader {\n @Element() host: HTMLPostTabHeaderElement;\n\n @State() tabId: string;\n\n /**\n * The name of the panel controlled by the tab header.\n */\n @Prop() readonly panel: HTMLPostTabPanelElement['name'];\n\n @Watch('panel')\n validateFor(newValue: HTMLPostTabPanelElement['name']) {\n checkNonEmpty(newValue, 'The \"panel\" prop is required for the post-tab-header.');\n }\n\n componentWillLoad() {\n this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <button aria-selected=\"false\" class=\"tab-title\" id={this.tabId} role=\"tab\" tabindex=\"-1\" type=\"button\">\n <slot />\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
- export { P as post_tab_header } from './post-tab-header-1684b507.js';
2
- import './index-35998e08.js';
3
- import './package-337354c3.js';
1
+ export { P as post_tab_header } from './post-tab-header-ede9f078.js';
2
+ import './index-74cf5c9d.js';
3
+ import './package-af0ef704.js';
4
4
  import './check-non-empty-58bd6b17.js';
5
5
  import './constants-8d548297.js';
6
6
 
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-35998e08.js';
2
- import { v as version } from './package-337354c3.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-74cf5c9d.js';
2
+ import { v as version } from './package-af0ef704.js';
3
3
 
4
4
  const postTabPanelCss = ":host{display:none}";
5
5
 
@@ -22,4 +22,4 @@ PostTabPanel.style = postTabPanelCss;
22
22
 
23
23
  export { PostTabPanel as P };
24
24
 
25
- //# sourceMappingURL=post-tab-panel-add26fe5.js.map
25
+ //# sourceMappingURL=post-tab-panel-16796ee3.js.map
@@ -1 +1 @@
1
- {"file":"post-tab-panel-add26fe5.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,qBAAqB;;MCQhC,YAAY;;;;;;IAUvB,iBAAiB;;QAEf,IAAI,CAAC,OAAO,GAAG,SAAS,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;KAC/D;IAED,MAAM;QACJ,QACE,EAAC,IAAI,oBAAe,OAAO,IACzB,WACE,KAAK,EAAC,UAAU,EAChB,EAAE,EAAE,IAAI,CAAC,OAAO,EAChB,IAAI,EAAC,UAAU,IAEf,eAAO,CACH,CACD,EACP;KACH;;;;;;;","names":[],"sources":["src/components/post-tab-panel/post-tab-panel.scss?tag=post-tab-panel&encapsulation=shadow","src/components/post-tab-panel/post-tab-panel.tsx"],"sourcesContent":[":host {\n display: none;\n}\n","import { Component, Element, h, Host, Prop, State } from '@stencil/core';\nimport { version } from '../../../package.json';\n\n@Component({\n tag: 'post-tab-panel',\n styleUrl: 'post-tab-panel.scss',\n shadow: true,\n})\nexport class PostTabPanel {\n @Element() host: HTMLPostTabPanelElement;\n\n @State() panelId: string;\n\n /**\n * The name of the panel, used to associate it with a tab header.\n */\n @Prop() readonly name: string;\n\n componentWillLoad() {\n // get the id set on the host element or use a random id by default\n this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <div\n class=\"tab-pane\"\n id={this.panelId}\n role=\"tabpanel\"\n >\n <slot/>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"post-tab-panel-16796ee3.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,qBAAqB;;MCQhC,YAAY;;;;;;IAUvB,iBAAiB;;QAEf,IAAI,CAAC,OAAO,GAAG,SAAS,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;KAC/D;IAED,MAAM;QACJ,QACE,EAAC,IAAI,oBAAe,OAAO,IACzB,WACE,KAAK,EAAC,UAAU,EAChB,EAAE,EAAE,IAAI,CAAC,OAAO,EAChB,IAAI,EAAC,UAAU,IAEf,eAAO,CACH,CACD,EACP;KACH;;;;;;;","names":[],"sources":["src/components/post-tab-panel/post-tab-panel.scss?tag=post-tab-panel&encapsulation=shadow","src/components/post-tab-panel/post-tab-panel.tsx"],"sourcesContent":[":host {\n display: none;\n}\n","import { Component, Element, h, Host, Prop, State } from '@stencil/core';\nimport { version } from '../../../package.json';\n\n@Component({\n tag: 'post-tab-panel',\n styleUrl: 'post-tab-panel.scss',\n shadow: true,\n})\nexport class PostTabPanel {\n @Element() host: HTMLPostTabPanelElement;\n\n @State() panelId: string;\n\n /**\n * The name of the panel, used to associate it with a tab header.\n */\n @Prop() readonly name: string;\n\n componentWillLoad() {\n // get the id set on the host element or use a random id by default\n this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <div\n class=\"tab-pane\"\n id={this.panelId}\n role=\"tabpanel\"\n >\n <slot/>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
- export { P as post_tab_panel } from './post-tab-panel-add26fe5.js';
2
- import './index-35998e08.js';
3
- import './package-337354c3.js';
1
+ export { P as post_tab_panel } from './post-tab-panel-16796ee3.js';
2
+ import './index-74cf5c9d.js';
3
+ import './package-af0ef704.js';
4
4
 
5
5
  //# sourceMappingURL=post-tab-panel.entry.js.map
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-35998e08.js';
2
- import { v as version } from './package-337354c3.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-74cf5c9d.js';
2
+ import { v as version } from './package-af0ef704.js';
3
3
  import { f as fadeOut, a as fadeIn } from './fade-7fd71785.js';
4
4
 
5
5
  const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:#faf9f8}.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{margin-block:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-primary .tabs-wrapper{background-color:#333}.bg-white .tabs-wrapper{background-color:#fff}.bg-black .tabs-wrapper{background-color:#000}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success .tabs-wrapper{background-color:#2c911c}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-danger .tabs-wrapper{background-color:#a51728}.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}.bg-success-green .tabs-wrapper{background-color:#2c871d}.bg-error-red .tabs-wrapper{background-color:#a51728}.bg-warning-orange .tabs-wrapper{background-color:#f49e00}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-error-background .tabs-wrapper{background-color:#ffdade}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}:host{display:block}";
@@ -148,4 +148,4 @@ PostTabs.style = postTabsCss;
148
148
 
149
149
  export { PostTabs as P };
150
150
 
151
- //# sourceMappingURL=post-tabs-d738e61f.js.map
151
+ //# sourceMappingURL=post-tabs-16f99043.js.map
@@ -1 +1 @@
1
- {"file":"post-tabs-d738e61f.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,soEAAsoE;;MCS7oE,QAAQ;;;;QAIX,aAAQ,GAAG,KAAK,CAAC;;;IAEzB,IAAY,IAAI;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;KACtD;IAkBD,gBAAgB;QACd,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,MAAM,oBAAoB,GAAG,I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CACvD,CACF,EACN,WAAK,KAAK,EAAC,aAAa,IACtB,YAAM,YAAY,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,GAAI,CAClD,CACD,EACP;KACH;;;;;;;","names":[],"sources":["src/components/post-tabs/post-tabs.scss?tag=post-tabs&encapsulation=shadow","src/components/post-tabs/post-tabs.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tabs-wrapper';\n\n:host {\n display: block;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeIn, fadeOut } from '../../animations';\n\n@Component({\n tag: 'post-tabs',\n styleUrl: 'post-tabs.scss',\n shadow: true,\n})\nexport class PostTabs {\n private activeTab: HTMLPostTabHeaderElement;\n private showing: Animation;\n private hiding: Animation;\n private isLoaded = false;\n\n private get tabs(): NodeListOf<HTMLPostTabHeaderElement> {\n return this.host.querySelectorAll('post-tab-header');\n }\n\n @Element() host: HTMLPostTabsElement;\n\n /**\n * The name of the panel that is initially shown.\n * If not specified, it defaults to the panel associated with the first tab.\n *\n * **Changing this value after initialization has no effect.**\n */\n @Prop() readonly activePanel: HTMLPostTabPanelElement['name'];\n\n /**\n * An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\n * The payload is the name of the newly shown panel.\n */\n @Event() tabChange: EventEmitter<HTMLPostTabPanelElement['name']>;\n\n componentDidLoad() {\n this.moveMisplacedTabs();\n this.enableTabs();\n\n const initiallyActivePanel = this.activePanel || this.tabs.item(0).panel;\n void this.show(initiallyActivePanel);\n\n this.isLoaded = true;\n }\n\n /**\n * Shows the panel with the given name and selects its associated tab.\n * Any other panel that was previously shown becomes hidden and its associated tab is unselected.\n */\n @Method()\n async show(panelName: string) {\n // do nothing if the tab is already active\n if (panelName === this.activeTab?.panel) {\n return;\n }\n\n const previousTab = this.activeTab;\n const newTab: HTMLPostTabHeaderElement = this.host.querySelector(\n `post-tab-header[panel=${panelName}]`,\n );\n this.activateTab(newTab);\n\n // if a panel is currently being displayed, remove it from the view and complete the associated animation\n if (this.showing) {\n this.showing.effect['target'].style.display = 'none';\n this.showing.finish();\n }\n\n // hide the currently visible panel only if no other animation is running\n if (previousTab && !this.showing && !this.hiding) {\n this.hidePanel(previousTab.panel);\n }\n\n // wait for any hiding animation to complete before showing the selected tab\n if (this.hiding) {\n await this.hiding.finished;\n }\n\n this.showSelectedPanel();\n\n // wait for any display animation to complete for the returned promise to fully resolve\n if (this.showing) {\n await this.showing.finished;\n }\n\n this.tabChange.emit(this.activeTab.panel);\n }\n\n private moveMisplacedTabs() {\n if (!this.tabs) return;\n\n this.tabs.forEach(tab => {\n if (tab.getAttribute('slot') === 'tabs') return;\n tab.setAttribute('slot', 'tabs');\n });\n }\n\n private enableTabs() {\n if (!this.tabs) return;\n\n this.tabs.forEach(async tab => {\n await tab.componentOnReady();\n\n const tabTitle = tab.shadowRoot.querySelector('.tab-title');\n\n // if the tab has an \"aria-controls\" attribute it was already linked to its panel: do nothing\n if (tabTitle.getAttribute('aria-controls')) return;\n\n const tabPanel = this.getPanel(tab.panel).shadowRoot.querySelector('.tab-pane');\n tabTitle.setAttribute('aria-controls', tabPanel.id);\n tabPanel.setAttribute('aria-labelledby', tabTitle.id);\n\n tab.addEventListener('click', () => {\n void this.show(tab.panel);\n });\n\n tab.addEventListener('keydown', ({ key }) => {\n if (key === 'ArrowRight' || key === 'ArrowLeft') this.navigateTabs(tab, key);\n });\n });\n\n // if the currently active tab was removed from the DOM then select the first one\n if (this.activeTab && !this.activeTab.isConnected) {\n void this.show(this.tabs.item(0).panel);\n }\n }\n\n private activateTab(tab: HTMLPostTabHeaderElement) {\n if (this.activeTab) {\n const tabTitle = this.activeTab.shadowRoot.querySelector('.tab-title');\n tabTitle.setAttribute('aria-selected', 'false');\n tabTitle.setAttribute('tabindex', '-1');\n tabTitle.classList.remove('active');\n }\n\n const tabTitle = tab.shadowRoot.querySelector('.tab-title');\n tabTitle.setAttribute('aria-selected', 'true');\n tabTitle.removeAttribute('tabindex');\n tabTitle.classList.add('active');\n\n this.activeTab = tab;\n }\n\n private hidePanel(panelName: HTMLPostTabPanelElement['name']) {\n const previousPanel = this.getPanel(panelName);\n\n if (!previousPanel) return;\n\n this.hiding = fadeOut(previousPanel);\n this.hiding.onfinish = () => {\n previousPanel.style.display = 'none';\n this.hiding = null;\n };\n }\n\n private showSelectedPanel() {\n const panel = this.getPanel(this.activeTab.panel);\n panel.style.display = 'block';\n\n // prevent the initially selected panel from fading in\n if (!this.isLoaded) return;\n\n this.showing = fadeIn(panel);\n this.showing.onfinish = () => {\n this.showing = null;\n };\n }\n\n private getPanel(name: string): HTMLPostTabPanelElement {\n return this.host.querySelector(`post-tab-panel[name=${name}]`);\n }\n\n private navigateTabs(tab: HTMLPostTabHeaderElement, key: 'ArrowRight' | 'ArrowLeft') {\n const activeTabIndex = Array.from(this.tabs).indexOf(tab);\n\n let nextTab: HTMLPostTabHeaderElement;\n if (key === 'ArrowRight') {\n nextTab = this.tabs[activeTabIndex + 1] || this.tabs[0];\n } else {\n nextTab = this.tabs[activeTabIndex - 1] || this.tabs[this.tabs.length - 1];\n }\n\n if (!nextTab) return;\n\n const nextTabTitle = nextTab.shadowRoot.querySelector('.tab-title') as HTMLAnchorElement;\n nextTabTitle.focus();\n }\n\n render() {\n return (\n <Host data-version={version}>\n <div class=\"tabs-wrapper\">\n <div class=\"tabs\" role=\"tablist\">\n <slot name=\"tabs\" onSlotchange={() => this.enableTabs()} />\n </div>\n </div>\n <div class=\"tab-content\">\n <slot onSlotchange={() => this.moveMisplacedTabs()} />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"post-tabs-16f99043.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,soEAAsoE;;MCS7oE,QAAQ;;;;QAIX,aAAQ,GAAG,KAAK,CAAC;;;IAEzB,IAAY,IAAI;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;KACtD;IA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AAM,EAAC,IAAI,EAAC,SAAS,IAC9B,YAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,GAAI,CACvD,CACF,EACN,WAAK,KAAK,EAAC,aAAa,IACtB,YAAM,YAAY,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,GAAI,CAClD,CACD,EACP;KACH;;;;;;;","names":[],"sources":["src/components/post-tabs/post-tabs.scss?tag=post-tabs&encapsulation=shadow","src/components/post-tabs/post-tabs.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tabs-wrapper';\n\n:host {\n display: block;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeIn, fadeOut } from '../../animations';\n\n@Component({\n tag: 'post-tabs',\n styleUrl: 'post-tabs.scss',\n shadow: true,\n})\nexport class PostTabs {\n private activeTab: HTMLPostTabHeaderElement;\n private showing: Animation;\n private hiding: Animation;\n private isLoaded = false;\n\n private get tabs(): NodeListOf<HTMLPostTabHeaderElement> {\n return this.host.querySelectorAll('post-tab-header');\n }\n\n @Element() host: HTMLPostTabsElement;\n\n /**\n * The name of the panel that is initially shown.\n * If not specified, it defaults to the panel associated with the first tab.\n *\n * **Changing this value after initialization has no effect.**\n */\n @Prop() readonly activePanel: HTMLPostTabPanelElement['name'];\n\n /**\n * An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\n * The payload is the name of the newly shown panel.\n */\n @Event() tabChange: EventEmitter<HTMLPostTabPanelElement['name']>;\n\n componentDidLoad() {\n this.moveMisplacedTabs();\n this.enableTabs();\n\n const initiallyActivePanel = this.activePanel || this.tabs.item(0).panel;\n void this.show(initiallyActivePanel);\n\n this.isLoaded = true;\n }\n\n /**\n * Shows the panel with the given name and selects its associated tab.\n * Any other panel that was previously shown becomes hidden and its associated tab is unselected.\n */\n @Method()\n async show(panelName: string) {\n // do nothing if the tab is already active\n if (panelName === this.activeTab?.panel) {\n return;\n }\n\n const previousTab = this.activeTab;\n const newTab: HTMLPostTabHeaderElement = this.host.querySelector(\n `post-tab-header[panel=${panelName}]`,\n );\n this.activateTab(newTab);\n\n // if a panel is currently being displayed, remove it from the view and complete the associated animation\n if (this.showing) {\n this.showing.effect['target'].style.display = 'none';\n this.showing.finish();\n }\n\n // hide the currently visible panel only if no other animation is running\n if (previousTab && !this.showing && !this.hiding) {\n this.hidePanel(previousTab.panel);\n }\n\n // wait for any hiding animation to complete before showing the selected tab\n if (this.hiding) {\n await this.hiding.finished;\n }\n\n this.showSelectedPanel();\n\n // wait for any display animation to complete for the returned promise to fully resolve\n if (this.showing) {\n await this.showing.finished;\n }\n\n this.tabChange.emit(this.activeTab.panel);\n }\n\n private moveMisplacedTabs() {\n if (!this.tabs) return;\n\n this.tabs.forEach(tab => {\n if (tab.getAttribute('slot') === 'tabs') return;\n tab.setAttribute('slot', 'tabs');\n });\n }\n\n private enableTabs() {\n if (!this.tabs) return;\n\n this.tabs.forEach(async tab => {\n await tab.componentOnReady();\n\n const tabTitle = tab.shadowRoot.querySelector('.tab-title');\n\n // if the tab has an \"aria-controls\" attribute it was already linked to its panel: do nothing\n if (tabTitle.getAttribute('aria-controls')) return;\n\n const tabPanel = this.getPanel(tab.panel).shadowRoot.querySelector('.tab-pane');\n tabTitle.setAttribute('aria-controls', tabPanel.id);\n tabPanel.setAttribute('aria-labelledby', tabTitle.id);\n\n tab.addEventListener('click', () => {\n void this.show(tab.panel);\n });\n\n tab.addEventListener('keydown', ({ key }) => {\n if (key === 'ArrowRight' || key === 'ArrowLeft') this.navigateTabs(tab, key);\n });\n });\n\n // if the currently active tab was removed from the DOM then select the first one\n if (this.activeTab && !this.activeTab.isConnected) {\n void this.show(this.tabs.item(0).panel);\n }\n }\n\n private activateTab(tab: HTMLPostTabHeaderElement) {\n if (this.activeTab) {\n const tabTitle = this.activeTab.shadowRoot.querySelector('.tab-title');\n tabTitle.setAttribute('aria-selected', 'false');\n tabTitle.setAttribute('tabindex', '-1');\n tabTitle.classList.remove('active');\n }\n\n const tabTitle = tab.shadowRoot.querySelector('.tab-title');\n tabTitle.setAttribute('aria-selected', 'true');\n tabTitle.removeAttribute('tabindex');\n tabTitle.classList.add('active');\n\n this.activeTab = tab;\n }\n\n private hidePanel(panelName: HTMLPostTabPanelElement['name']) {\n const previousPanel = this.getPanel(panelName);\n\n if (!previousPanel) return;\n\n this.hiding = fadeOut(previousPanel);\n this.hiding.onfinish = () => {\n previousPanel.style.display = 'none';\n this.hiding = null;\n };\n }\n\n private showSelectedPanel() {\n const panel = this.getPanel(this.activeTab.panel);\n panel.style.display = 'block';\n\n // prevent the initially selected panel from fading in\n if (!this.isLoaded) return;\n\n this.showing = fadeIn(panel);\n this.showing.onfinish = () => {\n this.showing = null;\n };\n }\n\n private getPanel(name: string): HTMLPostTabPanelElement {\n return this.host.querySelector(`post-tab-panel[name=${name}]`);\n }\n\n private navigateTabs(tab: HTMLPostTabHeaderElement, key: 'ArrowRight' | 'ArrowLeft') {\n const activeTabIndex = Array.from(this.tabs).indexOf(tab);\n\n let nextTab: HTMLPostTabHeaderElement;\n if (key === 'ArrowRight') {\n nextTab = this.tabs[activeTabIndex + 1] || this.tabs[0];\n } else {\n nextTab = this.tabs[activeTabIndex - 1] || this.tabs[this.tabs.length - 1];\n }\n\n if (!nextTab) return;\n\n const nextTabTitle = nextTab.shadowRoot.querySelector('.tab-title') as HTMLAnchorElement;\n nextTabTitle.focus();\n }\n\n render() {\n return (\n <Host data-version={version}>\n <div class=\"tabs-wrapper\">\n <div class=\"tabs\" role=\"tablist\">\n <slot name=\"tabs\" onSlotchange={() => this.enableTabs()} />\n </div>\n </div>\n <div class=\"tab-content\">\n <slot onSlotchange={() => this.moveMisplacedTabs()} />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
- export { P as post_tabs } from './post-tabs-d738e61f.js';
2
- import './index-35998e08.js';
3
- import './package-337354c3.js';
1
+ export { P as post_tabs } from './post-tabs-16f99043.js';
2
+ import './index-74cf5c9d.js';
3
+ import './package-af0ef704.js';
4
4
  import './fade-7fd71785.js';
5
5
 
6
6
  //# sourceMappingURL=post-tabs.entry.js.map
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-35998e08.js';
2
- import { v as version$2 } from './package-337354c3.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-74cf5c9d.js';
2
+ import { v as version$2 } from './package-af0ef704.js';
3
3
 
4
4
  // input may be undefined, selector-tring, Node, NodeList, HTMLCollection, array of Nodes
5
5
  // yes, to some extent this is a bad replica of jQuery's constructor function
@@ -3397,12 +3397,13 @@ var isFocusable = isFocusableRules.except({});
3397
3397
 
3398
3398
  }(window, document));
3399
3399
 
3400
- const postTooltipCss = ":host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51}post-popovercontainer::part(popover){padding:.25rem .5rem}";
3400
+ const postTooltipCss = ":host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51}post-popovercontainer::part(popover){padding:.25rem .5rem;max-width:13.5rem;min-height:1rem}";
3401
3401
 
3402
3402
  const PostTooltip = class {
3403
3403
  constructor(hostRef) {
3404
3404
  registerInstance(this, hostRef);
3405
3405
  this.placement = 'top';
3406
+ this.arrow = true;
3406
3407
  // Create local versions of event handlers for de-registration
3407
3408
  // https://stackoverflow.com/questions/33859113/javascript-removeeventlistener-not-working-inside-a-class
3408
3409
  this.localShowTooltip = e => this.show(e.target);
@@ -3410,7 +3411,9 @@ const PostTooltip = class {
3410
3411
  }
3411
3412
  connectedCallback() {
3412
3413
  if (!this.host.id) {
3413
- throw new Error('No id set: <post-tooltip> must have an id, linking it to it\'s target element using the data-tooltip-target attribute.');
3414
+ throw new Error(
3415
+ /*prettier-ignore*/
3416
+ 'No id set: <post-tooltip> must have an id, linking it to it\'s target element using the data-tooltip-target attribute.');
3414
3417
  }
3415
3418
  if (!this.triggers) {
3416
3419
  throw new Error(`No trigger found for <post-tooltip id="${this.host.id}">, please add the 'data-tooltip-target="${this.host.id}" attribute to the trigger element.`);
@@ -3478,7 +3481,7 @@ const PostTooltip = class {
3478
3481
  }
3479
3482
  }
3480
3483
  render() {
3481
- return (h(Host, { "data-version": version$2 }, h("post-popovercontainer", { role: "tooltip", tabindex: "-1", arrow: true, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", null))));
3484
+ return (h(Host, { "data-version": version$2 }, h("post-popovercontainer", { role: "tooltip", tabindex: "-1", arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", null))));
3482
3485
  }
3483
3486
  get host() { return getElement(this); }
3484
3487
  };
@@ -3486,4 +3489,4 @@ PostTooltip.style = postTooltipCss;
3486
3489
 
3487
3490
  export { PostTooltip as P };
3488
3491
 
3489
- //# sourceMappingURL=post-tooltip-57928808.js.map
3492
+ //# sourceMappingURL=post-tooltip-03a6d578.js.map