@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
|
@@ -46,7 +46,7 @@ const ZTable = class {
|
|
|
46
46
|
}
|
|
47
47
|
renderError(tableClass) {
|
|
48
48
|
const minHeight = this.lines ? `calc(40px * ${this.lines})` : "auto";
|
|
49
|
-
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("
|
|
49
|
+
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" }))))));
|
|
50
50
|
}
|
|
51
51
|
renderEmpty(tableClass) {
|
|
52
52
|
const buttonSize = this.isMobile ? ButtonSize.SMALL : ButtonSize.BIG;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a2ca4b97.js';
|
|
2
|
-
import { r as randomId } from './utils-
|
|
2
|
+
import { r as randomId } from './utils-f2a0dac2.js';
|
|
3
3
|
import { j as LabelPosition } from './index-968a240f.js';
|
|
4
4
|
import './breakpoints-c386984e.js';
|
|
5
5
|
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement, H as Host } from './index-a2ca4b97.js';
|
|
2
2
|
|
|
3
|
-
const ZBody = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
/** Font weight variant */
|
|
7
|
-
this.variant = "regular";
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h("z-typography", { tabIndex: 0, component: this.component || "span", level: `b${this.level}`, variant: this.variant }, h("slot", null)));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
3
|
const stylesCss = ":host>*{margin:0;font-family:var(--dashboard-font)}:host(.regular)>*{font-weight:var(--font-rg)}:host(.semibold)>*{font-weight:600}:host(.light)>*{font-weight:300}:host(.h1)>*{font-size:32px;line-height:40px}:host(.h2)>*{font-size:28px;line-height:36px}:host(.h3)>*{font-size:24px;line-height:32px}:host(.h4)>*{font-size:20px;line-height:28px}:host(.b1)>*{font-size:20px;line-height:28px}:host(.b2)>*{font-size:18px;line-height:28px}:host(.b3)>*{font-size:16px;line-height:24px}:host(.b4)>*{font-size:14px;line-height:20px}:host(.b5)>*{font-size:12px;line-height:16px}:host(:focus-visible){outline:none}";
|
|
15
4
|
|
|
16
5
|
const ZTypography = class {
|
|
@@ -34,4 +23,4 @@ const ZTypography = class {
|
|
|
34
23
|
};
|
|
35
24
|
ZTypography.style = stylesCss;
|
|
36
25
|
|
|
37
|
-
export {
|
|
26
|
+
export { ZTypography as z_typography };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
-
import { ComboItem } from "../../../beans";
|
|
2
|
+
import { ComboItem, ControlSize } from "../../../beans";
|
|
3
3
|
export declare class ZCombobox {
|
|
4
4
|
/** input unique id */
|
|
5
5
|
inputid: string;
|
|
@@ -35,6 +35,8 @@ export declare class ZCombobox {
|
|
|
35
35
|
maxcheckableitems: number;
|
|
36
36
|
/** group items by category */
|
|
37
37
|
hasgroupitems?: boolean;
|
|
38
|
+
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
39
|
+
size?: ControlSize;
|
|
38
40
|
searchValue: string;
|
|
39
41
|
selectedCounter: number;
|
|
40
42
|
renderItemsList: ComboItem[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
-
import { InputType, LabelPosition, InputStatus } from "../../../beans";
|
|
2
|
+
import { InputType, LabelPosition, InputStatus, ControlSize } from "../../../beans";
|
|
3
3
|
export declare class ZInput {
|
|
4
4
|
hostElement: HTMLZInputElement;
|
|
5
5
|
/** the id of the input element */
|
|
@@ -46,6 +46,8 @@ export declare class ZInput {
|
|
|
46
46
|
step?: number;
|
|
47
47
|
/** pattern value (optional): available for tel, text, search, url, email, password*/
|
|
48
48
|
pattern?: string;
|
|
49
|
+
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
50
|
+
size?: ControlSize;
|
|
49
51
|
isTyping: boolean;
|
|
50
52
|
passwordHidden: boolean;
|
|
51
53
|
private timer;
|
|
File without changes
|
|
@@ -6,7 +6,7 @@ import { SearchbarItem } from "../../../beans";
|
|
|
6
6
|
export declare class ZSearchbar {
|
|
7
7
|
/** the id of the searchbar element */
|
|
8
8
|
htmlid: string;
|
|
9
|
-
/**
|
|
9
|
+
/** Prevent submit action */
|
|
10
10
|
preventSubmit?: boolean;
|
|
11
11
|
/** Input search string */
|
|
12
12
|
value?: string;
|
|
@@ -26,10 +26,13 @@ export declare class ZSearchbar {
|
|
|
26
26
|
resultsItems?: SearchbarItem[] | string;
|
|
27
27
|
/** Sort autocomplete results items */
|
|
28
28
|
sortResultsItems?: boolean;
|
|
29
|
+
/** Show submit button */
|
|
30
|
+
showSearchButton?: boolean;
|
|
29
31
|
searchString: string;
|
|
30
32
|
currResultsCount: number;
|
|
31
33
|
showResults: boolean;
|
|
32
34
|
private resultsItemsList;
|
|
35
|
+
private inputRef;
|
|
33
36
|
/** Emitted on search submit, return search string */
|
|
34
37
|
searchSubmit: EventEmitter<string>;
|
|
35
38
|
private emitSearchSubmit;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
-
import { SelectItem, InputStatus } from "../../../beans";
|
|
2
|
+
import { SelectItem, InputStatus, ControlSize } from "../../../beans";
|
|
3
3
|
export declare class ZSelect {
|
|
4
4
|
element: HTMLZSelectElement;
|
|
5
5
|
/** the id of the input element */
|
|
@@ -34,6 +34,8 @@ export declare class ZSelect {
|
|
|
34
34
|
isfixed?: boolean;
|
|
35
35
|
/** */
|
|
36
36
|
resetItem?: string;
|
|
37
|
+
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
38
|
+
size?: ControlSize;
|
|
37
39
|
isOpen: boolean;
|
|
38
40
|
selectedItem: null | SelectItem;
|
|
39
41
|
searchString: null | string;
|
|
@@ -71,6 +73,7 @@ export declare class ZSelect {
|
|
|
71
73
|
private renderSelectUl;
|
|
72
74
|
private renderResetItem;
|
|
73
75
|
private renderItem;
|
|
76
|
+
private listSizeType;
|
|
74
77
|
private renderSelectUlItems;
|
|
75
78
|
private renderSelectGroupItems;
|
|
76
79
|
private renderNoSearchResults;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* @slot modalContent - set the content of the modal
|
|
4
3
|
* @slot modalCloseButton - accept custom close button
|
|
4
|
+
* @slot modalContent - set the content of the modal
|
|
5
5
|
*/
|
|
6
6
|
export declare class ZModal {
|
|
7
7
|
/** unique id */
|
|
@@ -11,13 +11,11 @@ export declare class ZModal {
|
|
|
11
11
|
/** subtitle (optional) */
|
|
12
12
|
modalsubtitle?: string;
|
|
13
13
|
/** aria-label for close button (optional) */
|
|
14
|
-
closeButtonLabel
|
|
14
|
+
closeButtonLabel: string;
|
|
15
15
|
/** add role "alertdialog" to dialog (optional, default is false) */
|
|
16
16
|
alertdialog?: boolean;
|
|
17
17
|
private dialog;
|
|
18
|
-
|
|
19
|
-
private closeButton;
|
|
20
|
-
private shift;
|
|
18
|
+
host: HTMLZModalElement;
|
|
21
19
|
/** emitted on close button click, returns modalid */
|
|
22
20
|
modalClose: EventEmitter;
|
|
23
21
|
private emitModalClose;
|
|
@@ -27,14 +25,19 @@ export declare class ZModal {
|
|
|
27
25
|
/** emitted on background click, returns modalid */
|
|
28
26
|
modalBackgroundClick: EventEmitter;
|
|
29
27
|
private emitBackgroundClick;
|
|
28
|
+
componentDidLoad(): void;
|
|
30
29
|
/** open modal */
|
|
31
|
-
|
|
30
|
+
open(): Promise<void>;
|
|
32
31
|
/** close modal */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
close(): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Get a list of focusable elements in the dialog.
|
|
35
|
+
* Remove elements with `display: none` from the list, because they're not focusable.
|
|
36
|
+
*
|
|
37
|
+
* N.B. The list is built on the assumption that elements inside shadow root are placed ALL before the `modalContent` slot.
|
|
38
|
+
* Adding focusable elements after the `modalContent` slot would break the order of elements in the list.
|
|
39
|
+
*/
|
|
40
|
+
private get focusableElements();
|
|
41
|
+
handleKeyDown(e: KeyboardEvent): void;
|
|
39
42
|
render(): HTMLZModalElement;
|
|
40
43
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { AlertType, LicenseType } from "./beans/index";
|
|
9
|
-
import { AvatarSize, ButtonSize, ButtonType, ButtonVariant, CardVariant, CarouselArrowsPosition, CarouselProgressMode, ComboItem, CoverHeroContentPosition, CoverHeroVariant, DictionaryData, DividerOrientation, DividerSize, ExpandableListButtonAlign, ExpandableListStyle, InfoRevealPosition, InputStatus, InputType, LabelPosition, ListDividerType, ListSize, ListType, NavigationTabsOrientation, NavigationTabsSize, NotificationType, OffCanvasVariant, PocketStatus, PopoverPosition, SearchbarItem, SelectItem, Size, SkipToContentLink, SortDirection, ThemeVariant, ToastNotification, ToastNotificationPosition, ToastNotificationTransition, TransitionDirection, ZAriaAlertMode, ZChipType, ZDatePickerMode, ZFileUploadType, ZRangePickerMode, ZSectionTitleDividerPosition, ZTableRowExpandedType } from "./beans";
|
|
9
|
+
import { AvatarSize, ButtonSize, ButtonType, ButtonVariant, CardVariant, CarouselArrowsPosition, CarouselProgressMode, ComboItem, ControlSize, CoverHeroContentPosition, CoverHeroVariant, DictionaryData, DividerOrientation, DividerSize, ExpandableListButtonAlign, ExpandableListStyle, InfoRevealPosition, InputStatus, InputType, LabelPosition, ListDividerType, ListSize, ListType, NavigationTabsOrientation, NavigationTabsSize, NotificationType, OffCanvasVariant, PocketStatus, PopoverPosition, SearchbarItem, SelectItem, Size, SkipToContentLink, SortDirection, ThemeVariant, ToastNotification, ToastNotificationPosition, ToastNotificationTransition, TransitionDirection, ZAriaAlertMode, ZChipType, ZDatePickerMode, ZFileUploadType, ZRangePickerMode, ZSectionTitleDividerPosition, ZTableRowExpandedType } from "./beans";
|
|
10
10
|
import { ListItem } from "./beans/index.js";
|
|
11
|
-
import { ZTypographyLevels } from "./
|
|
11
|
+
import { ZTypographyLevels } from "./deprecated/typography/z-typography/index";
|
|
12
12
|
export namespace Components {
|
|
13
13
|
interface ZAlert {
|
|
14
14
|
/**
|
|
@@ -295,6 +295,10 @@ export namespace Components {
|
|
|
295
295
|
* search input title text (optional)
|
|
296
296
|
*/
|
|
297
297
|
"searchtitle"?: string;
|
|
298
|
+
/**
|
|
299
|
+
* Available sizes: `big`, `small` and `x-small`. Defaults to `big`.
|
|
300
|
+
*/
|
|
301
|
+
"size"?: ControlSize;
|
|
298
302
|
/**
|
|
299
303
|
* uncheck all label (optional)
|
|
300
304
|
*/
|
|
@@ -537,6 +541,10 @@ export namespace Components {
|
|
|
537
541
|
* the input is required (optional): available for text, password, number, email, textarea, checkbox
|
|
538
542
|
*/
|
|
539
543
|
"required"?: boolean;
|
|
544
|
+
/**
|
|
545
|
+
* Available sizes: `big`, `small` and `x-small`. Defaults to `big`.
|
|
546
|
+
*/
|
|
547
|
+
"size"?: ControlSize;
|
|
540
548
|
/**
|
|
541
549
|
* the input status (optional): available for text, password, number, email, textarea
|
|
542
550
|
*/
|
|
@@ -772,13 +780,13 @@ export namespace Components {
|
|
|
772
780
|
*/
|
|
773
781
|
"alertdialog"?: boolean;
|
|
774
782
|
/**
|
|
775
|
-
*
|
|
783
|
+
* close modal
|
|
776
784
|
*/
|
|
777
|
-
"
|
|
785
|
+
"close": () => Promise<void>;
|
|
778
786
|
/**
|
|
779
|
-
* close
|
|
787
|
+
* aria-label for close button (optional)
|
|
780
788
|
*/
|
|
781
|
-
"
|
|
789
|
+
"closeButtonLabel": string;
|
|
782
790
|
/**
|
|
783
791
|
* unique id
|
|
784
792
|
*/
|
|
@@ -794,7 +802,7 @@ export namespace Components {
|
|
|
794
802
|
/**
|
|
795
803
|
* open modal
|
|
796
804
|
*/
|
|
797
|
-
"
|
|
805
|
+
"open": () => Promise<void>;
|
|
798
806
|
}
|
|
799
807
|
interface ZMyzCard {
|
|
800
808
|
/**
|
|
@@ -1309,7 +1317,7 @@ export namespace Components {
|
|
|
1309
1317
|
*/
|
|
1310
1318
|
"placeholder"?: string;
|
|
1311
1319
|
/**
|
|
1312
|
-
*
|
|
1320
|
+
* Prevent submit action
|
|
1313
1321
|
*/
|
|
1314
1322
|
"preventSubmit"?: boolean;
|
|
1315
1323
|
/**
|
|
@@ -1328,6 +1336,10 @@ export namespace Components {
|
|
|
1328
1336
|
* Search helper text
|
|
1329
1337
|
*/
|
|
1330
1338
|
"searchHelperLabel"?: string;
|
|
1339
|
+
/**
|
|
1340
|
+
* Show submit button
|
|
1341
|
+
*/
|
|
1342
|
+
"showSearchButton"?: boolean;
|
|
1331
1343
|
/**
|
|
1332
1344
|
* Sort autocomplete results items
|
|
1333
1345
|
*/
|
|
@@ -1414,6 +1426,10 @@ export namespace Components {
|
|
|
1414
1426
|
* set the input value
|
|
1415
1427
|
*/
|
|
1416
1428
|
"setValue": (value: string | string[]) => Promise<void>;
|
|
1429
|
+
/**
|
|
1430
|
+
* Available sizes: `big`, `small` and `x-small`. Defaults to `big`.
|
|
1431
|
+
*/
|
|
1432
|
+
"size"?: ControlSize;
|
|
1417
1433
|
/**
|
|
1418
1434
|
* the input status (optional)
|
|
1419
1435
|
*/
|
|
@@ -2815,6 +2831,10 @@ declare namespace LocalJSX {
|
|
|
2815
2831
|
* search input title text (optional)
|
|
2816
2832
|
*/
|
|
2817
2833
|
"searchtitle"?: string;
|
|
2834
|
+
/**
|
|
2835
|
+
* Available sizes: `big`, `small` and `x-small`. Defaults to `big`.
|
|
2836
|
+
*/
|
|
2837
|
+
"size"?: ControlSize;
|
|
2818
2838
|
/**
|
|
2819
2839
|
* uncheck all label (optional)
|
|
2820
2840
|
*/
|
|
@@ -3089,6 +3109,10 @@ declare namespace LocalJSX {
|
|
|
3089
3109
|
* the input is required (optional): available for text, password, number, email, textarea, checkbox
|
|
3090
3110
|
*/
|
|
3091
3111
|
"required"?: boolean;
|
|
3112
|
+
/**
|
|
3113
|
+
* Available sizes: `big`, `small` and `x-small`. Defaults to `big`.
|
|
3114
|
+
*/
|
|
3115
|
+
"size"?: ControlSize;
|
|
3092
3116
|
/**
|
|
3093
3117
|
* the input status (optional): available for text, password, number, email, textarea
|
|
3094
3118
|
*/
|
|
@@ -3969,7 +3993,7 @@ declare namespace LocalJSX {
|
|
|
3969
3993
|
*/
|
|
3970
3994
|
"placeholder"?: string;
|
|
3971
3995
|
/**
|
|
3972
|
-
*
|
|
3996
|
+
* Prevent submit action
|
|
3973
3997
|
*/
|
|
3974
3998
|
"preventSubmit"?: boolean;
|
|
3975
3999
|
/**
|
|
@@ -3988,6 +4012,10 @@ declare namespace LocalJSX {
|
|
|
3988
4012
|
* Search helper text
|
|
3989
4013
|
*/
|
|
3990
4014
|
"searchHelperLabel"?: string;
|
|
4015
|
+
/**
|
|
4016
|
+
* Show submit button
|
|
4017
|
+
*/
|
|
4018
|
+
"showSearchButton"?: boolean;
|
|
3991
4019
|
/**
|
|
3992
4020
|
* Sort autocomplete results items
|
|
3993
4021
|
*/
|
|
@@ -4070,6 +4098,10 @@ declare namespace LocalJSX {
|
|
|
4070
4098
|
*/
|
|
4071
4099
|
"readonly"?: boolean;
|
|
4072
4100
|
"resetItem"?: string;
|
|
4101
|
+
/**
|
|
4102
|
+
* Available sizes: `big`, `small` and `x-small`. Defaults to `big`.
|
|
4103
|
+
*/
|
|
4104
|
+
"size"?: ControlSize;
|
|
4073
4105
|
/**
|
|
4074
4106
|
* the input status (optional)
|
|
4075
4107
|
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/types/index.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -9,6 +9,7 @@ export declare function boolean(value: string | number | boolean): boolean | str
|
|
|
9
9
|
export declare function retrieveAsset(assetName: string): string;
|
|
10
10
|
export declare function randomId(): string;
|
|
11
11
|
export declare function handleKeyboardSubmit(ev: KeyboardEvent, callback: (...args: any[]) => void, ...args: any[]): void;
|
|
12
|
+
export declare function handleEnterKeydSubmit(ev: KeyboardEvent, callback: (...args: any[]) => void, ...args: any[]): void;
|
|
12
13
|
export declare function getClickedElement(elem?: null | Element): null | Element;
|
|
13
14
|
export declare function getElementTree(elem: Element, tree?: Element[]): null | Element[];
|
|
14
15
|
export declare function getSiblings(elem: HTMLElement): ChildNode[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V}from"./p-
|
|
1
|
+
import{c as V}from"./p-056a5f26.js";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"./p-a23e9115.js";import"./p-d69e14fb.js";const U={colorFromId:V};export{U as Utils}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as a,o as t}from"./p-a23e9115.js";import{t as e,m as n}from"./p-d69e14fb.js";function s(a){switch(a){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return a}}function r(){return Math.random().toString(36).replace("0.","")}function c(t,e,...n){t.code!==a.ENTER&&t.code!==a.SPACE||(t.preventDefault(),e(...n))}function u(t,e,...n){t.code===a.ENTER&&(t.preventDefault(),e(...n))}function o(a=null){return a||(a=document.activeElement),a&&a.shadowRoot&&a.shadowRoot.activeElement?o(a=a.shadowRoot.activeElement):a}function f(a,t=[]){return t.push(a),a.parentElement?f(a=a.parentElement,t):a.parentNode&&a.parentNode.host?f(a=a.parentNode.host,t):t}function i(){switch(!0){case window.innerWidth<=n:return t.MOBILE;case window.innerWidth<=e:return t.TABLET;default:return t.DESKTOP}}function d(a){try{return JSON.parse(a)}catch(a){return!1}}function h(a){const t=Math.ceil(2**31-1)*parseFloat(`0.${a}`);let e=Math.ceil(t%1*19);return 0===e&&(e=1),`avatar-C${e.toString().padStart(2,"0")}`}export{u as a,s as b,h as c,f as d,o as e,d as f,i as g,c as h,r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s,g as i}from"./p-d17ebc2f.js";import{c as l,e as r,k as c,g as a}from"./p-a23e9115.js";import{r as n,b as o,d as h,h as p,e as d}from"./p-056a5f26.js";import"./p-d69e14fb.js";const u=class{constructor(s){e(this,s),this.optionSelect=t(this,"optionSelect",7),this.resetSelect=t(this,"resetSelect",7),this.htmlid=`id-${n()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.message=!0,this.autocomplete=!1,this.noresultslabel="Nessun risultato",this.isfixed=!1,this.size=l.BIG,this.isOpen=!1,this.selectedItem=null,this.itemsList=[],this.toggleSelectUl=this.toggleSelectUl.bind(this),this.selectItem=this.selectItem.bind(this),this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray(),this.selectedItem=this.itemsList.find((e=>e.selected))}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];"string"==typeof e?t.push(e):t=e,this.selectedItem=this.itemsList.find((e=>t.includes(e.id)))}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}emitResetSelect(){this.resetSelect.emit({id:this.htmlid})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return"string"==typeof this.items?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){return this.getInitialItemsArray().map((e=>{var t;return e.selected=e.id===(null===(t=this.selectedItem)||void 0===t?void 0:t.id),e}))}getSelectedValue(){var e;return null===(e=this.selectedItem)||void 0===e?void 0:e.id}filterItems(e){const t=this.mapSelectedItemToItemsArray();this.itemsList=(null==e?void 0:e.length)?t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{const s=t.name.toUpperCase().indexOf(e.toUpperCase()),i=s+e.length,l=t.name.substring(0,s)+`<strong>${t.name.substring(s,i)}</strong>`+t.name.substring(i,t.name.length);return t.name=l,t})):t}hasAutocomplete(){return!0===o(this.autocomplete)}handleInputChange(e){this.searchString=e.detail.value,this.isOpen||this.toggleSelectUl()}selectItem(e,t){e&&e.disabled||(this.itemsList=this.mapSelectedItemToItemsArray(),this.itemsList=this.itemsList.map((s=>(s.selected=!1,s.id===(null==e?void 0:e.id)&&(s.selected=t),s))),this.selectedItem=this.itemsList.find((e=>e.selected)),this.emitOptionSelect(),this.searchString&&(this.searchString=null))}arrowsSelectNav(e,t){const s=this.resetItem&&!!this.selectedItem;if(![r.ARROW_DOWN,r.ARROW_UP].includes(e.key))return;let i;e.preventDefault(),e.stopPropagation(),this.isOpen||this.toggleSelectUl(),this.resetItem&&(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length+1?+!s:t+1:e.key===r.ARROW_UP&&(i=t<=+!s?this.itemsList.length:t-1)),this.resetItem||(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length?0:t+1:e.key===r.ARROW_UP&&(i=t<=0?this.itemsList.length-1:t-1)),this.focusSelectItem(i)}focusSelectItem(e){const t=this.element.querySelector(`#${this.htmlid}_${e}`);t&&t.focus()}toggleSelectUl(e=!1){this.disabled||this.readonly||(this.isOpen?(document.removeEventListener("click",this.handleSelectFocus),document.removeEventListener("keyup",this.handleSelectFocus),e&&this.element.querySelector(`#${this.htmlid}_input`).focus()):(document.addEventListener("click",this.handleSelectFocus),document.addEventListener("keyup",this.handleSelectFocus)),this.isOpen=!this.isOpen)}handleInputClick(e){e.composedPath().find((e=>e.classList&&e.classList.contains("reset-icon")))?e.stopPropagation():this.toggleSelectUl()}handleSelectFocus(e){if(e instanceof KeyboardEvent&&e.key===r.ESC)return e.stopPropagation(),this.toggleSelectUl(!0);e instanceof KeyboardEvent&&e.key!==r.TAB&&e.key!==r.ENTER||h(d()).find((e=>"z-input"===e.nodeName.toLowerCase()&&e.id===`${this.htmlid}_input`))||this.toggleSelectUl(e instanceof MouseEvent)}scrollToLetter(e){const t=this.itemsList.find((t=>t.name.charAt(0)===e));t&&this.focusSelectItem(this.itemsList.indexOf(t))}renderInput(){return s("z-input",{class:{"active-select":this.isOpen,"cursor-select":!this.autocomplete},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:!1,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?void 0:this.status,autocomplete:"off",size:this.size,onClick:e=>{this.handleInputClick(e)},onKeyUp:e=>{13!==e.keyCode&&e.preventDefault(),p(e,this.toggleSelectUl)},onKeyDown:e=>this.arrowsSelectNav(e,this.selectedItem?this.itemsList.indexOf(this.selectedItem):this.resetItem?0:-1),onInputChange:e=>{this.handleInputChange(e)},onKeyPress:e=>{this.hasAutocomplete()||(e.preventDefault(),this.scrollToLetter(String.fromCharCode(e.keyCode)))}})}renderSelectUl(){var e;return s("div",{class:this.isOpen?"open":"closed",tabindex:"-1"},s("div",{class:{"ul-scroll-wrapper":!0,fixed:this.isfixed},tabindex:"-1"},s("z-list",{role:"listbox",tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:this.htmlid,"aria-activedescendant":null===(e=this.selectedItem)||void 0===e?void 0:e.id,"aria-multiselectable":!1,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,filled:!!this.selectedItem,[`input-${this.status}`]:!this.isOpen&&!!this.status}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){return s("z-list-element",{class:{hide:!this.selectedItem||!this.resetItem,"reset-item":!0,"reset-item-margin":!this.hasGroupItems},clickable:!0,disabled:!1,dividerType:c.ELEMENT,role:"option",tabindex:"0","aria-selected":"false",id:`${this.htmlid}_${this.resetItem?"0":"none"}`,size:this.listSizeType(),onClickItem:()=>{this.selectedItem=null,this.searchString=null,this.emitResetSelect()},onKeyDown:e=>this.arrowsSelectNav(e,0)},s("div",{class:"reset-item-content"},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t,i){return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:i?c.HEADER:c.ELEMENT,role:"option",tabindex:e.disabled||!this.isOpen?-1:0,"aria-selected":!!e.selected,id:`${this.htmlid}_${t}`,size:this.listSizeType(),onClickItem:()=>this.selectItem(e,!0),onKeyDown:e=>this.arrowsSelectNav(e,t)},s("span",{class:{selected:!!e.selected,"list-element-content":!0},innerHTML:e.name}))}listSizeType(){return this.size===l.SMALL||this.size===l.X_SMALL?a.SMALL:a.MEDIUM}renderSelectUlItems(){return this.itemsList.length?this.hasGroupItems?this.renderSelectGroupItems():this.itemsList.map(((e,t,s)=>this.renderItem(e,this.resetItem?t+1:t,s.length===t+1))):this.renderNoSearchResults()}renderSelectGroupItems(){const e=this.itemsList.reduce(((e,t,s,i)=>{var l;const{category:r}=t,c=this.renderItem(t,this.resetItem?s+1:s,i.length===s+1);return e[r]=null!==(l=e[r])&&void 0!==l?l:[],e[r].push(c),e}),{});return Object.entries(e).map((([e,t])=>s("z-list-group",{"divider-type":c.ELEMENT},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},e),t.map((e=>e)))))}renderNoSearchResults(){return s("z-list-element",{color:"blue500",class:"no-results",size:this.listSizeType()},s("z-icon",{name:"multiply-circle",fill:"blue500"}),this.noresultslabel)}renderMessage(){if(!1!==o(this.message))return s("z-input-message",{message:!0===o(this.message)?void 0:this.message,status:this.status,class:this.size})}render(){return s("div",{class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get element(){return i(this)}static get watchers(){return{items:["watchItems"]}}};u.style='.sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size="small"].sc-z-select-h,[size="x-small"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{display:block;padding:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 1.5)}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{padding:0 calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--gray800)}.reset-item.sc-z-select{color:var(--color-primary01);fill:var(--color-primary01)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:calc(var(--space-unit))}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}';export{u as z_select}
|