wcs-core 7.1.0 → 7.2.0
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 +1 -11
- package/design-tokens/dist/sncf-groupe-root-scoped.css +590 -0
- package/design-tokens/dist/sncf-groupe.css +590 -0
- package/design-tokens/dist/sncf-groupe.json +10693 -0
- package/design-tokens/dist/sncf-holding-root-scoped.css +426 -425
- package/design-tokens/dist/sncf-holding.css +426 -425
- package/design-tokens/dist/sncf-holding.json +26 -3
- package/design-tokens/dist/sncf-reseau-root-scoped.css +465 -465
- package/design-tokens/dist/sncf-reseau.css +465 -465
- package/design-tokens/dist/sncf-voyageurs-root-scoped.css +383 -383
- package/design-tokens/dist/sncf-voyageurs.css +383 -383
- package/dist/cjs/{grid-pagination-e4f29c78.js → grid-pagination-4505d7b6.js} +25 -5
- package/dist/cjs/grid-pagination-4505d7b6.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/wcs-accordion-panel.cjs.entry.js +1 -1
- package/dist/cjs/wcs-accordion-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-action-bar.cjs.entry.js +1 -1
- package/dist/cjs/wcs-action-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-alert-drawer.cjs.entry.js +99 -0
- package/dist/cjs/wcs-alert-drawer.cjs.entry.js.map +1 -0
- package/dist/cjs/wcs-alert.cjs.entry.js +121 -0
- package/dist/cjs/wcs-alert.cjs.entry.js.map +1 -0
- package/dist/cjs/wcs-app.cjs.entry.js +3 -3
- package/dist/cjs/wcs-badge.cjs.entry.js +2 -2
- package/dist/cjs/wcs-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-breadcrumb-item.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/wcs-button_2.cjs.entry.js +3 -8
- package/dist/cjs/wcs-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-card-body.cjs.entry.js +9 -2
- package/dist/cjs/wcs-card-body.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-card-content.cjs.entry.js +22 -0
- package/dist/cjs/wcs-card-content.cjs.entry.js.map +1 -0
- package/dist/cjs/wcs-card-footer.cjs.entry.js +22 -0
- package/dist/cjs/wcs-card-footer.cjs.entry.js.map +1 -0
- package/dist/cjs/wcs-card-header.cjs.entry.js +22 -0
- package/dist/cjs/wcs-card-header.cjs.entry.js.map +1 -0
- package/dist/cjs/wcs-card-media.cjs.entry.js +29 -0
- package/dist/cjs/wcs-card-media.cjs.entry.js.map +1 -0
- package/dist/cjs/wcs-card.cjs.entry.js +30 -2
- package/dist/cjs/wcs-card.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/wcs-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav-category.cjs.entry.js +2 -2
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +2 -2
- package/dist/cjs/wcs-com-nav.cjs.entry.js +2 -2
- package/dist/cjs/wcs-counter.cjs.entry.js +2 -12
- package/dist/cjs/wcs-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-divider.cjs.entry.js +1 -1
- package/dist/cjs/wcs-dropdown-divider.cjs.entry.js +1 -1
- package/dist/cjs/wcs-dropdown-header.cjs.entry.js +1 -1
- package/dist/cjs/wcs-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-dropdown.cjs.entry.js +1 -6
- package/dist/cjs/wcs-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-editable-field.cjs.entry.js +2 -2
- package/dist/cjs/wcs-editable-field.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-error_3.cjs.entry.js +3 -3
- package/dist/cjs/wcs-error_3.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-field-content.cjs.entry.js +1 -1
- package/dist/cjs/wcs-field-label.cjs.entry.js +1 -1
- package/dist/cjs/wcs-field.cjs.entry.js +1 -1
- package/dist/cjs/wcs-footer.cjs.entry.js +1 -1
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +2 -2
- package/dist/cjs/wcs-galactic.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid-column.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid-column.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid-pagination.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid.cjs.entry.js +12 -4
- package/dist/cjs/wcs-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-header.cjs.entry.js +2 -2
- package/dist/cjs/wcs-header.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-hint.cjs.entry.js +1 -1
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +1 -1
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-icon.cjs.entry.js +1 -1
- package/dist/cjs/wcs-input.cjs.entry.js +2 -12
- package/dist/cjs/wcs-input.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-list-item-properties.cjs.entry.js +1 -1
- package/dist/cjs/wcs-list-item-property.cjs.entry.js +1 -1
- package/dist/cjs/wcs-list-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-mat-icon.cjs.entry.js +1 -1
- package/dist/cjs/wcs-mat-icon.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-native-select.cjs.entry.js +2 -2
- package/dist/cjs/wcs-native-select.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-nav.cjs.entry.js +2 -2
- package/dist/cjs/wcs-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/wcs-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-progress-radial.cjs.entry.js +2 -2
- package/dist/cjs/wcs-progress-radial.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/wcs-radio.cjs.entry.js +1 -1
- package/dist/cjs/wcs-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-select_2.cjs.entry.js +18 -11
- package/dist/cjs/wcs-select_2.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-skeleton-circle.cjs.entry.js +1 -1
- package/dist/cjs/wcs-skeleton-rectangle.cjs.entry.js +1 -1
- package/dist/cjs/wcs-skeleton-text.cjs.entry.js +1 -1
- package/dist/cjs/wcs-switch.cjs.entry.js +1 -1
- package/dist/cjs/wcs-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-tab.cjs.entry.js +1 -1
- package/dist/cjs/wcs-tabs.cjs.entry.js +149 -6
- package/dist/cjs/wcs-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-textarea.cjs.entry.js +1 -1
- package/dist/cjs/wcs-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/wcs-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/accordion-panel/accordion-panel.js +1 -1
- package/dist/collection/components/accordion-panel/accordion-panel.js.map +1 -1
- package/dist/collection/components/action-bar/action-bar.js +1 -1
- package/dist/collection/components/action-bar/action-bar.js.map +1 -1
- package/dist/collection/components/alert/alert-interface.js +2 -0
- package/dist/collection/components/alert/alert-interface.js.map +1 -0
- package/dist/collection/components/alert/alert.css +115 -0
- package/dist/collection/components/alert/alert.e2e.js +142 -0
- package/dist/collection/components/alert/alert.e2e.js.map +1 -0
- package/dist/collection/components/alert/alert.js +257 -0
- package/dist/collection/components/alert/alert.js.map +1 -0
- package/dist/collection/components/alert-drawer/alert-drawer-interface.js +2 -0
- package/dist/collection/components/alert-drawer/alert-drawer-interface.js.map +1 -0
- package/dist/collection/components/alert-drawer/alert-drawer.css +103 -0
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.js +111 -0
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.js.map +1 -0
- package/dist/collection/components/alert-drawer/alert-drawer.js +237 -0
- package/dist/collection/components/alert-drawer/alert-drawer.js.map +1 -0
- package/dist/collection/components/app/app.js +3 -3
- package/dist/collection/components/badge/badge.css +4 -1
- package/dist/collection/components/badge/badge.js +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.js +1 -1
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.js.map +1 -1
- package/dist/collection/components/button/button-interface.js +1 -5
- package/dist/collection/components/button/button-interface.js.map +1 -1
- package/dist/collection/components/button/button.css +2 -2
- package/dist/collection/components/button/button.js +1 -6
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/card/card-interface.js.map +1 -1
- package/dist/collection/components/card/card.css +10 -0
- package/dist/collection/components/card/card.js +62 -1
- package/dist/collection/components/card/card.js.map +1 -1
- package/dist/collection/components/card-body/card-body.css +12 -1
- package/dist/collection/components/card-body/card-body.js +52 -2
- package/dist/collection/components/card-body/card-body.js.map +1 -1
- package/dist/collection/components/card-content/card-content.css +12 -0
- package/dist/collection/components/card-content/card-content.js +30 -0
- package/dist/collection/components/card-content/card-content.js.map +1 -0
- package/dist/collection/components/card-footer/card-footer.css +7 -0
- package/dist/collection/components/card-footer/card-footer.js +25 -0
- package/dist/collection/components/card-footer/card-footer.js.map +1 -0
- package/dist/collection/components/card-header/card-header.css +28 -0
- package/dist/collection/components/card-header/card-header.js +32 -0
- package/dist/collection/components/card-header/card-header.js.map +1 -0
- package/dist/collection/components/card-media/card-media.css +21 -0
- package/dist/collection/components/card-media/card-media.js +77 -0
- package/dist/collection/components/card-media/card-media.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/com-nav/com-nav.js +2 -2
- package/dist/collection/components/com-nav-category/com-nav-category.js +2 -2
- package/dist/collection/components/com-nav-item/com-nav-item.js +1 -1
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +2 -2
- package/dist/collection/components/counter/counter-interface.js +1 -5
- package/dist/collection/components/counter/counter-interface.js.map +1 -1
- package/dist/collection/components/counter/counter.css +4 -1
- package/dist/collection/components/counter/counter.js +1 -6
- package/dist/collection/components/counter/counter.js.map +1 -1
- package/dist/collection/components/divider/divider.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +2 -7
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/dropdown-divider/dropdown-divider.js +1 -1
- package/dist/collection/components/dropdown-header/dropdown-header.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
- package/dist/collection/components/editable-field/editable-field.css +3 -0
- package/dist/collection/components/editable-field/editable-field.js +1 -1
- package/dist/collection/components/error/error.js +1 -1
- package/dist/collection/components/error/error.js.map +1 -1
- package/dist/collection/components/field/field.js +1 -1
- package/dist/collection/components/field-content/field-content.js +1 -1
- package/dist/collection/components/field-label/field-label.js +1 -1
- package/dist/collection/components/footer/footer.js +1 -1
- package/dist/collection/components/form-field/form-field.js +1 -1
- package/dist/collection/components/form-field/form-field.js.map +1 -1
- package/dist/collection/components/galactic/galactic.js +1 -1
- package/dist/collection/components/galactic-menu/galactic-menu.js +2 -2
- package/dist/collection/components/grid/grid.js +30 -5
- package/dist/collection/components/grid/grid.js.map +1 -1
- package/dist/collection/components/grid-column/grid-column.js +3 -3
- package/dist/collection/components/grid-column/grid-column.js.map +1 -1
- package/dist/collection/components/grid-custom-cell/grid-custom-cell.js +1 -1
- package/dist/collection/components/grid-pagination/grid-pagination-arrow.js +2 -2
- package/dist/collection/components/grid-pagination/grid-pagination-arrow.js.map +1 -1
- package/dist/collection/components/grid-pagination/grid-pagination.js +22 -2
- package/dist/collection/components/grid-pagination/grid-pagination.js.map +1 -1
- package/dist/collection/components/header/header.css +9 -1
- package/dist/collection/components/header/header.js +2 -1
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/hint/hint.js +1 -1
- package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +2 -2
- 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-interface.js +1 -5
- package/dist/collection/components/input/input-interface.js.map +1 -1
- package/dist/collection/components/input/input.css +4 -0
- package/dist/collection/components/input/input.js +3 -8
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/label/label.js.map +1 -1
- package/dist/collection/components/list-item/list-item.js +1 -1
- package/dist/collection/components/list-item-properties/list-item-properties.js +1 -1
- package/dist/collection/components/list-item-property/list-item-property.js +1 -1
- package/dist/collection/components/mat-icon/mat-icon.js +2 -2
- package/dist/collection/components/mat-icon/mat-icon.js.map +1 -1
- package/dist/collection/components/modal/modal-interface.js.map +1 -1
- package/dist/collection/components/modal/modal.css +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.css +2 -2
- package/dist/collection/components/native-select/native-select.js +2 -2
- package/dist/collection/components/native-select/native-select.js.map +1 -1
- package/dist/collection/components/nav/nav.css +2 -0
- package/dist/collection/components/nav/nav.js +1 -1
- package/dist/collection/components/nav-item/nav-item.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.css +2 -2
- package/dist/collection/components/progress-bar/progress-bar.js +3 -3
- package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
- package/dist/collection/components/progress-radial/progress-radial.js +3 -3
- package/dist/collection/components/progress-radial/progress-radial.js.map +1 -1
- package/dist/collection/components/radio/radio.js +1 -1
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +16 -9
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select-option/select-option.js +2 -2
- package/dist/collection/components/select-option/select-option.js.map +1 -1
- package/dist/collection/components/skeleton-circle/skeleton-circle.js +1 -1
- package/dist/collection/components/skeleton-rectangle/skeleton-rectangle.js +1 -1
- package/dist/collection/components/skeleton-text/skeleton-text.js +1 -1
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tabs/tabs.css +104 -1
- package/dist/collection/components/tabs/tabs.js +180 -5
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/esm/{grid-pagination-976a86e9.js → grid-pagination-731726a6.js} +25 -5
- package/dist/esm/grid-pagination-731726a6.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/wcs-accordion-panel.entry.js +1 -1
- package/dist/esm/wcs-accordion-panel.entry.js.map +1 -1
- package/dist/esm/wcs-action-bar.entry.js +1 -1
- package/dist/esm/wcs-action-bar.entry.js.map +1 -1
- package/dist/esm/wcs-alert-drawer.entry.js +95 -0
- package/dist/esm/wcs-alert-drawer.entry.js.map +1 -0
- package/dist/esm/wcs-alert.entry.js +117 -0
- package/dist/esm/wcs-alert.entry.js.map +1 -0
- package/dist/esm/wcs-app.entry.js +3 -3
- package/dist/esm/wcs-badge.entry.js +2 -2
- package/dist/esm/wcs-badge.entry.js.map +1 -1
- package/dist/esm/wcs-breadcrumb-item.entry.js +1 -1
- package/dist/esm/wcs-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/wcs-breadcrumb.entry.js +1 -1
- package/dist/esm/wcs-button_2.entry.js +3 -8
- package/dist/esm/wcs-button_2.entry.js.map +1 -1
- package/dist/esm/wcs-card-body.entry.js +10 -3
- package/dist/esm/wcs-card-body.entry.js.map +1 -1
- package/dist/esm/wcs-card-content.entry.js +18 -0
- package/dist/esm/wcs-card-content.entry.js.map +1 -0
- package/dist/esm/wcs-card-footer.entry.js +18 -0
- package/dist/esm/wcs-card-footer.entry.js.map +1 -0
- package/dist/esm/wcs-card-header.entry.js +18 -0
- package/dist/esm/wcs-card-header.entry.js.map +1 -0
- package/dist/esm/wcs-card-media.entry.js +25 -0
- package/dist/esm/wcs-card-media.entry.js.map +1 -0
- package/dist/esm/wcs-card.entry.js +31 -3
- package/dist/esm/wcs-card.entry.js.map +1 -1
- package/dist/esm/wcs-checkbox.entry.js +1 -1
- package/dist/esm/wcs-checkbox.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav-category.entry.js +2 -2
- package/dist/esm/wcs-com-nav-item.entry.js +1 -1
- package/dist/esm/wcs-com-nav-submenu.entry.js +2 -2
- package/dist/esm/wcs-com-nav.entry.js +2 -2
- package/dist/esm/wcs-counter.entry.js +2 -12
- package/dist/esm/wcs-counter.entry.js.map +1 -1
- package/dist/esm/wcs-divider.entry.js +1 -1
- package/dist/esm/wcs-dropdown-divider.entry.js +1 -1
- package/dist/esm/wcs-dropdown-header.entry.js +1 -1
- package/dist/esm/wcs-dropdown-item.entry.js +1 -1
- package/dist/esm/wcs-dropdown.entry.js +1 -6
- package/dist/esm/wcs-dropdown.entry.js.map +1 -1
- package/dist/esm/wcs-editable-field.entry.js +2 -2
- package/dist/esm/wcs-editable-field.entry.js.map +1 -1
- package/dist/esm/wcs-error_3.entry.js +3 -3
- package/dist/esm/wcs-error_3.entry.js.map +1 -1
- package/dist/esm/wcs-field-content.entry.js +1 -1
- package/dist/esm/wcs-field-label.entry.js +1 -1
- package/dist/esm/wcs-field.entry.js +1 -1
- package/dist/esm/wcs-footer.entry.js +1 -1
- package/dist/esm/wcs-galactic-menu.entry.js +2 -2
- package/dist/esm/wcs-galactic.entry.js +1 -1
- package/dist/esm/wcs-grid-column.entry.js +1 -1
- package/dist/esm/wcs-grid-column.entry.js.map +1 -1
- package/dist/esm/wcs-grid-custom-cell.entry.js +1 -1
- package/dist/esm/wcs-grid-pagination.entry.js +1 -1
- package/dist/esm/wcs-grid.entry.js +12 -4
- package/dist/esm/wcs-grid.entry.js.map +1 -1
- package/dist/esm/wcs-header.entry.js +2 -2
- package/dist/esm/wcs-header.entry.js.map +1 -1
- package/dist/esm/wcs-hint.entry.js +1 -1
- package/dist/esm/wcs-horizontal-stepper.entry.js +1 -1
- package/dist/esm/wcs-horizontal-stepper.entry.js.map +1 -1
- package/dist/esm/wcs-icon.entry.js +1 -1
- package/dist/esm/wcs-input.entry.js +2 -12
- package/dist/esm/wcs-input.entry.js.map +1 -1
- package/dist/esm/wcs-list-item-properties.entry.js +1 -1
- package/dist/esm/wcs-list-item-property.entry.js +1 -1
- package/dist/esm/wcs-list-item.entry.js +1 -1
- package/dist/esm/wcs-mat-icon.entry.js +1 -1
- package/dist/esm/wcs-mat-icon.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-native-select.entry.js +2 -2
- package/dist/esm/wcs-native-select.entry.js.map +1 -1
- package/dist/esm/wcs-nav-item.entry.js +1 -1
- package/dist/esm/wcs-nav.entry.js +2 -2
- package/dist/esm/wcs-nav.entry.js.map +1 -1
- package/dist/esm/wcs-progress-bar.entry.js +3 -3
- package/dist/esm/wcs-progress-bar.entry.js.map +1 -1
- package/dist/esm/wcs-progress-radial.entry.js +2 -2
- package/dist/esm/wcs-progress-radial.entry.js.map +1 -1
- package/dist/esm/wcs-radio-group.entry.js +1 -1
- package/dist/esm/wcs-radio.entry.js +1 -1
- package/dist/esm/wcs-radio.entry.js.map +1 -1
- package/dist/esm/wcs-select_2.entry.js +18 -11
- package/dist/esm/wcs-select_2.entry.js.map +1 -1
- package/dist/esm/wcs-skeleton-circle.entry.js +1 -1
- package/dist/esm/wcs-skeleton-rectangle.entry.js +1 -1
- package/dist/esm/wcs-skeleton-text.entry.js +1 -1
- package/dist/esm/wcs-switch.entry.js +1 -1
- package/dist/esm/wcs-switch.entry.js.map +1 -1
- package/dist/esm/wcs-tab.entry.js +1 -1
- package/dist/esm/wcs-tabs.entry.js +149 -6
- package/dist/esm/wcs-tabs.entry.js.map +1 -1
- package/dist/esm/wcs-textarea.entry.js +1 -1
- package/dist/esm/wcs-textarea.entry.js.map +1 -1
- package/dist/esm/wcs-tooltip.entry.js +1 -1
- package/dist/esm/wcs-tooltip.entry.js.map +1 -1
- package/dist/esm/wcs.js +1 -1
- package/dist/types/components/alert/alert-interface.d.ts +11 -0
- package/dist/types/components/alert/alert.d.ts +79 -0
- package/dist/types/components/alert-drawer/alert-drawer-interface.d.ts +1 -0
- package/dist/types/components/alert-drawer/alert-drawer.d.ts +83 -0
- package/dist/types/components/button/button-interface.d.ts +1 -3
- package/dist/types/components/card/card-interface.d.ts +1 -0
- package/dist/types/components/card/card.d.ts +18 -1
- package/dist/types/components/card-body/card-body.d.ts +9 -0
- package/dist/types/components/card-content/card-content.d.ts +14 -0
- package/dist/types/components/card-footer/card-footer.d.ts +9 -0
- package/dist/types/components/card-header/card-header.d.ts +16 -0
- package/dist/types/components/card-media/card-media.d.ts +20 -0
- package/dist/types/components/counter/counter-interface.d.ts +1 -3
- package/dist/types/components/grid/grid.d.ts +4 -0
- package/dist/types/components/grid-pagination/grid-pagination.d.ts +6 -1
- package/dist/types/components/header/header.d.ts +1 -0
- package/dist/types/components/input/input-interface.d.ts +1 -3
- package/dist/types/components/mat-icon/mat-icon.d.ts +1 -1
- package/dist/types/components/modal/modal-interface.d.ts +2 -1
- package/dist/types/components/select/select.d.ts +7 -1
- package/dist/types/components/tabs/tabs.d.ts +55 -0
- package/dist/types/components.d.ts +571 -6
- package/dist/wcs/{p-9c012aae.entry.js → p-0424e545.entry.js} +2 -2
- package/dist/wcs/{p-50523b53.entry.js → p-0758d22e.entry.js} +2 -2
- package/dist/wcs/p-0b8157e7.entry.js +2 -0
- package/dist/wcs/p-0dd07842.entry.js +2 -0
- package/dist/wcs/p-0dd07842.entry.js.map +1 -0
- package/dist/wcs/{p-9554196c.entry.js → p-1244daa0.entry.js} +2 -2
- package/dist/wcs/{p-96bff8fe.entry.js → p-18fa39f4.entry.js} +2 -2
- package/dist/wcs/{p-96bff8fe.entry.js.map → p-18fa39f4.entry.js.map} +1 -1
- package/dist/wcs/p-1ba616c2.entry.js +2 -0
- package/dist/wcs/p-1ba616c2.entry.js.map +1 -0
- package/dist/wcs/p-1e7ea63c.entry.js +2 -0
- package/dist/wcs/p-1e7ea63c.entry.js.map +1 -0
- package/dist/wcs/p-1f593d06.entry.js +2 -0
- package/dist/wcs/p-1f593d06.entry.js.map +1 -0
- package/dist/wcs/{p-4dc52a25.entry.js → p-1fbe0328.entry.js} +2 -2
- package/dist/wcs/p-1fbe0328.entry.js.map +1 -0
- package/dist/wcs/{p-c2d35aa6.entry.js → p-204f2722.entry.js} +9 -9
- package/dist/wcs/p-204f2722.entry.js.map +1 -0
- package/dist/wcs/{p-37800935.entry.js → p-27b438c0.entry.js} +2 -2
- package/dist/wcs/{p-0ffdfc10.entry.js → p-352e1f99.entry.js} +2 -2
- package/dist/wcs/{p-3cfa1c4b.entry.js → p-367946fe.entry.js} +2 -2
- package/dist/wcs/p-3823f54e.entry.js +2 -0
- package/dist/wcs/{p-a7891233.entry.js → p-3a18535f.entry.js} +2 -2
- package/dist/wcs/p-41b946b2.entry.js +2 -0
- package/dist/wcs/p-41b946b2.entry.js.map +1 -0
- package/dist/wcs/{p-4661290b.entry.js → p-496115a5.entry.js} +2 -2
- package/dist/wcs/{p-4661290b.entry.js.map → p-496115a5.entry.js.map} +1 -1
- package/dist/wcs/p-4fb2d985.entry.js +2 -0
- package/dist/wcs/{p-9243a323.entry.js.map → p-4fb2d985.entry.js.map} +1 -1
- package/dist/wcs/{p-d895ffb4.entry.js → p-5202b323.entry.js} +2 -2
- package/dist/wcs/{p-ca8f3677.entry.js → p-53a395a9.entry.js} +2 -2
- package/dist/wcs/{p-ca8f3677.entry.js.map → p-53a395a9.entry.js.map} +1 -1
- package/dist/wcs/p-5607246c.entry.js +2 -0
- package/dist/wcs/p-5607246c.entry.js.map +1 -0
- package/dist/wcs/p-580b3142.entry.js +2 -0
- package/dist/wcs/p-5da0534f.entry.js +2 -0
- package/dist/wcs/p-5da0534f.entry.js.map +1 -0
- package/dist/wcs/p-5e8fff73.entry.js +2 -0
- package/dist/wcs/p-5e8fff73.entry.js.map +1 -0
- package/dist/wcs/{p-dddcd685.entry.js → p-622f7403.entry.js} +2 -2
- package/dist/wcs/p-637ec45a.entry.js +2 -0
- package/dist/wcs/p-637ec45a.entry.js.map +1 -0
- package/dist/wcs/p-6aededc6.entry.js +2 -0
- package/dist/wcs/p-6aededc6.entry.js.map +1 -0
- package/dist/wcs/p-6c6079ee.entry.js +2 -0
- package/dist/wcs/{p-76c92e22.entry.js.map → p-6c6079ee.entry.js.map} +1 -1
- package/dist/wcs/{p-e5c057c4.entry.js → p-781a956e.entry.js} +2 -2
- package/dist/wcs/p-7de847e0.entry.js +2 -0
- package/dist/wcs/p-8152d360.entry.js +2 -0
- package/dist/wcs/p-8152d360.entry.js.map +1 -0
- package/dist/wcs/{p-294732f7.entry.js → p-850fa9c9.entry.js} +2 -2
- package/dist/wcs/{p-796e690d.entry.js → p-86ec9ead.entry.js} +2 -2
- package/dist/wcs/{p-796e690d.entry.js.map → p-86ec9ead.entry.js.map} +1 -1
- package/dist/wcs/p-8c2605fd.entry.js +2 -0
- package/dist/wcs/p-8c2605fd.entry.js.map +1 -0
- package/dist/wcs/{p-16dd21cf.entry.js → p-8e9bd0f1.entry.js} +2 -2
- package/dist/wcs/p-98a8b806.entry.js +2 -0
- package/dist/wcs/p-98a8b806.entry.js.map +1 -0
- package/dist/wcs/p-9c73744c.entry.js +2 -0
- package/dist/wcs/p-9c73744c.entry.js.map +1 -0
- package/dist/wcs/p-9fd3366c.entry.js +2 -0
- package/dist/wcs/p-9fd3366c.entry.js.map +1 -0
- package/dist/wcs/p-a0f6ef30.entry.js +2 -0
- package/dist/wcs/p-a0f6ef30.entry.js.map +1 -0
- package/dist/wcs/{p-5bf73e05.entry.js → p-a94e685c.entry.js} +2 -2
- package/dist/wcs/{p-5bf73e05.entry.js.map → p-a94e685c.entry.js.map} +1 -1
- package/dist/wcs/{p-7d665a7e.entry.js → p-a956dc84.entry.js} +2 -2
- package/dist/wcs/p-a956dc84.entry.js.map +1 -0
- package/dist/wcs/{p-5d5f50ed.entry.js → p-aadf37e7.entry.js} +2 -2
- package/dist/wcs/{p-6b06d2e7.entry.js → p-ad286030.entry.js} +2 -2
- package/dist/wcs/p-ad5192cd.entry.js +2 -0
- package/dist/wcs/{p-dd60a6db.entry.js → p-b0a6eec6.entry.js} +2 -2
- package/dist/wcs/{p-dd60a6db.entry.js.map → p-b0a6eec6.entry.js.map} +1 -1
- package/dist/wcs/{p-9ad23e83.entry.js → p-b28b2fba.entry.js} +2 -2
- package/dist/wcs/p-b28b2fba.entry.js.map +1 -0
- package/dist/wcs/{p-29f5b974.entry.js → p-bc009574.entry.js} +2 -2
- package/dist/wcs/{p-29f5b974.entry.js.map → p-bc009574.entry.js.map} +1 -1
- package/dist/wcs/p-c211a5d1.entry.js +2 -0
- package/dist/wcs/{p-206c01d5.entry.js → p-c261eaf9.entry.js} +2 -2
- package/dist/wcs/p-c261eaf9.entry.js.map +1 -0
- package/dist/wcs/p-c5bad0b8.js +2 -0
- package/dist/wcs/p-c5bad0b8.js.map +1 -0
- package/dist/wcs/p-c7812760.entry.js +2 -0
- package/dist/wcs/{p-694724a2.entry.js → p-c84ae00d.entry.js} +2 -2
- package/dist/wcs/p-cad10435.entry.js +2 -0
- package/dist/wcs/{p-13e50077.entry.js.map → p-cad10435.entry.js.map} +1 -1
- package/dist/wcs/p-cbbca016.entry.js +2 -0
- package/dist/wcs/p-cbbca016.entry.js.map +1 -0
- package/dist/wcs/{p-619e1110.entry.js → p-cbda74f6.entry.js} +2 -2
- package/dist/wcs/{p-21b964cd.entry.js → p-d27d4a53.entry.js} +2 -2
- package/dist/wcs/p-d27d4a53.entry.js.map +1 -0
- package/dist/wcs/p-dfb52a1c.entry.js +2 -0
- package/dist/wcs/p-dfb52a1c.entry.js.map +1 -0
- package/dist/wcs/{p-6f5d570a.entry.js → p-dff8641e.entry.js} +2 -2
- package/dist/wcs/p-e26c19e5.entry.js +2 -0
- package/dist/wcs/{p-d9525519.entry.js → p-e56b9ce2.entry.js} +2 -2
- package/dist/wcs/p-ec383729.entry.js +2 -0
- package/dist/wcs/p-ec383729.entry.js.map +1 -0
- package/dist/wcs/p-f929b66f.entry.js +2 -0
- package/dist/wcs/p-f929b66f.entry.js.map +1 -0
- package/dist/wcs/{p-da4636fa.entry.js → p-fd187bce.entry.js} +2 -2
- package/dist/wcs/{p-b96f4921.entry.js → p-fdeae83e.entry.js} +2 -2
- package/dist/wcs/wcs.esm.js +1 -1
- package/dist/wcs/wcs.esm.js.map +1 -1
- package/package.json +5 -2
- package/dist/cjs/button-interface-629f3563.js +0 -12
- package/dist/cjs/button-interface-629f3563.js.map +0 -1
- package/dist/cjs/grid-pagination-e4f29c78.js.map +0 -1
- package/dist/esm/button-interface-dc5ddd51.js +0 -9
- package/dist/esm/button-interface-dc5ddd51.js.map +0 -1
- package/dist/esm/grid-pagination-976a86e9.js.map +0 -1
- package/dist/wcs/p-13090618.entry.js +0 -2
- package/dist/wcs/p-13090618.entry.js.map +0 -1
- package/dist/wcs/p-13e50077.entry.js +0 -2
- package/dist/wcs/p-1438530e.entry.js +0 -2
- package/dist/wcs/p-1438530e.entry.js.map +0 -1
- package/dist/wcs/p-206c01d5.entry.js.map +0 -1
- package/dist/wcs/p-21b964cd.entry.js.map +0 -1
- package/dist/wcs/p-21d2f06f.entry.js +0 -2
- package/dist/wcs/p-21d2f06f.entry.js.map +0 -1
- package/dist/wcs/p-258855a1.entry.js +0 -2
- package/dist/wcs/p-258855a1.entry.js.map +0 -1
- package/dist/wcs/p-2adf00be.entry.js +0 -2
- package/dist/wcs/p-2adf00be.entry.js.map +0 -1
- package/dist/wcs/p-388e6d75.entry.js +0 -2
- package/dist/wcs/p-388e6d75.entry.js.map +0 -1
- package/dist/wcs/p-43d70995.entry.js +0 -2
- package/dist/wcs/p-43d70995.entry.js.map +0 -1
- package/dist/wcs/p-4dc52a25.entry.js.map +0 -1
- package/dist/wcs/p-550012c2.entry.js +0 -2
- package/dist/wcs/p-5974be61.entry.js +0 -2
- package/dist/wcs/p-5974be61.entry.js.map +0 -1
- package/dist/wcs/p-5de993d7.entry.js +0 -2
- package/dist/wcs/p-5de993d7.entry.js.map +0 -1
- package/dist/wcs/p-71db0ed5.entry.js +0 -2
- package/dist/wcs/p-76c92e22.entry.js +0 -2
- package/dist/wcs/p-7d665a7e.entry.js.map +0 -1
- package/dist/wcs/p-8fcceaf1.js +0 -2
- package/dist/wcs/p-8fcceaf1.js.map +0 -1
- package/dist/wcs/p-9243a323.entry.js +0 -2
- package/dist/wcs/p-94aa269f.entry.js +0 -2
- package/dist/wcs/p-94aa269f.entry.js.map +0 -1
- package/dist/wcs/p-96195d9a.entry.js +0 -2
- package/dist/wcs/p-96195d9a.entry.js.map +0 -1
- package/dist/wcs/p-9ad23e83.entry.js.map +0 -1
- package/dist/wcs/p-9dc3f9a5.entry.js +0 -2
- package/dist/wcs/p-9dc3f9a5.entry.js.map +0 -1
- package/dist/wcs/p-9eb66fa9.entry.js +0 -2
- package/dist/wcs/p-ab49926d.entry.js +0 -2
- package/dist/wcs/p-ab49926d.entry.js.map +0 -1
- package/dist/wcs/p-b2080509.entry.js +0 -2
- package/dist/wcs/p-c2d35aa6.entry.js.map +0 -1
- package/dist/wcs/p-c6a28b79.js +0 -2
- package/dist/wcs/p-c6a28b79.js.map +0 -1
- package/dist/wcs/p-c752b85a.entry.js +0 -2
- package/dist/wcs/p-d443d419.entry.js +0 -2
- package/dist/wcs/p-e36b2ad1.entry.js +0 -2
- package/dist/wcs/p-f87636f6.entry.js +0 -2
- package/dist/wcs/p-f87636f6.entry.js.map +0 -1
- package/dist/wcs/p-fc115de4.entry.js +0 -2
- /package/dist/wcs/{p-9c012aae.entry.js.map → p-0424e545.entry.js.map} +0 -0
- /package/dist/wcs/{p-50523b53.entry.js.map → p-0758d22e.entry.js.map} +0 -0
- /package/dist/wcs/{p-e36b2ad1.entry.js.map → p-0b8157e7.entry.js.map} +0 -0
- /package/dist/wcs/{p-9554196c.entry.js.map → p-1244daa0.entry.js.map} +0 -0
- /package/dist/wcs/{p-37800935.entry.js.map → p-27b438c0.entry.js.map} +0 -0
- /package/dist/wcs/{p-0ffdfc10.entry.js.map → p-352e1f99.entry.js.map} +0 -0
- /package/dist/wcs/{p-3cfa1c4b.entry.js.map → p-367946fe.entry.js.map} +0 -0
- /package/dist/wcs/{p-c752b85a.entry.js.map → p-3823f54e.entry.js.map} +0 -0
- /package/dist/wcs/{p-a7891233.entry.js.map → p-3a18535f.entry.js.map} +0 -0
- /package/dist/wcs/{p-d895ffb4.entry.js.map → p-5202b323.entry.js.map} +0 -0
- /package/dist/wcs/{p-b2080509.entry.js.map → p-580b3142.entry.js.map} +0 -0
- /package/dist/wcs/{p-dddcd685.entry.js.map → p-622f7403.entry.js.map} +0 -0
- /package/dist/wcs/{p-e5c057c4.entry.js.map → p-781a956e.entry.js.map} +0 -0
- /package/dist/wcs/{p-550012c2.entry.js.map → p-7de847e0.entry.js.map} +0 -0
- /package/dist/wcs/{p-294732f7.entry.js.map → p-850fa9c9.entry.js.map} +0 -0
- /package/dist/wcs/{p-16dd21cf.entry.js.map → p-8e9bd0f1.entry.js.map} +0 -0
- /package/dist/wcs/{p-5d5f50ed.entry.js.map → p-aadf37e7.entry.js.map} +0 -0
- /package/dist/wcs/{p-6b06d2e7.entry.js.map → p-ad286030.entry.js.map} +0 -0
- /package/dist/wcs/{p-fc115de4.entry.js.map → p-ad5192cd.entry.js.map} +0 -0
- /package/dist/wcs/{p-9eb66fa9.entry.js.map → p-c211a5d1.entry.js.map} +0 -0
- /package/dist/wcs/{p-d443d419.entry.js.map → p-c7812760.entry.js.map} +0 -0
- /package/dist/wcs/{p-694724a2.entry.js.map → p-c84ae00d.entry.js.map} +0 -0
- /package/dist/wcs/{p-619e1110.entry.js.map → p-cbda74f6.entry.js.map} +0 -0
- /package/dist/wcs/{p-6f5d570a.entry.js.map → p-dff8641e.entry.js.map} +0 -0
- /package/dist/wcs/{p-71db0ed5.entry.js.map → p-e26c19e5.entry.js.map} +0 -0
- /package/dist/wcs/{p-d9525519.entry.js.map → p-e56b9ce2.entry.js.map} +0 -0
- /package/dist/wcs/{p-da4636fa.entry.js.map → p-fd187bce.entry.js.map} +0 -0
- /package/dist/wcs/{p-b96f4921.entry.js.map → p-fdeae83e.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"wcs-error.wcs-form-field.wcs-label.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,wSAAwS,CAAC;AAC1T,uBAAe,QAAQ;;MCoBVA,OAAK;;;;IACd,MAAM;QACF,QACIC,QAACC,UAAI,kEAAW,QAAQ,iBAAa,MAAM,EAAC,IAAI,EAAC,OAAO,IACpDD,oEAAQ,CACL,EACT;KACL;;;;AC5BL,MAAM,YAAY,GAAG,ytJAAytJ,CAAC;AAC/uJ,2BAAe,YAAY;;MCuDd,SAAS;;;uBAM8B,KAAK;yBAExB,KAAK;yBACL,KAAK;;;IAKlC,iBAAiB;QACb,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC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;;;;;;;;;","names":["Label","h","Host","isMutableAriaAttribute","isControlComponentWithLabel","normalizeWhitespace","inheritAriaAttributes","inheritAttributes","setOrRemoveAttribute"],"sources":["src/components/error/error.scss?tag=wcs-error&encapsulation=shadow","src/components/error/error.tsx","src/components/form-field/form-field.scss?tag=wcs-form-field&encapsulation=shadow","src/components/form-field/form-field.tsx","src/components/label/label.scss?tag=wcs-label&encapsulation=shadow","src/components/label/label.tsx"],"sourcesContent":[":host {\n --wcs-error-color: var(--wcs-semantic-color-text-critical);\n --wcs-error-font-size: var(--wcs-semantic-font-size-caption-2);\n --wcs-error-font-weight: var(--wcs-semantic-font-weight-book);\n\n color: var(--wcs-error-color);\n font-size: var(--wcs-error-font-size);\n font-weight: var(--wcs-error-font-weight);\n}\n","import { Component, ComponentInterface, h, Host } from '@stencil/core';\n\n/**\n * The `wcs-error` should always be wrapped in a `wcs-form-field`.\n * It is used to display a red message under the field indicating an incorrect user input.\n * \n * ## Accessibility guidelines 💡\n * - Provide a relevant error message to inform the users what they should change to make the field valid\n * - Always add the error icon, to ensure the visual indication of the error state other than the color\n * - `aria-description` will be automatically added to the field for screen readers\n * - `aria-invalid=\"true\"` will be automatically added to the field for screen readers\n * \n * @cssprop --wcs-error-color - Color of the text\n * @cssprop --wcs-error-font-size - Font size\n * @cssprop --wcs-error-font-weight - Font weight\n */\n@Component({\n tag: 'wcs-error',\n styleUrl: 'error.scss',\n shadow: true,\n})\nexport class Label implements ComponentInterface {\n render() {\n return (\n <Host aria-live=\"polite\" aria-atomic=\"true\" slot=\"error\">\n <slot />\n </Host>\n );\n }\n}\n",":host {\n --wcs-form-field-gap: var(--wcs-semantic-spacing-small);\n\n --wcs-form-field-prefix-suffix-border-radius: var(--wcs-semantic-border-radius-base);\n\n --wcs-form-field-prefix-icon-color: var(--wcs-semantic-color-foreground-primary);\n --wcs-form-field-prefix-value-color: var(--wcs-semantic-color-text-inverse);\n --wcs-form-field-prefix-placeholder-color: var(--wcs-semantic-color-text-inverse);\n\n display: flex;\n flex-direction: column;\n gap: var(--wcs-form-field-gap);\n\n .input-container {\n display: flex;\n }\n\n /* Components in the prefix slot */\n ::slotted([slot=prefix]) {\n /* Select */\n --wcs-select-value-color: var(--wcs-semantic-color-text-inverse);\n --wcs-select-placeholder-color: var(--wcs-semantic-color-text-inverse);\n --wcs-select-control-background-color: var(--wcs-semantic-color-background-action-primary-default);\n --wcs-select-control-arrow-color: var(--wcs-form-field-prefix-icon-color);\n --wcs-select-control-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n --wcs-select-control-border-width-default: 0;\n --wcs-select-control-border-style-focus: dashed;\n --wcs-select-control-border-color-focus: var(--wcs-semantic-color-border-focus-base);\n\n /* Native select */\n --wcs-native-select-value-color: var(--wcs-semantic-color-text-inverse);\n --wcs-native-select-placeholder-color: var(--wcs-semantic-color-text-inverse);\n --wcs-native-select-arrow-color: var(--wcs-form-field-prefix-icon-color);\n --wcs-native-select-background-color: var(--wcs-semantic-color-background-action-primary-default);\n --wcs-native-select-border-width: 0;\n --wcs-native-select-border-color-focus: var(--wcs-semantic-color-border-focus-base);\n --wcs-native-select-border-style-focus: dashed;\n --wcs-native-select-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n --wcs-native-select-option-color: var(--wcs-semantic-color-text-inverse);\n\n /* Button */\n --wcs-button-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n }\n\n /* Components in the suffix slot */\n ::slotted([slot=suffix]) {\n --wcs-button-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n --wcs-select-control-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n --wcs-native-select-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n }\n}\n\n/* Disabled components in the prefix slot */\n::slotted([slot=prefix][disabled]),\n::slotted([slot=prefix]:disabled),\n::slotted([slot=prefix][aria-disabled=true]),\n::slotted([slot=prefix][data-disabled]) {\n --wcs-semantic-color-background-control-disabled: var(--wcs-semantic-color-background-action-primary-disabled);\n --wcs-semantic-color-text-disabled: var(--wcs-semantic-color-foreground-disabled);\n\n --wcs-select-control-background-color: var(--wcs-semantic-color-background-action-primary-disabled);\n --wcs-select-value-color: var(--wcs-semantic-color-text-disabled);\n --wcs-select-placeholder-color: var(--wcs-semantic-color-text-disabled);\n\n --wcs-native-select-background-color: var(--wcs-semantic-color-background-action-primary-disabled);\n --wcs-native-select-placeholder-color: var(--wcs-semantic-color-text-disabled);\n --wcs-native-select-value-color: var(--wcs-semantic-color-text-disabled);\n}\n\n/* Hover and press states */\n::slotted([slot=prefix]:hover:not([disabled]):not([data-disabled])) {\n --wcs-select-control-background-color: var(--wcs-semantic-color-background-action-primary-hover);\n --wcs-native-select-background-color: var(--wcs-semantic-color-background-action-primary-hover);\n}\n\n::slotted([slot=prefix]:active:not([disabled]):not([data-disabled])) {\n --wcs-select-control-background-color: var(--wcs-semantic-color-background-action-primary-press);\n --wcs-native-select-background-color: var(--wcs-semantic-color-background-action-primary-press);\n}\n\n.input-container {\n display: flex;\n}\n\n::slotted(wcs-select:not([slot=prefix])) {\n width: 100%;\n}\n\n::slotted(wcs-native-select:not([slot=prefix])) {\n width: 100%;\n}\n\n/* Components in the center that are prefixed */\n:host(.has-prefix) {\n ::slotted(:not([slot=prefix])) {\n --wcs-input-border-radius-left: 0;\n --wcs-select-control-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n --wcs-native-select-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n }\n}\n\n/* Components in the center that are suffixed */\n:host(.has-suffix) {\n ::slotted(:not([slot=suffix])) {\n --wcs-input-border-radius-right: 0;\n --wcs-select-control-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n --wcs-native-select-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n }\n\n}\n\n/* Components in the center that are prefixed AND suffixed */\n:host(.has-prefix.has-suffix) {\n ::slotted(:not([slot=prefix]):not([slot=suffix])) {\n --wcs-input-border-radius-left: 0;\n --wcs-input-border-radius-right: 0;\n --wcs-select-control-border-radius: 0;\n --wcs-native-select-border-radius: 0;\n }\n}\n","import { Component, ComponentInterface, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { isMutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { normalizeWhitespace } from '../../utils/helpers';\nimport { isControlComponentWithLabel } from \"../../utils/control-component-interface\";\n\n/**\n * Form field component wraps the native input element and add some more functionality on top of it.\n *\n * You can use the `wcs-form-field` to wrap any of these components :\n * - `wcs-input`\n * - `wcs-textarea`\n * - `wcs-radio-group`\n * - `wcs-switch`\n * - `wcs-checkbox`\n * - `wcs-native-select`\n * - `wcs-select`\n * - `wcs-counter`\n *\n * For non-supported slotted component, you can use the `required` attribute on the wrapped component to tell the\n * form-field that it is required. It will add a red star after the label of the form field.\n * \n * ## Accessibility guidelines 💡\n * - Each form control should be identified with a unique `wcs-label`\n * - Don't forget to add form validation to make sure the data is correctly formatted\n * - If the `wcs-label` is required, the form control must have the `required` HTML attribute and vice-versa (this is normally automatically set)\n * - The form should not be submittable if at least one required form control is not filled\n * - Hints are optional and should only be used to add extra information\n * - Additional aria attributes put on `<wcs-form-field>` won't inherit onto the native component : you must use the `setAriaAttribute` method.\n * \n * @slot label - Automatically filled when a `wcs-label` is provided\n * @slot <no-name> - The main slot containing the wrapped component\n * @slot prefix - (Optional) Display a component as prefix. See \"Prefix Suffix Group\" story for more info.\n * @slot suffix - (Optional) Display a component as suffix. See \"Prefix Suffix Group\" story for more info.\n * @slot error - Automatically filled when a `wcs-error` is provided\n * @slot messages - Automatically filled when a `wcs-hint` is provided\n *\n * @cssprop --wcs-form-field-gap - Defines the spacing between the label, input control, and hint messages.\n * @cssprop --wcs-form-field-prefix-suffix-border-radius - Sets the border radius for both prefix and suffix elements.\n * \n * @cssprop --wcs-form-field-prefix-background-color-default - Background color default for prefix elements\n * @cssprop --wcs-form-field-prefix-background-color-disabled - Background color for prefix elements when disabled\n * @cssprop --wcs-form-field-prefix-background-color-hover - Background color for prefix elements when hovered\n * @cssprop --wcs-form-field-prefix-border-color-default - Defines the default border color for prefix\n * @cssprop --wcs-form-field-prefix-border-color-focus - Sets the border color for prefix elements when focused.\n * @cssprop --wcs-form-field-prefix-border-color-disabled - Determines the border color for prefix elements when disabled.\n * \n * @cssprop --wcs-form-field-prefix-icon-color - Specifies the color of icons within prefix elements.\n * @cssprop --wcs-form-field-prefix-value-color - Sets the color of values within prefix elements.\n * @cssprop --wcs-form-field-prefix-placeholder-color - Defines the placeholder text color within prefix elements.\n * @cssprop --wcs-form-field-prefix-color-disabled - Determines the text color for prefix elements when disabled.\n */\n@Component({\n tag: 'wcs-form-field',\n styleUrl: 'form-field.scss',\n shadow: true,\n})\nexport class FormField implements ComponentInterface {\n @Element() private el!: HTMLWcsFormFieldElement;\n\n /**\n * Specifies whether the form field is in an error state. Displays the field border in red and the message contained in the wcs-error component\n */\n @Prop({mutable: true, reflect: true}) isError = false;\n\n @State() private hasPrefix = false;\n @State() private hasSuffix = false;\n @State() private spiedElement: Element;\n\n private observer: MutationObserver;\n\n componentWillLoad() {\n this.hasSuffix = this.el.querySelector('[slot=suffix]') !== null;\n this.hasPrefix = this.el.querySelector('[slot=prefix]') !== null;\n }\n\n componentDidLoad() {\n this.initSpiedElement();\n this.addRequiredMarkerToLabel();\n this.updateErrorStateOnInput(this.isError);\n }\n\n @Watch('isError')\n // @ts-ignore\n private isErrorChange(newValue: boolean) {\n this.updateErrorStateOnInput(newValue);\n this.updateAriaAttributes();\n }\n\n private updateErrorStateOnInput(newValue: boolean) {\n if (this.spiedElementIsOfType('wcs-input', 'wcs-textarea')) {\n if (newValue) {\n this.spiedElement.setAttribute('state', 'error');\n } else {\n this.spiedElement.setAttribute('state', 'initial');\n }\n }\n }\n\n /**\n * This function return true if the form field contains an element with tagName matches a value of the types param\n * @param types\n * @private\n */\n private spiedElementIsOfType(...types: string[]): boolean {\n for (const type of types) {\n if (this.spiedElement?.tagName === type.toUpperCase()) return true;\n }\n return false\n }\n\n\n private addRequiredMarkerToLabel() {\n // TODO: deprecate this in favor of the 'required' component attribute\n const label = this.el.querySelector('wcs-label');\n this.observer = new MutationObserver(mutations => {\n const requiredAttMutation = mutations.filter(m => m.attributeName === 'required')[0];\n if (requiredAttMutation) {\n this.updateLabelRequiredFlag(this.spiedElement?.hasAttribute('required'), label);\n }\n });\n if (this.spiedElement) {\n this.observer.observe(this.spiedElement, {attributes: true});\n }\n\n const isRequired = this.spiedElement?.hasAttribute('required');\n this.updateLabelRequiredFlag(isRequired, label);\n }\n\n\n private initSpiedElement() {\n const SUPPORTED_COMPONENTS = ['wcs-input', 'wcs-select', 'wcs-native-select', 'wcs-textarea', 'wcs-radio-group', 'wcs-switch', 'wcs-checkbox', 'wcs-native-select', 'wcs-counter'];\n\n this.spiedElement = (this.el.shadowRoot.querySelector('slot:not([name])') as HTMLSlotElement)\n ?.assignedElements()\n .filter(n => [...SUPPORTED_COMPONENTS, 'SLOT'].map(x => x.toUpperCase()).indexOf(n.nodeName) !== -1)[0];\n\n // If the component is used in another web component\n if (this.spiedElement?.tagName === 'SLOT') {\n this.spiedElement = ((this.spiedElement as HTMLSlotElement)\n .assignedElements()\n .filter(n => SUPPORTED_COMPONENTS.map(x => x.toUpperCase()).indexOf(n.nodeName) !== -1)[0]) as HTMLElement;\n }\n\n if (!this.spiedElement) {\n // tslint:disable-next-line:no-console\n console.warn('Form-field component support only ' + SUPPORTED_COMPONENTS.toString() + '. Some features may not work with the provided component.');\n return;\n }\n }\n \n private async updateAriaAttributes(): Promise<void> {\n if (isMutableAriaAttribute(this.spiedElement)) {\n const ariaLabelParts: string[] = [];\n if (isControlComponentWithLabel(this.spiedElement)) {\n const innerLabel = await this.spiedElement.getLabel();\n const combinedLabel = `${this.label || ''} ${innerLabel || ''}`.trim();\n if(combinedLabel) {\n ariaLabelParts.push(normalizeWhitespace(combinedLabel));\n }\n } else {\n if(this.label) {\n ariaLabelParts.push(normalizeWhitespace(this.label));\n }\n }\n\n if(this.description) {\n ariaLabelParts.push(normalizeWhitespace(this.description));\n }\n \n // Sur les autres DS, généralement seul l'erreur est affichée et pas avec la description\n if(this.isError) {\n this.spiedElement.setAriaAttribute('aria-invalid', 'true');\n if(this.error) {\n ariaLabelParts.push(normalizeWhitespace(this.error));\n }\n } else {\n this.spiedElement.setAriaAttribute('aria-invalid', 'false');\n }\n\n this.spiedElement.setAriaAttribute('aria-label', ariaLabelParts.length > 0 ? ariaLabelParts.join(' ') : null);\n }\n }\n \n private get label(): string | null {\n return this.el.querySelector('wcs-label')?.textContent || null;\n }\n \n private get description(): string | null {\n return this.el.querySelector('wcs-hint')?.textContent || null;\n }\n \n private get error(): string | null {\n return this.el.querySelector('wcs-error')?.textContent || null;\n }\n\n private updateLabelRequiredFlag(isRequired: boolean, label: Element) {\n if (isRequired && label) {\n label.setAttribute('required', 'true');\n } else if (!isRequired && label) {\n label.removeAttribute('required');\n }\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n render() {\n let classes = '';\n const isError = this.isError;\n\n if (this.hasSuffix) {\n classes += ' has-suffix';\n }\n if (this.hasPrefix) {\n classes += ' has-prefix';\n }\n return (\n <Host class={classes}>\n <slot name=\"label\"/>\n <div class=\"input-container\">\n <slot name=\"prefix\"/>\n <slot onSlotchange={() => this.onFormInputSlotChange()}/>\n <slot name=\"suffix\"/>\n </div>\n {\n isError ? (<slot name=\"error\"/>) : ''\n }\n <slot name=\"messages\"/>\n </Host>\n );\n }\n\n private onFormInputSlotChange() {\n this.initSpiedElement();\n this.updateAriaAttributes()\n this.addRequiredMarkerToLabel();\n this.updateErrorStateOnInput(this.isError);\n }\n}\n",":host {\n --wcs-label-font-weight: var(--wcs-semantic-font-weight-book);\n --wcs-label-color: var(--wcs-semantic-color-text-primary);\n --wcs-label-required-marker-color: var(--wcs-semantic-color-text-critical);\n\n --wcs-label-gap: var(--wcs-semantic-spacing-small);\n\n font-weight: var(--wcs-label-font-weight);\n}\n\n:host([required]) > label::after {\n font-weight: var(--wcs-label-font-weight);\n color: var(--wcs-label-required-marker-color);\n content: ' *';\n}\n\nlabel {\n display: inline-block;\n color: var(--wcs-label-color);\n font-weight: var(--wcs-label-font-weight);\n\n // Add margin before tooltip icon\n ::slotted(wcs-mat-icon) {\n display: inline;\n vertical-align: middle;\n margin-left: var(--wcs-label-gap);\n }\n}\n","import { Component, ComponentInterface, h, Host, Method, Prop, Element } from '@stencil/core';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from \"../../utils/helpers\";\n\nconst LABEL_INHERITED_ATTRS = ['title'];\n\n/**\n * The `wcs-label` should always be wrapped in a `wcs-form-field`.\n * It is used to caption a form control component.\n *\n * ## Accessibility guidelines 💡\n * - Use concise name for the label. If you want to describe more your form control, add a `wcs-hint`\n * - Use the required flag only as an indication to inform users that the form control is required\n * \n * @cssprop --wcs-label-color - Color of the text\n * @cssprop --wcs-label-font-weight - Font weight of the text\n * \n * @cssprop --wcs-label-required-marker-color - Color of the required marker\n * \n * @cssprop --wcs-label-gap - Gap between text and required marker\n */\n@Component({\n tag: 'wcs-label',\n styleUrl: 'label.scss',\n shadow: true,\n})\nexport class Label implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeLabel?: HTMLLabelElement;\n private inheritedAttributes: { [k: string]: any } = {};\n \n /**\n * If `true`, marks the label with a red star.\n * Automatically added if the wrapped component inside the `wcs-form-field` already has the `required` attribute. \n */\n @Prop({ reflect: true }) required = false;\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, LABEL_INHERITED_ATTRS),\n };\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeLabel, attr, value);\n }\n\n render() {\n return (\n <Host slot=\"label\">\n <label ref={(el) => this.nativeLabel = el} {...this.inheritedAttributes}>\n <slot />\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"wcs-error.wcs-form-field.wcs-label.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,wSAAwS,CAAC;AAC1T,uBAAe,QAAQ;;MCoBVA,OAAK;;;;IACd,MAAM;QACF,QACIC,QAACC,UAAI,qDAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,IAC3BD,oEAAQ,CACL,EACT;KACL;;;;AC5BL,MAAM,YAAY,GAAG,ytJAAytJ,CAAC;AAC/uJ,2BAAe,YAAY;;MCuDd,SAAS;;;uBAMuC,KAAK;yBAExB,KAAK;yBACL,KAAK;;;IAK3C,iBAAiB;QACb,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;QACjE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;KACpE;IAED,gBAAgB;QACZ,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC9C;IAIO,aAAa,CAAC,QAAiB;QACnC,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,oBAAoB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AAC;QACxB,IAAI,CAAC,oBAAoB,EAAE,CAAA;QAC3B,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC9C;;;;;;;;AC9OL,MAAM,QAAQ,GAAG,4mBAA4mB,CAAC;AAC9nB,uBAAe,QAAQ;;ACGvB,MAAM,qBAAqB,GAAG,CAAC,OAAO,CAAC,CAAC;MAsB3B,KAAK;;;QAGN,wBAAmB,GAAyB,EAAE,CAAC;wBAMV,KAAK;;IAElD,iBAAiB;QACb,IAAI,CAAC,mBAAmB,mCACjBK,6BAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,GAC9BC,yBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,CACvD,CAAC;KACL;IAGD,MAAM,gBAAgB,CAAC,IAAuB,EAAE,KAAgC;QAC5EC,4BAAoB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;KACvD;IAED,MAAM;QACF,QACIP,QAACC,UAAI,qDAAC,IAAI,EAAC,OAAO,IACdD,kFAAO,GAAG,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,EAAE,IAAM,IAAI,CAAC,mBAAmB,GACnEA,oEAAQ,CACJ,CACL,EACT;KACL;;;;;;;;;","names":["Label","h","Host","isMutableAriaAttribute","isControlComponentWithLabel","normalizeWhitespace","inheritAriaAttributes","inheritAttributes","setOrRemoveAttribute"],"sources":["src/components/error/error.scss?tag=wcs-error&encapsulation=shadow","src/components/error/error.tsx","src/components/form-field/form-field.scss?tag=wcs-form-field&encapsulation=shadow","src/components/form-field/form-field.tsx","src/components/label/label.scss?tag=wcs-label&encapsulation=shadow","src/components/label/label.tsx"],"sourcesContent":[":host {\n --wcs-error-color: var(--wcs-semantic-color-text-critical);\n --wcs-error-font-size: var(--wcs-semantic-font-size-caption-2);\n --wcs-error-font-weight: var(--wcs-semantic-font-weight-book);\n\n color: var(--wcs-error-color);\n font-size: var(--wcs-error-font-size);\n font-weight: var(--wcs-error-font-weight);\n}\n","import { Component, ComponentInterface, h, Host } from '@stencil/core';\n\n/**\n * The `wcs-error` should always be wrapped in a `wcs-form-field`.\n * It is used to display a red message under the field indicating an incorrect user input.\n * \n * ## Accessibility guidelines 💡\n * - Provide a relevant error message to inform the users what they should change to make the field valid\n * - Always add the error icon, to ensure the visual indication of the error state other than the color\n * - `aria-description` will be automatically added to the field for screen readers\n * - `aria-invalid=\"true\"` will be automatically added to the field for screen readers\n * \n * @cssprop --wcs-error-color - Color of the text\n * @cssprop --wcs-error-font-size - Font size\n * @cssprop --wcs-error-font-weight - Font weight\n */\n@Component({\n tag: 'wcs-error',\n styleUrl: 'error.scss',\n shadow: true,\n})\nexport class Label implements ComponentInterface {\n render() {\n return (\n <Host role=\"alert\" slot=\"error\">\n <slot />\n </Host>\n );\n }\n}\n",":host {\n --wcs-form-field-gap: var(--wcs-semantic-spacing-small);\n\n --wcs-form-field-prefix-suffix-border-radius: var(--wcs-semantic-border-radius-base);\n\n --wcs-form-field-prefix-icon-color: var(--wcs-semantic-color-foreground-primary);\n --wcs-form-field-prefix-value-color: var(--wcs-semantic-color-text-inverse);\n --wcs-form-field-prefix-placeholder-color: var(--wcs-semantic-color-text-inverse);\n\n display: flex;\n flex-direction: column;\n gap: var(--wcs-form-field-gap);\n\n .input-container {\n display: flex;\n }\n\n /* Components in the prefix slot */\n ::slotted([slot=prefix]) {\n /* Select */\n --wcs-select-value-color: var(--wcs-semantic-color-text-inverse);\n --wcs-select-placeholder-color: var(--wcs-semantic-color-text-inverse);\n --wcs-select-control-background-color: var(--wcs-semantic-color-background-action-primary-default);\n --wcs-select-control-arrow-color: var(--wcs-form-field-prefix-icon-color);\n --wcs-select-control-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n --wcs-select-control-border-width-default: 0;\n --wcs-select-control-border-style-focus: dashed;\n --wcs-select-control-border-color-focus: var(--wcs-semantic-color-border-focus-base);\n\n /* Native select */\n --wcs-native-select-value-color: var(--wcs-semantic-color-text-inverse);\n --wcs-native-select-placeholder-color: var(--wcs-semantic-color-text-inverse);\n --wcs-native-select-arrow-color: var(--wcs-form-field-prefix-icon-color);\n --wcs-native-select-background-color: var(--wcs-semantic-color-background-action-primary-default);\n --wcs-native-select-border-width: 0;\n --wcs-native-select-border-color-focus: var(--wcs-semantic-color-border-focus-base);\n --wcs-native-select-border-style-focus: dashed;\n --wcs-native-select-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n --wcs-native-select-option-color: var(--wcs-semantic-color-text-inverse);\n\n /* Button */\n --wcs-button-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n }\n\n /* Components in the suffix slot */\n ::slotted([slot=suffix]) {\n --wcs-button-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n --wcs-select-control-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n --wcs-native-select-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n }\n}\n\n/* Disabled components in the prefix slot */\n::slotted([slot=prefix][disabled]),\n::slotted([slot=prefix]:disabled),\n::slotted([slot=prefix][aria-disabled=true]),\n::slotted([slot=prefix][data-disabled]) {\n --wcs-semantic-color-background-control-disabled: var(--wcs-semantic-color-background-action-primary-disabled);\n --wcs-semantic-color-text-disabled: var(--wcs-semantic-color-foreground-disabled);\n\n --wcs-select-control-background-color: var(--wcs-semantic-color-background-action-primary-disabled);\n --wcs-select-value-color: var(--wcs-semantic-color-text-disabled);\n --wcs-select-placeholder-color: var(--wcs-semantic-color-text-disabled);\n\n --wcs-native-select-background-color: var(--wcs-semantic-color-background-action-primary-disabled);\n --wcs-native-select-placeholder-color: var(--wcs-semantic-color-text-disabled);\n --wcs-native-select-value-color: var(--wcs-semantic-color-text-disabled);\n}\n\n/* Hover and press states */\n::slotted([slot=prefix]:hover:not([disabled]):not([data-disabled])) {\n --wcs-select-control-background-color: var(--wcs-semantic-color-background-action-primary-hover);\n --wcs-native-select-background-color: var(--wcs-semantic-color-background-action-primary-hover);\n}\n\n::slotted([slot=prefix]:active:not([disabled]):not([data-disabled])) {\n --wcs-select-control-background-color: var(--wcs-semantic-color-background-action-primary-press);\n --wcs-native-select-background-color: var(--wcs-semantic-color-background-action-primary-press);\n}\n\n.input-container {\n display: flex;\n}\n\n::slotted(wcs-select:not([slot=prefix])) {\n width: 100%;\n}\n\n::slotted(wcs-native-select:not([slot=prefix])) {\n width: 100%;\n}\n\n/* Components in the center that are prefixed */\n:host(.has-prefix) {\n ::slotted(:not([slot=prefix])) {\n --wcs-input-border-radius-left: 0;\n --wcs-select-control-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n --wcs-native-select-border-radius: 0 var(--wcs-form-field-prefix-suffix-border-radius) var(--wcs-form-field-prefix-suffix-border-radius) 0;\n }\n}\n\n/* Components in the center that are suffixed */\n:host(.has-suffix) {\n ::slotted(:not([slot=suffix])) {\n --wcs-input-border-radius-right: 0;\n --wcs-select-control-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n --wcs-native-select-border-radius: var(--wcs-form-field-prefix-suffix-border-radius) 0 0 var(--wcs-form-field-prefix-suffix-border-radius);\n }\n\n}\n\n/* Components in the center that are prefixed AND suffixed */\n:host(.has-prefix.has-suffix) {\n ::slotted(:not([slot=prefix]):not([slot=suffix])) {\n --wcs-input-border-radius-left: 0;\n --wcs-input-border-radius-right: 0;\n --wcs-select-control-border-radius: 0;\n --wcs-native-select-border-radius: 0;\n }\n}\n","import { Component, ComponentInterface, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { isMutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { normalizeWhitespace } from '../../utils/helpers';\nimport { isControlComponentWithLabel } from \"../../utils/control-component-interface\";\n\n/**\n * Form field component wraps the native input element and add some more functionality on top of it.\n *\n * You can use the `wcs-form-field` to wrap any of these components :\n * - `wcs-input`\n * - `wcs-textarea`\n * - `wcs-radio-group`\n * - `wcs-switch`\n * - `wcs-checkbox`\n * - `wcs-native-select`\n * - `wcs-select`\n * - `wcs-counter`\n *\n * For non-supported slotted component, you can use the `required` attribute on the wrapped component to tell the\n * form-field that it is required. It will add a red star after the label of the form field.\n * \n * ## Accessibility guidelines 💡\n * - Each form control should be identified with a unique `wcs-label`\n * - Don't forget to add form validation to make sure the data is correctly formatted\n * - If the `wcs-label` is required, the form control must have the `required` HTML attribute and vice-versa (this is normally automatically set)\n * - The form should not be submittable if at least one required form control is not filled\n * - Hints are optional and should only be used to add extra information\n * - Additional aria attributes put on `<wcs-form-field>` won't inherit onto the native component : you must use the `setAriaAttribute` method.\n * \n * @slot label - Automatically filled when a `wcs-label` is provided\n * @slot <no-name> - The main slot containing the wrapped component\n * @slot prefix - (Optional) Display a component as prefix. See \"Prefix Suffix Group\" story for more info.\n * @slot suffix - (Optional) Display a component as suffix. See \"Prefix Suffix Group\" story for more info.\n * @slot error - Automatically filled when a `wcs-error` is provided\n * @slot messages - Automatically filled when a `wcs-hint` is provided\n *\n * @cssprop --wcs-form-field-gap - Defines the spacing between the label, input control, and hint messages.\n * @cssprop --wcs-form-field-prefix-suffix-border-radius - Sets the border radius for both prefix and suffix elements.\n * \n * @cssprop --wcs-form-field-prefix-background-color-default - Background color default for prefix elements\n * @cssprop --wcs-form-field-prefix-background-color-disabled - Background color for prefix elements when disabled\n * @cssprop --wcs-form-field-prefix-background-color-hover - Background color for prefix elements when hovered\n * @cssprop --wcs-form-field-prefix-border-color-default - Defines the default border color for prefix\n * @cssprop --wcs-form-field-prefix-border-color-focus - Sets the border color for prefix elements when focused.\n * @cssprop --wcs-form-field-prefix-border-color-disabled - Determines the border color for prefix elements when disabled.\n * \n * @cssprop --wcs-form-field-prefix-icon-color - Specifies the color of icons within prefix elements.\n * @cssprop --wcs-form-field-prefix-value-color - Sets the color of values within prefix elements.\n * @cssprop --wcs-form-field-prefix-placeholder-color - Defines the placeholder text color within prefix elements.\n * @cssprop --wcs-form-field-prefix-color-disabled - Determines the text color for prefix elements when disabled.\n */\n@Component({\n tag: 'wcs-form-field',\n styleUrl: 'form-field.scss',\n shadow: true,\n})\nexport class FormField implements ComponentInterface {\n @Element() private el!: HTMLWcsFormFieldElement;\n\n /**\n * Specifies whether the form field is in an error state. Displays the field border in red and the message contained in the wcs-error component\n */\n @Prop({mutable: true, reflect: true}) isError: boolean = false;\n\n @State() private hasPrefix: boolean = false;\n @State() private hasSuffix: boolean = false;\n @State() private spiedElement: Element;\n\n private observer: MutationObserver;\n\n componentWillLoad() {\n this.hasSuffix = this.el.querySelector('[slot=suffix]') !== null;\n this.hasPrefix = this.el.querySelector('[slot=prefix]') !== null;\n }\n\n componentDidLoad() {\n this.initSpiedElement();\n this.addRequiredMarkerToLabel();\n this.updateErrorStateOnInput(this.isError);\n }\n\n @Watch('isError')\n // @ts-ignore\n private isErrorChange(newValue: boolean) {\n this.updateErrorStateOnInput(newValue);\n this.updateAriaAttributes();\n }\n\n private updateErrorStateOnInput(newValue: boolean) {\n if (this.spiedElementIsOfType('wcs-input', 'wcs-textarea')) {\n if (newValue) {\n this.spiedElement.setAttribute('state', 'error');\n } else {\n this.spiedElement.setAttribute('state', 'initial');\n }\n }\n }\n\n /**\n * This function return true if the form field contains an element with tagName matches a value of the types param\n * @param types\n * @private\n */\n private spiedElementIsOfType(...types: string[]): boolean {\n for (const type of types) {\n if (this.spiedElement?.tagName === type.toUpperCase()) return true;\n }\n return false\n }\n\n\n private addRequiredMarkerToLabel() {\n // TODO: deprecate this in favor of the 'required' component attribute\n const label = this.el.querySelector('wcs-label');\n this.observer = new MutationObserver(mutations => {\n const requiredAttMutation = mutations.filter(m => m.attributeName === 'required')[0];\n if (requiredAttMutation) {\n this.updateLabelRequiredFlag(this.spiedElement?.hasAttribute('required'), label);\n }\n });\n if (this.spiedElement) {\n this.observer.observe(this.spiedElement, {attributes: true});\n }\n\n const isRequired = this.spiedElement?.hasAttribute('required');\n this.updateLabelRequiredFlag(isRequired, label);\n }\n\n\n private initSpiedElement() {\n const SUPPORTED_COMPONENTS = ['wcs-input', 'wcs-select', 'wcs-native-select', 'wcs-textarea', 'wcs-radio-group', 'wcs-switch', 'wcs-checkbox', 'wcs-native-select', 'wcs-counter'];\n\n this.spiedElement = (this.el.shadowRoot.querySelector('slot:not([name])') as HTMLSlotElement)\n ?.assignedElements()\n .filter(n => [...SUPPORTED_COMPONENTS, 'SLOT'].map(x => x.toUpperCase()).indexOf(n.nodeName) !== -1)[0];\n\n // If the component is used in another web component\n if (this.spiedElement?.tagName === 'SLOT') {\n this.spiedElement = ((this.spiedElement as HTMLSlotElement)\n .assignedElements()\n .filter(n => SUPPORTED_COMPONENTS.map(x => x.toUpperCase()).indexOf(n.nodeName) !== -1)[0]) as HTMLElement;\n }\n\n if (!this.spiedElement) {\n // tslint:disable-next-line:no-console\n console.warn('Form-field component support only ' + SUPPORTED_COMPONENTS.toString() + '. Some features may not work with the provided component.');\n return;\n }\n }\n \n private async updateAriaAttributes(): Promise<void> {\n if (isMutableAriaAttribute(this.spiedElement)) {\n const ariaLabelParts: string[] = [];\n if (isControlComponentWithLabel(this.spiedElement)) {\n const innerLabel = await this.spiedElement.getLabel();\n const combinedLabel = `${this.label || ''} ${innerLabel || ''}`.trim();\n if(combinedLabel) {\n ariaLabelParts.push(normalizeWhitespace(combinedLabel));\n }\n } else {\n if(this.label) {\n ariaLabelParts.push(normalizeWhitespace(this.label));\n }\n }\n\n if(this.description) {\n ariaLabelParts.push(normalizeWhitespace(this.description));\n }\n \n // Sur les autres DS, généralement seul l'erreur est affichée et pas avec la description\n if(this.isError) {\n this.spiedElement.setAriaAttribute('aria-invalid', 'true');\n if(this.error) {\n ariaLabelParts.push(normalizeWhitespace(this.error));\n }\n } else {\n this.spiedElement.setAriaAttribute('aria-invalid', 'false');\n }\n\n this.spiedElement.setAriaAttribute('aria-label', ariaLabelParts.length > 0 ? ariaLabelParts.join(' ') : null);\n }\n }\n \n private get label(): string | null {\n return this.el.querySelector('wcs-label')?.textContent || null;\n }\n \n private get description(): string | null {\n return this.el.querySelector('wcs-hint')?.textContent || null;\n }\n \n private get error(): string | null {\n return this.el.querySelector('wcs-error')?.textContent || null;\n }\n\n private updateLabelRequiredFlag(isRequired: boolean, label: Element) {\n if (isRequired && label) {\n label.setAttribute('required', 'true');\n } else if (!isRequired && label) {\n label.removeAttribute('required');\n }\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n render() {\n let classes = '';\n const isError = this.isError;\n\n if (this.hasSuffix) {\n classes += ' has-suffix';\n }\n if (this.hasPrefix) {\n classes += ' has-prefix';\n }\n return (\n <Host class={classes}>\n <slot name=\"label\"/>\n <div class=\"input-container\">\n <slot name=\"prefix\"/>\n <slot onSlotchange={() => this.onFormInputSlotChange()}/>\n <slot name=\"suffix\"/>\n </div>\n {\n isError ? (<slot name=\"error\"/>) : ''\n }\n <slot name=\"messages\"/>\n </Host>\n );\n }\n\n private onFormInputSlotChange() {\n this.initSpiedElement();\n this.updateAriaAttributes()\n this.addRequiredMarkerToLabel();\n this.updateErrorStateOnInput(this.isError);\n }\n}\n",":host {\n --wcs-label-font-weight: var(--wcs-semantic-font-weight-book);\n --wcs-label-color: var(--wcs-semantic-color-text-primary);\n --wcs-label-required-marker-color: var(--wcs-semantic-color-text-critical);\n\n --wcs-label-gap: var(--wcs-semantic-spacing-small);\n\n font-weight: var(--wcs-label-font-weight);\n}\n\n:host([required]) > label::after {\n font-weight: var(--wcs-label-font-weight);\n color: var(--wcs-label-required-marker-color);\n content: ' *';\n}\n\nlabel {\n display: inline-block;\n color: var(--wcs-label-color);\n font-weight: var(--wcs-label-font-weight);\n\n // Add margin before tooltip icon\n ::slotted(wcs-mat-icon) {\n display: inline;\n vertical-align: middle;\n margin-left: var(--wcs-label-gap);\n }\n}\n","import { Component, ComponentInterface, h, Host, Method, Prop, Element } from '@stencil/core';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from \"../../utils/helpers\";\n\nconst LABEL_INHERITED_ATTRS = ['title'];\n\n/**\n * The `wcs-label` should always be wrapped in a `wcs-form-field`.\n * It is used to caption a form control component.\n *\n * ## Accessibility guidelines 💡\n * - Use concise name for the label. If you want to describe more your form control, add a `wcs-hint`\n * - Use the required flag only as an indication to inform users that the form control is required\n * \n * @cssprop --wcs-label-color - Color of the text\n * @cssprop --wcs-label-font-weight - Font weight of the text\n * \n * @cssprop --wcs-label-required-marker-color - Color of the required marker\n * \n * @cssprop --wcs-label-gap - Gap between text and required marker\n */\n@Component({\n tag: 'wcs-label',\n styleUrl: 'label.scss',\n shadow: true,\n})\nexport class Label implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeLabel?: HTMLLabelElement;\n private inheritedAttributes: { [k: string]: any } = {};\n \n /**\n * If `true`, marks the label with a red star.\n * Automatically added if the wrapped component inside the `wcs-form-field` already has the `required` attribute. \n */\n @Prop({ reflect: true }) required: boolean = false;\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, LABEL_INHERITED_ATTRS),\n };\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeLabel, attr, value);\n }\n\n render() {\n return (\n <Host slot=\"label\">\n <label ref={(el) => this.nativeLabel = el} {...this.inheritedAttributes}>\n <slot />\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -9,7 +9,7 @@ const FieldContent = class {
|
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (index.h(index.Host, { key: '
|
|
12
|
+
return (index.h(index.Host, { key: '251b9ccc1b13766b287f356dfc51d6a953ad0a5e', slot: "content" }, index.h("slot", { key: 'ee7d55bf47c0f468829e99a26a0fe340fbafcc9f' })));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ const FieldLabel = class {
|
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (index.h(index.Host, { key: '
|
|
12
|
+
return (index.h(index.Host, { key: 'a051b09993d67bf56b087d86ba433caf1bdbb7a6', slot: "label" }, index.h("slot", { key: '6044b728151fd48878f555d3db3e0754f31b7e51' })));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -12,7 +12,7 @@ const Field = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '
|
|
15
|
+
return (index.h(index.Host, { key: 'ae0a6c7224dc199cd6cd342d77878bfff17aa49b' }, index.h("slot", { key: '408c146f3e6bfa1868964a29934494215627fb59', name: "label" }), index.h("slot", { key: '9c2151491f6acc4a5a6da36676e21e8dee6f156a', name: "content" })));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
Field.style = WcsFieldStyle0;
|
|
@@ -12,7 +12,7 @@ const Footer = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '
|
|
15
|
+
return (index.h(index.Host, { key: '6fe975235d6de2793e55e8d10860649b5684c093' }, index.h("footer", { key: '80b0ff721eedab3e4cc00fd2484a638718fc8b13', role: "contentinfo" }, index.h("div", { key: 'f7d676d79f4d8780736e3a28e3e4b2aa1f0786e1', class: "container" }, index.h("div", { key: 'e1f9ea823133d972d3eb2bc8e7eaa18558448a73' }, index.h("slot", { key: 'd7177b9e98ac24ad39008669de01899e71c27079' })), index.h("div", { key: '849ceafdd459f24b672e1f68edf86ffd4fcce733', class: "end" }, index.h("div", { key: '7077861e872bbb50e7e5de0c968fe2222e9bf7d7', class: "end-left" }, index.h("slot", { key: 'dded653e62bf683e0514c51b06e55ccb44f70c54', name: "end-left" })), index.h("div", { key: 'ec25d2a5f84cb477eaa6a63de4df6ce6e9db07c5', class: "end-right" }, index.h("slot", { key: '4201096294b44a29f74112c2acaa2163f9ecfcb9', name: "end-right" })))))));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
Footer.style = WcsFooterStyle0;
|
|
@@ -65,9 +65,9 @@ const Galactic = class {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return (index.h(index.Host, { key: '
|
|
68
|
+
return (index.h(index.Host, { key: 'bc460c17b222723b8cc037042cc758f8ca0e50ec' }, index.h("span", { key: 'd324ff624a9e5c9f6984134d4091986cac11f18b' }, this.text), index.h("button", Object.assign({ key: '7b0160174a249b30e082b9b2a77aca334ee6256a', "aria-haspopup": "true", "aria-controls": "menu", ref: el => {
|
|
69
69
|
this.menuButton = el;
|
|
70
|
-
}, "aria-expanded": this.showPopoverMenu ? "true" : "false" }, this.inheritedAttributes, { onClick: _ => this.toggleMenu() }), index.h("wcs-mat-icon", { key: '
|
|
70
|
+
}, "aria-expanded": this.showPopoverMenu ? "true" : "false" }, this.inheritedAttributes, { onClick: _ => this.toggleMenu() }), index.h("wcs-mat-icon", { key: '96b20053845f5490791ea278c2444392ba630600', id: "toggle-menu-icon", icon: "more_horiz", size: "m" })), index.h("span", { key: '6f959f220edbf293fe6922f7aaeaab0f213bf736', id: "menu", role: "menu", "data-show": this.showPopoverMenu }, index.h("div", { key: '6a05e468d65252ecbb57b421a53be0a0a1974f98', id: "arrow", "data-popper-arrow": true }), index.h("slot", { key: 'c9398cbb856d836820ac1cddf3113710eeaff5fb' }))));
|
|
71
71
|
}
|
|
72
72
|
get el() { return index.getElement(this); }
|
|
73
73
|
};
|
|
@@ -14,7 +14,7 @@ const Galactic = class {
|
|
|
14
14
|
this.show = false;
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (index.h(index.Host, { key: '
|
|
17
|
+
return (index.h(index.Host, { key: 'bcede9aa03d2014887eeaa4d5728d57c32a69de2' }, index.h("div", { key: '2d031655b20b592b77e2227a195f15535071c069', class: "container" }, index.h("div", { key: '1d3a345c56925946f5b39ad9edaad7ee927343cc', class: "logo-container" }, index.h("img", { key: '3f7e9a0a7df3a954d21e328da562189771baf8a8', src: SNCF_BASE64_SVG_LOGO, id: "sncf-logo", alt: "SNCF" }), index.h("span", { key: '68c00801e7f2564930d6a5f77fc6f45511a321cf' }, this.text)), index.h("div", { key: '3724b08dca457a9be21ecb84925ed3fea4e49f95', class: "actions-container" }, index.h("slot", { key: '572f4ca9036c737a579f2c58ec113cada4dd421c' })))));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
const SNCF_BASE64_SVG_LOGO = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgdmVy' +
|
|
@@ -81,7 +81,7 @@ const GridColumn = class {
|
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
83
|
const ButtonOrDiv = this.getTagName();
|
|
84
|
-
return (index.h(index.Host, { key: '
|
|
84
|
+
return (index.h(index.Host, { key: 'e2c93e817abc5a61d6285f32779d915ff7368710', slot: "grid-column" }, index.h("th", Object.assign({ key: 'c23695b8680146e66e75ea958dc9dd9cac6056ac', style: { width: this.width }, class: this.sort ? 'pointer' : '', tabIndex: this.sort ? -1 : this.getTabIndex(), scope: "col", onClick: this.onSortClick.bind(this), onKeyDown: this.handleSortKeyDown.bind(this), onFocus: this.delegateFocusToButton.bind(this), "aria-sort": this.sort ? this.getSortOrderForAriaSort(this.sortOrder) : null, ref: (el) => (this.nativeTh = el) }, this.inheritedAttributes), index.h(ButtonOrDiv, { key: 'e936f0bd861b2d243071d45ccb4fa6bf8448f7a6', class: "grid-column-th-content", ref: (el) => this.buttonOrDiv = el, tabIndex: this.sort ? this.getTabIndex() : -1 }, index.h("span", { key: '33e9e0238aa5cea93bff5f0522e30b7cfa787283' }, this.name), this.sort ? index.h("div", { class: "sort-arrow-container" }, index.h(GridSortArrow, { state: this.sortOrder })) : ''))));
|
|
85
85
|
}
|
|
86
86
|
onSortClick() {
|
|
87
87
|
if (!this.sort)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"wcs-grid-column.entry.cjs.js","mappings":";;;;;;;AAOO,MAAM,aAAa,GAA4C,CAAC,EAAC,KAAK,EAAC,MAC1EA,gCAAiB,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM;IAC7GA,eAAG,KAAK,EAAE,CAAC,KAAK,KAAK,MAAM,GAAG,EAAE,GAAG,KAAK,IAAI,cAAc;QACtDA,kBAAM,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,SAAS,EACd,CAAC,EAAC,0eAA0e,GAChf,CACF,CACF,CAET;;ACjBD,MAAM,aAAa,GAAG,60DAA60D,CAAC;AACp2D,4BAAe,aAAa;;ACD5B,MAAM,gBAAgB,GAAG,kOAAkO,CAAC;AAC5P,4BAAe,gBAAgB;;AC0B/B,MAAM,2BAA2B,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;MAY7C,UAAU;;;;;QAIX,wBAAmB,GAAyB,EAAE,CAAC;;;oBAY/B,KAAK;;;yBAaoB,MAAM;;2BAQxB,KAAK;sBAIO,KAAK;;;;IAwBhD,iBAAiB;QACb,IAAI,CAAC,mBAAmB,mCACjBC,6BAAqB,CAAC,IAAI,CAAC,EAA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,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,KAAK,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;KAC5F;IAEO,iBAAiB,CAAC,MAAqB;QAC3C,IAAIK,kBAAU,CAAC,MAAM,CAAC,IAAIC,kBAAU,CAAC,MAAM,CAAC,EAAE;YAC1C,MAAM,CAAC,cAAc,EAAE,CAAC;YACxB,IAAI,CAAC,WAAW,EAAE,CAAC;SACtB;KACJ;;;;;;;;;;;","names":["h","inheritAriaAttributes","inheritAttributes","setOrRemoveAttribute","Host","isSpaceKey","isEnterKey"],"sources":["src/components/grid-column/grid-sort-arrow.tsx","src/components/grid-column/grid-column.scss?tag=wcs-grid-column&encapsulation=shadow","src/components/grid-column/grid-sort-arrow.scss?tag=wcs-grid-column&encapsulation=shadow","src/components/grid-column/grid-column.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { WcsSortOrder } from '../grid/grid-interface';\n\ninterface GridSortArrowProps {\n state: WcsSortOrder;\n}\n\nexport const GridSortArrow: FunctionalComponent<GridSortArrowProps> = ({state}) => (\n <svg aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\n <g class={(state === 'none' ? '' : state) + ' arrow-group'}>\n <path class=\"arrow\"\n fill=\"#333333\"\n d=\"M10.0973 5.34619C9.79269 5.67941 9.29832 5.67941 8.99348 5.34619L6.78316 2.92128L6.78316 11.144C6.78316 11.6168 6.43368 12 6.00289 12C5.57187 12 5.22261 11.6168 5.22261 11.144L5.22261 2.92128L3.01219 5.34619C2.70802 5.67941 2.21341 5.67941 1.90881 5.34619C1.75655 5.17859 1.68005 4.95932 1.68005 4.73997C1.68005 4.52061 1.75655 4.30192 1.90881 4.13433L5.45122 0.250846C5.75597 -0.0836145 6.24977 -0.0836145 6.55454 0.250846L10.0973 4.13433C10.4017 4.46883 10.4017 5.01168 10.0973 5.34619Z\"\n />\n </g>\n </svg>\n\n);\n","@import '../../style/focus-outline.scss';\n\n:host {\n\n /* All css variables are in grid.scss.\n Any variable can be overridden here for a single grid-column by using the correct selector in CSS */\n\n display: contents;\n\n th {\n color: var(--wcs-grid-header-text-color);\n background-color: var(--wcs-grid-header-background-color-default);\n border-bottom: var(--wcs-grid-header-border-bottom);\n border-left: var(--wcs-grid-header-border-left);\n border-radius: var(--wcs-grid-header-border-radius);\n padding: var(--wcs-grid-header-padding-vertical) var(--wcs-grid-header-padding-horizontal);\n text-align: left;\n align-content: center;\n transition: background-color var(--wcs-grid-header-transition-duration) ease-in-out;\n\n .grid-column-th-content {\n // The following lines aim to avoid displaying the native button style of the agent\n -webkit-appearance: none;\n appearance: none;\n background: none;\n border: none;\n outline: none;\n margin: 0;\n padding: 0;\n font-size: var(--wcs-grid-header-font-size);\n line-height: var(--wcs-grid-header-line-height);\n color: var(--wcs-grid-header-text-color);\n cursor: inherit;\n display: inline-flex;\n border-collapse: separate;\n font-family: inherit;\n text-align: left;\n align-items: center;\n gap: var(--wcs-semantic-spacing-base);\n\n span {\n font-weight: var(--wcs-grid-header-font-weight);\n }\n }\n\n /* Hovered grid header */\n &[aria-sort]:hover {\n background-color: var(--wcs-grid-header-background-color-hover);\n }\n\n /* Pressed grid header */\n &[aria-sort]:active {\n background-color: var(--wcs-grid-header-background-color-press);\n }\n\n /* Grid header with asc or desc sort-config */\n &[aria-sort=ascending],\n &[aria-sort=descending] {\n --wcs-grid-header-sort-arrow-color: var(--wcs-grid-header-sort-arrow-color-default);\n }\n\n /* Hovered grid header, not sorted yet */\n &[aria-sort=none]:hover {\n --wcs-grid-header-sort-arrow-color: var(--wcs-grid-header-sort-arrow-color-hover);\n }\n\n // XXX: This code works in Firefox as well, but there is a browser-side rendering bug that prevents it from displaying correctly.\n // We decided to wait for Firefox to fix the bug instead adding a dirty fix here\n &:focus-visible, &:has(:focus-visible) {\n @include focus-outline($outline-color: var(--wcs-grid-outline-color), $outline-offset: 0);\n }\n\n @supports not selector(&:has(:focus-visible)) {\n &:focus-within {\n @include focus-outline($outline-color: var(--wcs-grid-outline-color), $outline-offset: 0);\n }\n }\n }\n .pointer {\n cursor: pointer;\n }\n}\n\n:host([hidden]) {\n display: none !important;\n}\n",".arrow-group {\n transform-origin: 50% 50%;\n transition: transform var(--wcs-semantic-motion-duration-feedback-base, 150ms) ease-in-out;\n}\n\n.arrow {\n fill: var(--wcs-grid-header-sort-arrow-color, transparent);\n}\n\n.desc {\n transform: rotate(180deg);\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host, Method,\n Prop,\n Watch\n} from '@stencil/core';\nimport {\n WcsCellFormatter,\n WcsGridColumnSortChangeEventDetails,\n WcsSortFn,\n WcsSortOrder\n} from '../grid/grid-interface';\nimport { GridSortArrow } from './grid-sort-arrow';\nimport {\n inheritAriaAttributes,\n inheritAttributes,\n isEnterKey,\n isSpaceKey,\n setOrRemoveAttribute\n} from \"../../utils/helpers\";\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst GRID_COLUMN_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The grid column is a subcomponent of `wcs-grid` that represents a column of the table.\n * \n * @csspart [path]-column - CSS part for each column for styling. e.g: first_name-column, email-column\n */\n@Component({\n tag: 'wcs-grid-column',\n styleUrls: ['grid-column.scss', 'grid-sort-arrow.scss'],\n shadow: true\n})\nexport class GridColumn implements ComponentInterface, MutableAriaAttribute {\n @Element() private el: HTMLWcsGridColumnElement;\n private nativeTh!: HTMLTableHeaderCellElement;\n private buttonOrDiv: HTMLButtonElement | HTMLDivElement;\n private inheritedAttributes: { [k: string]: any } = {};\n /**\n * Represents the name of the field from the `data` object (e.g: first_name, last_name, email, ...)\n */\n @Prop() path: string;\n /**\n * The name of the column displayed on the table (e.g: First Name, Last Name, Email, ...)\n */\n @Prop() name: string;\n /**\n * Make the column sortable.\n */\n @Prop() sort: boolean = false;\n /**\n * Customizable sort function to change the comparison of values.\n */\n @Prop() sortFn: WcsSortFn;\n /**\n * Customizable formatter function to render the cell differently.\n */\n @Prop() formatter: WcsCellFormatter;\n /**\n * Defines if the column sort is ascending or descending. \n * `none` = the column is not sorted.\n */\n @Prop({mutable: true}) sortOrder: WcsSortOrder = 'none';\n /**\n * Set the column `<th>` element width.\n */\n @Prop() width: string;\n /**\n * Set to true if using a `wcs-custom-cell` linked to it.\n */\n @Prop() customCells: boolean = false;\n /**\n * Flag to hide the column.\n */\n @Prop({ reflect: true }) hidden: boolean = false;\n /**\n * Event emitted when the sort of the column is changed.\n */\n @Event() wcsSortChange!: EventEmitter<WcsGridColumnSortChangeEventDetails>;\n /**\n * Event emitted if the column is dynamically switching visibility.\n */\n @Event() wcsHiddenChange!: EventEmitter<boolean>;\n\n /**\n * This property mustn't be set by hand, it is set by the wcs-grid component to move the focus between grid columns\n * using keyboard.\n * @internal\n */\n @Prop() public cursorPosition: {col: number, row: number};\n\n /**\n * This property mustn't be set by hand, it is set by the wcs-grid component to register the column index in a\n * grid in order to move the focus between the grid columns.\n * @internal\n */\n @Prop() public columnPosition: number;\n \n componentWillLoad(): Promise<void> | void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, GRID_COLUMN_INHERITED_ATTRS),\n };\n }\n \n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeTh, attr, value);\n }\n\n @Watch('hidden')\n parseMyObjectProp(newValue: boolean) {\n this.wcsHiddenChange.emit(newValue);\n }\n\n @Watch('sortOrder')\n sortOrderChange(_: WcsSortOrder) {\n this.emitSortConfig();\n }\n\n emitSortConfig() {\n if (!this.sort) return;\n this.wcsSortChange.emit({\n column: this.el,\n order: this.sortOrder,\n sortFn: this.sortFn\n });\n }\n\n getSortOrderForAriaSort(sortOrder: WcsSortOrder) {\n switch (sortOrder) {\n case 'asc':\n return 'ascending';\n case 'desc':\n return 'descending';\n case 'none':\n default:\n return 'none';\n }\n }\n \n private getTabIndex() {\n return this.cursorPosition?.col === this.columnPosition\n && this.cursorPosition?.row === 0 ? 0 : -1;\n }\n\n private getTagName() {\n return this.sort ? 'button' : 'div';\n }\n \n private delegateFocusToButton() {\n if (this.sort) {\n this.buttonOrDiv.focus();\n }\n }\n\n render(): any {\n const ButtonOrDiv = this.getTagName();\n return (<Host slot=\"grid-column\">\n <th style={{width: this.width}}\n class={this.sort ? 'pointer' : ''}\n tabIndex={this.sort ? -1 : this.getTabIndex()}\n scope=\"col\"\n onClick={this.onSortClick.bind(this)}\n onKeyDown={this.handleSortKeyDown.bind(this)}\n onFocus={this.delegateFocusToButton.bind(this)}\n aria-sort={this.sort ? this.getSortOrderForAriaSort(this.sortOrder) : null}\n ref={(el) => (this.nativeTh = el)}\n {...this.inheritedAttributes}\n >\n <ButtonOrDiv class=\"grid-column-th-content\"\n ref={(el: HTMLButtonElement | HTMLDivElement) => this.buttonOrDiv = el}\n tabIndex={this.sort ? this.getTabIndex() : -1}>\n <span>{this.name}</span>\n {\n this.sort ? <div class=\"sort-arrow-container\"><GridSortArrow state={this.sortOrder}/></div> : ''\n }\n </ButtonOrDiv>\n </th>\n </Host>)\n }\n\n private onSortClick() {\n if (!this.sort) return;\n \n // @Watch on sortOrder property will trigger wcsSortChange event\n this.sortOrder = this.sortOrder === 'none' || this.sortOrder === 'desc' ? 'asc' : 'desc';\n }\n \n private handleSortKeyDown(_event: KeyboardEvent) {\n if (isSpaceKey(_event) || isEnterKey(_event)) {\n _event.preventDefault();\n this.onSortClick();\n }\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"wcs-grid-column.entry.cjs.js","mappings":";;;;;;;AAOO,MAAM,aAAa,GAA4C,CAAC,EAAC,KAAK,EAAC,MAC1EA,gCAAiB,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM;IAC7GA,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QAAQ,GAAG,EAAE,CAAC,IAC7B,IAAI,CAAC,mBAAmB,GAE5BA,QAAC,WAAW,qDAAC,KAAK,EAAC,wBAAwB,EACnC,GAAG,EAAE,CAAC,EAAsC,KAAK,IAAI,CAAC,WAAW,GAAG,EAAE,EACtE,QAAQ,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,IACjDA,qEAAO,IAAI,CAAC,IAAI,CAAQ,EAEpB,IAAI,CAAC,IAAI,GAAGA,iBAAK,KAAK,EAAC,sBAAsB,IAACA,QAAC,aAAa,IAAC,KAAK,EAAE,IAAI,CAAC,SAAS,GAAG,CAAM,GAAG,EAAE,CAE1F,CACb,CACF,EAAC;KACX;IAEO,WAAW;QACf,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAO;;QAGvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,KAAK,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;KAC5F;IAEO,iBAAiB,CAAC,MAAqB;QAC3C,IAAIK,kBAAU,CAAC,MAAM,CAAC,IAAIC,kBAAU,CAAC,MAAM,CAAC,EAAE;YAC1C,MAAM,CAAC,cAAc,EAAE,CAAC;YACxB,IAAI,CAAC,WAAW,EAAE,CAAC;SACtB;KACJ;;;;;;;;;;;","names":["h","inheritAriaAttributes","inheritAttributes","setOrRemoveAttribute","Host","isSpaceKey","isEnterKey"],"sources":["src/components/grid-column/grid-sort-arrow.tsx","src/components/grid-column/grid-column.scss?tag=wcs-grid-column&encapsulation=shadow","src/components/grid-column/grid-sort-arrow.scss?tag=wcs-grid-column&encapsulation=shadow","src/components/grid-column/grid-column.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { WcsSortOrder } from '../grid/grid-interface';\n\ninterface GridSortArrowProps {\n state: WcsSortOrder;\n}\n\nexport const GridSortArrow: FunctionalComponent<GridSortArrowProps> = ({state}) => (\n <svg aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\n <g class={(state === 'none' ? '' : state) + ' arrow-group'}>\n <path class=\"arrow\"\n fill=\"#333333\"\n d=\"M10.0973 5.34619C9.79269 5.67941 9.29832 5.67941 8.99348 5.34619L6.78316 2.92128L6.78316 11.144C6.78316 11.6168 6.43368 12 6.00289 12C5.57187 12 5.22261 11.6168 5.22261 11.144L5.22261 2.92128L3.01219 5.34619C2.70802 5.67941 2.21341 5.67941 1.90881 5.34619C1.75655 5.17859 1.68005 4.95932 1.68005 4.73997C1.68005 4.52061 1.75655 4.30192 1.90881 4.13433L5.45122 0.250846C5.75597 -0.0836145 6.24977 -0.0836145 6.55454 0.250846L10.0973 4.13433C10.4017 4.46883 10.4017 5.01168 10.0973 5.34619Z\"\n />\n </g>\n </svg>\n\n);\n","@import '../../style/focus-outline.scss';\n\n:host {\n\n /* All css variables are in grid.scss.\n Any variable can be overridden here for a single grid-column by using the correct selector in CSS */\n\n display: contents;\n\n th {\n color: var(--wcs-grid-header-text-color);\n background-color: var(--wcs-grid-header-background-color-default);\n border-bottom: var(--wcs-grid-header-border-bottom);\n border-left: var(--wcs-grid-header-border-left);\n border-radius: var(--wcs-grid-header-border-radius);\n padding: var(--wcs-grid-header-padding-vertical) var(--wcs-grid-header-padding-horizontal);\n text-align: left;\n align-content: center;\n transition: background-color var(--wcs-grid-header-transition-duration) ease-in-out;\n\n .grid-column-th-content {\n // The following lines aim to avoid displaying the native button style of the agent\n -webkit-appearance: none;\n appearance: none;\n background: none;\n border: none;\n outline: none;\n margin: 0;\n padding: 0;\n font-size: var(--wcs-grid-header-font-size);\n line-height: var(--wcs-grid-header-line-height);\n color: var(--wcs-grid-header-text-color);\n cursor: inherit;\n display: inline-flex;\n border-collapse: separate;\n font-family: inherit;\n text-align: left;\n align-items: center;\n gap: var(--wcs-semantic-spacing-base);\n\n span {\n font-weight: var(--wcs-grid-header-font-weight);\n }\n }\n\n /* Hovered grid header */\n &[aria-sort]:hover {\n background-color: var(--wcs-grid-header-background-color-hover);\n }\n\n /* Pressed grid header */\n &[aria-sort]:active {\n background-color: var(--wcs-grid-header-background-color-press);\n }\n\n /* Grid header with asc or desc sort-config */\n &[aria-sort=ascending],\n &[aria-sort=descending] {\n --wcs-grid-header-sort-arrow-color: var(--wcs-grid-header-sort-arrow-color-default);\n }\n\n /* Hovered grid header, not sorted yet */\n &[aria-sort=none]:hover {\n --wcs-grid-header-sort-arrow-color: var(--wcs-grid-header-sort-arrow-color-hover);\n }\n\n // XXX: This code works in Firefox as well, but there is a browser-side rendering bug that prevents it from displaying correctly.\n // We decided to wait for Firefox to fix the bug instead adding a dirty fix here\n &:focus-visible, &:has(:focus-visible) {\n @include focus-outline($outline-color: var(--wcs-grid-outline-color), $outline-offset: 0);\n }\n\n @supports not selector(&:has(:focus-visible)) {\n &:focus-within {\n @include focus-outline($outline-color: var(--wcs-grid-outline-color), $outline-offset: 0);\n }\n }\n }\n .pointer {\n cursor: pointer;\n }\n}\n\n:host([hidden]) {\n display: none !important;\n}\n",".arrow-group {\n transform-origin: 50% 50%;\n transition: transform var(--wcs-semantic-motion-duration-feedback-base, 150ms) ease-in-out;\n}\n\n.arrow {\n fill: var(--wcs-grid-header-sort-arrow-color, transparent);\n}\n\n.desc {\n transform: rotate(180deg);\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host, Method,\n Prop,\n Watch\n} from '@stencil/core';\nimport {\n WcsCellFormatter,\n WcsGridColumnSortChangeEventDetails,\n WcsSortFn,\n WcsSortOrder\n} from '../grid/grid-interface';\nimport { GridSortArrow } from './grid-sort-arrow';\nimport {\n inheritAriaAttributes,\n inheritAttributes,\n isEnterKey,\n isSpaceKey,\n setOrRemoveAttribute\n} from \"../../utils/helpers\";\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst GRID_COLUMN_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The grid column is a subcomponent of `wcs-grid` that represents a column of the table.\n * \n * @csspart [path]-column - CSS part for each column for styling. e.g: first_name-column, email-column\n */\n@Component({\n tag: 'wcs-grid-column',\n styleUrls: ['grid-column.scss', 'grid-sort-arrow.scss'],\n shadow: true\n})\nexport class GridColumn implements ComponentInterface, MutableAriaAttribute {\n @Element() private el: HTMLWcsGridColumnElement;\n private nativeTh!: HTMLTableHeaderCellElement;\n private buttonOrDiv: HTMLButtonElement | HTMLDivElement;\n private inheritedAttributes: { [k: string]: any } = {};\n /**\n * Represents the name of the field from the `data` object (e.g: first_name, last_name, email, ...)\n */\n @Prop() path: string;\n /**\n * The name of the column displayed on the table (e.g: First Name, Last Name, Email, ...)\n */\n @Prop() name: string;\n /**\n * Make the column sortable.\n */\n @Prop({ reflect: true }) sort: boolean = false;\n /**\n * Customizable sort function to change the comparison of values.\n */\n @Prop() sortFn: WcsSortFn;\n /**\n * Customizable formatter function to render the cell differently.\n */\n @Prop() formatter: WcsCellFormatter;\n /**\n * Defines if the column sort is ascending or descending. \n * `none` = the column is not sorted.\n */\n @Prop({mutable: true}) sortOrder: WcsSortOrder = 'none';\n /**\n * Set the column `<th>` element width.\n */\n @Prop() width: string;\n /**\n * Set to true if using a `wcs-custom-cell` linked to it.\n */\n @Prop({ reflect: true }) customCells: boolean = false;\n /**\n * Flag to hide the column.\n */\n @Prop({ reflect: true }) hidden: boolean = false;\n /**\n * Event emitted when the sort of the column is changed.\n */\n @Event() wcsSortChange!: EventEmitter<WcsGridColumnSortChangeEventDetails>;\n /**\n * Event emitted if the column is dynamically switching visibility.\n */\n @Event() wcsHiddenChange!: EventEmitter<boolean>;\n\n /**\n * This property mustn't be set by hand, it is set by the wcs-grid component to move the focus between grid columns\n * using keyboard.\n * @internal\n */\n @Prop() public cursorPosition: {col: number, row: number};\n\n /**\n * This property mustn't be set by hand, it is set by the wcs-grid component to register the column index in a\n * grid in order to move the focus between the grid columns.\n * @internal\n */\n @Prop() public columnPosition: number;\n \n componentWillLoad(): Promise<void> | void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, GRID_COLUMN_INHERITED_ATTRS),\n };\n }\n \n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeTh, attr, value);\n }\n\n @Watch('hidden')\n parseMyObjectProp(newValue: boolean) {\n this.wcsHiddenChange.emit(newValue);\n }\n\n @Watch('sortOrder')\n sortOrderChange(_: WcsSortOrder) {\n this.emitSortConfig();\n }\n\n emitSortConfig() {\n if (!this.sort) return;\n this.wcsSortChange.emit({\n column: this.el,\n order: this.sortOrder,\n sortFn: this.sortFn\n });\n }\n\n getSortOrderForAriaSort(sortOrder: WcsSortOrder) {\n switch (sortOrder) {\n case 'asc':\n return 'ascending';\n case 'desc':\n return 'descending';\n case 'none':\n default:\n return 'none';\n }\n }\n \n private getTabIndex() {\n return this.cursorPosition?.col === this.columnPosition\n && this.cursorPosition?.row === 0 ? 0 : -1;\n }\n\n private getTagName() {\n return this.sort ? 'button' : 'div';\n }\n \n private delegateFocusToButton() {\n if (this.sort) {\n this.buttonOrDiv.focus();\n }\n }\n\n render(): any {\n const ButtonOrDiv = this.getTagName();\n return (<Host slot=\"grid-column\">\n <th style={{width: this.width}}\n class={this.sort ? 'pointer' : ''}\n tabIndex={this.sort ? -1 : this.getTabIndex()}\n scope=\"col\"\n onClick={this.onSortClick.bind(this)}\n onKeyDown={this.handleSortKeyDown.bind(this)}\n onFocus={this.delegateFocusToButton.bind(this)}\n aria-sort={this.sort ? this.getSortOrderForAriaSort(this.sortOrder) : null}\n ref={(el) => (this.nativeTh = el)}\n {...this.inheritedAttributes}\n >\n <ButtonOrDiv class=\"grid-column-th-content\"\n ref={(el: HTMLButtonElement | HTMLDivElement) => this.buttonOrDiv = el}\n tabIndex={this.sort ? this.getTabIndex() : -1}>\n <span>{this.name}</span>\n {\n this.sort ? <div class=\"sort-arrow-container\"><GridSortArrow state={this.sortOrder}/></div> : ''\n }\n </ButtonOrDiv>\n </th>\n </Host>)\n }\n\n private onSortClick() {\n if (!this.sort) return;\n \n // @Watch on sortOrder property will trigger wcsSortChange event\n this.sortOrder = this.sortOrder === 'none' || this.sortOrder === 'desc' ? 'asc' : 'desc';\n }\n \n private handleSortKeyDown(_event: KeyboardEvent) {\n if (isSpaceKey(_event) || isEnterKey(_event)) {\n _event.preventDefault();\n this.onSortClick();\n }\n }\n}\n"],"version":3}
|
|
@@ -11,7 +11,7 @@ const GridCustomCell = class {
|
|
|
11
11
|
this.rowId = undefined;
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '
|
|
14
|
+
return (index.h(index.Host, { key: '3353e4de7a3eeb4d903a63d5adf257ed3427beb8', slot: this.columnId + '-' + this.rowId }, index.h("slot", { key: 'cc3297d327379b74a385c4909964b8371da68a97' })));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const gridPagination = require('./grid-pagination-
|
|
5
|
+
const gridPagination = require('./grid-pagination-4505d7b6.js');
|
|
6
6
|
require('./index-6f0140d8.js');
|
|
7
7
|
require('./helpers-2f1a8ddc.js');
|
|
8
8
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-6f0140d8.js');
|
|
6
|
-
const gridPagination = require('./grid-pagination-
|
|
6
|
+
const gridPagination = require('./grid-pagination-4505d7b6.js');
|
|
7
7
|
const keyboardEvent = require('./keyboard-event-40ecdc27.js');
|
|
8
8
|
const helpers = require('./helpers-2f1a8ddc.js');
|
|
9
9
|
const isEqual = require('./isEqual-8a0a6936.js');
|
|
@@ -1293,6 +1293,14 @@ const Grid = class {
|
|
|
1293
1293
|
onBlur(event) {
|
|
1294
1294
|
this.wcsBlur.emit(event);
|
|
1295
1295
|
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Set focus on the first cell of the grid
|
|
1298
|
+
*/
|
|
1299
|
+
async focusFirstCell() {
|
|
1300
|
+
var _a;
|
|
1301
|
+
this.cursorPosition = { col: this.selectionConfig === 'none' ? 0 : 1, row: 1 };
|
|
1302
|
+
(_a = this.getElementToFocusAtCursorPosition()) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1303
|
+
}
|
|
1296
1304
|
/**
|
|
1297
1305
|
* If selectionConfig is different from `none`, that means that an extra column for radio or checkbox is rendered
|
|
1298
1306
|
* in the table.
|
|
@@ -1697,12 +1705,12 @@ const Grid = class {
|
|
|
1697
1705
|
}
|
|
1698
1706
|
render() {
|
|
1699
1707
|
var _a, _b, _c, _d;
|
|
1700
|
-
return (index.h(index.Host, { key: '
|
|
1708
|
+
return (index.h(index.Host, { key: '98d13e7497ec9d9ecd3e149b3f6986e16bc5cc2a' }, index.h("table", Object.assign({ key: 'a44825cf71ff284a5204e9d922c0eba2c2ca23f4', role: "grid", ref: (el) => (this.nativeTable = el), "aria-rowcount": !this.loading && ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.length), "aria-colcount": !this.loading && this.totalDisplayedColumnCount() }, this.inheritedAttributes), index.h("thead", { key: '336578d350ae8082a19fa6798af35f2fdd015ff9' }, index.h("tr", { key: 'fdb38402ea5c58dd77dad7df2ef97d54c521123c', "aria-rowindex": "1" }, this.selectionConfig === 'none' ? ''
|
|
1701
1709
|
: index.h("th", { class: "wcs-grid-selection-column" }, this.selectionConfig === 'single' ? '' :
|
|
1702
1710
|
index.h("wcs-checkbox", { tabIndex: ((_b = this.cursorPosition) === null || _b === void 0 ? void 0 : _b.col) === 0
|
|
1703
|
-
&& ((_c = this.cursorPosition) === null || _c === void 0 ? void 0 : _c.row) === 0 ? 0 : -1, part: "all-rows-checkbox", checked: this.allRowsAreSelected(), onWcsChange: this.selectAllRows.bind(this) })), index.h("slot", { key: '
|
|
1711
|
+
&& ((_c = this.cursorPosition) === null || _c === void 0 ? void 0 : _c.row) === 0 ? 0 : -1, part: "all-rows-checkbox", checked: this.allRowsAreSelected(), onWcsChange: this.selectAllRows.bind(this) })), index.h("slot", { key: '2d68b72fac0251dab9f519cf84c25c96262c193b', name: "grid-column" }))), index.h("tbody", { key: '4156e796ac5a81170b5dba011159f8e6bb7a7e60' }, this.loading
|
|
1704
1712
|
? index.h("tr", { "aria-busy": "true" }, index.h("td", { colSpan: this.totalColumnCount(), class: "loading" }, index.h("wcs-spinner", null)))
|
|
1705
|
-
: (_d = this.rows) === null || _d === void 0 ? void 0 : _d.filter(row => this.serverMode || !this.paginationEl || row.page === this.paginationEl.currentPage).map((row, index) => this.renderRow(row, index)))), index.h("slot", { key: '
|
|
1713
|
+
: (_d = this.rows) === null || _d === void 0 ? void 0 : _d.filter(row => this.serverMode || !this.paginationEl || row.page === this.paginationEl.currentPage).map((row, index) => this.renderRow(row, index)))), index.h("slot", { key: 'c683eb883707ffbd1fed22d86ececb595f70c2c0', name: "grid-pagination" })));
|
|
1706
1714
|
}
|
|
1707
1715
|
/**
|
|
1708
1716
|
* Returns the row with all mapped cells inside.
|