@oiz/stzh-components 2.4.0-beta → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{_commonjsHelpers-dcc4cf71.js → _commonjsHelpers-bcc1208a.js} +0 -16
- package/dist/cjs/{app-globals-57922fc2.js → app-globals-8fbeeb92.js} +1 -1
- package/dist/cjs/{js.cookie-226c94ed.js → js.cookie-9c263d23.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-badge_3.cjs.entry.js +9 -2
- package/dist/cjs/stzh-card_3.cjs.entry.js +18 -19
- package/dist/cjs/stzh-chart.cjs.entry.js +5998 -5171
- package/dist/cjs/stzh-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js +9 -2
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/stzh-ghettobox_2.cjs.entry.js +14 -3
- package/dist/cjs/stzh-invert.cjs.entry.js +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js +9 -2
- package/dist/cjs/stzh-message.cjs.entry.js +2 -2
- package/dist/cjs/stzh-olmap.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +1 -1
- package/dist/cjs/stzh-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +16 -11
- package/dist/collection/assets/i18n/de.json +2 -0
- package/dist/collection/assets/i18n/en.json +3 -1
- package/dist/collection/components/stzh-button/stzh-button.css +11 -0
- package/dist/collection/components/stzh-button/stzh-button.js +28 -1
- package/dist/collection/components/stzh-card/stzh-card.css +1 -1
- package/dist/collection/components/stzh-card/stzh-card.js +17 -18
- package/dist/collection/components/stzh-chart/stzh-chart.css +101 -54
- package/dist/collection/components/stzh-chart/stzh-chart.stories.js +1 -0
- package/dist/collection/components/stzh-chip/stzh-chip.css +2 -2
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +36 -0
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +11 -0
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js +28 -1
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +10 -0
- package/dist/collection/components/stzh-input/stzh-input.stories.js +12 -12
- package/dist/collection/components/stzh-invert/stzh-invert.css +1 -1
- package/dist/collection/components/stzh-link/stzh-link.css +11 -0
- package/dist/collection/components/stzh-link/stzh-link.js +28 -1
- package/dist/collection/components/stzh-pagetitle-hero/stzh-pagetitle-hero.css +1 -1
- package/dist/collection/components/stzh-portal-mitwirken/stzh-portal-mitwirken.css +112 -6
- package/dist/collection/components/stzh-richtext/stzh-richtext.css +14 -3
- package/dist/collection/components/stzh-richtext/stzh-richtext.js +32 -0
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +16 -11
- package/dist/components/_commonjsHelpers.js +1 -16
- package/dist/components/index.js +1 -1
- package/dist/components/stzh-button2.js +10 -2
- package/dist/components/stzh-card2.js +18 -19
- package/dist/components/stzh-chart.js +5995 -5168
- package/dist/components/stzh-chip2.js +1 -1
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-datalist-item2.js +10 -2
- package/dist/components/stzh-datamessagelist-item.js +1 -1
- package/dist/components/stzh-invert.js +1 -1
- package/dist/components/stzh-link2.js +10 -2
- package/dist/components/stzh-pagetitle-hero.js +1 -1
- package/dist/components/stzh-portal-mitwirken.js +1 -1
- package/dist/components/stzh-richtext2.js +14 -1
- package/dist/components/stzh-upload.js +1 -1
- package/dist/components/stzh-vbz-ticker.js +16 -11
- package/dist/esm/{_commonjsHelpers-f9dc4873.js → _commonjsHelpers-ba3f0406.js} +1 -16
- package/dist/esm/{app-globals-b848652e.js → app-globals-f5264f95.js} +1 -1
- package/dist/esm/{js.cookie-53735b72.js → js.cookie-28a40640.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-badge_3.entry.js +9 -2
- package/dist/esm/stzh-card_3.entry.js +18 -19
- package/dist/esm/stzh-chart.entry.js +5995 -5168
- package/dist/esm/stzh-chip_2.entry.js +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-cspace.entry.js +1 -1
- package/dist/esm/stzh-datalist_2.entry.js +9 -2
- package/dist/esm/stzh-datamessagelist-item.entry.js +1 -1
- package/dist/esm/stzh-datatable.entry.js +1 -1
- package/dist/esm/stzh-dropdown.entry.js +1 -1
- package/dist/esm/stzh-ghettobox_2.entry.js +14 -3
- package/dist/esm/stzh-invert.entry.js +1 -1
- package/dist/esm/stzh-link.entry.js +9 -2
- package/dist/esm/stzh-message.entry.js +2 -2
- package/dist/esm/stzh-olmap.entry.js +1 -1
- package/dist/esm/stzh-pagetitle-hero.entry.js +1 -1
- package/dist/esm/stzh-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-upload.entry.js +1 -1
- package/dist/esm/stzh-vbz-linechip.entry.js +1 -1
- package/dist/esm/stzh-vbz-ticker.entry.js +16 -11
- package/dist/esm-es5/_commonjsHelpers-ba3f0406.js +1 -0
- package/dist/esm-es5/app-globals-f5264f95.js +1 -0
- package/dist/esm-es5/{js.cookie-53735b72.js → js.cookie-28a40640.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
- package/dist/esm-es5/stzh-card_3.entry.js +1 -1
- package/dist/esm-es5/stzh-chart.entry.js +3 -3
- package/dist/esm-es5/stzh-chip_2.entry.js +1 -1
- package/dist/esm-es5/stzh-components.js +1 -1
- package/dist/esm-es5/stzh-cspace.entry.js +1 -1
- package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
- package/dist/esm-es5/stzh-datamessagelist-item.entry.js +1 -1
- package/dist/esm-es5/stzh-datatable.entry.js +1 -1
- package/dist/esm-es5/stzh-dropdown.entry.js +1 -1
- package/dist/esm-es5/stzh-ghettobox_2.entry.js +1 -1
- package/dist/esm-es5/stzh-invert.entry.js +1 -1
- package/dist/esm-es5/stzh-link.entry.js +1 -1
- package/dist/esm-es5/stzh-message.entry.js +1 -1
- package/dist/esm-es5/stzh-olmap.entry.js +1 -1
- package/dist/esm-es5/stzh-pagetitle-hero.entry.js +1 -1
- package/dist/esm-es5/stzh-portal-mitwirken.entry.js +1 -1
- package/dist/esm-es5/stzh-upload.entry.js +1 -1
- package/dist/esm-es5/stzh-vbz-linechip.entry.js +1 -1
- package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
- package/dist/stzh-components/assets/i18n/de.json +2 -0
- package/dist/stzh-components/assets/i18n/en.json +3 -1
- package/dist/stzh-components/p-05e742b4.js +1 -0
- package/dist/stzh-components/p-09a6a4be.system.js +1 -0
- package/dist/stzh-components/{p-b9372a2a.entry.js → p-0ab2f949.entry.js} +1 -1
- package/dist/stzh-components/{p-ed783154.system.entry.js → p-216b89d7.system.entry.js} +1 -1
- package/dist/stzh-components/{p-c8cc2563.system.entry.js → p-263fd0bb.system.entry.js} +1 -1
- package/dist/stzh-components/{p-e4a8f1bc.system.entry.js → p-2e40e63c.system.entry.js} +1 -1
- package/dist/stzh-components/{p-26889a91.entry.js → p-32ae64a3.entry.js} +1 -1
- package/dist/stzh-components/{p-4eee30ea.system.entry.js → p-340eedda.system.entry.js} +1 -1
- package/dist/stzh-components/p-3721f7b2.entry.js +1 -0
- package/dist/stzh-components/p-37de872c.system.entry.js +1 -0
- package/dist/stzh-components/p-3a73b8b5.system.js +1 -0
- package/dist/stzh-components/p-3e8ff66b.js +1 -0
- package/dist/stzh-components/{p-c2f909c1.system.entry.js → p-3fc51ad1.system.entry.js} +1 -1
- package/dist/stzh-components/p-4453449f.entry.js +1 -0
- package/dist/stzh-components/{p-d54ff4d4.system.entry.js → p-47175c6f.system.entry.js} +1 -1
- package/dist/stzh-components/p-5b85324c.entry.js +1 -0
- package/dist/stzh-components/{p-484a366f.system.js → p-5db542ae.system.js} +1 -1
- package/dist/stzh-components/p-62791751.entry.js +1 -0
- package/dist/stzh-components/p-660125e0.system.entry.js +1 -0
- package/dist/stzh-components/{p-65918f6f.system.js → p-6932ce19.system.js} +1 -1
- package/dist/stzh-components/{p-f3276ca5.system.entry.js → p-6a109ce9.system.entry.js} +1 -1
- package/dist/stzh-components/p-6c73f6ad.entry.js +1 -0
- package/dist/stzh-components/{p-02d51685.entry.js → p-6ee87986.entry.js} +1 -1
- package/dist/stzh-components/{p-d9ae09b5.entry.js → p-7bb82e56.entry.js} +1 -1
- package/dist/stzh-components/p-7d42654b.system.entry.js +1 -0
- package/dist/stzh-components/{p-b92734db.entry.js → p-7e9fa7f5.entry.js} +1 -1
- package/dist/stzh-components/p-8c141cae.system.entry.js +1 -0
- package/dist/stzh-components/p-907f59dd.entry.js +1 -0
- package/dist/stzh-components/{p-6adc5f0c.system.entry.js → p-95bfbf67.system.entry.js} +1 -1
- package/dist/stzh-components/{p-c9c7d88a.entry.js → p-a47e205f.entry.js} +1 -1
- package/dist/stzh-components/p-aa2c81e6.system.entry.js +3 -0
- package/dist/stzh-components/{p-89bd0d46.entry.js → p-aa4f87cc.entry.js} +1 -1
- package/dist/stzh-components/p-af9aac53.entry.js +3 -0
- package/dist/stzh-components/{p-24b8df26.js → p-b10682ee.js} +1 -1
- package/dist/stzh-components/p-b9b1b7cf.entry.js +1 -0
- package/dist/stzh-components/p-c9940c35.entry.js +1 -0
- package/dist/stzh-components/{p-7e4261ce.system.entry.js → p-d5514e5b.system.entry.js} +1 -1
- package/dist/stzh-components/{p-a32ae73a.system.entry.js → p-d5948025.system.entry.js} +1 -1
- package/dist/stzh-components/{p-2b67b0b3.system.entry.js → p-d95b44c6.system.entry.js} +1 -1
- package/dist/stzh-components/p-ddcec4e1.system.entry.js +1 -0
- package/dist/stzh-components/{p-444b2baf.entry.js → p-e085a0a0.entry.js} +1 -1
- package/dist/stzh-components/{p-d943e02c.system.entry.js → p-e09ac5e3.system.entry.js} +1 -1
- package/dist/stzh-components/p-e4aa12ba.system.entry.js +1 -0
- package/dist/stzh-components/{p-af67ea5e.entry.js → p-f4c0d928.entry.js} +1 -1
- package/dist/stzh-components/p-f725921a.entry.js +1 -0
- package/dist/stzh-components/stzh-components.css +1 -1
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.js +1 -1
- package/dist/types/components.d.ts +33 -1
- package/dist/types/utils/translation-utils.d.ts +2 -0
- package/dist/vscode-data.json +16 -16
- package/package.json +4 -4
- package/dist/esm-es5/_commonjsHelpers-f9dc4873.js +0 -1
- package/dist/esm-es5/app-globals-b848652e.js +0 -1
- package/dist/stzh-components/p-16c0b9ae.entry.js +0 -3
- package/dist/stzh-components/p-1d435dd8.system.entry.js +0 -1
- package/dist/stzh-components/p-1f74846f.entry.js +0 -1
- package/dist/stzh-components/p-29e9ad9f.system.entry.js +0 -1
- package/dist/stzh-components/p-30a9de85.system.entry.js +0 -1
- package/dist/stzh-components/p-4c60da30.entry.js +0 -1
- package/dist/stzh-components/p-532b4218.entry.js +0 -1
- package/dist/stzh-components/p-798ac79c.entry.js +0 -1
- package/dist/stzh-components/p-84a6e023.system.entry.js +0 -1
- package/dist/stzh-components/p-8caafed2.system.entry.js +0 -1
- package/dist/stzh-components/p-94662bed.system.js +0 -1
- package/dist/stzh-components/p-99b82949.entry.js +0 -1
- package/dist/stzh-components/p-9c90535a.system.js +0 -1
- package/dist/stzh-components/p-9de8b25b.entry.js +0 -1
- package/dist/stzh-components/p-a691fe87.js +0 -1
- package/dist/stzh-components/p-a6d4a8b1.js +0 -1
- package/dist/stzh-components/p-b04a9d0f.system.entry.js +0 -1
- package/dist/stzh-components/p-b422041d.entry.js +0 -1
- package/dist/stzh-components/p-cc722b35.system.entry.js +0 -3
- package/dist/stzh-components/p-db306e24.entry.js +0 -1
- package/dist/stzh-components/p-ee4b939a.entry.js +0 -1
|
@@ -2,26 +2,38 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
const CLASS_EXTERNAL_LINK = 'stzh-richtext__external-link';
|
|
3
3
|
const CLASS_EXTERNAL_ICON_WRAPPER = 'stzh-richtext__external-icon-wrapper';
|
|
4
4
|
const CLASS_EXTERNAL_ICON = 'stzh-richtext__external-icon';
|
|
5
|
+
const CLASS_EXTERNAL_VHIDDEN = 'stzh-richtext__external-vhidden';
|
|
6
|
+
import { fetchTranslations } from "../../utils/translation-utils";
|
|
5
7
|
/**
|
|
6
8
|
* @slot - Text content that should be styled
|
|
7
9
|
*/
|
|
8
10
|
export class StzhRichtext {
|
|
9
11
|
constructor() {
|
|
12
|
+
this.localization = undefined;
|
|
10
13
|
this.externalLinkSelector = 'a[rel*="external"], a.external, a.extern';
|
|
11
14
|
this.externalLinkIcon = 'external-link';
|
|
12
15
|
}
|
|
13
16
|
addExternalLinkIcons() {
|
|
14
17
|
this.externalLinks.forEach(externalLink => {
|
|
15
18
|
externalLink.classList.add(CLASS_EXTERNAL_LINK);
|
|
19
|
+
const screenreaderText = document.createElement('span');
|
|
20
|
+
screenreaderText.classList.add(CLASS_EXTERNAL_VHIDDEN);
|
|
21
|
+
screenreaderText.innerText = this.localization.$globals.externalLinkLabel;
|
|
16
22
|
const iconWrapper = document.createElement('span');
|
|
17
23
|
iconWrapper.classList.add(CLASS_EXTERNAL_ICON_WRAPPER);
|
|
18
24
|
const icon = document.createElement('stzh-icon');
|
|
19
25
|
icon.classList.add(CLASS_EXTERNAL_ICON);
|
|
20
26
|
icon.name = this.externalLinkIcon;
|
|
21
27
|
iconWrapper.appendChild(icon);
|
|
28
|
+
externalLink.prepend(screenreaderText);
|
|
22
29
|
externalLink.appendChild(iconWrapper);
|
|
23
30
|
});
|
|
24
31
|
}
|
|
32
|
+
async componentWillLoad() {
|
|
33
|
+
if (!this.localization) {
|
|
34
|
+
this.localization = await fetchTranslations(this.element, "richtext");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
25
37
|
componentDidRender() {
|
|
26
38
|
this.externalLinks = Array.from(this.element.querySelectorAll(this.externalLinkSelector));
|
|
27
39
|
this.addExternalLinkIcons();
|
|
@@ -46,6 +58,26 @@ export class StzhRichtext {
|
|
|
46
58
|
}
|
|
47
59
|
static get properties() {
|
|
48
60
|
return {
|
|
61
|
+
"localization": {
|
|
62
|
+
"type": "unknown",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "StzhLocaleComponent",
|
|
66
|
+
"resolved": "{ $locale: \"de\" | \"en\"; $formats: StzhLocaleFormats; $globals: StzhLocaleGlobals; }",
|
|
67
|
+
"references": {
|
|
68
|
+
"StzhLocaleComponent": {
|
|
69
|
+
"location": "import",
|
|
70
|
+
"path": "../../utils/translation-utils"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": "Translation strings"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
49
81
|
"externalLinkSelector": {
|
|
50
82
|
"type": "string",
|
|
51
83
|
"mutable": false,
|
|
@@ -77,6 +77,7 @@ export class StzhVbzTicker {
|
|
|
77
77
|
if (message.affectedProduct
|
|
78
78
|
&& message.category !== VBZ.DISTURBANCE_INFORMATION
|
|
79
79
|
&& message.baseType !== VBZ.BASE_TYPE_GLOBAL) {
|
|
80
|
+
const affectedLines = [];
|
|
80
81
|
message.affectedProduct.forEach(product => {
|
|
81
82
|
if (typeof lines[product.lineId] === "undefined") {
|
|
82
83
|
lines[product.lineId] = {
|
|
@@ -90,17 +91,21 @@ export class StzhVbzTicker {
|
|
|
90
91
|
if (message.category === VBZ.DISTURBANCE_NORMAL) {
|
|
91
92
|
lines[product.lineId].alert = true;
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
94
|
+
// only add disturbance message to line if it was not already added (avoiding same message twice)
|
|
95
|
+
if (!affectedLines.includes(product.lineId)) {
|
|
96
|
+
affectedLines.push(product.lineId);
|
|
97
|
+
lines[product.lineId].disturbances.push({
|
|
98
|
+
id: message.id,
|
|
99
|
+
head: message.head,
|
|
100
|
+
category: message.category,
|
|
101
|
+
baseType: message.baseType,
|
|
102
|
+
startDate: new Date(`${message.sDate}T${message.sTime}+02:00`),
|
|
103
|
+
endDate: new Date(`${message.eDate}T${message.eTime}+02:00`),
|
|
104
|
+
altStart: message.altStart,
|
|
105
|
+
altEnd: message.altEnd,
|
|
106
|
+
infoUrl: infoUrl
|
|
107
|
+
});
|
|
108
|
+
}
|
|
104
109
|
});
|
|
105
110
|
}
|
|
106
111
|
});
|
|
@@ -14,23 +14,8 @@ function createCommonjsModule(fn, basedir, module) {
|
|
|
14
14
|
}, fn(module, module.exports), module.exports;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
function getAugmentedNamespace(n) {
|
|
18
|
-
if (n.__esModule) return n;
|
|
19
|
-
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
20
|
-
Object.keys(n).forEach(function (k) {
|
|
21
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
22
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () {
|
|
25
|
-
return n[k];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
return a;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
17
|
function commonjsRequire () {
|
|
33
18
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
34
19
|
}
|
|
35
20
|
|
|
36
|
-
export { commonjsGlobal as a,
|
|
21
|
+
export { commonjsGlobal as a, createCommonjsModule as c, getDefaultExportFromCjs as g };
|
package/dist/components/index.js
CHANGED
|
@@ -95,7 +95,7 @@ export { StzhVisuallyhidden, defineCustomElement as defineCustomElementStzhVisua
|
|
|
95
95
|
export { StzhVspace, defineCustomElement as defineCustomElementStzhVspace } from './stzh-vspace.js';
|
|
96
96
|
|
|
97
97
|
const name = "@oiz/stzh-components";
|
|
98
|
-
const version = "2.4.0
|
|
98
|
+
const version = "2.4.0";
|
|
99
99
|
|
|
100
100
|
const packageName = name.substring(name.indexOf('/')+1);
|
|
101
101
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { h as hasSlot } from './utils.js';
|
|
3
|
+
import { f as fetchTranslations } from './translation-utils.js';
|
|
3
4
|
import { d as defineCustomElement$2 } from './stzh-badge2.js';
|
|
4
5
|
import { d as defineCustomElement$1 } from './stzh-icon2.js';
|
|
5
6
|
|
|
6
|
-
const stzhButtonCss = "@charset \"UTF-8\";.sc-stzh-button-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-button-h{display:none}.sc-stzh-button-h *.sc-stzh-button,.sc-stzh-button-h *.sc-stzh-button::before,.sc-stzh-button-h *.sc-stzh-button::after{-webkit-box-sizing:border-box;box-sizing:border-box}.sc-stzh-button-h{--color:var(--stzh-color-white);--background-color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--border-color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--height:var(--stzh-form-input-height);--icon-size:var(--stzh-icon-size-small);--icon-text-margin:var(--stzh-space-small);--badge-icon-text-margin:calc(var(--icon-text-margin) + var(--stzh-space-xxsmall));--padding:calc(var(--stzh-space-xsmall) - 0.0625rem) var(--stzh-space-xlarge);--white-space:normal;--border-radius:var(--stzh-button-border-radius);--hover-color:var(--stzh-color-white);--hover-background-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--floating-position:sticky;--floating-float:right;--floating-bottom:var(--stzh-space-medium);--floating-right:var(--stzh-space-medium);display:inline-block;border-radius:var(--border-radius)}@media screen and (min-width: 600px){.sc-stzh-button-h{--floating-bottom:var(--stzh-space-xlarge);--floating-right:var(--stzh-space-xlarge)}}[fullwidth].sc-stzh-button-h:not([fullwidth=false]){width:100%;display:block}[rounded].sc-stzh-button-h:not([rounded=false]){--border-radius:var(--height)}[floating].sc-stzh-button-h:not([floating=false]){position:var(--floating-position);bottom:var(--floating-bottom);right:var(--floating-right);float:var(--floating-float)}[size=small].sc-stzh-button-h{--height:var(--stzh-form-input-small-height)}[size=tiny].sc-stzh-button-h{--height:var(--stzh-form-input-tiny-height);--icon-text-margin:var(--stzh-space-xsmall);--padding:calc(var(--stzh-space-xxsmall) - 0.0625rem) var(--stzh-space-medium)}[variant=secondary].sc-stzh-button-h{--color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--background-color:var(--stzh-color-white)}[variant=input].sc-stzh-button-h{--color:var(--stzh-color-grey61);--background-color:transparent;--border-color:var(--stzh-color-grey61);--hover-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-background-color:transparent;--hover-border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}[variant=tertiary].sc-stzh-button-h{--color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--background-color:transparent;--border-color:transparent;--hover-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-background-color:var(--stzh-button-text-hover-background);--hover-border-color:transparent}[active].sc-stzh-button-h:not([active=false]){--color:var(--stzh-color-white);--background-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-color:var(--stzh-color-white);--hover-background-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}[disabled].sc-stzh-button-h:not([disabled=false]){--border-color:var(--stzh-color-grey13);--background-color:var(--stzh-color-grey13);--hover-border-color:var(--stzh-color-grey13);--hover-background-color:var(--stzh-color-grey13)}[disabled].sc-stzh-button-h:not([disabled=false])[variant=secondary],[disabled].sc-stzh-button-h:not([disabled=false])[variant=input],[disabled].sc-stzh-button-h:not([disabled=false])[variant=tertiary]{--color:var(--stzh-color-grey25);--border-color:var(--stzh-color-grey13);--background-color:transparent;--hover-color:var(--stzh-color-grey25);--hover-border-color:var(--stzh-color-grey13);--hover-background-color:transparent}@-webkit-keyframes stzh-button-effect-cta{0%,20%,50%,80%,100%{-webkit-transform:translateX(0);transform:translateX(0)}40%{-webkit-transform:translateX(-0.5rem);transform:translateX(-0.5rem)}60%{-webkit-transform:translateX(-0.25rem);transform:translateX(-0.25rem)}}@keyframes stzh-button-effect-cta{0%,20%,50%,80%,100%{-webkit-transform:translateX(0);transform:translateX(0)}40%{-webkit-transform:translateX(-0.5rem);transform:translateX(-0.5rem)}60%{-webkit-transform:translateX(-0.25rem);transform:translateX(-0.25rem)}}.sc-stzh-button-h .sc-stzh-button-s>stzh-icon,.stzh-button__icon.sc-stzh-button{--size:var(--icon-size)}.stzh-button.sc-stzh-button{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);line-height:1.25;font-family:inherit;position:relative;z-index:0;overflow:visible;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:stretch;justify-content:stretch;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:var(--color);padding:var(--padding);background-color:var(--background-color);-webkit-transition:all var(--stzh-base-transition-animation-speed);transition:all var(--stzh-base-transition-animation-speed);border:0.0625rem solid var(--border-color);cursor:pointer;text-decoration:none;width:100%;min-width:var(--height);min-height:var(--height);border-radius:var(--border-radius);text-align:left}.stzh-button.sc-stzh-button:hover{border-color:var(--hover-border-color);background-color:var(--hover-background-color);color:var(--hover-color)}.stzh-button__inner.sc-stzh-button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}.stzh-button__icon-wrapper.sc-stzh-button{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0;width:auto;height:1em}.stzh-button__text.sc-stzh-button{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;white-space:var(--white-space);text-align:center}.stzh-button__icon-wrapper.sc-stzh-button:not(:empty)+.stzh-button__text.sc-stzh-button:not(:empty),.stzh-button__text.sc-stzh-button:not(:empty)+.stzh-button__icon-wrapper.sc-stzh-button:not(:empty){margin-left:var(--icon-text-margin)}.stzh-button__badge.sc-stzh-button{position:absolute;z-index:1;top:0;right:0}.stzh-button__input.sc-stzh-button{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;z-index:-1;opacity:0;pointer-events:none}.stzh-button__mark.sc-stzh-button{border:0.0625rem solid var(--stzh-color-grey61);background-color:var(--stzh-color-white);width:1.5rem;height:1.5rem;-ms-flex-negative:0;flex-shrink:0;border-radius:50%;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-transition:border-color var(--stzh-base-transition-animation-speed);transition:border-color var(--stzh-base-transition-animation-speed);width:1.25rem;height:1.25rem;margin-right:var(--stzh-space-xsmall);border-color:currentColor}.stzh-button__mark.sc-stzh-button::before{content:\"\"}.stzh-button__check.sc-stzh-button{background-color:currentColor;color:var(--stzh-color-primary, var(--stzh-color-zueriblue));width:0.5rem;height:0.5rem;border-radius:50%;opacity:0}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-button__check.sc-stzh-button{background-color:ButtonText}}.stzh-button__input.sc-stzh-button:checked:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-button.sc-stzh-button:hover .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:focus:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-button__input.sc-stzh-button:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-button__input.sc-stzh-button:checked~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{opacity:1}.stzh-button--is-disabled.sc-stzh-button .stzh-button__input.sc-stzh-button~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{color:var(--stzh-color-grey61)}.stzh-button--is-disabled.sc-stzh-button .stzh-button__input.sc-stzh-button~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:transparent}.stzh-button--is-disabled.sc-stzh-button .stzh-button__mark.sc-stzh-button{background-color:var(--stzh-color-black8)}.stzh-button--size-small.sc-stzh-button,.stzh-button--size-tiny.sc-stzh-button{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-button--is-floating.sc-stzh-button{-webkit-box-shadow:var(--stzh-box-shadow-overlay);box-shadow:var(--stzh-box-shadow-overlay)}.stzh-button--badge-position-button.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button{position:static}.stzh-button__badge.sc-stzh-button,.stzh-button--badge-position-button.sc-stzh-button .stzh-button__badge.sc-stzh-button{top:calc(var(--stzh-space-xsmall) * -1);right:calc(var(--stzh-space-xsmall) * -1)}.stzh-button--badge-position-icon.stzh-button--has-icon.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button{position:relative}.stzh-button--badge-position-icon.stzh-button--has-icon.sc-stzh-button .stzh-button__badge.sc-stzh-button{top:calc(var(--stzh-space-xsmall) * -1);right:calc(var(--stzh-space-small) * -1)}.stzh-button--badge-position-icon.stzh-button--has-icon.stzh-button--has-badge.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button:not(:empty)+.stzh-button__text.sc-stzh-button:not(:empty),.stzh-button--badge-position-icon.stzh-button--has-icon.stzh-button--has-badge.sc-stzh-button .stzh-button__text.sc-stzh-button:not(:empty)+.stzh-button__icon-wrapper.sc-stzh-button:not(:empty){margin-left:var(--badge-icon-text-margin)}.stzh-button--has-icon-only.sc-stzh-button{width:var(--height);height:var(--height);padding:0}.stzh-button--has-icon-only.sc-stzh-button .stzh-button__text.sc-stzh-button{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-button--effect-cta.sc-stzh-button:hover .stzh-button__icon-wrapper.sc-stzh-button{-webkit-animation:stzh-button-effect-cta 1s;animation:stzh-button-effect-cta 1s}.stzh-button--align-left.sc-stzh-button .stzh-button__inner.sc-stzh-button{-ms-flex-pack:start;justify-content:flex-start}.stzh-button--align-right.sc-stzh-button .stzh-button__inner.sc-stzh-button{-ms-flex-pack:end;justify-content:flex-end}.stzh-button--align-center.sc-stzh-button .stzh-button__inner.sc-stzh-button{-ms-flex-pack:center;justify-content:center}.stzh-button--align-space-between.sc-stzh-button .stzh-button__inner.sc-stzh-button{-ms-flex-pack:justify;justify-content:space-between}.stzh-button--is-disabled.sc-stzh-button{cursor:not-allowed}";
|
|
7
|
+
const stzhButtonCss = "@charset \"UTF-8\";.sc-stzh-button-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-button-h{display:none}.sc-stzh-button-h *.sc-stzh-button,.sc-stzh-button-h *.sc-stzh-button::before,.sc-stzh-button-h *.sc-stzh-button::after{-webkit-box-sizing:border-box;box-sizing:border-box}.sc-stzh-button-h{--color:var(--stzh-color-white);--background-color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--border-color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--height:var(--stzh-form-input-height);--icon-size:var(--stzh-icon-size-small);--icon-text-margin:var(--stzh-space-small);--badge-icon-text-margin:calc(var(--icon-text-margin) + var(--stzh-space-xxsmall));--padding:calc(var(--stzh-space-xsmall) - 0.0625rem) var(--stzh-space-xlarge);--white-space:normal;--border-radius:var(--stzh-button-border-radius);--hover-color:var(--stzh-color-white);--hover-background-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--floating-position:sticky;--floating-float:right;--floating-bottom:var(--stzh-space-medium);--floating-right:var(--stzh-space-medium);display:inline-block;border-radius:var(--border-radius)}@media screen and (min-width: 600px){.sc-stzh-button-h{--floating-bottom:var(--stzh-space-xlarge);--floating-right:var(--stzh-space-xlarge)}}[fullwidth].sc-stzh-button-h:not([fullwidth=false]){width:100%;display:block}[rounded].sc-stzh-button-h:not([rounded=false]){--border-radius:var(--height)}[floating].sc-stzh-button-h:not([floating=false]){position:var(--floating-position);bottom:var(--floating-bottom);right:var(--floating-right);float:var(--floating-float)}[size=small].sc-stzh-button-h{--height:var(--stzh-form-input-small-height)}[size=tiny].sc-stzh-button-h{--height:var(--stzh-form-input-tiny-height);--icon-text-margin:var(--stzh-space-xsmall);--padding:calc(var(--stzh-space-xxsmall) - 0.0625rem) var(--stzh-space-medium)}[variant=secondary].sc-stzh-button-h{--color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--background-color:var(--stzh-color-white)}[variant=input].sc-stzh-button-h{--color:var(--stzh-color-grey61);--background-color:transparent;--border-color:var(--stzh-color-grey61);--hover-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-background-color:transparent;--hover-border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}[variant=tertiary].sc-stzh-button-h{--color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--background-color:transparent;--border-color:transparent;--hover-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-background-color:var(--stzh-button-text-hover-background);--hover-border-color:transparent}[active].sc-stzh-button-h:not([active=false]){--color:var(--stzh-color-white);--background-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-color:var(--stzh-color-white);--hover-background-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}[disabled].sc-stzh-button-h:not([disabled=false]){--border-color:var(--stzh-color-grey13);--background-color:var(--stzh-color-grey13);--hover-border-color:var(--stzh-color-grey13);--hover-background-color:var(--stzh-color-grey13)}[disabled].sc-stzh-button-h:not([disabled=false])[variant=secondary],[disabled].sc-stzh-button-h:not([disabled=false])[variant=input],[disabled].sc-stzh-button-h:not([disabled=false])[variant=tertiary]{--color:var(--stzh-color-grey25);--border-color:var(--stzh-color-grey13);--background-color:transparent;--hover-color:var(--stzh-color-grey25);--hover-border-color:var(--stzh-color-grey13);--hover-background-color:transparent}@-webkit-keyframes stzh-button-effect-cta{0%,20%,50%,80%,100%{-webkit-transform:translateX(0);transform:translateX(0)}40%{-webkit-transform:translateX(-0.5rem);transform:translateX(-0.5rem)}60%{-webkit-transform:translateX(-0.25rem);transform:translateX(-0.25rem)}}@keyframes stzh-button-effect-cta{0%,20%,50%,80%,100%{-webkit-transform:translateX(0);transform:translateX(0)}40%{-webkit-transform:translateX(-0.5rem);transform:translateX(-0.5rem)}60%{-webkit-transform:translateX(-0.25rem);transform:translateX(-0.25rem)}}.sc-stzh-button-h .sc-stzh-button-s>stzh-icon,.stzh-button__icon.sc-stzh-button{--size:var(--icon-size)}.stzh-button.sc-stzh-button{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);line-height:1.25;font-family:inherit;position:relative;z-index:0;overflow:visible;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:stretch;justify-content:stretch;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:var(--color);padding:var(--padding);background-color:var(--background-color);-webkit-transition:all var(--stzh-base-transition-animation-speed);transition:all var(--stzh-base-transition-animation-speed);border:0.0625rem solid var(--border-color);cursor:pointer;text-decoration:none;width:100%;min-width:var(--height);min-height:var(--height);border-radius:var(--border-radius);text-align:left}.stzh-button.sc-stzh-button:hover{border-color:var(--hover-border-color);background-color:var(--hover-background-color);color:var(--hover-color)}.stzh-button__vhidden.sc-stzh-button{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-button__inner.sc-stzh-button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}.stzh-button__icon-wrapper.sc-stzh-button{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0;width:auto;height:1em}.stzh-button__text.sc-stzh-button{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;white-space:var(--white-space);text-align:center}.stzh-button__icon-wrapper.sc-stzh-button:not(:empty)+.stzh-button__text.sc-stzh-button:not(:empty),.stzh-button__text.sc-stzh-button:not(:empty)+.stzh-button__icon-wrapper.sc-stzh-button:not(:empty){margin-left:var(--icon-text-margin)}.stzh-button__badge.sc-stzh-button{position:absolute;z-index:1;top:0;right:0}.stzh-button__input.sc-stzh-button{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;z-index:-1;opacity:0;pointer-events:none}.stzh-button__mark.sc-stzh-button{border:0.0625rem solid var(--stzh-color-grey61);background-color:var(--stzh-color-white);width:1.5rem;height:1.5rem;-ms-flex-negative:0;flex-shrink:0;border-radius:50%;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-transition:border-color var(--stzh-base-transition-animation-speed);transition:border-color var(--stzh-base-transition-animation-speed);width:1.25rem;height:1.25rem;margin-right:var(--stzh-space-xsmall);border-color:currentColor}.stzh-button__mark.sc-stzh-button::before{content:\"\"}.stzh-button__check.sc-stzh-button{background-color:currentColor;color:var(--stzh-color-primary, var(--stzh-color-zueriblue));width:0.5rem;height:0.5rem;border-radius:50%;opacity:0}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-button__check.sc-stzh-button{background-color:ButtonText}}.stzh-button__input.sc-stzh-button:checked:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-button.sc-stzh-button:hover .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:focus:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:hover~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-button__input.sc-stzh-button:focus~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button,.stzh-button__input.sc-stzh-button:checked~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-button__input.sc-stzh-button:checked~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{opacity:1}.stzh-button--is-disabled.sc-stzh-button .stzh-button__input.sc-stzh-button~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button .stzh-button__check.sc-stzh-button{color:var(--stzh-color-grey61)}.stzh-button--is-disabled.sc-stzh-button .stzh-button__input.sc-stzh-button~.stzh-button__inner.sc-stzh-button .stzh-button__mark.sc-stzh-button{border-color:transparent}.stzh-button--is-disabled.sc-stzh-button .stzh-button__mark.sc-stzh-button{background-color:var(--stzh-color-black8)}.stzh-button--size-small.sc-stzh-button,.stzh-button--size-tiny.sc-stzh-button{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-button--is-floating.sc-stzh-button{-webkit-box-shadow:var(--stzh-box-shadow-overlay);box-shadow:var(--stzh-box-shadow-overlay)}.stzh-button--badge-position-button.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button{position:static}.stzh-button__badge.sc-stzh-button,.stzh-button--badge-position-button.sc-stzh-button .stzh-button__badge.sc-stzh-button{top:calc(var(--stzh-space-xsmall) * -1);right:calc(var(--stzh-space-xsmall) * -1)}.stzh-button--badge-position-icon.stzh-button--has-icon.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button{position:relative}.stzh-button--badge-position-icon.stzh-button--has-icon.sc-stzh-button .stzh-button__badge.sc-stzh-button{top:calc(var(--stzh-space-xsmall) * -1);right:calc(var(--stzh-space-small) * -1)}.stzh-button--badge-position-icon.stzh-button--has-icon.stzh-button--has-badge.sc-stzh-button .stzh-button__icon-wrapper.sc-stzh-button:not(:empty)+.stzh-button__text.sc-stzh-button:not(:empty),.stzh-button--badge-position-icon.stzh-button--has-icon.stzh-button--has-badge.sc-stzh-button .stzh-button__text.sc-stzh-button:not(:empty)+.stzh-button__icon-wrapper.sc-stzh-button:not(:empty){margin-left:var(--badge-icon-text-margin)}.stzh-button--has-icon-only.sc-stzh-button{width:var(--height);height:var(--height);padding:0}.stzh-button--has-icon-only.sc-stzh-button .stzh-button__text.sc-stzh-button{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-button--effect-cta.sc-stzh-button:hover .stzh-button__icon-wrapper.sc-stzh-button{-webkit-animation:stzh-button-effect-cta 1s;animation:stzh-button-effect-cta 1s}.stzh-button--align-left.sc-stzh-button .stzh-button__inner.sc-stzh-button{-ms-flex-pack:start;justify-content:flex-start}.stzh-button--align-right.sc-stzh-button .stzh-button__inner.sc-stzh-button{-ms-flex-pack:end;justify-content:flex-end}.stzh-button--align-center.sc-stzh-button .stzh-button__inner.sc-stzh-button{-ms-flex-pack:center;justify-content:center}.stzh-button--align-space-between.sc-stzh-button .stzh-button__inner.sc-stzh-button{-ms-flex-pack:justify;justify-content:space-between}.stzh-button--is-disabled.sc-stzh-button{cursor:not-allowed}";
|
|
7
8
|
|
|
8
9
|
const StzhButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
10
|
constructor() {
|
|
@@ -51,6 +52,7 @@ const StzhButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
51
52
|
event.preventDefault();
|
|
52
53
|
}
|
|
53
54
|
};
|
|
55
|
+
this.localization = undefined;
|
|
54
56
|
this.badge = "";
|
|
55
57
|
this.badgeType = "default";
|
|
56
58
|
this.badgePosition = "button";
|
|
@@ -94,13 +96,18 @@ const StzhButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
94
96
|
h("stzh-badge", { class: "stzh-button__badge", label: this.badge, type: this.badgeType })));
|
|
95
97
|
}
|
|
96
98
|
renderContent() {
|
|
97
|
-
return (h("div", { class: "stzh-button__text" }, this.label ? this.label : h("slot", null)));
|
|
99
|
+
return (h("div", { class: "stzh-button__text" }, this.rel && this.rel.includes('external') && h("div", { class: "stzh-button__vhidden" }, this.localization.$globals.externalLinkLabel), this.download && h("div", { class: "stzh-button__vhidden" }, this.localization.$globals.downloadLinkLabel), this.label ? this.label : h("slot", null)));
|
|
98
100
|
}
|
|
99
101
|
renderInner(iconUsed) {
|
|
100
102
|
return (h(Fragment, null, h("div", { class: "stzh-button__inner", onClick: this.onClick }, this.type === "radio" &&
|
|
101
103
|
h("div", { class: "stzh-button__mark" }, h("div", { class: "stzh-button__check" })), this.iconPosition === "left" && this.renderIcon(iconUsed), this.renderContent(), this.iconPosition === "right" && this.renderIcon(iconUsed)), (this.badge || this.badgeEmpty) && (this.badgePosition === "button" || !iconUsed) &&
|
|
102
104
|
h("stzh-badge", { class: "stzh-button__badge", label: this.badge, type: this.badgeType, onClick: this.onClick })));
|
|
103
105
|
}
|
|
106
|
+
async componentWillLoad() {
|
|
107
|
+
if (!this.localization) {
|
|
108
|
+
this.localization = await fetchTranslations(this.element, "button");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
104
111
|
render() {
|
|
105
112
|
const iconUsed = hasSlot(this.element, "icon") || !!this.icon;
|
|
106
113
|
const classes = {
|
|
@@ -134,6 +141,7 @@ const StzhButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
134
141
|
get element() { return this; }
|
|
135
142
|
static get style() { return stzhButtonCss; }
|
|
136
143
|
}, [6, "stzh-button", {
|
|
144
|
+
"localization": [16],
|
|
137
145
|
"badge": [1],
|
|
138
146
|
"badgeType": [513, "badge-type"],
|
|
139
147
|
"badgePosition": [513, "badge-position"],
|
|
@@ -11,7 +11,7 @@ import { d as defineCustomElement$3 } from './stzh-menu-item2.js';
|
|
|
11
11
|
import { d as defineCustomElement$2 } from './stzh-popover2.js';
|
|
12
12
|
import { d as defineCustomElement$1 } from './stzh-tooltip2.js';
|
|
13
13
|
|
|
14
|
-
const stzhCardCss = ".sc-stzh-card-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-card-h{display:none}.sc-stzh-card-h *.sc-stzh-card,.sc-stzh-card-h *.sc-stzh-card::before,.sc-stzh-card-h *.sc-stzh-card::after{-webkit-box-sizing:border-box;box-sizing:border-box}.sc-stzh-card-h{--box-shadow:var(--stzh-box-shadow-popover);--border:0.0625rem solid var(--stzh-base-border-color);--border-radius:0.1875rem;--content-min-height:7.5rem;--dnd-visibility:hidden;--dnd-opacity:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;border-radius:var(--border-radius)}[collapsed].sc-stzh-card-h:not([collapsed=false]){--content-min-height:none}[checked].sc-stzh-card-h:not([checked=false]){outline:0.1875rem solid var(--stzh-color-primary, var(--stzh-color-zueriblue))}.is-ghost.sc-stzh-card-h::after,.is-ghost .sc-stzh-card-h::after{border-radius:var(--border-radius)}[href].sc-stzh-card-h:hover,[href].sc-stzh-card-h:focus-within,.is-selected.sc-stzh-card-h,.is-chosen.sc-stzh-card-h,.is-selected .sc-stzh-card-h,.is-chosen .sc-stzh-card-h{--box-shadow:var(--stzh-box-shadow-overlay)}.is-ghost.sc-stzh-card-h,.is-ghost .sc-stzh-card-h{--box-shadow:none;--border:0.0625rem solid transparent;overflow:hidden}.is-drag.sc-stzh-card-h,.is-chosen.sc-stzh-card-h,.is-ghost.sc-stzh-card-h,.is-selected.sc-stzh-card-h,.is-drag .sc-stzh-card-h,.is-chosen .sc-stzh-card-h,.is-ghost .sc-stzh-card-h,.is-selected .sc-stzh-card-h{--dnd-visibility:visible;--dnd-opacity:1}.sc-stzh-card-h .sc-stzh-card-s>*{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.sc-stzh-card-h .sc-stzh-card-s>[slot=image]{width:100%;max-width:100%}.sc-stzh-card-h .sc-stzh-card-s>img[slot=image]{display:block}.sc-stzh-card-h .sc-stzh-card-s>[slot=meta]:not(:last-child){margin-right:var(--stzh-space-xsmall)}.sc-stzh-card-h .sc-stzh-card-s>table{border:0;border-spacing:0}.sc-stzh-card-h .sc-stzh-card-s>table th{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal}.sc-stzh-card-h .sc-stzh-card-s>table td,.sc-stzh-card-h .sc-stzh-card-s>table th{padding:0}.sc-stzh-card-h .sc-stzh-card-s>table td{color:var(--stzh-color-black);padding-left:var(--stzh-space-xsmall)}.sc-stzh-card-h .sc-stzh-card-s>[slot=heading],.stzh-card__title.sc-stzh-card{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:normal;font-size:var(--stzh-font-curve-h3-default-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-h3-default-heading-line-height, var(--stzh-font-centi-heading-line-height));letter-spacing:var(--stzh-font-curve-h3-default-heading-letter-spacing)}@media screen and (min-width: 600px){.sc-stzh-card-h .sc-stzh-card-s>[slot=heading],.stzh-card__title.sc-stzh-card{font-size:var(--stzh-font-curve-h3-small-font-size, var(--stzh-font-deci-font-size));line-height:var(--stzh-font-curve-h3-small-heading-line-height, var(--stzh-font-deci-heading-line-height));letter-spacing:var(--stzh-font-curve-h3-small-heading-letter-spacing)}}@media screen and (min-width: 1024px){.sc-stzh-card-h .sc-stzh-card-s>[slot=heading],.stzh-card__title.sc-stzh-card{font-size:var(--stzh-font-curve-h3-medium-font-size, var(--stzh-font-regular-font-size));line-height:var(--stzh-font-curve-h3-medium-heading-line-height, var(--stzh-font-regular-heading-line-height));letter-spacing:var(--stzh-font-curve-h3-medium-heading-letter-spacing)}}.stzh-card.sc-stzh-card{-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:var(--stzh-color-white);border-radius:var(--border-radius);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);border:var(--border);-webkit-transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed), -webkit-box-shadow var(--stzh-base-transition-animation-speed)}@media screen and (max-width: 1023px){.stzh-card.sc-stzh-card .vshow-medium.sc-stzh-card{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}@media screen and (max-width: 1023px){.stzh-card.sc-stzh-card .show-medium.sc-stzh-card{display:none}}@media screen and (min-width: 1024px){.stzh-card.sc-stzh-card .hide-medium.sc-stzh-card{display:none}}.stzh-card__content-wrapper.sc-stzh-card{position:relative;-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:var(--content-min-height)}.stzh-card__dnd.sc-stzh-card{--size:var(--stzh-icon-size-xsmall);position:absolute;left:0.1875rem;top:1.4375rem;display:-ms-flexbox;display:flex;visibility:var(--dnd-visibility);opacity:var(--dnd-opacity);-webkit-transition:all var(--stzh-base-transition-animation-speed);transition:all var(--stzh-base-transition-animation-speed);display:none}@media screen and (min-width: 1024px){.stzh-card__dnd.sc-stzh-card{display:block}}@media screen and (min-width: 1260px){.stzh-card__dnd.sc-stzh-card{left:0.25rem;top:1.6875rem}}.stzh-card__header.sc-stzh-card{padding:var(--stzh-space-medium);border-bottom:0.0625rem solid var(--stzh-base-border-color)}@media screen and (min-width: 1024px){.stzh-card__header.sc-stzh-card{padding:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.stzh-card__header.sc-stzh-card{padding:var(--stzh-space-xlarge)}}.stzh-card__header-top.sc-stzh-card{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}.stzh-card__header-meta.sc-stzh-card{display:-ms-flexbox;display:flex}.stzh-card__header-meta.sc-stzh-card:not(:empty){margin-top:var(--stzh-space-xsmall)}.stzh-card__header-left.sc-stzh-card,.stzh-card__header-right.sc-stzh-card{display:-ms-flexbox;display:flex}.stzh-card__header-right.sc-stzh-card{padding-left:var(--stzh-space-xsmall)}@media screen and (min-width: 1024px){.stzh-card__header-right.sc-stzh-card{padding-left:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-card__header-right.sc-stzh-card{padding-left:var(--stzh-space-medium)}}.stzh-card__left.sc-stzh-card{-ms-flex-item-align:center;align-self:center}.stzh-card__title-area.sc-stzh-card{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden}.stzh-card__title.sc-stzh-card,.stzh-card__subtitle.sc-stzh-card{margin:0}.stzh-card__title-link.sc-stzh-card{color:inherit;text-decoration:none}.stzh-card__image-link.sc-stzh-card{display:block}.stzh-card__subtitle.sc-stzh-card{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-decoration:none;margin-left:-0.5625em}@media screen and (min-width: 1024px){.stzh-card__subtitle.sc-stzh-card{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-card__subtitle-text.sc-stzh-card{position:relative;display:-ms-inline-flexbox;display:inline-flex;padding-left:0.5625em}.stzh-card__subtitle-text.sc-stzh-card::after{content:\",\";position:absolute;left:0}.stzh-card__content.sc-stzh-card{-ms-flex-positive:1;flex-grow:1}.stzh-card__content.sc-stzh-card:not(:empty){padding:var(--stzh-space-medium)}@media screen and (min-width: 1024px){.stzh-card__content.sc-stzh-card:not(:empty){padding:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.stzh-card__content.sc-stzh-card:not(:empty){padding:var(--stzh-space-xlarge)}}.stzh-card__footer.sc-stzh-card:not(:empty){padding:var(--stzh-space-medium);border-top:0.0625rem solid var(--stzh-base-border-color)}@media screen and (min-width: 1024px){.stzh-card__footer.sc-stzh-card:not(:empty){padding:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.stzh-card__footer.sc-stzh-card:not(:empty){padding:var(--stzh-space-xlarge)}}.stzh-card__footer-arrow.sc-stzh-card{--size:var(--stzh-icon-size-medium);color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-card__card-actions.sc-stzh-card{display:-ms-inline-flexbox;display:inline-flex;white-space:nowrap}@media screen and (max-width: 1023px){.stzh-card__card-action.sc-stzh-card{--icon-text-margin:0;--badge-icon-text-margin:0}}.stzh-card__card-action[variant=tertiary].sc-stzh-card{--color:var(--stzh-color-grey70)}.stzh-card__card-action.is-button.sc-stzh-card{--icon-size:var(--stzh-icon-size-small)}.stzh-card__card-action.is-placeholder.sc-stzh-card{width:var(--stzh-space-xxlarge);height:var(--stzh-space-xxlarge)}.stzh-card__card-action-popover.sc-stzh-card{--width:auto}.stzh-card--has-link.sc-stzh-card .stzh-card__title-link.sc-stzh-card{color:var(--stzh-color-primary, var(--stzh-color-zueriblue));text-decoration:none;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);border-radius:var(--stzh-button-border-radius)}.stzh-card--has-link.sc-stzh-card:hover .stzh-card__footer-arrow.sc-stzh-card{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-card--has-subtitle-interactive.sc-stzh-card .stzh-card__subtitle.sc-stzh-card{cursor:pointer;font-family:inherit;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-card--has-subtitle-interactive.sc-stzh-card .stzh-card__subtitle.sc-stzh-card:hover,.stzh-card--has-subtitle-interactive.sc-stzh-card .stzh-card__subtitle.sc-stzh-card:focus{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-card--is-collapsible.sc-stzh-card .stzh-card__header.sc-stzh-card{cursor:pointer}.stzh-card--is-collapsed.sc-stzh-card .vhide-when-collapsed.sc-stzh-card,.stzh-card--has-collapsed-header.sc-stzh-card .stzh-card__header.sc-stzh-card .vhide-when-collapsed.sc-stzh-card{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-card--is-collapsed.sc-stzh-card .hide-when-collapsed.sc-stzh-card,.stzh-card--has-collapsed-header.sc-stzh-card .stzh-card__header.sc-stzh-card .hide-when-collapsed.sc-stzh-card{display:none}.stzh-card--is-collapsed.sc-stzh-card .show-when-collapsed.sc-stzh-card,.stzh-card--has-collapsed-header.sc-stzh-card .stzh-card__header.sc-stzh-card .show-when-collapsed.sc-stzh-card{display:block}.stzh-card--is-collapsed.sc-stzh-card .stzh-card__header.sc-stzh-card{border-bottom:none}.stzh-card--is-collapsed.sc-stzh-card .stzh-card__card-action.sc-stzh-card,.stzh-card--has-collapsed-header.sc-stzh-card .stzh-card__card-action.sc-stzh-card{--icon-text-margin:0;--badge-icon-text-margin:0}.stzh-card--is-starred.sc-stzh-card .stzh-card__card-action.is-star.sc-stzh-card{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-card--is-starred.sc-stzh-card .stzh-card__card-action.is-star.sc-stzh-card:hover,.stzh-card--is-starred.sc-stzh-card .stzh-card__card-action.is-star.sc-stzh-card:focus{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-card--has-hidden-header-border.sc-stzh-card .stzh-card__header.sc-stzh-card{border-bottom:none;padding-bottom:0}.stzh-card--has-hidden-footer-border.sc-stzh-card .stzh-card__footer.sc-stzh-card:not(:empty){padding-top:0;border-top:none}";
|
|
14
|
+
const stzhCardCss = ".sc-stzh-card-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-card-h{display:none}.sc-stzh-card-h *.sc-stzh-card,.sc-stzh-card-h *.sc-stzh-card::before,.sc-stzh-card-h *.sc-stzh-card::after{-webkit-box-sizing:border-box;box-sizing:border-box}.sc-stzh-card-h{--box-shadow:var(--stzh-box-shadow-popover);--border:0.0625rem solid var(--stzh-base-border-color);--border-radius:0.1875rem;--content-min-height:7.5rem;--dnd-visibility:hidden;--dnd-opacity:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;border-radius:var(--border-radius)}[collapsed].sc-stzh-card-h:not([collapsed=false]){--content-min-height:none}[checked].sc-stzh-card-h:not([checked=false]){outline:0.1875rem solid var(--stzh-color-primary, var(--stzh-color-zueriblue))}.is-ghost.sc-stzh-card-h::after,.is-ghost .sc-stzh-card-h::after{border-radius:var(--border-radius)}[href].sc-stzh-card-h:hover,[href].sc-stzh-card-h:focus-within,.is-selected.sc-stzh-card-h,.is-chosen.sc-stzh-card-h,.is-selected .sc-stzh-card-h,.is-chosen .sc-stzh-card-h{--box-shadow:var(--stzh-box-shadow-overlay)}.is-ghost.sc-stzh-card-h,.is-ghost .sc-stzh-card-h{--box-shadow:none;--border:0.0625rem solid transparent;overflow:hidden}.is-drag.sc-stzh-card-h,.is-chosen.sc-stzh-card-h,.is-ghost.sc-stzh-card-h,.is-selected.sc-stzh-card-h,.is-drag .sc-stzh-card-h,.is-chosen .sc-stzh-card-h,.is-ghost .sc-stzh-card-h,.is-selected .sc-stzh-card-h,[is-sortable].sc-stzh-card-h:hover{--dnd-visibility:visible;--dnd-opacity:1}.sc-stzh-card-h .sc-stzh-card-s>*{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.sc-stzh-card-h .sc-stzh-card-s>[slot=image]{width:100%;max-width:100%}.sc-stzh-card-h .sc-stzh-card-s>img[slot=image]{display:block}.sc-stzh-card-h .sc-stzh-card-s>[slot=meta]:not(:last-child){margin-right:var(--stzh-space-xsmall)}.sc-stzh-card-h .sc-stzh-card-s>table{border:0;border-spacing:0}.sc-stzh-card-h .sc-stzh-card-s>table th{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal}.sc-stzh-card-h .sc-stzh-card-s>table td,.sc-stzh-card-h .sc-stzh-card-s>table th{padding:0}.sc-stzh-card-h .sc-stzh-card-s>table td{color:var(--stzh-color-black);padding-left:var(--stzh-space-xsmall)}.sc-stzh-card-h .sc-stzh-card-s>[slot=heading],.stzh-card__title.sc-stzh-card{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:normal;font-size:var(--stzh-font-curve-h3-default-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-h3-default-heading-line-height, var(--stzh-font-centi-heading-line-height));letter-spacing:var(--stzh-font-curve-h3-default-heading-letter-spacing)}@media screen and (min-width: 600px){.sc-stzh-card-h .sc-stzh-card-s>[slot=heading],.stzh-card__title.sc-stzh-card{font-size:var(--stzh-font-curve-h3-small-font-size, var(--stzh-font-deci-font-size));line-height:var(--stzh-font-curve-h3-small-heading-line-height, var(--stzh-font-deci-heading-line-height));letter-spacing:var(--stzh-font-curve-h3-small-heading-letter-spacing)}}@media screen and (min-width: 1024px){.sc-stzh-card-h .sc-stzh-card-s>[slot=heading],.stzh-card__title.sc-stzh-card{font-size:var(--stzh-font-curve-h3-medium-font-size, var(--stzh-font-regular-font-size));line-height:var(--stzh-font-curve-h3-medium-heading-line-height, var(--stzh-font-regular-heading-line-height));letter-spacing:var(--stzh-font-curve-h3-medium-heading-letter-spacing)}}.stzh-card.sc-stzh-card{-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:var(--stzh-color-white);border-radius:var(--border-radius);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);border:var(--border);-webkit-transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:-webkit-box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed);transition:box-shadow var(--stzh-base-transition-animation-speed), -webkit-box-shadow var(--stzh-base-transition-animation-speed)}@media screen and (max-width: 1023px){.stzh-card.sc-stzh-card .vshow-medium.sc-stzh-card{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}@media screen and (max-width: 1023px){.stzh-card.sc-stzh-card .show-medium.sc-stzh-card{display:none}}@media screen and (min-width: 1024px){.stzh-card.sc-stzh-card .hide-medium.sc-stzh-card{display:none}}.stzh-card__content-wrapper.sc-stzh-card{position:relative;-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:var(--content-min-height)}.stzh-card__dnd.sc-stzh-card{--size:var(--stzh-icon-size-xsmall);position:absolute;left:0.1875rem;top:1.4375rem;display:-ms-flexbox;display:flex;visibility:var(--dnd-visibility);opacity:var(--dnd-opacity);-webkit-transition:all var(--stzh-base-transition-animation-speed);transition:all var(--stzh-base-transition-animation-speed);display:none}@media screen and (min-width: 1024px){.stzh-card__dnd.sc-stzh-card{display:block}}@media screen and (min-width: 1260px){.stzh-card__dnd.sc-stzh-card{left:0.25rem;top:1.6875rem}}.stzh-card__header.sc-stzh-card{padding:var(--stzh-space-medium);border-bottom:0.0625rem solid var(--stzh-base-border-color)}@media screen and (min-width: 1024px){.stzh-card__header.sc-stzh-card{padding:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.stzh-card__header.sc-stzh-card{padding:var(--stzh-space-xlarge)}}.stzh-card__header-top.sc-stzh-card{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}.stzh-card__header-meta.sc-stzh-card{display:-ms-flexbox;display:flex}.stzh-card__header-meta.sc-stzh-card:not(:empty){margin-top:var(--stzh-space-xsmall)}.stzh-card__header-left.sc-stzh-card,.stzh-card__header-right.sc-stzh-card{display:-ms-flexbox;display:flex}.stzh-card__header-right.sc-stzh-card{padding-left:var(--stzh-space-xsmall)}@media screen and (min-width: 1024px){.stzh-card__header-right.sc-stzh-card{padding-left:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-card__header-right.sc-stzh-card{padding-left:var(--stzh-space-medium)}}.stzh-card__left.sc-stzh-card{-ms-flex-item-align:center;align-self:center}.stzh-card__title-area.sc-stzh-card{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden}.stzh-card__title.sc-stzh-card,.stzh-card__subtitle.sc-stzh-card{margin:0}.stzh-card__title-link.sc-stzh-card{color:inherit;text-decoration:none}.stzh-card__image-link.sc-stzh-card{display:block}.stzh-card__subtitle.sc-stzh-card{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-decoration:none;margin-left:-0.5625em}@media screen and (min-width: 1024px){.stzh-card__subtitle.sc-stzh-card{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-card__subtitle-text.sc-stzh-card{position:relative;display:-ms-inline-flexbox;display:inline-flex;padding-left:0.5625em}.stzh-card__subtitle-text.sc-stzh-card::after{content:\",\";position:absolute;left:0}.stzh-card__content.sc-stzh-card{-ms-flex-positive:1;flex-grow:1}.stzh-card__content.sc-stzh-card:not(:empty){padding:var(--stzh-space-medium)}@media screen and (min-width: 1024px){.stzh-card__content.sc-stzh-card:not(:empty){padding:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.stzh-card__content.sc-stzh-card:not(:empty){padding:var(--stzh-space-xlarge)}}.stzh-card__footer.sc-stzh-card:not(:empty){padding:var(--stzh-space-medium);border-top:0.0625rem solid var(--stzh-base-border-color)}@media screen and (min-width: 1024px){.stzh-card__footer.sc-stzh-card:not(:empty){padding:var(--stzh-space-large)}}@media screen and (min-width: 1260px){.stzh-card__footer.sc-stzh-card:not(:empty){padding:var(--stzh-space-xlarge)}}.stzh-card__footer-arrow.sc-stzh-card{--size:var(--stzh-icon-size-medium);color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-card__card-actions.sc-stzh-card{display:-ms-inline-flexbox;display:inline-flex;white-space:nowrap}@media screen and (max-width: 1023px){.stzh-card__card-action.sc-stzh-card{--icon-text-margin:0;--badge-icon-text-margin:0}}.stzh-card__card-action[variant=tertiary].sc-stzh-card{--color:var(--stzh-color-grey70)}.stzh-card__card-action.is-button.sc-stzh-card{--icon-size:var(--stzh-icon-size-small)}.stzh-card__card-action.is-placeholder.sc-stzh-card{width:var(--stzh-space-xxlarge);height:var(--stzh-space-xxlarge)}.stzh-card__card-action-popover.sc-stzh-card{--width:auto}.stzh-card--has-link.sc-stzh-card .stzh-card__title-link.sc-stzh-card{color:var(--stzh-color-primary, var(--stzh-color-zueriblue));text-decoration:none;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);border-radius:var(--stzh-button-border-radius)}.stzh-card--has-link.sc-stzh-card:hover .stzh-card__footer-arrow.sc-stzh-card{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-card--has-subtitle-interactive.sc-stzh-card .stzh-card__subtitle.sc-stzh-card{cursor:pointer;font-family:inherit;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-card--has-subtitle-interactive.sc-stzh-card .stzh-card__subtitle.sc-stzh-card:hover,.stzh-card--has-subtitle-interactive.sc-stzh-card .stzh-card__subtitle.sc-stzh-card:focus{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-card--is-collapsible.sc-stzh-card .stzh-card__header.sc-stzh-card{cursor:pointer}.stzh-card--is-collapsed.sc-stzh-card .vhide-when-collapsed.sc-stzh-card,.stzh-card--has-collapsed-header.sc-stzh-card .stzh-card__header.sc-stzh-card .vhide-when-collapsed.sc-stzh-card{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-card--is-collapsed.sc-stzh-card .hide-when-collapsed.sc-stzh-card,.stzh-card--has-collapsed-header.sc-stzh-card .stzh-card__header.sc-stzh-card .hide-when-collapsed.sc-stzh-card{display:none}.stzh-card--is-collapsed.sc-stzh-card .show-when-collapsed.sc-stzh-card,.stzh-card--has-collapsed-header.sc-stzh-card .stzh-card__header.sc-stzh-card .show-when-collapsed.sc-stzh-card{display:block}.stzh-card--is-collapsed.sc-stzh-card .stzh-card__header.sc-stzh-card{border-bottom:none}.stzh-card--is-collapsed.sc-stzh-card .stzh-card__card-action.sc-stzh-card,.stzh-card--has-collapsed-header.sc-stzh-card .stzh-card__card-action.sc-stzh-card{--icon-text-margin:0;--badge-icon-text-margin:0}.stzh-card--is-starred.sc-stzh-card .stzh-card__card-action.is-star.sc-stzh-card{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-card--is-starred.sc-stzh-card .stzh-card__card-action.is-star.sc-stzh-card:hover,.stzh-card--is-starred.sc-stzh-card .stzh-card__card-action.is-star.sc-stzh-card:focus{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-card--has-hidden-header-border.sc-stzh-card .stzh-card__header.sc-stzh-card{border-bottom:none;padding-bottom:0}.stzh-card--has-hidden-footer-border.sc-stzh-card .stzh-card__footer.sc-stzh-card:not(:empty){padding-top:0;border-top:none}";
|
|
15
15
|
|
|
16
16
|
const StzhCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
17
17
|
constructor() {
|
|
@@ -237,6 +237,20 @@ const StzhCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
237
237
|
var _a, _b, _c;
|
|
238
238
|
const imageUsed = hasSlot(this.element, "image");
|
|
239
239
|
const contentUsed = hasSlot(this.element, "content");
|
|
240
|
+
const Subtitle = `${this.subtitleInteractive ? 'button' : 'span'}`;
|
|
241
|
+
const sortableChildElement = this.findSortableChildElement();
|
|
242
|
+
const isFirstItemInSortable = (sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement)
|
|
243
|
+
&& Array.from((_a = sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement) === null || _a === void 0 ? void 0 : _a.children)
|
|
244
|
+
.indexOf(sortableChildElement) === 0;
|
|
245
|
+
const isLastItemInSortable = (sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement)
|
|
246
|
+
&& Array.from((_b = sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement) === null || _b === void 0 ? void 0 : _b.children)
|
|
247
|
+
.indexOf(sortableChildElement) === ((_c = sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement) === null || _c === void 0 ? void 0 : _c.children.length) - 1;
|
|
248
|
+
const sortableEnabled = !this.sortableDisabled && this.sortable && !this.sortable.disabled;
|
|
249
|
+
const sortableActionsEnabled = sortableEnabled && !this.hideMovementActions;
|
|
250
|
+
const nonCollapsingTextHeaderActions = this._headerActions.filter(action => !action.onlyCollapseText);
|
|
251
|
+
// const headerActions = [
|
|
252
|
+
// ...this._headerActions
|
|
253
|
+
// ];
|
|
240
254
|
const classes = {
|
|
241
255
|
"stzh-card": true,
|
|
242
256
|
"stzh-card--has-link": !!this.href,
|
|
@@ -249,25 +263,10 @@ const StzhCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
249
263
|
"stzh-card--is-collapsible": this.collapsible,
|
|
250
264
|
"stzh-card--is-collapsed": this.collapsed,
|
|
251
265
|
"stzh-card--is-starred": this.starred,
|
|
252
|
-
"stzh-card--is-checked": this.checked
|
|
266
|
+
"stzh-card--is-checked": this.checked,
|
|
267
|
+
"stzh-card--is-sortable": sortableEnabled
|
|
253
268
|
};
|
|
254
|
-
|
|
255
|
-
const sortableChildElement = this.findSortableChildElement();
|
|
256
|
-
const isFirstItemInSortable = (sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement)
|
|
257
|
-
&& Array.from((_a = sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement) === null || _a === void 0 ? void 0 : _a.children)
|
|
258
|
-
.indexOf(sortableChildElement) === 0;
|
|
259
|
-
const isLastItemInSortable = (sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement)
|
|
260
|
-
&& Array.from((_b = sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement) === null || _b === void 0 ? void 0 : _b.children)
|
|
261
|
-
.indexOf(sortableChildElement) === ((_c = sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement) === null || _c === void 0 ? void 0 : _c.children.length) - 1;
|
|
262
|
-
const sortableActionsEnabled = !this.sortableDisabled
|
|
263
|
-
&& !this.hideMovementActions
|
|
264
|
-
&& this.sortable
|
|
265
|
-
&& !this.sortable.disabled;
|
|
266
|
-
const nonCollapsingTextHeaderActions = this._headerActions.filter(action => !action.onlyCollapseText);
|
|
267
|
-
// const headerActions = [
|
|
268
|
-
// ...this._headerActions
|
|
269
|
-
// ];
|
|
270
|
-
return (h(Host, { role: "listitem", "aria-label": this.heading }, h("article", { ref: (el) => (this.mainElement = el), class: classes }, h("a", { "aria-hidden": "true", tabindex: "-1", class: "stzh-card__image-link", href: this.href, target: this.target, onClick: this.href ? this.cardClick : null }, h("slot", { name: "image" })), h("div", { class: "stzh-card__content-wrapper" }, h("stzh-icon", { class: "stzh-card__dnd", name: "drag" }), h("header", { ref: (el) => (this.headerElement = el), class: "stzh-card__header", onClick: this.headerClick }, h("div", { class: "stzh-card__header-top" }, h("div", { ref: (el) => (this.headerLeftElement = el), class: "stzh-card__header-left" }, h("div", { class: "stzh-card__title-area" }, h("h3", { class: "stzh-card__title" }, h("a", { class: "stzh-card__title-link", href: this.href, target: this.target, onClick: this.href ? this.cardClick : null }, this.heading ? this.heading : h("slot", { name: "heading" }))), this._subtitles.length > 0 &&
|
|
269
|
+
return (h(Host, { role: "listitem", "aria-label": this.heading, "is-sortable": sortableEnabled }, h("article", { ref: (el) => (this.mainElement = el), class: classes }, h("a", { "aria-hidden": "true", tabindex: "-1", class: "stzh-card__image-link", href: this.href, target: this.target, onClick: this.href ? this.cardClick : null }, h("slot", { name: "image" })), h("div", { class: "stzh-card__content-wrapper" }, h("stzh-icon", { class: "stzh-card__dnd", name: "drag" }), h("header", { ref: (el) => (this.headerElement = el), class: "stzh-card__header", onClick: this.headerClick }, h("div", { class: "stzh-card__header-top" }, h("div", { ref: (el) => (this.headerLeftElement = el), class: "stzh-card__header-left" }, h("div", { class: "stzh-card__title-area" }, h("h3", { class: "stzh-card__title" }, h("a", { class: "stzh-card__title-link", href: this.href, target: this.target, onClick: this.href ? this.cardClick : null }, this.heading ? this.heading : h("slot", { name: "heading" }))), this._subtitles.length > 0 &&
|
|
271
270
|
h(Subtitle, { class: "stzh-card__subtitle", onClick: this.subtitleClick }, this._subtitles.map(subtitle => (h("span", { class: "stzh-card__subtitle-text" }, subtitle)))))), h("div", { ref: (el) => (this.headerRightElement = el), class: "stzh-card__header-right" }, h("div", { class: "stzh-card__card-actions" }, this._headerActions.map(action => (h("stzh-button", { class: {
|
|
272
271
|
"stzh-card__card-action": true,
|
|
273
272
|
"is-button": true,
|