@duetds/components 8.6.4 → 8.6.5
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/hydrate/index.js +20 -20
- package/lib/cjs/duet-caption_4.cjs.entry.js +6 -3
- package/lib/cjs/duet-footer.cjs.entry.js +17 -16
- package/lib/cjs/duet.cjs.js +1 -1
- package/lib/cjs/loader.cjs.js +1 -1
- package/lib/collection/components/duet-footer/duet-footer.css +23 -78
- package/lib/collection/components/duet-footer/duet-footer.e2e.js +14 -15
- package/lib/collection/components/duet-footer/duet-footer.js +23 -25
- package/lib/dist-custom-elements/duet-contact-card.js +1 -1
- package/lib/dist-custom-elements/duet-footer.js +39 -20
- package/lib/dist-custom-elements/duet-link.js +1 -1
- package/lib/dist-custom-elements/duet-upload-item.js +1 -1
- package/lib/dist-custom-elements/duet-upload.js +2 -2
- package/lib/dist-custom-elements/{p-43fc089a.js → p-5ac0e140.js} +1 -1
- package/lib/dist-custom-elements/{p-29b18cdf.js → p-f0225a59.js} +4 -1
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/p-1dc6e751.system.entry.js +4 -0
- package/lib/duet/p-584ab25c.entry.js +4 -0
- package/lib/duet/p-6151635f.system.js +1 -1
- package/lib/duet/p-884dd3a0.entry.js +4 -0
- package/lib/duet/p-e4f6002c.system.entry.js +4 -0
- package/lib/esm/duet-caption_4.entry.js +4 -1
- package/lib/esm/duet-footer.entry.js +17 -16
- package/lib/esm/duet.js +1 -1
- package/lib/esm/loader.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +2 -2
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/types/components/duet-footer/duet-footer.d.ts +5 -9
- package/lib/types/components.d.ts +2 -2
- package/package.json +3 -3
- package/lib/cjs/action-new-window-50c8aed0.js +0 -11
- package/lib/dist-custom-elements/p-8855e26a.js +0 -8
- package/lib/duet/p-00685523.entry.js +0 -4
- package/lib/duet/p-283d802c.entry.js +0 -4
- package/lib/duet/p-2ae2e883.system.entry.js +0 -4
- package/lib/duet/p-8855e26a.js +0 -4
- package/lib/duet/p-a46b4450.system.js +0 -4
- package/lib/duet/p-caf153e4.system.entry.js +0 -4
- package/lib/esm/action-new-window-9c8f7830.js +0 -8
- package/lib/esm-es5/action-new-window-9c8f7830.js +0 -4
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import arrowRightIcon from "@duetds/icons/lib/assets/action-arrow-right";
|
|
5
|
-
import newWindowIcon from "@duetds/icons/lib/assets/action-new-window";
|
|
6
4
|
import newWindowIconSmall from "@duetds/icons/lib/assets/action-new-window-small";
|
|
7
|
-
import {
|
|
5
|
+
import { Fragment, h } from "@stencil/core";
|
|
8
6
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
9
7
|
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
10
8
|
import { subscribeTabbingChange, unsubscribeTabbingChange } from "../../utils/keyboard-utils";
|
|
11
9
|
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
10
|
+
import { hasSlot } from "../../utils/slot-utils";
|
|
12
11
|
import { parsePossibleJSON } from "../../utils/string-utils";
|
|
13
12
|
const i18n = {
|
|
14
13
|
fi: { lahi: "© LähiTapiola", turva: "© Turva" },
|
|
@@ -82,9 +81,7 @@ export class DuetFooter {
|
|
|
82
81
|
componentWillLoad() {
|
|
83
82
|
inheritGlobalTheme(this);
|
|
84
83
|
this.refresh();
|
|
85
|
-
this.hasInfoSlot =
|
|
86
|
-
? Array.from(this.element.children).filter(el => el.matches("[slot='info']")).length > 0
|
|
87
|
-
: !!this.element.querySelector(":scope > [slot='info']");
|
|
84
|
+
this.hasInfoSlot = hasSlot(this.element, "info");
|
|
88
85
|
}
|
|
89
86
|
connectedCallback() {
|
|
90
87
|
connectLanguageChangeObserver(this, {
|
|
@@ -104,18 +101,6 @@ export class DuetFooter {
|
|
|
104
101
|
this.processedItems = parsePossibleJSON(this.items);
|
|
105
102
|
this.processedMenu = parsePossibleJSON(this.menu);
|
|
106
103
|
}
|
|
107
|
-
renderFooterTop() {
|
|
108
|
-
const logo = (h("div", { class: {
|
|
109
|
-
"footer-top-logo": this.hasInfoSlot,
|
|
110
|
-
} }, this.variation !== "simple" && (h("duet-logo", { href: this.logoHref, onClick: this.handleLogoClick, size: "large", inverse: true, language: this.language, theme: this.theme }))));
|
|
111
|
-
const footerItems = this.processedItems &&
|
|
112
|
-
this.variation !== "simple" &&
|
|
113
|
-
this.processedItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item), onMouseEnter: event => this.emitDuetEvent(event, item), onTouchStart: event => this.emitDuetEvent(event, item) }, h("div", { class: "duet-footer-icon" }, h("duet-icon", { size: "medium", margin: "none", name: item.icon, color: "currentColor" })), h("span", null, item.label), !item.hideArrow && (h(Fragment, null, item.external && h("duet-visually-hidden", null, ", ", this.accessibleLabelExternal), h("div", { class: "duet-footer-arrow" }, item.external ? (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })) : (h("duet-icon", { icon: arrowRightIcon.svg, size: "auto", margin: "none", color: "currentColor" }))))))));
|
|
114
|
-
if (this.hasInfoSlot) {
|
|
115
|
-
return (h(Fragment, null, logo, h("div", { class: "footer-top-right-container" }, h("slot", { name: "info" }), h("div", { class: "footer-top-items" }, footerItems))));
|
|
116
|
-
}
|
|
117
|
-
return (h(Fragment, null, logo, footerItems));
|
|
118
|
-
}
|
|
119
104
|
/**
|
|
120
105
|
* render() function
|
|
121
106
|
* Always the last one in the class.
|
|
@@ -128,7 +113,20 @@ export class DuetFooter {
|
|
|
128
113
|
"duet-m-0": this.margin === "none",
|
|
129
114
|
"duet-theme-turva": this.theme === "turva",
|
|
130
115
|
"duet-footer-simple": this.variation === "simple",
|
|
131
|
-
}, "aria-label": this.accessibleLabel }, h("div", { class: "duet-footer-wrapper" },
|
|
116
|
+
}, "aria-label": this.accessibleLabel }, h("div", { class: "duet-footer-wrapper" }, this.variation !== "simple" && (h("div", { class: {
|
|
117
|
+
"duet-footer-top": true,
|
|
118
|
+
"duet-has-info": this.hasInfoSlot,
|
|
119
|
+
}, part: "top" }, h("div", { class: "footer-top-logo" }, h("duet-logo", { href: this.logoHref, onClick: this.handleLogoClick, size: "large", inverse: true, language: this.language, theme: this.theme })), h("div", { class: "footer-top-right-container" }, h("slot", { name: "info" }), h("div", { class: "footer-top-items" }, this.processedItems &&
|
|
120
|
+
this.processedItems.map((item, index) => {
|
|
121
|
+
var _a, _b, _c, _d, _e, _f;
|
|
122
|
+
return (h(Fragment, null, index > 0 && h("duet-spacer", { size: "x-large", direction: "horizontal" }), h("duet-button", { id: item.id, class: "duet-footer-link", variation: "plain", margin: "none", fixed: true, negative: true, url: item.href, external: item.external, icon: ((_a = item.href) === null || _a === void 0 ? void 0 : _a.startsWith("tel:"))
|
|
123
|
+
? "form-tel"
|
|
124
|
+
: ((_b = item.href) === null || _b === void 0 ? void 0 : _b.startsWith("mailto:"))
|
|
125
|
+
? "navigation-message"
|
|
126
|
+
: "navigation-arrow-right", "icon-right": !((_c = item.href) === null || _c === void 0 ? void 0 : _c.startsWith("tel:")) && !((_d = item.href) === null || _d === void 0 ? void 0 : _d.startsWith("mailto:")), "icon-size": ((_e = item.href) === null || _e === void 0 ? void 0 : _e.startsWith("tel:")) || ((_f = item.href) === null || _f === void 0 ? void 0 : _f.startsWith("mailto:"))
|
|
127
|
+
? "medium"
|
|
128
|
+
: "medium-small", onClick: event => this.handleItemClick(event, item), onMouseEnter: event => this.emitDuetEvent(event, item), onTouchStart: event => this.emitDuetEvent(event, item) }, item.label)));
|
|
129
|
+
}))))), h("slot", { name: "extra" }), h("p", { class: "duet-footer-menu", part: "menu" }, h("span", { class: "duet-footer-copyright" }, `${copyrightLabel} ${new Date().getFullYear()}`), h("span", { class: "duet-footer-menu-links" }, this.processedMenu && (h(Fragment, null, this.processedMenu.map(item => (h("a", { href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleMenuClick(event, item), onMouseEnter: event => this.emitDuetEvent(event, item), onTouchStart: event => this.emitDuetEvent(event, item) }, item.label, item.external && (h(Fragment, null, h("duet-visually-hidden", null, ", ", this.accessibleLabelExternal), h("span", { class: "duet-footer-external" }, h("duet-icon", { icon: newWindowIconSmall.svg, size: "xx-small", margin: "none", color: "currentColor" })))), h("span", { class: "duet-footer-divider", role: "presentation", "aria-hidden": "true" }, "/")))))))), h("p", { class: "duet-footer-copyright duet-footer-copyright-mobile" }, `${copyrightLabel} ${new Date().getFullYear()}`))));
|
|
132
130
|
}
|
|
133
131
|
static get is() { return "duet-footer"; }
|
|
134
132
|
static get encapsulation() { return "shadow"; }
|
|
@@ -276,7 +274,7 @@ export class DuetFooter {
|
|
|
276
274
|
"optional": false,
|
|
277
275
|
"docs": {
|
|
278
276
|
"tags": [],
|
|
279
|
-
"text": "An array of items for the main footer links. Items have to include mandatory\n\"label\"
|
|
277
|
+
"text": "An array of items for the main footer links. Items have to include mandatory\n\"label\" and \"href\" fields to work. Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag. Note that previously mandatory\n\"icon\" field has now been removed - setting it has no effect."
|
|
280
278
|
},
|
|
281
279
|
"attribute": "items",
|
|
282
280
|
"reflect": false
|
|
@@ -388,7 +386,7 @@ export class DuetFooter {
|
|
|
388
386
|
},
|
|
389
387
|
"complexType": {
|
|
390
388
|
"original": "DuetFooterChangeEvent",
|
|
391
|
-
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem
|
|
389
|
+
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem; originalEvent: Event; }",
|
|
392
390
|
"references": {
|
|
393
391
|
"DuetFooterChangeEvent": {
|
|
394
392
|
"location": "local",
|
|
@@ -409,7 +407,7 @@ export class DuetFooter {
|
|
|
409
407
|
},
|
|
410
408
|
"complexType": {
|
|
411
409
|
"original": "DuetFooterChangeEvent",
|
|
412
|
-
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem
|
|
410
|
+
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem; originalEvent: Event; }",
|
|
413
411
|
"references": {
|
|
414
412
|
"DuetFooterChangeEvent": {
|
|
415
413
|
"location": "local",
|
|
@@ -430,7 +428,7 @@ export class DuetFooter {
|
|
|
430
428
|
},
|
|
431
429
|
"complexType": {
|
|
432
430
|
"original": "DuetFooterChangeEvent",
|
|
433
|
-
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem
|
|
431
|
+
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem; originalEvent: Event; }",
|
|
434
432
|
"references": {
|
|
435
433
|
"DuetFooterChangeEvent": {
|
|
436
434
|
"location": "local",
|
|
@@ -451,7 +449,7 @@ export class DuetFooter {
|
|
|
451
449
|
},
|
|
452
450
|
"complexType": {
|
|
453
451
|
"original": "DuetFooterChangeEvent",
|
|
454
|
-
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem
|
|
452
|
+
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem; originalEvent: Event; }",
|
|
455
453
|
"references": {
|
|
456
454
|
"DuetFooterChangeEvent": {
|
|
457
455
|
"location": "local",
|
|
@@ -493,7 +491,7 @@ export class DuetFooter {
|
|
|
493
491
|
},
|
|
494
492
|
"complexType": {
|
|
495
493
|
"original": "DuetFooterChangeEvent",
|
|
496
|
-
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem
|
|
494
|
+
"resolved": "{ component: \"duet-footer\"; data: DuetFooterItem; originalEvent: Event; }",
|
|
497
495
|
"references": {
|
|
498
496
|
"DuetFooterChangeEvent": {
|
|
499
497
|
"location": "local",
|
|
@@ -7,7 +7,7 @@ import { a as getLanguage, c as connectLanguageChangeObserver, d as disconnectLa
|
|
|
7
7
|
import { d as defineCustomElement$8 } from './p-20b3fa1e.js';
|
|
8
8
|
import { d as defineCustomElement$7 } from './p-d72fa71c.js';
|
|
9
9
|
import { d as defineCustomElement$6 } from './p-9ca3437c.js';
|
|
10
|
-
import { d as defineCustomElement$5 } from './p-
|
|
10
|
+
import { d as defineCustomElement$5 } from './p-f0225a59.js';
|
|
11
11
|
import { d as defineCustomElement$4 } from './p-4779e8e0.js';
|
|
12
12
|
import { d as defineCustomElement$3 } from './p-b676c88c.js';
|
|
13
13
|
import { d as defineCustomElement$2 } from './p-d1815d2a.js';
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { p as proxyCustomElement, H, c as createEvent$1, h, F as Fragment } from './p-e98f9bb0.js';
|
|
5
|
-
import { a as actionNewWindow, b as actionArrowRight } from './p-8855e26a.js';
|
|
6
5
|
import { a as actionNewWindowSmall } from './p-f11208c3.js';
|
|
7
6
|
import { D as DuetStringsExternalDefaults } from './p-9df4cfa4.js';
|
|
8
7
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
9
8
|
import { s as subscribeTabbingChange, u as unsubscribeTabbingChange } from './p-785686e3.js';
|
|
10
9
|
import { a as getLanguage, g as getLocaleString, c as connectLanguageChangeObserver, d as disconnectLanguageChangeObserver } from './p-2e36d5bf.js';
|
|
10
|
+
import { h as hasSlot } from './p-06e608ae.js';
|
|
11
11
|
import { p as parsePossibleJSON } from './p-0e052642.js';
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
12
|
+
import { d as defineCustomElement$7 } from './p-20b3fa1e.js';
|
|
13
|
+
import { d as defineCustomElement$6 } from './p-9ca3437c.js';
|
|
14
|
+
import { d as defineCustomElement$5 } from './p-b29a25ab.js';
|
|
15
|
+
import { d as defineCustomElement$4 } from './p-23e23ced.js';
|
|
16
|
+
import { d as defineCustomElement$3 } from './p-b676c88c.js';
|
|
14
17
|
import { d as defineCustomElement$2 } from './p-d1815d2a.js';
|
|
15
18
|
|
|
16
|
-
const duetFooterCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}::slotted([slot=info]){padding:0 28px;margin-top:
|
|
19
|
+
const duetFooterCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}::slotted([slot=info]){padding:0 28px;margin-top:0;margin-bottom:16px}@media (min-width: 62em){::slotted([slot=info]){padding:0;margin-top:calc(20px - 0.5em);margin-bottom:0}}.duet-footer{display:block;width:100%;padding-top:24px;padding-bottom:16px;margin-top:48px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(255, 255, 255);text-align:left;background:rgb(0, 41, 77)}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";background:rgb(198, 12, 48)}.duet-footer a{color:rgb(255, 255, 255);text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center}.duet-footer-top.duet-has-info{align-items:flex-start}}.duet-footer-top .footer-top-logo{flex-grow:1}.duet-footer-top .footer-top-right-container{flex-grow:1}@media (min-width: 62em){.duet-footer-top .footer-top-right-container{text-align:right}}.duet-footer-top .footer-top-items{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding-left:28px}@media (min-width: 62em){.duet-footer-top .footer-top-items{flex-direction:row;justify-content:flex-end}}duet-logo{margin-bottom:24px;margin-left:16px !important}@media (min-width: 62em){duet-logo{margin-bottom:0;margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-menu{padding:20px !important;display:flex;gap:2rem;padding-left:28px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-right:0 !important;padding-left:8px !important}}.duet-footer-menu a{display:inline-block;text-decoration:none;overflow-wrap:break-word}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu .duet-footer-divider-copyright{display:none}.duet-footer-menu .duet-footer-menu-links{display:block;flex:1}@media (min-width: 62em){.duet-footer-menu .duet-footer-menu-links{text-align:right}}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{display:none;font-size:0.875rem;color:rgb(255, 255, 255)}@media (min-width: 62em){.duet-footer-copyright{display:inline}}.duet-footer-copyright.duet-footer-copyright-mobile{display:block;padding-top:0.5rem;padding-bottom:1.25rem;padding-left:28px;text-align:left}@media (min-width: 62em){.duet-footer-copyright.duet-footer-copyright-mobile{display:none}}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:rgb(0, 41, 77);background:transparent !important;border-top:1px solid rgb(225, 227, 230)}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:rgb(0, 41, 77)}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple .duet-footer-copyright-mobile{padding-left:0}.duet-footer-simple.duet-theme-turva{color:rgb(23, 28, 58);border-color:rgb(228, 228, 230)}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:rgb(23, 28, 58)}.duet-footer-external{display:inline-block;margin-left:4px;color:rgb(0, 119, 179)}.duet-theme-turva .duet-footer-external{color:rgb(255, 255, 255)}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:rgb(198, 12, 48)}";
|
|
17
20
|
|
|
18
21
|
const i18n = {
|
|
19
22
|
fi: { lahi: "© LähiTapiola", turva: "© Turva" },
|
|
@@ -90,7 +93,7 @@ const DuetFooter$1 = /*@__PURE__*/ proxyCustomElement(class DuetFooter extends H
|
|
|
90
93
|
componentWillLoad() {
|
|
91
94
|
inheritGlobalTheme(this);
|
|
92
95
|
this.refresh();
|
|
93
|
-
this.hasInfoSlot =
|
|
96
|
+
this.hasInfoSlot = hasSlot(this.element, "info");
|
|
94
97
|
}
|
|
95
98
|
connectedCallback() {
|
|
96
99
|
connectLanguageChangeObserver(this, {
|
|
@@ -110,18 +113,6 @@ const DuetFooter$1 = /*@__PURE__*/ proxyCustomElement(class DuetFooter extends H
|
|
|
110
113
|
this.processedItems = parsePossibleJSON(this.items);
|
|
111
114
|
this.processedMenu = parsePossibleJSON(this.menu);
|
|
112
115
|
}
|
|
113
|
-
renderFooterTop() {
|
|
114
|
-
const logo = (h("div", { class: {
|
|
115
|
-
"footer-top-logo": this.hasInfoSlot,
|
|
116
|
-
} }, this.variation !== "simple" && (h("duet-logo", { href: this.logoHref, onClick: this.handleLogoClick, size: "large", inverse: true, language: this.language, theme: this.theme }))));
|
|
117
|
-
const footerItems = this.processedItems &&
|
|
118
|
-
this.variation !== "simple" &&
|
|
119
|
-
this.processedItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item), onMouseEnter: event => this.emitDuetEvent(event, item), onTouchStart: event => this.emitDuetEvent(event, item) }, h("div", { class: "duet-footer-icon" }, h("duet-icon", { size: "medium", margin: "none", name: item.icon, color: "currentColor" })), h("span", null, item.label), !item.hideArrow && (h(Fragment, null, item.external && h("duet-visually-hidden", null, ", ", this.accessibleLabelExternal), h("div", { class: "duet-footer-arrow" }, item.external ? (h("duet-icon", { icon: actionNewWindow.svg, size: "xx-small", margin: "none", color: "currentColor" })) : (h("duet-icon", { icon: actionArrowRight.svg, size: "auto", margin: "none", color: "currentColor" }))))))));
|
|
120
|
-
if (this.hasInfoSlot) {
|
|
121
|
-
return (h(Fragment, null, logo, h("div", { class: "footer-top-right-container" }, h("slot", { name: "info" }), h("div", { class: "footer-top-items" }, footerItems))));
|
|
122
|
-
}
|
|
123
|
-
return (h(Fragment, null, logo, footerItems));
|
|
124
|
-
}
|
|
125
116
|
/**
|
|
126
117
|
* render() function
|
|
127
118
|
* Always the last one in the class.
|
|
@@ -134,7 +125,20 @@ const DuetFooter$1 = /*@__PURE__*/ proxyCustomElement(class DuetFooter extends H
|
|
|
134
125
|
"duet-m-0": this.margin === "none",
|
|
135
126
|
"duet-theme-turva": this.theme === "turva",
|
|
136
127
|
"duet-footer-simple": this.variation === "simple",
|
|
137
|
-
}, "aria-label": this.accessibleLabel }, h("div", { class: "duet-footer-wrapper" },
|
|
128
|
+
}, "aria-label": this.accessibleLabel }, h("div", { class: "duet-footer-wrapper" }, this.variation !== "simple" && (h("div", { class: {
|
|
129
|
+
"duet-footer-top": true,
|
|
130
|
+
"duet-has-info": this.hasInfoSlot,
|
|
131
|
+
}, part: "top" }, h("div", { class: "footer-top-logo" }, h("duet-logo", { href: this.logoHref, onClick: this.handleLogoClick, size: "large", inverse: true, language: this.language, theme: this.theme })), h("div", { class: "footer-top-right-container" }, h("slot", { name: "info" }), h("div", { class: "footer-top-items" }, this.processedItems &&
|
|
132
|
+
this.processedItems.map((item, index) => {
|
|
133
|
+
var _a, _b, _c, _d, _e, _f;
|
|
134
|
+
return (h(Fragment, null, index > 0 && h("duet-spacer", { size: "x-large", direction: "horizontal" }), h("duet-button", { id: item.id, class: "duet-footer-link", variation: "plain", margin: "none", fixed: true, negative: true, url: item.href, external: item.external, icon: ((_a = item.href) === null || _a === void 0 ? void 0 : _a.startsWith("tel:"))
|
|
135
|
+
? "form-tel"
|
|
136
|
+
: ((_b = item.href) === null || _b === void 0 ? void 0 : _b.startsWith("mailto:"))
|
|
137
|
+
? "navigation-message"
|
|
138
|
+
: "navigation-arrow-right", "icon-right": !((_c = item.href) === null || _c === void 0 ? void 0 : _c.startsWith("tel:")) && !((_d = item.href) === null || _d === void 0 ? void 0 : _d.startsWith("mailto:")), "icon-size": ((_e = item.href) === null || _e === void 0 ? void 0 : _e.startsWith("tel:")) || ((_f = item.href) === null || _f === void 0 ? void 0 : _f.startsWith("mailto:"))
|
|
139
|
+
? "medium"
|
|
140
|
+
: "medium-small", onClick: event => this.handleItemClick(event, item), onMouseEnter: event => this.emitDuetEvent(event, item), onTouchStart: event => this.emitDuetEvent(event, item) }, item.label)));
|
|
141
|
+
}))))), h("slot", { name: "extra" }), h("p", { class: "duet-footer-menu", part: "menu" }, h("span", { class: "duet-footer-copyright" }, `${copyrightLabel} ${new Date().getFullYear()}`), h("span", { class: "duet-footer-menu-links" }, this.processedMenu && (h(Fragment, null, this.processedMenu.map(item => (h("a", { href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleMenuClick(event, item), onMouseEnter: event => this.emitDuetEvent(event, item), onTouchStart: event => this.emitDuetEvent(event, item) }, item.label, item.external && (h(Fragment, null, h("duet-visually-hidden", null, ", ", this.accessibleLabelExternal), h("span", { class: "duet-footer-external" }, h("duet-icon", { icon: actionNewWindowSmall.svg, size: "xx-small", margin: "none", color: "currentColor" })))), h("span", { class: "duet-footer-divider", role: "presentation", "aria-hidden": "true" }, "/")))))))), h("p", { class: "duet-footer-copyright duet-footer-copyright-mobile" }, `${copyrightLabel} ${new Date().getFullYear()}`))));
|
|
138
142
|
}
|
|
139
143
|
get element() { return this; }
|
|
140
144
|
static get watchers() { return {
|
|
@@ -164,19 +168,34 @@ function defineCustomElement$1() {
|
|
|
164
168
|
if (typeof customElements === "undefined") {
|
|
165
169
|
return;
|
|
166
170
|
}
|
|
167
|
-
const components = ["duet-footer", "duet-icon", "duet-logo", "duet-visually-hidden"];
|
|
171
|
+
const components = ["duet-footer", "duet-button", "duet-icon", "duet-logo", "duet-spacer", "duet-spinner", "duet-visually-hidden"];
|
|
168
172
|
components.forEach(tagName => { switch (tagName) {
|
|
169
173
|
case "duet-footer":
|
|
170
174
|
if (!customElements.get(tagName)) {
|
|
171
175
|
customElements.define(tagName, DuetFooter$1);
|
|
172
176
|
}
|
|
173
177
|
break;
|
|
178
|
+
case "duet-button":
|
|
179
|
+
if (!customElements.get(tagName)) {
|
|
180
|
+
defineCustomElement$7();
|
|
181
|
+
}
|
|
182
|
+
break;
|
|
174
183
|
case "duet-icon":
|
|
175
184
|
if (!customElements.get(tagName)) {
|
|
176
|
-
defineCustomElement$
|
|
185
|
+
defineCustomElement$6();
|
|
177
186
|
}
|
|
178
187
|
break;
|
|
179
188
|
case "duet-logo":
|
|
189
|
+
if (!customElements.get(tagName)) {
|
|
190
|
+
defineCustomElement$5();
|
|
191
|
+
}
|
|
192
|
+
break;
|
|
193
|
+
case "duet-spacer":
|
|
194
|
+
if (!customElements.get(tagName)) {
|
|
195
|
+
defineCustomElement$4();
|
|
196
|
+
}
|
|
197
|
+
break;
|
|
198
|
+
case "duet-spinner":
|
|
180
199
|
if (!customElements.get(tagName)) {
|
|
181
200
|
defineCustomElement$3();
|
|
182
201
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { D as DuetLink$1, d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { D as DuetLink$1, d as defineCustomElement$1 } from './p-f0225a59.js';
|
|
5
5
|
|
|
6
6
|
const DuetLink = DuetLink$1;
|
|
7
7
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { D as DuetUploadItem$1, d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { D as DuetUploadItem$1, d as defineCustomElement$1 } from './p-5ac0e140.js';
|
|
5
5
|
|
|
6
6
|
const DuetUploadItem = DuetUploadItem$1;
|
|
7
7
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -7,7 +7,7 @@ import { c as createID } from './p-5e59e970.js';
|
|
|
7
7
|
import { d as debounce } from './p-9e371678.js';
|
|
8
8
|
import { g as getLocaleString, s as sanitizeString } from './p-2e36d5bf.js';
|
|
9
9
|
import { p as parsePossibleJSON } from './p-0e052642.js';
|
|
10
|
-
import { g as getError, d as defineCustomElement$3, a as getI18nError } from './p-
|
|
10
|
+
import { g as getError, d as defineCustomElement$3, a as getI18nError } from './p-5ac0e140.js';
|
|
11
11
|
import { h } from './p-33937fd7.js';
|
|
12
12
|
import { d as defineCustomElement$j } from './p-f40596e9.js';
|
|
13
13
|
import { d as defineCustomElement$i } from './p-3f85f7b8.js';
|
|
@@ -18,7 +18,7 @@ import { d as defineCustomElement$e } from './p-27b6f57b.js';
|
|
|
18
18
|
import { d as defineCustomElement$d } from './p-45fd4d84.js';
|
|
19
19
|
import { d as defineCustomElement$c } from './p-d72fa71c.js';
|
|
20
20
|
import { d as defineCustomElement$b } from './p-9ca3437c.js';
|
|
21
|
-
import { d as defineCustomElement$a } from './p-
|
|
21
|
+
import { d as defineCustomElement$a } from './p-f0225a59.js';
|
|
22
22
|
import { d as defineCustomElement$9 } from './p-4779e8e0.js';
|
|
23
23
|
import { d as defineCustomElement$8 } from './p-a4a10570.js';
|
|
24
24
|
import { d as defineCustomElement$7 } from './p-18552e4e.js';
|
|
@@ -9,7 +9,7 @@ import { d as defineCustomElement$9 } from './p-f40596e9.js';
|
|
|
9
9
|
import { d as defineCustomElement$8 } from './p-971b25c0.js';
|
|
10
10
|
import { d as defineCustomElement$7 } from './p-d72fa71c.js';
|
|
11
11
|
import { d as defineCustomElement$6 } from './p-9ca3437c.js';
|
|
12
|
-
import { d as defineCustomElement$5 } from './p-
|
|
12
|
+
import { d as defineCustomElement$5 } from './p-f0225a59.js';
|
|
13
13
|
import { d as defineCustomElement$4 } from './p-4779e8e0.js';
|
|
14
14
|
import { d as defineCustomElement$3 } from './p-a4a10570.js';
|
|
15
15
|
import { d as defineCustomElement$2 } from './p-23e23ced.js';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { p as proxyCustomElement, H, h, F as Fragment, d as Host } from './p-e98f9bb0.js';
|
|
5
|
-
import { a as actionNewWindow, b as actionArrowRight } from './p-8855e26a.js';
|
|
6
5
|
import { a as actionNewWindowSmall } from './p-f11208c3.js';
|
|
7
6
|
import { D as DuetStringsExternalDefaults, b as DuetStringsDownloadLinkDefaults } from './p-9df4cfa4.js';
|
|
8
7
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
@@ -10,8 +9,12 @@ import { a as getLanguage, g as getLocaleString, c as connectLanguageChangeObser
|
|
|
10
9
|
import { b as breakpointToToken, g as getColorByName } from './p-3ec3eb5f.js';
|
|
11
10
|
import { d as defineCustomElement$1 } from './p-9ca3437c.js';
|
|
12
11
|
|
|
12
|
+
var actionArrowRight={"title":"action-arrow-right","tags":"action arrow right caret","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M5.499 24a.752.752 0 0 1-.53-1.281L15.689 12 4.969 1.28c-.142-.141-.22-.33-.22-.53s.078-.389.22-.53c.141-.142.33-.22.53-.22s.389.078.53.22l10.72 10.72a1.5 1.5 0 0 1 .001 2.119L6.029 23.78a.743.743 0 0 1-.53.22z\"/></svg>"};
|
|
13
|
+
|
|
13
14
|
var actionDownloadSmall={"title":"action-download-small","tags":"action download arrow down small","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M13.193 1.7c0-.658-.542-1.2-1.2-1.2-.657 0-1.199.542-1.199 1.2v8.922l-2.778-2.6a1.2 1.2 0 0 0-1.64 1.751l4.797 4.498c.458.43 1.183.43 1.64 0l4.798-4.498c.242-.228.379-.544.379-.875a1.2 1.2 0 0 0-2.02-.876l-2.777 2.603V1.699Z\"/><path d=\"M1.5 13.544a1.5 1.5 0 0 1 1.498 1.5v1.498a1.61 1.61 0 0 0 .418 1.096h-.003c0-.002.036.032.13.082.39.194.818.305 1.254.321H19.19a3.085 3.085 0 0 0 1.255-.32c.096-.051.13-.085.13-.085.27-.3.42-.69.414-1.096v-1.5c0-.822.677-1.498 1.5-1.498.822 0 1.499.676 1.499 1.499v1.499c0 1.16-.43 2.293-1.224 3.142-.518.557-1.235.876-1.791 1.056a5.976 5.976 0 0 1-1.783.302H4.797a6.053 6.053 0 0 1-1.782-.302c-.556-.18-1.274-.5-1.792-1.056A4.613 4.613 0 0 1 0 16.542v-1.499a1.5 1.5 0 0 1 1.5-1.499Z\"/></svg>"};
|
|
14
15
|
|
|
16
|
+
var actionNewWindow={"title":"action-new-window","tags":"arrow open new window tab external link square box rectangle action","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M10.25 2a.75.75 0 1 1 0 1.5h-6.5A2.252 2.252 0 0 0 1.5 5.75v14.5a2.252 2.252 0 0 0 2.25 2.25h14.5a2.252 2.252 0 0 0 2.25-2.25v-6.5a.75.75 0 0 1 1.5 0v6.5A3.754 3.754 0 0 1 18.25 24H3.75A3.754 3.754 0 0 1 0 20.25V5.75A3.754 3.754 0 0 1 3.75 2zm12.985-2c.1 0 .198.02.29.058l.025.011a.726.726 0 0 1 .15.091l.066.059a.755.755 0 0 1 .109.138l.051.1c.04.092.06.192.06.293l-.001 6.363c0 .2-.078.389-.22.53a.743.743 0 0 1-.53.22.743.743 0 0 1-.53-.22.743.743 0 0 1-.22-.53V2.559L15.28 9.764a.75.75 0 0 1-1.06-1.06l7.204-7.205h-4.553a.744.744 0 0 1-.75-.75c0-.2.078-.388.22-.53A.743.743 0 0 1 16.87 0z\"/></svg>"};
|
|
17
|
+
|
|
15
18
|
const duetLinkCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline}:host(.duet-link-block){display:block}:host(.duet-link-button){margin-right:8px !important;margin-bottom:12px !important;display:inline-block;width:100%}:host(.duet-link-button):last-child,:host(.duet-link-button):last-of-type{margin-right:0 !important}:host(.duet-m-0){margin:0 !important}.duet-link{display:inline;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:rgb(0, 98, 154);text-decoration:underline;border-radius:4px;transition:300ms ease}.duet-link:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-link:focus,.duet-link:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-link.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:rgb(173, 11, 43)}.duet-link:hover{color:rgb(0, 77, 128);text-decoration:none}.duet-link:hover.duet-theme-turva{color:rgb(148, 9, 37)}.duet-link:active{opacity:0.75;transition:none}button{font-size:inherit;cursor:pointer}.duet-link-is-external.duet-link:not(.block,.button),.duet-link-is-download.duet-link:not(.block,.button){text-decoration:none}.duet-link-is-external.duet-link:not(.block,.button) .duet-link-content,.duet-link-is-download.duet-link:not(.block,.button) .duet-link-content{text-decoration:underline}.duet-link-is-external.duet-link:not(.block,.button):hover>.duet-link-content,.duet-link-is-download.duet-link:not(.block,.button):hover>.duet-link-content{text-decoration:none}.duet-link-is-external.duet-link:not(.block,.button) .duet-link-icon-tail,.duet-link-is-download.duet-link:not(.block,.button) .duet-link-icon-tail{text-decoration:none;white-space:nowrap}.duet-tab-to-link{padding:15px 28px 16px !important;position:absolute;top:-100%;left:-100%;z-index:200;width:1px;min-width:190px;height:1px;overflow:hidden;font-weight:600;color:rgb(0, 119, 179);text-align:center;text-decoration:none;background:rgb(255, 255, 255);border-radius:4px;opacity:0;transition:none}.duet-tab-to-link.duet-theme-turva{min-width:120px;color:rgb(23, 28, 58)}@media (min-width: 106.25em){.duet-tab-to-link{margin-left:20px}}.duet-tab-to-link:focus{top:12px;left:20px;width:auto;height:auto;outline:0;opacity:1}.block.duet-link{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:start;padding:16px;font-weight:600;color:rgb(0, 41, 77);text-decoration:none}.block.duet-link.duet-link-has-icon{grid-template-columns:auto 1fr auto}.block.duet-link.none{padding:0}.block .block__icon{display:flex}.block .block__content{position:relative;bottom:2px}.block .block__chevron{align-self:center}.block .block__chevron-icon{transition:300ms ease}.block:not(.duet-link-is-external):hover .block__chevron-icon{transform:translateX(4px)}.duet-link.button{display:flex;gap:12px;align-items:center;width:100%;min-height:48px;padding:14px 16px;line-height:1.25;text-decoration:none;background-color:rgb(255, 255, 255);border:solid 1px rgb(207, 210, 212);border-radius:12px;outline:0 solid rgb(207, 210, 212);outline-offset:-2px;transition:all 300ms ease}.duet-link.button>*{flex-shrink:0}.duet-link.button .duet-link-content{flex-grow:1;flex-shrink:1;font-size:1rem;font-weight:600;color:rgb(0, 41, 77);text-align:left}.duet-link.button .icon-wrap{display:flex;align-items:center;justify-content:center}.duet-link.button.duet-link-has-icon-background{min-height:60px;padding:12px;padding-right:20px;line-height:1.5}.duet-link.button.duet-link-has-icon-background .icon-wrap{width:36px;height:36px;border-radius:8px}.duet-link.button:hover{border-color:rgb(0, 119, 179);outline:2px solid rgb(0, 119, 179)}@media (min-width: 48em){.duet-link.button{min-height:50px}.duet-link.button.duet-link-has-icon-background{gap:16px;min-height:72px;border-radius:16px}.duet-link.button.duet-link-has-icon-background .icon-wrap{width:48px;height:48px;border-radius:12px}.duet-link.button.duet-link-has-icon-background .duet-link-content{font-size:1.1rem}}.duet-link.button.duet-theme-turva{border-color:rgb(207, 207, 209)}.duet-link.button.duet-theme-turva .duet-link-content{color:rgb(23, 28, 58)}.duet-link.button.duet-theme-turva:hover{border-color:rgb(198, 12, 48);outline-color:rgb(198, 12, 48)}.duet-link.button .block__chevron-icon{transition:300ms ease}.duet-link.button:not(.duet-link-is-external):hover .block__chevron-icon{transform:translateX(4px)}";
|
|
16
19
|
|
|
17
20
|
const DuetLink = /*@__PURE__*/ proxyCustomElement(class DuetLink extends H {
|