@zanichelli/albe-web-components 6.9.0 → 6.9.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 +28 -0
- package/dist/cjs/index-e3299e0a.js +32 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-header_2.cjs.entry.js +153 -0
- package/dist/cjs/z-body.cjs.entry.js +18 -0
- package/dist/cjs/z-combobox.cjs.entry.js +3 -3
- package/dist/cjs/z-divider.cjs.entry.js +26 -0
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +118 -0
- package/dist/cjs/z-file-upload.cjs.entry.js +11 -11
- package/dist/cjs/z-heading.cjs.entry.js +18 -0
- package/dist/cjs/z-input_2.cjs.entry.js +266 -0
- package/dist/cjs/z-list_3.cjs.entry.js +261 -0
- package/dist/cjs/z-select.cjs.entry.js +325 -0
- package/dist/cjs/z-table-empty-box.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +1 -1
- package/dist/cjs/z-typography.cjs.entry.js +30 -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 +2 -2
- package/dist/collection/components/inputs/z-combobox/styles.css +17 -7
- package/dist/collection/components/inputs/z-input/styles.css +19 -6
- package/dist/collection/components/inputs/z-select/index.js +29 -3
- package/dist/collection/components/inputs/z-select/styles.css +4 -0
- package/dist/collection/components/modal/z-modal/index.js +123 -6
- package/dist/collection/components/modal/z-modal/styles.css +9 -11
- 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/{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
- package/dist/esm/index-a2ca4b97.js +32 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/polyfills/css-shim.js +0 -0
- package/dist/esm/{utils-5445d989.js → utils-6cf7efe2.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_2.entry.js +148 -0
- 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 +4 -4
- package/dist/esm/z-divider.entry.js +22 -0
- package/dist/esm/z-dragdrop-area_2.entry.js +113 -0
- 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 +261 -0
- package/dist/esm/z-list_3.entry.js +255 -0
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +1 -1
- package/dist/esm/z-searchbar.entry.js +1 -1
- package/dist/esm/z-select.entry.js +321 -0
- 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-typography.entry.js +26 -0
- package/dist/types/beans/index.d.ts +0 -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 +0 -0
- package/dist/types/components/inputs/z-input/index.d.ts +0 -0
- package/dist/types/components/inputs/z-input-message/index.d.ts +0 -0
- package/dist/types/components/inputs/z-searchbar/index.d.ts +0 -0
- package/dist/types/components/inputs/z-select/index.d.ts +2 -0
- 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 +20 -2
- 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 +26 -2
- 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 +0 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-48d3f650.entry.js → p-26033729.entry.js} +1 -1
- package/dist/web-components-library/p-33352f9e.entry.js +1 -0
- 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-52b084fb.entry.js +1 -0
- package/dist/web-components-library/{p-229e17af.entry.js → p-53065788.entry.js} +1 -1
- package/dist/web-components-library/{p-51333b32.entry.js → p-54b18f6e.entry.js} +1 -1
- package/dist/web-components-library/p-56cbd174.entry.js +1 -0
- package/dist/web-components-library/p-5ac6109d.entry.js +1 -0
- package/dist/web-components-library/{p-28b288a8.entry.js → p-5c62387a.entry.js} +1 -1
- package/dist/web-components-library/p-6acb48e3.entry.js +1 -0
- package/dist/web-components-library/{p-102d82ee.entry.js → p-6c163539.entry.js} +1 -1
- package/dist/web-components-library/p-6ea7428a.entry.js +1 -0
- package/dist/web-components-library/{p-00481c22.js → p-8ebe4adf.js} +1 -1
- package/dist/web-components-library/{p-db77ef4e.entry.js → p-93142fac.entry.js} +1 -1
- package/dist/web-components-library/p-9c338aeb.entry.js +1 -0
- package/dist/web-components-library/{p-669f14ae.entry.js → p-a05ce0a6.entry.js} +1 -1
- package/dist/web-components-library/{p-933efc27.entry.js → p-a6c0f149.entry.js} +1 -1
- package/dist/web-components-library/{p-169b9762.entry.js → p-d2127d84.entry.js} +1 -1
- package/dist/web-components-library/p-d6497e67.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-48d3f650.entry.js → p-26033729.entry.js} +1 -1
- package/www/build/p-33352f9e.entry.js +1 -0
- package/www/build/p-3860061a.entry.js +1 -0
- package/www/build/p-4367f978.entry.js +1 -0
- package/www/build/p-52b084fb.entry.js +1 -0
- package/www/build/{p-229e17af.entry.js → p-53065788.entry.js} +1 -1
- package/www/build/{p-51333b32.entry.js → p-54b18f6e.entry.js} +1 -1
- package/www/build/p-56cbd174.entry.js +1 -0
- package/www/build/p-5ac6109d.entry.js +1 -0
- package/www/build/{p-28b288a8.entry.js → p-5c62387a.entry.js} +1 -1
- package/www/build/p-6acb48e3.entry.js +1 -0
- package/www/build/{p-102d82ee.entry.js → p-6c163539.entry.js} +1 -1
- package/www/build/p-6ea7428a.entry.js +1 -0
- package/www/build/{p-00481c22.js → p-8ebe4adf.js} +1 -1
- package/www/build/{p-db77ef4e.entry.js → p-93142fac.entry.js} +1 -1
- package/www/build/p-9c338aeb.entry.js +1 -0
- package/www/build/{p-669f14ae.entry.js → p-a05ce0a6.entry.js} +1 -1
- package/www/build/p-a240c0f4.js +1 -0
- package/www/build/{p-933efc27.entry.js → p-a6c0f149.entry.js} +1 -1
- package/www/build/{p-169b9762.entry.js → p-d2127d84.entry.js} +1 -1
- package/www/build/p-d6497e67.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 -1
- package/dist/cjs/z-app-header_11.cjs.entry.js +0 -1030
- package/dist/cjs/z-dragdrop-area_3.cjs.entry.js +0 -76
- package/dist/esm/z-app-header_11.entry.js +0 -1016
- package/dist/esm/z-dragdrop-area_3.entry.js +0 -70
- package/dist/web-components-library/p-4bdf6a9b.entry.js +0 -1
- package/dist/web-components-library/p-5bbbda4e.entry.js +0 -1
- package/dist/web-components-library/p-735bdfa3.entry.js +0 -1
- package/dist/web-components-library/p-95b8f109.entry.js +0 -1
- package/dist/web-components-library/p-d0accfc5.entry.js +0 -1
- package/dist/web-components-library/p-de55c171.entry.js +0 -1
- package/www/build/p-4bdf6a9b.entry.js +0 -1
- package/www/build/p-5bbbda4e.entry.js +0 -1
- package/www/build/p-735bdfa3.entry.js +0 -1
- package/www/build/p-95b8f109.entry.js +0 -1
- package/www/build/p-d0accfc5.entry.js +0 -1
- package/www/build/p-de55c171.entry.js +0 -1
- package/www/build/p-e9b88186.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a2ca4b97.js';
|
|
2
2
|
import { k as ListDividerType, B as ButtonVariant } from './index-968a240f.js';
|
|
3
|
-
import { r as randomId, h as handleKeyboardSubmit } from './utils-
|
|
3
|
+
import { r as randomId, h as handleKeyboardSubmit } from './utils-6cf7efe2.js';
|
|
4
4
|
import './breakpoints-c386984e.js';
|
|
5
5
|
|
|
6
6
|
const stylesCss = ":host{position:relative;z-index:5;display:block;width:inherit;height:44px;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:absolute;z-index:10;display:grid;width:100%;gap:0 calc(var(--space-unit) * 2);grid-template-columns:auto;grid-template-rows:auto}:host>div.has-submit{grid-template-columns:auto min-content}:host>div.has-results{grid-template-rows:auto auto}:host>div>z-input{width:100%;grid-column:1;grid-row:1}:host>div>z-button{grid-column:2;grid-row:1}:host>div>div.results-wrapper{overflow:auto;padding:calc(var(--space-unit) / 4);padding-bottom:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;margin-top:-1px;background:var(--color-surface01);grid-column:1;grid-row:2}:host>div>div.results-wrapper>div.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:var(--space-unit) calc(var(--space-unit) * 1.5);padding-bottom:calc(var(--space-unit) / 2);scrollbar-color:var(--color-primary01) transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-track{background-color:transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .category-heading>*{display:block}:host>div>div.results-wrapper>div.results span.category-heading>span.category{color:var(--color-text05);font-style:italic}:host>div>div.results-wrapper>div.results span.category-heading>span.subcategory{margin-top:8px;color:var(--color-text01);text-transform:uppercase}:host>div>div.results-wrapper>div.results z-list-element{display:block}:host>div>div.results-wrapper>div.results z-list-element:focus{box-shadow:var(--shadow-focus-primary)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;color:var(--color-text01);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>div>div.results-wrapper>div.results .item>span.item-label>mark,:host>div>div.results-wrapper>div.results .item>span.item-label>*>mark{background:var(--color-primary03)}:host>div>div.results-wrapper>div.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:2px 0;margin-right:calc(var(--space-unit) * 1.5)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-right:var(--space-unit)}:host>div>div.results-wrapper>div.results .item-show-all{display:block;text-align:center}:host>div>div.results-wrapper>div.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}:host>div>div.results-wrapper>div.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){:host>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-top:calc(var(--space-unit) / 4)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{height:24px}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:6px 0}}@media (min-width: 1152px){:host>div>div.results-wrapper>div.results .item{cursor:pointer}:host>div>div.results-wrapper>div.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}";
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a2ca4b97.js';
|
|
2
|
+
import { e as KeyboardCode, k as ListDividerType } from './index-968a240f.js';
|
|
3
|
+
import { r as randomId, b as boolean, a as getElementTree, h as handleKeyboardSubmit, d as getClickedElement } from './utils-6cf7efe2.js';
|
|
4
|
+
import './breakpoints-c386984e.js';
|
|
5
|
+
|
|
6
|
+
const stylesCss = ".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)}.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: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}";
|
|
7
|
+
|
|
8
|
+
const ZSelect = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.optionSelect = createEvent(this, "optionSelect", 7);
|
|
12
|
+
this.resetSelect = createEvent(this, "resetSelect", 7);
|
|
13
|
+
/** the id of the input element */
|
|
14
|
+
this.htmlid = `id-${randomId()}`;
|
|
15
|
+
/** the input aria-label */
|
|
16
|
+
this.ariaLabel = "";
|
|
17
|
+
/** the input is disabled */
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
/** the input is readonly */
|
|
20
|
+
this.readonly = false;
|
|
21
|
+
/** input helper message (optional) - if set to `false` message won't be displayed */
|
|
22
|
+
this.message = true;
|
|
23
|
+
/** the input has autocomplete option */
|
|
24
|
+
this.autocomplete = false;
|
|
25
|
+
/** no result text message */
|
|
26
|
+
this.noresultslabel = "Nessun risultato";
|
|
27
|
+
/** When fixed, it occupies space and pushes down next elements. */
|
|
28
|
+
this.isfixed = false;
|
|
29
|
+
this.isOpen = false;
|
|
30
|
+
this.selectedItem = null;
|
|
31
|
+
this.itemsList = [];
|
|
32
|
+
this.toggleSelectUl = this.toggleSelectUl.bind(this);
|
|
33
|
+
this.selectItem = this.selectItem.bind(this);
|
|
34
|
+
this.handleSelectFocus = this.handleSelectFocus.bind(this);
|
|
35
|
+
}
|
|
36
|
+
watchItems() {
|
|
37
|
+
this.itemsList = this.getInitialItemsArray();
|
|
38
|
+
this.selectedItem = this.itemsList.find((item) => item.selected);
|
|
39
|
+
}
|
|
40
|
+
/** get the input selected options */
|
|
41
|
+
async getSelectedItem() {
|
|
42
|
+
return this.selectedItem;
|
|
43
|
+
}
|
|
44
|
+
/** get the input value */
|
|
45
|
+
async getValue() {
|
|
46
|
+
return this.getSelectedValue();
|
|
47
|
+
}
|
|
48
|
+
/** set the input value */
|
|
49
|
+
async setValue(value) {
|
|
50
|
+
let values = [];
|
|
51
|
+
if (typeof value === "string") {
|
|
52
|
+
values.push(value);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
values = value;
|
|
56
|
+
}
|
|
57
|
+
this.selectedItem = this.itemsList.find((item) => values.includes(item.id));
|
|
58
|
+
}
|
|
59
|
+
emitOptionSelect() {
|
|
60
|
+
this.optionSelect.emit({
|
|
61
|
+
id: this.htmlid,
|
|
62
|
+
selected: this.getSelectedValue(),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
emitResetSelect() {
|
|
66
|
+
this.resetSelect.emit({
|
|
67
|
+
id: this.htmlid,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
componentWillLoad() {
|
|
71
|
+
this.watchItems();
|
|
72
|
+
}
|
|
73
|
+
componentWillRender() {
|
|
74
|
+
this.filterItems(this.searchString);
|
|
75
|
+
}
|
|
76
|
+
getInitialItemsArray() {
|
|
77
|
+
return typeof this.items === "string" ? JSON.parse(this.items) : this.items;
|
|
78
|
+
}
|
|
79
|
+
mapSelectedItemToItemsArray() {
|
|
80
|
+
const initialItemsList = this.getInitialItemsArray();
|
|
81
|
+
return initialItemsList.map((item) => {
|
|
82
|
+
var _a;
|
|
83
|
+
item.selected = item.id === ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.id);
|
|
84
|
+
return item;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
getSelectedValue() {
|
|
88
|
+
var _a;
|
|
89
|
+
return (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.id;
|
|
90
|
+
}
|
|
91
|
+
filterItems(searchString) {
|
|
92
|
+
const prevList = this.mapSelectedItemToItemsArray();
|
|
93
|
+
if (!(searchString === null || searchString === void 0 ? void 0 : searchString.length)) {
|
|
94
|
+
this.itemsList = prevList;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.itemsList = prevList
|
|
98
|
+
.filter((item) => {
|
|
99
|
+
return item.name.toUpperCase().includes(searchString.toUpperCase());
|
|
100
|
+
})
|
|
101
|
+
.map((item) => {
|
|
102
|
+
const start = item.name.toUpperCase().indexOf(searchString.toUpperCase());
|
|
103
|
+
const end = start + searchString.length;
|
|
104
|
+
const newName = item.name.substring(0, start) +
|
|
105
|
+
`<strong>${item.name.substring(start, end)}</strong>` +
|
|
106
|
+
item.name.substring(end, item.name.length);
|
|
107
|
+
item.name = newName;
|
|
108
|
+
return item;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
hasAutocomplete() {
|
|
113
|
+
return boolean(this.autocomplete) === true;
|
|
114
|
+
}
|
|
115
|
+
handleInputChange(e) {
|
|
116
|
+
this.searchString = e.detail.value;
|
|
117
|
+
if (!this.isOpen) {
|
|
118
|
+
this.toggleSelectUl();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
selectItem(item, selected) {
|
|
122
|
+
if (item && item.disabled) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this.itemsList = this.mapSelectedItemToItemsArray();
|
|
126
|
+
this.itemsList = this.itemsList.map((i) => {
|
|
127
|
+
i.selected = false;
|
|
128
|
+
if (i.id === (item === null || item === void 0 ? void 0 : item.id)) {
|
|
129
|
+
i.selected = selected;
|
|
130
|
+
}
|
|
131
|
+
return i;
|
|
132
|
+
});
|
|
133
|
+
this.selectedItem = this.itemsList.find((item) => item.selected);
|
|
134
|
+
this.emitOptionSelect();
|
|
135
|
+
if (this.searchString) {
|
|
136
|
+
this.searchString = null;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
arrowsSelectNav(e, key) {
|
|
140
|
+
const showResetIcon = this.resetItem && !!this.selectedItem;
|
|
141
|
+
const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];
|
|
142
|
+
if (!arrows.includes(e.key)) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
e.preventDefault();
|
|
146
|
+
e.stopPropagation();
|
|
147
|
+
if (!this.isOpen) {
|
|
148
|
+
this.toggleSelectUl();
|
|
149
|
+
}
|
|
150
|
+
let index;
|
|
151
|
+
if (this.resetItem) {
|
|
152
|
+
if (e.key === KeyboardCode.ARROW_DOWN) {
|
|
153
|
+
index = key + 1 === this.itemsList.length + 1 ? +!showResetIcon : key + 1;
|
|
154
|
+
}
|
|
155
|
+
else if (e.key === KeyboardCode.ARROW_UP) {
|
|
156
|
+
index = key <= +!showResetIcon ? this.itemsList.length : key - 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (!this.resetItem) {
|
|
160
|
+
if (e.key === KeyboardCode.ARROW_DOWN) {
|
|
161
|
+
index = key + 1 === this.itemsList.length ? 0 : key + 1;
|
|
162
|
+
}
|
|
163
|
+
else if (e.key === KeyboardCode.ARROW_UP) {
|
|
164
|
+
index = key <= 0 ? this.itemsList.length - 1 : key - 1;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
this.focusSelectItem(index);
|
|
168
|
+
}
|
|
169
|
+
focusSelectItem(index) {
|
|
170
|
+
const focusElem = this.element.querySelector(`#${this.htmlid}_${index}`);
|
|
171
|
+
if (focusElem) {
|
|
172
|
+
focusElem.focus();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
toggleSelectUl(selfFocusOnClose = false) {
|
|
176
|
+
if (this.disabled || this.readonly) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (!this.isOpen) {
|
|
180
|
+
document.addEventListener("click", this.handleSelectFocus);
|
|
181
|
+
document.addEventListener("keyup", this.handleSelectFocus);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
document.removeEventListener("click", this.handleSelectFocus);
|
|
185
|
+
document.removeEventListener("keyup", this.handleSelectFocus);
|
|
186
|
+
if (selfFocusOnClose) {
|
|
187
|
+
this.element.querySelector(`#${this.htmlid}_input`).focus();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
this.isOpen = !this.isOpen;
|
|
191
|
+
}
|
|
192
|
+
handleInputClick(e) {
|
|
193
|
+
const cp = e.composedPath();
|
|
194
|
+
const clearIcon = cp.find((item) => item.classList && item.classList.contains("reset-icon"));
|
|
195
|
+
if (clearIcon) {
|
|
196
|
+
e.stopPropagation();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
this.toggleSelectUl();
|
|
200
|
+
}
|
|
201
|
+
handleSelectFocus(e) {
|
|
202
|
+
if (e instanceof KeyboardEvent && e.key === KeyboardCode.ESC) {
|
|
203
|
+
e.stopPropagation();
|
|
204
|
+
return this.toggleSelectUl(true);
|
|
205
|
+
}
|
|
206
|
+
if (e instanceof KeyboardEvent && e.key !== KeyboardCode.TAB && e.key !== KeyboardCode.ENTER) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const tree = getElementTree(getClickedElement());
|
|
210
|
+
const parent = tree.find((elem) => {
|
|
211
|
+
return elem.nodeName.toLowerCase() === "z-input" && elem.id === `${this.htmlid}_input`;
|
|
212
|
+
});
|
|
213
|
+
if (!parent) {
|
|
214
|
+
this.toggleSelectUl(e instanceof MouseEvent ? true : false);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
scrollToLetter(letter) {
|
|
218
|
+
const foundItem = this.itemsList.find((item) => item.name.charAt(0) === letter);
|
|
219
|
+
if (foundItem) {
|
|
220
|
+
this.focusSelectItem(this.itemsList.indexOf(foundItem));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
renderInput() {
|
|
224
|
+
return (h("z-input", { class: {
|
|
225
|
+
"active-select": this.isOpen,
|
|
226
|
+
"cursor-select": !this.autocomplete,
|
|
227
|
+
}, 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) => {
|
|
228
|
+
this.handleInputClick(e);
|
|
229
|
+
}, onKeyUp: (e) => {
|
|
230
|
+
if (e.keyCode !== 13) {
|
|
231
|
+
e.preventDefault();
|
|
232
|
+
}
|
|
233
|
+
handleKeyboardSubmit(e, this.toggleSelectUl);
|
|
234
|
+
}, onKeyDown: (e) => {
|
|
235
|
+
return this.arrowsSelectNav(e, this.selectedItem ? this.itemsList.indexOf(this.selectedItem) : this.resetItem ? 0 : -1);
|
|
236
|
+
}, onInputChange: (e) => {
|
|
237
|
+
this.handleInputChange(e);
|
|
238
|
+
}, onKeyPress: (e) => {
|
|
239
|
+
if (!this.hasAutocomplete()) {
|
|
240
|
+
e.preventDefault();
|
|
241
|
+
this.scrollToLetter(String.fromCharCode(e.keyCode));
|
|
242
|
+
}
|
|
243
|
+
} }));
|
|
244
|
+
}
|
|
245
|
+
renderSelectUl() {
|
|
246
|
+
var _a;
|
|
247
|
+
return (h("div", { class: this.isOpen ? "open" : "closed", tabindex: "-1" }, h("div", { class: {
|
|
248
|
+
"ul-scroll-wrapper": true,
|
|
249
|
+
"fixed": this.isfixed,
|
|
250
|
+
}, 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: {
|
|
251
|
+
disabled: this.disabled,
|
|
252
|
+
readonly: this.readonly,
|
|
253
|
+
filled: !!this.selectedItem,
|
|
254
|
+
[`input-${this.status}`]: !this.isOpen && !!this.status,
|
|
255
|
+
} }, this.resetItem && this.renderResetItem(), this.renderSelectUlItems()))));
|
|
256
|
+
}
|
|
257
|
+
renderResetItem() {
|
|
258
|
+
return (h("z-list-element", { class: {
|
|
259
|
+
"hide": !this.selectedItem || !this.resetItem,
|
|
260
|
+
"reset-item": true,
|
|
261
|
+
"reset-item-margin": !this.hasGroupItems,
|
|
262
|
+
}, clickable: true, disabled: false, dividerType: ListDividerType.ELEMENT, role: "option", tabindex: "0", "aria-selected": "false", id: `${this.htmlid}_${this.resetItem ? "0" : "none"}`, onClickItem: () => {
|
|
263
|
+
this.selectedItem = null;
|
|
264
|
+
this.searchString = null;
|
|
265
|
+
this.emitResetSelect();
|
|
266
|
+
}, onKeyDown: (e) => this.arrowsSelectNav(e, 0) }, h("div", { class: "reset-item-content" }, h("z-icon", { name: "multiply-circled" }), h("span", null, this.resetItem))));
|
|
267
|
+
}
|
|
268
|
+
renderItem(item, key, lastItem) {
|
|
269
|
+
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: {
|
|
270
|
+
"selected": !!item.selected,
|
|
271
|
+
"list-element-content": true,
|
|
272
|
+
}, innerHTML: item.name })));
|
|
273
|
+
}
|
|
274
|
+
renderSelectUlItems() {
|
|
275
|
+
if (!this.itemsList.length) {
|
|
276
|
+
return this.renderNoSearchResults();
|
|
277
|
+
}
|
|
278
|
+
if (this.hasGroupItems) {
|
|
279
|
+
return this.renderSelectGroupItems();
|
|
280
|
+
}
|
|
281
|
+
return this.itemsList.map((item, key, array) => {
|
|
282
|
+
const lastItem = array.length === key + 1;
|
|
283
|
+
const itemKey = this.resetItem ? key + 1 : key;
|
|
284
|
+
return this.renderItem(item, itemKey, lastItem);
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
renderSelectGroupItems() {
|
|
288
|
+
const newData = this.itemsList.reduce((group, item, index, array) => {
|
|
289
|
+
var _a;
|
|
290
|
+
const { category } = item;
|
|
291
|
+
const lastItem = array.length === index + 1;
|
|
292
|
+
const itemKey = this.resetItem ? index + 1 : index;
|
|
293
|
+
const zListItem = this.renderItem(item, itemKey, lastItem);
|
|
294
|
+
group[category] = (_a = group[category]) !== null && _a !== void 0 ? _a : [];
|
|
295
|
+
group[category].push(zListItem);
|
|
296
|
+
return group;
|
|
297
|
+
}, {});
|
|
298
|
+
return Object.entries(newData).map(([key, value]) => {
|
|
299
|
+
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)));
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
renderNoSearchResults() {
|
|
303
|
+
return (h("z-list-element", { color: "blue500", class: "no-results" }, h("z-icon", { name: "multiply-circle", fill: "blue500" }), this.noresultslabel));
|
|
304
|
+
}
|
|
305
|
+
renderMessage() {
|
|
306
|
+
if (boolean(this.message) === false) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status }));
|
|
310
|
+
}
|
|
311
|
+
render() {
|
|
312
|
+
return (h("div", { class: "select-wrapper" }, this.renderInput(), this.renderSelectUl(), this.renderMessage()));
|
|
313
|
+
}
|
|
314
|
+
get element() { return getElement(this); }
|
|
315
|
+
static get watchers() { return {
|
|
316
|
+
"items": ["watchItems"]
|
|
317
|
+
}; }
|
|
318
|
+
};
|
|
319
|
+
ZSelect.style = stylesCss;
|
|
320
|
+
|
|
321
|
+
export { ZSelect as z_select };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-a2ca4b97.js';
|
|
2
|
-
import {
|
|
2
|
+
import { a as getElementTree, h as handleKeyboardSubmit } from './utils-6cf7efe2.js';
|
|
3
3
|
import { T as ThemeVariant } from './index-968a240f.js';
|
|
4
4
|
import './breakpoints-c386984e.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-a2ca4b97.js';
|
|
2
2
|
import { o as Device } from './index-968a240f.js';
|
|
3
|
-
import { e as convertJson,
|
|
3
|
+
import { e as convertJson, g as getDevice, h as handleKeyboardSubmit } from './utils-6cf7efe2.js';
|
|
4
4
|
import './breakpoints-c386984e.js';
|
|
5
5
|
|
|
6
6
|
const stylesCss = ":host{display:block;width:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{display:flex;width:inherit;flex-direction:column}main{position:relative;overflow:hidden;width:100%}main z-icon.scroll{position:absolute;z-index:10;top:50%;width:auto;margin:0 var(--space-unit);cursor:pointer;fill:var(--color-primary01);transition:0.6s ease}main .scroll.disabled{opacity:0.5;pointer-events:none}main .scroll.right{right:0}#slides{display:flex;flex-wrap:wrap;line-height:0px;overflow-y:hidden;transition:all 300ms}footer{display:grid;width:100%;height:56px;align-items:center;border-top:var(--border-base) solid var(--color-surface02);grid-template:2 / 2;grid-template-areas:\"center center\" \"left right\"}footer>div{width:100%;align-items:center}footer .footer-center{grid-area:center}footer .footer-left{grid-area:left}footer .footer-right{grid-area:right}footer .bullet-container{display:flex;min-height:60px;align-items:center;justify-content:center;margin:0 auto}footer .bullet-container .bullet{width:8px;height:8px;margin:var(--space-unit) 2px;background-color:var(--bg-neutral-150);border-radius:50%;pointer-events:none}footer .bullet-container .bullet.selected{background-color:var(--bg-neutral-400)}@media only screen and (min-width: 768px){footer{height:76px;border-top:var(--border-base) solid var(--color-surface02);grid-template:1 / 1fr 2fr 1fr;grid-template-areas:\"left center right\"}footer .bullet-container .bullet{width:10px;height:10px;margin:var(--space-unit) 3px}}@media only screen and (min-width: 1025px){main z-icon.scroll{margin:0 10px}footer .bullet-container .bullet{width:16px;height:16px;margin:var(--space-unit) calc(var(--space-unit) * 0.5);cursor:pointer;pointer-events:auto}}";
|
|
@@ -15,7 +15,7 @@ const ZTableEmptyBox = class {
|
|
|
15
15
|
this.hasCta2Slot = !!this.hostElement.querySelector('[slot="cta2"]');
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, null, h("
|
|
18
|
+
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: {
|
|
19
19
|
"cta": true,
|
|
20
20
|
"has-2-cta": !!this.hasCta1Slot && !!this.hasCta2Slot,
|
|
21
21
|
} }, h("slot", { name: "cta1" }), h("slot", { name: "cta2" })))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
|
|
2
2
|
import { h as Size, S as SortDirection, B as ButtonVariant, c as ButtonSize, P as PopoverPosition } from './index-968a240f.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as getElementTree } from './utils-6cf7efe2.js';
|
|
4
4
|
import './breakpoints-c386984e.js';
|
|
5
5
|
|
|
6
6
|
const stylesCss = ":host{position:relative;display:table-cell;border-bottom:var(--border-size-medium) solid var(--gray200);background-color:var(--gray50);font-family:var(--dashboard-font);font-weight:var(--font-sb);text-align:start}.container{display:flex;align-items:flex-end}:host(.sortable){cursor:pointer}:host([padding=\"x-small\"]){padding:calc(var(--space-unit) * 0.5)}:host([padding=\"small\"]){padding:calc(var(--space-unit))}:host([padding=\"medium\"]){padding:calc(var(--space-unit) * 2)}:host([padding=\"large\"]){padding:calc(var(--space-unit) * 2.5)}:host([padding=\"special\"]){padding:0}.arrow{padding-left:var(--space-unit);opacity:1}.popover-container{position:absolute;top:var(--space-unit);right:var(--space-unit);display:none}.popover-container z-popover{--z-popover-theme--surface:var(--gray200);position:relative;z-index:1}.popover-container.visible{display:block}:host(:hover) .popover-container{display:block}";
|
|
@@ -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-6cf7efe2.js';
|
|
3
3
|
import { j as LabelPosition } from './index-968a240f.js';
|
|
4
4
|
import './breakpoints-c386984e.js';
|
|
5
5
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement, H as Host } from './index-a2ca4b97.js';
|
|
2
|
+
|
|
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}";
|
|
4
|
+
|
|
5
|
+
const ZTypography = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/** Font weight variant */
|
|
9
|
+
this.variant = "regular";
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
const el = document.createElement(this.component || "span");
|
|
13
|
+
el.innerHTML = `<slot />`;
|
|
14
|
+
this.hostElement.shadowRoot.appendChild(el);
|
|
15
|
+
return (h(Host, { class: {
|
|
16
|
+
[this.level]: Boolean(this.level),
|
|
17
|
+
regular: this.variant === "regular",
|
|
18
|
+
semibold: this.variant === "semibold",
|
|
19
|
+
light: this.variant === "light",
|
|
20
|
+
} }));
|
|
21
|
+
}
|
|
22
|
+
get hostElement() { return getElement(this); }
|
|
23
|
+
};
|
|
24
|
+
ZTypography.style = stylesCss;
|
|
25
|
+
|
|
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
|
|
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,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,7 +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
|
+
/** add role "alertdialog" to dialog (optional, default is false) */
|
|
16
|
+
alertdialog?: boolean;
|
|
17
|
+
private dialog;
|
|
18
|
+
host: HTMLZModalElement;
|
|
15
19
|
/** emitted on close button click, returns modalid */
|
|
16
20
|
modalClose: EventEmitter;
|
|
17
21
|
private emitModalClose;
|
|
@@ -21,5 +25,19 @@ export declare class ZModal {
|
|
|
21
25
|
/** emitted on background click, returns modalid */
|
|
22
26
|
modalBackgroundClick: EventEmitter;
|
|
23
27
|
private emitBackgroundClick;
|
|
28
|
+
componentDidLoad(): void;
|
|
29
|
+
/** open modal */
|
|
30
|
+
open(): Promise<void>;
|
|
31
|
+
/** close modal */
|
|
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;
|
|
24
42
|
render(): HTMLZModalElement;
|
|
25
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
|