@zanichelli/albe-web-components 15.0.1-RC → 15.0.2
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 +5 -1
- package/dist/cjs/index-5dc4a8de.js +10 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-f5f944ed.js → utils-2b313a8e.js} +1 -1
- package/dist/cjs/{utils-f5f944ed.js.map → utils-2b313a8e.js.map} +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/{z-app-header_15.cjs.entry.js → z-app-header_12.cjs.entry.js} +21 -1240
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -0
- package/dist/cjs/z-book-card.cjs.entry.js +1 -1
- package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js.map +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1033 -0
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -0
- package/dist/cjs/z-file-upload.cjs.entry.js +215 -0
- package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -0
- package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-list.cjs.entry.js.map +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/z-notification.cjs.entry.js +1 -1
- package/dist/cjs/z-notification.cjs.entry.js.map +1 -1
- package/dist/cjs/z-otp.cjs.entry.js +1 -1
- package/dist/cjs/z-otp.cjs.entry.js.map +1 -1
- package/dist/cjs/z-range-picker.cjs.entry.js +1 -1
- package/dist/cjs/z-slideshow.cjs.entry.js +1 -1
- package/dist/cjs/z-slideshow.cjs.entry.js.map +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js.map +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.js +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.spec.js +3 -3
- package/dist/collection/components/file-upload/z-file-upload/index.spec.js.map +1 -1
- package/dist/collection/components/file-upload/z-file-upload/styles.css +5 -0
- package/dist/collection/components/z-app-header/styles.css +5 -0
- package/dist/collection/components/z-book-card/styles.css +10 -0
- package/dist/collection/components/z-card/styles.css +15 -0
- package/dist/collection/components/z-input/styles-checkbox-radio.css +8 -1
- package/dist/collection/components/z-input/styles-general.css +1 -1
- package/dist/collection/components/z-input/styles-text.css +5 -0
- package/dist/collection/components/z-modal/index.js +13 -4
- package/dist/collection/components/z-modal/index.js.map +1 -1
- package/dist/collection/components/z-modal/styles.css +18 -19
- package/dist/collection/components/z-navigation-tabs/styles.css +1 -1
- package/dist/collection/components/z-notification/styles.css +6 -1
- package/dist/collection/components/z-searchbar/styles.css +5 -0
- package/dist/collection/components/z-stepper/index.js +2 -2
- package/dist/collection/components/z-stepper/index.js.map +1 -1
- package/dist/collection/components/z-stepper/index.stories.js +44 -3
- package/dist/collection/components/z-stepper/index.stories.js.map +1 -1
- package/dist/collection/components/z-stepper-item/index.stories.js +44 -19
- package/dist/collection/components/z-stepper-item/index.stories.js.map +1 -1
- package/dist/collection/components/z-tag/index.stories.js +11 -7
- package/dist/collection/components/z-tag/index.stories.js.map +1 -1
- package/dist/collection/components/z-toast-notification/styles.css +12 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/styles.css +5 -0
- package/dist/collection/snowflakes/myz/z-otp/styles.css +5 -0
- package/dist/collection/snowflakes/myz/z-slideshow/styles.css +7 -0
- package/dist/components/index10.js +3 -3
- package/dist/components/index10.js.map +1 -1
- package/dist/components/index15.js +14 -5
- package/dist/components/index15.js.map +1 -1
- package/dist/components/index26.js +1 -1
- package/dist/components/index26.js.map +1 -1
- package/dist/components/z-app-header.js +1 -1
- package/dist/components/z-app-header.js.map +1 -1
- package/dist/components/z-book-card.js +1 -1
- package/dist/components/z-book-card.js.map +1 -1
- package/dist/components/z-card.js +1 -1
- package/dist/components/z-card.js.map +1 -1
- package/dist/components/z-file-upload.js +2 -2
- package/dist/components/z-file-upload.js.map +1 -1
- package/dist/components/z-myz-card-list.js +1 -1
- package/dist/components/z-myz-card-list.js.map +1 -1
- package/dist/components/z-navigation-tabs.js +1 -1
- package/dist/components/z-navigation-tabs.js.map +1 -1
- package/dist/components/z-notification.js +1 -1
- package/dist/components/z-notification.js.map +1 -1
- package/dist/components/z-otp.js +1 -1
- package/dist/components/z-otp.js.map +1 -1
- package/dist/components/z-slideshow.js +1 -1
- package/dist/components/z-slideshow.js.map +1 -1
- package/dist/components/z-stepper.js +1 -1
- package/dist/components/z-stepper.js.map +1 -1
- package/dist/components/z-toast-notification.js +1 -1
- package/dist/components/z-toast-notification.js.map +1 -1
- package/dist/esm/index-ab5f1eaa.js +10 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-ba4f0770.js → utils-cd008fbc.js} +1 -1
- package/dist/esm/{utils-ba4f0770.js.map → utils-cd008fbc.js.map} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/{z-app-header_15.entry.js → z-app-header_12.entry.js} +24 -1240
- package/dist/esm/z-app-header_12.entry.js.map +1 -0
- package/dist/esm/z-book-card.entry.js +1 -1
- package/dist/esm/z-book-card.entry.js.map +1 -1
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-card.entry.js.map +1 -1
- package/dist/esm/z-date-picker.entry.js +1 -1
- package/dist/esm/z-dragdrop-area_2.entry.js +1028 -0
- package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -0
- package/dist/esm/z-file-upload.entry.js +211 -0
- package/dist/esm/z-file-upload.entry.js.map +1 -0
- package/dist/esm/z-myz-card-list.entry.js +1 -1
- package/dist/esm/z-myz-card-list.entry.js.map +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js.map +1 -1
- package/dist/esm/z-notification.entry.js +1 -1
- package/dist/esm/z-notification.entry.js.map +1 -1
- package/dist/esm/z-otp.entry.js +1 -1
- package/dist/esm/z-otp.entry.js.map +1 -1
- package/dist/esm/z-range-picker.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js.map +1 -1
- package/dist/esm/z-stepper.entry.js +1 -1
- package/dist/esm/z-stepper.entry.js.map +1 -1
- package/dist/esm/z-toast-notification.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js.map +1 -1
- package/dist/esm-es5/index-ab5f1eaa.js +1 -1
- package/dist/esm-es5/index-ab5f1eaa.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/{utils-ba4f0770.js → utils-cd008fbc.js} +1 -1
- package/dist/esm-es5/web-components-library.js +1 -1
- package/dist/esm-es5/web-components-library.js.map +1 -1
- package/dist/esm-es5/z-app-header_12.entry.js +2 -0
- package/dist/esm-es5/z-app-header_12.entry.js.map +1 -0
- package/dist/esm-es5/z-book-card.entry.js +1 -1
- package/dist/esm-es5/z-book-card.entry.js.map +1 -1
- package/dist/esm-es5/z-card.entry.js +1 -1
- package/dist/esm-es5/z-card.entry.js.map +1 -1
- package/dist/esm-es5/z-date-picker.entry.js +1 -1
- package/dist/esm-es5/z-dragdrop-area_2.entry.js +2 -0
- package/dist/esm-es5/z-dragdrop-area_2.entry.js.map +1 -0
- package/dist/esm-es5/z-file-upload.entry.js +2 -0
- package/dist/esm-es5/z-file-upload.entry.js.map +1 -0
- package/dist/esm-es5/z-myz-card-list.entry.js +1 -1
- package/dist/esm-es5/z-myz-card-list.entry.js.map +1 -1
- package/dist/esm-es5/z-navigation-tabs.entry.js +1 -1
- package/dist/esm-es5/z-navigation-tabs.entry.js.map +1 -1
- package/dist/esm-es5/z-notification.entry.js +1 -1
- package/dist/esm-es5/z-notification.entry.js.map +1 -1
- package/dist/esm-es5/z-otp.entry.js +1 -1
- package/dist/esm-es5/z-otp.entry.js.map +1 -1
- package/dist/esm-es5/z-range-picker.entry.js +1 -1
- package/dist/esm-es5/z-slideshow.entry.js +1 -1
- package/dist/esm-es5/z-slideshow.entry.js.map +1 -1
- package/dist/esm-es5/z-stepper.entry.js +1 -1
- package/dist/esm-es5/z-stepper.entry.js.map +1 -1
- package/dist/esm-es5/z-toast-notification.entry.js +1 -1
- package/dist/esm-es5/z-toast-notification.entry.js.map +1 -1
- package/dist/types/components/z-modal/index.d.ts +1 -0
- package/dist/types/components/z-stepper/index.d.ts +1 -1
- package/dist/types/components/z-stepper/index.stories.d.ts +6 -0
- package/dist/types/components/z-stepper-item/index.stories.d.ts +22 -9
- package/dist/types/components/z-tag/index.stories.d.ts +6 -2
- package/dist/web-components-library/p-0108191f.system.entry.js +2 -0
- package/dist/web-components-library/{p-ffee2568.system.entry.js.map → p-0108191f.system.entry.js.map} +1 -1
- package/dist/web-components-library/p-05827ca5.entry.js +2 -0
- package/dist/web-components-library/{p-8f28871c.entry.js.map → p-05827ca5.entry.js.map} +1 -1
- package/dist/web-components-library/p-0a6424ef.entry.js +2 -0
- package/dist/web-components-library/p-0a6424ef.entry.js.map +1 -0
- package/dist/web-components-library/p-0bde1f0e.entry.js +2 -0
- package/dist/web-components-library/{p-df6ef4b4.entry.js.map → p-0bde1f0e.entry.js.map} +1 -1
- package/{www/build/p-3b801ea6.entry.js → dist/web-components-library/p-0e342fa3.entry.js} +2 -2
- package/dist/web-components-library/{p-fb6c02f1.entry.js → p-114088a1.entry.js} +2 -2
- package/dist/web-components-library/p-12008903.system.entry.js +2 -0
- package/dist/web-components-library/p-12008903.system.entry.js.map +1 -0
- package/dist/web-components-library/p-16b1b35a.entry.js +2 -0
- package/dist/web-components-library/p-16b1b35a.entry.js.map +1 -0
- package/dist/web-components-library/p-21941767.entry.js +2 -0
- package/dist/web-components-library/p-21941767.entry.js.map +1 -0
- package/dist/web-components-library/p-22d9f9c3.entry.js +2 -0
- package/dist/web-components-library/p-22d9f9c3.entry.js.map +1 -0
- package/dist/web-components-library/p-23975a98.system.entry.js +2 -0
- package/dist/web-components-library/p-23975a98.system.entry.js.map +1 -0
- package/dist/web-components-library/p-25872e04.system.entry.js +2 -0
- package/dist/web-components-library/p-25872e04.system.entry.js.map +1 -0
- package/{www/build/p-7519c72d.system.entry.js → dist/web-components-library/p-2dd2d037.system.entry.js} +2 -2
- package/dist/web-components-library/p-2df54d7d.entry.js +2 -0
- package/dist/web-components-library/p-2df54d7d.entry.js.map +1 -0
- package/dist/web-components-library/p-33368291.system.entry.js +2 -0
- package/dist/web-components-library/p-33368291.system.entry.js.map +1 -0
- package/dist/web-components-library/p-49256720.system.entry.js +2 -0
- package/dist/web-components-library/p-49256720.system.entry.js.map +1 -0
- package/{www/build/p-662c8342.js → dist/web-components-library/p-49a35cf0.js} +1 -1
- package/dist/web-components-library/p-4d0200ca.system.entry.js +2 -0
- package/dist/web-components-library/p-4d0200ca.system.entry.js.map +1 -0
- package/dist/web-components-library/p-5a6d6203.system.entry.js +2 -0
- package/dist/web-components-library/p-5a6d6203.system.entry.js.map +1 -0
- package/dist/web-components-library/{p-22610d00.entry.js → p-6830461d.entry.js} +2 -2
- package/dist/web-components-library/p-6830461d.entry.js.map +1 -0
- package/{www/build/p-461cf578.system.entry.js → dist/web-components-library/p-751c58e2.system.entry.js} +2 -2
- package/dist/web-components-library/{p-dead4830.system.js → p-7dd29d4d.system.js} +1 -1
- package/dist/web-components-library/p-7e5ae5bd.entry.js +2 -0
- package/dist/web-components-library/p-7e5ae5bd.entry.js.map +1 -0
- package/dist/web-components-library/p-8078896f.system.entry.js +2 -0
- package/dist/web-components-library/p-8078896f.system.entry.js.map +1 -0
- package/dist/web-components-library/p-9450cc97.system.entry.js +2 -0
- package/dist/web-components-library/p-9450cc97.system.entry.js.map +1 -0
- package/dist/web-components-library/{p-eea9f7fd.system.entry.js → p-9551ea7a.system.entry.js} +2 -2
- package/dist/web-components-library/{p-eea9f7fd.system.entry.js.map → p-9551ea7a.system.entry.js.map} +1 -1
- package/dist/web-components-library/p-a5f739b0.entry.js +2 -0
- package/dist/web-components-library/p-a5f739b0.entry.js.map +1 -0
- package/dist/web-components-library/p-d2a11d41.system.entry.js +2 -0
- package/dist/web-components-library/p-d2a11d41.system.entry.js.map +1 -0
- package/dist/web-components-library/p-f3ef3a26.entry.js +2 -0
- package/dist/web-components-library/p-f3ef3a26.entry.js.map +1 -0
- package/dist/web-components-library/p-f530271b.system.js +1 -1
- package/dist/web-components-library/p-f530271b.system.js.map +1 -1
- package/dist/web-components-library/p-ff54b247.entry.js +2 -0
- package/dist/web-components-library/p-ff54b247.entry.js.map +1 -0
- package/dist/web-components-library/web-components-library.css +4 -3
- 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 +2 -2
- package/www/build/p-0108191f.system.entry.js +2 -0
- package/www/build/{p-ffee2568.system.entry.js.map → p-0108191f.system.entry.js.map} +1 -1
- package/www/build/p-05827ca5.entry.js +2 -0
- package/www/build/{p-8f28871c.entry.js.map → p-05827ca5.entry.js.map} +1 -1
- package/www/build/p-0a6424ef.entry.js +2 -0
- package/www/build/p-0a6424ef.entry.js.map +1 -0
- package/www/build/p-0bde1f0e.entry.js +2 -0
- package/www/build/{p-df6ef4b4.entry.js.map → p-0bde1f0e.entry.js.map} +1 -1
- package/{dist/web-components-library/p-3b801ea6.entry.js → www/build/p-0e342fa3.entry.js} +2 -2
- package/www/build/{p-fb6c02f1.entry.js → p-114088a1.entry.js} +2 -2
- package/www/build/p-12008903.system.entry.js +2 -0
- package/www/build/p-12008903.system.entry.js.map +1 -0
- package/www/build/p-16b1b35a.entry.js +2 -0
- package/www/build/p-16b1b35a.entry.js.map +1 -0
- package/www/build/p-21941767.entry.js +2 -0
- package/www/build/p-21941767.entry.js.map +1 -0
- package/www/build/p-22d9f9c3.entry.js +2 -0
- package/www/build/p-22d9f9c3.entry.js.map +1 -0
- package/www/build/p-23975a98.system.entry.js +2 -0
- package/www/build/p-23975a98.system.entry.js.map +1 -0
- package/www/build/p-25872e04.system.entry.js +2 -0
- package/www/build/p-25872e04.system.entry.js.map +1 -0
- package/{dist/web-components-library/p-7519c72d.system.entry.js → www/build/p-2dd2d037.system.entry.js} +2 -2
- package/www/build/p-2df54d7d.entry.js +2 -0
- package/www/build/p-2df54d7d.entry.js.map +1 -0
- package/www/build/p-33368291.system.entry.js +2 -0
- package/www/build/p-33368291.system.entry.js.map +1 -0
- package/www/build/p-49256720.system.entry.js +2 -0
- package/www/build/p-49256720.system.entry.js.map +1 -0
- package/{dist/web-components-library/p-662c8342.js → www/build/p-49a35cf0.js} +1 -1
- package/www/build/p-4d0200ca.system.entry.js +2 -0
- package/www/build/p-4d0200ca.system.entry.js.map +1 -0
- package/www/build/p-5a6d6203.system.entry.js +2 -0
- package/www/build/p-5a6d6203.system.entry.js.map +1 -0
- package/www/build/{p-22610d00.entry.js → p-6830461d.entry.js} +2 -2
- package/www/build/p-6830461d.entry.js.map +1 -0
- package/{dist/web-components-library/p-461cf578.system.entry.js → www/build/p-751c58e2.system.entry.js} +2 -2
- package/www/build/p-751c7014.css +4 -0
- package/www/build/{p-dead4830.system.js → p-7dd29d4d.system.js} +1 -1
- package/www/build/p-7e5ae5bd.entry.js +2 -0
- package/www/build/p-7e5ae5bd.entry.js.map +1 -0
- package/www/build/p-8078896f.system.entry.js +2 -0
- package/www/build/p-8078896f.system.entry.js.map +1 -0
- package/www/build/p-9450cc97.system.entry.js +2 -0
- package/www/build/p-9450cc97.system.entry.js.map +1 -0
- package/www/build/{p-eea9f7fd.system.entry.js → p-9551ea7a.system.entry.js} +2 -2
- package/www/build/{p-eea9f7fd.system.entry.js.map → p-9551ea7a.system.entry.js.map} +1 -1
- package/www/build/p-a5f739b0.entry.js +2 -0
- package/www/build/p-a5f739b0.entry.js.map +1 -0
- package/www/build/p-d2a11d41.system.entry.js +2 -0
- package/www/build/p-d2a11d41.system.entry.js.map +1 -0
- package/www/build/p-e65aa787.js +2 -0
- package/www/build/p-f3ef3a26.entry.js +2 -0
- package/www/build/p-f3ef3a26.entry.js.map +1 -0
- package/www/build/p-f530271b.system.js +1 -1
- package/www/build/p-f530271b.system.js.map +1 -1
- package/www/build/p-ff54b247.entry.js +2 -0
- package/www/build/p-ff54b247.entry.js.map +1 -0
- package/www/build/web-components-library.css +4 -3
- 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 -11
- package/dist/cjs/z-app-header_15.cjs.entry.js.map +0 -1
- package/dist/esm/z-app-header_15.entry.js.map +0 -1
- package/dist/esm-es5/z-app-header_15.entry.js +0 -2
- package/dist/esm-es5/z-app-header_15.entry.js.map +0 -1
- package/dist/web-components-library/p-22610d00.entry.js.map +0 -1
- package/dist/web-components-library/p-353c9666.entry.js +0 -2
- package/dist/web-components-library/p-353c9666.entry.js.map +0 -1
- package/dist/web-components-library/p-3970d479.entry.js +0 -2
- package/dist/web-components-library/p-3970d479.entry.js.map +0 -1
- package/dist/web-components-library/p-3cd2a911.system.entry.js +0 -2
- package/dist/web-components-library/p-3cd2a911.system.entry.js.map +0 -1
- package/dist/web-components-library/p-5d0fd3e4.system.entry.js +0 -2
- package/dist/web-components-library/p-5d0fd3e4.system.entry.js.map +0 -1
- package/dist/web-components-library/p-8f28871c.entry.js +0 -2
- package/dist/web-components-library/p-93f6a3ca.system.entry.js +0 -2
- package/dist/web-components-library/p-93f6a3ca.system.entry.js.map +0 -1
- package/dist/web-components-library/p-94bfd79b.system.entry.js +0 -2
- package/dist/web-components-library/p-94bfd79b.system.entry.js.map +0 -1
- package/dist/web-components-library/p-9bae8b1c.system.entry.js +0 -2
- package/dist/web-components-library/p-9bae8b1c.system.entry.js.map +0 -1
- package/dist/web-components-library/p-a0893037.entry.js +0 -2
- package/dist/web-components-library/p-a0893037.entry.js.map +0 -1
- package/dist/web-components-library/p-a8d78db5.system.entry.js +0 -2
- package/dist/web-components-library/p-a8d78db5.system.entry.js.map +0 -1
- package/dist/web-components-library/p-b6aa9719.entry.js +0 -2
- package/dist/web-components-library/p-b6aa9719.entry.js.map +0 -1
- package/dist/web-components-library/p-c012f19c.entry.js +0 -2
- package/dist/web-components-library/p-c012f19c.entry.js.map +0 -1
- package/dist/web-components-library/p-df6ef4b4.entry.js +0 -2
- package/dist/web-components-library/p-efda4ff7.system.entry.js +0 -2
- package/dist/web-components-library/p-efda4ff7.system.entry.js.map +0 -1
- package/dist/web-components-library/p-fc1e9ce0.entry.js +0 -2
- package/dist/web-components-library/p-fc1e9ce0.entry.js.map +0 -1
- package/dist/web-components-library/p-ffcf7250.entry.js +0 -2
- package/dist/web-components-library/p-ffcf7250.entry.js.map +0 -1
- package/dist/web-components-library/p-ffeb3d1b.system.entry.js +0 -2
- package/dist/web-components-library/p-ffeb3d1b.system.entry.js.map +0 -1
- package/dist/web-components-library/p-ffee2568.system.entry.js +0 -2
- package/www/build/p-22610d00.entry.js.map +0 -1
- package/www/build/p-353c9666.entry.js +0 -2
- package/www/build/p-353c9666.entry.js.map +0 -1
- package/www/build/p-3970d479.entry.js +0 -2
- package/www/build/p-3970d479.entry.js.map +0 -1
- package/www/build/p-3cd2a911.system.entry.js +0 -2
- package/www/build/p-3cd2a911.system.entry.js.map +0 -1
- package/www/build/p-5d0fd3e4.system.entry.js +0 -2
- package/www/build/p-5d0fd3e4.system.entry.js.map +0 -1
- package/www/build/p-6232f1d4.css +0 -3
- package/www/build/p-8f28871c.entry.js +0 -2
- package/www/build/p-93f6a3ca.system.entry.js +0 -2
- package/www/build/p-93f6a3ca.system.entry.js.map +0 -1
- package/www/build/p-94bfd79b.system.entry.js +0 -2
- package/www/build/p-94bfd79b.system.entry.js.map +0 -1
- package/www/build/p-9bae8b1c.system.entry.js +0 -2
- package/www/build/p-9bae8b1c.system.entry.js.map +0 -1
- package/www/build/p-a0893037.entry.js +0 -2
- package/www/build/p-a0893037.entry.js.map +0 -1
- package/www/build/p-a8d78db5.system.entry.js +0 -2
- package/www/build/p-a8d78db5.system.entry.js.map +0 -1
- package/www/build/p-b6aa9719.entry.js +0 -2
- package/www/build/p-b6aa9719.entry.js.map +0 -1
- package/www/build/p-c012f19c.entry.js +0 -2
- package/www/build/p-c012f19c.entry.js.map +0 -1
- package/www/build/p-c94a3f4f.js +0 -2
- package/www/build/p-df6ef4b4.entry.js +0 -2
- package/www/build/p-efda4ff7.system.entry.js +0 -2
- package/www/build/p-efda4ff7.system.entry.js.map +0 -1
- package/www/build/p-fc1e9ce0.entry.js +0 -2
- package/www/build/p-fc1e9ce0.entry.js.map +0 -1
- package/www/build/p-ffcf7250.entry.js +0 -2
- package/www/build/p-ffcf7250.entry.js.map +0 -1
- package/www/build/p-ffeb3d1b.system.entry.js +0 -2
- package/www/build/p-ffeb3d1b.system.entry.js.map +0 -1
- package/www/build/p-ffee2568.system.entry.js +0 -2
- /package/dist/esm-es5/{utils-ba4f0770.js.map → utils-cd008fbc.js.map} +0 -0
- /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/.storybook/elements/args-controls.d.ts +0 -0
- /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/.storybook/elements/docs-template.d.ts +0 -0
- /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/docs/grid/index.stories.d.ts +0 -0
- /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/docs/iconset/index.stories.d.ts +0 -0
- /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/docs/themes/index.stories.d.ts +0 -0
- /package/dist/web-components-library/{p-3b801ea6.entry.js.map → p-0e342fa3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-fb6c02f1.entry.js.map → p-114088a1.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7519c72d.system.entry.js.map → p-2dd2d037.system.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-662c8342.js.map → p-49a35cf0.js.map} +0 -0
- /package/dist/web-components-library/{p-461cf578.system.entry.js.map → p-751c58e2.system.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-dead4830.system.js.map → p-7dd29d4d.system.js.map} +0 -0
- /package/www/build/{p-3b801ea6.entry.js.map → p-0e342fa3.entry.js.map} +0 -0
- /package/www/build/{p-fb6c02f1.entry.js.map → p-114088a1.entry.js.map} +0 -0
- /package/www/build/{p-7519c72d.system.entry.js.map → p-2dd2d037.system.entry.js.map} +0 -0
- /package/www/build/{p-662c8342.js.map → p-49a35cf0.js.map} +0 -0
- /package/www/build/{p-461cf578.system.entry.js.map → p-751c58e2.system.entry.js.map} +0 -0
- /package/www/build/{p-dead4830.system.js.map → p-7dd29d4d.system.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-ab5f1eaa.js';
|
|
2
|
-
import { O as OffCanvasVariant, v as TransitionDirection, B as ButtonVariant, e as ControlSize, c as ButtonType, D as DividerSize, h as DividerOrientation,
|
|
3
|
-
import {
|
|
2
|
+
import { O as OffCanvasVariant, v as TransitionDirection, B as ButtonVariant, e as ControlSize, c as ButtonType, D as DividerSize, h as DividerOrientation, k as LabelPosition, I as InputType, i as ListSize, m as ListType, j as ExpandableListButtonAlign, l as ListDividerType, E as ExpandableListStyle, g as KeyboardCode, p as Device } from './index-2255c6c8.js';
|
|
3
|
+
import { r as randomId, b as boolean, g as getDevice, h as handleEnterKeydSubmit } from './utils-7983d02c.js';
|
|
4
4
|
import './breakpoints-680e0e56.js';
|
|
5
5
|
|
|
6
|
-
const stylesCss$d = ":host{--app-header-typography-1-size:24px;--app-header-typography-2-size:28px;--app-header-typography-3-size:32px;--app-header-typography-4-size:36px;--app-header-typography-5-size:42px;--app-header-typography-6-size:48px;--app-header-typography-7-size:54px;--app-header-typography-8-size:60px;--app-header-typography-9-size:68px;--app-header-typography-10-size:76px;--app-header-typography-11-size:84px;--app-header-typography-12-size:92px;--app-header-typography-1-lineheight:1.33;--app-header-typography-2-lineheight:1.29;--app-header-typography-3-lineheight:1.25;--app-header-typography-4-lineheight:1.24;--app-header-typography-5-lineheight:1.24;--app-header-typography-6-lineheight:1.25;--app-header-typography-7-lineheight:1.2;--app-header-typography-8-lineheight:1.26;--app-header-typography-9-lineheight:1.24;--app-header-typography-10-lineheight:1.26;--app-header-typography-11-lineheight:1.2;--app-header-typography-12-lineheight:1.2;--app-header-typography-1-tracking:calc(-0.2 / 1em);--app-header-typography-2-tracking:calc(-0.4 / 1em);--app-header-typography-3-tracking:calc(-0.6 / 1em);--app-header-typography-4-tracking:calc(-0.8 / 1em);--app-header-typography-5-tracking:calc(-1 / 1em);--app-header-typography-6-tracking:calc(-1.2 / 1em);--app-header-typography-7-tracking:calc(-1.4 / 1em);--app-header-typography-8-tracking:calc(-1.6 / 1em);--app-header-typography-9-tracking:calc(-1.8 / 1em);--app-header-typography-10-tracking:calc(-2 / 1em);--app-header-typography-11-tracking:calc(-2.2 / 1em);--app-header-typography-12-tracking:calc(-2.4 / 1em);--app-header-content-max-width:100%;--app-header-height:auto;--app-header-top-offset:48px;--app-header-drawer-trigger-size:calc(var(--space-unit) * 4);--app-header-bg:var(--color-surface01);--app-header-stucked-bg:var(--color-surface01);--app-header-text-color:var(--color-default-text);--app-header-title-font-size:var(--app-header-typography-3-size);--app-header-title-lineheight:var(--app-header-typography-3-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-3-tracking);--app-header-stucked-text-color:var(--color-default-text);position:relative;display:block;height:var(--app-header-height);color:var(--app-header-text-color)}:host,*{-webkit-box-sizing:border-box;box-sizing:border-box}.heading-panel{position:relative;display:-ms-flexbox;display:flex;width:100%;max-width:var(--app-header-content-max-width);-ms-flex-direction:column;flex-direction:column;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:baseline;align-items:baseline;padding:var(--grid-margin);margin:0 auto;background:var(--app-header-bg);gap:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5)}.hero-container+.heading-panel{background:transparent}:host(:empty) .heading-panel{padding:0}.heading-container{position:relative;z-index:1;display:-ms-flexbox;display:flex;width:100%;max-width:100%;-ms-flex:1 auto;flex:1 auto;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start}.heading-title{display:-ms-flexbox;display:flex;max-width:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start;-webkit-column-gap:calc(var(--space-unit) * 2);-moz-column-gap:calc(var(--space-unit) * 2);column-gap:calc(var(--space-unit) * 2)}::slotted([slot=\"title\"]),.heading-stuck .heading-title>*,::slotted([slot=\"stucked-title\"]){margin:0;font-family:\"IBM Plex Serif\", serif;font-weight:var(--font-bd)}::slotted([slot=\"title\"]){font-size:var(--app-header-title-font-size);letter-spacing:var(--app-header-title-letter-spacing);line-height:var(--app-header-title-lineheight)}.heading-stuck .heading-title>*,::slotted([slot=\"stucked-title\"]){font-size:var(--app-header-typography-3-size);letter-spacing:var(--app-header-typography-3-tracking);line-height:var(--app-header-typography-3-lineheight)}:host(:not([menu-length=\"0\"])) .heading-subtitle{padding-left:calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 2))}::slotted([slot=\"top-subtitle\"]),::slotted([slot=\"subtitle\"]){margin:0;font-family:var(--font-family-sans);font-size:20px;font-style:italic;line-height:26px}::slotted([slot=\"subtitle\"]){font-weight:500}::slotted([slot=\"top-subtitle\"]){font-weight:400}.menu-container{display:-ms-flexbox;display:flex;width:100%;-ms-flex:1 auto;flex:1 auto;-ms-flex-flow:row wrap;flex-flow:row wrap}:host([menu-length=\"0\"]:not([enable-search])) .menu-container,.menu-container:empty{display:none}.menu-container ::slotted([open]){position:relative;z-index:3}z-searchbar{z-index:0;display:-ms-flexbox;display:flex;width:auto;min-width:calc(var(--space-unit) * 32);-ms-flex:1 auto;flex:1 auto;-ms-flex-align:center;align-items:center;margin-left:auto}.heading-stuck{position:fixed;z-index:20;top:var(--app-header-top-offset);left:0;width:100%;max-width:100%;-webkit-animation:slide-stuck-heading-in 250ms ease-out;animation:slide-stuck-heading-in 250ms ease-out;background:var(--app-header-stucked-bg);-webkit-box-shadow:var(--shadow-2);box-shadow:var(--shadow-2);color:var(--app-header-stucked-text-color)}.heading-stuck-content{display:-ms-flexbox;display:flex;max-width:var(--app-header-content-max-width);-ms-flex-align:center;align-items:center;padding:var(--space-unit) var(--grid-margin);margin:0 auto;-webkit-column-gap:calc(var(--space-unit) * 2);-moz-column-gap:calc(var(--space-unit) * 2);column-gap:calc(var(--space-unit) * 2)}.heading-stuck .heading-title{overflow:hidden}.heading-stuck .heading-title>*,.heading-stuck .heading-title ::slotted([slot=\"stucked-title\"]){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.heading-stuck-content z-button{margin-left:auto}.drawer-trigger{padding:0;border:0;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-radius:0;color:inherit;cursor:pointer}.drawer-trigger z-icon{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);fill:currentcolor}.heading-container :is(.drawer-trigger,z-button.search-page-button){display:-ms-flexbox;display:flex;height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight));-ms-flex-align:center;align-items:center}.heading-container z-button.search-page-button{margin-left:auto}.drawer-content{display:none}z-offcanvas[open] .drawer-content{display:-ms-flexbox;display:flex;width:100%;-ms-flex:1 auto;flex:1 auto;-ms-flex-direction:column;flex-direction:column;row-gap:calc(var(--space-unit) * 2.5)}z-offcanvas[open] .drawer-content ::slotted(z-menu){width:100%}.drawer-close{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);padding:0;border:0;margin:var(--space-unit) 0 calc(var(--space-unit) * 2.5);-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-size:inherit;outline:none}.drawer-close:focus-visible{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}.hero-container{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}:host([overlay]) .heading-panel .drawer-trigger z-icon,:host([overlay]) .heading-panel .heading-container,:host([overlay]) .heading-panel .menu-container{color:var(--color-white);fill:var(--color-white)}:host([overlay]) .heading-panel .menu-container ::slotted(z-menu){--z-menu-label-color:var(--color-white)}:host([overlay]) .hero-container::after{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:var(--color-black);content:\"\";opacity:0.5}.hero-container img,.hero-container ::slotted(*){position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:top center;object-position:top center;-webkit-user-drag:none}@media (min-width: 768px){:host{--app-header-title-font-size:var(--app-header-typography-6-size);--app-header-title-lineheight:var(--app-header-typography-6-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-6-tracking)}.heading-panel{-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;padding-bottom:calc(var(--space-unit) * 2)}.heading-container{margin-right:auto}:host(:is([flow=\"offcanvas\"],[menu-length=\"0\"])) :is(.heading-container,.menu-container){width:auto}:host(:not([flow=\"offcanvas\"])) .heading-subtitle{padding-left:0}.menu-container{-ms-flex:initial;flex:initial;-ms-flex-align:center;align-items:center}:host([menu-length=\"0\"]) .menu-container:not(:empty){height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight))}:host(:not([flow=\"offcanvas\"])) .menu-container{gap:var(--space-unit) calc(var(--space-unit) * 5)}:host(:not([flow=\"offcanvas\"])) .heading-container .drawer-trigger{display:none}}@media (min-width: 1152px){:host{--app-header-title-font-size:var(--app-header-typography-7-size);--app-header-title-lineheight:var(--app-header-typography-7-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-7-tracking)}.heading-panel{-ms-flex-pack:start;justify-content:flex-start;padding-bottom:calc(var(--space-unit) * 3)}.heading-container,.menu-container{width:auto}:host([flow=\"stack\"]) .heading-panel{-ms-flex-flow:column;flex-flow:column;-ms-flex-align:start;align-items:flex-start}:host([flow=\"stack\"]) .menu-container{width:100%}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-panel{row-gap:calc(var(--space-unit) * 3)}z-searchbar{min-width:calc(var(--space-unit) * 45);-ms-flex:initial;flex:initial}}@media (min-width: 1366px){:host{--app-header-title-font-size:var(--app-header-typography-9-size);--app-header-title-lineheight:var(--app-header-typography-9-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-9-tracking)}}@-webkit-keyframes slide-stuck-heading-in{0%{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0)}100%{-webkit-transform:none;transform:none}}@keyframes slide-stuck-heading-in{0%{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0)}100%{-webkit-transform:none;transform:none}}";
|
|
7
|
-
const ZAppHeaderStyle0 = stylesCss$
|
|
6
|
+
const stylesCss$a = ":host{--app-header-typography-1-size:24px;--app-header-typography-2-size:28px;--app-header-typography-3-size:32px;--app-header-typography-4-size:36px;--app-header-typography-5-size:42px;--app-header-typography-6-size:48px;--app-header-typography-7-size:54px;--app-header-typography-8-size:60px;--app-header-typography-9-size:68px;--app-header-typography-10-size:76px;--app-header-typography-11-size:84px;--app-header-typography-12-size:92px;--app-header-typography-1-lineheight:1.33;--app-header-typography-2-lineheight:1.29;--app-header-typography-3-lineheight:1.25;--app-header-typography-4-lineheight:1.24;--app-header-typography-5-lineheight:1.24;--app-header-typography-6-lineheight:1.25;--app-header-typography-7-lineheight:1.2;--app-header-typography-8-lineheight:1.26;--app-header-typography-9-lineheight:1.24;--app-header-typography-10-lineheight:1.26;--app-header-typography-11-lineheight:1.2;--app-header-typography-12-lineheight:1.2;--app-header-typography-1-tracking:calc(-0.2 / 1em);--app-header-typography-2-tracking:calc(-0.4 / 1em);--app-header-typography-3-tracking:calc(-0.6 / 1em);--app-header-typography-4-tracking:calc(-0.8 / 1em);--app-header-typography-5-tracking:calc(-1 / 1em);--app-header-typography-6-tracking:calc(-1.2 / 1em);--app-header-typography-7-tracking:calc(-1.4 / 1em);--app-header-typography-8-tracking:calc(-1.6 / 1em);--app-header-typography-9-tracking:calc(-1.8 / 1em);--app-header-typography-10-tracking:calc(-2 / 1em);--app-header-typography-11-tracking:calc(-2.2 / 1em);--app-header-typography-12-tracking:calc(-2.4 / 1em);--app-header-content-max-width:100%;--app-header-height:auto;--app-header-top-offset:48px;--app-header-drawer-trigger-size:calc(var(--space-unit) * 4);--app-header-bg:var(--color-surface01);--app-header-stucked-bg:var(--color-surface01);--app-header-text-color:var(--color-default-text);--app-header-title-font-size:var(--app-header-typography-3-size);--app-header-title-lineheight:var(--app-header-typography-3-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-3-tracking);--app-header-stucked-text-color:var(--color-default-text);position:relative;display:block;height:var(--app-header-height);color:var(--app-header-text-color)}:host,*{-webkit-box-sizing:border-box;box-sizing:border-box}.heading-panel{position:relative;display:-ms-flexbox;display:flex;width:100%;max-width:var(--app-header-content-max-width);-ms-flex-direction:column;flex-direction:column;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:baseline;align-items:baseline;padding:var(--grid-margin);margin:0 auto;background:var(--app-header-bg);gap:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5)}.hero-container+.heading-panel{background:transparent}:host(:empty) .heading-panel{padding:0}.heading-container{position:relative;z-index:1;display:-ms-flexbox;display:flex;width:100%;max-width:100%;-ms-flex:1 auto;flex:1 auto;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start}.heading-title{display:-ms-flexbox;display:flex;max-width:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start;-webkit-column-gap:calc(var(--space-unit) * 2);-moz-column-gap:calc(var(--space-unit) * 2);column-gap:calc(var(--space-unit) * 2)}::slotted([slot=\"title\"]),.heading-stuck .heading-title>*,::slotted([slot=\"stucked-title\"]){margin:0;font-family:\"IBM Plex Serif\", serif;font-weight:var(--font-bd)}::slotted([slot=\"title\"]){font-size:var(--app-header-title-font-size);letter-spacing:var(--app-header-title-letter-spacing);line-height:var(--app-header-title-lineheight)}.heading-stuck .heading-title>*,::slotted([slot=\"stucked-title\"]){font-size:var(--app-header-typography-3-size);letter-spacing:var(--app-header-typography-3-tracking);line-height:var(--app-header-typography-3-lineheight)}:host(:not([menu-length=\"0\"])) .heading-subtitle{padding-left:calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 2))}::slotted([slot=\"top-subtitle\"]),::slotted([slot=\"subtitle\"]){margin:0;font-family:var(--font-family-sans);font-size:20px;font-style:italic;line-height:26px}::slotted([slot=\"subtitle\"]){font-weight:500}::slotted([slot=\"top-subtitle\"]){font-weight:400}.menu-container{display:-ms-flexbox;display:flex;width:100%;-ms-flex:1 auto;flex:1 auto;-ms-flex-flow:row wrap;flex-flow:row wrap}:host([menu-length=\"0\"]:not([enable-search])) .menu-container,.menu-container:empty{display:none}.menu-container ::slotted([open]){position:relative;z-index:3}z-searchbar{z-index:0;display:-ms-flexbox;display:flex;width:auto;min-width:calc(var(--space-unit) * 32);-ms-flex:1 auto;flex:1 auto;-ms-flex-align:center;align-items:center;margin-left:auto}.heading-stuck{position:fixed;z-index:20;top:var(--app-header-top-offset);left:0;width:100%;max-width:100%;-webkit-animation:slide-stuck-heading-in 250ms ease-out;animation:slide-stuck-heading-in 250ms ease-out;background:var(--app-header-stucked-bg);-webkit-box-shadow:var(--shadow-2);box-shadow:var(--shadow-2);color:var(--app-header-stucked-text-color)}.heading-stuck-content{display:-ms-flexbox;display:flex;max-width:var(--app-header-content-max-width);-ms-flex-align:center;align-items:center;padding:var(--space-unit) var(--grid-margin);margin:0 auto;-webkit-column-gap:calc(var(--space-unit) * 2);-moz-column-gap:calc(var(--space-unit) * 2);column-gap:calc(var(--space-unit) * 2)}.heading-stuck .heading-title{overflow:hidden}.heading-stuck .heading-title>*,.heading-stuck .heading-title ::slotted([slot=\"stucked-title\"]){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.heading-stuck-content z-button{margin-left:auto}.drawer-trigger{padding:0;border:0;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-radius:0;color:inherit;cursor:pointer}.drawer-trigger:focus-visible{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary);outline:none !important}.drawer-trigger z-icon{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);fill:currentcolor}.heading-container :is(.drawer-trigger,z-button.search-page-button){display:-ms-flexbox;display:flex;height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight));-ms-flex-align:center;align-items:center}.heading-container z-button.search-page-button{margin-left:auto}.drawer-content{display:none}z-offcanvas[open] .drawer-content{display:-ms-flexbox;display:flex;width:100%;-ms-flex:1 auto;flex:1 auto;-ms-flex-direction:column;flex-direction:column;row-gap:calc(var(--space-unit) * 2.5)}z-offcanvas[open] .drawer-content ::slotted(z-menu){width:100%}.drawer-close{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);padding:0;border:0;margin:var(--space-unit) 0 calc(var(--space-unit) * 2.5);-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-size:inherit;outline:none}.drawer-close:focus-visible{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}.hero-container{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}:host([overlay]) .heading-panel .drawer-trigger z-icon,:host([overlay]) .heading-panel .heading-container,:host([overlay]) .heading-panel .menu-container{color:var(--color-white);fill:var(--color-white)}:host([overlay]) .heading-panel .menu-container ::slotted(z-menu){--z-menu-label-color:var(--color-white)}:host([overlay]) .hero-container::after{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:var(--color-black);content:\"\";opacity:0.5}.hero-container img,.hero-container ::slotted(*){position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:top center;object-position:top center;-webkit-user-drag:none}@media (min-width: 768px){:host{--app-header-title-font-size:var(--app-header-typography-6-size);--app-header-title-lineheight:var(--app-header-typography-6-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-6-tracking)}.heading-panel{-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;padding-bottom:calc(var(--space-unit) * 2)}.heading-container{margin-right:auto}:host(:is([flow=\"offcanvas\"],[menu-length=\"0\"])) :is(.heading-container,.menu-container){width:auto}:host(:not([flow=\"offcanvas\"])) .heading-subtitle{padding-left:0}.menu-container{-ms-flex:initial;flex:initial;-ms-flex-align:center;align-items:center}:host([menu-length=\"0\"]) .menu-container:not(:empty){height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight))}:host(:not([flow=\"offcanvas\"])) .menu-container{gap:var(--space-unit) calc(var(--space-unit) * 5)}:host(:not([flow=\"offcanvas\"])) .heading-container .drawer-trigger{display:none}}@media (min-width: 1152px){:host{--app-header-title-font-size:var(--app-header-typography-7-size);--app-header-title-lineheight:var(--app-header-typography-7-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-7-tracking)}.heading-panel{-ms-flex-pack:start;justify-content:flex-start;padding-bottom:calc(var(--space-unit) * 3)}.heading-container,.menu-container{width:auto}:host([flow=\"stack\"]) .heading-panel{-ms-flex-flow:column;flex-flow:column;-ms-flex-align:start;align-items:flex-start}:host([flow=\"stack\"]) .menu-container{width:100%}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-panel{row-gap:calc(var(--space-unit) * 3)}z-searchbar{min-width:calc(var(--space-unit) * 45);-ms-flex:initial;flex:initial}}@media (min-width: 1366px){:host{--app-header-title-font-size:var(--app-header-typography-9-size);--app-header-title-lineheight:var(--app-header-typography-9-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-9-tracking)}}@-webkit-keyframes slide-stuck-heading-in{0%{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0)}100%{-webkit-transform:none;transform:none}}@keyframes slide-stuck-heading-in{0%{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0)}100%{-webkit-transform:none;transform:none}}";
|
|
7
|
+
const ZAppHeaderStyle0 = stylesCss$a;
|
|
8
8
|
|
|
9
9
|
const SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== "undefined";
|
|
10
10
|
const ZAppHeader = class {
|
|
@@ -151,8 +151,8 @@ const ZAppHeader = class {
|
|
|
151
151
|
};
|
|
152
152
|
ZAppHeader.style = ZAppHeaderStyle0;
|
|
153
153
|
|
|
154
|
-
const stylesCss$
|
|
155
|
-
const ZButtonStyle0 = stylesCss$
|
|
154
|
+
const stylesCss$9 = ".sc-z-button-h{display:inline-block;--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:0}[disabled].sc-z-button-h:not([disabled=\"false\"]){pointer-events:none}.sc-z-button-h .z-button--container.sc-z-button{display:-ms-inline-flexbox;display:inline-flex;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:0;border-width:var(--border-size-medium);border-style:solid;border-radius:var(--border-radius);cursor:pointer;fill:currentcolor;font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);letter-spacing:0.3px;line-height:1;outline:none;text-decoration:none;text-transform:uppercase;white-space:nowrap}.sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button{min-width:calc(var(--space-unit) * 8);padding:0 calc(var(--space-unit) * 2)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button z-icon.sc-z-button{--z-icon-right-margin:var(--space-unit)}[size=\"big\"].sc-z-button-h .z-button--container.sc-z-button{min-width:44px;height:44px}[size=\"small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:36px;height:36px}[size=\"x-small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:32px;height:32px}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-primary01);color:var(--color-text-inverse)}@media (hover: hover){[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-hover-primary);color:var(--color-text-inverse)}}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-pressed-primary);-webkit-box-shadow:var(--shadow-2);box-shadow:var(--shadow-2);color:var(--color-text-inverse)}[variant=\"primary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled03)}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-surface01);color:var(--color-primary01)}@media (hover: hover){[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-surface01);color:var(--color-hover-primary)}}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-surface01);-webkit-box-shadow:var(--shadow-2);box-shadow:var(--shadow-2);color:var(--color-pressed-primary)}[variant=\"secondary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-surface01);color:var(--color-disabled03)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary02);background-color:var(--color-primary02);color:var(--color-primary01)}@media (hover: hover){[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-primary03);background-color:var(--color-primary03);color:var(--color-hover-primary)}}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{border-color:var(--color-primary02);background-color:var(--color-primary02);color:var(--color-primary01)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-primary02);background-color:var(--color-primary02);-webkit-box-shadow:var(--shadow-2);box-shadow:var(--shadow-2);color:var(--color-primary01)}[variant=\"tertiary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled03)}";
|
|
155
|
+
const ZButtonStyle0 = stylesCss$9;
|
|
156
156
|
|
|
157
157
|
const ZButton = class {
|
|
158
158
|
constructor(hostRef) {
|
|
@@ -188,8 +188,8 @@ const ZButton = class {
|
|
|
188
188
|
};
|
|
189
189
|
ZButton.style = ZButtonStyle0;
|
|
190
190
|
|
|
191
|
-
const stylesCss$
|
|
192
|
-
const ZDividerStyle0 = stylesCss$
|
|
191
|
+
const stylesCss$8 = ".sc-z-divider-h{display:block;padding:0;margin:0}.divider-horizontal.sc-z-divider-h{width:100%}.divider-vertical.sc-z-divider-h{height:100%}.divider-small.divider-horizontal.sc-z-divider-h{height:var(--border-size-small)}.divider-medium.divider-horizontal.sc-z-divider-h{height:var(--border-size-medium)}.divider-large.divider-horizontal.sc-z-divider-h{height:var(--border-size-large)}.divider-small.divider-vertical.sc-z-divider-h{width:var(--border-size-small)}.divider-medium.divider-vertical.sc-z-divider-h{width:var(--border-size-medium)}.divider-large.divider-vertical.sc-z-divider-h{width:var(--border-size-large)}";
|
|
192
|
+
const ZDividerStyle0 = stylesCss$8;
|
|
193
193
|
|
|
194
194
|
const ZDivider = class {
|
|
195
195
|
constructor(hostRef) {
|
|
@@ -204,241 +204,6 @@ const ZDivider = class {
|
|
|
204
204
|
};
|
|
205
205
|
ZDivider.style = ZDividerStyle0;
|
|
206
206
|
|
|
207
|
-
const stylesCss$a = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.dragdrop{position:relative;display:-ms-flexbox;display:flex;height:228px;-ms-flex-direction:column;flex-direction:column;padding:calc(var(--space-unit) * 2);border-color:var(--color-surface04);background-color:var(--color-surface02);background-image:url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='2' ry='2' stroke='%23CACCCEFF' stroke-width='2' stroke-dasharray='15%2c 10%2c 14%2c 11' stroke-dashoffset='3' stroke-linecap='square'/%3e%3c/svg%3e\");border-radius:2px;color:var(--color-default-text)}:host>.dragdrop.dragover *{pointer-events:none}:host>.dragdrop .dragover-container{position:absolute;z-index:10;top:0;left:0;display:none;width:100%;height:100%;background-color:var(--color-primary03);-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}:host>.dragdrop .dragover-container .dragover-message{padding:10px 28px;background-color:var(--color-link-primary);color:var(--color-text-inverse)}:host>.dragdrop.dragover .dragover-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}";
|
|
208
|
-
const ZDragdropAreaStyle0 = stylesCss$a;
|
|
209
|
-
|
|
210
|
-
const ZDragdropArea = class {
|
|
211
|
-
constructor(hostRef) {
|
|
212
|
-
registerInstance(this, hostRef);
|
|
213
|
-
this.fileDropped = createEvent(this, "fileDropped", 7);
|
|
214
|
-
this.dragAndDropLabel = undefined;
|
|
215
|
-
}
|
|
216
|
-
fileDroppedHandler(files) {
|
|
217
|
-
this.fileDropped.emit(files);
|
|
218
|
-
}
|
|
219
|
-
renderOnDragOverMessage() {
|
|
220
|
-
return (h("div", { class: "dragover-container" }, h("div", { class: "dragover-message" }, h("span", { class: "body-2-sb" }, this.dragAndDropLabel))));
|
|
221
|
-
}
|
|
222
|
-
render() {
|
|
223
|
-
return (h("div", { key: '41334ac77bca3fb0d30518480b702c815d95b125', tabIndex: 0, ref: (val) => (this.dragDropContainer = val), class: "dragdrop", onDragOver: (e) => {
|
|
224
|
-
e.preventDefault();
|
|
225
|
-
this.dragDropContainer.classList.add("dragover");
|
|
226
|
-
}, onDragLeave: () => {
|
|
227
|
-
this.dragDropContainer.classList.remove("dragover");
|
|
228
|
-
}, onDrop: (e) => {
|
|
229
|
-
e.preventDefault();
|
|
230
|
-
if (e.dataTransfer.files.length) {
|
|
231
|
-
this.dragDropContainer.classList.remove("dragover");
|
|
232
|
-
this.fileDroppedHandler(e.dataTransfer.files);
|
|
233
|
-
}
|
|
234
|
-
} }, this.renderOnDragOverMessage(), h("slot", { key: '83344ee14fcec799690b644fe0a56cc86e1b4476' })));
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
ZDragdropArea.style = ZDragdropAreaStyle0;
|
|
238
|
-
|
|
239
|
-
const stylesCss$9 = ":host{color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .modal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:calc(var(--space-unit) * 2)}:host .modal-wrapper>.files-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:auto}:host .text-container .body-1{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin:calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);font-size:calc(var(--space-unit) * 3);font-weight:var(--font-sb)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>.heading-4-sb{display:inline-block;margin:calc(var(--space-unit) * 3) 0;font-size:calc(var(--space-unit) * 2);font-weight:var(--font-sb)}:host([type=\"dragdrop\"])>.container>.files-container>.heading-4-sb{margin-top:0;margin-bottom:calc(var(--space-unit) * 3)}:host>.container>.files-container>.files-wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:calc(var(--space-unit) * 2);-moz-column-gap:calc(var(--space-unit) * 2);column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}:host([type=\"dragdrop\"])>.container>.files-container>z-divider{margin:calc(var(--space-unit) * 3) 0}:host .error-message{font-size:14px;font-weight:400;letter-spacing:0.16%;line-height:20px;text-align:left}:host .error-message>.file-name{font-weight:600}@media only screen and (min-width: 768px){:host>.container>z-button{-ms-flex-item-align:start;align-self:flex-start}:host .modal-wrapper{padding:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){:host .modal-wrapper{padding:calc(var(--space-unit) * 4)}}";
|
|
240
|
-
const ZFileUploadStyle0 = stylesCss$9;
|
|
241
|
-
|
|
242
|
-
const ZFileUpload = class {
|
|
243
|
-
constructor(hostRef) {
|
|
244
|
-
registerInstance(this, hostRef);
|
|
245
|
-
this.fileInput = createEvent(this, "fileInput", 7);
|
|
246
|
-
this.inputAttributes = {
|
|
247
|
-
type: "file",
|
|
248
|
-
id: "file-elem",
|
|
249
|
-
multiple: true,
|
|
250
|
-
};
|
|
251
|
-
this.type = ZFileUploadType.DEFAULT;
|
|
252
|
-
this.buttonVariant = undefined;
|
|
253
|
-
this.acceptedFormat = undefined;
|
|
254
|
-
this.fileMaxSize = undefined;
|
|
255
|
-
this.mainTitle = undefined;
|
|
256
|
-
this.description = undefined;
|
|
257
|
-
this.files = [];
|
|
258
|
-
this.uploadBtnLabel = "allega";
|
|
259
|
-
this.dragAndDropLabel = "Rilascia i file in questa area per allegarli.";
|
|
260
|
-
this.allowedFilesMessage = undefined;
|
|
261
|
-
this.uploadClickableMessage = "Carica";
|
|
262
|
-
this.uploadMessage = "o trascina dal tuo computer";
|
|
263
|
-
this.errorModalTitle = "Errore di caricamento";
|
|
264
|
-
this.errorModalMessage = undefined;
|
|
265
|
-
this.uploadedFilesLabel = "File appena caricati";
|
|
266
|
-
this.hasFileSection = true;
|
|
267
|
-
this.invalidFiles = undefined;
|
|
268
|
-
}
|
|
269
|
-
/** Listen removeFile event sent from z-file component */
|
|
270
|
-
removeFileListener(e) {
|
|
271
|
-
this.removeFileHandler(e.detail);
|
|
272
|
-
}
|
|
273
|
-
/** Listen fileDropped event sent from z-dragdrop-area component */
|
|
274
|
-
fileDroppedListener(e) {
|
|
275
|
-
this.input.files = e.detail;
|
|
276
|
-
this.fileInputHandler();
|
|
277
|
-
}
|
|
278
|
-
componentDidUpdate() {
|
|
279
|
-
this.handleAccessibility();
|
|
280
|
-
this.invalidFiles.size && this.errorModal.focus();
|
|
281
|
-
}
|
|
282
|
-
componentWillLoad() {
|
|
283
|
-
this.invalidFiles = new Map();
|
|
284
|
-
}
|
|
285
|
-
fileInputHandler() {
|
|
286
|
-
if (this.input.files.length) {
|
|
287
|
-
this.invalidFiles = this.checkFiles(Array.from(this.input.files));
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
/** get array of uploaded files */
|
|
291
|
-
async getFiles() {
|
|
292
|
-
return this.files;
|
|
293
|
-
}
|
|
294
|
-
/** remove file from the array */
|
|
295
|
-
async removeFile(fileName) {
|
|
296
|
-
this.removeFileHandler(fileName);
|
|
297
|
-
}
|
|
298
|
-
removeFileHandler(fileName) {
|
|
299
|
-
const files = this.files;
|
|
300
|
-
const file = files.find((file) => file.name === fileName);
|
|
301
|
-
if (file) {
|
|
302
|
-
const index = files.indexOf(file);
|
|
303
|
-
if (index >= 0) {
|
|
304
|
-
files.splice(index, 1);
|
|
305
|
-
this.files = [...files];
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
getType() {
|
|
310
|
-
if (getDevice() !== Device.DESKTOP && getDevice() !== Device.DESKTOP_WIDE) {
|
|
311
|
-
return ZFileUploadType.DEFAULT;
|
|
312
|
-
}
|
|
313
|
-
return this.type;
|
|
314
|
-
}
|
|
315
|
-
handleAccessibility() {
|
|
316
|
-
const lastFile = this.el.querySelector("z-file:last-child z-chip button");
|
|
317
|
-
if (this.files.length > 0 && lastFile) {
|
|
318
|
-
lastFile.focus();
|
|
319
|
-
}
|
|
320
|
-
else {
|
|
321
|
-
this.getType() === ZFileUploadType.DEFAULT
|
|
322
|
-
? this.button.querySelector("button").focus()
|
|
323
|
-
: this.uploadLink.focus();
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
checkFiles(files) {
|
|
327
|
-
const errors = new Map();
|
|
328
|
-
const sizeErrorString = `supera il limite di ${this.fileMaxSize}MB`;
|
|
329
|
-
const formatErrorString = " ha un formato non supportato";
|
|
330
|
-
files.forEach((file) => {
|
|
331
|
-
const fileSize = file.size / 1024 / 1024;
|
|
332
|
-
const fileFormatOk = this.acceptedFormat
|
|
333
|
-
.split(",")
|
|
334
|
-
.some((ext) => file.name.toLowerCase().endsWith(ext.trim()));
|
|
335
|
-
const fileSizeOk = fileSize <= this.fileMaxSize;
|
|
336
|
-
if (fileSizeOk && fileFormatOk) {
|
|
337
|
-
if (!this.files.find((f) => f.name === file.name)) {
|
|
338
|
-
this.files.push(file);
|
|
339
|
-
this.fileInput.emit(file);
|
|
340
|
-
this.input.value = "";
|
|
341
|
-
}
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
errors.set(file.name, []);
|
|
345
|
-
if (!fileSizeOk) {
|
|
346
|
-
errors.get(file.name).push(sizeErrorString);
|
|
347
|
-
}
|
|
348
|
-
if (!fileFormatOk) {
|
|
349
|
-
errors.get(file.name).push(formatErrorString);
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
return errors;
|
|
353
|
-
}
|
|
354
|
-
renderTitle() {
|
|
355
|
-
return h("span", { id: "title" }, this.mainTitle);
|
|
356
|
-
}
|
|
357
|
-
renderDescription(cssClass) {
|
|
358
|
-
return h("span", { class: cssClass }, this.description);
|
|
359
|
-
}
|
|
360
|
-
renderAllowedFileExtensions() {
|
|
361
|
-
let fileFormatString = "";
|
|
362
|
-
let fileWeightString = "";
|
|
363
|
-
if (this.acceptedFormat) {
|
|
364
|
-
const fileFormat = this.acceptedFormat
|
|
365
|
-
.split(", ")
|
|
366
|
-
.map((string) => string.substring(1).toUpperCase())
|
|
367
|
-
.join(", ");
|
|
368
|
-
fileFormatString = ` nei formati ${fileFormat}`;
|
|
369
|
-
}
|
|
370
|
-
if (this.fileMaxSize) {
|
|
371
|
-
fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;
|
|
372
|
-
}
|
|
373
|
-
const finalString = `Puoi allegare file${fileFormatString}${fileWeightString}.`;
|
|
374
|
-
return (h("span", { class: "body-3" }, this.allowedFilesMessage
|
|
375
|
-
? this.allowedFilesMessage
|
|
376
|
-
: fileFormatString || fileWeightString
|
|
377
|
-
? finalString
|
|
378
|
-
: null));
|
|
379
|
-
}
|
|
380
|
-
renderFileSection() {
|
|
381
|
-
if (!this.hasFileSection) {
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
|
-
return (h("section", { class: `files-container ${!this.files.length ? "hidden" : ""}` }, h("span", { class: "heading-4-sb" }, this.uploadedFilesLabel), h("div", { class: "files-wrapper" }, h("slot", { name: "files" })), h("z-divider", { size: DividerSize.MEDIUM })));
|
|
385
|
-
}
|
|
386
|
-
renderInput() {
|
|
387
|
-
return (h("input", Object.assign({}, this.inputAttributes, { onChange: () => this.fileInputHandler(), accept: this.acceptedFormat, ref: (val) => (this.input = val) })));
|
|
388
|
-
}
|
|
389
|
-
renderUploadButton() {
|
|
390
|
-
return [
|
|
391
|
-
this.renderInput(),
|
|
392
|
-
h("z-button", { onClick: () => this.input.click(), onKeyPress: (e) => {
|
|
393
|
-
if (e.code == "Space" || e.code == "Enter") {
|
|
394
|
-
e.preventDefault();
|
|
395
|
-
this.input.click();
|
|
396
|
-
}
|
|
397
|
-
}, id: "fileSelect", variant: this.buttonVariant, icon: "upload", ref: (val) => (this.button = val) }, this.uploadBtnLabel),
|
|
398
|
-
];
|
|
399
|
-
}
|
|
400
|
-
renderUploadLink() {
|
|
401
|
-
return [
|
|
402
|
-
this.renderInput(),
|
|
403
|
-
h("span", { class: "body-1 upload-link-text" }, h("span", { tabIndex: 0, class: "body-1-sb upload-link", onClick: () => this.input.click(), onKeyPress: (e) => {
|
|
404
|
-
if (e.code == "Space" || e.code == "Enter") {
|
|
405
|
-
e.preventDefault();
|
|
406
|
-
this.input.click();
|
|
407
|
-
}
|
|
408
|
-
}, ref: (val) => (this.uploadLink = val) }, this.uploadClickableMessage), " ", this.uploadMessage),
|
|
409
|
-
];
|
|
410
|
-
}
|
|
411
|
-
renderDefaultMode() {
|
|
412
|
-
return [
|
|
413
|
-
this.renderDescription("body-3-sb"),
|
|
414
|
-
this.renderAllowedFileExtensions(),
|
|
415
|
-
this.renderFileSection(),
|
|
416
|
-
this.renderUploadButton(),
|
|
417
|
-
];
|
|
418
|
-
}
|
|
419
|
-
renderDragDropMode() {
|
|
420
|
-
return [
|
|
421
|
-
this.renderFileSection(),
|
|
422
|
-
h("z-dragdrop-area", { "drag-and-drop-label": this.dragAndDropLabel }, h("div", { class: "text-container" }, this.renderDescription("body-1"), this.renderUploadLink(), this.renderAllowedFileExtensions())),
|
|
423
|
-
];
|
|
424
|
-
}
|
|
425
|
-
formatErrorString(key, value) {
|
|
426
|
-
var _a, _b;
|
|
427
|
-
const bothErrors = value[0] && value[1] ? " e " : "";
|
|
428
|
-
return (h("span", { class: "error-message" }, "Il file ", h("span", { class: "file-name" }, key), " ", (_a = value[1]) !== null && _a !== void 0 ? _a : "", bothErrors, (_b = value[0]) !== null && _b !== void 0 ? _b : "", "."));
|
|
429
|
-
}
|
|
430
|
-
handleErrorModalContent() {
|
|
431
|
-
return (h("div", { slot: "modalContent" }, h("div", { class: "modal-wrapper" }, h("div", { class: "files" }, this.errorModalMessage ? (h("span", { class: "body-3" }, this.errorModalMessage)) : (Array.from(this.invalidFiles).map(([key, value]) => {
|
|
432
|
-
return h("span", { class: "body-3" }, this.formatErrorString(key, value));
|
|
433
|
-
}))))));
|
|
434
|
-
}
|
|
435
|
-
render() {
|
|
436
|
-
return (h(Host, { key: '30d78f7ce88aa6e994de1355cf4bb8bbc79e6f85' }, h("div", { key: '95a606aeda5279d50acb1b127f2d4784ccd95411', tabIndex: 0, class: `container ${this.getType()}` }, this.mainTitle && this.renderTitle(), this.getType() == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()), !!this.invalidFiles.size && (h("z-modal", { key: '576e0e283b6fc92d6099a94178fde4c4eaa280b9', modalid: `file-upload-${this.type}-error-modal`, tabIndex: 0, ref: (val) => (this.errorModal = val), modaltitle: this.errorModalTitle, onModalClose: () => (this.invalidFiles = new Map()), onModalBackgroundClick: () => (this.invalidFiles = new Map()) }, this.handleErrorModalContent()))));
|
|
437
|
-
}
|
|
438
|
-
get el() { return getElement(this); }
|
|
439
|
-
};
|
|
440
|
-
ZFileUpload.style = ZFileUploadStyle0;
|
|
441
|
-
|
|
442
207
|
/**
|
|
443
208
|
* Object containing SVG d path of `stroke` icons.
|
|
444
209
|
*/
|
|
@@ -1312,8 +1077,8 @@ Object.assign(ICONS, LEGACY_ICONS);
|
|
|
1312
1077
|
Object.assign(ICONS, { "burger-menu": ICONS["burger-menu-mobile"] });
|
|
1313
1078
|
Object.assign(ICONS, { "burger-menu-filled": ICONS["burger-menu-mobile-filled"] });
|
|
1314
1079
|
|
|
1315
|
-
const stylesCss$
|
|
1316
|
-
const ZIconStyle0 = stylesCss$
|
|
1080
|
+
const stylesCss$7 = ":host{margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0);line-height:0;vertical-align:middle}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";
|
|
1081
|
+
const ZIconStyle0 = stylesCss$7;
|
|
1317
1082
|
|
|
1318
1083
|
const ZIcon = class {
|
|
1319
1084
|
constructor(hostRef) {
|
|
@@ -1336,16 +1101,16 @@ const ZIcon = class {
|
|
|
1336
1101
|
};
|
|
1337
1102
|
ZIcon.style = ZIconStyle0;
|
|
1338
1103
|
|
|
1339
|
-
const stylesGeneralCss = ".sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textarea-wrapper.sc-z-input{-webkit-box-sizing:border-box;box-sizing:border-box;border:var(--border-size-small) solid var(--gray700);background:var(--color-input-field01);border-radius:var(--border-radius-small);color:var(--gray900);fill:var(--gray900);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg);outline:none}[size=\"small\"].sc-z-input-h input.sc-z-input,[size=\"small\"].sc-z-input-h textarea.sc-z-input,[size=\"small\"].sc-z-input-h .textarea-wrapper.sc-z-input,[size=\"x-small\"].sc-z-input-h input.sc-z-input,[size=\"x-small\"].sc-z-input-h textarea.sc-z-input,[size=\"x-small\"].sc-z-input-h .textarea-wrapper.sc-z-input{font-size:var(--font-size-2)}.cursor-select.sc-z-input-h input.sc-z-input{cursor:pointer}.sc-z-input-h:not(.active-select) input.sc-z-input:focus:focus-visible
|
|
1104
|
+
const stylesGeneralCss = ".sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textarea-wrapper.sc-z-input{-webkit-box-sizing:border-box;box-sizing:border-box;border:var(--border-size-small) solid var(--gray700);background:var(--color-input-field01);border-radius:var(--border-radius-small);color:var(--gray900);fill:var(--gray900);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg);outline:none}[size=\"small\"].sc-z-input-h input.sc-z-input,[size=\"small\"].sc-z-input-h textarea.sc-z-input,[size=\"small\"].sc-z-input-h .textarea-wrapper.sc-z-input,[size=\"x-small\"].sc-z-input-h input.sc-z-input,[size=\"x-small\"].sc-z-input-h textarea.sc-z-input,[size=\"x-small\"].sc-z-input-h .textarea-wrapper.sc-z-input{font-size:var(--font-size-2)}.cursor-select.sc-z-input-h input.sc-z-input{cursor:pointer}.sc-z-input-h:not(.active-select) input.sc-z-input:focus:focus-visible,.sc-z-input-h:not([readonly=\"true\"]) .textarea-wrapper.sc-z-input:focus-within{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}input.sc-z-input:focus:focus-visible,textarea.sc-z-input:focus:focus-visible{color:var(--color-input-field02)}.active-select.sc-z-input-h input.sc-z-input{border:var(--border-size-small) solid var(--color-primary01)}.cursor-select.sc-z-input-h input.sc-z-input:focus:focus-visible{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}.sc-z-input-h input[readonly].sc-z-input:focus:focus-visible{-webkit-box-shadow:none;box-shadow:none}.filled.sc-z-input{border-color:var(--color-surface05)}.input-success.sc-z-input{border-color:var(--color-success01);background:var(--color-success-inverse);fill:var(--color-success01)}.input-error.sc-z-input{border-color:var(--color-error01);background:var(--color-error-inverse);fill:var(--color-error01)}.input-warning.sc-z-input{border-color:var(--color-warning01);background:var(--color-warning-inverse);fill:var(--color-warning01)}input.sc-z-input:not([readonly]):hover,.textarea-wrapper.sc-z-input:hover{outline:var(--border-size-medium) solid var(--gray700);outline-offset:-2px}.sc-z-input-h:not(.active-select) input[readonly].sc-z-input,.readonly.sc-z-input{border-color:var(--color-disabled01);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) .textarea-wrapper.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) z-icon.sc-z-input{border-color:var(--color-disabled01);-webkit-box-shadow:none;box-shadow:none;color:var(--color-disabled03);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input:hover{border-width:var(--border-size-small)}input.sc-z-input::-webkit-input-placeholder,textarea.sc-z-input::-webkit-input-placeholder{color:var(--color-text05)}input.sc-z-input::-moz-placeholder,textarea.sc-z-input::-moz-placeholder{color:var(--color-text05)}input.sc-z-input:-ms-input-placeholder,textarea.sc-z-input:-ms-input-placeholder{color:var(--color-text05)}input.sc-z-input::-ms-input-placeholder,textarea.sc-z-input::-ms-input-placeholder{color:var(--color-text05)}input.sc-z-input::placeholder,textarea.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input::-webkit-textarea-placeholder{color:var(--color-text05)}.sc-z-input:-ms-textarea-placeholder{color:var(--color-text05)}.sc-z-input::-webkit-input-placeholder{color:var(--color-text05)}.sc-z-input::-moz-placeholder{color:var(--color-text05)}.sc-z-input:-ms-input-placeholder{color:var(--color-text05)}.sc-z-input::-ms-input-placeholder{color:var(--color-text05)}.sc-z-input::placeholder{color:var(--color-text05)}label.input-label.sc-z-input{display:block;padding-bottom:var(--space-unit);color:var(--color-default-text);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}[disabled].sc-z-input-h:not([disabled=\"false\"]) label.input-label.sc-z-input{color:var(--color-disabled03)}";
|
|
1340
1105
|
const ZInputStyle0 = stylesGeneralCss;
|
|
1341
1106
|
|
|
1342
|
-
const stylesTextCss = ".text-wrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1;fill:var(--gray900)}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 calc(var(--space-unit) * 1.5);margin:0}[size=\"small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4.5)}[size=\"x-small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.sc-z-input,.text-wrapper.sc-z-input>div.sc-z-input>input.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 5.25)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 8)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input{position:absolute;z-index:2;top:50%;right:calc(var(--space-unit) * 1.5);display:-ms-flexbox;display:flex;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input{padding:0;border:0;background:none;color:inherit;font:inherit;pointer-events:initial}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input+button.icon-button.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.hidden.sc-z-input{display:none}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.reset-icon.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.toggle-password-icon.sc-z-input{cursor:pointer}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.small.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.x-small.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset;-webkit-text-fill-color:currentcolor}";
|
|
1107
|
+
const stylesTextCss = ".text-wrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1;fill:var(--gray900)}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 calc(var(--space-unit) * 1.5);margin:0}[size=\"small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4.5)}[size=\"x-small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.sc-z-input,.text-wrapper.sc-z-input>div.sc-z-input>input.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 5.25)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 8)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input{position:absolute;z-index:2;top:50%;right:calc(var(--space-unit) * 1.5);display:-ms-flexbox;display:flex;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input{padding:0;border:0;background:none;color:inherit;font:inherit;pointer-events:initial}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input+button.icon-button.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.hidden.sc-z-input{display:none}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.reset-icon.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.toggle-password-icon.sc-z-input{cursor:pointer}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.small.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.x-small.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input:focus{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary);outline:none !important}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset;-webkit-text-fill-color:currentcolor}";
|
|
1343
1108
|
const ZInputStyle1 = stylesTextCss;
|
|
1344
1109
|
|
|
1345
1110
|
const stylesTextareaCss = ".textarea-wrapper.sc-z-input{padding:calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}textarea.sc-z-input::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-track{background-color:transparent}textarea.sc-z-input::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}textarea.sc-z-input{width:100%;min-height:132px;padding:0;border:none;margin:0;resize:none}";
|
|
1346
1111
|
const ZInputStyle2 = stylesTextareaCss;
|
|
1347
1112
|
|
|
1348
|
-
const stylesCheckboxRadioCss = ".radio-wrapper.sc-z-input,.checkbox-wrapper.sc-z-input{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;color:var(--color-default-text);fill:var(--color-primary01);font-family:var(--font-family-sans)}.radio-wrapper.sc-z-input:hover,.checkbox-wrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentcolor}.radio-wrapper.sc-z-input>input.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input{position:absolute;z-index:-1;opacity:0;pointer-events:none}.radio-wrapper.sc-z-input .radio-label.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;margin:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1;text-transform:inherit}.radio-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkbox-label.sc-z-input{cursor:pointer}.radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{cursor:pointer;fill:inherit}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-2)}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:14px;--z-icon-height:14px}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-1)}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input{-ms-flex-direction:row;flex-direction:row}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:calc(var(--space-unit) * 0.5)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input
|
|
1113
|
+
const stylesCheckboxRadioCss = ".radio-wrapper.sc-z-input,.checkbox-wrapper.sc-z-input{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;color:var(--color-default-text);fill:var(--color-primary01);font-family:var(--font-family-sans)}.radio-wrapper.sc-z-input:hover,.checkbox-wrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentcolor}.radio-wrapper.sc-z-input>input.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input{position:absolute;z-index:-1;opacity:0;pointer-events:none}.radio-wrapper.sc-z-input .radio-label.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;margin:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1;text-transform:inherit}.radio-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkbox-label.sc-z-input{cursor:pointer}.radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{cursor:pointer;fill:inherit}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-2)}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:14px;--z-icon-height:14px}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-1)}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input{-ms-flex-direction:row;flex-direction:row}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:calc(var(--space-unit) * 0.5)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input{border-radius:50%}.checkbox-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkbox-label.sc-z-input>z-icon.sc-z-input{border-radius:var(--border-radius-small)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkbox-label.sc-z-input>z-icon.sc-z-input{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input{color:var(--color-disabled03)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input>z-icon.sc-z-input{cursor:default;fill:var(--color-disabled01)}";
|
|
1349
1114
|
const ZInputStyle3 = stylesCheckboxRadioCss;
|
|
1350
1115
|
|
|
1351
1116
|
const ZInput = class {
|
|
@@ -1620,8 +1385,8 @@ const ZInput = class {
|
|
|
1620
1385
|
};
|
|
1621
1386
|
ZInput.style = ZInputStyle0 + (ZInputStyle1 + (ZInputStyle2 + ZInputStyle3));
|
|
1622
1387
|
|
|
1623
|
-
const stylesCss$
|
|
1624
|
-
const ZInputMessageStyle0 = stylesCss$
|
|
1388
|
+
const stylesCss$6 = ":host{display:-ms-flexbox;display:flex;min-height:calc(var(--space-unit) * 2.5);-ms-flex-align:start;align-items:start;margin-top:var(--space-unit);color:var(--color-text05);fill:currentcolor;font-family:var(--font-family-sans);font-size:var(--font-size-2);letter-spacing:0.16px}:host(.small),:host(.x-small){margin-top:calc(var(--space-unit) * 0.5);font-size:var(--font-size-1)}:host([status=\"success\"]){color:var(--color-text-success)}:host([status=\"error\"]){color:var(--color-text-error)}:host([status=\"warning\"]){color:var(--color-warning02)}:host(:focus){outline:none}:host>z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);--z-icon-right-margin:var(--space-unit);margin-top:calc(var(--space-unit) * 0.25)}:host(.small)>z-icon,:host(.x-small)>z-icon{--z-icon-width:14px;--z-icon-height:14px;--z-icon-right-margin:calc(var(--space-unit) * 0.5)}";
|
|
1389
|
+
const ZInputMessageStyle0 = stylesCss$6;
|
|
1625
1390
|
|
|
1626
1391
|
const ZInputMessage = class {
|
|
1627
1392
|
constructor(hostRef) {
|
|
@@ -1651,8 +1416,8 @@ const ZInputMessage = class {
|
|
|
1651
1416
|
};
|
|
1652
1417
|
ZInputMessage.style = ZInputMessageStyle0;
|
|
1653
1418
|
|
|
1654
|
-
const stylesCss$
|
|
1655
|
-
const ZListStyle0 = stylesCss$
|
|
1419
|
+
const stylesCss$5 = ":host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}";
|
|
1420
|
+
const ZListStyle0 = stylesCss$5;
|
|
1656
1421
|
|
|
1657
1422
|
const ZList = class {
|
|
1658
1423
|
constructor(hostRef) {
|
|
@@ -1679,8 +1444,8 @@ const ZList = class {
|
|
|
1679
1444
|
};
|
|
1680
1445
|
ZList.style = ZListStyle0;
|
|
1681
1446
|
|
|
1682
|
-
const stylesCss$
|
|
1683
|
-
const ZListElementStyle0 = stylesCss$
|
|
1447
|
+
const stylesCss$4 = ":host{outline:none}:host>.container{--background-color-list-element:var(--color-surface01);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02);display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size=\"small\"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size=\"medium\"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size=\"large\"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size=\"x-large\"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([clickable])>.container{cursor:pointer}:host([expandable]:hover)>.container,:host([clickable]:hover)>.container{background-color:var(--background-hover-color-list-element)}:host([expandable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}:host([clickable]:not([expandable]))>.container.clicked{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([clickable]:active)>.container{background-color:var(--background-active-color-list-element)}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container{display:-ms-flexbox;display:flex}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:justify;justify-content:space-between}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded{display:block}.z-list-content-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";
|
|
1448
|
+
const ZListElementStyle0 = stylesCss$4;
|
|
1684
1449
|
|
|
1685
1450
|
const ZListElement = class {
|
|
1686
1451
|
accessibleFocusHandler(e) {
|
|
@@ -1805,8 +1570,8 @@ const ZListElement = class {
|
|
|
1805
1570
|
};
|
|
1806
1571
|
ZListElement.style = ZListElementStyle0;
|
|
1807
1572
|
|
|
1808
|
-
const stylesCss$
|
|
1809
|
-
const ZListGroupStyle0 = stylesCss$
|
|
1573
|
+
const stylesCss$3 = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.z-list-group-header-container{color:var(--gray700);font-size:var(--font-size-2);font-weight:var(--font-sb) !important;letter-spacing:0.16px;line-height:1.4}:host>.z-list-group-header-container.has-header{padding-top:var(--space-unit);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}";
|
|
1574
|
+
const ZListGroupStyle0 = stylesCss$3;
|
|
1810
1575
|
|
|
1811
1576
|
const ZListGroup = class {
|
|
1812
1577
|
constructor(hostRef) {
|
|
@@ -1843,987 +1608,6 @@ const ZListGroup = class {
|
|
|
1843
1608
|
};
|
|
1844
1609
|
ZListGroup.style = ZListGroupStyle0;
|
|
1845
1610
|
|
|
1846
|
-
// nb. This is for IE10 and lower _only_.
|
|
1847
|
-
var supportCustomEvent = window.CustomEvent;
|
|
1848
|
-
if (!supportCustomEvent || typeof supportCustomEvent === 'object') {
|
|
1849
|
-
supportCustomEvent = function CustomEvent(event, x) {
|
|
1850
|
-
x = x || {};
|
|
1851
|
-
var ev = document.createEvent('CustomEvent');
|
|
1852
|
-
ev.initCustomEvent(event, !!x.bubbles, !!x.cancelable, x.detail || null);
|
|
1853
|
-
return ev;
|
|
1854
|
-
};
|
|
1855
|
-
supportCustomEvent.prototype = window.Event.prototype;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
/**
|
|
1859
|
-
* Dispatches the passed event to both an "on<type>" handler as well as via the
|
|
1860
|
-
* normal dispatch operation. Does not bubble.
|
|
1861
|
-
*
|
|
1862
|
-
* @param {!EventTarget} target
|
|
1863
|
-
* @param {!Event} event
|
|
1864
|
-
* @return {boolean}
|
|
1865
|
-
*/
|
|
1866
|
-
function safeDispatchEvent(target, event) {
|
|
1867
|
-
var check = 'on' + event.type.toLowerCase();
|
|
1868
|
-
if (typeof target[check] === 'function') {
|
|
1869
|
-
target[check](event);
|
|
1870
|
-
}
|
|
1871
|
-
return target.dispatchEvent(event);
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
/**
|
|
1875
|
-
* @param {Element} el to check for stacking context
|
|
1876
|
-
* @return {boolean} whether this el or its parents creates a stacking context
|
|
1877
|
-
*/
|
|
1878
|
-
function createsStackingContext(el) {
|
|
1879
|
-
while (el && el !== document.body) {
|
|
1880
|
-
var s = window.getComputedStyle(el);
|
|
1881
|
-
var invalid = function(k, ok) {
|
|
1882
|
-
return !(s[k] === undefined || s[k] === ok);
|
|
1883
|
-
};
|
|
1884
|
-
|
|
1885
|
-
if (s.opacity < 1 ||
|
|
1886
|
-
invalid('zIndex', 'auto') ||
|
|
1887
|
-
invalid('transform', 'none') ||
|
|
1888
|
-
invalid('mixBlendMode', 'normal') ||
|
|
1889
|
-
invalid('filter', 'none') ||
|
|
1890
|
-
invalid('perspective', 'none') ||
|
|
1891
|
-
s['isolation'] === 'isolate' ||
|
|
1892
|
-
s.position === 'fixed' ||
|
|
1893
|
-
s.webkitOverflowScrolling === 'touch') {
|
|
1894
|
-
return true;
|
|
1895
|
-
}
|
|
1896
|
-
el = el.parentElement;
|
|
1897
|
-
}
|
|
1898
|
-
return false;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
/**
|
|
1902
|
-
* Finds the nearest <dialog> from the passed element.
|
|
1903
|
-
*
|
|
1904
|
-
* @param {Element} el to search from
|
|
1905
|
-
* @return {HTMLDialogElement} dialog found
|
|
1906
|
-
*/
|
|
1907
|
-
function findNearestDialog(el) {
|
|
1908
|
-
while (el) {
|
|
1909
|
-
if (el.localName === 'dialog') {
|
|
1910
|
-
return /** @type {HTMLDialogElement} */ (el);
|
|
1911
|
-
}
|
|
1912
|
-
if (el.parentElement) {
|
|
1913
|
-
el = el.parentElement;
|
|
1914
|
-
} else if (el.parentNode) {
|
|
1915
|
-
el = el.parentNode.host;
|
|
1916
|
-
} else {
|
|
1917
|
-
el = null;
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
return null;
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
/**
|
|
1924
|
-
* Blur the specified element, as long as it's not the HTML body element.
|
|
1925
|
-
* This works around an IE9/10 bug - blurring the body causes Windows to
|
|
1926
|
-
* blur the whole application.
|
|
1927
|
-
*
|
|
1928
|
-
* @param {Element} el to blur
|
|
1929
|
-
*/
|
|
1930
|
-
function safeBlur(el) {
|
|
1931
|
-
// Find the actual focused element when the active element is inside a shadow root
|
|
1932
|
-
while (el && el.shadowRoot && el.shadowRoot.activeElement) {
|
|
1933
|
-
el = el.shadowRoot.activeElement;
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
if (el && el.blur && el !== document.body) {
|
|
1937
|
-
el.blur();
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
/**
|
|
1942
|
-
* @param {!NodeList} nodeList to search
|
|
1943
|
-
* @param {Node} node to find
|
|
1944
|
-
* @return {boolean} whether node is inside nodeList
|
|
1945
|
-
*/
|
|
1946
|
-
function inNodeList(nodeList, node) {
|
|
1947
|
-
for (var i = 0; i < nodeList.length; ++i) {
|
|
1948
|
-
if (nodeList[i] === node) {
|
|
1949
|
-
return true;
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
return false;
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
/**
|
|
1956
|
-
* @param {HTMLFormElement} el to check
|
|
1957
|
-
* @return {boolean} whether this form has method="dialog"
|
|
1958
|
-
*/
|
|
1959
|
-
function isFormMethodDialog(el) {
|
|
1960
|
-
if (!el || !el.hasAttribute('method')) {
|
|
1961
|
-
return false;
|
|
1962
|
-
}
|
|
1963
|
-
return el.getAttribute('method').toLowerCase() === 'dialog';
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
/**
|
|
1967
|
-
* @param {!DocumentFragment|!Element} hostElement
|
|
1968
|
-
* @return {?Element}
|
|
1969
|
-
*/
|
|
1970
|
-
function findFocusableElementWithin(hostElement) {
|
|
1971
|
-
// Note that this is 'any focusable area'. This list is probably not exhaustive, but the
|
|
1972
|
-
// alternative involves stepping through and trying to focus everything.
|
|
1973
|
-
var opts = ['button', 'input', 'keygen', 'select', 'textarea'];
|
|
1974
|
-
var query = opts.map(function(el) {
|
|
1975
|
-
return el + ':not([disabled])';
|
|
1976
|
-
});
|
|
1977
|
-
// TODO(samthor): tabindex values that are not numeric are not focusable.
|
|
1978
|
-
query.push('[tabindex]:not([disabled]):not([tabindex=""])'); // tabindex != "", not disabled
|
|
1979
|
-
var target = hostElement.querySelector(query.join(', '));
|
|
1980
|
-
|
|
1981
|
-
if (!target && 'attachShadow' in Element.prototype) {
|
|
1982
|
-
// If we haven't found a focusable target, see if the host element contains an element
|
|
1983
|
-
// which has a shadowRoot.
|
|
1984
|
-
// Recursively search for the first focusable item in shadow roots.
|
|
1985
|
-
var elems = hostElement.querySelectorAll('*');
|
|
1986
|
-
for (var i = 0; i < elems.length; i++) {
|
|
1987
|
-
if (elems[i].tagName && elems[i].shadowRoot) {
|
|
1988
|
-
target = findFocusableElementWithin(elems[i].shadowRoot);
|
|
1989
|
-
if (target) {
|
|
1990
|
-
break;
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
return target;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
/**
|
|
1999
|
-
* Determines if an element is attached to the DOM.
|
|
2000
|
-
* @param {Element} element to check
|
|
2001
|
-
* @return {boolean} whether the element is in DOM
|
|
2002
|
-
*/
|
|
2003
|
-
function isConnected(element) {
|
|
2004
|
-
return element.isConnected || document.body.contains(element);
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
/**
|
|
2008
|
-
* @param {!Event} event
|
|
2009
|
-
* @return {?Element}
|
|
2010
|
-
*/
|
|
2011
|
-
function findFormSubmitter(event) {
|
|
2012
|
-
if (event.submitter) {
|
|
2013
|
-
return event.submitter;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
var form = event.target;
|
|
2017
|
-
if (!(form instanceof HTMLFormElement)) {
|
|
2018
|
-
return null;
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
var submitter = dialogPolyfill.formSubmitter;
|
|
2022
|
-
if (!submitter) {
|
|
2023
|
-
var target = event.target;
|
|
2024
|
-
var root = ('getRootNode' in target && target.getRootNode() || document);
|
|
2025
|
-
submitter = root.activeElement;
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
if (!submitter || submitter.form !== form) {
|
|
2029
|
-
return null;
|
|
2030
|
-
}
|
|
2031
|
-
return submitter;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
/**
|
|
2035
|
-
* @param {!Event} event
|
|
2036
|
-
*/
|
|
2037
|
-
function maybeHandleSubmit(event) {
|
|
2038
|
-
if (event.defaultPrevented) {
|
|
2039
|
-
return;
|
|
2040
|
-
}
|
|
2041
|
-
var form = /** @type {!HTMLFormElement} */ (event.target);
|
|
2042
|
-
|
|
2043
|
-
// We'd have a value if we clicked on an imagemap.
|
|
2044
|
-
var value = dialogPolyfill.imagemapUseValue;
|
|
2045
|
-
var submitter = findFormSubmitter(event);
|
|
2046
|
-
if (value === null && submitter) {
|
|
2047
|
-
value = submitter.value;
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
// There should always be a dialog as this handler is added specifically on them, but check just
|
|
2051
|
-
// in case.
|
|
2052
|
-
var dialog = findNearestDialog(form);
|
|
2053
|
-
if (!dialog) {
|
|
2054
|
-
return;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
// Prefer formmethod on the button.
|
|
2058
|
-
var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');
|
|
2059
|
-
if (formmethod !== 'dialog') {
|
|
2060
|
-
return;
|
|
2061
|
-
}
|
|
2062
|
-
event.preventDefault();
|
|
2063
|
-
|
|
2064
|
-
if (value != null) {
|
|
2065
|
-
// nb. we explicitly check against null/undefined
|
|
2066
|
-
dialog.close(value);
|
|
2067
|
-
} else {
|
|
2068
|
-
dialog.close();
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
* @param {!HTMLDialogElement} dialog to upgrade
|
|
2074
|
-
* @constructor
|
|
2075
|
-
*/
|
|
2076
|
-
function dialogPolyfillInfo(dialog) {
|
|
2077
|
-
this.dialog_ = dialog;
|
|
2078
|
-
this.replacedStyleTop_ = false;
|
|
2079
|
-
this.openAsModal_ = false;
|
|
2080
|
-
|
|
2081
|
-
// Set a11y role. Browsers that support dialog implicitly know this already.
|
|
2082
|
-
if (!dialog.hasAttribute('role')) {
|
|
2083
|
-
dialog.setAttribute('role', 'dialog');
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
dialog.show = this.show.bind(this);
|
|
2087
|
-
dialog.showModal = this.showModal.bind(this);
|
|
2088
|
-
dialog.close = this.close.bind(this);
|
|
2089
|
-
|
|
2090
|
-
dialog.addEventListener('submit', maybeHandleSubmit, false);
|
|
2091
|
-
|
|
2092
|
-
if (!('returnValue' in dialog)) {
|
|
2093
|
-
dialog.returnValue = '';
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
if ('MutationObserver' in window) {
|
|
2097
|
-
var mo = new MutationObserver(this.maybeHideModal.bind(this));
|
|
2098
|
-
mo.observe(dialog, {attributes: true, attributeFilter: ['open']});
|
|
2099
|
-
} else {
|
|
2100
|
-
// IE10 and below support. Note that DOMNodeRemoved etc fire _before_ removal. They also
|
|
2101
|
-
// seem to fire even if the element was removed as part of a parent removal. Use the removed
|
|
2102
|
-
// events to force downgrade (useful if removed/immediately added).
|
|
2103
|
-
var removed = false;
|
|
2104
|
-
var cb = function() {
|
|
2105
|
-
removed ? this.downgradeModal() : this.maybeHideModal();
|
|
2106
|
-
removed = false;
|
|
2107
|
-
}.bind(this);
|
|
2108
|
-
var timeout;
|
|
2109
|
-
var delayModel = function(ev) {
|
|
2110
|
-
if (ev.target !== dialog) { return; } // not for a child element
|
|
2111
|
-
var cand = 'DOMNodeRemoved';
|
|
2112
|
-
removed |= (ev.type.substr(0, cand.length) === cand);
|
|
2113
|
-
window.clearTimeout(timeout);
|
|
2114
|
-
timeout = window.setTimeout(cb, 0);
|
|
2115
|
-
};
|
|
2116
|
-
['DOMAttrModified', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument'].forEach(function(name) {
|
|
2117
|
-
dialog.addEventListener(name, delayModel);
|
|
2118
|
-
});
|
|
2119
|
-
}
|
|
2120
|
-
// Note that the DOM is observed inside DialogManager while any dialog
|
|
2121
|
-
// is being displayed as a modal, to catch modal removal from the DOM.
|
|
2122
|
-
|
|
2123
|
-
Object.defineProperty(dialog, 'open', {
|
|
2124
|
-
set: this.setOpen.bind(this),
|
|
2125
|
-
get: dialog.hasAttribute.bind(dialog, 'open')
|
|
2126
|
-
});
|
|
2127
|
-
|
|
2128
|
-
this.backdrop_ = document.createElement('div');
|
|
2129
|
-
this.backdrop_.className = 'backdrop';
|
|
2130
|
-
this.backdrop_.addEventListener('mouseup' , this.backdropMouseEvent_.bind(this));
|
|
2131
|
-
this.backdrop_.addEventListener('mousedown', this.backdropMouseEvent_.bind(this));
|
|
2132
|
-
this.backdrop_.addEventListener('click' , this.backdropMouseEvent_.bind(this));
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
dialogPolyfillInfo.prototype = /** @type {HTMLDialogElement.prototype} */ ({
|
|
2136
|
-
|
|
2137
|
-
get dialog() {
|
|
2138
|
-
return this.dialog_;
|
|
2139
|
-
},
|
|
2140
|
-
|
|
2141
|
-
/**
|
|
2142
|
-
* Maybe remove this dialog from the modal top layer. This is called when
|
|
2143
|
-
* a modal dialog may no longer be tenable, e.g., when the dialog is no
|
|
2144
|
-
* longer open or is no longer part of the DOM.
|
|
2145
|
-
*/
|
|
2146
|
-
maybeHideModal: function() {
|
|
2147
|
-
if (this.dialog_.hasAttribute('open') && isConnected(this.dialog_)) { return; }
|
|
2148
|
-
this.downgradeModal();
|
|
2149
|
-
},
|
|
2150
|
-
|
|
2151
|
-
/**
|
|
2152
|
-
* Remove this dialog from the modal top layer, leaving it as a non-modal.
|
|
2153
|
-
*/
|
|
2154
|
-
downgradeModal: function() {
|
|
2155
|
-
if (!this.openAsModal_) { return; }
|
|
2156
|
-
this.openAsModal_ = false;
|
|
2157
|
-
this.dialog_.style.zIndex = '';
|
|
2158
|
-
|
|
2159
|
-
// This won't match the native <dialog> exactly because if the user set top on a centered
|
|
2160
|
-
// polyfill dialog, that top gets thrown away when the dialog is closed. Not sure it's
|
|
2161
|
-
// possible to polyfill this perfectly.
|
|
2162
|
-
if (this.replacedStyleTop_) {
|
|
2163
|
-
this.dialog_.style.top = '';
|
|
2164
|
-
this.replacedStyleTop_ = false;
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
// Clear the backdrop and remove from the manager.
|
|
2168
|
-
this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_);
|
|
2169
|
-
dialogPolyfill.dm.removeDialog(this);
|
|
2170
|
-
},
|
|
2171
|
-
|
|
2172
|
-
/**
|
|
2173
|
-
* @param {boolean} value whether to open or close this dialog
|
|
2174
|
-
*/
|
|
2175
|
-
setOpen: function(value) {
|
|
2176
|
-
if (value) {
|
|
2177
|
-
this.dialog_.hasAttribute('open') || this.dialog_.setAttribute('open', '');
|
|
2178
|
-
} else {
|
|
2179
|
-
this.dialog_.removeAttribute('open');
|
|
2180
|
-
this.maybeHideModal(); // nb. redundant with MutationObserver
|
|
2181
|
-
}
|
|
2182
|
-
},
|
|
2183
|
-
|
|
2184
|
-
/**
|
|
2185
|
-
* Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if
|
|
2186
|
-
* they were on the dialog itself.
|
|
2187
|
-
*
|
|
2188
|
-
* @param {!Event} e to redirect
|
|
2189
|
-
*/
|
|
2190
|
-
backdropMouseEvent_: function(e) {
|
|
2191
|
-
if (!this.dialog_.hasAttribute('tabindex')) {
|
|
2192
|
-
// Clicking on the backdrop should move the implicit cursor, even if dialog cannot be
|
|
2193
|
-
// focused. Create a fake thing to focus on. If the backdrop was _before_ the dialog, this
|
|
2194
|
-
// would not be needed - clicks would move the implicit cursor there.
|
|
2195
|
-
var fake = document.createElement('div');
|
|
2196
|
-
this.dialog_.insertBefore(fake, this.dialog_.firstChild);
|
|
2197
|
-
fake.tabIndex = -1;
|
|
2198
|
-
fake.focus();
|
|
2199
|
-
this.dialog_.removeChild(fake);
|
|
2200
|
-
} else {
|
|
2201
|
-
this.dialog_.focus();
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
var redirectedEvent = document.createEvent('MouseEvents');
|
|
2205
|
-
redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,
|
|
2206
|
-
e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,
|
|
2207
|
-
e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
|
|
2208
|
-
this.dialog_.dispatchEvent(redirectedEvent);
|
|
2209
|
-
e.stopPropagation();
|
|
2210
|
-
},
|
|
2211
|
-
|
|
2212
|
-
/**
|
|
2213
|
-
* Focuses on the first focusable element within the dialog. This will always blur the current
|
|
2214
|
-
* focus, even if nothing within the dialog is found.
|
|
2215
|
-
*/
|
|
2216
|
-
focus_: function() {
|
|
2217
|
-
// Find element with `autofocus` attribute, or fall back to the first form/tabindex control.
|
|
2218
|
-
var target = this.dialog_.querySelector('[autofocus]:not([disabled])');
|
|
2219
|
-
if (!target && this.dialog_.tabIndex >= 0) {
|
|
2220
|
-
target = this.dialog_;
|
|
2221
|
-
}
|
|
2222
|
-
if (!target) {
|
|
2223
|
-
target = findFocusableElementWithin(this.dialog_);
|
|
2224
|
-
}
|
|
2225
|
-
safeBlur(document.activeElement);
|
|
2226
|
-
target && target.focus();
|
|
2227
|
-
},
|
|
2228
|
-
|
|
2229
|
-
/**
|
|
2230
|
-
* Sets the zIndex for the backdrop and dialog.
|
|
2231
|
-
*
|
|
2232
|
-
* @param {number} dialogZ
|
|
2233
|
-
* @param {number} backdropZ
|
|
2234
|
-
*/
|
|
2235
|
-
updateZIndex: function(dialogZ, backdropZ) {
|
|
2236
|
-
if (dialogZ < backdropZ) {
|
|
2237
|
-
throw new Error('dialogZ should never be < backdropZ');
|
|
2238
|
-
}
|
|
2239
|
-
this.dialog_.style.zIndex = dialogZ;
|
|
2240
|
-
this.backdrop_.style.zIndex = backdropZ;
|
|
2241
|
-
},
|
|
2242
|
-
|
|
2243
|
-
/**
|
|
2244
|
-
* Shows the dialog. If the dialog is already open, this does nothing.
|
|
2245
|
-
*/
|
|
2246
|
-
show: function() {
|
|
2247
|
-
if (!this.dialog_.open) {
|
|
2248
|
-
this.setOpen(true);
|
|
2249
|
-
this.focus_();
|
|
2250
|
-
}
|
|
2251
|
-
},
|
|
2252
|
-
|
|
2253
|
-
/**
|
|
2254
|
-
* Show this dialog modally.
|
|
2255
|
-
*/
|
|
2256
|
-
showModal: function() {
|
|
2257
|
-
if (this.dialog_.hasAttribute('open')) {
|
|
2258
|
-
throw new Error('Failed to execute \'showModal\' on dialog: The element is already open, and therefore cannot be opened modally.');
|
|
2259
|
-
}
|
|
2260
|
-
if (!isConnected(this.dialog_)) {
|
|
2261
|
-
throw new Error('Failed to execute \'showModal\' on dialog: The element is not in a Document.');
|
|
2262
|
-
}
|
|
2263
|
-
if (!dialogPolyfill.dm.pushDialog(this)) {
|
|
2264
|
-
throw new Error('Failed to execute \'showModal\' on dialog: There are too many open modal dialogs.');
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
if (createsStackingContext(this.dialog_.parentElement)) {
|
|
2268
|
-
console.warn('A dialog is being shown inside a stacking context. ' +
|
|
2269
|
-
'This may cause it to be unusable. For more information, see this link: ' +
|
|
2270
|
-
'https://github.com/GoogleChrome/dialog-polyfill/#stacking-context');
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
this.setOpen(true);
|
|
2274
|
-
this.openAsModal_ = true;
|
|
2275
|
-
|
|
2276
|
-
// Optionally center vertically, relative to the current viewport.
|
|
2277
|
-
if (dialogPolyfill.needsCentering(this.dialog_)) {
|
|
2278
|
-
dialogPolyfill.reposition(this.dialog_);
|
|
2279
|
-
this.replacedStyleTop_ = true;
|
|
2280
|
-
} else {
|
|
2281
|
-
this.replacedStyleTop_ = false;
|
|
2282
|
-
}
|
|
2283
|
-
|
|
2284
|
-
// Insert backdrop.
|
|
2285
|
-
this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling);
|
|
2286
|
-
|
|
2287
|
-
// Focus on whatever inside the dialog.
|
|
2288
|
-
this.focus_();
|
|
2289
|
-
},
|
|
2290
|
-
|
|
2291
|
-
/**
|
|
2292
|
-
* Closes this HTMLDialogElement. This is optional vs clearing the open
|
|
2293
|
-
* attribute, however this fires a 'close' event.
|
|
2294
|
-
*
|
|
2295
|
-
* @param {string=} opt_returnValue to use as the returnValue
|
|
2296
|
-
*/
|
|
2297
|
-
close: function(opt_returnValue) {
|
|
2298
|
-
if (!this.dialog_.hasAttribute('open')) {
|
|
2299
|
-
throw new Error('Failed to execute \'close\' on dialog: The element does not have an \'open\' attribute, and therefore cannot be closed.');
|
|
2300
|
-
}
|
|
2301
|
-
this.setOpen(false);
|
|
2302
|
-
|
|
2303
|
-
// Leave returnValue untouched in case it was set directly on the element
|
|
2304
|
-
if (opt_returnValue !== undefined) {
|
|
2305
|
-
this.dialog_.returnValue = opt_returnValue;
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
// Triggering "close" event for any attached listeners on the <dialog>.
|
|
2309
|
-
var closeEvent = new supportCustomEvent('close', {
|
|
2310
|
-
bubbles: false,
|
|
2311
|
-
cancelable: false
|
|
2312
|
-
});
|
|
2313
|
-
safeDispatchEvent(this.dialog_, closeEvent);
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
});
|
|
2317
|
-
|
|
2318
|
-
var dialogPolyfill = {};
|
|
2319
|
-
|
|
2320
|
-
dialogPolyfill.reposition = function(element) {
|
|
2321
|
-
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
|
2322
|
-
var topValue = scrollTop + (window.innerHeight - element.offsetHeight) / 2;
|
|
2323
|
-
element.style.top = Math.max(scrollTop, topValue) + 'px';
|
|
2324
|
-
};
|
|
2325
|
-
|
|
2326
|
-
dialogPolyfill.isInlinePositionSetByStylesheet = function(element) {
|
|
2327
|
-
for (var i = 0; i < document.styleSheets.length; ++i) {
|
|
2328
|
-
var styleSheet = document.styleSheets[i];
|
|
2329
|
-
var cssRules = null;
|
|
2330
|
-
// Some browsers throw on cssRules.
|
|
2331
|
-
try {
|
|
2332
|
-
cssRules = styleSheet.cssRules;
|
|
2333
|
-
} catch (e) {}
|
|
2334
|
-
if (!cssRules) { continue; }
|
|
2335
|
-
for (var j = 0; j < cssRules.length; ++j) {
|
|
2336
|
-
var rule = cssRules[j];
|
|
2337
|
-
var selectedNodes = null;
|
|
2338
|
-
// Ignore errors on invalid selector texts.
|
|
2339
|
-
try {
|
|
2340
|
-
selectedNodes = document.querySelectorAll(rule.selectorText);
|
|
2341
|
-
} catch(e) {}
|
|
2342
|
-
if (!selectedNodes || !inNodeList(selectedNodes, element)) {
|
|
2343
|
-
continue;
|
|
2344
|
-
}
|
|
2345
|
-
var cssTop = rule.style.getPropertyValue('top');
|
|
2346
|
-
var cssBottom = rule.style.getPropertyValue('bottom');
|
|
2347
|
-
if ((cssTop && cssTop !== 'auto') || (cssBottom && cssBottom !== 'auto')) {
|
|
2348
|
-
return true;
|
|
2349
|
-
}
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
|
-
return false;
|
|
2353
|
-
};
|
|
2354
|
-
|
|
2355
|
-
dialogPolyfill.needsCentering = function(dialog) {
|
|
2356
|
-
var computedStyle = window.getComputedStyle(dialog);
|
|
2357
|
-
if (computedStyle.position !== 'absolute') {
|
|
2358
|
-
return false;
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
// We must determine whether the top/bottom specified value is non-auto. In
|
|
2362
|
-
// WebKit/Blink, checking computedStyle.top == 'auto' is sufficient, but
|
|
2363
|
-
// Firefox returns the used value. So we do this crazy thing instead: check
|
|
2364
|
-
// the inline style and then go through CSS rules.
|
|
2365
|
-
if ((dialog.style.top !== 'auto' && dialog.style.top !== '') ||
|
|
2366
|
-
(dialog.style.bottom !== 'auto' && dialog.style.bottom !== '')) {
|
|
2367
|
-
return false;
|
|
2368
|
-
}
|
|
2369
|
-
return !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);
|
|
2370
|
-
};
|
|
2371
|
-
|
|
2372
|
-
/**
|
|
2373
|
-
* @param {!Element} element to force upgrade
|
|
2374
|
-
*/
|
|
2375
|
-
dialogPolyfill.forceRegisterDialog = function(element) {
|
|
2376
|
-
if (window.HTMLDialogElement || element.showModal) {
|
|
2377
|
-
console.warn('This browser already supports <dialog>, the polyfill ' +
|
|
2378
|
-
'may not work correctly', element);
|
|
2379
|
-
}
|
|
2380
|
-
if (element.localName !== 'dialog') {
|
|
2381
|
-
throw new Error('Failed to register dialog: The element is not a dialog.');
|
|
2382
|
-
}
|
|
2383
|
-
new dialogPolyfillInfo(/** @type {!HTMLDialogElement} */ (element));
|
|
2384
|
-
};
|
|
2385
|
-
|
|
2386
|
-
/**
|
|
2387
|
-
* @param {!Element} element to upgrade, if necessary
|
|
2388
|
-
*/
|
|
2389
|
-
dialogPolyfill.registerDialog = function(element) {
|
|
2390
|
-
if (!element.showModal) {
|
|
2391
|
-
dialogPolyfill.forceRegisterDialog(element);
|
|
2392
|
-
}
|
|
2393
|
-
};
|
|
2394
|
-
|
|
2395
|
-
/**
|
|
2396
|
-
* @constructor
|
|
2397
|
-
*/
|
|
2398
|
-
dialogPolyfill.DialogManager = function() {
|
|
2399
|
-
/** @type {!Array<!dialogPolyfillInfo>} */
|
|
2400
|
-
this.pendingDialogStack = [];
|
|
2401
|
-
|
|
2402
|
-
var checkDOM = this.checkDOM_.bind(this);
|
|
2403
|
-
|
|
2404
|
-
// The overlay is used to simulate how a modal dialog blocks the document.
|
|
2405
|
-
// The blocking dialog is positioned on top of the overlay, and the rest of
|
|
2406
|
-
// the dialogs on the pending dialog stack are positioned below it. In the
|
|
2407
|
-
// actual implementation, the modal dialog stacking is controlled by the
|
|
2408
|
-
// top layer, where z-index has no effect.
|
|
2409
|
-
this.overlay = document.createElement('div');
|
|
2410
|
-
this.overlay.className = '_dialog_overlay';
|
|
2411
|
-
this.overlay.addEventListener('click', function(e) {
|
|
2412
|
-
this.forwardTab_ = undefined;
|
|
2413
|
-
e.stopPropagation();
|
|
2414
|
-
checkDOM([]); // sanity-check DOM
|
|
2415
|
-
}.bind(this));
|
|
2416
|
-
|
|
2417
|
-
this.handleKey_ = this.handleKey_.bind(this);
|
|
2418
|
-
this.handleFocus_ = this.handleFocus_.bind(this);
|
|
2419
|
-
|
|
2420
|
-
this.zIndexLow_ = 100000;
|
|
2421
|
-
this.zIndexHigh_ = 100000 + 150;
|
|
2422
|
-
|
|
2423
|
-
this.forwardTab_ = undefined;
|
|
2424
|
-
|
|
2425
|
-
if ('MutationObserver' in window) {
|
|
2426
|
-
this.mo_ = new MutationObserver(function(records) {
|
|
2427
|
-
var removed = [];
|
|
2428
|
-
records.forEach(function(rec) {
|
|
2429
|
-
for (var i = 0, c; c = rec.removedNodes[i]; ++i) {
|
|
2430
|
-
if (!(c instanceof Element)) {
|
|
2431
|
-
continue;
|
|
2432
|
-
} else if (c.localName === 'dialog') {
|
|
2433
|
-
removed.push(c);
|
|
2434
|
-
}
|
|
2435
|
-
removed = removed.concat(c.querySelectorAll('dialog'));
|
|
2436
|
-
}
|
|
2437
|
-
});
|
|
2438
|
-
removed.length && checkDOM(removed);
|
|
2439
|
-
});
|
|
2440
|
-
}
|
|
2441
|
-
};
|
|
2442
|
-
|
|
2443
|
-
/**
|
|
2444
|
-
* Called on the first modal dialog being shown. Adds the overlay and related
|
|
2445
|
-
* handlers.
|
|
2446
|
-
*/
|
|
2447
|
-
dialogPolyfill.DialogManager.prototype.blockDocument = function() {
|
|
2448
|
-
document.documentElement.addEventListener('focus', this.handleFocus_, true);
|
|
2449
|
-
document.addEventListener('keydown', this.handleKey_);
|
|
2450
|
-
this.mo_ && this.mo_.observe(document, {childList: true, subtree: true});
|
|
2451
|
-
};
|
|
2452
|
-
|
|
2453
|
-
/**
|
|
2454
|
-
* Called on the first modal dialog being removed, i.e., when no more modal
|
|
2455
|
-
* dialogs are visible.
|
|
2456
|
-
*/
|
|
2457
|
-
dialogPolyfill.DialogManager.prototype.unblockDocument = function() {
|
|
2458
|
-
document.documentElement.removeEventListener('focus', this.handleFocus_, true);
|
|
2459
|
-
document.removeEventListener('keydown', this.handleKey_);
|
|
2460
|
-
this.mo_ && this.mo_.disconnect();
|
|
2461
|
-
};
|
|
2462
|
-
|
|
2463
|
-
/**
|
|
2464
|
-
* Updates the stacking of all known dialogs.
|
|
2465
|
-
*/
|
|
2466
|
-
dialogPolyfill.DialogManager.prototype.updateStacking = function() {
|
|
2467
|
-
var zIndex = this.zIndexHigh_;
|
|
2468
|
-
|
|
2469
|
-
for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
|
|
2470
|
-
dpi.updateZIndex(--zIndex, --zIndex);
|
|
2471
|
-
if (i === 0) {
|
|
2472
|
-
this.overlay.style.zIndex = --zIndex;
|
|
2473
|
-
}
|
|
2474
|
-
}
|
|
2475
|
-
|
|
2476
|
-
// Make the overlay a sibling of the dialog itself.
|
|
2477
|
-
var last = this.pendingDialogStack[0];
|
|
2478
|
-
if (last) {
|
|
2479
|
-
var p = last.dialog.parentNode || document.body;
|
|
2480
|
-
p.appendChild(this.overlay);
|
|
2481
|
-
} else if (this.overlay.parentNode) {
|
|
2482
|
-
this.overlay.parentNode.removeChild(this.overlay);
|
|
2483
|
-
}
|
|
2484
|
-
};
|
|
2485
|
-
|
|
2486
|
-
/**
|
|
2487
|
-
* @param {Element} candidate to check if contained or is the top-most modal dialog
|
|
2488
|
-
* @return {boolean} whether candidate is contained in top dialog
|
|
2489
|
-
*/
|
|
2490
|
-
dialogPolyfill.DialogManager.prototype.containedByTopDialog_ = function(candidate) {
|
|
2491
|
-
while (candidate = findNearestDialog(candidate)) {
|
|
2492
|
-
for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
|
|
2493
|
-
if (dpi.dialog === candidate) {
|
|
2494
|
-
return i === 0; // only valid if top-most
|
|
2495
|
-
}
|
|
2496
|
-
}
|
|
2497
|
-
candidate = candidate.parentElement;
|
|
2498
|
-
}
|
|
2499
|
-
return false;
|
|
2500
|
-
};
|
|
2501
|
-
|
|
2502
|
-
dialogPolyfill.DialogManager.prototype.handleFocus_ = function(event) {
|
|
2503
|
-
var target = event.composedPath ? event.composedPath()[0] : event.target;
|
|
2504
|
-
|
|
2505
|
-
if (this.containedByTopDialog_(target)) { return; }
|
|
2506
|
-
|
|
2507
|
-
if (document.activeElement === document.documentElement) { return; }
|
|
2508
|
-
|
|
2509
|
-
event.preventDefault();
|
|
2510
|
-
event.stopPropagation();
|
|
2511
|
-
safeBlur(/** @type {Element} */ (target));
|
|
2512
|
-
|
|
2513
|
-
if (this.forwardTab_ === undefined) { return; } // move focus only from a tab key
|
|
2514
|
-
|
|
2515
|
-
var dpi = this.pendingDialogStack[0];
|
|
2516
|
-
var dialog = dpi.dialog;
|
|
2517
|
-
var position = dialog.compareDocumentPosition(target);
|
|
2518
|
-
if (position & Node.DOCUMENT_POSITION_PRECEDING) {
|
|
2519
|
-
if (this.forwardTab_) {
|
|
2520
|
-
// forward
|
|
2521
|
-
dpi.focus_();
|
|
2522
|
-
} else if (target !== document.documentElement) {
|
|
2523
|
-
// backwards if we're not already focused on <html>
|
|
2524
|
-
document.documentElement.focus();
|
|
2525
|
-
}
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
return false;
|
|
2529
|
-
};
|
|
2530
|
-
|
|
2531
|
-
dialogPolyfill.DialogManager.prototype.handleKey_ = function(event) {
|
|
2532
|
-
this.forwardTab_ = undefined;
|
|
2533
|
-
if (event.keyCode === 27) {
|
|
2534
|
-
event.preventDefault();
|
|
2535
|
-
event.stopPropagation();
|
|
2536
|
-
var cancelEvent = new supportCustomEvent('cancel', {
|
|
2537
|
-
bubbles: false,
|
|
2538
|
-
cancelable: true
|
|
2539
|
-
});
|
|
2540
|
-
var dpi = this.pendingDialogStack[0];
|
|
2541
|
-
if (dpi && safeDispatchEvent(dpi.dialog, cancelEvent)) {
|
|
2542
|
-
dpi.dialog.close();
|
|
2543
|
-
}
|
|
2544
|
-
} else if (event.keyCode === 9) {
|
|
2545
|
-
this.forwardTab_ = !event.shiftKey;
|
|
2546
|
-
}
|
|
2547
|
-
};
|
|
2548
|
-
|
|
2549
|
-
/**
|
|
2550
|
-
* Finds and downgrades any known modal dialogs that are no longer displayed. Dialogs that are
|
|
2551
|
-
* removed and immediately readded don't stay modal, they become normal.
|
|
2552
|
-
*
|
|
2553
|
-
* @param {!Array<!HTMLDialogElement>} removed that have definitely been removed
|
|
2554
|
-
*/
|
|
2555
|
-
dialogPolyfill.DialogManager.prototype.checkDOM_ = function(removed) {
|
|
2556
|
-
// This operates on a clone because it may cause it to change. Each change also calls
|
|
2557
|
-
// updateStacking, which only actually needs to happen once. But who removes many modal dialogs
|
|
2558
|
-
// at a time?!
|
|
2559
|
-
var clone = this.pendingDialogStack.slice();
|
|
2560
|
-
clone.forEach(function(dpi) {
|
|
2561
|
-
if (removed.indexOf(dpi.dialog) !== -1) {
|
|
2562
|
-
dpi.downgradeModal();
|
|
2563
|
-
} else {
|
|
2564
|
-
dpi.maybeHideModal();
|
|
2565
|
-
}
|
|
2566
|
-
});
|
|
2567
|
-
};
|
|
2568
|
-
|
|
2569
|
-
/**
|
|
2570
|
-
* @param {!dialogPolyfillInfo} dpi
|
|
2571
|
-
* @return {boolean} whether the dialog was allowed
|
|
2572
|
-
*/
|
|
2573
|
-
dialogPolyfill.DialogManager.prototype.pushDialog = function(dpi) {
|
|
2574
|
-
var allowed = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
|
|
2575
|
-
if (this.pendingDialogStack.length >= allowed) {
|
|
2576
|
-
return false;
|
|
2577
|
-
}
|
|
2578
|
-
if (this.pendingDialogStack.unshift(dpi) === 1) {
|
|
2579
|
-
this.blockDocument();
|
|
2580
|
-
}
|
|
2581
|
-
this.updateStacking();
|
|
2582
|
-
return true;
|
|
2583
|
-
};
|
|
2584
|
-
|
|
2585
|
-
/**
|
|
2586
|
-
* @param {!dialogPolyfillInfo} dpi
|
|
2587
|
-
*/
|
|
2588
|
-
dialogPolyfill.DialogManager.prototype.removeDialog = function(dpi) {
|
|
2589
|
-
var index = this.pendingDialogStack.indexOf(dpi);
|
|
2590
|
-
if (index === -1) { return; }
|
|
2591
|
-
|
|
2592
|
-
this.pendingDialogStack.splice(index, 1);
|
|
2593
|
-
if (this.pendingDialogStack.length === 0) {
|
|
2594
|
-
this.unblockDocument();
|
|
2595
|
-
}
|
|
2596
|
-
this.updateStacking();
|
|
2597
|
-
};
|
|
2598
|
-
|
|
2599
|
-
dialogPolyfill.dm = new dialogPolyfill.DialogManager();
|
|
2600
|
-
dialogPolyfill.formSubmitter = null;
|
|
2601
|
-
dialogPolyfill.imagemapUseValue = null;
|
|
2602
|
-
|
|
2603
|
-
/**
|
|
2604
|
-
* Installs global handlers, such as click listers and native method overrides. These are needed
|
|
2605
|
-
* even if a no dialog is registered, as they deal with <form method="dialog">.
|
|
2606
|
-
*/
|
|
2607
|
-
if (window.HTMLDialogElement === undefined) {
|
|
2608
|
-
|
|
2609
|
-
/**
|
|
2610
|
-
* If HTMLFormElement translates method="DIALOG" into 'get', then replace the descriptor with
|
|
2611
|
-
* one that returns the correct value.
|
|
2612
|
-
*/
|
|
2613
|
-
var testForm = document.createElement('form');
|
|
2614
|
-
testForm.setAttribute('method', 'dialog');
|
|
2615
|
-
if (testForm.method !== 'dialog') {
|
|
2616
|
-
var methodDescriptor = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'method');
|
|
2617
|
-
if (methodDescriptor) {
|
|
2618
|
-
// nb. Some older iOS and older PhantomJS fail to return the descriptor. Don't do anything
|
|
2619
|
-
// and don't bother to update the element.
|
|
2620
|
-
var realGet = methodDescriptor.get;
|
|
2621
|
-
methodDescriptor.get = function() {
|
|
2622
|
-
if (isFormMethodDialog(this)) {
|
|
2623
|
-
return 'dialog';
|
|
2624
|
-
}
|
|
2625
|
-
return realGet.call(this);
|
|
2626
|
-
};
|
|
2627
|
-
var realSet = methodDescriptor.set;
|
|
2628
|
-
/** @this {HTMLElement} */
|
|
2629
|
-
methodDescriptor.set = function(v) {
|
|
2630
|
-
if (typeof v === 'string' && v.toLowerCase() === 'dialog') {
|
|
2631
|
-
return this.setAttribute('method', v);
|
|
2632
|
-
}
|
|
2633
|
-
return realSet.call(this, v);
|
|
2634
|
-
};
|
|
2635
|
-
Object.defineProperty(HTMLFormElement.prototype, 'method', methodDescriptor);
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
|
|
2639
|
-
/**
|
|
2640
|
-
* Global 'click' handler, to capture the <input type="submit"> or <button> element which has
|
|
2641
|
-
* submitted a <form method="dialog">. Needed as Safari and others don't report this inside
|
|
2642
|
-
* document.activeElement.
|
|
2643
|
-
*/
|
|
2644
|
-
document.addEventListener('click', function(ev) {
|
|
2645
|
-
dialogPolyfill.formSubmitter = null;
|
|
2646
|
-
dialogPolyfill.imagemapUseValue = null;
|
|
2647
|
-
if (ev.defaultPrevented) { return; } // e.g. a submit which prevents default submission
|
|
2648
|
-
|
|
2649
|
-
var target = /** @type {Element} */ (ev.target);
|
|
2650
|
-
if ('composedPath' in ev) {
|
|
2651
|
-
var path = ev.composedPath();
|
|
2652
|
-
target = path.shift() || target;
|
|
2653
|
-
}
|
|
2654
|
-
if (!target || !isFormMethodDialog(target.form)) { return; }
|
|
2655
|
-
|
|
2656
|
-
var valid = (target.type === 'submit' && ['button', 'input'].indexOf(target.localName) > -1);
|
|
2657
|
-
if (!valid) {
|
|
2658
|
-
if (!(target.localName === 'input' && target.type === 'image')) { return; }
|
|
2659
|
-
// this is a <input type="image">, which can submit forms
|
|
2660
|
-
dialogPolyfill.imagemapUseValue = ev.offsetX + ',' + ev.offsetY;
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
var dialog = findNearestDialog(target);
|
|
2664
|
-
if (!dialog) { return; }
|
|
2665
|
-
|
|
2666
|
-
dialogPolyfill.formSubmitter = target;
|
|
2667
|
-
|
|
2668
|
-
}, false);
|
|
2669
|
-
|
|
2670
|
-
/**
|
|
2671
|
-
* Global 'submit' handler. This handles submits of `method="dialog"` which are invalid, i.e.,
|
|
2672
|
-
* outside a dialog. They get prevented.
|
|
2673
|
-
*/
|
|
2674
|
-
document.addEventListener('submit', function(ev) {
|
|
2675
|
-
var form = ev.target;
|
|
2676
|
-
var dialog = findNearestDialog(form);
|
|
2677
|
-
if (dialog) {
|
|
2678
|
-
return; // ignore, handle there
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
var submitter = findFormSubmitter(ev);
|
|
2682
|
-
var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');
|
|
2683
|
-
if (formmethod === 'dialog') {
|
|
2684
|
-
ev.preventDefault();
|
|
2685
|
-
}
|
|
2686
|
-
});
|
|
2687
|
-
|
|
2688
|
-
/**
|
|
2689
|
-
* Replace the native HTMLFormElement.submit() method, as it won't fire the
|
|
2690
|
-
* submit event and give us a chance to respond.
|
|
2691
|
-
*/
|
|
2692
|
-
var nativeFormSubmit = HTMLFormElement.prototype.submit;
|
|
2693
|
-
var replacementFormSubmit = function () {
|
|
2694
|
-
if (!isFormMethodDialog(this)) {
|
|
2695
|
-
return nativeFormSubmit.call(this);
|
|
2696
|
-
}
|
|
2697
|
-
var dialog = findNearestDialog(this);
|
|
2698
|
-
dialog && dialog.close();
|
|
2699
|
-
};
|
|
2700
|
-
HTMLFormElement.prototype.submit = replacementFormSubmit;
|
|
2701
|
-
}
|
|
2702
|
-
|
|
2703
|
-
const stylesCss$3 = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>dialog{padding:0;border:none;margin:0;background-color:transparent}:host>dialog:modal{width:100%;max-width:100%;max-height:100%}:host>dialog::-webkit-backdrop{display:none}:host>dialog::-ms-backdrop{display:none}:host>dialog::backdrop{display:none}:host>dialog+.backdrop{display:none}:host>dialog:not([open]){display:none}:host>dialog[open]{display:block}.modal-container{z-index:1010;display:-ms-flexbox;display:flex;overflow:-moz-scrollbars-none;width:100%;height:100vh;-ms-flex-direction:column;flex-direction:column}.modal-container>.modal-content-scroll-outside{overflow:auto;background:var(--color-surface01)}.modal-container>header{padding:calc(var(--space-unit) * 2 - 2px) calc(var(--space-unit) * 2);background:var(--color-surface02)}.modal-container>header button{padding:0;border:none;margin:0;margin-left:auto;background:transparent;cursor:pointer}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 2.5);--z-icon-height:calc(var(--space-unit) * 2.5);display:-ms-flexbox;display:flex;fill:var(--color-primary01-icon)}.modal-container>header>div{display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:center;align-items:center;margin-right:calc(var(--space-unit) * 2)}.modal-container>header h1,.modal-container>header .subtitle{padding:0;margin:0;color:var(--color-default-text);font-weight:var(--font-rg)}.modal-container>header h1{font-size:var(--font-size-5);letter-spacing:0;line-height:1.4}.modal-container>header .subtitle{font-size:var(--font-size-3);letter-spacing:0;line-height:1.5}.modal-container>header>div>h1 *:empty{display:none}.modal-container>header h1+.subtitle{margin-top:calc(var(--space-unit) * 0.5)}.modal-container-scroll-inside>.modal-content-scroll-inside{overflow:hidden auto;-ms-flex:1 auto;flex:1 auto;background:var(--color-surface01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb:hover,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.modal-container-scroll-inside .modal-content-scroll-inside,.modal-container-scroll-outside .modal-content-scroll-outside{scrollbar-color:var(--color-primary01) transparent}@media only screen and (min-width: 768px){.modal-background{position:fixed;top:0;left:0;overflow:hidden;width:100vw;height:100vh;background-color:var(--gray900);opacity:0.7}.modal-background.modal-background-scroll-outside{position:-webkit-sticky;position:sticky}.modal-container-scroll-inside{position:fixed;top:calc(var(--space-unit) * 6);left:50%;overflow:hidden;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));border-radius:var(--border-radius);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.modal-container-scroll-outside{position:absolute;top:calc(var(--space-unit) * 6);left:50%;display:block;overflow:initial;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));-webkit-transform:translateX(-50%);transform:translateX(-50%)}.modal-container>.modal-content-scroll-outside{overflow:initial}.modal-container-scroll-outside>header,.modal-container-scroll-inside>header{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.modal-container-scroll-outside::after{display:block;height:calc(var(--space-unit) * 6);content:\" \"}.modal-dialog{position:fixed;top:0;left:0;height:auto;overflow-x:hidden;overflow-y:auto}.modal-content-scroll-outside{border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.modal-dialog::-webkit-scrollbar{display:none}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 3);--z-icon-height:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 768px) and (max-width: 1151px){.modal-container>header{padding:calc(var(--space-unit) * 3 - 2px) calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){.modal-container>header{padding:calc(var(--space-unit) * 4 - 4px) calc(var(--space-unit) * 4)}.modal-container>header h1{font-size:var(--font-size-6);letter-spacing:0;line-height:1.33}.modal-container>header .subtitle{font-size:var(--font-size-4);letter-spacing:0;line-height:1.5}.modal-container>header h1+.subtitle{margin-top:0}}";
|
|
2704
|
-
const ZModalStyle0 = stylesCss$3;
|
|
2705
|
-
|
|
2706
|
-
const FOCUSABLE_ELEMENTS_SELECTOR = ':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])';
|
|
2707
|
-
const ZModal = class {
|
|
2708
|
-
constructor(hostRef) {
|
|
2709
|
-
registerInstance(this, hostRef);
|
|
2710
|
-
this.modalClose = createEvent(this, "modalClose", 7);
|
|
2711
|
-
this.modalHeaderActive = createEvent(this, "modalHeaderActive", 7);
|
|
2712
|
-
this.modalBackgroundClick = createEvent(this, "modalBackgroundClick", 7);
|
|
2713
|
-
this.modalid = undefined;
|
|
2714
|
-
this.modaltitle = undefined;
|
|
2715
|
-
this.modalsubtitle = undefined;
|
|
2716
|
-
this.closeButtonLabel = "chiudi modale";
|
|
2717
|
-
this.alertdialog = false;
|
|
2718
|
-
this.closable = true;
|
|
2719
|
-
this.scrollInside = true;
|
|
2720
|
-
}
|
|
2721
|
-
emitModalClose() {
|
|
2722
|
-
if (this.closable) {
|
|
2723
|
-
this.modalClose.emit({ modalid: this.modalid });
|
|
2724
|
-
}
|
|
2725
|
-
}
|
|
2726
|
-
emitModalHeaderActive() {
|
|
2727
|
-
this.modalHeaderActive.emit({ modalid: this.modalid });
|
|
2728
|
-
}
|
|
2729
|
-
emitBackgroundClick() {
|
|
2730
|
-
if (this.closable) {
|
|
2731
|
-
this.modalBackgroundClick.emit({ modalid: this.modalid });
|
|
2732
|
-
}
|
|
2733
|
-
}
|
|
2734
|
-
componentDidLoad() {
|
|
2735
|
-
if (typeof window.HTMLDialogElement !== "function") {
|
|
2736
|
-
/* workaround to fix `registerDialog` in test environment:
|
|
2737
|
-
stencil converts html elements to MockHTMLElement but this element is missing the `localName` property,
|
|
2738
|
-
which is used by `registerDialog` to recognize the element as dialog */
|
|
2739
|
-
if (!this.dialog.localName) {
|
|
2740
|
-
Object.defineProperty(this.dialog, "localName", { value: "dialog" });
|
|
2741
|
-
}
|
|
2742
|
-
dialogPolyfill.registerDialog(this.dialog);
|
|
2743
|
-
this.dialog.setAttribute("open", "true");
|
|
2744
|
-
}
|
|
2745
|
-
else {
|
|
2746
|
-
this.open();
|
|
2747
|
-
}
|
|
2748
|
-
}
|
|
2749
|
-
/** open modal */
|
|
2750
|
-
async open() {
|
|
2751
|
-
var _a;
|
|
2752
|
-
(_a = this.dialog) === null || _a === void 0 ? void 0 : _a.showModal();
|
|
2753
|
-
}
|
|
2754
|
-
/** close modal */
|
|
2755
|
-
async close() {
|
|
2756
|
-
var _a;
|
|
2757
|
-
if (this.closable) {
|
|
2758
|
-
(_a = this.dialog) === null || _a === void 0 ? void 0 : _a.close();
|
|
2759
|
-
}
|
|
2760
|
-
}
|
|
2761
|
-
/**
|
|
2762
|
-
* Get a list of focusable elements in the dialog.
|
|
2763
|
-
* Remove elements with `display: none` from the list, because they're not focusable.
|
|
2764
|
-
*
|
|
2765
|
-
* N.B. The list is built on the assumption that elements inside shadow root are placed ALL before the `modalContent` slot.
|
|
2766
|
-
* Adding focusable elements after the `modalContent` slot would break the order of elements in the list.
|
|
2767
|
-
*/
|
|
2768
|
-
get focusableElements() {
|
|
2769
|
-
return [
|
|
2770
|
-
...Array.from(this.host.shadowRoot.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)),
|
|
2771
|
-
...Array.from(this.host.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)),
|
|
2772
|
-
].filter((element) => getComputedStyle(element).display !== "none");
|
|
2773
|
-
}
|
|
2774
|
-
handleKeyDown(e) {
|
|
2775
|
-
if (e.code !== KeyboardCode.TAB) {
|
|
2776
|
-
return;
|
|
2777
|
-
}
|
|
2778
|
-
const focusableElements = this.focusableElements;
|
|
2779
|
-
const shadowActiveElement = this.host.shadowRoot.activeElement;
|
|
2780
|
-
const activeElement = this.host.ownerDocument.activeElement;
|
|
2781
|
-
const firstFocusableElement = focusableElements[0];
|
|
2782
|
-
const lastFocusableElement = focusableElements[focusableElements.length - 1];
|
|
2783
|
-
if (e.shiftKey && (shadowActiveElement == firstFocusableElement || activeElement == firstFocusableElement)) {
|
|
2784
|
-
// shift + tab was pressed and current active element is the first focusable element
|
|
2785
|
-
e.preventDefault();
|
|
2786
|
-
lastFocusableElement.focus();
|
|
2787
|
-
}
|
|
2788
|
-
else if (!e.shiftKey && (shadowActiveElement == lastFocusableElement || activeElement == lastFocusableElement)) {
|
|
2789
|
-
// shift + tab was pressed and current active element is the first focusable element
|
|
2790
|
-
e.preventDefault();
|
|
2791
|
-
firstFocusableElement.focus();
|
|
2792
|
-
}
|
|
2793
|
-
}
|
|
2794
|
-
closeButtonSlot() {
|
|
2795
|
-
if (this.closable) {
|
|
2796
|
-
return (h("slot", { name: "modalCloseButton" }, h("button", { "aria-label": this.closeButtonLabel, onClick: () => this.close() }, h("z-icon", { name: "multiply-circle-filled" }))));
|
|
2797
|
-
}
|
|
2798
|
-
}
|
|
2799
|
-
handleEscape(e) {
|
|
2800
|
-
if (this.closable) {
|
|
2801
|
-
return;
|
|
2802
|
-
}
|
|
2803
|
-
e.preventDefault();
|
|
2804
|
-
}
|
|
2805
|
-
render() {
|
|
2806
|
-
return (h("dialog", { key: '502c0fd42f37a498ef3ec2b2b174ac4950287883', class: {
|
|
2807
|
-
"modal-dialog": !this.scrollInside,
|
|
2808
|
-
}, "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose(), onCancel: (e) => this.handleEscape(e) }, h("div", { key: '0dd9496ca11660307bcb8d751e8793659aa30741', class: {
|
|
2809
|
-
"modal-container": true,
|
|
2810
|
-
"modal-container-scroll-inside": this.scrollInside,
|
|
2811
|
-
"modal-container-scroll-outside": !this.scrollInside,
|
|
2812
|
-
}, id: this.modalid }, h("header", { key: '6952365a4a1d64e1ce23a9454f11cd4ae76e37ca', onClick: this.emitModalHeaderActive.bind(this) }, h("div", { key: 'fe219a40167ad9984255885bb189d9a9a0509cd5' }, this.modaltitle && h("h1", { key: '2991d4e6c254160dfe33e3558dc5db4d4dbf0abf', id: "modal-title" }, this.modaltitle), this.closeButtonSlot()), this.modalsubtitle && (h("div", { key: '5a612bc3eb027b488a37918794c4f24e1991a38d', class: "subtitle", id: "modal-subtitle" }, this.modalsubtitle))), h("div", { key: '34008ade3d0f05c701b4d94df647086a8de3cd27', class: {
|
|
2813
|
-
"modal-content-scroll-inside": this.scrollInside,
|
|
2814
|
-
"modal-content-scroll-outside": !this.scrollInside,
|
|
2815
|
-
}, id: "modal-content" }, h("slot", { key: '7ce631a687090f9b69bafa8de5dbe76d21d2c554', name: "modalContent" }))), h("div", { key: '8fc40e271bec8219fbbbf208bbba900a74ebdec8', class: {
|
|
2816
|
-
"modal-background": true,
|
|
2817
|
-
"modal-background-scroll-outside": !this.scrollInside,
|
|
2818
|
-
}, "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {
|
|
2819
|
-
this.emitBackgroundClick();
|
|
2820
|
-
this.close();
|
|
2821
|
-
} })));
|
|
2822
|
-
}
|
|
2823
|
-
get host() { return getElement(this); }
|
|
2824
|
-
};
|
|
2825
|
-
ZModal.style = ZModalStyle0;
|
|
2826
|
-
|
|
2827
1611
|
const stylesCss$2 = ".sc-z-offcanvas-h{--z-offcanvas--container-width:375px;--z-offcanvas--top-space:0;min-width:100%;height:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}.canvas-container.sc-z-offcanvas{display:-ms-flexbox;display:flex;overflow:-moz-scrollbars-none;overflow:hidden;min-width:100%;height:100%;-ms-flex-direction:column;flex-direction:column;background:var(--color-surface01)}[variant=\"pushcontent\"].sc-z-offcanvas-h{display:none}[open].sc-z-offcanvas-h{display:-ms-flexbox;display:flex;visibility:visible}.sc-z-offcanvas-h:not([open]){visibility:hidden}[variant=\"overlay\"].sc-z-offcanvas-h{position:fixed;z-index:1000;top:var(--z-offcanvas--top-space);right:0;bottom:0;left:0;display:-ms-flexbox;display:flex;height:calc(100% - var(--z-offcanvas--top-space))}[variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h{-ms-flex-pack:end;justify-content:end}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1010}[variant=\"overlay\"].sc-z-offcanvas-h .canvas-background.sc-z-offcanvas{position:absolute;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow:auto;-ms-flex:1 auto;flex:1 auto;padding:0 calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) calc(var(--space-unit) * 2) 0;overflow-x:hidden}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{padding:0 calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) 0 0}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-track{background-color:transparent}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas{scrollbar-color:var(--color-primary01) transparent}@media only screen and (max-width: 767px){[open][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{-webkit-animation:enter-right 0.4s ease-out;animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{-webkit-animation:enter-left 0.4s ease-out;animation:enter-left 0.4s ease-out}}@media only screen and (min-width: 768px){.sc-z-offcanvas-h{min-width:auto}.canvas-container.sc-z-offcanvas{width:auto;min-width:max(var(--z-offcanvas--container-width), 375px);max-width:max(var(--z-offcanvas--container-width), 375px);height:auto;min-height:calc(var(--space-unit) * 40)}.sc-z-offcanvas-h:not([variant=\"overlay\"])[open]:not(.skip-animation){width:auto;-webkit-animation:grow 0.4s ease-out;animation:grow 0.4s ease-out}}@-webkit-keyframes grow{from{width:0}to{width:max(var(--z-offcanvas--container-width), 375px)}}@keyframes grow{from{width:0}to{width:max(var(--z-offcanvas--container-width), 375px)}}@-webkit-keyframes enter-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes enter-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes enter-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes enter-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}[open][variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{-webkit-animation:enter-right 0.4s ease-out;animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{-webkit-animation:enter-left 0.4s ease-out;animation:enter-left 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"right\"]>.canvas-container.sc-z-offcanvas{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:visibility 0.4s ease-out,\n -webkit-transform 0.4s ease-out;transition:visibility 0.4s ease-out,\n -webkit-transform 0.4s ease-out;transition:visibility 0.4s ease-out,\n transform 0.4s ease-out;transition:visibility 0.4s ease-out,\n transform 0.4s ease-out,\n -webkit-transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"left\"]>.canvas-container.sc-z-offcanvas{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transition:visibility 0.4s ease-out,\n -webkit-transform 0.4s ease-out;transition:visibility 0.4s ease-out,\n -webkit-transform 0.4s ease-out;transition:visibility 0.4s ease-out,\n transform 0.4s ease-out;transition:visibility 0.4s ease-out,\n transform 0.4s ease-out,\n -webkit-transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"] .canvas-background.sc-z-offcanvas{-webkit-transition:visibility 0.4s ease-out;transition:visibility 0.4s ease-out;visibility:hidden}";
|
|
2828
1612
|
const ZOffcanvasStyle0 = stylesCss$2;
|
|
2829
1613
|
|
|
@@ -2859,7 +1643,7 @@ const ZOffcanvas = class {
|
|
|
2859
1643
|
};
|
|
2860
1644
|
ZOffcanvas.style = ZOffcanvasStyle0;
|
|
2861
1645
|
|
|
2862
|
-
const stylesCss$1 = ":host{--z-searchbar-tag-text-color:var(--color-primary03);--z-searchbar-tag-bg:var(--color-hover-primary);z-index:15;display:-ms-flexbox;display:flex;-webkit-column-gap:calc(var(--space-unit) * 2);-moz-column-gap:calc(var(--space-unit) * 2);column-gap:calc(var(--space-unit) * 2);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,*{-webkit-box-sizing:border-box;box-sizing:border-box}.input-container{position:relative;display:-ms-flexbox;display:flex;width:100%;-ms-flex-direction:column;flex-direction:column}.results-wrapper{position:absolute;top:calc(100% - 1px);left:0;width:100%;padding:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;background:var(--color-surface01)}.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:calc(var(--space-unit) / 2) calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}.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)}.results::-webkit-scrollbar-track{background-color:transparent}.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}.results .category-heading>*{display:block}.results .category-heading>.category{color:var(--color-text05);font-style:italic}.results .category-heading>.subcategory{margin-top:var(--space-unit);color:var(--color-default-text);text-transform:uppercase}.results z-list-element{display:block}.results z-list-element>.list-element{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.results z-list-element>.list-element>z-tag{border:1px solid var(--gray800);font-size:var(--font-size-1);font-weight:var(--font-sb);--z-tag-bg:var(--z-searchbar-tag-bg);--z-tag-text-color:var(--z-searchbar-tag-text-color)}.results .item{--z-icon-height:12px;--z-icon-width:12px;display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;color:var(--color-default-text);-webkit-column-gap:calc(var(--space-unit) * 1.5);-moz-column-gap:calc(var(--space-unit) * 1.5);column-gap:calc(var(--space-unit) * 1.5);fill:var(--color-default-icon);font-size:var(--font-size-2);line-height:var(--font-size-3)}.results .item.ellipsis>.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results .item>.item-label mark{background:var(--color-primary03)}.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}.results .item-show-all{text-align:center}.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}.results .item.ellipsis>.item-label{height:24px}}@media (min-width: 1152px){.results .item{cursor:pointer}.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}:host([size=\"small\"]) .results :is(.item,.category-heading),:host([size=\"x-small\"]) .results :is(.item,.category-heading){font-size:var(--font-size-2)}:host([size=\"small\"]) .results .item:not(.has-category),:host([size=\"x-small\"]) .results .item:not(.has-category){--z-icon-height:16px;--z-icon-width:16px}:host([size=\"small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4.5);padding:0}:host([size=\"x-small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4);padding:0}";
|
|
1646
|
+
const stylesCss$1 = ":host{--z-searchbar-tag-text-color:var(--color-primary03);--z-searchbar-tag-bg:var(--color-hover-primary);z-index:15;display:-ms-flexbox;display:flex;-webkit-column-gap:calc(var(--space-unit) * 2);-moz-column-gap:calc(var(--space-unit) * 2);column-gap:calc(var(--space-unit) * 2);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,*{-webkit-box-sizing:border-box;box-sizing:border-box}*:focus{-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary);outline:none !important}.input-container{position:relative;display:-ms-flexbox;display:flex;width:100%;-ms-flex-direction:column;flex-direction:column}.results-wrapper{position:absolute;top:calc(100% - 1px);left:0;width:100%;padding:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;background:var(--color-surface01)}.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:calc(var(--space-unit) / 2) calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}.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)}.results::-webkit-scrollbar-track{background-color:transparent}.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}.results .category-heading>*{display:block}.results .category-heading>.category{color:var(--color-text05);font-style:italic}.results .category-heading>.subcategory{margin-top:var(--space-unit);color:var(--color-default-text);text-transform:uppercase}.results z-list-element{display:block}.results z-list-element>.list-element{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.results z-list-element>.list-element>z-tag{border:1px solid var(--gray800);font-size:var(--font-size-1);font-weight:var(--font-sb);--z-tag-bg:var(--z-searchbar-tag-bg);--z-tag-text-color:var(--z-searchbar-tag-text-color)}.results .item{--z-icon-height:12px;--z-icon-width:12px;display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;color:var(--color-default-text);-webkit-column-gap:calc(var(--space-unit) * 1.5);-moz-column-gap:calc(var(--space-unit) * 1.5);column-gap:calc(var(--space-unit) * 1.5);fill:var(--color-default-icon);font-size:var(--font-size-2);line-height:var(--font-size-3)}.results .item.ellipsis>.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results .item>.item-label mark{background:var(--color-primary03)}.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}.results .item-show-all{text-align:center}.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}.results .item.ellipsis>.item-label{height:24px}}@media (min-width: 1152px){.results .item{cursor:pointer}.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}:host([size=\"small\"]) .results :is(.item,.category-heading),:host([size=\"x-small\"]) .results :is(.item,.category-heading){font-size:var(--font-size-2)}:host([size=\"small\"]) .results .item:not(.has-category),:host([size=\"x-small\"]) .results .item:not(.has-category){--z-icon-height:16px;--z-icon-width:16px}:host([size=\"small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4.5);padding:0}:host([size=\"x-small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4);padding:0}";
|
|
2863
1647
|
const ZSearchbarStyle0 = stylesCss$1;
|
|
2864
1648
|
|
|
2865
1649
|
const ZSearchbar = class {
|
|
@@ -3113,6 +1897,6 @@ const ZTag = class {
|
|
|
3113
1897
|
};
|
|
3114
1898
|
ZTag.style = ZTagStyle0;
|
|
3115
1899
|
|
|
3116
|
-
export { ZAppHeader as z_app_header, ZButton as z_button, ZDivider as z_divider,
|
|
1900
|
+
export { ZAppHeader as z_app_header, ZButton as z_button, ZDivider as z_divider, ZIcon as z_icon, ZInput as z_input, ZInputMessage as z_input_message, ZList as z_list, ZListElement as z_list_element, ZListGroup as z_list_group, ZOffcanvas as z_offcanvas, ZSearchbar as z_searchbar, ZTag as z_tag };
|
|
3117
1901
|
|
|
3118
|
-
//# sourceMappingURL=z-app-
|
|
1902
|
+
//# sourceMappingURL=z-app-header_12.entry.js.map
|