@zanichelli/albe-web-components 18.5.3 → 18.5.4
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 +7 -0
- package/dist/cjs/index-09238e31.js +47 -0
- package/dist/cjs/index-09238e31.js.map +1 -0
- package/dist/cjs/{index-364e3f60.js → index-1c7cd5df.js} +2 -2
- package/dist/cjs/index-1c7cd5df.js.map +1 -0
- package/dist/cjs/{index-aeea3159.js → index-66928615.js} +2 -2
- package/dist/cjs/{index-aeea3159.js.map → index-66928615.js.map} +1 -1
- package/dist/cjs/index-c798013f.js +73 -0
- package/dist/cjs/index-c798013f.js.map +1 -0
- package/dist/cjs/{index-bf197d11.js → index-f011b2e3.js} +5 -3
- package/dist/cjs/index-f011b2e3.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-accordion.cjs.entry.js +1 -1
- package/dist/cjs/z-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +6 -6
- package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-avatar.cjs.entry.js +2 -2
- package/dist/cjs/z-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
- package/dist/cjs/z-chip.cjs.entry.js +2 -2
- package/dist/cjs/z-combobox.cjs.entry.js +1 -1
- package/dist/cjs/z-cover-hero.cjs.entry.js +2 -2
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +4 -4
- package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
- package/dist/cjs/z-info-box.cjs.entry.js +1 -1
- package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
- package/dist/cjs/z-logo.cjs.entry.js +1 -1
- package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
- package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
- package/dist/cjs/z-notification.cjs.entry.js +1 -1
- package/dist/cjs/z-otp.cjs.entry.js +2 -2
- package/dist/cjs/z-panel-elem.cjs.entry.js +2 -2
- package/dist/cjs/z-popover.cjs.entry.js +1 -1
- package/dist/cjs/z-select.cjs.entry.js +1 -1
- package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +7 -7
- package/dist/cjs/z-table.cjs.entry.js.map +1 -1
- package/dist/cjs/z-td.cjs.entry.js +1 -1
- package/dist/cjs/z-tfoot.cjs.entry.js +1 -1
- package/dist/cjs/z-th.cjs.entry.js +1 -1
- package/dist/cjs/z-thead.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
- package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/z-tr.cjs.entry.js +3 -3
- package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
- package/dist/collection/components/table/cells/z-td/index.js +1 -1
- package/dist/collection/components/table/cells/z-td/index.js.map +1 -1
- package/dist/collection/components/table/cells/z-td/styles.css +1 -7
- package/dist/collection/components/table/cells/z-th/styles.css +10 -7
- package/dist/collection/components/table/z-table/index.js +1 -1
- package/dist/collection/components/table/z-table/index.stories.js +7 -2
- package/dist/collection/components/table/z-table/index.stories.js.map +1 -1
- package/dist/collection/components/table/z-table/styles.css +2 -0
- package/dist/collection/components/table/z-tfoot/index.js +1 -1
- package/dist/collection/components/table/z-tfoot/index.js.map +1 -1
- package/dist/collection/components/table/z-thead/index.js +21 -1
- package/dist/collection/components/table/z-thead/index.js.map +1 -1
- package/dist/collection/components/table/z-thead/styles.css +5 -0
- package/dist/collection/components/table/z-tr/index.js +15 -1
- package/dist/collection/components/table/z-tr/index.js.map +1 -1
- package/dist/collection/components/table/z-tr/styles.css +39 -9
- package/dist/collection/components/z-accordion/index.js +1 -1
- package/dist/collection/components/z-anchor-navigation/index.js +1 -1
- package/dist/collection/components/z-app-header/index.js +1 -1
- package/dist/collection/components/z-aria-alert/index.js +1 -1
- package/dist/collection/components/z-avatar/index.js +2 -2
- package/dist/collection/components/z-breadcrumb/index.js +2 -2
- package/dist/collection/components/z-button-sort/index.js +1 -1
- package/dist/collection/components/z-chip/index.js +2 -2
- package/dist/collection/components/z-combobox/index.js +1 -1
- package/dist/collection/components/z-cover-hero/index.js +2 -2
- package/dist/collection/components/z-divider/index.js +1 -1
- package/dist/collection/components/z-ghost-loading/index.js +1 -1
- package/dist/collection/components/z-info-box/index.js +1 -1
- package/dist/collection/components/z-info-reveal/index.js +1 -1
- package/dist/collection/components/z-input/index.js +1 -1
- package/dist/collection/components/z-input-message/index.js +1 -1
- package/dist/collection/components/z-logo/index.js +1 -1
- package/dist/collection/components/z-menu-section/index.js +1 -1
- package/dist/collection/components/z-modal/index.js +4 -4
- package/dist/collection/components/z-navigation-tabs/index.js +2 -2
- package/dist/collection/components/z-notification/index.js +1 -1
- package/dist/collection/components/z-offcanvas/index.js +1 -1
- package/dist/collection/components/z-panel-elem/index.js +2 -2
- package/dist/collection/components/z-popover/index.js +1 -1
- package/dist/collection/components/z-searchbar/index.js +1 -1
- package/dist/collection/components/z-select/index.js +1 -1
- package/dist/collection/components/z-skip-to-content/index.js +1 -1
- package/dist/collection/components/z-stepper/index.js +1 -1
- package/dist/collection/components/z-stepper-item/index.js +1 -1
- package/dist/collection/components/z-toast-notification/index.js +1 -1
- package/dist/collection/components/z-toast-notification-list/index.js +1 -1
- package/dist/collection/components/z-toggle-button/index.js +2 -2
- package/dist/collection/components/z-toggle-switch/index.js +3 -3
- package/dist/collection/components/z-tooltip/index.js +1 -1
- package/dist/collection/components/z-visually-hidden/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
- package/dist/components/index10.js +1 -1
- package/dist/components/index11.js +1 -1
- package/dist/components/index12.js +1 -1
- package/dist/components/index16.js +4 -4
- package/dist/components/index17.js +1 -1
- package/dist/components/index18.js +1 -1
- package/dist/components/index19.js +1 -1
- package/dist/components/index20.js +1 -1
- package/dist/components/index21.js +1 -1
- package/dist/components/index22.js +1 -1
- package/dist/components/index23.js +1 -1
- package/dist/components/index24.js +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/index5.js +2 -2
- package/dist/components/index6.js +1 -1
- package/dist/components/index8.js +1 -1
- package/dist/components/z-accordion.js +1 -1
- package/dist/components/z-anchor-navigation.js +1 -1
- package/dist/components/z-app-header.js +1 -1
- package/dist/components/z-aria-alert.js +1 -1
- package/dist/components/z-avatar.js +2 -2
- package/dist/components/z-breadcrumb.js +2 -2
- package/dist/components/z-button-sort.js +1 -1
- package/dist/components/z-combobox.js +1 -1
- package/dist/components/z-cover-hero.js +2 -2
- package/dist/components/z-info-box.js +1 -1
- package/dist/components/z-logo.js +1 -1
- package/dist/components/z-menu-section.js +1 -1
- package/dist/components/z-myz-card-alert.js +1 -1
- package/dist/components/z-myz-card-dictionary.js +1 -1
- package/dist/components/z-myz-card-footer-sections.js +1 -1
- package/dist/components/z-myz-card-footer.js +1 -1
- package/dist/components/z-myz-card-icon.js +1 -1
- package/dist/components/z-myz-card-info.js +1 -1
- package/dist/components/z-myz-card-list.js +1 -1
- package/dist/components/z-myz-list.js +1 -1
- package/dist/components/z-navigation-tabs.js +2 -2
- package/dist/components/z-notification.js +1 -1
- package/dist/components/z-otp.js +2 -2
- package/dist/components/z-panel-elem.js +2 -2
- package/dist/components/z-select.js +1 -1
- package/dist/components/z-skip-to-content.js +1 -1
- package/dist/components/z-stepper-item.js +1 -1
- package/dist/components/z-stepper.js +1 -1
- package/dist/components/z-table.js +2 -2
- package/dist/components/z-table.js.map +1 -1
- package/dist/components/z-td.js +2 -2
- package/dist/components/z-td.js.map +1 -1
- package/dist/components/z-tfoot.js +1 -1
- package/dist/components/z-tfoot.js.map +1 -1
- package/dist/components/z-th.js +1 -1
- package/dist/components/z-th.js.map +1 -1
- package/dist/components/z-thead.js +6 -3
- package/dist/components/z-thead.js.map +1 -1
- package/dist/components/z-toast-notification-list.js +1 -1
- package/dist/components/z-toast-notification.js +1 -1
- package/dist/components/z-toggle-button.js +2 -2
- package/dist/components/z-toggle-switch.js +3 -3
- package/dist/components/z-tooltip.js +1 -1
- package/dist/components/z-tr.js +16 -2
- package/dist/components/z-tr.js.map +1 -1
- package/dist/components/z-visually-hidden.js +1 -1
- package/dist/esm/index-0bcacbd3.js +21 -0
- package/dist/esm/index-0bcacbd3.js.map +1 -0
- package/dist/esm/{index-571f913c.js → index-36122d8f.js} +2 -2
- package/dist/esm/index-36122d8f.js.map +1 -0
- package/dist/esm/index-628f296f.js +71 -0
- package/dist/esm/index-628f296f.js.map +1 -0
- package/dist/esm/{index-5e18fc4b.js → index-b64ced16.js} +2 -2
- package/dist/esm/{index-5e18fc4b.js.map → index-b64ced16.js.map} +1 -1
- package/dist/esm/index-f20179ad.js +45 -0
- package/dist/esm/index-f20179ad.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-accordion.entry.js +1 -1
- package/dist/esm/z-alert.entry.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +1 -1
- package/dist/esm/z-app-header_12.entry.js +6 -6
- package/dist/esm/z-aria-alert.entry.js +1 -1
- package/dist/esm/z-avatar.entry.js +2 -2
- package/dist/esm/z-breadcrumb.entry.js +2 -2
- package/dist/esm/z-button-sort.entry.js +1 -1
- package/dist/esm/z-chip.entry.js +2 -2
- package/dist/esm/z-combobox.entry.js +1 -1
- package/dist/esm/z-cover-hero.entry.js +2 -2
- package/dist/esm/z-dragdrop-area_2.entry.js +4 -4
- package/dist/esm/z-ghost-loading.entry.js +1 -1
- package/dist/esm/z-info-box.entry.js +1 -1
- package/dist/esm/z-info-reveal.entry.js +1 -1
- package/dist/esm/z-logo.entry.js +1 -1
- package/dist/esm/z-menu-section.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-icon.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-card-list.entry.js +1 -1
- package/dist/esm/z-myz-card_4.entry.js +4 -4
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/z-myz-list.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +2 -2
- package/dist/esm/z-notification.entry.js +1 -1
- package/dist/esm/z-otp.entry.js +2 -2
- package/dist/esm/z-panel-elem.entry.js +2 -2
- package/dist/esm/z-popover.entry.js +1 -1
- package/dist/esm/z-select.entry.js +1 -1
- package/dist/esm/z-skip-to-content.entry.js +1 -1
- package/dist/esm/z-stepper-item.entry.js +1 -1
- package/dist/esm/z-stepper.entry.js +1 -1
- package/dist/esm/z-table.entry.js +7 -7
- package/dist/esm/z-table.entry.js.map +1 -1
- package/dist/esm/z-td.entry.js +1 -1
- package/dist/esm/z-tfoot.entry.js +1 -1
- package/dist/esm/z-th.entry.js +1 -1
- package/dist/esm/z-thead.entry.js +1 -1
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +1 -1
- package/dist/esm/z-toggle-button.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +3 -3
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/esm/z-tr.entry.js +3 -3
- package/dist/esm/z-visually-hidden.entry.js +1 -1
- package/dist/types/components/table/z-table/index.stories.d.ts +5 -0
- package/dist/types/components/table/z-thead/index.d.ts +5 -0
- package/dist/types/components/table/z-tr/index.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/{www/build/p-c4b78535.entry.js → dist/web-components-library/p-0756fe6f.entry.js} +2 -2
- package/dist/web-components-library/{p-7c69b70a.entry.js → p-09ba466b.entry.js} +2 -2
- package/{www/build/p-914f9d32.entry.js → dist/web-components-library/p-14f0bdf4.entry.js} +2 -2
- package/dist/web-components-library/{p-8f4a90dc.entry.js → p-25935be3.entry.js} +2 -2
- package/dist/web-components-library/{p-956d977d.entry.js → p-30575221.entry.js} +2 -2
- package/{www/build/p-42819df4.entry.js → dist/web-components-library/p-37f271c8.entry.js} +2 -2
- package/dist/web-components-library/{p-651250c2.entry.js → p-3ed25564.entry.js} +2 -2
- package/dist/web-components-library/{p-209db20e.entry.js → p-4c730d4a.entry.js} +2 -2
- package/dist/web-components-library/p-4c9bf42d.js +2 -0
- package/dist/web-components-library/p-4c9bf42d.js.map +1 -0
- package/dist/web-components-library/{p-f36d7044.entry.js → p-4d73640e.entry.js} +2 -2
- package/dist/web-components-library/{p-40fc2770.entry.js → p-4fbcf534.entry.js} +2 -2
- package/dist/web-components-library/p-4fcbbe1c.entry.js +2 -0
- package/{www/build/p-fed6d4ac.entry.js → dist/web-components-library/p-5cf3a797.entry.js} +2 -2
- package/dist/web-components-library/{p-b2313d3c.entry.js → p-6273db7f.entry.js} +2 -2
- package/dist/web-components-library/{p-afea8173.entry.js → p-63c1bde5.entry.js} +2 -2
- package/dist/web-components-library/{p-d0a18050.entry.js → p-6793061a.entry.js} +2 -2
- package/dist/web-components-library/p-67edb420.entry.js +2 -0
- package/dist/web-components-library/{p-7fbdf8f9.entry.js → p-689b0280.entry.js} +2 -2
- package/{www/build/p-512033d3.entry.js → dist/web-components-library/p-6a62a0a7.entry.js} +3 -3
- package/dist/web-components-library/{p-3a9405b3.entry.js → p-6ca0ee2f.entry.js} +2 -2
- package/dist/web-components-library/{p-ae8b17a1.entry.js → p-72a7eb26.entry.js} +2 -2
- package/dist/web-components-library/p-74819cbe.entry.js +2 -0
- package/dist/web-components-library/p-748fa3ae.js +2 -0
- package/{www/build/p-12900bf7.js.map → dist/web-components-library/p-748fa3ae.js.map} +1 -1
- package/{www/build/p-ae82ba49.entry.js → dist/web-components-library/p-8117a929.entry.js} +2 -2
- package/dist/web-components-library/{p-8b0c8e6d.entry.js → p-8b93bc6d.entry.js} +2 -2
- package/dist/web-components-library/p-8c52635e.entry.js +2 -0
- package/{www/build/p-ac888c48.entry.js → dist/web-components-library/p-962c7f6b.entry.js} +2 -2
- package/dist/web-components-library/p-97608d16.entry.js +2 -0
- package/dist/web-components-library/{p-3cc02ff9.entry.js.map → p-97608d16.entry.js.map} +1 -1
- package/dist/web-components-library/p-9e3da0b7.entry.js +2 -0
- package/dist/web-components-library/{p-684c8fcb.entry.js → p-ac585bcd.entry.js} +2 -2
- package/dist/web-components-library/{p-9047fe2a.entry.js → p-badd98ad.entry.js} +2 -2
- package/dist/web-components-library/p-bdbee3b2.entry.js +2 -0
- package/dist/web-components-library/p-bdbee3b2.entry.js.map +1 -0
- package/dist/web-components-library/{p-1174942e.entry.js → p-c8814ae1.entry.js} +2 -2
- package/dist/web-components-library/p-c9381ebf.js +2 -0
- package/dist/web-components-library/p-c9381ebf.js.map +1 -0
- package/{www/build/p-def1bcc7.entry.js → dist/web-components-library/p-c962e854.entry.js} +2 -2
- package/dist/web-components-library/{p-3cb9a131.entry.js → p-caa491ca.entry.js} +2 -2
- package/dist/web-components-library/{p-1477f263.entry.js → p-cb1de7b4.entry.js} +2 -2
- package/dist/web-components-library/p-cbab66f7.entry.js +2 -0
- package/dist/web-components-library/{p-97294823.entry.js.map → p-cbab66f7.entry.js.map} +1 -1
- package/dist/web-components-library/{p-252ef047.entry.js → p-d0d54d42.entry.js} +2 -2
- package/dist/web-components-library/{p-0df112c4.entry.js → p-d6a7b7f3.entry.js} +2 -2
- package/dist/web-components-library/{p-b376a58c.entry.js → p-d6d3a92a.entry.js} +2 -2
- package/dist/web-components-library/p-d75f8bbb.entry.js +2 -0
- package/dist/web-components-library/p-d7f12672.js +2 -0
- package/dist/web-components-library/p-d7f12672.js.map +1 -0
- package/dist/web-components-library/{p-dc566d6d.entry.js → p-d8aa6afa.entry.js} +2 -2
- package/dist/web-components-library/p-d90d2698.entry.js +2 -0
- package/dist/web-components-library/{p-ee08aec0.entry.js → p-da30a6cb.entry.js} +2 -2
- package/{www/build/p-eb6f59a8.entry.js → dist/web-components-library/p-dc5ba112.entry.js} +2 -2
- package/dist/web-components-library/{p-afc9e99e.entry.js → p-e231e811.entry.js} +2 -2
- package/dist/web-components-library/p-e5407cc1.entry.js +2 -0
- package/dist/web-components-library/{p-c231ed32.entry.js → p-e639e1bc.entry.js} +2 -2
- package/dist/web-components-library/{p-c6ae7dfa.entry.js → p-e8419614.entry.js} +2 -2
- package/dist/web-components-library/p-f19f12b1.js +2 -0
- package/dist/web-components-library/p-f19f12b1.js.map +1 -0
- package/dist/web-components-library/{p-a3aef2c0.entry.js → p-f1c55eda.entry.js} +2 -2
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/{dist/web-components-library/p-c4b78535.entry.js → www/build/p-0756fe6f.entry.js} +2 -2
- package/www/build/{p-7c69b70a.entry.js → p-09ba466b.entry.js} +2 -2
- package/{dist/web-components-library/p-914f9d32.entry.js → www/build/p-14f0bdf4.entry.js} +2 -2
- package/www/build/{p-23b6a1e1.js → p-1b63615d.js} +1 -1
- package/www/build/{p-8f4a90dc.entry.js → p-25935be3.entry.js} +2 -2
- package/www/build/{p-956d977d.entry.js → p-30575221.entry.js} +2 -2
- package/{dist/web-components-library/p-42819df4.entry.js → www/build/p-37f271c8.entry.js} +2 -2
- package/www/build/{p-651250c2.entry.js → p-3ed25564.entry.js} +2 -2
- package/www/build/{p-209db20e.entry.js → p-4c730d4a.entry.js} +2 -2
- package/www/build/p-4c9bf42d.js +2 -0
- package/www/build/p-4c9bf42d.js.map +1 -0
- package/www/build/{p-f36d7044.entry.js → p-4d73640e.entry.js} +2 -2
- package/www/build/{p-40fc2770.entry.js → p-4fbcf534.entry.js} +2 -2
- package/www/build/p-4fcbbe1c.entry.js +2 -0
- package/{dist/web-components-library/p-fed6d4ac.entry.js → www/build/p-5cf3a797.entry.js} +2 -2
- package/www/build/{p-b2313d3c.entry.js → p-6273db7f.entry.js} +2 -2
- package/www/build/{p-afea8173.entry.js → p-63c1bde5.entry.js} +2 -2
- package/www/build/{p-d0a18050.entry.js → p-6793061a.entry.js} +2 -2
- package/www/build/p-67edb420.entry.js +2 -0
- package/www/build/{p-7fbdf8f9.entry.js → p-689b0280.entry.js} +2 -2
- package/{dist/web-components-library/p-512033d3.entry.js → www/build/p-6a62a0a7.entry.js} +3 -3
- package/www/build/{p-3a9405b3.entry.js → p-6ca0ee2f.entry.js} +2 -2
- package/www/build/{p-ae8b17a1.entry.js → p-72a7eb26.entry.js} +2 -2
- package/www/build/p-74819cbe.entry.js +2 -0
- package/www/build/p-748fa3ae.js +2 -0
- package/{dist/web-components-library/p-12900bf7.js.map → www/build/p-748fa3ae.js.map} +1 -1
- package/{dist/web-components-library/p-ae82ba49.entry.js → www/build/p-8117a929.entry.js} +2 -2
- package/www/build/{p-8b0c8e6d.entry.js → p-8b93bc6d.entry.js} +2 -2
- package/www/build/p-8c52635e.entry.js +2 -0
- package/{dist/web-components-library/p-ac888c48.entry.js → www/build/p-962c7f6b.entry.js} +2 -2
- package/www/build/p-97608d16.entry.js +2 -0
- package/www/build/{p-3cc02ff9.entry.js.map → p-97608d16.entry.js.map} +1 -1
- package/www/build/p-9e3da0b7.entry.js +2 -0
- package/www/build/{p-684c8fcb.entry.js → p-ac585bcd.entry.js} +2 -2
- package/www/build/{p-9047fe2a.entry.js → p-badd98ad.entry.js} +2 -2
- package/www/build/p-bdbee3b2.entry.js +2 -0
- package/www/build/p-bdbee3b2.entry.js.map +1 -0
- package/www/build/{p-1174942e.entry.js → p-c8814ae1.entry.js} +2 -2
- package/www/build/p-c9381ebf.js +2 -0
- package/www/build/p-c9381ebf.js.map +1 -0
- package/{dist/web-components-library/p-def1bcc7.entry.js → www/build/p-c962e854.entry.js} +2 -2
- package/www/build/{p-3cb9a131.entry.js → p-caa491ca.entry.js} +2 -2
- package/www/build/{p-1477f263.entry.js → p-cb1de7b4.entry.js} +2 -2
- package/www/build/p-cbab66f7.entry.js +2 -0
- package/www/build/{p-97294823.entry.js.map → p-cbab66f7.entry.js.map} +1 -1
- package/www/build/{p-252ef047.entry.js → p-d0d54d42.entry.js} +2 -2
- package/www/build/{p-0df112c4.entry.js → p-d6a7b7f3.entry.js} +2 -2
- package/www/build/{p-b376a58c.entry.js → p-d6d3a92a.entry.js} +2 -2
- package/www/build/p-d75f8bbb.entry.js +2 -0
- package/www/build/p-d7f12672.js +2 -0
- package/www/build/p-d7f12672.js.map +1 -0
- package/www/build/{p-dc566d6d.entry.js → p-d8aa6afa.entry.js} +2 -2
- package/www/build/p-d90d2698.entry.js +2 -0
- package/www/build/{p-ee08aec0.entry.js → p-da30a6cb.entry.js} +2 -2
- package/{dist/web-components-library/p-eb6f59a8.entry.js → www/build/p-dc5ba112.entry.js} +2 -2
- package/www/build/{p-afc9e99e.entry.js → p-e231e811.entry.js} +2 -2
- package/www/build/p-e5407cc1.entry.js +2 -0
- package/www/build/{p-c231ed32.entry.js → p-e639e1bc.entry.js} +2 -2
- package/www/build/{p-c6ae7dfa.entry.js → p-e8419614.entry.js} +2 -2
- package/www/build/p-f19f12b1.js +2 -0
- package/www/build/p-f19f12b1.js.map +1 -0
- package/www/build/{p-a3aef2c0.entry.js → p-f1c55eda.entry.js} +2 -2
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/dist/cjs/index-339004f9.js +0 -59
- package/dist/cjs/index-339004f9.js.map +0 -1
- package/dist/cjs/index-364e3f60.js.map +0 -1
- package/dist/cjs/index-6ba31c6e.js +0 -47
- package/dist/cjs/index-6ba31c6e.js.map +0 -1
- package/dist/cjs/index-bf197d11.js.map +0 -1
- package/dist/esm/index-3e140e28.js +0 -57
- package/dist/esm/index-3e140e28.js.map +0 -1
- package/dist/esm/index-571f913c.js.map +0 -1
- package/dist/esm/index-eb53c87f.js +0 -19
- package/dist/esm/index-eb53c87f.js.map +0 -1
- package/dist/esm/index-eb99d165.js +0 -45
- package/dist/esm/index-eb99d165.js.map +0 -1
- package/dist/web-components-library/p-05348da8.entry.js +0 -2
- package/dist/web-components-library/p-12900bf7.js +0 -2
- package/dist/web-components-library/p-195ed6d2.js +0 -2
- package/dist/web-components-library/p-195ed6d2.js.map +0 -1
- package/dist/web-components-library/p-39a968af.entry.js +0 -2
- package/dist/web-components-library/p-3cc02ff9.entry.js +0 -2
- package/dist/web-components-library/p-4cfe0f87.entry.js +0 -2
- package/dist/web-components-library/p-5cda7027.entry.js +0 -2
- package/dist/web-components-library/p-76ee5c89.entry.js +0 -2
- package/dist/web-components-library/p-7ad751e7.entry.js +0 -2
- package/dist/web-components-library/p-92cc912e.entry.js +0 -2
- package/dist/web-components-library/p-97294823.entry.js +0 -2
- package/dist/web-components-library/p-a22b7aa0.entry.js +0 -2
- package/dist/web-components-library/p-a35c1fab.js +0 -2
- package/dist/web-components-library/p-a35c1fab.js.map +0 -1
- package/dist/web-components-library/p-ca525798.js +0 -2
- package/dist/web-components-library/p-ca525798.js.map +0 -1
- package/dist/web-components-library/p-e1687f75.entry.js +0 -2
- package/dist/web-components-library/p-e1687f75.entry.js.map +0 -1
- package/dist/web-components-library/p-eb9ef3cb.js +0 -2
- package/dist/web-components-library/p-eb9ef3cb.js.map +0 -1
- package/www/build/p-05348da8.entry.js +0 -2
- package/www/build/p-12900bf7.js +0 -2
- package/www/build/p-195ed6d2.js +0 -2
- package/www/build/p-195ed6d2.js.map +0 -1
- package/www/build/p-39a968af.entry.js +0 -2
- package/www/build/p-3cc02ff9.entry.js +0 -2
- package/www/build/p-4cfe0f87.entry.js +0 -2
- package/www/build/p-5cda7027.entry.js +0 -2
- package/www/build/p-76ee5c89.entry.js +0 -2
- package/www/build/p-7ad751e7.entry.js +0 -2
- package/www/build/p-92cc912e.entry.js +0 -2
- package/www/build/p-97294823.entry.js +0 -2
- package/www/build/p-a22b7aa0.entry.js +0 -2
- package/www/build/p-a35c1fab.js +0 -2
- package/www/build/p-a35c1fab.js.map +0 -1
- package/www/build/p-ca525798.js +0 -2
- package/www/build/p-ca525798.js.map +0 -1
- package/www/build/p-e1687f75.entry.js +0 -2
- package/www/build/p-e1687f75.entry.js.map +0 -1
- package/www/build/p-eb9ef3cb.js +0 -2
- package/www/build/p-eb9ef3cb.js.map +0 -1
- /package/dist/web-components-library/{p-c4b78535.entry.js.map → p-0756fe6f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7c69b70a.entry.js.map → p-09ba466b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-914f9d32.entry.js.map → p-14f0bdf4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8f4a90dc.entry.js.map → p-25935be3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-956d977d.entry.js.map → p-30575221.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-42819df4.entry.js.map → p-37f271c8.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-651250c2.entry.js.map → p-3ed25564.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-209db20e.entry.js.map → p-4c730d4a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f36d7044.entry.js.map → p-4d73640e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-40fc2770.entry.js.map → p-4fbcf534.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-05348da8.entry.js.map → p-4fcbbe1c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-fed6d4ac.entry.js.map → p-5cf3a797.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b2313d3c.entry.js.map → p-6273db7f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-afea8173.entry.js.map → p-63c1bde5.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-d0a18050.entry.js.map → p-6793061a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-76ee5c89.entry.js.map → p-67edb420.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7fbdf8f9.entry.js.map → p-689b0280.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-512033d3.entry.js.map → p-6a62a0a7.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-3a9405b3.entry.js.map → p-6ca0ee2f.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ae8b17a1.entry.js.map → p-72a7eb26.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4cfe0f87.entry.js.map → p-74819cbe.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ae82ba49.entry.js.map → p-8117a929.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8b0c8e6d.entry.js.map → p-8b93bc6d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-5cda7027.entry.js.map → p-8c52635e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ac888c48.entry.js.map → p-962c7f6b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-39a968af.entry.js.map → p-9e3da0b7.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-684c8fcb.entry.js.map → p-ac585bcd.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-9047fe2a.entry.js.map → p-badd98ad.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1174942e.entry.js.map → p-c8814ae1.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-def1bcc7.entry.js.map → p-c962e854.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-3cb9a131.entry.js.map → p-caa491ca.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-1477f263.entry.js.map → p-cb1de7b4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-252ef047.entry.js.map → p-d0d54d42.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-0df112c4.entry.js.map → p-d6a7b7f3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b376a58c.entry.js.map → p-d6d3a92a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7ad751e7.entry.js.map → p-d75f8bbb.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-dc566d6d.entry.js.map → p-d8aa6afa.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-92cc912e.entry.js.map → p-d90d2698.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ee08aec0.entry.js.map → p-da30a6cb.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-eb6f59a8.entry.js.map → p-dc5ba112.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-afc9e99e.entry.js.map → p-e231e811.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a22b7aa0.entry.js.map → p-e5407cc1.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c231ed32.entry.js.map → p-e639e1bc.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c6ae7dfa.entry.js.map → p-e8419614.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a3aef2c0.entry.js.map → p-f1c55eda.entry.js.map} +0 -0
- /package/www/build/{p-c4b78535.entry.js.map → p-0756fe6f.entry.js.map} +0 -0
- /package/www/build/{p-7c69b70a.entry.js.map → p-09ba466b.entry.js.map} +0 -0
- /package/www/build/{p-914f9d32.entry.js.map → p-14f0bdf4.entry.js.map} +0 -0
- /package/www/build/{p-8f4a90dc.entry.js.map → p-25935be3.entry.js.map} +0 -0
- /package/www/build/{p-956d977d.entry.js.map → p-30575221.entry.js.map} +0 -0
- /package/www/build/{p-42819df4.entry.js.map → p-37f271c8.entry.js.map} +0 -0
- /package/www/build/{p-651250c2.entry.js.map → p-3ed25564.entry.js.map} +0 -0
- /package/www/build/{p-209db20e.entry.js.map → p-4c730d4a.entry.js.map} +0 -0
- /package/www/build/{p-f36d7044.entry.js.map → p-4d73640e.entry.js.map} +0 -0
- /package/www/build/{p-40fc2770.entry.js.map → p-4fbcf534.entry.js.map} +0 -0
- /package/www/build/{p-05348da8.entry.js.map → p-4fcbbe1c.entry.js.map} +0 -0
- /package/www/build/{p-fed6d4ac.entry.js.map → p-5cf3a797.entry.js.map} +0 -0
- /package/www/build/{p-b2313d3c.entry.js.map → p-6273db7f.entry.js.map} +0 -0
- /package/www/build/{p-afea8173.entry.js.map → p-63c1bde5.entry.js.map} +0 -0
- /package/www/build/{p-d0a18050.entry.js.map → p-6793061a.entry.js.map} +0 -0
- /package/www/build/{p-76ee5c89.entry.js.map → p-67edb420.entry.js.map} +0 -0
- /package/www/build/{p-7fbdf8f9.entry.js.map → p-689b0280.entry.js.map} +0 -0
- /package/www/build/{p-512033d3.entry.js.map → p-6a62a0a7.entry.js.map} +0 -0
- /package/www/build/{p-3a9405b3.entry.js.map → p-6ca0ee2f.entry.js.map} +0 -0
- /package/www/build/{p-ae8b17a1.entry.js.map → p-72a7eb26.entry.js.map} +0 -0
- /package/www/build/{p-4cfe0f87.entry.js.map → p-74819cbe.entry.js.map} +0 -0
- /package/www/build/{p-ae82ba49.entry.js.map → p-8117a929.entry.js.map} +0 -0
- /package/www/build/{p-8b0c8e6d.entry.js.map → p-8b93bc6d.entry.js.map} +0 -0
- /package/www/build/{p-5cda7027.entry.js.map → p-8c52635e.entry.js.map} +0 -0
- /package/www/build/{p-ac888c48.entry.js.map → p-962c7f6b.entry.js.map} +0 -0
- /package/www/build/{p-39a968af.entry.js.map → p-9e3da0b7.entry.js.map} +0 -0
- /package/www/build/{p-684c8fcb.entry.js.map → p-ac585bcd.entry.js.map} +0 -0
- /package/www/build/{p-9047fe2a.entry.js.map → p-badd98ad.entry.js.map} +0 -0
- /package/www/build/{p-1174942e.entry.js.map → p-c8814ae1.entry.js.map} +0 -0
- /package/www/build/{p-def1bcc7.entry.js.map → p-c962e854.entry.js.map} +0 -0
- /package/www/build/{p-3cb9a131.entry.js.map → p-caa491ca.entry.js.map} +0 -0
- /package/www/build/{p-1477f263.entry.js.map → p-cb1de7b4.entry.js.map} +0 -0
- /package/www/build/{p-252ef047.entry.js.map → p-d0d54d42.entry.js.map} +0 -0
- /package/www/build/{p-0df112c4.entry.js.map → p-d6a7b7f3.entry.js.map} +0 -0
- /package/www/build/{p-b376a58c.entry.js.map → p-d6d3a92a.entry.js.map} +0 -0
- /package/www/build/{p-7ad751e7.entry.js.map → p-d75f8bbb.entry.js.map} +0 -0
- /package/www/build/{p-dc566d6d.entry.js.map → p-d8aa6afa.entry.js.map} +0 -0
- /package/www/build/{p-92cc912e.entry.js.map → p-d90d2698.entry.js.map} +0 -0
- /package/www/build/{p-ee08aec0.entry.js.map → p-da30a6cb.entry.js.map} +0 -0
- /package/www/build/{p-eb6f59a8.entry.js.map → p-dc5ba112.entry.js.map} +0 -0
- /package/www/build/{p-afc9e99e.entry.js.map → p-e231e811.entry.js.map} +0 -0
- /package/www/build/{p-a22b7aa0.entry.js.map → p-e5407cc1.entry.js.map} +0 -0
- /package/www/build/{p-c231ed32.entry.js.map → p-e639e1bc.entry.js.map} +0 -0
- /package/www/build/{p-c6ae7dfa.entry.js.map → p-e8419614.entry.js.map} +0 -0
- /package/www/build/{p-a3aef2c0.entry.js.map → p-f1c55eda.entry.js.map} +0 -0
|
@@ -4,16 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-96af6326.js');
|
|
6
6
|
require('./index-62712250.js');
|
|
7
|
-
require('./index-
|
|
8
|
-
require('./index-
|
|
9
|
-
require('./index-
|
|
7
|
+
require('./index-1c7cd5df.js');
|
|
8
|
+
require('./index-f011b2e3.js');
|
|
9
|
+
require('./index-c798013f.js');
|
|
10
10
|
require('./utils-93961cb6.js');
|
|
11
11
|
require('./index-97a4c18d.js');
|
|
12
12
|
require('./breakpoints-8a1e87e0.js');
|
|
13
|
-
require('./index-
|
|
14
|
-
require('./index-
|
|
13
|
+
require('./index-09238e31.js');
|
|
14
|
+
require('./index-66928615.js');
|
|
15
15
|
|
|
16
|
-
const stylesCss = ":host{--z-table--cells-padding:calc(var(--space-unit) * 2);position:relative;display:block;overflow:auto;max-width:100%;box-sizing:border-box;background-color:var(--color-surface01)}:host([expandable]){--z-table--expand-button-size:40px}:host([bordered]){--z-table--cell-left-border:1px solid var(--color-surface03)}";
|
|
16
|
+
const stylesCss = ":host{--z-table--cells-padding:calc(var(--space-unit) * 2);position:relative;display:block;overflow:auto;min-width:max-content;max-width:100%;box-sizing:border-box;padding:var(--space-unit);background-color:var(--color-surface01)}:host([expandable]){--z-table--expand-button-size:40px}:host([bordered]){--z-table--cell-left-border:1px solid var(--color-surface03)}";
|
|
17
17
|
const ZTableStyle0 = stylesCss;
|
|
18
18
|
|
|
19
19
|
const ZTable = class {
|
|
@@ -45,7 +45,7 @@ const ZTable = class {
|
|
|
45
45
|
(_a = this.expandableMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (index.h(index.Host, { key: '
|
|
48
|
+
return (index.h(index.Host, { key: '6749b44ab2c28b92e6b282487bf9f23c40cead58', expandable: this.expandable }, index.h("div", { key: '633237695b09182263ac74b5118d533a8cae33b8', class: "table", role: "table" }, index.h("slot", { key: 'f46d287050238e137ababadae8b8eb1ffdb96c7b' }))));
|
|
49
49
|
}
|
|
50
50
|
get host() { return index.getElement(this); }
|
|
51
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"z-table.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,
|
|
1
|
+
{"file":"z-table.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,8WAA8W,CAAC;AACjY,qBAAe,SAAS;;MCeX,MAAM;;;wBAON,KAAK;0BAMH,KAAK;;IAEV,gBAAgB;QACtB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;KAC7E;;;;IAOD,iBAAiB;QACf,IAAI,CAAC,0BAA0B,GAAG,IAAI,gBAAgB,CAAC;YACrD,IAAI,CAAC,gBAAgB,EAAE,CAAC;SACzB,CAAC,CAAC;QACH,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE;YACjD,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,CAAC,YAAY,CAAC;YAC/B,iBAAiB,EAAE,KAAK;SACzB,CAAC,CAAC;KACJ;IAED,oBAAoB;;QAClB,MAAA,IAAI,CAAC,0BAA0B,0CAAE,UAAU,EAAE,CAAC;KAC/C;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,UAAU,EAAE,IAAI,CAAC,UAAU,IAC/BD,kEACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,OAAO,IAEZA,oEAAa,CACT,CACD,EACP;KACH;;;;;;;","names":["h","Host"],"sources":["src/components/table/z-table/styles.css?tag=z-table&encapsulation=shadow","src/components/table/z-table/index.tsx"],"sourcesContent":[":host {\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n\n position: relative;\n display: block;\n overflow: auto;\n min-width: max-content;\n max-width: 100%;\n box-sizing: border-box;\n padding: var(--space-unit);\n background-color: var(--color-surface01);\n}\n\n:host([expandable]) {\n --z-table--expand-button-size: 40px;\n}\n\n:host([bordered]) {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n","import {Component, Element, Host, Prop, State, h} from \"@stencil/core\";\nimport \"../z-tbody/index\";\nimport \"../z-tfoot/index\";\nimport \"../z-thead/index\";\nimport \"../z-tr/index\";\n\n/**\n * ZTable component.\n * @slot - Table content (`z-thead`, `z-tbody`, `z-tfoot`, `z-tr`).\n * @cssprop --z-table--cells-padding - Padding of the cells.\n */\n@Component({\n tag: \"z-table\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZTable {\n @Element() host: HTMLZTableElement;\n\n /**\n * Whether the table cells should show a border between them.\n */\n @Prop({reflect: true})\n bordered = false;\n\n /**\n * Whether the table contains some expandable rows.\n */\n @State()\n expandable = false;\n\n private updateExpandable(): void {\n this.expandable = this.host.querySelectorAll(\"z-tr[expandable]\").length > 0;\n }\n\n private expandableMutationObserver: MutationObserver;\n\n /**\n * Setup the table creating a mutation observer for the expandable attribute.\n */\n componentWillLoad(): void {\n this.expandableMutationObserver = new MutationObserver(() => {\n this.updateExpandable();\n });\n this.expandableMutationObserver.observe(this.host, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: [\"expandable\"],\n attributeOldValue: false,\n });\n }\n\n disconnectedCallback(): void {\n this.expandableMutationObserver?.disconnect();\n }\n\n render(): HTMLZTableElement {\n return (\n <Host expandable={this.expandable}>\n <div\n class=\"table\"\n role=\"table\"\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -45,7 +45,7 @@ const ZToastNotificationList = class {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return index.h("slot", { key: '
|
|
48
|
+
return index.h("slot", { key: 'a9c11e55185366906495c445a3352f72254ae390', name: "toasts" });
|
|
49
49
|
}
|
|
50
50
|
get hostElement() { return index.getElement(this); }
|
|
51
51
|
static get watchers() { return {
|
|
@@ -4172,7 +4172,7 @@ const ZToastNotification = class {
|
|
|
4172
4172
|
} })))));
|
|
4173
4173
|
}
|
|
4174
4174
|
render() {
|
|
4175
|
-
return (index.h(index.Host, { key: '
|
|
4175
|
+
return (index.h(index.Host, { key: '2be336d6b255e861e1e60fc7fab83ae29a5dfb1b', style: { "--percentuale": `${this.percentage}%` }, class: this.transition ? this.transition : "", onAnimationEnd: (e) => {
|
|
4176
4176
|
if (this.autoclose && e.animationName.includes("slidein")) {
|
|
4177
4177
|
this.startClosingTimeout(this.autoclose);
|
|
4178
4178
|
}
|
|
@@ -25,10 +25,10 @@ const ZToggleButton = class {
|
|
|
25
25
|
this.toggleClick.emit(this.opened);
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (index.h("button", { key: '
|
|
28
|
+
return (index.h("button", { key: '7ea71641a362b06f79fc18c44f5722f148d68bca', tabindex: this.avoidclick ? "-1" : "0", class: {
|
|
29
29
|
"isopen": this.opened,
|
|
30
30
|
"avoid-clicks": this.avoidclick,
|
|
31
|
-
}, disabled: this.isdisabled, "aria-expanded": this.opened ? "true" : "false", "aria-label": this.ariaLabel, onClick: () => this.emitToggleClick() }, index.h("z-icon", { key: '
|
|
31
|
+
}, disabled: this.isdisabled, "aria-expanded": this.opened ? "true" : "false", "aria-label": this.ariaLabel, onClick: () => this.emitToggleClick() }, index.h("z-icon", { key: 'b6362ba86a8f2e9ae5778e70ec28712a541841cd', name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
ZToggleButton.style = ZToggleButtonStyle0;
|
|
@@ -33,14 +33,14 @@ const ZToggleSwitch = class {
|
|
|
33
33
|
this.emitToggleClick();
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (index.h(index.Host, { key: '
|
|
36
|
+
return (index.h(index.Host, { key: '25e15bfaa9fadcb7b96251ff8146905877233624' }, index.h("input", { key: '9f4f0be0fcf7fba56195998a16966b74a6e2324c', id: this.htmlid, type: "checkbox", checked: this.checked, disabled: this.disabled, onChange: this.handleClick.bind(this) }), index.h("label", { key: 'cc29c0e884c74f3beeaf81290ba607f17c67701a', htmlFor: this.htmlid, class: {
|
|
37
37
|
[this.labelPosition]: true,
|
|
38
38
|
disabled: this.disabled,
|
|
39
|
-
} }, index.h("span", { key: '
|
|
39
|
+
} }, index.h("span", { key: '757ccbc98f2a7f91ff5b3477fc149f4496d87189' }, index.h("slot", { key: '505879e878f513c75c8d9af2a82ede3259fe39a0' })), index.h("span", { key: '7d56c1e57c886cfe8f7ab2ce903958f07a1e83ba', class: {
|
|
40
40
|
container: true,
|
|
41
41
|
disabled: this.disabled,
|
|
42
42
|
checked: this.checked,
|
|
43
|
-
} }, index.h("span", { key: '
|
|
43
|
+
} }, index.h("span", { key: 'b2c587e20596144ddd26ab0a002ad560df156aa6', class: "circle" }, this.checked && (index.h("z-icon", { key: 'd438e7f776b8eae418293bfa827b4950285dc6da', width: 12, height: 12, name: "checkmark" })))))));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
ZToggleSwitch.style = ZToggleSwitchStyle0;
|
|
@@ -21,7 +21,7 @@ const ZTooltip = class {
|
|
|
21
21
|
this.open = this.popoverEl.open;
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (index.h("z-popover", { key: '
|
|
24
|
+
return (index.h("z-popover", { key: '7f3f2a54754ce53b4480eed65116bdff1cd0ac30', ref: (el) => (this.popoverEl = el), bindTo: this.bindTo, open: this.open, position: this.position, closable: this.closable, center: true, showArrow: true }, index.h("slot", { key: '37f2dab454e27b1817c9fc3ae68e5f29dfee13e8' })));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
ZTooltip.style = ZTooltipStyle0;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-c798013f.js');
|
|
6
6
|
require('./index-96af6326.js');
|
|
7
7
|
require('./utils-93961cb6.js');
|
|
8
8
|
require('./index-97a4c18d.js');
|
|
9
9
|
require('./breakpoints-8a1e87e0.js');
|
|
10
|
-
require('./index-
|
|
11
|
-
require('./index-
|
|
10
|
+
require('./index-09238e31.js');
|
|
11
|
+
require('./index-66928615.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -12,7 +12,7 @@ const ZVisuallyHidden = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return index.h("slot", { key: '
|
|
15
|
+
return index.h("slot", { key: 'b76451842cf32ab957ee81e9b689e94e35256524' });
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
ZVisuallyHidden.style = ZVisuallyHiddenStyle0;
|
|
@@ -29,7 +29,7 @@ export class ZTd {
|
|
|
29
29
|
this.updateColspan();
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: 'c9c2a31f99dc72acd54744c8c1abdbb56b0a7df3', role: "cell", "menu-open": this.isMenuOpen }, h("div", { key: 'f503630802052c5c3566b725aba40ea0923d60da', class: "cell--content" }, h("slot", { key: 'e26dc22a7b21eef5475d10124312384593957bf8' }), this.showMenu && (h("div", { key: '4c7204766c53e4502ff24e51e9ea751620246278', class: "cell--menu-container prevent-expand" }, h("z-button", { key: '3d0f59414241c2b195dd45cf74f678b15e957cac', variant: ButtonVariant.TERTIARY, icon: "contextual-menu", size: ControlSize.X_SMALL, ref: (el) => (this.menuTrigger = el), onClick: this.onMenuButtonClick.bind(this) }), h("z-popover", { key: '68d2f577c442c9a72009dd6365cd4182e9333d5a', class: "cell-popover", ref: (el) => (this.popoverEl = el), bindTo: this.menuTrigger, onOpenChange: (event) => (this.isMenuOpen = event.detail.open), position: this.popoverPosition }, h("slot", { key: 'c90cf570174b2e2af659ae02e217d725a1951cb4', name: "contextual-menu" })))))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "z-td"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/table/cells/z-td/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACnG,OAAO,EAAC,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AAEnG;;;GAGG;AAMH,MAAM,OAAO,GAAG;;;sBAaL,KAAK;wBAQkB,IAAI;+BAMA,eAAe,CAAC,IAAI;0BAM3C,KAAK;;IAgBR,aAAa;QACrB,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AC1B,CACR,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, PopoverPosition, VisibilityCondition} from \"../../../../beans\";\n\n/**\n * ZTd component.\n * @slot - ZTd content.\n */\n@Component({\n tag: \"z-td\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZTd {\n @Element() host: HTMLZTdElement;\n\n /**\n * Number of columns that the cell should span.\n */\n @Prop()\n colspan: number;\n\n /**\n * Whether the cell should stick.\n */\n @Prop({reflect: true})\n sticky = false;\n\n /**\n * Enables the contextual menu.\n * Can be set to \"hover\" or \"always\" to show the button only on cell hover or always.\n * Set a nullish value to hide the menu button.\n */\n @Prop({reflect: true})\n showMenu: VisibilityCondition = null;\n\n /**\n * Set the popover position, the default is \"auto\".\n */\n @Prop()\n popoverPosition?: PopoverPosition = PopoverPosition.AUTO;\n\n /**\n * Store the open state of the menu.\n */\n @State()\n isMenuOpen = false;\n\n private menuTrigger: HTMLZButtonElement;\n\n private popoverEl: HTMLZPopoverElement;\n\n /**\n * Emitted when the value of the `colspan` changes.\n */\n @Event({\n bubbles: true,\n cancelable: false,\n })\n colspanChange: EventEmitter<number>;\n\n @Watch(\"colspan\")\n protected updateColspan(): void {\n if (this.colspan) {\n this.host.style.gridColumn = `span ${this.colspan}`;\n } else {\n this.host.style.removeProperty(\"grid-column\");\n }\n\n this.colspanChange.emit(this.colspan || 1);\n }\n\n private onMenuButtonClick(ev: MouseEvent): void {\n ev.stopPropagation();\n this.popoverEl.open = !this.popoverEl.open;\n }\n\n componentWillLoad(): void {\n this.updateColspan();\n }\n\n render(): HTMLZTdElement {\n return (\n <Host\n role=\"cell\"\n menu-open={this.isMenuOpen}\n >\n <div class=\"cell--content\">\n <slot></slot>\n {this.showMenu && (\n <div class=\"cell--menu-container prevent-expand\">\n <z-button\n variant={ButtonVariant.TERTIARY}\n icon=\"contextual-menu\"\n size={ControlSize.X_SMALL}\n ref={(el) => (this.menuTrigger = el as HTMLZButtonElement)}\n onClick={this.onMenuButtonClick.bind(this)}\n />\n <z-popover\n class=\"cell-popover\"\n ref={(el) => (this.popoverEl = el as HTMLZPopoverElement)}\n bindTo={this.menuTrigger as HTMLElement}\n onOpenChange={(event) => (this.isMenuOpen = event.detail.open)}\n position={this.popoverPosition}\n >\n <slot name=\"contextual-menu\"></slot>\n </z-popover>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
display: flex;
|
|
4
4
|
max-width: 100%;
|
|
5
5
|
align-items: center;
|
|
6
|
-
padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));
|
|
6
|
+
padding: calc(var(--z-table--cells-padding, calc(var(--space-unit) * 2)));
|
|
7
7
|
background-color: var(--color-surface01);
|
|
8
8
|
gap: calc(var(--space-unit) * 2) var(--space-unit);
|
|
9
9
|
}
|
|
@@ -25,12 +25,6 @@
|
|
|
25
25
|
z-index: 2;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
:host(:focus) {
|
|
29
|
-
z-index: 20;
|
|
30
|
-
box-shadow: var(--shadow-focus-primary);
|
|
31
|
-
outline: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
28
|
.cell--content {
|
|
35
29
|
display: flex;
|
|
36
30
|
width: 100%;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
display: flex;
|
|
4
4
|
max-width: 100%;
|
|
5
5
|
align-items: center;
|
|
6
|
-
padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));
|
|
6
|
+
padding: calc(var(--z-table--cells-padding, calc(var(--space-unit) * 2)));
|
|
7
7
|
background-color: var(--color-surface01);
|
|
8
8
|
gap: calc(var(--space-unit) * 2) var(--space-unit);
|
|
9
9
|
}
|
|
@@ -25,12 +25,6 @@
|
|
|
25
25
|
z-index: 2;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
:host(:focus) {
|
|
29
|
-
z-index: 20;
|
|
30
|
-
box-shadow: var(--shadow-focus-primary);
|
|
31
|
-
outline: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
28
|
.cell--content {
|
|
35
29
|
display: flex;
|
|
36
30
|
width: 100%;
|
|
@@ -92,6 +86,7 @@
|
|
|
92
86
|
}
|
|
93
87
|
|
|
94
88
|
.z-th--sort-button {
|
|
89
|
+
position: relative;
|
|
95
90
|
padding: 0;
|
|
96
91
|
border: none;
|
|
97
92
|
background-color: transparent;
|
|
@@ -99,6 +94,14 @@
|
|
|
99
94
|
outline: none;
|
|
100
95
|
}
|
|
101
96
|
|
|
97
|
+
.z-th--sort-button:focus,
|
|
98
|
+
.z-th--sort-button:focus-visible {
|
|
99
|
+
box-shadow: var(--shadow-focus-primary);
|
|
100
|
+
opacity: 1;
|
|
101
|
+
outline: none;
|
|
102
|
+
pointer-events: all;
|
|
103
|
+
}
|
|
104
|
+
|
|
102
105
|
@media (min-width: 768px) and (hover: hover) {
|
|
103
106
|
:host([show-sorting="hover"]) .z-th--sort-button {
|
|
104
107
|
opacity: 0;
|
|
@@ -36,7 +36,7 @@ export class ZTable {
|
|
|
36
36
|
(_a = this.expandableMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '6749b44ab2c28b92e6b282487bf9f23c40cead58', expandable: this.expandable }, h("div", { key: '633237695b09182263ac74b5118d533a8cae33b8', class: "table", role: "table" }, h("slot", { key: 'f46d287050238e137ababadae8b8eb1ffdb96c7b' }))));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "z-table"; }
|
|
42
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,6 +2,7 @@ import { html } from "lit";
|
|
|
2
2
|
import { repeat } from "lit/directives/repeat.js";
|
|
3
3
|
import { styleMap } from "lit/directives/style-map.js";
|
|
4
4
|
import { PopoverPosition, SortDirection, VisibilityCondition } from "../../../beans";
|
|
5
|
+
import { boolean } from "../../../utils/utils";
|
|
5
6
|
import "../../z-button/index";
|
|
6
7
|
import "./index";
|
|
7
8
|
import "./index.stories.css";
|
|
@@ -176,6 +177,7 @@ export const Sticky = {
|
|
|
176
177
|
*/
|
|
177
178
|
export const CellsWithContextualMenu = {
|
|
178
179
|
argTypes: {
|
|
180
|
+
isFocusable: boolean,
|
|
179
181
|
showMenu: {
|
|
180
182
|
control: {
|
|
181
183
|
type: "inline-radio",
|
|
@@ -193,6 +195,7 @@ export const CellsWithContextualMenu = {
|
|
|
193
195
|
},
|
|
194
196
|
},
|
|
195
197
|
args: {
|
|
198
|
+
isFocusable: true,
|
|
196
199
|
showMenu: VisibilityCondition.HOVER,
|
|
197
200
|
popoverPosition: PopoverPosition.AUTO,
|
|
198
201
|
},
|
|
@@ -203,7 +206,7 @@ export const CellsWithContextualMenu = {
|
|
|
203
206
|
"--z-table--cells-padding": args["--z-table--cells-padding"],
|
|
204
207
|
})}
|
|
205
208
|
>
|
|
206
|
-
<z-thead>
|
|
209
|
+
<z-thead .isFocusable=${args.isFocusable}>
|
|
207
210
|
<z-tr>
|
|
208
211
|
<z-th>Colonna 1</z-th>
|
|
209
212
|
<z-th
|
|
@@ -237,6 +240,7 @@ export const CellsWithContextualMenu = {
|
|
|
237
240
|
*/
|
|
238
241
|
export const SortAction = {
|
|
239
242
|
argTypes: {
|
|
243
|
+
isFocusable: boolean,
|
|
240
244
|
showSorting: {
|
|
241
245
|
options: Object.values(VisibilityCondition),
|
|
242
246
|
control: {
|
|
@@ -245,6 +249,7 @@ export const SortAction = {
|
|
|
245
249
|
},
|
|
246
250
|
},
|
|
247
251
|
args: {
|
|
252
|
+
isFocusable: true,
|
|
248
253
|
showSorting: VisibilityCondition.HOVER,
|
|
249
254
|
},
|
|
250
255
|
render: (args) => html `<z-table
|
|
@@ -254,7 +259,7 @@ export const SortAction = {
|
|
|
254
259
|
"--z-table--cells-padding": args["--z-table--cells-padding"],
|
|
255
260
|
})}
|
|
256
261
|
>
|
|
257
|
-
<z-thead>
|
|
262
|
+
<z-thead .isFocusable=${args.isFocusable}>
|
|
258
263
|
<z-tr>
|
|
259
264
|
<z-th
|
|
260
265
|
.sortDirection=${SortDirection.ASC}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../../src/components/table/z-table/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAsB,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAEnF,OAAO,sBAAsB,CAAC;AAC9B,OAAO,SAAS,CAAC;AACjB,OAAO,qBAAqB,CAAC;AAI7B;;;;;;;;;;GAUG;AACH,MAAM,SAAS,GAAG;IAChB,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,0BAA0B,EAAE,MAAM;KACnC;CACgC,CAAC;AAEpC,eAAe,SAAS,CAAC;AAEzB,MAAM,aAAa,GAAG,CAAC,KAAK,GAAG,CAAC,EAAkB,EAAE,CAClD,IAAI,CAAA,GAAG,MAAM,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA,8BAA8B,CAAC,EAAE,CAAC;AAEnF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,CAAC,IAAI,EA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,IAAI,CAAA,SAAS,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;eACzE;CACd,CAAC","sourcesContent":["import {Meta} from \"@storybook/web-components\";\nimport {html, type TemplateResult} from \"lit\";\nimport {repeat} from \"lit/directives/repeat.js\";\nimport {styleMap} from \"lit/directives/style-map.js\";\nimport {type ZTable} from \".\";\nimport {PopoverPosition, SortDirection, VisibilityCondition} from \"../../../beans\";\nimport {CSSVarsArguments} from \"../../../utils/storybook-utils\";\nimport \"../../z-button/index\";\nimport \"./index\";\nimport \"./index.stories.css\";\n\ntype ZTableStoriesArgs = ZTable & CSSVarsArguments<\"z-table--cells-padding\">;\n\n/**\n * ## Accessibility\n *\n * The `ZTable` and its related components comes with a set of roles and ARIA attributes to help screen readers to understand the table structure and its content.\n * The roles are mainly used to identify the table parts, since they are not the native HTML table elements.\n * The ARIA attributes used are the following:\n * - [`aria-sort`](https://www.w3.org/TR/wai-aria-1.1/#aria-sort) to identify the sorting direction of a column when sorting is enabled\n * - [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.1/#aria-expanded) to identify if a row is expanded or not when expandable rows are enabled. The attribute is set on the button that expands the row, as explained in the [docs](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * - [`aria-controls`](https://www.w3.org/TR/wai-aria-1.1/#aria-controls) is used on the expandable row button to identify the content that is controlled by the button itself, as explained in the [docs](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls). Maybe the `aria-owns` attribute were more appropriate, but it is not supported on MacOS and iOS with VoiceOver, so we used `aria-controls` instead.\n * - [`aria-label`](https://www.w3.org/TR/wai-aria-1.1/#aria-label) is used on the expandable row button to provide a label for the button, since the button doesn't have any text content.\n */\nconst StoryMeta = {\n title: \"ZTable\",\n component: \"z-table\",\n args: {\n \"bordered\": true,\n \"--z-table--cells-padding\": \"16px\",\n },\n} satisfies Meta<ZTableStoriesArgs>;\n\nexport default StoryMeta;\n\nconst cellsTemplate = (count = 1): TemplateResult =>\n html`${repeat([...new Array(count)], () => html`<z-td>Contenuto cella</z-td>`)}`;\n\nexport const Default = {\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n })}\n >\n <z-thead>\n <z-tr>${repeat([...new Array(8)], () => html`<z-th>Titolo colonna</z-th>`)}</z-tr>\n </z-thead>\n <z-tbody>${repeat([...new Array(5)], () => html`<z-tr>${cellsTemplate(8)}</z-tr>`)}</z-tbody>\n <z-tfoot>\n <z-tr>\n <z-td colspan=\"8\">Table footer</z-td>\n </z-tr>\n </z-tfoot>\n </z-table>`,\n};\n\n/**\n * Just set `expandable` prop on the `z-tr` element to make it expandable, then put an additional `z-td` as extended content.\n * If you put a clickable item as a child cell of a z-tr with `expandable` set to `true`, you need to set a \"prevent-expand\" class on that item, in order to prevent unwanted row expansions.\n */\nexport const ExpandableRows = {\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n })}\n >\n <z-thead>\n <z-tr>${repeat([...new Array(8)], (_, index) => html`<z-th>Colonna ${index + 1}</z-th>`)}</z-tr>\n </z-thead>\n <z-tbody>\n <z-tr>\n <z-td>Contenuto cella</z-td>\n <z-td>Contenuto cella</z-td>\n <z-td show-menu>\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div></z-td\n >\n ${cellsTemplate(5)}\n </z-tr>\n <z-tr>${repeat([...new Array(8)], () => html`<z-td>Contenuto cella</z-td>`)}</z-tr>\n <z-tr expandable>\n <z-td>Contenuto cella</z-td>\n <z-td>Contenuto cella</z-td>\n <z-td>\n <span>Contenuto cella</span>\n <z-button\n class=\"prevent-expand\"\n onclick=\"alert('button clicked without expanding the row')\"\n icon=\"plus\"\n size=\"x-small\"\n ></z-button\n ></z-td>\n ${cellsTemplate(5)}\n <z-td>Contenuto espanso</z-td>\n </z-tr>\n <z-tr>${cellsTemplate(8)}</z-tr>\n <z-tr expandable>\n <z-td>Contenuto cella</z-td>\n <z-td show-menu=\"always\">\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div></z-td\n >\n ${cellsTemplate(6)}\n <z-td>Contenuto espanso</z-td>\n </z-tr>\n </z-tbody>\n <z-tfoot>\n <z-tr>\n <z-td colspan=\"8\">Table footer</z-td>\n </z-tr>\n </z-tfoot>\n </z-table>`,\n};\n\n/**\n * To make a column sticky, you need to set the `sticky` prop on the `z-th` and/or `z-td` elements of the same column.\n * For the header or footer, just set the `sticky` prop on the `z-thead` or `z-tfoot` element.\n */\nexport const Sticky = {\n args: {\n stickyHeader: true,\n stickyFooter: true,\n stickFirstColumn: true,\n },\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n \"height\": \"400px\",\n })}\n >\n <z-thead .sticky=${args.stickyHeader}>\n <z-tr>\n <z-th .sticky=${args.stickFirstColumn}>Colonna 1</z-th>\n ${repeat([...new Array(7)], (_, index) => html`<z-th>Colonna ${index + 2}</z-th>`)}\n </z-tr>\n </z-thead>\n <z-tbody>\n <z-tr>\n <z-td .sticky=${args.stickFirstColumn}>Contenuto cella 1</z-td>\n <z-td>Contenuto cella</z-td>\n <z-td>Contenuto cella</z-td>\n <z-td show-menu>\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div></z-td\n >\n ${cellsTemplate(4)}\n </z-tr>\n ${repeat(\n [...new Array(5)],\n () =>\n html`<z-tr>\n <z-td .sticky=${args.stickFirstColumn}>Contenuto cella 1</z-td>\n ${cellsTemplate(7)}\n </z-tr>`\n )}\n <z-tr expandable>\n <z-td .sticky=${args.stickFirstColumn}>Contenuto cella 1</z-td>\n ${cellsTemplate(6)}\n <z-td>\n <span>Contenuto cella</span>\n <z-button\n class=\"prevent-expand\"\n onclick=\"alert('button clicked')\"\n icon=\"plus\"\n size=\"x-small\"\n ></z-button\n ></z-td>\n <z-td>Contenuto espanso</z-td>\n </z-tr>\n <z-tr expandable>\n <z-td .sticky=${args.stickFirstColumn}>Contenuto cella 1</z-td>\n ${cellsTemplate(7)}\n <z-td>Contenuto espanso</z-td>\n </z-tr>\n </z-tbody>\n <z-tfoot .sticky=${args.stickyFooter}>\n <z-tr>\n <z-td colspan=\"8\">Table footer</z-td>\n </z-tr>\n </z-tfoot>\n </z-table>`,\n};\n\n/**\n * Use the `showMenu` prop on `z-td` or `z-th`, setting a value of the enum `VisibilityCondition` (`HOVER` or `ALWAYS`), to show a contextual menu button on the cell. The content of the menu must be placed using the slot `contextual-menu`.\n * Use `popoverPosition` prop on `z-th` to set the position of contextual menu, default is `auto`.\n */\nexport const CellsWithContextualMenu = {\n argTypes: {\n showMenu: {\n control: {\n type: \"inline-radio\",\n labels: {\n null: \"hidden\",\n },\n },\n popoverPosition: {\n options: Object.values(PopoverPosition),\n control: {\n type: \"select\",\n },\n },\n options: [null, ...Object.values(VisibilityCondition)],\n },\n },\n args: {\n showMenu: VisibilityCondition.HOVER,\n popoverPosition: PopoverPosition.AUTO,\n },\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n })}\n >\n <z-thead>\n <z-tr>\n <z-th>Colonna 1</z-th>\n <z-th\n .showMenu=${args.showMenu}\n .popoverPosition=${args.popoverPosition}\n >\n Heading con menu\n <div slot=\"contextual-menu\">Contenuto del popover</div>\n </z-th>\n <z-th>Colonna 2</z-th>\n </z-tr>\n </z-thead>\n <z-tbody>\n ${repeat(\n [...new Array(3)],\n () =>\n html`<z-tr>\n <z-td .showMenu=${args.showMenu}>\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div>\n </z-td>\n <z-td>Contenuto cella</z-td>\n <z-td .showMenu=${args.showMenu}>\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div>\n </z-td>\n </z-tr>`\n )}\n </z-tbody>\n </z-table>`,\n};\n\n/**\n * Set the `sortDirection` prop to `SortDirection.ASC` or `SortDirection.DESC` to enable sorting and show the sort button.\n * Clicking the button will fire the `sort` event with the `sortDirection` as detail.\n */\nexport const SortAction = {\n argTypes: {\n showSorting: {\n options: Object.values(VisibilityCondition),\n control: {\n type: \"inline-radio\",\n },\n },\n },\n args: {\n showSorting: VisibilityCondition.HOVER,\n },\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n })}\n >\n <z-thead>\n <z-tr>\n <z-th\n .sortDirection=${SortDirection.ASC}\n .showMenu=${VisibilityCondition.HOVER}\n .showSorting=${args.showSorting}\n >\n Colonna 1 con menu e sorting\n <div slot=\"contextual-menu\">Contenuto del popover</div>\n </z-th>\n <z-th>Colonna 2</z-th>\n <z-th\n .sortDirection=${SortDirection.DESC}\n .showSorting=${args.showSorting}\n >Colonna 3 con sorting</z-th\n >\n </z-tr>\n </z-thead>\n <z-tbody>${repeat([...new Array(3)], () => html`<z-tr>${cellsTemplate(3)}</z-tr>`)}</z-tbody>\n </z-table>`,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../../src/components/table/z-table/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAsB,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;A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AAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE;QACR,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE;YACX,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC;YAC3C,OAAO,EAAE;gBACP,IAAI,EAAE,cAAc;aACrB;SACF;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,mBAAmB,CAAC,KAAK;KACvC;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAA;;kBAEU,IAAI,CAAC,QAAQ;cACjB,QAAQ,CAAC;QACf,0BAA0B,EAAE,IAAI,CAAC,0BAA0B,CAAC;KAC7D,CAAC;;8BAEsB,IAAI,CAAC,WAAW;;;6BAGjB,aAAa,CAAC,GAAG;wBACtB,mBAAmB,CAAC,KAAK;2BACtB,IAAI,CAAC,WAAW;;;;;;;6BAOd,aAAa,CAAC,IAAI;2BACpB,IAAI,CAAC,WAAW;;;;;iBAK1B,MAAM,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA,SAAS,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;eACzE;CACd,CAAC","sourcesContent":["import {Meta} from \"@storybook/web-components\";\nimport {html, type TemplateResult} from \"lit\";\nimport {repeat} from \"lit/directives/repeat.js\";\nimport {styleMap} from \"lit/directives/style-map.js\";\nimport {type ZTable} from \".\";\nimport {PopoverPosition, SortDirection, VisibilityCondition} from \"../../../beans\";\nimport {CSSVarsArguments} from \"../../../utils/storybook-utils\";\nimport {boolean} from \"../../../utils/utils\";\nimport \"../../z-button/index\";\nimport \"./index\";\nimport \"./index.stories.css\";\n\ntype ZTableStoriesArgs = ZTable & CSSVarsArguments<\"z-table--cells-padding\">;\n\n/**\n * ## Accessibility\n *\n * The `ZTable` and its related components comes with a set of roles and ARIA attributes to help screen readers to understand the table structure and its content.\n * The roles are mainly used to identify the table parts, since they are not the native HTML table elements.\n * The ARIA attributes used are the following:\n * - [`aria-sort`](https://www.w3.org/TR/wai-aria-1.1/#aria-sort) to identify the sorting direction of a column when sorting is enabled\n * - [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.1/#aria-expanded) to identify if a row is expanded or not when expandable rows are enabled. The attribute is set on the button that expands the row, as explained in the [docs](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * - [`aria-controls`](https://www.w3.org/TR/wai-aria-1.1/#aria-controls) is used on the expandable row button to identify the content that is controlled by the button itself, as explained in the [docs](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls). Maybe the `aria-owns` attribute were more appropriate, but it is not supported on MacOS and iOS with VoiceOver, so we used `aria-controls` instead.\n * - [`aria-label`](https://www.w3.org/TR/wai-aria-1.1/#aria-label) is used on the expandable row button to provide a label for the button, since the button doesn't have any text content.\n */\nconst StoryMeta = {\n title: \"ZTable\",\n component: \"z-table\",\n args: {\n \"bordered\": true,\n \"--z-table--cells-padding\": \"16px\",\n },\n} satisfies Meta<ZTableStoriesArgs>;\n\nexport default StoryMeta;\n\nconst cellsTemplate = (count = 1): TemplateResult =>\n html`${repeat([...new Array(count)], () => html`<z-td>Contenuto cella</z-td>`)}`;\n\nexport const Default = {\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n })}\n >\n <z-thead>\n <z-tr>${repeat([...new Array(8)], () => html`<z-th>Titolo colonna</z-th>`)}</z-tr>\n </z-thead>\n <z-tbody>${repeat([...new Array(5)], () => html`<z-tr>${cellsTemplate(8)}</z-tr>`)}</z-tbody>\n <z-tfoot>\n <z-tr>\n <z-td colspan=\"8\">Table footer</z-td>\n </z-tr>\n </z-tfoot>\n </z-table>`,\n};\n\n/**\n * Just set `expandable` prop on the `z-tr` element to make it expandable, then put an additional `z-td` as extended content.\n * If you put a clickable item as a child cell of a z-tr with `expandable` set to `true`, you need to set a \"prevent-expand\" class on that item, in order to prevent unwanted row expansions.\n */\nexport const ExpandableRows = {\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n })}\n >\n <z-thead>\n <z-tr>${repeat([...new Array(8)], (_, index) => html`<z-th>Colonna ${index + 1}</z-th>`)}</z-tr>\n </z-thead>\n <z-tbody>\n <z-tr>\n <z-td>Contenuto cella</z-td>\n <z-td>Contenuto cella</z-td>\n <z-td show-menu>\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div></z-td\n >\n ${cellsTemplate(5)}\n </z-tr>\n <z-tr>${repeat([...new Array(8)], () => html`<z-td>Contenuto cella</z-td>`)}</z-tr>\n <z-tr expandable>\n <z-td>Contenuto cella</z-td>\n <z-td>Contenuto cella</z-td>\n <z-td>\n <span>Contenuto cella</span>\n <z-button\n class=\"prevent-expand\"\n onclick=\"alert('button clicked without expanding the row')\"\n icon=\"plus\"\n size=\"x-small\"\n ></z-button\n ></z-td>\n ${cellsTemplate(5)}\n <z-td>Contenuto espanso</z-td>\n </z-tr>\n <z-tr>${cellsTemplate(8)}</z-tr>\n <z-tr expandable>\n <z-td>Contenuto cella</z-td>\n <z-td show-menu=\"always\">\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div></z-td\n >\n ${cellsTemplate(6)}\n <z-td>Contenuto espanso</z-td>\n </z-tr>\n </z-tbody>\n <z-tfoot>\n <z-tr>\n <z-td colspan=\"8\">Table footer</z-td>\n </z-tr>\n </z-tfoot>\n </z-table>`,\n};\n\n/**\n * To make a column sticky, you need to set the `sticky` prop on the `z-th` and/or `z-td` elements of the same column.\n * For the header or footer, just set the `sticky` prop on the `z-thead` or `z-tfoot` element.\n */\nexport const Sticky = {\n args: {\n stickyHeader: true,\n stickyFooter: true,\n stickFirstColumn: true,\n },\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n \"height\": \"400px\",\n })}\n >\n <z-thead .sticky=${args.stickyHeader}>\n <z-tr>\n <z-th .sticky=${args.stickFirstColumn}>Colonna 1</z-th>\n ${repeat([...new Array(7)], (_, index) => html`<z-th>Colonna ${index + 2}</z-th>`)}\n </z-tr>\n </z-thead>\n <z-tbody>\n <z-tr>\n <z-td .sticky=${args.stickFirstColumn}>Contenuto cella 1</z-td>\n <z-td>Contenuto cella</z-td>\n <z-td>Contenuto cella</z-td>\n <z-td show-menu>\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div></z-td\n >\n ${cellsTemplate(4)}\n </z-tr>\n ${repeat(\n [...new Array(5)],\n () =>\n html`<z-tr>\n <z-td .sticky=${args.stickFirstColumn}>Contenuto cella 1</z-td>\n ${cellsTemplate(7)}\n </z-tr>`\n )}\n <z-tr expandable>\n <z-td .sticky=${args.stickFirstColumn}>Contenuto cella 1</z-td>\n ${cellsTemplate(6)}\n <z-td>\n <span>Contenuto cella</span>\n <z-button\n class=\"prevent-expand\"\n onclick=\"alert('button clicked')\"\n icon=\"plus\"\n size=\"x-small\"\n ></z-button\n ></z-td>\n <z-td>Contenuto espanso</z-td>\n </z-tr>\n <z-tr expandable>\n <z-td .sticky=${args.stickFirstColumn}>Contenuto cella 1</z-td>\n ${cellsTemplate(7)}\n <z-td>Contenuto espanso</z-td>\n </z-tr>\n </z-tbody>\n <z-tfoot .sticky=${args.stickyFooter}>\n <z-tr>\n <z-td colspan=\"8\">Table footer</z-td>\n </z-tr>\n </z-tfoot>\n </z-table>`,\n};\n\n/**\n * Use the `showMenu` prop on `z-td` or `z-th`, setting a value of the enum `VisibilityCondition` (`HOVER` or `ALWAYS`), to show a contextual menu button on the cell. The content of the menu must be placed using the slot `contextual-menu`.\n * Use `popoverPosition` prop on `z-th` to set the position of contextual menu, default is `auto`.\n */\nexport const CellsWithContextualMenu = {\n argTypes: {\n isFocusable: boolean,\n showMenu: {\n control: {\n type: \"inline-radio\",\n labels: {\n null: \"hidden\",\n },\n },\n popoverPosition: {\n options: Object.values(PopoverPosition),\n control: {\n type: \"select\",\n },\n },\n options: [null, ...Object.values(VisibilityCondition)],\n },\n },\n args: {\n isFocusable: true,\n showMenu: VisibilityCondition.HOVER,\n popoverPosition: PopoverPosition.AUTO,\n },\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n })}\n >\n <z-thead .isFocusable=${args.isFocusable}>\n <z-tr>\n <z-th>Colonna 1</z-th>\n <z-th\n .showMenu=${args.showMenu}\n .popoverPosition=${args.popoverPosition}\n >\n Heading con menu\n <div slot=\"contextual-menu\">Contenuto del popover</div>\n </z-th>\n <z-th>Colonna 2</z-th>\n </z-tr>\n </z-thead>\n <z-tbody>\n ${repeat(\n [...new Array(3)],\n () =>\n html`<z-tr>\n <z-td .showMenu=${args.showMenu}>\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div>\n </z-td>\n <z-td>Contenuto cella</z-td>\n <z-td .showMenu=${args.showMenu}>\n <span>Contenuto cella con menu</span>\n <div slot=\"contextual-menu\">Contenuto del popover</div>\n </z-td>\n </z-tr>`\n )}\n </z-tbody>\n </z-table>`,\n};\n\n/**\n * Set the `sortDirection` prop to `SortDirection.ASC` or `SortDirection.DESC` to enable sorting and show the sort button.\n * Clicking the button will fire the `sort` event with the `sortDirection` as detail.\n */\nexport const SortAction = {\n argTypes: {\n isFocusable: boolean,\n showSorting: {\n options: Object.values(VisibilityCondition),\n control: {\n type: \"inline-radio\",\n },\n },\n },\n args: {\n isFocusable: true,\n showSorting: VisibilityCondition.HOVER,\n },\n render: (args) =>\n html`<z-table\n class=\"z-table-demo\"\n .bordered=${args.bordered}\n style=${styleMap({\n \"--z-table--cells-padding\": args[\"--z-table--cells-padding\"],\n })}\n >\n <z-thead .isFocusable=${args.isFocusable}>\n <z-tr>\n <z-th\n .sortDirection=${SortDirection.ASC}\n .showMenu=${VisibilityCondition.HOVER}\n .showSorting=${args.showSorting}\n >\n Colonna 1 con menu e sorting\n <div slot=\"contextual-menu\">Contenuto del popover</div>\n </z-th>\n <z-th>Colonna 2</z-th>\n <z-th\n .sortDirection=${SortDirection.DESC}\n .showSorting=${args.showSorting}\n >Colonna 3 con sorting</z-th\n >\n </z-tr>\n </z-thead>\n <z-tbody>${repeat([...new Array(3)], () => html`<z-tr>${cellsTemplate(3)}</z-tr>`)}</z-tbody>\n </z-table>`,\n};\n"]}
|
|
@@ -8,7 +8,7 @@ export class ZTfoot {
|
|
|
8
8
|
this.sticky = false;
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: 'a7106c5ef3c347b7cc797a6cd1031e5d29cf2ae3', role: "rowgroup", tabIndex: -1 }, h("slot", { key: 'cd4f042bdfd7df449603fbcb49cf4b78da6f4d36' })));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "z-tfoot"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/table/z-tfoot/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAEvD;;;GAGG;AAMH,MAAM,OAAO,MAAM;;sBAKR,KAAK;;IAEd,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/table/z-tfoot/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAEvD;;;GAGG;AAMH,MAAM,OAAO,MAAM;;sBAKR,KAAK;;IAEd,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC;YAEZ,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Host, Prop, h} from \"@stencil/core\";\n\n/**\n * ZTFoot component.\n * @slot - ZTFoot content (`z-tr`).\n */\n@Component({\n tag: \"z-tfoot\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZTfoot {\n /**\n * If true, the footer will be stuck to the bottom of the table.\n */\n @Prop({reflect: true})\n sticky = false;\n\n render(): void {\n return (\n <Host\n role=\"rowgroup\"\n tabIndex={-1}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -6,9 +6,10 @@ import { Host, h } from "@stencil/core";
|
|
|
6
6
|
export class ZThead {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.sticky = false;
|
|
9
|
+
this.isFocusable = false;
|
|
9
10
|
}
|
|
10
11
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '17fe1d87112460ce7b7dd16e72cb3be1b92c7eb3', role: "rowgroup", tabIndex: this.isFocusable ? 0 : -1 }, h("slot", { key: 'ef0c0e95a383057b7ed5964f7c24cb8a59b31808' })));
|
|
12
13
|
}
|
|
13
14
|
static get is() { return "z-thead"; }
|
|
14
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -41,8 +42,27 @@ export class ZThead {
|
|
|
41
42
|
"attribute": "sticky",
|
|
42
43
|
"reflect": true,
|
|
43
44
|
"defaultValue": "false"
|
|
45
|
+
},
|
|
46
|
+
"isFocusable": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "boolean",
|
|
51
|
+
"resolved": "boolean",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": "The element is focusable"
|
|
59
|
+
},
|
|
60
|
+
"attribute": "is-focusable",
|
|
61
|
+
"reflect": true,
|
|
62
|
+
"defaultValue": "false"
|
|
44
63
|
}
|
|
45
64
|
};
|
|
46
65
|
}
|
|
66
|
+
static get elementRef() { return "host"; }
|
|
47
67
|
}
|
|
48
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/table/z-thead/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/table/z-thead/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAEhE;;;GAGG;AAMH,MAAM,OAAO,MAAM;;sBAOR,KAAK;2BAMA,KAAK;;IAEnB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAEnC,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Host, Prop, h} from \"@stencil/core\";\n\n/**\n * ZThead component.\n * @slot - ZThead content (`z-tr`).\n */\n@Component({\n tag: \"z-thead\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZThead {\n @Element() host: HTMLZTheadElement;\n\n /**\n * If true, the header will be stuck to the top of the table.\n */\n @Prop({reflect: true})\n sticky = false;\n\n /**\n * The element is focusable\n */\n @Prop({reflect: true})\n isFocusable = false;\n\n render(): HTMLZTheadElement {\n return (\n <Host\n role=\"rowgroup\"\n tabIndex={this.isFocusable ? 0 : -1}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -39,11 +39,25 @@ export class ZTr {
|
|
|
39
39
|
this.expanded = !this.expanded;
|
|
40
40
|
this.expand.emit({ expanded: this.expanded });
|
|
41
41
|
}
|
|
42
|
+
onKeyDown(event) {
|
|
43
|
+
if (!this.expandable) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const active = document.activeElement;
|
|
47
|
+
if (active !== this.host) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
this.expanded = !this.expanded;
|
|
53
|
+
this.expand.emit({ expanded: this.expanded });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
42
56
|
componentWillLoad() {
|
|
43
57
|
this.updateColumns();
|
|
44
58
|
}
|
|
45
59
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '5a8cbf39900a7569b0fb31d225be6fade59c82ea', role: "row", tabIndex: 0, expanded: this.expanded, onClick: this.onRowClick.bind(this), onKeyDown: this.onKeyDown.bind(this) }, h("div", { key: '75f7a74a6eda8f50d40beedbe387da74d58c276b', class: "z-tr--focus-overlay", "aria-hidden": "true" }), h("div", { key: 'd34b5aa1778f3d830fd80354c79cd93a9b703737', class: "z-tr--expand-button-container" }, this.expandable && (h("button", { key: 'fef99c968e191fe7970665b9a45721fada207db0', tabIndex: -1, "aria-expanded": this.expanded ? "true" : "false", "aria-label": this.expanded ? "Comprimi riga" : "Espandi riga", "aria-controls": this.expandableContentId, type: "button" }, h("z-icon", { key: 'f1cf676da370f0c2500914decdc5f09e1e647b7f', name: this.expanded ? "minus-circled" : "plus-circled" })))), h("slot", { key: 'cd09d8ed8cf0a33137d4d1d91ec9720227f359ba', onSlotchange: this.updateColumns.bind(this) })));
|
|
47
61
|
}
|
|
48
62
|
static get is() { return "z-tr"; }
|
|
49
63
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/table/z-tr/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAE7B;;;;;GAKG;AAMH,MAAM,OAAO,GAAG;;0BAaD,KAAK;wBAMP,KAAK;;;IAeN,aAAa;QACrB,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAkC,YAAY,CAAC,CAAC,CAAC;QACpG,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,KAAK,CAAC,GAAG,EAAE,CAAC;QACd,CAAC;QAED,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAClF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAEvD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,MAAM,iBAAiB,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C,eAAe,CAAC,CAAC,CAAC,cAAc,GAAW,CAClE,CACV,CACG;YACN,6DAAM,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAS,CACrD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {randomId} from \"../../../utils/utils\";\nimport \"../cells/z-td/index\";\nimport \"../cells/z-th/index\";\n\n/**\n * ZTr component.\n * When the row is `expandable`, you can set the `prevent-expand` css class on an interactive element inside the row\n * to prevent the row from expanding.\n * @slot - ZTr content (`z-td` or `z-th`).\n */\n@Component({\n tag: \"z-tr\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZTr {\n @Element() host: HTMLZTrElement;\n\n /**\n * Whether the row is expandable.\n * Use a `z-td` as the last cell of the row for the additional content.\n * It will show a button to expand/collapse the row.\n * The last cell will be hidden until the button or row is clicked.\n *\n * If some element inside the expandable row contains the `prevent-expand` css class,\n * the row will not expand by clicking that element.\n */\n @Prop({reflect: true})\n expandable = false;\n\n /**\n * Whether the row is currently expanded.\n */\n @State()\n expanded = false;\n\n /**\n * HTML Id of the expandable content.\n * It is used to link the button to the content through the `aria-controls` attribute.\n */\n @State()\n expandableContentId: string;\n\n /** Row has been expanded */\n @Event()\n expand: EventEmitter;\n\n @Watch(\"expandable\")\n @Listen(\"colspanchange\")\n protected updateColumns(): void {\n const cells = Array.from(this.host.querySelectorAll<HTMLZTdElement | HTMLZThElement>(\"z-td, z-th\"));\n if (this.expandable) {\n cells.pop();\n }\n\n const columns = cells.map((cell) => cell.colspan || 1).reduce((a, b) => a + b, 0);\n this.host.style.setProperty(\"--columns\", `${columns}`);\n\n if (this.expandable) {\n const expandableContent = cells.pop();\n expandableContent.id = expandableContent.id || `z-tr-expandable-content-${randomId()}`;\n this.expandableContentId = expandableContent.id;\n }\n }\n\n /**\n * Handle click on row.\n * Skip expansion if the click is on a element with `prevent-expand` css class.\n */\n private onRowClick(event: MouseEvent): void {\n const preventExpand = (event.target as HTMLElement).closest(\".prevent-expand\");\n if (!this.expandable || preventExpand) {\n return;\n }\n\n this.expanded = !this.expanded;\n this.expand.emit({expanded: this.expanded});\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n if (!this.expandable) {\n return;\n }\n\n const active = document.activeElement;\n if (active !== this.host) {\n return;\n }\n\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n this.expanded = !this.expanded;\n this.expand.emit({expanded: this.expanded});\n }\n }\n\n componentWillLoad(): void {\n this.updateColumns();\n }\n\n render(): HTMLZTrElement {\n return (\n <Host\n role=\"row\"\n tabIndex={0}\n expanded={this.expanded}\n onClick={this.onRowClick.bind(this)}\n onKeyDown={this.onKeyDown.bind(this)}\n >\n <div\n class=\"z-tr--focus-overlay\"\n aria-hidden=\"true\"\n ></div>\n <div class=\"z-tr--expand-button-container\">\n {this.expandable && (\n <button\n tabIndex={-1}\n aria-expanded={this.expanded ? \"true\" : \"false\"}\n aria-label={this.expanded ? \"Comprimi riga\" : \"Espandi riga\"}\n aria-controls={this.expandableContentId}\n type=\"button\"\n >\n <z-icon name={this.expanded ? \"minus-circled\" : \"plus-circled\"}></z-icon>\n </button>\n )}\n </div>\n <slot onSlotchange={this.updateColumns.bind(this)}></slot>\n </Host>\n );\n }\n}\n"]}
|