@zanichelli/albe-web-components 6.10.0-RC1 → 6.10.1
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/CHANGELOG.md +57 -0
- package/dist/cjs/index-e3299e0a.js +14 -6
- package/dist/cjs/index.cjs.js +7 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-600bad93.js → utils-4cf6a5ac.js} +8 -0
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/{z-app-header_3.cjs.entry.js → z-app-header_2.cjs.entry.js} +4 -80
- package/dist/cjs/z-body.cjs.entry.js +18 -0
- package/dist/cjs/z-chip.cjs.entry.js +1 -1
- package/dist/cjs/z-combobox.cjs.entry.js +10 -8
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +77 -8
- package/dist/cjs/z-file-upload.cjs.entry.js +12 -12
- package/dist/cjs/z-heading.cjs.entry.js +18 -0
- package/dist/cjs/z-input_2.cjs.entry.js +20 -13
- package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
- package/dist/cjs/z-pocket_3.cjs.entry.js +1 -1
- package/dist/cjs/z-searchbar.cjs.entry.js +11 -7
- package/dist/cjs/z-select.cjs.entry.js +17 -9
- package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
- package/dist/cjs/z-slideshow.cjs.entry.js +1 -1
- package/dist/cjs/z-table-empty-box.cjs.entry.js +1 -1
- package/dist/cjs/z-table-header.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +1 -1
- package/dist/cjs/z-toggle-switch.cjs.entry.js +1 -1
- package/dist/cjs/{z-body_2.cjs.entry.js → z-typography.cjs.entry.js} +0 -12
- package/dist/collection/beans/index.js +1 -0
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/file-upload/z-dragdrop-area/index.js +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.js +10 -10
- package/dist/collection/components/file-upload/z-file-upload/styles.css +2 -2
- package/dist/collection/components/inputs/z-combobox/index.js +32 -7
- package/dist/collection/components/inputs/z-combobox/styles.css +31 -3
- package/dist/collection/components/inputs/z-input/index.js +42 -11
- package/dist/collection/components/inputs/z-input/styles.css +59 -0
- package/dist/collection/components/inputs/z-input-message/styles.css +15 -0
- package/dist/collection/components/inputs/z-searchbar/index.js +30 -8
- package/dist/collection/components/inputs/z-select/index.js +39 -8
- package/dist/collection/components/inputs/z-select/styles.css +9 -0
- package/dist/collection/components/modal/z-modal/index.js +50 -36
- package/dist/collection/components/modal/z-modal/styles.css +5 -1
- package/dist/collection/components/z-table/z-table/index.js +1 -1
- package/dist/collection/components/z-table/z-table-empty-box/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/styles.css +19 -0
- package/dist/collection/utils/utils.js +7 -0
- package/dist/esm/index-a2ca4b97.js +14 -6
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/polyfills/css-shim.js +0 -0
- package/dist/esm/{utils-6cf7efe2.js → utils-f2a0dac2.js} +8 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/{z-app-header_3.entry.js → z-app-header_2.entry.js} +5 -80
- package/dist/esm/z-body.entry.js +14 -0
- package/dist/esm/z-chip.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +11 -9
- package/dist/esm/z-dragdrop-area_2.entry.js +78 -9
- package/dist/esm/z-file-upload.entry.js +12 -12
- package/dist/esm/z-heading.entry.js +14 -0
- package/dist/esm/z-input_2.entry.js +21 -14
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +2 -2
- package/dist/esm/z-pocket_3.entry.js +1 -1
- package/dist/esm/z-searchbar.entry.js +11 -7
- package/dist/esm/z-select.entry.js +18 -10
- package/dist/esm/z-skip-to-content.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-table-empty-box.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +1 -1
- package/dist/esm/z-table.entry.js +1 -1
- package/dist/esm/z-toggle-switch.entry.js +1 -1
- package/dist/esm/{z-body_2.entry.js → z-typography.entry.js} +1 -12
- package/dist/types/beans/index.d.ts +1 -0
- package/dist/types/components/buttons/z-button/index.d.ts +0 -0
- package/dist/types/components/buttons/z-button-sort/index.d.ts +0 -0
- package/dist/types/components/buttons/z-chip/index.d.ts +0 -0
- package/dist/types/components/buttons/z-toggle-button/index.d.ts +0 -0
- package/dist/types/components/buttons/z-toggle-switch/index.d.ts +0 -0
- package/dist/types/components/date-picker/utils.d.ts +0 -0
- package/dist/types/components/date-picker/z-date-picker/index.d.ts +0 -0
- package/dist/types/components/date-picker/z-range-picker/index.d.ts +0 -0
- package/dist/types/components/file-upload/z-dragdrop-area/index.d.ts +0 -0
- package/dist/types/components/file-upload/z-file/index.d.ts +0 -0
- package/dist/types/components/file-upload/z-file-upload/index.d.ts +0 -0
- package/dist/types/components/icons/icons.d.ts +0 -0
- package/dist/types/components/icons/z-icon/index.d.ts +0 -0
- package/dist/types/components/index.d.ts +0 -0
- package/dist/types/components/indicators/z-stepper/index.d.ts +0 -0
- package/dist/types/components/indicators/z-stepper-item/index.d.ts +0 -0
- package/dist/types/components/inputs/z-combobox/index.d.ts +3 -1
- package/dist/types/components/inputs/z-input/index.d.ts +3 -1
- package/dist/types/components/inputs/z-input-message/index.d.ts +0 -0
- package/dist/types/components/inputs/z-searchbar/index.d.ts +4 -1
- package/dist/types/components/inputs/z-select/index.d.ts +4 -1
- package/dist/types/components/list/z-list/index.d.ts +0 -0
- package/dist/types/components/list/z-list-element/index.d.ts +0 -0
- package/dist/types/components/list/z-list-group/index.d.ts +0 -0
- package/dist/types/components/list/z-toast-notification-list/index.d.ts +0 -0
- package/dist/types/components/logo/z-logo/index.d.ts +0 -0
- package/dist/types/components/modal/z-modal/index.d.ts +15 -12
- package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +0 -0
- package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +0 -0
- package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +0 -0
- package/dist/types/components/navigation/z-app-header/index.d.ts +0 -0
- package/dist/types/components/navigation/z-app-switcher/index.d.ts +0 -0
- package/dist/types/components/navigation/z-link/index.d.ts +0 -0
- package/dist/types/components/navigation/z-menu/index.d.ts +0 -0
- package/dist/types/components/navigation/z-menu-section/index.d.ts +0 -0
- package/dist/types/components/notification/z-info-box/index.d.ts +0 -0
- package/dist/types/components/notification/z-notification/index.d.ts +0 -0
- package/dist/types/components/notification/z-toast-notification/index.d.ts +0 -0
- package/dist/types/components/notification/z-tooltip/index.d.ts +0 -0
- package/dist/types/components/panel/z-panel-elem/index.d.ts +0 -0
- package/dist/types/components/z-anchor-navigation/index.d.ts +0 -0
- package/dist/types/components/z-aria-alert/index.d.ts +0 -0
- package/dist/types/components/z-avatar/index.d.ts +0 -0
- package/dist/types/components/z-card/index.d.ts +0 -0
- package/dist/types/components/z-carousel/index.d.ts +0 -0
- package/dist/types/components/z-contextual-menu/index.d.ts +0 -0
- package/dist/types/components/z-cover-hero/index.d.ts +0 -0
- package/dist/types/components/z-divider/index.d.ts +0 -0
- package/dist/types/components/z-ghost-loading/index.d.ts +0 -0
- package/dist/types/components/z-info-reveal/index.d.ts +0 -0
- package/dist/types/components/z-offcanvas/index.d.ts +0 -0
- package/dist/types/components/z-pagination/index.d.ts +0 -0
- package/dist/types/components/z-popover/index.d.ts +0 -0
- package/dist/types/components/z-section-title/index.d.ts +0 -0
- package/dist/types/components/z-skip-to-content/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-body/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-cell/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-empty-box/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-expanded-row/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-footer/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-head/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-header/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-header-row/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-row/index.d.ts +0 -0
- package/dist/types/components/z-table/z-table-sticky-footer/index.d.ts +0 -0
- package/dist/types/components/z-tag/index.d.ts +0 -0
- package/dist/types/components/z-visually-hidden/index.d.ts +0 -0
- package/dist/types/components.d.ts +41 -9
- package/dist/types/constants/breakpoints.d.ts +0 -0
- package/dist/types/constants/icons.d.ts +0 -0
- package/dist/types/{components → deprecated}/typography/z-body/index.d.ts +0 -0
- package/dist/types/{components → deprecated}/typography/z-heading/index.d.ts +0 -0
- package/dist/types/{components → deprecated}/typography/z-typography/index.d.ts +0 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-alert/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-body/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-cover/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-dictionary/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-footer-sections/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-header/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-icon/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-info/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/card/z-myz-card-list/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/list/z-myz-list/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/list/z-myz-list-item/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-messages-pocket/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-pocket/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-pocket-body/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-pocket-header/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/pocket/z-pocket-message/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/z-alert/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/z-otp/index.d.ts +0 -0
- package/dist/types/snowflakes/myz/z-slideshow/index.d.ts +0 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/p-056a5f26.js +1 -0
- package/dist/web-components-library/p-0cf7d2b7.entry.js +1 -0
- package/dist/web-components-library/{p-6c163539.entry.js → p-24819d79.entry.js} +1 -1
- package/dist/web-components-library/{p-a05ce0a6.entry.js → p-321fbbcf.entry.js} +1 -1
- package/dist/web-components-library/{p-93142fac.entry.js → p-33fce170.entry.js} +1 -1
- package/dist/web-components-library/p-3860061a.entry.js +1 -0
- package/dist/web-components-library/p-4367f978.entry.js +1 -0
- package/dist/web-components-library/p-4ec46b85.entry.js +1 -0
- package/dist/web-components-library/p-52b084fb.entry.js +1 -0
- package/dist/web-components-library/p-5ac6109d.entry.js +1 -0
- package/dist/web-components-library/{p-53065788.entry.js → p-68af2f65.entry.js} +1 -1
- package/dist/web-components-library/{p-a6c0f149.entry.js → p-77e571f7.entry.js} +1 -1
- package/dist/web-components-library/p-a04e4731.entry.js +1 -0
- package/dist/web-components-library/{p-26033729.entry.js → p-a58e5d18.entry.js} +1 -1
- package/dist/web-components-library/p-acc73783.entry.js +1 -0
- package/dist/web-components-library/p-addc88f2.entry.js +1 -0
- package/dist/web-components-library/{p-d2127d84.entry.js → p-c0af3909.entry.js} +1 -1
- package/dist/web-components-library/p-d12d5468.entry.js +1 -0
- package/dist/web-components-library/p-d9a6a204.entry.js +1 -0
- package/dist/web-components-library/p-e78ce8ec.entry.js +1 -0
- package/dist/web-components-library/p-edd53386.entry.js +1 -0
- package/dist/web-components-library/web-components-library.css +0 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/loader/cdn.js +0 -0
- package/loader/index.cjs.js +0 -0
- package/loader/index.d.ts +0 -0
- package/loader/index.es2017.js +0 -0
- package/loader/index.js +0 -0
- package/loader/package.json +0 -0
- package/package.json +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/p-056a5f26.js +1 -0
- package/www/build/p-082c7476.js +1 -0
- package/www/build/p-0cf7d2b7.entry.js +1 -0
- package/www/build/{p-6c163539.entry.js → p-24819d79.entry.js} +1 -1
- package/www/build/{p-a05ce0a6.entry.js → p-321fbbcf.entry.js} +1 -1
- package/www/build/{p-93142fac.entry.js → p-33fce170.entry.js} +1 -1
- package/www/build/p-3860061a.entry.js +1 -0
- package/www/build/p-4367f978.entry.js +1 -0
- package/www/build/p-4ec46b85.entry.js +1 -0
- package/www/build/p-52b084fb.entry.js +1 -0
- package/www/build/p-5ac6109d.entry.js +1 -0
- package/www/build/{p-53065788.entry.js → p-68af2f65.entry.js} +1 -1
- package/www/build/{p-a6c0f149.entry.js → p-77e571f7.entry.js} +1 -1
- package/www/build/p-a04e4731.entry.js +1 -0
- package/www/build/{p-26033729.entry.js → p-a58e5d18.entry.js} +1 -1
- package/www/build/p-acc73783.entry.js +1 -0
- package/www/build/p-addc88f2.entry.js +1 -0
- package/www/build/{p-d2127d84.entry.js → p-c0af3909.entry.js} +1 -1
- package/www/build/p-d12d5468.entry.js +1 -0
- package/www/build/p-d9a6a204.entry.js +1 -0
- package/www/build/p-e78ce8ec.entry.js +1 -0
- package/www/build/p-edd53386.entry.js +1 -0
- package/www/build/web-components-library.css +0 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.js +0 -0
- package/www/host.config.json +0 -0
- package/www/index.html +1 -24
- package/dist/web-components-library/p-2e5f7ff1.entry.js +0 -1
- package/dist/web-components-library/p-54b18f6e.entry.js +0 -1
- package/dist/web-components-library/p-5c62387a.entry.js +0 -1
- package/dist/web-components-library/p-6acb48e3.entry.js +0 -1
- package/dist/web-components-library/p-735bdfa3.entry.js +0 -1
- package/dist/web-components-library/p-7b3b99ee.entry.js +0 -1
- package/dist/web-components-library/p-8ebe4adf.js +0 -1
- package/dist/web-components-library/p-95b8f109.entry.js +0 -1
- package/dist/web-components-library/p-a79d1412.entry.js +0 -1
- package/dist/web-components-library/p-b17981a4.entry.js +0 -1
- package/dist/web-components-library/p-bb92c90f.entry.js +0 -1
- package/dist/web-components-library/p-ff27c534.entry.js +0 -1
- package/www/build/p-0d36d640.js +0 -1
- package/www/build/p-2e5f7ff1.entry.js +0 -1
- package/www/build/p-54b18f6e.entry.js +0 -1
- package/www/build/p-5c62387a.entry.js +0 -1
- package/www/build/p-6acb48e3.entry.js +0 -1
- package/www/build/p-735bdfa3.entry.js +0 -1
- package/www/build/p-7b3b99ee.entry.js +0 -1
- package/www/build/p-8ebe4adf.js +0 -1
- package/www/build/p-95b8f109.entry.js +0 -1
- package/www/build/p-a79d1412.entry.js +0 -1
- package/www/build/p-b17981a4.entry.js +0 -1
- package/www/build/p-bb92c90f.entry.js +0 -1
- package/www/build/p-ff27c534.entry.js +0 -1
- /package/dist/collection/{components → deprecated}/typography/z-body/index.js +0 -0
- /package/dist/collection/{components → deprecated}/typography/z-heading/index.js +0 -0
- /package/dist/collection/{components → deprecated}/typography/z-typography/index.js +0 -0
- /package/dist/collection/{components → deprecated}/typography/z-typography/styles.css +0 -0
|
@@ -29,6 +29,15 @@ textarea,
|
|
|
29
29
|
outline: none;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
:host([size="small"]) input,
|
|
33
|
+
:host([size="small"]) textarea,
|
|
34
|
+
:host([size="small"]) .textarea-wrapper,
|
|
35
|
+
:host([size="x-small"]) input,
|
|
36
|
+
:host([size="x-small"]) textarea,
|
|
37
|
+
:host([size="x-small"]) .textarea-wrapper {
|
|
38
|
+
font-size: var(--font-size-2);
|
|
39
|
+
}
|
|
40
|
+
|
|
32
41
|
:host.cursor-select input {
|
|
33
42
|
cursor: pointer;
|
|
34
43
|
}
|
|
@@ -159,6 +168,14 @@ label.input-label {
|
|
|
159
168
|
margin: 0;
|
|
160
169
|
}
|
|
161
170
|
|
|
171
|
+
:host([size="small"]) .text-wrapper > div > input {
|
|
172
|
+
height: calc(var(--space-unit) * 4.5);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host([size="x-small"]) .text-wrapper > div > input {
|
|
176
|
+
height: calc(var(--space-unit) * 4);
|
|
177
|
+
}
|
|
178
|
+
|
|
162
179
|
.text-wrapper > div > input.has-icon,
|
|
163
180
|
.text-wrapper > div > input.has-clear-icon {
|
|
164
181
|
padding-right: calc(var(--space-unit) * 5.25);
|
|
@@ -203,6 +220,12 @@ label.input-label {
|
|
|
203
220
|
display: block;
|
|
204
221
|
}
|
|
205
222
|
|
|
223
|
+
.text-wrapper .icons-wrapper > button.icon-button > z-icon.small,
|
|
224
|
+
.text-wrapper .icons-wrapper > button.icon-button > z-icon.x-small {
|
|
225
|
+
--z-icon-width: 16px;
|
|
226
|
+
--z-icon-height: 16px;
|
|
227
|
+
}
|
|
228
|
+
|
|
206
229
|
/* Disable background color webkit */
|
|
207
230
|
/* stylelint-disable property-no-vendor-prefix */
|
|
208
231
|
.text-wrapper > div > input:-webkit-autofill,
|
|
@@ -299,6 +322,28 @@ textarea {
|
|
|
299
322
|
fill: inherit;
|
|
300
323
|
}
|
|
301
324
|
|
|
325
|
+
:host([size="small"]) .radio-wrapper .radio-label z-icon,
|
|
326
|
+
:host([size="small"]) .checkbox-wrapper .checkbox-label z-icon {
|
|
327
|
+
--z-icon-width: 16px;
|
|
328
|
+
--z-icon-height: 16px;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
:host([size="small"]) .radio-wrapper .radio-label,
|
|
332
|
+
:host([size="small"]) .checkbox-wrapper .checkbox-label {
|
|
333
|
+
font-size: var(--font-size-2);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
:host([size="x-small"]) .radio-wrapper .radio-label z-icon,
|
|
337
|
+
:host([size="x-small"]) .checkbox-wrapper .checkbox-label z-icon {
|
|
338
|
+
--z-icon-width: 14px;
|
|
339
|
+
--z-icon-height: 14px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
:host([size="x-small"]) .radio-wrapper .radio-label,
|
|
343
|
+
:host([size="x-small"]) .checkbox-wrapper .checkbox-label {
|
|
344
|
+
font-size: var(--font-size-1);
|
|
345
|
+
}
|
|
346
|
+
|
|
302
347
|
.radio-wrapper .radio-label.after,
|
|
303
348
|
.checkbox-wrapper .checkbox-label.after {
|
|
304
349
|
flex-direction: row;
|
|
@@ -319,6 +364,20 @@ textarea {
|
|
|
319
364
|
margin-right: var(--space-unit);
|
|
320
365
|
}
|
|
321
366
|
|
|
367
|
+
:host([size="small"]) .radio-wrapper .radio-label.after > span,
|
|
368
|
+
:host([size="small"]) .checkbox-wrapper .checkbox-label.after > span,
|
|
369
|
+
:host([size="x-small"]) .radio-wrapper .radio-label.after > span,
|
|
370
|
+
:host([size="x-small"]) .checkbox-wrapper .checkbox-label.after > span {
|
|
371
|
+
margin-left: calc(var(--space-unit) * 0.5);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
:host([size="small"]) .radio-wrapper .radio-label.before > span,
|
|
375
|
+
:host([size="small"]) .checkbox-wrapper .checkbox-label.before > span,
|
|
376
|
+
:host([size="x-small"]) .radio-wrapper .radio-label.before > span,
|
|
377
|
+
:host([size="x-small"]) .checkbox-wrapper .checkbox-label.before > span {
|
|
378
|
+
margin-right: calc(var(--space-unit) * 0.5);
|
|
379
|
+
}
|
|
380
|
+
|
|
322
381
|
/* focus */
|
|
323
382
|
.radio-wrapper > input:focus:focus-visible + .radio-label > z-icon,
|
|
324
383
|
.checkbox-wrapper > input:focus:focus-visible + .checkbox-label > z-icon {
|
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
letter-spacing: 0.16px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
:host(.small),
|
|
14
|
+
:host(.x-small) {
|
|
15
|
+
margin-top: calc(var(--space-unit) * 0.5);
|
|
16
|
+
font-size: var(--font-size-1);
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
:host([status="success"]) {
|
|
14
20
|
color: var(--color-text-success);
|
|
15
21
|
}
|
|
@@ -30,4 +36,13 @@
|
|
|
30
36
|
--z-icon-width: calc(var(--space-unit) * 2);
|
|
31
37
|
--z-icon-height: calc(var(--space-unit) * 2);
|
|
32
38
|
--z-icon-right-margin: var(--space-unit);
|
|
39
|
+
|
|
40
|
+
margin-top: calc(var(--space-unit) * 0.25);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host(.small) > z-icon,
|
|
44
|
+
:host(.x-small) > z-icon {
|
|
45
|
+
--z-icon-width: 14px;
|
|
46
|
+
--z-icon-height: 14px;
|
|
47
|
+
--z-icon-right-margin: calc(var(--space-unit) * 0.5);
|
|
33
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { ButtonVariant, ListDividerType } from "../../../beans";
|
|
3
|
-
import {
|
|
3
|
+
import { handleEnterKeydSubmit, randomId } from "../../../utils/utils";
|
|
4
4
|
/**
|
|
5
5
|
* @cssprop --z-searchbar-results-height - Max height of the results container (default: 540px)
|
|
6
6
|
*/
|
|
@@ -8,7 +8,7 @@ export class ZSearchbar {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
/** the id of the searchbar element */
|
|
10
10
|
this.htmlid = `searchbar-${randomId()}`;
|
|
11
|
-
/**
|
|
11
|
+
/** Prevent submit action */
|
|
12
12
|
this.preventSubmit = false;
|
|
13
13
|
/** Show autocomplete results */
|
|
14
14
|
this.autocomplete = false;
|
|
@@ -20,13 +20,15 @@ export class ZSearchbar {
|
|
|
20
20
|
this.searchHelperLabel = "Cerca {searchString}";
|
|
21
21
|
/** Sort autocomplete results items */
|
|
22
22
|
this.sortResultsItems = false;
|
|
23
|
+
/** Show submit button */
|
|
24
|
+
this.showSearchButton = false;
|
|
23
25
|
this.searchString = "";
|
|
24
26
|
this.currResultsCount = 0;
|
|
25
27
|
this.showResults = false;
|
|
26
28
|
this.resultsItemsList = null;
|
|
27
29
|
}
|
|
28
30
|
emitSearchSubmit() {
|
|
29
|
-
this.searchSubmit.emit(this.
|
|
31
|
+
this.searchSubmit.emit(this.inputRef.value);
|
|
30
32
|
}
|
|
31
33
|
emitSearchTyping(search) {
|
|
32
34
|
this.searchTyping.emit(search);
|
|
@@ -130,13 +132,15 @@ export class ZSearchbar {
|
|
|
130
132
|
this.showResults = false;
|
|
131
133
|
}
|
|
132
134
|
renderInput() {
|
|
133
|
-
return (h("z-input", {
|
|
135
|
+
return (h("z-input", { ref: (val) => {
|
|
136
|
+
this.inputRef = val;
|
|
137
|
+
}, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value }));
|
|
134
138
|
}
|
|
135
139
|
renderButton() {
|
|
136
|
-
if (this.
|
|
140
|
+
if (!this.showSearchButton) {
|
|
137
141
|
return null;
|
|
138
142
|
}
|
|
139
|
-
return (h("z-button", { variant: ButtonVariant.PRIMARY, onClick: () => this.handleSubmit() }, "CERCA"));
|
|
143
|
+
return (h("z-button", { disabled: this.preventSubmit, variant: ButtonVariant.PRIMARY, onClick: () => this.handleSubmit() }, "CERCA"));
|
|
140
144
|
}
|
|
141
145
|
renderResults() {
|
|
142
146
|
if (!this.showResults ||
|
|
@@ -212,7 +216,7 @@ export class ZSearchbar {
|
|
|
212
216
|
return (h("z-list-element", { role: "option", tabindex: 0, clickable: true, id: `list-item-${this.htmlid}-show-all`, onClickItem: () => (this.currResultsCount = 0) }, h("span", { class: "item-show-all" }, h("z-link", null, "Vedi tutti i risultati"))));
|
|
213
217
|
}
|
|
214
218
|
render() {
|
|
215
|
-
return (h(Host, { onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e) }, h("div", { class: { "has-submit":
|
|
219
|
+
return (h(Host, { onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e) }, h("div", { class: { "has-submit": this.showSearchButton, "has-results": this.autocomplete } }, this.renderInput(), this.renderResults(), this.renderButton())));
|
|
216
220
|
}
|
|
217
221
|
static get is() { return "z-searchbar"; }
|
|
218
222
|
static get encapsulation() { return "shadow"; }
|
|
@@ -258,7 +262,7 @@ export class ZSearchbar {
|
|
|
258
262
|
"optional": true,
|
|
259
263
|
"docs": {
|
|
260
264
|
"tags": [],
|
|
261
|
-
"text": "
|
|
265
|
+
"text": "Prevent submit action"
|
|
262
266
|
},
|
|
263
267
|
"attribute": "prevent-submit",
|
|
264
268
|
"reflect": false,
|
|
@@ -426,6 +430,24 @@ export class ZSearchbar {
|
|
|
426
430
|
"attribute": "sort-results-items",
|
|
427
431
|
"reflect": false,
|
|
428
432
|
"defaultValue": "false"
|
|
433
|
+
},
|
|
434
|
+
"showSearchButton": {
|
|
435
|
+
"type": "boolean",
|
|
436
|
+
"mutable": false,
|
|
437
|
+
"complexType": {
|
|
438
|
+
"original": "boolean",
|
|
439
|
+
"resolved": "boolean",
|
|
440
|
+
"references": {}
|
|
441
|
+
},
|
|
442
|
+
"required": false,
|
|
443
|
+
"optional": true,
|
|
444
|
+
"docs": {
|
|
445
|
+
"tags": [],
|
|
446
|
+
"text": "Show submit button"
|
|
447
|
+
},
|
|
448
|
+
"attribute": "show-search-button",
|
|
449
|
+
"reflect": false,
|
|
450
|
+
"defaultValue": "false"
|
|
429
451
|
}
|
|
430
452
|
};
|
|
431
453
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { ListDividerType, KeyboardCode } from "../../../beans";
|
|
2
|
+
import { ListDividerType, KeyboardCode, ControlSize, ListSize } from "../../../beans";
|
|
3
3
|
import { randomId, handleKeyboardSubmit, getClickedElement, getElementTree, boolean } from "../../../utils/utils";
|
|
4
4
|
export class ZSelect {
|
|
5
5
|
constructor() {
|
|
@@ -19,6 +19,8 @@ export class ZSelect {
|
|
|
19
19
|
this.noresultslabel = "Nessun risultato";
|
|
20
20
|
/** When fixed, it occupies space and pushes down next elements. */
|
|
21
21
|
this.isfixed = false;
|
|
22
|
+
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
23
|
+
this.size = ControlSize.BIG;
|
|
22
24
|
this.isOpen = false;
|
|
23
25
|
this.selectedItem = null;
|
|
24
26
|
this.itemsList = [];
|
|
@@ -217,7 +219,7 @@ export class ZSelect {
|
|
|
217
219
|
return (h("z-input", { class: {
|
|
218
220
|
"active-select": this.isOpen,
|
|
219
221
|
"cursor-select": !this.autocomplete,
|
|
220
|
-
}, id: `${this.htmlid}_input`, htmlid: `${this.htmlid}_input`, placeholder: this.placeholder, value: !this.isOpen && this.selectedItem ? this.selectedItem.name.replace(/<[^>]+>/g, "") : null, label: this.label, "aria-label": this.ariaLabel, icon: this.isOpen ? "caret-up" : "caret-down", hasclearicon: this.hasAutocomplete(), message: false, disabled: this.disabled, readonly: this.readonly || (!this.hasAutocomplete() && this.isOpen), status: this.isOpen ? undefined : this.status, autocomplete: "off", onClick: (e) => {
|
|
222
|
+
}, id: `${this.htmlid}_input`, htmlid: `${this.htmlid}_input`, placeholder: this.placeholder, value: !this.isOpen && this.selectedItem ? this.selectedItem.name.replace(/<[^>]+>/g, "") : null, label: this.label, "aria-label": this.ariaLabel, icon: this.isOpen ? "caret-up" : "caret-down", hasclearicon: this.hasAutocomplete(), message: false, disabled: this.disabled, readonly: this.readonly || (!this.hasAutocomplete() && this.isOpen), status: this.isOpen ? undefined : this.status, autocomplete: "off", size: this.size, onClick: (e) => {
|
|
221
223
|
this.handleInputClick(e);
|
|
222
224
|
}, onKeyUp: (e) => {
|
|
223
225
|
if (e.keyCode !== 13) {
|
|
@@ -240,7 +242,7 @@ export class ZSelect {
|
|
|
240
242
|
return (h("div", { class: this.isOpen ? "open" : "closed", tabindex: "-1" }, h("div", { class: {
|
|
241
243
|
"ul-scroll-wrapper": true,
|
|
242
244
|
"fixed": this.isfixed,
|
|
243
|
-
}, tabindex: "-1" }, h("z-list", { role: "listbox", tabindex: this.disabled || this.readonly || !this.isOpen ? -1 : 0, id: this.htmlid, "aria-activedescendant": (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.id, "aria-multiselectable": false, class: {
|
|
245
|
+
}, tabindex: "-1" }, h("z-list", { role: "listbox", tabindex: this.disabled || this.readonly || !this.isOpen ? -1 : 0, id: this.htmlid, "aria-activedescendant": (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.id, "aria-multiselectable": false, size: this.listSizeType(), class: {
|
|
244
246
|
disabled: this.disabled,
|
|
245
247
|
readonly: this.readonly,
|
|
246
248
|
filled: !!this.selectedItem,
|
|
@@ -252,18 +254,24 @@ export class ZSelect {
|
|
|
252
254
|
"hide": !this.selectedItem || !this.resetItem,
|
|
253
255
|
"reset-item": true,
|
|
254
256
|
"reset-item-margin": !this.hasGroupItems,
|
|
255
|
-
}, clickable: true, disabled: false, dividerType: ListDividerType.ELEMENT, role: "option", tabindex: "0", "aria-selected": "false", id: `${this.htmlid}_${this.resetItem ? "0" : "none"}`, onClickItem: () => {
|
|
257
|
+
}, clickable: true, disabled: false, dividerType: ListDividerType.ELEMENT, role: "option", tabindex: "0", "aria-selected": "false", id: `${this.htmlid}_${this.resetItem ? "0" : "none"}`, size: this.listSizeType(), onClickItem: () => {
|
|
256
258
|
this.selectedItem = null;
|
|
257
259
|
this.searchString = null;
|
|
258
260
|
this.emitResetSelect();
|
|
259
261
|
}, onKeyDown: (e) => this.arrowsSelectNav(e, 0) }, h("div", { class: "reset-item-content" }, h("z-icon", { name: "multiply-circled" }), h("span", null, this.resetItem))));
|
|
260
262
|
}
|
|
261
263
|
renderItem(item, key, lastItem) {
|
|
262
|
-
return (h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": !!item.selected, id: `${this.htmlid}_${key}`, onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, h("span", { class: {
|
|
264
|
+
return (h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": !!item.selected, id: `${this.htmlid}_${key}`, size: this.listSizeType(), onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, h("span", { class: {
|
|
263
265
|
"selected": !!item.selected,
|
|
264
266
|
"list-element-content": true,
|
|
265
267
|
}, innerHTML: item.name })));
|
|
266
268
|
}
|
|
269
|
+
listSizeType() {
|
|
270
|
+
if (this.size === ControlSize.SMALL || this.size === ControlSize.X_SMALL) {
|
|
271
|
+
return ListSize.SMALL;
|
|
272
|
+
}
|
|
273
|
+
return ListSize.MEDIUM;
|
|
274
|
+
}
|
|
267
275
|
renderSelectUlItems() {
|
|
268
276
|
if (!this.itemsList.length) {
|
|
269
277
|
return this.renderNoSearchResults();
|
|
@@ -289,17 +297,17 @@ export class ZSelect {
|
|
|
289
297
|
return group;
|
|
290
298
|
}, {});
|
|
291
299
|
return Object.entries(newData).map(([key, value]) => {
|
|
292
|
-
return (h("z-list-group", { "divider-type": ListDividerType.ELEMENT }, h("
|
|
300
|
+
return (h("z-list-group", { "divider-type": ListDividerType.ELEMENT }, h("span", { class: "body-3-sb z-list-group-title", slot: "header-title" }, key), value.map((item) => item)));
|
|
293
301
|
});
|
|
294
302
|
}
|
|
295
303
|
renderNoSearchResults() {
|
|
296
|
-
return (h("z-list-element", { color: "blue500", class: "no-results" }, h("z-icon", { name: "multiply-circle", fill: "blue500" }), this.noresultslabel));
|
|
304
|
+
return (h("z-list-element", { color: "blue500", class: "no-results", size: this.listSizeType() }, h("z-icon", { name: "multiply-circle", fill: "blue500" }), this.noresultslabel));
|
|
297
305
|
}
|
|
298
306
|
renderMessage() {
|
|
299
307
|
if (boolean(this.message) === false) {
|
|
300
308
|
return;
|
|
301
309
|
}
|
|
302
|
-
return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status }));
|
|
310
|
+
return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size }));
|
|
303
311
|
}
|
|
304
312
|
render() {
|
|
305
313
|
return (h("div", { class: "select-wrapper" }, this.renderInput(), this.renderSelectUl(), this.renderMessage()));
|
|
@@ -607,6 +615,29 @@ export class ZSelect {
|
|
|
607
615
|
},
|
|
608
616
|
"attribute": "reset-item",
|
|
609
617
|
"reflect": false
|
|
618
|
+
},
|
|
619
|
+
"size": {
|
|
620
|
+
"type": "string",
|
|
621
|
+
"mutable": false,
|
|
622
|
+
"complexType": {
|
|
623
|
+
"original": "ControlSize",
|
|
624
|
+
"resolved": "ButtonSize.BIG | ButtonSize.SMALL | ButtonSize.X_SMALL",
|
|
625
|
+
"references": {
|
|
626
|
+
"ControlSize": {
|
|
627
|
+
"location": "import",
|
|
628
|
+
"path": "../../../beans"
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"required": false,
|
|
633
|
+
"optional": true,
|
|
634
|
+
"docs": {
|
|
635
|
+
"tags": [],
|
|
636
|
+
"text": "Available sizes: `big`, `small` and `x-small`. Defaults to `big`."
|
|
637
|
+
},
|
|
638
|
+
"attribute": "size",
|
|
639
|
+
"reflect": false,
|
|
640
|
+
"defaultValue": "ControlSize.BIG"
|
|
610
641
|
}
|
|
611
642
|
};
|
|
612
643
|
}
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
font-weight: var(--font-rg);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
:host([size="small"]),
|
|
11
|
+
:host([size="x-small"]) {
|
|
12
|
+
font-size: var(--font-size-2);
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
.select-wrapper > z-input {
|
|
11
16
|
width: 100%;
|
|
12
17
|
}
|
|
@@ -76,6 +81,10 @@
|
|
|
76
81
|
|
|
77
82
|
.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-content {
|
|
78
83
|
display: block;
|
|
84
|
+
padding: calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 1.5);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([size="x-small"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-content {
|
|
79
88
|
padding: 0 calc(var(--space-unit) * 1.5);
|
|
80
89
|
}
|
|
81
90
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { h
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
2
|
import { KeyboardCode } from "../../../beans";
|
|
3
|
+
const FOCUSABLE_ELEMENTS_SELECTOR = ':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])';
|
|
3
4
|
/**
|
|
4
|
-
* @slot modalContent - set the content of the modal
|
|
5
5
|
* @slot modalCloseButton - accept custom close button
|
|
6
|
+
* @slot modalContent - set the content of the modal
|
|
6
7
|
*/
|
|
7
8
|
export class ZModal {
|
|
8
9
|
constructor() {
|
|
@@ -10,7 +11,6 @@ export class ZModal {
|
|
|
10
11
|
this.closeButtonLabel = "chiudi modale";
|
|
11
12
|
/** add role "alertdialog" to dialog (optional, default is false) */
|
|
12
13
|
this.alertdialog = false;
|
|
13
|
-
this.shift = false;
|
|
14
14
|
}
|
|
15
15
|
emitModalClose() {
|
|
16
16
|
this.modalClose.emit({ modalid: this.modalid });
|
|
@@ -21,53 +21,57 @@ export class ZModal {
|
|
|
21
21
|
emitBackgroundClick() {
|
|
22
22
|
this.modalBackgroundClick.emit({ modalid: this.modalid });
|
|
23
23
|
}
|
|
24
|
-
/** open modal */
|
|
25
|
-
async openModal() {
|
|
26
|
-
this.open();
|
|
27
|
-
}
|
|
28
|
-
/** close modal */
|
|
29
|
-
async closeModal() {
|
|
30
|
-
this.close();
|
|
31
|
-
}
|
|
32
24
|
componentDidLoad() {
|
|
33
25
|
this.open();
|
|
34
26
|
}
|
|
35
|
-
open
|
|
27
|
+
/** open modal */
|
|
28
|
+
async open() {
|
|
36
29
|
var _a;
|
|
37
30
|
(_a = this.dialog) === null || _a === void 0 ? void 0 : _a.showModal();
|
|
38
31
|
}
|
|
39
|
-
close
|
|
32
|
+
/** close modal */
|
|
33
|
+
async close() {
|
|
40
34
|
var _a;
|
|
41
35
|
(_a = this.dialog) === null || _a === void 0 ? void 0 : _a.close();
|
|
42
36
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Get a list of focusable elements in the dialog.
|
|
39
|
+
* Remove elements with `display: none` from the list, because they're not focusable.
|
|
40
|
+
*
|
|
41
|
+
* N.B. The list is built on the assumption that elements inside shadow root are placed ALL before the `modalContent` slot.
|
|
42
|
+
* Adding focusable elements after the `modalContent` slot would break the order of elements in the list.
|
|
43
|
+
*/
|
|
44
|
+
get focusableElements() {
|
|
45
|
+
return [
|
|
46
|
+
...Array.from(this.host.shadowRoot.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)),
|
|
47
|
+
...Array.from(this.host.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)),
|
|
48
|
+
].filter((element) => getComputedStyle(element).display !== "none");
|
|
51
49
|
}
|
|
52
|
-
|
|
53
|
-
if (e.code !== KeyboardCode.TAB
|
|
50
|
+
handleKeyDown(e) {
|
|
51
|
+
if (e.code !== KeyboardCode.TAB) {
|
|
54
52
|
return;
|
|
55
53
|
}
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
const focusableElements = this.focusableElements;
|
|
55
|
+
const shadowActiveElement = this.host.shadowRoot.activeElement;
|
|
56
|
+
const activeElement = this.host.ownerDocument.activeElement;
|
|
57
|
+
const firstFocusableElement = focusableElements[0];
|
|
58
|
+
const lastFocusableElement = focusableElements[focusableElements.length - 1];
|
|
59
|
+
if (e.shiftKey && (shadowActiveElement == firstFocusableElement || activeElement == firstFocusableElement)) {
|
|
60
|
+
// shift + tab was pressed and current active element is the first focusable element
|
|
61
|
+
e.preventDefault();
|
|
62
|
+
lastFocusableElement.focus();
|
|
63
|
+
}
|
|
64
|
+
else if (!e.shiftKey && (shadowActiveElement == lastFocusableElement || activeElement == lastFocusableElement)) {
|
|
65
|
+
// shift + tab was pressed and current active element is the first focusable element
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
firstFocusableElement.focus();
|
|
58
68
|
}
|
|
59
69
|
}
|
|
60
70
|
render() {
|
|
61
|
-
|
|
62
|
-
return (h(Host, null, h("dialog", { "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose(), onKeyDown: (e) => {
|
|
63
|
-
this.shift = !!e.shiftKey;
|
|
64
|
-
this.handleBackwardsNav(e);
|
|
65
|
-
}, onKeyUp: (e) => {
|
|
66
|
-
this.handleForwardNav(e);
|
|
67
|
-
} }, h("div", { class: "modal-container", id: this.modalid }, h("header", { onClick: this.emitModalHeaderActive.bind(this) }, h("div", null, this.modaltitle && h("h1", { id: "modal-title" }, this.modaltitle), this.modalsubtitle && h("h2", { id: "modal-subtitle" }, this.modalsubtitle)), h("slot", { name: "modalCloseButton" }, h("button", { "aria-label": this.closeButtonLabel, onClick: () => this.close(), ref: (el) => (this.closeButton = el) }, h("z-icon", { name: "multiply-circle-filled" })))), h("div", { class: "modal-content", id: "modal-content" }, h("slot", { name: "modalContent" }), h("span", { tabindex: 0, class: "modal-end", ref: (el) => (this.modalEnd = el) }))), h("div", { class: "modal-background", "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {
|
|
71
|
+
return (h("dialog", { "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose() }, h("div", { class: "modal-container", id: this.modalid }, h("header", { onClick: this.emitModalHeaderActive.bind(this) }, h("div", null, this.modaltitle && h("h1", { id: "modal-title" }, this.modaltitle), this.modalsubtitle && h("h2", { id: "modal-subtitle" }, this.modalsubtitle)), h("slot", { name: "modalCloseButton" }, h("button", { "aria-label": this.closeButtonLabel, onClick: () => this.close() }, h("z-icon", { name: "multiply-circle-filled" })))), h("div", { class: "modal-content", id: "modal-content" }, h("slot", { name: "modalContent" }))), h("div", { class: "modal-background", "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {
|
|
68
72
|
this.emitBackgroundClick();
|
|
69
73
|
this.close();
|
|
70
|
-
} })))
|
|
74
|
+
} })));
|
|
71
75
|
}
|
|
72
76
|
static get is() { return "z-modal"; }
|
|
73
77
|
static get encapsulation() { return "shadow"; }
|
|
@@ -143,7 +147,7 @@ export class ZModal {
|
|
|
143
147
|
"references": {}
|
|
144
148
|
},
|
|
145
149
|
"required": false,
|
|
146
|
-
"optional":
|
|
150
|
+
"optional": false,
|
|
147
151
|
"docs": {
|
|
148
152
|
"tags": [],
|
|
149
153
|
"text": "aria-label for close button (optional)"
|
|
@@ -222,7 +226,7 @@ export class ZModal {
|
|
|
222
226
|
}
|
|
223
227
|
static get methods() {
|
|
224
228
|
return {
|
|
225
|
-
"
|
|
229
|
+
"open": {
|
|
226
230
|
"complexType": {
|
|
227
231
|
"signature": "() => Promise<void>",
|
|
228
232
|
"parameters": [],
|
|
@@ -238,7 +242,7 @@ export class ZModal {
|
|
|
238
242
|
"tags": []
|
|
239
243
|
}
|
|
240
244
|
},
|
|
241
|
-
"
|
|
245
|
+
"close": {
|
|
242
246
|
"complexType": {
|
|
243
247
|
"signature": "() => Promise<void>",
|
|
244
248
|
"parameters": [],
|
|
@@ -256,4 +260,14 @@ export class ZModal {
|
|
|
256
260
|
}
|
|
257
261
|
};
|
|
258
262
|
}
|
|
263
|
+
static get elementRef() { return "host"; }
|
|
264
|
+
static get listeners() {
|
|
265
|
+
return [{
|
|
266
|
+
"name": "keydown",
|
|
267
|
+
"method": "handleKeyDown",
|
|
268
|
+
"target": undefined,
|
|
269
|
+
"capture": false,
|
|
270
|
+
"passive": false
|
|
271
|
+
}];
|
|
272
|
+
}
|
|
259
273
|
}
|
|
@@ -44,7 +44,7 @@ export class ZTable {
|
|
|
44
44
|
}
|
|
45
45
|
renderError(tableClass) {
|
|
46
46
|
const minHeight = this.lines ? `calc(40px * ${this.lines})` : "auto";
|
|
47
|
-
return (h(Host, null, h("div", { class: tableClass }, h("slot", { name: "table-header" })), h("z-table-error", null, h("div", { class: "error-content", style: { minHeight } }, h("slot", { name: "error-image" }), h("div", { class: "text" }, h("
|
|
47
|
+
return (h(Host, null, h("div", { class: tableClass }, h("slot", { name: "table-header" })), h("z-table-error", null, h("div", { class: "error-content", style: { minHeight } }, h("slot", { name: "error-image" }), h("div", { class: "text" }, h("span", { class: "body-3-sb error-message" }, this.errorMessage), h("slot", { name: "error-action" }))))));
|
|
48
48
|
}
|
|
49
49
|
renderEmpty(tableClass) {
|
|
50
50
|
const buttonSize = this.isMobile ? ButtonSize.SMALL : ButtonSize.BIG;
|
|
@@ -11,7 +11,7 @@ export class ZTableEmptyBox {
|
|
|
11
11
|
this.hasCta2Slot = !!this.hostElement.querySelector('[slot="cta2"]');
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, null, h("
|
|
14
|
+
return (h(Host, null, h("span", { class: "body-3-sb" }, this.message), h("br", null), !!this.subtitle && h("span", { class: "body-4" }, this.subtitle), (!!this.hasCta1Slot || !!this.hasCta2Slot) && (h("div", { class: {
|
|
15
15
|
"cta": true,
|
|
16
16
|
"has-2-cta": !!this.hasCta1Slot && !!this.hasCta2Slot,
|
|
17
17
|
} }, h("slot", { name: "cta1" }), h("slot", { name: "cta2" })))));
|
|
@@ -18,6 +18,25 @@
|
|
|
18
18
|
line-height: 14px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
:host(.small) li > span {
|
|
22
|
+
padding: calc(var(--space-unit) * 1.5) 0;
|
|
23
|
+
font-size: var(--font-size-2);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host(.x-small) li > span {
|
|
27
|
+
padding: var(--space-unit) 0;
|
|
28
|
+
font-size: var(--font-size-2);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host(.small) li > span > z-icon,
|
|
32
|
+
:host(.x-small) li > span > z-icon {
|
|
33
|
+
--z-icon-width: 16px;
|
|
34
|
+
--z-icon-height: 16px;
|
|
35
|
+
--z-icon-right-margin: calc(var(--space-unit) * 0.5);
|
|
36
|
+
|
|
37
|
+
padding: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
21
40
|
:host li > span.border {
|
|
22
41
|
border-bottom: 2px solid var(--bg-grey-200);
|
|
23
42
|
}
|
|
@@ -40,6 +40,13 @@ export function handleKeyboardSubmit(ev, callback, ...args) {
|
|
|
40
40
|
callback(...args);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
|
+
export function handleEnterKeydSubmit(ev, callback, ...args) {
|
|
45
|
+
if (ev.code === KeyboardCode.ENTER) {
|
|
46
|
+
ev.preventDefault();
|
|
47
|
+
callback(...args);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
43
50
|
export function getClickedElement(elem = null) {
|
|
44
51
|
if (!elem) {
|
|
45
52
|
elem = document.activeElement;
|
|
@@ -1892,10 +1892,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
switch(bundleId) {
|
|
1894
1894
|
|
|
1895
|
-
case 'z-app-
|
|
1895
|
+
case 'z-app-header_2':
|
|
1896
1896
|
return import(
|
|
1897
1897
|
/* webpackMode: "lazy" */
|
|
1898
|
-
'./z-app-
|
|
1898
|
+
'./z-app-header_2.entry.js').then(processMod, consoleError);
|
|
1899
1899
|
case 'z-anchor-navigation':
|
|
1900
1900
|
return import(
|
|
1901
1901
|
/* webpackMode: "lazy" */
|
|
@@ -1912,6 +1912,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1912
1912
|
return import(
|
|
1913
1913
|
/* webpackMode: "lazy" */
|
|
1914
1914
|
'./z-avatar.entry.js').then(processMod, consoleError);
|
|
1915
|
+
case 'z-body':
|
|
1916
|
+
return import(
|
|
1917
|
+
/* webpackMode: "lazy" */
|
|
1918
|
+
'./z-body.entry.js').then(processMod, consoleError);
|
|
1915
1919
|
case 'z-button-sort':
|
|
1916
1920
|
return import(
|
|
1917
1921
|
/* webpackMode: "lazy" */
|
|
@@ -1948,6 +1952,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1948
1952
|
return import(
|
|
1949
1953
|
/* webpackMode: "lazy" */
|
|
1950
1954
|
'./z-file-upload.entry.js').then(processMod, consoleError);
|
|
1955
|
+
case 'z-heading':
|
|
1956
|
+
return import(
|
|
1957
|
+
/* webpackMode: "lazy" */
|
|
1958
|
+
'./z-heading.entry.js').then(processMod, consoleError);
|
|
1951
1959
|
case 'z-info-box':
|
|
1952
1960
|
return import(
|
|
1953
1961
|
/* webpackMode: "lazy" */
|
|
@@ -2172,6 +2180,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2172
2180
|
return import(
|
|
2173
2181
|
/* webpackMode: "lazy" */
|
|
2174
2182
|
'./z-myz-list-item.entry.js').then(processMod, consoleError);
|
|
2183
|
+
case 'z-typography':
|
|
2184
|
+
return import(
|
|
2185
|
+
/* webpackMode: "lazy" */
|
|
2186
|
+
'./z-typography.entry.js').then(processMod, consoleError);
|
|
2175
2187
|
case 'z-link':
|
|
2176
2188
|
return import(
|
|
2177
2189
|
/* webpackMode: "lazy" */
|
|
@@ -2180,10 +2192,6 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2180
2192
|
return import(
|
|
2181
2193
|
/* webpackMode: "lazy" */
|
|
2182
2194
|
'./z-list_3.entry.js').then(processMod, consoleError);
|
|
2183
|
-
case 'z-body_2':
|
|
2184
|
-
return import(
|
|
2185
|
-
/* webpackMode: "lazy" */
|
|
2186
|
-
'./z-body_2.entry.js').then(processMod, consoleError);
|
|
2187
2195
|
case 'z-input_2':
|
|
2188
2196
|
return import(
|
|
2189
2197
|
/* webpackMode: "lazy" */
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as colorFromId } from './utils-
|
|
2
|
-
export { n as AlertType, A as AvatarSize, c as ButtonSize, b as ButtonType, B as ButtonVariant, C as CardVariant, Q as CarouselArrowsPosition, R as CarouselProgressMode, M as CoverHeroContentPosition, J as CoverHeroVariant, o as Device, f as DividerOrientation, D as DividerSize, i as ExpandableListButtonAlign, E as ExpandableListStyle, H as InfoRevealPosition, d as InputStatus, I as InputType, e as KeyboardCode, K as KeyboardKeyCode, j as LabelPosition, L as LicenseType, k as ListDividerType, g as ListSize, l as ListType, N as NavigationTabsOrientation, a as NavigationTabsSize, m as NotificationType, O as OffCanvasVariant, p as PocketStatus, P as PopoverPosition, h as Size, S as SortDirection, T as ThemeVariant, q as ToastNotification, s as ToastNotificationPosition, r as ToastNotificationTransition, u as TransitionDirection, t as ZAriaAlertMode, w as ZChipType, y as ZDatePickerMode, z as ZDatePickerModeValue, F as ZDatePickerPosition, v as ZFileUploadType, G as ZRangePickerMode, x as ZSectionTitleDividerPosition, Z as ZTableRowExpandedType } from './index-968a240f.js';
|
|
1
|
+
import { c as colorFromId } from './utils-f2a0dac2.js';
|
|
2
|
+
export { n as AlertType, A as AvatarSize, c as ButtonSize, b as ButtonType, B as ButtonVariant, C as CardVariant, Q as CarouselArrowsPosition, R as CarouselProgressMode, c as ControlSize, M as CoverHeroContentPosition, J as CoverHeroVariant, o as Device, f as DividerOrientation, D as DividerSize, i as ExpandableListButtonAlign, E as ExpandableListStyle, H as InfoRevealPosition, d as InputStatus, I as InputType, e as KeyboardCode, K as KeyboardKeyCode, j as LabelPosition, L as LicenseType, k as ListDividerType, g as ListSize, l as ListType, N as NavigationTabsOrientation, a as NavigationTabsSize, m as NotificationType, O as OffCanvasVariant, p as PocketStatus, P as PopoverPosition, h as Size, S as SortDirection, T as ThemeVariant, q as ToastNotification, s as ToastNotificationPosition, r as ToastNotificationTransition, u as TransitionDirection, t as ZAriaAlertMode, w as ZChipType, y as ZDatePickerMode, z as ZDatePickerModeValue, F as ZDatePickerPosition, v as ZFileUploadType, G as ZRangePickerMode, x as ZSectionTitleDividerPosition, Z as ZTableRowExpandedType } from './index-968a240f.js';
|
|
3
3
|
import './breakpoints-c386984e.js';
|
|
4
4
|
|
|
5
5
|
const UTILS = {
|