@swisspost/design-system-components 7.2.0 → 7.3.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 (204) hide show
  1. package/dist/cjs/_commonjsHelpers-8f2c79cd.js +31 -0
  2. package/dist/cjs/check-type-64af82a9.js +16 -0
  3. package/dist/cjs/{index-0fc0bf5f.js → index-1cc8e4e1.js} +522 -224
  4. package/dist/cjs/{index-a1440961.js → index-f32e5185.js} +2 -15
  5. package/dist/cjs/index.cjs.js +21 -17
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/{package-b133ab48.js → package-04f2043d.js} +1 -1
  8. package/dist/cjs/{post-accordion-a079c21b.js → post-accordion-37fd4f78.js} +2 -2
  9. package/dist/cjs/{post-accordion-item-30c6ec06.js → post-accordion-item-1c83fc7c.js} +4 -4
  10. package/dist/cjs/post-accordion-item.cjs.entry.js +5 -4
  11. package/dist/cjs/post-accordion.cjs.entry.js +3 -3
  12. package/dist/cjs/{post-alert-b5cfc4c6.js → post-alert-6fb69a85.js} +8 -7
  13. package/dist/cjs/post-alert.cjs.entry.js +5 -4
  14. package/dist/cjs/post-card-control-b4d765d4.js +315 -0
  15. package/dist/cjs/post-card-control.cjs.entry.js +3 -3
  16. package/dist/cjs/{post-collapsible-9bcaf6f1.js → post-collapsible-d1afbfc7.js} +14 -10
  17. package/dist/cjs/post-collapsible-trigger-ed6c0795.js +188280 -0
  18. package/dist/cjs/post-collapsible-trigger.cjs.entry.js +14 -0
  19. package/dist/cjs/post-collapsible.cjs.entry.js +5 -4
  20. package/dist/cjs/post-components.cjs.js +3 -3
  21. package/dist/cjs/{post-icon-87e7972e.js → post-icon-8bc01581.js} +6 -5
  22. package/dist/cjs/post-icon.cjs.entry.js +5 -4
  23. package/dist/cjs/{post-popover-0a73553e.js → post-popover-bdcc2f7d.js} +4 -4
  24. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  25. package/dist/cjs/{post-popovercontainer-a1df1705.js → post-popovercontainer-e63276d4.js} +44 -37
  26. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  27. package/dist/cjs/{post-rating-2337c023.js → post-rating-26fda1b8.js} +3 -3
  28. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  29. package/dist/cjs/post-tab-header-b367fb5e.js +32 -0
  30. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  31. package/dist/cjs/{post-tab-panel-307eacef.js → post-tab-panel-68c379af.js} +3 -3
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  33. package/dist/cjs/{post-tabs-92435b40.js → post-tabs-cb1407ec.js} +8 -10
  34. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  35. package/dist/cjs/{post-tag-0237216a.js → post-tag-8f03cbff.js} +3 -3
  36. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  37. package/dist/cjs/{post-tooltip-7fcd3f15.js → post-tooltip-75b6872c.js} +25 -12
  38. package/dist/cjs/post-tooltip.cjs.entry.js +8 -3
  39. package/dist/collection/collection-manifest.json +2 -1
  40. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  41. package/dist/collection/components/post-alert/post-alert.css +2 -2
  42. package/dist/collection/components/post-alert/post-alert.js +1 -1
  43. package/dist/collection/components/post-card-control/post-card-control.css +1 -1
  44. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  45. package/dist/collection/components/post-collapsible/post-collapsible.js +10 -11
  46. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +153 -0
  47. package/dist/collection/components/post-icon/post-icon.js +1 -1
  48. package/dist/collection/components/post-popover/post-popover.css +1 -1
  49. package/dist/collection/components/post-popover/post-popover.js +2 -2
  50. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  51. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +14 -17
  52. package/dist/collection/components/post-rating/post-rating.js +1 -1
  53. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
  54. package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
  55. package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
  56. package/dist/collection/components/post-tabs/post-tabs.js +8 -8
  57. package/dist/collection/components/post-tag/post-tag.js +1 -1
  58. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  59. package/dist/collection/components/post-tooltip/post-tooltip.js +37 -2
  60. package/dist/collection/index.js +1 -0
  61. package/dist/collection/utils/debounce.js +8 -0
  62. package/dist/collection/utils/index.js +2 -0
  63. package/dist/collection/utils/timeout.js +3 -0
  64. package/dist/components/_commonjsHelpers.js +26 -0
  65. package/dist/components/check-type.js +14 -0
  66. package/dist/components/index.js +1 -0
  67. package/dist/components/index2.js +2 -14
  68. package/dist/components/package.js +1 -1
  69. package/dist/components/post-accordion-item2.js +1 -1
  70. package/dist/components/post-alert2.js +4 -3
  71. package/dist/components/post-card-control2.js +1 -1
  72. package/dist/components/post-collapsible-trigger.d.ts +11 -0
  73. package/dist/components/post-collapsible-trigger.js +6 -0
  74. package/dist/components/post-collapsible-trigger2.js +188297 -0
  75. package/dist/components/post-collapsible2.js +12 -9
  76. package/dist/components/post-icon2.js +3 -2
  77. package/dist/components/post-popover2.js +2 -2
  78. package/dist/components/post-popovercontainer2.js +43 -37
  79. package/dist/components/post-rating2.js +1 -1
  80. package/dist/components/post-tab-header2.js +2 -2
  81. package/dist/components/post-tab-panel2.js +1 -1
  82. package/dist/components/post-tabs2.js +6 -8
  83. package/dist/components/post-tag2.js +1 -1
  84. package/dist/components/post-tooltip2.js +22 -6
  85. package/dist/docs.json +120 -15
  86. package/dist/esm/_commonjsHelpers-24671825.js +26 -0
  87. package/dist/esm/check-type-8828dbe4.js +14 -0
  88. package/dist/esm/{index-d1eba94c.js → index-29d17d6d.js} +2 -14
  89. package/dist/esm/{index-d9331ff3.js → index-9ace3232.js} +522 -224
  90. package/dist/esm/index.js +20 -17
  91. package/dist/esm/loader.js +3 -3
  92. package/dist/esm/{package-37b02bc3.js → package-4d20f60f.js} +1 -1
  93. package/dist/esm/{post-accordion-7eaa090e.js → post-accordion-62014c92.js} +2 -2
  94. package/dist/esm/{post-accordion-item-d5466ca0.js → post-accordion-item-cbac29b5.js} +4 -4
  95. package/dist/esm/post-accordion-item.entry.js +5 -4
  96. package/dist/esm/post-accordion.entry.js +3 -3
  97. package/dist/esm/{post-alert-5bc0d11c.js → post-alert-c4debfa4.js} +6 -5
  98. package/dist/esm/post-alert.entry.js +5 -4
  99. package/dist/esm/post-card-control-00a5376b.js +313 -0
  100. package/dist/esm/post-card-control.entry.js +3 -3
  101. package/dist/esm/{post-collapsible-0bb7ca9a.js → post-collapsible-8d4694d4.js} +14 -10
  102. package/dist/esm/post-collapsible-trigger-84e583ca.js +188278 -0
  103. package/dist/esm/post-collapsible-trigger.entry.js +6 -0
  104. package/dist/esm/post-collapsible.entry.js +5 -4
  105. package/dist/esm/post-components.js +4 -4
  106. package/dist/esm/{post-icon-8d59faf7.js → post-icon-a7fc703c.js} +5 -4
  107. package/dist/esm/post-icon.entry.js +5 -4
  108. package/dist/esm/{post-popover-0ebc24f5.js → post-popover-e4e3c7e9.js} +4 -4
  109. package/dist/esm/post-popover.entry.js +3 -3
  110. package/dist/esm/{post-popovercontainer-5c0ba050.js → post-popovercontainer-012763bb.js} +44 -37
  111. package/dist/esm/post-popovercontainer.entry.js +3 -3
  112. package/dist/esm/{post-rating-40195437.js → post-rating-65f2a6f5.js} +3 -3
  113. package/dist/esm/post-rating.entry.js +3 -3
  114. package/dist/esm/post-tab-header-6c4e751f.js +30 -0
  115. package/dist/esm/post-tab-header.entry.js +3 -3
  116. package/dist/esm/{post-tab-panel-d40b9704.js → post-tab-panel-0a00a0db.js} +3 -3
  117. package/dist/esm/post-tab-panel.entry.js +3 -3
  118. package/dist/esm/{post-tabs-6ee5542b.js → post-tabs-ce296f51.js} +8 -10
  119. package/dist/esm/post-tabs.entry.js +3 -3
  120. package/dist/esm/{post-tag-e76f88e5.js → post-tag-08829103.js} +3 -3
  121. package/dist/esm/post-tag.entry.js +3 -3
  122. package/dist/esm/{post-tooltip-990b8b2b.js → post-tooltip-f649a3f5.js} +21 -8
  123. package/dist/esm/post-tooltip.entry.js +8 -3
  124. package/dist/post-components/index.esm.js +1 -1
  125. package/dist/post-components/{p-3f2c54ad.js → p-0397588f.js} +1 -1
  126. package/dist/post-components/p-03bd02f3.entry.js +1 -0
  127. package/dist/post-components/p-07e54337.js +1 -0
  128. package/dist/post-components/p-0a7a9ff0.entry.js +1 -0
  129. package/dist/post-components/p-12ad573b.entry.js +1 -0
  130. package/dist/post-components/p-12c4e001.entry.js +1 -0
  131. package/dist/post-components/p-1c2d6fa3.entry.js +1 -0
  132. package/dist/post-components/p-1e103e24.entry.js +1 -0
  133. package/dist/post-components/{p-69bd634e.js → p-28a16293.js} +1 -1
  134. package/dist/post-components/{p-0637689e.js → p-2bb82301.js} +1 -1
  135. package/dist/post-components/p-3a4c029f.js +1 -0
  136. package/dist/post-components/p-489390f4.js +1 -0
  137. package/dist/post-components/p-4a3f67ab.js +1 -0
  138. package/dist/post-components/p-4ced5f5f.entry.js +1 -0
  139. package/dist/post-components/p-5a47caeb.js +1 -0
  140. package/dist/post-components/p-6712c712.entry.js +1 -0
  141. package/dist/post-components/p-6b2156ed.js +1 -0
  142. package/dist/post-components/p-73a63423.js +1 -0
  143. package/dist/post-components/{p-aef9ee8b.js → p-7751bd1f.js} +1 -1
  144. package/dist/post-components/p-7f35c77d.js +1 -0
  145. package/dist/post-components/p-80afd42d.entry.js +1 -0
  146. package/dist/post-components/p-8771fd61.js +1 -0
  147. package/dist/post-components/p-8c7f0075.js +2 -0
  148. package/dist/post-components/p-94c3e483.js +20 -0
  149. package/dist/post-components/p-94e75021.js +15 -0
  150. package/dist/post-components/p-aab2780d.entry.js +1 -0
  151. package/dist/post-components/p-aba21874.entry.js +1 -0
  152. package/dist/post-components/p-ac500761.js +1 -0
  153. package/dist/post-components/p-b0ac8313.entry.js +1 -0
  154. package/dist/post-components/{p-f86b2ea1.js → p-c3abf86d.js} +1 -1
  155. package/dist/post-components/p-cb13d0e2.entry.js +1 -0
  156. package/dist/post-components/p-d8534a90.entry.js +1 -0
  157. package/dist/post-components/p-da8cdd71.js +1 -0
  158. package/dist/post-components/p-f0fbe328.entry.js +1 -0
  159. package/dist/post-components/p-ff86b519.js +1 -0
  160. package/dist/post-components/post-components.esm.js +1 -1
  161. package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -3
  162. package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +47 -0
  163. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +0 -1
  164. package/dist/types/components/post-tabs/post-tabs.d.ts +2 -0
  165. package/dist/types/components/post-tooltip/post-tooltip.d.ts +6 -0
  166. package/dist/types/components.d.ts +33 -0
  167. package/dist/types/index.d.ts +1 -0
  168. package/dist/types/stencil-public-runtime.d.ts +0 -2
  169. package/dist/types/utils/debounce.d.ts +1 -0
  170. package/dist/types/utils/index.d.ts +2 -0
  171. package/dist/types/utils/timeout.d.ts +1 -0
  172. package/loader/index.d.ts +3 -0
  173. package/package.json +10 -10
  174. package/dist/cjs/post-card-control-80ff0fbb.js +0 -315
  175. package/dist/cjs/post-tab-header-ac4137cb.js +0 -32
  176. package/dist/collection/index.spec.js +0 -27
  177. package/dist/esm/post-card-control-d64be740.js +0 -313
  178. package/dist/esm/post-tab-header-ff165ebb.js +0 -30
  179. package/dist/post-components/p-0ba99d76.entry.js +0 -1
  180. package/dist/post-components/p-0e97fb19.entry.js +0 -1
  181. package/dist/post-components/p-19ee1efc.entry.js +0 -1
  182. package/dist/post-components/p-23e7f6e3.entry.js +0 -1
  183. package/dist/post-components/p-287f66b9.js +0 -1
  184. package/dist/post-components/p-305ab60c.js +0 -1
  185. package/dist/post-components/p-3ce051c9.js +0 -1
  186. package/dist/post-components/p-62229794.entry.js +0 -1
  187. package/dist/post-components/p-7dc73c43.entry.js +0 -1
  188. package/dist/post-components/p-7e59cbd2.js +0 -1
  189. package/dist/post-components/p-8559d3c0.entry.js +0 -1
  190. package/dist/post-components/p-941e5ef0.js +0 -1
  191. package/dist/post-components/p-95003bde.entry.js +0 -1
  192. package/dist/post-components/p-a1da0539.js +0 -1
  193. package/dist/post-components/p-a5d9115f.entry.js +0 -1
  194. package/dist/post-components/p-a9aa57f0.entry.js +0 -1
  195. package/dist/post-components/p-c21da8cb.js +0 -1
  196. package/dist/post-components/p-c655db7c.entry.js +0 -1
  197. package/dist/post-components/p-ca2ff4bb.entry.js +0 -1
  198. package/dist/post-components/p-d2eafe06.entry.js +0 -1
  199. package/dist/post-components/p-d6e0e495.js +0 -1
  200. package/dist/post-components/p-d9eab6d9.js +0 -2
  201. package/dist/post-components/p-deb19ca0.js +0 -1
  202. package/dist/post-components/p-ee12644d.js +0 -15
  203. package/dist/post-components/p-f91c0e1b.js +0 -1
  204. package/dist/post-components/p-ff0b0a9a.entry.js +0 -1
@@ -1,32 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-0fc0bf5f.js');
4
- const _package = require('./package-b133ab48.js');
5
- const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
6
-
7
- const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:var(--post-contrast-color-inverted);color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-secondary .tab-title{background-color:#666}.bg-secondary .tab-title.active{background-color:#666}.bg-secondary .nav-item{background-color:#666}.bg-success .tab-title{background-color:#2c871d}.bg-success .tab-title.active{background-color:#2c871d}.bg-success .nav-item{background-color:#2c871d}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-error .tab-title{background-color:#a51728}.bg-error .tab-title.active{background-color:#a51728}.bg-error .nav-item{background-color:#a51728}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-success-background .tab-title{background-color:#c0debb}.bg-success-background .tab-title.active{background-color:#c0debb}.bg-success-background .nav-item{background-color:#c0debb}.bg-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}.bg-error-background .tab-title{background-color:#ffdade}.bg-error-background .tab-title.active{background-color:#ffdade}.bg-error-background .nav-item{background-color:#ffdade}.bg-nightblue .tab-title{background-color:#004976}.bg-nightblue .tab-title.active{background-color:#004976}.bg-nightblue .nav-item{background-color:#004976}.bg-nightblue-bright .tab-title{background-color:#0076a8}.bg-nightblue-bright .tab-title.active{background-color:#0076a8}.bg-nightblue-bright .nav-item{background-color:#0076a8}.bg-petrol .tab-title{background-color:#006d68}.bg-petrol .tab-title.active{background-color:#006d68}.bg-petrol .nav-item{background-color:#006d68}.bg-petrol-bright .tab-title{background-color:#00968f}.bg-petrol-bright .tab-title.active{background-color:#00968f}.bg-petrol-bright .nav-item{background-color:#00968f}.bg-coral .tab-title{background-color:#9e2a2f}.bg-coral .tab-title.active{background-color:#9e2a2f}.bg-coral .nav-item{background-color:#9e2a2f}.bg-coral-bright .tab-title{background-color:#e03c31}.bg-coral-bright .tab-title.active{background-color:#e03c31}.bg-coral-bright .nav-item{background-color:#e03c31}.bg-olive .tab-title{background-color:#716135}.bg-olive .tab-title.active{background-color:#716135}.bg-olive .nav-item{background-color:#716135}.bg-olive-bright .tab-title{background-color:#aa9d2e}.bg-olive-bright .tab-title.active{background-color:#aa9d2e}.bg-olive-bright .nav-item{background-color:#aa9d2e}.bg-purple .tab-title{background-color:#80276c}.bg-purple .tab-title.active{background-color:#80276c}.bg-purple .nav-item{background-color:#80276c}.bg-purple-bright .tab-title{background-color:#c5299b}.bg-purple-bright .tab-title.active{background-color:#c5299b}.bg-purple-bright .nav-item{background-color:#c5299b}.bg-aubergine .tab-title{background-color:#523178}.bg-aubergine .tab-title.active{background-color:#523178}.bg-aubergine .nav-item{background-color:#523178}.bg-aubergine-bright .tab-title{background-color:#7566a0}.bg-aubergine-bright .tab-title.active{background-color:#7566a0}.bg-aubergine-bright .nav-item{background-color:#7566a0}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button}";
8
- const PostTabHeaderStyle0 = postTabHeaderCss;
9
-
10
- const PostTabHeader = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.tabId = undefined;
14
- this.panel = undefined;
15
- }
16
- validateFor(newValue) {
17
- checkNonEmpty.checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
18
- }
19
- componentWillLoad() {
20
- this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
21
- }
22
- render() {
23
- return (index.h(index.Host, { key: 'eb6ac6a67f4cbf571d38f1de1c8d428a9dea5a53', id: this.tabId, role: "tab", "data-version": _package.version, "aria-selected": "false", tabindex: "-1", class: "tab-title" }, index.h("slot", { key: 'd6559dbcc76ecc8d253fcd4a115b4bc4f78fd496' })));
24
- }
25
- get host() { return index.getElement(this); }
26
- static get watchers() { return {
27
- "panel": ["validateFor"]
28
- }; }
29
- };
30
- PostTabHeader.style = PostTabHeaderStyle0;
31
-
32
- exports.PostTabHeader = PostTabHeader;
@@ -1,27 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- const file = fs.readFileSync('./src/index.ts').toString();
4
- const componentExports = Array.from(file.matchAll(/\/(post-[a-z-]+)';$/gm)).map(m => m[1]);
5
- const componentDefinitions = getComponentDefinitions('./src/components');
6
- function getComponentDefinitions(dir, files = []) {
7
- const fileList = fs.readdirSync(dir);
8
- for (const file of fileList) {
9
- const filePath = `${dir}/${file}`;
10
- const parsed = path.parse(filePath);
11
- if (fs.statSync(filePath).isDirectory()) {
12
- getComponentDefinitions(filePath, files);
13
- }
14
- else if (parsed.ext === '.tsx') {
15
- files.push(parsed.name);
16
- }
17
- }
18
- return files;
19
- }
20
- describe('Index.js', () => {
21
- componentDefinitions.forEach(def => {
22
- const component = componentExports.find(exp => exp === def);
23
- it(`should export component "${def}"`, () => {
24
- expect(component).toBeDefined();
25
- });
26
- });
27
- });