@content-blocks/js 0.7.2 → 0.7.4
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 +36 -18
- package/dist/cjs/content-accordion_11.cjs.entry.js.map +1 -1
- package/dist/cjs/content-blocks.cjs.js +1 -1
- package/dist/cjs/content-navigation-block.cjs.entry.js +18 -12
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -1
- package/dist/cjs/content-split-block.cjs.entry.js +2 -2
- package/dist/cjs/content-tabs.cjs.entry.js +2 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-db61cd70.js → utils-f8ccab0a.js} +35 -29
- package/dist/cjs/utils-f8ccab0a.js.map +1 -0
- package/dist/cjs/{window-resize-service-ac5c2012.js → window-resize-service-bc8cf256.js} +2 -2
- package/dist/cjs/{window-resize-service-ac5c2012.js.map → window-resize-service-bc8cf256.js.map} +1 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.js +1 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +1 -1
- package/dist/collection/blocks/content-tout-block/content-tout-block.css +1 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.css +1 -2
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +15 -9
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -1
- package/dist/collection/components/content-overlay/content-overlay.css +12 -4
- package/dist/collection/components/content-overlay/content-overlay.js +33 -7
- package/dist/collection/components/content-overlay/content-overlay.js.map +1 -1
- package/dist/collection/elements/content-button/content-button.js +9 -4
- package/dist/collection/elements/content-button/content-button.js.map +1 -1
- package/dist/collection/elements/content-video/content-video.css +1 -19
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +3 -3
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +0 -1
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -1
- package/dist/collection/formatters/content-spacer/content-spacer.css +9 -6
- package/dist/collection/utils/utils.js +31 -25
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/collection/utils/utils.spec.js +28 -3
- package/dist/collection/utils/utils.spec.js.map +1 -1
- package/dist/components/content-button.js +9 -4
- package/dist/components/content-button.js.map +1 -1
- package/dist/components/content-grid-formatter2.js +1 -2
- package/dist/components/content-grid-formatter2.js.map +1 -1
- package/dist/components/content-hero-block.js +1 -1
- package/dist/components/content-hero-block.js.map +1 -1
- package/dist/components/content-navigation-block.js +16 -10
- package/dist/components/content-navigation-block.js.map +1 -1
- package/dist/components/content-overlay.js +22 -8
- package/dist/components/content-overlay.js.map +1 -1
- package/dist/components/content-spacer.js +1 -1
- package/dist/components/content-spacer.js.map +1 -1
- package/dist/components/content-tout-block.js +1 -1
- 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 +34 -28
- 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-4bfbd7ef.entry.js → p-1b448306.entry.js} +2 -2
- package/dist/content-blocks/p-1c7435ea.entry.js +2 -0
- package/dist/content-blocks/p-1c7435ea.entry.js.map +1 -0
- package/dist/content-blocks/{p-8cc22c1e.entry.js → p-3bd97960.entry.js} +2 -2
- package/dist/content-blocks/{p-cfb4593f.js → p-3fe594af.js} +2 -2
- package/dist/content-blocks/p-b796271c.entry.js +2 -0
- package/dist/content-blocks/p-b796271c.entry.js.map +1 -0
- package/dist/content-blocks/p-cc7397cf.js +2 -0
- package/dist/content-blocks/p-cc7397cf.js.map +1 -0
- package/dist/esm/content-accordion_11.entry.js +36 -18
- package/dist/esm/content-accordion_11.entry.js.map +1 -1
- package/dist/esm/content-blocks.js +1 -1
- package/dist/esm/content-navigation-block.entry.js +18 -12
- package/dist/esm/content-navigation-block.entry.js.map +1 -1
- package/dist/esm/content-split-block.entry.js +2 -2
- package/dist/esm/content-tabs.entry.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-4f78228e.js → utils-9a901aa9.js} +35 -29
- package/dist/esm/utils-9a901aa9.js.map +1 -0
- package/dist/esm/{window-resize-service-f40ec51c.js → window-resize-service-a6537000.js} +2 -2
- package/dist/esm/{window-resize-service-f40ec51c.js.map → window-resize-service-a6537000.js.map} +1 -1
- package/dist/types/components/content-overlay/content-overlay.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +8 -3
- package/package.json +1 -1
- package/dist/cjs/utils-db61cd70.js.map +0 -1
- package/dist/content-blocks/p-7ff352fe.entry.js +0 -2
- package/dist/content-blocks/p-7ff352fe.entry.js.map +0 -1
- package/dist/content-blocks/p-b04fe808.js +0 -2
- package/dist/content-blocks/p-b04fe808.js.map +0 -1
- package/dist/content-blocks/p-ef45f146.entry.js +0 -2
- package/dist/content-blocks/p-ef45f146.entry.js.map +0 -1
- package/dist/esm/utils-4f78228e.js.map +0 -1
- /package/dist/content-blocks/{p-4bfbd7ef.entry.js.map → p-1b448306.entry.js.map} +0 -0
- /package/dist/content-blocks/{p-8cc22c1e.entry.js.map → p-3bd97960.entry.js.map} +0 -0
- /package/dist/content-blocks/{p-cfb4593f.js.map → p-3fe594af.js.map} +0 -0
|
@@ -1,6 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ResponsiveUtils } from "..";
|
|
2
|
+
describe('generateResponsiveValues', () => {
|
|
3
|
+
it('should return a proper array of values', () => {
|
|
4
|
+
expect(ResponsiveUtils.generateResponsiveValues('1|2|3')).toEqual(['1', '2', '3', '3', '3', '3']);
|
|
5
|
+
});
|
|
6
|
+
it('should handle custom values', () => {
|
|
7
|
+
expect(ResponsiveUtils.generateResponsiveValues('1|2|3')).toEqual(['1', '2', '3', '3', '3', '3']);
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
describe('getCurrentBreakpointIndex', () => {
|
|
11
|
+
it('should return a proper array of values', () => {
|
|
12
|
+
window.innerWidth = 768;
|
|
13
|
+
expect(ResponsiveUtils.getCurrentBreakpointIndex()).toEqual(1);
|
|
14
|
+
window.innerWidth = 1024;
|
|
15
|
+
expect(ResponsiveUtils.getCurrentBreakpointIndex()).toEqual(2);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
describe('getCurrentValue', () => {
|
|
19
|
+
it('should return a proper array of values', () => {
|
|
20
|
+
window.innerWidth = 1920;
|
|
21
|
+
expect(ResponsiveUtils.getCurrentValue('1|2')).toEqual('2');
|
|
22
|
+
});
|
|
23
|
+
it('should handle custom values', () => {
|
|
24
|
+
window.innerWidth = 1920;
|
|
25
|
+
window.$contentBlocks = {
|
|
26
|
+
breakpointValues: [0, 768, 1920, 2560],
|
|
27
|
+
};
|
|
28
|
+
expect(ResponsiveUtils.getCurrentValue('1|2|3|4')).toEqual('3');
|
|
4
29
|
});
|
|
5
30
|
});
|
|
6
31
|
//# sourceMappingURL=utils.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.spec.js","sourceRoot":"","sources":["../../../src/utils/utils.spec.ts"],"names":[],"mappings":"AAAA,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.spec.js","sourceRoot":"","sources":["../../../src/utils/utils.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AAErC,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAChD,MAAM,CAAC,eAAe,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAA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CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { ResponsiveUtils } from '..';\n\ndescribe('generateResponsiveValues', () => {\n it('should return a proper array of values', () => {\n expect(ResponsiveUtils.generateResponsiveValues('1|2|3')).toEqual(['1', '2', '3', '3', '3', '3']);\n });\n\n it('should handle custom values', () => {\n expect(ResponsiveUtils.generateResponsiveValues('1|2|3')).toEqual(['1', '2', '3', '3', '3', '3']);\n });\n});\n\ndescribe('getCurrentBreakpointIndex', () => {\n it('should return a proper array of values', () => {\n window.innerWidth = 768;\n expect(ResponsiveUtils.getCurrentBreakpointIndex()).toEqual(1);\n\n window.innerWidth = 1024;\n expect(ResponsiveUtils.getCurrentBreakpointIndex()).toEqual(2);\n });\n});\n\ndescribe('getCurrentValue', () => {\n it('should return a proper array of values', () => {\n window.innerWidth = 1920;\n expect(ResponsiveUtils.getCurrentValue('1|2')).toEqual('2');\n });\n\n it('should handle custom values', () => {\n window.innerWidth = 1920;\n window.$contentBlocks = {\n breakpointValues: [0, 768, 1920, 2560],\n };\n expect(ResponsiveUtils.getCurrentValue('1|2|3|4')).toEqual('3');\n });\n});\n"]}
|
|
@@ -36,16 +36,21 @@ const ContentButton$1 = /*@__PURE__*/ proxyCustomElement(class ContentButton ext
|
|
|
36
36
|
if (this.hasContentToActivate) {
|
|
37
37
|
ev.preventDefault();
|
|
38
38
|
// ev.stopPropagation();
|
|
39
|
-
this.activatedContent.dispatchEvent(new CustomEvent('
|
|
40
|
-
|
|
39
|
+
this.activatedContent.dispatchEvent(new CustomEvent('open', { detail: this.activatedContent }));
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
this.activatedContent.scrollIntoView({ behavior: 'smooth' });
|
|
42
|
+
}, 0);
|
|
41
43
|
}
|
|
42
44
|
else if (this.href && this.href.length > 1 && this.href.substring(0, 1) === '#') {
|
|
43
45
|
let element = document.getElementById(this.href.substring(1));
|
|
46
|
+
ev.preventDefault();
|
|
44
47
|
if (element) {
|
|
45
48
|
ev.preventDefault();
|
|
46
49
|
// ev.stopPropagation();
|
|
47
|
-
element.dispatchEvent(new CustomEvent('
|
|
48
|
-
|
|
50
|
+
element.dispatchEvent(new CustomEvent('open', { detail: element }));
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
element.scrollIntoView({ behavior: 'smooth' });
|
|
53
|
+
}, 0);
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -1 +1 @@
|
|
|
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;;QAEpD,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,GAAG,EAAE;YACnC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;SACnC;QAED,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ;YACjE,IAAI,CAAC,SAAS,GAAG,QAAkB,CAAC;SACrC,CAAC,CAAC;QAEH,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,kBAAkB,CAAC,EAAE;QACnB,IAAI,IAAI,CAAC,oBAAoB,EAAE;YAC7B,EAAE,CAAC,cAAc,EAAE,CAAC;;YAEpB,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,IA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"],"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, HostElement, 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: HostElement;\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 if (this.hasContentToActivate) {\n ev.preventDefault();\n // ev.stopPropagation();\n this.activatedContent.dispatchEvent(new CustomEvent('open', { detail: this.activatedContent }));\n setTimeout(() => {\n this.activatedContent.scrollIntoView({ behavior: 'smooth' });\n }, 0);\n } else if (this.href && this.href.length > 1 && this.href.substring(0, 1) === '#') {\n let element = document.getElementById(this.href.substring(1));\n ev.preventDefault();\n if (element) {\n ev.preventDefault();\n // ev.stopPropagation();\n element.dispatchEvent(new CustomEvent('open', { detail: element }));\n setTimeout(() => {\n element.scrollIntoView({ behavior: 'smooth' });\n }, 0);\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 { W as WindowResizeService } from './window-resize-service.js';
|
|
3
3
|
|
|
4
|
-
const contentGridFormatterCss = "*{box-sizing:border-box}content-grid-formatter{width:100%;overflow:auto;align-items:var(--align-items, flex-start);justify-content:var(--justify-content)
|
|
4
|
+
const contentGridFormatterCss = "*{box-sizing:border-box}content-grid-formatter{width:100%;overflow:auto;align-items:var(--align-items, flex-start);justify-content:var(--justify-content);grid-template-columns:repeat(var(--columns), 1fr);column-gap:var(--column-gap, 0);row-gap:var(--row-gap, 0)}content-grid-formatter *{box-sizing:border-box}content-grid-formatter[type=grid]{display:grid}content-grid-formatter[type=flex]{display:flex;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() {
|
|
@@ -34,7 +34,6 @@ const ContentGridFormatter = /*@__PURE__*/ proxyCustomElement(class ContentGridF
|
|
|
34
34
|
WindowResizeService.registerProp(this.flexShrink).subscribe(newValue => (this.flexShrink = newValue)),
|
|
35
35
|
WindowResizeService.registerProp(this.flexGrow).subscribe(newValue => (this.flexGrow = newValue)),
|
|
36
36
|
WindowResizeService.registerProp(this.columns).subscribe(newValue => {
|
|
37
|
-
console.log(this.hostElement, this.columns);
|
|
38
37
|
this.columns = newValue;
|
|
39
38
|
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--columns': newValue });
|
|
40
39
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-grid-formatter2.js","mappings":";;;AAAA,MAAM,uBAAuB,GAAG,svBAAsvB;;MCczwB,oBAAoB;;;;;;oBAmBO,MAAM;wBAUd,OAAO;0BAUL,OAAO;wBAcN,eAAe;0BAeb,eAAe;uBAStB,GAAG;yBAUD,GAAG;sBAUN,GAAG;;2BAIoB,EAAE;;IAEpD,iBAAiB;QACf,OAAO,OAAO,CAAC,UAAU,CAAC;YACxB,mBAAmB,C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WAAW,mCACX,IAAI,CAAC,WAAW,KACnB,cAAc,EAAE,QAAkB,GACnC,CAAC;aACH,CAAC;YACF,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,QAAQ;gBAC9D,IAAI,CAAC,MAAM,GAAG,QAAkB,CAAC;gBACjC,IAAI,CAAC,WAAW,mCACX,IAAI,CAAC,WAAW,KACnB,WAAW,EAAE,QAAkB,GAChC,CAAC;aACH,CAAC;YACF,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,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 align-items: var(--align-items, flex-start);\n justify-content: var(--justify-content);\n grid-template-columns: repeat(var(--columns), 1fr);\n column-gap: var(--column-gap, 0);\n row-gap: var(--row-gap, 0);\n * {\n box-sizing: border-box;\n }\n &[type=\"grid\"] {\n display: grid;\n }\n\n &[type=\"flex\"] {\n display: flex;\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';\nimport { Element, HTMLStencilElement } from '@stencil/core/internal';\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 vertical: 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 horizontal: 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 /**\n * @type Number\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n rowGap: ResponsiveNumber = '0';\n\n @Element() hostElement: HTMLStencilElement;\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.vertical).subscribe(newValue => {\n this.vertical = newValue as FLEX_JUSTIFY_OPTIONS;\n this.inlineStyle = {\n ...this.inlineStyle,\n '--align-items': this.vertical,\n };\n }),\n WindowResizeService.registerProp(this.horizontal).subscribe(newValue => {\n this.horizontal = newValue as FLEX_JUSTIFY_OPTIONS;\n this.inlineStyle = {\n ...this.inlineStyle,\n '--justify-content': this.horizontal,\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.rowGap).subscribe(newValue => {\n this.rowGap = newValue as string;\n this.inlineStyle = {\n ...this.inlineStyle,\n '--row-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}
|
|
@@ -35,7 +35,7 @@ const ContentHeroBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentHeroBlo
|
|
|
35
35
|
"hasBackground": [32],
|
|
36
36
|
"classString": [32],
|
|
37
37
|
"revealHiddenContent": [32]
|
|
38
|
-
}, [[8, "
|
|
38
|
+
}, [[8, "open", "contentBlockActivationHandler"]]]);
|
|
39
39
|
function defineCustomElement$1() {
|
|
40
40
|
if (typeof customElements === "undefined") {
|
|
41
41
|
return;
|
|
@@ -1 +1 @@
|
|
|
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('
|
|
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('open', { 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}
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { W as WindowResizeService } from './window-resize-service.js';
|
|
3
3
|
import { c as createFocusTrap } from './focus-trap.esm.js';
|
|
4
4
|
|
|
5
|
-
const contentNavigationBlockCss = "*{box-sizing:border-box}body.content-navigation-block-open{overflow:hidden}content-navigation-block button{appearance:none;border:none;background:transparent;cursor:pointer}content-navigation-block .content-navigation-block__skip-content a,content-navigation-block .content-navigation-block__skip-content button,content-navigation-block .content-navigation-block__skip-content a:visited,content-navigation-block .content-navigation-block__skip-content button:visited{border:2px solid rgb(0, 0, 0);border-radius:2px;color:purple;cursor:pointer;display:inline-block;font-size:14px;line-height:20px;margin:6px 11px;min-height:32px;text-decoration:underline;text-align:center;width:106px;z-index:1000}content-navigation-block .content-navigation-block__skip-content
|
|
5
|
+
const contentNavigationBlockCss = "*{box-sizing:border-box}body.content-navigation-block-open{overflow:hidden}content-navigation-block button{appearance:none;border:none;background:transparent;cursor:pointer}content-navigation-block .content-navigation-block__skip-content a,content-navigation-block .content-navigation-block__skip-content button,content-navigation-block .content-navigation-block__skip-content a:visited,content-navigation-block .content-navigation-block__skip-content button:visited{border:2px solid rgb(0, 0, 0);border-radius:2px;color:purple;cursor:pointer;display:inline-block;font-size:14px;line-height:20px;margin:6px 11px;min-height:32px;text-decoration:underline;text-align:center;width:106px;z-index:1000}content-navigation-block .content-navigation-block__skip-content:not(:focus-within){position:absolute;clip:rect(1px, 1px, 1px, 1px);overflow:hidden;padding:0}content-navigation-block svg.default-icon{display:inline-block;width:32px}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] .content-navigation__close,content-navigation-block[hamburger=absolute][aria-expanded=false] .content-navigation__close,content-navigation-block[hamburger=static][aria-expanded=false] .content-navigation__close{display:none}content-navigation-block[hamburger=fixed] .content-navigation__open,content-navigation-block[hamburger=fixed] .content-navigation__close,content-navigation-block[hamburger=absolute] .content-navigation__open,content-navigation-block[hamburger=absolute] .content-navigation__close,content-navigation-block[hamburger=static] .content-navigation__open,content-navigation-block[hamburger=static] .content-navigation__close{cursor:pointer}content-navigation-block[hamburger=fixed] .content-navigation__content-wrapper,content-navigation-block[hamburger=absolute] .content-navigation__content-wrapper,content-navigation-block[hamburger=static] .content-navigation__content-wrapper{display:none}content-navigation-block[hamburger=fixed] .content-navigation__content-wrapper[hidden=false],content-navigation-block[hamburger=absolute] .content-navigation__content-wrapper[hidden=false],content-navigation-block[hamburger=static] .content-navigation__content-wrapper[hidden=false]{display:block}content-navigation-block[hamburger=fixed] .content-navigation__content-wrapper{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:100}content-navigation-block[hamburger=sticky] .content-navigation__content-wrapper{position:sticky;left:0;top:0;width:100vw;height:100vh;z-index:100}content-navigation-block[hamburger=absolute] .content-navigation__content-wrapper{position:absolute;z-index:100}content-navigation-block[hamburger=static] .content-navigation__content-wrapper{position:static}content-navigation-block[hamburger=none]{display:block}content-navigation-block[hamburger=none] .content-navigation__open,content-navigation-block[hamburger=none] .content-navigation__close{display:none}content-navigation-block[aria-expanded=true] .content-navigation__content-wrapper{display:block}";
|
|
6
6
|
|
|
7
7
|
const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentNavigationBlock extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
@@ -21,6 +21,8 @@ const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentN
|
|
|
21
21
|
this.contentSlot = undefined;
|
|
22
22
|
}
|
|
23
23
|
componentWillLoad() {
|
|
24
|
+
this.hasOpenButton = !!this.hostElement.querySelector('[slot="openButton"]');
|
|
25
|
+
this.hasCloseButton = !!this.hostElement.querySelector('[slot="closeButton"]');
|
|
24
26
|
WindowResizeService.registerProp(this.hamburger).subscribe(newValue => {
|
|
25
27
|
this.hamburger = newValue;
|
|
26
28
|
this.bodyToggle = this.hamburger === 'fixed';
|
|
@@ -31,8 +33,6 @@ const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentN
|
|
|
31
33
|
});
|
|
32
34
|
}
|
|
33
35
|
componentDidLoad() {
|
|
34
|
-
this.hasOpenButton = !!this.hostElement.querySelector('[slot="openButton"]');
|
|
35
|
-
this.hasCloseButton = !!this.hostElement.querySelector('content-navigation-block-close');
|
|
36
36
|
this.openButton.onclick = () => {
|
|
37
37
|
this.openMenu();
|
|
38
38
|
};
|
|
@@ -49,25 +49,31 @@ const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentN
|
|
|
49
49
|
document.body.classList.add('content-navigation-block-open');
|
|
50
50
|
}
|
|
51
51
|
this.focusTrap = createFocusTrap(this.contentSlot.parentElement, {
|
|
52
|
+
initialFocus: this.contentSlot,
|
|
52
53
|
fallbackFocus: this.hostElement,
|
|
53
54
|
clickOutsideDeactivates: true,
|
|
54
55
|
onDeactivate: () => {
|
|
55
56
|
this.closeMenu();
|
|
57
|
+
this.focusTrap = null;
|
|
58
|
+
this.ariaExpanded = 'false';
|
|
59
|
+
document.body.classList.remove('content-navigation-block-open');
|
|
60
|
+
setTimeout(() => this.openButton.focus(), 1);
|
|
56
61
|
},
|
|
57
62
|
});
|
|
58
|
-
|
|
63
|
+
this.focusTrap.activate();
|
|
59
64
|
}
|
|
60
65
|
closeMenu() {
|
|
61
66
|
if (this.focusTrap) {
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
try {
|
|
68
|
+
this.focusTrap.deactivate();
|
|
69
|
+
}
|
|
70
|
+
catch (e) {
|
|
71
|
+
console.log(e);
|
|
72
|
+
}
|
|
64
73
|
}
|
|
65
|
-
this.ariaExpanded = 'false';
|
|
66
|
-
document.body.classList.remove('content-navigation-block-open');
|
|
67
|
-
setTimeout(() => this.openButton.focus(), 1);
|
|
68
74
|
}
|
|
69
75
|
render() {
|
|
70
|
-
return (h(Host, { class: this.classString, "aria-expanded": this.ariaExpanded }, h("div", { class: "content-navigation-block__skip-content" }, h("slot", { name: "skipContent" })), h("div", { ref: el => (this.openButton = el), class: "content-navigation__open" }, !this.hasOpenButton && (h("button", null, h("svg", { class: "default-icon", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" })))), h("slot", { name: "openButton" })), h("div", { class: "content-navigation__content-wrapper" }, h("div", { ref: el => (this.closeButton = el), class: "content-navigation__close" }, !this.hasCloseButton && (h("button", null, h("svg", { class: "default-icon", xmlns: "http://www.w3.org/2000/svg", fill: "none", 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("div", { class: "content-navigation__content", ref: el => (this.contentSlot = el) }, h("slot", { name: "
|
|
76
|
+
return (h(Host, { class: this.classString, "aria-expanded": this.ariaExpanded }, h("div", { class: "content-navigation-block__skip-content" }, h("slot", { name: "skipContent" })), h("div", { ref: el => (this.openButton = el), class: "content-navigation__open" }, !this.hasOpenButton && (h("button", null, h("svg", { class: "default-icon", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" })))), h("slot", { name: "openButton" })), h("div", { class: "content-navigation__content-wrapper" }, h("div", { ref: el => (this.closeButton = el), class: "content-navigation__close" }, !this.hasCloseButton && (h("button", null, h("svg", { class: "default-icon", xmlns: "http://www.w3.org/2000/svg", fill: "none", 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("div", { class: "content-navigation__content", ref: el => (this.contentSlot = el) }, h("slot", { name: "content" }), h("slot", null)))));
|
|
71
77
|
}
|
|
72
78
|
get hostElement() { return this; }
|
|
73
79
|
static get style() { return contentNavigationBlockCss; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"content-navigation-block.js","mappings":";;;;AAAA,MAAM,yBAAyB,GAAG,k2GAAk2G;;MCiBv3GA,wBAAsB;;;;yBAcH,YAAY;;;4BAaV,OAAO;0BACR,KAAK;;6BAGF,KAAK;8BACJ,KAAK;;;;;IAMxC,iBAAiB;QACf,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ;YACjE,IAAI,CAAC,SAAS,GAAG,QAAkB,CAAC;YACpC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC;YAC7C,QAAQ,CAAC,IAAI,CAA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AAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IACnI,8BAAqB,OAAO,qBAAiB,OAAO,EAAC,CAAC,EAAC,sBAAsB,GAAG,CAC5E,CACC,CACV,CACG,EACN,WAAK,KAAK,EAAC,6BAA6B,EAAC,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,IACzE,YAAM,IAAI,EAAC,aAAa,GAAQ,EAChC,YAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,eAAa,CACT,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentNavigationBlock"],"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 button {\n appearance: none;\n border: none;\n background: transparent;\n cursor: pointer;\n }\n \n .content-navigation-block__skip-content a, .content-navigation-block__skip-content button, .content-navigation-block__skip-content a:visited, .content-navigation-block__skip-content button:visited{\n border: 2px solid rgba(0,0,0, 1);\n border-radius: 2px;\n color: purple;\n cursor: pointer;\n display: inline-block;\n font-size: 14px;\n line-height: 20px;\n margin: 6px 11px;\n min-height: 32px;\n text-decoration: underline;\n text-align: center;\n width: 106px;\n z-index: 1000;\n &:not(:focus) {\n position: absolute;\n // z-index: -1;\n\n clip: rect(1px,1px,1px,1px);\n overflow: hidden;\n padding: 0;\n }\n }\n\n svg.default-icon {\n display: inline-block;\n width: 32px;\n }\n &[hamburger=\"fixed\"],\n &[hamburger=\"absolute\"],\n &[hamburger=\"static\"] {\n display: inline-block;\n &[aria-expanded=\"false\"] {\n .content-navigation__close {\n display: none;\n }\n }\n .content-navigation__open,\n .content-navigation__close {\n cursor: pointer;\n }\n \n .content-navigation__content-wrapper {\n display: none;\n background: white;\n &[hidden=\"false\"] {\n display: block;\n }\n }\n }\n\n &[hamburger=\"fixed\"] {\n .content-navigation__content-wrapper {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n }\n }\n &[hamburger=\"sticky\"] {\n .content-navigation__content-wrapper {\n position: sticky;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n }\n }\n &[hamburger=\"absolute\"] {\n .content-navigation__content-wrapper {\n position: absolute;\n z-index: 100;\n }\n }\n &[hamburger=\"static\"] {\n .content-navigation__content-wrapper {\n position: static;\n }\n }\n \n &[hamburger=\"none\"] {\n display: block;\n .content-navigation__open,\n .content-navigation__close {\n display: none;\n }\n }\n\n &[aria-expanded=\"true\"] {\n .content-navigation__content-wrapper {\n display: block;\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';\nimport { createFocusTrap } from 'focus-trap';\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 skipContent - This slot is a keyboard-focus link that lets a screen-reader or keyboard user skip the navigation block and scroll to the end.\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 sticky\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 @State() skipAccessibilityMessage: HTMLElement;\n\n @State() hasOpenButton: boolean = false;\n @State() hasCloseButton: boolean = false;\n\n @State() openButton: HTMLElement;\n @State() closeButton: HTMLElement;\n @State() contentSlot: HTMLElement;\n focusTrap;\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 this.hasOpenButton = !!this.hostElement.querySelector('[slot=\"openButton\"]');\n this.hasCloseButton = !!this.hostElement.querySelector('content-navigation-block-close');\n this.openButton.onclick = () => {\n this.openMenu();\n };\n this.closeButton.onclick = () => {\n this.closeMenu();\n };\n }\n\n openMenu() {\n this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';\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 this.focusTrap = createFocusTrap(this.contentSlot.parentElement, {\n fallbackFocus: this.hostElement,\n clickOutsideDeactivates: true,\n onDeactivate: () => {\n this.closeMenu();\n },\n });\n\n setTimeout(() => this.closeButton.focus(), 1);\n }\n closeMenu() {\n if (this.focusTrap) {\n this.focusTrap.deactivate();\n this.focusTrap = null;\n }\n this.ariaExpanded = 'false';\n document.body.classList.remove('content-navigation-block-open');\n setTimeout(() => this.openButton.focus(), 1);\n }\n\n render() {\n return (\n <Host class={this.classString} aria-expanded={this.ariaExpanded}>\n <div class=\"content-navigation-block__skip-content\">\n <slot name=\"skipContent\"></slot>\n </div>\n <div ref={el => (this.openButton = el)} class=\"content-navigation__open\">\n {!this.hasOpenButton && (\n <button>\n <svg class=\"default-icon\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5\" />\n </svg>\n </button>\n )}\n <slot name=\"openButton\"></slot>\n </div>\n <div class=\"content-navigation__content-wrapper\">\n <div ref={el => (this.closeButton = el)} class=\"content-navigation__close\">\n {!this.hasCloseButton && (\n <button>\n <svg class=\"default-icon\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" />\n </svg>\n </button>\n )}\n </div>\n <div class=\"content-navigation__content\" ref={el => (this.contentSlot = el)}>\n <slot name=\"closeButton\"></slot>\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"content-navigation-block.js","mappings":";;;;AAAA,MAAM,yBAAyB,GAAG,+kGAA+kG;;MCiBpmGA,wBAAsB;;;;yBAcH,YAAY;;;4BAaV,OAAO;0BACR,KAAK;;6BAGF,KAAK;8BACJ,KAAK;;;;;IAMxC,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;QAC7E,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;QAC/E,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ;YACjE,IAAI,CAAC,SAAS,GAAG,QAAkB,CAAC;YACpC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC;YAC7C,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;SACjE,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,C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AS,GAAQ,EAC5B,eAAa,CACT,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ContentNavigationBlock"],"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 button {\n appearance: none;\n border: none;\n background: transparent;\n cursor: pointer;\n }\n \n .content-navigation-block__skip-content a, .content-navigation-block__skip-content button, .content-navigation-block__skip-content a:visited, .content-navigation-block__skip-content button:visited{\n border: 2px solid rgba(0,0,0, 1);\n border-radius: 2px;\n color: purple;\n cursor: pointer;\n display: inline-block;\n font-size: 14px;\n line-height: 20px;\n margin: 6px 11px;\n min-height: 32px;\n text-decoration: underline;\n text-align: center;\n width: 106px;\n z-index: 1000;\n }\n .content-navigation-block__skip-content:not(:focus-within) {\n position: absolute;\n // z-index: -1;\n\n clip: rect(1px,1px,1px,1px);\n overflow: hidden;\n padding: 0;\n }\n\n svg.default-icon {\n display: inline-block;\n width: 32px;\n }\n &[hamburger=\"fixed\"],\n &[hamburger=\"absolute\"],\n &[hamburger=\"static\"] {\n display: inline-block;\n &[aria-expanded=\"false\"] {\n .content-navigation__close {\n display: none;\n }\n }\n .content-navigation__open,\n .content-navigation__close {\n cursor: pointer;\n }\n \n .content-navigation__content-wrapper {\n display: none;\n &[hidden=\"false\"] {\n display: block;\n }\n }\n }\n\n &[hamburger=\"fixed\"] {\n .content-navigation__content-wrapper {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n }\n }\n &[hamburger=\"sticky\"] {\n .content-navigation__content-wrapper {\n position: sticky;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n }\n }\n &[hamburger=\"absolute\"] {\n .content-navigation__content-wrapper {\n position: absolute;\n z-index: 100;\n }\n }\n &[hamburger=\"static\"] {\n .content-navigation__content-wrapper {\n position: static;\n }\n }\n \n &[hamburger=\"none\"] {\n display: block;\n .content-navigation__open,\n .content-navigation__close {\n display: none;\n }\n }\n\n &[aria-expanded=\"true\"] {\n .content-navigation__content-wrapper {\n display: block;\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';\nimport { createFocusTrap } from 'focus-trap';\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 skipContent - This slot is a keyboard-focus link that lets a screen-reader or keyboard user skip the navigation block and scroll to the end.\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 sticky\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 @State() skipAccessibilityMessage: HTMLElement;\n\n @State() hasOpenButton: boolean = false;\n @State() hasCloseButton: boolean = false;\n\n @State() openButton: HTMLElement;\n @State() closeButton: HTMLElement;\n @State() contentSlot: HTMLElement;\n focusTrap;\n componentWillLoad() {\n this.hasOpenButton = !!this.hostElement.querySelector('[slot=\"openButton\"]');\n this.hasCloseButton = !!this.hostElement.querySelector('[slot=\"closeButton\"]');\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 this.openButton.onclick = () => {\n this.openMenu();\n };\n this.closeButton.onclick = () => {\n this.closeMenu();\n };\n }\n\n openMenu() {\n this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';\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 this.focusTrap = createFocusTrap(this.contentSlot.parentElement, {\n initialFocus: this.contentSlot,\n fallbackFocus: this.hostElement,\n clickOutsideDeactivates: true,\n onDeactivate: () => {\n this.closeMenu();\n this.focusTrap = null;\n this.ariaExpanded = 'false';\n document.body.classList.remove('content-navigation-block-open');\n setTimeout(() => this.openButton.focus(), 1);\n },\n });\n\n this.focusTrap.activate();\n }\n closeMenu() {\n if (this.focusTrap) {\n try {\n this.focusTrap.deactivate();\n } catch (e) {\n console.log(e);\n }\n }\n }\n\n render() {\n return (\n <Host class={this.classString} aria-expanded={this.ariaExpanded}>\n <div class=\"content-navigation-block__skip-content\">\n <slot name=\"skipContent\"></slot>\n </div>\n <div ref={el => (this.openButton = el)} class=\"content-navigation__open\">\n {!this.hasOpenButton && (\n <button>\n <svg class=\"default-icon\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5\" />\n </svg>\n </button>\n )}\n <slot name=\"openButton\"></slot>\n </div>\n <div class=\"content-navigation__content-wrapper\">\n <div ref={el => (this.closeButton = el)} class=\"content-navigation__close\">\n {!this.hasCloseButton && (\n <button>\n <svg class=\"default-icon\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" />\n </svg>\n </button>\n )}\n <slot name=\"closeButton\"></slot>\n </div>\n <div class=\"content-navigation__content\" ref={el => (this.contentSlot = el)}>\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -436,7 +436,7 @@ aria.replaceDialog = function (newDialogId, newFocusAfterClosed, newFocusFirst)
|
|
|
436
436
|
}; // end replaceDialog
|
|
437
437
|
window.aria = aria;
|
|
438
438
|
|
|
439
|
-
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:
|
|
439
|
+
const contentOverlayCss = "*{box-sizing:border-box}.content-overlay-open{overflow:hidden}.content-block-overlay-container{position:relative;display:block;width:100%;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:flex}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;top:0}content-overlay[vertical=center]{justify-content:center}content-overlay[vertical=bottom]{justify-content:flex-end;bottom:0}content-overlay .content-overlay-background{background:rgba(255, 255, 255, 0.6);bottom:0;display:none;top:0;z-index:100000;right:0;left:0;width:100%}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:40px}content-overlay[position=fixed] .content-overlay-background{position:fixed}content-overlay[position=absolute]{position:absolute;box-sizing:border-box;z-index:100000;height:100%;width:100%;left:0}content-overlay[position=absolute] .content-overlay-background{position:static}content-overlay[position=absolute] .content-overlay__content,content-overlay[position=fixed] .content-overlay__content{flex:1;overflow:auto}content-overlay [role=dialog]{display:flex;flex-direction:column;height:100%;justify-content:flex-start}content-overlay [role=dialog].hidden{display:none}content-overlay[full-screen=true]{height:100%}content-overlay[full-screen=true] .content-overlay-background{height:100%}body.has-dialog{overflow:hidden}";
|
|
440
440
|
|
|
441
441
|
const ContentOverlay$1 = /*@__PURE__*/ proxyCustomElement(class ContentOverlay extends HTMLElement {
|
|
442
442
|
constructor() {
|
|
@@ -459,9 +459,8 @@ const ContentOverlay$1 = /*@__PURE__*/ proxyCustomElement(class ContentOverlay e
|
|
|
459
459
|
this.hasCloseButton = false;
|
|
460
460
|
this.originalMarkup = undefined;
|
|
461
461
|
}
|
|
462
|
-
|
|
462
|
+
onContentBlockToggle(event) {
|
|
463
463
|
if (this.hostElement.getAttribute('id') === event.detail.getAttribute('id')) {
|
|
464
|
-
console.log('activate');
|
|
465
464
|
event.preventDefault();
|
|
466
465
|
if (!this.isActive) {
|
|
467
466
|
this.openOverlay();
|
|
@@ -471,8 +470,22 @@ const ContentOverlay$1 = /*@__PURE__*/ proxyCustomElement(class ContentOverlay e
|
|
|
471
470
|
}
|
|
472
471
|
}
|
|
473
472
|
}
|
|
473
|
+
onContentBlockActivated(event) {
|
|
474
|
+
if (this.hostElement.getAttribute('id') === event.detail.getAttribute('id')) {
|
|
475
|
+
event.preventDefault();
|
|
476
|
+
this.openOverlay();
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
onContentBlockDeactivated(event) {
|
|
480
|
+
if (this.hostElement.getAttribute('id') === event.detail.getAttribute('id')) {
|
|
481
|
+
event.preventDefault();
|
|
482
|
+
this.closeOverlay();
|
|
483
|
+
}
|
|
484
|
+
}
|
|
474
485
|
async openOverlay() {
|
|
475
486
|
this.isActive = true;
|
|
487
|
+
document.body.classList.add('content-overlay-open');
|
|
488
|
+
document.body.classList.remove('content-overlay-close');
|
|
476
489
|
if (!this.originalMarkup) {
|
|
477
490
|
this.originalMarkup = this.contentSlot.innerHTML;
|
|
478
491
|
}
|
|
@@ -499,16 +512,17 @@ const ContentOverlay$1 = /*@__PURE__*/ proxyCustomElement(class ContentOverlay e
|
|
|
499
512
|
clickOutsideDeactivates: true,
|
|
500
513
|
onDeactivate: () => {
|
|
501
514
|
this.isActive = false;
|
|
515
|
+
document.body.classList.add('content-overlay-close');
|
|
516
|
+
document.body.classList.remove('content-overlay-open');
|
|
517
|
+
this.activeClass = '';
|
|
502
518
|
this.setComputedActiveClass();
|
|
519
|
+
this.contentSlot.innerHTML = '';
|
|
503
520
|
},
|
|
504
521
|
});
|
|
505
522
|
}
|
|
506
523
|
this.contentOverlayActivated.emit(this.hostElement);
|
|
507
524
|
}
|
|
508
525
|
async closeOverlay() {
|
|
509
|
-
this.contentSlot.innerHTML = '';
|
|
510
|
-
this.isActive = false;
|
|
511
|
-
this.activeClass = '';
|
|
512
526
|
if (this.focusTrap) {
|
|
513
527
|
try {
|
|
514
528
|
this.focusTrap.deactivate();
|
|
@@ -542,7 +556,7 @@ const ContentOverlay$1 = /*@__PURE__*/ proxyCustomElement(class ContentOverlay e
|
|
|
542
556
|
render() {
|
|
543
557
|
return (h(Host, { class: `${this.activeClass} ${this.classString}`, position: this.position }, 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 => {
|
|
544
558
|
this.closeOverlayButtonClicked(e);
|
|
545
|
-
}, class: "content-overlay__close", title: this.closeTitle }, !this.hasCloseButton && (h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none",
|
|
559
|
+
}, class: "content-overlay__close", title: this.closeTitle }, !this.hasCloseButton && (h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", 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" }), h("slot", null)))))));
|
|
546
560
|
}
|
|
547
561
|
componentDidRender() {
|
|
548
562
|
if (this.open === 'true') {
|
|
@@ -577,7 +591,7 @@ const ContentOverlay$1 = /*@__PURE__*/ proxyCustomElement(class ContentOverlay e
|
|
|
577
591
|
"originalMarkup": [32],
|
|
578
592
|
"openOverlay": [64],
|
|
579
593
|
"closeOverlay": [64]
|
|
580
|
-
}, [[0, "
|
|
594
|
+
}, [[0, "toggle", "onContentBlockToggle"], [0, "open", "onContentBlockActivated"], [0, "close", "onContentBlockDeactivated"]]]);
|
|
581
595
|
function defineCustomElement$1() {
|
|
582
596
|
if (typeof customElements === "undefined") {
|
|
583
597
|
return;
|