@oiz/stzh-components 3.0.0-beta1 → 3.0.0-beta2
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.
- package/dist/cjs/{app-globals-d508a3bc.js → app-globals-4968ae1c.js} +2 -2
- package/dist/cjs/{app-globals-d508a3bc.js.map → app-globals-4968ae1c.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-gallery.cjs.entry.js +13 -10
- package/dist/cjs/stzh-gallery.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-pagebottom.cjs.entry.js +15 -9
- package/dist/cjs/stzh-pagebottom.cjs.entry.js.map +1 -1
- package/dist/cjs/{stzh-share.cjs.entry.js → stzh-print_2.cjs.entry.js} +53 -11
- package/dist/cjs/stzh-print_2.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-sticky-actions.cjs.entry.js +15 -9
- package/dist/cjs/stzh-sticky-actions.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-sticky.cjs.entry.js +13 -4
- package/dist/cjs/stzh-sticky.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-tooltip.cjs.entry.js +2 -1
- package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +3 -0
- package/dist/collection/assets/i18n/en.json +3 -0
- package/dist/collection/assets/media/icons/mono/facebook.svg +1 -1
- package/dist/collection/assets/media/icons/mono/linkedin.svg +1 -1
- package/dist/collection/assets/media/icons/mono/mail.svg +1 -1
- package/dist/collection/assets/media/icons/mono/xing.svg +1 -1
- package/dist/collection/assets/meta/icons-preview.html +4 -4
- package/dist/collection/components/stzh-button/stzh-button.css +1 -1
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +11 -0
- package/dist/collection/components/stzh-cta/stzh-cta.css +1 -1
- package/dist/collection/components/stzh-cta/stzh-cta.js +1 -1
- package/dist/collection/components/stzh-cta/stzh-cta.js.map +1 -1
- package/dist/collection/components/stzh-gallery/stzh-gallery.e2e.js +1 -0
- package/dist/collection/components/stzh-gallery/stzh-gallery.e2e.js.map +1 -1
- package/dist/collection/components/stzh-gallery/stzh-gallery.js +32 -9
- package/dist/collection/components/stzh-gallery/stzh-gallery.js.map +1 -1
- package/dist/collection/components/stzh-gallery/stzh-gallery.stories.js +9 -0
- package/dist/collection/components/stzh-header/stzh-header.js +1 -1
- package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.css +54 -13
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.e2e.js +2 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.e2e.js.map +1 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.js +56 -12
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.js.map +1 -1
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.localization.js +2 -0
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.localization.js.map +1 -0
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.stories.js +87 -9
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.stories.js +20 -18
- package/dist/collection/components/stzh-share/stzh-share.css +1 -43
- package/dist/collection/components/stzh-share/stzh-share.js +10 -10
- package/dist/collection/components/stzh-share/stzh-share.js.map +1 -1
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +10 -0
- package/dist/collection/components/stzh-sticky/stzh-sticky.css +1 -1
- package/dist/collection/components/stzh-sticky/stzh-sticky.js +13 -4
- package/dist/collection/components/stzh-sticky/stzh-sticky.js.map +1 -1
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js +15 -9
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js.map +1 -1
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.stories.js +20 -18
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +3 -0
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js +19 -0
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/stzh-button2.js +1 -1
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-cspace.js.map +1 -1
- package/dist/components/stzh-cta.js +1 -1
- package/dist/components/stzh-cta.js.map +1 -1
- package/dist/components/stzh-gallery.js +16 -11
- package/dist/components/stzh-gallery.js.map +1 -1
- package/dist/components/stzh-header.js +1 -1
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-pagebottom.js +39 -12
- package/dist/components/stzh-pagebottom.js.map +1 -1
- package/dist/components/stzh-print.js +1 -58
- package/dist/components/stzh-print.js.map +1 -1
- package/dist/{esm/stzh-print.entry.js → components/stzh-print2.js} +25 -11
- package/dist/components/stzh-print2.js.map +1 -0
- package/dist/components/stzh-share2.js +23 -11
- package/dist/components/stzh-share2.js.map +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
- package/dist/components/stzh-sticky-actions.js +15 -9
- package/dist/components/stzh-sticky-actions.js.map +1 -1
- package/dist/components/stzh-sticky2.js +13 -4
- package/dist/components/stzh-sticky2.js.map +1 -1
- package/dist/components/stzh-tooltip2.js +3 -1
- package/dist/components/stzh-tooltip2.js.map +1 -1
- package/dist/esm/{app-globals-984d1c64.js → app-globals-924beb17.js} +2 -2
- package/dist/esm/{app-globals-984d1c64.js.map → app-globals-924beb17.js.map} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-badge_3.entry.js +1 -1
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-cspace.entry.js +1 -1
- package/dist/esm/stzh-cspace.entry.js.map +1 -1
- package/dist/esm/stzh-cta.entry.js +1 -1
- package/dist/esm/stzh-cta.entry.js.map +1 -1
- package/dist/esm/stzh-gallery.entry.js +13 -10
- package/dist/esm/stzh-gallery.entry.js.map +1 -1
- package/dist/esm/stzh-header.entry.js +1 -1
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-pagebottom.entry.js +15 -9
- package/dist/esm/stzh-pagebottom.entry.js.map +1 -1
- package/dist/esm/{stzh-share.entry.js → stzh-print_2.entry.js} +54 -13
- package/dist/esm/stzh-print_2.entry.js.map +1 -0
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm/stzh-sticky-actions.entry.js +15 -9
- package/dist/esm/stzh-sticky-actions.entry.js.map +1 -1
- package/dist/esm/stzh-sticky.entry.js +13 -4
- package/dist/esm/stzh-sticky.entry.js.map +1 -1
- package/dist/esm/stzh-tooltip.entry.js +2 -1
- package/dist/esm/stzh-tooltip.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +3 -0
- package/dist/stzh-components/assets/i18n/en.json +3 -0
- package/dist/stzh-components/assets/media/icons/mono/facebook.svg +1 -1
- package/dist/stzh-components/assets/media/icons/mono/linkedin.svg +1 -1
- package/dist/stzh-components/assets/media/icons/mono/mail.svg +1 -1
- package/dist/stzh-components/assets/media/icons/mono/xing.svg +1 -1
- package/dist/stzh-components/assets/meta/icons-preview.html +4 -4
- package/dist/stzh-components/p-2e713d1e.entry.js +2 -0
- package/dist/stzh-components/p-2e713d1e.entry.js.map +1 -0
- package/dist/stzh-components/p-31a45529.entry.js +2 -0
- package/dist/stzh-components/p-31a45529.entry.js.map +1 -0
- package/dist/stzh-components/p-33b46d08.entry.js +2 -0
- package/dist/stzh-components/{p-a2656f84.entry.js.map → p-33b46d08.entry.js.map} +1 -1
- package/dist/stzh-components/{p-52078c0b.entry.js → p-3641eb0c.entry.js} +2 -2
- package/dist/stzh-components/p-3641eb0c.entry.js.map +1 -0
- package/dist/stzh-components/p-475fc161.entry.js +2 -0
- package/dist/stzh-components/p-475fc161.entry.js.map +1 -0
- package/dist/stzh-components/{p-83978293.entry.js → p-5511087f.entry.js} +2 -2
- package/dist/stzh-components/p-5511087f.entry.js.map +1 -0
- package/dist/stzh-components/p-705d5931.entry.js +2 -0
- package/dist/stzh-components/{p-35b78231.entry.js.map → p-705d5931.entry.js.map} +1 -1
- package/dist/stzh-components/{p-e2485377.js → p-862a98f9.js} +2 -2
- package/dist/stzh-components/{p-879795a9.entry.js → p-bf79dbd0.entry.js} +2 -2
- package/dist/stzh-components/{p-879795a9.entry.js.map → p-bf79dbd0.entry.js.map} +1 -1
- package/dist/stzh-components/p-d2f7c020.entry.js +2 -0
- package/dist/stzh-components/p-d2f7c020.entry.js.map +1 -0
- package/dist/stzh-components/p-fa82219c.entry.js +2 -0
- package/dist/stzh-components/p-fa82219c.entry.js.map +1 -0
- package/dist/stzh-components/{p-fa3c5519.entry.js → p-fb9cc8a7.entry.js} +2 -2
- package/dist/stzh-components/p-fb9cc8a7.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.css +1 -1
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-cta/stzh-cta.d.ts +1 -1
- package/dist/types/components/stzh-gallery/stzh-gallery.d.ts +5 -0
- package/dist/types/components/stzh-pagebottom/stzh-pagebottom.d.ts +11 -1
- package/dist/types/components/stzh-pagebottom/stzh-pagebottom.localization.d.ts +4 -0
- package/dist/types/components/stzh-sticky-actions/stzh-sticky-actions.d.ts +2 -2
- package/dist/types/components/stzh-tooltip/stzh-tooltip.d.ts +2 -0
- package/dist/types/components.d.ts +40 -6
- package/dist/vscode-data.json +25 -5
- package/package.json +1 -1
- package/dist/cjs/stzh-print.cjs.entry.js +0 -52
- package/dist/cjs/stzh-print.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-share.cjs.entry.js.map +0 -1
- package/dist/collection/patterns/print/print.e2e.js +0 -18
- package/dist/collection/patterns/print/print.e2e.js.map +0 -1
- package/dist/esm/stzh-print.entry.js.map +0 -1
- package/dist/esm/stzh-share.entry.js.map +0 -1
- package/dist/stzh-components/p-2676b9db.entry.js +0 -2
- package/dist/stzh-components/p-2676b9db.entry.js.map +0 -1
- package/dist/stzh-components/p-2afe2028.entry.js +0 -2
- package/dist/stzh-components/p-2afe2028.entry.js.map +0 -1
- package/dist/stzh-components/p-35b78231.entry.js +0 -2
- package/dist/stzh-components/p-51be8f59.entry.js +0 -2
- package/dist/stzh-components/p-51be8f59.entry.js.map +0 -1
- package/dist/stzh-components/p-52078c0b.entry.js.map +0 -1
- package/dist/stzh-components/p-83978293.entry.js.map +0 -1
- package/dist/stzh-components/p-89de4375.entry.js +0 -2
- package/dist/stzh-components/p-89de4375.entry.js.map +0 -1
- package/dist/stzh-components/p-a2656f84.entry.js +0 -2
- package/dist/stzh-components/p-c67dcd7a.entry.js +0 -2
- package/dist/stzh-components/p-c67dcd7a.entry.js.map +0 -1
- package/dist/stzh-components/p-e142e3e5.entry.js +0 -2
- package/dist/stzh-components/p-e142e3e5.entry.js.map +0 -1
- package/dist/stzh-components/p-fa3c5519.entry.js.map +0 -1
- /package/dist/stzh-components/{p-e2485377.js.map → p-862a98f9.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-skin-portal-mitwirken.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,0BAA0B,GAAG,ypgLAAypgL;;MCa/qgL,uBAAuB;;;;EAClC,gBAAgB;;IAEd,OAAO,CAAC,GAAG,CAAE,IAAI,CAAC,WAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,CAAC;GAC/E;EAED,MAAM;IACJ,QACEA,QAACC,UAAI,OACE,EACP;GACH;;;;;;","names":["h","Host"],"sources":["src/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.scss?tag=stzh-skin-portal-mitwirken","src/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.tsx"],"sourcesContent":["@import \"../../global/css/stzh-components.css\";\n\n:root {\n --stzh-color-primary: var(--stzh-color-deepcerulean);\n --stzh-color-primary-hover: var(--stzh-color-regalblue);\n\n --stzh-color-primary48: rgba(5, 127, 172, 0.48);\n --stzh-color-primary32: rgba(5, 127, 172, 0.32);\n --stzh-color-primary16: rgba(5, 127, 172, 0.16);\n --stzh-color-primary8: rgba(5, 127, 172, 0.08);\n\n --stzh-font-family-heavy: var(--stzh-font-family-bold);\n --stzh-font-family-title: var(--stzh-font-family-light);\n\n --stzh-button-text-hover-background: rgba(5, 127, 172, 0.08);\n}\n\n$mobileBreakpoint: 40em;\n$processHeaderMaxMobileBreakpoint: 599px;\n$processHeaderMaxDesktopBreakpoint: 1023px;\n\nmain,\n.reveal-overlay,\n.mod_header {\n --primary: var(--stzh-color-primary);\n --secondary: var(--stzh-color-primary);\n --success: var(--stzh-color-old-truegreen);\n --warning: var(--stzh-color-old-warning);\n --alert: var(--stzh-color-error60);\n --highlight: var(--stzh-color-coral);\n --highlight_alternative: var(--stzh-color-coral);\n}\n\n// For main and modals\nmain,\n.reveal-overlay {\n a.muted,\n .inline-filters button.muted[data-toggle] {\n color: $colorWhite;\n background-color: $colorOldGrey13;\n border-color: $colorOldGrey13;\n\n &:hover,\n &:focus {\n color: $colorWhite;\n background-color: $colorOldGrey13;\n border-color: $colorOldGrey13;\n }\n }\n}\n\n// Only modals\n.reveal-overlay {\n background-color: rgba(5, 127, 172, 0.8);\n\n /* Dialog */\n\n .reveal__title {\n margin-top: 0;\n }\n\n .reveal {\n box-shadow: $boxShadowOverlay;\n }\n\n .close-button {\n color: $baseLeadColor;\n }\n}\n\n// Only header\n.mod_header {\n .mod_header__logobar-logo img {\n background: url(https://www.stadt-zuerich.ch/content/dam/stzh/corpdesign/wortbildmarken/logo_stzh_vbz_pos_2-1.svg) no-repeat;\n width: 0;\n padding-left: 208px;\n }\n}\n\n// Main Content Modules\nmain {\n accent-color: $colorPrimary;\n\n /* Resets */\n @include richtext-host;\n @include richtext-slotted($withLists: false);\n\n &, label, tfoot, thead {\n color: $baseColor;\n }\n\n svg {\n overflow: visible;\n }\n\n label {\n display: flex;\n align-items: center;\n }\n\n .field label {\n @include font('heavy');\n display: block;\n }\n\n input[type=checkbox],\n input[type=radio] {\n width: 24px;\n height: 24px;\n }\n\n label > [type=checkbox],\n label > [type=radio] {\n margin-right: space('small');\n }\n\n .filters__section--general label,\n .filters__section label {\n @include fontSize('milli');\n display: flex;\n line-height: 24px;\n transition: color $baseTransitionAnimationSpeed;\n color: $baseColor;\n margin-bottom: space('small');\n }\n\n .filters__has-subfilters {\n align-items: center;\n\n [data-toggle] {\n margin-bottom: space('small');\n }\n }\n\n .form-input-extra-before,\n .form-error {\n @include font;\n @include fontCurve('caption');\n }\n\n .form-error,\n .is-invalid-label {\n color: $colorError60;\n }\n\n [type=color],\n [type=date],\n [type=datetime-local],\n [type=datetime],\n [type=email],\n [type=month],\n [type=number],\n [type=password],\n [type=search],\n [type=tel],\n [type=text],\n [type=time],\n [type=url],\n [type=week],\n textarea,\n .inline-filters button[data-toggle],\n select,\n .data-picker .picker-prompt a,\n .data-picker.picker-single .picker-values div a {\n @include font;\n\t @include fontSize('milli');\n border: 1px solid $formBorderColor;\n transition-property: color, border-color;\n transition-duration: $baseTransitionAnimationSpeed;\n border-radius: $formInputBorderRadius;\n padding: space('xsmall') space('medium');\n width: 100%;\n height: $formInputHeight;\n color: $colorPrimary;\n appearance: none;\n margin-bottom: space('medium');\n text-decoration-line: none;\n\n @include placeholder {\n color: $formInputPlaceholderColor;\n }\n\n &:hover,\n &:focus {\n color: $colorPrimaryHover;\n border-color: $colorPrimaryHover;\n }\n\n // prevent ugly autofill background color in chrome\n &:-webkit-autofill {\n background-clip: text;\n }\n\n // show ellipsis for placeholders that are too long\n &:placeholder-shown {\n text-overflow: ellipsis;\n }\n }\n\n .data-picker .picker-prompt a,\n .data-picker.picker-single .picker-values div a {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n &::after {\n float: none;\n margin-top: 0;\n }\n }\n\n .inline-filters button[data-toggle],\n select {\n padding-right: space('xxlarge');\n }\n\n textarea {\n min-height: $formInputHeight;\n resize: vertical;\n\n &[rows] {\n height: auto;\n }\n }\n\n .input-group .input-group-field {\n margin-bottom: 0;\n }\n\n .section > p,\n .floating-helper__content p {\n margin-top: 0;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n .add-message,\n .card,\n .chart-tooltip,\n .comment-thread,\n .conference-registration,\n .conference-speaker .speaker-bio {\n margin-bottom: space('xxlarge');\n border-color: $baseBorderColor;\n background-color: $colorWhite;\n }\n\n .ql-editor ol,\n .ql-editor ul {\n padding-left: 0;\n }\n\n .badge-card__content,\n .card__content,\n .card__text--paragraph,\n .floating-helper__content-inner,\n .lead,\n .process-header + .wrapper .section,\n .timeline__content {\n ul li:not(.card-data__item) {\n padding-left: space('large');\n\n &::before {\n content: \"–\";\n margin-left: 0;\n margin-right: 0;\n text-align: left;\n width: auto;\n }\n }\n }\n\n .badge-card__content,\n .card__content,\n .card__text--paragraph,\n .floating-helper__content-inner,\n .lead,\n .process-header + .wrapper .section,\n .timeline__content {\n ul.tags li:not(.card-data__item) {\n padding-left: 0;\n\n &::before {\n content: none;\n }\n }\n }\n\n .m-bottom {\n margin-bottom: space('medium');\n }\n\n .mb-sm {\n margin-bottom: space('xxlarge');\n }\n\n p {\n color: $baseColor;\n }\n\n tfoot td,\n tfoot th,\n thead td,\n thead th {\n @include font('heavy');\n }\n\n tfoot td,\n tfoot th,\n thead td,\n thead th,\n tbody td,\n tbody th {\n padding: space('xmall');\n }\n\n table,\n td,\n tr,\n .questionnaire-question-matrix table,\n .questionnaire-question-matrix td,\n .questionnaire-question-matrix tr,\n .questionnaire-question-matrix tr:nth-child(2n) {\n border-color: $baseBorderColor;\n }\n\n\n /* Process Header */\n\n .process-header .process-header__inner {\n background-color: $colorPrimary;\n }\n\n .card--full .process-header .process-header__container .process-header__info .card__title,\n .process-header .process-header__container .process-header__info .card--full .card__title,\n .process-header .process-header__container .process-header__info .heading2 {\n @include font('title');\n @include fontCurve('hero', 'heading');\n @include spaceCurve('margin-bottom', 'medium');\n margin-top: 0;\n border-bottom: none;\n padding-bottom: 0;\n }\n\n .process-header .process-header__container {\n padding: 0 space('xxxxlarge');\n\n @media screen and (max-width: #{$processHeaderMaxDesktopBreakpoint}) {\n padding: space('xxxxlarge');\n padding-bottom: space('big');\n }\n\n @media screen and (max-width: #{$processHeaderMaxMobileBreakpoint}) {\n padding: space('xxlarge') $containerMargin space('xxxlarge');\n }\n }\n\n .process-header__info {\n padding: 0;\n }\n\n .process-header .process-header__container .process-header__info .heading-small {\n @include fontCurve('h3', 'heading');\n color: $baseInvertColor;\n margin-top: 0;\n }\n\n .process-header__hashtag a {\n color: $baseInvertColor;\n text-decoration-line: none;\n\n &:hover {\n color: $baseInvertColor;\n }\n\n .external-link-indicator {\n background: $baseInvertColor;\n padding: space('xxsmall');\n box-sizing: content-box;\n border-radius: $buttonBorderRadius;\n margin: 0;\n margin-bottom: -4px;\n margin-left: 4px;\n }\n }\n\n .phase-subtitle--initiatives,\n .phase-title,\n .phase-title--initiatives {\n @include font('title');\n @include fontCurve('h4');\n color: $baseLeadColor;\n }\n\n .process-header__progress {\n display: flex;\n align-items: center;\n }\n\n .process-header__phase {\n padding: space('medium');\n margin-top: space('medium');\n margin-bottom: 0;\n }\n\n .phase-date {\n @include font('regular');\n @include fontCurve('p2');\n color: $baseColor;\n }\n\n .phase-current {\n @include fontCurve('caption');\n margin-left: space('xxsmall');\n color: $baseColor;\n }\n\n .process-header__progress {\n margin-bottom: space('xsmall');\n }\n\n .process-header__phase .button,\n .process-header__phase .meeting-polls__button,\n .process-phase .button,\n .process-phase .meeting-polls__button {\n margin-top: space('xsmall');\n }\n\n /* Links */\n\n a,\n .link {\n text-decoration-line: underline;\n transition: $baseTransitionAnimationSpeed;\n\n &:hover {\n color: $linkHoverColor;\n }\n }\n\n /* Buttons */\n\n .button {\n @include fontSize('milli');\n display: inline-flex;\n align-items: center;\n height: auto;\n min-height: $formInputHeight;\n line-height: $formInputHeight - 2px;\n line-height: inherit;\n margin: 0;\n text-decoration-line: none;\n appearance: none;\n border: 1px solid $colorPrimary;\n padding: space('xsmall') space('xlarge');\n transition: all $baseTransitionAnimationSpeed;\n\n &.small {\n @include fontSize('micro');\n min-height: $formInputHeightSmall;\n line-height: $formInputHeightSmall - 2px;\n }\n\n &.tiny {\n @include fontSize('micro');\n min-height: 32px;\n }\n\n &.process-nav__more i {\n background-color: currentColor;\n margin-bottom: 0;\n }\n\n &.process-nav__more i:first-child {\n margin-left: space('xsmall');\n }\n }\n\n .button--icon {\n .icon-wrap {\n display: flex;\n align-items: center;\n }\n\n .icon-wrap .icon {\n margin-right: space('xxsmall');\n }\n }\n\n .button--icon.meeting-polls__button .icon,\n .button--icon.small .icon {\n width: iconSize('xxsmall');\n height: iconSize('xxsmall');\n }\n\n .extra .button.follow-button {\n margin-top: 0;\n }\n\n .button-group.meeting-polls__button .button,\n .button-group.meeting-polls__button .meeting-polls__button,\n .button-group.small .button,\n .button-group.small .meeting-polls__button,\n .button-group.tiny .button,\n .button-group.tiny .meeting-polls__button {\n @include fontSize('micro');\n }\n\n .button.primary,\n .button.primary.disabled,\n .button.primary.disabled:focus,\n .button.primary.disabled:hover,\n .button.primary[disabled],\n .button.primary[disabled]:focus,\n .button.primary[disabled]:hover,\n .primary.meeting-polls__button {\n background-color: $colorPrimary;\n\n &:hover,\n &:focus {\n background-color: $colorPrimaryHover;\n }\n }\n\n .button.budget-vote-button {\n @include font;\n color: $colorPrimary;\n background-color: $colorWhite;\n margin-bottom: space('medium');\n\n &:hover,\n &:focus {\n color: $colorPrimaryHover;\n background-color: $colorWhite;\n }\n }\n\n .button--vote-button {\n margin-bottom: space('large');\n }\n\n .view-side > .button {\n margin-bottom: space('medium');\n }\n\n .button.clear,\n .button.clear.disabled,\n .button.clear.disabled:focus,\n .button.clear.disabled:hover,\n .button.clear[disabled],\n .button.clear[disabled]:focus,\n .button.clear[disabled]:hover,\n .clear.meeting-polls__button {\n color: $colorError60;\n }\n\n\n /* Wrapper / Layout */\n\n .wrapper {\n @include spaceCurve('padding-top', 'big');\n @include spaceCurve('padding-bottom', 'big');\n\n padding-left: $containerMargin;\n padding-right: $containerMargin;\n\n @include mq($from: small) {\n padding-left: $containerMarginSmall;\n padding-right: $containerMarginSmall;\n }\n\n @include mq($from: medium) {\n padding-left: $containerMarginMedium;\n padding-right: $containerMarginMedium;\n }\n\n @include mq($from: large) {\n padding-left: $containerMarginLarge;\n padding-right: $containerMarginLarge;\n }\n\n .wrapper--inner {\n background-color: $colorOldGrey5;\n }\n\n // .row.column {\n // padding-left: 0;\n // padding-right: 0;\n // }\n\n .row:not(.column) .floating-helper-container {\n padding-right: 0.625rem;\n padding-left: 0.625rem;\n }\n\n @media screen and (min-width: #{$mobileBreakpoint}) {\n .row:not(.column) .floating-helper-container {\n padding-right: 0.9375rem;\n padding-left: 0.9375rem;\n }\n }\n }\n\n\n /* Headings */\n\n .heading1, h1,\n .heading2, h2,\n .heading3, h3,\n .heading4, h4 {\n color: $colorPrimary;\n }\n\n .heading1, h1 {\n @include font('title');\n @include fontCurve('h1', 'heading');\n @include spaceCurve('margin-top', 'large');\n @include spaceCurve('margin-bottom', 'medium');\n @include spaceCurve('padding-bottom', 'tiny');\n border-bottom: 1px solid $baseBorderColor;\n }\n\n .section-heading,\n .heading2, h2 {\n @include font('title');\n @include fontCurve('h2', 'heading');\n @include spaceCurve('margin-top', 'large');\n @include spaceCurve('margin-bottom', 'medium');\n @include spaceCurve('padding-bottom', 'tiny');\n border-bottom: 1px solid $baseBorderColor;\n }\n\n .heading3, h3 {\n @include font('title');\n @include fontCurve('h3', 'heading');\n @include spaceCurve('margin-top', 'medium');\n }\n\n .heading4, h4 {\n @include font('title');\n @include fontCurve('h4', 'heading');\n @include spaceCurve('margin-top', 'medium');\n }\n\n .heading4, h4,\n .timeline__item--current .timeline__date {\n color: $colorPrimary;\n }\n\n #most-commented .section-heading {\n margin-top: 0;\n }\n\n #most-commented a {\n text-decoration-line: none;\n }\n\n\n /* Section */\n\n .section {\n @include spaceCurve('margin-bottom', 'large');\n }\n\n .section-heading {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .section-heading .text-sm,\n .section-heading .text-small {\n @include fontCurve('h3', 'heading');\n }\n\n\n /* Dropdown */\n\n .order-by__dropdown,\n .results-per-page__dropdown {\n display: flex;\n align-items: center;\n }\n\n .order-by__text,\n .results-per-page__text {\n margin-right: space('xsmall');\n }\n\n .is-dropdown-submenu {\n box-shadow: $boxShadowPopover;\n border: none;\n border-radius: var(--stzh-popover-border-radius);\n margin-top: var(--stzh-space-xsmall);\n }\n\n .dropdown.menu > li.is-dropdown-submenu-parent > a {\n @include font;\n @include fontSize('milli');\n display: flex;\n align-items: center;\n background: $colorWhite;\n padding: space('xsmall') space('medium');\n padding-right: calc(#{space('xlarge')} + #{space('medium')} + #{space('xsmall')});\n min-height: $formInputHeight;\n border: 1px solid $formBorderColor;\n margin: 0;\n }\n\n .dropdown.menu > li.is-dropdown-submenu-parent > a:after {\n border-color: $colorPrimary transparent transparent;\n right: space('medium');\n }\n\n .dropdown .is-dropdown-submenu a,\n .comment__header__context-menu__content-item {\n @include fontSize('micro');\n display: flex;\n align-items: center;\n justify-content: stretch;\n appearance: none;\n text-decoration-line: none;\n border: none;\n padding: space('xsmall') space('medium');\n padding-left: space('large');\n color: $colorOldGrey70;\n background-color: transparent;\n height: $menuItemHeight;\n line-height: $menuItemHeight;\n transition: all $baseTransitionAnimationSpeed;\n cursor: pointer;\n\n &:hover {\n color: $colorOldGrey70;\n background-color: $colorOldGrey5;\n text-decoration-line: none;\n }\n }\n\n .comment__header__context-menu__content-item {\n grid-gap: space('small');\n gap: space('small');\n }\n\n\n /* Comments */\n\n .comments {\n padding-top: 0;\n margin-top: space('medium');\n margin-bottom: space('medium');\n }\n\n .comments .section-heading {\n margin-top: 0;\n }\n\n .comment__header,\n .comment__footer,\n .add-comment {\n @include spaceCurve('padding', 'regular');\n }\n\n .add-comment {\n background-color: transparent;\n padding: 0;\n }\n\n .add-comment .remaining-character-count {\n color: $baseColor;\n padding: space('xsmall') space('small');\n }\n\n .comment-threads {\n margin-bottom: space('xxxlarge');\n }\n\n .comment__content {\n @include spaceCurve('padding-left', 'regular');\n @include spaceCurve('padding-right', 'regular');\n\n p {\n margin-top: 0;\n margin-bottom: 0;\n }\n }\n\n .comment__footer {\n @include fontCurve('p2');\n }\n\n .comment__votes {\n margin-top: 0;\n }\n\n .comment__header__context-menu__content {\n box-shadow: $boxShadowPopover;\n }\n\n .opinion-toggle {\n margin: space('xlarge') 0;\n }\n\n .button:hover,\n .meeting-polls__button:hover,\n .opinion-toggle--meh.is-active,\n .opinion-toggle--meh:focus,\n .opinion-toggle--meh:hover {\n background-color: $colorPrimaryHover;\n border-color: $colorPrimaryHover;\n }\n\n .opinion-toggle--ko.is-active,\n .opinion-toggle--ko:focus,\n .opinion-toggle--ko:hover {\n background-color: $colorError60;\n border-color: $colorError60;\n }\n\n .opinion-toggle--ok.is-active,\n .opinion-toggle--ok:focus,\n .opinion-toggle--ok:hover {\n background-color: $colorFirgreen50;\n border-color: $colorFirgreen50;\n }\n\n\n /* Process Nav */\n\n .process-nav__content {\n border-bottom: none;\n }\n\n @media screen and (min-width: #{$mobileBreakpoint}) {\n .process-nav__content {\n border-bottom: 1px solid $baseBorderColor;\n }\n }\n\n @media screen and (min-width: #{$mobileBreakpoint}) {\n .process-nav li {\n padding: space('xsmall') space('small');\n }\n }\n\n\n /* Statistics */\n\n .statistics-cell {\n margin: space('xxlarge') 0;\n }\n\n .statistics-cell .statistic__number {\n @include font('regular');\n color: $colorPrimary;\n }\n\n .statistics-cell .statistic__title {\n @include font('heavy');\n @include fontCurve('p2');\n color: $baseLeadColor;\n margin-top: 0;\n text-transform: none;\n }\n\n .statistics-cell .statistic__data:after {\n border-left: 2px solid $baseBorderColor;\n }\n\n\n /* Richtext */\n\n .ql-editor {\n @include richtext-host;\n @include richtext-slotted($withLists: false);\n\n *:first-child {\n margin-top: 0;\n }\n }\n\n .help-text {\n color: $baseColor;\n }\n\n .help-text .ql-editor p {\n @include fontCurve('caption');\n }\n\n\n /* Accountability */\n\n .accountability .categories .categories--header span,\n .accountability .categories .progress-figure,\n .accountability .categories .categories--group .category--title .progress-info .category--count {\n color: $baseColor;\n }\n\n .accountability .categories .categories--header .icon--arrow-bottom {\n fill: $baseColor;\n }\n\n .accountability .categories .categories--header {\n border-color: $baseBorderColor;\n margin-bottom: space('medium');\n padding-bottom: space('medium');\n }\n\n .accountability .intro .progress-level p {\n @include font('heavy');\n @include spaceCurve('margin-bottom', 'small');\n margin-top: 0;\n }\n\n .accountability .categories .progress-figure {\n margin-top: 0;\n }\n\n .accountability .categories .categories--group .category--title .progress-info .category--count {\n margin-top: space('xxxsmall');\n }\n\n .accountability .title-action {\n @include spaceCurve('margin-bottom', 'regular');\n }\n\n\n /* Breadrumb */\n\n .lines-breadcrumb a,\n .muted-link {\n @include font;\n color: $linkColor;\n transition: color $baseTransitionAnimationSpeed;\n border-radius: $buttonBorderRadius;\n\n &:hover,\n &:focus {\n color: $linkHoverColor;\n }\n }\n\n\n /* Lead */\n\n .lead .ql-editor p {\n @include font('light');\n @include fontCurve('h3');\n @include spaceCurve('margin-bottom', 'big');\n margin-top: space('xxlarge');\n }\n\n\n /* Message / Callout / Floating Helper */\n\n .callout.secondary,\n .callout.warning,\n .callout.success,\n .floating-helper__content {\n @include spaceCurve('padding', 'regular');\n padding: space('medium');\n display: block;\n box-shadow: $boxShadowMessage;\n background-color: $colorWhite;\n margin-bottom: space('xxxxlarge') !important;\n }\n\n .callout {\n @include font('heavy');\n border-left-width: 5px;\n\n .heading2,\n .heading3 {\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n .floating-helper__content {\n border-top: none;\n padding-right: calc(#{iconSize('medium')} + #{space('small')} + #{space('medium')});\n }\n\n .floating-helper__wrapper {\n position: relative;\n }\n\n .floating-helper__content-close {\n @include spaceCurve('top', 'regular');\n @include spaceCurve('right', 'regular');\n box-sizing: content-box;\n position: absolute;\n width: iconSize('medium');\n height: iconSize('medium');\n padding: var(--stzh-space-xsmall);\n margin: calc(var(--stzh-space-xsmall) * -1);\n background-color: transparent;\n color: var(--stzh-base-lead-color);\n\n .icon {\n width: iconSize('xxsmall');\n height: iconSize('xxsmall');\n }\n }\n\n .floating-helper__icon-big {\n width: iconSize('large');\n height: iconSize('large');\n background-color: $colorOldPrimary8;\n\n .icon {\n width: iconSize('xsmall');\n height: iconSize('xsmall');\n }\n }\n\n @media screen and (min-width: #{$mobileBreakpoint}) {\n .floating-helper__content-inner > * {\n margin: 0;\n }\n\n .floating-helper__icon-big {\n margin-right: space('small');\n }\n }\n\n .floating-helper-block .mb-s {\n margin: 0 !important;\n }\n\n\n /* Sidebar */\n\n .extra,\n .tech-info {\n @include spaceCurve('margin-bottom', 'regular');\n }\n\n .extra__date,\n .extra__suport-number {\n @include font('heavy');\n @include fontCurve('h2');\n }\n\n .extra__month {\n @include fontCurve('caption');\n }\n\n .extra__time,\n .extra__suport-text {\n @include fontCurve('p2');\n color: $baseColor;\n }\n\n\n /* Filters */\n\n .filters__help p:first-of-type {\n @include fontCurve('p2');\n margin-top: 0;\n }\n\n #participatory-space-filters legend {\n margin-right: space('xsmall');\n }\n\n\n /* Mini Title */\n\n .mini-title {\n @include font('heavy');\n @include fontCurve('p2');\n color: $baseColor;\n margin-bottom: space('small');\n }\n\n .mini-title__strong--highlight {\n @include font('title');\n @include fontCurve('h4');\n }\n\n\n /* Tags */\n\n .tags {\n display: flex;\n flex-wrap: wrap;\n\n &:last-child {\n margin-bottom: calc(#{space('xsmall')} * -1);\n }\n }\n\n .tags li {\n margin-right: space('xsmall');\n margin-bottom: space('xsmall');\n }\n\n .tags li a {\n @include fontSize('micro');\n height: 32px;\n line-height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-radius: 16px;\n padding: 0 space('medium');\n color: $colorPrimary;\n appearance: none;\n border: 1px solid $colorOldGrey13;\n background-color: $colorWhite;\n transition: all $baseTransitionAnimationSpeed;\n text-decoration-line: none;\n }\n\n /* Card */\n\n .card {\n color: $baseColor;\n }\n\n .card__top .badge-card__content,\n .card__top .card__content {\n @include fontCurve('caption');\n padding: space('xsmall') space('large');\n align-items: center;\n\n span.muted {\n font-size: inherit;\n }\n }\n\n .card__top .card__content {\n border-bottom: 1px solid $baseBorderColor;\n }\n\n .card__top .card__content .card__link {\n display: block;\n }\n\n .card > .card__content,\n .card.definition-data,\n .card .definition-data,\n .badge-card__content,\n .card__support,\n .filters__section,\n .filters__section--general,\n .filters__section--general:first-of-type,\n .filters__section:first-of-type {\n @include spaceCurve('padding', 'regular');\n }\n\n .card-data__item,\n .filters__section,\n .filters__section--general,\n .card__block ul,\n .card__icondata ul,\n .card__footer,\n .card__top {\n border-color: $baseBorderColor;\n }\n\n .card__link {\n display: flex;\n flex-direction: column;\n text-decoration-line: none;\n color: $baseColor;\n\n &:hover {\n text-decoration-line: none;\n }\n\n .text-small {\n @include fontCurve('p2');\n }\n }\n\n .card__header {\n margin-bottom: space('small');\n }\n\n .card__text {\n @include fontCurve('p1');\n\n &:not(:last-child) {\n margin-bottom: space('small');\n }\n }\n\n .card .card__title,\n .card--list__heading {\n @include font('title');\n @include fontCurve('h4', 'heading');\n color: $colorPrimary;\n margin-top: 0;\n transition: color $baseTransitionAnimationSpeed;\n }\n\n .card:not(.card--secondary):hover .card__title {\n color: $colorPrimaryHover;\n }\n\n .collapsible-list .card__text--paragraph {\n color: $baseColor !important;\n }\n\n .card__block ul li:not(:first-child),\n .card__icondata ul li:not(:first-child) {\n @include fontCurve('caption');\n color: $baseColor;\n }\n\n .card-data__item {\n @include fontCurve('caption');\n color: $baseColor;\n\n .heading1,\n .heading2,\n .heading3,\n .heading4 {\n margin-top: 0;\n }\n\n strong {\n display: block;\n }\n\n br {\n display: none;\n }\n }\n\n .card-data__item.creation_date_status strong {\n color: $baseColor;\n color: inherit;\n }\n\n .card__status .card-data__item {\n padding: space('xsmall');\n }\n\n .card--meta {\n color: $baseColor;\n }\n\n .card__block ul li:not(:first-child) strong,\n .card__icondata ul li:not(:first-child) strong {\n font-size: inherit;\n letter-spacing: inherit;\n }\n\n .add-message:not(.card--secondary),\n .card:not(.card--secondary),\n .chart-tooltip:not(.card--secondary),\n .conference-registration:not(.card--secondary),\n .conference-speaker .speaker-bio:not(.card--secondary) {\n &:hover {\n box-shadow: $boxShadowPopover;\n }\n }\n\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > p,\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > h1,\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > h2,\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > h3,\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > h4 {\n @include font;\n @include fontCurve('p1');\n color: $baseColor;\n }\n\n // Progress bar\n\n .progress__bar.progress__bar--vertical .progress__bar__subtitle,\n .progress__bar .progress__bar__title {\n @include font;\n @include fontCurve('caption');\n color: $baseColor;\n }\n\n .card__support__number,\n .progress__bar.progress__bar--vertical .progress__bar__subtitle .progress__bar__number,\n .progress__bar .progress__bar__title .progress__bar__number,\n .extra__suport-text,\n .progress__bar.progress__bar--vertical .progress__bar__text {\n @include fontCurve('p2');\n color: $baseColor;\n }\n\n .progress__bar.progress__bar--vertical .progress__bar__number {\n @include font('heavy');\n @include fontCurve('h2');\n }\n\n // Card list\n\n .card--list__item {\n padding: 0;\n }\n\n .card--list__text {\n padding: 0;\n display: block;\n }\n\n .card--list__icon {\n fill: $colorPrimary;\n }\n\n .card--list__item .card__link {\n @include spaceCurve('padding', 'regular');\n }\n\n .card--list__text .card__link:hover .card--list__heading {\n color: $colorPrimaryHover;\n }\n\n .card--list__text .card__link .text-small {\n color: $baseColor;\n }\n\n .card--list__data {\n background-color: $colorOldGrey5;\n }\n\n .card--list__data__number {\n @include font('heavy');\n @include fontCurve('h3');\n color: $colorOldGrey70;\n }\n\n // Side cards\n\n .card.extra,\n .view-side .card:not(.card--secondary),\n .comment-thread:not(.card--secondary) {\n &:hover {\n box-shadow: none;\n }\n }\n\n // Definition Card\n\n .definition__title {\n color: $colorOldGrey70;\n }\n\n .definition-data {\n color: $colorOldGrey55;\n }\n\n .definition-data__item {\n @include fontCurve('p2');\n padding: 0;\n padding-bottom: space('small');\n margin-bottom: space('small');\n border-bottom: 1px solid $baseBorderColor;\n\n &:last-child {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n }\n }\n\n .definition-data__title {\n @include font('heavy');\n @include fontCurve('p2');\n margin-bottom: 0;\n }\n\n .section.columns.medium-5.mediumlarge-4.large-3 > .card.extra.definition-data {\n background-color: $colorOldGrey5;\n }\n\n\n /* Blog */\n\n .author__name {\n @include font('regular');\n @include fontCurve('caption');\n color: $colorOldGrey55 !important;\n }\n\n .author-data {\n @include fontCurve('caption');\n color: $baseColor;\n }\n\n .author-data__extra {\n @include font('regular');\n @include fontCurve('caption');\n\n &::before {\n border-color: $baseBorderColor;\n }\n }\n\n .author-data__extra a {\n white-space: nowrap;\n text-decoration-line: none;\n }\n\n .author-data__extra > a,\n .author-data__extra > button\n .author-data__extra > span {\n margin-right: space('medium');\n }\n\n\n /* Budget */\n\n .budget-summary {\n .heading2,\n .heading3 {\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n .budget-progress {\n min-height: $formInputHeight;\n }\n\n .budget-list__title {\n margin-top: space('xsmall');\n margin-bottom: space('medium');\n }\n\n .budget-list__text:not(:last-child) {\n margin-bottom: 0;\n }\n\n .budget-list__data__number {\n @include font('heavy');\n @include fontCurve('h4');\n }\n\n /* Survey */\n\n .answer-questionnaire .questionnaire-question {\n @include font('heavy');\n @include fontCurve('p1');\n margin-bottom: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h\n} from \"@stencil/core\";\n\n/**\n *\n */\n@Component({\n tag: \"stzh-skin-portal-mitwirken\",\n styleUrl: \"stzh-skin-portal-mitwirken.scss\"\n})\nexport class StzhSkinPortalMitwirken {\n componentDidLoad() {\n // copy this string from console and put it in the Decidim CSS textbox to adjust theme\n console.log((this.constructor as any).style.replace('@charset \"UTF-8\";', ''));\n }\n\n render() {\n return (\n <Host>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"stzh-skin-portal-mitwirken.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,0BAA0B,GAAG,0xgLAA0xgL;;MCahzgL,uBAAuB;;;;EAClC,gBAAgB;;IAEd,OAAO,CAAC,GAAG,CAAE,IAAI,CAAC,WAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,CAAC;GAC/E;EAED,MAAM;IACJ,QACEA,QAACC,UAAI,OACE,EACP;GACH;;;;;;","names":["h","Host"],"sources":["src/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.scss?tag=stzh-skin-portal-mitwirken","src/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.tsx"],"sourcesContent":["@import \"../../global/css/stzh-components.css\";\n\n:root {\n --stzh-color-primary: var(--stzh-color-deepcerulean);\n --stzh-color-primary-hover: var(--stzh-color-regalblue);\n\n --stzh-color-primary48: rgba(5, 127, 172, 0.48);\n --stzh-color-primary32: rgba(5, 127, 172, 0.32);\n --stzh-color-primary16: rgba(5, 127, 172, 0.16);\n --stzh-color-primary8: rgba(5, 127, 172, 0.08);\n\n --stzh-font-family-heavy: var(--stzh-font-family-bold);\n --stzh-font-family-title: var(--stzh-font-family-light);\n\n --stzh-button-text-hover-background: rgba(5, 127, 172, 0.08);\n}\n\n$mobileBreakpoint: 40em;\n$processHeaderMaxMobileBreakpoint: 599px;\n$processHeaderMaxDesktopBreakpoint: 1023px;\n\nmain,\n.reveal-overlay,\n.mod_header {\n --primary: var(--stzh-color-primary);\n --secondary: var(--stzh-color-primary);\n --success: var(--stzh-color-old-truegreen);\n --warning: var(--stzh-color-old-warning);\n --alert: var(--stzh-color-error60);\n --highlight: var(--stzh-color-coral);\n --highlight_alternative: var(--stzh-color-coral);\n}\n\n// For main and modals\nmain,\n.reveal-overlay {\n a.muted,\n .inline-filters button.muted[data-toggle] {\n color: $colorWhite;\n background-color: $colorOldGrey13;\n border-color: $colorOldGrey13;\n\n &:hover,\n &:focus {\n color: $colorWhite;\n background-color: $colorOldGrey13;\n border-color: $colorOldGrey13;\n }\n }\n}\n\n// Only modals\n.reveal-overlay {\n background-color: rgba(5, 127, 172, 0.8);\n\n /* Dialog */\n\n .reveal__title {\n margin-top: 0;\n }\n\n .reveal {\n box-shadow: $boxShadowOverlay;\n }\n\n .close-button {\n color: $baseLeadColor;\n }\n}\n\n// Only header\n.mod_header {\n .mod_header__logobar-logo img {\n background: url(https://www.stadt-zuerich.ch/content/dam/stzh/corpdesign/wortbildmarken/logo_stzh_vbz_pos_2-1.svg) no-repeat;\n width: 0;\n padding-left: 208px;\n }\n}\n\n// Main Content Modules\nmain {\n accent-color: $colorPrimary;\n\n /* Resets */\n @include richtext-host;\n @include richtext-slotted($withLists: false);\n\n &, label, tfoot, thead {\n color: $baseColor;\n }\n\n svg {\n overflow: visible;\n }\n\n label {\n display: flex;\n align-items: center;\n }\n\n .field label {\n @include font('heavy');\n display: block;\n }\n\n input[type=checkbox],\n input[type=radio] {\n width: 24px;\n height: 24px;\n }\n\n label > [type=checkbox],\n label > [type=radio] {\n margin-right: space('small');\n }\n\n .filters__section--general label,\n .filters__section label {\n @include fontSize('milli');\n display: flex;\n line-height: 24px;\n transition: color $baseTransitionAnimationSpeed;\n color: $baseColor;\n margin-bottom: space('small');\n }\n\n .filters__has-subfilters {\n align-items: center;\n\n [data-toggle] {\n margin-bottom: space('small');\n }\n }\n\n .form-input-extra-before,\n .form-error {\n @include font;\n @include fontCurve('caption');\n }\n\n .form-error,\n .is-invalid-label {\n color: $colorError60;\n }\n\n [type=color],\n [type=date],\n [type=datetime-local],\n [type=datetime],\n [type=email],\n [type=month],\n [type=number],\n [type=password],\n [type=search],\n [type=tel],\n [type=text],\n [type=time],\n [type=url],\n [type=week],\n textarea,\n .inline-filters button[data-toggle],\n select,\n .data-picker .picker-prompt a,\n .data-picker.picker-single .picker-values div a {\n @include font;\n\t @include fontSize('milli');\n border: 1px solid $formBorderColor;\n transition-property: color, border-color;\n transition-duration: $baseTransitionAnimationSpeed;\n border-radius: $formInputBorderRadius;\n padding: space('xsmall') space('medium');\n width: 100%;\n height: $formInputHeight;\n color: $colorPrimary;\n appearance: none;\n margin-bottom: space('medium');\n text-decoration-line: none;\n\n @include placeholder {\n color: $formInputPlaceholderColor;\n }\n\n &:hover,\n &:focus {\n color: $colorPrimaryHover;\n border-color: $colorPrimaryHover;\n }\n\n // prevent ugly autofill background color in chrome\n &:-webkit-autofill {\n background-clip: text;\n }\n\n // show ellipsis for placeholders that are too long\n &:placeholder-shown {\n text-overflow: ellipsis;\n }\n }\n\n .data-picker .picker-prompt a,\n .data-picker.picker-single .picker-values div a {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n &::after {\n float: none;\n margin-top: 0;\n }\n }\n\n .inline-filters button[data-toggle],\n select {\n padding-right: space('xxlarge');\n }\n\n textarea {\n min-height: $formInputHeight;\n resize: vertical;\n\n &[rows] {\n height: auto;\n }\n }\n\n .input-group .input-group-field {\n margin-bottom: 0;\n }\n\n .section > p,\n .floating-helper__content p {\n margin-top: 0;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n .add-message,\n .card,\n .chart-tooltip,\n .comment-thread,\n .conference-registration,\n .conference-speaker .speaker-bio {\n margin-bottom: space('xxlarge');\n border-color: $baseBorderColor;\n background-color: $colorWhite;\n }\n\n .ql-editor ol,\n .ql-editor ul {\n padding-left: 0;\n }\n\n .badge-card__content,\n .card__content,\n .card__text--paragraph,\n .floating-helper__content-inner,\n .lead,\n .process-header + .wrapper .section,\n .timeline__content {\n ul li:not(.card-data__item) {\n padding-left: space('large');\n\n &::before {\n content: \"–\";\n margin-left: 0;\n margin-right: 0;\n text-align: left;\n width: auto;\n }\n }\n }\n\n .badge-card__content,\n .card__content,\n .card__text--paragraph,\n .floating-helper__content-inner,\n .lead,\n .process-header + .wrapper .section,\n .timeline__content {\n ul.tags li:not(.card-data__item) {\n padding-left: 0;\n\n &::before {\n content: none;\n }\n }\n }\n\n .m-bottom {\n margin-bottom: space('medium');\n }\n\n .mb-sm {\n margin-bottom: space('xxlarge');\n }\n\n p {\n color: $baseColor;\n }\n\n tfoot td,\n tfoot th,\n thead td,\n thead th {\n @include font('heavy');\n }\n\n tfoot td,\n tfoot th,\n thead td,\n thead th,\n tbody td,\n tbody th {\n padding: space('xmall');\n }\n\n table,\n td,\n tr,\n .questionnaire-question-matrix table,\n .questionnaire-question-matrix td,\n .questionnaire-question-matrix tr,\n .questionnaire-question-matrix tr:nth-child(2n) {\n border-color: $baseBorderColor;\n }\n\n\n /* Process Header */\n\n .process-header .process-header__inner {\n background-color: $colorPrimary;\n }\n\n .card--full .process-header .process-header__container .process-header__info .card__title,\n .process-header .process-header__container .process-header__info .card--full .card__title,\n .process-header .process-header__container .process-header__info .heading2 {\n @include font('title');\n @include fontCurve('hero', 'heading');\n @include spaceCurve('margin-bottom', 'medium');\n margin-top: 0;\n border-bottom: none;\n padding-bottom: 0;\n }\n\n .process-header .process-header__container {\n padding: 0 space('xxxxlarge');\n\n @media screen and (max-width: #{$processHeaderMaxDesktopBreakpoint}) {\n padding: space('xxxxlarge');\n padding-bottom: space('big');\n }\n\n @media screen and (max-width: #{$processHeaderMaxMobileBreakpoint}) {\n padding: space('xxlarge') $containerMargin space('xxxlarge');\n }\n }\n\n .process-header__info {\n padding: 0;\n }\n\n .process-header .process-header__container .process-header__info .heading-small {\n @include fontCurve('h3', 'heading');\n color: $baseInvertColor;\n margin-top: 0;\n }\n\n .process-header__hashtag a {\n color: $baseInvertColor;\n text-decoration-line: none;\n\n &:hover {\n color: $baseInvertColor;\n }\n\n .external-link-indicator {\n background: $baseInvertColor;\n padding: space('xxsmall');\n box-sizing: content-box;\n border-radius: $buttonBorderRadius;\n margin: 0;\n margin-bottom: -4px;\n margin-left: 4px;\n }\n }\n\n .phase-subtitle--initiatives,\n .phase-title,\n .phase-title--initiatives {\n @include font('title');\n @include fontCurve('h4');\n color: $baseLeadColor;\n }\n\n .process-header__progress {\n display: flex;\n align-items: center;\n }\n\n .process-header__phase {\n padding: space('medium');\n margin-top: space('medium');\n margin-bottom: 0;\n }\n\n .phase-date {\n @include font('regular');\n @include fontCurve('p2');\n color: $baseColor;\n }\n\n .phase-current {\n @include fontCurve('caption');\n margin-left: space('xxsmall');\n color: $baseColor;\n }\n\n .process-header__progress {\n margin-bottom: space('xsmall');\n }\n\n .process-header__phase .button,\n .process-header__phase .meeting-polls__button,\n .process-phase .button,\n .process-phase .meeting-polls__button {\n margin-top: space('xsmall');\n }\n\n /* Links */\n\n a,\n .link {\n text-decoration-line: underline;\n transition: $baseTransitionAnimationSpeed;\n\n &:hover {\n color: $linkHoverColor;\n }\n }\n\n /* Buttons */\n\n .button {\n @include fontSize('milli');\n display: inline-flex;\n align-items: center;\n height: auto;\n min-height: $formInputHeight;\n line-height: $formInputHeight - 2px;\n line-height: inherit;\n margin: 0;\n text-decoration-line: none;\n appearance: none;\n border: 1px solid $colorPrimary;\n padding: space('xsmall') space('xlarge');\n transition: all $baseTransitionAnimationSpeed;\n\n &.small {\n @include fontSize('micro');\n min-height: $formInputHeightSmall;\n line-height: $formInputHeightSmall - 2px;\n }\n\n &.tiny {\n @include fontSize('micro');\n min-height: 32px;\n }\n\n &.process-nav__more i {\n background-color: currentColor;\n margin-bottom: 0;\n }\n\n &.process-nav__more i:first-child {\n margin-left: space('xsmall');\n }\n }\n\n .button--icon {\n .icon-wrap {\n display: flex;\n align-items: center;\n }\n\n .icon-wrap .icon {\n margin-right: space('xxsmall');\n }\n }\n\n .button--icon.meeting-polls__button .icon,\n .button--icon.small .icon {\n width: iconSize('xxsmall');\n height: iconSize('xxsmall');\n }\n\n .extra .button.follow-button {\n margin-top: 0;\n }\n\n .button-group.meeting-polls__button .button,\n .button-group.meeting-polls__button .meeting-polls__button,\n .button-group.small .button,\n .button-group.small .meeting-polls__button,\n .button-group.tiny .button,\n .button-group.tiny .meeting-polls__button {\n @include fontSize('micro');\n }\n\n .button.primary,\n .button.primary.disabled,\n .button.primary.disabled:focus,\n .button.primary.disabled:hover,\n .button.primary[disabled],\n .button.primary[disabled]:focus,\n .button.primary[disabled]:hover,\n .primary.meeting-polls__button {\n background-color: $colorPrimary;\n\n &:hover,\n &:focus {\n background-color: $colorPrimaryHover;\n }\n }\n\n .button.budget-vote-button {\n @include font;\n color: $colorPrimary;\n background-color: $colorWhite;\n margin-bottom: space('medium');\n\n &:hover,\n &:focus {\n color: $colorPrimaryHover;\n background-color: $colorWhite;\n }\n }\n\n .button--vote-button {\n margin-bottom: space('large');\n }\n\n .view-side > .button {\n margin-bottom: space('medium');\n }\n\n .button.clear,\n .button.clear.disabled,\n .button.clear.disabled:focus,\n .button.clear.disabled:hover,\n .button.clear[disabled],\n .button.clear[disabled]:focus,\n .button.clear[disabled]:hover,\n .clear.meeting-polls__button {\n color: $colorError60;\n }\n\n\n /* Wrapper / Layout */\n\n .wrapper {\n @include spaceCurve('padding-top', 'big');\n @include spaceCurve('padding-bottom', 'big');\n\n padding-left: $containerMargin;\n padding-right: $containerMargin;\n\n @include mq($from: small) {\n padding-left: $containerMarginSmall;\n padding-right: $containerMarginSmall;\n }\n\n @include mq($from: medium) {\n padding-left: $containerMarginMedium;\n padding-right: $containerMarginMedium;\n }\n\n @include mq($from: large) {\n padding-left: $containerMarginLarge;\n padding-right: $containerMarginLarge;\n }\n\n .wrapper--inner {\n background-color: $colorOldGrey5;\n }\n\n // .row.column {\n // padding-left: 0;\n // padding-right: 0;\n // }\n\n .row:not(.column) .floating-helper-container {\n padding-right: 0.625rem;\n padding-left: 0.625rem;\n }\n\n @media screen and (min-width: #{$mobileBreakpoint}) {\n .row:not(.column) .floating-helper-container {\n padding-right: 0.9375rem;\n padding-left: 0.9375rem;\n }\n }\n }\n\n\n /* Headings */\n\n .heading1, h1,\n .heading2, h2,\n .heading3, h3,\n .heading4, h4 {\n color: $colorPrimary;\n }\n\n .heading1, h1 {\n @include font('title');\n @include fontCurve('h1', 'heading');\n @include spaceCurve('margin-top', 'large');\n @include spaceCurve('margin-bottom', 'medium');\n @include spaceCurve('padding-bottom', 'tiny');\n border-bottom: 1px solid $baseBorderColor;\n }\n\n .section-heading,\n .heading2, h2 {\n @include font('title');\n @include fontCurve('h2', 'heading');\n @include spaceCurve('margin-top', 'large');\n @include spaceCurve('margin-bottom', 'medium');\n @include spaceCurve('padding-bottom', 'tiny');\n border-bottom: 1px solid $baseBorderColor;\n }\n\n .heading3, h3 {\n @include font('title');\n @include fontCurve('h3', 'heading');\n @include spaceCurve('margin-top', 'medium');\n }\n\n .heading4, h4 {\n @include font('title');\n @include fontCurve('h4', 'heading');\n @include spaceCurve('margin-top', 'medium');\n }\n\n .heading4, h4,\n .timeline__item--current .timeline__date {\n color: $colorPrimary;\n }\n\n #most-commented .section-heading {\n margin-top: 0;\n }\n\n #most-commented a {\n text-decoration-line: none;\n }\n\n\n /* Section */\n\n .section {\n @include spaceCurve('margin-bottom', 'large');\n }\n\n .section-heading {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .section-heading .text-sm,\n .section-heading .text-small {\n @include fontCurve('h3', 'heading');\n }\n\n\n /* Dropdown */\n\n .order-by__dropdown,\n .results-per-page__dropdown {\n display: flex;\n align-items: center;\n }\n\n .order-by__text,\n .results-per-page__text {\n margin-right: space('xsmall');\n }\n\n .is-dropdown-submenu {\n box-shadow: $boxShadowPopover;\n border: none;\n border-radius: var(--stzh-popover-border-radius);\n margin-top: var(--stzh-space-xsmall);\n }\n\n .dropdown.menu > li.is-dropdown-submenu-parent > a {\n @include font;\n @include fontSize('milli');\n display: flex;\n align-items: center;\n background: $colorWhite;\n padding: space('xsmall') space('medium');\n padding-right: calc(#{space('xlarge')} + #{space('medium')} + #{space('xsmall')});\n min-height: $formInputHeight;\n border: 1px solid $formBorderColor;\n margin: 0;\n }\n\n .dropdown.menu > li.is-dropdown-submenu-parent > a:after {\n border-color: $colorPrimary transparent transparent;\n right: space('medium');\n }\n\n .dropdown .is-dropdown-submenu a,\n .comment__header__context-menu__content-item {\n @include fontSize('micro');\n display: flex;\n align-items: center;\n justify-content: stretch;\n appearance: none;\n text-decoration-line: none;\n border: none;\n padding: space('xsmall') space('medium');\n padding-left: space('large');\n color: $colorOldGrey70;\n background-color: transparent;\n height: $menuItemHeight;\n line-height: $menuItemHeight;\n transition: all $baseTransitionAnimationSpeed;\n cursor: pointer;\n\n &:hover {\n color: $colorOldGrey70;\n background-color: $colorOldGrey5;\n text-decoration-line: none;\n }\n }\n\n .comment__header__context-menu__content-item {\n grid-gap: space('small');\n gap: space('small');\n }\n\n\n /* Comments */\n\n .comments {\n padding-top: 0;\n margin-top: space('medium');\n margin-bottom: space('medium');\n }\n\n .comments .section-heading {\n margin-top: 0;\n }\n\n .comment__header,\n .comment__footer,\n .add-comment {\n @include spaceCurve('padding', 'regular');\n }\n\n .add-comment {\n background-color: transparent;\n padding: 0;\n }\n\n .add-comment .remaining-character-count {\n color: $baseColor;\n padding: space('xsmall') space('small');\n }\n\n .comment-threads {\n margin-bottom: space('xxxlarge');\n }\n\n .comment__content {\n @include spaceCurve('padding-left', 'regular');\n @include spaceCurve('padding-right', 'regular');\n\n p {\n margin-top: 0;\n margin-bottom: 0;\n }\n }\n\n .comment__footer {\n @include fontCurve('p2');\n }\n\n .comment__votes {\n margin-top: 0;\n }\n\n .comment__header__context-menu__content {\n box-shadow: $boxShadowPopover;\n }\n\n .opinion-toggle {\n margin: space('xlarge') 0;\n }\n\n .button:hover,\n .meeting-polls__button:hover,\n .opinion-toggle--meh.is-active,\n .opinion-toggle--meh:focus,\n .opinion-toggle--meh:hover {\n background-color: $colorPrimaryHover;\n border-color: $colorPrimaryHover;\n }\n\n .opinion-toggle--ko.is-active,\n .opinion-toggle--ko:focus,\n .opinion-toggle--ko:hover {\n background-color: $colorError60;\n border-color: $colorError60;\n }\n\n .opinion-toggle--ok.is-active,\n .opinion-toggle--ok:focus,\n .opinion-toggle--ok:hover {\n background-color: $colorFirgreen50;\n border-color: $colorFirgreen50;\n }\n\n\n /* Process Nav */\n\n .process-nav__content {\n border-bottom: none;\n }\n\n @media screen and (min-width: #{$mobileBreakpoint}) {\n .process-nav__content {\n border-bottom: 1px solid $baseBorderColor;\n }\n }\n\n @media screen and (min-width: #{$mobileBreakpoint}) {\n .process-nav li {\n padding: space('xsmall') space('small');\n }\n }\n\n\n /* Statistics */\n\n .statistics-cell {\n margin: space('xxlarge') 0;\n }\n\n .statistics-cell .statistic__number {\n @include font('regular');\n color: $colorPrimary;\n }\n\n .statistics-cell .statistic__title {\n @include font('heavy');\n @include fontCurve('p2');\n color: $baseLeadColor;\n margin-top: 0;\n text-transform: none;\n }\n\n .statistics-cell .statistic__data:after {\n border-left: 2px solid $baseBorderColor;\n }\n\n\n /* Richtext */\n\n .ql-editor {\n @include richtext-host;\n @include richtext-slotted($withLists: false);\n\n *:first-child {\n margin-top: 0;\n }\n }\n\n .help-text {\n color: $baseColor;\n }\n\n .help-text .ql-editor p {\n @include fontCurve('caption');\n }\n\n\n /* Accountability */\n\n .accountability .categories .categories--header span,\n .accountability .categories .progress-figure,\n .accountability .categories .categories--group .category--title .progress-info .category--count {\n color: $baseColor;\n }\n\n .accountability .categories .categories--header .icon--arrow-bottom {\n fill: $baseColor;\n }\n\n .accountability .categories .categories--header {\n border-color: $baseBorderColor;\n margin-bottom: space('medium');\n padding-bottom: space('medium');\n }\n\n .accountability .intro .progress-level p {\n @include font('heavy');\n @include spaceCurve('margin-bottom', 'small');\n margin-top: 0;\n }\n\n .accountability .categories .progress-figure {\n margin-top: 0;\n }\n\n .accountability .categories .categories--group .category--title .progress-info .category--count {\n margin-top: space('xxxsmall');\n }\n\n .accountability .title-action {\n @include spaceCurve('margin-bottom', 'regular');\n }\n\n\n /* Breadrumb */\n\n .lines-breadcrumb a,\n .muted-link {\n @include font;\n color: $linkColor;\n transition: color $baseTransitionAnimationSpeed;\n border-radius: $buttonBorderRadius;\n\n &:hover,\n &:focus {\n color: $linkHoverColor;\n }\n }\n\n\n /* Lead */\n\n .lead .ql-editor p {\n @include font('light');\n @include fontCurve('h3');\n @include spaceCurve('margin-bottom', 'big');\n margin-top: space('xxlarge');\n }\n\n\n /* Message / Callout / Floating Helper */\n\n .callout.secondary,\n .callout.warning,\n .callout.success,\n .floating-helper__content {\n @include spaceCurve('padding', 'regular');\n padding: space('medium');\n display: block;\n box-shadow: $boxShadowMessage;\n background-color: $colorWhite;\n margin-bottom: space('xxxxlarge') !important;\n }\n\n .callout {\n @include font('heavy');\n border-left-width: 5px;\n\n .heading2,\n .heading3 {\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n .floating-helper__content {\n border-top: none;\n padding-right: calc(#{iconSize('medium')} + #{space('small')} + #{space('medium')});\n }\n\n .floating-helper__wrapper {\n position: relative;\n }\n\n .floating-helper__content-close {\n @include spaceCurve('top', 'regular');\n @include spaceCurve('right', 'regular');\n box-sizing: content-box;\n position: absolute;\n width: iconSize('medium');\n height: iconSize('medium');\n padding: var(--stzh-space-xsmall);\n margin: calc(var(--stzh-space-xsmall) * -1);\n background-color: transparent;\n color: var(--stzh-base-lead-color);\n\n .icon {\n width: iconSize('xxsmall');\n height: iconSize('xxsmall');\n }\n }\n\n .floating-helper__icon-big {\n width: iconSize('large');\n height: iconSize('large');\n background-color: $colorOldPrimary8;\n\n .icon {\n width: iconSize('xsmall');\n height: iconSize('xsmall');\n }\n }\n\n @media screen and (min-width: #{$mobileBreakpoint}) {\n .floating-helper__content-inner > * {\n margin: 0;\n }\n\n .floating-helper__icon-big {\n margin-right: space('small');\n }\n }\n\n .floating-helper-block .mb-s {\n margin: 0 !important;\n }\n\n\n /* Sidebar */\n\n .extra,\n .tech-info {\n @include spaceCurve('margin-bottom', 'regular');\n }\n\n .extra__date,\n .extra__suport-number {\n @include font('heavy');\n @include fontCurve('h2');\n }\n\n .extra__month {\n @include fontCurve('caption');\n }\n\n .extra__time,\n .extra__suport-text {\n @include fontCurve('p2');\n color: $baseColor;\n }\n\n\n /* Filters */\n\n .filters__help p:first-of-type {\n @include fontCurve('p2');\n margin-top: 0;\n }\n\n #participatory-space-filters legend {\n margin-right: space('xsmall');\n }\n\n\n /* Mini Title */\n\n .mini-title {\n @include font('heavy');\n @include fontCurve('p2');\n color: $baseColor;\n margin-bottom: space('small');\n }\n\n .mini-title__strong--highlight {\n @include font('title');\n @include fontCurve('h4');\n }\n\n\n /* Tags */\n\n .tags {\n display: flex;\n flex-wrap: wrap;\n\n &:last-child {\n margin-bottom: calc(#{space('xsmall')} * -1);\n }\n }\n\n .tags li {\n margin-right: space('xsmall');\n margin-bottom: space('xsmall');\n }\n\n .tags li a {\n @include fontSize('micro');\n height: 32px;\n line-height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-radius: 16px;\n padding: 0 space('medium');\n color: $colorPrimary;\n appearance: none;\n border: 1px solid $colorOldGrey13;\n background-color: $colorWhite;\n transition: all $baseTransitionAnimationSpeed;\n text-decoration-line: none;\n }\n\n /* Card */\n\n .card {\n color: $baseColor;\n }\n\n .card__top .badge-card__content,\n .card__top .card__content {\n @include fontCurve('caption');\n padding: space('xsmall') space('large');\n align-items: center;\n\n span.muted {\n font-size: inherit;\n }\n }\n\n .card__top .card__content {\n border-bottom: 1px solid $baseBorderColor;\n }\n\n .card__top .card__content .card__link {\n display: block;\n }\n\n .card > .card__content,\n .card.definition-data,\n .card .definition-data,\n .badge-card__content,\n .card__support,\n .filters__section,\n .filters__section--general,\n .filters__section--general:first-of-type,\n .filters__section:first-of-type {\n @include spaceCurve('padding', 'regular');\n }\n\n .card-data__item,\n .filters__section,\n .filters__section--general,\n .card__block ul,\n .card__icondata ul,\n .card__footer,\n .card__top {\n border-color: $baseBorderColor;\n }\n\n .card__link {\n display: flex;\n flex-direction: column;\n text-decoration-line: none;\n color: $baseColor;\n\n &:hover {\n text-decoration-line: none;\n }\n\n .text-small {\n @include fontCurve('p2');\n }\n }\n\n .card__header {\n margin-bottom: space('small');\n }\n\n .card__text {\n @include fontCurve('p1');\n\n &:not(:last-child) {\n margin-bottom: space('small');\n }\n }\n\n .card .card__title,\n .card--list__heading {\n @include font('title');\n @include fontCurve('h4', 'heading');\n color: $colorPrimary;\n margin-top: 0;\n transition: color $baseTransitionAnimationSpeed;\n }\n\n .card:not(.card--secondary):hover .card__title {\n color: $colorPrimaryHover;\n }\n\n .collapsible-list .card__text--paragraph {\n color: $baseColor !important;\n }\n\n .card__block ul li:not(:first-child),\n .card__icondata ul li:not(:first-child) {\n @include fontCurve('caption');\n color: $baseColor;\n }\n\n .card-data__item {\n @include fontCurve('caption');\n color: $baseColor;\n\n .heading1,\n .heading2,\n .heading3,\n .heading4 {\n margin-top: 0;\n }\n\n strong {\n display: block;\n }\n\n br {\n display: none;\n }\n }\n\n .card-data__item.creation_date_status strong {\n color: $baseColor;\n color: inherit;\n }\n\n .card__status .card-data__item {\n padding: space('xsmall');\n }\n\n .card--meta {\n color: $baseColor;\n }\n\n .card__block ul li:not(:first-child) strong,\n .card__icondata ul li:not(:first-child) strong {\n font-size: inherit;\n letter-spacing: inherit;\n }\n\n .add-message:not(.card--secondary),\n .card:not(.card--secondary),\n .chart-tooltip:not(.card--secondary),\n .conference-registration:not(.card--secondary),\n .conference-speaker .speaker-bio:not(.card--secondary) {\n &:hover {\n box-shadow: $boxShadowPopover;\n }\n }\n\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > p,\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > h1,\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > h2,\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > h3,\n div.card__text--paragraph > .ql-editor.ql-reset-decidim > h4 {\n @include font;\n @include fontCurve('p1');\n color: $baseColor;\n }\n\n // Progress bar\n\n .progress__bar.progress__bar--vertical .progress__bar__subtitle,\n .progress__bar .progress__bar__title {\n @include font;\n @include fontCurve('caption');\n color: $baseColor;\n }\n\n .card__support__number,\n .progress__bar.progress__bar--vertical .progress__bar__subtitle .progress__bar__number,\n .progress__bar .progress__bar__title .progress__bar__number,\n .extra__suport-text,\n .progress__bar.progress__bar--vertical .progress__bar__text {\n @include fontCurve('p2');\n color: $baseColor;\n }\n\n .progress__bar.progress__bar--vertical .progress__bar__number {\n @include font('heavy');\n @include fontCurve('h2');\n }\n\n // Card list\n\n .card--list__item {\n padding: 0;\n }\n\n .card--list__text {\n padding: 0;\n display: block;\n }\n\n .card--list__icon {\n fill: $colorPrimary;\n }\n\n .card--list__item .card__link {\n @include spaceCurve('padding', 'regular');\n }\n\n .card--list__text .card__link:hover .card--list__heading {\n color: $colorPrimaryHover;\n }\n\n .card--list__text .card__link .text-small {\n color: $baseColor;\n }\n\n .card--list__data {\n background-color: $colorOldGrey5;\n }\n\n .card--list__data__number {\n @include font('heavy');\n @include fontCurve('h3');\n color: $colorOldGrey70;\n }\n\n // Side cards\n\n .card.extra,\n .view-side .card:not(.card--secondary),\n .comment-thread:not(.card--secondary) {\n &:hover {\n box-shadow: none;\n }\n }\n\n // Definition Card\n\n .definition__title {\n color: $colorOldGrey70;\n }\n\n .definition-data {\n color: $colorOldGrey55;\n }\n\n .definition-data__item {\n @include fontCurve('p2');\n padding: 0;\n padding-bottom: space('small');\n margin-bottom: space('small');\n border-bottom: 1px solid $baseBorderColor;\n\n &:last-child {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n }\n }\n\n .definition-data__title {\n @include font('heavy');\n @include fontCurve('p2');\n margin-bottom: 0;\n }\n\n .section.columns.medium-5.mediumlarge-4.large-3 > .card.extra.definition-data {\n background-color: $colorOldGrey5;\n }\n\n\n /* Blog */\n\n .author__name {\n @include font('regular');\n @include fontCurve('caption');\n color: $colorOldGrey55 !important;\n }\n\n .author-data {\n @include fontCurve('caption');\n color: $baseColor;\n }\n\n .author-data__extra {\n @include font('regular');\n @include fontCurve('caption');\n\n &::before {\n border-color: $baseBorderColor;\n }\n }\n\n .author-data__extra a {\n white-space: nowrap;\n text-decoration-line: none;\n }\n\n .author-data__extra > a,\n .author-data__extra > button\n .author-data__extra > span {\n margin-right: space('medium');\n }\n\n\n /* Budget */\n\n .budget-summary {\n .heading2,\n .heading3 {\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n .budget-progress {\n min-height: $formInputHeight;\n }\n\n .budget-list__title {\n margin-top: space('xsmall');\n margin-bottom: space('medium');\n }\n\n .budget-list__text:not(:last-child) {\n margin-bottom: 0;\n }\n\n .budget-list__data__number {\n @include font('heavy');\n @include fontCurve('h4');\n }\n\n /* Survey */\n\n .answer-questionnaire .questionnaire-question {\n @include font('heavy');\n @include fontCurve('p1');\n margin-bottom: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h\n} from \"@stencil/core\";\n\n/**\n *\n */\n@Component({\n tag: \"stzh-skin-portal-mitwirken\",\n styleUrl: \"stzh-skin-portal-mitwirken.scss\"\n})\nexport class StzhSkinPortalMitwirken {\n componentDidLoad() {\n // copy this string from console and put it in the Decidim CSS textbox to adjust theme\n console.log((this.constructor as any).style.replace('@charset \"UTF-8\";', ''));\n }\n\n render() {\n return (\n <Host>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -18,33 +18,39 @@ const StzhStickyActions = class {
|
|
|
18
18
|
this.hasActiveScrollup = !entries[0].isIntersecting;
|
|
19
19
|
};
|
|
20
20
|
this.updateScrollupWidth = () => {
|
|
21
|
-
|
|
21
|
+
if (this.scrollupElement && this.element.isConnected) {
|
|
22
|
+
const { width } = this.scrollupElement.getBoundingClientRect();
|
|
23
|
+
document.documentElement.style.setProperty("--stzh-sticky-actions-scrollup-width", `${width}px`);
|
|
24
|
+
}
|
|
22
25
|
};
|
|
23
26
|
this.handleScrollupResize = throttle.throttle_1(this.updateScrollupWidth, 100);
|
|
24
27
|
this.pagetitleQuery = 'stzh-pagetitle, stzh-pagetitle-hero';
|
|
25
|
-
this.hasActiveScrollup =
|
|
28
|
+
this.hasActiveScrollup = false;
|
|
26
29
|
}
|
|
27
30
|
hasActiveScrollupWatcher(newValue) {
|
|
28
31
|
document.documentElement.style.setProperty("--stzh-sticky-actions-scrollup-is-active", newValue ? "1" : "0");
|
|
29
32
|
document.documentElement.style.setProperty("--stzh-sticky-actions-scrollup-is-not-active", newValue ? "0" : "1");
|
|
30
33
|
}
|
|
31
34
|
componentDidLoad() {
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
const pagetitle = typeof this.pagetitleQuery === "string"
|
|
36
|
+
? document.querySelector(this.pagetitleQuery)
|
|
37
|
+
: this.pagetitleQuery();
|
|
34
38
|
if (pagetitle) {
|
|
39
|
+
this.observer = new IntersectionObserver(this.observePagetitle, { rootMargin: "0px", });
|
|
35
40
|
this.observer.observe(pagetitle);
|
|
36
41
|
}
|
|
37
|
-
this.resizeObserver = new ResizeObserver(this.handleScrollupResize);
|
|
38
|
-
this.resizeObserver.observe(this.scrollupElement);
|
|
39
42
|
requestAnimationFrame(() => {
|
|
40
43
|
requestAnimationFrame(() => {
|
|
41
44
|
this.updateScrollupWidth();
|
|
45
|
+
this.resizeObserver = new ResizeObserver(this.handleScrollupResize);
|
|
46
|
+
this.resizeObserver.observe(this.scrollupElement);
|
|
42
47
|
});
|
|
43
48
|
});
|
|
44
49
|
}
|
|
45
|
-
|
|
46
|
-
var _a;
|
|
47
|
-
(_a = this.
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
53
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
48
54
|
}
|
|
49
55
|
render() {
|
|
50
56
|
const chatSlotUsed = utils.hasSlot(this.element, "chat");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-sticky-actions.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,u/EAAu/E;;MCsBvgF,iBAAiB;;;IAkBpB,qBAAgB,GAAG,CAAC,OAAoC;MAC9D,IAAI,CAAC,iBAAiB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;KACrD,CAAA;IAEO,wBAAmB,GAAG;MAC5B,
|
|
1
|
+
{"file":"stzh-sticky-actions.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,u/EAAu/E;;MCsBvgF,iBAAiB;;;IAkBpB,qBAAgB,GAAG,CAAC,OAAoC;MAC9D,IAAI,CAAC,iBAAiB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;KACrD,CAAA;IAEO,wBAAmB,GAAG;MAC5B,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;QACpD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,qBAAqB,EAAE,CAAC;QAC/D,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,sCAAsC,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;OAClG;KACF,CAAA;IAEO,yBAAoB,GAAGA,mBA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nD,MAAM,gBAAgB,GAAGA,aAAO,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAE3D,MAAM,OAAO,GAAG;MACd,qBAAqB,EAAE,IAAI;MAC3B,UAAU,EAAE,YAAY;MACxB,cAAc,EAAE,gBAAgB;MAChC,qBAAqB,EAAE,IAAI,CAAC,iBAAiB;KAC9C,CAAC;IAEF,QACEC,QAACC,UAAI,QACHD,iBAAK,KAAK,EAAE,OAAO,8CACjBA,yBACE,IAAI,EAAC,SAAS,EACd,KAAK,EAAC,6BAA6B,EACnC,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAC,aAAa,EACrB,gBAAgB,EAAE,IAAI,IAEtBA,iBAAK,KAAK,EAAC,gCAAgC,IACzCA,iBAAK,KAAK,EAAC,mCAAmC,IAC5CA,kBAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,MAAME,iBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,GAAS,CACpE,EACNF,iBACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,eAAe,GAAG,EAAiB,CAAC,EACvD,KAAK,EAAC,uCAAuC,IAE7CA,kBAAM,IAAI,EAAC,UAAU,EAAC,YAAY,EAAE,MAAME,iBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,GAAS,CACxE,CACF,CACM,CACV,CACD,EACP;GACH;;;;;;;;;;","names":["throttle","hasSlot","h","Host","forceUpdate"],"sources":["src/components/stzh-sticky-actions/stzh-sticky-actions.scss?tag=stzh-sticky-actions&encapsulation=shadow","src/components/stzh-sticky-actions/stzh-sticky-actions.tsx"],"sourcesContent":[":host {\n --gap: #{space('small')};\n --sticky-padding-bottom: var(--stzh-sticky-actions-sticky-padding-bottom, #{space('small')});\n\n --stuck-offset: calc(\n var(--stzh-pagetitle-disturber-stuck-height, 0px)\n + var(--stzh-sticky-cta-stuck-bottom-height, 0px)\n );\n\n @include mq($from: medium) {\n --sticky-padding-bottom: var(--stzh-sticky-actions-sticky-padding-bottom, #{space('medium')});\n }\n\n // z-index: $zIndexSticky;\n // position: fixed;\n // right: $containerMargin;\n // bottom: space('small');\n // transition: transform $baseTransitionAnimationSpeed;\n // transform:\n // translateY(calc((\n // var(--stzh-pagetitle-disturber-stuck-height, 0px)\n // + var(--stzh-cta-stuck-bottom-height, 0px)\n // ) / -1))\n // translateX(0);\n\n // @include mq($from: small) {\n // right: $containerMarginSmall;\n // }\n\n // @include mq($from: medium) {\n // right: $containerMarginMedium;\n // }\n\n // @include mq($from: large) {\n // right: $containerMarginLarge;\n // }\n\n // @include mq($from: ultra) {\n // right: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / 2);\n // }\n\n @media print {\n display: none;\n }\n}\n\n.stzh-sticky-actions {\n &__container {\n display: flex;\n justify-content: flex-end;\n transition-property: transform;\n transition-duration: $baseTransitionAnimationSpeed;\n }\n\n &__sticky {\n --padding-top: 0px;\n --padding-bottom: var(--sticky-padding-bottom);\n }\n\n &__sticky[is-stuck-bottom] &__container {\n transform: translateY(calc(var(--stuck-offset) / -1))\n }\n\n &__scrollup-wrapper {\n transition-property: transform, opacity, visibility;\n transition-duration: $baseTransitionAnimationSpeed;\n opacity: 0;\n visibility: hidden;\n transform: translateX(var(--stzh-sticky-actions-scrollup-width, 44px));\n }\n\n &.has-chat &__scrollup-wrapper {\n transform: translateX(calc((var(--stzh-sticky-actions-scrollup-width, 44px) + var(--gap))));\n }\n\n &.has-scrollup &__chat-wrapper {\n transition-property: transform;\n transition-duration: $baseTransitionAnimationSpeed;\n transform: translateX(calc((var(--stzh-sticky-actions-scrollup-width, 44px))));\n }\n\n /* Active scrollup variant */\n\n &.has-active-scrollup &__scrollup-wrapper {\n opacity: 1;\n visibility: visible;\n transform: translateX(0px);\n }\n\n &.has-active-scrollup &__chat-wrapper {\n transform: translateX(calc(var(--gap) / -1));\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n forceUpdate,\n State,\n Prop,\n Watch,\n} from \"@stencil/core\";\n\nimport throttle from \"lodash/throttle\";\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for content that should stick to chat place\n */\n@Component({\n tag: \"stzh-sticky-actions\",\n styleUrl: \"stzh-sticky-actions.scss\",\n shadow: true\n})\nexport class StzhStickyActions {\n /** Query used to get pagetitle element (will show scrollup when passed). */\n @Prop() pagetitleQuery: string | (() => HTMLElement) = 'stzh-pagetitle, stzh-pagetitle-hero';\n\n @State() hasActiveScrollup = false;\n\n @Element() element: HTMLStzhStickyActionsElement;\n\n @Watch(\"hasActiveScrollup\")\n hasActiveScrollupWatcher(newValue: boolean) {\n document.documentElement.style.setProperty(\"--stzh-sticky-actions-scrollup-is-active\", newValue ? \"1\" : \"0\");\n document.documentElement.style.setProperty(\"--stzh-sticky-actions-scrollup-is-not-active\", newValue ? \"0\" : \"1\");\n }\n\n private observer: IntersectionObserver;\n private resizeObserver: ResizeObserver;\n private scrollupElement: HTMLElement;\n\n private observePagetitle = (entries: IntersectionObserverEntry[]) => {\n this.hasActiveScrollup = !entries[0].isIntersecting;\n }\n\n private updateScrollupWidth = () => {\n if (this.scrollupElement && this.element.isConnected) {\n const { width } = this.scrollupElement.getBoundingClientRect();\n document.documentElement.style.setProperty(\"--stzh-sticky-actions-scrollup-width\", `${width}px`);\n }\n }\n\n private handleScrollupResize = throttle(this.updateScrollupWidth, 100);\n\n componentDidLoad() {\n const pagetitle = typeof this.pagetitleQuery === \"string\"\n ? document.querySelector(this.pagetitleQuery)\n : this.pagetitleQuery();\n\n if (pagetitle) {\n this.observer = new IntersectionObserver(this.observePagetitle, { rootMargin: \"0px\", });\n this.observer.observe(pagetitle);\n }\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n this.updateScrollupWidth();\n\n this.resizeObserver = new ResizeObserver(this.handleScrollupResize);\n this.resizeObserver.observe(this.scrollupElement);\n });\n });\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n this.resizeObserver?.disconnect();\n }\n\n render() {\n const chatSlotUsed = hasSlot(this.element, \"chat\");\n const scrollupSlotUsed = hasSlot(this.element, \"scrollup\");\n\n const classes = {\n \"stzh-sticky-actions\": true,\n \"has-chat\": chatSlotUsed,\n \"has-scrollup\": scrollupSlotUsed,\n \"has-active-scrollup\": this.hasActiveScrollup,\n };\n\n return (\n <Host>\n <div class={classes} data-stzh-sticky-width-container>\n <stzh-sticky\n name=\"actions\"\n class=\"stzh-sticky-actions__sticky\"\n position=\"fixed\"\n variant=\"transparent\"\n disableStickyTop={true}\n >\n <div class=\"stzh-sticky-actions__container\">\n <div class=\"stzh-sticky-actions__chat-wrapper\">\n <slot name=\"chat\" onSlotchange={() => forceUpdate(this.element)}></slot>\n </div>\n <div\n ref={(el) => (this.scrollupElement = el as HTMLElement)}\n class=\"stzh-sticky-actions__scrollup-wrapper\"\n >\n <slot name=\"scrollup\" onSlotchange={() => forceUpdate(this.element)}></slot>\n </div>\n </div>\n </stzh-sticky>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -9,7 +9,7 @@ require('./string-utils-5dd70320.js');
|
|
|
9
9
|
require('./debounce-c8f1f58a.js');
|
|
10
10
|
require('./_commonjsHelpers-dcc4cf71.js');
|
|
11
11
|
|
|
12
|
-
const stzhStickyCss = ":host{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;}:host[hidden]{display:none}:host *,:host *::before,:host *::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)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{--padding-top:var(--stzh-space-large);--padding-bottom:var(--stzh-space-large);--padding-left:0;--padding-right:0;--background-color:transparent;--stuck-padding-top:var(--padding-top);--stuck-padding-bottom:var(--padding-bottom);--stuck-padding-left:var(--padding-left);--stuck-padding-right:var(--padding-right);--stuck-background-color:var(--stzh-color-grey10);display:contents}@media print{:host{display:none}}:host([variant=transparent]){--background-color:transparent;--stuck-background-color:transparent;pointer-events:none}:host([position=fixed]){display:block}.stzh-sticky{display:contents;}.stzh-sticky__sticky{position:-webkit-sticky;position:sticky;top:-0.0625rem;bottom:-0.0625rem;z-index:var(--stzh-z-index-sticky);width:var(--stzh-sticky-unstuck-width, auto);transition-property:width, transform, opacity;transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-sticky__content,.stzh-sticky__content::before{background-color:var(--background-color);transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-sticky__content{--stzh-button-pointer-events:all;--stzh-link-pointer-events:all;position:relative;transition-property:background-color, transform}.stzh-sticky__content-inner{padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);padding-left:var(--padding-left);padding-right:var(--padding-right);transition-property:padding;transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-sticky__spacer{display:none}.stzh-sticky--is-disabled-sticky-top .stzh-sticky__sticky{top:auto}.stzh-sticky--is-disabled-sticky-bottom .stzh-sticky__sticky{bottom:auto}.stzh-sticky--is-bleeding .stzh-sticky__content::before{z-index:-1;content:\"\";position:absolute;display:block;width:100%;height:100%;transform:translateY(0);transition-property:width, background-color, transform}.stzh-sticky--is-stuck .stzh-sticky__content,.stzh-sticky--is-stuck .stzh-sticky__content::before{background-color:var(--stuck-background-color)}.stzh-sticky--is-stuck .stzh-sticky__content::before{width:calc(100vw - var(--stzh-scrollbar-width));transform:translateX(calc(var(--stzh-sticky-offset-left) / -1))}.stzh-sticky--is-stuck .stzh-sticky__content-inner{padding-top:var(--stuck-padding-top);padding-bottom:var(--stuck-padding-bottom);padding-left:var(--stuck-padding-left);padding-right:var(--stuck-padding-right)}.stzh-sticky--is-not-loaded{visibility:hidden}.stzh-sticky--is-not-loaded.stzh-sticky--is-stuck .stzh-sticky__sticky{transform:translateY(100%);opacity:0}.stzh-sticky--is-not-loaded .stzh-sticky__content,.stzh-sticky--is-not-loaded .stzh-sticky__content::before,.stzh-sticky--is-not-loaded .stzh-sticky__content-inner{transition-duration:0ms}";
|
|
12
|
+
const stzhStickyCss = ":host{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;}:host[hidden]{display:none}:host *,:host *::before,:host *::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)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{--padding-top:var(--stzh-space-large);--padding-bottom:var(--stzh-space-large);--padding-left:0;--padding-right:0;--background-color:transparent;--stuck-padding-top:var(--padding-top);--stuck-padding-bottom:var(--padding-bottom);--stuck-padding-left:var(--padding-left);--stuck-padding-right:var(--padding-right);--stuck-background-color:var(--stzh-color-grey10);display:contents}@media print{:host{display:none}}:host([variant=transparent]){--background-color:transparent;--stuck-background-color:transparent;pointer-events:none}:host([position=fixed]){display:block}.stzh-sticky{display:contents;}.stzh-sticky__sticky{position:-webkit-sticky;position:sticky;top:-0.0625rem;bottom:-0.0625rem;z-index:var(--stzh-z-index-sticky);width:var(--stzh-sticky-unstuck-width, auto);transition-property:width, transform, opacity;transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-sticky__content,.stzh-sticky__content::before{background-color:var(--background-color);transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-sticky__content{--stzh-button-pointer-events:all;--stzh-link-pointer-events:all;position:relative;transition-property:background-color, transform}.stzh-sticky__content-inner{padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);padding-left:var(--padding-left);padding-right:var(--padding-right);transition-property:padding;transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-sticky__spacer{display:none}.stzh-sticky--is-disabled-sticky-top .stzh-sticky__sticky{top:auto}.stzh-sticky--is-disabled-sticky-bottom .stzh-sticky__sticky{bottom:auto}.stzh-sticky--is-bleeding .stzh-sticky__content::before{z-index:-1;content:\"\";position:absolute;display:block;width:100%;height:100%;transform:translateY(0);transition-property:width, background-color, transform}.stzh-sticky--is-stuck .stzh-sticky__content,.stzh-sticky--is-stuck .stzh-sticky__content::before{background-color:var(--stuck-background-color)}.stzh-sticky--is-stuck .stzh-sticky__content::before{width:calc(100vw - var(--stzh-scrollbar-width));transform:translateX(calc(var(--stzh-sticky-offset-left) / -1))}.stzh-sticky--is-stuck .stzh-sticky__content-inner{padding-top:var(--stuck-padding-top);padding-bottom:var(--stuck-padding-bottom);padding-left:var(--stuck-padding-left);padding-right:var(--stuck-padding-right)}.stzh-sticky--is-not-loaded{visibility:hidden}.stzh-sticky--is-not-loaded.stzh-sticky--is-stuck .stzh-sticky__sticky{transform:translateY(100%);opacity:0}.stzh-sticky--is-not-loaded .stzh-sticky__sticky,.stzh-sticky--is-not-loaded .stzh-sticky__content,.stzh-sticky--is-not-loaded .stzh-sticky__content::before,.stzh-sticky--is-not-loaded .stzh-sticky__content-inner{transition-duration:0ms}";
|
|
13
13
|
|
|
14
14
|
const ATTR_STICKY_CONTAINER = "data-stzh-sticky-container";
|
|
15
15
|
const ATTR_STICKY_WIDTH_CONTAINER = "data-stzh-sticky-width-container";
|
|
@@ -35,9 +35,10 @@ const StzhSticky = class {
|
|
|
35
35
|
};
|
|
36
36
|
this.handleStickyResize = throttle.throttle_1(() => {
|
|
37
37
|
this.stuckHeightWatcher();
|
|
38
|
+
this.updateByScroll();
|
|
38
39
|
}, 100);
|
|
39
40
|
this.updateByScroll = () => {
|
|
40
|
-
if (!utils.isVisible(this.stickyElement)) {
|
|
41
|
+
if (!utils.isVisible(this.stickyElement) || !this.element.isConnected) {
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
const stickyFixedWidthContainer = this.element.closest(`[${ATTR_STICKY_WIDTH_CONTAINER}]`)
|
|
@@ -61,10 +62,11 @@ const StzhSticky = class {
|
|
|
61
62
|
const unstuckWidth = this.element.getBoundingClientRect().width;
|
|
62
63
|
// stickyFixedWidthContainer.style.setProperty('--stzh-sticky-stuck-width', `${this.fixedWidth}px`);
|
|
63
64
|
stickyFixedWidthContainer.style.setProperty('--stzh-sticky-unstuck-width', `${unstuckWidth}px`);
|
|
65
|
+
// console.log(unstuckWidth);
|
|
64
66
|
// console.log(
|
|
65
67
|
// this.scrollX,
|
|
66
68
|
// this.scrollY,
|
|
67
|
-
// this.windowHeight,
|
|
69
|
+
// this.windowHeight,
|
|
68
70
|
// this.fixedTop,
|
|
69
71
|
// this.fixedLeft,
|
|
70
72
|
// this.fixedHeight,
|
|
@@ -86,7 +88,7 @@ const StzhSticky = class {
|
|
|
86
88
|
// );
|
|
87
89
|
if (this.isStuckTop || this.isStuckBottom) {
|
|
88
90
|
this.setFixed();
|
|
89
|
-
// stickyFixedWidthContainer.style.setProperty('--stzh-sticky-width', `${this.fixedWidth}px`);
|
|
91
|
+
// stickyFixedWidthContainer.style.setProperty('--stzh-sticky-width', `${this.fixedWidth}px`);
|
|
90
92
|
}
|
|
91
93
|
else {
|
|
92
94
|
this.setUnfixed();
|
|
@@ -94,9 +96,13 @@ const StzhSticky = class {
|
|
|
94
96
|
}
|
|
95
97
|
};
|
|
96
98
|
this.updateFixedByResize = () => {
|
|
99
|
+
if (!this.stickyElement || !this.element.isConnected) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
97
102
|
// reset sticky so we can read current offsets
|
|
98
103
|
this.setUnfixed();
|
|
99
104
|
this.stickyElement.style.position = "static";
|
|
105
|
+
this.stickyElement.style.width = "auto";
|
|
100
106
|
this.isStuckTop = false;
|
|
101
107
|
this.isStuckBottom = false;
|
|
102
108
|
if (utils.isVisible(this.stickyElement)) {
|
|
@@ -265,6 +271,9 @@ const StzhSticky = class {
|
|
|
265
271
|
requestAnimationFrame(() => {
|
|
266
272
|
window.setTimeout(() => {
|
|
267
273
|
this.loaded = true;
|
|
274
|
+
if (this.position === "fixed") {
|
|
275
|
+
this.updateFixedByResize();
|
|
276
|
+
}
|
|
268
277
|
}, 250);
|
|
269
278
|
});
|
|
270
279
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-sticky.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,o6GAAo6G;;ACoB17G,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAC3D,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;MAU1D,UAAU;;;;;IAuJb,gBAAW,GAAW,CAAC,CAAC;IACxB,eAAU,GAAW,CAAC,CAAC;IACvB,eAAU,GAA2C,IAAI,CAAC;IAsE1D,iBAAY,GAAG;MACrB,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;OAClD;MAED,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KAClE,CAAA;IAEO,iBAAY,GAAG;MACrB,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;OAClD;MAED,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;KACvE,CAAA;IAEO,uBAAkB,GAAGA,mBAAQ,CAAC;MACpC,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B,EAAE,GAAG,CAAC,CAAA;IAEC,mBAAc,GAAG;MACvB,IAAI,CAACC,eAAS,C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AA8B,EAAE,IAAI,CAAC,aAAa;MAClD,qCAAqC,EAAE,IAAI,CAAC,gBAAgB;MAC5D,wCAAwC,EAAE,IAAI,CAAC,mBAAmB;MAClE,0BAA0B,EAAE,IAAI,CAAC,QAAQ;MACzC,CAAC,yBAAyB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ;MAC3D,CAAC,gBAAgB,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO;KACjD,CAAC;IAEF,QACEC,QAACC,UAAI,gBACO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,aAAa,kBACjC,IAAI,CAAC,UAAU,qBACZ,IAAI,CAAC,aAAa,IAEnCD,iBAAK,KAAK,EAAE,OAAO,IACjBA,iBACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,aAAa,GAAG,EAAoB,CAAC,EACxD,KAAK,EAAC,qBAAqB,GACtB,EACPA,iBACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,aAAa,GAAG,EAAoB,CAAC,EACxD,KAAK,EAAC,qBAAqB,IAE3BA,iBAAK,KAAK,EAAC,sBAAsB,IAC/BA,iBAAK,KAAK,EAAC,4BAA4B,IACrCA,qBAAa,CACT,CACF,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;","names":["throttle","isVisible","offset","h","Host"],"sources":["src/components/stzh-sticky/stzh-sticky.scss?tag=stzh-sticky&encapsulation=shadow","src/components/stzh-sticky/stzh-sticky.tsx"],"sourcesContent":["/**\n * @prop --padding-top: Padding top of sticky element\n * @prop --padding-bottom: Padding bottom of sticky element\n * @prop --padding-left: Padding left of sticky element\n * @prop --padding-right: Padding right of sticky element\n * @prop --background-color: Background color of sticky element\n * @prop --stuck-padding-top: Padding top of stuck sticky element\n * @prop --stuck-padding-bottom: Padding bottom of stuck sticky element\n * @prop --stuck-padding-left: Padding left of stuck sticky element\n * @prop --stuck-padding-right: Padding right of stuck sticky element\n * @prop --stuck-background-color: Background color of stuck sticky element\n *\n * @prop --stzh-sticky-{NAME}-is-stuck: **Global**: Whether sticky is currently stuck (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-not-stuck: **Global**: Whether sticky is currently not stuck (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-stuck-top: **Global**: Whether sticky is currently stuck on top (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-not-stuck-top: **Global**: Whether sticky is currently not stuck on top (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-stuck-bottom: **Global**: Whether sticky is currently stuck on bottom (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-not-stuck-bottom: **Global**: Whether sticky is currently not stuck on bottom (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-stuck-top-height: **Global**: Stuck top sticky element height (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-stuck-bottom-height: **Global**: Stuck bottom sticky element height (readonly variable on `<html>`)\n */\n\n:host {\n --padding-top: #{space('large')};\n --padding-bottom: #{space('large')};\n --padding-left: 0;\n --padding-right: 0;\n --background-color: transparent;\n\n --stuck-padding-top: var(--padding-top);\n --stuck-padding-bottom: var(--padding-bottom);\n --stuck-padding-left: var(--padding-left);\n --stuck-padding-right: var(--padding-right);\n --stuck-background-color: #{$colorGrey10};\n\n display: contents;\n\n @media print {\n display: none;\n }\n}\n\n:host([variant=\"transparent\"]) {\n --background-color: transparent;\n --stuck-background-color: transparent;\n\n pointer-events: none;\n}\n\n:host([position=\"fixed\"]) {\n display: block;\n}\n\n.stzh-sticky {\n display: contents;\n\n &__sticky {\n position: sticky;\n top: -1px;\n bottom: -1px;\n z-index: $zIndexSticky;\n width: var(--stzh-sticky-unstuck-width, auto);\n transition-property: width, transform, opacity;\n transition-duration: $baseTransitionAnimationSpeed;\n }\n\n &__content,\n &__content::before {\n background-color: var(--background-color);\n transition-duration: $baseTransitionAnimationSpeed;\n }\n\n &__content {\n --stzh-button-pointer-events: all;\n --stzh-link-pointer-events: all;\n\n position: relative;\n transition-property: background-color, transform;\n\n // &::before,\n // &::after {\n // content: '';\n // pointer-events: none;\n // display: block;\n // position: absolute;\n // left: 0;\n // width: 100%;\n // height: space('xxlarge');\n // opacity: 0;\n // transition: opacity $baseTransitionAnimationSpeed;\n // }\n\n // &::before {\n // background: linear-gradient(0deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);\n // top: 0;\n // transform: translateY(-100%);\n // }\n\n // &::after {\n // background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);\n // bottom: 0;\n // transform: translateY(100%);\n // }\n }\n\n &__content-inner {\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n transition-property: padding;\n transition-duration: $baseTransitionAnimationSpeed;\n }\n\n &__spacer {\n display: none;\n }\n\n /* Disabled variants */\n\n &--is-disabled-sticky-top &__sticky {\n top: auto;\n }\n\n &--is-disabled-sticky-bottom &__sticky {\n bottom: auto;\n }\n\n /* Bleeding variant */\n\n &--is-bleeding &__content {\n &::before {\n z-index: -1;\n content: '';\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n transform: translateY(0);\n transition-property: width, background-color, transform;\n }\n }\n\n /* Is stuck variant */\n\n &--is-stuck &__content,\n &--is-stuck &__content::before {\n background-color: var(--stuck-background-color);\n }\n\n &--is-stuck &__content::before {\n width: calc(100vw - var(--stzh-scrollbar-width));\n transform: translateX(calc(var(--stzh-sticky-offset-left) / -1));\n }\n\n &--is-stuck &__content-inner {\n padding-top: var(--stuck-padding-top);\n padding-bottom: var(--stuck-padding-bottom);\n padding-left: var(--stuck-padding-left);\n padding-right: var(--stuck-padding-right);\n }\n\n // &--is-stuck-bottom &__content {\n // &::before {\n // opacity: 1;\n // }\n // }\n\n // &--is-stuck-top &__content {\n // &::after {\n // opacity: 1;\n // }\n // }\n\n /* Transparent variant */\n\n // &--transparent &__content {\n // &::after,\n // &::before {\n // display: none;\n // }\n // }\n\n // /* Position sticky variant */\n\n // &--is-breakout &__content {\n // position: relative;\n // left: 50%;\n // right: 50%;\n // margin-left: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n // margin-right: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n // width: calc(100vw - var(--stzh-scrollbar-width));\n // max-width: calc(100vw - var(--stzh-scrollbar-width));\n // }\n\n &--is-not-loaded {\n visibility: hidden;\n }\n\n &--is-not-loaded#{&}--is-stuck &__sticky {\n transform: translateY(100%);\n opacity: 0;\n }\n\n &--is-not-loaded &__content,\n &--is-not-loaded &__content::before,\n &--is-not-loaded &__content-inner {\n transition-duration: 0ms;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Watch,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\n\nimport {\n StzhStickyStuckTopEvent,\n StzhStickyStuckBottomEvent\n} from \"../../index\";\n\nimport { isVisible, offset } from \"../../utils/utils\";\nimport throttle from \"lodash/throttle\";\n\nconst ATTR_STICKY_CONTAINER = \"data-stzh-sticky-container\";\nconst ATTR_STICKY_WIDTH_CONTAINER = \"data-stzh-sticky-width-container\";\n\n/**\n *\n */\n@Component({\n tag: \"stzh-sticky\",\n styleUrl: \"stzh-sticky.scss\",\n shadow: true\n})\nexport class StzhSticky {\n /** Variant */\n @Prop({ reflect: true }) variant: \"default\" | \"transparent\" = \"default\";\n\n /** Whether to disable sticking to top */\n @Prop({ reflect: true }) disableStickyTop: boolean = true;\n\n /** Whether to disable sticking to bottom */\n @Prop({ reflect: true }) disableStickyBottom: boolean = false;\n\n /** Whether background breaks out container to full viewport width */\n @Prop({ reflect: true }) bleeding: boolean = false;\n\n /** Name of sticky element (used for setting css properties) */\n @Prop() name: string;\n\n /**\n * Position type used.\n *\n * - sticky: used only css position sticky\n * - fixed: uses position fixed with js for positioning (`data-stzh-sticky-container` can be used on a container element to limit sticky position)\n */\n @Prop({ reflect: true }) position: \"sticky\" | \"fixed\" = \"sticky\";\n\n @Watch(\"disableStickyTop\")\n @Watch(\"disableStickyBottom\")\n disableStickyWatcher() {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (this.position === \"fixed\") {\n this.updateFixedByResize();\n } else {\n this.updateStuck();\n }\n });\n });\n }\n\n @Watch(\"isStuckTop\")\n @Watch(\"isStuckBottom\")\n @Watch(\"hasReachedTopLimit\")\n @Watch(\"hasReachedBottomLimit\")\n stuckHeightWatcher() {\n let isStuck = false;\n\n if (this.isStuckTop && !this.hasReachedBottomLimit) {\n isStuck = true;\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck-top`, \"1\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck-top`, \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}stuck-top-height`, `${this.stickyElement.offsetHeight}px`);\n } else {\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck-top`, \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck-top`, \"1\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}stuck-top-height`, \"0px\");\n }\n\n if (this.isStuckBottom && !this.hasReachedTopLimit) {\n isStuck = true;\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck-bottom`, \"1\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck-bottom`, \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}stuck-bottom-height`, `${this.stickyElement.offsetHeight}px`);\n } else {\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck-bottom`, \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck-bottom`, \"1\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}stuck-bottom-height`, \"0px\");\n }\n\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck`, isStuck ? \"1\" : \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck`, isStuck ? \"0\" : \"1\");\n\n if (isStuck) {\n this.stickyResizeObserver.observe(this.stickyElement);\n } else {\n this.stickyResizeObserver.unobserve(this.stickyElement);\n }\n }\n\n @Watch(\"isStuckTop\")\n isStuckTopWatcher(newValue: boolean) {\n this.stzhStuckTop.emit({\n component: \"stzh-sticky\",\n sticky: newValue\n });\n }\n\n @Watch(\"isStuckBottom\")\n isStuckBottomWatcher(newValue: boolean) {\n this.stzhStuckBottom.emit({\n component: \"stzh-sticky\",\n sticky: newValue\n });\n }\n\n @Watch(\"position\")\n @Watch(\"bleeding\")\n positionWatcher() {\n if (this.position === \"fixed\") {\n if (this.observer) {\n this.observer.disconnect();\n }\n\n window.addEventListener(\"scroll\", this.handleScroll, { passive: true });\n window.addEventListener(\"resize\", this.handleResize);\n\n this.updateFixedByResize();\n } else {\n if (this.bleeding) {\n window.addEventListener(\"scroll\", this.handleScroll, { passive: true });\n this.updateByScroll();\n } else {\n window.removeEventListener(\"scroll\", this.handleScroll);\n }\n\n window.removeEventListener(\"resize\", this.handleResize);\n this.setUnfixed();\n\n this.observer = new IntersectionObserver(this.observe, { threshold: [1] });\n this.observer.observe(this.stickyElement);\n\n this.updateStuck();\n }\n }\n\n /** Sticky stuck top event */\n @Event() stzhStuckTop: EventEmitter<StzhStickyStuckTopEvent>;\n\n /** Sticky stuck bottom event */\n @Event() stzhStuckBottom: EventEmitter<StzhStickyStuckBottomEvent>;\n\n @Element() element: HTMLStzhStickyElement;\n\n @State() isStuckTop: boolean;\n @State() isStuckBottom: boolean;\n\n @State() hasReachedTopLimit: boolean;\n @State() hasReachedBottomLimit: boolean;\n\n @State() loaded: boolean = false;\n\n private observer: IntersectionObserver;\n private stickyResizeObserver: ResizeObserver;\n private debounceScroll: number;\n private debounceResize: number;\n private stickyElement: HTMLElement;\n private spacerElement: HTMLElement;\n\n private windowHeight: number;\n private scrollX: number;\n private scrollY: number;\n private fixedTop: number;\n private fixedLeft: number;\n private fixedHeight: number = 0;\n private fixedWidth: number = 0;\n private fixedLimit: { top: number, bottom: number } | null = null;\n\n private updateStuck() {\n const topCss = parseInt(getComputedStyle(this.stickyElement).top, 10);\n const bottomCss = parseInt(getComputedStyle(this.stickyElement).bottom, 10);\n const rect = this.stickyElement.getBoundingClientRect();\n\n if (topCss) {\n this.isStuckTop = rect.top < 0;\n } else {\n this.isStuckTop = false;\n }\n\n if (bottomCss) {\n this.isStuckBottom = document.documentElement.clientHeight < rect.bottom;\n } else {\n this.isStuckBottom = false;\n }\n }\n\n private getFixedLimit(): { top: number, bottom: number } | null {\n const stickyContainer = this.element.closest(`[${ATTR_STICKY_CONTAINER}]`);\n\n if (!stickyContainer) {\n return null;\n }\n\n const off = offset(stickyContainer);\n\n return {\n top: off.top,\n bottom: off.top + stickyContainer.scrollHeight,\n };\n }\n\n private setUnfixed() {\n Object.assign(this.stickyElement.style, {\n position: null,\n top: null,\n bottom: null,\n left: null,\n width: null,\n });\n\n Object.assign(this.spacerElement.style, {\n display: \"none\",\n });\n }\n\n private setFixed() {\n const position = (this.hasReachedTopLimit || this.hasReachedBottomLimit)\n ? \"absolute\"\n : \"fixed\";\n\n Object.assign(this.stickyElement.style, {\n position,\n top: position === \"absolute\"\n ? `${this.isStuckTop ? this.fixedLimit.bottom - this.fixedHeight : this.fixedLimit.top}px`\n : this.isStuckTop ? \"0px\" : \"auto\",\n bottom: this.isStuckTop || position === \"absolute\"\n ? \"auto\" : \"0px\",\n left: `${this.fixedLeft + (position === \"fixed\" ? this.scrollX : 0)}px`,\n width: `${this.fixedWidth}px`,\n });\n\n Object.assign(this.spacerElement.style, {\n display: \"block\",\n });\n }\n\n private handleScroll = () => {\n if (this.debounceScroll) {\n window.cancelAnimationFrame(this.debounceScroll);\n }\n\n this.debounceScroll = requestAnimationFrame(this.updateByScroll);\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.updateFixedByResize);\n }\n\n private handleStickyResize = throttle(() => {\n this.stuckHeightWatcher();\n }, 100)\n\n private updateByScroll = () => {\n if (!isVisible(this.stickyElement)) {\n return;\n }\n\n const stickyFixedWidthContainer = this.element.closest(`[${ATTR_STICKY_WIDTH_CONTAINER}]`) as HTMLElement\n || this.element.parentElement;\n\n const off = offset(\n (this.isStuckTop || this.isStuckBottom) && this.position === \"fixed\"\n ? this.spacerElement : this.stickyElement\n );\n \n this.fixedTop = off.top;\n this.fixedLeft = off.left;\n\n stickyFixedWidthContainer.style.setProperty('--stzh-sticky-offset-top', `${this.fixedTop}px`);\n stickyFixedWidthContainer.style.setProperty('--stzh-sticky-offset-left', `${this.fixedLeft}px`);\n\n if (this.position === \"sticky\") {\n // for position sticky we only need the offsets variables to be updated in bleeding variant\n return;\n }\n\n this.fixedHeight = this.stickyElement.offsetHeight;\n this.spacerElement.style.height = `${this.fixedHeight}px`;\n\n this.scrollX = window.scrollX;\n this.scrollY = window.scrollY;\n this.fixedLimit = this.getFixedLimit();\n\n this.fixedWidth = stickyFixedWidthContainer.getBoundingClientRect().width;\n\n const unstuckWidth = this.element.getBoundingClientRect().width;\n // stickyFixedWidthContainer.style.setProperty('--stzh-sticky-stuck-width', `${this.fixedWidth}px`);\n stickyFixedWidthContainer.style.setProperty('--stzh-sticky-unstuck-width', `${unstuckWidth}px`);\n\n // console.log(\n // this.scrollX,\n // this.scrollY,\n // this.windowHeight, \n // this.fixedTop,\n // this.fixedLeft,\n // this.fixedHeight,\n // this.fixedLimit,\n // );\n\n this.isStuckBottom = !this.disableStickyBottom\n && this.scrollY + this.windowHeight <= this.fixedTop + this.fixedHeight;\n this.isStuckTop = !this.disableStickyTop\n && this.scrollY >= this.fixedTop;\n\n this.hasReachedTopLimit = this.fixedLimit \n && this.scrollY + this.windowHeight - this.fixedHeight <= this.fixedLimit.top;\n this.hasReachedBottomLimit = this.fixedLimit \n && this.scrollY >= this.fixedLimit.bottom - this.fixedHeight;\n\n // console.log(\n // this.isStuckBottom,\n // this.isStuckTop,\n // this.hasReachedBottomLimit,\n // this.hasReachedTopLimit,\n // );\n\n if (this.isStuckTop || this.isStuckBottom) {\n this.setFixed();\n // stickyFixedWidthContainer.style.setProperty('--stzh-sticky-width', `${this.fixedWidth}px`); \n } else {\n this.setUnfixed();\n // stickyFixedWidthContainer.style.setProperty('--stzh-sticky-width', `${unstuckWidth}px`);\n }\n }\n\n private updateFixedByResize = () => {\n // reset sticky so we can read current offsets\n this.setUnfixed();\n this.stickyElement.style.position = \"static\";\n this.isStuckTop = false;\n this.isStuckBottom = false;\n\n if (isVisible(this.stickyElement)) {\n this.windowHeight = window.innerHeight;\n this.updateByScroll();\n }\n }\n\n private observe = () => {\n this.updateStuck();\n };\n\n componentDidLoad() {\n this.stickyResizeObserver = new ResizeObserver(this.handleStickyResize);\n this.positionWatcher();\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n window.setTimeout(() => {\n this.loaded = true;\n }, 250);\n });\n });\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n this.stickyResizeObserver?.disconnect();\n\n window.removeEventListener(\"scroll\", this.handleScroll);\n window.removeEventListener(\"resize\", this.handleResize);\n }\n\n render() {\n const isStuck = this.isStuckTop || this.isStuckBottom;\n\n const classes = {\n \"stzh-sticky\": true,\n \"stzh-sticky--is-not-loaded\": !this.loaded,\n \"stzh-sticky--is-stuck\": isStuck,\n \"stzh-sticky--is-stuck-top\": this.isStuckTop,\n \"stzh-sticky--is-stuck-bottom\": this.isStuckBottom,\n \"stzh-sticky--is-disabled-sticky-top\": this.disableStickyTop,\n \"stzh-sticky--is-disabled-sticky-bottom\": this.disableStickyBottom,\n \"stzh-sticky--is-bleeding\": this.bleeding,\n [`stzh-sticky--position-${this.position}`]: !!this.position,\n [`stzh-sticky--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host\n is-stuck={this.isStuckTop || this.isStuckBottom}\n is-stuck-top={this.isStuckTop}\n is-stuck-bottom={this.isStuckBottom}\n >\n <div class={classes}>\n <div\n ref={(el) => (this.spacerElement = el as HTMLDivElement)}\n class=\"stzh-sticky__spacer\"\n ></div>\n <div\n ref={(el) => (this.stickyElement = el as HTMLDivElement)}\n class=\"stzh-sticky__sticky\"\n >\n <div class=\"stzh-sticky__content\">\n <div class=\"stzh-sticky__content-inner\">\n <slot></slot>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"stzh-sticky.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,q9GAAq9G;;ACoB3+G,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAC3D,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;MAU1D,UAAU;;;;;IAuJb,gBAAW,GAAW,CAAC,CAAC;IACxB,eAAU,GAAW,CAAC,CAAC;IACvB,eAAU,GAA2C,IAAI,CAAC;IAsE1D,iBAAY,GAAG;MACrB,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;OAClD;MAED,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KAClE,CAAA;IAEO,iBAAY,GAAG;MACrB,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;OAClD;MAED,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;KACvE,CAAA;IAEO,uBAAkB,GAAGA,mBAAQ,CAAC;MACpC,IAAI,CAAC,kBAAkB,EAAE,CAAC;MAC1B,IAAI,CAAC,cAAc,EAAE,C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names":["throttle","isVisible","offset","h","Host"],"sources":["src/components/stzh-sticky/stzh-sticky.scss?tag=stzh-sticky&encapsulation=shadow","src/components/stzh-sticky/stzh-sticky.tsx"],"sourcesContent":["/**\n * @prop --padding-top: Padding top of sticky element\n * @prop --padding-bottom: Padding bottom of sticky element\n * @prop --padding-left: Padding left of sticky element\n * @prop --padding-right: Padding right of sticky element\n * @prop --background-color: Background color of sticky element\n * @prop --stuck-padding-top: Padding top of stuck sticky element\n * @prop --stuck-padding-bottom: Padding bottom of stuck sticky element\n * @prop --stuck-padding-left: Padding left of stuck sticky element\n * @prop --stuck-padding-right: Padding right of stuck sticky element\n * @prop --stuck-background-color: Background color of stuck sticky element\n *\n * @prop --stzh-sticky-{NAME}-is-stuck: **Global**: Whether sticky is currently stuck (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-not-stuck: **Global**: Whether sticky is currently not stuck (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-stuck-top: **Global**: Whether sticky is currently stuck on top (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-not-stuck-top: **Global**: Whether sticky is currently not stuck on top (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-stuck-bottom: **Global**: Whether sticky is currently stuck on bottom (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-is-not-stuck-bottom: **Global**: Whether sticky is currently not stuck on bottom (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-stuck-top-height: **Global**: Stuck top sticky element height (readonly variable on `<html>`)\n * @prop --stzh-sticky-{NAME}-stuck-bottom-height: **Global**: Stuck bottom sticky element height (readonly variable on `<html>`)\n */\n\n:host {\n --padding-top: #{space('large')};\n --padding-bottom: #{space('large')};\n --padding-left: 0;\n --padding-right: 0;\n --background-color: transparent;\n\n --stuck-padding-top: var(--padding-top);\n --stuck-padding-bottom: var(--padding-bottom);\n --stuck-padding-left: var(--padding-left);\n --stuck-padding-right: var(--padding-right);\n --stuck-background-color: #{$colorGrey10};\n\n display: contents;\n\n @media print {\n display: none;\n }\n}\n\n:host([variant=\"transparent\"]) {\n --background-color: transparent;\n --stuck-background-color: transparent;\n\n pointer-events: none;\n}\n\n:host([position=\"fixed\"]) {\n display: block;\n}\n\n.stzh-sticky {\n display: contents;\n\n &__sticky {\n position: sticky;\n top: -1px;\n bottom: -1px;\n z-index: $zIndexSticky;\n width: var(--stzh-sticky-unstuck-width, auto);\n transition-property: width, transform, opacity;\n transition-duration: $baseTransitionAnimationSpeed;\n }\n\n &__content,\n &__content::before {\n background-color: var(--background-color);\n transition-duration: $baseTransitionAnimationSpeed;\n }\n\n &__content {\n --stzh-button-pointer-events: all;\n --stzh-link-pointer-events: all;\n\n position: relative;\n transition-property: background-color, transform;\n\n // &::before,\n // &::after {\n // content: '';\n // pointer-events: none;\n // display: block;\n // position: absolute;\n // left: 0;\n // width: 100%;\n // height: space('xxlarge');\n // opacity: 0;\n // transition: opacity $baseTransitionAnimationSpeed;\n // }\n\n // &::before {\n // background: linear-gradient(0deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);\n // top: 0;\n // transform: translateY(-100%);\n // }\n\n // &::after {\n // background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);\n // bottom: 0;\n // transform: translateY(100%);\n // }\n }\n\n &__content-inner {\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n transition-property: padding;\n transition-duration: $baseTransitionAnimationSpeed;\n }\n\n &__spacer {\n display: none;\n }\n\n /* Disabled variants */\n\n &--is-disabled-sticky-top &__sticky {\n top: auto;\n }\n\n &--is-disabled-sticky-bottom &__sticky {\n bottom: auto;\n }\n\n /* Bleeding variant */\n\n &--is-bleeding &__content {\n &::before {\n z-index: -1;\n content: '';\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n transform: translateY(0);\n transition-property: width, background-color, transform;\n }\n }\n\n /* Is stuck variant */\n\n &--is-stuck &__content,\n &--is-stuck &__content::before {\n background-color: var(--stuck-background-color);\n }\n\n &--is-stuck &__content::before {\n width: calc(100vw - var(--stzh-scrollbar-width));\n transform: translateX(calc(var(--stzh-sticky-offset-left) / -1));\n }\n\n &--is-stuck &__content-inner {\n padding-top: var(--stuck-padding-top);\n padding-bottom: var(--stuck-padding-bottom);\n padding-left: var(--stuck-padding-left);\n padding-right: var(--stuck-padding-right);\n }\n\n // &--is-stuck-bottom &__content {\n // &::before {\n // opacity: 1;\n // }\n // }\n\n // &--is-stuck-top &__content {\n // &::after {\n // opacity: 1;\n // }\n // }\n\n /* Transparent variant */\n\n // &--transparent &__content {\n // &::after,\n // &::before {\n // display: none;\n // }\n // }\n\n // /* Position sticky variant */\n\n // &--is-breakout &__content {\n // position: relative;\n // left: 50%;\n // right: 50%;\n // margin-left: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n // margin-right: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n // width: calc(100vw - var(--stzh-scrollbar-width));\n // max-width: calc(100vw - var(--stzh-scrollbar-width));\n // }\n\n &--is-not-loaded {\n visibility: hidden;\n }\n\n &--is-not-loaded#{&}--is-stuck &__sticky {\n transform: translateY(100%);\n opacity: 0;\n }\n\n &--is-not-loaded &__sticky,\n &--is-not-loaded &__content,\n &--is-not-loaded &__content::before,\n &--is-not-loaded &__content-inner {\n transition-duration: 0ms;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Watch,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhStickyStuckTopEvent,\n StzhStickyStuckBottomEvent\n} from \"../../index\";\n\nimport { isVisible, offset } from \"../../utils/utils\";\nimport throttle from \"lodash/throttle\";\n\nconst ATTR_STICKY_CONTAINER = \"data-stzh-sticky-container\";\nconst ATTR_STICKY_WIDTH_CONTAINER = \"data-stzh-sticky-width-container\";\n\n/**\n *\n */\n@Component({\n tag: \"stzh-sticky\",\n styleUrl: \"stzh-sticky.scss\",\n shadow: true\n})\nexport class StzhSticky {\n /** Variant */\n @Prop({ reflect: true }) variant: \"default\" | \"transparent\" = \"default\";\n\n /** Whether to disable sticking to top */\n @Prop({ reflect: true }) disableStickyTop: boolean = true;\n\n /** Whether to disable sticking to bottom */\n @Prop({ reflect: true }) disableStickyBottom: boolean = false;\n\n /** Whether background breaks out container to full viewport width */\n @Prop({ reflect: true }) bleeding: boolean = false;\n\n /** Name of sticky element (used for setting css properties) */\n @Prop() name: string;\n\n /**\n * Position type used.\n *\n * - sticky: used only css position sticky\n * - fixed: uses position fixed with js for positioning (`data-stzh-sticky-container` can be used on a container element to limit sticky position)\n */\n @Prop({ reflect: true }) position: \"sticky\" | \"fixed\" = \"sticky\";\n\n @Watch(\"disableStickyTop\")\n @Watch(\"disableStickyBottom\")\n disableStickyWatcher() {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (this.position === \"fixed\") {\n this.updateFixedByResize();\n } else {\n this.updateStuck();\n }\n });\n });\n }\n\n @Watch(\"isStuckTop\")\n @Watch(\"isStuckBottom\")\n @Watch(\"hasReachedTopLimit\")\n @Watch(\"hasReachedBottomLimit\")\n stuckHeightWatcher() {\n let isStuck = false;\n\n if (this.isStuckTop && !this.hasReachedBottomLimit) {\n isStuck = true;\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck-top`, \"1\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck-top`, \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}stuck-top-height`, `${this.stickyElement.offsetHeight}px`);\n } else {\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck-top`, \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck-top`, \"1\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}stuck-top-height`, \"0px\");\n }\n\n if (this.isStuckBottom && !this.hasReachedTopLimit) {\n isStuck = true;\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck-bottom`, \"1\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck-bottom`, \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}stuck-bottom-height`, `${this.stickyElement.offsetHeight}px`);\n } else {\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck-bottom`, \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck-bottom`, \"1\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}stuck-bottom-height`, \"0px\");\n }\n\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-stuck`, isStuck ? \"1\" : \"0\");\n document.documentElement.style.setProperty(`--stzh-sticky-${this.name && this.name + '-'}is-not-stuck`, isStuck ? \"0\" : \"1\");\n\n if (isStuck) {\n this.stickyResizeObserver.observe(this.stickyElement);\n } else {\n this.stickyResizeObserver.unobserve(this.stickyElement);\n }\n }\n\n @Watch(\"isStuckTop\")\n isStuckTopWatcher(newValue: boolean) {\n this.stzhStuckTop.emit({\n component: \"stzh-sticky\",\n sticky: newValue\n });\n }\n\n @Watch(\"isStuckBottom\")\n isStuckBottomWatcher(newValue: boolean) {\n this.stzhStuckBottom.emit({\n component: \"stzh-sticky\",\n sticky: newValue\n });\n }\n\n @Watch(\"position\")\n @Watch(\"bleeding\")\n positionWatcher() {\n if (this.position === \"fixed\") {\n if (this.observer) {\n this.observer.disconnect();\n }\n\n window.addEventListener(\"scroll\", this.handleScroll, { passive: true });\n window.addEventListener(\"resize\", this.handleResize);\n\n this.updateFixedByResize();\n } else {\n if (this.bleeding) {\n window.addEventListener(\"scroll\", this.handleScroll, { passive: true });\n this.updateByScroll();\n } else {\n window.removeEventListener(\"scroll\", this.handleScroll);\n }\n\n window.removeEventListener(\"resize\", this.handleResize);\n this.setUnfixed();\n\n this.observer = new IntersectionObserver(this.observe, { threshold: [1] });\n this.observer.observe(this.stickyElement);\n\n this.updateStuck();\n }\n }\n\n /** Sticky stuck top event */\n @Event() stzhStuckTop: EventEmitter<StzhStickyStuckTopEvent>;\n\n /** Sticky stuck bottom event */\n @Event() stzhStuckBottom: EventEmitter<StzhStickyStuckBottomEvent>;\n\n @Element() element: HTMLStzhStickyElement;\n\n @State() isStuckTop: boolean;\n @State() isStuckBottom: boolean;\n\n @State() hasReachedTopLimit: boolean;\n @State() hasReachedBottomLimit: boolean;\n\n @State() loaded: boolean = false;\n\n private observer: IntersectionObserver;\n private stickyResizeObserver: ResizeObserver;\n private debounceScroll: number;\n private debounceResize: number;\n private stickyElement: HTMLElement;\n private spacerElement: HTMLElement;\n\n private windowHeight: number;\n private scrollX: number;\n private scrollY: number;\n private fixedTop: number;\n private fixedLeft: number;\n private fixedHeight: number = 0;\n private fixedWidth: number = 0;\n private fixedLimit: { top: number, bottom: number } | null = null;\n\n private updateStuck() {\n const topCss = parseInt(getComputedStyle(this.stickyElement).top, 10);\n const bottomCss = parseInt(getComputedStyle(this.stickyElement).bottom, 10);\n const rect = this.stickyElement.getBoundingClientRect();\n\n if (topCss) {\n this.isStuckTop = rect.top < 0;\n } else {\n this.isStuckTop = false;\n }\n\n if (bottomCss) {\n this.isStuckBottom = document.documentElement.clientHeight < rect.bottom;\n } else {\n this.isStuckBottom = false;\n }\n }\n\n private getFixedLimit(): { top: number, bottom: number } | null {\n const stickyContainer = this.element.closest(`[${ATTR_STICKY_CONTAINER}]`);\n\n if (!stickyContainer) {\n return null;\n }\n\n const off = offset(stickyContainer);\n\n return {\n top: off.top,\n bottom: off.top + stickyContainer.scrollHeight,\n };\n }\n\n private setUnfixed() {\n Object.assign(this.stickyElement.style, {\n position: null,\n top: null,\n bottom: null,\n left: null,\n width: null,\n });\n\n Object.assign(this.spacerElement.style, {\n display: \"none\",\n });\n }\n\n private setFixed() {\n const position = (this.hasReachedTopLimit || this.hasReachedBottomLimit)\n ? \"absolute\"\n : \"fixed\";\n\n Object.assign(this.stickyElement.style, {\n position,\n top: position === \"absolute\"\n ? `${this.isStuckTop ? this.fixedLimit.bottom - this.fixedHeight : this.fixedLimit.top}px`\n : this.isStuckTop ? \"0px\" : \"auto\",\n bottom: this.isStuckTop || position === \"absolute\"\n ? \"auto\" : \"0px\",\n left: `${this.fixedLeft + (position === \"fixed\" ? this.scrollX : 0)}px`,\n width: `${this.fixedWidth}px`,\n });\n\n Object.assign(this.spacerElement.style, {\n display: \"block\",\n });\n }\n\n private handleScroll = () => {\n if (this.debounceScroll) {\n window.cancelAnimationFrame(this.debounceScroll);\n }\n\n this.debounceScroll = requestAnimationFrame(this.updateByScroll);\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.updateFixedByResize);\n }\n\n private handleStickyResize = throttle(() => {\n this.stuckHeightWatcher();\n this.updateByScroll();\n }, 100);\n\n private updateByScroll = () => {\n if (!isVisible(this.stickyElement) || !this.element.isConnected) {\n return;\n }\n\n const stickyFixedWidthContainer = this.element.closest(`[${ATTR_STICKY_WIDTH_CONTAINER}]`) as HTMLElement\n || this.element.parentElement;\n\n const off = offset(\n (this.isStuckTop || this.isStuckBottom) && this.position === \"fixed\"\n ? this.spacerElement : this.stickyElement\n );\n\n this.fixedTop = off.top;\n this.fixedLeft = off.left;\n\n stickyFixedWidthContainer.style.setProperty('--stzh-sticky-offset-top', `${this.fixedTop}px`);\n stickyFixedWidthContainer.style.setProperty('--stzh-sticky-offset-left', `${this.fixedLeft}px`);\n\n if (this.position === \"sticky\") {\n // for position sticky we only need the offsets variables to be updated in bleeding variant\n return;\n }\n\n this.fixedHeight = this.stickyElement.offsetHeight;\n this.spacerElement.style.height = `${this.fixedHeight}px`;\n\n this.scrollX = window.scrollX;\n this.scrollY = window.scrollY;\n this.fixedLimit = this.getFixedLimit();\n\n this.fixedWidth = stickyFixedWidthContainer.getBoundingClientRect().width;\n\n const unstuckWidth = this.element.getBoundingClientRect().width;\n // stickyFixedWidthContainer.style.setProperty('--stzh-sticky-stuck-width', `${this.fixedWidth}px`);\n stickyFixedWidthContainer.style.setProperty('--stzh-sticky-unstuck-width', `${unstuckWidth}px`);\n\n // console.log(unstuckWidth);\n\n // console.log(\n // this.scrollX,\n // this.scrollY,\n // this.windowHeight,\n // this.fixedTop,\n // this.fixedLeft,\n // this.fixedHeight,\n // this.fixedLimit,\n // );\n\n this.isStuckBottom = !this.disableStickyBottom\n && this.scrollY + this.windowHeight <= this.fixedTop + this.fixedHeight;\n this.isStuckTop = !this.disableStickyTop\n && this.scrollY >= this.fixedTop;\n\n this.hasReachedTopLimit = this.fixedLimit\n && this.scrollY + this.windowHeight - this.fixedHeight <= this.fixedLimit.top;\n this.hasReachedBottomLimit = this.fixedLimit\n && this.scrollY >= this.fixedLimit.bottom - this.fixedHeight;\n\n // console.log(\n // this.isStuckBottom,\n // this.isStuckTop,\n // this.hasReachedBottomLimit,\n // this.hasReachedTopLimit,\n // );\n\n if (this.isStuckTop || this.isStuckBottom) {\n this.setFixed();\n // stickyFixedWidthContainer.style.setProperty('--stzh-sticky-width', `${this.fixedWidth}px`);\n } else {\n this.setUnfixed();\n // stickyFixedWidthContainer.style.setProperty('--stzh-sticky-width', `${unstuckWidth}px`);\n }\n }\n\n private updateFixedByResize = () => {\n if (!this.stickyElement || !this.element.isConnected) {\n return;\n }\n\n // reset sticky so we can read current offsets\n this.setUnfixed();\n this.stickyElement.style.position = \"static\";\n this.stickyElement.style.width = \"auto\";\n this.isStuckTop = false;\n this.isStuckBottom = false;\n\n if (isVisible(this.stickyElement)) {\n this.windowHeight = window.innerHeight;\n this.updateByScroll();\n }\n }\n\n private observe = () => {\n this.updateStuck();\n };\n\n componentDidLoad() {\n this.stickyResizeObserver = new ResizeObserver(this.handleStickyResize);\n this.positionWatcher();\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n window.setTimeout(() => {\n this.loaded = true;\n\n if (this.position === \"fixed\") {\n this.updateFixedByResize();\n }\n }, 250);\n });\n });\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n this.stickyResizeObserver?.disconnect();\n\n window.removeEventListener(\"scroll\", this.handleScroll);\n window.removeEventListener(\"resize\", this.handleResize);\n }\n\n render() {\n const isStuck = this.isStuckTop || this.isStuckBottom;\n\n const classes = {\n \"stzh-sticky\": true,\n \"stzh-sticky--is-not-loaded\": !this.loaded,\n \"stzh-sticky--is-stuck\": isStuck,\n \"stzh-sticky--is-stuck-top\": this.isStuckTop,\n \"stzh-sticky--is-stuck-bottom\": this.isStuckBottom,\n \"stzh-sticky--is-disabled-sticky-top\": this.disableStickyTop,\n \"stzh-sticky--is-disabled-sticky-bottom\": this.disableStickyBottom,\n \"stzh-sticky--is-bleeding\": this.bleeding,\n [`stzh-sticky--position-${this.position}`]: !!this.position,\n [`stzh-sticky--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host\n is-stuck={this.isStuckTop || this.isStuckBottom}\n is-stuck-top={this.isStuckTop}\n is-stuck-bottom={this.isStuckBottom}\n >\n <div class={classes}>\n <div\n ref={(el) => (this.spacerElement = el as HTMLDivElement)}\n class=\"stzh-sticky__spacer\"\n ></div>\n <div\n ref={(el) => (this.stickyElement = el as HTMLDivElement)}\n class=\"stzh-sticky__sticky\"\n >\n <div class=\"stzh-sticky__content\">\n <div class=\"stzh-sticky__content-inner\">\n <slot></slot>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -10,7 +10,7 @@ const eventUtils = require('./event-utils-20e7b8b1.js');
|
|
|
10
10
|
const animationUtils = require('./animation-utils-925ee0e0.js');
|
|
11
11
|
require('./string-utils-5dd70320.js');
|
|
12
12
|
|
|
13
|
-
const stzhTooltipCss = ".sc-stzh-tooltip-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-tooltip-h{display:none}.sc-stzh-tooltip-h *.sc-stzh-tooltip,.sc-stzh-tooltip-h *.sc-stzh-tooltip::before,.sc-stzh-tooltip-h *.sc-stzh-tooltip::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-tooltip-h .has-focus.sc-stzh-tooltip{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-tooltip-h .stzh-fylingfocus-focused.sc-stzh-tooltip{outline-style:none !important}.sc-stzh-tooltip-h .stzh-fylingfocus-focused.sc-stzh-tooltip::-moz-focus-inner{border:0 !important}.sc-stzh-tooltip-h{display:contents;--color:var(--stzh-color-white);--background-color:var(--stzh-color-coolgrey60);--width:var(--stzh-tooltip-width);--min-width:var(--stzh-tooltip-min-width);--max-width:var(--stzh-tooltip-max-width);--padding:var(--stzh-tooltip-padding);--border-radius:var(--stzh-tooltip-border-radius);--link-color:var(--stzh-color-white);--hover-link-color:var(--stzh-color-white70op)}.stzh-tooltip.sc-stzh-tooltip{display:contents}.stzh-tooltip__arrow.sc-stzh-tooltip{position:absolute;display:flex;color:var(--background-color)}.stzh-tooltip--placement-bottom.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-bottom-start.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-bottom-end.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip{top:0;transform:translateY(-0.5rem)}.stzh-tooltip--placement-top.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-top-start.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-top-end.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip{bottom:0;transform:translateY(0.5rem) rotate(180deg)}.stzh-tooltip--placement-left.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-left-start.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-left-end.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip{right:0;transform:translateX(0.75rem) rotate(90deg)}.stzh-tooltip--placement-right.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-right-start.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-right-end.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip{left:0;transform:translateX(-0.75rem) rotate(-90deg)}.stzh-tooltip__trigger.sc-stzh-tooltip{display:contents}.stzh-tooltip__content.sc-stzh-tooltip{font-size:var(--stzh-font-pico-font-size);line-height:var(--stzh-font-pico-text-line-height);position:absolute;z-index:var(--stzh-z-index-popover);border-radius:var(--border-radius);background-color:var(--background-color);color:var(--color);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);display:flex;flex-direction:row-reverse;--stzh-base-color:var(--color);--stzh-link-color:var(--link-color);--stzh-link-hover-color:var(--hover-link-color)}@supports (filter: var(--stzh-tooltip-drop-shadow)){.stzh-tooltip__content.sc-stzh-tooltip{box-shadow:none;filter:var(--stzh-tooltip-drop-shadow)}}.stzh-tooltip__content-slot.sc-stzh-tooltip{padding:var(--padding)}.stzh-tooltip__close.sc-stzh-tooltip{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;border:none;background-color:transparent;display:flex;width:2.75rem;height:2.75rem;flex-shrink:0;justify-content:center;align-items:center;color:var(--stzh-color-white);border-radius:var(--stzh-button-border-radius)}.stzh-tooltip__icon.sc-stzh-tooltip{--size:var(--stzh-icon-size-small)}.stzh-tooltip__vhidden.sc-stzh-tooltip{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}";
|
|
13
|
+
const stzhTooltipCss = ".sc-stzh-tooltip-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-tooltip-h{display:none}.sc-stzh-tooltip-h *.sc-stzh-tooltip,.sc-stzh-tooltip-h *.sc-stzh-tooltip::before,.sc-stzh-tooltip-h *.sc-stzh-tooltip::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-tooltip-h .has-focus.sc-stzh-tooltip{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-tooltip-h .stzh-fylingfocus-focused.sc-stzh-tooltip{outline-style:none !important}.sc-stzh-tooltip-h .stzh-fylingfocus-focused.sc-stzh-tooltip::-moz-focus-inner{border:0 !important}.sc-stzh-tooltip-h{display:contents;--color:var(--stzh-color-white);--background-color:var(--stzh-color-coolgrey60);--width:var(--stzh-tooltip-width);--min-width:var(--stzh-tooltip-min-width);--max-width:var(--stzh-tooltip-max-width);--padding:var(--stzh-tooltip-padding);--border-radius:var(--stzh-tooltip-border-radius);--link-color:var(--stzh-color-white);--hover-link-color:var(--stzh-color-white70op)}[size=small].sc-stzh-tooltip-h{--padding:var(--stzh-tooltip-small-padding)}.stzh-tooltip.sc-stzh-tooltip{display:contents}.stzh-tooltip__arrow.sc-stzh-tooltip{position:absolute;display:flex;color:var(--background-color)}.stzh-tooltip--placement-bottom.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-bottom-start.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-bottom-end.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip{top:0;transform:translateY(-0.5rem)}.stzh-tooltip--placement-top.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-top-start.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-top-end.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip{bottom:0;transform:translateY(0.5rem) rotate(180deg)}.stzh-tooltip--placement-left.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-left-start.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-left-end.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip{right:0;transform:translateX(0.75rem) rotate(90deg)}.stzh-tooltip--placement-right.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-right-start.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip,.stzh-tooltip--placement-right-end.sc-stzh-tooltip .stzh-tooltip__arrow.sc-stzh-tooltip{left:0;transform:translateX(-0.75rem) rotate(-90deg)}.stzh-tooltip__trigger.sc-stzh-tooltip{display:contents}.stzh-tooltip__content.sc-stzh-tooltip{font-size:var(--stzh-font-pico-font-size);line-height:var(--stzh-font-pico-text-line-height);position:absolute;z-index:var(--stzh-z-index-popover);border-radius:var(--border-radius);background-color:var(--background-color);color:var(--color);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);display:flex;flex-direction:row-reverse;--stzh-base-color:var(--color);--stzh-link-color:var(--link-color);--stzh-link-hover-color:var(--hover-link-color)}@supports (filter: var(--stzh-tooltip-drop-shadow)){.stzh-tooltip__content.sc-stzh-tooltip{box-shadow:none;filter:var(--stzh-tooltip-drop-shadow)}}.stzh-tooltip__content-slot.sc-stzh-tooltip{padding:var(--padding)}.stzh-tooltip__close.sc-stzh-tooltip{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;border:none;background-color:transparent;display:flex;width:2.75rem;height:2.75rem;flex-shrink:0;justify-content:center;align-items:center;color:var(--stzh-color-white);border-radius:var(--stzh-button-border-radius)}.stzh-tooltip__icon.sc-stzh-tooltip{--size:var(--stzh-icon-size-small)}.stzh-tooltip__vhidden.sc-stzh-tooltip{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}";
|
|
14
14
|
|
|
15
15
|
const ANIMATION_SHOW = {
|
|
16
16
|
keyframes: [
|
|
@@ -138,6 +138,7 @@ const StzhTooltip = class {
|
|
|
138
138
|
this.content = "";
|
|
139
139
|
this.placement = "bottom";
|
|
140
140
|
this.strategy = "absolute";
|
|
141
|
+
this.size = "default";
|
|
141
142
|
this.skidding = 0;
|
|
142
143
|
this.distance = 12;
|
|
143
144
|
this.interactive = false;
|