@swisspost/design-system-components 2.1.0 → 7.1.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 (224) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  3. package/dist/cjs/check-one-of-f4f5d0c0.js +8 -0
  4. package/dist/cjs/heading-levels-608d432e.js +5 -0
  5. package/dist/cjs/{index-8c288b1a.js → index-a1440961.js} +2 -6
  6. package/dist/cjs/index-de783b23.js +1394 -0
  7. package/dist/cjs/index.cjs.js +21 -15
  8. package/dist/cjs/loader.cjs.js +5 -3
  9. package/dist/cjs/{package-96a46572.js → package-dacf5ec2.js} +1 -1
  10. package/dist/cjs/{post-accordion-9d27458a.js → post-accordion-225de951.js} +40 -23
  11. package/dist/cjs/post-accordion-item-935e122a.js +52 -0
  12. package/dist/cjs/post-accordion-item.cjs.entry.js +6 -4
  13. package/dist/cjs/post-accordion.cjs.entry.js +5 -3
  14. package/dist/cjs/post-alert-6041a34c.js +98 -0
  15. package/dist/cjs/post-alert.cjs.entry.js +5 -4
  16. package/dist/cjs/post-card-control-3c089d8e.js +314 -0
  17. package/dist/cjs/post-card-control.cjs.entry.js +14 -0
  18. package/dist/cjs/{post-collapsible-1867015c.js → post-collapsible-562268e9.js} +7 -7
  19. package/dist/cjs/post-collapsible.cjs.entry.js +5 -4
  20. package/dist/cjs/post-components.cjs.js +13 -11
  21. package/dist/cjs/{post-icon-07a67b83.js → post-icon-973d5c46.js} +5 -5
  22. package/dist/cjs/post-icon.cjs.entry.js +5 -4
  23. package/dist/cjs/post-popover-b0844e71.js +104 -0
  24. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  25. package/dist/cjs/{post-popovercontainer-003c0819.js → post-popovercontainer-5bb6a804.js} +254 -55
  26. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  27. package/dist/cjs/post-rating-d2845096.js +88 -0
  28. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  29. package/dist/cjs/post-tab-header-6496a51b.js +32 -0
  30. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  31. package/dist/cjs/{post-tab-panel-6a9c4a4f.js → post-tab-panel-25bd8c74.js} +3 -3
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  33. package/dist/cjs/{post-tabs-2eb6f376.js → post-tabs-4e4ee252.js} +23 -21
  34. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  35. package/dist/cjs/post-tag-cbc458ed.js +47 -0
  36. package/dist/cjs/post-tag.cjs.entry.js +11 -0
  37. package/dist/cjs/{post-tooltip-260d0627.js → post-tooltip-805bc0c0.js} +13 -9
  38. package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
  39. package/dist/collection/collection-manifest.json +5 -3
  40. package/dist/collection/components/post-accordion/post-accordion.js +68 -25
  41. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  42. package/dist/collection/components/post-accordion-item/post-accordion-item.js +17 -12
  43. package/dist/collection/components/post-alert/alert-types.js +1 -1
  44. package/dist/collection/components/post-alert/post-alert.css +2 -2
  45. package/dist/collection/components/post-alert/post-alert.js +9 -9
  46. package/dist/collection/components/post-card-control/post-card-control.css +31 -0
  47. package/dist/collection/components/post-card-control/post-card-control.js +523 -0
  48. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  49. package/dist/collection/components/post-collapsible/post-collapsible.js +6 -6
  50. package/dist/collection/components/post-icon/post-icon.js +4 -4
  51. package/dist/collection/components/post-popover/post-popover.css +29 -1
  52. package/dist/collection/components/post-popover/post-popover.js +3 -3
  53. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  54. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +7 -7
  55. package/dist/collection/components/post-rating/post-rating.css +28 -0
  56. package/dist/collection/components/post-rating/post-rating.js +8 -8
  57. package/dist/collection/components/post-tab-header/post-tab-header.css +30 -2
  58. package/dist/collection/components/post-tab-header/post-tab-header.js +3 -3
  59. package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -2
  60. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  61. package/dist/collection/components/post-tabs/post-tabs.js +23 -21
  62. package/dist/collection/components/post-tag/post-tag.css +31 -0
  63. package/dist/collection/components/post-tag/post-tag.js +119 -0
  64. package/dist/collection/components/post-tooltip/post-tooltip.js +12 -9
  65. package/dist/collection/index.js +2 -0
  66. package/dist/collection/types/heading-levels.js +1 -0
  67. package/dist/collection/types/index.js +1 -0
  68. package/dist/collection/utils/index.js +1 -0
  69. package/dist/collection/utils/sass-export.js +16 -0
  70. package/dist/components/check-one-of.js +6 -0
  71. package/dist/components/heading-levels.js +3 -0
  72. package/dist/components/index.js +2 -0
  73. package/dist/components/index2.js +1 -5
  74. package/dist/components/package.js +1 -1
  75. package/dist/components/post-accordion-item2.js +9 -8
  76. package/dist/components/post-accordion2.js +42 -22
  77. package/dist/components/post-alert2.js +7 -7
  78. package/dist/components/post-card-control.d.ts +11 -0
  79. package/dist/components/post-card-control.js +6 -0
  80. package/dist/components/post-card-control2.js +345 -0
  81. package/dist/components/post-collapsible2.js +4 -4
  82. package/dist/components/post-icon2.js +2 -2
  83. package/dist/components/post-popover2.js +2 -2
  84. package/dist/components/post-popovercontainer2.js +252 -53
  85. package/dist/components/post-rating2.js +6 -6
  86. package/dist/components/post-tab-header2.js +2 -2
  87. package/dist/components/post-tab-panel2.js +1 -1
  88. package/dist/components/post-tabs2.js +21 -19
  89. package/dist/components/post-tag.d.ts +11 -0
  90. package/dist/components/post-tag.js +6 -0
  91. package/dist/components/post-tag2.js +74 -0
  92. package/dist/components/post-tooltip2.js +11 -7
  93. package/dist/docs.d.ts +34 -0
  94. package/dist/docs.json +538 -25
  95. package/dist/esm/app-globals-0f993ce5.js +3 -0
  96. package/dist/esm/check-one-of-6b3ef8eb.js +6 -0
  97. package/dist/esm/heading-levels-5b7b4349.js +3 -0
  98. package/dist/esm/index-cf1d5611.js +1365 -0
  99. package/dist/esm/{index-b444db27.js → index-d1eba94c.js} +1 -5
  100. package/dist/esm/index.js +19 -15
  101. package/dist/esm/loader.js +6 -4
  102. package/dist/esm/{package-50a9c0c3.js → package-a837c1ad.js} +1 -1
  103. package/dist/esm/{post-accordion-33fe4f0e.js → post-accordion-fdd22c1d.js} +40 -23
  104. package/dist/esm/post-accordion-item-336f568c.js +50 -0
  105. package/dist/esm/post-accordion-item.entry.js +6 -4
  106. package/dist/esm/post-accordion.entry.js +5 -3
  107. package/dist/esm/post-alert-f48527d8.js +96 -0
  108. package/dist/esm/post-alert.entry.js +5 -4
  109. package/dist/esm/post-card-control-3e6a5855.js +312 -0
  110. package/dist/esm/post-card-control.entry.js +6 -0
  111. package/dist/esm/{post-collapsible-50dc361b.js → post-collapsible-486ab980.js} +7 -7
  112. package/dist/esm/post-collapsible.entry.js +5 -4
  113. package/dist/esm/post-components.js +14 -12
  114. package/dist/esm/{post-icon-00f314ae.js → post-icon-19fdfc4d.js} +5 -5
  115. package/dist/esm/post-icon.entry.js +5 -4
  116. package/dist/esm/post-popover-17164186.js +102 -0
  117. package/dist/esm/post-popover.entry.js +3 -3
  118. package/dist/esm/{post-popovercontainer-62e1fd82.js → post-popovercontainer-d19f9646.js} +254 -55
  119. package/dist/esm/post-popovercontainer.entry.js +3 -3
  120. package/dist/esm/post-rating-ea204778.js +86 -0
  121. package/dist/esm/post-rating.entry.js +3 -3
  122. package/dist/esm/post-tab-header-a97cdef2.js +30 -0
  123. package/dist/esm/post-tab-header.entry.js +3 -3
  124. package/dist/esm/{post-tab-panel-37a1331f.js → post-tab-panel-e6999395.js} +3 -3
  125. package/dist/esm/post-tab-panel.entry.js +3 -3
  126. package/dist/esm/{post-tabs-c4e65a45.js → post-tabs-524c699a.js} +23 -21
  127. package/dist/esm/post-tabs.entry.js +3 -3
  128. package/dist/esm/post-tag-e2035a81.js +45 -0
  129. package/dist/esm/post-tag.entry.js +3 -0
  130. package/dist/esm/{post-tooltip-033f63fa.js → post-tooltip-e4fc9c0c.js} +13 -9
  131. package/dist/esm/post-tooltip.entry.js +3 -3
  132. package/dist/post-components/index.esm.js +1 -1
  133. package/dist/post-components/p-07cc4853.entry.js +1 -0
  134. package/dist/post-components/p-0e410cec.entry.js +1 -0
  135. package/dist/post-components/p-14e22434.entry.js +1 -0
  136. package/dist/post-components/p-18a2ef27.js +1 -0
  137. package/dist/post-components/p-18b571e3.js +2 -0
  138. package/dist/post-components/p-247a1668.js +1 -0
  139. package/dist/post-components/p-2f4c40ee.js +1 -0
  140. package/dist/post-components/p-39a1dcb8.entry.js +1 -0
  141. package/dist/post-components/p-3b0988a1.js +1 -0
  142. package/dist/post-components/p-3ee18d14.entry.js +1 -0
  143. package/dist/post-components/p-4575a570.js +1 -0
  144. package/dist/post-components/p-59da0b80.js +1 -0
  145. package/dist/post-components/p-611b3c41.js +1 -0
  146. package/dist/post-components/p-63277771.entry.js +1 -0
  147. package/dist/post-components/p-67df1075.js +1 -0
  148. package/dist/post-components/p-74db9b35.entry.js +1 -0
  149. package/dist/post-components/p-7bb79254.entry.js +1 -0
  150. package/dist/post-components/p-8398de7b.entry.js +1 -0
  151. package/dist/post-components/p-9a59f2c7.js +1 -0
  152. package/dist/post-components/p-c4a7208a.js +1 -0
  153. package/dist/post-components/{p-7e7833f7.js → p-c85913ed.js} +3 -3
  154. package/dist/post-components/p-caaa5b4c.entry.js +1 -0
  155. package/dist/post-components/p-cf10d355.js +1 -0
  156. package/dist/post-components/p-d1f516dd.js +1 -0
  157. package/dist/post-components/p-d2eb0f0b.js +1 -0
  158. package/dist/post-components/p-d70f33cd.js +1 -0
  159. package/dist/post-components/p-da049db2.entry.js +1 -0
  160. package/dist/post-components/p-db114d1d.entry.js +1 -0
  161. package/dist/post-components/p-e1255160.js +1 -0
  162. package/dist/post-components/p-e929ddbc.js +1 -0
  163. package/dist/post-components/p-ebb54756.entry.js +1 -0
  164. package/dist/post-components/p-ed22dec0.js +1 -0
  165. package/dist/post-components/p-f5d8f3fe.entry.js +1 -0
  166. package/dist/post-components/p-f91c0e1b.js +1 -0
  167. package/dist/post-components/post-components.esm.js +1 -1
  168. package/dist/types/components/post-accordion/post-accordion.d.ts +8 -2
  169. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +3 -2
  170. package/dist/types/components/post-alert/alert-types.d.ts +2 -2
  171. package/dist/types/components/post-alert/post-alert.d.ts +2 -2
  172. package/dist/types/components/post-card-control/post-card-control.d.ts +112 -0
  173. package/dist/types/components/post-collapsible/post-collapsible.d.ts +1 -1
  174. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -1
  175. package/dist/types/components/post-rating/post-rating.d.ts +2 -2
  176. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  177. package/dist/types/components/post-tag/post-tag.d.ts +27 -0
  178. package/dist/types/components.d.ts +191 -15
  179. package/dist/types/css-modules.js +0 -0
  180. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/css-modules.d.ts +6 -0
  181. package/dist/types/index.d.ts +2 -0
  182. package/dist/types/types/heading-levels.d.ts +2 -0
  183. package/dist/types/types/index.d.ts +1 -0
  184. package/dist/types/utils/index.d.ts +1 -0
  185. package/dist/types/utils/sass-export.d.ts +2 -0
  186. package/package.json +22 -22
  187. package/dist/cjs/index-f243643b.js +0 -2051
  188. package/dist/cjs/post-accordion-item-61fb55fa.js +0 -51
  189. package/dist/cjs/post-alert-a810f5b9.js +0 -98
  190. package/dist/cjs/post-popover-9610b64c.js +0 -104
  191. package/dist/cjs/post-rating-75574abd.js +0 -88
  192. package/dist/cjs/post-tab-header-85424e32.js +0 -32
  193. package/dist/esm/index-1708db56.js +0 -2022
  194. package/dist/esm/post-accordion-item-1fd95c9f.js +0 -49
  195. package/dist/esm/post-alert-65d67f69.js +0 -96
  196. package/dist/esm/post-popover-40bfd1b7.js +0 -102
  197. package/dist/esm/post-rating-f7a79ed4.js +0 -86
  198. package/dist/esm/post-tab-header-0683252a.js +0 -30
  199. package/dist/post-components/p-00dcad55.js +0 -1
  200. package/dist/post-components/p-01e57281.entry.js +0 -1
  201. package/dist/post-components/p-06c989fb.entry.js +0 -1
  202. package/dist/post-components/p-07ffb6de.entry.js +0 -1
  203. package/dist/post-components/p-10b4cf7a.js +0 -2
  204. package/dist/post-components/p-26c658c1.entry.js +0 -1
  205. package/dist/post-components/p-2a964700.js +0 -1
  206. package/dist/post-components/p-35f14000.js +0 -1
  207. package/dist/post-components/p-3fb09ecd.js +0 -1
  208. package/dist/post-components/p-4b0a45d8.entry.js +0 -1
  209. package/dist/post-components/p-53e8e4e7.entry.js +0 -1
  210. package/dist/post-components/p-598b11b6.js +0 -1
  211. package/dist/post-components/p-5b6ee52a.entry.js +0 -1
  212. package/dist/post-components/p-8139faa4.entry.js +0 -1
  213. package/dist/post-components/p-8cd6d7c2.js +0 -1
  214. package/dist/post-components/p-99a9602e.js +0 -1
  215. package/dist/post-components/p-a2775477.entry.js +0 -1
  216. package/dist/post-components/p-a905b16b.entry.js +0 -1
  217. package/dist/post-components/p-aa02111b.js +0 -1
  218. package/dist/post-components/p-b135d3e2.js +0 -1
  219. package/dist/post-components/p-b81e61ed.entry.js +0 -1
  220. package/dist/post-components/p-d6bc34ff.js +0 -1
  221. package/dist/post-components/p-da2b8e26.entry.js +0 -1
  222. package/dist/post-components/p-f0476913.js +0 -1
  223. package/dist/post-components/p-f0e82e63.js +0 -1
  224. package/dist/post-components/p-ff0e1564.js +0 -1
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
2
2
  import { v as version } from './package.js';
3
3
  import { c as checkNonEmpty } from './check-non-empty.js';
4
4
 
5
- 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-primary,.bg-black,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.bg-success-green,.bg-error-red) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-primary,.bg-black,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.bg-success-green,.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}";
5
+ 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}";
6
6
  const PostTabHeaderStyle0 = postTabHeaderCss;
7
7
 
8
8
  const PostTabHeader = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
@@ -20,7 +20,7 @@ const PostTabHeader = /*@__PURE__*/ proxyCustomElement(class PostTabHeader exten
20
20
  this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: '999ab8056178562bbcf615b03787451a946f8929', "data-version": version }, h("button", { key: '9795891344158c294f6d77a2245200108f1fe737', "aria-selected": "false", class: "tab-title", id: this.tabId, role: "tab", tabindex: "-1", type: "button" }, h("slot", { key: 'd62f2894e9bf89c00a9d5673cd47507ef7b26359' }))));
23
+ return (h(Host, { key: 'eb6ac6a67f4cbf571d38f1de1c8d428a9dea5a53', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title" }, h("slot", { key: 'd6559dbcc76ecc8d253fcd4a115b4bc4f78fd496' })));
24
24
  }
25
25
  get host() { return this; }
26
26
  static get watchers() { return {
@@ -17,7 +17,7 @@ const PostTabPanel = /*@__PURE__*/ proxyCustomElement(class PostTabPanel extends
17
17
  this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
18
18
  }
19
19
  render() {
20
- return (h(Host, { key: '08148fe9b221905fbeab99bdb14f4d040deda959', "data-version": version }, h("div", { key: '04ad9fba5b296902fc75e0e36f7cefd91d0b6948', class: "tab-pane", id: this.panelId, role: "tabpanel" }, h("slot", { key: '840a5242e071f47b102340738f31b3f8b3c10052' }))));
20
+ return (h(Host, { key: 'cd74acf8889af916b9b32b57b483bbd74d5a6e20', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '9d2c3f42b1dd9214aeeee35efc1179372851af13' })));
21
21
  }
22
22
  get host() { return this; }
23
23
  static get style() { return PostTabPanelStyle0; }
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { v as version } from './package.js';
3
3
  import { f as fadeOut, a as fadeIn } from './fade.js';
4
4
 
5
- const postTabsCss = ".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-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}";
5
+ const postTabsCss = ".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}";
6
6
  const PostTabsStyle0 = postTabsCss;
7
7
 
8
8
  const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLElement {
@@ -10,7 +10,7 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
10
10
  super();
11
11
  this.__registerHost();
12
12
  this.__attachShadow();
13
- this.tabChange = createEvent(this, "tabChange", 7);
13
+ this.postChange = createEvent(this, "postChange", 7);
14
14
  this.isLoaded = false;
15
15
  this.activePanel = undefined;
16
16
  }
@@ -55,7 +55,7 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
55
55
  if (this.showing) {
56
56
  await this.showing.finished;
57
57
  }
58
- this.tabChange.emit(this.activeTab.panel);
58
+ this.postChange.emit(this.activeTab.panel);
59
59
  }
60
60
  moveMisplacedTabs() {
61
61
  if (!this.tabs)
@@ -71,16 +71,21 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
71
71
  return;
72
72
  this.tabs.forEach(async (tab) => {
73
73
  await tab.componentOnReady();
74
- const tabTitle = tab.shadowRoot.querySelector('.tab-title');
75
74
  // if the tab has an "aria-controls" attribute it was already linked to its panel: do nothing
76
- if (tabTitle.getAttribute('aria-controls'))
75
+ if (tab.getAttribute('aria-controls'))
77
76
  return;
78
- const tabPanel = this.getPanel(tab.panel).shadowRoot.querySelector('.tab-pane');
79
- tabTitle.setAttribute('aria-controls', tabPanel.id);
80
- tabPanel.setAttribute('aria-labelledby', tabTitle.id);
77
+ const tabPanel = this.getPanel(tab.panel);
78
+ tab.setAttribute('aria-controls', tabPanel.id);
79
+ tabPanel.setAttribute('aria-labelledby', tab.id);
81
80
  tab.addEventListener('click', () => {
82
81
  void this.show(tab.panel);
83
82
  });
83
+ tab.addEventListener('keydown', (e) => {
84
+ if (e.key === 'Enter' || e.key === ' ') {
85
+ e.preventDefault();
86
+ void this.show(tab.panel);
87
+ }
88
+ });
84
89
  tab.addEventListener('keydown', ({ key }) => {
85
90
  if (key === 'ArrowRight' || key === 'ArrowLeft')
86
91
  this.navigateTabs(tab, key);
@@ -93,15 +98,13 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
93
98
  }
94
99
  activateTab(tab) {
95
100
  if (this.activeTab) {
96
- const tabTitle = this.activeTab.shadowRoot.querySelector('.tab-title');
97
- tabTitle.setAttribute('aria-selected', 'false');
98
- tabTitle.setAttribute('tabindex', '-1');
99
- tabTitle.classList.remove('active');
101
+ this.activeTab.setAttribute('aria-selected', 'false');
102
+ this.activeTab.setAttribute('tabindex', '-1');
103
+ this.activeTab.classList.remove('active');
100
104
  }
101
- const tabTitle = tab.shadowRoot.querySelector('.tab-title');
102
- tabTitle.setAttribute('aria-selected', 'true');
103
- tabTitle.removeAttribute('tabindex');
104
- tabTitle.classList.add('active');
105
+ tab.setAttribute('aria-selected', 'true');
106
+ tab.setAttribute('tabindex', '0');
107
+ tab.classList.add('active');
105
108
  this.activeTab = tab;
106
109
  }
107
110
  hidePanel(panelName) {
@@ -139,11 +142,10 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
139
142
  }
140
143
  if (!nextTab)
141
144
  return;
142
- const nextTabTitle = nextTab.shadowRoot.querySelector('.tab-title');
143
- nextTabTitle.focus();
145
+ nextTab.focus();
144
146
  }
145
147
  render() {
146
- return (h(Host, { key: '474b7d00c23aec2a44a202c09b8a75a9dc12b4a8', "data-version": version }, h("div", { key: '2fe1b6cad96fd868cbaa7e775d185537a37228fd', class: "tabs-wrapper" }, h("div", { key: 'ef70af3ddd337cefb719d183d603eb93fb033e25', class: "tabs", role: "tablist" }, h("slot", { key: '360909ea07bbbca523cb21b71daa8b4b02f60bed', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'ba44b0e8484e63d9b48f66933f37d854eb648854', class: "tab-content" }, h("slot", { key: 'cd22488448be508393fcb9f9428d3f712c9b659b', onSlotchange: () => this.moveMisplacedTabs() }))));
148
+ return (h(Host, { key: '38a0e3f686dab8cc1ea9dc23cc6e275fe0e6b45d', "data-version": version }, h("div", { key: 'c67273069e5d3ba858bd6c5da8684bbd2f8c398b', class: "tabs-wrapper" }, h("div", { key: 'fc3e725607107f3b5d3c969e4107c229ca8f8c66', class: "tabs", role: "tablist" }, h("slot", { key: 'caf8d1a6901327d0b8faebb36ce239d7368e2a22', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'f8cf7c8c8cbb3fd308cebc34513b16926f8e5c81', class: "tab-content" }, h("slot", { key: '7f7ff954545f85e6caab71d7265017607e25262b', onSlotchange: () => this.moveMisplacedTabs() }))));
147
149
  }
148
150
  get host() { return this; }
149
151
  static get style() { return PostTabsStyle0; }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface PostTag extends Components.PostTag, HTMLElement {}
4
+ export const PostTag: {
5
+ prototype: PostTag;
6
+ new (): PostTag;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { P as PostTag$1, d as defineCustomElement$1 } from './post-tag2.js';
2
+
3
+ const PostTag = PostTag$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { PostTag, defineCustomElement };
@@ -0,0 +1,74 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { v as version } from './package.js';
3
+ import { d as defineCustomElement$1 } from './post-icon2.js';
4
+
5
+ const postTagCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:18.5rem;background-color:var(--post-tag-bg);border:1px solid rgba(0,0,0,0);border-radius:.25rem;font-size:1rem;line-height:1.875rem;white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:1.5rem}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg:#fff;--post-tag-fg:#000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg:#fc0;--post-tag-fg:#000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg:#2c871d;--post-tag-fg:#fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg:#f49e00;--post-tag-fg:#000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg:#a51728;--post-tag-fg:#fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg:#cce4ee;--post-tag-fg:#000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}";
6
+ const PostTagStyle0 = postTagCss;
7
+
8
+ const PostTag = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLElement {
9
+ constructor() {
10
+ super();
11
+ this.__registerHost();
12
+ this.__attachShadow();
13
+ this.classes = undefined;
14
+ this.variant = undefined;
15
+ this.size = null;
16
+ this.icon = null;
17
+ this.setClasses = this.setClasses.bind(this);
18
+ }
19
+ variantChanged() {
20
+ this.setClasses();
21
+ }
22
+ sizeChanged() {
23
+ this.setClasses();
24
+ }
25
+ setClasses() {
26
+ this.classes = [
27
+ 'tag',
28
+ this.size ? `tag-${this.size}` : null,
29
+ this.variant ? `tag-${this.variant}` : null,
30
+ ]
31
+ .filter(c => c !== null)
32
+ .join(' ');
33
+ }
34
+ connectedCallback() {
35
+ this.setClasses();
36
+ }
37
+ render() {
38
+ return (h(Host, { key: '932992b2aa41e1082bf1617c7f6c74419febb143', "data-version": version }, h("div", { key: '3d5b82975cf95f1439299326347886a8b74e2d3d', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '96dac1715f1ddfe799cb2cb443f57d2a4082d90e', class: "tag-text" }, h("slot", { key: 'bb886b44ae76b71096c9938dacd708d80b602790' })))));
39
+ }
40
+ get host() { return this; }
41
+ static get watchers() { return {
42
+ "variant": ["variantChanged"],
43
+ "size": ["sizeChanged"]
44
+ }; }
45
+ static get style() { return PostTagStyle0; }
46
+ }, [1, "post-tag", {
47
+ "variant": [1],
48
+ "size": [1],
49
+ "icon": [1],
50
+ "classes": [32]
51
+ }, undefined, {
52
+ "variant": ["variantChanged"],
53
+ "size": ["sizeChanged"]
54
+ }]);
55
+ function defineCustomElement() {
56
+ if (typeof customElements === "undefined") {
57
+ return;
58
+ }
59
+ const components = ["post-tag", "post-icon"];
60
+ components.forEach(tagName => { switch (tagName) {
61
+ case "post-tag":
62
+ if (!customElements.get(tagName)) {
63
+ customElements.define(tagName, PostTag);
64
+ }
65
+ break;
66
+ case "post-icon":
67
+ if (!customElements.get(tagName)) {
68
+ defineCustomElement$1();
69
+ }
70
+ break;
71
+ } });
72
+ }
73
+
74
+ export { PostTag as P, defineCustomElement as d };
@@ -4765,6 +4765,7 @@ const isFocusable = /*@__PURE__*/getDefaultExportFromCjs(focusable.exports);
4765
4765
  document.addEventListener(mouseMove, mouseMoveHandler, true);
4766
4766
  document.addEventListener('wheel', clearLongPressTimer, true);
4767
4767
  document.addEventListener('scroll', clearLongPressTimer, true);
4768
+ document.addEventListener('contextmenu', clearLongPressTimer, true);
4768
4769
 
4769
4770
  // hook events that can trigger a long press event
4770
4771
  document.addEventListener(mouseDown, mouseDownHandler, true); // <- start
@@ -4783,6 +4784,7 @@ const PostTooltipStyle0 = postTooltipCss;
4783
4784
  let tooltipInstances = 0;
4784
4785
  let hideTooltipTimeout = null;
4785
4786
  const tooltipTargetAttribute = 'data-tooltip-target';
4787
+ const tooltipTargetAttributeSelector = `[${tooltipTargetAttribute}]`;
4786
4788
  /**
4787
4789
  * Global event listener to show tooltips. This is globalized so that triggers that are rendered
4788
4790
  * async will still work without the need to set listeners on the element itself
@@ -4790,14 +4792,14 @@ const tooltipTargetAttribute = 'data-tooltip-target';
4790
4792
  * @returns
4791
4793
  */
4792
4794
  const globalInterestHandler = (e) => {
4793
- const target = e.target;
4794
- if (!target || !('getAttribute' in target))
4795
+ const targetElement = e.target.closest(tooltipTargetAttributeSelector);
4796
+ if (!targetElement || !('getAttribute' in targetElement))
4795
4797
  return;
4796
- const tooltipTarget = target.getAttribute(tooltipTargetAttribute);
4798
+ const tooltipTarget = targetElement.getAttribute(tooltipTargetAttribute);
4797
4799
  if (!tooltipTarget || tooltipTarget === '')
4798
4800
  return;
4799
4801
  const tooltip = document.getElementById(tooltipTarget);
4800
- tooltip === null || tooltip === void 0 ? void 0 : tooltip.show(target);
4802
+ void (tooltip === null || tooltip === void 0 ? void 0 : tooltip.show(targetElement));
4801
4803
  if (hideTooltipTimeout) {
4802
4804
  window.clearTimeout(hideTooltipTimeout);
4803
4805
  hideTooltipTimeout = null;
@@ -4810,8 +4812,10 @@ const globalInterestHandler = (e) => {
4810
4812
  * @returns
4811
4813
  */
4812
4814
  const globalInterestLostHandler = (e) => {
4813
- const target = e.target;
4814
- const tooltipTarget = target.getAttribute(tooltipTargetAttribute);
4815
+ const targetElement = e.target.closest(tooltipTargetAttributeSelector);
4816
+ if (!targetElement || !('getAttribute' in targetElement))
4817
+ return;
4818
+ const tooltipTarget = targetElement.getAttribute(tooltipTargetAttribute);
4815
4819
  if (!tooltipTarget || tooltipTarget === '')
4816
4820
  return;
4817
4821
  const tooltip = document.getElementById(tooltipTarget);
@@ -4939,7 +4943,7 @@ const PostTooltip = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends H
4939
4943
  }
4940
4944
  render() {
4941
4945
  const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
4942
- return (h(Host, { key: '63124ebabffbe5fe857bcc61eecf4133f2952e85', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: '42e1b5e0ab8cbb3a1b805ccf5b40232b071cf5ad', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: 'bf414a19c044f3c608ab3141bb93736dd7dea723' }))));
4946
+ return (h(Host, { key: '07eb6b63076ce7803c58dfb6749553b636570b86', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'b0256a56e1814b4f83999f3267d3c39d874f515d', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '9432e38bab0d14ea835aee0f7567ee9795067491' }))));
4943
4947
  }
4944
4948
  get host() { return this; }
4945
4949
  static get style() { return PostTooltipStyle0; }
package/dist/docs.d.ts CHANGED
@@ -347,10 +347,26 @@ export interface JsonDocsEvent {
347
347
  deprecation?: string;
348
348
  detail: string;
349
349
  }
350
+ /**
351
+ * Type describing a CSS Style, as described by a JSDoc-style comment
352
+ */
350
353
  export interface JsonDocsStyle {
354
+ /**
355
+ * The name of the style
356
+ */
351
357
  name: string;
358
+ /**
359
+ * The type/description associated with the style
360
+ */
352
361
  docs: string;
362
+ /**
363
+ * The annotation used in the JSDoc of the style (e.g. `@prop`)
364
+ */
353
365
  annotation: string;
366
+ /**
367
+ * The mode associated with the style
368
+ */
369
+ mode: string | undefined;
354
370
  }
355
371
  export interface JsonDocsListener {
356
372
  event: string;
@@ -389,10 +405,28 @@ export interface JsonDocsPart {
389
405
  */
390
406
  docs: string;
391
407
  }
408
+ /**
409
+ * Represents a parsed block comment in a CSS, Sass, etc. file for a custom property.
410
+ */
392
411
  export interface StyleDoc {
412
+ /**
413
+ * The name of the CSS property
414
+ */
393
415
  name: string;
416
+ /**
417
+ * The user-defined description of the CSS property
418
+ */
394
419
  docs: string;
420
+ /**
421
+ * The JSDoc-style annotation (e.g. `@prop`) that was used in the block comment to detect the comment.
422
+ * Used to inform Stencil where the start of a new property's description starts (and where the previous description
423
+ * ends).
424
+ */
395
425
  annotation: "prop";
426
+ /**
427
+ * The Stencil style-mode that is associated with this property.
428
+ */
429
+ mode: string | undefined;
396
430
  }
397
431
 
398
432
  export {};