@oiz/stzh-components 2.1.0-alpha → 2.1.0-beta

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.
Files changed (140) hide show
  1. package/dist/cjs/{app-globals-e1f4f1d9.js → app-globals-07890ee7.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/stzh-checkbox.cjs.entry.js +2 -2
  4. package/dist/cjs/stzh-components.cjs.js +2 -2
  5. package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +2 -2
  6. package/dist/cjs/stzh-footer.cjs.entry.js +1 -1
  7. package/dist/cjs/stzh-header.cjs.entry.js +1 -1
  8. package/dist/cjs/stzh-icon-sprite.cjs.entry.js +1 -1
  9. package/dist/cjs/stzh-list-item.cjs.entry.js +1 -1
  10. package/dist/cjs/stzh-olmap.cjs.entry.js +1 -1
  11. package/dist/cjs/stzh-pagebottom.cjs.entry.js +32 -0
  12. package/dist/cjs/stzh-portal-mitwirken.cjs.entry.js +1 -1
  13. package/dist/cjs/stzh-share.cjs.entry.js +113 -0
  14. package/dist/cjs/stzh-upload.cjs.entry.js +53 -35
  15. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +11 -3
  16. package/dist/collection/assets/i18n/de.json +10 -0
  17. package/dist/collection/assets/i18n/en.json +10 -0
  18. package/dist/collection/collection-manifest.json +2 -0
  19. package/dist/collection/components/stzh-checkbox/assets/check.svg +1 -1
  20. package/dist/collection/components/stzh-checkbox/stzh-checkbox.css +0 -3
  21. package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +0 -11
  22. package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.js +1 -1
  23. package/dist/collection/components/stzh-footer/stzh-footer.js +2 -2
  24. package/dist/collection/components/stzh-header/stzh-header.js +2 -2
  25. package/dist/collection/components/stzh-icon-sprite/stzh-icon-sprite.css +5 -1
  26. package/dist/collection/components/stzh-list-item/assets/checkmark.svg +1 -1
  27. package/dist/collection/components/stzh-olmap/stzh-olmap.js +2 -2
  28. package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.css +150 -0
  29. package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.js +151 -0
  30. package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.stories.js +44 -0
  31. package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.stories.js +3 -3
  32. package/dist/collection/components/stzh-portal-mitwirken/stzh-portal-mitwirken.css +0 -1
  33. package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +1 -1
  34. package/dist/collection/components/stzh-share/stzh-share.css +146 -0
  35. package/dist/collection/components/stzh-share/stzh-share.js +184 -0
  36. package/dist/collection/components/stzh-share/stzh-share.localization.js +1 -0
  37. package/dist/collection/components/stzh-share/stzh-share.stories.js +33 -0
  38. package/dist/collection/components/stzh-upload/stzh-upload.css +23 -7
  39. package/dist/collection/components/stzh-upload/stzh-upload.js +71 -35
  40. package/dist/collection/components/stzh-upload/stzh-upload.stories.js +3 -3
  41. package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.js +1 -1
  42. package/dist/components/index.d.ts +2 -0
  43. package/dist/components/index.js +3 -1
  44. package/dist/components/stzh-checkbox.js +2 -2
  45. package/dist/components/stzh-datamessagelist-item.js +14 -8
  46. package/dist/components/stzh-footer.js +1 -1
  47. package/dist/components/stzh-header.js +1 -1
  48. package/dist/components/stzh-icon-sprite.js +1 -1
  49. package/dist/components/stzh-list-item.js +1 -1
  50. package/dist/components/stzh-olmap.js +1 -1
  51. package/dist/components/stzh-pagebottom.d.ts +11 -0
  52. package/dist/components/stzh-pagebottom.js +70 -0
  53. package/dist/components/stzh-portal-mitwirken.js +1 -1
  54. package/dist/components/stzh-share.d.ts +11 -0
  55. package/dist/components/stzh-share.js +6 -0
  56. package/dist/components/stzh-share2.js +139 -0
  57. package/dist/components/stzh-upload.js +54 -35
  58. package/dist/components/stzh-vbz-linechip2.js +11 -3
  59. package/dist/esm/{app-globals-453acbdb.js → app-globals-acc57d0e.js} +1 -1
  60. package/dist/esm/loader.js +2 -2
  61. package/dist/esm/stzh-checkbox.entry.js +2 -2
  62. package/dist/esm/stzh-components.js +2 -2
  63. package/dist/esm/stzh-datamessagelist-item.entry.js +2 -2
  64. package/dist/esm/stzh-footer.entry.js +1 -1
  65. package/dist/esm/stzh-header.entry.js +1 -1
  66. package/dist/esm/stzh-icon-sprite.entry.js +1 -1
  67. package/dist/esm/stzh-list-item.entry.js +1 -1
  68. package/dist/esm/stzh-olmap.entry.js +1 -1
  69. package/dist/esm/stzh-pagebottom.entry.js +28 -0
  70. package/dist/esm/stzh-portal-mitwirken.entry.js +1 -1
  71. package/dist/esm/stzh-share.entry.js +109 -0
  72. package/dist/esm/stzh-upload.entry.js +53 -35
  73. package/dist/esm/stzh-vbz-linechip.entry.js +11 -3
  74. package/dist/esm-es5/app-globals-acc57d0e.js +1 -0
  75. package/dist/esm-es5/loader.js +1 -1
  76. package/dist/esm-es5/stzh-checkbox.entry.js +1 -1
  77. package/dist/esm-es5/stzh-components.js +1 -1
  78. package/dist/esm-es5/stzh-datamessagelist-item.entry.js +1 -1
  79. package/dist/esm-es5/stzh-footer.entry.js +1 -1
  80. package/dist/esm-es5/stzh-header.entry.js +1 -1
  81. package/dist/esm-es5/stzh-icon-sprite.entry.js +1 -1
  82. package/dist/esm-es5/stzh-list-item.entry.js +1 -1
  83. package/dist/esm-es5/stzh-olmap.entry.js +1 -1
  84. package/dist/esm-es5/stzh-pagebottom.entry.js +1 -0
  85. package/dist/esm-es5/stzh-portal-mitwirken.entry.js +1 -1
  86. package/dist/esm-es5/stzh-share.entry.js +1 -0
  87. package/dist/esm-es5/stzh-upload.entry.js +1 -1
  88. package/dist/esm-es5/stzh-vbz-linechip.entry.js +1 -1
  89. package/dist/stzh-components/assets/i18n/de.json +10 -0
  90. package/dist/stzh-components/assets/i18n/en.json +10 -0
  91. package/dist/stzh-components/p-07fc857b.system.entry.js +1 -0
  92. package/dist/stzh-components/p-10c36281.entry.js +1 -0
  93. package/dist/stzh-components/{p-b491bcd7.system.entry.js → p-14e457c6.system.entry.js} +1 -1
  94. package/dist/stzh-components/p-1663fc49.system.entry.js +1 -0
  95. package/dist/stzh-components/{p-6b5f447c.system.entry.js → p-23e9b6c7.system.entry.js} +1 -1
  96. package/dist/stzh-components/{p-1399b2d7.entry.js → p-241f060e.entry.js} +1 -1
  97. package/dist/stzh-components/{p-eb3425a1.system.entry.js → p-2c8d491a.system.entry.js} +1 -1
  98. package/dist/stzh-components/p-3a0f37bd.entry.js +1 -0
  99. package/dist/stzh-components/p-470ccde5.system.entry.js +1 -0
  100. package/dist/stzh-components/{p-648e03bc.entry.js → p-4c93ffbe.entry.js} +1 -1
  101. package/dist/stzh-components/p-51c75fba.system.entry.js +1 -0
  102. package/dist/stzh-components/p-5623c1a3.entry.js +1 -0
  103. package/dist/stzh-components/{p-020379d7.system.entry.js → p-6c3d7756.system.entry.js} +1 -1
  104. package/dist/stzh-components/p-7909f56b.entry.js +1 -0
  105. package/dist/stzh-components/p-79f27d21.entry.js +1 -0
  106. package/dist/stzh-components/p-8e5f4ef6.system.entry.js +1 -0
  107. package/dist/stzh-components/p-9084f0c1.entry.js +1 -0
  108. package/dist/stzh-components/p-948acea1.js +1 -0
  109. package/dist/stzh-components/p-9af41730.system.js +1 -0
  110. package/dist/stzh-components/p-b0e514c7.entry.js +1 -0
  111. package/dist/stzh-components/{p-bb8f71a4.entry.js → p-b367d4e3.entry.js} +1 -1
  112. package/dist/stzh-components/p-b54ed1f9.entry.js +1 -0
  113. package/dist/stzh-components/p-b71a1607.system.js +1 -0
  114. package/dist/stzh-components/p-c777032f.system.entry.js +1 -0
  115. package/dist/stzh-components/{p-6f7a7f7a.entry.js → p-d2c97cbc.entry.js} +1 -1
  116. package/dist/stzh-components/{p-e56d7b16.system.entry.js → p-fa6427bf.system.entry.js} +1 -1
  117. package/dist/stzh-components/{p-641126a8.system.entry.js → p-fb150554.system.entry.js} +1 -1
  118. package/dist/stzh-components/stzh-components.css +1 -1
  119. package/dist/stzh-components/stzh-components.esm.js +1 -1
  120. package/dist/stzh-components/stzh-components.js +1 -1
  121. package/dist/types/components/stzh-share/stzh-share.localization.d.ts +10 -0
  122. package/dist/types/components/stzh-upload/stzh-upload.localization.d.ts +1 -0
  123. package/dist/types/components.d.ts +110 -3
  124. package/dist/types/index.d.ts +2 -1
  125. package/dist/vscode-data.json +63 -3
  126. package/package.json +1 -1
  127. package/dist/esm-es5/app-globals-453acbdb.js +0 -1
  128. package/dist/stzh-components/p-08714718.system.entry.js +0 -1
  129. package/dist/stzh-components/p-0e474d1a.system.entry.js +0 -1
  130. package/dist/stzh-components/p-2bf021f2.js +0 -1
  131. package/dist/stzh-components/p-2c891eee.entry.js +0 -1
  132. package/dist/stzh-components/p-3623b3a5.system.js +0 -1
  133. package/dist/stzh-components/p-554fb3ac.system.js +0 -1
  134. package/dist/stzh-components/p-6b2282cd.system.entry.js +0 -1
  135. package/dist/stzh-components/p-6c76e51d.entry.js +0 -1
  136. package/dist/stzh-components/p-6cbdbd06.entry.js +0 -1
  137. package/dist/stzh-components/p-90941379.system.entry.js +0 -1
  138. package/dist/stzh-components/p-9d58c713.entry.js +0 -1
  139. package/dist/stzh-components/p-a4a4370d.entry.js +0 -1
  140. package/dist/stzh-components/p-c7c3735a.entry.js +0 -1
@@ -0,0 +1,184 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { fetchTranslations } from "../../utils/translation-utils";
3
+ const abbreviateText = function (text, length) {
4
+ if (text.length <= length) {
5
+ return text;
6
+ }
7
+ var lastWhitespaceIndex = text.substring(0, length - 1).lastIndexOf(' ');
8
+ if (lastWhitespaceIndex) {
9
+ return text.substring(0, lastWhitespaceIndex) + '\u2026';
10
+ }
11
+ else {
12
+ return text.substring(0, length - 1);
13
+ }
14
+ };
15
+ // returns content of <meta name="" content=""> tags or '' if empty/non existant
16
+ const getMeta = function (name) {
17
+ const meta = document.querySelector(`meta[name="${name}"],[property="${name}"]`);
18
+ return meta ? meta.getAttribute("content") : "";
19
+ };
20
+ /**
21
+ */
22
+ export class StzhShare {
23
+ constructor() {
24
+ this._services = [];
25
+ this.openPopup = (url, event) => {
26
+ event.preventDefault();
27
+ window.open(url, "_blank", "width=600,height=460");
28
+ };
29
+ this.localization = undefined;
30
+ this.url = window.location.href;
31
+ this.services = [
32
+ "facebook", "twitter", "linkedin", "xing", "mail"
33
+ ];
34
+ }
35
+ servicesWatcher(newValue) {
36
+ if (typeof newValue === "string") {
37
+ this._services = JSON.parse(newValue);
38
+ }
39
+ else {
40
+ this._services = newValue;
41
+ }
42
+ }
43
+ async componentWillLoad() {
44
+ this.servicesWatcher(this.services);
45
+ if (!this.localization) {
46
+ this.localization = await fetchTranslations(this.element, "share");
47
+ }
48
+ }
49
+ render() {
50
+ var _a;
51
+ const classes = {
52
+ "stzh-share": true
53
+ };
54
+ const shareUrl = encodeURIComponent(this.url);
55
+ const mailSubject = encodeURIComponent(this.localization.mailSubject);
56
+ const mailBody = encodeURIComponent((_a = this.localization.mailBody) === null || _a === void 0 ? void 0 : _a.replace(/\{shareUrl\}/gi, this.url));
57
+ const title = encodeURIComponent(document.title);
58
+ const description = encodeURIComponent(getMeta("description"));
59
+ // 280 - URL (always 24) = 256
60
+ const maxTweetLength = 256;
61
+ const serviceData = {
62
+ "facebook": {
63
+ popup: true,
64
+ blank: true,
65
+ url: `https://www.facebook.com/sharer/sharer.php?u=${shareUrl}`,
66
+ text: this.localization.shareFacebook,
67
+ icon: "facebook"
68
+ },
69
+ "twitter": {
70
+ popup: true,
71
+ blank: true,
72
+ url: `https://twitter.com/intent/tweet?text=${abbreviateText(title, maxTweetLength)}&url=${shareUrl}`,
73
+ text: this.localization.shareTwitter,
74
+ icon: "twitter"
75
+ },
76
+ "linkedin": {
77
+ popup: true,
78
+ blank: true,
79
+ url: `https://www.linkedin.com/shareArticle?mini=true&summary=${description}&title=${title}&url=${shareUrl}`,
80
+ text: this.localization.shareLinkedin,
81
+ icon: "linkedin"
82
+ },
83
+ "xing": {
84
+ popup: true,
85
+ blank: true,
86
+ url: `https://www.xing.com/spi/shares/new?url=${shareUrl}`,
87
+ text: this.localization.shareXing,
88
+ icon: "xing"
89
+ },
90
+ "mail": {
91
+ popup: false,
92
+ blank: false,
93
+ url: `mailto:?subject=${mailSubject}&body=${mailBody}`,
94
+ text: this.localization.shareMail,
95
+ icon: "mail"
96
+ }
97
+ };
98
+ return (h(Host, null, h("div", { class: classes }, h("ul", { class: "stzh-share__list" }, this._services.map((service) => h("li", { class: "stzh-share__item" }, h("stzh-tooltip", { content: serviceData[service].text }, h("a", { class: `stzh-share__button is-${service}`, href: serviceData[service].url, "aria-label": serviceData[service].text, rel: serviceData[service].blank ? "nofollow noopener noreferrer" : "nofollow", target: serviceData[service].blank ? "_blank" : "_self", onClick: serviceData[service].popup ? (e) => this.openPopup(serviceData[service].url, e) : null }, h("stzh-icon", { class: "stzh-share__icon", name: serviceData[service].icon })))))))));
99
+ }
100
+ static get is() { return "stzh-share"; }
101
+ static get encapsulation() { return "scoped"; }
102
+ static get originalStyleUrls() {
103
+ return {
104
+ "$": ["stzh-share.scss"]
105
+ };
106
+ }
107
+ static get styleUrls() {
108
+ return {
109
+ "$": ["stzh-share.css"]
110
+ };
111
+ }
112
+ static get properties() {
113
+ return {
114
+ "localization": {
115
+ "type": "unknown",
116
+ "mutable": false,
117
+ "complexType": {
118
+ "original": "StzhShareLocalizedText",
119
+ "resolved": "StzhLocaleComponent & { mailSubject: string; mailBody: string; shareFacebook: string; shareTwitter: string; shareLinkedin: string; shareXing: string; shareMail: string; }",
120
+ "references": {
121
+ "StzhShareLocalizedText": {
122
+ "location": "import",
123
+ "path": "./stzh-share.localization"
124
+ }
125
+ }
126
+ },
127
+ "required": false,
128
+ "optional": false,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": "Translation strings"
132
+ }
133
+ },
134
+ "url": {
135
+ "type": "string",
136
+ "mutable": false,
137
+ "complexType": {
138
+ "original": "string",
139
+ "resolved": "string",
140
+ "references": {}
141
+ },
142
+ "required": false,
143
+ "optional": false,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": "URL of current site (uses full URL by default)"
147
+ },
148
+ "attribute": "url",
149
+ "reflect": false,
150
+ "defaultValue": "window.location.href"
151
+ },
152
+ "services": {
153
+ "type": "string",
154
+ "mutable": false,
155
+ "complexType": {
156
+ "original": "ShareService[] | string",
157
+ "resolved": "ShareService[] | string",
158
+ "references": {
159
+ "ShareService": {
160
+ "location": "import",
161
+ "path": "../../index"
162
+ }
163
+ }
164
+ },
165
+ "required": false,
166
+ "optional": false,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "Array of enabled share buttons.\nPossible services: `facebook` / `twitter` / `linkedin` / `xing` / `mail`"
170
+ },
171
+ "attribute": "services",
172
+ "reflect": false,
173
+ "defaultValue": "[\n \"facebook\", \"twitter\", \"linkedin\", \"xing\", \"mail\"\n ]"
174
+ }
175
+ };
176
+ }
177
+ static get elementRef() { return "element"; }
178
+ static get watchers() {
179
+ return [{
180
+ "propName": "services",
181
+ "methodName": "servicesWatcher"
182
+ }];
183
+ }
184
+ }
@@ -0,0 +1,33 @@
1
+ import { h } from '../../utils/h';
2
+ import readme from './readme.md';
3
+ import { withDesign } from 'storybook-addon-designs';
4
+ import { getFigmaLink } from '../../../figma';
5
+
6
+ export default {
7
+ title: 'Components/Share',
8
+ component: 'stzh-share',
9
+ parameters: {
10
+ docs: {
11
+ description: {
12
+ component: readme
13
+ }
14
+ },
15
+ design: {
16
+ type: 'figma',
17
+ url: getFigmaLink('share'),
18
+ allowFullscreen: true
19
+ }
20
+ },
21
+ decorators: [
22
+ withDesign
23
+ ]
24
+ };
25
+
26
+ const Template = (args) => (
27
+ <stzh-share {...args}></stzh-share>
28
+ );
29
+
30
+ export const Default = Template.bind({});
31
+ Default.args = {
32
+ url: 'https://www.stadt-zuerich.ch/gud/de/index/gesundheitsversorgung/public-health/coronavirus-sars-cov-2/BliibDraa.html',
33
+ };
@@ -263,6 +263,15 @@ stzh-upload *::after {
263
263
  display: none;
264
264
  }
265
265
  .stzh-upload__preview {
266
+ display: flex;
267
+ align-items: center;
268
+ border: 0.0625rem solid var(--stzh-base-border-color);
269
+ border-bottom: none;
270
+ padding: var(--stzh-space-xsmall);
271
+ padding-left: var(--stzh-space-medium);
272
+ padding-right: var(--stzh-space-small);
273
+ }
274
+ .stzh-upload__preview:not(.dz-error):last-child, .stzh-upload__errors:last-child .stzh-upload__preview:last-child {
266
275
  border-bottom: 0.0625rem solid var(--stzh-base-border-color);
267
276
  }
268
277
  .stzh-upload__preview.dz-error .stzh-upload__title {
@@ -289,11 +298,6 @@ stzh-upload *::after {
289
298
  .stzh-upload__preview.dz-empty .stzh-upload__size {
290
299
  display: none;
291
300
  }
292
- .stzh-upload__inner {
293
- height: 3.875rem;
294
- display: flex;
295
- align-items: center;
296
- }
297
301
  .stzh-upload__details {
298
302
  flex-grow: 1;
299
303
  display: flex;
@@ -312,7 +316,6 @@ stzh-upload *::after {
312
316
  flex-shrink: 0;
313
317
  display: flex;
314
318
  align-items: center;
315
- margin-left: var(--stzh-space-medium);
316
319
  }
317
320
  .stzh-upload__infos {
318
321
  font-size: var(--stzh-font-milli-font-size);
@@ -334,6 +337,12 @@ stzh-upload *::after {
334
337
  letter-spacing: var(--stzh-font-curve---text-letter-spacing);
335
338
  color: var(--stzh-color-primary, var(--stzh-color-zueriblue));
336
339
  }
340
+ .stzh-upload__link[href] {
341
+ color: var(--stzh-color-primary, var(--stzh-color-zueriblue));
342
+ }
343
+ .stzh-upload__link[href]:hover {
344
+ color: var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));
345
+ }
337
346
  .stzh-upload__meta {
338
347
  font-size: var(--stzh-font-nano-font-size);
339
348
  line-height: var(--stzh-font-nano-text-line-height);
@@ -373,7 +382,7 @@ stzh-upload *::after {
373
382
  .stzh-upload__extension::after {
374
383
  content: " | ";
375
384
  }
376
- .stzh-upload__delete {
385
+ .stzh-upload__download, .stzh-upload__delete {
377
386
  cursor: pointer;
378
387
  -webkit-appearance: none;
379
388
  -moz-appearance: none;
@@ -383,6 +392,13 @@ stzh-upload *::after {
383
392
  background: none;
384
393
  display: flex;
385
394
  color: var(--stzh-base-color);
395
+ margin-left: var(--stzh-space-xsmall);
396
+ }
397
+ .stzh-upload__download {
398
+ display: none;
399
+ }
400
+ .stzh-upload__download[href] {
401
+ display: flex;
386
402
  }
387
403
  .stzh-upload__error-message {
388
404
  font-size: var(--stzh-font-nano-font-size);
@@ -6,6 +6,8 @@ import Dropzone from "dropzone";
6
6
  Dropzone.autoDiscover = false;
7
7
  const ATTR_NAME = "data-dz-name";
8
8
  const ATTR_TYPE = "data-dz-type";
9
+ const ATTR_SIZE = "data-dz-size";
10
+ const ATTR_LINK = "data-dz-link";
9
11
  const ATTR_EXTENSION = "data-dz-extension";
10
12
  const ATTR_PROGRESS_TEXT = "data-dz-progress-text";
11
13
  let uploadCounter = 0;
@@ -28,6 +30,7 @@ export class StzhUpload {
28
30
  this.withCredentials = false;
29
31
  this.disabled = false;
30
32
  this.invalid = false;
33
+ this.downloadDisabled = false;
31
34
  this.error = undefined;
32
35
  this.acceptedFiles = null;
33
36
  this.autoProcessQueue = true;
@@ -153,12 +156,12 @@ export class StzhUpload {
153
156
  file.previewTemplate = file.previewElement; // Backwards compatibility
154
157
  this.previewsContainer.appendChild(file.previewElement);
155
158
  if (file.size == 0) {
156
- file.previewElement.classList.add('dz-empty');
159
+ file.previewElement.classList.add("dz-empty");
157
160
  }
158
- for (var node of file.previewElement.querySelectorAll("[data-dz-name]")) {
161
+ for (var node of file.previewElement.querySelectorAll(`[${ATTR_NAME}]`)) {
159
162
  node.textContent = file.name;
160
163
  }
161
- for (node of file.previewElement.querySelectorAll("[data-dz-size]")) {
164
+ for (node of file.previewElement.querySelectorAll(`[${ATTR_SIZE}]`)) {
162
165
  node.innerHTML = this.filesize(file.size);
163
166
  }
164
167
  if (this.options.addRemoveLinks) {
@@ -196,6 +199,20 @@ export class StzhUpload {
196
199
  if (file.status === "error") {
197
200
  self.errorsElement.appendChild(file.previewElement);
198
201
  }
202
+ else {
203
+ if (!self.downloadDisabled) {
204
+ let fileHref = file.url || '';
205
+ if (file.upload) {
206
+ fileHref = URL.createObjectURL(file);
207
+ }
208
+ if (fileHref) {
209
+ for (var node of file.previewElement.querySelectorAll(`[${ATTR_LINK}]`)) {
210
+ node.setAttribute("href", fileHref);
211
+ node.setAttribute("download", file.name);
212
+ }
213
+ }
214
+ }
215
+ }
199
216
  if (file._removeLink) {
200
217
  file._removeLink.innerHTML = this.options.dictRemoveFile;
201
218
  }
@@ -245,43 +262,44 @@ export class StzhUpload {
245
262
  },
246
263
  previewTemplate: `
247
264
  <div class="stzh-upload__preview">
248
- <div class="stzh-upload__inner">
249
- <div class="stzh-upload__image">
250
- <img data-dz-thumbnail />
251
- </div>
265
+ <div class="stzh-upload__image">
266
+ <img data-dz-thumbnail />
267
+ </div>
252
268
 
253
- <div class="stzh-upload__details">
254
- <div class="stzh-upload__info-wrapper-processing">
255
- <div class="stzh-upload__infos">
256
- <div class="stzh-upload__subtitle">
257
- <span data-dz-name></span>
258
- </div>
259
- <div class="stzh-upload__progress-text">
260
- <span data-dz-progress-text></span>
261
- </div>
269
+ <div class="stzh-upload__details">
270
+ <div class="stzh-upload__info-wrapper-processing">
271
+ <div class="stzh-upload__infos">
272
+ <div class="stzh-upload__subtitle">
273
+ <span ${ATTR_NAME}></span>
262
274
  </div>
263
- <div class="stzh-upload__progress">
264
- <span class="stzh-upload__progress-bar" data-dz-uploadprogress></span>
275
+ <div class="stzh-upload__progress-text">
276
+ <span ${ATTR_PROGRESS_TEXT}></span>
265
277
  </div>
266
278
  </div>
267
- <div class="stzh-upload__info-wrapper-complete">
268
- <div class="stzh-upload__title">
269
- <span data-dz-name></span>
270
- </div>
271
- <div class="stzh-upload__meta">
272
- <span class="stzh-upload__extension" data-dz-extension></span>
273
- <span class="stzh-upload__size" data-dz-size></span>
274
- </div>
275
- <div class="stzh-upload__error-message">
276
- <span data-dz-errormessage></span>
277
- </div>
279
+ <div class="stzh-upload__progress">
280
+ <span class="stzh-upload__progress-bar" data-dz-uploadprogress></span>
278
281
  </div>
279
- <div class="stzh-upload__actions">
280
- <button class="stzh-upload__delete" data-dz-remove aria-label="${this.localization.cancelUpload}" title="${this.localization.cancelUpload}">
281
- <stzh-icon class="stzh-upload__delete-icon" name="delete"></stzh-icon>
282
- <stzh-icon class="stzh-upload__delete-icon-error" name="close"></stzh-icon>
283
- </button>
282
+ </div>
283
+ <div class="stzh-upload__info-wrapper-complete">
284
+ <div class="stzh-upload__title">
285
+ <a class="stzh-upload__link" ${ATTR_NAME} ${ATTR_LINK}></a>
284
286
  </div>
287
+ <div class="stzh-upload__meta">
288
+ <span class="stzh-upload__extension" ${ATTR_EXTENSION}></span>
289
+ <span class="stzh-upload__size" ${ATTR_SIZE}></span>
290
+ </div>
291
+ <div class="stzh-upload__error-message">
292
+ <span data-dz-errormessage></span>
293
+ </div>
294
+ </div>
295
+ <div class="stzh-upload__actions">
296
+ <a class="stzh-upload__download" ${ATTR_LINK} aria-label="${this.localization.download}" title="${this.localization.download}">
297
+ <stzh-icon class="stzh-upload__download-icon" name="download"></stzh-icon>
298
+ </a>
299
+ <button class="stzh-upload__delete" data-dz-remove aria-label="${this.localization.cancelUpload}" title="${this.localization.cancelUpload}">
300
+ <stzh-icon class="stzh-upload__delete-icon" name="delete"></stzh-icon>
301
+ <stzh-icon class="stzh-upload__delete-icon-error" name="close"></stzh-icon>
302
+ </button>
285
303
  </div>
286
304
  </div>
287
305
  </div>
@@ -564,6 +582,24 @@ export class StzhUpload {
564
582
  "reflect": true,
565
583
  "defaultValue": "false"
566
584
  },
585
+ "downloadDisabled": {
586
+ "type": "boolean",
587
+ "mutable": false,
588
+ "complexType": {
589
+ "original": "boolean",
590
+ "resolved": "boolean",
591
+ "references": {}
592
+ },
593
+ "required": false,
594
+ "optional": false,
595
+ "docs": {
596
+ "tags": [],
597
+ "text": "Whether download functionality should be disabled."
598
+ },
599
+ "attribute": "download-disabled",
600
+ "reflect": false,
601
+ "defaultValue": "false"
602
+ },
567
603
  "error": {
568
604
  "type": "string",
569
605
  "mutable": false,
@@ -916,7 +952,7 @@ export class StzhUpload {
916
952
  "mutable": false,
917
953
  "complexType": {
918
954
  "original": "StzhUploadLocalizedText",
919
- "resolved": "StzhLocaleComponent & { description: string; button: string; cancelUpload: string; uploadCanceled: string; cancelUploadConfirmation: string; removeFile: string; maxFilesExceeded: string; serverError: string; accessError: string; responseError: string; invalidFileType: string; fileTooBig: string; fileTooBigServer: string; }",
955
+ "resolved": "StzhLocaleComponent & { description: string; button: string; download: string; cancelUpload: string; uploadCanceled: string; cancelUploadConfirmation: string; removeFile: string; maxFilesExceeded: string; serverError: string; accessError: string; responseError: string; invalidFileType: string; fileTooBig: string; fileTooBigServer: string; }",
920
956
  "references": {
921
957
  "StzhUploadLocalizedText": {
922
958
  "location": "import",
@@ -64,8 +64,8 @@ ExistingFiles.args = {
64
64
  description: 'To upload files drag & drop them in this area. Allowed file formats: [txt, pdf, docx] (max. 25 MB)',
65
65
  'accepted-files': '.txt,.pdf,.docs',
66
66
  'existing-files': `[
67
- { "name": "Filename.pdf", "size": 12345, "id": "upload-1" },
68
- { "name": "Filename2.pdf", "size": 22345, "id": "upload-2" },
69
- { "name": "Filename3.pdf", "size": 0, "id": "upload-3" }
67
+ { "name": "Filename.pdf", "url": "media/samples/document.pdf", "size": 12345, "id": "upload-1" },
68
+ { "name": "Filename2.pdf", "url": "media/samples/document.pdf", "size": 22345, "id": "upload-2" },
69
+ { "name": "Filename3.pdf", "url": "media/samples/document.pdf", "size": 0, "id": "upload-3" }
70
70
  ]`
71
71
  };
@@ -87,7 +87,7 @@ export class StzhVbzLinechip {
87
87
  "mutable": false,
88
88
  "complexType": {
89
89
  "original": "VBZ.Lines",
90
- "resolved": "\"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" | \"10\" | \"11\" | \"12\" | \"13\" | \"14\" | \"15\" | \"16\" | \"17\" | \"19\" | \"21\" | \"23\" | \"24\" | \"25\" | \"29\" | \"31\" | \"32\" | \"33\" | \"34\" | \"35\" | \"36\" | \"37\" | \"38\" | \"39\" | \"40\" | \"45\" | \"46\" | \"54\" | \"61\" | \"62\" | \"63\" | \"64\" | \"66\" | \"67\" | \"69\" | \"70\" | \"72\" | \"73\" | \"75\" | \"76\" | \"77\" | \"78\" | \"79\" | \"80\" | \"83\" | \"89\" | \"91\" | \"94\" | \"95\" | \"99\" | \"151\" | \"152\" | \"153\" | \"156\" | \"161\" | \"162\" | \"163\" | \"165\" | \"184\" | \"185\" | \"200\" | \"201\" | \"215\" | \"220\" | \"235\" | \"236\" | \"245\" | \"301\" | \"302\" | \"303\" | \"304\" | \"305\" | \"306\" | \"307\" | \"308\" | \"309\" | \"311\" | \"314\" | \"315\" | \"321\" | \"323\" | \"325\" | \"350\" | \"444\" | \"445\" | \"701\" | \"702\" | \"703\" | \"704\" | \"705\" | \"720\" | \"721\" | \"725\" | \"726\" | \"727\" | \"742\" | \"743\" | \"744\" | \"745\" | \"747\" | \"748\" | \"751\" | \"752\" | \"753\" | \"754\" | \"759\" | \"760\" | \"765\" | \"768\" | \"781\" | \"786\" | \"787\" | \"910\" | \"912\" | \"916\" | \"917\" | \"918\" | \"919\" | \"E\" | \"N\" | \"N1\" | \"N2\" | \"N4\" | \"N5\" | \"N6\" | \"N7\" | \"N8\" | \"N9\" | \"N10\" | \"N11\" | \"N12\" | \"N13\" | \"N14\" | \"N15\" | \"N16\" | \"N17\" | \"N18\" | \"N19\" | \"N30\" | \"N31\" | \"N32\" | \"N33\" | \"N34\" | \"N45\" | \"N72\" | \"N78\" | \"SN1\" | \"SN4\" | \"SN5\" | \"SN6\" | \"SN7\" | \"SN8\" | \"SN9\" | \"S2\" | \"S3\" | \"S4\" | \"S5\" | \"S6\" | \"S7\" | \"S8\" | \"S9\" | \"S10\" | \"S11\" | \"S14\" | \"S15\" | \"S16\" | \"S18\" | \"S19\" | \"S20\" | \"S21\" | \"S23\" | \"S24\" | \"S25\"",
90
+ "resolved": "\"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" | \"10\" | \"11\" | \"12\" | \"13\" | \"14\" | \"15\" | \"16\" | \"17\" | \"19\" | \"20\" | \"21\" | \"23\" | \"24\" | \"25\" | \"29\" | \"31\" | \"32\" | \"33\" | \"34\" | \"35\" | \"36\" | \"37\" | \"38\" | \"39\" | \"40\" | \"45\" | \"46\" | \"54\" | \"61\" | \"62\" | \"63\" | \"64\" | \"66\" | \"67\" | \"69\" | \"70\" | \"72\" | \"73\" | \"75\" | \"76\" | \"77\" | \"78\" | \"79\" | \"80\" | \"83\" | \"89\" | \"91\" | \"94\" | \"95\" | \"99\" | \"151\" | \"152\" | \"153\" | \"156\" | \"161\" | \"162\" | \"163\" | \"165\" | \"184\" | \"185\" | \"200\" | \"201\" | \"215\" | \"220\" | \"235\" | \"236\" | \"245\" | \"301\" | \"302\" | \"303\" | \"304\" | \"305\" | \"306\" | \"307\" | \"308\" | \"309\" | \"311\" | \"314\" | \"315\" | \"317\" | \"321\" | \"323\" | \"325\" | \"350\" | \"444\" | \"445\" | \"701\" | \"702\" | \"703\" | \"704\" | \"705\" | \"720\" | \"721\" | \"725\" | \"726\" | \"727\" | \"742\" | \"743\" | \"744\" | \"745\" | \"747\" | \"748\" | \"751\" | \"752\" | \"753\" | \"754\" | \"759\" | \"760\" | \"765\" | \"768\" | \"781\" | \"786\" | \"787\" | \"910\" | \"912\" | \"916\" | \"917\" | \"918\" | \"919\" | \"E\" | \"N\" | \"N1\" | \"N2\" | \"N4\" | \"N5\" | \"N6\" | \"N7\" | \"N8\" | \"N9\" | \"N10\" | \"N11\" | \"N12\" | \"N13\" | \"N14\" | \"N15\" | \"N16\" | \"N17\" | \"N18\" | \"N19\" | \"N30\" | \"N31\" | \"N32\" | \"N33\" | \"N34\" | \"N45\" | \"N72\" | \"N78\" | \"SN1\" | \"SN4\" | \"SN5\" | \"SN6\" | \"SN7\" | \"SN8\" | \"SN9\" | \"S2\" | \"S3\" | \"S4\" | \"S5\" | \"S6\" | \"S7\" | \"S8\" | \"S9\" | \"S10\" | \"S11\" | \"S14\" | \"S15\" | \"S16\" | \"S18\" | \"S19\" | \"S20\" | \"S21\" | \"S23\" | \"S24\" | \"S25\"",
91
91
  "references": {
92
92
  "VBZ": {
93
93
  "location": "import",
@@ -51,6 +51,7 @@ export { StzhMetanav as StzhMetanav } from '../types/components/stzh-metanav/stz
51
51
  export { StzhOlmap as StzhOlmap } from '../types/components/stzh-olmap/stzh-olmap';
52
52
  export { StzhOverlay as StzhOverlay } from '../types/components/stzh-overlay/stzh-overlay';
53
53
  export { StzhPageSkiplinks as StzhPageSkiplinks } from '../types/components/stzh-page-skiplinks/stzh-page-skiplinks';
54
+ export { StzhPagebottom as StzhPagebottom } from '../types/components/stzh-pagebottom/stzh-pagebottom';
54
55
  export { StzhPagetitle as StzhPagetitle } from '../types/components/stzh-pagetitle/stzh-pagetitle';
55
56
  export { StzhPopover as StzhPopover } from '../types/components/stzh-popover/stzh-popover';
56
57
  export { StzhPortalMitwirken as StzhPortalMitwirken } from '../types/components/stzh-portal-mitwirken/stzh-portal-mitwirken';
@@ -63,6 +64,7 @@ export { StzhRichtext as StzhRichtext } from '../types/components/stzh-richtext/
63
64
  export { StzhRow as StzhRow } from '../types/components/stzh-row/stzh-row';
64
65
  export { StzhSaptcha as StzhSaptcha } from '../types/components/stzh-saptcha/stzh-saptcha';
65
66
  export { StzhSection as StzhSection } from '../types/components/stzh-section/stzh-section';
67
+ export { StzhShare as StzhShare } from '../types/components/stzh-share/stzh-share';
66
68
  export { StzhSkiplink as StzhSkiplink } from '../types/components/stzh-skiplink/stzh-skiplink';
67
69
  export { StzhSortable as StzhSortable } from '../types/components/stzh-sortable/stzh-sortable';
68
70
  export { StzhStatus as StzhStatus } from '../types/components/stzh-status/stzh-status';
@@ -51,6 +51,7 @@ export { StzhMetanav, defineCustomElement as defineCustomElementStzhMetanav } fr
51
51
  export { StzhOlmap, defineCustomElement as defineCustomElementStzhOlmap } from './stzh-olmap.js';
52
52
  export { StzhOverlay, defineCustomElement as defineCustomElementStzhOverlay } from './stzh-overlay.js';
53
53
  export { StzhPageSkiplinks, defineCustomElement as defineCustomElementStzhPageSkiplinks } from './stzh-page-skiplinks.js';
54
+ export { StzhPagebottom, defineCustomElement as defineCustomElementStzhPagebottom } from './stzh-pagebottom.js';
54
55
  export { StzhPagetitle, defineCustomElement as defineCustomElementStzhPagetitle } from './stzh-pagetitle.js';
55
56
  export { StzhPopover, defineCustomElement as defineCustomElementStzhPopover } from './stzh-popover.js';
56
57
  export { StzhPortalMitwirken, defineCustomElement as defineCustomElementStzhPortalMitwirken } from './stzh-portal-mitwirken.js';
@@ -63,6 +64,7 @@ export { StzhRichtext, defineCustomElement as defineCustomElementStzhRichtext }
63
64
  export { StzhRow, defineCustomElement as defineCustomElementStzhRow } from './stzh-row.js';
64
65
  export { StzhSaptcha, defineCustomElement as defineCustomElementStzhSaptcha } from './stzh-saptcha.js';
65
66
  export { StzhSection, defineCustomElement as defineCustomElementStzhSection } from './stzh-section.js';
67
+ export { StzhShare, defineCustomElement as defineCustomElementStzhShare } from './stzh-share.js';
66
68
  export { StzhSkiplink, defineCustomElement as defineCustomElementStzhSkiplink } from './stzh-skiplink.js';
67
69
  export { StzhSortable, defineCustomElement as defineCustomElementStzhSortable } from './stzh-sortable.js';
68
70
  export { StzhStatus, defineCustomElement as defineCustomElementStzhStatus } from './stzh-status.js';
@@ -79,7 +81,7 @@ export { StzhVisuallyhidden, defineCustomElement as defineCustomElementStzhVisua
79
81
  export { StzhVspace, defineCustomElement as defineCustomElementStzhVspace } from './stzh-vspace.js';
80
82
 
81
83
  const name = "@oiz/stzh-components";
82
- const version = "2.1.0-alpha";
84
+ const version = "2.1.0-beta";
83
85
 
84
86
  const packageName = name.substring(name.indexOf('/')+1);
85
87
 
@@ -6,11 +6,11 @@ import { d as defineCustomElement$3 } from './stzh-icon2.js';
6
6
  import { d as defineCustomElement$2 } from './stzh-popover2.js';
7
7
 
8
8
  const Check = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
9
- <path d="M2 11.3333L9 18.6667L22 5.33334" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
9
+ <path d="M2 11.3333L9 18.6667L22 5.33334" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke" />
10
10
  </svg>
11
11
  `;
12
12
 
13
- const stzhCheckboxCss = ".sc-stzh-checkbox-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-checkbox-h{display:none}.sc-stzh-checkbox-h *.sc-stzh-checkbox,.sc-stzh-checkbox-h *.sc-stzh-checkbox::before,.sc-stzh-checkbox-h *.sc-stzh-checkbox::after{-webkit-box-sizing:border-box;box-sizing:border-box}.sc-stzh-checkbox-h{display:inline-block;border-radius:var(--stzh-form-input-border-radius)}.sc-stzh-checkbox-h .sc-stzh-checkbox-s>stzh-text{--color:inherit}.stzh-checkbox__marker-symbol.sc-stzh-checkbox{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal}.stzh-checkbox__marker-text.sc-stzh-checkbox{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-checkbox__description-wrapper.sc-stzh-checkbox{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-checkbox__error.sc-stzh-checkbox,.stzh-checkbox__description.sc-stzh-checkbox{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-checkbox__error.sc-stzh-checkbox{color:var(--stzh-color-error)}.stzh-checkbox__error-list.sc-stzh-checkbox{list-style:none;margin:0;padding:0}.stzh-checkbox__description.sc-stzh-checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-checkbox__description-long.sc-stzh-checkbox{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-checkbox__description-long-popover.sc-stzh-checkbox{--width:auto;--max-width:27.3125rem}.stzh-checkbox__description-long-popover[open].sc-stzh-checkbox:not([open=false]) .stzh-checkbox__description-long-button.sc-stzh-checkbox{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox__description-long-button.sc-stzh-checkbox{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-checkbox__description-long-button.sc-stzh-checkbox:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox.sc-stzh-checkbox stzh-icon.stzh-checkbox__description-long-icon.sc-stzh-checkbox{--size:var(--stzh-icon-size-xsmall)}.stzh-checkbox--has-error.sc-stzh-checkbox .stzh-checkbox__error.sc-stzh-checkbox,.stzh-checkbox--has-description.sc-stzh-checkbox .stzh-checkbox__description.sc-stzh-checkbox{margin-top:var(--stzh-space-xxsmall)}.stzh-checkbox__field-wrapper.sc-stzh-checkbox{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);position:relative;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.stzh-checkbox__input.sc-stzh-checkbox{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;z-index:-1;opacity:0;pointer-events:none}.stzh-checkbox__mark.sc-stzh-checkbox{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:var(--stzh-form-input-border-radius);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)}.stzh-checkbox__check.sc-stzh-checkbox{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;opacity:0;color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox__check.sc-stzh-checkbox path.sc-stzh-checkbox{vector-effect:var(--stzh-base-vector-effect)}.stzh-checkbox__label.sc-stzh-checkbox{display:inline-block;color:var(--stzh-base-color);-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);margin-left:var(--stzh-space-small);line-height:1.5rem}.stzh-checkbox__label.sc-stzh-checkbox:empty{display:none}.stzh-checkbox__marker-symbol.sc-stzh-checkbox{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-checkbox.sc-stzh-checkbox:hover .stzh-checkbox__label.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:hover~.stzh-checkbox__label.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:hover~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:focus~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-checkbox__input.sc-stzh-checkbox:checked~.stzh-checkbox__label.sc-stzh-checkbox{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox.sc-stzh-checkbox:hover .stzh-checkbox__mark.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:focus:hover~.stzh-checkbox__mark.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:hover~.stzh-checkbox__mark.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:focus~.stzh-checkbox__mark.sc-stzh-checkbox{border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-checkbox__input.sc-stzh-checkbox:focus~.stzh-checkbox__mark.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked~.stzh-checkbox__mark.sc-stzh-checkbox{border-color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox__input.sc-stzh-checkbox:checked~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox{opacity:1}.stzh-checkbox--is-invalid.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__label.sc-stzh-checkbox,.stzh-checkbox--is-invalid.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox{color:var(--stzh-color-error)}.stzh-checkbox--is-invalid.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__mark.sc-stzh-checkbox{border-color:var(--stzh-color-error)}.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__field-wrapper.sc-stzh-checkbox{cursor:not-allowed}.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__label.sc-stzh-checkbox,.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox{color:var(--stzh-color-grey61)}.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__mark.sc-stzh-checkbox{border-color:var(--stzh-color-grey5)}.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__mark.sc-stzh-checkbox{background-color:var(--stzh-color-grey5)}";
13
+ const stzhCheckboxCss = ".sc-stzh-checkbox-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-checkbox-h{display:none}.sc-stzh-checkbox-h *.sc-stzh-checkbox,.sc-stzh-checkbox-h *.sc-stzh-checkbox::before,.sc-stzh-checkbox-h *.sc-stzh-checkbox::after{-webkit-box-sizing:border-box;box-sizing:border-box}.sc-stzh-checkbox-h{display:inline-block;border-radius:var(--stzh-form-input-border-radius)}.sc-stzh-checkbox-h .sc-stzh-checkbox-s>stzh-text{--color:inherit}.stzh-checkbox__marker-symbol.sc-stzh-checkbox{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal}.stzh-checkbox__marker-text.sc-stzh-checkbox{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-checkbox__description-wrapper.sc-stzh-checkbox{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-checkbox__error.sc-stzh-checkbox,.stzh-checkbox__description.sc-stzh-checkbox{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-checkbox__error.sc-stzh-checkbox{color:var(--stzh-color-error)}.stzh-checkbox__error-list.sc-stzh-checkbox{list-style:none;margin:0;padding:0}.stzh-checkbox__description.sc-stzh-checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-checkbox__description-long.sc-stzh-checkbox{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-checkbox__description-long-popover.sc-stzh-checkbox{--width:auto;--max-width:27.3125rem}.stzh-checkbox__description-long-popover[open].sc-stzh-checkbox:not([open=false]) .stzh-checkbox__description-long-button.sc-stzh-checkbox{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox__description-long-button.sc-stzh-checkbox{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-checkbox__description-long-button.sc-stzh-checkbox:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox.sc-stzh-checkbox stzh-icon.stzh-checkbox__description-long-icon.sc-stzh-checkbox{--size:var(--stzh-icon-size-xsmall)}.stzh-checkbox--has-error.sc-stzh-checkbox .stzh-checkbox__error.sc-stzh-checkbox,.stzh-checkbox--has-description.sc-stzh-checkbox .stzh-checkbox__description.sc-stzh-checkbox{margin-top:var(--stzh-space-xxsmall)}.stzh-checkbox__field-wrapper.sc-stzh-checkbox{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);position:relative;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.stzh-checkbox__input.sc-stzh-checkbox{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;z-index:-1;opacity:0;pointer-events:none}.stzh-checkbox__mark.sc-stzh-checkbox{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:var(--stzh-form-input-border-radius);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)}.stzh-checkbox__check.sc-stzh-checkbox{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;opacity:0;color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox__label.sc-stzh-checkbox{display:inline-block;color:var(--stzh-base-color);-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);margin-left:var(--stzh-space-small);line-height:1.5rem}.stzh-checkbox__label.sc-stzh-checkbox:empty{display:none}.stzh-checkbox__marker-symbol.sc-stzh-checkbox{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-checkbox.sc-stzh-checkbox:hover .stzh-checkbox__label.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:hover~.stzh-checkbox__label.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:hover~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:focus~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-checkbox__input.sc-stzh-checkbox:checked~.stzh-checkbox__label.sc-stzh-checkbox{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox.sc-stzh-checkbox:hover .stzh-checkbox__mark.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:focus:hover~.stzh-checkbox__mark.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:hover~.stzh-checkbox__mark.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked:focus~.stzh-checkbox__mark.sc-stzh-checkbox{border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-checkbox__input.sc-stzh-checkbox:focus~.stzh-checkbox__mark.sc-stzh-checkbox,.stzh-checkbox__input.sc-stzh-checkbox:checked~.stzh-checkbox__mark.sc-stzh-checkbox{border-color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-checkbox__input.sc-stzh-checkbox:checked~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox{opacity:1}.stzh-checkbox--is-invalid.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__label.sc-stzh-checkbox,.stzh-checkbox--is-invalid.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox{color:var(--stzh-color-error)}.stzh-checkbox--is-invalid.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__mark.sc-stzh-checkbox{border-color:var(--stzh-color-error)}.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__field-wrapper.sc-stzh-checkbox{cursor:not-allowed}.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__label.sc-stzh-checkbox,.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__mark.sc-stzh-checkbox .stzh-checkbox__check.sc-stzh-checkbox{color:var(--stzh-color-grey61)}.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__input.sc-stzh-checkbox~.stzh-checkbox__mark.sc-stzh-checkbox{border-color:var(--stzh-color-grey5)}.stzh-checkbox--is-disabled.sc-stzh-checkbox .stzh-checkbox__mark.sc-stzh-checkbox{background-color:var(--stzh-color-grey5)}";
14
14
 
15
15
  let checkboxCounter = 0;
16
16
  const StzhCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {