wcs-core 7.3.0 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/bundle/index.d.ts +45 -0
- package/bundle/index.js +2 -0
- package/bundle/index.js.map +1 -0
- package/bundle/p-010cf905.js +2 -0
- package/bundle/p-010cf905.js.map +1 -0
- package/bundle/p-2751ddc1.js +2 -0
- package/bundle/p-2751ddc1.js.map +1 -0
- package/bundle/p-2bef72c7.js +2 -0
- package/bundle/p-2bef72c7.js.map +1 -0
- package/bundle/p-2e9b9605.js +2 -0
- package/bundle/p-2e9b9605.js.map +1 -0
- package/bundle/p-35d7af48.js +2 -0
- package/bundle/p-35d7af48.js.map +1 -0
- package/bundle/p-38e45350.js +2 -0
- package/bundle/p-38e45350.js.map +1 -0
- package/bundle/p-3abf8a42.js +2 -0
- package/bundle/p-3abf8a42.js.map +1 -0
- package/bundle/p-44a3b0b9.js +2 -0
- package/bundle/p-44a3b0b9.js.map +1 -0
- package/bundle/p-60193ef5.js +2 -0
- package/bundle/p-60193ef5.js.map +1 -0
- package/bundle/p-6bc981dd.js +156 -0
- package/bundle/p-6bc981dd.js.map +1 -0
- package/bundle/p-763371a0.js +16 -0
- package/bundle/p-763371a0.js.map +1 -0
- package/bundle/p-8bfdf6f6.js +2 -0
- package/bundle/p-8bfdf6f6.js.map +1 -0
- package/bundle/p-97e70e10.js +2 -0
- package/bundle/p-97e70e10.js.map +1 -0
- package/bundle/p-98bd8a96.js +2 -0
- package/bundle/p-98bd8a96.js.map +1 -0
- package/bundle/p-a0f32ead.js +2 -0
- package/bundle/p-a0f32ead.js.map +1 -0
- package/bundle/p-a7468a3a.js +2 -0
- package/bundle/p-a7468a3a.js.map +1 -0
- package/bundle/p-c8b73e93.js +2 -0
- package/bundle/p-c8b73e93.js.map +1 -0
- package/bundle/p-d23d7658.js +2 -0
- package/bundle/p-d23d7658.js.map +1 -0
- package/bundle/p-d3404c52.js +2 -0
- package/bundle/p-d3404c52.js.map +1 -0
- package/bundle/p-e1fb3625.js +2 -0
- package/bundle/p-e1fb3625.js.map +1 -0
- package/bundle/p-f0dda0b8.js +2 -0
- package/bundle/p-f0dda0b8.js.map +1 -0
- package/bundle/p-fb2751c2.js +2 -0
- package/bundle/p-fb2751c2.js.map +1 -0
- package/bundle/p-fc9ba34d.js +2 -0
- package/bundle/p-fc9ba34d.js.map +1 -0
- package/bundle/package.json +8 -0
- package/bundle/wcs-accordion-content.d.ts +11 -0
- package/bundle/wcs-accordion-content.js +2 -0
- package/bundle/wcs-accordion-content.js.map +1 -0
- package/bundle/wcs-accordion-header.d.ts +11 -0
- package/bundle/wcs-accordion-header.js +2 -0
- package/bundle/wcs-accordion-header.js.map +1 -0
- package/bundle/wcs-accordion-panel.d.ts +11 -0
- package/bundle/wcs-accordion-panel.js +2 -0
- package/bundle/wcs-accordion-panel.js.map +1 -0
- package/bundle/wcs-accordion.d.ts +11 -0
- package/bundle/wcs-accordion.js +2 -0
- package/bundle/wcs-accordion.js.map +1 -0
- package/bundle/wcs-action-bar.d.ts +11 -0
- package/bundle/wcs-action-bar.js +2 -0
- package/bundle/wcs-action-bar.js.map +1 -0
- package/bundle/wcs-alert-drawer.d.ts +11 -0
- package/bundle/wcs-alert-drawer.js +2 -0
- package/bundle/wcs-alert-drawer.js.map +1 -0
- package/bundle/wcs-alert.d.ts +11 -0
- package/bundle/wcs-alert.js +2 -0
- package/bundle/wcs-alert.js.map +1 -0
- package/bundle/wcs-app.d.ts +11 -0
- package/bundle/wcs-app.js +2 -0
- package/bundle/wcs-app.js.map +1 -0
- package/bundle/wcs-badge.d.ts +11 -0
- package/bundle/wcs-badge.js +2 -0
- package/bundle/wcs-badge.js.map +1 -0
- package/bundle/wcs-breadcrumb-item.d.ts +11 -0
- package/bundle/wcs-breadcrumb-item.js +2 -0
- package/bundle/wcs-breadcrumb-item.js.map +1 -0
- package/bundle/wcs-breadcrumb.d.ts +11 -0
- package/bundle/wcs-breadcrumb.js +2 -0
- package/bundle/wcs-breadcrumb.js.map +1 -0
- package/bundle/wcs-button.d.ts +11 -0
- package/bundle/wcs-button.js +2 -0
- package/bundle/wcs-button.js.map +1 -0
- package/bundle/wcs-card-body.d.ts +11 -0
- package/bundle/wcs-card-body.js +2 -0
- package/bundle/wcs-card-body.js.map +1 -0
- package/bundle/wcs-card-content.d.ts +11 -0
- package/bundle/wcs-card-content.js +2 -0
- package/bundle/wcs-card-content.js.map +1 -0
- package/bundle/wcs-card-footer.d.ts +11 -0
- package/bundle/wcs-card-footer.js +2 -0
- package/bundle/wcs-card-footer.js.map +1 -0
- package/bundle/wcs-card-header.d.ts +11 -0
- package/bundle/wcs-card-header.js +2 -0
- package/bundle/wcs-card-header.js.map +1 -0
- package/bundle/wcs-card-media.d.ts +11 -0
- package/bundle/wcs-card-media.js +2 -0
- package/bundle/wcs-card-media.js.map +1 -0
- package/bundle/wcs-card.d.ts +11 -0
- package/bundle/wcs-card.js +2 -0
- package/bundle/wcs-card.js.map +1 -0
- package/bundle/wcs-checkbox.d.ts +11 -0
- package/bundle/wcs-checkbox.js +2 -0
- package/bundle/wcs-checkbox.js.map +1 -0
- package/bundle/wcs-chip.d.ts +11 -0
- package/bundle/wcs-chip.js +2 -0
- package/bundle/wcs-chip.js.map +1 -0
- package/bundle/wcs-com-nav-category.d.ts +11 -0
- package/bundle/wcs-com-nav-category.js +2 -0
- package/bundle/wcs-com-nav-category.js.map +1 -0
- package/bundle/wcs-com-nav-item.d.ts +11 -0
- package/bundle/wcs-com-nav-item.js +2 -0
- package/bundle/wcs-com-nav-item.js.map +1 -0
- package/bundle/wcs-com-nav-submenu.d.ts +11 -0
- package/bundle/wcs-com-nav-submenu.js +2 -0
- package/bundle/wcs-com-nav-submenu.js.map +1 -0
- package/bundle/wcs-com-nav.d.ts +11 -0
- package/bundle/wcs-com-nav.js +2 -0
- package/bundle/wcs-com-nav.js.map +1 -0
- package/bundle/wcs-counter.d.ts +11 -0
- package/bundle/wcs-counter.js +2 -0
- package/bundle/wcs-counter.js.map +1 -0
- package/bundle/wcs-divider.d.ts +11 -0
- package/bundle/wcs-divider.js +2 -0
- package/bundle/wcs-divider.js.map +1 -0
- package/bundle/wcs-dropdown-divider.d.ts +11 -0
- package/bundle/wcs-dropdown-divider.js +2 -0
- package/bundle/wcs-dropdown-divider.js.map +1 -0
- package/bundle/wcs-dropdown-header.d.ts +11 -0
- package/bundle/wcs-dropdown-header.js +2 -0
- package/bundle/wcs-dropdown-header.js.map +1 -0
- package/bundle/wcs-dropdown-item.d.ts +11 -0
- package/bundle/wcs-dropdown-item.js +2 -0
- package/bundle/wcs-dropdown-item.js.map +1 -0
- package/bundle/wcs-dropdown.d.ts +11 -0
- package/bundle/wcs-dropdown.js +2 -0
- package/bundle/wcs-dropdown.js.map +1 -0
- package/bundle/wcs-editable-field.d.ts +11 -0
- package/bundle/wcs-editable-field.js +2 -0
- package/bundle/wcs-editable-field.js.map +1 -0
- package/bundle/wcs-error.d.ts +11 -0
- package/bundle/wcs-error.js +2 -0
- package/bundle/wcs-error.js.map +1 -0
- package/bundle/wcs-field-content.d.ts +11 -0
- package/bundle/wcs-field-content.js +2 -0
- package/bundle/wcs-field-content.js.map +1 -0
- package/bundle/wcs-field-label.d.ts +11 -0
- package/bundle/wcs-field-label.js +2 -0
- package/bundle/wcs-field-label.js.map +1 -0
- package/bundle/wcs-field.d.ts +11 -0
- package/bundle/wcs-field.js +2 -0
- package/bundle/wcs-field.js.map +1 -0
- package/bundle/wcs-footer.d.ts +11 -0
- package/bundle/wcs-footer.js +2 -0
- package/bundle/wcs-footer.js.map +1 -0
- package/bundle/wcs-form-field.d.ts +11 -0
- package/bundle/wcs-form-field.js +2 -0
- package/bundle/wcs-form-field.js.map +1 -0
- package/bundle/wcs-galactic-menu.d.ts +11 -0
- package/bundle/wcs-galactic-menu.js +2 -0
- package/bundle/wcs-galactic-menu.js.map +1 -0
- package/bundle/wcs-galactic.d.ts +11 -0
- package/bundle/wcs-galactic.js +2 -0
- package/bundle/wcs-galactic.js.map +1 -0
- package/bundle/wcs-grid-column.d.ts +11 -0
- package/bundle/wcs-grid-column.js +2 -0
- package/bundle/wcs-grid-column.js.map +1 -0
- package/bundle/wcs-grid-custom-cell.d.ts +11 -0
- package/bundle/wcs-grid-custom-cell.js +2 -0
- package/bundle/wcs-grid-custom-cell.js.map +1 -0
- package/bundle/wcs-grid-pagination.d.ts +11 -0
- package/bundle/wcs-grid-pagination.js +2 -0
- package/bundle/wcs-grid-pagination.js.map +1 -0
- package/bundle/wcs-grid.d.ts +11 -0
- package/bundle/wcs-grid.js +2 -0
- package/bundle/wcs-grid.js.map +1 -0
- package/bundle/wcs-header.d.ts +11 -0
- package/bundle/wcs-header.js +2 -0
- package/bundle/wcs-header.js.map +1 -0
- package/bundle/wcs-hint.d.ts +11 -0
- package/bundle/wcs-hint.js +2 -0
- package/bundle/wcs-hint.js.map +1 -0
- package/bundle/wcs-horizontal-stepper.d.ts +11 -0
- package/bundle/wcs-horizontal-stepper.js +2 -0
- package/bundle/wcs-horizontal-stepper.js.map +1 -0
- package/bundle/wcs-icon.d.ts +11 -0
- package/bundle/wcs-icon.js +2 -0
- package/bundle/wcs-icon.js.map +1 -0
- package/bundle/wcs-input.d.ts +11 -0
- package/bundle/wcs-input.js +2 -0
- package/bundle/wcs-input.js.map +1 -0
- package/bundle/wcs-label.d.ts +11 -0
- package/bundle/wcs-label.js +2 -0
- package/bundle/wcs-label.js.map +1 -0
- package/bundle/wcs-list-item-properties.d.ts +11 -0
- package/bundle/wcs-list-item-properties.js +2 -0
- package/bundle/wcs-list-item-properties.js.map +1 -0
- package/bundle/wcs-list-item-property.d.ts +11 -0
- package/bundle/wcs-list-item-property.js +2 -0
- package/bundle/wcs-list-item-property.js.map +1 -0
- package/bundle/wcs-list-item.d.ts +11 -0
- package/bundle/wcs-list-item.js +2 -0
- package/bundle/wcs-list-item.js.map +1 -0
- package/bundle/wcs-mat-icon.d.ts +11 -0
- package/bundle/wcs-mat-icon.js +2 -0
- package/bundle/wcs-mat-icon.js.map +1 -0
- package/bundle/wcs-modal.d.ts +11 -0
- package/bundle/wcs-modal.js +2 -0
- package/bundle/wcs-modal.js.map +1 -0
- package/bundle/wcs-native-select.d.ts +11 -0
- package/bundle/wcs-native-select.js +2 -0
- package/bundle/wcs-native-select.js.map +1 -0
- package/bundle/wcs-nav-item.d.ts +11 -0
- package/bundle/wcs-nav-item.js +2 -0
- package/bundle/wcs-nav-item.js.map +1 -0
- package/bundle/wcs-nav.d.ts +11 -0
- package/bundle/wcs-nav.js +2 -0
- package/bundle/wcs-nav.js.map +1 -0
- package/bundle/wcs-progress-bar.d.ts +11 -0
- package/bundle/wcs-progress-bar.js +2 -0
- package/bundle/wcs-progress-bar.js.map +1 -0
- package/bundle/wcs-progress-radial.d.ts +11 -0
- package/bundle/wcs-progress-radial.js +2 -0
- package/bundle/wcs-progress-radial.js.map +1 -0
- package/bundle/wcs-radio-group.d.ts +11 -0
- package/bundle/wcs-radio-group.js +2 -0
- package/bundle/wcs-radio-group.js.map +1 -0
- package/bundle/wcs-radio.d.ts +11 -0
- package/bundle/wcs-radio.js +2 -0
- package/bundle/wcs-radio.js.map +1 -0
- package/bundle/wcs-select-option.d.ts +11 -0
- package/bundle/wcs-select-option.js +2 -0
- package/bundle/wcs-select-option.js.map +1 -0
- package/bundle/wcs-select.d.ts +11 -0
- package/bundle/wcs-select.js +2 -0
- package/bundle/wcs-select.js.map +1 -0
- package/bundle/wcs-skeleton-circle.d.ts +11 -0
- package/bundle/wcs-skeleton-circle.js +2 -0
- package/bundle/wcs-skeleton-circle.js.map +1 -0
- package/bundle/wcs-skeleton-rectangle.d.ts +11 -0
- package/bundle/wcs-skeleton-rectangle.js +2 -0
- package/bundle/wcs-skeleton-rectangle.js.map +1 -0
- package/bundle/wcs-skeleton-text.d.ts +11 -0
- package/bundle/wcs-skeleton-text.js +2 -0
- package/bundle/wcs-skeleton-text.js.map +1 -0
- package/bundle/wcs-spinner.d.ts +11 -0
- package/bundle/wcs-spinner.js +2 -0
- package/bundle/wcs-spinner.js.map +1 -0
- package/bundle/wcs-switch.d.ts +11 -0
- package/bundle/wcs-switch.js +2 -0
- package/bundle/wcs-switch.js.map +1 -0
- package/bundle/wcs-tab.d.ts +11 -0
- package/bundle/wcs-tab.js +2 -0
- package/bundle/wcs-tab.js.map +1 -0
- package/bundle/wcs-tabs.d.ts +11 -0
- package/bundle/wcs-tabs.js +2 -0
- package/bundle/wcs-tabs.js.map +1 -0
- package/bundle/wcs-textarea.d.ts +11 -0
- package/bundle/wcs-textarea.js +2 -0
- package/bundle/wcs-textarea.js.map +1 -0
- package/bundle/wcs-tooltip.d.ts +11 -0
- package/bundle/wcs-tooltip.js +7 -0
- package/bundle/wcs-tooltip.js.map +1 -0
- package/composite-elements/index.d.ts +33 -0
- package/composite-elements/index.js +2 -0
- package/composite-elements/index.js.map +1 -0
- package/composite-elements/p-04663560.js +2 -0
- package/composite-elements/p-04663560.js.map +1 -0
- package/composite-elements/p-0c306f8c.js +2 -0
- package/composite-elements/p-0c306f8c.js.map +1 -0
- package/composite-elements/p-2454bcae.js +2 -0
- package/composite-elements/p-2454bcae.js.map +1 -0
- package/composite-elements/p-2bef72c7.js +2 -0
- package/composite-elements/p-2bef72c7.js.map +1 -0
- package/composite-elements/p-35d7af48.js +2 -0
- package/composite-elements/p-35d7af48.js.map +1 -0
- package/composite-elements/p-3abf8a42.js +2 -0
- package/composite-elements/p-3abf8a42.js.map +1 -0
- package/composite-elements/p-46f752d5.js +2 -0
- package/composite-elements/p-46f752d5.js.map +1 -0
- package/composite-elements/p-55668982.js +2 -0
- package/composite-elements/p-55668982.js.map +1 -0
- package/composite-elements/p-5a3d7fec.js +2 -0
- package/composite-elements/p-5a3d7fec.js.map +1 -0
- package/composite-elements/p-6dd2b564.js +156 -0
- package/composite-elements/p-6dd2b564.js.map +1 -0
- package/composite-elements/p-a0f32ead.js +2 -0
- package/composite-elements/p-a0f32ead.js.map +1 -0
- package/composite-elements/p-a14aec19.js +2 -0
- package/composite-elements/p-a14aec19.js.map +1 -0
- package/composite-elements/p-a7468a3a.js +2 -0
- package/composite-elements/p-a7468a3a.js.map +1 -0
- package/composite-elements/p-a90bb01e.js +2 -0
- package/composite-elements/p-a90bb01e.js.map +1 -0
- package/composite-elements/p-af24fb0d.js +16 -0
- package/composite-elements/p-af24fb0d.js.map +1 -0
- package/composite-elements/p-b83afff9.js +2 -0
- package/composite-elements/p-b83afff9.js.map +1 -0
- package/composite-elements/p-b92e818b.js +2 -0
- package/composite-elements/p-b92e818b.js.map +1 -0
- package/composite-elements/p-d3404c52.js +2 -0
- package/composite-elements/p-d3404c52.js.map +1 -0
- package/composite-elements/p-e1fb3625.js +2 -0
- package/composite-elements/p-e1fb3625.js.map +1 -0
- package/composite-elements/p-e803bb26.js +2 -0
- package/composite-elements/p-e803bb26.js.map +1 -0
- package/composite-elements/p-ef26b4d8.js +2 -0
- package/composite-elements/p-ef26b4d8.js.map +1 -0
- package/composite-elements/p-fb2751c2.js +2 -0
- package/composite-elements/p-fb2751c2.js.map +1 -0
- package/composite-elements/p-fe1f9cc5.js +2 -0
- package/composite-elements/p-fe1f9cc5.js.map +1 -0
- package/composite-elements/package.json +12 -0
- package/composite-elements/wcs-accordion-content.d.ts +11 -0
- package/composite-elements/wcs-accordion-content.js +2 -0
- package/composite-elements/wcs-accordion-content.js.map +1 -0
- package/composite-elements/wcs-accordion-header.d.ts +11 -0
- package/composite-elements/wcs-accordion-header.js +2 -0
- package/composite-elements/wcs-accordion-header.js.map +1 -0
- package/composite-elements/wcs-accordion-panel.d.ts +11 -0
- package/composite-elements/wcs-accordion-panel.js +2 -0
- package/composite-elements/wcs-accordion-panel.js.map +1 -0
- package/composite-elements/wcs-accordion.d.ts +11 -0
- package/composite-elements/wcs-accordion.js +2 -0
- package/composite-elements/wcs-accordion.js.map +1 -0
- package/composite-elements/wcs-action-bar.d.ts +11 -0
- package/composite-elements/wcs-action-bar.js +2 -0
- package/composite-elements/wcs-action-bar.js.map +1 -0
- package/composite-elements/wcs-alert-drawer.d.ts +11 -0
- package/composite-elements/wcs-alert-drawer.js +2 -0
- package/composite-elements/wcs-alert-drawer.js.map +1 -0
- package/composite-elements/wcs-alert.d.ts +11 -0
- package/composite-elements/wcs-alert.js +2 -0
- package/composite-elements/wcs-alert.js.map +1 -0
- package/composite-elements/wcs-app.d.ts +11 -0
- package/composite-elements/wcs-app.js +2 -0
- package/composite-elements/wcs-app.js.map +1 -0
- package/composite-elements/wcs-badge.d.ts +11 -0
- package/composite-elements/wcs-badge.js +2 -0
- package/composite-elements/wcs-badge.js.map +1 -0
- package/composite-elements/wcs-breadcrumb-item.d.ts +11 -0
- package/composite-elements/wcs-breadcrumb-item.js +2 -0
- package/composite-elements/wcs-breadcrumb-item.js.map +1 -0
- package/composite-elements/wcs-breadcrumb.d.ts +11 -0
- package/composite-elements/wcs-breadcrumb.js +2 -0
- package/composite-elements/wcs-breadcrumb.js.map +1 -0
- package/composite-elements/wcs-button.d.ts +11 -0
- package/composite-elements/wcs-button.js +2 -0
- package/composite-elements/wcs-button.js.map +1 -0
- package/composite-elements/wcs-card-body.d.ts +11 -0
- package/composite-elements/wcs-card-body.js +2 -0
- package/composite-elements/wcs-card-body.js.map +1 -0
- package/composite-elements/wcs-card-content.d.ts +11 -0
- package/composite-elements/wcs-card-content.js +2 -0
- package/composite-elements/wcs-card-content.js.map +1 -0
- package/composite-elements/wcs-card-footer.d.ts +11 -0
- package/composite-elements/wcs-card-footer.js +2 -0
- package/composite-elements/wcs-card-footer.js.map +1 -0
- package/composite-elements/wcs-card-header.d.ts +11 -0
- package/composite-elements/wcs-card-header.js +2 -0
- package/composite-elements/wcs-card-header.js.map +1 -0
- package/composite-elements/wcs-card-media.d.ts +11 -0
- package/composite-elements/wcs-card-media.js +2 -0
- package/composite-elements/wcs-card-media.js.map +1 -0
- package/composite-elements/wcs-card.d.ts +11 -0
- package/composite-elements/wcs-card.js +2 -0
- package/composite-elements/wcs-card.js.map +1 -0
- package/composite-elements/wcs-checkbox.d.ts +11 -0
- package/composite-elements/wcs-checkbox.js +2 -0
- package/composite-elements/wcs-checkbox.js.map +1 -0
- package/composite-elements/wcs-chip.d.ts +11 -0
- package/composite-elements/wcs-chip.js +2 -0
- package/composite-elements/wcs-chip.js.map +1 -0
- package/composite-elements/wcs-com-nav-category.d.ts +11 -0
- package/composite-elements/wcs-com-nav-category.js +2 -0
- package/composite-elements/wcs-com-nav-category.js.map +1 -0
- package/composite-elements/wcs-com-nav-item.d.ts +11 -0
- package/composite-elements/wcs-com-nav-item.js +2 -0
- package/composite-elements/wcs-com-nav-item.js.map +1 -0
- package/composite-elements/wcs-com-nav-submenu.d.ts +11 -0
- package/composite-elements/wcs-com-nav-submenu.js +2 -0
- package/composite-elements/wcs-com-nav-submenu.js.map +1 -0
- package/composite-elements/wcs-com-nav.d.ts +11 -0
- package/composite-elements/wcs-com-nav.js +2 -0
- package/composite-elements/wcs-com-nav.js.map +1 -0
- package/composite-elements/wcs-counter.d.ts +11 -0
- package/composite-elements/wcs-counter.js +2 -0
- package/composite-elements/wcs-counter.js.map +1 -0
- package/composite-elements/wcs-divider.d.ts +11 -0
- package/composite-elements/wcs-divider.js +2 -0
- package/composite-elements/wcs-divider.js.map +1 -0
- package/composite-elements/wcs-dropdown-divider.d.ts +11 -0
- package/composite-elements/wcs-dropdown-divider.js +2 -0
- package/composite-elements/wcs-dropdown-divider.js.map +1 -0
- package/composite-elements/wcs-dropdown-header.d.ts +11 -0
- package/composite-elements/wcs-dropdown-header.js +2 -0
- package/composite-elements/wcs-dropdown-header.js.map +1 -0
- package/composite-elements/wcs-dropdown-item.d.ts +11 -0
- package/composite-elements/wcs-dropdown-item.js +2 -0
- package/composite-elements/wcs-dropdown-item.js.map +1 -0
- package/composite-elements/wcs-dropdown.d.ts +11 -0
- package/composite-elements/wcs-dropdown.js +2 -0
- package/composite-elements/wcs-dropdown.js.map +1 -0
- package/composite-elements/wcs-editable-field.d.ts +11 -0
- package/composite-elements/wcs-editable-field.js +2 -0
- package/composite-elements/wcs-editable-field.js.map +1 -0
- package/composite-elements/wcs-error.d.ts +11 -0
- package/composite-elements/wcs-error.js +2 -0
- package/composite-elements/wcs-error.js.map +1 -0
- package/composite-elements/wcs-field-content.d.ts +11 -0
- package/composite-elements/wcs-field-content.js +2 -0
- package/composite-elements/wcs-field-content.js.map +1 -0
- package/composite-elements/wcs-field-label.d.ts +11 -0
- package/composite-elements/wcs-field-label.js +2 -0
- package/composite-elements/wcs-field-label.js.map +1 -0
- package/composite-elements/wcs-field.d.ts +11 -0
- package/composite-elements/wcs-field.js +2 -0
- package/composite-elements/wcs-field.js.map +1 -0
- package/composite-elements/wcs-footer.d.ts +11 -0
- package/composite-elements/wcs-footer.js +2 -0
- package/composite-elements/wcs-footer.js.map +1 -0
- package/composite-elements/wcs-form-field.d.ts +11 -0
- package/composite-elements/wcs-form-field.js +2 -0
- package/composite-elements/wcs-form-field.js.map +1 -0
- package/composite-elements/wcs-galactic-menu.d.ts +11 -0
- package/composite-elements/wcs-galactic-menu.js +2 -0
- package/composite-elements/wcs-galactic-menu.js.map +1 -0
- package/composite-elements/wcs-galactic.d.ts +11 -0
- package/composite-elements/wcs-galactic.js +2 -0
- package/composite-elements/wcs-galactic.js.map +1 -0
- package/composite-elements/wcs-grid-column.d.ts +11 -0
- package/composite-elements/wcs-grid-column.js +2 -0
- package/composite-elements/wcs-grid-column.js.map +1 -0
- package/composite-elements/wcs-grid-custom-cell.d.ts +11 -0
- package/composite-elements/wcs-grid-custom-cell.js +2 -0
- package/composite-elements/wcs-grid-custom-cell.js.map +1 -0
- package/composite-elements/wcs-grid-pagination.d.ts +11 -0
- package/composite-elements/wcs-grid-pagination.js +2 -0
- package/composite-elements/wcs-grid-pagination.js.map +1 -0
- package/composite-elements/wcs-grid.d.ts +11 -0
- package/composite-elements/wcs-grid.js +2 -0
- package/composite-elements/wcs-grid.js.map +1 -0
- package/composite-elements/wcs-header.d.ts +11 -0
- package/composite-elements/wcs-header.js +2 -0
- package/composite-elements/wcs-header.js.map +1 -0
- package/composite-elements/wcs-hint.d.ts +11 -0
- package/composite-elements/wcs-hint.js +2 -0
- package/composite-elements/wcs-hint.js.map +1 -0
- package/composite-elements/wcs-horizontal-stepper.d.ts +11 -0
- package/composite-elements/wcs-horizontal-stepper.js +2 -0
- package/composite-elements/wcs-horizontal-stepper.js.map +1 -0
- package/composite-elements/wcs-icon.d.ts +11 -0
- package/composite-elements/wcs-icon.js +2 -0
- package/composite-elements/wcs-icon.js.map +1 -0
- package/composite-elements/wcs-input.d.ts +11 -0
- package/composite-elements/wcs-input.js +2 -0
- package/composite-elements/wcs-input.js.map +1 -0
- package/composite-elements/wcs-label.d.ts +11 -0
- package/composite-elements/wcs-label.js +2 -0
- package/composite-elements/wcs-label.js.map +1 -0
- package/composite-elements/wcs-list-item-properties.d.ts +11 -0
- package/composite-elements/wcs-list-item-properties.js +2 -0
- package/composite-elements/wcs-list-item-properties.js.map +1 -0
- package/composite-elements/wcs-list-item-property.d.ts +11 -0
- package/composite-elements/wcs-list-item-property.js +2 -0
- package/composite-elements/wcs-list-item-property.js.map +1 -0
- package/composite-elements/wcs-list-item.d.ts +11 -0
- package/composite-elements/wcs-list-item.js +2 -0
- package/composite-elements/wcs-list-item.js.map +1 -0
- package/composite-elements/wcs-mat-icon.d.ts +11 -0
- package/composite-elements/wcs-mat-icon.js +2 -0
- package/composite-elements/wcs-mat-icon.js.map +1 -0
- package/composite-elements/wcs-modal.d.ts +11 -0
- package/composite-elements/wcs-modal.js +2 -0
- package/composite-elements/wcs-modal.js.map +1 -0
- package/composite-elements/wcs-native-select.d.ts +11 -0
- package/composite-elements/wcs-native-select.js +2 -0
- package/composite-elements/wcs-native-select.js.map +1 -0
- package/composite-elements/wcs-nav-item.d.ts +11 -0
- package/composite-elements/wcs-nav-item.js +2 -0
- package/composite-elements/wcs-nav-item.js.map +1 -0
- package/composite-elements/wcs-nav.d.ts +11 -0
- package/composite-elements/wcs-nav.js +2 -0
- package/composite-elements/wcs-nav.js.map +1 -0
- package/composite-elements/wcs-progress-bar.d.ts +11 -0
- package/composite-elements/wcs-progress-bar.js +2 -0
- package/composite-elements/wcs-progress-bar.js.map +1 -0
- package/composite-elements/wcs-progress-radial.d.ts +11 -0
- package/composite-elements/wcs-progress-radial.js +2 -0
- package/composite-elements/wcs-progress-radial.js.map +1 -0
- package/composite-elements/wcs-radio-group.d.ts +11 -0
- package/composite-elements/wcs-radio-group.js +2 -0
- package/composite-elements/wcs-radio-group.js.map +1 -0
- package/composite-elements/wcs-radio.d.ts +11 -0
- package/composite-elements/wcs-radio.js +2 -0
- package/composite-elements/wcs-radio.js.map +1 -0
- package/composite-elements/wcs-select-option.d.ts +11 -0
- package/composite-elements/wcs-select-option.js +2 -0
- package/composite-elements/wcs-select-option.js.map +1 -0
- package/composite-elements/wcs-select.d.ts +11 -0
- package/composite-elements/wcs-select.js +2 -0
- package/composite-elements/wcs-select.js.map +1 -0
- package/composite-elements/wcs-skeleton-circle.d.ts +11 -0
- package/composite-elements/wcs-skeleton-circle.js +2 -0
- package/composite-elements/wcs-skeleton-circle.js.map +1 -0
- package/composite-elements/wcs-skeleton-rectangle.d.ts +11 -0
- package/composite-elements/wcs-skeleton-rectangle.js +2 -0
- package/composite-elements/wcs-skeleton-rectangle.js.map +1 -0
- package/composite-elements/wcs-skeleton-text.d.ts +11 -0
- package/composite-elements/wcs-skeleton-text.js +2 -0
- package/composite-elements/wcs-skeleton-text.js.map +1 -0
- package/composite-elements/wcs-spinner.d.ts +11 -0
- package/composite-elements/wcs-spinner.js +2 -0
- package/composite-elements/wcs-spinner.js.map +1 -0
- package/composite-elements/wcs-switch.d.ts +11 -0
- package/composite-elements/wcs-switch.js +2 -0
- package/composite-elements/wcs-switch.js.map +1 -0
- package/composite-elements/wcs-tab.d.ts +11 -0
- package/composite-elements/wcs-tab.js +2 -0
- package/composite-elements/wcs-tab.js.map +1 -0
- package/composite-elements/wcs-tabs.d.ts +11 -0
- package/composite-elements/wcs-tabs.js +2 -0
- package/composite-elements/wcs-tabs.js.map +1 -0
- package/composite-elements/wcs-textarea.d.ts +11 -0
- package/composite-elements/wcs-textarea.js +2 -0
- package/composite-elements/wcs-textarea.js.map +1 -0
- package/composite-elements/wcs-tooltip.d.ts +11 -0
- package/composite-elements/wcs-tooltip.js +7 -0
- package/composite-elements/wcs-tooltip.js.map +1 -0
- package/design-tokens/dist/sncf-groupe-root-scoped.css +227 -227
- package/design-tokens/dist/sncf-groupe.css +227 -227
- package/design-tokens/dist/sncf-holding-root-scoped.css +227 -227
- package/design-tokens/dist/sncf-holding.css +227 -227
- package/design-tokens/dist/sncf-reseau-root-scoped.css +227 -227
- package/design-tokens/dist/sncf-reseau.css +227 -227
- package/design-tokens/dist/sncf-voyageurs-root-scoped.css +242 -242
- package/design-tokens/dist/sncf-voyageurs.css +242 -242
- package/dist/cjs/{popper-8d6e7fca.js → popper-1b61df21.js} +10 -17
- package/dist/cjs/popper-1b61df21.js.map +1 -0
- package/dist/cjs/wcs-accordion-panel.cjs.entry.js +2 -1
- package/dist/cjs/wcs-accordion-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-accordion.cjs.entry.js +5 -1
- package/dist/cjs/wcs-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/wcs-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav.cjs.entry.js +3 -3
- package/dist/cjs/wcs-com-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/wcs-error_3.cjs.entry.js +1 -1
- package/dist/cjs/wcs-error_3.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid.cjs.entry.js +5 -4
- package/dist/cjs/wcs-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +3 -2
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-modal.cjs.entry.js +2 -2
- package/dist/cjs/wcs-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-select_2.cjs.entry.js +59 -24
- package/dist/cjs/wcs-select_2.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-tabs.cjs.entry.js +1 -1
- package/dist/cjs/wcs-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/accordion/accordion.e2e.playwright.js +245 -0
- package/dist/collection/components/accordion/accordion.e2e.playwright.js.map +1 -0
- package/dist/collection/components/accordion/accordion.js +5 -1
- package/dist/collection/components/accordion/accordion.js.map +1 -1
- package/dist/collection/components/accordion-panel/accordion-panel.js +3 -2
- package/dist/collection/components/accordion-panel/accordion-panel.js.map +1 -1
- package/dist/collection/components/alert/alert.e2e.playwright.js +125 -0
- package/dist/collection/components/alert/alert.e2e.playwright.js.map +1 -0
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.playwright.js +107 -0
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.playwright.js.map +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.playwright.js +188 -0
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.playwright.js.map +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/collection/components/button/button.e2e.playwright.js +26 -0
- package/dist/collection/components/button/button.e2e.playwright.js.map +1 -0
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/checkbox/checkbox.e2e.playwright.js +39 -0
- package/dist/collection/components/checkbox/checkbox.e2e.playwright.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/chip/chip.e2e.playwright.js +190 -0
- package/dist/collection/components/chip/chip.e2e.playwright.js.map +1 -0
- package/dist/collection/components/com-nav/com-nav.css +15 -0
- package/dist/collection/components/com-nav/{com-nav.e2e.js → com-nav.e2e.playwright.js} +60 -44
- package/dist/collection/components/com-nav/com-nav.e2e.playwright.js.map +1 -0
- package/dist/collection/components/com-nav/com-nav.js +3 -3
- package/dist/collection/components/com-nav/com-nav.js.map +1 -1
- package/dist/collection/components/com-nav-category/com-nav-category.js +1 -1
- package/dist/collection/components/com-nav-item/com-nav-item.css +2 -2
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +1 -1
- package/dist/collection/components/counter/counter.e2e.playwright.js +187 -0
- package/dist/collection/components/counter/counter.e2e.playwright.js.map +1 -0
- package/dist/collection/components/counter/counter.js +1 -1
- package/dist/collection/components/dropdown/dropdown.e2e.playwright.js +320 -0
- package/dist/collection/components/dropdown/dropdown.e2e.playwright.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/editable-field/editable-field.e2e.playwright.js +156 -0
- package/dist/collection/components/editable-field/editable-field.e2e.playwright.js.map +1 -0
- package/dist/collection/components/form-field/form-field.e2e.playwright.js +104 -0
- package/dist/collection/components/form-field/form-field.e2e.playwright.js.map +1 -0
- package/dist/collection/components/galactic-menu/galactic-menu.js +1 -1
- package/dist/collection/components/grid/grid.e2e.playwright.js +153 -0
- package/dist/collection/components/grid/grid.e2e.playwright.js.map +1 -0
- package/dist/collection/components/grid/grid.js +6 -5
- package/dist/collection/components/grid/grid.js.map +1 -1
- package/dist/collection/components/grid-column/grid-column.js +1 -1
- package/dist/collection/components/grid-pagination/grid-pagination.js +1 -1
- package/dist/collection/components/header/header.js +1 -1
- package/dist/collection/components/horizontal-stepper/horizontal-step.js +2 -1
- package/dist/collection/components/horizontal-stepper/horizontal-step.js.map +1 -1
- package/dist/collection/components/horizontal-stepper/horizontal-stepper-interface.js.map +1 -1
- package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +5 -1
- package/dist/collection/components/horizontal-stepper/horizontal-stepper.js.map +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/input/input.e2e.playwright.js +157 -0
- package/dist/collection/components/input/input.e2e.playwright.js.map +1 -0
- package/dist/collection/components/input/input.js +2 -2
- package/dist/collection/components/label/label.css +4 -6
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/mat-icon/mat-icon.js +1 -1
- package/dist/collection/components/modal/modal.css +4 -0
- package/dist/collection/components/modal/modal.e2e.playwright.js +35 -0
- package/dist/collection/components/modal/modal.e2e.playwright.js.map +1 -0
- package/dist/collection/components/modal/modal.js +2 -2
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/native-select/native-select.js +1 -1
- package/dist/collection/components/nav/nav.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/progress-radial/progress-radial.js +1 -1
- package/dist/collection/components/radio/radio.js +1 -1
- package/dist/collection/components/radio-group/radio-group.e2e.playwright.js +231 -0
- package/dist/collection/components/radio-group/radio-group.e2e.playwright.js.map +1 -0
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/select/select.e2e.playwright.js +1702 -0
- package/dist/collection/components/select/select.e2e.playwright.js.map +1 -0
- package/dist/collection/components/select/select.js +49 -20
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select-option/select-option.js +3 -3
- package/dist/collection/components/select-option/select-option.js.map +1 -1
- package/dist/collection/components/switch/switch.e2e.playwright.js +40 -0
- package/dist/collection/components/switch/switch.e2e.playwright.js.map +1 -0
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tabs/tabs.e2e.playwright.js +205 -0
- package/dist/collection/components/tabs/tabs.e2e.playwright.js.map +1 -0
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/textarea/textarea.e2e.playwright.js +133 -0
- package/dist/collection/components/textarea/textarea.e2e.playwright.js.map +1 -0
- package/dist/collection/components/textarea/textarea.js +1 -1
- package/dist/collection/utils/playwright/test-expect.js +2 -0
- package/dist/collection/utils/playwright/test-expect.js.map +1 -0
- package/dist/collection/utils/playwright/test.js +16 -0
- package/dist/collection/utils/playwright/test.js.map +1 -0
- package/dist/esm/{popper-e491c314.js → popper-ac238961.js} +10 -17
- package/dist/esm/popper-ac238961.js.map +1 -0
- package/dist/esm/wcs-accordion-panel.entry.js +2 -1
- package/dist/esm/wcs-accordion-panel.entry.js.map +1 -1
- package/dist/esm/wcs-accordion.entry.js +5 -1
- package/dist/esm/wcs-accordion.entry.js.map +1 -1
- package/dist/esm/wcs-breadcrumb.entry.js +1 -1
- package/dist/esm/wcs-breadcrumb.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav-item.entry.js +1 -1
- package/dist/esm/wcs-com-nav-item.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav.entry.js +3 -3
- package/dist/esm/wcs-com-nav.entry.js.map +1 -1
- package/dist/esm/wcs-dropdown.entry.js +1 -1
- package/dist/esm/wcs-error_3.entry.js +1 -1
- package/dist/esm/wcs-error_3.entry.js.map +1 -1
- package/dist/esm/wcs-galactic-menu.entry.js +1 -1
- package/dist/esm/wcs-grid.entry.js +5 -4
- package/dist/esm/wcs-grid.entry.js.map +1 -1
- package/dist/esm/wcs-horizontal-stepper.entry.js +3 -2
- package/dist/esm/wcs-horizontal-stepper.entry.js.map +1 -1
- package/dist/esm/wcs-modal.entry.js +2 -2
- package/dist/esm/wcs-modal.entry.js.map +1 -1
- package/dist/esm/wcs-select_2.entry.js +59 -24
- package/dist/esm/wcs-select_2.entry.js.map +1 -1
- package/dist/esm/wcs-tabs.entry.js +1 -1
- package/dist/esm/wcs-tooltip.entry.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +1 -0
- package/dist/types/components/accordion/accordion.e2e.playwright.d.ts +1 -0
- package/dist/types/components/alert/alert.e2e.playwright.d.ts +1 -0
- package/dist/types/components/alert-drawer/alert-drawer.e2e.playwright.d.ts +1 -0
- package/dist/types/components/breadcrumb/breadcrumb.e2e.playwright.d.ts +1 -0
- package/dist/types/components/button/button.e2e.playwright.d.ts +1 -0
- package/dist/types/components/checkbox/checkbox.e2e.playwright.d.ts +1 -0
- package/dist/types/components/chip/chip.e2e.playwright.d.ts +1 -0
- package/dist/types/components/com-nav/com-nav.e2e.playwright.d.ts +1 -0
- package/dist/types/components/counter/counter.e2e.playwright.d.ts +1 -0
- package/dist/types/components/dropdown/dropdown.e2e.playwright.d.ts +1 -0
- package/dist/types/components/editable-field/editable-field.e2e.playwright.d.ts +1 -0
- package/dist/types/components/form-field/form-field.e2e.playwright.d.ts +1 -0
- package/dist/types/components/grid/grid.e2e.playwright.d.ts +1 -0
- package/dist/types/components/horizontal-stepper/horizontal-stepper-interface.d.ts +2 -0
- package/dist/types/components/horizontal-stepper/horizontal-stepper.d.ts +4 -0
- package/dist/types/components/input/input.e2e.playwright.d.ts +1 -0
- package/dist/types/components/modal/modal.e2e.playwright.d.ts +1 -0
- package/dist/types/components/radio-group/radio-group.e2e.playwright.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +7 -1
- package/dist/types/components/select/select.e2e.playwright.d.ts +1 -0
- package/dist/types/components/switch/switch.e2e.playwright.d.ts +1 -0
- package/dist/types/components/tabs/tabs.e2e.playwright.d.ts +1 -0
- package/dist/types/components/textarea/textarea.e2e.playwright.d.ts +1 -0
- package/dist/types/components.d.ts +12 -0
- package/dist/types/utils/playwright/test-expect.d.ts +33 -0
- package/dist/types/utils/playwright/test.d.ts +7 -0
- package/dist/wcs/{p-8e9bd0f1.entry.js → p-0326f834.entry.js} +2 -2
- package/dist/wcs/{p-8e9bd0f1.entry.js.map → p-0326f834.entry.js.map} +1 -1
- package/dist/wcs/p-2221bf0c.entry.js +16 -0
- package/dist/wcs/p-2221bf0c.entry.js.map +1 -0
- package/dist/wcs/{p-f2eeb249.entry.js → p-2329af04.entry.js} +2 -2
- package/dist/wcs/{p-f2eeb249.entry.js.map → p-2329af04.entry.js.map} +1 -1
- package/dist/wcs/p-4ae08567.entry.js +2 -0
- package/dist/wcs/p-4ae08567.entry.js.map +1 -0
- package/dist/wcs/p-4e2d6227.entry.js +2 -0
- package/dist/wcs/p-4e2d6227.entry.js.map +1 -0
- package/dist/wcs/p-5d598d35.entry.js +2 -0
- package/dist/wcs/p-5d598d35.entry.js.map +1 -0
- package/dist/wcs/p-8332a7e3.entry.js +2 -0
- package/dist/wcs/p-8332a7e3.entry.js.map +1 -0
- package/dist/wcs/{p-ec383729.entry.js → p-9b76b8e6.entry.js} +2 -2
- package/dist/wcs/{p-ec383729.entry.js.map → p-9b76b8e6.entry.js.map} +1 -1
- package/dist/wcs/{p-1f593d06.entry.js → p-abd8d5a0.entry.js} +2 -2
- package/dist/wcs/{p-622f7403.entry.js → p-c6f8c45c.entry.js} +2 -2
- package/dist/wcs/{p-a94e685c.entry.js → p-db7ba599.entry.js} +2 -2
- package/dist/wcs/p-e1fb3625.js +2 -0
- package/dist/wcs/p-e1fb3625.js.map +1 -0
- package/dist/wcs/{p-a956dc84.entry.js → p-f2f7595e.entry.js} +2 -2
- package/dist/wcs/{p-a956dc84.entry.js.map → p-f2f7595e.entry.js.map} +1 -1
- package/dist/wcs/p-fbd68522.entry.js +2 -0
- package/dist/wcs/p-fbd68522.entry.js.map +1 -0
- package/dist/wcs/{p-8c2605fd.entry.js → p-fe303f58.entry.js} +2 -2
- package/dist/wcs/wcs.esm.js +1 -1
- package/package.json +18 -24
- package/dist/cjs/popper-8d6e7fca.js.map +0 -1
- package/dist/collection/components/accordion/accordion.e2e.js +0 -187
- package/dist/collection/components/accordion/accordion.e2e.js.map +0 -1
- package/dist/collection/components/alert/alert.e2e.js +0 -142
- package/dist/collection/components/alert/alert.e2e.js.map +0 -1
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.js +0 -111
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.js.map +0 -1
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.js +0 -223
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.js.map +0 -1
- package/dist/collection/components/button/button.e2e.js +0 -25
- package/dist/collection/components/button/button.e2e.js.map +0 -1
- package/dist/collection/components/checkbox/checkbox.e2e.js +0 -45
- package/dist/collection/components/checkbox/checkbox.e2e.js.map +0 -1
- package/dist/collection/components/chip/chip.e2e.js +0 -209
- package/dist/collection/components/chip/chip.e2e.js.map +0 -1
- package/dist/collection/components/com-nav/com-nav.e2e.js.map +0 -1
- package/dist/collection/components/counter/counter.e2e.js +0 -206
- package/dist/collection/components/counter/counter.e2e.js.map +0 -1
- package/dist/collection/components/dropdown/dropdown.e2e.js +0 -156
- package/dist/collection/components/dropdown/dropdown.e2e.js.map +0 -1
- package/dist/collection/components/editable-field/editable-field.e2e.js +0 -176
- package/dist/collection/components/editable-field/editable-field.e2e.js.map +0 -1
- package/dist/collection/components/form-field/form-field.e2e.js +0 -122
- package/dist/collection/components/form-field/form-field.e2e.js.map +0 -1
- package/dist/collection/components/grid/grid.e2e.js +0 -147
- package/dist/collection/components/grid/grid.e2e.js.map +0 -1
- package/dist/collection/components/input/input.e2e.js +0 -152
- package/dist/collection/components/input/input.e2e.js.map +0 -1
- package/dist/collection/components/modal/modal.e2e.js +0 -36
- package/dist/collection/components/modal/modal.e2e.js.map +0 -1
- package/dist/collection/components/radio-group/radio-group.e2e.js +0 -239
- package/dist/collection/components/radio-group/radio-group.e2e.js.map +0 -1
- package/dist/collection/components/select/select.e2e.js +0 -1081
- package/dist/collection/components/select/select.e2e.js.map +0 -1
- package/dist/collection/components/switch/switch.e2e.js +0 -45
- package/dist/collection/components/switch/switch.e2e.js.map +0 -1
- package/dist/collection/components/tabs/tabs.e2e.js +0 -207
- package/dist/collection/components/tabs/tabs.e2e.js.map +0 -1
- package/dist/collection/components/textarea/textarea.e2e.js +0 -132
- package/dist/collection/components/textarea/textarea.e2e.js.map +0 -1
- package/dist/collection/utils/tests.js +0 -23
- package/dist/collection/utils/tests.js.map +0 -1
- package/dist/esm/popper-e491c314.js.map +0 -1
- package/dist/types/utils/tests.d.ts +0 -4
- package/dist/wcs/p-0dd07842.entry.js +0 -2
- package/dist/wcs/p-0dd07842.entry.js.map +0 -1
- package/dist/wcs/p-0f864e86.js +0 -2
- package/dist/wcs/p-0f864e86.js.map +0 -1
- package/dist/wcs/p-1244daa0.entry.js +0 -2
- package/dist/wcs/p-1244daa0.entry.js.map +0 -1
- package/dist/wcs/p-1fbe0328.entry.js +0 -2
- package/dist/wcs/p-1fbe0328.entry.js.map +0 -1
- package/dist/wcs/p-828b45b4.entry.js +0 -2
- package/dist/wcs/p-828b45b4.entry.js.map +0 -1
- package/dist/wcs/p-b94a09b6.entry.js +0 -16
- package/dist/wcs/p-b94a09b6.entry.js.map +0 -1
- package/dist/wcs/p-fd187bce.entry.js +0 -2
- package/dist/wcs/p-fd187bce.entry.js.map +0 -1
- /package/dist/wcs/{p-1f593d06.entry.js.map → p-abd8d5a0.entry.js.map} +0 -0
- /package/dist/wcs/{p-622f7403.entry.js.map → p-c6f8c45c.entry.js.map} +0 -0
- /package/dist/wcs/{p-a94e685c.entry.js.map → p-db7ba599.entry.js.map} +0 -0
- /package/dist/wcs/{p-8c2605fd.entry.js.map → p-fe303f58.entry.js.map} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-d9de61ce.js';
|
|
2
2
|
|
|
3
3
|
const HorizontalStep = ({ step, checkOnComplete, complete, passed, active, first, disable, onClick }) => {
|
|
4
|
+
var _a;
|
|
4
5
|
return (
|
|
5
6
|
/*
|
|
6
7
|
When using list-style: none in CSS, it removes the semantic of the list in Safari.
|
|
@@ -10,7 +11,7 @@ const HorizontalStep = ({ step, checkOnComplete, complete, passed, active, first
|
|
|
10
11
|
*/
|
|
11
12
|
h("li", { role: "listitem", class: "graphic-step", "data-first": first },
|
|
12
13
|
first ? null : (h("wcs-progress-bar", { value: passed ? 100 : 0, "aria-hidden": "true" })),
|
|
13
|
-
h("wcs-button", { style: { 'backgroundColor': 'white' }, "aria-label": step.text, onClick: _ => onClick(step), ref: (el) => {
|
|
14
|
+
h("wcs-button", { style: { 'backgroundColor': 'white' }, "aria-label": (_a = step.ariaLabel) !== null && _a !== void 0 ? _a : step.text, onClick: _ => onClick(step), ref: (el) => {
|
|
14
15
|
active ? el.setAriaAttribute('aria-current', 'step') : el.setAriaAttribute('aria-current', null);
|
|
15
16
|
}, shape: "round", mode: (active || complete) && !step.disable ? 'plain' : 'stroked', disabled: disable }, getButtonContent(step.button, checkOnComplete, complete, active))));
|
|
16
17
|
};
|
|
@@ -80,7 +81,7 @@ const HorizontalStepper = class {
|
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '72063828a00d77fc1bc2a92de8979d096b806786' }, h("ul", { key: 'a5b2de6193a68b6b70b0857d1c50ed1c5c069863', role: "list", class: "steps" }, this.steps.map((step, index) => (h(HorizontalStep, { step: step, passed: index <= this.internalCurrentStepIndex, checkOnComplete: this.checkOnComplete, complete: this.isComplete(step, index), active: index === this.internalCurrentStepIndex, first: index === 0, disable: this.isDisable(step, index), onClick: step => this.wcsHorizontalStepClick.emit({ step, index }) })))), this.renderLabels()));
|
|
84
85
|
}
|
|
85
86
|
isComplete(step, index) {
|
|
86
87
|
return index <= this.internalCurrentStepIndex || step.complete;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"wcs-horizontal-stepper.entry.js","mappings":";;AAcO,MAAM,cAAc,GAA6C,CACpE,EACI,IAAI,EACJ,eAAe,EACf,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,EACP,OAAO,EACV;IACD;;;;;;;IAOI,UAAI,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,cAAc,gBAAa,KAAK;QACrD,KAAK,GAAG,IAAI,IAAI,wBAAkB,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,CAAC,iBAAc,MAAM,GAAoB,CA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CAAC,CAAC,0CAAE,QAAQ,KAAI,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,wBAAwB,CAAC;KACzF;;;;;;;;;;","names":[],"sources":["src/components/horizontal-stepper/horizontal-step.tsx","src/components/horizontal-stepper/horizontal-stepper.scss?tag=wcs-horizontal-stepper&encapsulation=shadow","src/components/horizontal-stepper/horizontal-stepper.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { HorizontalStepConfig, StepButton } from './horizontal-stepper-interface';\n\ninterface HorizontalStepProps {\n step: HorizontalStepConfig;\n checkOnComplete: boolean;\n complete: boolean;\n passed: boolean;\n active: boolean;\n first: boolean;\n disable: boolean;\n onClick: (step: HorizontalStepConfig) => void;\n}\n\nexport const HorizontalStep: FunctionalComponent<HorizontalStepProps> = (\n {\n step,\n checkOnComplete,\n complete,\n passed,\n active,\n first,\n disable,\n onClick\n }) => {\n return (\n /*\n When using list-style: none in CSS, it removes the semantic of the list in Safari.\n So we add role=\"list\" manually to provide semantic to screen readers\n https://www.scottohara.me/blog/2019/01/12/lists-and-safari.html\n https://css-tricks.com/snippets/css/remove-list-markers-without-affecting-semantics/ \n */\n <li role=\"listitem\" class=\"graphic-step\" data-first={first}>\n {first ? null : (<wcs-progress-bar value={passed ? 100 : 0} aria-hidden=\"true\"></wcs-progress-bar>)}\n <wcs-button style={{'backgroundColor': 'white'}}\n aria-label={step.text}\n onClick={_ => onClick(step)}\n ref={(el: HTMLWcsButtonElement) => {\n active ? el.setAriaAttribute('aria-current', 'step') : el.setAriaAttribute('aria-current', null)\n }}\n shape=\"round\" mode={(active || complete) && !step.disable ? 'plain' : 'stroked'}\n disabled={disable}>\n {getButtonContent(step.button, checkOnComplete, complete, active)}\n </wcs-button>\n </li>\n );\n}\n\nconst getButtonContent = (stepButton: StepButton, checkOnComplete: boolean, complete: boolean, active: boolean) => {\n if (checkOnComplete && complete && !active) {\n return (<wcs-mat-icon size=\"m\" icon=\"done\" family=\"outlined\"></wcs-mat-icon>);\n }\n switch (stepButton.kind) {\n case 'Icon':\n return (<wcs-mat-icon size=\"m\" icon={stepButton.iconName}\n family={stepButton.family ? stepButton.family : 'outlined'}></wcs-mat-icon>);\n case 'Text':\n return (stepButton.text);\n }\n}\n\n","@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-horizontal-step-text-color-default: var(--wcs-semantic-color-text-secondary);\n --wcs-horizontal-step-text-color-active: var(--wcs-semantic-color-foreground-brand);\n --wcs-horizontal-step-text-color-disabled: var(--wcs-semantic-color-text-disabled);\n\n\n display: block;\n\n .steps {\n list-style: none;\n margin: 0;\n padding: 0;\n\n display: flex;\n flex-direction: row;\n flex: 1;\n }\n\n .graphic-step {\n display: flex;\n position: relative;\n flex-direction: row;\n flex: 1;\n align-items: center;\n\n wcs-button {\n z-index: 1;\n mix-blend-mode: darken;\n }\n }\n\n .graphic-step[data-first] {\n flex: 0;\n }\n\n wcs-progress-bar {\n --wcs-progress-bar-border-radius: 0;\n flex: 1;\n margin: 0 -1px;\n }\n\n .label-container {\n justify-content: space-between;\n display: flex;\n flex-direction: row;\n margin-top: var(--wcs-semantic-spacing-base);\n }\n\n .label-container > * {\n width: 100%;\n text-align: center;\n flex: 1;\n color: var(--wcs-horizontal-step-text-color-default);\n font-weight: 500;\n\n }\n\n .label-container > *[data-disable] {\n color: var(--wcs-horizontal-step-text-color-disabled);\n }\n\n .label-container > *[data-current] {\n color: var(--wcs-horizontal-step-text-color-active);\n }\n\n .label-container > div[data-first] {\n margin-right: calc(var(--wcs-semantic-size-m, 40px) / 2);\n text-align: left;\n flex: 0.5;\n }\n\n .label-container > div[data-last] {\n margin-left: calc(var(--wcs-semantic-size-m, 40px) / 2);\n text-align: right;\n flex: 0.5;\n }\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch\n} from '@stencil/core';\nimport { HorizontalStepClickEvent, HorizontalStepConfig, HorizontalStepperMode } from './horizontal-stepper-interface';\nimport { HorizontalStep } from './horizontal-step';\n\n/**\n * The horizontal-stepper is a representation of a user’s progress through a series of discrete steps.\n *\n * @cssprop --wcs-horizontal-step-text-color-default - Text color of the step by default\n * @cssprop --wcs-horizontal-step-text-color-active - Text color of the step when active\n * @cssprop --wcs-horizontal-step-text-color-disabled - Text color of step when disabled\n */\n@Component({\n tag: 'wcs-horizontal-stepper',\n styleUrl: 'horizontal-stepper.scss',\n shadow: true,\n})\nexport class HorizontalStepper implements ComponentInterface {\n @Element() private el!: HTMLWcsHorizontalStepperElement;\n /**\n * index of the active step. The index corresponds to the index of the step in the 'steps' list\n */\n @Prop({mutable: true}) currentStep: number = 0;\n /**\n * steps to display\n */\n @Prop() steps: HorizontalStepConfig[];\n /**\n * Specifies if the stepper is in linear mode (the user can only click on the next step)\n * or non-linear (the user can click on any step)\n */\n @Prop() mode: HorizontalStepperMode = 'nonLinear';\n /**\n * Specifies whether a check should be displayed when a step is passed.\n */\n @Prop({ reflect: true }) checkOnComplete: boolean;\n /**\n * Emits when the user selects a new step.\n */\n @Event() wcsHorizontalStepClick!: EventEmitter<HorizontalStepClickEvent>\n\n /**\n * Used to know which current step index is selected (component internal calculations mainly for the animation)\n * @private\n */\n @State() private internalCurrentStepIndex: number;\n\n componentWillLoad(): Promise<void> | void {\n this.internalCurrentStepIndex = this.currentStep;\n if (this.steps.length < 1) {\n throw new Error('You must add at least one step');\n }\n }\n\n @Watch('currentStep')\n onCurrentStepChange(newValue: number, oldValue: number) {\n //Check if the function is called before the component has finished its initialization in which case we do nothing\n if (this.internalCurrentStepIndex !== undefined) {\n const stepInterval = Math.abs(oldValue - newValue);\n this.el.style.setProperty('--wcs-progress-bar-animation-duration', 350 / stepInterval + 'ms');\n if (newValue !== oldValue) {\n for (let i = 0; i < stepInterval; i++) {\n setTimeout(() => {\n this.internalCurrentStepIndex -= (oldValue - newValue) > 0 ? 1 : -1;\n \n if (i === stepInterval - 1) {\n this.el.style.removeProperty('--wcs-progress-bar-animation-duration');\n }\n }, (i * (375 / stepInterval)));\n }\n }\n }\n }\n\n @Method()\n async previous() {\n this.navigateToIndex(this.internalCurrentStepIndex - 1, 'backward');\n }\n\n @Method()\n async next() {\n this.navigateToIndex(this.internalCurrentStepIndex + 1, 'forward');\n }\n\n private navigateToIndex(index: number, direction: 'backward' | 'forward'): void {\n if (index >= 0 && index <= this.steps.length - 1) {\n if (this.steps[index]?.complete || this.steps[index]?.disable) {\n this.navigateToIndex(index + (direction === 'forward' ? 1 : -1), direction)\n } else {\n this.currentStep = index;\n }\n }\n }\n\n render(): any {\n return (\n <Host>\n {/* \n When using list-style: none in CSS, it removes the semantic of the list in Safari.\n So we add role=\"list\" manually to provide semantic to screen readers\n https://www.scottohara.me/blog/2019/01/12/lists-and-safari.html\n https://css-tricks.com/snippets/css/remove-list-markers-without-affecting-semantics/ \n */}\n <ul role=\"list\" class=\"steps\">\n {this.steps.map((step: HorizontalStepConfig, index) =>\n (<HorizontalStep step={step}\n passed={index <= this.internalCurrentStepIndex}\n checkOnComplete={this.checkOnComplete}\n complete={this.isComplete(step, index)}\n active={index === this.internalCurrentStepIndex}\n first={index === 0}\n disable={this.isDisable(step, index)}\n onClick={step => this.wcsHorizontalStepClick.emit({step, index})}\n />\n )\n )}\n </ul>\n {this.renderLabels()}\n </Host>\n );\n }\n\n private isComplete(step: HorizontalStepConfig, index: number) {\n return index <= this.internalCurrentStepIndex || step.complete;\n }\n\n private renderLabels() {\n if (this.steps.map(s => s.text).every(s => !s)) {\n return null;\n } else {\n return <div class=\"label-container\" aria-hidden=\"true\">\n {this.steps.map((step, index) =>\n (<div data-first={index === 0} data-current={index === this.internalCurrentStepIndex && !step.disable}\n data-disable={this.isDisable(step, index)} data-last={index === this.steps.length - 1}>\n <span>{step.text}</span></div>)\n )}\n </div>;\n }\n }\n\n private isDisable(step, index) {\n return step.disable || (this.mode === 'linear' && (!this.isNextPossibleStep(index) && this.internalCurrentStepIndex < index));\n }\n\n private isNextPossibleStep(index) {\n if (index === 0) return true;\n if (this.steps[index - 1]?.disable || this.previousStepIsCompleteAndNotActive(index)) return this.isNextPossibleStep(index - 1);\n return this.internalCurrentStepIndex === index - 1;\n }\n\n private previousStepIsCompleteAndNotActive(index) {\n return this.steps[index - 1]?.complete && index - 1 !== this.internalCurrentStepIndex;\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"wcs-horizontal-stepper.entry.js","mappings":";;AAcO,MAAM,cAAc,GAA6C,CACpE,EACI,IAAI,EACJ,eAAe,EACf,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,EACP,OAAO,EACV;;IACD;;;;;;;IAOI,UAAI,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,cAAc,gBAAa,KAAK;QACrD,KAAK,GAAG,IAAI,IAAI,wBAAkB,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,CAAC,iBAAc,MAAM,GAAoB,CAAC;QACnG,kBAAY,KAAK,EAAE,EAAC,iBAAiB,EAAE,OAAO,EAAC,gBACvB,MAAA,IAAI,CAAC,SAAS,mCAAI,IAAI,CAAC,IAAI,EACvC,OAAO,EAAE,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,EAC3B,GAAG,EAAE,CAAC,EAAwB;gBAC1B,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;aACnG,EACD,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,CAAC,MAAM,IAAI,QAAQ,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,GAAG,SAAS,EAC/E,QAAQ,EAAE,OAAO,IACxB,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,CAAC,CACxD,CACZ,EACP;AACN,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,UAAsB,EAAE,eAAwB,EAAE,QAAiB,EAAE,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,IAAI,CAAC,IAAI,KAAK,QAAQ,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC,CAAC,CAAC;KACjI;IAEO,kBAAkB,CAAC,KAAK;;QAC5B,IAAI,KAAK,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAC7B,IAAI,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,0CAAE,OAAO,KAAI,IAAI,CAAC,kCAAkC,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAChI,OAAO,IAAI,CAAC,wBAAwB,KAAK,KAAK,GAAG,CAAC,CAAC;KACtD;IAEO,kCAAkC,CAAC,KAAK;;QAC5C,OAAO,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,0CAAE,QAAQ,KAAI,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,wBAAwB,CAAC;KACzF;;;;;;;;;;","names":[],"sources":["src/components/horizontal-stepper/horizontal-step.tsx","src/components/horizontal-stepper/horizontal-stepper.scss?tag=wcs-horizontal-stepper&encapsulation=shadow","src/components/horizontal-stepper/horizontal-stepper.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { HorizontalStepConfig, StepButton } from './horizontal-stepper-interface';\n\ninterface HorizontalStepProps {\n step: HorizontalStepConfig;\n checkOnComplete: boolean;\n complete: boolean;\n passed: boolean;\n active: boolean;\n first: boolean;\n disable: boolean;\n onClick: (step: HorizontalStepConfig) => void;\n}\n\nexport const HorizontalStep: FunctionalComponent<HorizontalStepProps> = (\n {\n step,\n checkOnComplete,\n complete,\n passed,\n active,\n first,\n disable,\n onClick\n }) => {\n return (\n /*\n When using list-style: none in CSS, it removes the semantic of the list in Safari.\n So we add role=\"list\" manually to provide semantic to screen readers\n https://www.scottohara.me/blog/2019/01/12/lists-and-safari.html\n https://css-tricks.com/snippets/css/remove-list-markers-without-affecting-semantics/ \n */\n <li role=\"listitem\" class=\"graphic-step\" data-first={first}>\n {first ? null : (<wcs-progress-bar value={passed ? 100 : 0} aria-hidden=\"true\"></wcs-progress-bar>)}\n <wcs-button style={{'backgroundColor': 'white'}}\n aria-label={step.ariaLabel ?? step.text}\n onClick={_ => onClick(step)}\n ref={(el: HTMLWcsButtonElement) => {\n active ? el.setAriaAttribute('aria-current', 'step') : el.setAriaAttribute('aria-current', null)\n }}\n shape=\"round\" mode={(active || complete) && !step.disable ? 'plain' : 'stroked'}\n disabled={disable}>\n {getButtonContent(step.button, checkOnComplete, complete, active)}\n </wcs-button>\n </li>\n );\n}\n\nconst getButtonContent = (stepButton: StepButton, checkOnComplete: boolean, complete: boolean, active: boolean) => {\n if (checkOnComplete && complete && !active) {\n return (<wcs-mat-icon size=\"m\" icon=\"done\" family=\"outlined\"></wcs-mat-icon>);\n }\n switch (stepButton.kind) {\n case 'Icon':\n return (<wcs-mat-icon size=\"m\" icon={stepButton.iconName}\n family={stepButton.family ? stepButton.family : 'outlined'}></wcs-mat-icon>);\n case 'Text':\n return (stepButton.text);\n }\n}\n\n","@import '../../style/focus-outline.scss';\n\n:host {\n --wcs-horizontal-step-text-color-default: var(--wcs-semantic-color-text-secondary);\n --wcs-horizontal-step-text-color-active: var(--wcs-semantic-color-foreground-brand);\n --wcs-horizontal-step-text-color-disabled: var(--wcs-semantic-color-text-disabled);\n\n\n display: block;\n\n .steps {\n list-style: none;\n margin: 0;\n padding: 0;\n\n display: flex;\n flex-direction: row;\n flex: 1;\n }\n\n .graphic-step {\n display: flex;\n position: relative;\n flex-direction: row;\n flex: 1;\n align-items: center;\n\n wcs-button {\n z-index: 1;\n mix-blend-mode: darken;\n }\n }\n\n .graphic-step[data-first] {\n flex: 0;\n }\n\n wcs-progress-bar {\n --wcs-progress-bar-border-radius: 0;\n flex: 1;\n margin: 0 -1px;\n }\n\n .label-container {\n justify-content: space-between;\n display: flex;\n flex-direction: row;\n margin-top: var(--wcs-semantic-spacing-base);\n }\n\n .label-container > * {\n width: 100%;\n text-align: center;\n flex: 1;\n color: var(--wcs-horizontal-step-text-color-default);\n font-weight: 500;\n\n }\n\n .label-container > *[data-disable] {\n color: var(--wcs-horizontal-step-text-color-disabled);\n }\n\n .label-container > *[data-current] {\n color: var(--wcs-horizontal-step-text-color-active);\n }\n\n .label-container > div[data-first] {\n margin-right: calc(var(--wcs-semantic-size-m, 40px) / 2);\n text-align: left;\n flex: 0.5;\n }\n\n .label-container > div[data-last] {\n margin-left: calc(var(--wcs-semantic-size-m, 40px) / 2);\n text-align: right;\n flex: 0.5;\n }\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch\n} from '@stencil/core';\nimport { HorizontalStepClickEvent, HorizontalStepConfig, HorizontalStepperMode } from './horizontal-stepper-interface';\nimport { HorizontalStep } from './horizontal-step';\n\n/**\n * The horizontal-stepper is a representation of a user’s progress through a series of discrete steps.\n *\n * ## Accessibility guidelines 💡\n * > - The `ariaLabel` property is available for every step to provide a more descriptive label for screen readers.\n * > - It is **mandatory** in `linear` mode if the step's content is not descriptive enough (e.g., only a number).\n * \n * @cssprop --wcs-horizontal-step-text-color-default - Text color of the step by default\n * @cssprop --wcs-horizontal-step-text-color-active - Text color of the step when active\n * @cssprop --wcs-horizontal-step-text-color-disabled - Text color of step when disabled\n */\n@Component({\n tag: 'wcs-horizontal-stepper',\n styleUrl: 'horizontal-stepper.scss',\n shadow: true,\n})\nexport class HorizontalStepper implements ComponentInterface {\n @Element() private el!: HTMLWcsHorizontalStepperElement;\n /**\n * index of the active step. The index corresponds to the index of the step in the 'steps' list\n */\n @Prop({mutable: true}) currentStep: number = 0;\n /**\n * steps to display\n */\n @Prop() steps: HorizontalStepConfig[];\n /**\n * Specifies if the stepper is in linear mode (the user can only click on the next step)\n * or non-linear (the user can click on any step)\n */\n @Prop() mode: HorizontalStepperMode = 'nonLinear';\n /**\n * Specifies whether a check should be displayed when a step is passed.\n */\n @Prop({ reflect: true }) checkOnComplete: boolean;\n /**\n * Emits when the user selects a new step.\n */\n @Event() wcsHorizontalStepClick!: EventEmitter<HorizontalStepClickEvent>\n\n /**\n * Used to know which current step index is selected (component internal calculations mainly for the animation)\n * @private\n */\n @State() private internalCurrentStepIndex: number;\n\n componentWillLoad(): Promise<void> | void {\n this.internalCurrentStepIndex = this.currentStep;\n if (this.steps.length < 1) {\n throw new Error('You must add at least one step');\n }\n }\n\n @Watch('currentStep')\n onCurrentStepChange(newValue: number, oldValue: number) {\n //Check if the function is called before the component has finished its initialization in which case we do nothing\n if (this.internalCurrentStepIndex !== undefined) {\n const stepInterval = Math.abs(oldValue - newValue);\n this.el.style.setProperty('--wcs-progress-bar-animation-duration', 350 / stepInterval + 'ms');\n if (newValue !== oldValue) {\n for (let i = 0; i < stepInterval; i++) {\n setTimeout(() => {\n this.internalCurrentStepIndex -= (oldValue - newValue) > 0 ? 1 : -1;\n \n if (i === stepInterval - 1) {\n this.el.style.removeProperty('--wcs-progress-bar-animation-duration');\n }\n }, (i * (375 / stepInterval)));\n }\n }\n }\n }\n\n @Method()\n async previous() {\n this.navigateToIndex(this.internalCurrentStepIndex - 1, 'backward');\n }\n\n @Method()\n async next() {\n this.navigateToIndex(this.internalCurrentStepIndex + 1, 'forward');\n }\n\n private navigateToIndex(index: number, direction: 'backward' | 'forward'): void {\n if (index >= 0 && index <= this.steps.length - 1) {\n if (this.steps[index]?.complete || this.steps[index]?.disable) {\n this.navigateToIndex(index + (direction === 'forward' ? 1 : -1), direction)\n } else {\n this.currentStep = index;\n }\n }\n }\n\n render(): any {\n return (\n <Host>\n {/* \n When using list-style: none in CSS, it removes the semantic of the list in Safari.\n So we add role=\"list\" manually to provide semantic to screen readers\n https://www.scottohara.me/blog/2019/01/12/lists-and-safari.html\n https://css-tricks.com/snippets/css/remove-list-markers-without-affecting-semantics/ \n */}\n <ul role=\"list\" class=\"steps\">\n {this.steps.map((step: HorizontalStepConfig, index) =>\n (<HorizontalStep step={step}\n passed={index <= this.internalCurrentStepIndex}\n checkOnComplete={this.checkOnComplete}\n complete={this.isComplete(step, index)}\n active={index === this.internalCurrentStepIndex}\n first={index === 0}\n disable={this.isDisable(step, index)}\n onClick={step => this.wcsHorizontalStepClick.emit({step, index})}\n />\n )\n )}\n </ul>\n {this.renderLabels()}\n </Host>\n );\n }\n\n private isComplete(step: HorizontalStepConfig, index: number) {\n return index <= this.internalCurrentStepIndex || step.complete;\n }\n\n private renderLabels() {\n if (this.steps.map(s => s.text).every(s => !s)) {\n return null;\n } else {\n return <div class=\"label-container\" aria-hidden=\"true\">\n {this.steps.map((step, index) =>\n (<div data-first={index === 0} data-current={index === this.internalCurrentStepIndex && !step.disable}\n data-disable={this.isDisable(step, index)} data-last={index === this.steps.length - 1}>\n <span>{step.text}</span></div>)\n )}\n </div>;\n }\n }\n\n private isDisable(step, index) {\n return step.disable || (this.mode === 'linear' && (!this.isNextPossibleStep(index) && this.internalCurrentStepIndex < index));\n }\n\n private isNextPossibleStep(index) {\n if (index === 0) return true;\n if (this.steps[index - 1]?.disable || this.previousStepIsCompleteAndNotActive(index)) return this.isNextPossibleStep(index - 1);\n return this.internalCurrentStepIndex === index - 1;\n }\n\n private previousStepIsCompleteAndNotActive(index) {\n return this.steps[index - 1]?.complete && index - 1 !== this.internalCurrentStepIndex;\n }\n}\n"],"version":3}
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
|
2
2
|
import { i as isFocusable, a as isElementFocused } from './accessibility-069640cf.js';
|
|
3
3
|
import { i as inheritAriaAttributes, a as inheritAttributes, s as setOrRemoveAttribute, n as isTabKey } from './helpers-ece6a2d3.js';
|
|
4
4
|
|
|
5
|
-
const modalCss = "wcs-modal{--wcs-modal-backdrop-color:var(--wcs-semantic-color-background-backdrop);--wcs-modal-max-height:80%;--wcs-modal-background-color:var(--wcs-semantic-color-background-surface-primary);--wcs-modal-border-radius:var(--wcs-semantic-border-radius-base);--wcs-modal-padding:calc(3 * var(--wcs-semantic-spacing-base));--wcs-modal-border-width:var(--wcs-semantic-border-width-default);--wcs-modal-border-color:var(--wcs-semantic-color-border-secondary);--wcs-modal-title-margin-bottom:var(--wcs-semantic-spacing-large);--wcs-modal-title-font-size:var(--wcs-semantic-font-size-heading-4);--wcs-modal-title-font-weight:var(--wcs-semantic-font-weight-heavy);--wcs-modal-title-line-height:var(--wcs-semantic-font-line-height-medium);--wcs-modal-actions-margin-top:var(--wcs-semantic-spacing-large);--wcs-modal-width-s:288px;--wcs-modal-width-m:480px;--wcs-modal-width-l:864px;--wcs-modal-width-xl:1200px;z-index:999;position:fixed;top:0;bottom:0;left:0;right:0;display:none;background:var(--wcs-modal-backdrop-color)}wcs-modal[show]{display:flex;height:100vh;width:100vw;align-items:center;justify-content:center}wcs-modal[without-backdrop]{background-color:unset}wcs-modal[without-backdrop] .wcs-modal-container{border:solid var(--wcs-modal-border-width) var(--wcs-modal-border-color)}.wcs-modal-container{max-height:var(--wcs-modal-max-height, 80%);background-color:var(--wcs-modal-background-color);display:grid;grid-template-columns:100%;grid-template-rows:auto 1fr auto;box-sizing:border-box;pointer-events:auto;background-clip:padding-box;border-radius:var(--wcs-modal-border-radius);z-index:20000;padding:var(--wcs-modal-padding);width:var(--wcs-modal-width-m)}.wcs-modal-container[data-size=s]{width:var(--wcs-modal-width-s)}.wcs-modal-container[data-size=m]{width:var(--wcs-modal-width-m)}.wcs-modal-container[data-size=l]{width:var(--wcs-modal-width-l)}.wcs-modal-container[data-size=xl]{width:var(--wcs-modal-width-xl)}.wcs-modal-header{margin-bottom:var(--wcs-modal-title-margin-bottom);display:flex;align-items:center;justify-content:space-between}.wcs-modal-header h1{font-size:var(--wcs-modal-title-font-size);font-weight:var(--wcs-modal-title-font-weight);line-height:var(--wcs-modal-title-line-height);margin:0}.wcs-modal-content{overflow-y:var(--wcs-modal-overflow-y, auto)}.wcs-modal-actions{margin-top:var(--wcs-modal-actions-margin-top);display:flex;justify-content:flex-end}";
|
|
5
|
+
const modalCss = "wcs-modal{--wcs-modal-backdrop-color:var(--wcs-semantic-color-background-backdrop);--wcs-modal-max-height:80%;--wcs-modal-background-color:var(--wcs-semantic-color-background-surface-primary);--wcs-modal-border-radius:var(--wcs-semantic-border-radius-base);--wcs-modal-padding:calc(3 * var(--wcs-semantic-spacing-base));--wcs-modal-border-width:var(--wcs-semantic-border-width-default);--wcs-modal-border-color:var(--wcs-semantic-color-border-secondary);--wcs-modal-title-margin-bottom:var(--wcs-semantic-spacing-large);--wcs-modal-title-font-size:var(--wcs-semantic-font-size-heading-4);--wcs-modal-title-font-weight:var(--wcs-semantic-font-weight-heavy);--wcs-modal-title-line-height:var(--wcs-semantic-font-line-height-medium);--wcs-modal-actions-margin-top:var(--wcs-semantic-spacing-large);--wcs-modal-width-s:288px;--wcs-modal-width-m:480px;--wcs-modal-width-l:864px;--wcs-modal-width-xl:1200px;z-index:999;position:fixed;top:0;bottom:0;left:0;right:0;display:none;background:var(--wcs-modal-backdrop-color)}wcs-modal[show]{display:flex;height:100vh;width:100vw;align-items:center;justify-content:center}wcs-modal[without-backdrop]{background-color:unset}wcs-modal[without-backdrop] .wcs-modal-container{border:solid var(--wcs-modal-border-width) var(--wcs-modal-border-color)}wcs-modal[hide-actions] .wcs-modal-actions{display:none}.wcs-modal-container{max-height:var(--wcs-modal-max-height, 80%);background-color:var(--wcs-modal-background-color);display:grid;grid-template-columns:100%;grid-template-rows:auto 1fr auto;box-sizing:border-box;pointer-events:auto;background-clip:padding-box;border-radius:var(--wcs-modal-border-radius);z-index:20000;padding:var(--wcs-modal-padding);width:var(--wcs-modal-width-m)}.wcs-modal-container[data-size=s]{width:var(--wcs-modal-width-s)}.wcs-modal-container[data-size=m]{width:var(--wcs-modal-width-m)}.wcs-modal-container[data-size=l]{width:var(--wcs-modal-width-l)}.wcs-modal-container[data-size=xl]{width:var(--wcs-modal-width-xl)}.wcs-modal-header{margin-bottom:var(--wcs-modal-title-margin-bottom);display:flex;align-items:center;justify-content:space-between}.wcs-modal-header h1{font-size:var(--wcs-modal-title-font-size);font-weight:var(--wcs-modal-title-font-weight);line-height:var(--wcs-modal-title-line-height);margin:0}.wcs-modal-content{overflow-y:var(--wcs-modal-overflow-y, auto)}.wcs-modal-actions{margin-top:var(--wcs-modal-actions-margin-top);display:flex;justify-content:flex-end}";
|
|
6
6
|
const WcsModalStyle0 = modalCss;
|
|
7
7
|
|
|
8
8
|
const MODAL_INHERITED_ATTRS = [];
|
|
@@ -135,7 +135,7 @@ const Modal = class {
|
|
|
135
135
|
}
|
|
136
136
|
render() {
|
|
137
137
|
const modalTitleId = `wcs-modal-title-${this.modalId}`;
|
|
138
|
-
return (h(Host, { key: 'e609fe2024b73cab0bed97c0d3b7012d8deba893' }, h("div", Object.assign({ key: '23007c4ad4971263f7fd99d0e594216cd112f6ea', class: "wcs-modal-container", "data-size": this.size, "aria-modal": "true", role: "dialog", "aria-labelledby": modalTitleId, ref: (el) => (this.nativeDivDialog = el) }, this.inheritedAttributes), h("div", { key: 'bc3e2ead8e3e73da31882c5e87cde2780d9ef2f9', class: "wcs-modal-header" }, h("h1", { key: '87561fc92b0990d00e06463afc111e9bdeab6f20', id: modalTitleId }, h("slot", { key: 'dbf6d932257e7a264206ddf7caea8a80e4b2b069', name: "header" })), this.showCloseButton && (h("wcs-button", { key: '97036ea40d111c5ac737b1e3f789571cd524cb2d', shape: "round", mode: "clear", id: "wcs-modal-close-button", "aria-label": this.closeButtonAriaLabel, onClick: ($event) => this.onCloseButtonClick($event) }, h("wcs-mat-icon", { key: '24d6b531e788c2760c66804df96037714c9f854b', icon: "close" })))), h("div", { key: '34d9ddf3c4527395864a238f329d7b499eb9791b', class: "wcs-modal-content" }, h("slot", { key: '5bbd76fc7de9bc6f5aaec7257e7c73995d3e1447', onSlotchange: () => this.handleSlotContentChange() })),
|
|
138
|
+
return (h(Host, { key: 'e609fe2024b73cab0bed97c0d3b7012d8deba893' }, h("div", Object.assign({ key: '23007c4ad4971263f7fd99d0e594216cd112f6ea', class: "wcs-modal-container", "data-size": this.size, "aria-modal": "true", role: "dialog", "aria-labelledby": modalTitleId, ref: (el) => (this.nativeDivDialog = el) }, this.inheritedAttributes), h("div", { key: 'bc3e2ead8e3e73da31882c5e87cde2780d9ef2f9', class: "wcs-modal-header" }, h("h1", { key: '87561fc92b0990d00e06463afc111e9bdeab6f20', id: modalTitleId }, h("slot", { key: 'dbf6d932257e7a264206ddf7caea8a80e4b2b069', name: "header" })), this.showCloseButton && (h("wcs-button", { key: '97036ea40d111c5ac737b1e3f789571cd524cb2d', shape: "round", mode: "clear", id: "wcs-modal-close-button", "aria-label": this.closeButtonAriaLabel, onClick: ($event) => this.onCloseButtonClick($event) }, h("wcs-mat-icon", { key: '24d6b531e788c2760c66804df96037714c9f854b', icon: "close" })))), h("div", { key: '34d9ddf3c4527395864a238f329d7b499eb9791b', class: "wcs-modal-content" }, h("slot", { key: '5bbd76fc7de9bc6f5aaec7257e7c73995d3e1447', onSlotchange: () => this.handleSlotContentChange() })), h("div", { key: '7c332e9d1c1b19b65fabb6f52bc14ab0ed9f4803', class: "wcs-modal-actions" }, h("slot", { key: '4c44f2337893ba9e8c852a1b8b16beab9da87e4e', name: "actions" })))));
|
|
139
139
|
}
|
|
140
140
|
get el() { return getElement(this); }
|
|
141
141
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"wcs-modal.entry.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,21EAA21E,CAAC;AAC72E,uBAAe,QAAQ;;ACgBvB,MAAM,qBAAqB,GAAG,EAAE,CAAC;MA+CpB,KAAK;;;;QAGN,wBAAmB,GAAyB,EAAE,CAAC;;;;;QAuE/C,YAAO,GAAW,QAAQ,EAAE,CAAC;;;;;;;QAU7B,+BAA0B,GAAY,KAAK,CAAC;;;;;;;;;QAS5C,wBAAmB,GAAY,KAAK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ACZ,EAAE,EAAC,wBAAwB,gBACf,IAAI,CAAC,oBAAoB,EACrC,OAAO,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAC5D,qEAAc,IAAI,EAAC,OAAO,GAAgB,CACjC,CAAC,CAGhB,EACN,4DAAK,KAAK,EAAC,mBAAmB,IAC1B,6DAAM,YAAY,EAAE,MAAM,IAAI,CAAC,uBAAuB,EAAE,GAAS,CAC/D,EACL,CAAC,IAAI,CAAC,WAAW,KACd,4DAAK,KAAK,EAAC,mBAAmB,IAC1B,6DAAM,IAAI,EAAC,SAAS,GAAQ,CAC1B,CAAC,CAET,CACH,EACT;KACL;;;;;;AAGL,IAAI,QAAQ,GAAG,CAAC,CAAC;;;;;","names":[],"sources":["src/components/modal/modal.scss?tag=wcs-modal","src/components/modal/modal.tsx"],"sourcesContent":["wcs-modal {\n --wcs-modal-backdrop-color: var(--wcs-semantic-color-background-backdrop);\n --wcs-modal-max-height: 80%;\n --wcs-modal-background-color: var(--wcs-semantic-color-background-surface-primary);\n --wcs-modal-border-radius: var(--wcs-semantic-border-radius-base);\n --wcs-modal-padding: calc(3 * var(--wcs-semantic-spacing-base));\n --wcs-modal-border-width: var(--wcs-semantic-border-width-default);\n --wcs-modal-border-color: var(--wcs-semantic-color-border-secondary);\n --wcs-modal-title-margin-bottom: var(--wcs-semantic-spacing-large);\n --wcs-modal-title-font-size: var(--wcs-semantic-font-size-heading-4);\n --wcs-modal-title-font-weight: var(--wcs-semantic-font-weight-heavy);\n --wcs-modal-title-line-height: var(--wcs-semantic-font-line-height-medium);\n --wcs-modal-actions-margin-top: var(--wcs-semantic-spacing-large);\n\n // Specific component level tokens\n --wcs-modal-width-s: 288px;\n --wcs-modal-width-m: 480px;\n --wcs-modal-width-l: 864px;\n --wcs-modal-width-xl: 1200px;\n\n z-index: 999;\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: var(--wcs-modal-backdrop-color);\n}\n\nwcs-modal[show] {\n display: flex;\n height: 100vh;\n width: 100vw;\n align-items: center;\n justify-content: center;\n}\n\n/**\nBackdrop\n */\nwcs-modal[without-backdrop] {\n background-color: unset;\n\n .wcs-modal-container {\n border: solid var(--wcs-modal-border-width) var(--wcs-modal-border-color);\n }\n}\n\n/**\nModal window\n */\n.wcs-modal-container {\n max-height: var(--wcs-modal-max-height, 80%);\n background-color: var(--wcs-modal-background-color);\n display: grid;\n grid-template-columns: 100%;\n grid-template-rows: auto 1fr auto;\n box-sizing: border-box;\n pointer-events: auto;\n background-clip: padding-box;\n border-radius: var(--wcs-modal-border-radius);\n z-index: 20000;\n padding: var(--wcs-modal-padding);\n\n width: var(--wcs-modal-width-m); // Default size\n}\n\n.wcs-modal-container[data-size=s] {\n width: var(--wcs-modal-width-s);\n}\n\n.wcs-modal-container[data-size=m] {\n width: var(--wcs-modal-width-m);\n}\n\n.wcs-modal-container[data-size=l] {\n width: var(--wcs-modal-width-l);\n}\n\n.wcs-modal-container[data-size=xl] {\n width: var(--wcs-modal-width-xl);\n}\n\n.wcs-modal-header {\n /* h1 for semantic but h3 for style */\n h1 {\n font-size: var(--wcs-modal-title-font-size);\n font-weight: var(--wcs-modal-title-font-weight);\n line-height: var(--wcs-modal-title-line-height);\n margin: 0;\n }\n\n margin-bottom: var(--wcs-modal-title-margin-bottom);\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.wcs-modal-content {\n overflow-y: var(--wcs-modal-overflow-y, auto);\n}\n\n.wcs-modal-actions {\n margin-top: var(--wcs-modal-actions-margin-top);\n display: flex;\n justify-content: flex-end;\n}\n","import {\n Element,\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n ComponentInterface,\n Watch, Method\n} from '@stencil/core';\nimport { ModalSize } from './modal-interface';\nimport { isElementFocused, isFocusable } from \"../../utils/accessibility\";\nimport { inheritAriaAttributes, inheritAttributes, isTabKey, setOrRemoveAttribute } from \"../../utils/helpers\";\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst MODAL_INHERITED_ATTRS = [];\n\n/**\n * The modal component (also named dialog or popup) is an interface element that appears on top of the page content.\n * Use it to show a message, a confirmation dialog, or any other content like forms.\n *\n * ## Accessibility guidelines 💡\n * > - Modal element has `role=\"dialog\"` and `aria-modal=\"true\"`\n * > - Keyboard navigation is trapped inside the modal\n * > - It is mandatory to set the `modal-trigger-controls-id` to the id of the element that opens the dialog, in order\n * > to focus it upon dialog dismissal.\n * > - On modal opening, the default behaviour is to focus the first focusable element. If you want to change the initial \n * > behaviour, you have to use `modal-element-id-to-focus-on-opening` attribute to set the id of the inner modal element you \n * > want to focus. You will see a story as example below\n * > - The modal can be closed at any time by pressing the Escape key.\n * >\n * > - More info : https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n *\n * @cssprop --wcs-modal-max-height - Max height of the main container\n * @cssprop --wcs-modal-overflow-y - Overflow-y of the content\n *\n * @cssprop --wcs-modal-backdrop-color - Backdrop color of the modal\n * @cssprop --wcs-modal-max-height - Max height of the main container\n * @cssprop --wcs-modal-background-color - Background color of the modal\n * @cssprop --wcs-modal-border-radius - Border radius of the modal\n * @cssprop --wcs-modal-padding - Padding inside the modal\n * @cssprop --wcs-modal-border-width - Border width of the modal\n * @cssprop --wcs-modal-border-color - Border color of the modal\n * @cssprop --wcs-modal-title-margin-bottom - Margin bottom of the modal title\n * @cssprop --wcs-modal-title-font-size - Font size of the modal title\n * @cssprop --wcs-modal-title-font-weight - Font weight of the modal title\n * @cssprop --wcs-modal-title-line-height - Line height of the modal title\n * @cssprop --wcs-modal-actions-margin-top - Margin top of the modal actions\n * @cssprop --wcs-modal-width-s - Width of the modal for size small\n * @cssprop --wcs-modal-width-m - Width of the modal for size medium\n * @cssprop --wcs-modal-width-l - Width of the modal for size large\n * @cssprop --wcs-modal-width-xl - Width of the modal for size extra large\n * \n * @slot <no-name> Main container slot\n * @slot header Header container slot (for title)\n * @slot actions Actions container slot (for buttons)\n */\n@Component({\n tag: 'wcs-modal',\n styleUrl: 'modal.scss',\n shadow: false,\n})\nexport class Modal implements ComponentInterface, MutableAriaAttribute {\n @Element() private el: HTMLElement;\n private nativeDivDialog!: HTMLDivElement;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * Specifies whether the component should display a backdrop on the entire page\n */\n @Prop({reflect: true}) withoutBackdrop: boolean = false;\n\n /**\n * Displays the modal\n */\n @Prop({reflect: true, mutable: true}) show: boolean = false;\n\n /**\n * Triggered when the user leaves the dialog with the closing button.\n */\n @Event() wcsDialogClosed: EventEmitter<void>;\n\n /**\n * Specifies whether the component should display a close button.\n * if false, it won't close the modal when the escape key is pressed.\n */\n @Prop({reflect: true}) showCloseButton: boolean = false;\n\n /**\n * Specifies the aria-label present on the close button when the modal is opened. \n * Only use when `showCloseButton` is `true`.\n */\n @Prop() closeButtonAriaLabel: string = 'Fermer';\n\n /**\n * There are multiple sizes for modals. The default size is medium (m), however other sizes are available. Select the\n * size best suited for the content and screen size displaying the modal. Remember to test responsiveness.\n */\n @Prop() size: ModalSize = 'm';\n\n /**\n * Specifies whether the component should hide the actions slot or not\n */\n @Prop({reflect: true}) hideActions: boolean = false;\n\n /**\n * Specifies which element id controls the modal\n * @private\n */\n @Prop() modalTriggerControlsId: string;\n /**\n * The ID of the element to automatically focus when the modal opens.\n * \n * If this property is not set and `disableAutoFocus` is false, the modal will\n * automatically focus the first focusable element within its content.\n * This follows accessibility best practices by ensuring keyboard navigation\n * starts from a logical point when the modal opens.\n * \n * @example\n * <wcs-modal initial-focus-element=\"cancel-button\"></wcs-modal>\n */\n @Prop() initialFocusElementId?: string = undefined;\n\n /**\n * Disables automatic focus behavior when the modal opens.\n * \n * When set to true, the modal will not automatically focus any element upon opening.\n * Use this property with caution, as managing focus is important for accessibility.\n * Consider providing an alternative focus management strategy if disabling the default behavior.\n */\n @Prop({ reflect: true }) disableAutoFocus: boolean = false;\n\n /**\n * Give an unique id\n * @private\n */\n private modalId: number = modalIds++;\n\n private firstFocusableElement: HTMLElement;\n private lastFocusableElement: HTMLElement;\n /**\n * This attribute is used to determine whether the show attribute has changed since the last rendering. \n * This allows us to call the focus method on the first element of the modal when the show attribute changes to true. \n * This call is made in the componentDidRender method\n * @private\n */\n private showAttributeChangedMarker: boolean = false;\n /**\n * This attribute is used to determine if the modal has been closed for the first time since its last activation.\n * It is set to 'true' when the modal is first closed, and will be reset to 'false' when the modal is shown again.\n * This state is important for accessibility reasons in order to focus the modal trigger element (like the button \n * which controls the modal)\n *\n * @private\n */\n private hasBeenClosedBefore: boolean = false;\n\n componentWillLoad(): Promise<void> | void {\n if (!this.modalTriggerControlsId) {\n console.warn('wcs-modal: You must provide the modal-trigger-controls-id attribute to the modal to make it to work properly');\n }\n\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, MODAL_INHERITED_ATTRS),\n };\n }\n\n componentDidLoad() {\n this.updateFocusableElements();\n }\n\n componentDidRender() {\n this.updateFocusableElements();\n if (this.showAttributeChangedMarker) {\n this.showAttributeChangedMarker = false;\n \n if(this.disableAutoFocus) {\n return;\n }\n \n if(!this.initialFocusElementId) {\n this.firstFocusableElement?.focus();\n } else {\n const modalElementToFocusOnOpening = document.getElementById(this.initialFocusElementId);\n if(!modalElementToFocusOnOpening) {\n console.warn(`wcs-modal: Unable to focus element - ID '${this.initialFocusElementId}' not found in DOM`);\n }\n \n modalElementToFocusOnOpening?.focus();\n }\n }\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeDivDialog, attr, value);\n }\n \n @Watch(\"show\")\n onShowChange() {\n if(this.show) {\n this.hasBeenClosedBefore = false;\n this.showAttributeChangedMarker = true;\n } else {\n // if we already made actions when the modal was firstly closed, we do nothing\n if(this.hasBeenClosedBefore) {\n return;\n }\n \n this.hasBeenClosedBefore = true;\n\n if(this.modalTriggerControlsId) {\n const modalTriggerControlsHtmlElement = document.getElementById(this.modalTriggerControlsId);\n if(!modalTriggerControlsHtmlElement) {\n console.warn(`wcs-modal: Element with id '${this.modalTriggerControlsId}' could not be found`);\n }\n modalTriggerControlsHtmlElement?.focus();\n }\n }\n }\n\n private updateFocusableElements() {\n const focusableElements = Array.from(this.el.querySelectorAll('*'))\n .filter(element => isFocusable(element));\n\n this.firstFocusableElement = focusableElements.length > 0 && focusableElements[0] as HTMLElement;\n this.lastFocusableElement = focusableElements.length > 0 && focusableElements[focusableElements.length - 1] as HTMLElement;\n }\n \n private close() {\n // If the modal isn't shown, we don't do anything\n if (this.show) {\n this.show = false;\n this.wcsDialogClosed.emit();\n }\n }\n\n @Listen('keydown', {target: 'document'})\n onKeyDown(event: KeyboardEvent) {\n if (this.show && this.showCloseButton && event.key === 'Escape') {\n this.close();\n }\n\n if (this.show) {\n if (isTabKey(event)) {\n this.updateFocusableElements(); // XXX: maybe a performance issue\n const firstElement = this.firstFocusableElement;\n const lastElement = this.lastFocusableElement;\n\n if (event.shiftKey && isElementFocused(firstElement)) {\n event.preventDefault();\n lastElement.focus();\n } else if (!event.shiftKey && isElementFocused(lastElement)) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n }\n }\n\n private onCloseButtonClick(_: MouseEvent) {\n this.close();\n }\n\n private handleSlotContentChange() {\n this.updateFocusableElements();\n }\n\n render() {\n const modalTitleId = `wcs-modal-title-${this.modalId}`;\n return (\n <Host>\n <div class=\"wcs-modal-container\"\n data-size={this.size}\n aria-modal=\"true\"\n role={\"dialog\"}\n aria-labelledby={modalTitleId}\n ref={(el) => (this.nativeDivDialog = el)}\n {...this.inheritedAttributes}\n >\n <div class=\"wcs-modal-header\">\n <h1 id={modalTitleId}>\n <slot name=\"header\"></slot>\n </h1>\n {this.showCloseButton && (\n <wcs-button shape=\"round\" \n mode=\"clear\" \n id=\"wcs-modal-close-button\"\n aria-label={this.closeButtonAriaLabel}\n onClick={($event) => this.onCloseButtonClick($event)}>\n <wcs-mat-icon icon=\"close\"></wcs-mat-icon>\n </wcs-button>)\n }\n\n </div>\n <div class=\"wcs-modal-content\">\n <slot onSlotchange={() => this.handleSlotContentChange()}></slot>\n </div>\n {!this.hideActions && (\n <div class=\"wcs-modal-actions\">\n <slot name=\"actions\"></slot>\n </div>)\n }\n </div>\n </Host>\n );\n }\n}\n\nlet modalIds = 0;\n"],"version":3}
|
|
1
|
+
{"file":"wcs-modal.entry.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,m5EAAm5E,CAAC;AACr6E,uBAAe,QAAQ;;ACgBvB,MAAM,qBAAqB,GAAG,EAAE,CAAC;MA+CpB,KAAK;;;;QAGN,wBAAmB,GAAyB,EAAE,CAAC;;;;;QAuE/C,YAAO,GAAW,QAAQ,EAAE,CAAC;;;;;;;QAU7B,+BAA0B,GAAY,KAAK,CAAC;;;;;;;;;QAS5C,wBAAmB,GAAY,KAAK,CAAC;+BArFK,KAAK;oBAKD,KAAK;+BAWT,KAAK;oCAMhB,QAAQ;oBAMrB,GAAG;2BAKiB,KAAK;;qCAkBV,SAAS;gCASG,KAAK;;IA2B1D,iBAAiB;QACb,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC9B,OAAO,CAAC,IAAI,CAAC,8GAA8G,CAAC,CAAC;SAChI;QAED,IAAI,CAAC,mBAAmB,mCACjB,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,GAC9B,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,CACvD,CAAC;KACL;IAED,gBAAgB;QACZ,IAAI,CAAC,uBAAuB,EAAE,CAAC;KAClC;IAED,kBAAkB;;QACd,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,0BAA0B,EAAE;YACjC,IAAI,CAAC,0BAA0B,GAAG,KAAK,CAAC;YAExC,IAAG,IAAI,CAAC,gBAAgB,EAAE;gBACtB,OAAO;aACV;YAED,IAAG,CAAC,IAAI,CAAC,qBAAqB,EAAE;gBAC5B,MAA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QAC3B,IAAI,CAAC,uBAAuB,EAAE,CAAC;KAClC;IAED,MAAM;QACF,MAAM,YAAY,GAAG,mBAAmB,IAAI,CAAC,OAAO,EAAE,CAAC;QACvD,QACI,EAAC,IAAI,uDACD,0EAAK,KAAK,EAAC,qBAAqB,eAChB,IAAI,CAAC,IAAI,gBACT,MAAM,EACjB,IAAI,EAAE,QAAQ,qBACG,YAAY,EAC7B,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC,IACpC,IAAI,CAAC,mBAAmB,GAE7B,4DAAK,KAAK,EAAC,kBAAkB,IACzB,2DAAI,EAAE,EAAE,YAAY,IAChB,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CAC1B,EACJ,IAAI,CAAC,eAAe,KACjB,mEAAY,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,OAAO,EACZ,EAAE,EAAC,wBAAwB,gBACf,IAAI,CAAC,oBAAoB,EACrC,OAAO,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAC5D,qEAAc,IAAI,EAAC,OAAO,GAAgB,CACjC,CAAC,CAGhB,EACN,4DAAK,KAAK,EAAC,mBAAmB,IAC1B,6DAAM,YAAY,EAAE,MAAM,IAAI,CAAC,uBAAuB,EAAE,GAAS,CAC/D,EACN,4DAAK,KAAK,EAAC,mBAAmB,IAC1B,6DAAM,IAAI,EAAC,SAAS,GAAQ,CAC1B,CACJ,CACH,EACT;KACL;;;;;;AAGL,IAAI,QAAQ,GAAG,CAAC,CAAC;;;;;","names":[],"sources":["src/components/modal/modal.scss?tag=wcs-modal","src/components/modal/modal.tsx"],"sourcesContent":["wcs-modal {\n --wcs-modal-backdrop-color: var(--wcs-semantic-color-background-backdrop);\n --wcs-modal-max-height: 80%;\n --wcs-modal-background-color: var(--wcs-semantic-color-background-surface-primary);\n --wcs-modal-border-radius: var(--wcs-semantic-border-radius-base);\n --wcs-modal-padding: calc(3 * var(--wcs-semantic-spacing-base));\n --wcs-modal-border-width: var(--wcs-semantic-border-width-default);\n --wcs-modal-border-color: var(--wcs-semantic-color-border-secondary);\n --wcs-modal-title-margin-bottom: var(--wcs-semantic-spacing-large);\n --wcs-modal-title-font-size: var(--wcs-semantic-font-size-heading-4);\n --wcs-modal-title-font-weight: var(--wcs-semantic-font-weight-heavy);\n --wcs-modal-title-line-height: var(--wcs-semantic-font-line-height-medium);\n --wcs-modal-actions-margin-top: var(--wcs-semantic-spacing-large);\n\n // Specific component level tokens\n --wcs-modal-width-s: 288px;\n --wcs-modal-width-m: 480px;\n --wcs-modal-width-l: 864px;\n --wcs-modal-width-xl: 1200px;\n\n z-index: 999;\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: var(--wcs-modal-backdrop-color);\n}\n\nwcs-modal[show] {\n display: flex;\n height: 100vh;\n width: 100vw;\n align-items: center;\n justify-content: center;\n}\n\n/**\nBackdrop\n */\nwcs-modal[without-backdrop] {\n background-color: unset;\n\n .wcs-modal-container {\n border: solid var(--wcs-modal-border-width) var(--wcs-modal-border-color);\n }\n}\n\nwcs-modal[hide-actions] {\n .wcs-modal-actions {\n display: none;\n }\n}\n\n/**\nModal window\n */\n.wcs-modal-container {\n max-height: var(--wcs-modal-max-height, 80%);\n background-color: var(--wcs-modal-background-color);\n display: grid;\n grid-template-columns: 100%;\n grid-template-rows: auto 1fr auto;\n box-sizing: border-box;\n pointer-events: auto;\n background-clip: padding-box;\n border-radius: var(--wcs-modal-border-radius);\n z-index: 20000;\n padding: var(--wcs-modal-padding);\n\n width: var(--wcs-modal-width-m); // Default size\n}\n\n.wcs-modal-container[data-size=s] {\n width: var(--wcs-modal-width-s);\n}\n\n.wcs-modal-container[data-size=m] {\n width: var(--wcs-modal-width-m);\n}\n\n.wcs-modal-container[data-size=l] {\n width: var(--wcs-modal-width-l);\n}\n\n.wcs-modal-container[data-size=xl] {\n width: var(--wcs-modal-width-xl);\n}\n\n.wcs-modal-header {\n /* h1 for semantic but h3 for style */\n h1 {\n font-size: var(--wcs-modal-title-font-size);\n font-weight: var(--wcs-modal-title-font-weight);\n line-height: var(--wcs-modal-title-line-height);\n margin: 0;\n }\n\n margin-bottom: var(--wcs-modal-title-margin-bottom);\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.wcs-modal-content {\n overflow-y: var(--wcs-modal-overflow-y, auto);\n}\n\n.wcs-modal-actions {\n margin-top: var(--wcs-modal-actions-margin-top);\n display: flex;\n justify-content: flex-end;\n}\n","import {\n Element,\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n ComponentInterface,\n Watch, Method\n} from '@stencil/core';\nimport { ModalSize } from './modal-interface';\nimport { isElementFocused, isFocusable } from \"../../utils/accessibility\";\nimport { inheritAriaAttributes, inheritAttributes, isTabKey, setOrRemoveAttribute } from \"../../utils/helpers\";\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst MODAL_INHERITED_ATTRS = [];\n\n/**\n * The modal component (also named dialog or popup) is an interface element that appears on top of the page content.\n * Use it to show a message, a confirmation dialog, or any other content like forms.\n *\n * ## Accessibility guidelines 💡\n * > - Modal element has `role=\"dialog\"` and `aria-modal=\"true\"`\n * > - Keyboard navigation is trapped inside the modal\n * > - It is mandatory to set the `modal-trigger-controls-id` to the id of the element that opens the dialog, in order\n * > to focus it upon dialog dismissal.\n * > - On modal opening, the default behaviour is to focus the first focusable element. If you want to change the initial \n * > behaviour, you have to use `modal-element-id-to-focus-on-opening` attribute to set the id of the inner modal element you \n * > want to focus. You will see a story as example below\n * > - The modal can be closed at any time by pressing the Escape key.\n * >\n * > - More info : https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n *\n * @cssprop --wcs-modal-max-height - Max height of the main container\n * @cssprop --wcs-modal-overflow-y - Overflow-y of the content\n *\n * @cssprop --wcs-modal-backdrop-color - Backdrop color of the modal\n * @cssprop --wcs-modal-max-height - Max height of the main container\n * @cssprop --wcs-modal-background-color - Background color of the modal\n * @cssprop --wcs-modal-border-radius - Border radius of the modal\n * @cssprop --wcs-modal-padding - Padding inside the modal\n * @cssprop --wcs-modal-border-width - Border width of the modal\n * @cssprop --wcs-modal-border-color - Border color of the modal\n * @cssprop --wcs-modal-title-margin-bottom - Margin bottom of the modal title\n * @cssprop --wcs-modal-title-font-size - Font size of the modal title\n * @cssprop --wcs-modal-title-font-weight - Font weight of the modal title\n * @cssprop --wcs-modal-title-line-height - Line height of the modal title\n * @cssprop --wcs-modal-actions-margin-top - Margin top of the modal actions\n * @cssprop --wcs-modal-width-s - Width of the modal for size small\n * @cssprop --wcs-modal-width-m - Width of the modal for size medium\n * @cssprop --wcs-modal-width-l - Width of the modal for size large\n * @cssprop --wcs-modal-width-xl - Width of the modal for size extra large\n * \n * @slot <no-name> Main container slot\n * @slot header Header container slot (for title)\n * @slot actions Actions container slot (for buttons)\n */\n@Component({\n tag: 'wcs-modal',\n styleUrl: 'modal.scss',\n shadow: false,\n})\nexport class Modal implements ComponentInterface, MutableAriaAttribute {\n @Element() private el: HTMLElement;\n private nativeDivDialog!: HTMLDivElement;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * Specifies whether the component should display a backdrop on the entire page\n */\n @Prop({reflect: true}) withoutBackdrop: boolean = false;\n\n /**\n * Displays the modal\n */\n @Prop({reflect: true, mutable: true}) show: boolean = false;\n\n /**\n * Triggered when the user leaves the dialog with the closing button.\n */\n @Event() wcsDialogClosed: EventEmitter<void>;\n\n /**\n * Specifies whether the component should display a close button.\n * if false, it won't close the modal when the escape key is pressed.\n */\n @Prop({reflect: true}) showCloseButton: boolean = false;\n\n /**\n * Specifies the aria-label present on the close button when the modal is opened. \n * Only use when `showCloseButton` is `true`.\n */\n @Prop() closeButtonAriaLabel: string = 'Fermer';\n\n /**\n * There are multiple sizes for modals. The default size is medium (m), however other sizes are available. Select the\n * size best suited for the content and screen size displaying the modal. Remember to test responsiveness.\n */\n @Prop() size: ModalSize = 'm';\n\n /**\n * Specifies whether the component should hide the actions slot or not\n */\n @Prop({reflect: true}) hideActions: boolean = false;\n\n /**\n * Specifies which element id controls the modal\n * @private\n */\n @Prop() modalTriggerControlsId: string;\n /**\n * The ID of the element to automatically focus when the modal opens.\n * \n * If this property is not set and `disableAutoFocus` is false, the modal will\n * automatically focus the first focusable element within its content.\n * This follows accessibility best practices by ensuring keyboard navigation\n * starts from a logical point when the modal opens.\n * \n * @example\n * <wcs-modal initial-focus-element=\"cancel-button\"></wcs-modal>\n */\n @Prop() initialFocusElementId?: string = undefined;\n\n /**\n * Disables automatic focus behavior when the modal opens.\n * \n * When set to true, the modal will not automatically focus any element upon opening.\n * Use this property with caution, as managing focus is important for accessibility.\n * Consider providing an alternative focus management strategy if disabling the default behavior.\n */\n @Prop({ reflect: true }) disableAutoFocus: boolean = false;\n\n /**\n * Give an unique id\n * @private\n */\n private modalId: number = modalIds++;\n\n private firstFocusableElement: HTMLElement;\n private lastFocusableElement: HTMLElement;\n /**\n * This attribute is used to determine whether the show attribute has changed since the last rendering. \n * This allows us to call the focus method on the first element of the modal when the show attribute changes to true. \n * This call is made in the componentDidRender method\n * @private\n */\n private showAttributeChangedMarker: boolean = false;\n /**\n * This attribute is used to determine if the modal has been closed for the first time since its last activation.\n * It is set to 'true' when the modal is first closed, and will be reset to 'false' when the modal is shown again.\n * This state is important for accessibility reasons in order to focus the modal trigger element (like the button \n * which controls the modal)\n *\n * @private\n */\n private hasBeenClosedBefore: boolean = false;\n\n componentWillLoad(): Promise<void> | void {\n if (!this.modalTriggerControlsId) {\n console.warn('wcs-modal: You must provide the modal-trigger-controls-id attribute to the modal to make it to work properly');\n }\n\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, MODAL_INHERITED_ATTRS),\n };\n }\n\n componentDidLoad() {\n this.updateFocusableElements();\n }\n\n componentDidRender() {\n this.updateFocusableElements();\n if (this.showAttributeChangedMarker) {\n this.showAttributeChangedMarker = false;\n \n if(this.disableAutoFocus) {\n return;\n }\n \n if(!this.initialFocusElementId) {\n this.firstFocusableElement?.focus();\n } else {\n const modalElementToFocusOnOpening = document.getElementById(this.initialFocusElementId);\n if(!modalElementToFocusOnOpening) {\n console.warn(`wcs-modal: Unable to focus element - ID '${this.initialFocusElementId}' not found in DOM`);\n }\n \n modalElementToFocusOnOpening?.focus();\n }\n }\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeDivDialog, attr, value);\n }\n \n @Watch(\"show\")\n onShowChange() {\n if(this.show) {\n this.hasBeenClosedBefore = false;\n this.showAttributeChangedMarker = true;\n } else {\n // if we already made actions when the modal was firstly closed, we do nothing\n if(this.hasBeenClosedBefore) {\n return;\n }\n \n this.hasBeenClosedBefore = true;\n\n if(this.modalTriggerControlsId) {\n const modalTriggerControlsHtmlElement = document.getElementById(this.modalTriggerControlsId);\n if(!modalTriggerControlsHtmlElement) {\n console.warn(`wcs-modal: Element with id '${this.modalTriggerControlsId}' could not be found`);\n }\n modalTriggerControlsHtmlElement?.focus();\n }\n }\n }\n\n private updateFocusableElements() {\n const focusableElements = Array.from(this.el.querySelectorAll('*'))\n .filter(element => isFocusable(element));\n\n this.firstFocusableElement = focusableElements.length > 0 && focusableElements[0] as HTMLElement;\n this.lastFocusableElement = focusableElements.length > 0 && focusableElements[focusableElements.length - 1] as HTMLElement;\n }\n \n private close() {\n // If the modal isn't shown, we don't do anything\n if (this.show) {\n this.show = false;\n this.wcsDialogClosed.emit();\n }\n }\n\n @Listen('keydown', {target: 'document'})\n onKeyDown(event: KeyboardEvent) {\n if (this.show && this.showCloseButton && event.key === 'Escape') {\n this.close();\n }\n\n if (this.show) {\n if (isTabKey(event)) {\n this.updateFocusableElements(); // XXX: maybe a performance issue\n const firstElement = this.firstFocusableElement;\n const lastElement = this.lastFocusableElement;\n\n if (event.shiftKey && isElementFocused(firstElement)) {\n event.preventDefault();\n lastElement.focus();\n } else if (!event.shiftKey && isElementFocused(lastElement)) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n }\n }\n\n private onCloseButtonClick(_: MouseEvent) {\n this.close();\n }\n\n private handleSlotContentChange() {\n this.updateFocusableElements();\n }\n\n render() {\n const modalTitleId = `wcs-modal-title-${this.modalId}`;\n return (\n <Host>\n <div class=\"wcs-modal-container\"\n data-size={this.size}\n aria-modal=\"true\"\n role={\"dialog\"}\n aria-labelledby={modalTitleId}\n ref={(el) => (this.nativeDivDialog = el)}\n {...this.inheritedAttributes}\n >\n <div class=\"wcs-modal-header\">\n <h1 id={modalTitleId}>\n <slot name=\"header\"></slot>\n </h1>\n {this.showCloseButton && (\n <wcs-button shape=\"round\" \n mode=\"clear\" \n id=\"wcs-modal-close-button\"\n aria-label={this.closeButtonAriaLabel}\n onClick={($event) => this.onCloseButtonClick($event)}>\n <wcs-mat-icon icon=\"close\"></wcs-mat-icon>\n </wcs-button>)\n }\n\n </div>\n <div class=\"wcs-modal-content\">\n <slot onSlotchange={() => this.handleSlotContentChange()}></slot>\n </div>\n <div class=\"wcs-modal-actions\">\n <slot name=\"actions\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n\nlet modalIds = 0;\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ import { A as generateUniqueId, B as compareLists, t as findItemLabel, i as inhe
|
|
|
4
4
|
import { k as keyboardShortcutFromKeyboardEvent } from './keyboard-event-26b65ae5.js';
|
|
5
5
|
import { i as isFocusable } from './accessibility-069640cf.js';
|
|
6
6
|
import { w as isEqual } from './isEqual-f2a07f4c.js';
|
|
7
|
-
import { c as createPopper } from './popper-
|
|
7
|
+
import { c as createPopper } from './popper-ac238961.js';
|
|
8
8
|
|
|
9
9
|
/*! *****************************************************************************
|
|
10
10
|
Copyright (c) Microsoft Corporation.
|
|
@@ -2721,7 +2721,13 @@ function () {
|
|
|
2721
2721
|
|
|
2722
2722
|
|
|
2723
2723
|
scheduler.schedule(function () {
|
|
2724
|
-
|
|
2724
|
+
var _a;
|
|
2725
|
+
|
|
2726
|
+
if ((_a = _this._state) === null || _a === void 0 ? void 0 : _a.done) {
|
|
2727
|
+
return;
|
|
2728
|
+
} // it feels weird to handle this here but we need to handle this even slightly "out of band"
|
|
2729
|
+
|
|
2730
|
+
|
|
2725
2731
|
var _event = toSCXMLEvent({
|
|
2726
2732
|
type: 'xstate.stop'
|
|
2727
2733
|
});
|
|
@@ -5352,7 +5358,7 @@ const Select = class {
|
|
|
5352
5358
|
* @param resetIfNoValue - When true and no value is provided, the select component will be reset
|
|
5353
5359
|
* Defaults to true
|
|
5354
5360
|
*/
|
|
5355
|
-
updateSelectedValue(value, resetIfNoValue = true) {
|
|
5361
|
+
updateSelectedValue(value, resetIfNoValue = true, shouldEmitFilterChangeEvent = true) {
|
|
5356
5362
|
var _a;
|
|
5357
5363
|
// If no value is passed, the select is reset.
|
|
5358
5364
|
if (!value && resetIfNoValue) {
|
|
@@ -5419,17 +5425,26 @@ const Select = class {
|
|
|
5419
5425
|
: undefined;
|
|
5420
5426
|
}
|
|
5421
5427
|
else {
|
|
5428
|
+
let hasFoundCurrentValueInOptionList = false;
|
|
5422
5429
|
this.options.forEach((opt) => {
|
|
5423
5430
|
const isSelected = this.compareWith(opt.value, value);
|
|
5424
5431
|
if (isSelected) {
|
|
5432
|
+
hasFoundCurrentValueInOptionList = true;
|
|
5425
5433
|
this.displayText = opt.innerText;
|
|
5426
5434
|
this.lastModifiedOptionElement = opt;
|
|
5427
5435
|
if (this.autocomplete) {
|
|
5428
|
-
this.setAutocompleteValue(opt.innerText);
|
|
5436
|
+
this.setAutocompleteValue(opt.innerText, false, false, shouldEmitFilterChangeEvent);
|
|
5429
5437
|
}
|
|
5430
5438
|
}
|
|
5431
5439
|
opt.selected = isSelected;
|
|
5432
5440
|
});
|
|
5441
|
+
// we are in server mode and the current select value hasn't been found, we set the AutocompleteValue (filter) to undefined
|
|
5442
|
+
// This is important to preserve the same state logic as when a value change and we set the filter to that value
|
|
5443
|
+
// Not doing that implies the displayText is not updated because of the check in le slot change handler
|
|
5444
|
+
if (this.serverMode && !hasFoundCurrentValueInOptionList) {
|
|
5445
|
+
this.setAutocompleteValue('', false, false, shouldEmitFilterChangeEvent);
|
|
5446
|
+
this.displayText = '';
|
|
5447
|
+
}
|
|
5433
5448
|
}
|
|
5434
5449
|
}
|
|
5435
5450
|
/**
|
|
@@ -5602,6 +5617,9 @@ const Select = class {
|
|
|
5602
5617
|
}
|
|
5603
5618
|
this.focused = true;
|
|
5604
5619
|
}
|
|
5620
|
+
if (this.autocomplete && this.displayText && this.multiple === false) {
|
|
5621
|
+
this.setAutocompleteValue(this.displayText);
|
|
5622
|
+
}
|
|
5605
5623
|
}
|
|
5606
5624
|
this.expanded = false;
|
|
5607
5625
|
},
|
|
@@ -5621,7 +5639,8 @@ const Select = class {
|
|
|
5621
5639
|
});
|
|
5622
5640
|
}
|
|
5623
5641
|
else {
|
|
5624
|
-
|
|
5642
|
+
// Emit the filter change immediately so that server-side filtering can refresh options.
|
|
5643
|
+
this.setAutocompleteValue(event.value.option.displayText);
|
|
5625
5644
|
}
|
|
5626
5645
|
}
|
|
5627
5646
|
this.emitChange(this.value);
|
|
@@ -5737,7 +5756,7 @@ const Select = class {
|
|
|
5737
5756
|
}
|
|
5738
5757
|
break;
|
|
5739
5758
|
case "ClearAutocompleteInput":
|
|
5740
|
-
this.
|
|
5759
|
+
this.setAutocompleteValue('', false, false);
|
|
5741
5760
|
break;
|
|
5742
5761
|
case "ClearHighlight":
|
|
5743
5762
|
this.clearHighlightOnLastHighlightedOption();
|
|
@@ -5897,10 +5916,15 @@ const Select = class {
|
|
|
5897
5916
|
this.stateService.send({ type: 'OPTION_SELECTED', value: { option: event, fromKeyboard } });
|
|
5898
5917
|
}
|
|
5899
5918
|
onSlotchange() {
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5919
|
+
if (!this.serverMode || (this.autocomplete && this.displayText === this.autocompleteValue)) {
|
|
5920
|
+
// We call updateSelectedValue to update the selected options when the slot changes to keep the selected options in sync with the current value.
|
|
5921
|
+
// This also update the displayText value according to the options data.
|
|
5922
|
+
// Finally, this update the internal models for multiple mode and handle the server mode correctly.
|
|
5923
|
+
this.updateSelectedValue(this.value, false, false);
|
|
5924
|
+
}
|
|
5925
|
+
else {
|
|
5926
|
+
this.syncOptionsElementsStateWithCurrentSelectedValue();
|
|
5927
|
+
}
|
|
5904
5928
|
// Server-mode only : "no result" slot should be visible dynamically if no option is present in the slot
|
|
5905
5929
|
if (this.autocomplete && this.serverMode) {
|
|
5906
5930
|
this.showNoResultFoundLabel = this.options.length < 1;
|
|
@@ -5910,6 +5934,17 @@ const Select = class {
|
|
|
5910
5934
|
.forEach((opt) => opt.multiple = true);
|
|
5911
5935
|
}
|
|
5912
5936
|
}
|
|
5937
|
+
/**
|
|
5938
|
+
* This method only affect the option's selected state
|
|
5939
|
+
*
|
|
5940
|
+
* Set the selected state of each option to match the current selected value of the select
|
|
5941
|
+
*/
|
|
5942
|
+
syncOptionsElementsStateWithCurrentSelectedValue() {
|
|
5943
|
+
this.options.forEach((opt) => {
|
|
5944
|
+
const isSelected = this.compareWith(opt.value, this.value);
|
|
5945
|
+
opt.selected = isSelected;
|
|
5946
|
+
});
|
|
5947
|
+
}
|
|
5913
5948
|
removeChip(v) {
|
|
5914
5949
|
this.options
|
|
5915
5950
|
.forEach(opt => {
|
|
@@ -5965,9 +6000,10 @@ const Select = class {
|
|
|
5965
6000
|
* @param filter - The new filter value
|
|
5966
6001
|
* @param isReset - If true, the filter is reset and the select is closed
|
|
5967
6002
|
* @param fromUserInteraction - If true, the change comes from user interaction (typing), if false it's programmatic
|
|
6003
|
+
* @param shouldEmitFilterChangeEvent
|
|
5968
6004
|
* @private
|
|
5969
6005
|
*/
|
|
5970
|
-
setAutocompleteValue(filter, isReset = false, fromUserInteraction = false) {
|
|
6006
|
+
setAutocompleteValue(filter, isReset = false, fromUserInteraction = false, shouldEmitFilterChangeEvent = true) {
|
|
5971
6007
|
var _a, _b;
|
|
5972
6008
|
this.clearHighlightOnLastHighlightedOption();
|
|
5973
6009
|
const newValueIsDifferentFromLastModifiedOption = this.lastModifiedOptionElement == null || ((_a = this.lastModifiedOptionElement) === null || _a === void 0 ? void 0 : _a.textContent) !== this.autocompleteValue;
|
|
@@ -5999,8 +6035,12 @@ const Select = class {
|
|
|
5999
6035
|
});
|
|
6000
6036
|
}
|
|
6001
6037
|
}
|
|
6002
|
-
|
|
6003
|
-
|
|
6038
|
+
const newAutocompleteValue = filter !== null && filter !== void 0 ? filter : '';
|
|
6039
|
+
const valueHasChanged = this.autocompleteValue !== newAutocompleteValue;
|
|
6040
|
+
if (valueHasChanged) {
|
|
6041
|
+
this.autocompleteValue = newAutocompleteValue;
|
|
6042
|
+
}
|
|
6043
|
+
if (shouldEmitFilterChangeEvent && valueHasChanged) {
|
|
6004
6044
|
this.wcsFilterChange.emit({
|
|
6005
6045
|
value: filter,
|
|
6006
6046
|
});
|
|
@@ -6032,23 +6072,18 @@ const Select = class {
|
|
|
6032
6072
|
focusedAttributes() {
|
|
6033
6073
|
return !this.disabled ? { tabIndex: 0 } : {};
|
|
6034
6074
|
}
|
|
6035
|
-
onAutocompleteFieldBlur(_e) {
|
|
6036
|
-
if (this.multiple === false && this.autocomplete === true && this.hasValue) {
|
|
6037
|
-
this.autocompleteValue = this.displayText;
|
|
6038
|
-
}
|
|
6039
|
-
}
|
|
6040
6075
|
render() {
|
|
6041
6076
|
var _a;
|
|
6042
6077
|
const ariaLabelValue = `${this.labelElement ? this.labelElement.innerText : ''} ${this.hasValue ? this.displayText : ''}`.trimEnd();
|
|
6043
6078
|
const noResultContainerId = 'no-result-container';
|
|
6044
|
-
return (h(Host, Object.assign({ key: '
|
|
6079
|
+
return (h(Host, Object.assign({ key: '5da08e1418d8e8a2f65295a86a4868357ac676cb', class: this.expanded ? 'expanded ' : '', overlayDirection: this.overlayDirection }, this.focusedAttributes(), { role: !this.autocomplete ? "combobox" : null, "aria-haspopup": !this.autocomplete ? "listbox" : null, "aria-owns": !this.autocomplete ? this.optionsId : null, "aria-controls": !this.autocomplete ? this.optionsId : null, "aria-disabled": !this.autocomplete ? (this.disabled ? 'true' : null) : null, "aria-required": !this.autocomplete ? (this.required ? 'true' : 'false') : null, "aria-expanded": !this.autocomplete ? (this.expanded ? 'true' : 'false') : null, "aria-multiselectable": !this.autocomplete ? (this.multiple ? 'true' : 'false') : null, "aria-label": !this.autocomplete ? ariaLabelValue : null }), h("div", { key: '64bb5c04992a0ecf451a6ea5114bcb631f936555', class: "wcs-select-control" }, h("div", { key: '9279627148ef9bf1e8113df1dd97ab9d721f2f06', class: "wcs-select-value-container" }, this.hasValue
|
|
6045
6080
|
?
|
|
6046
6081
|
(this.chips ?
|
|
6047
6082
|
this.values.map((option) => h(SelectChips, { disabled: this.disabled, option: option, onRemove: this.removeChip.bind(this) }))
|
|
6048
6083
|
: (!this.autocomplete || this.autocomplete && this.multiple) &&
|
|
6049
6084
|
h("label", { class: "wcs-select-value" }, this.displayText))
|
|
6050
|
-
: !this.autocomplete && h("label", { class: "wcs-select-placeholder" }, this.placeholder), this.autocomplete && h("input", Object.assign({ key: '
|
|
6051
|
-
h("div", { key: '
|
|
6085
|
+
: !this.autocomplete && h("label", { class: "wcs-select-placeholder" }, this.placeholder), this.autocomplete && h("input", Object.assign({ key: '97732eba53ac636b9f9e231ad6c86903599dd21b', class: "autocomplete-field", value: this.autocompleteValue, role: "combobox", "aria-haspopup": "listbox", "aria-label": ariaLabelValue, "aria-describedby": noResultContainerId, "aria-disabled": this.disabled ? 'true' : null, "aria-expanded": this.expanded ? 'true' : 'false', "aria-controls": this.optionsId, "aria-owns": this.optionsId, "aria-multiselectable": this.multiple ? 'true' : 'false', "aria-autocomplete": "list", autocomplete: "off", disabled: this.disabled, required: this.required, placeholder: ((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) ? null : this.placeholder, onInput: (e) => this.onAutocompleteInputEvent(e), ref: el => this.autocompleteInput = el }, this.inheritedAttributes))), h(SelectArrow, { key: '4546d670d107ad9bb496844ef6b4d2b1e7d333c4', up: this.expanded })), h("div", { key: '75eda1298dab81575144d561120290d804d84cce', class: "wcs-select-options", id: this.optionsId, role: "listbox" }, h("slot", { key: '4de8ebd148df28d68c4163026562669ebfbc37b3', name: "options", onSlotchange: this.onSlotchange.bind(this) }), (this.autocomplete && this.showNoResultFoundLabel) &&
|
|
6086
|
+
h("div", { key: '6ebeb7af554a9f3799658e7e3d58f0c1ac25f9f2', role: "alert", id: noResultContainerId, class: "noresult-container" }, h("slot", { key: '2c34abe1a89dc797f80944809457710e66d0336d', name: "filter-no-result" }, h("span", { key: '6e51c2870b926c593dbd53d87a99ef1beb989343' }, "Aucun r\u00E9sultat"))))));
|
|
6052
6087
|
}
|
|
6053
6088
|
get el() { return getElement(this); }
|
|
6054
6089
|
static get watchers() { return {
|
|
@@ -6065,7 +6100,6 @@ const SelectOption = class {
|
|
|
6065
6100
|
constructor(hostRef) {
|
|
6066
6101
|
registerInstance(this, hostRef);
|
|
6067
6102
|
this.wcsSelectOptionClick = createEvent(this, "wcsSelectOptionClick", 7);
|
|
6068
|
-
this.selectOptionId = generateUniqueId(this.el.tagName);
|
|
6069
6103
|
this.disabled = false;
|
|
6070
6104
|
this.selected = false;
|
|
6071
6105
|
this.highlighted = false;
|
|
@@ -6075,6 +6109,7 @@ const SelectOption = class {
|
|
|
6075
6109
|
this.multiple = false;
|
|
6076
6110
|
}
|
|
6077
6111
|
componentWillLoad() {
|
|
6112
|
+
this.selectOptionId = generateUniqueId(this.el.tagName);
|
|
6078
6113
|
if (this.value === undefined) {
|
|
6079
6114
|
// If no value was given we use the text content instead.
|
|
6080
6115
|
this.value = this.el.innerText || '';
|
|
@@ -6107,8 +6142,8 @@ const SelectOption = class {
|
|
|
6107
6142
|
}
|
|
6108
6143
|
}
|
|
6109
6144
|
render() {
|
|
6110
|
-
return (h(Host, { key: '
|
|
6111
|
-
h("wcs-checkbox", { key: '
|
|
6145
|
+
return (h(Host, { key: '18a9f541ccf9757c1b4e9005ecd9ca98f40ced22', id: this.selectOptionId, "aria-selected": this.selected || this.highlighted ? 'true' : 'false', slot: "options", role: "option", tabindex: "-1" }, this.multiple &&
|
|
6146
|
+
h("wcs-checkbox", { key: 'aa89dc61bd7ddabf6efdf1f7b5fc6bc024f91ffd', tabindex: "-1", checked: this.selected, disabled: this.disabled }), h("slot", { key: 'fc59a661788d75fd7f172e8ef13f7360c2540552' })));
|
|
6112
6147
|
}
|
|
6113
6148
|
get el() { return getElement(this); }
|
|
6114
6149
|
};
|