@spw-ds/spw-stencil-library 1.14.1 → 1.14.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/dist/cem.json +286 -0
- package/dist/cjs/focus-trap-CCFWfNJ1.js +118 -0
- package/dist/cjs/index-DuCXzb-X.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/spw-button_2.cjs.entry.js +1 -1
- package/dist/cjs/spw-custom-select.cjs.entry.js +7 -12
- package/dist/cjs/spw-drawer.cjs.entry.js +244 -0
- package/dist/cjs/spw-dropdown-container.cjs.entry.js +1 -1
- package/dist/cjs/spw-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/spw-field-label_8.cjs.entry.js +7 -7
- package/dist/cjs/spw-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/spw-footer-bottom.cjs.entry.js +1 -1
- package/dist/cjs/spw-footer-content-col.cjs.entry.js +1 -1
- package/dist/cjs/spw-footer-content.cjs.entry.js +1 -1
- package/dist/cjs/spw-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/spw-footer.cjs.entry.js +1 -1
- package/dist/cjs/spw-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/spw-grid.cjs.entry.js +2 -2
- package/dist/cjs/spw-header-lang.cjs.entry.js +1 -1
- package/dist/cjs/spw-header-navigation-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/spw-header-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-header-navigation.cjs.entry.js +1 -1
- package/dist/cjs/spw-header-persona-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-header-persona.cjs.entry.js +1 -1
- package/dist/cjs/spw-header.cjs.entry.js +2 -2
- package/dist/cjs/spw-hero.cjs.entry.js +3 -3
- package/dist/cjs/spw-input-slider.cjs.entry.js +1 -1
- package/dist/cjs/spw-lightbox-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-lightbox.cjs.entry.js +2 -2
- package/dist/cjs/spw-list-description.cjs.entry.js +1 -1
- package/dist/cjs/spw-list-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-list-title.cjs.entry.js +1 -1
- package/dist/cjs/spw-list.cjs.entry.js +1 -1
- package/dist/cjs/spw-modal.cjs.entry.js +5 -117
- package/dist/cjs/spw-mosaic-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-mosaic.cjs.entry.js +1 -1
- package/dist/cjs/spw-pagination.cjs.entry.js +6 -6
- package/dist/cjs/spw-radio.cjs.entry.js +1 -1
- package/dist/cjs/spw-scrolltop.cjs.entry.js +1 -1
- package/dist/cjs/spw-sidebar-navigation-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/spw-sidebar-navigation-item.cjs.entry.js +3 -3
- package/dist/cjs/spw-sidebar-navigation-separator.cjs.entry.js +1 -1
- package/dist/cjs/spw-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/spw-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/spw-slider-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-slider.cjs.entry.js +1 -1
- package/dist/cjs/spw-socials.cjs.entry.js +1 -1
- package/dist/cjs/spw-stencil-library.cjs.js +1 -1
- package/dist/cjs/spw-table-body.cjs.entry.js +1 -1
- package/dist/cjs/spw-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/spw-table-container.cjs.entry.js +1 -1
- package/dist/cjs/spw-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/spw-table-head.cjs.entry.js +1 -1
- package/dist/cjs/spw-table-header.cjs.entry.js +2 -2
- package/dist/cjs/spw-table-row.cjs.entry.js +1 -1
- package/dist/cjs/spw-table-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/spw-tabs-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-tabs-navigation.cjs.entry.js +1 -1
- package/dist/cjs/spw-tabs.cjs.entry.js +1 -1
- package/dist/cjs/spw-tag.cjs.entry.js +1 -1
- package/dist/cjs/spw-text-field.cjs.entry.js +1 -1
- package/dist/cjs/spw-textarea.cjs.entry.js +1 -1
- package/dist/cjs/spw-tile-description.cjs.entry.js +1 -1
- package/dist/cjs/spw-tile-title.cjs.entry.js +1 -1
- package/dist/cjs/spw-tile.cjs.entry.js +1 -1
- package/dist/cjs/spw-timeline-item.cjs.entry.js +2 -2
- package/dist/cjs/spw-timeline.cjs.entry.js +2 -2
- package/dist/cjs/spw-toc.cjs.entry.js +1 -1
- package/dist/cjs/spw-topbar.cjs.entry.js +1 -1
- package/dist/cjs/spw-wizard-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-wizard.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/spw-custom-select/spw-custom-select.js +7 -12
- package/dist/collection/components/spw-drawer/spw-drawer.css +543 -0
- package/dist/collection/components/spw-drawer/spw-drawer.js +507 -0
- package/dist/collection/components/spw-dropdown/spw-dropdown-container/spw-dropdown-container.js +1 -1
- package/dist/collection/components/spw-dropdown/spw-dropdown-item/spw-dropdown-item.js +1 -1
- package/dist/collection/components/spw-dropdown/spw-dropdown.js +1 -1
- package/dist/collection/components/spw-field-label/spw-field-label.js +1 -1
- package/dist/collection/components/spw-field-message/spw-field-message.js +1 -1
- package/dist/collection/components/spw-file-upload/spw-file-upload.js +2 -2
- package/dist/collection/components/spw-footer/spw-footer-bottom/spw-footer-bottom.js +1 -1
- package/dist/collection/components/spw-footer/spw-footer-content/spw-footer-content.js +1 -1
- package/dist/collection/components/spw-footer/spw-footer-content-col/spw-footer-content-col.js +1 -1
- package/dist/collection/components/spw-footer/spw-footer-link/spw-footer-link.js +1 -1
- package/dist/collection/components/spw-footer/spw-footer.js +1 -1
- package/dist/collection/components/spw-grid/spw-grid-item/spw-grid-item.js +2 -2
- package/dist/collection/components/spw-grid/spw-grid.js +2 -2
- package/dist/collection/components/spw-group/spw-group.js +1 -1
- package/dist/collection/components/spw-header/spw-header-lang/spw-header-lang.js +1 -1
- package/dist/collection/components/spw-header/spw-header-navigation/spw-header-navigation.js +1 -1
- package/dist/collection/components/spw-header/spw-header-navigation-dropdown/spw-header-navigation-dropdown.js +1 -1
- package/dist/collection/components/spw-header/spw-header-navigation-item/spw-header-navigation-item.js +1 -1
- package/dist/collection/components/spw-header/spw-header-persona/spw-header-persona.js +1 -1
- package/dist/collection/components/spw-header/spw-header-persona-item/spw-header-persona-item.js +1 -1
- package/dist/collection/components/spw-header/spw-header.css +6 -0
- package/dist/collection/components/spw-header/spw-header.js +1 -1
- package/dist/collection/components/spw-hero/spw-hero.js +3 -3
- package/dist/collection/components/spw-input-slider/spw-input-slider.js +1 -1
- package/dist/collection/components/spw-lightbox/spw-lightbox-item/spw-lightbox-item.js +1 -1
- package/dist/collection/components/spw-lightbox/spw-lightbox.js +2 -2
- package/dist/collection/components/spw-link/spw-link.js +1 -1
- package/dist/collection/components/spw-list/spw-list-description/spw-list-description.js +1 -1
- package/dist/collection/components/spw-list/spw-list-item/spw-list-item.js +1 -1
- package/dist/collection/components/spw-list/spw-list-title/spw-list-title.js +1 -1
- package/dist/collection/components/spw-list/spw-list.js +1 -1
- package/dist/collection/components/spw-loading/spw-loading.js +1 -1
- package/dist/collection/components/spw-modal/spw-modal.js +3 -3
- package/dist/collection/components/spw-mosaic/spw-mosaic-item/spw-mosaic-item.js +1 -1
- package/dist/collection/components/spw-mosaic/spw-mosaic.js +1 -1
- package/dist/collection/components/spw-pagination/spw-pagination.js +6 -6
- package/dist/collection/components/spw-radio/spw-radio.js +1 -1
- package/dist/collection/components/spw-scrolltop/spw-scrolltop.js +1 -1
- package/dist/collection/components/spw-separator/spw-separator.js +1 -1
- package/dist/collection/components/spw-sidebar/spw-sidebar-navigation-dropdown/spw-sidebar-navigation-dropdown.js +1 -1
- package/dist/collection/components/spw-sidebar/spw-sidebar-navigation-item/spw-sidebar-navigation-item.js +3 -3
- package/dist/collection/components/spw-sidebar/spw-sidebar-navigation-separator/spw-sidebar-navigation-separator.js +1 -1
- package/dist/collection/components/spw-sidebar/spw-sidebar.js +1 -1
- package/dist/collection/components/spw-skeleton/spw-skeleton.js +1 -1
- package/dist/collection/components/spw-slider/spw-slider-item/spw-slider-item.js +1 -1
- package/dist/collection/components/spw-slider/spw-slider.js +1 -1
- package/dist/collection/components/spw-socials/spw-socials.js +1 -1
- package/dist/collection/components/spw-table/spw-table-body/spw-table-body.js +1 -1
- package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.js +1 -1
- package/dist/collection/components/spw-table/spw-table-container/spw-table-container.js +1 -1
- package/dist/collection/components/spw-table/spw-table-footer/spw-table-footer.js +1 -1
- package/dist/collection/components/spw-table/spw-table-head/spw-table-head.js +1 -1
- package/dist/collection/components/spw-table/spw-table-header/spw-table-header.js +2 -2
- package/dist/collection/components/spw-table/spw-table-row/spw-table-row.js +1 -1
- package/dist/collection/components/spw-table/spw-table-sidebar/spw-table-sidebar.js +1 -1
- package/dist/collection/components/spw-tabs/spw-tabs-navigation/spw-tabs-navigation.js +1 -1
- package/dist/collection/components/spw-tabs/spw-tabs-navigation-item/spw-tabs-navigation-item.js +1 -1
- package/dist/collection/components/spw-tabs/spw-tabs.js +1 -1
- package/dist/collection/components/spw-tag/spw-tag.js +1 -1
- package/dist/collection/components/spw-text-field/spw-text-field.js +1 -1
- package/dist/collection/components/spw-textarea/spw-textarea.js +1 -1
- package/dist/collection/components/spw-theme-provider/spw-theme-provider.js +1 -1
- package/dist/collection/components/spw-tile/spw-tile-description/spw-tile-description.js +1 -1
- package/dist/collection/components/spw-tile/spw-tile-title/spw-tile-title.js +1 -1
- package/dist/collection/components/spw-tile/spw-tile.js +1 -1
- package/dist/collection/components/spw-timeline/spw-timeline-item/spw-timeline-item.js +2 -2
- package/dist/collection/components/spw-timeline/spw-timeline.js +2 -2
- package/dist/collection/components/spw-toc/spw-toc.js +1 -1
- package/dist/collection/components/spw-tooltip/spw-tooltip.js +1 -1
- package/dist/collection/components/spw-topbar/spw-topbar.js +1 -1
- package/dist/collection/components/spw-wizard/spw-wizard-item/spw-wizard-item.js +1 -1
- package/dist/collection/components/spw-wizard/spw-wizard.js +1 -1
- package/dist/components/{p-iaJkP4uN.js → p-B-cQeHXM.js} +1 -1
- package/dist/components/{p-CpEwCWpy.js → p-BIUq0sDZ.js} +1 -1
- package/dist/components/{p-CbTDFlzJ.js → p-BPhSJ6Z9.js} +1 -1
- package/dist/components/{p-BkY5jJ3g.js → p-BY3qZT4B.js} +1 -1
- package/dist/components/{p-Do2y7QZC.js → p-C3Ll1ThQ.js} +1 -1
- package/dist/components/{p-DuzJJVyM.js → p-CjvNWegY.js} +1 -1
- package/dist/components/{p-CaQtFjac.js → p-D0DQUsj1.js} +1 -1
- package/dist/components/{p-8xeU5Cgf.js → p-DYJNpZeH.js} +1 -1
- package/dist/components/p-Hi4pwfHU.js +1 -0
- package/dist/components/{p-BfL5TYdu.js → p-UzhhGIpr.js} +1 -1
- package/dist/components/spw-breadcrumb-item.js +1 -1
- package/dist/components/spw-button.js +1 -1
- package/dist/components/spw-cookies.js +1 -1
- package/dist/components/spw-custom-select.js +1 -1
- package/dist/components/spw-date-picker.js +1 -1
- package/dist/components/spw-drawer.d.ts +11 -0
- package/dist/components/spw-drawer.js +1 -0
- package/dist/components/spw-dropdown-container.js +1 -1
- package/dist/components/spw-dropdown-item.js +1 -1
- package/dist/components/spw-dropdown.js +1 -1
- package/dist/components/spw-field-label.js +1 -1
- package/dist/components/spw-field-message.js +1 -1
- package/dist/components/spw-file-upload.js +1 -1
- package/dist/components/spw-footer-bottom.js +1 -1
- package/dist/components/spw-footer-content-col.js +1 -1
- package/dist/components/spw-footer-content.js +1 -1
- package/dist/components/spw-footer-link.js +1 -1
- package/dist/components/spw-footer.js +1 -1
- package/dist/components/spw-grid-item.js +1 -1
- package/dist/components/spw-grid.js +1 -1
- package/dist/components/spw-group.js +1 -1
- package/dist/components/spw-header-lang.js +1 -1
- package/dist/components/spw-header-navigation-dropdown.js +1 -1
- package/dist/components/spw-header-navigation-item.js +1 -1
- package/dist/components/spw-header-navigation.js +1 -1
- package/dist/components/spw-header-persona-item.js +1 -1
- package/dist/components/spw-header-persona.js +1 -1
- package/dist/components/spw-header.js +1 -1
- package/dist/components/spw-hero.js +1 -1
- package/dist/components/spw-input-slider.js +1 -1
- package/dist/components/spw-lightbox-item.js +1 -1
- package/dist/components/spw-lightbox.js +1 -1
- package/dist/components/spw-link.js +1 -1
- package/dist/components/spw-list-description.js +1 -1
- package/dist/components/spw-list-item.js +1 -1
- package/dist/components/spw-list-title.js +1 -1
- package/dist/components/spw-list.js +1 -1
- package/dist/components/spw-loading.js +1 -1
- package/dist/components/spw-message.js +1 -1
- package/dist/components/spw-modal.js +1 -1
- package/dist/components/spw-mosaic-item.js +1 -1
- package/dist/components/spw-mosaic.js +1 -1
- package/dist/components/spw-pagination.js +1 -1
- package/dist/components/spw-radio.js +1 -1
- package/dist/components/spw-scrolltop.js +1 -1
- package/dist/components/spw-search-field.js +1 -1
- package/dist/components/spw-select.js +1 -1
- package/dist/components/spw-separator.js +1 -1
- package/dist/components/spw-sidebar-navigation-dropdown.js +1 -1
- package/dist/components/spw-sidebar-navigation-item.js +1 -1
- package/dist/components/spw-sidebar-navigation-separator.js +1 -1
- package/dist/components/spw-sidebar.js +1 -1
- package/dist/components/spw-skeleton.js +1 -1
- package/dist/components/spw-slider-item.js +1 -1
- package/dist/components/spw-slider.js +1 -1
- package/dist/components/spw-socials.js +1 -1
- package/dist/components/spw-table-body.js +1 -1
- package/dist/components/spw-table-cell.js +1 -1
- package/dist/components/spw-table-container.js +1 -1
- package/dist/components/spw-table-footer.js +1 -1
- package/dist/components/spw-table-head.js +1 -1
- package/dist/components/spw-table-header.js +1 -1
- package/dist/components/spw-table-row.js +1 -1
- package/dist/components/spw-table-sidebar.js +1 -1
- package/dist/components/spw-tabs-navigation-item.js +1 -1
- package/dist/components/spw-tabs-navigation.js +1 -1
- package/dist/components/spw-tabs.js +1 -1
- package/dist/components/spw-tag.js +1 -1
- package/dist/components/spw-text-field.js +1 -1
- package/dist/components/spw-textarea.js +1 -1
- package/dist/components/spw-theme-provider.js +1 -1
- package/dist/components/spw-tile-description.js +1 -1
- package/dist/components/spw-tile-title.js +1 -1
- package/dist/components/spw-tile.js +1 -1
- package/dist/components/spw-timeline-item.js +1 -1
- package/dist/components/spw-timeline.js +1 -1
- package/dist/components/spw-toc.js +1 -1
- package/dist/components/spw-tooltip.js +1 -1
- package/dist/components/spw-topbar.js +1 -1
- package/dist/components/spw-wizard-item.js +1 -1
- package/dist/components/spw-wizard.js +1 -1
- package/dist/components_json.json +427 -1
- package/dist/components_vscode.json +5219 -0
- package/dist/esm/focus-trap-Hi4pwfHU.js +114 -0
- package/dist/esm/index-Co4V4Zk-.js +8 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/spw-button_2.entry.js +1 -1
- package/dist/esm/spw-custom-select.entry.js +7 -12
- package/dist/esm/spw-drawer.entry.js +242 -0
- package/dist/esm/spw-dropdown-container.entry.js +1 -1
- package/dist/esm/spw-dropdown-item.entry.js +1 -1
- package/dist/esm/spw-dropdown.entry.js +1 -1
- package/dist/esm/spw-field-label_8.entry.js +7 -7
- package/dist/esm/spw-file-upload.entry.js +2 -2
- package/dist/esm/spw-footer-bottom.entry.js +1 -1
- package/dist/esm/spw-footer-content-col.entry.js +1 -1
- package/dist/esm/spw-footer-content.entry.js +1 -1
- package/dist/esm/spw-footer-link.entry.js +1 -1
- package/dist/esm/spw-footer.entry.js +1 -1
- package/dist/esm/spw-grid-item.entry.js +2 -2
- package/dist/esm/spw-grid.entry.js +2 -2
- package/dist/esm/spw-header-lang.entry.js +1 -1
- package/dist/esm/spw-header-navigation-dropdown.entry.js +1 -1
- package/dist/esm/spw-header-navigation-item.entry.js +1 -1
- package/dist/esm/spw-header-navigation.entry.js +1 -1
- package/dist/esm/spw-header-persona-item.entry.js +1 -1
- package/dist/esm/spw-header-persona.entry.js +1 -1
- package/dist/esm/spw-header.entry.js +2 -2
- package/dist/esm/spw-hero.entry.js +3 -3
- package/dist/esm/spw-input-slider.entry.js +1 -1
- package/dist/esm/spw-lightbox-item.entry.js +1 -1
- package/dist/esm/spw-lightbox.entry.js +2 -2
- package/dist/esm/spw-list-description.entry.js +1 -1
- package/dist/esm/spw-list-item.entry.js +1 -1
- package/dist/esm/spw-list-title.entry.js +1 -1
- package/dist/esm/spw-list.entry.js +1 -1
- package/dist/esm/spw-modal.entry.js +4 -116
- package/dist/esm/spw-mosaic-item.entry.js +1 -1
- package/dist/esm/spw-mosaic.entry.js +1 -1
- package/dist/esm/spw-pagination.entry.js +6 -6
- package/dist/esm/spw-radio.entry.js +1 -1
- package/dist/esm/spw-scrolltop.entry.js +1 -1
- package/dist/esm/spw-sidebar-navigation-dropdown.entry.js +1 -1
- package/dist/esm/spw-sidebar-navigation-item.entry.js +3 -3
- package/dist/esm/spw-sidebar-navigation-separator.entry.js +1 -1
- package/dist/esm/spw-sidebar.entry.js +1 -1
- package/dist/esm/spw-skeleton.entry.js +1 -1
- package/dist/esm/spw-slider-item.entry.js +1 -1
- package/dist/esm/spw-slider.entry.js +1 -1
- package/dist/esm/spw-socials.entry.js +1 -1
- package/dist/esm/spw-stencil-library.js +1 -1
- package/dist/esm/spw-table-body.entry.js +1 -1
- package/dist/esm/spw-table-cell.entry.js +1 -1
- package/dist/esm/spw-table-container.entry.js +1 -1
- package/dist/esm/spw-table-footer.entry.js +1 -1
- package/dist/esm/spw-table-head.entry.js +1 -1
- package/dist/esm/spw-table-header.entry.js +2 -2
- package/dist/esm/spw-table-row.entry.js +1 -1
- package/dist/esm/spw-table-sidebar.entry.js +1 -1
- package/dist/esm/spw-tabs-navigation-item.entry.js +1 -1
- package/dist/esm/spw-tabs-navigation.entry.js +1 -1
- package/dist/esm/spw-tabs.entry.js +1 -1
- package/dist/esm/spw-tag.entry.js +1 -1
- package/dist/esm/spw-text-field.entry.js +1 -1
- package/dist/esm/spw-textarea.entry.js +1 -1
- package/dist/esm/spw-tile-description.entry.js +1 -1
- package/dist/esm/spw-tile-title.entry.js +1 -1
- package/dist/esm/spw-tile.entry.js +1 -1
- package/dist/esm/spw-timeline-item.entry.js +2 -2
- package/dist/esm/spw-timeline.entry.js +2 -2
- package/dist/esm/spw-toc.entry.js +1 -1
- package/dist/esm/spw-topbar.entry.js +1 -1
- package/dist/esm/spw-wizard-item.entry.js +1 -1
- package/dist/esm/spw-wizard.entry.js +1 -1
- package/dist/spw-stencil-library/{p-64c1bf41.entry.js → p-006adc88.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-e9f9afca.entry.js → p-018f7e9a.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-61cbc34a.entry.js → p-0485f533.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-9dbbd7ac.entry.js → p-07fbb8f6.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-f7fbd8ad.entry.js → p-091d4662.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-f343cde9.entry.js → p-106a3fcd.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-4e51ff07.entry.js → p-159f99ab.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-b093582c.entry.js → p-18e87463.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-e1578863.entry.js → p-1a46f3ba.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-e8ce113e.entry.js → p-1d64b425.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-a412cfdb.entry.js → p-1dd3086f.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-da1e1d67.entry.js → p-25fe7de0.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-7cb4155a.entry.js → p-3579a4e5.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-864958ee.entry.js → p-36b59630.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-7445b9a6.entry.js → p-38dbba65.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-61d88fb3.entry.js → p-3db5d9dd.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-f4656003.entry.js → p-3e0f3dd4.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-eded599e.entry.js → p-3ed8aeca.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-b7fa6d47.entry.js → p-486e0e66.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-6b1d0c33.entry.js → p-4a1c6a51.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-4f44cc42.entry.js → p-4b986821.entry.js} +1 -1
- package/dist/spw-stencil-library/p-4e6db3bf.entry.js +1 -0
- package/dist/spw-stencil-library/{p-364c7e6d.entry.js → p-4f09896f.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-26accd09.entry.js → p-50bad396.entry.js} +1 -1
- package/dist/spw-stencil-library/p-576df843.entry.js +1 -0
- package/dist/spw-stencil-library/{p-42b44fc0.entry.js → p-5e6152f4.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-f407aa50.entry.js → p-5f1e7343.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-59955588.entry.js → p-609bd382.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-a2642f61.entry.js → p-60f1fb93.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-33f38dfc.entry.js → p-634313d8.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-79e25eb9.entry.js → p-6bb83ef4.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-d3b152e4.entry.js → p-700554d4.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-9ae51287.entry.js → p-718a1cfc.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-9db6a8a1.entry.js → p-86c818dc.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-f9188a1c.entry.js → p-89814941.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-f541987d.entry.js → p-89c0b509.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-5aabc10a.entry.js → p-8d4507ab.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-a4640f0c.entry.js → p-8ece5de4.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-551fa822.entry.js → p-96308ec8.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-2cbd624a.entry.js → p-96b19074.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-a19a7694.entry.js → p-97222848.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-f6d49029.entry.js → p-9aef4d39.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-d67c685e.entry.js → p-9ee4fd23.entry.js} +1 -1
- package/dist/spw-stencil-library/p-Hi4pwfHU.js +1 -0
- package/dist/spw-stencil-library/{p-55e8aad8.entry.js → p-a5b78ab2.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-062e23cd.entry.js → p-a8d07493.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-b522a03e.entry.js → p-adae2c8f.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-d9699614.entry.js → p-b0be475c.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-14ce2123.entry.js → p-b156247b.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-d35d8c40.entry.js → p-b3c0af55.entry.js} +1 -1
- package/dist/spw-stencil-library/p-b7f20973.entry.js +1 -0
- package/dist/spw-stencil-library/{p-c2c8d424.entry.js → p-bd521e50.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-2c49b517.entry.js → p-c3b2299c.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-f9aa8a15.entry.js → p-cea7d5ac.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-826ab1b0.entry.js → p-d224d201.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-edaa0a8e.entry.js → p-df1e5278.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-883c3f0f.entry.js → p-e039894a.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-07933a81.entry.js → p-e1410eb6.entry.js} +1 -1
- package/dist/spw-stencil-library/p-e4deed26.entry.js +1 -0
- package/dist/spw-stencil-library/p-e5fb89f8.entry.js +1 -0
- package/dist/spw-stencil-library/{p-2d53c64a.entry.js → p-e814b60f.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-1d77a174.entry.js → p-ea6a7692.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-833753b3.entry.js → p-efebcaa2.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-93eb9710.entry.js → p-f073fe43.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-e9fcabc0.entry.js → p-f741b7f2.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-5250002c.entry.js → p-f846ccbb.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-b7a55cde.entry.js → p-fc985ba3.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-72f3aaf0.entry.js → p-ff1a0317.entry.js} +1 -1
- package/dist/spw-stencil-library/spw-stencil-library.esm.js +1 -1
- package/dist/stats.json +1257 -323
- package/dist/types/components/spw-custom-select/spw-custom-select.d.ts +0 -1
- package/dist/types/components/spw-drawer/spw-drawer.d.ts +58 -0
- package/dist/types/components.d.ts +146 -0
- package/hydrate/index.js +498 -243
- package/hydrate/index.mjs +498 -243
- package/package.json +1 -1
- package/dist/spw-stencil-library/p-0b89dbb4.entry.js +0 -1
- package/dist/spw-stencil-library/p-42f53972.entry.js +0 -1
- package/dist/spw-stencil-library/p-49833925.entry.js +0 -1
- package/dist/spw-stencil-library/p-5d068f76.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,c as e,h as s,a as o,t as n}from"./index.js";import{a,K as l}from"./p-BRFNx2DL.js";import{d as r}from"./p-DuzJJVyM.js";import{d as h}from"./p-D25JsirJ.js";import{d as p}from"./p-CpEwCWpy.js";import{d as c}from"./p-BkY5jJ3g.js";import{d}from"./p-Do2y7QZC.js";const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.spwLightboxOpen=e(this,"spwLightboxOpen",7),this.spwLightboxClose=e(this,"spwLightboxClose",7),this.closeButtonText="Fermer",this.closeOnBackdropClick=!0,this.showThumbnails=!0,this.textDialogLabel="Galerie d'images",this.textPrevious="Image précédente",this.textNext="Image suivante",this.textThumbnailsLabel="Miniatures",this.textThumbnailItem="Image {index}",this.opened=!1,this.activeIndex=0,this.items=[],this.previouslyFocusedElement=null,this.currentAnimation=null,this.swipeStartX=0,this.swipeStartY=0,this.isSwiping=!1,this.SWIPE_THRESHOLD=50,this.handleItemClick=t=>{var i;this.collectItems(),this.activeIndex=null!==(i=t.detail.index)&&void 0!==i?i:0,this.opened=!0},this.handleKeydown=t=>{if(this.opened)switch(t.key){case"Escape":this.doClose();break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.navigate(1);break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.navigate(-1)}},this.handleTouchStart=t=>{this.swipeStartX=t.touches[0].clientX,this.swipeStartY=t.touches[0].clientY,this.isSwiping=!0},this.handleTouchMove=t=>{if(!this.isSwiping)return;const i=t.touches[0].clientY-this.swipeStartY;Math.abs(t.touches[0].clientX-this.swipeStartX)>Math.abs(i)&&t.preventDefault()},this.handleTouchEnd=t=>{if(!this.isSwiping)return;const i=this.swipeStartX-t.changedTouches[0].clientX;Math.abs(i)>=this.SWIPE_THRESHOLD&&this.navigate(i>0?1:-1),this.isSwiping=!1}}componentDidLoad(){window.addEventListener("keydown",this.handleKeydown),this.hostElement.addEventListener("spwLightboxItemClick",this.handleItemClick),this.imageWrapperEl.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),this.imageWrapperEl.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.imageWrapperEl.addEventListener("touchend",this.handleTouchEnd)}disconnectedCallback(){var t,i,e;window.removeEventListener("keydown",this.handleKeydown),this.hostElement.removeEventListener("spwLightboxItemClick",this.handleItemClick),null===(t=this.imageWrapperEl)||void 0===t||t.removeEventListener("touchstart",this.handleTouchStart),null===(i=this.imageWrapperEl)||void 0===i||i.removeEventListener("touchmove",this.handleTouchMove),null===(e=this.imageWrapperEl)||void 0===e||e.removeEventListener("touchend",this.handleTouchEnd),document.body.style.overflow=""}async open(t=0){this.collectItems(),this.activeIndex=t,this.opened=!0}async close(){this.doClose()}onOpenedChange(t){t?this.onOpen():this.onClose()}collectItems(){const t=this.hostElement.querySelectorAll("spw-lightbox-item");this.items=Array.from(t).map((t=>({src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",captionTitle:t.getAttribute("caption-title")||"",captionText:t.getAttribute("caption-text")||"",copyrightText:t.getAttribute("copyright-text")||"",copyrightIcon:t.getAttribute("copyright-icon")||"fa-copyright",copyrightIconVariant:t.getAttribute("copyright-icon-variant")||"fa-light",copyrightHref:t.getAttribute("copyright-href")||"",copyrightTarget:t.getAttribute("copyright-target")||"_blank"})))}cancelCurrentAnimation(){this.currentAnimation&&(this.currentAnimation.cancel(),this.currentAnimation=null)}scrollToActiveThumbnail(){if(!this.thumbnailsEl)return;const t=this.thumbnailsEl.querySelectorAll(".spw-lightbox__thumb")[this.activeIndex];null==t||t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}onOpen(){var t;this.cancelCurrentAnimation(),this.previouslyFocusedElement=document.activeElement,document.body.style.overflow="hidden";try{this.currentAnimation=a(this.lightboxContainer,l.fadeIn,{duration:200}),this.currentAnimation.addEventListener("finish",(()=>{var t;this.currentAnimation=null,null===(t=this.closeButtonEl)||void 0===t||t.focus(),this.scrollToActiveThumbnail(),this.spwLightboxOpen.emit({index:this.activeIndex})}))}catch(i){this.currentAnimation=null,null===(t=this.closeButtonEl)||void 0===t||t.focus(),this.scrollToActiveThumbnail(),this.spwLightboxOpen.emit({index:this.activeIndex})}}onClose(){var t;this.cancelCurrentAnimation(),document.body.style.overflow="";try{this.currentAnimation=a(this.lightboxContainer,l.fadeOut,{duration:200}),this.currentAnimation.addEventListener("finish",(()=>{var t;this.currentAnimation=null,null===(t=this.previouslyFocusedElement)||void 0===t||t.focus(),this.spwLightboxClose.emit()}))}catch(i){this.currentAnimation=null,null===(t=this.previouslyFocusedElement)||void 0===t||t.focus(),this.spwLightboxClose.emit()}}doClose(){this.opened=!1}handleFocusTrap(t){var i,e;if(!this.opened||"Tab"!==t.key)return;const s=null===(i=this.hostElement.shadowRoot)||void 0===i?void 0:i.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!s||0===s.length)return;const o=s[0],n=s[s.length-1],a=null===(e=this.hostElement.shadowRoot)||void 0===e?void 0:e.activeElement;t.shiftKey?a===o&&(t.preventDefault(),null==n||n.focus()):a===n&&(t.preventDefault(),null==o||o.focus())}navigate(t){this.items.length<=1||(this.activeIndex=(this.activeIndex+t+this.items.length)%this.items.length)}onActiveIndexChange(){this.scrollToActiveThumbnail()}handleBackdropClick(){this.closeOnBackdropClick&&this.doClose()}get activeItem(){var t;return null!==(t=this.items[this.activeIndex])&&void 0!==t?t:null}render(){const{opened:t,activeItem:i,items:e,activeIndex:n}=this;return s(o,{key:"abc234b600e09d3d5e37779d35f23343df01c918"},s("div",{key:"6657c6faae953f97c09e999f7a6036bfa0dbb0fd",inert:t||void 0},s("slot",{key:"061101ace7cecc154e617ab50a7d44a240436cc4"})),s("div",{key:"433ef70c4eb86951d0b3907d1cde807594acf40b",ref:t=>this.lightboxContainer=t,class:{"spw-lightbox":!0,"spw-lightbox--opened":t},role:"dialog","aria-modal":"true","aria-label":this.textDialogLabel},s("div",{key:"154248164e28fd9c726aa3a6582d0726f390aa62",class:"spw-lightbox__backdrop",onClick:()=>this.handleBackdropClick(),"aria-hidden":"true"}),s("div",{key:"4f70b9589c5e78685b667dbdda1d4581fd8dad11",class:"spw-lightbox__container"},s("div",{key:"ec59ccae09faaa9845ab65ad184645018442c215",class:"spw-lightbox__toolbar"},s("span",{key:"f0f135ef2c553256e741ad32b11da0257a5436a6",class:"spw-lightbox__counter","aria-live":"polite"},e.length>0?`${n+1} / ${e.length}`:""),s("div",{key:"4e6d451fb01b36c5ae5b9efb6516dd856311c888",ref:t=>this.closeButtonEl=t,class:"spw-lightbox__close",tabIndex:0,role:"button",onClick:()=>this.doClose(),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||this.doClose()}},s("spw-link",{key:"4817278c8bdade56a340bb4c18b60d194b2c99d7","icon-position":"right",icon:"fa-xmark"},this.closeButtonText))),s("div",{key:"613c3cb8e491e0112e2e9ac6bbf867c5f5d9c4b9",class:"spw-lightbox__stage"},e.length>1&&s("spw-button",{key:"1a9765fa1c715f8aba10f23fd5c175e5c367db44",class:"spw-lightbox__nav spw-lightbox__nav--prev","is-icon-only":!0,icon:"fa-chevron-left","acc-aria-label":this.textPrevious,variant:"secondary",onClick:()=>this.navigate(-1)}),s("div",{key:"ade43ad0a877fb87e089e7cb824c52a517833eb3",class:"spw-lightbox__image-wrapper",ref:t=>this.imageWrapperEl=t},i&&s("div",{key:"2e6e36b4eded34277c368d587226e031e4c87ec5",class:"spw-lightbox__image-frame"},s("img",{class:"spw-lightbox__image",src:i.src,alt:i.alt||"",key:i.src}),((null==i?void 0:i.captionTitle)||(null==i?void 0:i.captionText)||(null==i?void 0:i.copyrightText))&&s("div",{key:"b9a6e7249e8fe88233e48c7af83e0779911fca43",class:"spw-lightbox__caption","aria-live":"polite"},s("div",{key:"419860cb7b290233496aef849a783b673d87a7df",class:"spw-lightbox__caption-content"},i.captionTitle&&s("strong",{key:"f862d8a5a98a8da511fbaf7b1fe4b30283df2ee1",class:"spw-lightbox__caption-title"},i.captionTitle),i.captionText&&s("span",{key:"7b5adb2375e9fe815fcf50a854b71f7f214f52d6",class:"spw-lightbox__caption-text"},i.captionText)),i.copyrightText&&s("spw-tag",{key:"f5206abefcaf73d1483f9cef173d8ee01c6b3ab5",size:"small","icon-variant":i.copyrightIconVariant,class:"spw-lightbox__copyright",icon:i.copyrightIcon,href:i.copyrightHref||void 0,target:i.copyrightHref?i.copyrightTarget:void 0},i.copyrightText)))),e.length>1&&s("spw-button",{key:"f9bf7db26386b749281b21c95af273ad210cada4",class:"spw-lightbox__nav spw-lightbox__nav--next","is-icon-only":!0,icon:"fa-chevron-right","acc-aria-label":this.textNext,variant:"secondary",onClick:()=>this.navigate(1)})),this.showThumbnails&&e.length>1&&s("div",{key:"1ea2bb1c95e66f37bc53460823aece1fe8c7cfe0",class:"spw-lightbox__thumbnails",role:"tablist","aria-label":this.textThumbnailsLabel,ref:t=>this.thumbnailsEl=t},e.map(((t,i)=>s("button",{key:t.src,role:"tab",class:{"spw-lightbox__thumb":!0,"spw-lightbox__thumb--active":i===n},onClick:()=>this.activeIndex=i,"aria-selected":(i===n)+"","aria-label":t.alt||this.textThumbnailItem.replace("{index}",i+1+"")},s("img",{src:t.src,alt:t.alt||"",loading:"lazy"}))))))))}get hostElement(){return this}static get watchers(){return{opened:[{onOpenedChange:0}],activeIndex:[{onActiveIndexChange:0}]}}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:contents}:host>div:first-child{display:contents}.spw-lightbox{display:none;position:fixed;inset:0;z-index:1070;align-items:center;justify-content:center}.spw-lightbox--opened{display:flex}.spw-lightbox__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.68);backdrop-filter:blur(9.5px);cursor:pointer}.spw-lightbox__container{position:relative;z-index:1;display:flex;flex-direction:column;width:100%;max-width:1200px;height:100dvh;padding:0 16px 16px;box-sizing:border-box;gap:12px;pointer-events:none}.spw-lightbox__container>*{pointer-events:auto}.spw-lightbox__toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 0 0;color:#fff;pointer-events:none}.spw-lightbox__toolbar>*{pointer-events:auto}.spw-lightbox__counter{font-size:14px;opacity:0.8}.spw-lightbox__close{cursor:pointer;font-size:14px;display:inline-flex;align-items:center;flex-wrap:nowrap;justify-content:center;padding:3px 6px;border-radius:4px;outline:3px solid transparent}.spw-lightbox__close:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 5px #000}.spw-lightbox__close spw-link{--spw-link-color:#fff;--spw-link-hover-color:#fff;--spw-link-active-color:#fff;--spw-link-wrap:nowrap;pointer-events:none}.spw-lightbox__stage{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;gap:12px;pointer-events:none}.spw-lightbox__stage>*{pointer-events:auto}@media (min-width: 1024px){.spw-lightbox__stage{gap:36px}}.spw-lightbox__image-wrapper{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;min-width:0;overflow:hidden}.spw-lightbox__image-frame{position:relative;display:inline-flex;max-width:100%;max-height:80vh;border-radius:16px;overflow:hidden}.spw-lightbox__image{display:block;min-width:0;min-height:0;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:cover;border-radius:16px}.spw-lightbox__nav{flex-shrink:0}@media (max-width: 767px){.spw-lightbox__nav{display:none}}.spw-lightbox__caption{position:absolute;bottom:0;left:0;width:100%;padding:24px;padding-top:10%;box-sizing:border-box;background:linear-gradient(to bottom, transparent, rgb(0, 0, 0));display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;gap:16px;pointer-events:none;border-radius:0 0 4px 4px}.spw-lightbox__caption-content{display:flex;flex-direction:column;gap:4px;min-width:0}.spw-lightbox__caption-title{display:block;color:#fff;font-size:16px;font-weight:700;line-height:1.3}.spw-lightbox__caption-text{display:block;color:rgba(255, 255, 255, 0.85);font-size:14px;line-height:1.5}.spw-lightbox__copyright{flex-shrink:0;pointer-events:all}.spw-lightbox__thumbnails{display:flex;justify-content:safe center;gap:8px;flex-wrap:nowrap;overflow-x:auto;padding:4px;scrollbar-width:none;pointer-events:none}.spw-lightbox__thumbnails>*{pointer-events:auto}.spw-lightbox__thumbnails::-webkit-scrollbar{display:none}.spw-lightbox__thumb{width:56px;height:56px;padding:0;border:2px solid transparent;border-radius:4px;overflow:hidden;cursor:pointer;background:none;transition:border-color 0.15s, opacity 0.15s;opacity:0.5;flex-shrink:0}.spw-lightbox__thumb img{width:100%;height:100%;object-fit:cover;display:block}.spw-lightbox__thumb--active{border-color:#fff;opacity:1}.spw-lightbox__thumb:hover{opacity:0.85}.spw-lightbox__thumb:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 5px #000}"}},[257,"spw-lightbox",{gallery:[513],closeButtonText:[1,"close-button-text"],closeOnBackdropClick:[4,"close-on-backdrop-click"],showThumbnails:[4,"show-thumbnails"],textDialogLabel:[1,"text-dialog-label"],textPrevious:[1,"text-previous"],textNext:[1,"text-next"],textThumbnailsLabel:[1,"text-thumbnails-label"],textThumbnailItem:[1,"text-thumbnail-item"],opened:[32],activeIndex:[32],items:[32],open:[64],close:[64]},[[0,"keydown","handleFocusTrap"]],{opened:[{onOpenedChange:0}],activeIndex:[{onActiveIndexChange:0}]}]),x=b,g=function(){"undefined"!=typeof customElements&&["spw-lightbox","spw-button","spw-icon","spw-link","spw-loading","spw-tag"].forEach((t=>{switch(t){case"spw-lightbox":customElements.get(n(t))||customElements.define(n(t),b);break;case"spw-button":customElements.get(n(t))||r();break;case"spw-icon":customElements.get(n(t))||h();break;case"spw-link":customElements.get(n(t))||p();break;case"spw-loading":customElements.get(n(t))||c();break;case"spw-tag":customElements.get(n(t))||d()}}))};export{x as SpwLightbox,g as defineCustomElement}
|
|
1
|
+
import{p as t,H as i,c as e,h as s,a as o,t as n}from"./index.js";import{a,K as l}from"./p-BRFNx2DL.js";import{d as r}from"./p-CjvNWegY.js";import{d as h}from"./p-D25JsirJ.js";import{d as p}from"./p-BIUq0sDZ.js";import{d as c}from"./p-BY3qZT4B.js";import{d}from"./p-C3Ll1ThQ.js";const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.spwLightboxOpen=e(this,"spwLightboxOpen",7),this.spwLightboxClose=e(this,"spwLightboxClose",7),this.closeButtonText="Fermer",this.closeOnBackdropClick=!0,this.showThumbnails=!0,this.textDialogLabel="Galerie d'images",this.textPrevious="Image précédente",this.textNext="Image suivante",this.textThumbnailsLabel="Miniatures",this.textThumbnailItem="Image {index}",this.opened=!1,this.activeIndex=0,this.items=[],this.previouslyFocusedElement=null,this.currentAnimation=null,this.swipeStartX=0,this.swipeStartY=0,this.isSwiping=!1,this.SWIPE_THRESHOLD=50,this.handleItemClick=t=>{var i;this.collectItems(),this.activeIndex=null!==(i=t.detail.index)&&void 0!==i?i:0,this.opened=!0},this.handleKeydown=t=>{if(this.opened)switch(t.key){case"Escape":this.doClose();break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.navigate(1);break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.navigate(-1)}},this.handleTouchStart=t=>{this.swipeStartX=t.touches[0].clientX,this.swipeStartY=t.touches[0].clientY,this.isSwiping=!0},this.handleTouchMove=t=>{if(!this.isSwiping)return;const i=t.touches[0].clientY-this.swipeStartY;Math.abs(t.touches[0].clientX-this.swipeStartX)>Math.abs(i)&&t.preventDefault()},this.handleTouchEnd=t=>{if(!this.isSwiping)return;const i=this.swipeStartX-t.changedTouches[0].clientX;Math.abs(i)>=this.SWIPE_THRESHOLD&&this.navigate(i>0?1:-1),this.isSwiping=!1}}componentDidLoad(){window.addEventListener("keydown",this.handleKeydown),this.hostElement.addEventListener("spwLightboxItemClick",this.handleItemClick),this.imageWrapperEl.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),this.imageWrapperEl.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.imageWrapperEl.addEventListener("touchend",this.handleTouchEnd)}disconnectedCallback(){var t,i,e;window.removeEventListener("keydown",this.handleKeydown),this.hostElement.removeEventListener("spwLightboxItemClick",this.handleItemClick),null===(t=this.imageWrapperEl)||void 0===t||t.removeEventListener("touchstart",this.handleTouchStart),null===(i=this.imageWrapperEl)||void 0===i||i.removeEventListener("touchmove",this.handleTouchMove),null===(e=this.imageWrapperEl)||void 0===e||e.removeEventListener("touchend",this.handleTouchEnd),document.body.style.overflow=""}async open(t=0){this.collectItems(),this.activeIndex=t,this.opened=!0}async close(){this.doClose()}onOpenedChange(t){t?this.onOpen():this.onClose()}collectItems(){const t=this.hostElement.querySelectorAll("spw-lightbox-item");this.items=Array.from(t).map((t=>({src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",captionTitle:t.getAttribute("caption-title")||"",captionText:t.getAttribute("caption-text")||"",copyrightText:t.getAttribute("copyright-text")||"",copyrightIcon:t.getAttribute("copyright-icon")||"fa-copyright",copyrightIconVariant:t.getAttribute("copyright-icon-variant")||"fa-light",copyrightHref:t.getAttribute("copyright-href")||"",copyrightTarget:t.getAttribute("copyright-target")||"_blank"})))}cancelCurrentAnimation(){this.currentAnimation&&(this.currentAnimation.cancel(),this.currentAnimation=null)}scrollToActiveThumbnail(){if(!this.thumbnailsEl)return;const t=this.thumbnailsEl.querySelectorAll(".spw-lightbox__thumb")[this.activeIndex];null==t||t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}onOpen(){var t;this.cancelCurrentAnimation(),this.previouslyFocusedElement=document.activeElement,document.body.style.overflow="hidden";try{this.currentAnimation=a(this.lightboxContainer,l.fadeIn,{duration:200}),this.currentAnimation.addEventListener("finish",(()=>{var t;this.currentAnimation=null,null===(t=this.closeButtonEl)||void 0===t||t.focus(),this.scrollToActiveThumbnail(),this.spwLightboxOpen.emit({index:this.activeIndex})}))}catch(i){this.currentAnimation=null,null===(t=this.closeButtonEl)||void 0===t||t.focus(),this.scrollToActiveThumbnail(),this.spwLightboxOpen.emit({index:this.activeIndex})}}onClose(){var t;this.cancelCurrentAnimation(),document.body.style.overflow="";try{this.currentAnimation=a(this.lightboxContainer,l.fadeOut,{duration:200}),this.currentAnimation.addEventListener("finish",(()=>{var t;this.currentAnimation=null,null===(t=this.previouslyFocusedElement)||void 0===t||t.focus(),this.spwLightboxClose.emit()}))}catch(i){this.currentAnimation=null,null===(t=this.previouslyFocusedElement)||void 0===t||t.focus(),this.spwLightboxClose.emit()}}doClose(){this.opened=!1}handleFocusTrap(t){var i,e;if(!this.opened||"Tab"!==t.key)return;const s=null===(i=this.hostElement.shadowRoot)||void 0===i?void 0:i.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!s||0===s.length)return;const o=s[0],n=s[s.length-1],a=null===(e=this.hostElement.shadowRoot)||void 0===e?void 0:e.activeElement;t.shiftKey?a===o&&(t.preventDefault(),null==n||n.focus()):a===n&&(t.preventDefault(),null==o||o.focus())}navigate(t){this.items.length<=1||(this.activeIndex=(this.activeIndex+t+this.items.length)%this.items.length)}onActiveIndexChange(){this.scrollToActiveThumbnail()}handleBackdropClick(){this.closeOnBackdropClick&&this.doClose()}get activeItem(){var t;return null!==(t=this.items[this.activeIndex])&&void 0!==t?t:null}render(){const{opened:t,activeItem:i,items:e,activeIndex:n}=this;return s(o,{key:"73eaf8e70c338f96d0af4df7362f64f9a8c0c39c"},s("div",{key:"13f7a50a8dd33cee0b7f9ac6e3a2a41d5592bdd5",inert:t||void 0},s("slot",{key:"b7f990b5375b7e26a9eb984aaf6dbef90fe93882"})),s("div",{key:"79dfda1cf02f05cca9b5c821d2b22dee931a2cbc",ref:t=>this.lightboxContainer=t,class:{"spw-lightbox":!0,"spw-lightbox--opened":t},role:"dialog","aria-modal":"true","aria-label":this.textDialogLabel},s("div",{key:"33ad2bea4e6034b3788b20bb85e6b479aec80a16",class:"spw-lightbox__backdrop",onClick:()=>this.handleBackdropClick(),"aria-hidden":"true"}),s("div",{key:"42ec1cc9d498a71b24c18b18968d6662d33021c9",class:"spw-lightbox__container"},s("div",{key:"490c9e016f02d8ac224c15ba55d33e8374be82b8",class:"spw-lightbox__toolbar"},s("span",{key:"b57f82883bbf4ea195e46d0d097eb2dd599d3ebe",class:"spw-lightbox__counter","aria-live":"polite"},e.length>0?`${n+1} / ${e.length}`:""),s("div",{key:"e22ee77a875bce35183de45bb9ac3fb25ee1693b",ref:t=>this.closeButtonEl=t,class:"spw-lightbox__close",tabIndex:0,role:"button",onClick:()=>this.doClose(),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||this.doClose()}},s("spw-link",{key:"67f0080c119fb04955402f8539586e73497cd0e1","icon-position":"right",icon:"fa-xmark"},this.closeButtonText))),s("div",{key:"741f4b9d7e10f76b857e60cb3807d085fd1b3e51",class:"spw-lightbox__stage"},e.length>1&&s("spw-button",{key:"7b1137bb5800744fb3b3cb28ad90757ab61f0a31",class:"spw-lightbox__nav spw-lightbox__nav--prev","is-icon-only":!0,icon:"fa-chevron-left","acc-aria-label":this.textPrevious,variant:"secondary",onClick:()=>this.navigate(-1)}),s("div",{key:"2a0df86526b17ba2dce975873a256a27fbeba414",class:"spw-lightbox__image-wrapper",ref:t=>this.imageWrapperEl=t},i&&s("div",{key:"4f7f8aa5d91681f6aca08074335f4151bd0ad411",class:"spw-lightbox__image-frame"},s("img",{class:"spw-lightbox__image",src:i.src,alt:i.alt||"",key:i.src}),((null==i?void 0:i.captionTitle)||(null==i?void 0:i.captionText)||(null==i?void 0:i.copyrightText))&&s("div",{key:"03520fed0d3722b233bbcf4efa8fe1dcd3411918",class:"spw-lightbox__caption","aria-live":"polite"},s("div",{key:"e524e43020dd059b2eedbf78f4854529e5f3a24b",class:"spw-lightbox__caption-content"},i.captionTitle&&s("strong",{key:"51c8b93e12df0777a13ad87928335ab269524578",class:"spw-lightbox__caption-title"},i.captionTitle),i.captionText&&s("span",{key:"56c1608cd037f6d790f4eabba8a9dd638da1b69d",class:"spw-lightbox__caption-text"},i.captionText)),i.copyrightText&&s("spw-tag",{key:"2f22ac13137f11af4c1889832a91858d94aa7b2c",size:"small","icon-variant":i.copyrightIconVariant,class:"spw-lightbox__copyright",icon:i.copyrightIcon,href:i.copyrightHref||void 0,target:i.copyrightHref?i.copyrightTarget:void 0},i.copyrightText)))),e.length>1&&s("spw-button",{key:"8895769c3ab3b0328fa223ac01e9810edc31ec53",class:"spw-lightbox__nav spw-lightbox__nav--next","is-icon-only":!0,icon:"fa-chevron-right","acc-aria-label":this.textNext,variant:"secondary",onClick:()=>this.navigate(1)})),this.showThumbnails&&e.length>1&&s("div",{key:"3f660c3a570c018684482b94a7d76152967d2c41",class:"spw-lightbox__thumbnails",role:"tablist","aria-label":this.textThumbnailsLabel,ref:t=>this.thumbnailsEl=t},e.map(((t,i)=>s("button",{key:t.src,role:"tab",class:{"spw-lightbox__thumb":!0,"spw-lightbox__thumb--active":i===n},onClick:()=>this.activeIndex=i,"aria-selected":(i===n)+"","aria-label":t.alt||this.textThumbnailItem.replace("{index}",i+1+"")},s("img",{src:t.src,alt:t.alt||"",loading:"lazy"}))))))))}get hostElement(){return this}static get watchers(){return{opened:[{onOpenedChange:0}],activeIndex:[{onActiveIndexChange:0}]}}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:contents}:host>div:first-child{display:contents}.spw-lightbox{display:none;position:fixed;inset:0;z-index:1070;align-items:center;justify-content:center}.spw-lightbox--opened{display:flex}.spw-lightbox__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.68);backdrop-filter:blur(9.5px);cursor:pointer}.spw-lightbox__container{position:relative;z-index:1;display:flex;flex-direction:column;width:100%;max-width:1200px;height:100dvh;padding:0 16px 16px;box-sizing:border-box;gap:12px;pointer-events:none}.spw-lightbox__container>*{pointer-events:auto}.spw-lightbox__toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 0 0;color:#fff;pointer-events:none}.spw-lightbox__toolbar>*{pointer-events:auto}.spw-lightbox__counter{font-size:14px;opacity:0.8}.spw-lightbox__close{cursor:pointer;font-size:14px;display:inline-flex;align-items:center;flex-wrap:nowrap;justify-content:center;padding:3px 6px;border-radius:4px;outline:3px solid transparent}.spw-lightbox__close:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 5px #000}.spw-lightbox__close spw-link{--spw-link-color:#fff;--spw-link-hover-color:#fff;--spw-link-active-color:#fff;--spw-link-wrap:nowrap;pointer-events:none}.spw-lightbox__stage{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;gap:12px;pointer-events:none}.spw-lightbox__stage>*{pointer-events:auto}@media (min-width: 1024px){.spw-lightbox__stage{gap:36px}}.spw-lightbox__image-wrapper{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;min-width:0;overflow:hidden}.spw-lightbox__image-frame{position:relative;display:inline-flex;max-width:100%;max-height:80vh;border-radius:16px;overflow:hidden}.spw-lightbox__image{display:block;min-width:0;min-height:0;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:cover;border-radius:16px}.spw-lightbox__nav{flex-shrink:0}@media (max-width: 767px){.spw-lightbox__nav{display:none}}.spw-lightbox__caption{position:absolute;bottom:0;left:0;width:100%;padding:24px;padding-top:10%;box-sizing:border-box;background:linear-gradient(to bottom, transparent, rgb(0, 0, 0));display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;gap:16px;pointer-events:none;border-radius:0 0 4px 4px}.spw-lightbox__caption-content{display:flex;flex-direction:column;gap:4px;min-width:0}.spw-lightbox__caption-title{display:block;color:#fff;font-size:16px;font-weight:700;line-height:1.3}.spw-lightbox__caption-text{display:block;color:rgba(255, 255, 255, 0.85);font-size:14px;line-height:1.5}.spw-lightbox__copyright{flex-shrink:0;pointer-events:all}.spw-lightbox__thumbnails{display:flex;justify-content:safe center;gap:8px;flex-wrap:nowrap;overflow-x:auto;padding:4px;scrollbar-width:none;pointer-events:none}.spw-lightbox__thumbnails>*{pointer-events:auto}.spw-lightbox__thumbnails::-webkit-scrollbar{display:none}.spw-lightbox__thumb{width:56px;height:56px;padding:0;border:2px solid transparent;border-radius:4px;overflow:hidden;cursor:pointer;background:none;transition:border-color 0.15s, opacity 0.15s;opacity:0.5;flex-shrink:0}.spw-lightbox__thumb img{width:100%;height:100%;object-fit:cover;display:block}.spw-lightbox__thumb--active{border-color:#fff;opacity:1}.spw-lightbox__thumb:hover{opacity:0.85}.spw-lightbox__thumb:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 5px #000}"}},[257,"spw-lightbox",{gallery:[513],closeButtonText:[1,"close-button-text"],closeOnBackdropClick:[4,"close-on-backdrop-click"],showThumbnails:[4,"show-thumbnails"],textDialogLabel:[1,"text-dialog-label"],textPrevious:[1,"text-previous"],textNext:[1,"text-next"],textThumbnailsLabel:[1,"text-thumbnails-label"],textThumbnailItem:[1,"text-thumbnail-item"],opened:[32],activeIndex:[32],items:[32],open:[64],close:[64]},[[0,"keydown","handleFocusTrap"]],{opened:[{onOpenedChange:0}],activeIndex:[{onActiveIndexChange:0}]}]),x=b,g=function(){"undefined"!=typeof customElements&&["spw-lightbox","spw-button","spw-icon","spw-link","spw-loading","spw-tag"].forEach((t=>{switch(t){case"spw-lightbox":customElements.get(n(t))||customElements.define(n(t),b);break;case"spw-button":customElements.get(n(t))||r();break;case"spw-icon":customElements.get(n(t))||h();break;case"spw-link":customElements.get(n(t))||p();break;case"spw-loading":customElements.get(n(t))||c();break;case"spw-tag":customElements.get(n(t))||d()}}))};export{x as SpwLightbox,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import{S as s,d as o}from"./p-BIUq0sDZ.js";const p=s,r=o;export{p as SpwLink,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as i,a as n,t as s}from"./index.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get elementClass(){return{"spw-list-description":!0,"spw-list-description--has-clamp":"none"!==this.lineClamp,["spw-list-description--clamp-"+this.lineClamp]:!0}}render(){return i(n,{key:"
|
|
1
|
+
import{p as e,H as t,h as i,a as n,t as s}from"./index.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get elementClass(){return{"spw-list-description":!0,"spw-list-description--has-clamp":"none"!==this.lineClamp,["spw-list-description--clamp-"+this.lineClamp]:!0}}render(){return i(n,{key:"ff816fb8c9e2d3c2b142b6a6a1ac987b8ef2fa2e"},i("div",{key:"9bfccab1e21ae9b96fa7e5dda798a98abe1198a8",class:this.elementClass},i("slot",{key:"c411456977e7877b579d05ae4a361e395dcf6a15"})))}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-list-description{margin-top:6px;color:var(--spw-color-themes-grey-grey-800);font-size:16px;line-height:1.25}.spw-list-description--has-clamp{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;text-overflow:ellipsis}.spw-list-description--clamp-1{-webkit-line-clamp:1;line-clamp:1}.spw-list-description--clamp-2{-webkit-line-clamp:2;line-clamp:2}.spw-list-description--clamp-3{-webkit-line-clamp:3;line-clamp:3}.spw-list-description--clamp-4{-webkit-line-clamp:4;line-clamp:4}.spw-list-description--clamp-5{-webkit-line-clamp:5;line-clamp:5}.spw-list-description--clamp-6{-webkit-line-clamp:6;line-clamp:6}.spw-list-description--clamp-7{-webkit-line-clamp:7;line-clamp:7}.spw-list-description--clamp-8{-webkit-line-clamp:8;line-clamp:8}.spw-list-description--clamp-9{-webkit-line-clamp:9;line-clamp:9}.spw-list-description--clamp-10{-webkit-line-clamp:10;line-clamp:10}"}},[257,"spw-list-description",{lineClamp:[1,"line-clamp"]}]),a=o,p=function(){"undefined"!=typeof customElements&&["spw-list-description"].forEach((e=>{"spw-list-description"===e&&(customElements.get(s(e))||customElements.define(s(e),o))}))};export{a as SpwListDescription,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,a as s,t as o}from"./index.js";import{d as n}from"./p-D25JsirJ.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.variant="default",this.target="_self",this.icon="fa-arrow-right",this.lineClamp="3",this.categoryIcon="fa-file-signature",this.surface="light"}componentWillLoad(){this.applyVariantToChildren()}slotChanged(){this.applyVariantToChildren()}applyVariantToChildren(){requestAnimationFrame((()=>{const t="--"+this.variant,e="--"+this.surface,i=this.el.querySelector("spw-list-title"),s=this.el.querySelector("spw-list-description");i&&i.classList.add(t),i&&i.classList.add(e),i&&this.icon&&i.setAttribute("icon",this.icon),i&&!i.hasAttribute("line-clamp")&&i.setAttribute("line-clamp",this.lineClamp),s&&s.classList.add(t),s&&this.icon&&s.classList.add("--icon"),s&&!s.hasAttribute("line-clamp")&&s.setAttribute("line-clamp",this.lineClamp)}))}onMouseEnter(){this.setHovered(!0)}onMouseLeave(){this.setHovered(!1),this.setActive(!1)}onTouchStart(){this.setActive(!0)}onTouchEnd(){this.setActive(!1)}onMouseDown(){this.setActive(!0)}onMouseUp(){this.setActive(!1)}onBlur(){this.setActive(!1)}onFocus(){this.setActive(!0)}setHovered(t){const e=this.el.querySelector("spw-list-title");e&&this.href&&e.classList.toggle("--hovered",t)}setActive(t){const e=this.el.querySelector("spw-list-title");e&&this.href&&e.classList.toggle("--active",t)}get elementClass(){return{"spw-list-item":!0,"spw-list-item--hoverable":!!this.href,"spw-list-item--icon":!!this.icon&&""!==this.icon||!!this.categoryIcon&&""!==this.categoryIcon&&!!this.category,["spw-list-item--"+this.variant]:!0}}get elementCatClass(){return{"spw-list-item__category":!0,"spw-list-item__category--icon":!!this.categoryIcon,"spw-list-item__category--hoverable":!!this.categoryLink}}handleClick(){this.categoryLink&&(window.location.href=this.categoryLink)}render(){const{href:t,target:e}=this,o=void 0===this.href?"div":"a",n="div"===o?{}:{href:t,target:e};return i(s,{key:"
|
|
1
|
+
import{p as t,H as e,h as i,a as s,t as o}from"./index.js";import{d as n}from"./p-D25JsirJ.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.variant="default",this.target="_self",this.icon="fa-arrow-right",this.lineClamp="3",this.categoryIcon="fa-file-signature",this.surface="light"}componentWillLoad(){this.applyVariantToChildren()}slotChanged(){this.applyVariantToChildren()}applyVariantToChildren(){requestAnimationFrame((()=>{const t="--"+this.variant,e="--"+this.surface,i=this.el.querySelector("spw-list-title"),s=this.el.querySelector("spw-list-description");i&&i.classList.add(t),i&&i.classList.add(e),i&&this.icon&&i.setAttribute("icon",this.icon),i&&!i.hasAttribute("line-clamp")&&i.setAttribute("line-clamp",this.lineClamp),s&&s.classList.add(t),s&&this.icon&&s.classList.add("--icon"),s&&!s.hasAttribute("line-clamp")&&s.setAttribute("line-clamp",this.lineClamp)}))}onMouseEnter(){this.setHovered(!0)}onMouseLeave(){this.setHovered(!1),this.setActive(!1)}onTouchStart(){this.setActive(!0)}onTouchEnd(){this.setActive(!1)}onMouseDown(){this.setActive(!0)}onMouseUp(){this.setActive(!1)}onBlur(){this.setActive(!1)}onFocus(){this.setActive(!0)}setHovered(t){const e=this.el.querySelector("spw-list-title");e&&this.href&&e.classList.toggle("--hovered",t)}setActive(t){const e=this.el.querySelector("spw-list-title");e&&this.href&&e.classList.toggle("--active",t)}get elementClass(){return{"spw-list-item":!0,"spw-list-item--hoverable":!!this.href,"spw-list-item--icon":!!this.icon&&""!==this.icon||!!this.categoryIcon&&""!==this.categoryIcon&&!!this.category,["spw-list-item--"+this.variant]:!0}}get elementCatClass(){return{"spw-list-item__category":!0,"spw-list-item__category--icon":!!this.categoryIcon,"spw-list-item__category--hoverable":!!this.categoryLink}}handleClick(){this.categoryLink&&(window.location.href=this.categoryLink)}render(){const{href:t,target:e}=this,o=void 0===this.href?"div":"a",n="div"===o?{}:{href:t,target:e};return i(s,{key:"8c8359a860ac9c78d3d8726444921a37ec983531"},i("li",{key:"f4ad2018e3e5bc6a7840f0a7bfd0a8a0415b6792",role:"listitem",class:this.elementClass},this.category&&i("span",{key:"40c58204b114880379d1adaec59cc95f3074954b",class:this.elementCatClass,onClick:()=>this.handleClick()},this.categoryIcon&&i("spw-icon",{key:"0a087946d359e6f61617de503b13b69a08f933ba",icon:this.categoryIcon})," ",this.category),i(o,Object.assign({key:"16f2a637f19716cae277dfdf6cfa1be7b692e7cc"},n),i("slot",{key:"4b485812ef338d9443804c37f20621480fcec6fa"})),i("slot",{key:"913d667cedf3d14423eaa0b964686231129da258",name:"buttons"})))}get el(){return this}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:contents}.spw-list-item{position:relative;color:var(--spw-color-themes-grey-grey-900);transition:all 0.3s ease-in-out;text-decoration:none}:host(.--dark) .spw-list-item{color:var(--spw-ds-white)}.spw-list-item a{text-decoration:none}.spw-list-item--icon{padding-left:28px}.spw-list-item__category{display:inline-block;position:relative;margin-bottom:6px;color:var(--spw-ds-primary);font-weight:700;font-size:16px;line-height:1.5}.spw-list-item__category spw-icon{position:absolute;top:2px;left:-28px}.spw-list-item__category--hoverable{cursor:pointer}.spw-list-item__category--hoverable:hover{text-decoration:underline}.spw-list-item ::slotted([slot=buttons]){display:block;margin-top:12px}"}},[257,"spw-list-item",{variant:[1],href:[1],target:[1],icon:[1],lineClamp:[1,"line-clamp"],category:[1],categoryLink:[1,"category-link"],categoryIcon:[1,"category-icon"],surface:[1]},[[0,"slotchange","slotChanged"],[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"],[1,"mousedown","onMouseDown"],[1,"mouseup","onMouseUp"],[0,"blur","onBlur"],[0,"focus","onFocus"]]]),r=a,l=function(){"undefined"!=typeof customElements&&["spw-list-item","spw-icon"].forEach((t=>{switch(t){case"spw-list-item":customElements.get(o(t))||customElements.define(o(t),a);break;case"spw-icon":customElements.get(o(t))||n()}}))};export{r as SpwListItem,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,a as s,t as n}from"./index.js";import{d as p}from"./p-D25JsirJ.js";const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get elementClass(){return{"spw-list-title":!0,"spw-list-title--has-clamp":"none"!==this.lineClamp,"spw-list-title--icon":!!this.icon,["spw-list-title--clamp-"+this.lineClamp]:!0}}render(){return i(s,{key:"
|
|
1
|
+
import{p as t,H as e,h as i,a as s,t as n}from"./index.js";import{d as p}from"./p-D25JsirJ.js";const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get elementClass(){return{"spw-list-title":!0,"spw-list-title--has-clamp":"none"!==this.lineClamp,"spw-list-title--icon":!!this.icon,["spw-list-title--clamp-"+this.lineClamp]:!0}}render(){return i(s,{key:"57285252ed4ea9c17b57714e999d380ca24d5b47"},i("div",{key:"6cab51df6b6d02c386cacd140e4412ade9c6431a",class:this.elementClass},this.icon&&i("spw-icon",{key:"10691312bb8f473ff60db867d78a9f8e8bbcf362",icon:this.icon}),i("div",{key:"4446236fa09225652b27416413edbce8fe416f73",class:"spw-list-title__content"},i("div",{key:"ebc48659c692d9a6cc8d304e5452777b114dbae0",class:"spw-list-title__content-text"},i("slot",{key:"1eed80c60e917c123e7c8b6fe25bcf446898ad46"})))))}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-ds-typography,[class*=spw-ds-typography-]{font-family:var(--spw-ds-font-main)}.spw-ds-typography-display-1{font-size:56px;line-height:1.2;font-weight:400}@media (min-width: 1024px){.spw-ds-typography-display-1{font-size:68px;line-height:1.1;font-weight:400}}.spw-ds-typography-display-2{font-size:40px;line-height:1.25;font-weight:400}@media (min-width: 1024px){.spw-ds-typography-display-2{font-size:56px;line-height:1.2;font-weight:400}}.spw-ds-typography-display-3{font-size:32px;line-height:1.4;font-weight:400}@media (min-width: 1024px){.spw-ds-typography-display-3{font-size:48px;line-height:1.2;font-weight:400}}.spw-ds-typography-heading-01{font-size:28px;font-weight:700;line-height:1.4}@media (min-width: 1024px){.spw-ds-typography-heading-01{font-size:32px;font-weight:700;line-height:1.25}}.spw-ds-typography-heading-02{font-size:24px;font-weight:700;line-height:1.4}@media (min-width: 1024px){.spw-ds-typography-heading-02{font-size:28px;font-weight:700;line-height:1.3}}.spw-ds-typography-heading-03{font-size:20px;font-weight:700;line-height:1.4}@media (min-width: 1024px){.spw-ds-typography-heading-03{font-size:20px;font-weight:700;line-height:1.4}}.spw-ds-typography-heading-04,:host(.--default) .spw-list-title{font-size:18px;font-weight:700;line-height:1.5}@media (min-width: 1024px){.spw-ds-typography-heading-04,:host(.--default) .spw-list-title{font-size:18px;font-weight:700;line-height:1.5}}.spw-ds-typography-heading-05,:host(.--shortcut) .spw-list-title{font-size:16px;font-weight:700;line-height:1.5}@media (min-width: 1024px){.spw-ds-typography-heading-05,:host(.--shortcut) .spw-list-title{font-size:16px;font-weight:700;line-height:1.6}}.spw-ds-typography-heading-06{font-size:14px;font-weight:700;line-height:1.7}@media (min-width: 1024px){.spw-ds-typography-heading-06{font-size:14px;font-weight:700;line-height:1.6}}.spw-ds-typography-lead-body{font-size:20px !important;line-height:1.6;font-weight:400}@media (min-width: 1024px){.spw-ds-typography-lead-body{font-size:20px;line-height:1.5;font-weight:400}}.spw-ds-typography-lead-body-compact{font-size:20px;line-height:1.5;font-weight:400}@media (min-width: 1024px){.spw-ds-typography-lead-body-compact{font-size:20px;line-height:1.25;font-weight:400}}.spw-ds-typography-body-1{font-size:18px;font-weight:400;line-height:1.6}@media (min-width: 1024px){.spw-ds-typography-body-1{font-size:18px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-1{font-size:18px;font-weight:400;line-height:1.5}@media (min-width: 1024px){.spw-ds-typography-body-compact-1{font-size:18px;font-weight:400;line-height:1.25}}.spw-ds-typography-body-2{font-size:16px;font-weight:400;line-height:1.6}@media (min-width: 1024px){.spw-ds-typography-body-2{font-size:16px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-2{font-size:16px;font-weight:400;line-height:1.5}@media (min-width: 1024px){.spw-ds-typography-body-compact-2{font-size:16px;font-weight:400;line-height:1.25}}.spw-ds-typography-body-3{font-size:14px;font-weight:400;line-height:1.6}@media (min-width: 1024px){.spw-ds-typography-body-3{font-size:14px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-3{font-size:14px;font-weight:400;line-height:1.5}@media (min-width: 1024px){.spw-ds-typography-body-compact-3{font-size:14px;font-weight:400;line-height:1.25}}.spw-ds-typography-tag{font-weight:700;font-size:14px;line-height:1.2}.spw-ds-typography-label{font-weight:600;font-size:16px;line-height:1.2}.spw-ds-typography-date{font-size:16px;line-height:1;font-weight:300}.spw-ds-typography-caption{font-size:14px;font-style:italic;line-height:1;font-weight:300}.spw-ds-typography-link{font-weight:700;font-size:inherit;line-height:1.2;color:var(--spw-ds-primary);text-decoration:underline;text-underline-offset:2px}.spw-ds-typography-link:hover{color:var(--spw-ds-variant)}.spw-ds-typography-link:active{color:var(--spw-ds-active)}.spw-ds-typography-link:hover,.spw-ds-typography-link:active{text-decoration-thickness:2px}.spw-ds-typography-hint{font-size:14px;font-weight:400;line-height:1.5}.spw-ds-typography-code{font-size:14px;font-weight:400;line-height:1.2;font-family:monospace}.spw-ds-typography-overline{font-size:10px;font-weight:800;line-height:1;text-transform:uppercase}:host{display:block}.spw-list-title{position:relative;display:inline-flex;line-height:1.35}.spw-list-title spw-icon{position:absolute;top:4px;left:-28px;color:var(--spw-ds-primary)}:host(.--active) .spw-list-title spw-icon{color:var(--spw-ds-active)}:host(.--dark) .spw-list-title spw-icon{color:var(--spw-ds-white)}.spw-list-title__content-text{display:inline;text-decoration:none;text-underline-offset:2px}:host(.--hovered) .spw-list-title__content-text{text-decoration:underline}:host(.--active) .spw-list-title__content-text{text-decoration:underline}:host(.--default) .spw-list-title{color:var(--spw-color-themes-grey-grey-900)}:host(.--shortcut) .spw-list-title{color:var(--spw-ds-primary)}:host(.--hovered) .spw-list-title{color:var(--spw-ds-primary)}:host(.--active) .spw-list-title{color:var(--spw-ds-active)}:host(.--dark) .spw-list-title{color:var(--spw-ds-white)}.spw-list-title--has-clamp .spw-list-title__content{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;text-overflow:ellipsis}.spw-list-title--clamp-1 .spw-list-title__content{-webkit-line-clamp:1;line-clamp:1}.spw-list-title--clamp-2 .spw-list-title__content{-webkit-line-clamp:2;line-clamp:2}.spw-list-title--clamp-3 .spw-list-title__content{-webkit-line-clamp:3;line-clamp:3}.spw-list-title--clamp-4 .spw-list-title__content{-webkit-line-clamp:4;line-clamp:4}.spw-list-title--clamp-5 .spw-list-title__content{-webkit-line-clamp:5;line-clamp:5}.spw-list-title--clamp-6 .spw-list-title__content{-webkit-line-clamp:6;line-clamp:6}.spw-list-title--clamp-7 .spw-list-title__content{-webkit-line-clamp:7;line-clamp:7}.spw-list-title--clamp-8 .spw-list-title__content{-webkit-line-clamp:8;line-clamp:8}.spw-list-title--clamp-9 .spw-list-title__content{-webkit-line-clamp:9;line-clamp:9}.spw-list-title--clamp-10 .spw-list-title__content{-webkit-line-clamp:10;line-clamp:10}"}},[257,"spw-list-title",{icon:[1],lineClamp:[1,"line-clamp"]}]),l=o,a=function(){"undefined"!=typeof customElements&&["spw-list-title","spw-icon"].forEach((t=>{switch(t){case"spw-list-title":customElements.get(n(t))||customElements.define(n(t),o);break;case"spw-icon":customElements.get(n(t))||p()}}))};export{l as SpwListTitle,a as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,a as n,t as s}from"./index.js";const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.gap="medium",this.surface="light"}componentWillLoad(){this.applyVariantToChildren()}slotChanged(){this.applyVariantToChildren()}applyVariantToChildren(){requestAnimationFrame((()=>{const t="--"+this.surface;this.el.querySelectorAll("spw-list-item").forEach((e=>{e.classList.add(t),e.setAttribute("surface",this.surface)}))}))}get elementClass(){return{"spw-list":!0,["spw-list--"+this.gap]:!0}}render(){return i(n,{key:"
|
|
1
|
+
import{p as t,H as e,h as i,a as n,t as s}from"./index.js";const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.gap="medium",this.surface="light"}componentWillLoad(){this.applyVariantToChildren()}slotChanged(){this.applyVariantToChildren()}applyVariantToChildren(){requestAnimationFrame((()=>{const t="--"+this.surface;this.el.querySelectorAll("spw-list-item").forEach((e=>{e.classList.add(t),e.setAttribute("surface",this.surface)}))}))}get elementClass(){return{"spw-list":!0,["spw-list--"+this.gap]:!0}}render(){return i(n,{key:"992024c6ca78d7f38708e5426f1198199b86c601"},i("ul",{key:"04fd25e8d19ac97f873addb43645b61f75db30c1",role:"list",class:this.elementClass},i("slot",{key:"5cec328be00df1e17d9e9fc82d620b9214ce1413"})))}get el(){return this}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-list{display:flex;flex-direction:column}.spw-list--small{gap:12px}.spw-list--medium{gap:24px}.spw-list--large{gap:32px}"}},[257,"spw-list",{gap:[1],surface:[1]},[[0,"slotchange","slotChanged"]]]),a=o,r=function(){"undefined"!=typeof customElements&&["spw-list"].forEach((t=>{"spw-list"===t&&(customElements.get(s(t))||customElements.define(s(t),o))}))};export{a as SpwList,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-BY3qZT4B.js";const p=o,r=s;export{p as SpwLoading,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as s,H as e,c as o,h as t,a,t as i}from"./index.js";import{d as r}from"./p-D25JsirJ.js";import{d as n}from"./p-
|
|
1
|
+
import{p as s,H as e,c as o,h as t,a,t as i}from"./index.js";import{d as r}from"./p-D25JsirJ.js";import{d as n}from"./p-BIUq0sDZ.js";const p=(s,e="default")=>({"spw-message":!0,["spw-message--"+s]:!0,["spw-message--"+e]:!0}),l=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.spwDismiss=o(this,"spwDismiss",7),this.variant="default",this.isDismissable=!0,this.dismissableText="Masquer",this.messageTitle="Notification",this.size="default",this.isVisible=!0,this.hasSlotContent=!1,this.handleKeyDown=s=>{"Enter"===s.key&&(s.preventDefault(),this.handleDismiss())},this.handleDismiss=()=>{this.spwDismiss.emit({messageId:this.messageId}),this.isVisible=!1},this.handleSlotChange=()=>{if(this.slotElement){const s=this.slotElement.assignedNodes({flatten:!0});this.hasSlotContent=s.some((s=>{var e;return s.nodeType===Node.ELEMENT_NODE||s.nodeType===Node.TEXT_NODE&&""!==(null===(e=s.textContent)||void 0===e?void 0:e.trim())}))}}}async showMessage(){this.isVisible=!0}async hideMessage(){this.isVisible=!1}render(){const s=this.icon||(()=>{const s={default:"fa-lightbulb",success:"fa-check",info:"fa-info-circle",warning:"fa-exclamation-triangle",alert:"fa-exclamation-triangle"};return s[this.variant]||s.default})(),e="compact"===this.size;return this.isVisible?t(a,null,t("div",{class:p(this.variant,this.size),role:"alert","aria-live":"polite","aria-label":this.messageTitle},t("div",{class:"spw-message__title-container"},t("strong",{class:"spw-message__title"},t("spw-icon",{icon:s})," ",this.messageTitle,e&&this.hasSlotContent&&t("span",{class:"spw-message__separator"}," : "),e&&t("span",{class:"spw-message__inline-content"},t("slot",{ref:s=>this.slotElement=s,onSlotchange:this.handleSlotChange}))),this.isDismissable&&t("spw-link",{tabindex:"0",icon:"fa-close",class:"spw-message__close","aria-label":this.dismissableText,onClick:this.handleDismiss,onKeyDown:this.handleKeyDown},this.dismissableText)),!e&&t("div",{class:"spw-message__text"},t("slot",{ref:s=>this.slotElement=s,onSlotchange:this.handleSlotChange})))):null}get el(){return this}static get style(){return'@charset "UTF-8";html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;--spw-message-margin-top-content:12px;--spw-message-title-color:var(--spw-colors-support-grey-grey-900);--spw-message-body-color:var(--spw-colors-support-grey-grey-900);--spw-message-font-size:16px;--spw-message-default-background-color:var(--spw-colors-support-grey-grey-100);--spw-message-default-icon-color:var(--spw-colors-support-grey-grey-900);--spw-message-default-border-color:var(--spw-colors-support-grey-grey-300);--spw-message-success-background-color:var(--spw-colors-multi-branding-green-green-50);--spw-message-success-icon-color:var(--spw-colors-multi-branding-green-green-600);--spw-message-success-border-color:var(--spw-colors-multi-branding-green-green-300);--spw-message-alert-background-color:var(--spw-colors-multi-branding-red-red-50);--spw-message-alert-icon-color:var(--spw-colors-multi-branding-red-red-accent-3);--spw-message-alert-border-color:var(--spw-colors-multi-branding-red-red-300);--spw-message-info-background-color:var(--spw-colors-multi-branding-blue-blue-50);--spw-message-info-icon-color:var(--spw-colors-multi-branding-blue-blue-accent-3);--spw-message-info-border-color:var(--spw-colors-multi-branding-blue-blue-300);--spw-message-warning-background-color:#ffeee0;--spw-message-warning-icon-color:#d84300;--spw-message-warning-border-color:#f4b095}.spw-message{padding:24px;border-radius:16px;border:2px solid transparent;color:var(--spw-message-title-color);font-size:var(--spw-message-font-size)}.spw-message__title-container{display:flex;gap:24px;flex-wrap:nowrap;justify-content:space-between;flex-direction:column}@media (min-width: 1024px){.spw-message__title-container{flex-direction:row}}.spw-message__close{order:-1}@media (min-width: 1024px){.spw-message__close{order:initial}}.spw-message__title{font-size:18px;flex:1;display:block}.spw-message__title spw-icon,.spw-message__title .spw-icon{position:relative;margin-right:6px;top:1px}.spw-message__text{margin-top:var(--spw-message-margin-top-content);color:var(--spw-message-body-color)}.spw-message__separator{font-weight:normal}.spw-message__inline-content{font-weight:normal}.spw-message--compact{padding:16px}.spw-message--compact .spw-message__title{font-size:16px;display:inline}.spw-message--compact .spw-message__title spw-icon{margin-right:4px}.spw-message--default{background:var(--spw-message-default-background-color);border-color:var(--spw-message-default-border-color)}.spw-message--default .spw-icon{color:var(--spw-message-default-icon-color)}.spw-message--success{background:var(--spw-message-success-background-color);border-color:var(--spw-message-success-border-color)}.spw-message--success spw-icon,.spw-message--success .spw-icon{color:var(--spw-message-success-icon-color)}.spw-message--alert{background:var(--spw-message-alert-background-color);border-color:var(--spw-message-alert-border-color)}.spw-message--alert spw-icon,.spw-message--alert .spw-icon{color:var(--spw-message-alert-icon-color)}.spw-message--info{background:var(--spw-message-info-background-color);border-color:var(--spw-message-info-border-color)}.spw-message--info spw-icon,.spw-message--info .spw-icon{color:var(--spw-message-info-icon-color)}.spw-message--warning{background:var(--spw-message-warning-background-color);border-color:var(--spw-message-warning-border-color)}.spw-message--warning spw-icon,.spw-message--warning .spw-icon{color:var(--spw-message-warning-icon-color)}.spw-message spw-link{--spw-link-color:var(--spw-colors-support-grey-grey-900);--spw-link-hover-color:var(--spw-colors-support-grey-grey-900);--spw-link-active-color:var(--spw-colors-support-grey-grey-800);--spw-link-padding:12px}.spw-message spw-link:focus-visible{outline:3px solid white;outline-offset:0;box-shadow:0 0 0 6px black}'}},[257,"spw-message",{variant:[1],messageId:[1,"message-id"],isDismissable:[4,"is-dismissable"],dismissableText:[1,"dismissable-text"],messageTitle:[1,"message-title"],icon:[1],size:[1],isVisible:[32],hasSlotContent:[32],showMessage:[64],hideMessage:[64]}]),c=l,g=function(){"undefined"!=typeof customElements&&["spw-message","spw-icon","spw-link"].forEach((s=>{switch(s){case"spw-message":customElements.get(i(s))||customElements.define(i(s),l);break;case"spw-icon":customElements.get(i(s))||r();break;case"spw-link":customElements.get(i(s))||n()}}))};export{c as SpwMessage,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as o,h as s,a as i,t as a}from"./index.js";import{a as n,K as r}from"./p-BRFNx2DL.js";import{d}from"./p-D25JsirJ.js";import{d as l}from"./p-CpEwCWpy.js";function c(t,e,o,s=20,i=0){const a=[];if(i>=s)return a;const n=t=>{const a=t.assignedNodes().filter((t=>1===t.nodeType));return a.length>0?c(a[0].parentElement,e,o,s,i+1):[]},r=Array.from(t.children||[]);for(const t of r)e(t)||(o(t)&&a.push(t),null!=t.shadowRoot?a.push(...c(t.shadowRoot,e,o,s,i+1)):"SLOT"===t.tagName?a.push(...n(t)):a.push(...c(t,e,o,s,i+1)));return a}function p(t){return t.hasAttribute("hidden")||t.hasAttribute("aria-hidden")&&"false"!==t.getAttribute("aria-hidden")||"none"===t.style.display||"0"===t.style.opacity||"hidden"===t.style.visibility||"collapse"===t.style.visibility}function h(t){return"-1"!==t.getAttribute("tabindex")&&!p(t)&&!function(t){return t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")}(t)&&(t.hasAttribute("tabindex")||(t instanceof HTMLAnchorElement||t instanceof HTMLAreaElement)&&t.hasAttribute("href")||t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLIFrameElement)}const m=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.spwModalOpen=o(this,"spwModalOpen",7),this.spwModalClose=o(this,"spwModalClose",7),this.opened=!1,this.showModal=this.opened||!1,this.caption="Titre de la modal",this.closeButtonText="Fermer",this.closeOnOverlayClick=!0,this.stickyButtons=!1,this.size="small",this.alertIcon="",this.slotButtonsPresent=!1,this.isCloseButtonSticky=!1,this.showCloseButton=!0,this.focusableElements=[],this.handleClick=t=>{const o=t.composedPath().find((t=>{var o;return t instanceof e&&(null===(o=t.hasAttribute)||void 0===o?void 0:o.call(t,"data-modal-trigger"))}));o&&o.getAttribute("data-modal-trigger")===this.hostElement.id&&(this.opened=!0)},this.handleClose=t=>{const o=t.composedPath().find((t=>{var o;return t instanceof e&&(null===(o=t.hasAttribute)||void 0===o?void 0:o.call(t,"data-modal-close"))}));o&&o.getAttribute("data-modal-close")===this.hostElement.id&&(this.opened=!1)},this.handleBottomFocus=()=>{this.attemptFocus(this.getFirstFocusableElement())},this.handleKeypress=t=>{this.showModal&&"Escape"===t.key&&this.doBeforeClose("ESCAPE_KEY")},this.handleContentScroll=()=>{this.modalContent&&(this.isCloseButtonSticky=this.modalContent.scrollTop>=60)}}async closeModal(){this.doBeforeClose("PROGRAMMATIC")}async openModal(){this.opened=!0}componentDidLoad(){this.focusableElements=c(this.hostElement.shadowRoot,(t=>p(t)||t.matches("[data-focus-trap-edge]")),h),window.addEventListener("click",this.handleClick,{capture:!0}),window.addEventListener("click",this.handleClose,{capture:!0}),window.addEventListener("keydown",this.handleKeypress)}disconnectedCallback(){window.removeEventListener("click",this.handleClick),window.removeEventListener("click",this.handleClose),window.removeEventListener("keydown",this.handleKeypress)}getFirstFocusableElement(){return this.focusableElements[0]}attemptFocus(t){null!=t?setTimeout((()=>{t.focus()}),0):setTimeout((()=>{this.closeButton.focus()}))}open(){this.showModal=!0,this.isCloseButtonSticky=!1,requestAnimationFrame((()=>{this.modalContent&&(this.modalContent.scrollTop=0)}));try{n(this.modalContainer,r.fadeIn,{duration:200}).addEventListener("finish",(()=>{setTimeout((()=>{}),0),this.spwModalOpen.emit()}))}catch(t){this.spwModalOpen.emit()}}close(){this.stopAllVideos();try{n(this.modalContainer,r.fadeOut,{duration:200}).addEventListener("finish",(()=>{this.showModal=!1,this.spwModalClose.emit()}))}catch(t){this.showModal=!1,this.spwModalClose.emit()}}stopAllVideos(){this.hostElement.querySelectorAll("iframe").forEach((t=>{t.src=t.src}))}doBeforeClose(t){const e=[];e.push(t),e.some((t=>t.defaultPrevented))||(this.opened=!1)}openedChanged(t){!0===t?this.open():this.close()}handleOverlayClick(){this.closeOnOverlayClick&&this.doBeforeClose("BACKDROP")}get elementClass(){return{"spw-modal":!0,"spw-modal--opened":this.showModal,"spw-modal--sticky-buttons":this.stickyButtons}}render(){return s(i,{key:"4eb87501a9a4cc098250700f58c027e3f3fc13c6"},s("div",{key:"100bc778f67fca4ebc8ca8e1933033a362f94c24",ref:t=>this.modalContainer=t,class:this.elementClass},s("div",{key:"56918adc60d5b97ffd43e66323a4fc28f72c6297",class:"spw-modal__overlay",onClick:()=>this.handleOverlayClick()}),s("div",{key:"65612030c666acfaa5bafccff02b265e2df49408",class:"spw-modal__content-container spw-modal__content-container--"+this.size,role:"dialog","aria-modal":"true","aria-label":this.caption},s("div",{key:"51ce6d5e32a972e6c7c7ff95844c6aab0793a979",class:"spw-modal__content",ref:t=>this.modalContent=t,onScroll:this.handleContentScroll},s("div",{key:"92deb26800d917a018012ae8dab17491fdfade57",class:"spw-modal__header"},s("div",{key:"a96de8538e42a2ef89c2669459a4921bb818ad03",class:"spw-modal__title-container"},this.alertIcon&&s("spw-icon",{key:"4328a281475bb9fb969234010872d83ad7c7db72",class:"spw-modal__alert-icon",icon:this.alertIcon}),s("h2",{key:"7c16016aaaced617feb2cbdddb225c0de07c9294",class:"spw-modal__caption"},this.caption)),this.showCloseButton&&s("div",{key:"3cfd868ed08d69d6eacbc2e2908da0f1ae68236e",class:{"spw-modal__close-button":!0,"spw-modal__close-button--sticky":this.isCloseButtonSticky},ref:t=>this.closeButton=t,onClick:()=>this.doBeforeClose("CLOSE_BUTTON")},s("spw-link",{key:"36577f9858f3eaa116b41af3e2654b6a0d803fe5","icon-position":"right",icon:"fa-xmark"},this.closeButtonText))),s("div",{key:"f1fae039840a285805410fee667a4e5c53d441ea",class:"spw-modal__body"},s("slot",{key:"199cc1dfa3507fee34d5a86f90c35948ad656549",name:"content"})),s("div",{key:"83bfe6dfccb359f373c3e0b7080893a716eb6812",class:{"spw-modal__buttons":!0,"spw-modal__footer--buttons-present":this.slotButtonsPresent}},s("slot",{key:"7bc4e5745527068f0cc6eb2bfedc7440e99a0199",name:"buttons",onSlotchange:t=>{this.slotButtonsPresent=t.target.assignedNodes({flatten:!0}).length>0}})))),s("div",{key:"57d4de3c3d2d5769b14388d16c30471091007af0","data-focus-trap-edge":!0,onFocus:this.handleBottomFocus,tabindex:"0"})))}get hostElement(){return this}static get watchers(){return{opened:[{openedChanged:0}]}}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:contents}.spw-modal{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1060;overflow-y:auto}.spw-modal::-webkit-scrollbar{width:14px;height:14px}.spw-modal::-webkit-scrollbar-thumb{background:var(--spw-color-themes-grey-grey-400);border-radius:20px;border:4px solid var(--spw-ds-white)}.spw-modal::-webkit-scrollbar-track{background:var(--spw-ds-white)}.spw-modal{scrollbar-face-color:var(--spw-color-themes-grey-grey-400);scrollbar-track-color:var(--spw-ds-white)}.spw-modal--opened{display:flex}.spw-modal__overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:black;opacity:0.7;z-index:0}.spw-modal__content-container{position:absolute;display:flex;justify-content:center;width:90%;background-color:#fff;box-shadow:var(--spw-effect-elevation-6);overflow:hidden;box-sizing:border-box;align-items:stretch;border-radius:var(--spw-spacings-border-radius-lg)}.spw-modal__content-container--small{max-width:480px}.spw-modal__content-container--medium{max-width:600px}.spw-modal__content-container--large{max-width:768px}.spw-modal__content-container--fluid{max-width:100%}.spw-modal__content{display:flex;flex-direction:column;border:1px solid var(--spw-color-themes-grey-grey-300);width:100%;max-height:90vh;overflow-y:auto}.spw-modal__content::-webkit-scrollbar{width:14px;height:14px}.spw-modal__content::-webkit-scrollbar-thumb{background:var(--spw-color-themes-grey-grey-400);border-radius:20px;border:4px solid var(--spw-ds-white)}.spw-modal__content::-webkit-scrollbar-track{background:var(--spw-ds-white)}.spw-modal__content{scrollbar-face-color:var(--spw-color-themes-grey-grey-400);scrollbar-track-color:var(--spw-ds-white)}.spw-modal--sticky-buttons .spw-modal__content{overflow-y:visible}.spw-modal__icon-container{display:flex;align-items:center;justify-content:center;width:32px;background-color:#fff;align-self:stretch}.spw-modal__header{display:flex;justify-content:space-between;align-items:baseline;padding:24px;padding-bottom:0;margin-top:6px;gap:12px;flex-wrap:nowrap;margin-bottom:12px;box-sizing:border-box;border-radius:1px 1px 0px 0px;color:var(--spw-colors-support-grey-grey-900)}.spw-modal__title-container{display:flex;gap:8px}.spw-modal__alert-icon{flex-shrink:0;line-height:1.5}.spw-modal__caption{overflow:hidden;white-space:pre-wrap;word-wrap:break-word}.spw-modal__header h2{margin:0;font-size:18px;color:var(--spw-colors-support-grey-grey-900)}.spw-modal__header button{background:none;border:none;font-size:1.5em;padding:0;cursor:pointer}.spw-modal__close-button{cursor:pointer;z-index:999;font-size:14px;display:inline-flex;align-items:center;flex-wrap:nowrap;justify-content:center;background:white;padding:3px 6px;margin-bottom:1px}.spw-modal__close-button spw-link{--spw-link-color:var(--spw-colors-support-grey-grey-900);--spw-link-wrap:nowrap}.spw-modal__close-button--sticky{position:absolute;top:0;right:0;border-radius:0 0 0 4px;padding:8px;border-bottom:1px solid var(--spw-colors-support-grey-grey-300);border-left:1px solid var(--spw-colors-support-grey-grey-300)}.spw-modal__close-button--sticky spw-link{font-size:14px}.spw-modal__body{padding:0 24px;margin-bottom:12px;box-sizing:border-box;flex:1;font-size:16px;color:var(--spw-colors-support-grey-grey-700)}.spw-modal--sticky-buttons .spw-modal__body{overflow-y:auto}.spw-modal--sticky-buttons .spw-modal__body::-webkit-scrollbar{width:14px;height:14px}.spw-modal--sticky-buttons .spw-modal__body::-webkit-scrollbar-thumb{background:var(--spw-color-themes-grey-grey-400);border-radius:20px;border:4px solid var(--spw-ds-white)}.spw-modal--sticky-buttons .spw-modal__body::-webkit-scrollbar-track{background:var(--spw-ds-white)}.spw-modal--sticky-buttons .spw-modal__body{scrollbar-face-color:var(--spw-color-themes-grey-grey-400);scrollbar-track-color:var(--spw-ds-white)}.spw-modal__buttons{padding-top:12px}.spw-modal__buttons ::slotted([slot=buttons]){padding:24px;padding-top:0}@media (min-width: 768px){.spw-modal__footer--buttons-present ::slotted(*){display:flex;justify-content:flex-end;gap:12px}}.spw-modal__footer--buttons-present ::slotted(*){padding:24px;padding-top:8px}.spw-modal__border{display:flex;align-items:center;justify-content:center;width:100%;font-size:1.5em;flex-grow:1}"}},[257,"spw-modal",{opened:[1540],caption:[1],closeButtonText:[1,"close-button-text"],closeOnOverlayClick:[4,"close-on-overlay-click"],stickyButtons:[4,"sticky-buttons"],size:[1],alertIcon:[1,"alert-icon"],showCloseButton:[4,"show-close-button"],showModal:[32],slotButtonsPresent:[32],isCloseButtonSticky:[32],closeModal:[64],openModal:[64]},void 0,{opened:[{openedChanged:0}]}]),w=m,b=function(){"undefined"!=typeof customElements&&["spw-modal","spw-icon","spw-link"].forEach((t=>{switch(t){case"spw-modal":customElements.get(a(t))||customElements.define(a(t),m);break;case"spw-icon":customElements.get(a(t))||d();break;case"spw-link":customElements.get(a(t))||l()}}))};export{w as SpwModal,b as defineCustomElement}
|
|
1
|
+
import{p as t,H as e,c as o,h as s,a as i,t as a}from"./index.js";import{q as n,i as r,a as d}from"./p-Hi4pwfHU.js";import{a as l,K as p}from"./p-BRFNx2DL.js";import{d as c}from"./p-D25JsirJ.js";import{d as h}from"./p-BIUq0sDZ.js";const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.spwModalOpen=o(this,"spwModalOpen",7),this.spwModalClose=o(this,"spwModalClose",7),this.opened=!1,this.showModal=this.opened||!1,this.caption="Titre de la modal",this.closeButtonText="Fermer",this.closeOnOverlayClick=!0,this.stickyButtons=!1,this.size="small",this.alertIcon="",this.slotButtonsPresent=!1,this.isCloseButtonSticky=!1,this.showCloseButton=!0,this.focusableElements=[],this.handleClick=t=>{const o=t.composedPath().find((t=>{var o;return t instanceof e&&(null===(o=t.hasAttribute)||void 0===o?void 0:o.call(t,"data-modal-trigger"))}));o&&o.getAttribute("data-modal-trigger")===this.hostElement.id&&(this.opened=!0)},this.handleClose=t=>{const o=t.composedPath().find((t=>{var o;return t instanceof e&&(null===(o=t.hasAttribute)||void 0===o?void 0:o.call(t,"data-modal-close"))}));o&&o.getAttribute("data-modal-close")===this.hostElement.id&&(this.opened=!1)},this.handleBottomFocus=()=>{this.attemptFocus(this.getFirstFocusableElement())},this.handleKeypress=t=>{this.showModal&&"Escape"===t.key&&this.doBeforeClose("ESCAPE_KEY")},this.handleContentScroll=()=>{this.modalContent&&(this.isCloseButtonSticky=this.modalContent.scrollTop>=60)}}async closeModal(){this.doBeforeClose("PROGRAMMATIC")}async openModal(){this.opened=!0}componentDidLoad(){this.focusableElements=n(this.hostElement.shadowRoot,(t=>d(t)||t.matches("[data-focus-trap-edge]")),r),window.addEventListener("click",this.handleClick,{capture:!0}),window.addEventListener("click",this.handleClose,{capture:!0}),window.addEventListener("keydown",this.handleKeypress)}disconnectedCallback(){window.removeEventListener("click",this.handleClick),window.removeEventListener("click",this.handleClose),window.removeEventListener("keydown",this.handleKeypress)}getFirstFocusableElement(){return this.focusableElements[0]}attemptFocus(t){null!=t?setTimeout((()=>{t.focus()}),0):setTimeout((()=>{this.closeButton.focus()}))}open(){this.showModal=!0,this.isCloseButtonSticky=!1,requestAnimationFrame((()=>{this.modalContent&&(this.modalContent.scrollTop=0)}));try{l(this.modalContainer,p.fadeIn,{duration:200}).addEventListener("finish",(()=>{setTimeout((()=>{}),0),this.spwModalOpen.emit()}))}catch(t){this.spwModalOpen.emit()}}close(){this.stopAllVideos();try{l(this.modalContainer,p.fadeOut,{duration:200}).addEventListener("finish",(()=>{this.showModal=!1,this.spwModalClose.emit()}))}catch(t){this.showModal=!1,this.spwModalClose.emit()}}stopAllVideos(){this.hostElement.querySelectorAll("iframe").forEach((t=>{t.src=t.src}))}doBeforeClose(t){const e=[];e.push(t),e.some((t=>t.defaultPrevented))||(this.opened=!1)}openedChanged(t){!0===t?this.open():this.close()}handleOverlayClick(){this.closeOnOverlayClick&&this.doBeforeClose("BACKDROP")}get elementClass(){return{"spw-modal":!0,"spw-modal--opened":this.showModal,"spw-modal--sticky-buttons":this.stickyButtons}}render(){return s(i,{key:"5783546cabdc29859fc8857a8b6584307dea8034"},s("div",{key:"e049c201224981bd8ca6c0ea569ac366151a2069",ref:t=>this.modalContainer=t,class:this.elementClass},s("div",{key:"8eeae2bb07aa4692af17f04ce6c2d853bca1eeb0",class:"spw-modal__overlay",onClick:()=>this.handleOverlayClick()}),s("div",{key:"0b02ef0ce04c90102422107167bcdaef674a7da6",class:"spw-modal__content-container spw-modal__content-container--"+this.size,role:"dialog","aria-modal":"true","aria-label":this.caption},s("div",{key:"4c27d5849b164346edac080764e4b984f9f9d394",class:"spw-modal__content",ref:t=>this.modalContent=t,onScroll:this.handleContentScroll},s("div",{key:"e525b84075a0a44c33a1c31ede49ff987332f5b6",class:"spw-modal__header"},s("div",{key:"239abf670b350d012deed52efb83e69f22ee6faa",class:"spw-modal__title-container"},this.alertIcon&&s("spw-icon",{key:"610be34361e6a313ed771adf6517fa7208b0cfb9",class:"spw-modal__alert-icon",icon:this.alertIcon}),s("h2",{key:"fa6f9c9b3b1c01a3e75baf45337555347a8d1d18",class:"spw-modal__caption"},this.caption)),this.showCloseButton&&s("div",{key:"3dcee8e7206b47acc0ff0b81ea89908bff451055",class:{"spw-modal__close-button":!0,"spw-modal__close-button--sticky":this.isCloseButtonSticky},ref:t=>this.closeButton=t,onClick:()=>this.doBeforeClose("CLOSE_BUTTON")},s("spw-link",{key:"526f1492505ac141c11132670c35cd51e0f6d032","icon-position":"right",icon:"fa-xmark"},this.closeButtonText))),s("div",{key:"7f6f03207f61a7037093ba35f730c4cf125e29e3",class:"spw-modal__body"},s("slot",{key:"e6987b3bcd9c09f439d1221db2be0c7826fa71b9",name:"content"})),s("div",{key:"f23b0b1e37232965601f9d24a5b470fa74ce657f",class:{"spw-modal__buttons":!0,"spw-modal__footer--buttons-present":this.slotButtonsPresent}},s("slot",{key:"30343011e92756c308f37580c01640438f925fe9",name:"buttons",onSlotchange:t=>{this.slotButtonsPresent=t.target.assignedNodes({flatten:!0}).length>0}})))),s("div",{key:"de3f003aac5e85fcacb15f4a3c8976f776ca2bed","data-focus-trap-edge":!0,onFocus:this.handleBottomFocus,tabindex:"0"})))}get hostElement(){return this}static get watchers(){return{opened:[{openedChanged:0}]}}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:contents}.spw-modal{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1060;overflow-y:auto}.spw-modal::-webkit-scrollbar{width:14px;height:14px}.spw-modal::-webkit-scrollbar-thumb{background:var(--spw-color-themes-grey-grey-400);border-radius:20px;border:4px solid var(--spw-ds-white)}.spw-modal::-webkit-scrollbar-track{background:var(--spw-ds-white)}.spw-modal{scrollbar-face-color:var(--spw-color-themes-grey-grey-400);scrollbar-track-color:var(--spw-ds-white)}.spw-modal--opened{display:flex}.spw-modal__overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:black;opacity:0.7;z-index:0}.spw-modal__content-container{position:absolute;display:flex;justify-content:center;width:90%;background-color:#fff;box-shadow:var(--spw-effect-elevation-6);overflow:hidden;box-sizing:border-box;align-items:stretch;border-radius:var(--spw-spacings-border-radius-lg)}.spw-modal__content-container--small{max-width:480px}.spw-modal__content-container--medium{max-width:600px}.spw-modal__content-container--large{max-width:768px}.spw-modal__content-container--fluid{max-width:100%}.spw-modal__content{display:flex;flex-direction:column;border:1px solid var(--spw-color-themes-grey-grey-300);width:100%;max-height:90vh;overflow-y:auto}.spw-modal__content::-webkit-scrollbar{width:14px;height:14px}.spw-modal__content::-webkit-scrollbar-thumb{background:var(--spw-color-themes-grey-grey-400);border-radius:20px;border:4px solid var(--spw-ds-white)}.spw-modal__content::-webkit-scrollbar-track{background:var(--spw-ds-white)}.spw-modal__content{scrollbar-face-color:var(--spw-color-themes-grey-grey-400);scrollbar-track-color:var(--spw-ds-white)}.spw-modal--sticky-buttons .spw-modal__content{overflow-y:visible}.spw-modal__icon-container{display:flex;align-items:center;justify-content:center;width:32px;background-color:#fff;align-self:stretch}.spw-modal__header{display:flex;justify-content:space-between;align-items:baseline;padding:24px;padding-bottom:0;margin-top:6px;gap:12px;flex-wrap:nowrap;margin-bottom:12px;box-sizing:border-box;border-radius:1px 1px 0px 0px;color:var(--spw-colors-support-grey-grey-900)}.spw-modal__title-container{display:flex;gap:8px}.spw-modal__alert-icon{flex-shrink:0;line-height:1.5}.spw-modal__caption{overflow:hidden;white-space:pre-wrap;word-wrap:break-word}.spw-modal__header h2{margin:0;font-size:18px;color:var(--spw-colors-support-grey-grey-900)}.spw-modal__header button{background:none;border:none;font-size:1.5em;padding:0;cursor:pointer}.spw-modal__close-button{cursor:pointer;z-index:999;font-size:14px;display:inline-flex;align-items:center;flex-wrap:nowrap;justify-content:center;background:white;padding:3px 6px;margin-bottom:1px}.spw-modal__close-button spw-link{--spw-link-color:var(--spw-colors-support-grey-grey-900);--spw-link-wrap:nowrap}.spw-modal__close-button--sticky{position:absolute;top:0;right:0;border-radius:0 0 0 4px;padding:8px;border-bottom:1px solid var(--spw-colors-support-grey-grey-300);border-left:1px solid var(--spw-colors-support-grey-grey-300)}.spw-modal__close-button--sticky spw-link{font-size:14px}.spw-modal__body{padding:0 24px;margin-bottom:12px;box-sizing:border-box;flex:1;font-size:16px;color:var(--spw-colors-support-grey-grey-700)}.spw-modal--sticky-buttons .spw-modal__body{overflow-y:auto}.spw-modal--sticky-buttons .spw-modal__body::-webkit-scrollbar{width:14px;height:14px}.spw-modal--sticky-buttons .spw-modal__body::-webkit-scrollbar-thumb{background:var(--spw-color-themes-grey-grey-400);border-radius:20px;border:4px solid var(--spw-ds-white)}.spw-modal--sticky-buttons .spw-modal__body::-webkit-scrollbar-track{background:var(--spw-ds-white)}.spw-modal--sticky-buttons .spw-modal__body{scrollbar-face-color:var(--spw-color-themes-grey-grey-400);scrollbar-track-color:var(--spw-ds-white)}.spw-modal__buttons{padding-top:12px}.spw-modal__buttons ::slotted([slot=buttons]){padding:24px;padding-top:0}@media (min-width: 768px){.spw-modal__footer--buttons-present ::slotted(*){display:flex;justify-content:flex-end;gap:12px}}.spw-modal__footer--buttons-present ::slotted(*){padding:24px;padding-top:8px}.spw-modal__border{display:flex;align-items:center;justify-content:center;width:100%;font-size:1.5em;flex-grow:1}"}},[257,"spw-modal",{opened:[1540],caption:[1],closeButtonText:[1,"close-button-text"],closeOnOverlayClick:[4,"close-on-overlay-click"],stickyButtons:[4,"sticky-buttons"],size:[1],alertIcon:[1,"alert-icon"],showCloseButton:[4,"show-close-button"],showModal:[32],slotButtonsPresent:[32],isCloseButtonSticky:[32],closeModal:[64],openModal:[64]},void 0,{opened:[{openedChanged:0}]}]),w=b,m=function(){"undefined"!=typeof customElements&&["spw-modal","spw-icon","spw-link"].forEach((t=>{switch(t){case"spw-modal":customElements.get(a(t))||customElements.define(a(t),b);break;case"spw-icon":customElements.get(a(t))||c();break;case"spw-link":customElements.get(a(t))||h()}}))};export{w as SpwModal,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,h as e,a as s,t as o}from"./index.js";const a=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.parentColsMobile=1,this.parentColsTablet=2,this.parentColsDesktop=3}componentDidLoad(){var t;null===(t=this.el.closest("spw-mosaic"))||void 0===t||t.addEventListener("mosaicConfigurationChanged",this.handleConfigurationChange.bind(this)),this.applyColSpans()}disconnectedCallback(){var t;null===(t=this.el.closest("spw-mosaic"))||void 0===t||t.removeEventListener("mosaicConfigurationChanged",this.handleConfigurationChange.bind(this))}colSpanChanged(){this.applyColSpans()}handleConfigurationChange(t){const{colsMobile:i,colsTablet:e,colsDesktop:s}=t.detail;this.parentColsMobile=i,this.parentColsTablet=e,this.parentColsDesktop=s,this.applyColSpans()}applyColSpans(){this.el.style.setProperty("--spw-mosaic-item-width-mobile",this.colSpanMobile?`calc(100% / ${this.parentColsMobile} * ${this.colSpanMobile})`:`calc(100% / ${this.parentColsMobile})`),this.el.style.setProperty("--spw-mosaic-item-width-tablet",this.colSpanTablet?`calc(100% / ${this.parentColsTablet} * ${this.colSpanTablet})`:`calc(100% / ${this.parentColsTablet})`),this.el.style.setProperty("--spw-mosaic-item-width-desktop",this.colSpanDesktop?`calc(100% / ${this.parentColsDesktop} * ${this.colSpanDesktop})`:`calc(100% / ${this.parentColsDesktop})`)}render(){return e(s,{key:"
|
|
1
|
+
import{p as t,H as i,h as e,a as s,t as o}from"./index.js";const a=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.parentColsMobile=1,this.parentColsTablet=2,this.parentColsDesktop=3}componentDidLoad(){var t;null===(t=this.el.closest("spw-mosaic"))||void 0===t||t.addEventListener("mosaicConfigurationChanged",this.handleConfigurationChange.bind(this)),this.applyColSpans()}disconnectedCallback(){var t;null===(t=this.el.closest("spw-mosaic"))||void 0===t||t.removeEventListener("mosaicConfigurationChanged",this.handleConfigurationChange.bind(this))}colSpanChanged(){this.applyColSpans()}handleConfigurationChange(t){const{colsMobile:i,colsTablet:e,colsDesktop:s}=t.detail;this.parentColsMobile=i,this.parentColsTablet=e,this.parentColsDesktop=s,this.applyColSpans()}applyColSpans(){this.el.style.setProperty("--spw-mosaic-item-width-mobile",this.colSpanMobile?`calc(100% / ${this.parentColsMobile} * ${this.colSpanMobile})`:`calc(100% / ${this.parentColsMobile})`),this.el.style.setProperty("--spw-mosaic-item-width-tablet",this.colSpanTablet?`calc(100% / ${this.parentColsTablet} * ${this.colSpanTablet})`:`calc(100% / ${this.parentColsTablet})`),this.el.style.setProperty("--spw-mosaic-item-width-desktop",this.colSpanDesktop?`calc(100% / ${this.parentColsDesktop} * ${this.colSpanDesktop})`:`calc(100% / ${this.parentColsDesktop})`)}render(){return e(s,{key:"55b1083355f85c70e914971056b34c62227bfac6"},e("slot",{key:"ef9b988e3690f3a0a05bac85bdab46fa1308d3a8"}))}get el(){return this}static get watchers(){return{colSpanMobile:[{colSpanChanged:0}],colSpanTablet:[{colSpanChanged:0}],colSpanDesktop:[{colSpanChanged:0}]}}static get style(){return'@charset "UTF-8";html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{--spw-mosaic-item-width-mobile:100%;--spw-mosaic-item-width-tablet:100%;--spw-mosaic-item-width-desktop:100%;width:var(--spw-mosaic-item-width-mobile);padding:0 12px !important;margin-bottom:24px !important}@media (min-width: 768px){:host{width:var(--spw-mosaic-item-width-tablet)}}@media (min-width: 1024px){:host{width:var(--spw-mosaic-item-width-desktop)}}.spw-mobile-1{--spw-mosaic-item-width-mobile:calc(100% / 1)}.spw-tablet-1{--spw-mosaic-item-width-tablet:calc(100% / 1)}.spw-desktop-1{--spw-mosaic-item-width-desktop:calc(100% / 1)}.spw-mobile-2{--spw-mosaic-item-width-mobile:calc(100% / 2)}.spw-tablet-2{--spw-mosaic-item-width-tablet:calc(100% / 2)}.spw-desktop-2{--spw-mosaic-item-width-desktop:calc(100% / 2)}.spw-mobile-3{--spw-mosaic-item-width-mobile:calc(100% / 3)}.spw-tablet-3{--spw-mosaic-item-width-tablet:calc(100% / 3)}.spw-desktop-3{--spw-mosaic-item-width-desktop:calc(100% / 3)}.spw-mobile-4{--spw-mosaic-item-width-mobile:calc(100% / 4)}.spw-tablet-4{--spw-mosaic-item-width-tablet:calc(100% / 4)}.spw-desktop-4{--spw-mosaic-item-width-desktop:calc(100% / 4)}.spw-mobile-5{--spw-mosaic-item-width-mobile:calc(100% / 5)}.spw-tablet-5{--spw-mosaic-item-width-tablet:calc(100% / 5)}.spw-desktop-5{--spw-mosaic-item-width-desktop:calc(100% / 5)}.spw-mobile-6{--spw-mosaic-item-width-mobile:calc(100% / 6)}.spw-tablet-6{--spw-mosaic-item-width-tablet:calc(100% / 6)}.spw-desktop-6{--spw-mosaic-item-width-desktop:calc(100% / 6)}.spw-mobile-7{--spw-mosaic-item-width-mobile:calc(100% / 7)}.spw-tablet-7{--spw-mosaic-item-width-tablet:calc(100% / 7)}.spw-desktop-7{--spw-mosaic-item-width-desktop:calc(100% / 7)}.spw-mobile-8{--spw-mosaic-item-width-mobile:calc(100% / 8)}.spw-tablet-8{--spw-mosaic-item-width-tablet:calc(100% / 8)}.spw-desktop-8{--spw-mosaic-item-width-desktop:calc(100% / 8)}.spw-mobile-9{--spw-mosaic-item-width-mobile:calc(100% / 9)}.spw-tablet-9{--spw-mosaic-item-width-tablet:calc(100% / 9)}.spw-desktop-9{--spw-mosaic-item-width-desktop:calc(100% / 9)}.spw-mobile-10{--spw-mosaic-item-width-mobile:calc(100% / 10)}.spw-tablet-10{--spw-mosaic-item-width-tablet:calc(100% / 10)}.spw-desktop-10{--spw-mosaic-item-width-desktop:calc(100% / 10)}.spw-mobile-11{--spw-mosaic-item-width-mobile:calc(100% / 11)}.spw-tablet-11{--spw-mosaic-item-width-tablet:calc(100% / 11)}.spw-desktop-11{--spw-mosaic-item-width-desktop:calc(100% / 11)}.spw-mobile-12{--spw-mosaic-item-width-mobile:calc(100% / 12)}.spw-tablet-12{--spw-mosaic-item-width-tablet:calc(100% / 12)}.spw-desktop-12{--spw-mosaic-item-width-desktop:calc(100% / 12)}'}},[257,"spw-mosaic-item",{colSpanMobile:[2,"col-span-mobile"],colSpanTablet:[2,"col-span-tablet"],colSpanDesktop:[2,"col-span-desktop"]},void 0,{colSpanMobile:[{colSpanChanged:0}],colSpanTablet:[{colSpanChanged:0}],colSpanDesktop:[{colSpanChanged:0}]}]),p=a,c=function(){"undefined"!=typeof customElements&&["spw-mosaic-item"].forEach((t=>{"spw-mosaic-item"===t&&(customElements.get(o(t))||customElements.define(o(t),a))}))};export{p as SpwMosaicItem,c as defineCustomElement}
|
|
@@ -15,4 +15,4 @@ import{p as t,H as i,h as n,a as s,t as o}from"./index.js";import{g as e}from"./
|
|
|
15
15
|
* https://masonry.desandro.com
|
|
16
16
|
* MIT License
|
|
17
17
|
* by David DeSandro
|
|
18
|
-
*/var L=(M||(M=1,function(t){!function(i,n){t.exports?t.exports=n(T(),p()):i.Masonry=n(i.Outlayer,i.getSize)}(window,(function(t,i){var n=t.create("masonry");n.compatOptions.fitWidth="isFitWidth";var s=n.prototype;return s._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},s.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],n=t&&t.element;this.columnWidth=n&&i(n).outerWidth||this.containerWidth}var s=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,e=o/s,r=s-o%s;e=Math[r&&r<1?"round":"floor"](e),this.cols=Math.max(e,1)},s.getContainerWidth=function(){var t=this._getOption("fitWidth"),n=i(t?this.element.parentNode:this.element);this.containerWidth=n&&n.innerWidth},s._getItemLayoutPosition=function(t){t.getSize();for(var i=t.size.outerWidth%this.columnWidth,n=Math[i&&i<1?"round":"ceil"](t.size.outerWidth/this.columnWidth),s=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](n=Math.min(n,this.cols),t),o={x:this.columnWidth*s.col,y:s.y},e=s.y+t.size.outerHeight,r=n+s.col,h=s.col;h<r;h++)this.colYs[h]=e;return o},s._getTopColPosition=function(t){var i=this._getTopColGroup(t),n=Math.min.apply(Math,i);return{col:i.indexOf(n),y:n}},s._getTopColGroup=function(t){if(t<2)return this.colYs;for(var i=[],n=this.cols+1-t,s=0;s<n;s++)i[s]=this._getColGroupY(s,t);return i},s._getColGroupY=function(t,i){if(i<2)return this.colYs[t];var n=this.colYs.slice(t,t+i);return Math.max.apply(Math,n)},s._getHorizontalColPosition=function(t,i){var n=this.horizontalColIndex%this.cols;return n=t>1&&n+t>this.cols?0:n,this.horizontalColIndex=i.size.outerWidth&&i.size.outerHeight?n+t:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,t)}},s._manageStamp=function(t){var n=i(t),s=this._getElementOffset(t),o=this._getOption("originLeft")?s.left:s.right,e=o+n.outerWidth,r=Math.floor(o/this.columnWidth);r=Math.max(0,r);var h=Math.floor(e/this.columnWidth);h=Math.min(this.cols-1,h-=e%this.columnWidth?0:1);for(var a=(this._getOption("originTop")?s.top:s.bottom)+n.outerHeight,u=r;u<=h;u++)this.colYs[u]=Math.max(a,this.colYs[u])},s._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},s._getContainerFitWidth=function(){for(var t=0,i=this.cols;--i&&0===this.colYs[i];)t++;return(this.cols-t)*this.columnWidth-this.gutter},s.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},n}))}(h)),h.exports),D=e(L);const W=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.isMasonry=!1,this.colsMobile=1,this.colsTablet=2,this.colsDesktop=3,this.initialized=!1}itemsChanged(t,i){t!==i&&this.isMasonry&&this.refreshMasonryLayout()}isMasonryChanged(t){t?this.initializeMasonry():this.destroyMasonry()}async waitForImages(){const t=this.el.shadowRoot.querySelectorAll("img"),i=Array.from(t).map((t=>new Promise((i=>{t.complete?i():t.addEventListener("load",(()=>i()),{once:!0})}))));await Promise.all(i)}emitConfigurationChanged(){const t=new CustomEvent("mosaicConfigurationChanged",{detail:{colsMobile:this.colsMobile,colsTablet:this.colsTablet,colsDesktop:this.colsDesktop},bubbles:!0,composed:!0});this.el.dispatchEvent(t)}configurationChanged(){this.emitConfigurationChanged()}async refreshMasonryLayout(){this.isMasonry&&(await this.waitForImages(),this.initializeMasonry())}componentDidLoad(){this.isMasonry&&this.initializeMasonry(),this.observeSlotChanges(),this.emitConfigurationChanged()}componentDidUpdate(){this.isMasonry&&this.refreshMasonryLayout()}disconnectedCallback(){this.destroyMasonry(),this.observer&&this.observer.disconnect()}async initializeMasonry(){this.isMasonry&&requestAnimationFrame((()=>{const t=this.el.shadowRoot.querySelector("slot").assignedElements({flatten:!0});if(t.length>0){const i=Array.from(t).find((t=>!t.hasAttribute("col-span-desktop")&&!t.hasAttribute("col-span-tablet")&&!t.hasAttribute("col-span-mobile")))||t[0];this.masonry=new D(this.el,{itemSelector:"spw-mosaic-item",columnWidth:i,percentPosition:!0,gutter:0}),this.initialized=!0,t.forEach((t=>{t.querySelectorAll("img").forEach((t=>{t.complete||t.addEventListener("load",this.updateMasonryLayout.bind(this),{once:!0})}))}))}}))}updateMasonryLayout(){this.masonry&&this.initialized&&this.isMasonry&&this.masonry.layout()}destroyMasonry(){this.masonry&&(this.masonry.destroy(),this.masonry=null,this.initialized=!1)}observeSlotChanges(){const t=this.el.shadowRoot.querySelector("slot");this.observer=new MutationObserver((t=>{for(const i of t)"childList"===i.type&&this.initialized&&this.isMasonry&&this.initializeMasonry()})),this.observer.observe(t,{childList:!0})}get elementClass(){return{"spw-mosaic":!0,"spw-mosaic--no-masonry":!this.isMasonry}}render(){return n(s,{key:"
|
|
18
|
+
*/var L=(M||(M=1,function(t){!function(i,n){t.exports?t.exports=n(T(),p()):i.Masonry=n(i.Outlayer,i.getSize)}(window,(function(t,i){var n=t.create("masonry");n.compatOptions.fitWidth="isFitWidth";var s=n.prototype;return s._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},s.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],n=t&&t.element;this.columnWidth=n&&i(n).outerWidth||this.containerWidth}var s=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,e=o/s,r=s-o%s;e=Math[r&&r<1?"round":"floor"](e),this.cols=Math.max(e,1)},s.getContainerWidth=function(){var t=this._getOption("fitWidth"),n=i(t?this.element.parentNode:this.element);this.containerWidth=n&&n.innerWidth},s._getItemLayoutPosition=function(t){t.getSize();for(var i=t.size.outerWidth%this.columnWidth,n=Math[i&&i<1?"round":"ceil"](t.size.outerWidth/this.columnWidth),s=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](n=Math.min(n,this.cols),t),o={x:this.columnWidth*s.col,y:s.y},e=s.y+t.size.outerHeight,r=n+s.col,h=s.col;h<r;h++)this.colYs[h]=e;return o},s._getTopColPosition=function(t){var i=this._getTopColGroup(t),n=Math.min.apply(Math,i);return{col:i.indexOf(n),y:n}},s._getTopColGroup=function(t){if(t<2)return this.colYs;for(var i=[],n=this.cols+1-t,s=0;s<n;s++)i[s]=this._getColGroupY(s,t);return i},s._getColGroupY=function(t,i){if(i<2)return this.colYs[t];var n=this.colYs.slice(t,t+i);return Math.max.apply(Math,n)},s._getHorizontalColPosition=function(t,i){var n=this.horizontalColIndex%this.cols;return n=t>1&&n+t>this.cols?0:n,this.horizontalColIndex=i.size.outerWidth&&i.size.outerHeight?n+t:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,t)}},s._manageStamp=function(t){var n=i(t),s=this._getElementOffset(t),o=this._getOption("originLeft")?s.left:s.right,e=o+n.outerWidth,r=Math.floor(o/this.columnWidth);r=Math.max(0,r);var h=Math.floor(e/this.columnWidth);h=Math.min(this.cols-1,h-=e%this.columnWidth?0:1);for(var a=(this._getOption("originTop")?s.top:s.bottom)+n.outerHeight,u=r;u<=h;u++)this.colYs[u]=Math.max(a,this.colYs[u])},s._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},s._getContainerFitWidth=function(){for(var t=0,i=this.cols;--i&&0===this.colYs[i];)t++;return(this.cols-t)*this.columnWidth-this.gutter},s.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},n}))}(h)),h.exports),D=e(L);const W=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.isMasonry=!1,this.colsMobile=1,this.colsTablet=2,this.colsDesktop=3,this.initialized=!1}itemsChanged(t,i){t!==i&&this.isMasonry&&this.refreshMasonryLayout()}isMasonryChanged(t){t?this.initializeMasonry():this.destroyMasonry()}async waitForImages(){const t=this.el.shadowRoot.querySelectorAll("img"),i=Array.from(t).map((t=>new Promise((i=>{t.complete?i():t.addEventListener("load",(()=>i()),{once:!0})}))));await Promise.all(i)}emitConfigurationChanged(){const t=new CustomEvent("mosaicConfigurationChanged",{detail:{colsMobile:this.colsMobile,colsTablet:this.colsTablet,colsDesktop:this.colsDesktop},bubbles:!0,composed:!0});this.el.dispatchEvent(t)}configurationChanged(){this.emitConfigurationChanged()}async refreshMasonryLayout(){this.isMasonry&&(await this.waitForImages(),this.initializeMasonry())}componentDidLoad(){this.isMasonry&&this.initializeMasonry(),this.observeSlotChanges(),this.emitConfigurationChanged()}componentDidUpdate(){this.isMasonry&&this.refreshMasonryLayout()}disconnectedCallback(){this.destroyMasonry(),this.observer&&this.observer.disconnect()}async initializeMasonry(){this.isMasonry&&requestAnimationFrame((()=>{const t=this.el.shadowRoot.querySelector("slot").assignedElements({flatten:!0});if(t.length>0){const i=Array.from(t).find((t=>!t.hasAttribute("col-span-desktop")&&!t.hasAttribute("col-span-tablet")&&!t.hasAttribute("col-span-mobile")))||t[0];this.masonry=new D(this.el,{itemSelector:"spw-mosaic-item",columnWidth:i,percentPosition:!0,gutter:0}),this.initialized=!0,t.forEach((t=>{t.querySelectorAll("img").forEach((t=>{t.complete||t.addEventListener("load",this.updateMasonryLayout.bind(this),{once:!0})}))}))}}))}updateMasonryLayout(){this.masonry&&this.initialized&&this.isMasonry&&this.masonry.layout()}destroyMasonry(){this.masonry&&(this.masonry.destroy(),this.masonry=null,this.initialized=!1)}observeSlotChanges(){const t=this.el.shadowRoot.querySelector("slot");this.observer=new MutationObserver((t=>{for(const i of t)"childList"===i.type&&this.initialized&&this.isMasonry&&this.initializeMasonry()})),this.observer.observe(t,{childList:!0})}get elementClass(){return{"spw-mosaic":!0,"spw-mosaic--no-masonry":!this.isMasonry}}render(){return n(s,{key:"f991879356e9610ba95b0290caeebaeca3d14f54"},n("div",{key:"cb083ad301ece01030eec5222624076bb7ef0ee1",class:this.elementClass},n("slot",{key:"1454049e238c902a3d87e766cc6002b5b47f8221"})))}get el(){return this}static get watchers(){return{items:[{itemsChanged:0}],isMasonry:[{isMasonryChanged:0}],colsMobile:[{configurationChanged:0}],colsTablet:[{configurationChanged:0}],colsDesktop:[{configurationChanged:0}]}}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-mosaic{margin:0 -12px}.spw-mosaic--no-masonry{display:flex;flex-wrap:wrap}"}},[257,"spw-mosaic",{items:[8],isMasonry:[4,"is-masonry"],colsMobile:[2,"cols-mobile"],colsTablet:[2,"cols-tablet"],colsDesktop:[2,"cols-desktop"],initialized:[32],waitForImages:[64],initializeMasonry:[64]},void 0,{items:[{itemsChanged:0}],isMasonry:[{isMasonryChanged:0}],colsMobile:[{configurationChanged:0}],colsTablet:[{configurationChanged:0}],colsDesktop:[{configurationChanged:0}]}]),E=W,F=function(){"undefined"!=typeof customElements&&["spw-mosaic"].forEach((t=>{"spw-mosaic"===t&&(customElements.get(o(t))||customElements.define(o(t),W))}))};export{E as SpwMosaic,F as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as i,h as a,F as s,a as n,t as o}from"./index.js";import{d as p}from"./p-8xeU5Cgf.js";import{d as l}from"./p-BfL5TYdu.js";import{d as r}from"./p-D25JsirJ.js";import{d}from"./p-iaJkP4uN.js";import{d as c}from"./p-CbTDFlzJ.js";const g=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pageChanged=i(this,"pageChanged",7),this.isDisabled=!1,this.variant="numbers",this.currentPage=1,this.nextButtonText="Suivant",this.previousButtonText="Précédent",this.isDynamic=!0,this.inputPageValue="",this.isMobile=window.innerWidth<800,this.updateIsMobile=()=>{this.isMobile=window.innerWidth<800}}componentWillLoad(){this.calculateTotalPages(),this.inputPageValue=""+this.currentPage,window.addEventListener("resize",this.updateIsMobile)}disconnectedCallback(){window.removeEventListener("resize",this.updateIsMobile)}calculateTotalPages(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)}onCurrentPageChange(e){this.inputPageValue=""+e}onItemsPerPageChange(){this.currentPage=1,this.pageChanged.emit(this.currentPage)}onTotalItemsChange(){if(!this.totalItems||this.totalItems<=0)return;const e=Math.ceil(this.totalItems/this.itemsPerPage);this.currentPage>e&&(this.currentPage=e,this.pageChanged.emit(this.currentPage))}async setPage(e){this.goToPage(e)}goToPage(e){e!==this.currentPage&&!this.isDisabled&&e>=1&&e<=this.totalPages&&(this.isDynamic&&(this.currentPage=e),this.pageChanged.emit(e))}handleInputChange(e){const t=e.target.value;this.inputPageValue=t;const i=parseInt(t,10);!isNaN(i)&&i>=1&&i<=this.totalPages&&(clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.goToPage(i)}),500))}getPaginationClass(){var e,t;const i=this.calculatePageRange(),a=i.filter((({page:e})=>"..."===e)).length,s=a>0&&"..."===(null===(e=i[1])||void 0===e?void 0:e.page),n=a>0&&"..."===(null===(t=i[i.length-2])||void 0===t?void 0:t.page);let o=`spw-pagination spw-pagination--${this.currentPage} spw-pagination--total-${this.totalPages}`;return 2===a?o+=" spw-pagination--double-ellipsis":s?o+=" spw-pagination--ellipsis-start":n&&(o+=" spw-pagination--ellipsis-end"),o}handleKeyDown(e){if("Enter"===e.key){const e=parseInt(this.inputPageValue,10);isNaN(e)||this.goToPage(e)}}calculatePageRange(){const e=[],{currentPage:t,totalPages:i,isMobile:a}=this;if(a)if(i<=5)for(let t=1;t<=i;t++)e.push({page:t,class:"spw-pagination__item--small-range"});else if(t<=3){for(let t=1;t<=3;t++)e.push({page:t,class:"spw-pagination__item--start-range"});e.push({page:"...",class:"spw-pagination__item--ellipsis"}),e.push({page:i,class:"spw-pagination__item--end"})}else if(t>=i-2){e.push({page:1,class:"spw-pagination__item--start"}),e.push({page:"...",class:"spw-pagination__item--ellipsis"});for(let t=i-2;t<=i;t++)e.push({page:t,class:"spw-pagination__item--end-range"})}else{e.push({page:1,class:"spw-pagination__item--start"}),e.push({page:"...",class:"spw-pagination__item--ellipsis"});for(let i=t-1;i<=t+1;i++)e.push({page:i,class:"spw-pagination__item--middle-range"});e.push({page:"...",class:"spw-pagination__item--ellipsis"}),e.push({page:i,class:"spw-pagination__item--end"})}else if(i<=7)for(let t=1;t<=i;t++)e.push({page:t,class:"spw-pagination__item--small-range"});else if(t<=4){for(let t=1;t<=4;t++)e.push({page:t,class:"spw-pagination__item--start-range"});e.push({page:"...",class:"spw-pagination__item--ellipsis"}),e.push({page:i,class:"spw-pagination__item--end"})}else if(t>=i-3){e.push({page:1,class:"spw-pagination__item--start"}),e.push({page:"...",class:"spw-pagination__item--ellipsis"});for(let t=i-3;t<=i;t++)e.push({page:t,class:"spw-pagination__item--end-range"})}else{e.push({page:1,class:"spw-pagination__item--start"}),e.push({page:"...",class:"spw-pagination__item--ellipsis"});for(let i=t-2;i<=t+2;i++)e.push({page:i,class:"spw-pagination__item--middle-range"});e.push({page:"...",class:"spw-pagination__item--ellipsis"}),e.push({page:i,class:"spw-pagination__item--end"})}return e}render(){const e=this.calculatePageRange(),t=this.currentPage<this.totalPages,i=this.currentPage>1&&a("li",{key:"dcd1498e29ee3fb0a7aacfcf837cf779941390c0",class:"spw-pagination__item spw-pagination__item--desktop spw-pagination__item--arrow"},a("button",{key:"b15634e85c1082de7220d634d703583cfe000cc0",onClick:()=>this.goToPage(this.currentPage-1)},a("spw-icon",{key:"e15c7fd09d198cced97501c8eeac814e6c72e45e",icon:"fa-chevron-left"})," ",a("span",{key:"417047243b0821163a0e107fb5f810c60758a899",class:"spw-pagination__item-arrow-text"},this.previousButtonText))),o=t&&a("li",{key:"dfad6e553a19c22f6f7ecca0a0c0b41a190370a9",class:"spw-pagination__item spw-pagination__item--desktop spw-pagination__item--arrow"},a("button",{key:"278d707a4394e2225cf6c9bf50ae1146b54914fd",onClick:()=>this.goToPage(this.currentPage+1)},a("span",{key:"47b58d5f383d2aee5335ce3e3520593ae6b8fdc1",class:"spw-pagination__item-arrow-text"},this.nextButtonText)," ",a("spw-icon",{key:"aaeb333a63ce999845ff481283d65d359b498626",icon:"fa-chevron-right"}))),p=this.currentPage>1&&a("li",{key:"67d470dd7ec978d778bf9501f7ff4f0d53e8fd74",class:"spw-pagination__item spw-pagination__item--arrow"},a("button",{key:"1ef874caef38ad58bfef892f7ff3d3c6a92f1e13",onClick:()=>this.goToPage(this.currentPage-1)},a("spw-icon",{key:"615092ac9a6fd45d24fba1625ff16f5ab83bcd08",icon:"fa-chevron-left"})," ",a("span",{key:"68890a0dc95b5356e08002ecd2e8917f024ea2dd"},this.previousButtonText))),l=this.currentPage<this.totalPages&&a("li",{key:"b3ec5c4edbbf33b3c3597e2e8269d390cdf13f3d",class:"spw-pagination__item spw-pagination__item--arrow"},a("button",{key:"183cf1b1d5d6a92f7738674e3d2e9cb7f060af57",onClick:()=>this.goToPage(this.currentPage+1),disabled:this.currentPage>=this.totalPages},a("span",{key:"7dfbc497fa94d90984af376e5e20a46621ef4402"},this.nextButtonText)," ",a("spw-icon",{key:"0aa1fef8996bf23df1eda494cb8f1d9ef6a857b9",icon:"fa-chevron-right"}))),r=a("ul",{key:"bb0d46915afe5a30ed9751d858a7046a026d0ff4",class:"spw-pagination__mobile-arrows"},p,l);return a(n,{key:"044cde627233453d74e4a55bfea69d8199513b72"},a("div",{key:"7e49988f7e2331a3b986cb9644fb51b5e3e25997",class:this.getPaginationClass()},"input"===this.variant&&a(s,{key:"721f2508e7980a7d017d57bd35571bea3d7e7478"},a("ul",{key:"ed8562aa281db341405e2d7a7374e1890e63ae16"},i,a("li",{key:"0f0a0a41bc898e82c1293d59892a2278de1f3e2a",class:"spw-pagination__input"},a("spw-text-field",{key:"09eb4b0c43e1bc8b0d598d5144bf8defcf772f4b",value:this.inputPageValue,type:"text",name:"pagination-input",onInput:e=>this.handleInputChange(e),onKeyDown:e=>this.handleKeyDown(e),disabled:this.isDisabled})),a("li",{key:"638c548a6d33678719f9c9543eb3b99a9b52a7d9",class:"spw-pagination__total-pages"},"sur ",this.totalPages," ",1===this.totalPages?"page":"pages"),o),r),"numbers"===this.variant&&a(s,{key:"a88d47012d933c68cb648223cf0e2de3e0b4b1e5"},a("ul",{key:"88d35c75e74693c3cefc806a9592bbf96103add8"},i,e.map((({page:e,class:t})=>"..."===e?a("li",{class:"spw-pagination__item spw-pagination__item--dots "+t},a("spw-icon",{icon:"fa-ellipsis"})):a("li",{class:{"spw-pagination__item":!0,"spw-pagination__item--active":e===this.currentPage,[t]:!0}},a("button",{onClick:()=>this.goToPage(e),disabled:e===this.currentPage},e)))),o),r)))}static get watchers(){return{totalItems:[{calculateTotalPages:0},{onTotalItemsChange:0}],itemsPerPage:[{calculateTotalPages:0},{onItemsPerPageChange:0}],currentPage:[{calculateTotalPages:0},{onCurrentPageChange:0}]}}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-pagination__item--dots,.spw-pagination__item button{text-align:center;line-height:32px;font-weight:700;border-radius:32px;font-size:14px;min-width:32px;height:32px}.spw-pagination__item--dots:focus-visible,.spw-pagination__item button:focus-visible{outline:3px solid white;outline-offset:-1px;box-shadow:0 0 0 5px black}.spw-pagination{display:flex;flex-direction:column;align-items:center}@media (min-width: 768px){.spw-pagination{align-items:flex-start}}.spw-pagination ul{display:flex;align-items:center;padding:0}.spw-pagination__item{margin-right:12px}.spw-pagination__item spw-icon{font-size:18px}.spw-pagination__item button{padding:0 6px;margin:0;border:none;cursor:pointer;color:var(--spw-color-themes-grey-grey-900);background:none}.spw-pagination__item:not(.spw-pagination__item--active,.spw-pagination__item--dots,.spw-pagination__item--disabled):hover button{background:var(--spw-color-themes-grey-grey-200)}.spw-pagination__item:not(.spw-pagination__item--active,.spw-pagination__item--dots,.spw-pagination__item--disabled):active button{background:var(--spw-color-themes-grey-grey-300)}.spw-pagination__item--arrow button{padding:0 12px;display:flex;gap:8px;align-items:center;text-decoration:underline}.spw-pagination__item--arrow button:hover{text-decoration:none}.spw-pagination__item--dots{position:relative;top:3px;display:inline-flex;align-items:center;justify-content:center;cursor:default;background:none;color:var(--spw-color-themes-grey-grey-400)}.spw-pagination__item--dots spw-icon{font-size:16px}.spw-pagination__item--desktop{display:none}@media (min-width: 768px){.spw-pagination__item--desktop{display:inline-block}}.spw-pagination__item--active button{color:white;background:var(--spw-ds-primary)}.spw-pagination__input spw-text-field{width:36px;--spw-input-height:32px;--spw-input-padding:0 4px;--spw-input-text-align:center;--spw-input-font-size:14px}.spw-pagination__mobile-arrows{margin-top:12px}@media (min-width: 768px){.spw-pagination__mobile-arrows{display:none !important}}.spw-pagination__total-pages{font-size:14px;margin:0 12px 0 6px}"}},[1,"spw-pagination",{totalItems:[2,"total-items"],itemsPerPage:[2,"items-per-page"],isDisabled:[4,"is-disabled"],variant:[1],currentPage:[1026,"current-page"],nextButtonText:[1,"next-button-text"],previousButtonText:[1,"previous-button-text"],isDynamic:[4,"is-dynamic"],inputPageValue:[32],isMobile:[32],setPage:[64]},void 0,{totalItems:[{calculateTotalPages:0},{onTotalItemsChange:0}],itemsPerPage:[{calculateTotalPages:0},{onItemsPerPageChange:0}],currentPage:[{calculateTotalPages:0},{onCurrentPageChange:0}]}]),m=g,w=function(){"undefined"!=typeof customElements&&["spw-pagination","spw-field-label","spw-field-message","spw-icon","spw-text-field","spw-tooltip"].forEach((e=>{switch(e){case"spw-pagination":customElements.get(o(e))||customElements.define(o(e),g);break;case"spw-field-label":customElements.get(o(e))||p();break;case"spw-field-message":customElements.get(o(e))||l();break;case"spw-icon":customElements.get(o(e))||r();break;case"spw-text-field":customElements.get(o(e))||d();break;case"spw-tooltip":customElements.get(o(e))||c()}}))};export{m as SpwPagination,w as defineCustomElement}
|
|
1
|
+
import{p as e,H as t,c as i,h as a,F as s,a as n,t as o}from"./index.js";import{d as p}from"./p-DYJNpZeH.js";import{d as l}from"./p-UzhhGIpr.js";import{d as r}from"./p-D25JsirJ.js";import{d as c}from"./p-B-cQeHXM.js";import{d}from"./p-BPhSJ6Z9.js";const g=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pageChanged=i(this,"pageChanged",7),this.isDisabled=!1,this.variant="numbers",this.currentPage=1,this.nextButtonText="Suivant",this.previousButtonText="Précédent",this.isDynamic=!0,this.inputPageValue="",this.isMobile=window.innerWidth<800,this.updateIsMobile=()=>{this.isMobile=window.innerWidth<800}}componentWillLoad(){this.calculateTotalPages(),this.inputPageValue=""+this.currentPage,window.addEventListener("resize",this.updateIsMobile)}disconnectedCallback(){window.removeEventListener("resize",this.updateIsMobile)}calculateTotalPages(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)}onCurrentPageChange(e){this.inputPageValue=""+e}onItemsPerPageChange(){this.currentPage=1,this.pageChanged.emit(this.currentPage)}onTotalItemsChange(){if(!this.totalItems||this.totalItems<=0)return;const e=Math.ceil(this.totalItems/this.itemsPerPage);this.currentPage>e&&(this.currentPage=e,this.pageChanged.emit(this.currentPage))}async setPage(e){this.goToPage(e)}goToPage(e){e!==this.currentPage&&!this.isDisabled&&e>=1&&e<=this.totalPages&&(this.isDynamic&&(this.currentPage=e),this.pageChanged.emit(e))}handleInputChange(e){const t=e.target.value;this.inputPageValue=t;const i=parseInt(t,10);!isNaN(i)&&i>=1&&i<=this.totalPages&&(clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.goToPage(i)}),500))}getPaginationClass(){var e,t;const i=this.calculatePageRange(),a=i.filter((({page:e})=>"..."===e)).length,s=a>0&&"..."===(null===(e=i[1])||void 0===e?void 0:e.page),n=a>0&&"..."===(null===(t=i[i.length-2])||void 0===t?void 0:t.page);let o=`spw-pagination spw-pagination--${this.currentPage} spw-pagination--total-${this.totalPages}`;return 2===a?o+=" spw-pagination--double-ellipsis":s?o+=" spw-pagination--ellipsis-start":n&&(o+=" spw-pagination--ellipsis-end"),o}handleKeyDown(e){if("Enter"===e.key){const e=parseInt(this.inputPageValue,10);isNaN(e)||this.goToPage(e)}}calculatePageRange(){const e=[],{currentPage:t,totalPages:i,isMobile:a}=this;if(a)if(i<=5)for(let t=1;t<=i;t++)e.push({page:t,class:"spw-pagination__item--small-range"});else if(t<=3){for(let t=1;t<=3;t++)e.push({page:t,class:"spw-pagination__item--start-range"});e.push({page:"...",class:"spw-pagination__item--ellipsis"}),e.push({page:i,class:"spw-pagination__item--end"})}else if(t>=i-2){e.push({page:1,class:"spw-pagination__item--start"}),e.push({page:"...",class:"spw-pagination__item--ellipsis"});for(let t=i-2;t<=i;t++)e.push({page:t,class:"spw-pagination__item--end-range"})}else{e.push({page:1,class:"spw-pagination__item--start"}),e.push({page:"...",class:"spw-pagination__item--ellipsis"});for(let i=t-1;i<=t+1;i++)e.push({page:i,class:"spw-pagination__item--middle-range"});e.push({page:"...",class:"spw-pagination__item--ellipsis"}),e.push({page:i,class:"spw-pagination__item--end"})}else if(i<=7)for(let t=1;t<=i;t++)e.push({page:t,class:"spw-pagination__item--small-range"});else if(t<=4){for(let t=1;t<=4;t++)e.push({page:t,class:"spw-pagination__item--start-range"});e.push({page:"...",class:"spw-pagination__item--ellipsis"}),e.push({page:i,class:"spw-pagination__item--end"})}else if(t>=i-3){e.push({page:1,class:"spw-pagination__item--start"}),e.push({page:"...",class:"spw-pagination__item--ellipsis"});for(let t=i-3;t<=i;t++)e.push({page:t,class:"spw-pagination__item--end-range"})}else{e.push({page:1,class:"spw-pagination__item--start"}),e.push({page:"...",class:"spw-pagination__item--ellipsis"});for(let i=t-2;i<=t+2;i++)e.push({page:i,class:"spw-pagination__item--middle-range"});e.push({page:"...",class:"spw-pagination__item--ellipsis"}),e.push({page:i,class:"spw-pagination__item--end"})}return e}render(){const e=this.calculatePageRange(),t=this.currentPage<this.totalPages,i=this.currentPage>1&&a("li",{key:"7c080edc2651b2e1132dd892f80fb35cdb51c545",class:"spw-pagination__item spw-pagination__item--desktop spw-pagination__item--arrow"},a("button",{key:"db86c90829af879f8b9159ff55385ea6113a87c9",onClick:()=>this.goToPage(this.currentPage-1)},a("spw-icon",{key:"d71519a4f9672e537a9d62bac9278af43c0d49fe",icon:"fa-chevron-left"})," ",a("span",{key:"edba6502243e49845c0f319017c5b7d61d2e2437",class:"spw-pagination__item-arrow-text"},this.previousButtonText))),o=t&&a("li",{key:"c8982972fcc18efb18dd6a051e0e33f08a640b5a",class:"spw-pagination__item spw-pagination__item--desktop spw-pagination__item--arrow"},a("button",{key:"b6d9958f459d5a3405da368453e3d5d4856dc745",onClick:()=>this.goToPage(this.currentPage+1)},a("span",{key:"c2b580079bd0ce4379566448e956c794d74700d8",class:"spw-pagination__item-arrow-text"},this.nextButtonText)," ",a("spw-icon",{key:"ad82aea1b9a5cd0c40f2328971d1aa614b7faf63",icon:"fa-chevron-right"}))),p=this.currentPage>1&&a("li",{key:"45f13caaadd25e703ded72ef7035b83754efe1f1",class:"spw-pagination__item spw-pagination__item--arrow"},a("button",{key:"352f7888ee3a2c69aa95563e0d70c6636e6cfec5",onClick:()=>this.goToPage(this.currentPage-1)},a("spw-icon",{key:"6eca4cf9264abbcb954cf28f4bff7766accf0df9",icon:"fa-chevron-left"})," ",a("span",{key:"edbf625b0c1e2732608b6d93eefdf809daccb24a"},this.previousButtonText))),l=this.currentPage<this.totalPages&&a("li",{key:"ebfd73bf701c7c5ce58df4371a6c4e587b53d6f9",class:"spw-pagination__item spw-pagination__item--arrow"},a("button",{key:"cf8af3ea6473b20c0f6222f574d0fce0acc0d68f",onClick:()=>this.goToPage(this.currentPage+1),disabled:this.currentPage>=this.totalPages},a("span",{key:"2416f4e8e5ca12cb7b4295f30263f44040ee7389"},this.nextButtonText)," ",a("spw-icon",{key:"a17f614b9de4b2ce9b5ee1acac8747b30c9f2a02",icon:"fa-chevron-right"}))),r=a("ul",{key:"53b411817dc5000fea5a169f12b5db019ce3b5c6",class:"spw-pagination__mobile-arrows"},p,l);return a(n,{key:"a36abcd917e0dca742c810ee6e933e187feb2d77"},a("div",{key:"15a42490c86ff76815e56f73f5194debcc9310ee",class:this.getPaginationClass()},"input"===this.variant&&a(s,{key:"829f3acd90f4695aabe00220790fb0a977db8827"},a("ul",{key:"6afa448b159d362c2892f8f54fd492ce67898351"},i,a("li",{key:"23c505dd82dbdbcea7e41defd23485e4c232092d",class:"spw-pagination__input"},a("spw-text-field",{key:"856aa891aa67729ca0a3f0efe2b877eef363dae8",value:this.inputPageValue,type:"text",name:"pagination-input",onInput:e=>this.handleInputChange(e),onKeyDown:e=>this.handleKeyDown(e),disabled:this.isDisabled})),a("li",{key:"396afb3c7d68b35aa205456a244a291e8e024846",class:"spw-pagination__total-pages"},"sur ",this.totalPages," ",1===this.totalPages?"page":"pages"),o),r),"numbers"===this.variant&&a(s,{key:"faee677eee20adb4bc4798c73db2293d48c7fbde"},a("ul",{key:"fcf090ab6ef87c338177d5df8d57231e775d4f4f"},i,e.map((({page:e,class:t})=>"..."===e?a("li",{class:"spw-pagination__item spw-pagination__item--dots "+t},a("spw-icon",{icon:"fa-ellipsis"})):a("li",{class:{"spw-pagination__item":!0,"spw-pagination__item--active":e===this.currentPage,[t]:!0}},a("button",{onClick:()=>this.goToPage(e),disabled:e===this.currentPage},e)))),o),r)))}static get watchers(){return{totalItems:[{calculateTotalPages:0},{onTotalItemsChange:0}],itemsPerPage:[{calculateTotalPages:0},{onItemsPerPageChange:0}],currentPage:[{calculateTotalPages:0},{onCurrentPageChange:0}]}}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-pagination__item--dots,.spw-pagination__item button{text-align:center;line-height:32px;font-weight:700;border-radius:32px;font-size:14px;min-width:32px;height:32px}.spw-pagination__item--dots:focus-visible,.spw-pagination__item button:focus-visible{outline:3px solid white;outline-offset:-1px;box-shadow:0 0 0 5px black}.spw-pagination{display:flex;flex-direction:column;align-items:center}@media (min-width: 768px){.spw-pagination{align-items:flex-start}}.spw-pagination ul{display:flex;align-items:center;padding:0}.spw-pagination__item{margin-right:12px}.spw-pagination__item spw-icon{font-size:18px}.spw-pagination__item button{padding:0 6px;margin:0;border:none;cursor:pointer;color:var(--spw-color-themes-grey-grey-900);background:none}.spw-pagination__item:not(.spw-pagination__item--active,.spw-pagination__item--dots,.spw-pagination__item--disabled):hover button{background:var(--spw-color-themes-grey-grey-200)}.spw-pagination__item:not(.spw-pagination__item--active,.spw-pagination__item--dots,.spw-pagination__item--disabled):active button{background:var(--spw-color-themes-grey-grey-300)}.spw-pagination__item--arrow button{padding:0 12px;display:flex;gap:8px;align-items:center;text-decoration:underline}.spw-pagination__item--arrow button:hover{text-decoration:none}.spw-pagination__item--dots{position:relative;top:3px;display:inline-flex;align-items:center;justify-content:center;cursor:default;background:none;color:var(--spw-color-themes-grey-grey-400)}.spw-pagination__item--dots spw-icon{font-size:16px}.spw-pagination__item--desktop{display:none}@media (min-width: 768px){.spw-pagination__item--desktop{display:inline-block}}.spw-pagination__item--active button{color:white;background:var(--spw-ds-primary)}.spw-pagination__input spw-text-field{width:36px;--spw-input-height:32px;--spw-input-padding:0 4px;--spw-input-text-align:center;--spw-input-font-size:14px}.spw-pagination__mobile-arrows{margin-top:12px}@media (min-width: 768px){.spw-pagination__mobile-arrows{display:none !important}}.spw-pagination__total-pages{font-size:14px;margin:0 12px 0 6px}"}},[1,"spw-pagination",{totalItems:[2,"total-items"],itemsPerPage:[2,"items-per-page"],isDisabled:[4,"is-disabled"],variant:[1],currentPage:[1026,"current-page"],nextButtonText:[1,"next-button-text"],previousButtonText:[1,"previous-button-text"],isDynamic:[4,"is-dynamic"],inputPageValue:[32],isMobile:[32],setPage:[64]},void 0,{totalItems:[{calculateTotalPages:0},{onTotalItemsChange:0}],itemsPerPage:[{calculateTotalPages:0},{onItemsPerPageChange:0}],currentPage:[{calculateTotalPages:0},{onCurrentPageChange:0}]}]),m=g,h=function(){"undefined"!=typeof customElements&&["spw-pagination","spw-field-label","spw-field-message","spw-icon","spw-text-field","spw-tooltip"].forEach((e=>{switch(e){case"spw-pagination":customElements.get(o(e))||customElements.define(o(e),g);break;case"spw-field-label":customElements.get(o(e))||p();break;case"spw-field-message":customElements.get(o(e))||l();break;case"spw-icon":customElements.get(o(e))||r();break;case"spw-text-field":customElements.get(o(e))||c();break;case"spw-tooltip":customElements.get(o(e))||d()}}))};export{m as SpwPagination,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as i,h as r,t as s}from"./index.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.spwChange=i(this,"spwChange",7),this.internals=this.attachInternals(),this.disabled=!1,this.checked=!1,this.error=!1}handleRadio(e){if(this.disabled)return null==e||e.preventDefault(),void(null==e||e.stopPropagation());this.internalChecked||(this.setCheckedState(!0),this.spwChange.emit({checked:this.internalChecked,value:this.value}),this.uncheckOthers())}uncheckOthers(){const e=this.el.closest("form");e&&Array.from(e.querySelectorAll(`spw-radio[name="${this.name}"]`)).forEach((e=>{e!==this.el&&e.setChecked(!1)}))}async setChecked(e){this.disabled||this.setCheckedState(e)}checkedChanged(e){this.setCheckedState(e),e&&this.uncheckOthers()}setCheckedState(e){this.internalChecked=e,this.checked=e,this.inputElement&&(this.inputElement.checked=e),this.updateFormValue()}updateFormValue(){this.internals.setFormValue(this.internalChecked?this.value:null)}handleKeydown(e){" "!==e.key&&"Enter"!==e.key||(this.handleRadio(),e.preventDefault())}componentWillLoad(){this.internalChecked=this.checked,this.defaultChecked=this.checked}componentDidLoad(){var e;this.setCheckedState(this.internalChecked),null===(e=this.el.closest("form"))||void 0===e||e.addEventListener("formdata",(e=>{this.internalChecked&&e.formData.set(this.name,this.value)}))}formResetCallback(){this.setCheckedState(this.defaultChecked)}get elementClass(){return{"spw-radio__wrapper":!0,"spw-radio__wrapper--disabled":this.disabled,"spw-radio__wrapper--checked":this.internalChecked,"spw-radio__wrapper--error":this.error}}render(){const e=!!this.el.innerHTML;return r("div",{key:"
|
|
1
|
+
import{p as e,H as t,c as i,h as r,t as s}from"./index.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.spwChange=i(this,"spwChange",7),this.internals=this.attachInternals(),this.disabled=!1,this.checked=!1,this.error=!1}handleRadio(e){if(this.disabled)return null==e||e.preventDefault(),void(null==e||e.stopPropagation());this.internalChecked||(this.setCheckedState(!0),this.spwChange.emit({checked:this.internalChecked,value:this.value}),this.uncheckOthers())}uncheckOthers(){const e=this.el.closest("form");e&&Array.from(e.querySelectorAll(`spw-radio[name="${this.name}"]`)).forEach((e=>{e!==this.el&&e.setChecked(!1)}))}async setChecked(e){this.disabled||this.setCheckedState(e)}checkedChanged(e){this.setCheckedState(e),e&&this.uncheckOthers()}setCheckedState(e){this.internalChecked=e,this.checked=e,this.inputElement&&(this.inputElement.checked=e),this.updateFormValue()}updateFormValue(){this.internals.setFormValue(this.internalChecked?this.value:null)}handleKeydown(e){" "!==e.key&&"Enter"!==e.key||(this.handleRadio(),e.preventDefault())}componentWillLoad(){this.internalChecked=this.checked,this.defaultChecked=this.checked}componentDidLoad(){var e;this.setCheckedState(this.internalChecked),null===(e=this.el.closest("form"))||void 0===e||e.addEventListener("formdata",(e=>{this.internalChecked&&e.formData.set(this.name,this.value)}))}formResetCallback(){this.setCheckedState(this.defaultChecked)}get elementClass(){return{"spw-radio__wrapper":!0,"spw-radio__wrapper--disabled":this.disabled,"spw-radio__wrapper--checked":this.internalChecked,"spw-radio__wrapper--error":this.error}}render(){const e=!!this.el.innerHTML;return r("div",{key:"24c8dbdadb1efe0ddc64aba7b888d99008c19abb",class:"spw-radio"},r("input",{key:"0a09e781b7dc89b55f94b2bb5d3704fd9483afed",type:"radio",ref:e=>this.inputElement=e,checked:this.internalChecked,"aria-checked":this.internalChecked?"true":"false",onChange:this.handleRadio.bind(this),name:this.name,value:this.value,disabled:this.disabled,style:{display:"none"}}),e&&r("label",{key:"0c35d4e3c411671d23640e6cedc475e06222a069",class:"spw-radio__label "+(this.disabled?"spw-radio__label--disabled":""),onClick:e=>this.handleRadio(e)},r("slot",{key:"ea50f94b2c8d3bcd6adf1c592763155571771916"})),r("div",{key:"fb9dd0ed9aede5221d4ae9f00f6a19f1744c8ad0",tabIndex:this.disabled?-1:0,onClick:e=>this.handleRadio(e),onKeyDown:this.handleKeydown.bind(this),role:"radio","aria-checked":this.internalChecked?"true":"false","aria-disabled":this.disabled,"aria-label":this.accAriaLabel||this.name,class:this.elementClass},this.internalChecked&&r("span",{key:"0dd4595e7719b4f09b3db2c15add60ae602e744d",class:"spw-radio__circle"})))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{checked:[{checkedChanged:0}]}}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline-flex;vertical-align:top}.spw-radio{display:inline-flex;flex-direction:row;align-items:flex-start;padding:0}.spw-radio__wrapper{display:flex;position:relative;justify-content:center;align-items:center;width:20px;height:20px;background-color:var(--spw-ds-white);border:2px solid var(--spw-color-themes-grey-grey-900);border-radius:var(--spw-spacings-border-radius-full);font-size:var(--spw-typography-font-size-xs);flex:none;order:0;flex-grow:0}.spw-radio__wrapper--error{border-color:var(--spw-color-states-error-error-300)}.spw-radio__wrapper:not(.spw-radio__wrapper--disabled):hover{outline:4px solid var(--spw-color-themes-grey-grey-300)}.spw-radio__wrapper:not(.spw-radio__wrapper--disabled):focus-visible,.spw-radio__wrapper:not(.spw-radio__wrapper--disabled):active,.spw-radio__wrapper:not(.spw-radio__wrapper--disabled):focus-within{outline:2px solid white;outline-offset:0;box-shadow:0 0 0 4px black}.spw-radio__wrapper--disabled{border-color:var(--spw-color-themes-grey-grey-500)}.spw-radio__wrapper--checked{border-color:var(--spw-ds-primary);color:var(--spw-ds-primary)}.spw-radio__wrapper--checked--disabled{color:var(--spw-color-themes-grey-grey-500)}.spw-radio__circle{width:10px;height:10px;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:var(--spw-spacings-border-radius-full);background:var(--spw-ds-primary);display:block}.spw-radio__label{color:var(--spw-color-themes-grey-grey-900);word-wrap:break-word;order:1;padding-top:1px;user-select:none;padding-left:var(--spw-spacings-spacing-sm)}.spw-radio__label:hover~.spw-radio__wrapper:not(.spw-radio__wrapper--disabled){outline:4px solid var(--spw-color-themes-grey-grey-300)}.spw-radio__label:active~.spw-radio__wrapper:not(.spw-radio__wrapper--disabled){outline:2px solid white;outline-offset:0;box-shadow:0 0 0 4px black}.spw-radio__label--disabled{color:var(--spw-color-themes-grey-grey-600)}.spw-radio__wrapper:hover,.spw-radio__label:hover{cursor:pointer}.spw-radio__wrapper--disabled:hover,.spw-radio__label--disabled:hover{cursor:not-allowed}"}},[321,"spw-radio",{disabled:[4],checked:[1540],error:[4],name:[1],value:[1],accAriaLabel:[1,"acc-aria-label"],internalChecked:[32],setChecked:[64]},void 0,{checked:[{checkedChanged:0}]}]),a=o,d=function(){"undefined"!=typeof customElements&&["spw-radio"].forEach((e=>{"spw-radio"===e&&(customElements.get(s(e))||customElements.define(s(e),o))}))};export{a as SpwRadio,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,a as o,t as s}from"./index.js";import{d as n}from"./p-
|
|
1
|
+
import{p as t,H as e,h as i,a as o,t as s}from"./index.js";import{d as n}from"./p-CjvNWegY.js";import{d as a}from"./p-D25JsirJ.js";import{d as r}from"./p-BY3qZT4B.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.threshold=300,this.hideOnMobile=!1,this.accAriaLabel="Retour en haut de page",this.useWindow=!0,this.isVisible=!1,this.scrollContainer=null,this.handleScroll=()=>{this.isVisible=this.getScrollTop()>this.threshold},this.scrollToTop=()=>{this.scrollContainer===window?window.scrollTo({top:0,behavior:"smooth"}):this.scrollContainer.scrollTo({top:0,behavior:"smooth"})}}getScrollableParent(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e).overflowY;if(("auto"===t||"scroll"===t)&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return null}getScrollTop(){return this.scrollContainer===window?window.scrollY:this.scrollContainer.scrollTop}connectedCallback(){requestAnimationFrame((()=>{this.scrollContainer=this.useWindow?window:this.getScrollableParent(this.el)||window,this.scrollContainer.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll()}))}disconnectedCallback(){this.scrollContainer&&this.scrollContainer.removeEventListener("scroll",this.handleScroll)}get hostClass(){return{"spw-scrolltop--visible":this.isVisible,"spw-scrolltop--hide-mobile":this.hideOnMobile}}render(){return i(o,{key:"31d0e6b37e5ab82109cc6af85b6b433771e410ac",class:this.hostClass},i("spw-button",{key:"9d7ae62aba325316f501e68062c5ad78f7eb42f1","is-icon-only":!0,icon:"fa-chevron-up",variant:"primary",size:"medium","acc-aria-label":this.accAriaLabel,onClick:this.scrollToTop}))}get el(){return this}static get style(){return"html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:var(--spw-ds-font-main)}body{margin:0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{position:fixed;bottom:24px;right:24px;z-index:1000;opacity:0;visibility:hidden;transform:translateY(16px);transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, transform 0.2s ease-in-out;pointer-events:none}:host(.spw-scrolltop--visible){opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}@media (max-width: 767px){:host(.spw-scrolltop--hide-mobile){display:none}}"}},[1,"spw-scrolltop",{threshold:[2],hideOnMobile:[4,"hide-on-mobile"],accAriaLabel:[1,"acc-aria-label"],useWindow:[4,"use-window"],isVisible:[32]}]),l=p,d=function(){"undefined"!=typeof customElements&&["spw-scrolltop","spw-button","spw-icon","spw-loading"].forEach((t=>{switch(t){case"spw-scrolltop":customElements.get(s(t))||customElements.define(s(t),p);break;case"spw-button":customElements.get(s(t))||n();break;case"spw-icon":customElements.get(s(t))||a();break;case"spw-loading":customElements.get(s(t))||r()}}))};export{l as SpwScrolltop,d as defineCustomElement}
|