@content-blocks/js 0.4.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/content-accordion_11.cjs.entry.js +97 -84
- package/dist/cjs/content-accordion_11.cjs.entry.js.map +1 -1
- package/dist/cjs/content-blocks.cjs.js +3 -3
- package/dist/cjs/content-blocks.cjs.js.map +1 -1
- package/dist/cjs/content-carousel.cjs.entry.js +3 -2
- package/dist/cjs/content-carousel.cjs.entry.js.map +1 -1
- package/dist/cjs/content-navigation-block.cjs.entry.js +31 -29
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -1
- package/dist/cjs/content-split-block.cjs.entry.js +6 -6
- package/dist/cjs/content-split-block.cjs.entry.js.map +1 -1
- package/dist/cjs/content-tabs.cjs.entry.js +8 -6
- package/dist/cjs/content-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-66c390bf.js → index-9f20d89a.js} +34 -14
- package/dist/cjs/index-9f20d89a.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-dbda9bbc.js → utils-db61cd70.js} +12 -4
- package/dist/cjs/utils-db61cd70.js.map +1 -0
- package/dist/cjs/{window-resize-service-35e2ab31.js → window-resize-service-ac5c2012.js} +4 -3
- package/dist/cjs/window-resize-service-ac5c2012.js.map +1 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.css +6 -4
- package/dist/collection/blocks/content-hero-block/content-hero-block.js +2 -4
- package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +1 -1
- package/dist/collection/blocks/content-split-block/content-split-block.css +0 -4
- package/dist/collection/blocks/content-split-block/content-split-block.js +2 -2
- package/dist/collection/blocks/content-split-block/content-split-block.js.map +1 -1
- package/dist/collection/blocks/content-text-block/content-text-block.css +0 -4
- package/dist/collection/blocks/content-text-block/content-text-block.js +7 -7
- package/dist/collection/blocks/content-text-block/content-text-block.js.map +1 -1
- package/dist/collection/blocks/content-tout-block/content-tout-block.css +0 -6
- package/dist/collection/blocks/content-tout-block/content-tout-block.js +0 -2
- package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/content-accordion/content-accordion.js +2 -2
- package/dist/collection/components/content-accordion/content-accordion.js.map +1 -1
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +1 -1
- package/dist/collection/components/content-carousel/content-carousel.css +0 -4
- package/dist/collection/components/content-carousel/content-carousel.js +2 -1
- package/dist/collection/components/content-carousel/content-carousel.js.map +1 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.css +0 -6
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +27 -25
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -1
- package/dist/collection/components/content-overlay/content-overlay.css +6 -9
- package/dist/collection/components/content-overlay/content-overlay.js +34 -16
- package/dist/collection/components/content-overlay/content-overlay.js.map +1 -1
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +1 -1
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +1 -1
- package/dist/collection/components/content-tabs/content-tabs.css +0 -4
- package/dist/collection/components/content-tabs/content-tabs.js +4 -2
- package/dist/collection/components/content-tabs/content-tabs.js.map +1 -1
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +1 -1
- package/dist/collection/elements/content-button/content-button.css +0 -4
- package/dist/collection/elements/content-button/content-button.js +12 -11
- package/dist/collection/elements/content-button/content-button.js.map +1 -1
- package/dist/collection/elements/content-image/content-image.css +4 -11
- package/dist/collection/elements/content-image/content-image.js +81 -23
- package/dist/collection/elements/content-image/content-image.js.map +1 -1
- package/dist/collection/elements/content-line/content-line.js +10 -14
- package/dist/collection/elements/content-line/content-line.js.map +1 -1
- package/dist/collection/elements/content-video/content-video.css +1 -5
- package/dist/collection/elements/content-video/content-video.js +1 -1
- package/dist/collection/elements/content-video/content-video.js.map +1 -1
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +1 -4
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +46 -3
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -1
- package/dist/collection/formatters/content-spacer/content-spacer.css +0 -3
- package/dist/collection/formatters/content-spacer/content-spacer.js +4 -3
- package/dist/collection/formatters/content-spacer/content-spacer.js.map +1 -1
- package/dist/collection/services/content-events-service.js.map +1 -1
- package/dist/collection/services/window-resize-service.js +2 -1
- package/dist/collection/services/window-resize-service.js.map +1 -1
- package/dist/collection/stories/ContentHeroBlock.stories.js +22 -18
- package/dist/collection/stories/ContentHeroBlock.stories.js.map +1 -1
- package/dist/collection/stories/ContentNavigationBlock.stories.js +26 -0
- package/dist/collection/stories/ContentNavigationBlock.stories.js.map +1 -0
- package/dist/collection/stories/ContentSpacer.stories.js +20 -0
- package/dist/collection/stories/ContentSpacer.stories.js.map +1 -0
- package/dist/collection/stories/ContentTextBlock.stories.js +17 -0
- package/dist/collection/stories/ContentTextBlock.stories.js.map +1 -0
- package/dist/collection/stories/ContentToutBlock.stories.js +17 -0
- package/dist/collection/stories/ContentToutBlock.stories.js.map +1 -0
- package/dist/collection/stories/FullPageExample.stories.js +482 -0
- package/dist/collection/stories/FullPageExample.stories.js.map +1 -0
- package/dist/collection/utils/utils.js +9 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/content-accordion.js +1 -1
- package/dist/components/content-accordion.js.map +1 -1
- package/dist/components/content-button.js +13 -12
- package/dist/components/content-button.js.map +1 -1
- package/dist/components/content-carousel.js +2 -1
- package/dist/components/content-carousel.js.map +1 -1
- package/dist/components/content-grid-formatter2.js +8 -2
- package/dist/components/content-grid-formatter2.js.map +1 -1
- package/dist/components/content-hero-block.js +2 -4
- package/dist/components/content-hero-block.js.map +1 -1
- package/dist/components/content-image.js +28 -24
- package/dist/components/content-image.js.map +1 -1
- package/dist/components/content-line.js +8 -12
- package/dist/components/content-line.js.map +1 -1
- package/dist/components/content-navigation-block.js +28 -26
- package/dist/components/content-navigation-block.js.map +1 -1
- package/dist/components/content-overlay.js +32 -14
- package/dist/components/content-overlay.js.map +1 -1
- package/dist/components/content-spacer.js +3 -3
- package/dist/components/content-spacer.js.map +1 -1
- package/dist/components/content-split-block.js +3 -3
- package/dist/components/content-split-block.js.map +1 -1
- package/dist/components/content-tabs.js +5 -3
- package/dist/components/content-tabs.js.map +1 -1
- package/dist/components/content-text-block.js +8 -8
- package/dist/components/content-text-block.js.map +1 -1
- package/dist/components/content-tout-block.js +1 -3
- package/dist/components/content-tout-block.js.map +1 -1
- package/dist/components/content-video.js +1 -1
- package/dist/components/content-video.js.map +1 -1
- package/dist/components/utils.js +12 -2
- package/dist/components/utils.js.map +1 -1
- package/dist/components/window-resize-service.js +2 -1
- package/dist/components/window-resize-service.js.map +1 -1
- package/dist/content-blocks/content-blocks.esm.js +1 -1
- package/dist/content-blocks/content-blocks.esm.js.map +1 -1
- package/dist/content-blocks/index.esm.js +1 -1
- package/dist/content-blocks/p-167a9155.entry.js +2 -0
- package/dist/content-blocks/p-167a9155.entry.js.map +1 -0
- package/dist/content-blocks/{p-3d21ae2b.entry.js → p-271fb304.entry.js} +2 -2
- package/dist/content-blocks/p-271fb304.entry.js.map +1 -0
- package/dist/content-blocks/p-288eace9.js +3 -0
- package/dist/content-blocks/p-288eace9.js.map +1 -0
- package/dist/content-blocks/p-4038cd42.entry.js +10 -0
- package/dist/content-blocks/p-4038cd42.entry.js.map +1 -0
- package/dist/content-blocks/p-4bfbd7ef.entry.js +2 -0
- package/dist/content-blocks/p-4bfbd7ef.entry.js.map +1 -0
- package/dist/content-blocks/p-8cc22c1e.entry.js +2 -0
- package/dist/content-blocks/p-8cc22c1e.entry.js.map +1 -0
- package/dist/content-blocks/{p-070bc93d.js → p-b04fe808.js} +2 -2
- package/dist/content-blocks/p-b04fe808.js.map +1 -0
- package/dist/content-blocks/{p-451e7694.js → p-cfb4593f.js} +2 -2
- package/dist/content-blocks/p-cfb4593f.js.map +1 -0
- package/dist/esm/content-accordion_11.entry.js +97 -84
- package/dist/esm/content-accordion_11.entry.js.map +1 -1
- package/dist/esm/content-blocks.js +4 -4
- package/dist/esm/content-blocks.js.map +1 -1
- package/dist/esm/content-carousel.entry.js +3 -2
- package/dist/esm/content-carousel.entry.js.map +1 -1
- package/dist/esm/content-navigation-block.entry.js +31 -29
- package/dist/esm/content-navigation-block.entry.js.map +1 -1
- package/dist/esm/content-split-block.entry.js +6 -6
- package/dist/esm/content-split-block.entry.js.map +1 -1
- package/dist/esm/content-tabs.entry.js +8 -6
- package/dist/esm/content-tabs.entry.js.map +1 -1
- package/dist/esm/{index-2674652b.js → index-e848c048.js} +34 -14
- package/dist/esm/index-e848c048.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-72b3a8bd.js → utils-4f78228e.js} +13 -3
- package/dist/esm/utils-4f78228e.js.map +1 -0
- package/dist/esm/{window-resize-service-8419bd19.js → window-resize-service-f40ec51c.js} +4 -3
- package/dist/esm/window-resize-service-f40ec51c.js.map +1 -0
- package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +0 -1
- package/dist/types/blocks/content-split-block/content-split-block.d.ts +1 -1
- package/dist/types/blocks/content-text-block/content-text-block.d.ts +1 -1
- package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +0 -1
- package/dist/types/components/content-accordion/content-accordion.d.ts +6 -6
- package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +2 -2
- package/dist/types/components/content-overlay/content-overlay.d.ts +4 -3
- package/dist/types/components/content-tabs/content-tabs.d.ts +1 -0
- package/dist/types/components.d.ts +37 -3
- package/dist/types/elements/content-button/content-button.d.ts +1 -1
- package/dist/types/elements/content-image/content-image.d.ts +13 -1
- package/dist/types/elements/content-line/content-line.d.ts +1 -1
- package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +8 -2
- package/dist/types/formatters/content-spacer/content-spacer.d.ts +1 -1
- package/dist/types/stories/ContentHeroBlock.stories.d.ts +4 -5
- package/dist/types/stories/ContentNavigationBlock.stories.d.ts +11 -0
- package/dist/types/stories/ContentSpacer.stories.d.ts +15 -0
- package/dist/types/stories/ContentTextBlock.stories.d.ts +15 -0
- package/dist/types/stories/ContentToutBlock.stories.d.ts +9 -0
- package/dist/types/stories/FullPageExample.stories.d.ts +10 -0
- package/dist/types/typings.d.ts +3 -3
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +6 -3
- package/dist/cjs/index-66c390bf.js.map +0 -1
- package/dist/cjs/utils-dbda9bbc.js.map +0 -1
- package/dist/cjs/window-resize-service-35e2ab31.js.map +0 -1
- package/dist/content-blocks/p-070bc93d.js.map +0 -1
- package/dist/content-blocks/p-171693ef.js +0 -3
- package/dist/content-blocks/p-171693ef.js.map +0 -1
- package/dist/content-blocks/p-3d21ae2b.entry.js.map +0 -1
- package/dist/content-blocks/p-3e27514e.entry.js +0 -10
- package/dist/content-blocks/p-3e27514e.entry.js.map +0 -1
- package/dist/content-blocks/p-451e7694.js.map +0 -1
- package/dist/content-blocks/p-6ddbb176.entry.js +0 -2
- package/dist/content-blocks/p-6ddbb176.entry.js.map +0 -1
- package/dist/content-blocks/p-a78f9c91.entry.js +0 -2
- package/dist/content-blocks/p-a78f9c91.entry.js.map +0 -1
- package/dist/content-blocks/p-dac292e3.entry.js +0 -2
- package/dist/content-blocks/p-dac292e3.entry.js.map +0 -1
- package/dist/esm/index-2674652b.js.map +0 -1
- package/dist/esm/utils-72b3a8bd.js.map +0 -1
- package/dist/esm/window-resize-service-8419bd19.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { W as WindowResizeService } from './window-resize-service.js';
|
|
3
3
|
|
|
4
|
-
const contentButtonCss = "*{box-sizing:border-box}content-button{display:inline-block
|
|
4
|
+
const contentButtonCss = "*{box-sizing:border-box}content-button{display:inline-block}content-button>a,content-button>button{display:flex;width:100%;align-items:center;justify-content:center}content-button>button{appearance:none;background:inherit;cursor:pointer}content-button[clickable-block=true]{display:block;width:100%;height:100%}content-button[clickable-block=true]>a,content-button[clickable-block=true]>button{height:100%;width:100%}content-button[clickable-block=true]>a>*,content-button[clickable-block=true]>button>*{display:block;width:100%}content-button[clickable-block=true] .content-button__clickable-content{width:100%;height:100%}";
|
|
5
5
|
|
|
6
6
|
const ContentButton$1 = /*@__PURE__*/ proxyCustomElement(class ContentButton extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -16,27 +16,27 @@ const ContentButton$1 = /*@__PURE__*/ proxyCustomElement(class ContentButton ext
|
|
|
16
16
|
this.controls = undefined;
|
|
17
17
|
this.linkLabel = undefined;
|
|
18
18
|
this.linkClass = undefined;
|
|
19
|
+
this.hasContentToActivate = undefined;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
let promises = [];
|
|
21
|
+
componentWillLoad() {
|
|
22
22
|
this.activatedContent = this.hostElement.querySelector('[slot="activatedContent"]');
|
|
23
23
|
this.hasContentToActivate = !!this.activatedContent;
|
|
24
24
|
// If this is a clickable block, forcefully add a # to force an anchor link
|
|
25
25
|
if (!this.href || this.href === '#') {
|
|
26
26
|
this.href = 'javascript:void(0);';
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
WindowResizeService.registerProp(this.linkClass).subscribe(newValue => {
|
|
29
29
|
this.linkClass = newValue;
|
|
30
|
-
})
|
|
31
|
-
|
|
30
|
+
});
|
|
31
|
+
WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
32
32
|
this.classString = newValue;
|
|
33
|
-
})
|
|
34
|
-
return promises;
|
|
33
|
+
});
|
|
35
34
|
}
|
|
36
35
|
onHandleClickEvent(ev) {
|
|
36
|
+
console.log(ev);
|
|
37
37
|
if (this.hasContentToActivate) {
|
|
38
38
|
ev.preventDefault();
|
|
39
|
-
ev.stopPropagation();
|
|
39
|
+
// ev.stopPropagation();
|
|
40
40
|
this.activatedContent.dispatchEvent(new CustomEvent('contentBlockActivated', { detail: this.activatedContent }));
|
|
41
41
|
this.activatedContent.scrollIntoView({ behavior: 'smooth' });
|
|
42
42
|
}
|
|
@@ -44,9 +44,9 @@ const ContentButton$1 = /*@__PURE__*/ proxyCustomElement(class ContentButton ext
|
|
|
44
44
|
let element = document.getElementById(this.href.substring(1));
|
|
45
45
|
if (element) {
|
|
46
46
|
ev.preventDefault();
|
|
47
|
-
ev.stopPropagation();
|
|
47
|
+
// ev.stopPropagation();
|
|
48
48
|
element.dispatchEvent(new CustomEvent('contentBlockActivated', { detail: element }));
|
|
49
|
-
element.scrollIntoView({ behavior: 'smooth' });
|
|
49
|
+
// element.scrollIntoView({ behavior: 'smooth' });
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -64,7 +64,8 @@ const ContentButton$1 = /*@__PURE__*/ proxyCustomElement(class ContentButton ext
|
|
|
64
64
|
"controls": [1],
|
|
65
65
|
"linkLabel": [1, "link-label"],
|
|
66
66
|
"linkClass": [1537, "link-class"],
|
|
67
|
-
"classString": [32]
|
|
67
|
+
"classString": [32],
|
|
68
|
+
"hasContentToActivate": [32]
|
|
68
69
|
}]);
|
|
69
70
|
function defineCustomElement$1() {
|
|
70
71
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-button.js","mappings":";;;AAAA,MAAM,gBAAgB,GAAG
|
|
1
|
+
{"file":"content-button.js","mappings":";;;AAAA,MAAM,gBAAgB,GAAG,knBAAknB;;MCe9nBA,eAAa;;;;;;uBAmBN,EAAE;2BACG,EAAE;8BAIS,KAAK;;;;;;;IAmCvC,iBAAiB;QACf,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAAC;QACpF,IAAI,CAAC,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC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AO,EAAE,CAAC,CAAC,CAAC;;aAEtF;SACF;KACF;IAED,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,IAC3B,uBACc,IAAI,CAAC,SAAS,EAC1B,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,qBAAqB,GAAG,QAAQ,GAAG,EAAE,EACzD,OAAO,EAAE,EAAE,IAAI,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,mBAC3B,IAAI,CAAC,QAAQ,mBACb,IAAI,CAAC,QAAQ,EAC5B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,IAElB,CAAC,IAAI,CAAC,cAAc,IACnB,gBACE,YAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,eAAa,CACR,KAEP,WAAK,KAAK,EAAC,mCAAmC,IAC5C,YAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,eAAa,CACT,CACP,CACC,EACJ,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CAChC,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentButton"],"sources":["src/elements/content-button/content-button.scss?tag=content-button","src/elements/content-button/content-button.tsx"],"sourcesContent":["content-button {\n display: inline-block;\n > a, > button {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n }\n > button {\n appearance: none;\n background: inherit;\n cursor: pointer;\n }\n\n &[clickable-block=\"true\"] {\n display: block;\n width: 100%;\n height: 100%;\n > a,\n > button {\n height: 100%;\n width: 100%;\n > * {\n display: block;\n width: 100%;\n }\n }\n .content-button__clickable-content {\n width: 100%;\n height: 100%;\n }\n }\n\n}","import { Component, h, Host, Prop } from '@stencil/core';\nimport { Element, HTMLStencilElement, State } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\n\n/**\n * @slot content - Inner contents of the button, usually plaintext.\n * @slot - Default slot, same as content slot.\n * @slot activatedContent - If this slot is used, the content in this will be scrolled to and triggered.\n */\n@Component({\n tag: 'content-button',\n styleUrl: 'content-button.scss',\n shadow: false,\n})\nexport class ContentButton {\n @Element() hostElement: HTMLStencilElement;\n /**\n * @type URL\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n href: string;\n /**\n * @type String\n */\n @Prop() target: string;\n /**\n * The classes for the button.\n * @type String\n * @responsive\n */\n @Prop() classes = '';\n @State() classString = '';\n /**\n * @type Boolean\n */\n @Prop() clickableBlock: boolean = false;\n /**\n * @type Boolean\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n expanded: string;\n /**\n\n /**\n * Aria-controls value\n * @type Target\n */\n @Prop() controls: string;\n\n /**\n * @type String\n * @responsive\n */\n @Prop() linkLabel: ResponsiveString;\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n linkClass: ResponsiveString;\n @State() hasContentToActivate: boolean;\n\n public activatedContent: HTMLDivElement;\n\n componentWillLoad() {\n this.activatedContent = this.hostElement.querySelector('[slot=\"activatedContent\"]');\n this.hasContentToActivate = !!this.activatedContent;\n // If this is a clickable block, forcefully add a # to force an anchor link\n if (!this.href || this.href === '#') {\n this.href = 'javascript:void(0);';\n }\n\n WindowResizeService.registerProp(this.linkClass).subscribe(newValue => {\n this.linkClass = newValue as string;\n });\n\n WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string;\n });\n }\n\n onHandleClickEvent(ev) {\n console.log(ev);\n if (this.hasContentToActivate) {\n ev.preventDefault();\n // ev.stopPropagation();\n this.activatedContent.dispatchEvent(new CustomEvent('contentBlockActivated', { detail: this.activatedContent }));\n this.activatedContent.scrollIntoView({ behavior: 'smooth' });\n } else if (this.href && this.href.length > 1 && this.href.substring(0, 1) === '#') {\n let element = document.getElementById(this.href.substring(1));\n if (element) {\n ev.preventDefault();\n // ev.stopPropagation();\n element.dispatchEvent(new CustomEvent('contentBlockActivated', { detail: element }));\n // element.scrollIntoView({ behavior: 'smooth' });\n }\n }\n }\n\n render() {\n return (\n <Host class={this.classString}>\n <a\n aria-label={this.linkLabel}\n class={this.linkClass}\n role={this.href === 'javascript:void(0);' ? 'button' : ''}\n onClick={ev => this.onHandleClickEvent(ev)}\n aria-expanded={this.expanded}\n aria-controls={this.controls}\n href={this.href}\n target={this.target}\n >\n {!this.clickableBlock ? (\n <span>\n <slot name=\"content\"></slot>\n <slot></slot>\n </span>\n ) : (\n <div class=\"content-button__clickable-content\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n )}\n </a>\n <slot name=\"activatedContent\"></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { B as BehaviorSubject } from './BehaviorSubject.js';
|
|
3
3
|
|
|
4
|
-
const contentCarouselCss = "@font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYD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LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.swiper-virtual .swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-lock{display:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:'next'}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active{pointer-events:auto}.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-cube .swiper-slide-next+.swiper-slide{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-flip{overflow:visible}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards .swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}*{box-sizing:border-box}content-carousel{display:block;overflow:hidden;visibility:hidden}content-carousel.hydrated{visibility:inherit}";
|
|
4
|
+
const contentCarouselCss = "@font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZ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BAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.swiper-virtual .swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-lock{display:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:'next'}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active{pointer-events:auto}.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-cube .swiper-slide-next+.swiper-slide{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-flip{overflow:visible}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards .swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}*{box-sizing:border-box}content-carousel{display:block;overflow:hidden}";
|
|
5
5
|
|
|
6
6
|
const ContentCarousel$1 = /*@__PURE__*/ proxyCustomElement(class ContentCarousel extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -12,6 +12,7 @@ const ContentCarousel$1 = /*@__PURE__*/ proxyCustomElement(class ContentCarousel
|
|
|
12
12
|
this.swiperOptions = '{"slidesPerView": 1, "slidesPerGroup": 1, "autoplay": true, "loop": false}';
|
|
13
13
|
}
|
|
14
14
|
getSwiperOptions(newOptions) {
|
|
15
|
+
console.log(this.swiperNextElement);
|
|
15
16
|
return Object.assign({
|
|
16
17
|
observer: true,
|
|
17
18
|
observeParents: true,
|
|
@@ -1 +1 @@
|
|
|
1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AG,EAAoB,GAAQ,EAE9F,WAAK,KAAK,EAAC,oBAAoB,EAAC,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,iBAAiB,GAAG,EAAoB,GAAQ,EAChG,WAAK,KAAK,EAAC,oBAAoB,EAAC,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,iBAAiB,GAAG,EAAoB,GAAQ,EAEhG,WAAK,KAAK,EAAC,kBAAkB,EAAC,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,eAAe,GAAG,EAAoB,GAAQ,CACxF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentCarousel"],"sources":["src/components/content-carousel/content-carousel.scss?tag=content-carousel","src/components/content-carousel/content-carousel.tsx"],"sourcesContent":["@import \"~swiper/swiper-bundle.min.css\";\ncontent-carousel {\n display: block;\n overflow: hidden;\n}","import { Component, h, Host, Prop, Listen, Element } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { BehaviorSubject } from 'rxjs';\n// import { A11y, Navigation, Pagination } from 'swiper/modules';\n\n/**\n * @slot content - This slot will usually serve a content hero block or image.\n * @slot - Default slot, same as content slot.\n */\nexport type InitMethodType = 'load' | 'event';\n@Component({\n tag: 'content-carousel',\n styleUrl: 'content-carousel.scss',\n shadow: false,\n})\nexport class ContentCarousel {\n @Element() hostElement: HTMLStencilElement;\n /**\n * @type Select\n * @options load\n * @options init\n */\n @Prop() initMethod: InitMethodType = 'load';\n /**\n * @type JSON\n * @schema Swiper Options\n */\n @Prop() swiperOptions: string = '{\"slidesPerView\": 1, \"slidesPerGroup\": 1, \"autoplay\": true, \"loop\": false}';\n public swiperCarousel: any;\n public swiper?: HTMLDivElement;\n public swiperWrapper?: HTMLDivElement;\n public swiperPagination?: HTMLDivElement;\n public swiperPrevElement?: HTMLDivElement;\n public swiperNextElement?: HTMLDivElement;\n public swiperScrollbar?: HTMLDivElement;\n public swiperOptionsFinal;\n\n loadStatus: BehaviorSubject<boolean> = new BehaviorSubject(false);\n\n getSwiperOptions(newOptions: string): string {\n console.log(this.swiperNextElement);\n return Object.assign({\n observer: true,\n observeParents: true,\n pagination: {\n el: this.swiperPagination,\n },\n navigation: {\n nextEl: this.swiperNextElement,\n prevEl: this.swiperPrevElement,\n },\n scrollbar: {\n el: this.swiperScrollbar,\n },\n }, newOptions);\n }\n componentDidLoad() {\n if (this.initMethod === 'load') {\n if (this.swiperOptions) {\n this.swiperOptionsFinal = this.getSwiperOptions(JSON.parse(this.swiperOptions as string || ''));\n }\n \n let options = {\n root: null,\n rootMargin: '0px',\n threshold: 0.1,\n }\n \n let observer = new IntersectionObserver((entries) => {\n entries.forEach(async entry => {\n if (entry.isIntersecting && !this.loadStatus.getValue()) {\n await this.initSwiper();\n this.loadStatus.next(true);\n }\n });\n }, options);\n observer.observe(this.hostElement);\n }\n }\n\n @Listen('setSwiperOptions')\n setSwiperOptionsCallback(event: CustomEvent) {\n this.loadStatus.subscribe(async () => {\n let loaded = this.loadStatus.value;\n if (loaded) {\n this.swiperOptionsFinal = this.getSwiperOptions(event.detail);\n await this.initSwiper();\n }\n });\n }\n\n async initSwiper() {\n let Swiper = await import('swiper');\n for (const slide of this.swiperWrapper.children as any) {\n slide.classList.add('swiper-slide');\n }\n // configure Swiper to use modules\n this.swiperCarousel = new Swiper.Swiper(this.swiper, {\n ...this.swiperOptionsFinal, ...{\n // modules: [A11y, Navigation, Pagination]\n }\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"swiper\" ref={el => this.swiper = el as HTMLDivElement}>\n <div class=\"swiper-wrapper\" ref={el => this.swiperWrapper = el as HTMLDivElement}>\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n <div class=\"swiper-pagination\" ref={el => this.swiperPagination = el as HTMLDivElement}></div>\n\n <div class=\"swiper-button-prev\" ref={el => this.swiperPrevElement = el as HTMLDivElement}></div>\n <div class=\"swiper-button-next\" ref={el => this.swiperNextElement = el as HTMLDivElement}></div>\n\n <div class=\"swiper-scrollbar\" ref={el => this.swiperScrollbar = el as HTMLDivElement}></div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { W as WindowResizeService } from './window-resize-service.js';
|
|
3
3
|
|
|
4
|
-
const contentGridFormatterCss = "*{box-sizing:border-box}content-grid-formatter{width:100%;overflow:auto
|
|
4
|
+
const contentGridFormatterCss = "*{box-sizing:border-box}content-grid-formatter{width:100%;overflow:auto}content-grid-formatter *{box-sizing:border-box}content-grid-formatter[type=grid]{display:grid;grid-template-columns:repeat(var(--columns), 1fr);column-gap:var(--column-gap)}content-grid-formatter[type=flex]{display:flex;align-items:var(--align-items);justify-content:var(--justify-content);flex-wrap:wrap}content-grid-formatter[type=flex]>*{overflow:auto;flex:0 0 auto;width:calc(100% / var(--columns))}content-grid-formatter>[flex-shrink=true]{width:auto;flex-shrink:1}content-grid-formatter[flex-shrink=true]>*{flex-shrink:1}content-grid-formatter[flex-grow=true]>*{flex-grow:1}content-grid-formatter>[flex-grow=true]{width:auto;flex-grow:1}";
|
|
5
5
|
|
|
6
6
|
const ContentGridFormatter = /*@__PURE__*/ proxyCustomElement(class ContentGridFormatter extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -15,10 +15,11 @@ const ContentGridFormatter = /*@__PURE__*/ proxyCustomElement(class ContentGridF
|
|
|
15
15
|
this.verticalAlignment = 'space-between';
|
|
16
16
|
this.horizontalAlignment = 'space-between';
|
|
17
17
|
this.columns = '1';
|
|
18
|
+
this.columnGap = '0';
|
|
18
19
|
this.activeClassString = undefined;
|
|
19
20
|
this.inlineStyle = {};
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
componentWillLoad() {
|
|
22
23
|
return Promise.allSettled([
|
|
23
24
|
WindowResizeService.registerProp(this.type).subscribe(newValue => (this.type = newValue)),
|
|
24
25
|
WindowResizeService.registerProp(this.verticalAlignment).subscribe(newValue => {
|
|
@@ -35,6 +36,10 @@ const ContentGridFormatter = /*@__PURE__*/ proxyCustomElement(class ContentGridF
|
|
|
35
36
|
this.columns = newValue;
|
|
36
37
|
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--columns': newValue });
|
|
37
38
|
}),
|
|
39
|
+
WindowResizeService.registerProp(this.columnGap).subscribe(newValue => {
|
|
40
|
+
this.columnGap = newValue;
|
|
41
|
+
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--column-gap': newValue });
|
|
42
|
+
}),
|
|
38
43
|
WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue)),
|
|
39
44
|
]);
|
|
40
45
|
}
|
|
@@ -50,6 +55,7 @@ const ContentGridFormatter = /*@__PURE__*/ proxyCustomElement(class ContentGridF
|
|
|
50
55
|
"verticalAlignment": [1537, "vertical-alignment"],
|
|
51
56
|
"horizontalAlignment": [1537, "horizontal-alignment"],
|
|
52
57
|
"columns": [1537],
|
|
58
|
+
"columnGap": [1537, "column-gap"],
|
|
53
59
|
"classString": [32],
|
|
54
60
|
"activeClassString": [32],
|
|
55
61
|
"inlineStyle": [32]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-grid-formatter2.js","mappings":";;;AAAA,MAAM,uBAAuB,GAAG,
|
|
1
|
+
{"file":"content-grid-formatter2.js","mappings":";;;AAAA,MAAM,uBAAuB,GAAG,6sBAA6sB;;MCahuB,oBAAoB;;;;;;oBAmBO,MAAM;wBAUd,OAAO;0BAUL,OAAO;iCAcG,eAAe;mCAeb,eAAe;uBAS/B,GAAG;yBAUD,GAAG;;2BAGiB,EAAE;;IAEpD,iBAAiB;QACf,OAAO,OAAO,CAAC,UAAU,CAAC;YACxB,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI,GAAG,QAAsB,CAAC,CAAC;YACvG,mBAAmB,CAA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O,CAAC,CAAC,SAAS,CAAC,QAAQ,KAAK,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC;SAC9G,CAAC,CAAC;KACJ;IAED,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,IACpD,eAAQ,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/formatters/content-grid-formatter/content-grid-formatter.scss?tag=content-grid-formatter","src/formatters/content-grid-formatter/content-grid-formatter.tsx"],"sourcesContent":["content-grid-formatter {\n width: 100%;\n overflow: auto;\n * {\n box-sizing: border-box;\n }\n &[type=\"grid\"] {\n display: grid;\n grid-template-columns: repeat(var(--columns), 1fr);\n column-gap: var(--column-gap);\n }\n\n &[type=\"flex\"] {\n display: flex;\n align-items: var(--align-items);\n justify-content: var(--justify-content);\n flex-wrap: wrap; \n > * {\n overflow: auto;\n flex: 0 0 auto;\n width: calc(100%/var(--columns));\n }\n }\n > [flex-shrink=\"true\"] {\n width: auto;\n flex-shrink: 1;\n }\n &[flex-shrink=\"true\"] > * {\n flex-shrink: 1;\n }\n &[flex-grow=\"true\"] > * {\n flex-grow: 1;\n }\n > [flex-grow=\"true\"] {\n width: auto;\n flex-grow: 1;\n }\n}","import { Component, h, Host, Prop, State } from '@stencil/core';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { FLEX_JUSTIFY_OPTIONS, GRID_TYPES, ResponsiveBoolean, ResponsiveNumber, ResponsiveString } from '../../typings';\n\n/**\n * @slot media - This slot can either be a video or image component.\n * @slot content - This slot will usually serve a content text block.\n */\n@Component({\n tag: 'content-grid-formatter',\n styleUrl: 'content-grid-formatter.scss',\n shadow: false,\n})\nexport class ContentGridFormatter {\n /**\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n /**\n * Flex or grid\n * @type Select\n * @options none\n * @options flex\n * @options grid\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n type: GRID_TYPES | ResponsiveString = 'flex';\n /**\n * Setting this true to will grow all children. Alternatively, add the attribute [flex-grow=\"true\"] to a specific grid child and that child will grow.\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n flexGrow: ResponsiveBoolean = 'false';\n /**\n * Setting this true to will shrink all children. Alternatively, add the attribute [flex-shrink=\"true\"] to a specific grid child and that child will shrink.\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n flexShrink: ResponsiveBoolean = 'false';\n /**\n * Vertical axis alignment\n * @type Select\n * @options flex-start\n * @options space-between\n * @options center\n * @options space-evenly\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n verticalAlignment: FLEX_JUSTIFY_OPTIONS = 'space-between';\n\n /**\n * Horizontal axis alignment\n * @type Select\n * @options flex-start\n * @options space-between\n * @options center\n * @options space-evenly\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n horizontalAlignment: FLEX_JUSTIFY_OPTIONS = 'space-between';\n /**\n * @type Number\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n columns: ResponsiveNumber = '1';\n\n /**\n * @type Number\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n columnGap: ResponsiveNumber = '0';\n\n @State() activeClassString: string;\n @State() inlineStyle: { [key: string]: string } = {};\n\n componentWillLoad() {\n return Promise.allSettled([\n WindowResizeService.registerProp(this.type).subscribe(newValue => (this.type = newValue as GRID_TYPES)),\n WindowResizeService.registerProp(this.verticalAlignment).subscribe(newValue => {\n this.verticalAlignment = newValue as FLEX_JUSTIFY_OPTIONS;\n this.inlineStyle = {\n ...this.inlineStyle,\n '--align-items': this.verticalAlignment,\n };\n }),\n WindowResizeService.registerProp(this.horizontalAlignment).subscribe(newValue => {\n this.horizontalAlignment = newValue as FLEX_JUSTIFY_OPTIONS;\n this.inlineStyle = {\n ...this.inlineStyle,\n '--justify-content': this.horizontalAlignment,\n };\n }),\n WindowResizeService.registerProp(this.flexShrink).subscribe(newValue => (this.flexShrink = newValue as string)),\n WindowResizeService.registerProp(this.flexGrow).subscribe(newValue => (this.flexGrow = newValue as string)),\n WindowResizeService.registerProp(this.columns).subscribe(newValue => {\n this.columns = newValue as string;\n this.inlineStyle = {\n ...this.inlineStyle,\n '--columns': newValue as string,\n };\n }),\n WindowResizeService.registerProp(this.columnGap).subscribe(newValue => {\n this.columnGap = newValue as string;\n this.inlineStyle = {\n ...this.inlineStyle,\n '--column-gap': newValue as string,\n };\n }),\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string)),\n ]);\n }\n\n render() {\n return (\n <Host class={this.classString} style={this.inlineStyle}>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { W as WindowResizeService } from './window-resize-service.js';
|
|
3
3
|
|
|
4
|
-
const contentHeroBlockCss = "*{box-sizing:border-box}content-hero-block{position:relative
|
|
4
|
+
const contentHeroBlockCss = "*{box-sizing:border-box}content-hero-block{position:relative}content-hero-block[content-position=above]{display:grid;grid-template-columns:1fr}content-hero-block[content-position=above] .content-hero-block__background,content-hero-block[content-position=above] .content-hero-block__content{grid-row-start:1;grid-column-start:1}content-hero-block[content-position=above] .content-hero-block__background{height:100%;overflow:hidden}content-hero-block[content-position=above] .content-hero-block__background content-image,content-hero-block[content-position=above] .content-hero-block__background content-image picture,content-hero-block[content-position=above] .content-hero-block__background content-image img,content-hero-block[content-position=above] .content-hero-block__background content-image video{height:100%}content-hero-block[content-position=above] .content-hero-block__content{display:flex;top:0;left:0;width:100%;height:100%;grid-row-start:1;grid-column-start:1}content-hero-block[content-position=above] .content-hero-block__content>*{width:100%}content-hero-block[content-position=above] .content-hero-block__content{position:relative;z-index:1}content-hero-block[content-position=below]{display:block}";
|
|
5
5
|
|
|
6
6
|
const ContentHeroBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentHeroBlock extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -16,8 +16,6 @@ const ContentHeroBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentHeroBlo
|
|
|
16
16
|
componentWillLoad() {
|
|
17
17
|
this.hasBackground = !!this.hostElement.querySelector('[slot="background"]');
|
|
18
18
|
this.hasHiddenContent = !!this.hostElement.querySelector('[slot="activatedContent"]');
|
|
19
|
-
}
|
|
20
|
-
componentDidLoad() {
|
|
21
19
|
WindowResizeService.registerProp(this.contentPosition).subscribe(newValue => (this.contentPosition = newValue));
|
|
22
20
|
WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue));
|
|
23
21
|
}
|
|
@@ -27,7 +25,7 @@ const ContentHeroBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentHeroBlo
|
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
render() {
|
|
30
|
-
return (h(Host, { class: this.classString }, this.hasBackground && (h("div", { class: "content-hero-block__background" }, h("slot", { name: "background" }))), h("div", { class: "content-hero-block__content" }, h("slot", { name: "content" }))));
|
|
28
|
+
return (h(Host, { class: this.classString }, this.hasBackground && (h("div", { class: "content-hero-block__background" }, h("slot", { name: "background" }))), h("div", { class: "content-hero-block__content" }, h("slot", { name: "content" }), h("slot", null))));
|
|
31
29
|
}
|
|
32
30
|
get hostElement() { return this; }
|
|
33
31
|
static get style() { return contentHeroBlockCss; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-hero-block.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,
|
|
1
|
+
{"file":"content-hero-block.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,ksCAAksC;;MCgBjtCA,kBAAgB;;;;6BAEO,KAAK;+BAY2B,aAAa;;;mCAQvC,KAAK;;IAG7C,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;QAC7E,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAAC;QACtF,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,QAAQ,KAAK,IAAI,CAAC,eAAe,GAAG,QAAkB,CAAC,CAAC,CAAC;QAC1H,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,KAAK,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;KAC/G;IAGD,6BAA6B,CAAC,KAA+B;QAC3D,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,MAAM,EAAE;YACrC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;SACpD;KACF;IAED,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,IAC1B,IAAI,CAAC,aAAa,KACjB,WAAK,KAAK,EAAC,gCAAgC,IACzC,YAAM,IAAI,EAAC,YAAY,GAAQ,CAC3B,CACP,EACD,WAAK,KAAK,EAAC,6BAA6B,IACtC,YAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,eAAa,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentHeroBlock"],"sources":["src/blocks/content-hero-block/content-hero-block.scss?tag=content-hero-block","src/blocks/content-hero-block/content-hero-block.tsx"],"sourcesContent":["content-hero-block {\n position: relative;\n &[content-position=\"above\"] {\n display: grid;\n grid-template-columns: 1fr;\n .content-hero-block__background,\n .content-hero-block__content {\n grid-row-start: 1;\n grid-column-start: 1;\n }\n .content-hero-block__background {\n height: 100%;\n overflow: hidden;\n\n content-image,\n content-image picture,\n content-image img,\n content-image video {\n height: 100%;\n }\n }\n .content-hero-block__content {\n display: flex;\n // position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n grid-row-start: 1;\n grid-column-start: 1;\n \n > * {\n // display: block;\n width: 100%;\n }\n \n }\n .content-hero-block__content {\n position: relative;\n z-index: 1;\n }\n }\n &[content-position=\"below\"] {\n display: block;\n }\n}","import { Component, h, Host, Prop } from '@stencil/core';\nimport { Element, HTMLStencilElement, Listen, State } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\nimport { getHydratedClassString } from '../../utils/utils';\nexport type HeroContentPlacementOptions = 'above' | 'below';\n/**\n * @slot background - This slot is usually either a video or image component.\n * @slot content - This slot will usually serve a text block.\n * @slot - Default slot, same as content slot\n */\n@Component({\n tag: 'content-hero-block',\n styleUrl: 'content-hero-block.scss',\n shadow: false,\n})\nexport class ContentHeroBlock {\n @Element() hostElement: HTMLStencilElement;\n @State() hasBackground: boolean = false;\n /**\n * Pipe separated HeroContentPlacementOptions that will determine whether the content sits below the media slot or overlapped above.\n * @type Select\n * @options below\n * @options above\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n contentPosition: ResponsiveString | HeroContentPlacementOptions = 'below|above';\n\n /**\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n @State() revealHiddenContent: boolean = false;\n hasHiddenContent: boolean;\n\n componentWillLoad() {\n this.hasBackground = !!this.hostElement.querySelector('[slot=\"background\"]');\n this.hasHiddenContent = !!this.hostElement.querySelector('[slot=\"activatedContent\"]');\n WindowResizeService.registerProp(this.contentPosition).subscribe(newValue => (this.contentPosition = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n @Listen('contentBlockActivated', { target: 'window' })\n contentBlockActivationHandler(event: CustomEvent<HTMLElement>) {\n if (this.hostElement === event.detail) {\n this.hostElement.setAttribute('activated', 'true');\n }\n }\n\n render() {\n return (\n <Host class={this.classString}>\n {this.hasBackground && (\n <div class=\"content-hero-block__background\">\n <slot name=\"background\"></slot>\n </div>\n )}\n <div class=\"content-hero-block__content\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { W as WindowResizeService } from './window-resize-service.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as getCurrentValue } from './utils.js';
|
|
4
4
|
|
|
5
|
-
const contentImageCss = "*{box-sizing:border-box}content-image{display:block;height:auto;transition:opacity 0.3s;position:relative
|
|
5
|
+
const contentImageCss = "*{box-sizing:border-box}content-image{display:block;height:auto;transition:opacity 0.3s;position:relative}content-image.content-image-loading{opacity:0}content-image.content-image-loaded{opacity:1}content-image[aspect-ratio] img,content-image[aspect-ratio] picture,content-image[aspect-ratio] video{aspect-ratio:var(--aspect-ratio);object-fit:cover}content-image img,content-image picture,content-image video{display:block;width:100%;height:100%}content-image .content-image__media-content{display:none;position:absolute;width:100%;height:100%;top:0;left:0;align-items:center;justify-content:center;overflow:hidden}content-image .content-image__media-content [slot=mediaContent]{height:100%;width:100%}content-image[content=true] .content-image__media-content{display:flex}";
|
|
6
6
|
|
|
7
7
|
const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
@@ -15,6 +15,8 @@ const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage exten
|
|
|
15
15
|
this.alt = undefined;
|
|
16
16
|
this.width = '16';
|
|
17
17
|
this.height = '9';
|
|
18
|
+
this.aspectRatio = undefined;
|
|
19
|
+
this.type = 'image';
|
|
18
20
|
this.videoType = 'video/mp4';
|
|
19
21
|
this.showContent = 'false|true';
|
|
20
22
|
this.lazyLoadIsComplete = false;
|
|
@@ -23,6 +25,7 @@ const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage exten
|
|
|
23
25
|
this.classString = '';
|
|
24
26
|
this.inlineStyle = {};
|
|
25
27
|
this.hasMediaContent = false;
|
|
28
|
+
this.pictureImageSrc = undefined;
|
|
26
29
|
}
|
|
27
30
|
preloadImage(src) {
|
|
28
31
|
return new Promise(r => {
|
|
@@ -32,14 +35,24 @@ const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage exten
|
|
|
32
35
|
image.src = src;
|
|
33
36
|
});
|
|
34
37
|
}
|
|
35
|
-
|
|
38
|
+
componentWillLoad() {
|
|
36
39
|
this.hasMediaContent = !!this.hostElement.querySelector('[slot="mediaContent"]');
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
let observer = new IntersectionObserver(entries => {
|
|
41
|
+
entries.forEach(async (entry) => {
|
|
42
|
+
if (entry.isIntersecting) {
|
|
43
|
+
this.lazyLoadIsComplete = true;
|
|
44
|
+
this.pictureImageSrc = getCurrentValue(this.src);
|
|
45
|
+
this.showVideoAsGif = this.pictureImageSrc.indexOf('.mp4') >= 0 || getCurrentValue(this.type) === 'video';
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}, {
|
|
49
|
+
root: null,
|
|
50
|
+
rootMargin: `${Math.max(100, window.innerHeight * 0.15)}px`,
|
|
51
|
+
threshold: 0.1,
|
|
52
|
+
});
|
|
53
|
+
observer.observe(this.hostElement);
|
|
54
|
+
WindowResizeService.registerProp(this.aspectRatio).subscribe(newValue => {
|
|
55
|
+
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--aspect-ratio': `${newValue}` });
|
|
43
56
|
});
|
|
44
57
|
WindowResizeService.registerProp(this.alt).subscribe(newValue => {
|
|
45
58
|
this.alt = newValue;
|
|
@@ -51,7 +64,7 @@ const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage exten
|
|
|
51
64
|
this.showContent = newValue;
|
|
52
65
|
});
|
|
53
66
|
WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
54
|
-
this.classString = `${
|
|
67
|
+
this.classString = `${newValue}`;
|
|
55
68
|
});
|
|
56
69
|
}
|
|
57
70
|
watchLazyLoadIsComplete(newValue) {
|
|
@@ -68,19 +81,7 @@ const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage exten
|
|
|
68
81
|
}
|
|
69
82
|
}
|
|
70
83
|
render() {
|
|
71
|
-
|
|
72
|
-
let pictureImageSrc = '';
|
|
73
|
-
if (this.src) {
|
|
74
|
-
breakpointValues.forEach((_bp, index) => {
|
|
75
|
-
if (index === 0) {
|
|
76
|
-
pictureImageSrc = getValueAtIndex(0, this.src);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
pictureSrcSet += `${getValueAtIndex(index, this.src)} ${breakpointValues[index]}w,`;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
return (h(Host, { class: this.classString, style: this.inlineStyle, content: this.showContent }, this.hasMediaContent && (h("div", { class: "content-image__media-content" }, h("slot", { name: "mediaContent" }))), this.showVideoAsGif ? (h("video", { autoplay: true, muted: true, loop: true, preload: "none", playsinline: true, width: this.width, height: this.height }, h("source", { src: this.lazyLoadIsComplete ? this.src : null, type: this.videoType }))) : (h("picture", null, h("source", { srcSet: pictureSrcSet }), h("img", { width: this.width, height: this.height, src: pictureImageSrc, alt: this.alt })))));
|
|
84
|
+
return (h(Host, { class: `${this.activeLazyLoadClass} ${this.classString}`, style: this.inlineStyle, content: this.showContent }, this.hasMediaContent && (h("div", { class: "content-image__media-content" }, h("slot", { name: "mediaContent" }))), this.showVideoAsGif ? (h("video", { autoplay: true, muted: true, loop: true, preload: "none", playsinline: true, width: this.width, height: this.height }, h("source", { src: this.lazyLoadIsComplete ? this.src : null, type: this.videoType }))) : (h("img", { width: this.width, height: this.height, src: this.pictureImageSrc, alt: this.alt }))));
|
|
84
85
|
}
|
|
85
86
|
get hostElement() { return this; }
|
|
86
87
|
static get watchers() { return {
|
|
@@ -94,6 +95,8 @@ const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage exten
|
|
|
94
95
|
"alt": [1537],
|
|
95
96
|
"width": [1025],
|
|
96
97
|
"height": [1025],
|
|
98
|
+
"aspectRatio": [1025, "aspect-ratio"],
|
|
99
|
+
"type": [1],
|
|
97
100
|
"videoType": [1, "video-type"],
|
|
98
101
|
"showContent": [1537, "show-content"],
|
|
99
102
|
"activeSrc": [32],
|
|
@@ -102,7 +105,8 @@ const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage exten
|
|
|
102
105
|
"activeLazyLoadClass": [32],
|
|
103
106
|
"classString": [32],
|
|
104
107
|
"inlineStyle": [32],
|
|
105
|
-
"hasMediaContent": [32]
|
|
108
|
+
"hasMediaContent": [32],
|
|
109
|
+
"pictureImageSrc": [32]
|
|
106
110
|
}, undefined, {
|
|
107
111
|
"lazyLoadIsComplete": ["watchLazyLoadIsComplete"]
|
|
108
112
|
}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-image.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,
|
|
1
|
+
{"file":"content-image.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,uwBAAuwB;;MCclxBA,cAAY;;;;;wBAcK,IAAI;;;;qBA4BN,IAAI;sBASH,GAAG;;oBAgBK,OAAO;yBAMb,WAAW;2BAWP,YAAY;kCAEN,KAAK;8BACT,KAAK;mCACT,EAAE;2BACV,EAAE;2BAC0B,EAAE;+BACjB,KAAK;;;IAEzC,YAAY,CAAC,GAAG;QACd,OAAO,IAAI,OAAO,CAAC,CAAC;YAClB,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;YAC1B,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YACjB,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;YAClB,KAAK,CAAC,GAAG,GAAG,GAAG,CA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S,GAAI,CAC1E,KAER,WAAK,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,GAAI,CAC1F,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentImage"],"sources":["src/elements/content-image/content-image.scss?tag=content-image","src/elements/content-image/content-image.tsx"],"sourcesContent":["content-image {\n display: block;\n height: auto;\n transition: opacity .3s;\n position: relative;\n &.content-image-loading {\n opacity: 0;\n }\n &.content-image-loaded {\n opacity: 1;\n }\n\n &[aspect-ratio] {\n img, picture, video {\n aspect-ratio: var(--aspect-ratio);\n object-fit: cover;\n }\n }\n img,\n picture,\n video {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .content-image__media-content {\n display: none;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n [slot=\"mediaContent\"] {\n height: 100%;\n width: 100%;\n }\n }\n &[content=\"true\"] .content-image__media-content {\n display: flex;\n }\n}\n","import { Component, h, Host, Element, Prop, State, Watch } from '@stencil/core';\nimport { HostElement } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveNumber, ResponsiveString } from '../../typings';\nimport { breakpointValues, getCurrentValue, getValueAtIndex } from '../../utils/utils';\n\n/**\n * @slot mediaContent - Content displayed over media. If you want to reveal content on hover, use a tout block\n */\n@Component({\n tag: 'content-image',\n styleUrl: 'content-image.scss',\n shadow: false,\n})\nexport class ContentImage {\n @Element() hostElement: HostElement;\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n /**\n * @type Boolean\n */\n @Prop() lazyLoad: boolean = true;\n /**\n * @type Media\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: false,\n })\n src!: ResponsiveString;\n @State() activeSrc;\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n alt: ResponsiveString;\n /**\n * @type Number\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: false,\n })\n width: ResponsiveNumber = '16';\n /**\n * @type Number\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: false,\n })\n height: ResponsiveNumber = '9';\n\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: false,\n })\n aspectRatio: ResponsiveString;\n /**\n * @type Select\n * @options image\n * @options video\n */\n @Prop() type?: 'image' | 'video' = 'image';\n\n /**\n * @type Select\n * @options video/mp4\n */\n @Prop() videoType?: string = 'video/mp4';\n\n /**\n * If true, the content in the mediaContent slot will be visible.\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n showContent: ResponsiveBoolean = 'false|true';\n\n @State() lazyLoadIsComplete: boolean = false;\n @State() showVideoAsGif: boolean = false;\n @State() activeLazyLoadClass = '';\n @State() classString = '';\n @State() inlineStyle?: { [key: string]: string } = {};\n @State() hasMediaContent: boolean = false;\n @State() pictureImageSrc: string;\n preloadImage(src) {\n return new Promise(r => {\n const image = new Image();\n image.onload = r;\n image.onerror = r;\n image.src = src;\n });\n }\n\n componentWillLoad() {\n this.hasMediaContent = !!this.hostElement.querySelector('[slot=\"mediaContent\"]');\n let observer = new IntersectionObserver(\n entries => {\n entries.forEach(async entry => {\n if (entry.isIntersecting) {\n this.lazyLoadIsComplete = true;\n this.pictureImageSrc = getCurrentValue(this.src);\n this.showVideoAsGif = this.pictureImageSrc.indexOf('.mp4') >= 0 || getCurrentValue(this.type) === 'video';\n }\n });\n },\n {\n root: null,\n rootMargin: `${Math.max(100, window.innerHeight * 0.15)}px`,\n threshold: 0.1,\n },\n );\n observer.observe(this.hostElement);\n WindowResizeService.registerProp(this.aspectRatio).subscribe(newValue => {\n this.inlineStyle = { ...this.inlineStyle, '--aspect-ratio': `${newValue}` };\n });\n WindowResizeService.registerProp(this.alt).subscribe(newValue => {\n this.alt = newValue as string;\n });\n WindowResizeService.registerProp(this.height).subscribe(newValue => {\n this.height = newValue as string;\n });\n WindowResizeService.registerProp(this.showContent).subscribe(newValue => {\n this.showContent = newValue as string;\n });\n WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = `${newValue}`;\n });\n }\n\n @Watch('lazyLoadIsComplete')\n watchLazyLoadIsComplete(newValue: boolean) {\n if (newValue === true) {\n this.activeLazyLoadClass = 'content-image-loaded';\n } else {\n if (!this.lazyLoad) {\n this.activeLazyLoadClass = 'content-image-no-lazyload';\n } else {\n this.activeLazyLoadClass = 'content-image-loading';\n }\n }\n }\n\n render() {\n return (\n <Host class={`${this.activeLazyLoadClass} ${this.classString}`} style={this.inlineStyle} content={this.showContent}>\n {this.hasMediaContent && (\n <div class=\"content-image__media-content\">\n <slot name=\"mediaContent\"></slot>\n </div>\n )}\n {this.showVideoAsGif ? (\n <video autoplay muted loop preload=\"none\" playsinline width={this.width} height={this.height}>\n <source src={this.lazyLoadIsComplete ? this.src : null} type={this.videoType} />\n </video>\n ) : (\n <img width={this.width} height={this.height} src={this.pictureImageSrc} alt={this.alt} />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -14,20 +14,16 @@ const ContentLine$1 = /*@__PURE__*/ proxyCustomElement(class ContentLine extends
|
|
|
14
14
|
this.maxWidth = '100%';
|
|
15
15
|
this.inlineStyle = {};
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
promises.push(WindowResizeService.registerProp(this.textAlign).subscribe(newValue => {
|
|
17
|
+
componentWillLoad() {
|
|
18
|
+
WindowResizeService.registerProp(this.textAlign).subscribe(newValue => {
|
|
20
19
|
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--text-align': newValue });
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
promises.push(WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
20
|
+
});
|
|
21
|
+
WindowResizeService.registerProp(this.maxWidth).subscribe((newValue) => {
|
|
22
|
+
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--max-width': isNaN(newValue) ? newValue : newValue + '%' });
|
|
23
|
+
});
|
|
24
|
+
WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
28
25
|
this.classString = newValue;
|
|
29
|
-
})
|
|
30
|
-
return Promise.allSettled(promises);
|
|
26
|
+
});
|
|
31
27
|
}
|
|
32
28
|
render() {
|
|
33
29
|
// The capital case in this JSX variable is important
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-line.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,oQAAoQ;;MCc9QA,aAAW;;;;mBAgBe,KAAK;yBAWO,SAAS;;;wBAerB,MAAM;2BACO,EAAE;;IAEpD,
|
|
1
|
+
{"file":"content-line.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,oQAAoQ;;MCc9QA,aAAW;;;;mBAgBe,KAAK;yBAWO,SAAS;;;wBAerB,MAAM;2BACO,EAAE;;IAEpD,iBAAiB;QACf,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ;YACjE,IAAI,CAAC,WAAW,mCACX,IAAI,CAAC,WAAW,KACnB,cAAc,EAAE,QAAuC,GACxD,CAAC;SACH,CAAC,CAAC;QACH,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,QAAyB;YAClF,IAAI,CAAC,WAAW,mCACX,IAAI,CAAC,WAAW,KACnB,aAAa,EAAE,KAAK,CAAC,QAAkB,CAAC,GAAI,QAAmB,GAAG,QAAQ,GAAG,GAAG,GACjF,CAAC;SACH,CAAC,CAAC;QACH,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ;YAC/D,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC;SACvC,CAAC,CAAC;KACJ;IAED,MAAM;;QAEJ,MAAM,gBAAgB,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvC,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,IACpD,EAAC,gBAAgB,IAAC,KAAK,EAAC,qBAAqB,IAC3C,YAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,eAAa,CACI,CACd,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentLine"],"sources":["src/elements/content-line/content-line.scss?tag=content-line","src/elements/content-line/content-line.tsx"],"sourcesContent":["content-line {\n --text-align: default;\n --inner-max-width: 100%;\n\n display: block;\n text-align: var(--text-align);\n word-break: break-word;\n white-space: normal;\n \n .content-line__inner {\n display: inline-block;\n width: auto;\n max-width: var(--max-width);\n }\n}","import { Component, Prop, h, State, Host } from '@stencil/core';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveNumber, ResponsiveString } from '../../typings';\nexport type ContentLineTagOptions = 'div' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'section' | 'article';\nexport type ContentLineTextAlignOptions = 'default' | 'left' | 'center' | 'right';\n/**\n * @slot content - Inner contents of the line, usually plaintext.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-line',\n styleUrl: 'content-line.scss',\n shadow: false,\n})\nexport class ContentLine {\n /**\n * The element tag to use.\n * @type Select\n * @options div\n * @options p\n * @options h1\n * @options h2\n * @options h3\n * @options h4\n * @options h5\n * @options h6\n * @options span\n * @options section\n * @options article\n */\n @Prop() tag: ContentLineTagOptions = 'div';\n\n /**\n * Pipe separated list of ContentLineTextAlignOptions for text alignment.\n * @type Select\n * @options default\n * @options left\n * @options center\n * @options right\n * @responsive\n */\n @Prop() textAlign: ContentLineTextAlignOptions = 'default';\n\n /**\n * The font class for the line.\n * @type String\n * @responsive\n */\n @Prop() classes;\n @State() classString;\n\n /**\n * Pipe separated list of max width numbers. You can also use units such as \"px\" and \"vw\". If no unit is provided, defaults to percentage.\n * @type String\n * @responsive\n */\n @Prop() maxWidth: ResponsiveNumber = '100%';\n @State() inlineStyle: { [key: string]: string } = {};\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.textAlign).subscribe(newValue => {\n this.inlineStyle = {\n ...this.inlineStyle,\n '--text-align': newValue as ContentLineTextAlignOptions,\n };\n });\n WindowResizeService.registerProp(this.maxWidth).subscribe((newValue: string | number) => {\n this.inlineStyle = {\n ...this.inlineStyle,\n '--max-width': isNaN(newValue as number) ? (newValue as string) : newValue + '%',\n };\n });\n WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string;\n });\n }\n\n render() {\n // The capital case in this JSX variable is important\n const ElementTagParsed = `${this.tag}`;\n return (\n <Host class={this.classString} style={this.inlineStyle}>\n <ElementTagParsed class=\"content-line__inner\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </ElementTagParsed>\n </Host>\n );\n }\n}"],"version":3}
|