@oiz/stzh-components 3.8.0-beta2 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/cjs/{app-globals-a393bc30.js → app-globals-3c2e0620.js} +2 -2
  2. package/dist/cjs/{app-globals-a393bc30.js.map → app-globals-3c2e0620.js.map} +1 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
  5. package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
  6. package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +12 -11
  7. package/dist/cjs/stzh-checkboxgroup.cjs.entry.js.map +1 -1
  8. package/dist/cjs/stzh-components.cjs.js +2 -2
  9. package/dist/cjs/stzh-contact.cjs.entry.js +1 -1
  10. package/dist/cjs/stzh-contact.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
  12. package/dist/cjs/stzh-dialog.cjs.entry.js.map +1 -1
  13. package/dist/cjs/stzh-geo-ref-data.cjs.entry.js +2 -2
  14. package/dist/cjs/stzh-geo-ref-data.cjs.entry.js.map +1 -1
  15. package/dist/cjs/stzh-upload.cjs.entry.js +34 -8
  16. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  17. package/dist/collection/components/stzh-button/stzh-button.css +13 -4
  18. package/dist/collection/components/stzh-button/stzh-button.stories.js +12 -21
  19. package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +31 -14
  20. package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js.map +1 -1
  21. package/dist/collection/components/stzh-contact/stzh-contact.css +3 -0
  22. package/dist/collection/components/stzh-datepicker/stzh-datepicker.stories.js +1 -1
  23. package/dist/collection/components/stzh-dialog/stzh-dialog.css +2 -1
  24. package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.js +2 -2
  25. package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.js.map +1 -1
  26. package/dist/collection/components/stzh-input/stzh-input.stories.js +1 -1
  27. package/dist/collection/components/stzh-upload/stzh-upload.js +36 -9
  28. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  29. package/dist/components/index.js +1 -1
  30. package/dist/components/{p-4fec83e3.js → p-16940157.js} +2 -2
  31. package/dist/components/{p-4fec83e3.js.map → p-16940157.js.map} +1 -1
  32. package/dist/components/{p-2fe2c81f.js → p-1d21ac10.js} +3 -3
  33. package/dist/components/{p-2fe2c81f.js.map → p-1d21ac10.js.map} +1 -1
  34. package/dist/components/{p-6e8c91f8.js → p-37367a31.js} +4 -4
  35. package/dist/components/{p-6e8c91f8.js.map → p-37367a31.js.map} +1 -1
  36. package/dist/components/{p-74755a90.js → p-408a1562.js} +2 -2
  37. package/dist/components/{p-74755a90.js.map → p-408a1562.js.map} +1 -1
  38. package/dist/components/{p-7e9f4f9f.js → p-497e2db0.js} +2 -2
  39. package/dist/components/{p-7e9f4f9f.js.map → p-497e2db0.js.map} +1 -1
  40. package/dist/components/p-4d000b5b.js +265 -0
  41. package/dist/components/p-4d000b5b.js.map +1 -0
  42. package/dist/components/{p-866cf184.js → p-4e5ccabd.js} +2 -2
  43. package/dist/components/{p-866cf184.js.map → p-4e5ccabd.js.map} +1 -1
  44. package/dist/components/{p-bd7d15a6.js → p-541e8c61.js} +2 -2
  45. package/dist/components/{p-bd7d15a6.js.map → p-541e8c61.js.map} +1 -1
  46. package/dist/components/{p-d4aabf9c.js → p-60b9f94a.js} +3 -3
  47. package/dist/components/p-60b9f94a.js.map +1 -0
  48. package/dist/components/{p-47601c6a.js → p-62e6cd61.js} +3 -3
  49. package/dist/components/{p-47601c6a.js.map → p-62e6cd61.js.map} +1 -1
  50. package/dist/components/{p-13c3319c.js → p-6956beb9.js} +2 -2
  51. package/dist/components/{p-13c3319c.js.map → p-6956beb9.js.map} +1 -1
  52. package/dist/components/{p-9b0832ca.js → p-70f62e8e.js} +3 -3
  53. package/dist/components/{p-9b0832ca.js.map → p-70f62e8e.js.map} +1 -1
  54. package/dist/components/{p-5efa3e34.js → p-96416f66.js} +2 -2
  55. package/dist/components/{p-5efa3e34.js.map → p-96416f66.js.map} +1 -1
  56. package/dist/components/{p-435e0ef4.js → p-c73125e2.js} +3 -3
  57. package/dist/components/{p-435e0ef4.js.map → p-c73125e2.js.map} +1 -1
  58. package/dist/components/{p-d1623b2e.js → p-dd072a49.js} +2 -2
  59. package/dist/components/{p-d1623b2e.js.map → p-dd072a49.js.map} +1 -1
  60. package/dist/components/{p-4039ba55.js → p-e5edc56d.js} +2 -2
  61. package/dist/components/{p-4039ba55.js.map → p-e5edc56d.js.map} +1 -1
  62. package/dist/components/{p-e197115b.js → p-fa14b406.js} +2 -2
  63. package/dist/components/{p-e197115b.js.map → p-fa14b406.js.map} +1 -1
  64. package/dist/components/stzh-actionset.js +1 -1
  65. package/dist/components/stzh-amount.js +2 -2
  66. package/dist/components/stzh-appointments.js +4 -4
  67. package/dist/components/stzh-archivelist.js +1 -1
  68. package/dist/components/stzh-banner.js +1 -1
  69. package/dist/components/stzh-button.js +1 -1
  70. package/dist/components/stzh-calendar.js +1 -1
  71. package/dist/components/stzh-card-searchresult.js +3 -3
  72. package/dist/components/stzh-card-superteaser.js +3 -3
  73. package/dist/components/stzh-card.js +1 -1
  74. package/dist/components/stzh-checkboxgroup.js +13 -12
  75. package/dist/components/stzh-checkboxgroup.js.map +1 -1
  76. package/dist/components/stzh-contact.js +1 -1
  77. package/dist/components/stzh-contact.js.map +1 -1
  78. package/dist/components/stzh-datalist-item.js +1 -1
  79. package/dist/components/stzh-datalist.js +1 -1
  80. package/dist/components/stzh-datamessagelist-item.js +1 -1
  81. package/dist/components/stzh-datatable.js +5 -5
  82. package/dist/components/stzh-datepicker.js +1 -1
  83. package/dist/components/stzh-dialog.js +1 -1
  84. package/dist/components/stzh-disturber.js +1 -1
  85. package/dist/components/stzh-feedreader.js +2 -2
  86. package/dist/components/stzh-gallery.js +1 -1
  87. package/dist/components/stzh-geo-ref-data.js +7 -7
  88. package/dist/components/stzh-geo-ref-data.js.map +1 -1
  89. package/dist/components/stzh-ghettobox.js +1 -1
  90. package/dist/components/stzh-header.js +1 -1
  91. package/dist/components/stzh-http-error.js +1 -1
  92. package/dist/components/stzh-iframe.js +1 -1
  93. package/dist/components/stzh-input.js +1 -1
  94. package/dist/components/stzh-message.js +1 -1
  95. package/dist/components/stzh-microsite-teaserlist.js +3 -3
  96. package/dist/components/stzh-offline-indicator.js +3 -3
  97. package/dist/components/stzh-pagebottom.js +2 -2
  98. package/dist/components/stzh-pagination.js +1 -1
  99. package/dist/components/stzh-panorama.js +1 -1
  100. package/dist/components/stzh-poilist.js +2 -2
  101. package/dist/components/stzh-readspeaker.js +1 -1
  102. package/dist/components/stzh-saptcha.js +2 -2
  103. package/dist/components/stzh-search.js +2 -2
  104. package/dist/components/stzh-share.js +1 -1
  105. package/dist/components/stzh-sitemap.js +3 -3
  106. package/dist/components/stzh-toast.js +1 -1
  107. package/dist/components/stzh-toastbar.js +1 -1
  108. package/dist/components/stzh-upload.js +40 -13
  109. package/dist/components/stzh-upload.js.map +1 -1
  110. package/dist/components/stzh-vbz-majorticker.js +2 -2
  111. package/dist/components/stzh-youtube.js +2 -2
  112. package/dist/esm/{app-globals-6ab4a484.js → app-globals-3dfd8851.js} +2 -2
  113. package/dist/esm/{app-globals-6ab4a484.js.map → app-globals-3dfd8851.js.map} +1 -1
  114. package/dist/esm/loader.js +2 -2
  115. package/dist/esm/stzh-badge_3.entry.js +1 -1
  116. package/dist/esm/stzh-badge_3.entry.js.map +1 -1
  117. package/dist/esm/stzh-checkboxgroup.entry.js +12 -11
  118. package/dist/esm/stzh-checkboxgroup.entry.js.map +1 -1
  119. package/dist/esm/stzh-components.js +2 -2
  120. package/dist/esm/stzh-contact.entry.js +1 -1
  121. package/dist/esm/stzh-contact.entry.js.map +1 -1
  122. package/dist/esm/stzh-dialog.entry.js +1 -1
  123. package/dist/esm/stzh-dialog.entry.js.map +1 -1
  124. package/dist/esm/stzh-geo-ref-data.entry.js +2 -2
  125. package/dist/esm/stzh-geo-ref-data.entry.js.map +1 -1
  126. package/dist/esm/stzh-upload.entry.js +34 -8
  127. package/dist/esm/stzh-upload.entry.js.map +1 -1
  128. package/dist/stzh-components/{p-232d017c.entry.js → p-6a3db3bd.entry.js} +2 -2
  129. package/dist/stzh-components/p-6a3db3bd.entry.js.map +1 -0
  130. package/dist/stzh-components/p-75143e35.entry.js +2 -0
  131. package/dist/stzh-components/p-75143e35.entry.js.map +1 -0
  132. package/dist/stzh-components/p-84cedd61.entry.js +2 -0
  133. package/dist/stzh-components/p-84cedd61.entry.js.map +1 -0
  134. package/dist/stzh-components/p-9f91ca1f.entry.js +2 -0
  135. package/dist/stzh-components/p-9f91ca1f.entry.js.map +1 -0
  136. package/dist/stzh-components/{p-c83239a9.entry.js → p-b25e8b20.entry.js} +2 -2
  137. package/dist/stzh-components/p-b25e8b20.entry.js.map +1 -0
  138. package/dist/stzh-components/p-b54e7053.js +2 -0
  139. package/dist/stzh-components/{p-7036f004.js.map → p-b54e7053.js.map} +1 -1
  140. package/dist/stzh-components/{p-a47a14ef.entry.js → p-b9dc1279.entry.js} +2 -2
  141. package/dist/stzh-components/p-b9dc1279.entry.js.map +1 -0
  142. package/dist/stzh-components/stzh-components.esm.js +1 -1
  143. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  144. package/dist/types/components/stzh-checkboxgroup/stzh-checkboxgroup.d.ts +3 -3
  145. package/dist/types/components/stzh-upload/stzh-upload.d.ts +1 -0
  146. package/dist/types/components.d.ts +8 -0
  147. package/dist/vscode-data.json +4 -0
  148. package/package.json +1 -1
  149. package/dist/components/p-20c7b76b.js +0 -265
  150. package/dist/components/p-20c7b76b.js.map +0 -1
  151. package/dist/components/p-d4aabf9c.js.map +0 -1
  152. package/dist/stzh-components/p-232d017c.entry.js.map +0 -1
  153. package/dist/stzh-components/p-7036f004.js +0 -2
  154. package/dist/stzh-components/p-a47a14ef.entry.js.map +0 -1
  155. package/dist/stzh-components/p-a71fafbd.entry.js +0 -2
  156. package/dist/stzh-components/p-a71fafbd.entry.js.map +0 -1
  157. package/dist/stzh-components/p-aff2ca5f.entry.js +0 -2
  158. package/dist/stzh-components/p-aff2ca5f.entry.js.map +0 -1
  159. package/dist/stzh-components/p-c83239a9.entry.js.map +0 -1
  160. package/dist/stzh-components/p-da2c88a2.entry.js +0 -2
  161. package/dist/stzh-components/p-da2c88a2.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"p-4039ba55.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,k7FAAk7F;;ACyBv8F,MAAM,cAAc,GAAG;EACrB,SAAS,EAAE;IACT,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;IAC/E,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;GACrF;EACD,OAAO,EAAE;IACP,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,UAAU;GACnB;CACF,CAAC;AAEF,MAAM,cAAc,GAAG;EACrB,SAAS,EAAE;IACT,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;IACpF,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;IACtF,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;;;GAGjF;EACD,OAAO,EAAE;IACP,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,SAAS;GAClB;CACF,CAAC;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AAE,IAAI,CAAC,kBAAkB,EAChC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,EAC9B,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,IAAI,EACd,IAAI,EAAC,WAAW,GACH,CACX,CAEJ,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-toast/stzh-toast.scss?tag=stzh-toast&encapsulation=shadow","src/components/stzh-toast/stzh-toast.tsx"],"sourcesContent":["/**\n * @prop --background-color: Background color of toast\n */\n\n:host {\n pointer-events: all;\n\n --label-font-family: #{$toastLabelFontFamily};\n --label-font-weight: #{$toastLabelFontWeight};\n --label-font-style: #{$toastLabelFontStyle};\n\n --label-color: #{$toastLabelColor};\n --background-color: #{$toastBackgroundColor};\n --close-color: #{$toastCloseColor};\n --button-color: #{$toastButtonColor};\n --icon-color: #{$toastIconColor};\n}\n\n:host([type=\"success\"]) {\n --icon-color: #{$toastSuccessIconColor};\n}\n\n:host([type=\"warning\"]) {\n --icon-color: #{$toastWarningIconColor};\n}\n\n:host([type=\"error\"]) {\n --icon-color: #{$toastErrorIconColor};\n}\n\n.stzh-toast {\n position: relative;\n display: flex;\n box-shadow: $boxShadowMessage;\n background-color: var(--background-color);\n border-radius: #{$buttonBorderRadius};\n transition: background-color $baseTransitionAnimationSpeed;\n\n @include highContrast() {\n border: 1px solid Highlight;\n }\n\n &__content {\n flex-grow: 1;\n display: flex;\n gap: space('small');\n padding: space('medium');\n }\n\n &__icon-wrapper {\n flex-shrink: 0;\n display: flex;\n }\n\n &__icon {\n color: var(--icon-color);\n }\n\n &__text-wrapper {\n flex-grow: 1;\n }\n\n &__label {\n @include fontSize('milli');\n color: var(--label-color);\n font-family: var(--label-font-family);\n font-weight: var(--label-font-weight);\n font-style: var(--label-font-style);\n transition: color $baseTransitionAnimationSpeed;\n padding-right: space('xxlarge');\n\n @include mq($from: small) {\n padding-right: space('xxxlarge');\n }\n }\n\n &__close-wrapper {\n flex-shrink: 0;\n }\n\n &__link {\n --stzh-button-tertiary-color: var(--button-color);\n \n display: flex;\n justify-content: flex-end;\n }\n\n &__close[variant=\"tertiary\"] {\n --color: var(--close-color);\n\n position: absolute;\n top: 0;\n right: 0;\n }\n\n /* Has link */\n\n &--has-link &__label:not(:empty) + &__link {\n margin-top: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastOpenEvent,\n StzhToastOpenedEvent,\n StzhToastCloseEvent,\n StzhToastClosedEvent,\n StzhToastType,\n} from \"../../index\";\n\nimport { StzhToastLocalizedText } from \"./stzh-toast.localization\"\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, shimKeyframesAutoValues, stopAnimations } from \"../../utils/animation-utils\";\n\nconst ANIMATION_SHOW = {\n keyframes: [\n { transform: \"translateY(100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n { transform: \"translateY(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n ],\n options: {\n duration: 300,\n easing: \"ease-out\"\n }\n};\n\nconst ANIMATION_HIDE = {\n keyframes: [\n { transform: \"translateX(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n { transform: \"translateX(-100%)\", opacity: \"0\", height: \"auto\", marginBottom: 'auto' },\n { transform: \"translateX(-100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n // { transform: \"translateY(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n // { transform: \"translateY(-100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n ],\n options: {\n duration: 300,\n easing: \"ease-in\"\n }\n};\n\n/**\n * @slot link - Slot for optional stzh-link element\n */\n@Component({\n tag: \"stzh-toast\",\n styleUrl: \"stzh-toast.scss\",\n shadow: true\n})\nexport class StzhToast {\n /** Label */\n @Prop() label: string = \"\";\n\n /** Type */\n @Prop({ reflect: true }) type: StzhToastType = \"info\";\n\n /** Whether to hide close button */\n @Prop({ reflect: true }) hideClose: boolean = false;\n\n /** Open state */\n @Prop({ reflect: true }) open: boolean = true;\n\n /** Whether open animation should be played initially. */\n @Prop() initialOpenAnimation = false;\n\n /** Translation strings. */\n @Prop() localization: StzhToastLocalizedText;\n\n /** Toast open event */\n @Event() stzhOpen: EventEmitter<StzhToastOpenEvent>;\n\n /** Toast opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhToastOpenedEvent>;\n\n /** Toast close event */\n @Event() stzhClose: EventEmitter<StzhToastCloseEvent>;\n\n /** Toast closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhToastClosedEvent>;\n\n @Element() element: HTMLStzhToastElement;\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.rootElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-toast\",\n });\n }\n\n await stopAnimations(this.element);\n\n // this.element.style.willChange = \"transform, opacity, height\";\n this.element.hidden = false;\n\n const computedStyle = getComputedStyle(this.element, null);\n\n await animateTo(\n this.element,\n shimKeyframesAutoValues(ANIMATION_SHOW.keyframes,{\n height: this.element.scrollHeight,\n marginTop: parseInt(computedStyle['margin-top']),\n marginBottom: parseInt(computedStyle['margin-bottom']),\n }),\n ANIMATION_SHOW.options\n );\n\n this.element.style.height = \"auto\";\n this.element.style.opacity = \"1\";\n // this.element.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-toast\"\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-toast\",\n });\n }\n\n await stopAnimations(this.element);\n\n // this.element.style.willChange = \"transform, opacity, height\";\n\n const computedStyle = getComputedStyle(this.element, null);\n\n await animateTo(\n this.element,\n shimKeyframesAutoValues(ANIMATION_HIDE.keyframes, {\n height: this.element.scrollHeight,\n marginTop: parseInt(computedStyle['margin-top']),\n marginBottom: parseInt(computedStyle['margin-bottom']),\n }),\n ANIMATION_HIDE.options\n );\n\n this.element.style.height = \"0px\";\n this.element.style.opacity = \"0\";\n this.element.hidden = true;\n // this.element.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-toast\"\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n return waitForEvent(this.element, \"stzhClosed\");\n }\n\n // private observer: MutationObserver;\n private toggledByMethod: boolean;\n private rootElement: HTMLElement;\n\n private handleLinkSlotchange = () => {\n const host = (this.element.getRootNode() as ShadowRoot)?.host || this.element;\n const buttons = host.querySelectorAll(\n 'stzh-button[slot=\"link\"], [slot=\"link\"] stzh-button'\n );\n\n buttons.forEach((link) => {\n setPropsIfNull(link, {\n size: \"small\",\n variant: \"tertiary\"\n } as HTMLStzhButtonElement)\n });\n }\n\n private onCloseButtonClick = () => {\n this.hide();\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"toast\");\n }\n }\n\n componentDidLoad() {\n if (this.initialOpenAnimation && this.open) {\n // hide first so the open animation will be shown\n this.element.hidden = true;\n this.element.style.height = \"0px\";\n this.element.style.opacity = \"0\";\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n this.openWatcher(true);\n });\n });\n } else {\n this.element.hidden = !this.open;\n this.element.style.height = this.open ? \"auto\" : \"0px\";\n this.element.style.opacity = this.open ? \"1\" : \"0\";\n }\n }\n\n // connectedCallback() {\n // this.init();\n\n // this.observer = new MutationObserver(this.init);\n // this.observer.observe(this.element, {\n // childList: true,\n // subtree: true\n // });\n // }\n\n // disconnectedCallback() {\n // if (this.observer) {\n // this.observer.disconnect();\n // }\n // }\n\n render() {\n const linkUsed = hasSlot(this.element, \"link\");\n\n const classes = {\n \"stzh-toast\": true,\n \"stzh-toast--has-link\": linkUsed,\n \"stzh-toast--has-close-hidden\": this.hideClose,\n [`stzh-toast--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host>\n <div\n ref={(el) => (this.rootElement = el as HTMLElement)}\n class={classes}\n >\n <div class=\"stzh-toast__content\">\n <div class=\"stzh-toast__icon-wrapper\">\n <stzh-icon\n class=\"stzh-toast__icon\"\n name={\n this.type === 'info' && \"info-help-filled\"\n || this.type === 'success' && \"checkmark-circle-filled\"\n || this.type === 'warning' && \"important-warning-filled\"\n || this.type === 'error' && \"warning-filled\"\n }\n ></stzh-icon>\n </div>\n <div class=\"stzh-toast__text-wrapper\">\n <div class=\"stzh-toast__label\">\n {this.label}\n </div>\n <div class=\"stzh-toast__link\">\n <slot name=\"link\" onSlotchange={this.handleLinkSlotchange}></slot>\n </div>\n </div>\n </div>\n\n {!this.hideClose &&\n <div class=\"stzh-toast__close-wrapper\">\n <stzh-button\n class=\"stzh-toast__close\"\n onClick={this.onCloseButtonClick}\n label={this.localization.close}\n variant=\"tertiary\"\n size=\"small\"\n iconOnly={true}\n icon=\"close-big\"\n ></stzh-button>\n </div>\n }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-e5edc56d.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,k7FAAk7F;;ACyBv8F,MAAM,cAAc,GAAG;EACrB,SAAS,EAAE;IACT,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;IAC/E,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,E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AkB,EACxB,IAAI,EACF,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,kBAAkB;WACvC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,yBAAyB;WACpD,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,0BAA0B;WACrD,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,gBAAgB,GAEnC,CACT,EACN,WAAK,KAAK,EAAC,0BAA0B,IACnC,WAAK,KAAK,EAAC,mBAAmB,IAC3B,IAAI,CAAC,KAAK,CACP,EACN,WAAK,KAAK,EAAC,kBAAkB,IAC3B,YAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,oBAAoB,GAAS,CAC9D,CACF,CACF,EAEL,CAAC,IAAI,CAAC,SAAS;MACd,WAAK,KAAK,EAAC,2BAA2B,IACpC,mBACE,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAChC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,EAC9B,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,IAAI,EACd,IAAI,EAAC,WAAW,GACH,CACX,CAEJ,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-toast/stzh-toast.scss?tag=stzh-toast&encapsulation=shadow","src/components/stzh-toast/stzh-toast.tsx"],"sourcesContent":["/**\n * @prop --background-color: Background color of toast\n */\n\n:host {\n pointer-events: all;\n\n --label-font-family: #{$toastLabelFontFamily};\n --label-font-weight: #{$toastLabelFontWeight};\n --label-font-style: #{$toastLabelFontStyle};\n\n --label-color: #{$toastLabelColor};\n --background-color: #{$toastBackgroundColor};\n --close-color: #{$toastCloseColor};\n --button-color: #{$toastButtonColor};\n --icon-color: #{$toastIconColor};\n}\n\n:host([type=\"success\"]) {\n --icon-color: #{$toastSuccessIconColor};\n}\n\n:host([type=\"warning\"]) {\n --icon-color: #{$toastWarningIconColor};\n}\n\n:host([type=\"error\"]) {\n --icon-color: #{$toastErrorIconColor};\n}\n\n.stzh-toast {\n position: relative;\n display: flex;\n box-shadow: $boxShadowMessage;\n background-color: var(--background-color);\n border-radius: #{$buttonBorderRadius};\n transition: background-color $baseTransitionAnimationSpeed;\n\n @include highContrast() {\n border: 1px solid Highlight;\n }\n\n &__content {\n flex-grow: 1;\n display: flex;\n gap: space('small');\n padding: space('medium');\n }\n\n &__icon-wrapper {\n flex-shrink: 0;\n display: flex;\n }\n\n &__icon {\n color: var(--icon-color);\n }\n\n &__text-wrapper {\n flex-grow: 1;\n }\n\n &__label {\n @include fontSize('milli');\n color: var(--label-color);\n font-family: var(--label-font-family);\n font-weight: var(--label-font-weight);\n font-style: var(--label-font-style);\n transition: color $baseTransitionAnimationSpeed;\n padding-right: space('xxlarge');\n\n @include mq($from: small) {\n padding-right: space('xxxlarge');\n }\n }\n\n &__close-wrapper {\n flex-shrink: 0;\n }\n\n &__link {\n --stzh-button-tertiary-color: var(--button-color);\n \n display: flex;\n justify-content: flex-end;\n }\n\n &__close[variant=\"tertiary\"] {\n --color: var(--close-color);\n\n position: absolute;\n top: 0;\n right: 0;\n }\n\n /* Has link */\n\n &--has-link &__label:not(:empty) + &__link {\n margin-top: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastOpenEvent,\n StzhToastOpenedEvent,\n StzhToastCloseEvent,\n StzhToastClosedEvent,\n StzhToastType,\n} from \"../../index\";\n\nimport { StzhToastLocalizedText } from \"./stzh-toast.localization\"\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, shimKeyframesAutoValues, stopAnimations } from \"../../utils/animation-utils\";\n\nconst ANIMATION_SHOW = {\n keyframes: [\n { transform: \"translateY(100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n { transform: \"translateY(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n ],\n options: {\n duration: 300,\n easing: \"ease-out\"\n }\n};\n\nconst ANIMATION_HIDE = {\n keyframes: [\n { transform: \"translateX(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n { transform: \"translateX(-100%)\", opacity: \"0\", height: \"auto\", marginBottom: 'auto' },\n { transform: \"translateX(-100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n // { transform: \"translateY(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n // { transform: \"translateY(-100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n ],\n options: {\n duration: 300,\n easing: \"ease-in\"\n }\n};\n\n/**\n * @slot link - Slot for optional stzh-link element\n */\n@Component({\n tag: \"stzh-toast\",\n styleUrl: \"stzh-toast.scss\",\n shadow: true\n})\nexport class StzhToast {\n /** Label */\n @Prop() label: string = \"\";\n\n /** Type */\n @Prop({ reflect: true }) type: StzhToastType = \"info\";\n\n /** Whether to hide close button */\n @Prop({ reflect: true }) hideClose: boolean = false;\n\n /** Open state */\n @Prop({ reflect: true }) open: boolean = true;\n\n /** Whether open animation should be played initially. */\n @Prop() initialOpenAnimation = false;\n\n /** Translation strings. */\n @Prop() localization: StzhToastLocalizedText;\n\n /** Toast open event */\n @Event() stzhOpen: EventEmitter<StzhToastOpenEvent>;\n\n /** Toast opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhToastOpenedEvent>;\n\n /** Toast close event */\n @Event() stzhClose: EventEmitter<StzhToastCloseEvent>;\n\n /** Toast closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhToastClosedEvent>;\n\n @Element() element: HTMLStzhToastElement;\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.rootElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-toast\",\n });\n }\n\n await stopAnimations(this.element);\n\n // this.element.style.willChange = \"transform, opacity, height\";\n this.element.hidden = false;\n\n const computedStyle = getComputedStyle(this.element, null);\n\n await animateTo(\n this.element,\n shimKeyframesAutoValues(ANIMATION_SHOW.keyframes,{\n height: this.element.scrollHeight,\n marginTop: parseInt(computedStyle['margin-top']),\n marginBottom: parseInt(computedStyle['margin-bottom']),\n }),\n ANIMATION_SHOW.options\n );\n\n this.element.style.height = \"auto\";\n this.element.style.opacity = \"1\";\n // this.element.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-toast\"\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-toast\",\n });\n }\n\n await stopAnimations(this.element);\n\n // this.element.style.willChange = \"transform, opacity, height\";\n\n const computedStyle = getComputedStyle(this.element, null);\n\n await animateTo(\n this.element,\n shimKeyframesAutoValues(ANIMATION_HIDE.keyframes, {\n height: this.element.scrollHeight,\n marginTop: parseInt(computedStyle['margin-top']),\n marginBottom: parseInt(computedStyle['margin-bottom']),\n }),\n ANIMATION_HIDE.options\n );\n\n this.element.style.height = \"0px\";\n this.element.style.opacity = \"0\";\n this.element.hidden = true;\n // this.element.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-toast\"\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n return waitForEvent(this.element, \"stzhClosed\");\n }\n\n // private observer: MutationObserver;\n private toggledByMethod: boolean;\n private rootElement: HTMLElement;\n\n private handleLinkSlotchange = () => {\n const host = (this.element.getRootNode() as ShadowRoot)?.host || this.element;\n const buttons = host.querySelectorAll(\n 'stzh-button[slot=\"link\"], [slot=\"link\"] stzh-button'\n );\n\n buttons.forEach((link) => {\n setPropsIfNull(link, {\n size: \"small\",\n variant: \"tertiary\"\n } as HTMLStzhButtonElement)\n });\n }\n\n private onCloseButtonClick = () => {\n this.hide();\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"toast\");\n }\n }\n\n componentDidLoad() {\n if (this.initialOpenAnimation && this.open) {\n // hide first so the open animation will be shown\n this.element.hidden = true;\n this.element.style.height = \"0px\";\n this.element.style.opacity = \"0\";\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n this.openWatcher(true);\n });\n });\n } else {\n this.element.hidden = !this.open;\n this.element.style.height = this.open ? \"auto\" : \"0px\";\n this.element.style.opacity = this.open ? \"1\" : \"0\";\n }\n }\n\n // connectedCallback() {\n // this.init();\n\n // this.observer = new MutationObserver(this.init);\n // this.observer.observe(this.element, {\n // childList: true,\n // subtree: true\n // });\n // }\n\n // disconnectedCallback() {\n // if (this.observer) {\n // this.observer.disconnect();\n // }\n // }\n\n render() {\n const linkUsed = hasSlot(this.element, \"link\");\n\n const classes = {\n \"stzh-toast\": true,\n \"stzh-toast--has-link\": linkUsed,\n \"stzh-toast--has-close-hidden\": this.hideClose,\n [`stzh-toast--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host>\n <div\n ref={(el) => (this.rootElement = el as HTMLElement)}\n class={classes}\n >\n <div class=\"stzh-toast__content\">\n <div class=\"stzh-toast__icon-wrapper\">\n <stzh-icon\n class=\"stzh-toast__icon\"\n name={\n this.type === 'info' && \"info-help-filled\"\n || this.type === 'success' && \"checkmark-circle-filled\"\n || this.type === 'warning' && \"important-warning-filled\"\n || this.type === 'error' && \"warning-filled\"\n }\n ></stzh-icon>\n </div>\n <div class=\"stzh-toast__text-wrapper\">\n <div class=\"stzh-toast__label\">\n {this.label}\n </div>\n <div class=\"stzh-toast__link\">\n <slot name=\"link\" onSlotchange={this.handleLinkSlotchange}></slot>\n </div>\n </div>\n </div>\n\n {!this.hideClose &&\n <div class=\"stzh-toast__close-wrapper\">\n <stzh-button\n class=\"stzh-toast__close\"\n onClick={this.onCloseButtonClick}\n label={this.localization.close}\n variant=\"tertiary\"\n size=\"small\"\n iconOnly={true}\n icon=\"close-big\"\n ></stzh-button>\n </div>\n }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h, d as Host } from './p-96cf9087.js';
2
2
  import { d as abbreviateText, g as getMeta } from './p-073888ce.js';
3
3
  import { d as defineCustomElement$5 } from './p-011c5d9b.js';
4
- import { d as defineCustomElement$4 } from './p-20c7b76b.js';
4
+ import { d as defineCustomElement$4 } from './p-4d000b5b.js';
5
5
  import { d as defineCustomElement$3 } from './p-6e55dee9.js';
6
6
  import { d as defineCustomElement$2 } from './p-8b576ec4.js';
7
7
  import { d as defineCustomElement$1 } from './p-d2347259.js';
@@ -146,4 +146,4 @@ function defineCustomElement() {
146
146
 
147
147
  export { StzhShare as S, defineCustomElement as d };
148
148
 
149
- //# sourceMappingURL=p-e197115b.js.map
149
+ //# sourceMappingURL=p-fa14b406.js.map
@@ -1 +1 @@
1
- {"file":"p-e197115b.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,0vCAA0vC;;ACc/wC;AACA,MAAM,gBAAgB,GAAG,GAAG,CAAC;MAShB,SAAS;;;;IAqBZ,cAAS,GAAmB,EAAE,CAAC;IAa/B,cAAS,GAAG,CAAC,GAAG,EAAE,KAAK;MAC7B,KAAK,CAAC,cAAc,EAAE,CAAC;MACvB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,sBAAsB,CAAC,CAAC;KACpD,CAAA;;eAhCqB,MAAM,CAAC,QAAQ,CAAC,IAAI;;;oBAYE;MAC1C,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM;KAClD;;EAKD,eAAe,CAAC,QAAiC;IAC/C,IAAI,OAAO,QAAQ,KAAK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,CAAC,OAAO,CAAC,CAAC,GAAG,EAC9B,GAAG,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,8BAA8B,GAAG,UAAU,EAC7E,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,QAAQ,GAAG,OAAO,EACvD,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,EAC/F,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EACtC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,GAClB,CACF,CACZ,CACN,CACE,CACD,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-share/stzh-share.scss?tag=stzh-share&encapsulation=scoped","src/components/stzh-share/stzh-share.tsx"],"sourcesContent":[":host {\n}\n\n.stzh-share {\n &__list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n }\n\n &__item {\n &:not(:last-child) {\n margin-right: space('xxsmall');\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch\n} from \"@stencil/core\";\n\nimport { ShareService } from \"../../index\";\nimport { StzhShareLocalizedText } from \"./stzh-share.localization\"\nimport { getMeta } from '../../utils/utils';\nimport { abbreviateText } from '../../utils/string-utils';\n\n// 280 - URL (always 24) = 256\nconst MAX_TWEET_LENGTH = 256;\n\n/**\n */\n@Component({\n tag: \"stzh-share\",\n styleUrl: \"stzh-share.scss\",\n scoped: true\n})\nexport class StzhShare {\n /** Translation strings */\n @Prop() localization: StzhShareLocalizedText;\n\n /** URL of current site (uses full URL by default) */\n @Prop() url: string = window.location.href;\n\n /** Overwrite mail subject translation */\n @Prop() mailSubject: string;\n\n /** Overwrite mail body translation */\n @Prop() mailBody: string;\n\n /**\n * Array of enabled share buttons.\n * Possible services: `facebook` / `twitter` / `linkedin` / `xing` / `mail`\n */\n @Prop() services: ShareService[] | string = [\n \"mail\", \"facebook\", \"twitter\", \"linkedin\", \"xing\"\n ];\n\n private _services: ShareService[] = [];\n\n @Watch(\"services\")\n servicesWatcher(newValue: ShareService[] | string) {\n if (typeof newValue === \"string\") {\n this._services = JSON.parse(newValue);\n } else {\n this._services = newValue;\n }\n }\n\n @Element() element: HTMLStzhShareElement;\n\n private openPopup = (url, event) => {\n event.preventDefault();\n window.open(url, \"_blank\", \"width=600,height=460\");\n }\n\n async componentWillLoad() {\n this.servicesWatcher(this.services);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"share\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-share\": true\n };\n\n const shareUrl = encodeURIComponent(this.url);\n const mailSubject = encodeURIComponent(this.mailSubject || this.localization.mailSubject);\n const mailBody = encodeURIComponent(\n (this.mailBody || this.localization.mailBody)?.replace(/\\{shareUrl\\}/gi, this.url)\n );\n\n const title = encodeURIComponent(document.title);\n const twitterTitle = encodeURIComponent(abbreviateText(title, MAX_TWEET_LENGTH));\n const description = encodeURIComponent(getMeta(\"description\"));\n\n const serviceData = {\n \"mail\": {\n popup: false,\n blank: false,\n url: `mailto:?subject=${mailSubject}&body=${mailBody}`,\n text: this.localization.shareMail,\n icon: \"mail\"\n },\n \"facebook\": {\n popup: true,\n blank: true,\n url: `https://www.facebook.com/sharer/sharer.php?u=${shareUrl}`,\n text: this.localization.shareFacebook,\n icon: \"facebook\"\n },\n \"twitter\": {\n popup: true,\n blank: true,\n url: `https://twitter.com/intent/tweet?text=${twitterTitle}&url=${shareUrl}`,\n text: this.localization.shareTwitter,\n icon: \"twitter\"\n },\n \"linkedin\": {\n popup: true,\n blank: true,\n url: `https://www.linkedin.com/shareArticle?mini=true&summary=${description}&title=${title}&url=${shareUrl}`,\n text: this.localization.shareLinkedin,\n icon: \"linkedin\"\n },\n \"xing\": {\n popup: true,\n blank: true,\n url: `https://www.xing.com/spi/shares/new?url=${shareUrl}`,\n text: this.localization.shareXing,\n icon: \"xing\"\n }\n };\n\n return (\n <Host>\n <div class={classes}>\n <ul class=\"stzh-share__list\">\n {this._services.map((service) =>\n <li class=\"stzh-share__item\">\n <stzh-tooltip\n content={serviceData[service].text}\n size=\"small\"\n >\n <stzh-button\n class={`stzh-share__button is-${service}`}\n size=\"small\"\n variant=\"tertiary\"\n iconOnly={true}\n href={serviceData[service].url}\n rel={serviceData[service].blank ? \"nofollow noopener noreferrer\" : \"nofollow\"}\n target={serviceData[service].blank ? \"_blank\" : \"_self\"}\n onClick={serviceData[service].popup ? (e) => this.openPopup(serviceData[service].url, e) : null}\n analyticsId={serviceData[service].text}\n icon={serviceData[service].icon}\n ></stzh-button>\n </stzh-tooltip>\n </li>\n )}\n </ul>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-fa14b406.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,0vCAA0vC;;ACc/wC;AACA,MAAM,gBAAgB,GAAG,GAAG,CAAC;MAShB,SAAS;;;;IAqBZ,cAAS,GAAmB,EAAE,CAAC;IAa/B,cAAS,GAAG,CAAC,GAAG,EAAE,KAAK;MAC7B,KAAK,CAAC,cAAc,EAAE,CAAC;MACvB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,sBAAsB,CAAC,CAAC;KACpD,CAAA;;eAhCqB,MAAM,CAAC,QAAQ,CAAC,IAAI;;;oBAYE;MAC1C,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM;KAClD;;EAKD,eAAe,CAAC,QAAiC;IAC/C,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;MAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;KACvC;SAAM;MACL,IAA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AAU,EAC7E,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,QAAQ,GAAG,OAAO,EACvD,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,EAC/F,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EACtC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,GAClB,CACF,CACZ,CACN,CACE,CACD,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-share/stzh-share.scss?tag=stzh-share&encapsulation=scoped","src/components/stzh-share/stzh-share.tsx"],"sourcesContent":[":host {\n}\n\n.stzh-share {\n &__list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n }\n\n &__item {\n &:not(:last-child) {\n margin-right: space('xxsmall');\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch\n} from \"@stencil/core\";\n\nimport { ShareService } from \"../../index\";\nimport { StzhShareLocalizedText } from \"./stzh-share.localization\"\nimport { getMeta } from '../../utils/utils';\nimport { abbreviateText } from '../../utils/string-utils';\n\n// 280 - URL (always 24) = 256\nconst MAX_TWEET_LENGTH = 256;\n\n/**\n */\n@Component({\n tag: \"stzh-share\",\n styleUrl: \"stzh-share.scss\",\n scoped: true\n})\nexport class StzhShare {\n /** Translation strings */\n @Prop() localization: StzhShareLocalizedText;\n\n /** URL of current site (uses full URL by default) */\n @Prop() url: string = window.location.href;\n\n /** Overwrite mail subject translation */\n @Prop() mailSubject: string;\n\n /** Overwrite mail body translation */\n @Prop() mailBody: string;\n\n /**\n * Array of enabled share buttons.\n * Possible services: `facebook` / `twitter` / `linkedin` / `xing` / `mail`\n */\n @Prop() services: ShareService[] | string = [\n \"mail\", \"facebook\", \"twitter\", \"linkedin\", \"xing\"\n ];\n\n private _services: ShareService[] = [];\n\n @Watch(\"services\")\n servicesWatcher(newValue: ShareService[] | string) {\n if (typeof newValue === \"string\") {\n this._services = JSON.parse(newValue);\n } else {\n this._services = newValue;\n }\n }\n\n @Element() element: HTMLStzhShareElement;\n\n private openPopup = (url, event) => {\n event.preventDefault();\n window.open(url, \"_blank\", \"width=600,height=460\");\n }\n\n async componentWillLoad() {\n this.servicesWatcher(this.services);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"share\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-share\": true\n };\n\n const shareUrl = encodeURIComponent(this.url);\n const mailSubject = encodeURIComponent(this.mailSubject || this.localization.mailSubject);\n const mailBody = encodeURIComponent(\n (this.mailBody || this.localization.mailBody)?.replace(/\\{shareUrl\\}/gi, this.url)\n );\n\n const title = encodeURIComponent(document.title);\n const twitterTitle = encodeURIComponent(abbreviateText(title, MAX_TWEET_LENGTH));\n const description = encodeURIComponent(getMeta(\"description\"));\n\n const serviceData = {\n \"mail\": {\n popup: false,\n blank: false,\n url: `mailto:?subject=${mailSubject}&body=${mailBody}`,\n text: this.localization.shareMail,\n icon: \"mail\"\n },\n \"facebook\": {\n popup: true,\n blank: true,\n url: `https://www.facebook.com/sharer/sharer.php?u=${shareUrl}`,\n text: this.localization.shareFacebook,\n icon: \"facebook\"\n },\n \"twitter\": {\n popup: true,\n blank: true,\n url: `https://twitter.com/intent/tweet?text=${twitterTitle}&url=${shareUrl}`,\n text: this.localization.shareTwitter,\n icon: \"twitter\"\n },\n \"linkedin\": {\n popup: true,\n blank: true,\n url: `https://www.linkedin.com/shareArticle?mini=true&summary=${description}&title=${title}&url=${shareUrl}`,\n text: this.localization.shareLinkedin,\n icon: \"linkedin\"\n },\n \"xing\": {\n popup: true,\n blank: true,\n url: `https://www.xing.com/spi/shares/new?url=${shareUrl}`,\n text: this.localization.shareXing,\n icon: \"xing\"\n }\n };\n\n return (\n <Host>\n <div class={classes}>\n <ul class=\"stzh-share__list\">\n {this._services.map((service) =>\n <li class=\"stzh-share__item\">\n <stzh-tooltip\n content={serviceData[service].text}\n size=\"small\"\n >\n <stzh-button\n class={`stzh-share__button is-${service}`}\n size=\"small\"\n variant=\"tertiary\"\n iconOnly={true}\n href={serviceData[service].url}\n rel={serviceData[service].blank ? \"nofollow noopener noreferrer\" : \"nofollow\"}\n target={serviceData[service].blank ? \"_blank\" : \"_self\"}\n onClick={serviceData[service].popup ? (e) => this.openPopup(serviceData[service].url, e) : null}\n analyticsId={serviceData[service].text}\n icon={serviceData[service].icon}\n ></stzh-button>\n </stzh-tooltip>\n </li>\n )}\n </ul>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { S as StzhActionset$1, d as defineCustomElement$1 } from './p-13c3319c.js';
1
+ import { S as StzhActionset$1, d as defineCustomElement$1 } from './p-6956beb9.js';
2
2
 
3
3
  const StzhActionset = StzhActionset$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,10 +1,10 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-96cf9087.js';
2
2
  import { d as defineCustomElement$9 } from './p-011c5d9b.js';
3
- import { d as defineCustomElement$8 } from './p-20c7b76b.js';
3
+ import { d as defineCustomElement$8 } from './p-4d000b5b.js';
4
4
  import { d as defineCustomElement$7 } from './p-a11f7571.js';
5
5
  import { d as defineCustomElement$6 } from './p-8ed7a61b.js';
6
6
  import { d as defineCustomElement$5 } from './p-6e55dee9.js';
7
- import { d as defineCustomElement$4 } from './p-bd7d15a6.js';
7
+ import { d as defineCustomElement$4 } from './p-541e8c61.js';
8
8
  import { d as defineCustomElement$3 } from './p-d5ab066a.js';
9
9
  import { d as defineCustomElement$2 } from './p-8b576ec4.js';
10
10
 
@@ -1,13 +1,13 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-96cf9087.js';
2
2
  import { t as tc } from './p-f8d9bc8a.js';
3
- import { d as defineCustomElement$b, p as parseISODate, a as printISODate } from './p-4fec83e3.js';
3
+ import { d as defineCustomElement$b, p as parseISODate, a as printISODate } from './p-16940157.js';
4
4
  import { h as hasSlot } from './p-073888ce.js';
5
5
  import { d as defineCustomElement$d } from './p-011c5d9b.js';
6
- import { d as defineCustomElement$c } from './p-20c7b76b.js';
7
- import { d as defineCustomElement$a } from './p-6e8c91f8.js';
6
+ import { d as defineCustomElement$c } from './p-4d000b5b.js';
7
+ import { d as defineCustomElement$a } from './p-37367a31.js';
8
8
  import { d as defineCustomElement$9 } from './p-8ed7a61b.js';
9
9
  import { d as defineCustomElement$8 } from './p-6e55dee9.js';
10
- import { d as defineCustomElement$7 } from './p-bd7d15a6.js';
10
+ import { d as defineCustomElement$7 } from './p-541e8c61.js';
11
11
  import { d as defineCustomElement$6 } from './p-435413fc.js';
12
12
  import { d as defineCustomElement$5 } from './p-d5ab066a.js';
13
13
  import { d as defineCustomElement$4 } from './p-261d55a4.js';
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment, d as Host } from './p-96cf9087.js';
2
2
  import { d as defineCustomElement$7 } from './p-011c5d9b.js';
3
- import { d as defineCustomElement$6 } from './p-20c7b76b.js';
3
+ import { d as defineCustomElement$6 } from './p-4d000b5b.js';
4
4
  import { d as defineCustomElement$5 } from './p-b107b48c.js';
5
5
  import { d as defineCustomElement$4 } from './p-3aa7c37c.js';
6
6
  import { d as defineCustomElement$3 } from './p-6e55dee9.js';
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-96cf9087.js';
2
2
  import { d as defineCustomElement$4 } from './p-011c5d9b.js';
3
- import { d as defineCustomElement$3 } from './p-20c7b76b.js';
3
+ import { d as defineCustomElement$3 } from './p-4d000b5b.js';
4
4
  import { d as defineCustomElement$2 } from './p-6e55dee9.js';
5
5
 
6
6
  const stzhBannerCss = ".sc-stzh-banner-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-banner-h,[stzh-hidden].sc-stzh-banner-h{display:none}.sc-stzh-banner-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-banner-h *.sc-stzh-banner,.sc-stzh-banner-h *.sc-stzh-banner::before,.sc-stzh-banner-h *.sc-stzh-banner::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-banner-h .has-focus.sc-stzh-banner{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-banner-h .stzh-fylingfocus-focused.sc-stzh-banner{outline-style:none !important}.sc-stzh-banner-h .stzh-fylingfocus-focused.sc-stzh-banner::-moz-focus-inner{border:0 !important}.sc-stzh-banner-h{--stzh-flyingfocus-color:var(--stzh-base-invert-color);--stzh-base-color:var(--stzh-base-invert-color);--stzh-base-lead-color:var(--stzh-base-invert-color);--stzh-base-border-color:var(--stzh-base-invert-color);--stzh-heading-color:var(--stzh-base-invert-color);--stzh-link-color:var(--stzh-base-invert-color);--stzh-link-hover-color:var(--stzh-base-invert-color);--stzh-button-color:var(--stzh-color-primary);--stzh-button-background-color:var(--stzh-base-invert-color);--stzh-button-hover-color:var(--stzh-color-primary);--stzh-button-hover-background-color:var(--stzh-color-white80op);--stzh-button-disabled-color:var(--stzh-color-primary);--stzh-button-disabled-background-color:var(--stzh-color-white40op);--stzh-button-secondary-color:var(--stzh-base-invert-color);--stzh-button-secondary-background-color:var(--stzh-color-white40op);--stzh-button-secondary-hover-color:var(--stzh-base-invert-color);--stzh-button-secondary-hover-background-color:var(--stzh-color-white30op);--stzh-button-secondary-disabled-color:var(--stzh-color-white60op);--stzh-button-secondary-disabled-background-color:var(--stzh-color-white40op);--stzh-button-tertiary-color:var(--stzh-base-invert-color);--stzh-button-tertiary-hover-color:var(--stzh-base-invert-color);--stzh-button-tertiary-hover-background-color:var(--stzh-color-white20op);--stzh-button-tertiary-disabled-color:var(--stzh-color-white70op);--stzh-button-active-color:var(--stzh-color-primary);--stzh-button-active-background-color:var(--stzh-color-white80op);--stzh-button-active-hover-color:var(--stzh-color-primary);--stzh-button-active-hover-background-color:var(--stzh-color-white80op);--background-color:var(--stzh-color-error60);--icon-color:var(--stzh-base-invert-color);--close-color:var(--stzh-base-invert-color);--label-color:var(--stzh-base-invert-color)}.stzh-banner.sc-stzh-banner{position:relative;box-shadow:var(--stzh-box-shadow-message);border-radius:var(--stzh-button-border-radius);background-color:var(--background-color)}.stzh-banner__container.sc-stzh-banner{margin-left:1.25rem;margin-right:1.25rem;padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall);padding-right:var(--stzh-space-xxxxlarge);margin-right:0}@media screen and (min-width: 600px){.stzh-banner__container.sc-stzh-banner{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 900px){.stzh-banner__container.sc-stzh-banner{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-banner__container.sc-stzh-banner{margin-left:4rem;margin-right:4rem}}@media screen and (min-width: 1600px){.stzh-banner__container.sc-stzh-banner{margin-left:auto;margin-right:auto;max-width:84.25rem}}@media screen and (min-width: 600px){.stzh-banner__container.sc-stzh-banner{padding-top:var(--stzh-space-small)}}@media screen and (min-width: 900px){.stzh-banner__container.sc-stzh-banner{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-banner__container.sc-stzh-banner{padding-top:var(--stzh-space-xlarge)}}@media screen and (min-width: 600px){.stzh-banner__container.sc-stzh-banner{padding-bottom:var(--stzh-space-small)}}@media screen and (min-width: 900px){.stzh-banner__container.sc-stzh-banner{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-banner__container.sc-stzh-banner{padding-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 600px){.stzh-banner__container.sc-stzh-banner{padding-right:var(--stzh-space-big)}}@media screen and (min-width: 900px){.stzh-banner__container.sc-stzh-banner{padding-right:var(--stzh-space-big)}}@media screen and (min-width: 1260px){.stzh-banner__container.sc-stzh-banner{padding-right:var(--stzh-space-huge)}}@media screen and (min-width: 600px){.stzh-banner__container.sc-stzh-banner{margin-right:0px}}@media screen and (min-width: 900px){.stzh-banner__container.sc-stzh-banner{margin-right:0px}}@media screen and (min-width: 1260px){.stzh-banner__container.sc-stzh-banner{margin-right:0px}}@media screen and (min-width: 1600px){.stzh-banner__container.sc-stzh-banner{margin-right:auto}}.stzh-banner__content.sc-stzh-banner{gap:var(--stzh-space-xsmall);display:flex}@media screen and (min-width: 600px){.stzh-banner__content.sc-stzh-banner{gap:var(--stzh-space-small)}}@media screen and (min-width: 900px){.stzh-banner__content.sc-stzh-banner{gap:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-banner__content.sc-stzh-banner{gap:var(--stzh-space-xlarge)}}.stzh-banner__icon-wrapper.sc-stzh-banner{display:flex;flex-shrink:0}.stzh-banner__icon.sc-stzh-banner{color:var(--icon-color)}.stzh-banner__text-wrapper.sc-stzh-banner{display:flex;flex-direction:column;flex-grow:1}@media screen and (min-width: 900px){.stzh-banner__text-wrapper.sc-stzh-banner{column-gap:var(--stzh-space-xsmall);row-gap:var(--stzh-space-xxsmall);flex-wrap:wrap;flex-direction:row}}@media screen and (min-width: 900px) and (min-width: 600px){.stzh-banner__text-wrapper.sc-stzh-banner{column-gap:var(--stzh-space-small)}}@media screen and (min-width: 900px) and (min-width: 900px){.stzh-banner__text-wrapper.sc-stzh-banner{column-gap:var(--stzh-space-medium)}}@media screen and (min-width: 900px) and (min-width: 1260px){.stzh-banner__text-wrapper.sc-stzh-banner{column-gap:var(--stzh-space-xlarge)}}@media screen and (min-width: 900px) and (min-width: 900px){.stzh-banner__text-wrapper.sc-stzh-banner{row-gap:var(--stzh-space-xsmall)}}@media screen and (min-width: 900px) and (min-width: 1260px){.stzh-banner__text-wrapper.sc-stzh-banner{row-gap:var(--stzh-space-small)}}.stzh-banner__label.sc-stzh-banner{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);color:var(--label-color)}@media screen and (min-width: 600px){.stzh-banner__label.sc-stzh-banner{font-size:var(--stzh-font-centi-font-size);line-height:var(--stzh-font-centi-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}}.stzh-banner__close[variant=tertiary].sc-stzh-banner{--color:var(--close-color);position:absolute;top:0;right:0}@media screen and (min-width: 600px){.stzh-banner__close[variant=tertiary].sc-stzh-banner{top:0.625rem;right:0.625rem}}";
@@ -1,4 +1,4 @@
1
- import { S as StzhButton$1, d as defineCustomElement$1 } from './p-20c7b76b.js';
1
+ import { S as StzhButton$1, d as defineCustomElement$1 } from './p-4d000b5b.js';
2
2
 
3
3
  const StzhButton = StzhButton$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as StzhCalendar$1, d as defineCustomElement$1 } from './p-4fec83e3.js';
1
+ import { S as StzhCalendar$1, d as defineCustomElement$1 } from './p-16940157.js';
2
2
 
3
3
  const StzhCalendar = StzhCalendar$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -2,10 +2,10 @@ import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment, d as Ho
2
2
  import { h as hasSlot } from './p-073888ce.js';
3
3
  import { d as defineCustomElement$e } from './p-011c5d9b.js';
4
4
  import { d as defineCustomElement$d } from './p-d8bf4db5.js';
5
- import { d as defineCustomElement$c } from './p-20c7b76b.js';
5
+ import { d as defineCustomElement$c } from './p-4d000b5b.js';
6
6
  import { d as defineCustomElement$b } from './p-b107b48c.js';
7
- import { d as defineCustomElement$a } from './p-47601c6a.js';
8
- import { d as defineCustomElement$9 } from './p-5efa3e34.js';
7
+ import { d as defineCustomElement$a } from './p-62e6cd61.js';
8
+ import { d as defineCustomElement$9 } from './p-96416f66.js';
9
9
  import { d as defineCustomElement$8 } from './p-6e55dee9.js';
10
10
  import { d as defineCustomElement$7 } from './p-435413fc.js';
11
11
  import { d as defineCustomElement$6 } from './p-4c7f2809.js';
@@ -2,10 +2,10 @@ import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment, d as Ho
2
2
  import { h as hasSlot } from './p-073888ce.js';
3
3
  import { d as defineCustomElement$e } from './p-011c5d9b.js';
4
4
  import { d as defineCustomElement$d } from './p-d8bf4db5.js';
5
- import { d as defineCustomElement$c } from './p-20c7b76b.js';
5
+ import { d as defineCustomElement$c } from './p-4d000b5b.js';
6
6
  import { d as defineCustomElement$b } from './p-b107b48c.js';
7
- import { d as defineCustomElement$a } from './p-47601c6a.js';
8
- import { d as defineCustomElement$9 } from './p-5efa3e34.js';
7
+ import { d as defineCustomElement$a } from './p-62e6cd61.js';
8
+ import { d as defineCustomElement$9 } from './p-96416f66.js';
9
9
  import { d as defineCustomElement$8 } from './p-6e55dee9.js';
10
10
  import { d as defineCustomElement$7 } from './p-435413fc.js';
11
11
  import { d as defineCustomElement$6 } from './p-4c7f2809.js';
@@ -1,4 +1,4 @@
1
- import { S as StzhCard$1, d as defineCustomElement$1 } from './p-9b0832ca.js';
1
+ import { S as StzhCard$1, d as defineCustomElement$1 } from './p-70f62e8e.js';
2
2
 
3
3
  const StzhCard = StzhCard$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -21,12 +21,12 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
21
21
  this.init = () => {
22
22
  // update checkboxes
23
23
  this.checkboxes = Array.from(this.element.querySelectorAll("stzh-checkbox"));
24
+ this.updateCheckboxesProperty("hide-optional", true);
24
25
  this.updateCheckboxesProperty("a11y-describedby", `${this.checkboxgroupId}-description`);
25
26
  this.updateCheckboxesProperty("invalid", this.invalid || this.errorUsed);
26
27
  this.watchValue(this.value);
27
28
  this.watchName(this.name);
28
29
  this.watchDisabled(this.disabled);
29
- this.watchHideOptional(this.hideOptional);
30
30
  };
31
31
  this.localization = undefined;
32
32
  this.disabled = false;
@@ -34,6 +34,7 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
34
34
  this.legend = undefined;
35
35
  this.hideLegend = false;
36
36
  this.invalid = false;
37
+ this.required = false;
37
38
  this.hideOptional = false;
38
39
  this.value = "";
39
40
  this.defaultValue = [];
@@ -51,9 +52,6 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
51
52
  watchDisabled(newValue) {
52
53
  this.updateCheckboxesProperty("disabled", newValue);
53
54
  }
54
- watchHideOptional(newValue) {
55
- this.updateCheckboxesProperty("hideOptional", newValue);
56
- }
57
55
  watchValue(newValue) {
58
56
  if (typeof newValue === "string") {
59
57
  this._value = JSON.parse(newValue);
@@ -115,13 +113,13 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
115
113
  this.value = this._value;
116
114
  this.stzhChange.emit({
117
115
  component: "stzh-checkboxgroup",
118
- value: this._value,
116
+ value: this._value
119
117
  });
120
118
  }
121
119
  }
122
120
  get errorUsed() {
123
121
  var _a;
124
- return hasSlot(this.element, 'error') || ((_a = this._error) === null || _a === void 0 ? void 0 : _a.length) > 0;
122
+ return hasSlot(this.element, "error") || ((_a = this._error) === null || _a === void 0 ? void 0 : _a.length) > 0;
125
123
  }
126
124
  updateCheckboxesProperty(prop, value) {
127
125
  this.checkboxes.forEach((checkbox) => {
@@ -145,7 +143,7 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
145
143
  this.errorWatcher(this.error);
146
144
  this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);
147
145
  if (!this.localization) {
148
- this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'checkboxgroup');
146
+ this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, "checkboxgroup");
149
147
  }
150
148
  }
151
149
  componentShouldUpdate(_newValue, _oldValue, prop) {
@@ -177,8 +175,8 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
177
175
  }
178
176
  }
179
177
  render() {
180
- const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;
181
- const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;
178
+ const descriptionUsed = hasSlot(this.element, "description") || !!this.description;
179
+ const descriptionLongUsed = hasSlot(this.element, "description-long") || !!this.descriptionLong;
182
180
  const classes = {
183
181
  "stzh-checkboxgroup": true,
184
182
  "stzh-checkboxgroup--has-description": descriptionUsed,
@@ -190,13 +188,16 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
190
188
  [`stzh-checkboxgroup--direction-${this.direction}`]: !!this.direction
191
189
  };
192
190
  return (h(Host, { "is-invalid": this.invalid || this.errorUsed }, h("fieldset", { class: classes }, this.legend &&
193
- h("legend", { class: "stzh-checkboxgroup__legend" }, this.legend), h("div", { class: "stzh-checkboxgroup__fields" }, h("slot", null)), h(StzhInputDescription, { classPrefix: "stzh-checkboxgroup", id: `${this.checkboxgroupId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongTitle: this.descriptionLongTitle, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel }))));
191
+ h("legend", { class: "stzh-checkboxgroup__legend" }, this.legend, !this.hideOptional && (h("span", { class: "stzh-checkboxgroup__marker" }, h("span", { class: "stzh-checkboxgroup__marker-symbol", "aria-hidden": "true" }, this.required
192
+ ? this.localization.$globals.requiredFieldMarker
193
+ : this.localization.$globals.optionalFieldMarker), h("span", { class: "stzh-checkboxgroup__marker-text" }, this.required
194
+ ? this.localization.$globals.requiredFieldText
195
+ : this.localization.$globals.optionalFieldText)))), h("div", { class: "stzh-checkboxgroup__fields" }, h("slot", null)), h(StzhInputDescription, { classPrefix: "stzh-checkboxgroup", id: `${this.checkboxgroupId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongTitle: this.descriptionLongTitle, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel }))));
194
196
  }
195
197
  get element() { return this; }
196
198
  static get watchers() { return {
197
199
  "name": ["watchName"],
198
200
  "disabled": ["watchDisabled"],
199
- "hideOptional": ["watchHideOptional"],
200
201
  "value": ["watchValue"],
201
202
  "error": ["errorWatcher"],
202
203
  "preventUpdateProperties": ["preventUpdatePropertiesWatcher"]
@@ -209,6 +210,7 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
209
210
  "legend": [1],
210
211
  "hideLegend": [516, "hide-legend"],
211
212
  "invalid": [516],
213
+ "required": [516],
212
214
  "hideOptional": [516, "hide-optional"],
213
215
  "value": [1025],
214
216
  "defaultValue": [1040],
@@ -222,7 +224,6 @@ const StzhCheckboxgroup$1 = /*@__PURE__*/ proxyCustomElement(class StzhCheckboxg
222
224
  }, [[4, "reset", "resetListener"], [2, "stzhChange", "onChange"]], {
223
225
  "name": ["watchName"],
224
226
  "disabled": ["watchDisabled"],
225
- "hideOptional": ["watchHideOptional"],
226
227
  "value": ["watchValue"],
227
228
  "error": ["errorWatcher"],
228
229
  "preventUpdateProperties": ["preventUpdatePropertiesWatcher"]
@@ -1 +1 @@
1
- {"file":"stzh-checkboxgroup.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,s7IAAs7I;;ACoBn9I,IAAI,oBAAoB,GAAG,CAAC,CAAC;MAchBA,mBAAiB;;;;;IAwBpB,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,OAAO,IACrB,IAAI,CAAC,MAAM;MACV,cAAQ,KAAK,EAAC,4BAA4B,IACvC,IAAI,CAAC,MAAM,CACL,EAEX,WAAK,KAAK,EAAC,4BAA4B,IACrC,eAAa,CACT,EACN,EAAC,oBAAoB,IACnB,WAAW,EAAC,oBAAoB,EAChC,EAAE,EAAE,GAAG,IAAI,CAAC,eAAe,cAAc,EACzC,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,GACnE,CACO,CACN,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhCheckboxgroup"],"sources":["src/components/stzh-checkboxgroup/stzh-checkboxgroup.scss?tag=stzh-checkboxgroup&encapsulation=scoped","src/components/stzh-checkboxgroup/stzh-checkboxgroup.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-checkboxgroup {\n @include input-description;\n margin: 0;\n padding: 0;\n border: none;\n\n &__fields {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: space('medium');\n }\n\n &__legend {\n @include font('heavy');\n @include fontSize('micro');\n color: $headingColor;\n padding: 0;\n margin-bottom: space('xsmall');\n }\n\n &--hide-legend &__legend {\n @include visuallyhidden;\n }\n\n &--direction-horizontal &__fields {\n flex-wrap: wrap;\n flex-direction: row;\n row-gap: space('medium');\n column-gap: space('xxlarge');\n }\n}\n","import {\n Host,\n Component,\n Prop,\n Element,\n Watch,\n Event,\n h,\n Listen,\n EventEmitter,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\nimport { StzhCheckboxChangeEvent, StzhCheckboxgroupChangeEvent } from \"../../index\";\nimport { camelCase } from \"../../utils/string-utils\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nlet checkboxgroupCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-checkboxgroup\",\n styleUrl: \"stzh-checkboxgroup.scss\",\n scoped: true\n})\nexport class StzhCheckboxgroup {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input checkbox elements */\n @Prop({ reflect: true }) name: string;\n\n /** The legend */\n @Prop() legend: string;\n\n /** Hide legend to show only for screenreaders */\n @Prop({ reflect: true }) hideLegend: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Hide `(optional)` label */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** The selected values of the checkboxgroup */\n @Prop({ mutable: true }) value: string[] | string = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string[] = [];\n\n /** Direction */\n @Prop({ reflect: true }) direction: \"vertical\" | \"horizontal\" = \"vertical\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Current checked checkbox elements (readonly) */\n @Prop() checkedCheckbox: HTMLStzhCheckboxElement[] | null = null;\n\n /** Prevent updating certain properties of radio elements (possible values inside array: disabled, invalid) */\n @Prop() preventUpdateProperties: string[] | string = [];\n private _preventUpdateProperties: string[] = [];\n\n /** Host element */\n @Element() element: HTMLElement;\n\n @Watch(\"name\")\n watchName(newValue: string) {\n this.updateCheckboxesProperty(\"name\", newValue);\n }\n\n @Watch(\"disabled\")\n watchDisabled(newValue: boolean) {\n this.updateCheckboxesProperty(\"disabled\", newValue);\n }\n\n @Watch(\"hideOptional\")\n watchHideOptional(newValue: boolean) {\n this.updateCheckboxesProperty(\"hideOptional\", newValue)\n }\n\n @Watch(\"value\")\n watchValue(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._value = JSON.parse(newValue);\n } else {\n this._value = newValue;\n }\n\n if (JSON.stringify(this._value) !== JSON.stringify(this.value)) {\n this.value = this._value;\n }\n\n this.updateCheckedCheckboxByValue(this._value);\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n @Watch(\"preventUpdateProperties\")\n preventUpdatePropertiesWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._preventUpdateProperties = JSON.parse(newValue);\n } else {\n this._preventUpdateProperties = newValue;\n }\n }\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhCheckboxgroupChangeEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Listen(\"stzhChange\", {capture: true})\n onChange(event: CustomEvent<StzhCheckboxChangeEvent>) {\n if (event.detail.component === \"stzh-checkbox\") {\n if (event.detail.checked) {\n this._value.push(event.detail.value);\n } else {\n this._value = this._value.filter(value => value !== event.detail.value);\n }\n // stop propagating checkbox change event otherwise angular control value accessor won't work\n event.stopPropagation();\n this.value = this._value;\n this.stzhChange.emit({\n component: \"stzh-checkboxgroup\",\n value: this._value,\n });\n }\n }\n\n private get errorUsed() {\n return hasSlot(this.element, 'error') || this._error?.length > 0;\n }\n\n /** Checkbox elements */\n private checkboxes: HTMLStzhCheckboxElement[];\n private checkboxgroupId: string;\n private observer: MutationObserver;\n\n private updateCheckboxesProperty(prop: string, value: any) {\n this.checkboxes.forEach((checkbox: HTMLStzhCheckboxElement) => {\n if (prop === \"disabled\") {\n // Only set the disabled if the checkbox is not already disabled\n if (!checkbox.disabled) {\n checkbox.disabled = value;\n }\n } else if (prop === \"name\" || (this._preventUpdateProperties.indexOf(prop) === -1)) {\n checkbox[camelCase(prop)] = value;\n }\n });\n }\n\n private updateCheckedCheckboxByValue(value: string[]) {\n this.checkedCheckbox = this.checkboxes.filter(checkbox => value.indexOf(checkbox.value) > -1);\n this.checkboxes.forEach(checkbox => checkbox.checked = value.indexOf(checkbox.value) > -1);\n }\n\n private handleReset = async () => {\n this.value = [...this.defaultValue];\n }\n\n private init = () => {\n // update checkboxes\n this.checkboxes = Array.from(this.element.querySelectorAll(\"stzh-checkbox\"));\n this.updateCheckboxesProperty(\"a11y-describedby\", `${this.checkboxgroupId}-description`);\n this.updateCheckboxesProperty(\"invalid\", this.invalid || this.errorUsed);\n\n this.watchValue(this.value);\n this.watchName(this.name);\n this.watchDisabled(this.disabled);\n this.watchHideOptional(this.hideOptional);\n }\n\n async componentWillLoad() {\n this.checkboxgroupId = `stzh-checkboxgroup-${checkboxgroupCounter++}`;\n this.errorWatcher(this.error);\n this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'checkboxgroup');\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return prop !== \"checkedCheckbox\";\n }\n\n componentDidRender() {\n this.init();\n }\n\n componentDidLoad() {\n this.defaultValue = this.defaultValue.length > 0 ? this.defaultValue : [...this._value];\n }\n\n connectedCallback() {\n if (!this.value.length) {\n this.checkboxes = Array.from(this.element.querySelectorAll(\"stzh-checkbox\"));\n\n // try to find checkboxes that might have checked set to true\n this.value = this.checkboxes\n .filter(checkbox => checkbox.checked)\n .map(checkbox => checkbox.value);\n }\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n\n const classes = {\n \"stzh-checkboxgroup\": true,\n \"stzh-checkboxgroup--has-description\": descriptionUsed,\n \"stzh-checkboxgroup--has-description-long\": descriptionLongUsed,\n \"stzh-checkboxgroup--has-error\": this.errorUsed,\n \"stzh-checkboxgroup--is-disabled\": this.disabled,\n \"stzh-checkboxgroup--is-invalid\": this.invalid || this.errorUsed,\n \"stzh-checkboxgroup--hide-legend\": this.hideLegend,\n [`stzh-checkboxgroup--direction-${this.direction}`]: !!this.direction\n };\n\n return (\n <Host is-invalid={this.invalid || this.errorUsed}>\n <fieldset class={classes}>\n {this.legend &&\n <legend class=\"stzh-checkboxgroup__legend\">\n {this.legend}\n </legend>\n }\n <div class=\"stzh-checkboxgroup__fields\">\n <slot></slot>\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-checkboxgroup\"\n id={`${this.checkboxgroupId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </fieldset>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"stzh-checkboxgroup.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,s7IAAs7I;;ACSn9I,IAAI,oBAAoB,GAAG,CAAC,CAAC;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4BAA4B,IACvC,IAAI,CAAC,MAAM,EACX,CAAC,IAAI,CAAC,YAAY,KACjB,YAAM,KAAK,EAAC,4BAA4B,IACtC,YAAM,KAAK,EAAC,mCAAmC,iBAAa,MAAM,IAC/D,IAAI,CAAC,QAAQ;UACV,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB;UAC9C,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,CAC7C,EACP,YAAM,KAAK,EAAC,iCAAiC,IAC1C,IAAI,CAAC,QAAQ;UACV,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,iBAAiB;UAC5C,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,iBAAiB,CAC3C,CACF,CACR,CACM,EAEX,WAAK,KAAK,EAAC,4BAA4B,IACrC,eAAa,CACT,EACN,EAAC,oBAAoB,IACnB,WAAW,EAAC,oBAAoB,EAChC,EAAE,EAAE,GAAG,IAAI,CAAC,eAAe,cAAc,EACzC,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,GACnE,CACO,CACN,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhCheckboxgroup"],"sources":["src/components/stzh-checkboxgroup/stzh-checkboxgroup.scss?tag=stzh-checkboxgroup&encapsulation=scoped","src/components/stzh-checkboxgroup/stzh-checkboxgroup.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-checkboxgroup {\n @include input-description;\n margin: 0;\n padding: 0;\n border: none;\n\n &__fields {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: space('medium');\n }\n\n &__legend {\n @include font('heavy');\n @include fontSize('micro');\n color: $headingColor;\n padding: 0;\n margin-bottom: space('xsmall');\n }\n\n &--hide-legend &__legend {\n @include visuallyhidden;\n }\n\n &--direction-horizontal &__fields {\n flex-wrap: wrap;\n flex-direction: row;\n row-gap: space('medium');\n column-gap: space('xxlarge');\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, Watch } from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\nimport { StzhCheckboxChangeEvent, StzhCheckboxgroupChangeEvent, StzhLocaleComponent } from \"../../index\";\nimport { camelCase } from \"../../utils/string-utils\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nlet checkboxgroupCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-checkboxgroup\",\n styleUrl: \"stzh-checkboxgroup.scss\",\n scoped: true\n})\nexport class StzhCheckboxgroup {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input checkbox elements */\n @Prop({ reflect: true }) name: string;\n\n /** The legend */\n @Prop() legend: string;\n\n /** Hide legend to show only for screenreaders */\n @Prop({ reflect: true }) hideLegend: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Hide `(optional)` label */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** The selected values of the checkboxgroup */\n @Prop({ mutable: true }) value: string[] | string = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string[] = [];\n\n /** Direction */\n @Prop({ reflect: true }) direction: \"vertical\" | \"horizontal\" = \"vertical\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Current checked checkbox elements (readonly) */\n @Prop() checkedCheckbox: HTMLStzhCheckboxElement[] | null = null;\n\n /** Prevent updating certain properties of radio elements (possible values inside array: disabled, invalid) */\n @Prop() preventUpdateProperties: string[] | string = [];\n private _preventUpdateProperties: string[] = [];\n\n /** Host element */\n @Element() element: HTMLElement;\n\n @Watch(\"name\")\n watchName(newValue: string) {\n this.updateCheckboxesProperty(\"name\", newValue);\n }\n\n @Watch(\"disabled\")\n watchDisabled(newValue: boolean) {\n this.updateCheckboxesProperty(\"disabled\", newValue);\n }\n\n @Watch(\"value\")\n watchValue(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._value = JSON.parse(newValue);\n } else {\n this._value = newValue;\n }\n\n if (JSON.stringify(this._value) !== JSON.stringify(this.value)) {\n this.value = this._value;\n }\n\n this.updateCheckedCheckboxByValue(this._value);\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n @Watch(\"preventUpdateProperties\")\n preventUpdatePropertiesWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._preventUpdateProperties = JSON.parse(newValue);\n } else {\n this._preventUpdateProperties = newValue;\n }\n }\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhCheckboxgroupChangeEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Listen(\"stzhChange\", { capture: true })\n onChange(event: CustomEvent<StzhCheckboxChangeEvent>) {\n if (event.detail.component === \"stzh-checkbox\") {\n if (event.detail.checked) {\n this._value.push(event.detail.value);\n } else {\n this._value = this._value.filter(value => value !== event.detail.value);\n }\n // stop propagating checkbox change event otherwise angular control value accessor won't work\n event.stopPropagation();\n this.value = this._value;\n this.stzhChange.emit({\n component: \"stzh-checkboxgroup\",\n value: this._value\n });\n }\n }\n\n private get errorUsed() {\n return hasSlot(this.element, \"error\") || this._error?.length > 0;\n }\n\n /** Checkbox elements */\n private checkboxes: HTMLStzhCheckboxElement[];\n private checkboxgroupId: string;\n private observer: MutationObserver;\n\n private updateCheckboxesProperty(prop: string, value: any) {\n this.checkboxes.forEach((checkbox: HTMLStzhCheckboxElement) => {\n if (prop === \"disabled\") {\n // Only set the disabled if the checkbox is not already disabled\n if (!checkbox.disabled) {\n checkbox.disabled = value;\n }\n } else if (prop === \"name\" || (this._preventUpdateProperties.indexOf(prop) === -1)) {\n checkbox[camelCase(prop)] = value;\n }\n });\n }\n\n private updateCheckedCheckboxByValue(value: string[]) {\n this.checkedCheckbox = this.checkboxes.filter(checkbox => value.indexOf(checkbox.value) > -1);\n this.checkboxes.forEach(checkbox => checkbox.checked = value.indexOf(checkbox.value) > -1);\n }\n\n private handleReset = async () => {\n this.value = [...this.defaultValue];\n };\n\n private init = () => {\n // update checkboxes\n this.checkboxes = Array.from(this.element.querySelectorAll(\"stzh-checkbox\"));\n\n this.updateCheckboxesProperty(\"hide-optional\", true);\n this.updateCheckboxesProperty(\"a11y-describedby\", `${this.checkboxgroupId}-description`);\n this.updateCheckboxesProperty(\"invalid\", this.invalid || this.errorUsed);\n\n this.watchValue(this.value);\n this.watchName(this.name);\n this.watchDisabled(this.disabled);\n };\n\n async componentWillLoad() {\n this.checkboxgroupId = `stzh-checkboxgroup-${checkboxgroupCounter++}`;\n this.errorWatcher(this.error);\n this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"checkboxgroup\");\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return prop !== \"checkedCheckbox\";\n }\n\n componentDidRender() {\n this.init();\n }\n\n componentDidLoad() {\n this.defaultValue = this.defaultValue.length > 0 ? this.defaultValue : [...this._value];\n }\n\n connectedCallback() {\n if (!this.value.length) {\n this.checkboxes = Array.from(this.element.querySelectorAll(\"stzh-checkbox\"));\n\n // try to find checkboxes that might have checked set to true\n this.value = this.checkboxes\n .filter(checkbox => checkbox.checked)\n .map(checkbox => checkbox.value);\n }\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const descriptionUsed = hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n\n const classes = {\n \"stzh-checkboxgroup\": true,\n \"stzh-checkboxgroup--has-description\": descriptionUsed,\n \"stzh-checkboxgroup--has-description-long\": descriptionLongUsed,\n \"stzh-checkboxgroup--has-error\": this.errorUsed,\n \"stzh-checkboxgroup--is-disabled\": this.disabled,\n \"stzh-checkboxgroup--is-invalid\": this.invalid || this.errorUsed,\n \"stzh-checkboxgroup--hide-legend\": this.hideLegend,\n [`stzh-checkboxgroup--direction-${this.direction}`]: !!this.direction\n };\n\n return (\n <Host is-invalid={this.invalid || this.errorUsed}>\n <fieldset class={classes}>\n {this.legend &&\n <legend class=\"stzh-checkboxgroup__legend\">\n {this.legend}\n {!this.hideOptional && (\n <span class=\"stzh-checkboxgroup__marker\">\n <span class=\"stzh-checkboxgroup__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-checkboxgroup__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </legend>\n }\n <div class=\"stzh-checkboxgroup__fields\">\n <slot></slot>\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-checkboxgroup\"\n id={`${this.checkboxgroupId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </fieldset>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ import { d as defineCustomElement$4 } from './p-3aa7c37c.js';
5
5
  import { d as defineCustomElement$3 } from './p-6e55dee9.js';
6
6
  import { d as defineCustomElement$2 } from './p-435413fc.js';
7
7
 
8
- const stzhContactCss = ".sc-stzh-contact-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-contact-h,[stzh-hidden].sc-stzh-contact-h{display:none}.sc-stzh-contact-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-contact-h *.sc-stzh-contact,.sc-stzh-contact-h *.sc-stzh-contact::before,.sc-stzh-contact-h *.sc-stzh-contact::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-contact-h .has-focus.sc-stzh-contact{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-contact-h .stzh-fylingfocus-focused.sc-stzh-contact{outline-style:none !important}.sc-stzh-contact-h .stzh-fylingfocus-focused.sc-stzh-contact::-moz-focus-inner{border:0 !important}.sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading\" \"image image image image\" \"info info info info\" \"availability availability availability availability\" \"additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n repeat(4, minmax(0, 1fr))\n )}@media screen and (min-width: 900px){.sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading heading heading heading heading\" \"image image image image . . . .\" \"info info info info availability availability availability availability\" \"additional additional additional additional additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n repeat(8, minmax(0, 1fr))\n )}}@media print{.sc-stzh-contact-h{page-break-inside:avoid;break-inside:avoid}}.sc-stzh-contact-h .sc-stzh-contact-s>[slot=image]{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}@media screen and (min-width: 900px){[has-availability=false].sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading heading heading heading heading\" \"image image image image . . . .\" \"info info info info info info info info\" \"additional additional additional additional additional additional additional additional\"\n )}}[image-position=left].sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading\" \"image image image image\" \"info info info info\" \"availability availability availability availability\" \"additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n repeat(4, minmax(0, 1fr))\n )}@media screen and (min-width: 900px){[image-position=left].sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading heading heading heading heading\" \"image info info info availability availability availability availability\" \"additional additional additional additional additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n auto repeat(7, minmax(0, 1fr))\n )}}@media screen and (min-width: 1260px){[image-position=left].sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading heading heading heading heading heading heading heading heading\" \"image info info info info info availability availability availability availability availability availability\" \"additional additional additional additional additional additional additional additional additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n auto repeat(11, minmax(0, 1fr))\n )}}.stzh-contact.sc-stzh-contact{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-areas:var(--grid-template-areas);grid-template-columns:var(--grid-template-columns)}@media screen and (min-width: 900px){.stzh-contact.sc-stzh-contact{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}@media screen and (min-width: 600px){.stzh-contact.sc-stzh-contact{column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-contact.sc-stzh-contact{column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-contact.sc-stzh-contact{column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-contact.sc-stzh-contact{column-gap:var(--stzh-grid-gutter-ultra)}}.stzh-contact__main-heading.sc-stzh-contact{grid-area:heading}.stzh-contact__main-heading.sc-stzh-contact:not(:empty){margin-bottom:var(--stzh-space-xxsmall)}@media screen and (min-width: 900px){.stzh-contact__main-heading.sc-stzh-contact:not(:empty){margin-bottom:var(--stzh-space-xsmall)}}@media screen and (min-width: 1260px){.stzh-contact__main-heading.sc-stzh-contact:not(:empty){margin-bottom:var(--stzh-space-small)}}.stzh-contact__image-wrapper.sc-stzh-contact{grid-area:image;background-color:var(--stzh-color-secondary20)}.stzh-contact__image.sc-stzh-contact{position:relative}.stzh-contact__info.sc-stzh-contact{grid-area:info}.stzh-contact__heading.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__name.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__address.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__numbers.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__emails.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__pobox.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__availability-title.sc-stzh-contact:not(:empty):not(:last-child){margin-bottom:var(--stzh-space-xsmall)}.stzh-contact__number.sc-stzh-contact,.stzh-contact__email.sc-stzh-contact{display:flex;align-items:center}.stzh-contact__heading.sc-stzh-contact,.stzh-contact__name.sc-stzh-contact,.stzh-contact__availability-title.sc-stzh-contact{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);margin:0px}@media screen and (min-width: 900px){.stzh-contact__heading.sc-stzh-contact,.stzh-contact__name.sc-stzh-contact,.stzh-contact__availability-title.sc-stzh-contact{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-contact__heading.sc-stzh-contact,.stzh-contact__name.is-heading.sc-stzh-contact,.stzh-contact__availability-title.sc-stzh-contact{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-contact__availability.sc-stzh-contact{grid-area:availability;margin-top:var(--stzh-space-xlarge)}@media screen and (min-width: 900px){.stzh-contact__availability.sc-stzh-contact{margin-top:0px}}.stzh-contact__availability-list.sc-stzh-contact,.stzh-contact__availability-hour-list.sc-stzh-contact{list-style:none;margin:0;padding:0}.stzh-contact__availability-list.sc-stzh-contact{gap:var(--stzh-space-xxsmall);display:grid}@media screen and (min-width: 900px){.stzh-contact__availability-list.sc-stzh-contact{gap:var(--stzh-space-xsmall)}}@media screen and (min-width: 1260px){.stzh-contact__availability-list.sc-stzh-contact{gap:var(--stzh-space-small)}}.stzh-contact__availability-weekday.sc-stzh-contact{font-size:var(--stzh-font-curve-p2-default-font-size, var(--stzh-font-micro-font-size));line-height:var(--stzh-font-curve-p2-default-text-line-height, var(--stzh-font-micro-text-line-height))}@media screen and (min-width: 900px){.stzh-contact__availability-weekday.sc-stzh-contact{font-size:var(--stzh-font-curve-p2-medium-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p2-medium-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p2-medium-text-letter-spacing)}}.stzh-contact__availability-hours.sc-stzh-contact{display:flex;flex-wrap:wrap;column-gap:var(--stzh-space-xsmall)}.stzh-contact__availability-hours-separator.sc-stzh-contact{width:0.0625rem;background-color:currentColor;flex-shrink:0}.stzh-contact__additional.sc-stzh-contact{gap:var(--stzh-space-medium);grid-area:additional;display:grid}@media screen and (min-width: 600px){.stzh-contact__additional.sc-stzh-contact{gap:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-contact__additional.sc-stzh-contact{gap:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-contact__additional.sc-stzh-contact{gap:var(--stzh-space-xxlarge)}}.stzh-contact__additional.sc-stzh-contact:not(:empty){margin-top:var(--stzh-space-medium)}.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image-wrapper.sc-stzh-contact{margin-bottom:var(--stzh-space-medium)}.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:4rem;height:4rem}@media screen and (min-width: 600px){.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:5rem;height:5rem}}@media screen and (min-width: 900px){.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:6.25rem;height:6.25rem}}@media screen and (min-width: 1260px){.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:7.5rem;height:7.5rem}}@media screen and (min-width: 1600px){.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:8.75rem;height:8.75rem}}.stzh-contact--image-position-left.sc-stzh-contact .stzh-contact__image-wrapper.sc-stzh-contact{background-color:transparent}";
8
+ const stzhContactCss = ".sc-stzh-contact-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-contact-h,[stzh-hidden].sc-stzh-contact-h{display:none}.sc-stzh-contact-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-contact-h *.sc-stzh-contact,.sc-stzh-contact-h *.sc-stzh-contact::before,.sc-stzh-contact-h *.sc-stzh-contact::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-contact-h .has-focus.sc-stzh-contact{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-contact-h .stzh-fylingfocus-focused.sc-stzh-contact{outline-style:none !important}.sc-stzh-contact-h .stzh-fylingfocus-focused.sc-stzh-contact::-moz-focus-inner{border:0 !important}.sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading\" \"image image image image\" \"info info info info\" \"availability availability availability availability\" \"additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n repeat(4, minmax(0, 1fr))\n )}@media screen and (min-width: 900px){.sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading heading heading heading heading\" \"image image image image . . . .\" \"info info info info availability availability availability availability\" \"additional additional additional additional additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n repeat(8, minmax(0, 1fr))\n )}}@media print{.sc-stzh-contact-h{page-break-inside:avoid;break-inside:avoid}}.sc-stzh-contact-h .sc-stzh-contact-s>[slot=image]{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}@media screen and (min-width: 900px){[has-availability=false].sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading heading heading heading heading\" \"image image image image . . . .\" \"info info info info info info info info\" \"additional additional additional additional additional additional additional additional\"\n )}}[image-position=left].sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading\" \"image image image image\" \"info info info info\" \"availability availability availability availability\" \"additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n repeat(4, minmax(0, 1fr))\n )}@media screen and (min-width: 900px){[image-position=left].sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading heading heading heading heading\" \"image info info info availability availability availability availability\" \"additional additional additional additional additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n auto repeat(7, minmax(0, 1fr))\n )}}@media screen and (min-width: 1260px){[image-position=left].sc-stzh-contact-h{--grid-template-areas:var(\n --stzh-contact-grid-template-areas,\n \"heading heading heading heading heading heading heading heading heading heading heading heading\" \"image info info info info info availability availability availability availability availability availability\" \"additional additional additional additional additional additional additional additional additional additional additional additional\"\n );--grid-template-columns:var(\n --stzh-contact-grid-template-columns,\n auto repeat(11, minmax(0, 1fr))\n )}}.stzh-contact.sc-stzh-contact{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-areas:var(--grid-template-areas);grid-template-columns:var(--grid-template-columns)}@media screen and (min-width: 900px){.stzh-contact.sc-stzh-contact{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}@media screen and (min-width: 600px){.stzh-contact.sc-stzh-contact{column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-contact.sc-stzh-contact{column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-contact.sc-stzh-contact{column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-contact.sc-stzh-contact{column-gap:var(--stzh-grid-gutter-ultra)}}.stzh-contact__main-heading.sc-stzh-contact{grid-area:heading}.stzh-contact__main-heading.sc-stzh-contact:not(:empty){margin-bottom:var(--stzh-space-xxsmall)}@media screen and (min-width: 900px){.stzh-contact__main-heading.sc-stzh-contact:not(:empty){margin-bottom:var(--stzh-space-xsmall)}}@media screen and (min-width: 1260px){.stzh-contact__main-heading.sc-stzh-contact:not(:empty){margin-bottom:var(--stzh-space-small)}}.stzh-contact__image-wrapper.sc-stzh-contact{grid-area:image;background-color:var(--stzh-color-secondary20)}.stzh-contact__image.sc-stzh-contact{position:relative}.stzh-contact__info.sc-stzh-contact{grid-area:info}.stzh-contact__heading.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__name.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__address.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__numbers.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__emails.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__pobox.sc-stzh-contact:not(:empty):not(:last-child),.stzh-contact__availability-title.sc-stzh-contact:not(:empty):not(:last-child){margin-bottom:var(--stzh-space-xsmall)}.stzh-contact__numbers.sc-stzh-contact{white-space:nowrap}.stzh-contact__number.sc-stzh-contact,.stzh-contact__email.sc-stzh-contact{display:flex;align-items:center}.stzh-contact__heading.sc-stzh-contact,.stzh-contact__name.sc-stzh-contact,.stzh-contact__availability-title.sc-stzh-contact{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);margin:0px}@media screen and (min-width: 900px){.stzh-contact__heading.sc-stzh-contact,.stzh-contact__name.sc-stzh-contact,.stzh-contact__availability-title.sc-stzh-contact{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-contact__heading.sc-stzh-contact,.stzh-contact__name.is-heading.sc-stzh-contact,.stzh-contact__availability-title.sc-stzh-contact{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-contact__availability.sc-stzh-contact{grid-area:availability;margin-top:var(--stzh-space-xlarge)}@media screen and (min-width: 900px){.stzh-contact__availability.sc-stzh-contact{margin-top:0px}}.stzh-contact__availability-list.sc-stzh-contact,.stzh-contact__availability-hour-list.sc-stzh-contact{list-style:none;margin:0;padding:0}.stzh-contact__availability-list.sc-stzh-contact{gap:var(--stzh-space-xxsmall);display:grid}@media screen and (min-width: 900px){.stzh-contact__availability-list.sc-stzh-contact{gap:var(--stzh-space-xsmall)}}@media screen and (min-width: 1260px){.stzh-contact__availability-list.sc-stzh-contact{gap:var(--stzh-space-small)}}.stzh-contact__availability-weekday.sc-stzh-contact{font-size:var(--stzh-font-curve-p2-default-font-size, var(--stzh-font-micro-font-size));line-height:var(--stzh-font-curve-p2-default-text-line-height, var(--stzh-font-micro-text-line-height))}@media screen and (min-width: 900px){.stzh-contact__availability-weekday.sc-stzh-contact{font-size:var(--stzh-font-curve-p2-medium-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p2-medium-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p2-medium-text-letter-spacing)}}.stzh-contact__availability-hours.sc-stzh-contact{display:flex;flex-wrap:wrap;column-gap:var(--stzh-space-xsmall)}.stzh-contact__availability-hours-separator.sc-stzh-contact{width:0.0625rem;background-color:currentColor;flex-shrink:0}.stzh-contact__additional.sc-stzh-contact{gap:var(--stzh-space-medium);grid-area:additional;display:grid}@media screen and (min-width: 600px){.stzh-contact__additional.sc-stzh-contact{gap:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-contact__additional.sc-stzh-contact{gap:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-contact__additional.sc-stzh-contact{gap:var(--stzh-space-xxlarge)}}.stzh-contact__additional.sc-stzh-contact:not(:empty){margin-top:var(--stzh-space-medium)}.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image-wrapper.sc-stzh-contact{margin-bottom:var(--stzh-space-medium)}.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:4rem;height:4rem}@media screen and (min-width: 600px){.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:5rem;height:5rem}}@media screen and (min-width: 900px){.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:6.25rem;height:6.25rem}}@media screen and (min-width: 1260px){.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:7.5rem;height:7.5rem}}@media screen and (min-width: 1600px){.stzh-contact--has-image.sc-stzh-contact .stzh-contact__image.sc-stzh-contact{width:8.75rem;height:8.75rem}}.stzh-contact--image-position-left.sc-stzh-contact .stzh-contact__image-wrapper.sc-stzh-contact{background-color:transparent}";
9
9
 
10
10
  function formatTel(tel) {
11
11
  return tel.replace(/\s/g, "");