@content-blocks/js 0.5.0 → 0.7.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 +79 -61
- package/dist/cjs/content-accordion_11.cjs.entry.js.map +1 -1
- package/dist/cjs/content-blocks.cjs.js +2 -2
- package/dist/cjs/content-carousel.cjs.entry.js +2 -1
- package/dist/cjs/content-carousel.cjs.entry.js.map +1 -1
- package/dist/cjs/content-navigation-block.cjs.entry.js +24 -20
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -1
- package/dist/cjs/content-split-block.cjs.entry.js +4 -4
- package/dist/cjs/content-split-block.cjs.entry.js.map +1 -1
- package/dist/cjs/content-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{index-072153fb.js → index-9f20d89a.js} +34 -4
- 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-9856e159.js → utils-db61cd70.js} +1 -3
- package/dist/cjs/utils-db61cd70.js.map +1 -0
- package/dist/cjs/{window-resize-service-77b2c64e.js → window-resize-service-ac5c2012.js} +2 -2
- package/dist/cjs/{window-resize-service-77b2c64e.js.map → window-resize-service-ac5c2012.js.map} +1 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.css +6 -0
- package/dist/collection/blocks/content-split-block/content-split-block.js +1 -1
- 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 +8 -8
- package/dist/collection/blocks/content-text-block/content-text-block.js +4 -4
- package/dist/collection/blocks/content-text-block/content-text-block.js.map +1 -1
- package/dist/collection/components/content-accordion/content-accordion.js +4 -6
- package/dist/collection/components/content-accordion/content-accordion.js.map +1 -1
- package/dist/collection/components/content-carousel/content-carousel.js +1 -0
- package/dist/collection/components/content-carousel/content-carousel.js.map +1 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +21 -17
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -1
- package/dist/collection/components/content-overlay/content-overlay.css +12 -9
- package/dist/collection/components/content-overlay/content-overlay.js +32 -17
- package/dist/collection/components/content-overlay/content-overlay.js.map +1 -1
- package/dist/collection/elements/content-button/content-button.js +2 -6
- package/dist/collection/elements/content-button/content-button.js.map +1 -1
- package/dist/collection/elements/content-image/content-image.css +4 -7
- package/dist/collection/elements/content-image/content-image.js +82 -21
- package/dist/collection/elements/content-image/content-image.js.map +1 -1
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +1 -0
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +58 -15
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -1
- package/dist/collection/formatters/content-spacer/content-spacer.css +16 -3
- package/dist/collection/formatters/content-spacer/content-spacer.js +47 -5
- package/dist/collection/formatters/content-spacer/content-spacer.js.map +1 -1
- package/dist/collection/stories/ContentHeroBlock.stories.js +2 -2
- package/dist/collection/stories/ContentHeroBlock.stories.js.map +1 -1
- package/dist/collection/stories/FullPageExample.stories.js +11 -11
- package/dist/collection/stories/FullPageExample.stories.js.map +1 -1
- package/dist/components/content-accordion.js +3 -4
- package/dist/components/content-accordion.js.map +1 -1
- package/dist/components/content-button.js +3 -6
- package/dist/components/content-button.js.map +1 -1
- package/dist/components/content-carousel.js +2 -0
- package/dist/components/content-carousel.js.map +1 -1
- package/dist/components/content-grid-formatter2.js +19 -12
- package/dist/components/content-grid-formatter2.js.map +1 -1
- package/dist/components/content-hero-block.js +2 -1
- package/dist/components/content-hero-block.js.map +1 -1
- package/dist/components/content-image.js +30 -22
- package/dist/components/content-image.js.map +1 -1
- package/dist/components/content-line.js +1 -0
- package/dist/components/content-line.js.map +1 -1
- package/dist/components/content-navigation-block.js +22 -17
- package/dist/components/content-navigation-block.js.map +1 -1
- package/dist/components/content-overlay.js +29 -13
- package/dist/components/content-overlay.js.map +1 -1
- package/dist/components/content-spacer.js +8 -4
- package/dist/components/content-spacer.js.map +1 -1
- package/dist/components/content-split-block.js +2 -1
- package/dist/components/content-split-block.js.map +1 -1
- package/dist/components/content-tabs.js +1 -0
- package/dist/components/content-tabs.js.map +1 -1
- package/dist/components/content-text-block.js +5 -4
- package/dist/components/content-text-block.js.map +1 -1
- package/dist/components/content-tout-block.js +1 -0
- package/dist/components/content-tout-block.js.map +1 -1
- package/dist/components/content-video.js +1 -0
- package/dist/components/content-video.js.map +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/utils.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-24657e66.entry.js +10 -0
- package/dist/content-blocks/p-24657e66.entry.js.map +1 -0
- package/dist/content-blocks/{p-30ab003a.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-fd14acd9.entry.js → p-4bfbd7ef.entry.js} +2 -2
- package/dist/content-blocks/{p-fd14acd9.entry.js.map → p-4bfbd7ef.entry.js.map} +1 -1
- package/dist/content-blocks/{p-ebaee21f.entry.js → p-6a177aef.entry.js} +2 -2
- package/dist/content-blocks/{p-ebaee21f.entry.js.map → p-6a177aef.entry.js.map} +1 -1
- package/dist/content-blocks/{p-2c515f18.entry.js → p-8cc22c1e.entry.js} +2 -2
- package/dist/content-blocks/{p-da2c36ea.js → p-b04fe808.js} +2 -2
- package/dist/content-blocks/{p-da2c36ea.js.map → p-b04fe808.js.map} +1 -1
- package/dist/content-blocks/{p-3b4b9ad1.js → p-cfb4593f.js} +2 -2
- package/dist/esm/content-accordion_11.entry.js +79 -61
- package/dist/esm/content-accordion_11.entry.js.map +1 -1
- package/dist/esm/content-blocks.js +3 -3
- package/dist/esm/content-carousel.entry.js +2 -1
- package/dist/esm/content-carousel.entry.js.map +1 -1
- package/dist/esm/content-navigation-block.entry.js +24 -20
- package/dist/esm/content-navigation-block.entry.js.map +1 -1
- package/dist/esm/content-split-block.entry.js +4 -4
- package/dist/esm/content-split-block.entry.js.map +1 -1
- package/dist/esm/content-tabs.entry.js +3 -3
- package/dist/esm/{index-5c31f78b.js → index-e848c048.js} +34 -4
- 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-4f29a9cf.js → utils-4f78228e.js} +2 -2
- package/dist/esm/utils-4f78228e.js.map +1 -0
- package/dist/esm/{window-resize-service-332e7420.js → window-resize-service-f40ec51c.js} +2 -2
- package/dist/esm/{window-resize-service-332e7420.js.map → window-resize-service-f40ec51c.js.map} +1 -1
- package/dist/types/blocks/content-text-block/content-text-block.d.ts +1 -1
- package/dist/types/components/content-accordion/content-accordion.d.ts +6 -7
- package/dist/types/components/content-overlay/content-overlay.d.ts +6 -4
- package/dist/types/components.d.ts +67 -15
- package/dist/types/elements/content-button/content-button.d.ts +2 -2
- package/dist/types/elements/content-image/content-image.d.ts +13 -0
- package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +10 -4
- package/dist/types/formatters/content-spacer/content-spacer.d.ts +11 -2
- package/dist/types/typings.d.ts +3 -3
- package/package.json +1 -1
- package/dist/cjs/index-072153fb.js.map +0 -1
- package/dist/cjs/utils-9856e159.js.map +0 -1
- package/dist/content-blocks/p-2faf0c78.js +0 -3
- package/dist/content-blocks/p-2faf0c78.js.map +0 -1
- package/dist/content-blocks/p-30ab003a.entry.js.map +0 -1
- package/dist/content-blocks/p-b8009321.entry.js +0 -10
- package/dist/content-blocks/p-b8009321.entry.js.map +0 -1
- package/dist/esm/index-5c31f78b.js.map +0 -1
- package/dist/esm/utils-4f29a9cf.js.map +0 -1
- /package/dist/content-blocks/{p-2c515f18.entry.js.map → p-8cc22c1e.entry.js.map} +0 -0
- /package/dist/content-blocks/{p-3b4b9ad1.js.map → p-cfb4593f.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as e,H as o}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as e,H as o}from"./p-288eace9.js";import{W as r}from"./p-cfb4593f.js";import"./p-b04fe808.js";import"./p-cd552ce2.js";const s="*{box-sizing:border-box}content-split-block{display:block}content-split-block[reverse=true] content-grid-formatter[type=flex] [slot=column1],content-split-block[reverse=true] content-grid-formatter[type=grid] [slot=column1]{order:2}content-split-block[reverse=true] content-grid-formatter[type=flex] [slot=column2],content-split-block[reverse=true] content-grid-formatter[type=grid] [slot=column2]{order:1}";const n=class{constructor(e){t(this,e);this.reverse=false;this.columns="1|2";this.classes=undefined;this.classString=undefined}componentWillLoad(){r.registerProp(this.reverse).subscribe((t=>this.reverse=t));r.registerProp(this.classes).subscribe((t=>this.classString=t))}render(){return e(o,{class:this.classString,reverse:this.reverse},e("content-grid-formatter",{type:"none|flex","flex-grow":"true","flex-shrink":"true",columns:this.columns},e("slot",{name:"column1"}),e("slot",{name:"column2"})))}};n.style=s;export{n as content_split_block};
|
|
2
|
+
//# sourceMappingURL=p-4bfbd7ef.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["contentSplitBlockCss","ContentSplitBlock","componentWillLoad","WindowResizeService","registerProp","this","reverse","subscribe","newValue","classes","classString","render","h","Host","class","type","columns","name"],"sources":["src/blocks/content-split-block/content-split-block.scss?tag=content-split-block","src/blocks/content-split-block/content-split-block.tsx"],"sourcesContent":["content-split-block {\n display: block;\n \n &[reverse=\"true\"] {\n content-grid-formatter[type=\"flex\"] [slot=\"column1\"],\n content-grid-formatter[type=\"grid\"] [slot=\"column1\"] {\n order: 2;\n }\n\n content-grid-formatter[type=\"flex\"] [slot=\"column2\"],\n content-grid-formatter[type=\"grid\"] [slot=\"column2\"] {\n order: 1;\n }\n }\n}","import { Component, h, Host, Prop, State } from '@stencil/core';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveString } from '../../typings';\n/**\n * @slot column1 - This will be column 1.\n * @slot column2 - This will be column 2.\n */\n@Component({\n tag: 'content-split-block',\n styleUrl: 'content-split-block.scss',\n shadow: false,\n})\nexport class ContentSplitBlock {\n /**\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n reverse: ResponsiveBoolean | boolean = false;\n /**\n * @type Number\n * @responsive\n */\n @Prop() columns: string = '1|2';\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n @State() classString;\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.reverse).subscribe(newValue => (this.reverse = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n render() {\n return (\n <Host class={this.classString} reverse={this.reverse}>\n <content-grid-formatter type=\"flex\" flex-grow=\"true\" flex-shrink=\"true\" columns={this.columns}>\n <slot name=\"column1\"></slot>\n <slot name=\"column2\"></slot>\n </content-grid-formatter>\n </Host>\n );\n }\n}\n"],"mappings":"sIAAA,MAAMA,EAAuB,yZ,MCYhBC,EAAiB,M,sCASW,M,aAKb,M,kDAY1B,iBAAAC,GACEC,EAAoBC,aAAaC,KAAKC,SAASC,WAAUC,GAAaH,KAAKC,QAAUE,IACrFL,EAAoBC,aAAaC,KAAKI,SAASF,WAAUC,GAAaH,KAAKK,YAAcF,G,CAG3F,MAAAG,GACE,OACEC,EAACC,EAAI,CAACC,MAAOT,KAAKK,YAAaJ,QAASD,KAAKC,SAC3CM,EAAA,0BAAwBG,KAAK,
|
|
1
|
+
{"version":3,"names":["contentSplitBlockCss","ContentSplitBlock","componentWillLoad","WindowResizeService","registerProp","this","reverse","subscribe","newValue","classes","classString","render","h","Host","class","type","columns","name"],"sources":["src/blocks/content-split-block/content-split-block.scss?tag=content-split-block","src/blocks/content-split-block/content-split-block.tsx"],"sourcesContent":["content-split-block {\n display: block;\n \n &[reverse=\"true\"] {\n content-grid-formatter[type=\"flex\"] [slot=\"column1\"],\n content-grid-formatter[type=\"grid\"] [slot=\"column1\"] {\n order: 2;\n }\n\n content-grid-formatter[type=\"flex\"] [slot=\"column2\"],\n content-grid-formatter[type=\"grid\"] [slot=\"column2\"] {\n order: 1;\n }\n }\n}","import { Component, h, Host, Prop, State } from '@stencil/core';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveString } from '../../typings';\n/**\n * @slot column1 - This will be column 1.\n * @slot column2 - This will be column 2.\n */\n@Component({\n tag: 'content-split-block',\n styleUrl: 'content-split-block.scss',\n shadow: false,\n})\nexport class ContentSplitBlock {\n /**\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n reverse: ResponsiveBoolean | boolean = false;\n /**\n * @type Number\n * @responsive\n */\n @Prop() columns: string = '1|2';\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n @State() classString;\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.reverse).subscribe(newValue => (this.reverse = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n render() {\n return (\n <Host class={this.classString} reverse={this.reverse}>\n <content-grid-formatter type=\"none|flex\" flex-grow=\"true\" flex-shrink=\"true\" columns={this.columns}>\n <slot name=\"column1\"></slot>\n <slot name=\"column2\"></slot>\n </content-grid-formatter>\n </Host>\n );\n }\n}\n"],"mappings":"sIAAA,MAAMA,EAAuB,yZ,MCYhBC,EAAiB,M,sCASW,M,aAKb,M,kDAY1B,iBAAAC,GACEC,EAAoBC,aAAaC,KAAKC,SAASC,WAAUC,GAAaH,KAAKC,QAAUE,IACrFL,EAAoBC,aAAaC,KAAKI,SAASF,WAAUC,GAAaH,KAAKK,YAAcF,G,CAG3F,MAAAG,GACE,OACEC,EAACC,EAAI,CAACC,MAAOT,KAAKK,YAAaJ,QAASD,KAAKC,SAC3CM,EAAA,0BAAwBG,KAAK,YAAW,YAAW,OAAM,cAAa,OAAOC,QAASX,KAAKW,SACzFJ,EAAA,QAAMK,KAAK,YACXL,EAAA,QAAMK,KAAK,a"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as n,H as o,g as e}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as n,H as o,g as e}from"./p-288eace9.js";import{W as i}from"./p-cfb4593f.js";import"./p-b04fe808.js";import"./p-cd552ce2.js";const a="*{box-sizing:border-box}body.content-navigation-block-open{overflow:hidden}content-navigation-block[hamburger=fixed],content-navigation-block[hamburger=absolute],content-navigation-block[hamburger=static]{display:inline-block}content-navigation-block[hamburger=fixed][aria-expanded=false] [slot=closeButton],content-navigation-block[hamburger=absolute][aria-expanded=false] [slot=closeButton],content-navigation-block[hamburger=static][aria-expanded=false] [slot=closeButton]{display:none}content-navigation-block[hamburger=fixed] [slot=openButton],content-navigation-block[hamburger=fixed] [slot=closeButton],content-navigation-block[hamburger=absolute] [slot=openButton],content-navigation-block[hamburger=absolute] [slot=closeButton],content-navigation-block[hamburger=static] [slot=openButton],content-navigation-block[hamburger=static] [slot=closeButton]{cursor:pointer}content-navigation-block[hamburger=fixed] [slot=content],content-navigation-block[hamburger=absolute] [slot=content],content-navigation-block[hamburger=static] [slot=content]{display:none;background:white}content-navigation-block[hamburger=fixed] [slot=content][hidden=false],content-navigation-block[hamburger=absolute] [slot=content][hidden=false],content-navigation-block[hamburger=static] [slot=content][hidden=false]{display:block}content-navigation-block[hamburger=fixed] [slot=content]{position:fixed;left:0;top:0;width:100vw;height:100%;z-index:100}content-navigation-block[hamburger=absolute] [slot=content]{position:absolute;z-index:100}content-navigation-block[hamburger=static] [slot=content]{position:static}content-navigation-block[hamburger=none]{display:block}content-navigation-block[hamburger=none] [slot=openButton],content-navigation-block[hamburger=none] [slot=closeButton]{display:none}";const s=class{constructor(n){t(this,n);this.hamburger="fixed|none";this.classes=undefined;this.classString=undefined;this.ariaExpanded="false";this.bodyToggle=false}componentWillLoad(){i.registerProp(this.hamburger).subscribe((t=>{this.hamburger=t;this.bodyToggle=this.hamburger==="fixed";document.body.classList.remove("content-navigation-block-open")}));i.registerProp(this.classes).subscribe((t=>{this.classString=t}))}componentDidLoad(){let t=this.hostElement.querySelector('[slot="openButton"]');let n=this.hostElement.querySelector('[slot="closeButton"]');let o=this.hostElement.querySelector('[slot="content"]');if(t){t.onclick=()=>{this.ariaExpanded=this.ariaExpanded==="true"?"false":"true";o.setAttribute("hidden",this.ariaExpanded==="false"?"true":"false");if(this.ariaExpanded==="false"){document.body.classList.remove("content-navigation-block-open")}else if(this.bodyToggle){document.body.classList.add("content-navigation-block-open")}setTimeout((()=>n.focus()),1)}}if(n){n.onclick=()=>{this.ariaExpanded="false";o.setAttribute("hidden","true");document.body.classList.remove("content-navigation-block-open");setTimeout((()=>t.focus()),1)}}}render(){return n(o,{class:this.classString,"aria-expanded":this.ariaExpanded},n("slot",{name:"openButton"}),n("slot",{name:"closeButton"}),n("div",{class:"content-navigation__menu"},n("slot",{name:"content"}),n("slot",null)))}get hostElement(){return e(this)}};s.style=a;export{s as content_navigation_block};
|
|
2
|
+
//# sourceMappingURL=p-6a177aef.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["contentNavigationBlockCss","ContentNavigationBlock","componentWillLoad","WindowResizeService","registerProp","this","hamburger","subscribe","newValue","bodyToggle","document","body","classList","remove","classes","classString","componentDidLoad","openButton","hostElement","querySelector","closeButton","content","onclick","ariaExpanded","setAttribute","add","setTimeout","focus","render","h","Host","class","name"],"sources":["src/components/content-navigation-block/content-navigation-block.scss?tag=content-navigation-block","src/components/content-navigation-block/content-navigation-block.tsx"],"sourcesContent":["body.content-navigation-block-open {\n overflow: hidden;\n}\ncontent-navigation-block {\n &[hamburger=\"fixed\"],\n &[hamburger=\"absolute\"],\n &[hamburger=\"static\"] {\n display: inline-block;\n &[aria-expanded=\"false\"] {\n [slot=\"closeButton\"] {\n display: none;\n }\n }\n [slot=\"openButton\"],\n [slot=\"closeButton\"] {\n cursor: pointer;\n }\n \n [slot=\"content\"] {\n display: none;\n background: white;\n &[hidden=\"false\"] {\n display: block;\n }\n }\n }\n\n &[hamburger=\"fixed\"] {\n [slot=\"content\"] {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100%;\n z-index: 100;\n }\n }\n &[hamburger=\"absolute\"] {\n [slot=\"content\"] {\n position: absolute;\n z-index: 100;\n }\n }\n &[hamburger=\"static\"] {\n [slot=\"content\"] {\n position: static;\n }\n }\n \n &[hamburger=\"none\"] {\n display: block;\n [slot=\"openButton\"],\n [slot=\"closeButton\"] {\n display: none;\n }\n }\n}","import { Component, Prop, Host, h, State, Element } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\n\n/**\n * @slot openButton - This slot will expand the navigation when clicked.\n * @slot closeButton - This slot will close the navigation when clicked.\n * @slot content - Default slot\n */\n@Component({\n tag: 'content-navigation-block',\n styleUrl: 'content-navigation-block.scss',\n shadow: false,\n})\nexport class ContentNavigationBlock {\n /**\n * @type Select\n * @responsive\n * @options fixed\n * @options absolute\n * @options static\n * @options none\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n hamburger: ResponsiveString = 'fixed|none';\n\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n @State() classString;\n @Element() hostElement: HTMLStencilElement;\n @State() ariaExpanded: string = 'false';\n @State() bodyToggle: boolean = false;\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.hamburger).subscribe(newValue => {\n this.hamburger = newValue as string;\n this.bodyToggle = this.hamburger === 'fixed';\n document.body.classList.remove('content-navigation-block-open');\n });\n WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string;\n });\n }\n\n componentDidLoad() {\n let openButton = this.hostElement.querySelector('[slot=\"openButton\"]') as HTMLElement;\n let closeButton = this.hostElement.querySelector('[slot=\"closeButton\"]') as HTMLElement;\n let content = this.hostElement.querySelector('[slot=\"content\"]') as HTMLElement;\n\n
|
|
1
|
+
{"version":3,"names":["contentNavigationBlockCss","ContentNavigationBlock","componentWillLoad","WindowResizeService","registerProp","this","hamburger","subscribe","newValue","bodyToggle","document","body","classList","remove","classes","classString","componentDidLoad","openButton","hostElement","querySelector","closeButton","content","onclick","ariaExpanded","setAttribute","add","setTimeout","focus","render","h","Host","class","name"],"sources":["src/components/content-navigation-block/content-navigation-block.scss?tag=content-navigation-block","src/components/content-navigation-block/content-navigation-block.tsx"],"sourcesContent":["body.content-navigation-block-open {\n overflow: hidden;\n}\ncontent-navigation-block {\n &[hamburger=\"fixed\"],\n &[hamburger=\"absolute\"],\n &[hamburger=\"static\"] {\n display: inline-block;\n &[aria-expanded=\"false\"] {\n [slot=\"closeButton\"] {\n display: none;\n }\n }\n [slot=\"openButton\"],\n [slot=\"closeButton\"] {\n cursor: pointer;\n }\n \n [slot=\"content\"] {\n display: none;\n background: white;\n &[hidden=\"false\"] {\n display: block;\n }\n }\n }\n\n &[hamburger=\"fixed\"] {\n [slot=\"content\"] {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100%;\n z-index: 100;\n }\n }\n &[hamburger=\"absolute\"] {\n [slot=\"content\"] {\n position: absolute;\n z-index: 100;\n }\n }\n &[hamburger=\"static\"] {\n [slot=\"content\"] {\n position: static;\n }\n }\n \n &[hamburger=\"none\"] {\n display: block;\n [slot=\"openButton\"],\n [slot=\"closeButton\"] {\n display: none;\n }\n }\n}","import { Component, Prop, Host, h, State, Element } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\n\n/**\n * @slot openButton - This slot will expand the navigation when clicked.\n * @slot closeButton - This slot will close the navigation when clicked.\n * @slot content - Default slot\n */\n@Component({\n tag: 'content-navigation-block',\n styleUrl: 'content-navigation-block.scss',\n shadow: false,\n})\nexport class ContentNavigationBlock {\n /**\n * @type Select\n * @responsive\n * @options fixed\n * @options absolute\n * @options static\n * @options none\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n hamburger: ResponsiveString = 'fixed|none';\n\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n @State() classString;\n @Element() hostElement: HTMLStencilElement;\n @State() ariaExpanded: string = 'false';\n @State() bodyToggle: boolean = false;\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.hamburger).subscribe(newValue => {\n this.hamburger = newValue as string;\n this.bodyToggle = this.hamburger === 'fixed';\n document.body.classList.remove('content-navigation-block-open');\n });\n WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string;\n });\n }\n\n componentDidLoad() {\n let openButton = this.hostElement.querySelector('[slot=\"openButton\"]') as HTMLElement;\n let closeButton = this.hostElement.querySelector('[slot=\"closeButton\"]') as HTMLElement;\n let content = this.hostElement.querySelector('[slot=\"content\"]') as HTMLElement;\n if (openButton) {\n openButton.onclick = () => {\n this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';\n content.setAttribute('hidden', this.ariaExpanded === 'false' ? 'true' : 'false');\n if (this.ariaExpanded === 'false') {\n document.body.classList.remove('content-navigation-block-open');\n } else if (this.bodyToggle) {\n document.body.classList.add('content-navigation-block-open');\n }\n setTimeout(() => closeButton.focus(), 1);\n };\n }\n if (closeButton) {\n closeButton.onclick = () => {\n this.ariaExpanded = 'false';\n content.setAttribute('hidden', 'true');\n document.body.classList.remove('content-navigation-block-open');\n setTimeout(() => openButton.focus(), 1);\n };\n }\n }\n\n render() {\n return (\n <Host class={this.classString} aria-expanded={this.ariaExpanded}>\n <slot name=\"openButton\"></slot>\n <slot name=\"closeButton\"></slot>\n <div class=\"content-navigation__menu\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6IAAA,MAAMA,EAA4B,0vD,MCerBC,EAAsB,M,wCAaH,a,oEAaE,Q,gBACD,K,CAE/B,iBAAAC,GACEC,EAAoBC,aAAaC,KAAKC,WAAWC,WAAUC,IACzDH,KAAKC,UAAYE,EACjBH,KAAKI,WAAaJ,KAAKC,YAAc,QACrCI,SAASC,KAAKC,UAAUC,OAAO,gCAAgC,IAEjEV,EAAoBC,aAAaC,KAAKS,SAASP,WAAUC,IACvDH,KAAKU,YAAcP,CAAkB,G,CAIzC,gBAAAQ,GACE,IAAIC,EAAaZ,KAAKa,YAAYC,cAAc,uBAChD,IAAIC,EAAcf,KAAKa,YAAYC,cAAc,wBACjD,IAAIE,EAAUhB,KAAKa,YAAYC,cAAc,oBAC7C,GAAIF,EAAY,CACdA,EAAWK,QAAU,KACnBjB,KAAKkB,aAAelB,KAAKkB,eAAiB,OAAS,QAAU,OAC7DF,EAAQG,aAAa,SAAUnB,KAAKkB,eAAiB,QAAU,OAAS,SACxE,GAAIlB,KAAKkB,eAAiB,QAAS,CACjCb,SAASC,KAAKC,UAAUC,OAAO,gC,MAC1B,GAAIR,KAAKI,WAAY,CAC1BC,SAASC,KAAKC,UAAUa,IAAI,gC,CAE9BC,YAAW,IAAMN,EAAYO,SAAS,EAAE,C,CAG5C,GAAIP,EAAa,CACfA,EAAYE,QAAU,KACpBjB,KAAKkB,aAAe,QACpBF,EAAQG,aAAa,SAAU,QAC/Bd,SAASC,KAAKC,UAAUC,OAAO,iCAC/Ba,YAAW,IAAMT,EAAWU,SAAS,EAAE,C,EAK7C,MAAAC,GACE,OACEC,EAACC,EAAI,CAACC,MAAO1B,KAAKU,YAAW,gBAAiBV,KAAKkB,cACjDM,EAAA,QAAMG,KAAK,eACXH,EAAA,QAAMG,KAAK,gBACXH,EAAA,OAAKE,MAAM,4BACTF,EAAA,QAAMG,KAAK,YACXH,EAAA,c"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as t,H as n,g as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as t,H as n,g as r}from"./p-288eace9.js";import{W as a}from"./p-cfb4593f.js";import"./p-b04fe808.js";import"./p-cd552ce2.js";class o{constructor(e){var t=e.querySelectorAll('[role="tablist"]')[0];var n;var r;a();function a(){n=e.querySelectorAll('[role="tab"]');r=e.querySelectorAll('[role="tabpanel"]')}var o={end:35,home:36,left:37,up:38,right:39,down:40,delete:46,enter:13,space:32};var i={37:-1,38:-1,39:1,40:1};for(var s=0;s<n.length;++s){c(s)}function c(e){n[e].addEventListener("click",l);n[e].addEventListener("keydown",f);n[e].addEventListener("keyup",d);n[e].index=e}function l(e){let t=e.target.closest("button");e.preventDefault();p(t,false)}function f(e){var t=e.keyCode;switch(t){case o.end:e.preventDefault();m();break;case o.home:e.preventDefault();h();break;case o.up:case o.down:u(e);break}}function d(e){var t=e.keyCode;switch(t){case o.left:case o.right:u(e);break;case o.delete:k(e);break;case o.enter:case o.space:e.preventDefault();p(e.target);break}}function u(e){var n=e.keyCode;var r=t.getAttribute("aria-orientation")=="vertical";var a=false;if(r){if(n===o.up||n===o.down){e.preventDefault();a=true}}else{if(n===o.left||n===o.right){a=true}}if(a){b(e)}}function b(e){var t=e.keyCode;if(i[t]){var r=e.target;if(r.index!==undefined){if(n[r.index+i[t]]){n[r.index+i[t]].focus()}else if(t===o.left||t===o.up){m()}else if(t===o.right||t==o.down){h()}}}}function p(e,t){t=t||true;v();e.removeAttribute("tabindex");e.setAttribute("aria-selected","true");var n=e.getAttribute("aria-controls");document.getElementById(n).removeAttribute("hidden");if(t){e.focus()}}function v(){for(var e=0;e<n.length;e++){n[e].setAttribute("tabindex","-1");n[e].setAttribute("aria-selected","false")}for(var t=0;t<r.length;t++){r[t].setAttribute("hidden","hidden")}}function h(){n[0].focus()}function m(){n[n.length-1].focus()}function k(e){var t=e.target;if(t.getAttribute("data-deletable")!==null){x(e);a();if(t.index-1<0){p(n[0])}else{p(n[t.index-1])}}}function x(e){var t=e.target;var n=document.getElementById(t.getAttribute("aria-controls"));t.parentElement.removeChild(t);n.parentElement.removeChild(n)}}}const i="*{box-sizing:border-box}content-tabs{display:block}content-tabs button[role=tab]{padding:0;border:none;font:inherit;color:inherit;background-color:inherit;cursor:pointer;border-bottom:1px solid transparent}content-tabs button[role=tab][aria-selected=true]{border-bottom:1px solid black}";const s=class{constructor(t){e(this,t);this.classes=undefined;this.classString=undefined}componentWillLoad(){a.registerProp(this.classes).subscribe((e=>{this.classString=e}))}componentDidLoad(){new o(this.element)}render(){return t(n,{class:this.classString},t("slot",{name:"content"}),t("slot",null))}get element(){return r(this)}};s.style=i;export{s as content_tabs};
|
|
2
|
+
//# sourceMappingURL=p-8cc22c1e.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=["mobile","tablet-portrait","tablet-landscape","tablet-pro","desktop-large","desktop-wide"];const t=["Mobile","Tablet (Portrait)","Tablet (Landscape)","iPad Pro","Desktop Large","Desktop Wide"];const r=[0,768,1024,1366,1440,1920];function n(){return r}function a(e,t){let r=e.querySelector(`link[href="${t}"]`);if(!r){r=e.createElement("link");r.setAttribute("rel","stylesheet");r.setAttribute("href",t);e.head.prepend(r)}}function l(t,r){let n=-1;let a="";r.split("|").forEach((r=>{n++;if(!r||r==="false"){return false}a+=` ${t}-${e[n]}-${r}`}));return a}function i(e){if(!e){return[]}let t=[];let n=e.split("|");let a=n[0];r.forEach(((e,r)=>{let l=n[r];if(l){a=l}t.push(l?l:a)}));return t}function o(){let e=0;let t=window.innerWidth;r.some((n=>{let a=n>t;if(!a){e=r.indexOf(n)}return a}));return e}function s(e){if(!e){return""}let t=o();let r=i(e.toString());let n;for(var a=t;a>=0;a--){if(r[a]){n=r[a];a=-1}}return n}function u(e,t){let r=i(t.toString());return r[e].trim()}function f(e){let t=s(e).trim();if(t.includes("hydrated")){return t.trim()}if(t){return t.trim()+" hydrated"}return"hydrated"}function d(e){let t="";for(var r in e){if(e[r].length>0&&!["px","%"].includes(e[r])){t+=`${r}: ${e[r]};`}}return t}const
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
const e=["mobile","tablet-portrait","tablet-landscape","tablet-pro","desktop-large","desktop-wide"];const t=["Mobile","Tablet (Portrait)","Tablet (Landscape)","iPad Pro","Desktop Large","Desktop Wide"];const r=[0,768,1024,1366,1440,1920];function n(){return r}function a(e,t){let r=e.querySelector(`link[href="${t}"]`);if(!r){r=e.createElement("link");r.setAttribute("rel","stylesheet");r.setAttribute("href",t);e.head.prepend(r)}}function l(t,r){let n=-1;let a="";r.split("|").forEach((r=>{n++;if(!r||r==="false"){return false}a+=` ${t}-${e[n]}-${r}`}));return a}function i(e){if(!e){return[]}let t=[];let n=e.split("|");let a=n[0];r.forEach(((e,r)=>{let l=n[r];if(l){a=l}t.push(l?l:a)}));return t}function o(){let e=0;let t=window.innerWidth;r.some((n=>{let a=n>t;if(!a){e=r.indexOf(n)}return a}));return e}function s(e){if(!e){return""}let t=o();let r=i(e.toString());let n;for(var a=t;a>=0;a--){if(r[a]){n=r[a];a=-1}}return n}function u(e,t){let r=i(t.toString());return r[e].trim()}function f(e){let t=s(e).trim();if(t.includes("hydrated")){return t.trim()}if(t){return t.trim()+" hydrated"}return"hydrated"}function d(e){let t="";for(var r in e){if(e[r].length>0&&!["px","%"].includes(e[r])){t+=`${r}: ${e[r]};`}}return t}const p=Object.freeze({__proto__:null,breakpoints:e,breakpointLabels:t,breakpointValues:r,getBreakpointValues:n,insertCssIntoHead:a,generateResponsiveClass:l,generateResponsiveValues:i,getCurrentBreakpointIndex:o,getCurrentValue:s,getValueAtIndex:u,getHydratedClassString:f,objectToCssString:d});export{o as a,s as g,p as u};
|
|
2
|
+
//# sourceMappingURL=p-b04fe808.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["breakpoints","breakpointLabels","breakpointValues","getBreakpointValues","insertCssIntoHead","document","fontCssUrl","element","querySelector","createElement","setAttribute","head","prepend","generateResponsiveClass","classPrefix","responsiveValue","index","classString","split","forEach","value","generateResponsiveValues","responseArray","splitResponsiveValues","lastGoodValue","_value","thisBreakpointValue","push","getCurrentBreakpointIndex","activeBreakpointIndex","windowWidth","window","innerWidth","some","width","condition","indexOf","getCurrentValue","currentBreakpoint","responsiveValues","toString","returnValue","i","getValueAtIndex","trim","getHydratedClassString","cleanedString","includes","objectToCssString","object","string","key","length"],"sources":["src/utils/utils.ts"],"sourcesContent":["import { ResponsiveString } from \"../typings\";\n\nexport const breakpoints = ['mobile', 'tablet-portrait', 'tablet-landscape', 'tablet-pro', 'desktop-large', 'desktop-wide'];\nexport const breakpointLabels = ['Mobile', 'Tablet (Portrait)', 'Tablet (Landscape)', 'iPad Pro', 'Desktop Large', 'Desktop Wide'];\nexport const breakpointValues = [0,768,1024,1366,1440,1920];\n\nexport function getBreakpointValues() {\n return breakpointValues;\n}\nexport function insertCssIntoHead(document: Document, fontCssUrl: string) {\n let element = document.querySelector(`link[href=\"${fontCssUrl}\"]`);\n // Only inject the element if it's not yet present\n if (!element) {\n element = document.createElement('link');\n element.setAttribute('rel', 'stylesheet');\n element.setAttribute('href', fontCssUrl);\n document.head.prepend(element);\n }\n}\n\nexport function generateResponsiveClass(classPrefix: string, responsiveValue: string) {\n let index = -1;\n let classString = '';\n responsiveValue.split('|').forEach(value => {\n index++;\n if (!value || value === 'false') {\n return false;\n }\n classString += ` ${classPrefix}-${breakpoints[index]}-${value}`\n });\n return classString;\n}\n\n// Fills in default value if none exists for a breakpoint\nexport function generateResponsiveValues(responsiveValue: string): string[] {\n if (!responsiveValue) {\n return [];\n }\n let responseArray = [];\n let splitResponsiveValues = responsiveValue.split('|');\n let lastGoodValue = splitResponsiveValues[0];\n breakpointValues.forEach((_value, index) => {\n let thisBreakpointValue = splitResponsiveValues[index];\n if (thisBreakpointValue) {\n lastGoodValue = thisBreakpointValue;\n }\n responseArray.push(thisBreakpointValue ? thisBreakpointValue : lastGoodValue);\n });\n return responseArray;\n}\n\nexport function getCurrentBreakpointIndex(): number {\n let activeBreakpointIndex: number = 0;\n let windowWidth = window.innerWidth;\n breakpointValues.some((width) => {\n // The first time this is true will end the loop\n let condition = width > windowWidth;\n if (!condition) {\n activeBreakpointIndex = breakpointValues.indexOf(width);\n }\n return condition;\n });\n return activeBreakpointIndex;\n}\n\nexport function getCurrentValue(responsiveValue: string|boolean): string {\n if (!responsiveValue) {\n return '';\n }\n let currentBreakpoint = getCurrentBreakpointIndex();\n let responsiveValues = generateResponsiveValues(responsiveValue.toString());\n let returnValue: string;\n for (var i = currentBreakpoint; i >= 0; i--) {\n if (responsiveValues[i]) {\n returnValue = responsiveValues[i];\n i = -1;\n }\n }\n return returnValue;\n}\n\nexport function getValueAtIndex(index: number, responsiveValue: ResponsiveString): string {\n let responsiveValues = generateResponsiveValues(responsiveValue.toString());\n return responsiveValues[index].trim();\n}\n\nexport function getHydratedClassString(classString: string): string {\n let cleanedString = getCurrentValue(classString).trim();\n if (cleanedString.includes('hydrated')) {\n return cleanedString.trim();\n }\n if (cleanedString) {\n return cleanedString.trim() + ' hydrated';\n }\n return 'hydrated';\n}\n\nexport function objectToCssString(object: object): string {\n let string = '';\n for (var key in object) {\n if (object[key].length > 0 && !['px', '%'].includes(object[key])) {\n string += `${key}: ${object[key]};`;\n }\n }\n return string;\n}"],"mappings":"AAEO,MAAMA,EAAc,CAAC,SAAU,kBAAmB,mBAAoB,aAAc,gBAAiB,gBACrG,MAAMC,EAAmB,CAAC,SAAU,oBAAqB,qBAAsB,WAAY,gBAAiB,
|
|
1
|
+
{"version":3,"names":["breakpoints","breakpointLabels","breakpointValues","getBreakpointValues","insertCssIntoHead","document","fontCssUrl","element","querySelector","createElement","setAttribute","head","prepend","generateResponsiveClass","classPrefix","responsiveValue","index","classString","split","forEach","value","generateResponsiveValues","responseArray","splitResponsiveValues","lastGoodValue","_value","thisBreakpointValue","push","getCurrentBreakpointIndex","activeBreakpointIndex","windowWidth","window","innerWidth","some","width","condition","indexOf","getCurrentValue","currentBreakpoint","responsiveValues","toString","returnValue","i","getValueAtIndex","trim","getHydratedClassString","cleanedString","includes","objectToCssString","object","string","key","length"],"sources":["src/utils/utils.ts"],"sourcesContent":["import { ResponsiveString } from \"../typings\";\n\nexport const breakpoints = ['mobile', 'tablet-portrait', 'tablet-landscape', 'tablet-pro', 'desktop-large', 'desktop-wide'];\nexport const breakpointLabels = ['Mobile', 'Tablet (Portrait)', 'Tablet (Landscape)', 'iPad Pro', 'Desktop Large', 'Desktop Wide'];\nexport const breakpointValues = [0,768,1024,1366,1440,1920];\n\nexport function getBreakpointValues() {\n return breakpointValues;\n}\nexport function insertCssIntoHead(document: Document, fontCssUrl: string) {\n let element = document.querySelector(`link[href=\"${fontCssUrl}\"]`);\n // Only inject the element if it's not yet present\n if (!element) {\n element = document.createElement('link');\n element.setAttribute('rel', 'stylesheet');\n element.setAttribute('href', fontCssUrl);\n document.head.prepend(element);\n }\n}\n\nexport function generateResponsiveClass(classPrefix: string, responsiveValue: string) {\n let index = -1;\n let classString = '';\n responsiveValue.split('|').forEach(value => {\n index++;\n if (!value || value === 'false') {\n return false;\n }\n classString += ` ${classPrefix}-${breakpoints[index]}-${value}`\n });\n return classString;\n}\n\n// Fills in default value if none exists for a breakpoint\nexport function generateResponsiveValues(responsiveValue: string): string[] {\n if (!responsiveValue) {\n return [];\n }\n let responseArray = [];\n let splitResponsiveValues = responsiveValue.split('|');\n let lastGoodValue = splitResponsiveValues[0];\n breakpointValues.forEach((_value, index) => {\n let thisBreakpointValue = splitResponsiveValues[index];\n if (thisBreakpointValue) {\n lastGoodValue = thisBreakpointValue;\n }\n responseArray.push(thisBreakpointValue ? thisBreakpointValue : lastGoodValue);\n });\n return responseArray;\n}\n\nexport function getCurrentBreakpointIndex(): number {\n let activeBreakpointIndex: number = 0;\n let windowWidth = window.innerWidth;\n breakpointValues.some((width) => {\n // The first time this is true will end the loop\n let condition = width > windowWidth;\n if (!condition) {\n activeBreakpointIndex = breakpointValues.indexOf(width);\n }\n return condition;\n });\n return activeBreakpointIndex;\n}\n\nexport function getCurrentValue(responsiveValue: string|boolean): string {\n if (!responsiveValue) {\n return '';\n }\n let currentBreakpoint = getCurrentBreakpointIndex();\n let responsiveValues = generateResponsiveValues(responsiveValue.toString());\n let returnValue: string;\n for (var i = currentBreakpoint; i >= 0; i--) {\n if (responsiveValues[i]) {\n returnValue = responsiveValues[i];\n i = -1;\n }\n }\n return returnValue;\n}\n\nexport function getValueAtIndex(index: number, responsiveValue: ResponsiveString): string {\n let responsiveValues = generateResponsiveValues(responsiveValue.toString());\n return responsiveValues[index].trim();\n}\n\nexport function getHydratedClassString(classString: string): string {\n let cleanedString = getCurrentValue(classString).trim();\n if (cleanedString.includes('hydrated')) {\n return cleanedString.trim();\n }\n if (cleanedString) {\n return cleanedString.trim() + ' hydrated';\n }\n return 'hydrated';\n}\n\nexport function objectToCssString(object: object): string {\n let string = '';\n for (var key in object) {\n if (object[key].length > 0 && !['px', '%'].includes(object[key])) {\n string += `${key}: ${object[key]};`;\n }\n }\n return string;\n}"],"mappings":"AAEO,MAAMA,EAAc,CAAC,SAAU,kBAAmB,mBAAoB,aAAc,gBAAiB,gBACrG,MAAMC,EAAmB,CAAC,SAAU,oBAAqB,qBAAsB,WAAY,gBAAiB,gBAC5G,MAAMC,EAAmB,CAAC,EAAE,IAAI,KAAK,KAAK,KAAK,M,SAEtCC,IACd,OAAOD,CACT,C,SACgBE,EAAkBC,EAAoBC,GACpD,IAAIC,EAAUF,EAASG,cAAc,cAAcF,OAEnD,IAAKC,EAAS,CACZA,EAAUF,EAASI,cAAc,QACjCF,EAAQG,aAAa,MAAO,cAC5BH,EAAQG,aAAa,OAAQJ,GAC7BD,EAASM,KAAKC,QAAQL,E,CAE1B,C,SAEgBM,EAAwBC,EAAqBC,GAC3D,IAAIC,GAAS,EACb,IAAIC,EAAc,GAClBF,EAAgBG,MAAM,KAAKC,SAAQC,IACjCJ,IACA,IAAKI,GAASA,IAAU,QAAS,CAC/B,OAAO,K,CAETH,GAAe,IAAIH,KAAed,EAAYgB,MAAUI,GAAO,IAEjE,OAAOH,CACT,C,SAGgBI,EAAyBN,GACvC,IAAKA,EAAiB,CACpB,MAAO,E,CAET,IAAIO,EAAgB,GACpB,IAAIC,EAAwBR,EAAgBG,MAAM,KAClD,IAAIM,EAAgBD,EAAsB,GAC1CrB,EAAiBiB,SAAQ,CAACM,EAAQT,KAChC,IAAIU,EAAsBH,EAAsBP,GAChD,GAAIU,EAAqB,CACvBF,EAAgBE,C,CAElBJ,EAAcK,KAAKD,EAAsBA,EAAsBF,EAAc,IAE/E,OAAOF,CACT,C,SAEgBM,IACd,IAAIC,EAAgC,EACpC,IAAIC,EAAcC,OAAOC,WACzB9B,EAAiB+B,MAAMC,IAErB,IAAIC,EAAYD,EAAQJ,EACxB,IAAKK,EAAW,CACdN,EAAwB3B,EAAiBkC,QAAQF,E,CAEnD,OAAOC,CAAS,IAElB,OAAON,CACT,C,SAEgBQ,EAAgBtB,GAC9B,IAAKA,EAAiB,CACpB,MAAO,E,CAET,IAAIuB,EAAoBV,IACxB,IAAIW,EAAmBlB,EAAyBN,EAAgByB,YAChE,IAAIC,EACJ,IAAK,IAAIC,EAAIJ,EAAmBI,GAAK,EAAGA,IAAK,CAC3C,GAAIH,EAAiBG,GAAI,CACvBD,EAAcF,EAAiBG,GAC/BA,GAAK,C,EAGT,OAAOD,CACT,C,SAEgBE,EAAgB3B,EAAeD,GAC7C,IAAIwB,EAAmBlB,EAAyBN,EAAgByB,YAChE,OAAOD,EAAiBvB,GAAO4B,MACjC,C,SAEgBC,EAAuB5B,GACrC,IAAI6B,EAAgBT,EAAgBpB,GAAa2B,OACjD,GAAIE,EAAcC,SAAS,YAAa,CACtC,OAAOD,EAAcF,M,CAEvB,GAAIE,EAAe,CACjB,OAAOA,EAAcF,OAAS,W,CAEhC,MAAO,UACT,C,SAEgBI,EAAkBC,GAChC,IAAIC,EAAS,GACb,IAAK,IAAIC,KAAOF,EAAQ,CACtB,GAAIA,EAAOE,GAAKC,OAAS,IAAM,CAAC,KAAM,KAAKL,SAASE,EAAOE,IAAO,CAChED,GAAU,GAAGC,MAAQF,EAAOE,K,EAGhC,OAAOD,CACT,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{a as s,g as t}from"./p-b04fe808.js";import{B as e,O as r}from"./p-cd552ce2.js";class i{constructor(){this.currentBreakpoint=s();this.breakpointIndex$=new e(this.currentBreakpoint);const t=new ResizeObserver((t=>{if(this.timeoutHolder){clearTimeout(this.timeoutHolder)}let e=s();if(this.breakpointIndex$.value===e){return false}this.breakpointIndex$.next(e)}));t.observe(window.document.body)}registerProp(s){return new r((e=>{e.next(t(s));this.breakpointIndex$.subscribe((()=>{let r=t(s);e.next(r)}))}))}}const o=new i;export{o as W};
|
|
2
|
+
//# sourceMappingURL=p-cfb4593f.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-
|
|
2
|
-
import { W as WindowResizeService } from './window-resize-service-
|
|
3
|
-
import {
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-e848c048.js';
|
|
2
|
+
import { W as WindowResizeService } from './window-resize-service-f40ec51c.js';
|
|
3
|
+
import { g as getCurrentValue } from './utils-4f78228e.js';
|
|
4
4
|
import './BehaviorSubject-bc7e0e99.js';
|
|
5
5
|
|
|
6
6
|
const contentAccordionCss = "*{box-sizing:border-box}content-accordion{display:block}content-accordion>button{display:block;width:100%;padding:0;border:none;font:inherit;color:inherit;background-color:transparent;cursor:pointer}content-accordion[expanded]>.content-accordion__reveal{display:block}content-accordion>.content-accordion__reveal{display:none}";
|
|
@@ -9,10 +9,10 @@ const ContentAccordion = class {
|
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.revealElement = undefined;
|
|
12
|
-
this.open = 'false
|
|
12
|
+
this.open = 'false';
|
|
13
13
|
this.animationStart = 'animation-start';
|
|
14
14
|
this.animationEnd = 'animation-end';
|
|
15
|
-
this.animationTime =
|
|
15
|
+
this.animationTime = 0;
|
|
16
16
|
this.isOpen = false;
|
|
17
17
|
this.randomID = '';
|
|
18
18
|
this.classString = '';
|
|
@@ -46,8 +46,6 @@ const ContentAccordion = class {
|
|
|
46
46
|
else {
|
|
47
47
|
this.randomID = `${this.hostElement.tagName}_${Math.floor(Math.random() * document.querySelectorAll(this.hostElement.tagName).length)}`;
|
|
48
48
|
}
|
|
49
|
-
}
|
|
50
|
-
componentDidLoad() {
|
|
51
49
|
WindowResizeService.registerProp(this.open).subscribe(newValue => {
|
|
52
50
|
this.isOpen = newValue === 'true';
|
|
53
51
|
if (this.isOpen) {
|
|
@@ -93,21 +91,17 @@ const ContentButton = class {
|
|
|
93
91
|
});
|
|
94
92
|
}
|
|
95
93
|
onHandleClickEvent(ev) {
|
|
96
|
-
console.log(ev);
|
|
97
94
|
if (this.hasContentToActivate) {
|
|
98
|
-
console.log('this.hascontenttoactivate');
|
|
99
95
|
ev.preventDefault();
|
|
100
|
-
ev.stopPropagation();
|
|
96
|
+
// ev.stopPropagation();
|
|
101
97
|
this.activatedContent.dispatchEvent(new CustomEvent('contentBlockActivated', { detail: this.activatedContent }));
|
|
102
98
|
this.activatedContent.scrollIntoView({ behavior: 'smooth' });
|
|
103
99
|
}
|
|
104
100
|
else if (this.href && this.href.length > 1 && this.href.substring(0, 1) === '#') {
|
|
105
101
|
let element = document.getElementById(this.href.substring(1));
|
|
106
|
-
console.log(this.href.substring(1));
|
|
107
102
|
if (element) {
|
|
108
103
|
ev.preventDefault();
|
|
109
|
-
ev.stopPropagation();
|
|
110
|
-
console.log(element);
|
|
104
|
+
// ev.stopPropagation();
|
|
111
105
|
element.dispatchEvent(new CustomEvent('contentBlockActivated', { detail: element }));
|
|
112
106
|
// element.scrollIntoView({ behavior: 'smooth' });
|
|
113
107
|
}
|
|
@@ -120,7 +114,7 @@ const ContentButton = class {
|
|
|
120
114
|
};
|
|
121
115
|
ContentButton.style = contentButtonCss;
|
|
122
116
|
|
|
123
|
-
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)}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}";
|
|
117
|
+
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}";
|
|
124
118
|
|
|
125
119
|
const ContentGridFormatter = class {
|
|
126
120
|
constructor(hostRef) {
|
|
@@ -130,22 +124,23 @@ const ContentGridFormatter = class {
|
|
|
130
124
|
this.type = 'flex';
|
|
131
125
|
this.flexGrow = 'false';
|
|
132
126
|
this.flexShrink = 'false';
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
127
|
+
this.vertical = 'space-between';
|
|
128
|
+
this.horizontal = 'space-between';
|
|
135
129
|
this.columns = '1';
|
|
130
|
+
this.columnGap = '0';
|
|
136
131
|
this.activeClassString = undefined;
|
|
137
132
|
this.inlineStyle = {};
|
|
138
133
|
}
|
|
139
|
-
|
|
134
|
+
componentWillLoad() {
|
|
140
135
|
return Promise.allSettled([
|
|
141
136
|
WindowResizeService.registerProp(this.type).subscribe(newValue => (this.type = newValue)),
|
|
142
|
-
WindowResizeService.registerProp(this.
|
|
143
|
-
this.
|
|
144
|
-
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--align-items': this.
|
|
137
|
+
WindowResizeService.registerProp(this.vertical).subscribe(newValue => {
|
|
138
|
+
this.vertical = newValue;
|
|
139
|
+
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--align-items': this.vertical });
|
|
145
140
|
}),
|
|
146
|
-
WindowResizeService.registerProp(this.
|
|
147
|
-
this.
|
|
148
|
-
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--justify-content': this.
|
|
141
|
+
WindowResizeService.registerProp(this.horizontal).subscribe(newValue => {
|
|
142
|
+
this.horizontal = newValue;
|
|
143
|
+
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--justify-content': this.horizontal });
|
|
149
144
|
}),
|
|
150
145
|
WindowResizeService.registerProp(this.flexShrink).subscribe(newValue => (this.flexShrink = newValue)),
|
|
151
146
|
WindowResizeService.registerProp(this.flexGrow).subscribe(newValue => (this.flexGrow = newValue)),
|
|
@@ -153,6 +148,10 @@ const ContentGridFormatter = class {
|
|
|
153
148
|
this.columns = newValue;
|
|
154
149
|
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--columns': newValue });
|
|
155
150
|
}),
|
|
151
|
+
WindowResizeService.registerProp(this.columnGap).subscribe(newValue => {
|
|
152
|
+
this.columnGap = newValue;
|
|
153
|
+
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--column-gap': newValue });
|
|
154
|
+
}),
|
|
156
155
|
WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue)),
|
|
157
156
|
]);
|
|
158
157
|
}
|
|
@@ -162,7 +161,7 @@ const ContentGridFormatter = class {
|
|
|
162
161
|
};
|
|
163
162
|
ContentGridFormatter.style = contentGridFormatterCss;
|
|
164
163
|
|
|
165
|
-
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__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}";
|
|
164
|
+
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}";
|
|
166
165
|
|
|
167
166
|
const ContentHeroBlock = class {
|
|
168
167
|
constructor(hostRef) {
|
|
@@ -191,7 +190,7 @@ const ContentHeroBlock = class {
|
|
|
191
190
|
};
|
|
192
191
|
ContentHeroBlock.style = contentHeroBlockCss;
|
|
193
192
|
|
|
194
|
-
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 img,content-image picture,content-image video{
|
|
193
|
+
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}";
|
|
195
194
|
|
|
196
195
|
const ContentImage = class {
|
|
197
196
|
constructor(hostRef) {
|
|
@@ -203,6 +202,8 @@ const ContentImage = class {
|
|
|
203
202
|
this.alt = undefined;
|
|
204
203
|
this.width = '16';
|
|
205
204
|
this.height = '9';
|
|
205
|
+
this.aspectRatio = undefined;
|
|
206
|
+
this.type = 'image';
|
|
206
207
|
this.videoType = 'video/mp4';
|
|
207
208
|
this.showContent = 'false|true';
|
|
208
209
|
this.lazyLoadIsComplete = false;
|
|
@@ -211,6 +212,7 @@ const ContentImage = class {
|
|
|
211
212
|
this.classString = '';
|
|
212
213
|
this.inlineStyle = {};
|
|
213
214
|
this.hasMediaContent = false;
|
|
215
|
+
this.pictureImageSrc = undefined;
|
|
214
216
|
}
|
|
215
217
|
preloadImage(src) {
|
|
216
218
|
return new Promise(r => {
|
|
@@ -222,12 +224,8 @@ const ContentImage = class {
|
|
|
222
224
|
}
|
|
223
225
|
componentWillLoad() {
|
|
224
226
|
this.hasMediaContent = !!this.hostElement.querySelector('[slot="mediaContent"]');
|
|
225
|
-
WindowResizeService.registerProp(this.
|
|
226
|
-
this.
|
|
227
|
-
if (!this.lazyLoadIsComplete) {
|
|
228
|
-
this.lazyLoadIsComplete = true;
|
|
229
|
-
}
|
|
230
|
-
this.src = newValue;
|
|
227
|
+
WindowResizeService.registerProp(this.aspectRatio).subscribe(newValue => {
|
|
228
|
+
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--aspect-ratio': `${newValue}` });
|
|
231
229
|
});
|
|
232
230
|
WindowResizeService.registerProp(this.alt).subscribe(newValue => {
|
|
233
231
|
this.alt = newValue;
|
|
@@ -242,6 +240,23 @@ const ContentImage = class {
|
|
|
242
240
|
this.classString = `${newValue}`;
|
|
243
241
|
});
|
|
244
242
|
}
|
|
243
|
+
componentDidLoad() {
|
|
244
|
+
let observer = new IntersectionObserver(entries => {
|
|
245
|
+
entries.forEach(async (entry) => {
|
|
246
|
+
if (entry.isIntersecting) {
|
|
247
|
+
this.lazyLoadIsComplete = true;
|
|
248
|
+
this.pictureImageSrc = getCurrentValue(this.src);
|
|
249
|
+
this.showVideoAsGif = this.pictureImageSrc.indexOf('.mp4') >= 0 || getCurrentValue(this.type) === 'video';
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}, {
|
|
253
|
+
root: null,
|
|
254
|
+
// rootMargin: `${Math.max(100, window.innerHeight * 0.95)}px`,
|
|
255
|
+
rootMargin: `0px`,
|
|
256
|
+
threshold: 0.1,
|
|
257
|
+
});
|
|
258
|
+
observer.observe(this.hostElement);
|
|
259
|
+
}
|
|
245
260
|
watchLazyLoadIsComplete(newValue) {
|
|
246
261
|
if (newValue === true) {
|
|
247
262
|
this.activeLazyLoadClass = 'content-image-loaded';
|
|
@@ -256,19 +271,7 @@ const ContentImage = class {
|
|
|
256
271
|
}
|
|
257
272
|
}
|
|
258
273
|
render() {
|
|
259
|
-
|
|
260
|
-
let pictureImageSrc = '';
|
|
261
|
-
if (this.src) {
|
|
262
|
-
breakpointValues.forEach((_bp, index) => {
|
|
263
|
-
if (index === 0) {
|
|
264
|
-
pictureImageSrc = getValueAtIndex(0, this.src);
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
pictureSrcSet += `${getValueAtIndex(index, this.src)} ${breakpointValues[index]}w,`;
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
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("picture", null, h("source", { srcSet: pictureSrcSet }), h("img", { width: this.width, height: this.height, src: pictureImageSrc, alt: this.alt })))));
|
|
274
|
+
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.pictureImageSrc : null, type: this.videoType }))) : (h("img", { width: this.width, height: this.height, src: this.pictureImageSrc, alt: this.alt }))));
|
|
272
275
|
}
|
|
273
276
|
get hostElement() { return getElement(this); }
|
|
274
277
|
static get watchers() { return {
|
|
@@ -2246,7 +2249,7 @@ aria.replaceDialog = function (newDialogId, newFocusAfterClosed, newFocusFirst)
|
|
|
2246
2249
|
}; // end replaceDialog
|
|
2247
2250
|
window.aria = aria;
|
|
2248
2251
|
|
|
2249
|
-
const contentOverlayCss = "*{box-sizing:border-box}.content-block-overlay-container{position:relative;display:block;height:100%}content-overlay{display:
|
|
2252
|
+
const contentOverlayCss = "*{box-sizing:border-box}.content-block-overlay-container{position:relative;display:block;height:100%}content-overlay{display:none;position:relative;flex:0}content-overlay .content-overlay__content>*[slot=content]{height:100%;overflow:auto}content-overlay.content-overlay-active{display:block}content-overlay[vertical=left]{align-items:flex-start}content-overlay[vertical=center]{align-items:center}content-overlay[vertical=right]{align-items:flex-end}content-overlay[vertical=top]{justify-content:flex-start}content-overlay[vertical=center]{justify-content:center}content-overlay[vertical=bottom]{justify-content:flex-end}content-overlay .content-overlay-background{background:rgba(255, 255, 255, 0.8);bottom:0;display:none;top:0;z-index:100000;right:0;left:0}content-overlay .content-overlay-background.active{display:block}content-overlay .content-overlay__header{display:flex;align-items:center}content-overlay .content-overlay__close{order:2;margin-left:auto;cursor:pointer;z-index:1;appearance:none;background:none;border:none;min-width:16px}content-overlay.content-overlay--fullscreen .content-overlay-background{position:fixed}content-overlay.content-overlay--absolute{position:absolute;box-sizing:border-box;z-index:100000;height:100%;width:100%;top:0;left:0}content-overlay.content-overlay--absolute .content-overlay-background{position:absolute}content-overlay.content-overlay--absolute .content-overlay__content,content-overlay.content-overlay--fullscreen .content-overlay__content{flex:1;overflow:hidden}content-overlay [role=dialog]{display:flex;flex-direction:column;height:100%;justify-content:flex-start}content-overlay [role=dialog].hidden{display:none}body.has-dialog{overflow:hidden}";
|
|
2250
2253
|
|
|
2251
2254
|
const ContentOverlay = class {
|
|
2252
2255
|
constructor(hostRef) {
|
|
@@ -2256,30 +2259,41 @@ const ContentOverlay = class {
|
|
|
2256
2259
|
this.open = 'false';
|
|
2257
2260
|
this.fullScreen = 'true';
|
|
2258
2261
|
this.classes = undefined;
|
|
2259
|
-
this.
|
|
2260
|
-
this.
|
|
2262
|
+
this.horizontal = 'center';
|
|
2263
|
+
this.vertical = 'center';
|
|
2261
2264
|
this.closeTitle = 'Close Overlay';
|
|
2262
2265
|
this.isActive = false;
|
|
2263
2266
|
this.activeClass = '';
|
|
2264
2267
|
this.classString = '';
|
|
2265
2268
|
this.contentSlot = undefined;
|
|
2266
2269
|
this.isFullScreen = false;
|
|
2270
|
+
this.hasCloseButton = false;
|
|
2271
|
+
this.originalMarkup = undefined;
|
|
2267
2272
|
}
|
|
2268
2273
|
onContentBlockActivated(event) {
|
|
2269
2274
|
if (this.hostElement.getAttribute('id') === event.detail.getAttribute('id')) {
|
|
2270
2275
|
event.preventDefault();
|
|
2271
|
-
this.
|
|
2276
|
+
if (!this.isActive) {
|
|
2277
|
+
this.openOverlay();
|
|
2278
|
+
}
|
|
2279
|
+
else {
|
|
2280
|
+
this.closeOverlay();
|
|
2281
|
+
}
|
|
2272
2282
|
}
|
|
2273
2283
|
}
|
|
2274
2284
|
async openOverlay() {
|
|
2275
|
-
if (this.isActive) {
|
|
2276
|
-
|
|
2277
|
-
}
|
|
2285
|
+
// if (this.isActive) {
|
|
2286
|
+
// return false;
|
|
2287
|
+
// }
|
|
2278
2288
|
this.isActive = true;
|
|
2289
|
+
if (!this.originalMarkup) {
|
|
2290
|
+
this.originalMarkup = this.contentSlot.querySelector('[slot="content"]').innerHTML;
|
|
2291
|
+
}
|
|
2279
2292
|
if (this.target) {
|
|
2280
2293
|
let targetElement = document.getElementById(this.target);
|
|
2281
2294
|
if (targetElement) {
|
|
2282
2295
|
targetElement.classList.add('content-block-overlay-container');
|
|
2296
|
+
targetElement.appendChild(this.hostElement);
|
|
2283
2297
|
}
|
|
2284
2298
|
}
|
|
2285
2299
|
else if (this.isFullScreen) {
|
|
@@ -2288,6 +2302,7 @@ const ContentOverlay = class {
|
|
|
2288
2302
|
}
|
|
2289
2303
|
}
|
|
2290
2304
|
if (this.contentSlot) {
|
|
2305
|
+
this.contentSlot.innerHTML = this.originalMarkup;
|
|
2291
2306
|
this.setComputedActiveClass();
|
|
2292
2307
|
if (this.isFullScreen) {
|
|
2293
2308
|
this.focusTrap = createFocusTrap(this.hostElement, {
|
|
@@ -2302,6 +2317,7 @@ const ContentOverlay = class {
|
|
|
2302
2317
|
this.contentOverlayActivated.emit(this.hostElement);
|
|
2303
2318
|
}
|
|
2304
2319
|
async closeOverlay() {
|
|
2320
|
+
this.contentSlot.innerHTML = '';
|
|
2305
2321
|
this.isActive = false;
|
|
2306
2322
|
this.activeClass = '';
|
|
2307
2323
|
if (this.focusTrap) {
|
|
@@ -2324,11 +2340,10 @@ const ContentOverlay = class {
|
|
|
2324
2340
|
this.activeClass = `content-overlay ${this.isActive ? 'content-overlay-active' : 'content-overlay-inactive'} content-overlay--${positioningValue}`;
|
|
2325
2341
|
}
|
|
2326
2342
|
componentWillLoad() {
|
|
2327
|
-
this.contentSlot = this.hostElement.querySelector('[slot="content"]');
|
|
2328
2343
|
this.contentElement = this.hostElement.querySelector('.js-content-overlay-content');
|
|
2329
2344
|
WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = `${newValue}`));
|
|
2330
|
-
WindowResizeService.registerProp(this.
|
|
2331
|
-
WindowResizeService.registerProp(this.
|
|
2345
|
+
WindowResizeService.registerProp(this.horizontal).subscribe(newValue => this.hostElement.setAttribute('horizontal', newValue));
|
|
2346
|
+
WindowResizeService.registerProp(this.vertical).subscribe(newValue => this.hostElement.setAttribute('vertical', newValue));
|
|
2332
2347
|
WindowResizeService.registerProp(this.fullScreen).subscribe(newValue => {
|
|
2333
2348
|
if (!this.target)
|
|
2334
2349
|
this.isFullScreen = newValue === 'true';
|
|
@@ -2336,13 +2351,14 @@ const ContentOverlay = class {
|
|
|
2336
2351
|
WindowResizeService.registerProp(this.open).subscribe(newValue => {
|
|
2337
2352
|
this.hostElement.setAttribute('open', newValue);
|
|
2338
2353
|
});
|
|
2354
|
+
this.hasCloseButton = !!this.hostElement.querySelector('[slot="closeButton"]');
|
|
2339
2355
|
}
|
|
2340
2356
|
closeOverlayButtonClicked(event) {
|
|
2341
2357
|
event.preventDefault();
|
|
2342
2358
|
this.closeOverlay();
|
|
2343
2359
|
}
|
|
2344
2360
|
render() {
|
|
2345
|
-
return (h(Host, { class: `${this.activeClass} ${this.classString}` }, h("div", { class: "content-block-overlay-container" }, h("div", { class: `content-overlay-background ${this.isActive ? 'active' : ''}` }, h("div", { ref: element => (this.dialogElement = element), role: "dialog", "aria-modal": "true", class: this.isActive ? 'active' : 'hidden', "aria-expanded": this.isActive }, h("div", { class: "content-overlay__header" }, h("button", { onClick: e => this.closeOverlayButtonClicked(e), class: "content-overlay__close", title: this.closeTitle }, h("slot", { name: "closeButton" })), h("slot", { name: "header" })), h("div", { class: "
|
|
2361
|
+
return (h(Host, { class: `${this.activeClass} ${this.classString}` }, h("div", { class: "content-block-overlay-container" }, h("div", { class: `content-overlay-background ${this.isActive ? 'active' : ''}` }, h("div", { ref: element => (this.dialogElement = element), role: "dialog", "aria-modal": "true", class: this.isActive ? 'active' : 'hidden', "aria-expanded": this.isActive }, h("div", { class: "content-overlay__header" }, h("button", { onClick: e => this.closeOverlayButtonClicked(e), class: "content-overlay__close", title: this.closeTitle }, !this.hasCloseButton && (h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", width: "16", height: "16", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18 18 6M6 6l12 12" }))), h("slot", { name: "closeButton" })), h("slot", { name: "header" })), h("div", { class: "content-overlay__content", ref: (el) => (this.contentSlot = el) }, h("slot", { name: "content" })))))));
|
|
2346
2362
|
}
|
|
2347
2363
|
componentDidRender() {
|
|
2348
2364
|
if (this.open === 'true') {
|
|
@@ -2361,7 +2377,7 @@ const ContentOverlay = class {
|
|
|
2361
2377
|
};
|
|
2362
2378
|
ContentOverlay.style = contentOverlayCss;
|
|
2363
2379
|
|
|
2364
|
-
const contentSpacerCss = "*{box-sizing:border-box}content-spacer{display:block;width:100%;height:auto}content-spacer[full-height=true]{height:100%}content-spacer[text-align=left]{text-align:left}content-spacer[text-align=center]{text-align:center}content-spacer[text-align=right]{text-align:right}content-spacer[horizontal
|
|
2380
|
+
const contentSpacerCss = "*{box-sizing:border-box}content-spacer{display:block;width:100%;height:auto}content-spacer[full-height=true]{height:100%}content-spacer[text-align=left]{text-align:left}content-spacer[text-align=center]{text-align:center}content-spacer[text-align=right]{text-align:right}content-spacer[horizontal=left]{margin-left:0;margin-right:auto}content-spacer[horizontal=center]{margin-left:auto;margin-right:auto}content-spacer[horizontal=right]{margin-left:auto;margin-right:0}content-spacer[vertical]{display:flex;flex-direction:column}content-spacer[vertical=top]{justify-content:flex-start}content-spacer[vertical=center]{justify-content:center}content-spacer[vertical=bottom]{justify-content:flex-end}";
|
|
2365
2381
|
|
|
2366
2382
|
const ContentSpacingWrapper = class {
|
|
2367
2383
|
constructor(hostRef) {
|
|
@@ -2371,7 +2387,8 @@ const ContentSpacingWrapper = class {
|
|
|
2371
2387
|
this.maxWidth = '100';
|
|
2372
2388
|
this.fullHeight = 'false';
|
|
2373
2389
|
this.textAlign = 'default';
|
|
2374
|
-
this.
|
|
2390
|
+
this.horizontal = 'default';
|
|
2391
|
+
this.vertical = 'top';
|
|
2375
2392
|
this.topOffset = '0';
|
|
2376
2393
|
this.bottomOffset = '0';
|
|
2377
2394
|
this.leftOffset = '0';
|
|
@@ -2381,7 +2398,8 @@ const ContentSpacingWrapper = class {
|
|
|
2381
2398
|
componentWillLoad() {
|
|
2382
2399
|
WindowResizeService.registerProp(this.fullHeight).subscribe(newValue => (this.fullHeight = newValue));
|
|
2383
2400
|
WindowResizeService.registerProp(this.textAlign).subscribe(newValue => (this.textAlign = newValue));
|
|
2384
|
-
WindowResizeService.registerProp(this.
|
|
2401
|
+
WindowResizeService.registerProp(this.horizontal).subscribe(newValue => (this.horizontal = newValue));
|
|
2402
|
+
WindowResizeService.registerProp(this.vertical).subscribe(newValue => (this.vertical = newValue));
|
|
2385
2403
|
WindowResizeService.registerProp(this.maxWidth).subscribe(newValue => {
|
|
2386
2404
|
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { 'max-width': isNaN(newValue) ? newValue : newValue + '%' });
|
|
2387
2405
|
});
|
|
@@ -2405,7 +2423,7 @@ const ContentSpacingWrapper = class {
|
|
|
2405
2423
|
};
|
|
2406
2424
|
ContentSpacingWrapper.style = contentSpacerCss;
|
|
2407
2425
|
|
|
2408
|
-
const contentTextBlockCss = "*{box-sizing:border-box}content-text-block{display:block;width:100%;text-align:initial}content-text-block[full-height=true]{height:100%}content-text-block>*[slot=footer]{margin-top:auto;margin-bottom:0;width:100%;padding-top:1rem;height:auto}content-text-block[vertical
|
|
2426
|
+
const contentTextBlockCss = "*{box-sizing:border-box}content-text-block{display:block;width:100%;text-align:initial}content-text-block[full-height=true]{height:100%}content-text-block>*[slot=footer]{margin-top:auto;margin-bottom:0;width:100%;padding-top:1rem;height:auto}content-text-block[vertical=bottom]>[slot=footer]{position:static;height:auto}content-text-block[vertical]{display:flex;flex-direction:column}content-text-block[vertical=top]{justify-content:flex-start}content-text-block[vertical=center]{justify-content:center}content-text-block[vertical=center][footer=true] .content-text-block__content{margin-top:auto;margin-bottom:0}content-text-block[vertical=bottom]{justify-content:flex-end}content-text-block[vertical=bottom][footer=true] .content-text-block__content{margin-top:auto;margin-bottom:0}content-text-block[vertical=bottom][footer=true]>[slot=footer]{margin-top:0}content-text-block[text-align=left]{text-align:left}content-text-block[text-align=center]{text-align:center}content-text-block[text-align=right]{text-align:right}";
|
|
2409
2427
|
|
|
2410
2428
|
const ContentTextBlock = class {
|
|
2411
2429
|
constructor(hostRef) {
|
|
@@ -2413,7 +2431,7 @@ const ContentTextBlock = class {
|
|
|
2413
2431
|
this.classes = undefined;
|
|
2414
2432
|
this.classString = undefined;
|
|
2415
2433
|
this.minHeight = undefined;
|
|
2416
|
-
this.
|
|
2434
|
+
this.vertical = 'top';
|
|
2417
2435
|
this.fullHeight = 'false';
|
|
2418
2436
|
this.textAlign = 'default';
|
|
2419
2437
|
this.inlineStyle = {};
|
|
@@ -2426,7 +2444,7 @@ const ContentTextBlock = class {
|
|
|
2426
2444
|
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { 'min-height': isNaN(newValue) ? newValue : newValue + 'px' });
|
|
2427
2445
|
});
|
|
2428
2446
|
WindowResizeService.registerProp(this.textAlign).subscribe(newValue => this.hostElement.setAttribute('text-align', newValue));
|
|
2429
|
-
WindowResizeService.registerProp(this.
|
|
2447
|
+
WindowResizeService.registerProp(this.vertical).subscribe(newValue => this.hostElement.setAttribute('vertical', newValue));
|
|
2430
2448
|
WindowResizeService.registerProp(this.fullHeight).subscribe(newValue => {
|
|
2431
2449
|
this.hostElement.setAttribute('full-height', newValue);
|
|
2432
2450
|
});
|