@oiz/stzh-components 2.0.0-beta → 2.0.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/{app-globals-58a084a9.js → app-globals-ec8cc33e.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-accordion-item.cjs.entry.js +33 -15
- package/dist/cjs/stzh-actionset.cjs.entry.js +1 -9
- package/dist/cjs/stzh-badge_3.cjs.entry.js +17 -7
- package/dist/cjs/stzh-card-list.cjs.entry.js +19 -20
- package/dist/cjs/stzh-card.cjs.entry.js +34 -16
- package/dist/cjs/stzh-chip-select.cjs.entry.js +52 -4
- package/dist/cjs/stzh-chip.cjs.entry.js +3 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
- 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-dialog.cjs.entry.js +1 -1
- package/dist/cjs/stzh-ghettobox_2.cjs.entry.js +2 -2
- package/dist/cjs/stzh-heading.cjs.entry.js +1 -1
- package/dist/cjs/stzh-hspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-icon-sprite.cjs.entry.js +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js +2 -2
- package/dist/cjs/stzh-link.cjs.entry.js +8 -4
- package/dist/cjs/stzh-menu_2.cjs.entry.js +6 -2
- package/dist/cjs/stzh-message.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagetitle.cjs.entry.js +1 -1
- package/dist/cjs/stzh-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-saptcha.cjs.entry.js +1 -1
- package/dist/cjs/stzh-sortable.cjs.entry.js +3 -2
- package/dist/cjs/stzh-table.cjs.entry.js +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +47 -4
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vspace.cjs.entry.js +1 -1
- package/dist/collection/assets/icons/mono/code-window.svg +3 -0
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +34 -8
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.js +123 -14
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.stories.js +9 -0
- package/dist/collection/components/stzh-actionset/stzh-actionset.js +1 -9
- package/dist/collection/components/stzh-badge/stzh-badge.css +22 -2
- package/dist/collection/components/stzh-badge/stzh-badge.js +25 -1
- package/dist/collection/components/stzh-button/stzh-button.js +45 -5
- package/dist/collection/components/stzh-card/stzh-card.css +2 -14
- package/dist/collection/components/stzh-card/stzh-card.js +37 -37
- package/dist/collection/components/stzh-card/stzh-card.stories.js +1 -4
- package/dist/collection/components/stzh-card-list/stzh-card-list.js +22 -49
- package/dist/collection/components/stzh-card-list/stzh-card-list.stories.js +2 -2
- package/dist/collection/components/stzh-chip/stzh-chip.js +38 -1
- package/dist/collection/components/stzh-chip-select/stzh-chip-select.css +80 -0
- package/dist/collection/components/stzh-chip-select/stzh-chip-select.js +213 -3
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +87 -176
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +3 -8
- package/dist/collection/components/stzh-datatable/stzh-datatable.css +5 -0
- package/dist/collection/components/stzh-dialog/stzh-dialog.css +9 -19
- package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +16 -16
- package/dist/collection/components/stzh-heading/stzh-heading.css +5 -15
- package/dist/collection/components/stzh-hspace/stzh-hspace.css +19 -24
- package/dist/collection/components/stzh-icon-sprite/assets/svgsprites/symbol/sprite.symbol.html +45 -32
- package/dist/collection/components/stzh-icon-sprite/assets/svgsprites/symbol/svg/sprite.symbol.svg +1 -1
- package/dist/collection/components/stzh-input/stzh-input.js +2 -2
- package/dist/collection/components/stzh-link/stzh-link.js +44 -4
- package/dist/collection/components/stzh-menu-item/stzh-menu-item.js +42 -2
- package/dist/collection/components/stzh-message/stzh-message.css +5 -0
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +3 -8
- package/dist/collection/components/stzh-portal-mitwirken/stzh-portal-mitwirken.css +226 -337
- package/dist/collection/components/stzh-richtext/stzh-richtext.css +88 -129
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.css +8 -8
- package/dist/collection/components/stzh-sortable/stzh-sortable.css +12 -6
- package/dist/collection/components/stzh-sortable/stzh-sortable.js +2 -1
- package/dist/collection/components/stzh-table/stzh-table.css +5 -0
- package/dist/collection/components/stzh-upload/stzh-upload.css +16 -7
- package/dist/collection/components/stzh-upload/stzh-upload.js +46 -3
- package/dist/collection/components/stzh-upload/stzh-upload.stories.js +1 -1
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +2 -7
- package/dist/collection/components/stzh-vspace/stzh-vspace.css +19 -24
- package/dist/collection/pages/meinkonto.stories.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/stzh-accordion-item.js +51 -16
- package/dist/components/stzh-actionset2.js +1 -9
- package/dist/components/stzh-badge2.js +10 -3
- package/dist/components/stzh-button2.js +11 -5
- package/dist/components/stzh-card-list.js +20 -22
- package/dist/components/stzh-card.js +34 -17
- package/dist/components/stzh-chip-select.js +63 -6
- package/dist/components/stzh-chip2.js +5 -1
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-datamessagelist-item.js +1 -1
- package/dist/components/stzh-datatable.js +1 -1
- package/dist/components/stzh-dialog.js +1 -1
- package/dist/components/stzh-ghettobox2.js +1 -1
- package/dist/components/stzh-heading2.js +1 -1
- package/dist/components/stzh-hspace.js +1 -1
- package/dist/components/stzh-icon-sprite.js +1 -1
- package/dist/components/stzh-input2.js +2 -2
- package/dist/components/stzh-link2.js +10 -4
- package/dist/components/stzh-menu-item2.js +8 -2
- package/dist/components/stzh-message.js +1 -1
- package/dist/components/stzh-pagetitle.js +1 -1
- package/dist/components/stzh-portal-mitwirken.js +1 -1
- package/dist/components/stzh-richtext2.js +1 -1
- package/dist/components/stzh-saptcha.js +1 -1
- package/dist/components/stzh-sortable2.js +3 -2
- package/dist/components/stzh-table.js +1 -1
- package/dist/components/stzh-upload.js +47 -4
- package/dist/components/stzh-vbz-ticker.js +1 -1
- package/dist/components/stzh-vspace.js +1 -1
- package/dist/esm/{app-globals-6b6ff890.js → app-globals-e66420b3.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-accordion-item.entry.js +33 -15
- package/dist/esm/stzh-actionset.entry.js +1 -9
- package/dist/esm/stzh-badge_3.entry.js +17 -7
- package/dist/esm/stzh-card-list.entry.js +19 -20
- package/dist/esm/stzh-card.entry.js +34 -16
- package/dist/esm/stzh-chip-select.entry.js +52 -4
- package/dist/esm/stzh-chip.entry.js +3 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-cspace.entry.js +1 -1
- package/dist/esm/stzh-datamessagelist-item.entry.js +1 -1
- package/dist/esm/stzh-datatable.entry.js +1 -1
- package/dist/esm/stzh-dialog.entry.js +1 -1
- package/dist/esm/stzh-ghettobox_2.entry.js +2 -2
- package/dist/esm/stzh-heading.entry.js +1 -1
- package/dist/esm/stzh-hspace.entry.js +1 -1
- package/dist/esm/stzh-icon-sprite.entry.js +1 -1
- package/dist/esm/stzh-input.entry.js +2 -2
- package/dist/esm/stzh-link.entry.js +8 -4
- package/dist/esm/stzh-menu_2.entry.js +6 -2
- package/dist/esm/stzh-message.entry.js +1 -1
- package/dist/esm/stzh-pagetitle.entry.js +1 -1
- package/dist/esm/stzh-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-saptcha.entry.js +1 -1
- package/dist/esm/stzh-sortable.entry.js +3 -2
- package/dist/esm/stzh-table.entry.js +1 -1
- package/dist/esm/stzh-upload.entry.js +47 -4
- package/dist/esm/stzh-vbz-ticker.entry.js +1 -1
- package/dist/esm/stzh-vspace.entry.js +1 -1
- package/dist/esm-es5/app-globals-e66420b3.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/stzh-accordion-item.entry.js +1 -1
- package/dist/esm-es5/stzh-actionset.entry.js +1 -1
- package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
- package/dist/esm-es5/stzh-card-list.entry.js +1 -1
- package/dist/esm-es5/stzh-card.entry.js +1 -1
- package/dist/esm-es5/stzh-chip-select.entry.js +1 -1
- package/dist/esm-es5/stzh-chip.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-datamessagelist-item.entry.js +1 -1
- package/dist/esm-es5/stzh-datatable.entry.js +1 -1
- package/dist/esm-es5/stzh-dialog.entry.js +1 -1
- package/dist/esm-es5/stzh-ghettobox_2.entry.js +1 -1
- package/dist/esm-es5/stzh-heading.entry.js +1 -1
- package/dist/esm-es5/stzh-hspace.entry.js +1 -1
- package/dist/esm-es5/stzh-icon-sprite.entry.js +1 -1
- package/dist/esm-es5/stzh-input.entry.js +1 -1
- package/dist/esm-es5/stzh-link.entry.js +1 -1
- package/dist/esm-es5/stzh-menu_2.entry.js +1 -1
- package/dist/esm-es5/stzh-message.entry.js +1 -1
- package/dist/esm-es5/stzh-pagetitle.entry.js +1 -1
- package/dist/esm-es5/stzh-portal-mitwirken.entry.js +1 -1
- package/dist/esm-es5/stzh-saptcha.entry.js +1 -1
- package/dist/esm-es5/stzh-sortable.entry.js +1 -1
- package/dist/esm-es5/stzh-table.entry.js +1 -1
- package/dist/esm-es5/stzh-upload.entry.js +1 -1
- package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
- package/dist/esm-es5/stzh-vspace.entry.js +1 -1
- package/dist/stzh-components/assets/icons/mono/code-window.svg +3 -0
- package/dist/stzh-components/assets/svgsprites/symbol/sprite.symbol.html +45 -32
- package/dist/stzh-components/assets/svgsprites/symbol/svg/sprite.symbol.svg +1 -1
- package/dist/stzh-components/{p-332e4fd3.entry.js → p-03ea86bd.entry.js} +1 -1
- package/dist/stzh-components/p-051bc2a8.entry.js +1 -0
- package/dist/stzh-components/{p-13f44000.entry.js → p-0711e511.entry.js} +1 -1
- package/dist/stzh-components/p-073c89b1.system.entry.js +1 -0
- package/dist/stzh-components/{p-8cbc987f.system.entry.js → p-1440163c.system.entry.js} +1 -1
- package/dist/stzh-components/p-18958371.entry.js +1 -0
- package/dist/stzh-components/p-20ef4a20.system.entry.js +1 -0
- package/dist/stzh-components/{p-8a9e588e.system.entry.js → p-21566d65.system.entry.js} +1 -1
- package/dist/stzh-components/{p-5975c355.system.entry.js → p-22701389.system.entry.js} +1 -1
- package/dist/stzh-components/p-252d3178.entry.js +1 -0
- package/dist/stzh-components/p-2ca4a828.system.entry.js +1 -0
- package/dist/stzh-components/p-3042b23e.entry.js +1 -0
- package/dist/stzh-components/p-3b912468.system.entry.js +1 -0
- package/dist/stzh-components/p-3beb58d6.system.entry.js +1 -0
- package/dist/stzh-components/p-3f0363db.entry.js +1 -0
- package/dist/stzh-components/{p-b084fcbf.system.entry.js → p-530252c6.system.entry.js} +1 -1
- package/dist/stzh-components/{p-3b27a43f.system.entry.js → p-5353ba86.system.entry.js} +2 -2
- package/dist/stzh-components/p-55cdbf79.entry.js +1 -0
- package/dist/stzh-components/p-562e6c52.entry.js +1 -0
- package/dist/stzh-components/{p-b9295dc2.entry.js → p-5f4eb46c.entry.js} +1 -1
- package/dist/stzh-components/p-62db1e59.entry.js +1 -0
- package/dist/stzh-components/{p-63d8db7b.entry.js → p-6425898c.entry.js} +1 -1
- package/dist/stzh-components/p-676fd54d.entry.js +1 -0
- package/dist/stzh-components/{p-e7a84e53.system.entry.js → p-684c345e.system.entry.js} +1 -1
- package/dist/stzh-components/{p-8f16b0ac.entry.js → p-713ae713.entry.js} +1 -1
- package/dist/stzh-components/p-764ba190.entry.js +1 -0
- package/dist/stzh-components/p-786a92d4.system.entry.js +1 -0
- package/dist/stzh-components/p-796ae62c.system.entry.js +1 -0
- package/dist/stzh-components/p-7ec2f3fd.entry.js +9 -0
- package/dist/stzh-components/p-80d70586.entry.js +1 -0
- package/dist/stzh-components/p-838df84a.system.entry.js +1 -0
- package/dist/stzh-components/p-84ab53cc.system.entry.js +1 -0
- package/dist/stzh-components/p-85161133.js +1 -0
- package/dist/stzh-components/p-864d7c50.entry.js +1 -0
- package/dist/stzh-components/p-8b6de2c0.system.entry.js +1 -0
- package/dist/stzh-components/{p-ab455116.system.entry.js → p-8c648042.system.entry.js} +1 -1
- package/dist/stzh-components/p-929dbdf1.system.entry.js +1 -0
- package/dist/stzh-components/p-9469b812.entry.js +1 -0
- package/dist/stzh-components/p-9e716229.entry.js +1 -0
- package/dist/stzh-components/p-a3fa6122.system.entry.js +1 -0
- package/dist/stzh-components/p-b391d962.system.entry.js +1 -0
- package/dist/stzh-components/p-b462a61f.entry.js +1 -0
- package/dist/stzh-components/{p-5987573e.system.entry.js → p-b5a85078.system.entry.js} +1 -1
- package/dist/stzh-components/p-b70bc70c.system.js +1 -0
- package/dist/stzh-components/{p-b9382599.entry.js → p-bb3c1249.entry.js} +1 -1
- package/dist/stzh-components/{p-b636a18a.system.entry.js → p-bbe4e3d1.system.entry.js} +1 -1
- package/dist/stzh-components/p-c4fc6433.system.entry.js +1 -0
- package/dist/stzh-components/p-cb1d4678.entry.js +1 -0
- package/dist/stzh-components/p-ccd30d73.system.entry.js +1 -0
- package/dist/stzh-components/p-cd795307.entry.js +1 -0
- package/dist/stzh-components/{p-c692e405.entry.js → p-cdc9e600.entry.js} +1 -1
- package/dist/stzh-components/p-d1552460.system.entry.js +1 -0
- package/dist/stzh-components/p-e3e3e88c.system.js +1 -0
- package/dist/stzh-components/p-eb61c369.entry.js +1 -0
- package/dist/stzh-components/p-ebeb8d7b.system.entry.js +1 -0
- package/dist/stzh-components/p-eca1732f.entry.js +1 -0
- package/dist/stzh-components/p-f24db7e8.system.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/stzh-badge/stzh-badge.d.ts +2 -0
- package/dist/types/components.d.ts +196 -28
- package/dist/types/index.d.ts +6 -1
- package/dist/vscode-data.json +180 -19
- package/package.json +1 -1
- package/dist/esm-es5/app-globals-6b6ff890.js +0 -1
- package/dist/stzh-components/p-0b8de542.system.entry.js +0 -1
- package/dist/stzh-components/p-0d5522dc.system.entry.js +0 -1
- package/dist/stzh-components/p-0efe125f.system.entry.js +0 -1
- package/dist/stzh-components/p-2818488f.entry.js +0 -1
- package/dist/stzh-components/p-373f79e8.entry.js +0 -1
- package/dist/stzh-components/p-3ac93a01.entry.js +0 -1
- package/dist/stzh-components/p-59c323ce.entry.js +0 -1
- package/dist/stzh-components/p-6354fee3.entry.js +0 -1
- package/dist/stzh-components/p-653c6bbc.entry.js +0 -1
- package/dist/stzh-components/p-67f906b1.entry.js +0 -1
- package/dist/stzh-components/p-6a81e64b.entry.js +0 -1
- package/dist/stzh-components/p-75cdc8a6.system.entry.js +0 -1
- package/dist/stzh-components/p-7ad87d98.system.entry.js +0 -1
- package/dist/stzh-components/p-7f9f9a8d.entry.js +0 -1
- package/dist/stzh-components/p-83b1e379.entry.js +0 -9
- package/dist/stzh-components/p-86bc421e.system.entry.js +0 -1
- package/dist/stzh-components/p-8aebb240.entry.js +0 -1
- package/dist/stzh-components/p-938ef748.entry.js +0 -1
- package/dist/stzh-components/p-9bda100f.system.js +0 -1
- package/dist/stzh-components/p-a99d3e97.system.entry.js +0 -1
- package/dist/stzh-components/p-af2664fc.system.entry.js +0 -1
- package/dist/stzh-components/p-b9c3f3cc.entry.js +0 -1
- package/dist/stzh-components/p-bd178c32.system.entry.js +0 -1
- package/dist/stzh-components/p-c013a00b.system.entry.js +0 -1
- package/dist/stzh-components/p-c456c04b.system.entry.js +0 -1
- package/dist/stzh-components/p-c499e04d.entry.js +0 -1
- package/dist/stzh-components/p-c83e4fec.system.entry.js +0 -1
- package/dist/stzh-components/p-ca062c11.system.js +0 -1
- package/dist/stzh-components/p-ce28428b.entry.js +0 -1
- package/dist/stzh-components/p-cfaac121.js +0 -1
- package/dist/stzh-components/p-d11a70e2.system.entry.js +0 -1
- package/dist/stzh-components/p-d1dba399.system.entry.js +0 -1
- package/dist/stzh-components/p-d2b5e066.entry.js +0 -1
- package/dist/stzh-components/p-d54f04c8.system.entry.js +0 -1
- package/dist/stzh-components/p-d645d645.entry.js +0 -1
- package/dist/stzh-components/p-da7b363e.entry.js +0 -1
- package/dist/stzh-components/p-de017b87.system.entry.js +0 -1
- package/dist/stzh-components/p-e009bfdc.entry.js +0 -1
- package/dist/stzh-components/p-f167eaa4.system.entry.js +0 -1
- package/dist/stzh-components/p-f2ee016a.entry.js +0 -1
- package/dist/stzh-components/p-ffa1e9dd.system.entry.js +0 -1
|
@@ -94,6 +94,78 @@
|
|
|
94
94
|
box-sizing: border-box;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
.stzh-chip-select__marker-symbol {
|
|
98
|
+
font-family: var(--stzh-font-family-regular);
|
|
99
|
+
font-weight: var(--stzh-font-weight-regular);
|
|
100
|
+
font-style: normal;
|
|
101
|
+
}
|
|
102
|
+
.stzh-chip-select__marker-text {
|
|
103
|
+
border: 0;
|
|
104
|
+
clip: rect(0 0 0 0);
|
|
105
|
+
-webkit-clip-path: inset(100%);
|
|
106
|
+
clip-path: inset(100%);
|
|
107
|
+
width: 0.0625rem;
|
|
108
|
+
height: 0.0625rem;
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
padding: 0;
|
|
111
|
+
position: absolute;
|
|
112
|
+
}
|
|
113
|
+
.stzh-chip-select__description-wrapper {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column-reverse;
|
|
116
|
+
}
|
|
117
|
+
.stzh-chip-select__error, .stzh-chip-select__description {
|
|
118
|
+
font-size: var(--stzh-font-micro-font-size);
|
|
119
|
+
line-height: var(--stzh-font-micro-text-line-height);
|
|
120
|
+
color: var(--stzh-base-color);
|
|
121
|
+
}
|
|
122
|
+
.stzh-chip-select__error {
|
|
123
|
+
color: var(--stzh-color-error);
|
|
124
|
+
}
|
|
125
|
+
.stzh-chip-select__error-list {
|
|
126
|
+
list-style: none;
|
|
127
|
+
margin: 0;
|
|
128
|
+
padding: 0;
|
|
129
|
+
}
|
|
130
|
+
.stzh-chip-select__description {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: flex-start;
|
|
133
|
+
}
|
|
134
|
+
.stzh-chip-select__description-long {
|
|
135
|
+
margin-left: var(--stzh-space-xxsmall);
|
|
136
|
+
margin-top: 0.1875rem;
|
|
137
|
+
}
|
|
138
|
+
.stzh-chip-select__description-long-popover {
|
|
139
|
+
--width: auto;
|
|
140
|
+
--max-width: 27.3125rem;
|
|
141
|
+
}
|
|
142
|
+
.stzh-chip-select__description-long-popover[open]:not([open=false]) .stzh-chip-select__description-long-button {
|
|
143
|
+
color: var(--stzh-color-primary, var(--stzh-color-zueriblue));
|
|
144
|
+
}
|
|
145
|
+
.stzh-chip-select__description-long-button {
|
|
146
|
+
display: flex;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
align-items: center;
|
|
149
|
+
-webkit-appearance: none;
|
|
150
|
+
-moz-appearance: none;
|
|
151
|
+
appearance: none;
|
|
152
|
+
padding: 0;
|
|
153
|
+
border: none;
|
|
154
|
+
background-color: transparent;
|
|
155
|
+
border-radius: 0.5rem;
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
transition: color var(--stzh-base-transition-animation-speed);
|
|
158
|
+
color: var(--stzh-base-lead-color);
|
|
159
|
+
}
|
|
160
|
+
.stzh-chip-select__description-long-button:hover {
|
|
161
|
+
color: var(--stzh-color-primary, var(--stzh-color-zueriblue));
|
|
162
|
+
}
|
|
163
|
+
.stzh-chip-select stzh-icon.stzh-chip-select__description-long-icon {
|
|
164
|
+
--size: var(--stzh-icon-size-xsmall);
|
|
165
|
+
}
|
|
166
|
+
.stzh-chip-select--has-error .stzh-chip-select__error, .stzh-chip-select--has-description .stzh-chip-select__description {
|
|
167
|
+
margin-top: var(--stzh-space-xxsmall);
|
|
168
|
+
}
|
|
97
169
|
.stzh-chip-select__chips {
|
|
98
170
|
display: flex;
|
|
99
171
|
align-items: center;
|
|
@@ -112,4 +184,12 @@
|
|
|
112
184
|
.stzh-chip-select__dropdown {
|
|
113
185
|
display: none;
|
|
114
186
|
}
|
|
187
|
+
}
|
|
188
|
+
@media screen and (max-width: 1023px) {
|
|
189
|
+
.stzh-chip-select__description-wrapper {
|
|
190
|
+
display: none;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
.stzh-chip-select--has-error .stzh-chip-select__error, .stzh-chip-select--has-description .stzh-chip-select__description {
|
|
194
|
+
margin-top: var(--stzh-space-xsmall);
|
|
115
195
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { StzhInputDescription } from "../stzh-input/stzh-input-description";
|
|
3
|
+
// import { hasSlot } from "../../utils/utils";
|
|
4
|
+
import { fetchTranslations } from "../../utils/translation-utils";
|
|
5
|
+
let chipSelectCounter = 0;
|
|
2
6
|
/**
|
|
3
|
-
*
|
|
4
7
|
*/
|
|
5
8
|
export class StzhChipSelect {
|
|
6
9
|
constructor() {
|
|
@@ -12,6 +15,14 @@ export class StzhChipSelect {
|
|
|
12
15
|
this.label = "";
|
|
13
16
|
/** Value */
|
|
14
17
|
this.value = "";
|
|
18
|
+
/** Invalid status */
|
|
19
|
+
this.invalid = false;
|
|
20
|
+
/** Required status */
|
|
21
|
+
this.required = false;
|
|
22
|
+
/** Whether the element is disabled or not */
|
|
23
|
+
this.disabled = false;
|
|
24
|
+
/** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */
|
|
25
|
+
this.a11yDescribedby = "";
|
|
15
26
|
this.chipClick = (data) => {
|
|
16
27
|
this.value = data.value;
|
|
17
28
|
this.stzhChange.emit({
|
|
@@ -41,14 +52,50 @@ export class StzhChipSelect {
|
|
|
41
52
|
};
|
|
42
53
|
});
|
|
43
54
|
}
|
|
55
|
+
errorWatcher(newValue) {
|
|
56
|
+
if (typeof newValue === "string") {
|
|
57
|
+
try {
|
|
58
|
+
this._error = JSON.parse(newValue);
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
if (newValue) {
|
|
62
|
+
this._error = [newValue];
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
this._error = [];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else if (newValue) {
|
|
70
|
+
this._error = newValue;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this._error = [];
|
|
74
|
+
}
|
|
75
|
+
this.invalid = this._error.length > 0;
|
|
76
|
+
}
|
|
44
77
|
async componentWillLoad() {
|
|
78
|
+
this.inputId = `stzh-chip-select-${chipSelectCounter++}`;
|
|
45
79
|
this.dataWatcher(this.data);
|
|
80
|
+
this.errorWatcher(this.error);
|
|
81
|
+
if (!this.localization) {
|
|
82
|
+
this.localization = await fetchTranslations(this.element, "chip-select");
|
|
83
|
+
}
|
|
46
84
|
}
|
|
47
85
|
render() {
|
|
86
|
+
const descriptionUsed = !!this.description;
|
|
87
|
+
const descriptionLongUsed = !!this.descriptionLong;
|
|
88
|
+
const errorUsed = !!this.error;
|
|
48
89
|
const classes = {
|
|
49
|
-
"stzh-chip-select": true
|
|
90
|
+
"stzh-chip-select": true,
|
|
91
|
+
"stzh-chip-select--has-description": descriptionUsed,
|
|
92
|
+
"stzh-chip-select--has-description-long": descriptionLongUsed,
|
|
93
|
+
"stzh-chip-select--has-error": errorUsed,
|
|
94
|
+
"stzh-chip-select--is-invalid": this.invalid,
|
|
95
|
+
"stzh-chip-select--is-disabled": this.disabled,
|
|
96
|
+
"stzh-chip-select--is-required": this.required
|
|
50
97
|
};
|
|
51
|
-
return (h(Host, null, h("div", { class: classes }, h("div", { class: "stzh-chip-select__chips", role: "
|
|
98
|
+
return (h(Host, null, h("div", { class: classes }, h("input", { type: "hidden", name: this.name, value: this.value }), h("div", { class: "stzh-chip-select__chips", role: "listbox" }, this._data.map((data) => (h("stzh-chip", { role: "option", class: "stzh-chip-select__chip", label: data.label, counter: data.counter, icon: data.icon, type: data.type, variant: data.variant, size: data.size, disabled: this.disabled || data.disabled, active: this.value === data.value, "aria-selected": this.value === data.value ? "true" : null, a11yDescribedby: `${this.inputId}-description ${this.a11yDescribedby}`, onClick: () => this.chipClick(data) })))), h(StzhInputDescription, { classPrefix: "stzh-chip-select", id: `${this.inputId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel }), h("stzh-dropdown", { class: "stzh-chip-select__dropdown", disabled: this.disabled, error: this._error, description: this.description, descriptionLong: this.descriptionLong, required: this.required, invalid: this.invalid, items: [this.value], label: this.label, options: this._dataDropdown, onStzhChange: this.onDropdownChange }))));
|
|
52
99
|
}
|
|
53
100
|
static get is() { return "stzh-chip-select"; }
|
|
54
101
|
static get encapsulation() { return "scoped"; }
|
|
@@ -64,6 +111,26 @@ export class StzhChipSelect {
|
|
|
64
111
|
}
|
|
65
112
|
static get properties() {
|
|
66
113
|
return {
|
|
114
|
+
"localization": {
|
|
115
|
+
"type": "unknown",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "StzhLocaleComponent",
|
|
119
|
+
"resolved": "{ $locale: \"de\" | \"en\"; $formats: StzhLocaleFormats; $globals: StzhLocaleGlobals; }",
|
|
120
|
+
"references": {
|
|
121
|
+
"StzhLocaleComponent": {
|
|
122
|
+
"location": "import",
|
|
123
|
+
"path": "../../utils/translation-utils"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "Translation strings"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
67
134
|
"data": {
|
|
68
135
|
"type": "string",
|
|
69
136
|
"mutable": false,
|
|
@@ -87,6 +154,23 @@ export class StzhChipSelect {
|
|
|
87
154
|
"reflect": false,
|
|
88
155
|
"defaultValue": "[]"
|
|
89
156
|
},
|
|
157
|
+
"name": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "string",
|
|
162
|
+
"resolved": "string",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": "The name of the input element"
|
|
170
|
+
},
|
|
171
|
+
"attribute": "name",
|
|
172
|
+
"reflect": true
|
|
173
|
+
},
|
|
90
174
|
"label": {
|
|
91
175
|
"type": "string",
|
|
92
176
|
"mutable": false,
|
|
@@ -122,6 +206,129 @@ export class StzhChipSelect {
|
|
|
122
206
|
"attribute": "value",
|
|
123
207
|
"reflect": false,
|
|
124
208
|
"defaultValue": "\"\""
|
|
209
|
+
},
|
|
210
|
+
"description": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"mutable": false,
|
|
213
|
+
"complexType": {
|
|
214
|
+
"original": "string",
|
|
215
|
+
"resolved": "string",
|
|
216
|
+
"references": {}
|
|
217
|
+
},
|
|
218
|
+
"required": false,
|
|
219
|
+
"optional": false,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": "Description message (use description slot as alternative)"
|
|
223
|
+
},
|
|
224
|
+
"attribute": "description",
|
|
225
|
+
"reflect": false
|
|
226
|
+
},
|
|
227
|
+
"descriptionLong": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"mutable": false,
|
|
230
|
+
"complexType": {
|
|
231
|
+
"original": "string",
|
|
232
|
+
"resolved": "string",
|
|
233
|
+
"references": {}
|
|
234
|
+
},
|
|
235
|
+
"required": false,
|
|
236
|
+
"optional": false,
|
|
237
|
+
"docs": {
|
|
238
|
+
"tags": [],
|
|
239
|
+
"text": "Long description message appearing in a popover (use description-long slot as alternative)"
|
|
240
|
+
},
|
|
241
|
+
"attribute": "description-long",
|
|
242
|
+
"reflect": false
|
|
243
|
+
},
|
|
244
|
+
"error": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"mutable": false,
|
|
247
|
+
"complexType": {
|
|
248
|
+
"original": "string | string[]",
|
|
249
|
+
"resolved": "string | string[]",
|
|
250
|
+
"references": {}
|
|
251
|
+
},
|
|
252
|
+
"required": false,
|
|
253
|
+
"optional": false,
|
|
254
|
+
"docs": {
|
|
255
|
+
"tags": [],
|
|
256
|
+
"text": "One or multiple error message (use error slot as alternative)"
|
|
257
|
+
},
|
|
258
|
+
"attribute": "error",
|
|
259
|
+
"reflect": false
|
|
260
|
+
},
|
|
261
|
+
"invalid": {
|
|
262
|
+
"type": "boolean",
|
|
263
|
+
"mutable": false,
|
|
264
|
+
"complexType": {
|
|
265
|
+
"original": "boolean",
|
|
266
|
+
"resolved": "boolean",
|
|
267
|
+
"references": {}
|
|
268
|
+
},
|
|
269
|
+
"required": false,
|
|
270
|
+
"optional": false,
|
|
271
|
+
"docs": {
|
|
272
|
+
"tags": [],
|
|
273
|
+
"text": "Invalid status"
|
|
274
|
+
},
|
|
275
|
+
"attribute": "invalid",
|
|
276
|
+
"reflect": true,
|
|
277
|
+
"defaultValue": "false"
|
|
278
|
+
},
|
|
279
|
+
"required": {
|
|
280
|
+
"type": "boolean",
|
|
281
|
+
"mutable": false,
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "boolean",
|
|
284
|
+
"resolved": "boolean",
|
|
285
|
+
"references": {}
|
|
286
|
+
},
|
|
287
|
+
"required": false,
|
|
288
|
+
"optional": false,
|
|
289
|
+
"docs": {
|
|
290
|
+
"tags": [],
|
|
291
|
+
"text": "Required status"
|
|
292
|
+
},
|
|
293
|
+
"attribute": "required",
|
|
294
|
+
"reflect": true,
|
|
295
|
+
"defaultValue": "false"
|
|
296
|
+
},
|
|
297
|
+
"disabled": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"mutable": false,
|
|
300
|
+
"complexType": {
|
|
301
|
+
"original": "boolean",
|
|
302
|
+
"resolved": "boolean",
|
|
303
|
+
"references": {}
|
|
304
|
+
},
|
|
305
|
+
"required": false,
|
|
306
|
+
"optional": false,
|
|
307
|
+
"docs": {
|
|
308
|
+
"tags": [],
|
|
309
|
+
"text": "Whether the element is disabled or not"
|
|
310
|
+
},
|
|
311
|
+
"attribute": "disabled",
|
|
312
|
+
"reflect": true,
|
|
313
|
+
"defaultValue": "false"
|
|
314
|
+
},
|
|
315
|
+
"a11yDescribedby": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"mutable": false,
|
|
318
|
+
"complexType": {
|
|
319
|
+
"original": "string",
|
|
320
|
+
"resolved": "string",
|
|
321
|
+
"references": {}
|
|
322
|
+
},
|
|
323
|
+
"required": false,
|
|
324
|
+
"optional": false,
|
|
325
|
+
"docs": {
|
|
326
|
+
"tags": [],
|
|
327
|
+
"text": "Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup)"
|
|
328
|
+
},
|
|
329
|
+
"attribute": "a11y-describedby",
|
|
330
|
+
"reflect": false,
|
|
331
|
+
"defaultValue": "\"\""
|
|
125
332
|
}
|
|
126
333
|
};
|
|
127
334
|
}
|
|
@@ -153,6 +360,9 @@ export class StzhChipSelect {
|
|
|
153
360
|
return [{
|
|
154
361
|
"propName": "data",
|
|
155
362
|
"methodName": "dataWatcher"
|
|
363
|
+
}, {
|
|
364
|
+
"propName": "error",
|
|
365
|
+
"methodName": "errorWatcher"
|
|
156
366
|
}];
|
|
157
367
|
}
|
|
158
368
|
}
|