@swisspost/design-system-components 10.0.0-next.54 → 10.0.0-next.55
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/{index-Cb8CTrOz.js → index-B4gYpuJF.js} +9 -1
- package/dist/cjs/{index-DtvYdwe1.js → index-UFKR6Ok0.js} +2 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-CvZxvdTJ.js → package-DkJrv93P.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +4 -4
- package/dist/cjs/post-avatar.cjs.entry.js +4 -4
- package/dist/cjs/post-back-to-top.cjs.entry.js +3 -3
- package/dist/cjs/post-banner.cjs.entry.js +4 -4
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +4 -4
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +5 -5
- package/dist/cjs/post-card-control.cjs.entry.js +5 -5
- package/dist/cjs/post-closebutton_15.cjs.entry.js +105 -72
- package/dist/cjs/post-collapsible_2.cjs.entry.js +10 -9
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer.cjs.entry.js +4 -4
- package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
- package/dist/cjs/post-popover-trigger.cjs.entry.js +4 -4
- package/dist/cjs/post-popover.cjs.entry.js +5 -5
- package/dist/cjs/post-rating.cjs.entry.js +4 -4
- package/dist/cjs/post-stepper-item.cjs.entry.js +18 -0
- package/dist/cjs/post-stepper.cjs.entry.js +106 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +4 -4
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -4
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +4 -4
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -5
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/post-accordion/post-accordion.js +2 -2
- package/dist/collection/components/post-avatar/post-avatar.css +1 -1
- package/dist/collection/components/post-banner/post-banner.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +6 -6
- package/dist/collection/components/post-card-control/post-card-control.js +3 -3
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +6 -5
- package/dist/collection/components/post-footer/post-footer.js +2 -2
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +104 -54
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +2 -2
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +2 -2
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-list/post-list.js +1 -1
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +2 -2
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +2 -2
- package/dist/collection/components/post-menu/post-menu.js +2 -2
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +2 -2
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +2 -2
- package/dist/collection/components/post-stepper/post-stepper.css +1 -0
- package/dist/collection/components/post-stepper/post-stepper.js +204 -0
- package/dist/collection/components/post-stepper-item/post-stepper-item.css +7 -0
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +18 -0
- package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +1 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/component-names.json +2 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index2.js +2 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion2.js +2 -2
- package/dist/components/post-avatar.js +2 -2
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-breadcrumbs.js +7 -7
- package/dist/components/post-card-control.js +3 -3
- package/dist/components/post-collapsible-trigger2.js +9 -8
- package/dist/components/post-footer.js +2 -2
- package/dist/components/post-header.js +89 -54
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-language-option.js +3 -3
- package/dist/components/post-language-switch.js +3 -3
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-list-item.js +1 -1
- package/dist/components/post-list.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +2 -2
- package/dist/components/post-megadropdown-trigger.js +3 -3
- package/dist/components/post-megadropdown.js +3 -3
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +2 -2
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +3 -3
- package/dist/components/post-popovercontainer2.js +2 -2
- package/dist/components/post-rating.js +2 -2
- package/dist/components/post-stepper-item.d.ts +11 -0
- package/dist/components/post-stepper-item.js +33 -0
- package/dist/components/post-stepper.d.ts +11 -0
- package/dist/components/post-stepper.js +134 -0
- package/dist/components/post-tab-header.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +2 -2
- package/dist/components/react/index.js +1 -1
- package/dist/components/react/p-BhxZzOEC.js +3 -0
- package/dist/components/react/{p-nSFSgY-P.js → p-CSAMO7iJ.js} +5 -5
- package/dist/components/react/{p-CV7fm1rW.js → p-CYkf_7Y5.js} +2 -1
- package/dist/components/react/{p-BfLuYwf7.js → p-Ccrl2AQn.js} +2 -2
- package/dist/components/react/{p-DVxZMuPW.js → p-CewRvBtg.js} +4 -4
- package/dist/components/react/{p-BUxAs8N5.js → p-Cwiv86_f.js} +3 -3
- package/dist/components/react/{p-BK474oMI.js → p-D2waO0Zc.js} +2 -2
- package/dist/components/react/{p-2U_BGLjc.js → p-DBPOV12C.js} +3 -3
- package/dist/components/react/{p-mENtrn2l.js → p-DVGEExot.js} +4 -4
- package/dist/components/react/{p-Ccgu_WOx.js → p-Djvj8fd2.js} +3 -3
- package/dist/components/react/{p-D4NSCxrX.js → p-LtiDhYis.js} +11 -10
- package/dist/components/react/{p-D3CFjhAf.js → p-XrZzCOKT.js} +3 -3
- package/dist/components/react/{p-Dj7qWba5.js → p-v3pOrMNQ.js} +5 -5
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-avatar.js +3 -3
- package/dist/components/react/post-back-to-top.js +3 -3
- package/dist/components/react/post-banner.js +3 -3
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +14 -14
- package/dist/components/react/post-card-control.js +6 -6
- package/dist/components/react/post-closebutton.js +1 -1
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/post-footer.js +9 -9
- package/dist/components/react/post-header.js +90 -55
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-option.js +5 -5
- package/dist/components/react/post-language-switch.js +9 -9
- package/dist/components/react/post-linkarea.js +2 -2
- package/dist/components/react/post-list-item.js +2 -2
- package/dist/components/react/post-list.js +2 -2
- package/dist/components/react/post-logo.js +3 -3
- package/dist/components/react/post-mainnavigation.js +4 -4
- package/dist/components/react/post-megadropdown-trigger.js +5 -5
- package/dist/components/react/post-megadropdown.js +4 -4
- package/dist/components/react/post-menu-item.js +1 -1
- package/dist/components/react/post-menu-trigger.js +1 -1
- package/dist/components/react/post-menu.js +1 -1
- package/dist/components/react/post-popover-trigger.js +3 -3
- package/dist/components/react/post-popover.js +8 -8
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +5 -5
- package/dist/components/react/post-stepper-item.d.ts +11 -0
- package/dist/components/react/post-stepper-item.js +34 -0
- package/dist/components/react/post-stepper.d.ts +11 -0
- package/dist/components/react/post-stepper.js +135 -0
- package/dist/components/react/post-tab-header.js +3 -3
- package/dist/components/react/post-tab-panel.js +3 -3
- package/dist/components/react/post-tabs.js +2 -2
- package/dist/components/react/post-togglebutton.js +2 -2
- package/dist/components/react/post-tooltip-trigger.js +3 -3
- package/dist/components/react/post-tooltip.js +5 -5
- package/dist/docs.json +175 -27
- package/dist/esm/{index-VmK3ABCB.js → index-Beaz8wEe.js} +2 -1
- package/dist/esm/{index-CFNKgUjL.js → index-wEFJ-c34.js} +9 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-BhxZzOEC.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +4 -4
- package/dist/esm/post-avatar.entry.js +4 -4
- package/dist/esm/post-back-to-top.entry.js +3 -3
- package/dist/esm/post-banner.entry.js +4 -4
- package/dist/esm/post-breadcrumb-item_2.entry.js +4 -4
- package/dist/esm/post-breadcrumbs.entry.js +5 -5
- package/dist/esm/post-card-control.entry.js +5 -5
- package/dist/esm/post-closebutton_15.entry.js +105 -72
- package/dist/esm/post-collapsible_2.entry.js +10 -9
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer.entry.js +4 -4
- package/dist/esm/post-linkarea.entry.js +3 -3
- package/dist/esm/post-popover-trigger.entry.js +4 -4
- package/dist/esm/post-popover.entry.js +5 -5
- package/dist/esm/post-rating.entry.js +4 -4
- package/dist/esm/post-stepper-item.entry.js +16 -0
- package/dist/esm/post-stepper.entry.js +104 -0
- package/dist/esm/post-tab-header.entry.js +4 -4
- package/dist/esm/post-tab-panel.entry.js +4 -4
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tooltip-trigger.entry.js +4 -4
- package/dist/esm/post-tooltip.entry.js +5 -5
- package/dist/post-components/p-01e678c9.entry.js +1 -0
- package/dist/post-components/p-034a453f.entry.js +1 -0
- package/dist/post-components/p-15a4cdbf.entry.js +1 -0
- package/dist/post-components/p-24dc54d1.entry.js +1 -0
- package/dist/post-components/p-2a2030bf.entry.js +1 -0
- package/dist/post-components/p-2ed84cc3.entry.js +1 -0
- package/dist/post-components/{p-77e43032.entry.js → p-3228968f.entry.js} +1 -1
- package/dist/post-components/p-3c01ddfe.entry.js +1 -0
- package/dist/post-components/{p-261b1452.entry.js → p-57288cb2.entry.js} +1 -1
- package/dist/post-components/{p-0e92dbef.entry.js → p-748b1f01.entry.js} +1 -1
- package/dist/post-components/{p-0ec2bdd7.entry.js → p-7745e46e.entry.js} +1 -1
- package/dist/post-components/{p-8f0fc02a.entry.js → p-7f635728.entry.js} +1 -1
- package/dist/post-components/p-82c178a3.entry.js +1 -0
- package/dist/post-components/p-9b5f8319.entry.js +1 -0
- package/dist/post-components/p-Beaz8wEe.js +1 -0
- package/dist/post-components/p-BhxZzOEC.js +1 -0
- package/dist/post-components/{p-96750e25.entry.js → p-a9644e54.entry.js} +1 -1
- package/dist/post-components/{p-658b1ccc.entry.js → p-af030a3a.entry.js} +1 -1
- package/dist/post-components/{p-e90688ab.entry.js → p-b8ba8139.entry.js} +1 -1
- package/dist/post-components/{p-bf41fe56.entry.js → p-cd03e6f2.entry.js} +1 -1
- package/dist/post-components/{p-02ea3ec5.entry.js → p-db935e8e.entry.js} +1 -1
- package/dist/post-components/{p-11c204e0.entry.js → p-e62e1f57.entry.js} +1 -1
- package/dist/post-components/{p-f1b815b6.entry.js → p-fb4b1641.entry.js} +1 -1
- package/dist/post-components/p-wEFJ-c34.js +2 -0
- package/dist/post-components/post-components.css +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +1 -0
- package/dist/types/components/post-header/post-header.d.ts +15 -11
- package/dist/types/components/post-stepper/post-stepper.d.ts +38 -0
- package/dist/types/components/post-stepper-item/post-stepper-item.d.ts +3 -0
- package/dist/types/components.d.ts +62 -2
- package/hydrate/index.js +296 -124
- package/hydrate/index.mjs +296 -124
- package/package.json +7 -8
- package/dist/components/react/p-BXRsHuTS.js +0 -3
- package/dist/esm/package-BXRsHuTS.js +0 -3
- package/dist/post-components/p-197a0f25.entry.js +0 -1
- package/dist/post-components/p-3274ab81.entry.js +0 -1
- package/dist/post-components/p-BXRsHuTS.js +0 -1
- package/dist/post-components/p-CFNKgUjL.js +0 -2
- package/dist/post-components/p-VmK3ABCB.js +0 -1
- package/dist/post-components/p-b5b5e4b9.entry.js +0 -1
- package/dist/post-components/p-b8059ba1.entry.js +0 -1
- package/dist/post-components/p-d6134e24.entry.js +0 -1
- package/dist/post-components/p-e7029b9e.entry.js +0 -1
- package/dist/post-components/p-ea5da614.entry.js +0 -1
|
@@ -88,7 +88,7 @@ export class PostBreadcrumbs {
|
|
|
88
88
|
}
|
|
89
89
|
render() {
|
|
90
90
|
const visibleItems = this.breadcrumbItems.slice(0, -1);
|
|
91
|
-
return (h(Host, { key: '
|
|
91
|
+
return (h(Host, { key: '114ba932649aef6b3abda10be0a2a83b4d54c691', "data-version": version }, h("nav", { key: 'db7a6e0b36e5d71a2848dbf7de83e8b7e0f293bf', "aria-label": this.label, class: "breadcrumbs-nav", ref: el => (this.breadcrumbsNavRef = el) }, h("ol", { key: '71c3fac84dcf413da3c597a0204329b2f9945add', class: "no-list breadcrumbs-list" }, h("li", { key: 'd58de53b3a28e9ba4ec80f01b040a90035d0eae6' }, h("a", { key: '5c51451d2bd12da70eee2a5a4b22499340bf34e3', href: this.homeUrl, class: "breadcrumb-link" }, h("span", { key: 'c106e7663bf75d971e86915edcd669defb886a48', class: "visually-hidden" }, this.homeText), h("post-icon", { key: 'f723202508f4a00e19a3ead136934b8fadc10061', name: "home", class: "home-icon" }))), this.isConcatenated ? (h("li", { class: "menu-trigger-wrapper" }, h("post-icon", { name: "chevronright", class: "breadcrumb-item-icon" }), h("div", { class: "actual-menu" }, h("post-menu-trigger", { for: "breadcrumb-menu", tabIndex: 0, onKeyDown: e => {
|
|
92
92
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
93
93
|
e.preventDefault();
|
|
94
94
|
this.handleBreadcrumbItemClick();
|
|
@@ -99,7 +99,7 @@ export class PostBreadcrumbs {
|
|
|
99
99
|
linkElement?.click();
|
|
100
100
|
e.preventDefault();
|
|
101
101
|
}
|
|
102
|
-
} }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map(item => (h("li", null, h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text))))), this.lastItem && (h("li", { key: '
|
|
102
|
+
} }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map(item => (h("li", null, h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text))))), this.lastItem && (h("li", { key: 'a615757d04c4d20ba5fea30ffb936392158b051a', "aria-current": "page" }, h("post-breadcrumb-item", { key: '979be47b183c2c84b142e68ed9f224d9b74c6b62', url: this.lastItem.url, tabindex: -1 }, this.lastItem.text)))), h("div", { key: 'f15ed4ba71b7c42711b09f4dee0ef81f08ef7b87', class: "hidden-items" }, h("a", { key: '52fde1b41eb7aa49a1bb5c2bfffcb0e97a16b7af', href: this.homeUrl, class: "hidden-breadcrumb-item" }, h("span", { key: 'fe3ebb1bf3e8142e269142da1f5350b667752e63', class: "visually-hidden" }, this.homeText), h("post-icon", { key: 'b48e08fdf3f39268812a6dfb79af2d337d1955cf', name: "home", class: "home-icon" })), this.breadcrumbItems.map(item => (h("post-breadcrumb-item", { url: item.url, key: `hidden-${item.url || item.text}`, class: "hidden-breadcrumb-item" }, item.text)))))));
|
|
103
103
|
}
|
|
104
104
|
static get is() { return "post-breadcrumbs"; }
|
|
105
105
|
static get encapsulation() { return "shadow"; }
|
|
@@ -132,7 +132,7 @@ export class PostBreadcrumbs {
|
|
|
132
132
|
},
|
|
133
133
|
"getter": false,
|
|
134
134
|
"setter": false,
|
|
135
|
-
"reflect":
|
|
135
|
+
"reflect": true
|
|
136
136
|
},
|
|
137
137
|
"homeText": {
|
|
138
138
|
"type": "string",
|
|
@@ -151,7 +151,7 @@ export class PostBreadcrumbs {
|
|
|
151
151
|
},
|
|
152
152
|
"getter": false,
|
|
153
153
|
"setter": false,
|
|
154
|
-
"reflect":
|
|
154
|
+
"reflect": true
|
|
155
155
|
},
|
|
156
156
|
"label": {
|
|
157
157
|
"type": "string",
|
|
@@ -170,7 +170,7 @@ export class PostBreadcrumbs {
|
|
|
170
170
|
},
|
|
171
171
|
"getter": false,
|
|
172
172
|
"setter": false,
|
|
173
|
-
"reflect":
|
|
173
|
+
"reflect": true
|
|
174
174
|
},
|
|
175
175
|
"menuLabel": {
|
|
176
176
|
"type": "string",
|
|
@@ -189,7 +189,7 @@ export class PostBreadcrumbs {
|
|
|
189
189
|
},
|
|
190
190
|
"getter": false,
|
|
191
191
|
"setter": false,
|
|
192
|
-
"reflect":
|
|
192
|
+
"reflect": true
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
195
|
}
|
|
@@ -229,14 +229,14 @@ export class PostCardControl {
|
|
|
229
229
|
this.hasIcon = Boolean(this.host.querySelector('[slot="icon"]') || this.icon);
|
|
230
230
|
}
|
|
231
231
|
render() {
|
|
232
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: '0470b9fc76aff7a9a9dd653ddc341cdea5a3415e', "data-version": version, onClick: this.cardClickHandler }, h("div", { key: 'ea805dc02529b0fcd50ed8492e5b2ad644f8cc16', class: {
|
|
233
233
|
'card-control': true,
|
|
234
234
|
'is-checked': this.checked,
|
|
235
235
|
'is-disabled': this.disabled,
|
|
236
236
|
'is-focused': this.focused,
|
|
237
237
|
'is-valid': this.validity !== undefined && this.validity !== false,
|
|
238
238
|
'is-invalid': this.validity === false,
|
|
239
|
-
} }, h("input", { key: '
|
|
239
|
+
} }, h("input", { key: '85e1731187a23168e41f6363cca308d3787f8aef', ref: el => (this.control = el), id: this.controlId, class: "card-control--input", type: this.type, name: this.name, value: this.value, checked: this.checked, "aria-describedby": `${this.controlId}_content`, "aria-disabled": this.disabled, "aria-invalid": this.validity === false, onClick: this.controlClickHandler, onInput: this.controlChangeHandler, onChange: this.controlChangeHandler, onFocus: this.controlFocusHandler, onBlur: this.controlFocusHandler, onKeyDown: this.controlKeyDownHandler }), h("label", { key: '8709e6122631d3a57978a1902fcfbb99f56552c4', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label" }, this.label, this.description ? (h("div", { class: "card-control--description" }, this.description)) : null), this.hasIcon ? (h("div", { class: "card-control--icon" }, h("slot", { name: "icon" }, this.icon ? h("post-icon", { name: this.icon }) : null))) : null, h("div", { key: '4734cefea7fd9497190a800298566ec092278800', id: `${this.controlId}_content`, class: "card-control--content" }, h("slot", { key: '610e3d926336d7984fafed199102fdf5e314b654' })))));
|
|
240
240
|
}
|
|
241
241
|
componentDidRender() {
|
|
242
242
|
this.setHostContext();
|
|
@@ -332,7 +332,7 @@ export class PostCardControl {
|
|
|
332
332
|
},
|
|
333
333
|
"getter": false,
|
|
334
334
|
"setter": false,
|
|
335
|
-
"reflect":
|
|
335
|
+
"reflect": true
|
|
336
336
|
},
|
|
337
337
|
"name": {
|
|
338
338
|
"type": "string",
|
|
@@ -12,15 +12,16 @@ import { h, Host } from "@stencil/core";
|
|
|
12
12
|
import { version } from "../../../../package";
|
|
13
13
|
import { checkRequiredAndType, EventFrom, getRoot } from "../../utils/index";
|
|
14
14
|
export class PostCollapsibleTrigger {
|
|
15
|
-
constructor() {
|
|
16
|
-
this.observer = new MutationObserver(() => this.setTrigger());
|
|
17
|
-
}
|
|
18
15
|
/**
|
|
19
16
|
* Set the "aria-controls" and "aria-expanded" attributes on the trigger to match the state of the controlled post-collapsible
|
|
20
17
|
*/
|
|
21
18
|
validateAriaAttributes() {
|
|
22
19
|
checkRequiredAndType(this, 'for', 'string');
|
|
23
20
|
}
|
|
21
|
+
constructor() {
|
|
22
|
+
this.observer = new MutationObserver(() => this.setTrigger());
|
|
23
|
+
this.handlePostToggle = this.handlePostToggle.bind(this);
|
|
24
|
+
}
|
|
24
25
|
/**
|
|
25
26
|
* Initiate a mutation observer that updates the trigger whenever necessary
|
|
26
27
|
*/
|
|
@@ -37,7 +38,7 @@ export class PostCollapsibleTrigger {
|
|
|
37
38
|
}
|
|
38
39
|
disconnectedCallback() {
|
|
39
40
|
this.observer.disconnect();
|
|
40
|
-
this.root
|
|
41
|
+
this.root?.removeEventListener('postToggle', this.handlePostToggle);
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
44
|
* Update the "aria-controls" and "aria-expanded" attributes on the trigger button
|
|
@@ -96,7 +97,7 @@ export class PostCollapsibleTrigger {
|
|
|
96
97
|
this.updateAriaAttributes();
|
|
97
98
|
}
|
|
98
99
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
100
|
+
return (h(Host, { key: '1cd00cfdb29b9ce191b8eb1fe6a91ddab412d006', "data-version": version }, h("slot", { key: 'b0625b4f2074852609d4a3dd700c04e01fa34d0a' })));
|
|
100
101
|
}
|
|
101
102
|
static get is() { return "post-collapsible-trigger"; }
|
|
102
103
|
static get encapsulation() { return "shadow"; }
|
|
@@ -54,7 +54,7 @@ export class PostFooter {
|
|
|
54
54
|
return GRID_SLOTS.map(slotName => (h("div", { class: { 'd-none': !this.gridSlotDisplayed[slotName] } }, h("slot", { onSlotchange: this.handleGridSlotChange('tablet', 'desktop'), name: slotName }))));
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return (h(Host, { key: '
|
|
57
|
+
return (h(Host, { key: '5fc11a9cde5e0180c20c27e53fb177ecc9a49d78', "data-version": version, "data-color-scheme": "light" }, h("footer", { key: 'a844ab0ee3ef02c5266a6b259f6869ecb68f26cd' }, h("h2", { key: '543414f0394b276d5c8c22f2839f3afcd1d10575', class: "visually-hidden" }, this.label), h("div", { key: '6d6f38e761a134a39b5b5ed863c6832a5fc1f9a8', class: "footer-container" }, h("div", { key: '2c13938bb4bc9def54eb579207f1f5742b937aac', class: "footer-grid" }, this.device === 'mobile' ? this.renderAccordion() : this.renderColumns()), h("div", { key: 'cf097034f1987afa77d9646c51d8b8a1ae697e5b', class: "footer-column" }, h("div", { key: '4f47baa37bd3efe1f1fd3a0e5725106618eebe03', class: "footer-socialmedia" }, h("slot", { key: 'eccb942dcc1c20cf335cda88b18979fe4d80b431', name: "socialmedia" })), h("div", { key: 'b6aaff5655c50ef59679cd94dc15a53127e08ddc', class: "footer-app" }, h("slot", { key: 'd74e9e912a67747efd5413171d10ae7558e75da5', name: "app" }))), h("div", { key: '71ba540f7ce2ac65359eadc6b03a9b809c3deb82', class: "footer-businesssectors" }, h("slot", { key: 'bc5947b45a37132765526952127c03058fa33b90', name: "businesssectors" })), h("div", { key: '287b6ed9ed686a743d57709e8be4a85d1b7c3837', class: "footer-meta" }, h("slot", { key: 'ce5d85389422fe1b0fc231a32f96f60ac7d20459', name: "meta" })), h("div", { key: '2da10dc4c5923a697977a5eb6227c567df156de3', class: "footer-copyright" }, h("slot", { key: 'f6fb5282c228d33213c90141b51accff50ae233e', name: "copyright" }))))));
|
|
58
58
|
}
|
|
59
59
|
static get is() { return "post-footer"; }
|
|
60
60
|
static get encapsulation() { return "shadow"; }
|
|
@@ -87,7 +87,7 @@ export class PostFooter {
|
|
|
87
87
|
},
|
|
88
88
|
"getter": false,
|
|
89
89
|
"setter": false,
|
|
90
|
-
"reflect":
|
|
90
|
+
"reflect": true
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:host{--post-global-header-top: calc(var(--post-global-header-reduced-height) - var(--post-global-header-expanded-height));--post-header-top: calc(var(--post-header-reduced-height) - var(--post-header-expanded-height));--post-logo-height: calc(var(--post-global-header-expanded-height) - var(--post-header-scroll-top, 0px));--post-global-controls-top: clamp( /* 0 when header is static, large negative when header shrinks to enable offset */ 1000 * (var(--post-global-header-reduced-height) - var(--post-global-header-expanded-height)), calc(-1 * min(var(--post-header-scroll-top, 0px) / 4, var(--post-global-header-reduced-height))), 0px )}@media screen and (min-width: 1024px){:host{--post-header-gap: 0.25rem;--post-global-header-padding-inline-start: 0.25rem;--post-global-header-padding-inline-end: 0.5rem;--post-local-header-padding-inline-start: 0.75rem;--post-local-header-padding-inline-end: 0.5rem}}@media screen and (min-width: 600px)and (max-width: 1023.98px){:host{--post-header-gap: 0.75rem 0.25rem;--post-global-header-padding-inline-start: 0.25rem;--post-global-header-padding-inline-end: 0.25rem;--post-local-header-padding-inline-start: 0.75rem;--post-local-header-padding-inline-end: 0.25rem;--post-local-header-padding-block: 0rem;--post-burger-menu-padding-inline: 2.5rem;--post-burger-menu-body-gap: 2rem;--post-burger-menu-footer-gap: 1.5rem}}@media screen and (min-width: 600px)and (max-width: 779.98px){:host{--post-burger-menu-padding-inline: 1rem}}@media screen and (min-width: 0)and (max-width: 599.98px){:host{--post-header-gap: 0.75rem 0.25rem;--post-global-header-padding-inline-start: 0rem;--post-global-header-padding-inline-end: 0.5rem;--post-local-header-padding-inline-start: 0.5rem;--post-local-header-padding-inline-end: 0.5rem;--post-local-header-padding-block: 0rem;--post-burger-menu-padding-inline: 1rem;--post-burger-menu-body-gap: 1.5rem;--post-burger-menu-footer-gap: 1rem}}:host([data-expanded]){--post-header-top: 0;--post-global-header-top: 0;--post-global-controls-top: 0;--post-logo-height: var(--post-global-header-expanded-height)}*,::before,::after{box-sizing:border-box}:host,.global-header,.local-header{transition:inset-block-start 150ms cubic-bezier(0.4, 0, 0.2, 1)}.global-header,.local-header,.burger-menu{box-shadow:var(--post-device-elevation-300)}.global-header,.sliding-controls,.local-header,.navigation{display:flex;align-items:center;justify-content:space-between;gap:var(--post-header-gap)}:host{container-type:inline-size;display:block;position:sticky;inset-block-start:var(--post-header-top);z-index:1020}.global-header{z-index:2;position:sticky;inset-block-start:var(--post-global-header-top);background-color:#fc0;height:var(--post-global-header-expanded-height);padding-inline-start:var(--post-global-header-padding-inline-start);padding-inline-end:var(--post-global-header-padding-inline-end)}.global-header:has(~.local-header:not(.no-title.no-navigation)),.global-header:has(~.burger-menu.extended){box-shadow:none}.global-header .logo{align-self:flex-end;width:var(--post-global-header-expanded-height);height:var(--post-logo-height);min-height:var(--post-global-header-reduced-height);max-height:100%;margin-inline-end:1.25rem}.global-header .sliding-controls{flex-grow:1;justify-content:flex-end;position:relative;inset-block-start:var(--post-global-controls-top)}.global-header .target-group{margin-inline-end:auto}.global-header.no-target-group .target-group{display:none}.local-header{position:relative;flex-wrap:wrap;background-color:#fff;min-height:var(--post-local-header-expanded-min-height);padding-inline-start:var(--post-local-header-padding-inline-start);padding-inline-end:var(--post-local-header-padding-inline-end);padding-block:var(--post-local-header-padding-block)}.local-header:not(.no-title,.no-navigation){padding-block-start:1.125rem}.local-header.no-title.no-navigation{display:none}.local-header:has(.navigation.megadropdown-open),.local-header:has(~.burger-menu.extended){box-shadow:none}.local-header:has(.navigation.megadropdown-open)::after,.local-header:has(~.burger-menu.extended)::after{content:"";display:block;position:absolute;inset-inline:0;inset-block-end:0;height:1px;background-color:#e1e0dc}.local-header .navigation{flex:1 0 100%;height:var(--post-main-navigation-height);margin-inline-start:calc(-1*var(--post-local-header-padding-inline-start));max-width:100cqw}.local-header.no-navigation .navigation{display:none}.local-header .navigation-controls{flex:0 0 auto}.local-header.no-navigation-controls .navigation{margin-inline-end:calc(-1*var(--post-local-header-padding-inline-end))}.local-header.no-navigation-controls .navigation-controls{display:none}.burger-menu{z-index:-1;position:absolute;inset-inline:0;inset-block-start:100%;height:calc(min(var(--post-header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height));overflow:hidden auto;display:flex;flex-direction:column;background-color:#fafafa}.burger-menu:not(.extended){transform:translateY(-100%)}.burger-menu:not(.extended)>*{display:none}.burger-menu .burger-menu-body,.burger-menu .burger-menu-footer{display:flex;flex-direction:column;padding-inline:var(--post-burger-menu-padding-inline)}.burger-menu .burger-menu-body{flex-grow:1;padding-block:1.5rem;gap:var(--post-burger-menu-body-gap)}.burger-menu .burger-menu-footer{background-color:#f0efed;padding-block:1rem 1.5rem;gap:var(--post-burger-menu-footer-gap)}.burger-menu .navigation-controls{height:3.5rem;display:flex;align-items:center;justify-content:flex-end;padding-inline:.25rem}.burger-menu.no-navigation-controls .navigation-controls{display:none}
|
|
@@ -19,17 +19,17 @@ import { EventFrom } from "../../utils/event-from";
|
|
|
19
19
|
* @slot post-logo - Should be used together with the `<post-logo>` component.
|
|
20
20
|
* @slot global-controls - Holds search button in the global header.
|
|
21
21
|
* @slot meta-navigation - Holds an `<ul>` with meta navigation links.
|
|
22
|
-
* @slot post-togglebutton - Holds the
|
|
22
|
+
* @slot post-togglebutton - Holds the burger menu toggler.
|
|
23
23
|
* @slot post-language-switch - Should be used with the `<post-language-switch>` component.
|
|
24
24
|
* @slot title - Holds the application title.
|
|
25
|
-
* @slot
|
|
25
|
+
* @slot local-controls - Custom controls or content, right aligned in the local header.
|
|
26
26
|
* @slot post-mainnavigation - Has a default slot because it's only meant to be used in the `<post-header>`.
|
|
27
27
|
* @slot target-group - Holds the list of buttons to choose the target group.
|
|
28
28
|
* @slot global-login - Holds the user menu or login button in the global header.
|
|
29
29
|
* @slot navigation-controls - Custom controls, right aligned with the main navigation.
|
|
30
30
|
*/
|
|
31
31
|
export class PostHeader {
|
|
32
|
-
get
|
|
32
|
+
get hasBurgerMenu() {
|
|
33
33
|
return this.device !== 'desktop' && this.hasNavigation;
|
|
34
34
|
}
|
|
35
35
|
get scrollParent() {
|
|
@@ -48,8 +48,8 @@ export class PostHeader {
|
|
|
48
48
|
}
|
|
49
49
|
lockBody(newValue, _oldValue, propName) {
|
|
50
50
|
const scrollParent = this.scrollParent;
|
|
51
|
-
const
|
|
52
|
-
if (this.device !== 'desktop' &&
|
|
51
|
+
const burgerMenuExtended = propName === 'burgerMenuExtended' ? newValue : this.burgerMenuExtended;
|
|
52
|
+
if (this.device !== 'desktop' && burgerMenuExtended) {
|
|
53
53
|
scrollParent.setAttribute('data-post-scroll-locked', '');
|
|
54
54
|
this.host.addEventListener('keydown', this.keyboardHandler);
|
|
55
55
|
}
|
|
@@ -62,14 +62,16 @@ export class PostHeader {
|
|
|
62
62
|
this.throttledResize = throttle(50, () => this.updateLocalHeaderHeight());
|
|
63
63
|
this.device = breakpoint.get('device');
|
|
64
64
|
this.hasNavigation = false;
|
|
65
|
+
this.hasNavigationControls = false;
|
|
66
|
+
this.hasTargetGroup = false;
|
|
65
67
|
this.hasTitle = false;
|
|
66
|
-
this.
|
|
68
|
+
this.burgerMenuExtended = false;
|
|
67
69
|
this.megadropdownOpen = false;
|
|
68
70
|
this.breakpointChange = (e) => {
|
|
69
71
|
this.device = e.detail;
|
|
70
72
|
this.switchLanguageSwitchMode();
|
|
71
|
-
if (this.device === 'desktop' && this.
|
|
72
|
-
this.
|
|
73
|
+
if (this.device === 'desktop' && this.burgerMenuExtended) {
|
|
74
|
+
this.closeBurgerMenu();
|
|
73
75
|
}
|
|
74
76
|
if (this.device !== 'desktop') {
|
|
75
77
|
Array.from(this.host.querySelectorAll('post-megadropdown')).forEach(dropdown => {
|
|
@@ -86,6 +88,7 @@ export class PostHeader {
|
|
|
86
88
|
this.updateLocalHeaderHeight = this.updateLocalHeaderHeight.bind(this);
|
|
87
89
|
this.keyboardHandler = this.keyboardHandler.bind(this);
|
|
88
90
|
this.handleLinkClick = this.handleLinkClick.bind(this);
|
|
91
|
+
this.checkSlottedContent = this.checkSlottedContent.bind(this);
|
|
89
92
|
}
|
|
90
93
|
connectedCallback() {
|
|
91
94
|
window.addEventListener('resize', this.throttledResize, { passive: true });
|
|
@@ -98,14 +101,13 @@ export class PostHeader {
|
|
|
98
101
|
document.addEventListener('postToggleMegadropdown', this.megadropdownStateHandler);
|
|
99
102
|
this.host.addEventListener('click', this.handleLinkClick);
|
|
100
103
|
window.addEventListener('postBreakpoint:device', this.breakpointChange);
|
|
101
|
-
this.checkNavigationExistence();
|
|
102
|
-
this.checkTitleExistence();
|
|
103
|
-
this.switchLanguageSwitchMode();
|
|
104
104
|
this.handleScrollParentResize();
|
|
105
|
-
this.lockBody(false, this.
|
|
105
|
+
this.lockBody(false, this.burgerMenuExtended, 'burgerMenuExtended');
|
|
106
106
|
}
|
|
107
107
|
componentWillRender() {
|
|
108
108
|
this.handleScrollEvent();
|
|
109
|
+
this.handleSlottedContentChanges();
|
|
110
|
+
this.switchLanguageSwitchMode();
|
|
109
111
|
}
|
|
110
112
|
componentDidRender() {
|
|
111
113
|
this.getFocusableElements();
|
|
@@ -133,51 +135,50 @@ export class PostHeader {
|
|
|
133
135
|
this.localHeaderResizeObserver.disconnect();
|
|
134
136
|
this.localHeaderResizeObserver = null;
|
|
135
137
|
}
|
|
136
|
-
this.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
checkTitleExistence() {
|
|
142
|
-
this.hasTitle = this.host.querySelectorAll('[slot="title"]').length > 0;
|
|
138
|
+
if (this.slottedContentObserver) {
|
|
139
|
+
this.slottedContentObserver.disconnect();
|
|
140
|
+
this.slottedContentObserver = null;
|
|
141
|
+
}
|
|
142
|
+
this.burgerMenuExtended = false;
|
|
143
143
|
}
|
|
144
|
-
async
|
|
145
|
-
this.
|
|
144
|
+
async closeBurgerMenu() {
|
|
145
|
+
this.burgerMenuAnimation.finish();
|
|
146
146
|
const menuButton = this.getMenuButton();
|
|
147
147
|
if (menuButton) {
|
|
148
148
|
menuButton.toggled = false;
|
|
149
149
|
}
|
|
150
|
-
this.
|
|
150
|
+
this.burgerMenuExtended = false;
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
|
-
* Toggles the
|
|
153
|
+
* Toggles the burger navigation menu.
|
|
154
154
|
*/
|
|
155
|
-
async
|
|
155
|
+
async toggleBurgerMenu(force) {
|
|
156
156
|
if (this.device === 'desktop')
|
|
157
157
|
return;
|
|
158
|
-
this.
|
|
159
|
-
? slideUp(this.
|
|
160
|
-
: slideDown(this.
|
|
158
|
+
this.burgerMenuAnimation = this.burgerMenuExtended
|
|
159
|
+
? slideUp(this.burgerMenu)
|
|
160
|
+
: slideDown(this.burgerMenu);
|
|
161
161
|
// Update the state of the toggle button
|
|
162
162
|
const menuButton = this.host.querySelector('post-togglebutton');
|
|
163
|
-
menuButton
|
|
164
|
-
|
|
163
|
+
if (menuButton)
|
|
164
|
+
menuButton.toggled = force ?? !this.burgerMenuExtended;
|
|
165
|
+
if (this.burgerMenuExtended) {
|
|
165
166
|
// Wait for the close animation to finish before hiding megadropdowns
|
|
166
|
-
await this.
|
|
167
|
-
this.
|
|
168
|
-
if (this.
|
|
167
|
+
await this.burgerMenuAnimation.finished;
|
|
168
|
+
this.burgerMenuExtended = force ?? !this.burgerMenuExtended;
|
|
169
|
+
if (this.burgerMenuExtended === false) {
|
|
169
170
|
this.closeAllMegadropdowns();
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
173
|
else {
|
|
173
|
-
this.
|
|
174
|
+
this.burgerMenuExtended = force ?? !this.burgerMenuExtended;
|
|
174
175
|
// If opening, close any open megadropdowns immediately
|
|
175
176
|
if (this.megadropdownOpen) {
|
|
176
177
|
this.closeAllMegadropdowns();
|
|
177
178
|
}
|
|
178
179
|
}
|
|
179
180
|
}
|
|
180
|
-
// Get all the focusable elements in the post-header
|
|
181
|
+
// Get all the focusable elements in the post-header burger menu
|
|
181
182
|
getFocusableElements() {
|
|
182
183
|
// Get elements in the correct order (different as the DOM order)
|
|
183
184
|
const focusableEls = [
|
|
@@ -197,7 +198,7 @@ export class PostHeader {
|
|
|
197
198
|
return this.host.querySelector('post-togglebutton');
|
|
198
199
|
}
|
|
199
200
|
keyboardHandler(e) {
|
|
200
|
-
if (e.key === 'Tab' && this.
|
|
201
|
+
if (e.key === 'Tab' && this.burgerMenuExtended) {
|
|
201
202
|
if (e.shiftKey && document.activeElement === this.firstFocusableEl) {
|
|
202
203
|
// If back tab (Tab + Shift) and first element is focused, focus goes to the last element of the megadropdown
|
|
203
204
|
e.preventDefault();
|
|
@@ -218,7 +219,7 @@ export class PostHeader {
|
|
|
218
219
|
}
|
|
219
220
|
handleScrollEvent() {
|
|
220
221
|
const scrollTop = this.scrollParent === document.body ? window.scrollY : this.scrollParent.scrollTop;
|
|
221
|
-
document.documentElement.style.setProperty('--post-header-scroll-top', `${scrollTop}px`);
|
|
222
|
+
document.documentElement.style.setProperty('--post-header-scroll-top', `${Math.max(scrollTop, 0)}px`);
|
|
222
223
|
}
|
|
223
224
|
updateLocalHeaderHeight() {
|
|
224
225
|
const localHeaderElement = this.host.shadowRoot.querySelector('.local-header');
|
|
@@ -236,8 +237,8 @@ export class PostHeader {
|
|
|
236
237
|
if (!isLinkInMainNav && !isLinkInMegadropdown) {
|
|
237
238
|
return;
|
|
238
239
|
}
|
|
239
|
-
if (this.
|
|
240
|
-
this.
|
|
240
|
+
if (this.burgerMenuExtended && (isLinkInMainNav || isLinkInMegadropdown)) {
|
|
241
|
+
this.toggleBurgerMenu(false);
|
|
241
242
|
}
|
|
242
243
|
if (this.device === 'desktop' && isLinkInMegadropdown) {
|
|
243
244
|
const megadropdownLink = target.closest('post-megadropdown a');
|
|
@@ -259,28 +260,60 @@ export class PostHeader {
|
|
|
259
260
|
this.localHeaderResizeObserver.observe(localHeader);
|
|
260
261
|
}
|
|
261
262
|
}
|
|
263
|
+
handleSlottedContentChanges() {
|
|
264
|
+
if (!this.slottedContentObserver) {
|
|
265
|
+
this.checkSlottedContent();
|
|
266
|
+
this.slottedContentObserver = new MutationObserver(this.checkSlottedContent);
|
|
267
|
+
this.slottedContentObserver.observe(this.host, { childList: true });
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
checkSlottedContent() {
|
|
271
|
+
this.hasNavigation = !!this.host.querySelector('[slot="post-mainnavigation"]');
|
|
272
|
+
this.hasNavigationControls = !!this.host.querySelector('[slot="navigation-controls"]');
|
|
273
|
+
this.hasTargetGroup = !!this.host.querySelector('[slot="target-group"]');
|
|
274
|
+
this.hasTitle = !!this.host.querySelector('[slot="title"]');
|
|
275
|
+
}
|
|
262
276
|
switchLanguageSwitchMode() {
|
|
263
|
-
const variant = this.
|
|
277
|
+
const variant = this.hasBurgerMenu ? 'list' : 'menu';
|
|
264
278
|
Array.from(this.host.querySelectorAll('post-language-switch')).forEach(languageSwitch => {
|
|
265
279
|
languageSwitch?.setAttribute('variant', variant);
|
|
266
280
|
});
|
|
267
281
|
}
|
|
282
|
+
onFocusChange() {
|
|
283
|
+
const fixedElements = this.device === 'desktop' ? '.logo, .navigation' : '.global-header, .burger-menu';
|
|
284
|
+
const isHeaderExpanded = this.host.matches(':focus-within') &&
|
|
285
|
+
!this.host.shadowRoot.querySelector(`:where(${fixedElements}):focus-within`);
|
|
286
|
+
if (isHeaderExpanded) {
|
|
287
|
+
this.host.setAttribute('data-expanded', '');
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
this.host.removeAttribute('data-expanded');
|
|
291
|
+
}
|
|
292
|
+
}
|
|
268
293
|
renderNavigation() {
|
|
269
|
-
const mainNavigation = (h("slot", { name: "post-mainnavigation", onSlotchange: () => this.checkNavigationExistence() }));
|
|
270
294
|
if (this.device === 'desktop') {
|
|
271
|
-
return (h("div", { class: { 'navigation': true, 'megadropdown-open': this.megadropdownOpen } },
|
|
295
|
+
return (h("div", { class: { 'navigation': true, 'megadropdown-open': this.megadropdownOpen } }, h("slot", { name: "post-mainnavigation" }), h("div", { class: "navigation-controls" }, h("slot", { name: "navigation-controls" }))));
|
|
272
296
|
}
|
|
273
|
-
return (h("div", { class: {
|
|
297
|
+
return (h("div", { class: {
|
|
298
|
+
'burger-menu': true,
|
|
299
|
+
'extended': this.burgerMenuExtended,
|
|
300
|
+
'no-navigation-controls': !this.hasNavigationControls,
|
|
301
|
+
}, style: { '--post-header-navigation-current-inset': `${this.burgerMenu?.scrollTop ?? 0}px` }, ref: el => (this.burgerMenu = el) }, h("div", { class: "navigation-controls" }, h("slot", { name: "navigation-controls" })), h("div", { class: "burger-menu-body" }, h("slot", { name: "target-group" }), h("slot", { name: "post-mainnavigation" })), h("div", { class: "burger-menu-footer" }, h("slot", { name: "meta-navigation" }), h("slot", { name: "post-language-switch" }))));
|
|
274
302
|
}
|
|
275
303
|
render() {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
304
|
+
return (h(Host, { key: 'c9b1c1a946800f728a7a90a91dff3abf23b5100f', "data-version": version, "data-color-scheme": "light", "data-burger-menu": this.hasBurgerMenu }, h("div", { key: '21d2b9bd39946df7e42d3d5c763d40cd1dabee69', class: {
|
|
305
|
+
'global-header': true,
|
|
306
|
+
'no-target-group': !this.hasTargetGroup,
|
|
307
|
+
} }, h("div", { key: '50cf30a8febea656eb3349e6c06dc5b609b13a6d', class: "logo" }, h("slot", { key: 'df1ecaca7b39316ef4d4bb56e33c3214b2648e68', name: "post-logo" })), h("div", { key: '9c4319dce10d9e98291a6cbdb0effb854a8b6dac', class: "sliding-controls" }, this.device === 'desktop' && (h("div", { key: 'ce916d4bdb65c641e58725f70b7689704847593c', class: "target-group" }, h("slot", { key: '810e4164ae17b8571011799307f3688cf64b5c30', name: "target-group" }))), h("slot", { key: 'abe6f2e08e87295e88e4cf33db0e72021d622aaf', name: "global-controls" }), !this.hasBurgerMenu && [
|
|
308
|
+
h("slot", { key: '4ef5603837d0f26c25dd50bf17bb0011dc927de0', name: "meta-navigation" }),
|
|
309
|
+
h("slot", { key: 'b1bc83f1bd5004af89e444a9bdf487225ac882d7', name: "post-language-switch" }),
|
|
310
|
+
], h("slot", { key: '11dfd54337cf457bc25ec680c8d4e11a6712dc63', name: "global-login" }), this.hasNavigation && this.device !== 'desktop' && (h("div", { key: '67658d80ce90f4446ea8d1078937101a299536b8', onClick: () => this.toggleBurgerMenu(), class: "burger-menu-toggle" }, h("slot", { key: '2fdba487922c63db152ec08e3382640c9cdf1c12', name: "post-togglebutton" }))))), h("div", { key: '1516e38c9628d8cfb75d6f9bd55912071da5e94e', class: {
|
|
311
|
+
'local-header': true,
|
|
312
|
+
'no-title': !this.hasTitle,
|
|
313
|
+
'no-target-group': !this.hasTargetGroup,
|
|
314
|
+
'no-navigation': this.device !== 'desktop' || !this.hasNavigation,
|
|
315
|
+
'no-navigation-controls': !this.hasNavigationControls,
|
|
316
|
+
} }, h("slot", { key: '839b34249ece8af5cc53231271e739a6a664a977', name: "title" }), this.hasTitle && h("slot", { key: 'aa281968b58ecad425beb1b4ffbd1273cc167ea4', name: "local-controls" }), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
|
|
284
317
|
}
|
|
285
318
|
static get is() { return "post-header"; }
|
|
286
319
|
static get encapsulation() { return "shadow"; }
|
|
@@ -298,14 +331,16 @@ export class PostHeader {
|
|
|
298
331
|
return {
|
|
299
332
|
"device": {},
|
|
300
333
|
"hasNavigation": {},
|
|
334
|
+
"hasNavigationControls": {},
|
|
335
|
+
"hasTargetGroup": {},
|
|
301
336
|
"hasTitle": {},
|
|
302
|
-
"
|
|
337
|
+
"burgerMenuExtended": {},
|
|
303
338
|
"megadropdownOpen": {}
|
|
304
339
|
};
|
|
305
340
|
}
|
|
306
341
|
static get methods() {
|
|
307
342
|
return {
|
|
308
|
-
"
|
|
343
|
+
"toggleBurgerMenu": {
|
|
309
344
|
"complexType": {
|
|
310
345
|
"signature": "(force?: boolean) => Promise<void>",
|
|
311
346
|
"parameters": [{
|
|
@@ -326,7 +361,7 @@ export class PostHeader {
|
|
|
326
361
|
"return": "Promise<void>"
|
|
327
362
|
},
|
|
328
363
|
"docs": {
|
|
329
|
-
"text": "Toggles the
|
|
364
|
+
"text": "Toggles the burger navigation menu.",
|
|
330
365
|
"tags": []
|
|
331
366
|
}
|
|
332
367
|
}
|
|
@@ -338,10 +373,25 @@ export class PostHeader {
|
|
|
338
373
|
"propName": "device",
|
|
339
374
|
"methodName": "lockBody"
|
|
340
375
|
}, {
|
|
341
|
-
"propName": "
|
|
376
|
+
"propName": "burgerMenuExtended",
|
|
342
377
|
"methodName": "lockBody"
|
|
343
378
|
}];
|
|
344
379
|
}
|
|
380
|
+
static get listeners() {
|
|
381
|
+
return [{
|
|
382
|
+
"name": "focusin",
|
|
383
|
+
"method": "onFocusChange",
|
|
384
|
+
"target": undefined,
|
|
385
|
+
"capture": false,
|
|
386
|
+
"passive": false
|
|
387
|
+
}, {
|
|
388
|
+
"name": "focusout",
|
|
389
|
+
"method": "onFocusChange",
|
|
390
|
+
"target": undefined,
|
|
391
|
+
"capture": false,
|
|
392
|
+
"passive": false
|
|
393
|
+
}];
|
|
394
|
+
}
|
|
345
395
|
}
|
|
346
396
|
__decorate([
|
|
347
397
|
EventFrom('post-megadropdown')
|
|
@@ -112,7 +112,7 @@ export class PostIcon {
|
|
|
112
112
|
this.validateAnimation();
|
|
113
113
|
}
|
|
114
114
|
render() {
|
|
115
|
-
return (h(Host, { key: '
|
|
115
|
+
return (h(Host, { key: '7ce1f627f621201c0f4d6e90ee3d8d6d3c32798a', "data-version": version }, h("span", { key: '987ecd266b8bd68bdbb06cdb500a746b913e79b1', style: this.getStyles() })));
|
|
116
116
|
}
|
|
117
117
|
static get is() { return "post-icon"; }
|
|
118
118
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
post-language-option{display:inline-block}post-language-option button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option button{background-color:ButtonFace !important}post-language-option button:hover{background-color:Highlight !important}}post-language-option button .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-language-option a{color:var(--post-current-fg);text-decoration:none}post-language-option :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;text-transform:uppercase}post-language-option :is(a,button){outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;
|
|
1
|
+
post-language-option{display:inline-block}post-language-option button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option button{background-color:ButtonFace !important}post-language-option button:hover{background-color:Highlight !important}}post-language-option button .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-language-option a{color:var(--post-current-fg);text-decoration:none}post-language-option :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;text-transform:uppercase}post-language-option :is(a,button){outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-language-option :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-language-option:where([variant=list]) :is(a,button){padding-inline:0;width:40px;height:40px;border-radius:2px}post-language-option:where([variant=list]) :is(a,button):hover{color:#504f4b}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option:where([variant=list]) :is(a,button){border:1px solid ButtonBorder;color:ButtonText}}post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:#050400 !important;color:#fff;pointer-events:none}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:Highlight !important;color:HighlightText}}post-language-option:where([variant=menu]){min-width:72px}post-language-option:where([variant=menu])[active]:not([active=false]){display:none}post-language-option:where([variant=menu]) :is(a,button){padding-block:13px;padding-inline:16px;box-sizing:border-box;justify-content:flex-start;position:relative;border-radius:0}post-language-option:where([variant=menu]) :is(a,button):hover{color:#fff;background-color:#504f4b}post-language-option:where([variant=menu]):first-child :is(a,button){border-start-start-radius:4px;border-start-end-radius:4px}post-language-option:where([variant=menu]):last-child :is(a,button){border-end-start-radius:4px;border-end-end-radius:4px}
|
|
@@ -49,7 +49,7 @@ export class PostLanguageOption {
|
|
|
49
49
|
this.emitChange();
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: '06ba54de702d5014b34f1b0cb6396cb947ac3ca6', "data-version": version, role: this.variant === 'list' ? 'listitem' : undefined }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null), h("span", { class: "visually-hidden" }, this.name))) : (h("button", { "aria-current": this.active ? 'true' : undefined, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null), h("span", { class: "visually-hidden" }, this.name)))));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "post-language-option"; }
|
|
55
55
|
static get originalStyleUrls() {
|
|
@@ -81,7 +81,7 @@ export class PostLanguageOption {
|
|
|
81
81
|
},
|
|
82
82
|
"getter": false,
|
|
83
83
|
"setter": false,
|
|
84
|
-
"reflect":
|
|
84
|
+
"reflect": true
|
|
85
85
|
},
|
|
86
86
|
"active": {
|
|
87
87
|
"type": "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:flex !important;flex-wrap:wrap;gap:.5rem}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 10px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:24px;width:24px}.post-language-switch-trigger[aria-expanded=true]{background-color:#050400;color:#fff}.post-language-switch-trigger[aria-expanded=true] post-icon{transform:rotate(180deg)}.post-language-switch-trigger[aria-expanded=true]:hover{background-color:#504f4b;color:#fff}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{border:1px solid ButtonBorder}.post-language-switch-trigger[aria-expanded=true] post-icon,.post-language-switch-trigger:hover post-icon{color:HighlightText}}post-menu::part(menu){padding-block:0}
|
|
1
|
+
:host{display:flex !important;flex-wrap:wrap;gap:.5rem}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 10px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:24px;width:24px}.post-language-switch-trigger[aria-expanded=true]{background-color:#050400;color:#fff}.post-language-switch-trigger[aria-expanded=true] post-icon{transform:rotate(180deg)}.post-language-switch-trigger[aria-expanded=true]:hover{background-color:#504f4b;color:#fff}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{border:1px solid ButtonBorder}.post-language-switch-trigger[aria-expanded=true] post-icon,.post-language-switch-trigger:hover post-icon{color:HighlightText}}post-menu::part(menu){padding-block:0}.post-language-switch-list{margin-top:1rem}
|
|
@@ -116,7 +116,7 @@ export class PostLanguageSwitch {
|
|
|
116
116
|
},
|
|
117
117
|
"getter": false,
|
|
118
118
|
"setter": false,
|
|
119
|
-
"reflect":
|
|
119
|
+
"reflect": true
|
|
120
120
|
},
|
|
121
121
|
"description": {
|
|
122
122
|
"type": "string",
|
|
@@ -135,7 +135,7 @@ export class PostLanguageSwitch {
|
|
|
135
135
|
},
|
|
136
136
|
"getter": false,
|
|
137
137
|
"setter": false,
|
|
138
|
-
"reflect":
|
|
138
|
+
"reflect": true
|
|
139
139
|
},
|
|
140
140
|
"variant": {
|
|
141
141
|
"type": "string",
|
|
@@ -25,7 +25,7 @@ export class PostLinkarea {
|
|
|
25
25
|
this.mutationObserver.disconnect();
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: 'b52d413e897694e5d0a9364ecfd8fea4583014e3', "data-version": version, onClick: (e) => this.dispatchClick(e), tabindex: "0" }, h("slot", { key: 'b08cf1ee4c829d27fb166fc9e796d79e5388fe47' })));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "post-linkarea"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,7 +31,7 @@ export class PostList {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '85193bec2b2ff22ed76c93a4037f353b091192bc', "data-version": version }, h("div", { key: '32cdc5ccb95b48e3f81e90ac93f0207d935c9d3b', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: '890dd411e370a7829354dcaa00fae75e8f538f01' })), h("div", { key: '72867a1d81f2e186ed3d68f5185a46c7c96fdd3b', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: '2cd5a5e9ca717c675f9db3a19fbf13ff49a7312c', name: "post-list-item" }))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "post-list"; }
|
|
37
37
|
static get originalStyleUrls() {
|