wcs-core 7.1.0 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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
|
-
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,MAAM,EACN,IAAI,EACJ,KAAK,EACL,CAAC,EACD,IAAI,EAEJ,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,GAAG,EACH,oBAAoB,EACvB,MAAM,qBAAqB,CAAC;AAW7B,MAAM,wBAAwB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAQH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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ;AAED,IAAI,WAAW,GAAG,CAAC,CAAC","sourcesContent":["import {\n Component,\n ComponentInterface,\n Method,\n Prop,\n Watch,\n h,\n Host,\n EventEmitter,\n Element,\n Event,\n Build,\n readTask\n} from '@stencil/core';\nimport {\n debounceEvent,\n inheritAriaAttributes,\n inheritAttributes,\n raf,\n setOrRemoveAttribute\n} from '../../utils/helpers';\nimport { \n TextareaChangeEventDetail,\n WcsTextareaInputMode, \n WcsTextareaEnterKeyHint, \n WcsTextareaResize, \n WcsTextareaInputState,\n WcsTextareaWrap\n} from './textarea-interface';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst TEXTAREA_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * Mainly inspired from Ionic Textarea Component.\n * \n * ## Accessibility guidelines 💡\n * > - If you use wcs-textarea outside a wcs-form-field, you have to manage the label and the error message yourself.\n * > You can use the `aria-label` attribute to provide a label for screen readers but adds no visual label.\n *\n * @cssprop --wcs-textarea-icon-color-default - Default icon color whe the textarea is not focused\n * @cssprop --wcs-textarea-icon-color-focus - Icon color when the textarea is focused \n * @cssprop --wcs-textarea-icon-color-disabled - Icon color when the textarea is disabled\n * \n * @cssprop --wcs-textarea-background-color - Background color of the textarea\n *\n * @cssprop --wcs-textarea-border-radius-left - Border radius of the left side of the textarea\n * @cssprop --wcs-textarea-border-radius-right - Border radius of the right side of the textarea\n * \n * @cssprop --wcs-textarea-border-width - Border width of the textarea when not focused\n * @cssprop --wcs-textarea-border-width-focus - Border width of the textarea when focused\n * \n * @cssprop --wcs-textarea-border-color-default - Default border color of the textarea when not focused\n * @cssprop --wcs-textarea-border-color-disabled - Border color of the textarea when disabled\n * @cssprop --wcs-textarea-border-color-error - Border color of the textarea when in error state\n * @cssprop --wcs-textarea-border-color-focus - Border color of the textarea when focused\n * \n * @cssprop --wcs-textarea-value-color - Color of the value when the textarea is not focused\n * @cssprop --wcs-textarea-value-font-weight - Font weight of the textarea value\n * \n * @cssprop --wcs-textarea-placeholder-color - Color of the textarea placeholder\n * @cssprop --wcs-textarea-placeholder-font-weight - Font weight of the textarea placeholder\n * @cssprop --wcs-textarea-placeholder-font-style - Font style of the textarea placeholder\n * \n * @cssprop --wcs-textarea-text-color-disabled - Color of the value when the textarea is disabled\n * \n * @cssprop --wcs-textarea-border-style-default - Border style default of the textarea when not focused\n * @cssprop --wcs-textarea-border-style-error - Border style default of the textarea in error state\n * @cssprop --wcs-textarea-border-style-focus - Border style default of the textarea when focused\n * \n * @cssprop --wcs-textarea-min-height - Min height of the textarea component\n * @cssprop --wcs-textarea-max-height - Max height of the textarea component\n * \n * @cssprop --wcs-textarea-padding-top - Padding top of the textarea\n * @cssprop --wcs-textarea-padding-bottom - Padding bottom of the textarea\n * @cssprop --wcs-textarea-padding-left - Padding left of the textarea\n * @cssprop --wcs-textarea-padding-right - Padding right of the textarea\n * \n * @cssprop --wcs-textarea-gap - Gap between textarea and icon (prefix/suffix)\n */\n@Component({\n tag: 'wcs-textarea',\n styleUrl: 'textarea.scss',\n shadow: {\n delegatesFocus: true\n },\n})\nexport class Textarea implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeInput?: HTMLTextAreaElement;\n private inputId = `wcs-textarea-${textareaIds++}`;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * This is required for a WebKit bug which requires us to\n * blur and focus an input to properly focus the input in\n * an item with delegatesFocus. It will no longer be needed\n * with iOS 14.\n *\n * @internal\n */\n @Prop() fireFocusEvents = true;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalize = 'none';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `wcsInput` event after each keystroke.\n * This also impacts form bindings such as `ngModel` or `v-model`.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.wcsInput = debounceEvent(this.wcsInput, this.debounce);\n }\n\n /**\n * If `true`, the user cannot interact with the textarea.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Name of the material icon to add to the input\n */\n @Prop() icon: string;\n\n /**\n * A hint to the browser for which keyboard to display.\n */\n @Prop() inputmode?: WcsTextareaInputMode;\n\n /**\n * A hint to the browser for which enter key to display.\n */\n @Prop() enterkeyhint?: WcsTextareaEnterKeyHint;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Specifies the state of the input. By default the input is in an initial state but you can set it to 'error' state if the data given by the user is not valid.\n */\n @Prop({reflect: true}) state: WcsTextareaInputState = 'initial';\n\n /**\n * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. \n * Note : at the moment, modifying the width is only possible if you add some custom CSS to the component,\n * for example by overriding the `width` CSS property. See the Resize section for an example on how to do it.\n */\n @Prop() cols?: number;\n\n /**\n * The number of visible text lines for the control.\n */\n @Prop() rows?: number;\n\n /**\n * Indicates how the control wraps text.\n */\n @Prop() wrap?: WcsTextareaWrap;\n\n /**\n * If `true`, the element height will increase based on the value.\n */\n @Prop() autoGrow = false;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n /**\n * Indicates how the textarea should be resizable. \n * Note : at the moment horizontal resizing is only possible if you add custom CSS to the component,\n * see the Resize section for an example.\n */\n @Prop({reflect: true}) resize?: WcsTextareaResize;\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n if (nativeInput && nativeInput.value !== value) {\n nativeInput.value = value;\n }\n this.runAutoGrow();\n }\n\n /**\n * Emitted when the input value has changed.- See https://developer.mozilla.org/en-US/docs/Web/Events/change\n */\n @Event() wcsChange!: EventEmitter<TextareaChangeEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred. See https://developer.mozilla.org/en-US/docs/Web/Events/input\n */\n @Event() wcsInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {\n detail: this.el\n }));\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {\n detail: this.el\n }));\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, TEXTAREA_INHERITED_ATTRS)\n };\n }\n\n componentDidLoad() {\n raf(() => this.runAutoGrow());\n }\n\n private runAutoGrow() {\n const nativeInput = this.nativeInput;\n if (nativeInput && this.autoGrow) {\n readTask(() => {\n nativeInput.style.height = 'auto';\n nativeInput.style.height = nativeInput.scrollHeight + 'px';\n });\n }\n }\n \n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeInput, attr, value);\n }\n\n /**\n * This method make the textarea automatically adopt the size of the content without a scroll bar\n */\n @Method()\n async fitContent() {\n raf(() => this.runAutoGrow());\n }\n\n /**\n * Sets blur on the native `textarea` in `wcs-textarea`. Use this method instead of the global\n * `textarea.blur()`.\n * @internal\n */\n @Method()\n async setBlur() {\n if (this.nativeInput) {\n this.nativeInput.blur();\n }\n }\n\n /**\n * Returns the native `<textarea>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLTextAreaElement> {\n // tslint:disable-next-line:no-non-null-assertion\n return Promise.resolve(this.nativeInput!);\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private onInput = (ev: Event) => {\n if (this.nativeInput) {\n this.value = this.nativeInput.value;\n }\n this.wcsInput.emit(ev as KeyboardEvent);\n }\n \n private onChange = (_: Event) => {\n this.wcsChange.emit({value: this.nativeInput.value});\n }\n\n private onFocus = (ev: FocusEvent) => {\n if (this.fireFocusEvents) {\n this.wcsFocus.emit(ev);\n }\n }\n\n private onBlur = (ev: FocusEvent) => {\n if (this.fireFocusEvents) {\n this.wcsBlur.emit(ev);\n }\n }\n\n render() {\n const value = this.getValue();\n const style = {\n ...(this.resize && {'resize': this.resize})\n }\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n >\n {this.icon ? (<wcs-mat-icon icon={this.icon} size=\"m\"></wcs-mat-icon>) : null}\n <textarea\n class=\"native-textarea\"\n ref={el => this.nativeInput = el}\n autoCapitalize={this.autocapitalize}\n autoFocus={this.autofocus}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n disabled={this.disabled}\n maxLength={this.maxlength}\n minLength={this.minlength}\n name={this.name}\n placeholder={this.placeholder || ''}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n cols={this.cols}\n rows={this.rows}\n wrap={this.wrap}\n onInput={this.onInput}\n onChange={this.onChange}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n style={style}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n </Host>\n );\n }\n}\n\nlet textareaIds = 0;\n"]}
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,MAAM,EACN,IAAI,EACJ,KAAK,EACL,CAAC,EACD,IAAI,EAEJ,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,GAAG,EACH,oBAAoB,EACvB,MAAM,qBAAqB,CAAC;AAW7B,MAAM,wBAAwB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAQH,MAAM,OAAO,QAAQ;;QAGT,YAAO,GAAG,gBAAgB,WAAW,EAAE,EAAE,CAAC;QAC1C,wBAAmB,GAAyB,EAAE,CAAC;QA4O/C,YAAO,GAAG,CAAC,EAAS,EAAE,EAAE;YAC5B,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBACnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YACxC,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAmB,CAAC,CAAC;QAC5C,CAAC,CAAA;QAEO,aAAQ,GAAG,CAAC,CAAQ,EAAE,EAAE;YAC5B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAC,CAAC,CAAC;QACzD,CAAC,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EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,KAAK,IACR,IAAI,CAAC,mBAAmB,GAEnC,KAAK,CACG,CACF,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ;AAED,IAAI,WAAW,GAAG,CAAC,CAAC","sourcesContent":["import {\n Component,\n ComponentInterface,\n Method,\n Prop,\n Watch,\n h,\n Host,\n EventEmitter,\n Element,\n Event,\n Build,\n readTask\n} from '@stencil/core';\nimport {\n debounceEvent,\n inheritAriaAttributes,\n inheritAttributes,\n raf,\n setOrRemoveAttribute\n} from '../../utils/helpers';\nimport { \n TextareaChangeEventDetail,\n WcsTextareaInputMode, \n WcsTextareaEnterKeyHint, \n WcsTextareaResize, \n WcsTextareaInputState,\n WcsTextareaWrap\n} from './textarea-interface';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst TEXTAREA_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * Mainly inspired from Ionic Textarea Component.\n * \n * ## Accessibility guidelines 💡\n * > - If you use wcs-textarea outside a wcs-form-field, you have to manage the label and the error message yourself.\n * > You can use the `aria-label` attribute to provide a label for screen readers but adds no visual label.\n *\n * @cssprop --wcs-textarea-icon-color-default - Default icon color whe the textarea is not focused\n * @cssprop --wcs-textarea-icon-color-focus - Icon color when the textarea is focused \n * @cssprop --wcs-textarea-icon-color-disabled - Icon color when the textarea is disabled\n * \n * @cssprop --wcs-textarea-background-color - Background color of the textarea\n *\n * @cssprop --wcs-textarea-border-radius-left - Border radius of the left side of the textarea\n * @cssprop --wcs-textarea-border-radius-right - Border radius of the right side of the textarea\n * \n * @cssprop --wcs-textarea-border-width - Border width of the textarea when not focused\n * @cssprop --wcs-textarea-border-width-focus - Border width of the textarea when focused\n * \n * @cssprop --wcs-textarea-border-color-default - Default border color of the textarea when not focused\n * @cssprop --wcs-textarea-border-color-disabled - Border color of the textarea when disabled\n * @cssprop --wcs-textarea-border-color-error - Border color of the textarea when in error state\n * @cssprop --wcs-textarea-border-color-focus - Border color of the textarea when focused\n * \n * @cssprop --wcs-textarea-value-color - Color of the value when the textarea is not focused\n * @cssprop --wcs-textarea-value-font-weight - Font weight of the textarea value\n * \n * @cssprop --wcs-textarea-placeholder-color - Color of the textarea placeholder\n * @cssprop --wcs-textarea-placeholder-font-weight - Font weight of the textarea placeholder\n * @cssprop --wcs-textarea-placeholder-font-style - Font style of the textarea placeholder\n * \n * @cssprop --wcs-textarea-text-color-disabled - Color of the value when the textarea is disabled\n * \n * @cssprop --wcs-textarea-border-style-default - Border style default of the textarea when not focused\n * @cssprop --wcs-textarea-border-style-error - Border style default of the textarea in error state\n * @cssprop --wcs-textarea-border-style-focus - Border style default of the textarea when focused\n * \n * @cssprop --wcs-textarea-min-height - Min height of the textarea component\n * @cssprop --wcs-textarea-max-height - Max height of the textarea component\n * \n * @cssprop --wcs-textarea-padding-top - Padding top of the textarea\n * @cssprop --wcs-textarea-padding-bottom - Padding bottom of the textarea\n * @cssprop --wcs-textarea-padding-left - Padding left of the textarea\n * @cssprop --wcs-textarea-padding-right - Padding right of the textarea\n * \n * @cssprop --wcs-textarea-gap - Gap between textarea and icon (prefix/suffix)\n */\n@Component({\n tag: 'wcs-textarea',\n styleUrl: 'textarea.scss',\n shadow: {\n delegatesFocus: true\n },\n})\nexport class Textarea implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeInput?: HTMLTextAreaElement;\n private inputId = `wcs-textarea-${textareaIds++}`;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * This is required for a WebKit bug which requires us to\n * blur and focus an input to properly focus the input in\n * an item with delegatesFocus. It will no longer be needed\n * with iOS 14.\n *\n * @internal\n */\n @Prop() fireFocusEvents: boolean = true;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalize = 'none';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus: boolean = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `wcsInput` event after each keystroke.\n * This also impacts form bindings such as `ngModel` or `v-model`.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.wcsInput = debounceEvent(this.wcsInput, this.debounce);\n }\n\n /**\n * If `true`, the user cannot interact with the textarea.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Name of the material icon to add to the input\n */\n @Prop() icon: string;\n\n /**\n * A hint to the browser for which keyboard to display.\n */\n @Prop() inputmode?: WcsTextareaInputMode;\n\n /**\n * A hint to the browser for which enter key to display.\n */\n @Prop() enterkeyhint?: WcsTextareaEnterKeyHint;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n\n /**\n * Specifies the state of the input. By default the input is in an initial state but you can set it to 'error' state if the data given by the user is not valid.\n */\n @Prop({reflect: true}) state: WcsTextareaInputState = 'initial';\n\n /**\n * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. \n * Note : at the moment, modifying the width is only possible if you add some custom CSS to the component,\n * for example by overriding the `width` CSS property. See the Resize section for an example on how to do it.\n */\n @Prop() cols?: number;\n\n /**\n * The number of visible text lines for the control.\n */\n @Prop() rows?: number;\n\n /**\n * Indicates how the control wraps text.\n */\n @Prop() wrap?: WcsTextareaWrap;\n\n /**\n * If `true`, the element height will increase based on the value.\n */\n @Prop({ reflect: true }) autoGrow: boolean = false;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n /**\n * Indicates how the textarea should be resizable. \n * Note : at the moment horizontal resizing is only possible if you add custom CSS to the component,\n * see the Resize section for an example.\n */\n @Prop({reflect: true}) resize?: WcsTextareaResize;\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n if (nativeInput && nativeInput.value !== value) {\n nativeInput.value = value;\n }\n this.runAutoGrow();\n }\n\n /**\n * Emitted when the input value has changed.- See https://developer.mozilla.org/en-US/docs/Web/Events/change\n */\n @Event() wcsChange!: EventEmitter<TextareaChangeEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred. See https://developer.mozilla.org/en-US/docs/Web/Events/input\n */\n @Event() wcsInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {\n detail: this.el\n }));\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {\n detail: this.el\n }));\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, TEXTAREA_INHERITED_ATTRS)\n };\n }\n\n componentDidLoad() {\n raf(() => this.runAutoGrow());\n }\n\n private runAutoGrow() {\n const nativeInput = this.nativeInput;\n if (nativeInput && this.autoGrow) {\n readTask(() => {\n nativeInput.style.height = 'auto';\n nativeInput.style.height = nativeInput.scrollHeight + 'px';\n });\n }\n }\n \n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeInput, attr, value);\n }\n\n /**\n * This method make the textarea automatically adopt the size of the content without a scroll bar\n */\n @Method()\n async fitContent() {\n raf(() => this.runAutoGrow());\n }\n\n /**\n * Sets blur on the native `textarea` in `wcs-textarea`. Use this method instead of the global\n * `textarea.blur()`.\n * @internal\n */\n @Method()\n async setBlur() {\n if (this.nativeInput) {\n this.nativeInput.blur();\n }\n }\n\n /**\n * Returns the native `<textarea>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLTextAreaElement> {\n // tslint:disable-next-line:no-non-null-assertion\n return Promise.resolve(this.nativeInput!);\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private onInput = (ev: Event) => {\n if (this.nativeInput) {\n this.value = this.nativeInput.value;\n }\n this.wcsInput.emit(ev as KeyboardEvent);\n }\n \n private onChange = (_: Event) => {\n this.wcsChange.emit({value: this.nativeInput.value});\n }\n\n private onFocus = (ev: FocusEvent) => {\n if (this.fireFocusEvents) {\n this.wcsFocus.emit(ev);\n }\n }\n\n private onBlur = (ev: FocusEvent) => {\n if (this.fireFocusEvents) {\n this.wcsBlur.emit(ev);\n }\n }\n\n render() {\n const value = this.getValue();\n const style = {\n ...(this.resize && {'resize': this.resize})\n }\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n >\n {this.icon ? (<wcs-mat-icon icon={this.icon} size=\"m\"></wcs-mat-icon>) : null}\n <textarea\n class=\"native-textarea\"\n ref={el => this.nativeInput = el}\n autoCapitalize={this.autocapitalize}\n autoFocus={this.autofocus}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n disabled={this.disabled}\n maxLength={this.maxlength}\n minLength={this.minlength}\n name={this.name}\n placeholder={this.placeholder || ''}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n cols={this.cols}\n rows={this.rows}\n wrap={this.wrap}\n onInput={this.onInput}\n onChange={this.onChange}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n style={style}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n </Host>\n );\n }\n}\n\nlet textareaIds = 0;\n"]}
|
|
@@ -180,7 +180,7 @@ export class Tooltip {
|
|
|
180
180
|
(_a = this.tippyInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
181
181
|
}
|
|
182
182
|
render() {
|
|
183
|
-
return (h(Host, { key: '
|
|
183
|
+
return (h(Host, { key: '34f019e113250ce19d69186080c932f838ac5c86', role: "tooltip" }, h("slot", { key: '7edce2cfc96d454177668c81d615231369600977', onSlotchange: _ => this.updateTippyContent() })));
|
|
184
184
|
}
|
|
185
185
|
static get is() { return "wcs-tooltip"; }
|
|
186
186
|
static get encapsulation() { return "shadow"; }
|
|
@@ -255,7 +255,7 @@ export class Tooltip {
|
|
|
255
255
|
"text": "Determines if the tooltip has interactive content inside of it, so that it can be hovered over and clicked inside\nwithout hiding."
|
|
256
256
|
},
|
|
257
257
|
"attribute": "interactive",
|
|
258
|
-
"reflect":
|
|
258
|
+
"reflect": true,
|
|
259
259
|
"defaultValue": "false"
|
|
260
260
|
},
|
|
261
261
|
"maxWidth": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG7G,sGAAsG;AACtG,gEAAgE;AAChE,EAAE;AACF,gGAAgG;AAChG,6FAA6F;AAC7F,kFAAkF;AAClF,OAAO,KAA0B,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,yBAAyB,GAAI,CAAC,YAAY,CAAC,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAOH,MAAM,OAAO,OAAO;;;wBAmBe,QAAQ;2BAOhB,KAAK;wBAUA,GAAG;qBAYI,CAAC;wBAME,CAAC,GAAG,EAAE,GAAG,CAAC;uBAQ9B,kBAAkB;qBAWV,MAAM;;;;IA8BhC,iBAAiB;QACb,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC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;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, ComponentInterface, h, Host, Prop, Element, Watch, Method, Listen } from '@stencil/core';\nimport { WcsTooltipAppendTo, WcsTooltipPosition } from './tooltip-interface';\n\n// We use the Tippy.js library for the tooltip. At first by using directly the styles of tippy because\n// the design system does not specify any spec for the tooltips.\n//\n// In a second time, if a need of customization is felt, it will be possible to use the lib in a\n// \"Headless\" mode where the rendering of the tooltip will be entirely in our charge, without\n// modifications in the API : https://atomiks.github.io/tippyjs/v6/headless-tippy/\nimport tippy, { Instance, Props } from 'tippy.js';\nimport { isEscapeKey } from \"../../utils/helpers\";\nimport { isMutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\n/**\n * List of components that require special ARIA attribute delegation handling.\n * These components have their own internal elements (like native button inside wcs-button)\n * that need to receive ARIA attributes for proper accessibility.\n * \n * Another solution we take into account is to @Watch the ARIA attributes on the component and set them on the internal element.\n * But this solution was not centralized and can be forgotten.\n */\nconst DELEGATED_ARIA_COMPONENTS = ['WCS-BUTTON'];\n\n/**\n * Tooltips are used to provide additional information for features available on the website. These can improve the user\n * experience or simply show additional information. Tooltips appear when the user rolls over or clicks on them\n * (for longer content).\n *\n * Note that this component is based on the Tippy.js library : https://atomiks.github.io/tippyjs/\n * \n * ## Accessibility guidelines 💡\n * \n * The problem is that impaired users may not be able to see what is the information provided by the tooltip. To solve\n * this problem, the tooltip should be served with some aria attributes to make it accessible.\n *\n * Aria-features `wcs-tooltip` respect:\n * - dismiss when the user presses the `Escape` key\n * - has a `role=tooltip`\n * - when set to `interactive` mode\n * - `aria-expanded` on the targeted element: set to true when popover is open, false when it is closed\n *\n * Aria-features `wcs-tooltip` **does not respect with `wcs-button`**:\n * - aria-controls => we cannot do it yet, we need to wait for Cross root ARIA - export ID (https://github.com/WICG/aom/blob/gh-pages/exportid-explainer.md)\n * \n * But you have to provide the \"link\" between the element you want to describe and the tooltip. To do this, you have to\n * provide the \"visual description\" you add on the `wcs-tooltip` to the `aria-label` attribute or the `aria-description` as soon as the attribute will be available \n * of the element you want to describe .\n * \n * Example:\n * \n * ```html\n * <wcs-tooltip for=\"my-button\">Trashed items</wcs-tooltip>\n * <wcs-button id=\"my-button\" aria-label=\"Trashed items\">Trash</wcs-button>\n * ```\n * \n * @cssprop --wcs-tooltip-background-color - Background color of the tooltip\n * @cssprop --wcs-tooltip-text-color - Text color of the tooltip\n * @cssprop --wcs-tooltip-padding - Padding of the tooltip\n */\n@Component({\n tag: 'wcs-tooltip',\n shadow: true,\n // Tippy stylesheet and specific styles are imported in the global tooltip.scss file\n styleUrl: 'tooltip.scss'\n})\nexport class Tooltip implements ComponentInterface {\n /**\n * The **id** of the element the tooltip's going to describe.\n *\n * This property cannot be modified after initialization.\n *\n * @example\n * ```html\n * <span id=\"tooltiped\">Some content</span>\n * <wcs-tooltip for=\"tooltiped\">A tooltip!</wcs-tooltip>\n * ```\n */\n @Prop({mutable: false})\n for: string;\n\n /**\n * Where the tooltip is going to show relative to the element it's describing.\n */\n @Prop({reflect: true})\n position: WcsTooltipPosition = 'bottom';\n\n /**\n * Determines if the tooltip has interactive content inside of it, so that it can be hovered over and clicked inside\n * without hiding.\n */\n @Prop()\n interactive: boolean = false;\n\n /**\n * Specifies the maximum width of the tooltip. Useful to prevent it from being too horizontally wide to read.\n *\n * If the viewport's width is smaller than maxWidth, core CSS ensures the tippy remains smaller than the screen.\n * \n * To test it on WCS documentation page, add 'px' to the control value (string type in this case).\n */\n @Prop()\n maxWidth: string | number = 350;\n\n /**\n * Delay in ms once a trigger event is fired before the tooltip shows or hides.\n *\n * You can provide an array with two values to define a different duration for show and hide.\n *\n * `[showDelay, hideDelay]`\n *\n * Use null to use default value.\n */\n @Prop()\n delay: number | [number, number] = 0;\n\n /**\n * Duration in ms of the transition animation.\n */\n @Prop()\n duration: number | [number, number] = [300, 250];\n\n /**\n * Determines the events that cause the tooltip to show. Multiple event names are separated by spaces.\n *\n * See: https://atomiks.github.io/tippyjs/v6/all-props/#trigger\n */\n @Prop()\n trigger: string = 'mouseenter focus';\n\n /**\n * Allows you to change the theme used by tippy.\n *\n * The WCS theme 'dark' is used by default and uses the WCS CSS variables.\n *\n * You can create a theme by following this documentation and choosing a custom name :\n * https://atomiks.github.io/tippyjs/v6/themes/\n */\n @Prop()\n theme: 'dark' | 'light' = 'dark';\n\n /**\n * You can use this property instead of the slot API to affect content in the tooltip.\n *\n * This makes it easier to manage the update if the tooltip contains elements that are not mutated when their\n * content changes. Indeed, if the slot is used, the tooltip is updated only if the structure of the slotted DOM\n * changes (the DOM must be mutated).\n *\n * The two APIs are not mutually exclusive, if both are filled in (the prop + the slot) the rendering will first\n * display the content of this property and then the slotted elements.\n */\n @Prop()\n content: string;\n\n /**\n * The element to append the tooltip to. Default behaviour is `() => document.body`. If interactive: true,\n * the default behavior is appendTo: \"parent\"\n *\n * See: https://atomiks.github.io/tippyjs/v6/all-props/#appendto\n */\n @Prop()\n appendTo: WcsTooltipAppendTo;\n\n @Element()\n private el: HTMLWcsTooltipElement;\n\n private tippyInstance: Instance<Props>;\n private forElement?: HTMLElement;\n\n componentWillLoad(): Promise<void> | void {\n this.forElement = document.getElementById(this.for);\n \n if(!this.forElement) {\n console.error('[wcs-tooltip]: The element with the id provided in the \"for\" property does not exist');\n return\n }\n \n this.tippyInstance = tippy(this.forElement, {\n appendTo: this.appendTo || (() => document.body),\n theme: this.theme,\n allowHTML: true,\n content: this.getTooltipContentFromPropAndSlot(),\n maxWidth: this.maxWidth,\n placement: this.position,\n delay: this.delay,\n duration: this.duration,\n interactive: this.interactive,\n trigger: this.trigger,\n onShow: () => this.onShow(),\n onHide: () => this.onHide()\n });\n }\n\n // region Tippy.js events\n \n // ARIA attributes management 🔍\n //\n // While tippy.js automatically handles aria-expanded on the target element, we manage it ourselves for two main reasons:\n // 1. Some of our components (like wcs-button) have an internal structure where the accessible/focusable element\n // is not the root element. We need to ensure the aria-expanded is set on the correct internal element.\n // 2. We want to maintain consistent control over our ARIA attributes across all components and ensure\n // they work with our custom MutableAriaAttribute interface.\n \n private onShow() {\n if (!this.forElement) {\n return;\n }\n\n if (this.forElement.tagName && DELEGATED_ARIA_COMPONENTS.indexOf(this.forElement.tagName) !== -1) {\n if(isMutableAriaAttribute(this.forElement)) {\n if(this.interactive) {\n this.forElement.setAriaAttribute('aria-expanded', 'true');\n }\n }\n }\n }\n \n private onHide() {\n if (!this.forElement) {\n return;\n }\n\n if (this.forElement.tagName && DELEGATED_ARIA_COMPONENTS.indexOf(this.forElement.tagName) !== -1) {\n if(isMutableAriaAttribute(this.forElement)) {\n if(this.interactive) {\n this.forElement.setAriaAttribute('aria-expanded', 'false');\n }\n }\n }\n }\n \n // endregion\n \n @Listen('keydown', { target: 'window' })\n async handleKeyDown(ev: KeyboardEvent) {\n if (isEscapeKey(ev)) {\n if(this.tippyInstance.state.isShown) {\n await this.hide();\n }\n }\n }\n\n private getTooltipContentFromPropAndSlot() {\n if (this.content) {\n return this.content + this.el.innerHTML;\n }\n return this.el.innerHTML;\n }\n\n @Watch('interactive')\n @Watch('position')\n @Watch('maxWidth')\n @Watch('theme')\n @Watch('delay')\n @Watch('duration')\n @Watch('trigger')\n // @ts-ignore\n private updateProps() {\n this.tippyInstance?.setProps({\n interactive: this.interactive,\n placement: this.position,\n maxWidth: this.maxWidth,\n theme: this.theme,\n delay: this.delay,\n duration: this.duration,\n trigger: this.trigger\n })\n }\n\n @Watch('content')\n private updateTippyContent() {\n this.tippyInstance?.setProps({\n content: this.getTooltipContentFromPropAndSlot()\n })\n }\n\n /**\n * Programmatically hide the tooltip\n */\n @Method()\n async hide() {\n this.tippyInstance.hide();\n }\n\n /**\n * Programmatically show the tooltip\n */\n @Method()\n async show() {\n this.tippyInstance.show();\n }\n\n /**\n * Temporarily prevent the tooltip from showing or hiding\n */\n @Method()\n async disable() {\n this.tippyInstance.disable();\n }\n\n /**\n * Re-enable a disabled tooltip\n */\n @Method()\n async enable() {\n this.tippyInstance.enable();\n }\n\n disconnectedCallback() {\n this.tippyInstance?.destroy();\n }\n\n render() {\n return (\n <Host role=\"tooltip\">\n <slot onSlotchange={_ => this.updateTippyContent()}/>\n </Host>\n );\n }\n\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG7G,sGAAsG;AACtG,gEAAgE;AAChE,EAAE;AACF,gGAAgG;AAChG,6FAA6F;AAC7F,kFAAkF;AAClF,OAAO,KAA0B,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,yBAAyB,GAAI,CAAC,YAAY,CAAC,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAOH,MAAM,OAAO,OAAO;;;wBAmBe,QAAQ;2BAOhB,KAAK;wBAUA,GAAG;qBAYI,CAAC;wBAME,CAAC,GAAG,EAAE,GAAG,CAAC;uBAQ9B,kBAAkB;qBAWV,MAAM;;;;IA8BhC,iBAAiB;QACb,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEpD,IAAG,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YACtG,OAAM;QACV,CAAC;QAED,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE;YACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;YAChD,KAAK,EAAE,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AAa,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,IAAI;QACN,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,OAAO;QACT,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IAEH,KAAK,CAAC,MAAM;QACR,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;IAED,oBAAoB;;QAChB,MAAA,IAAI,CAAC,aAAa,0CAAE,OAAO,EAAE,CAAC;IAClC,CAAC;IAED,MAAM;QACF,OAAO,CACH,EAAC,IAAI,qDAAC,IAAI,EAAC,SAAS;YAChB,6DAAM,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAClD,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, ComponentInterface, h, Host, Prop, Element, Watch, Method, Listen } from '@stencil/core';\nimport { WcsTooltipAppendTo, WcsTooltipPosition } from './tooltip-interface';\n\n// We use the Tippy.js library for the tooltip. At first by using directly the styles of tippy because\n// the design system does not specify any spec for the tooltips.\n//\n// In a second time, if a need of customization is felt, it will be possible to use the lib in a\n// \"Headless\" mode where the rendering of the tooltip will be entirely in our charge, without\n// modifications in the API : https://atomiks.github.io/tippyjs/v6/headless-tippy/\nimport tippy, { Instance, Props } from 'tippy.js';\nimport { isEscapeKey } from \"../../utils/helpers\";\nimport { isMutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\n/**\n * List of components that require special ARIA attribute delegation handling.\n * These components have their own internal elements (like native button inside wcs-button)\n * that need to receive ARIA attributes for proper accessibility.\n * \n * Another solution we take into account is to @Watch the ARIA attributes on the component and set them on the internal element.\n * But this solution was not centralized and can be forgotten.\n */\nconst DELEGATED_ARIA_COMPONENTS = ['WCS-BUTTON'];\n\n/**\n * Tooltips are used to provide additional information for features available on the website. These can improve the user\n * experience or simply show additional information. Tooltips appear when the user rolls over or clicks on them\n * (for longer content).\n *\n * Note that this component is based on the Tippy.js library : https://atomiks.github.io/tippyjs/\n * \n * ## Accessibility guidelines 💡\n * \n * The problem is that impaired users may not be able to see what is the information provided by the tooltip. To solve\n * this problem, the tooltip should be served with some aria attributes to make it accessible.\n *\n * Aria-features `wcs-tooltip` respect:\n * - dismiss when the user presses the `Escape` key\n * - has a `role=tooltip`\n * - when set to `interactive` mode\n * - `aria-expanded` on the targeted element: set to true when popover is open, false when it is closed\n *\n * Aria-features `wcs-tooltip` **does not respect with `wcs-button`**:\n * - aria-controls => we cannot do it yet, we need to wait for Cross root ARIA - export ID (https://github.com/WICG/aom/blob/gh-pages/exportid-explainer.md)\n * \n * But you have to provide the \"link\" between the element you want to describe and the tooltip. To do this, you have to\n * provide the \"visual description\" you add on the `wcs-tooltip` to the `aria-label` attribute or the `aria-description` as soon as the attribute will be available \n * of the element you want to describe .\n * \n * Example:\n * \n * ```html\n * <wcs-tooltip for=\"my-button\">Trashed items</wcs-tooltip>\n * <wcs-button id=\"my-button\" aria-label=\"Trashed items\">Trash</wcs-button>\n * ```\n * \n * @cssprop --wcs-tooltip-background-color - Background color of the tooltip\n * @cssprop --wcs-tooltip-text-color - Text color of the tooltip\n * @cssprop --wcs-tooltip-padding - Padding of the tooltip\n */\n@Component({\n tag: 'wcs-tooltip',\n shadow: true,\n // Tippy stylesheet and specific styles are imported in the global tooltip.scss file\n styleUrl: 'tooltip.scss'\n})\nexport class Tooltip implements ComponentInterface {\n /**\n * The **id** of the element the tooltip's going to describe.\n *\n * This property cannot be modified after initialization.\n *\n * @example\n * ```html\n * <span id=\"tooltiped\">Some content</span>\n * <wcs-tooltip for=\"tooltiped\">A tooltip!</wcs-tooltip>\n * ```\n */\n @Prop({mutable: false})\n for: string;\n\n /**\n * Where the tooltip is going to show relative to the element it's describing.\n */\n @Prop({reflect: true})\n position: WcsTooltipPosition = 'bottom';\n\n /**\n * Determines if the tooltip has interactive content inside of it, so that it can be hovered over and clicked inside\n * without hiding.\n */\n @Prop({ reflect: true })\n interactive: boolean = false;\n\n /**\n * Specifies the maximum width of the tooltip. Useful to prevent it from being too horizontally wide to read.\n *\n * If the viewport's width is smaller than maxWidth, core CSS ensures the tippy remains smaller than the screen.\n * \n * To test it on WCS documentation page, add 'px' to the control value (string type in this case).\n */\n @Prop()\n maxWidth: string | number = 350;\n\n /**\n * Delay in ms once a trigger event is fired before the tooltip shows or hides.\n *\n * You can provide an array with two values to define a different duration for show and hide.\n *\n * `[showDelay, hideDelay]`\n *\n * Use null to use default value.\n */\n @Prop()\n delay: number | [number, number] = 0;\n\n /**\n * Duration in ms of the transition animation.\n */\n @Prop()\n duration: number | [number, number] = [300, 250];\n\n /**\n * Determines the events that cause the tooltip to show. Multiple event names are separated by spaces.\n *\n * See: https://atomiks.github.io/tippyjs/v6/all-props/#trigger\n */\n @Prop()\n trigger: string = 'mouseenter focus';\n\n /**\n * Allows you to change the theme used by tippy.\n *\n * The WCS theme 'dark' is used by default and uses the WCS CSS variables.\n *\n * You can create a theme by following this documentation and choosing a custom name :\n * https://atomiks.github.io/tippyjs/v6/themes/\n */\n @Prop()\n theme: 'dark' | 'light' = 'dark';\n\n /**\n * You can use this property instead of the slot API to affect content in the tooltip.\n *\n * This makes it easier to manage the update if the tooltip contains elements that are not mutated when their\n * content changes. Indeed, if the slot is used, the tooltip is updated only if the structure of the slotted DOM\n * changes (the DOM must be mutated).\n *\n * The two APIs are not mutually exclusive, if both are filled in (the prop + the slot) the rendering will first\n * display the content of this property and then the slotted elements.\n */\n @Prop()\n content: string;\n\n /**\n * The element to append the tooltip to. Default behaviour is `() => document.body`. If interactive: true,\n * the default behavior is appendTo: \"parent\"\n *\n * See: https://atomiks.github.io/tippyjs/v6/all-props/#appendto\n */\n @Prop()\n appendTo: WcsTooltipAppendTo;\n\n @Element()\n private el: HTMLWcsTooltipElement;\n\n private tippyInstance: Instance<Props>;\n private forElement?: HTMLElement;\n\n componentWillLoad(): Promise<void> | void {\n this.forElement = document.getElementById(this.for);\n \n if(!this.forElement) {\n console.error('[wcs-tooltip]: The element with the id provided in the \"for\" property does not exist');\n return\n }\n \n this.tippyInstance = tippy(this.forElement, {\n appendTo: this.appendTo || (() => document.body),\n theme: this.theme,\n allowHTML: true,\n content: this.getTooltipContentFromPropAndSlot(),\n maxWidth: this.maxWidth,\n placement: this.position,\n delay: this.delay,\n duration: this.duration,\n interactive: this.interactive,\n trigger: this.trigger,\n onShow: () => this.onShow(),\n onHide: () => this.onHide()\n });\n }\n\n // region Tippy.js events\n \n // ARIA attributes management 🔍\n //\n // While tippy.js automatically handles aria-expanded on the target element, we manage it ourselves for two main reasons:\n // 1. Some of our components (like wcs-button) have an internal structure where the accessible/focusable element\n // is not the root element. We need to ensure the aria-expanded is set on the correct internal element.\n // 2. We want to maintain consistent control over our ARIA attributes across all components and ensure\n // they work with our custom MutableAriaAttribute interface.\n \n private onShow() {\n if (!this.forElement) {\n return;\n }\n\n if (this.forElement.tagName && DELEGATED_ARIA_COMPONENTS.indexOf(this.forElement.tagName) !== -1) {\n if(isMutableAriaAttribute(this.forElement)) {\n if(this.interactive) {\n this.forElement.setAriaAttribute('aria-expanded', 'true');\n }\n }\n }\n }\n \n private onHide() {\n if (!this.forElement) {\n return;\n }\n\n if (this.forElement.tagName && DELEGATED_ARIA_COMPONENTS.indexOf(this.forElement.tagName) !== -1) {\n if(isMutableAriaAttribute(this.forElement)) {\n if(this.interactive) {\n this.forElement.setAriaAttribute('aria-expanded', 'false');\n }\n }\n }\n }\n \n // endregion\n \n @Listen('keydown', { target: 'window' })\n async handleKeyDown(ev: KeyboardEvent) {\n if (isEscapeKey(ev)) {\n if(this.tippyInstance.state.isShown) {\n await this.hide();\n }\n }\n }\n\n private getTooltipContentFromPropAndSlot() {\n if (this.content) {\n return this.content + this.el.innerHTML;\n }\n return this.el.innerHTML;\n }\n\n @Watch('interactive')\n @Watch('position')\n @Watch('maxWidth')\n @Watch('theme')\n @Watch('delay')\n @Watch('duration')\n @Watch('trigger')\n // @ts-ignore\n private updateProps() {\n this.tippyInstance?.setProps({\n interactive: this.interactive,\n placement: this.position,\n maxWidth: this.maxWidth,\n theme: this.theme,\n delay: this.delay,\n duration: this.duration,\n trigger: this.trigger\n })\n }\n\n @Watch('content')\n private updateTippyContent() {\n this.tippyInstance?.setProps({\n content: this.getTooltipContentFromPropAndSlot()\n })\n }\n\n /**\n * Programmatically hide the tooltip\n */\n @Method()\n async hide() {\n this.tippyInstance.hide();\n }\n\n /**\n * Programmatically show the tooltip\n */\n @Method()\n async show() {\n this.tippyInstance.show();\n }\n\n /**\n * Temporarily prevent the tooltip from showing or hiding\n */\n @Method()\n async disable() {\n this.tippyInstance.disable();\n }\n\n /**\n * Re-enable a disabled tooltip\n */\n @Method()\n async enable() {\n this.tippyInstance.enable();\n }\n\n disconnectedCallback() {\n this.tippyInstance?.destroy();\n }\n\n render() {\n return (\n <Host role=\"tooltip\">\n <slot onSlotchange={_ => this.updateTippyContent()}/>\n </Host>\n );\n }\n\n\n}\n"]}
|
|
@@ -4,10 +4,10 @@ import { i as inheritAriaAttributes, a as inheritAttributes, s as setOrRemoveAtt
|
|
|
4
4
|
const getAccessibleName = (order, double) => {
|
|
5
5
|
switch (order) {
|
|
6
6
|
case 'next':
|
|
7
|
-
return double ? '
|
|
7
|
+
return double ? 'Dernière page' : 'Page suivante';
|
|
8
8
|
case 'previous':
|
|
9
9
|
default:
|
|
10
|
-
return double ? '
|
|
10
|
+
return double ? 'Première page' : 'Page précédente';
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
const GridPaginationArrow = ({ active, order, double = false }) => (h("wcs-button", { mode: "clear", shape: "square", size: "s", disabled: !active, title: getAccessibleName(order, double) },
|
|
@@ -64,14 +64,19 @@ const GridPagination = class {
|
|
|
64
64
|
async setAriaAttribute(attr, value) {
|
|
65
65
|
setOrRemoveAttribute(this.nativeNav, attr, value);
|
|
66
66
|
}
|
|
67
|
+
getWcsGrid() {
|
|
68
|
+
return this.el.parentElement.tagName === 'WCS-GRID' ? this.el.parentElement : undefined;
|
|
69
|
+
}
|
|
67
70
|
lastPage() {
|
|
68
71
|
this.currentPage = this.pageCount - 1;
|
|
69
72
|
this.emitPaginationChange();
|
|
73
|
+
this.focusFirstGridCell();
|
|
70
74
|
}
|
|
71
75
|
nextPage() {
|
|
72
76
|
if (this.canGoToNextPage()) {
|
|
73
77
|
this.currentPage++;
|
|
74
78
|
this.emitPaginationChange();
|
|
79
|
+
this.focusFirstGridCell();
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
canGoToNextPage() {
|
|
@@ -81,6 +86,7 @@ const GridPagination = class {
|
|
|
81
86
|
if (this.canGoToPreviousPage()) {
|
|
82
87
|
this.currentPage--;
|
|
83
88
|
this.emitPaginationChange();
|
|
89
|
+
this.focusFirstGridCell();
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
canGoToPreviousPage() {
|
|
@@ -89,13 +95,27 @@ const GridPagination = class {
|
|
|
89
95
|
firstPage() {
|
|
90
96
|
this.currentPage = 0;
|
|
91
97
|
this.emitPaginationChange();
|
|
98
|
+
this.focusFirstGridCell();
|
|
92
99
|
}
|
|
93
|
-
|
|
100
|
+
onChangePageSize(event) {
|
|
94
101
|
this.pageSize = event.detail.value;
|
|
95
102
|
if (this.currentPage + 1 > this.pageSize) {
|
|
96
103
|
this.currentPage = 0;
|
|
97
104
|
}
|
|
98
105
|
this.emitPaginationChange();
|
|
106
|
+
this.focusFirstGridCell();
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Move focus to the first grid cell after a pagination change
|
|
110
|
+
*/
|
|
111
|
+
focusFirstGridCell() {
|
|
112
|
+
const grid = this.getWcsGrid();
|
|
113
|
+
if (grid) {
|
|
114
|
+
requestAnimationFrame(() => {
|
|
115
|
+
this.el.blur();
|
|
116
|
+
grid.focusFirstCell();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
99
119
|
}
|
|
100
120
|
emitPaginationChange() {
|
|
101
121
|
this.wcsGridPaginationChange.emit({
|
|
@@ -108,7 +128,7 @@ const GridPagination = class {
|
|
|
108
128
|
});
|
|
109
129
|
}
|
|
110
130
|
render() {
|
|
111
|
-
return (h(Host, { key: '
|
|
131
|
+
return (h(Host, { key: 'a51e533835607f4e0b712fe26680704a71f76cd6', slot: "grid-pagination" }, h("div", { key: '8ff4ebf10c9e134a8e2fe5d577860a8d6dc9c863', class: "container" }, h("div", { key: 'a4c6ce48c71fb017dfecdb3f1e8bdc59894e1cbd', class: "page-size" }, h("wcs-select", { key: 'ae08e610f92bc8084806b25b0b5d7fa95db079ee', placeholder: "El\u00E9ments par page", class: "available-page-sizes", "aria-labelledby": "elements-per-page-number elements-per-page-text", value: this.pageSize, onWcsChange: this.onChangePageSize.bind(this) }, this.availablePageSizes.map((pageSize) => h("wcs-select-option", { value: pageSize }, pageSize))), h("span", { key: '282fd594fa817e9f2535c7403b5e1d66e4a7d030', id: "elements-per-page-number", hidden: true }, this.pageSize), h("span", { key: '00ee37d7e5156aa17b234fdf6eec956228064094', id: "elements-per-page-text" }, "\u00E9l\u00E9ments par page")), h("div", { key: '2ae95e32fc77cafebf0a38eb2746c62d0bd3a537', class: "items-count" }, h("span", { key: '5861d6bbf937867579181842dc93ba33290cdfe9' }, this.itemsCount, " \u00E9l\u00E9ments")), h("nav", Object.assign({ key: '7d847f316fb18ec7bdc08f7c055115a7391bb25e', "aria-label": "pagination", ref: (el) => (this.nativeNav = el) }, this.inheritedAttributes), h("ul", { key: 'd58fdfcd0a663071a6c94b72acf339a2efd57b5d', class: "page-management" }, h("li", { key: 'd18366653d52b0e481bfc8bb0d001d72aa5b3b36', class: "pagination-arrow", onClick: this.firstPage.bind(this) }, h(GridPaginationArrow, { key: 'ce33b84750ac08bfc50e91378f79ce62c11c9750', active: this.canGoToPreviousPage(), order: "previous", double: true })), h("li", { key: 'fb8adcbe91d40dd5d5dd741ec2c69299d971a1ee', class: "pagination-arrow", onClick: this.previousPage.bind(this) }, h(GridPaginationArrow, { key: 'b5f8b2804909a64e73e4d26a1faea483a10d2137', active: this.canGoToPreviousPage(), order: "previous" })), h("li", { key: '22742254c3c37ecf900eba29d1605a0420ff11e2', class: "pagination-counter" }, h("span", { key: '1f9385fffd93e2eb97d8199b0d7e459e58e01285', "aria-label": `Page ${this.currentPage + 1} sur ${this.pageCount}`, "aria-current": "page" }, this.currentPage + 1, " / ", this.pageCount)), h("li", { key: '3a408b5b27a1ff8ba7dc52b6027506100e371d49', class: "pagination-arrow", onClick: this.nextPage.bind(this) }, h(GridPaginationArrow, { key: '54e0d638e0645fd46b8a96a99509c8a3dafc842b', active: this.canGoToNextPage(), order: "next" })), h("li", { key: 'e91b2f2eeadfeea3ef68fa83c3c3e9fa30c3c17f', class: "pagination-arrow", onClick: this.lastPage.bind(this) }, h(GridPaginationArrow, { key: '14834c2f39a7f1076dfe2660aa2c651d1c52f40e', active: this.canGoToNextPage(), order: "next", double: true })))))));
|
|
112
132
|
}
|
|
113
133
|
get el() { return getElement(this); }
|
|
114
134
|
};
|
|
@@ -117,4 +137,4 @@ GridPagination.style = WcsGridPaginationStyle0;
|
|
|
117
137
|
|
|
118
138
|
export { GridPagination as G };
|
|
119
139
|
|
|
120
|
-
//# sourceMappingURL=grid-pagination-
|
|
140
|
+
//# sourceMappingURL=grid-pagination-731726a6.js.map
|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DAAI,KAAK,EAAC,oBAAoB,IAC1B,2EAAkB,QAAQ,IAAI,CAAC,WAAW,GAAG,CAAC,QAAQ,IAAI,CAAC,SAAS,EAAE,kBAAe,MAAM,IACtF,IAAI,CAAC,WAAW,GAAG,CAAC,SAAK,IAAI,CAAC,SAAS,CACrC,CACN,EAEL,2DAAI,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAC1D,EAAC,mBAAmB,qDAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAC,MAAM,GAAuB,CACvF,EACL,2DAAI,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAC1D,EAAC,mBAAmB,qDAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,SAAuB,CAC9F,CACJ,CACH,CACJ,CACH,EAAC;KACX;;;AApKe,+BAAgB,GAAW,CAAX,CAAa;;;;;","names":[],"sources":["src/components/grid-pagination/grid-pagination-arrow.tsx","src/components/grid-pagination/grid-pagination.scss?tag=wcs-grid-pagination&encapsulation=shadow","src/components/grid-pagination/grid-pagination.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\n\ninterface GridPaginationArrowProps {\n active: boolean;\n order: 'next' | 'previous';\n double?: boolean;\n}\n\nconst getAccessibleName = (order: GridPaginationArrowProps['order'], double: GridPaginationArrowProps['double']): string => {\n switch (order) {\n case 'next':\n return double ? 'Dernière page' : 'Page suivante';\n case 'previous':\n default:\n return double ? 'Première page' : 'Page précédente';\n }\n}\n\nexport const GridPaginationArrow: FunctionalComponent<GridPaginationArrowProps> = ({active, order, double = false}) => (\n <wcs-button mode=\"clear\"\n shape=\"square\"\n size=\"s\"\n disabled={!active}\n title={getAccessibleName(order, double)}>\n <svg style={{cursor: 'pointer'}}\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"20\" viewBox=\"0 0 24 20\">\n <style type=\"text/css\">{`\n .arrow-group {\n transform-origin: 50% 51%;\n transition: transform 175ms ease-in-out;\n }\n .arrow {\n transition: fill 175ms ease-in-out;\n fill: var(--wcs-grid-pagination-arrow-color-inactive, var(--wcs-button-color));\n }\n .second-arrow {\n transform: translateY(-8px);\n }\n .next {\n transform: rotate(90deg);\n }\n .previous {\n transform: rotate(-90deg);\n }\n .active {\n fill: var(--wcs-grid-pagination-arrow-color-active, var(--wcs-button-color));\n }\n `}</style>\n <g fill=\"none\" class={order + ' arrow-group'}>\n <path class={(active ? 'active' : '') + ' arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n </g>\n {\n double ?\n <g fill=\"none\" class={order + ' arrow-group'}>\n <path class={(active ? 'active' : '') + ' arrow second-arrow'}\n d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n </g>\n : ''\n }\n </svg>\n </wcs-button>\n);\n","@import '../../style/focus-outline.scss';\n\n:host {\n display: block;\n margin-top: var(--wcs-grid-pagination-margin-top);\n\n --wcs-grid-pagination-color: var(--wcs-semantic-color-text-primary);\n --wcs-grid-pagination-font-size: var(--wcs-semantic-font-size-label-2);\n --wcs-grid-pagination-font-weight: var(--wcs-semantic-font-weight-medium);\n\n --wcs-grid-pagination-gap: var(--wcs-semantic-spacing-base);\n --wcs-grid-pagination-page-size-gap: var(--wcs-semantic-spacing-base);\n --wcs-grid-pagination-counter-gap: var(--wcs-semantic-spacing-small);\n --wcs-grid-pagination-margin-top: var(--wcs-semantic-spacing-large);\n\n --wcs-grid-pagination-arrow-color-inactive: unset; /* Optional : Overrides the fill property of the grid-pagination-arrow */\n --wcs-grid-pagination-arrow-color-active: unset; /* Optional : Overrides the fill property of the grid-pagination-arrow */\n}\n\n.container {\n display: grid;\n gap: var(--wcs-grid-pagination-gap);\n grid-template-columns: auto auto auto;\n justify-content: space-between;\n align-items: center;\n color: var(--wcs-grid-pagination-color);\n font-size: var(--wcs-grid-pagination-font-size);\n font-weight: var(--wcs-grid-pagination-font-weight);\n}\n\n.available-page-sizes {\n width: auto;\n}\n\n.page-management, .page-size, .items-count {\n display: flex;\n align-items: center;\n}\n\n.page-size {\n gap: var(--wcs-grid-pagination-page-size-gap);\n}\n\n.page-management {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n.pagination-arrow {\n display: flex;\n}\n\n.pagination-counter {\n padding: 0 var(--wcs-grid-pagination-counter-gap);\n\n span {\n white-space: nowrap;\n }\n}\n\n/* TODO : Remove this when the select component will be able to handle the size S */\nwcs-select.available-page-sizes {\n --wcs-select-control-height: var(--wcs-semantic-size-s);\n}\n","import {\n Component,\n ComponentInterface, Element,\n Event, EventEmitter,\n h,\n Host, Method,\n Prop\n} from '@stencil/core';\nimport {\n WcsGridPaginationChangeEventDetails\n} from '../grid/grid-interface';\nimport { SelectChangeEventDetail } from '../select/select-interface';\nimport { GridPaginationArrow } from './grid-pagination-arrow';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from \"../../utils/helpers\";\n\nconst GRID_PAGINATION_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The grid pagination is a subcomponent of `wcs-grid`, slotted in `grid-pagination` under the `<table>` element.\n * \n * @cssprop --wcs-grid-pagination-color - Text color of the grid pagination\n * @cssprop --wcs-grid-pagination-font-size - Font-size of the grid pagination\n * @cssprop --wcs-grid-pagination-font-weight - Font-weight of the grid pagination\n * @cssprop --wcs-grid-pagination-gap - Gap between the page size, number of elements and page management\n * @cssprop --wcs-grid-pagination-page-size-gap - Gap between the select and the text within the page size container\n * @cssprop --wcs-grid-pagination-counter-gap - Gap within the page management counter\n * @cssprop --wcs-grid-pagination-margin-top - Margin between the grid and the pagination\n * @cssprop --wcs-grid-pagination-arrow-color-inactive - Color of the inactive arrow\n * @cssprop --wcs-grid-pagination-arrow-color-active - Color of the active arrow\n */\n@Component({\n tag: 'wcs-grid-pagination',\n styleUrl: 'grid-pagination.scss',\n shadow: true\n})\nexport class GridPagination implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeNav!: HTMLElement;\n private inheritedAttributes: { [k: string]: any } = {};\n \n static readonly INDEX_FIRST_PAGE: number = 0;\n /**\n * Set the available page sizes in the pagination dropdown on the left.\n */\n @Prop() availablePageSizes: number[] = [10, 20, 50];\n /**\n * The current page of the pagination. First page starts at index 0.\n */\n @Prop({mutable: true}) currentPage: number = GridPagination.INDEX_FIRST_PAGE;\n /**\n * Maximum number of elements shown per page. \n * Default is the first value of `availablePageSizes`.\n */\n @Prop() pageSize: number = this.availablePageSizes[0];\n /**\n * Total elements in the grid. \n * - **Grid in `Server mode`** : You have to set `itemsCount` = your total data length. \n * - **Grid not in Server mode** : Do not set it manually : itemsCount is set and updated every pagination refresh.\n */\n @Prop() itemsCount: number = 0;\n /**\n * Max number of pages. \n * - **Grid in `Server mode`** : You have to set `pageCount` = `itemsCount` divided by `pageSize`. \n * - **Grid not in Server mode** : Do not set it manually : pageCount is set and updated every pagination refresh.\n */\n @Prop() pageCount: number = 1;\n /**\n * Event emitted when the pagination changes.\n */\n @Event() wcsGridPaginationChange!: EventEmitter<WcsGridPaginationChangeEventDetails>;\n\n componentWillLoad(): Promise<void> | void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, GRID_PAGINATION_INHERITED_ATTRS),\n };\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeNav, attr, value);\n }\n \n private getWcsGrid(): HTMLWcsGridElement | undefined {\n return this.el.parentElement.tagName === 'WCS-GRID' ? this.el.parentElement as HTMLWcsGridElement : undefined;\n }\n\n private lastPage(): void {\n this.currentPage = this.pageCount - 1;\n this.emitPaginationChange();\n this.focusFirstGridCell();\n }\n\n private nextPage(): void {\n if (this.canGoToNextPage()) {\n this.currentPage++;\n this.emitPaginationChange();\n this.focusFirstGridCell();\n }\n }\n\n private canGoToNextPage(): boolean {\n return this.currentPage + 1 < this.pageCount;\n }\n\n private previousPage(): void {\n if (this.canGoToPreviousPage()) {\n this.currentPage--;\n this.emitPaginationChange();\n this.focusFirstGridCell();\n }\n }\n\n private canGoToPreviousPage(): boolean {\n return this.currentPage > 0;\n }\n\n private firstPage(): void {\n this.currentPage = 0;\n this.emitPaginationChange();\n this.focusFirstGridCell();\n }\n\n private onChangePageSize(event: CustomEvent<SelectChangeEventDetail>): void {\n this.pageSize = event.detail.value;\n if (this.currentPage + 1 > this.pageSize) {\n this.currentPage = 0;\n }\n this.emitPaginationChange();\n this.focusFirstGridCell();\n }\n\n /**\n * Move focus to the first grid cell after a pagination change\n */\n private focusFirstGridCell() {\n const grid = this.getWcsGrid();\n if (grid) {\n requestAnimationFrame(() => {\n this.el.blur();\n grid.focusFirstCell();\n })\n }\n }\n\n private emitPaginationChange(): void {\n this.wcsGridPaginationChange.emit({\n pagination: {\n currentPage: this.currentPage,\n pageSize: this.pageSize,\n itemsCount: this.itemsCount,\n pageCount: this.pageCount\n }\n });\n }\n\n render(): any {\n return (<Host slot=\"grid-pagination\">\n <div class=\"container\">\n <div class=\"page-size\">\n <wcs-select placeholder=\"Eléments par page\"\n class=\"available-page-sizes\"\n aria-labelledby=\"elements-per-page-number elements-per-page-text\"\n value={this.pageSize}\n onWcsChange={this.onChangePageSize.bind(this)}>\n {\n this.availablePageSizes.map((pageSize) =>\n <wcs-select-option value={pageSize}>{pageSize}</wcs-select-option>\n )\n }\n </wcs-select>\n <span id=\"elements-per-page-number\" hidden>{this.pageSize}</span>\n <span id=\"elements-per-page-text\">éléments par page</span>\n </div>\n\n <div class=\"items-count\">\n <span>{this.itemsCount} éléments</span>\n </div>\n\n <nav aria-label=\"pagination\" ref={(el) => (this.nativeNav = el)} {...this.inheritedAttributes}>\n <ul class=\"page-management\">\n <li class=\"pagination-arrow\" onClick={this.firstPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToPreviousPage()} order=\"previous\" double></GridPaginationArrow>\n </li>\n <li class=\"pagination-arrow\" onClick={this.previousPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToPreviousPage()} order=\"previous\"></GridPaginationArrow>\n </li>\n \n <li class=\"pagination-counter\">\n <span aria-label={`Page ${this.currentPage + 1} sur ${this.pageCount}`} aria-current=\"page\">\n {this.currentPage + 1} / {this.pageCount}\n </span>\n </li>\n \n <li class=\"pagination-arrow\" onClick={this.nextPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToNextPage()} order=\"next\"></GridPaginationArrow>\n </li>\n <li class=\"pagination-arrow\" onClick={this.lastPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToNextPage()} order=\"next\" double></GridPaginationArrow>\n </li>\n </ul>\n </nav>\n </div>\n </Host>)\n }\n}\n"],"version":3}
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy(JSON.parse("[[\"wcs-editable-field\",[[1,\"wcs-editable-field\",{\"type\":[1],\"label\":[1],\"readonly\":[516],\"value\":[1032],\"validateFn\":[16],\"formatFn\":[16],\"errorMsg\":[1,\"error-msg\"],\"size\":[513],\"currentState\":[32],\"isError\":[32]},[[8,\"click\",\"onWindowClickEvent\"]],{\"value\":[\"onValueChange\"]}]]],[\"wcs-grid-pagination\",[[1,\"wcs-grid-pagination\",{\"availablePageSizes\":[16],\"currentPage\":[1026,\"current-page\"],\"pageSize\":[2,\"page-size\"],\"itemsCount\":[2,\"items-count\"],\"pageCount\":[2,\"page-count\"],\"setAriaAttribute\":[64]}]]],[\"wcs-horizontal-stepper\",[[1,\"wcs-horizontal-stepper\",{\"currentStep\":[1026,\"current-step\"],\"steps\":[16],\"mode\":[1],\"checkOnComplete\":[4,\"check-on-complete\"],\"internalCurrentStepIndex\":[32],\"previous\":[64],\"next\":[64]},null,{\"currentStep\":[\"onCurrentStepChange\"]}]]],[\"wcs-breadcrumb\",[[1,\"wcs-breadcrumb\",{\"maxItems\":[2,\"max-items\"],\"itemsBeforeCollapse\":[2,\"items-before-collapse\"],\"itemsAfterCollapse\":[2,\"items-after-collapse\"],\"ariaLabelExpandButton\":[1,\"aria-label-expand-button\"],\"showHiddenItems\":[32],\"setAriaAttribute\":[64]},null,{\"maxItems\":[\"handleCollapsePropsChange\"],\"itemsBeforeCollapse\":[\"handleCollapsePropsChange\"],\"itemsAfterCollapse\":[\"handleCollapsePropsChange\"],\"ariaLabelExpandButton\":[\"handleAriaLabelExpandBtnChange\"]}]]],[\"wcs-counter\",[[17,\"wcs-counter\",{\"size\":[513],\"label\":[1],\"disabled\":[516],\"min\":[1026],\"max\":[1026],\"step\":[1026],\"value\":[1026],\"displayedValue\":[32],\"setAriaAttribute\":[64]},null,{\"value\":[\"valueChange\"]}]]],[\"wcs-grid\",[[1,\"wcs-grid\",{\"serverMode\":[4,\"server-mode\"],\"data\":[16],\"loading\":[4],\"selectionConfig\":[1,\"selection-config\"],\"selectedItems\":[8,\"selected-items\"],\"wcsGridPaginationId\":[1,\"wcs-grid-pagination-id\"],\"rowIdPath\":[1,\"row-id-path\"],\"rowCssPartsFn\":[16],\"columns\":[32],\"paginationEl\":[32],\"rows\":[32],\"cursorPosition\":[32],\"setAriaAttribute\":[64]},[[0,\"focus\",\"onFocus\"],[0,\"blur\",\"onBlur\"],[0,\"wcsHiddenChange\",\"onHiddenColumnChange\"],[0,\"keydown\",\"onKeyDown\"],[1,\"mousedown\",\"onClick\"],[0,\"wcsSortChange\",\"sortChangeEventHandler\"],[0,\"wcsGridPaginationChange\",\"paginationChangeEventHandler\"],[8,\"wcsGridPaginationChange\",\"paginationChangeEventHandlerOutside\"]],{\"cursorPosition\":[\"onCursorPositionChange\"],\"data\":[\"onDataChange\"],\"selectedItems\":[\"onSelectedItemsPropertyChange\"]}]]],[\"wcs-modal\",[[4,\"wcs-modal\",{\"withoutBackdrop\":[516,\"without-backdrop\"],\"show\":[1540],\"showCloseButton\":[516,\"show-close-button\"],\"closeButtonAriaLabel\":[1,\"close-button-aria-label\"],\"size\":[1],\"hideActions\":[516,\"hide-actions\"],\"modalTriggerControlsId\":[1,\"modal-trigger-controls-id\"],\"initialFocusElementId\":[1,\"initial-focus-element-id\"],\"disableAutoFocus\":[4,\"disable-auto-focus\"],\"setAriaAttribute\":[64]},[[4,\"keydown\",\"onKeyDown\"]],{\"show\":[\"onShowChange\"]}]]],[\"wcs-dropdown\",[[17,\"wcs-dropdown\",{\"noArrow\":[4,\"no-arrow\"],\"mode\":[1],\"shape\":[1],\"size\":[1],\"disabled\":[516],\"placement\":[1],\"expanded\":[32],\"setAriaAttribute\":[64]},[[0,\"blur\",\"onBlur\"],[8,\"click\",\"onWindowClickEvent\"],[0,\"wcsDropdownItemClick\",\"dropdownItemClick\"],[0,\"keydown\",\"onKeyDown\"]],{\"placement\":[\"placementChange\"]}]]],[\"wcs-galactic-menu\",[[1,\"wcs-galactic-menu\",{\"text\":[1],\"showPopoverMenu\":[32],\"setAriaAttribute\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-input\",[[17,\"wcs-input\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"accept\":[1],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"debounce\":[2],\"prefixLabel\":[1,\"prefix-label\"],\"suffixLabel\":[1,\"suffix-label\"],\"disabled\":[516],\"enterkeyhint\":[1],\"size\":[513],\"icon\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"multiple\":[4],\"name\":[1],\"hidePasswordButtonAriaLabel\":[1,\"hide-password-button-aria-label\"],\"showPasswordButtonAriaLabel\":[1,\"show-password-button-aria-label\"],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[516],\"required\":[4],\"spellcheck\":[4],\"state\":[513],\"step\":[1],\"type\":[1],\"value\":[1032],\"passwordReveal\":[32],\"setBlur\":[64],\"getInputElement\":[64],\"setAriaAttribute\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"passwordReveal\":[\"onPasswordRevealChange\"]}]]],[\"wcs-textarea\",[[17,\"wcs-textarea\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"autocapitalize\":[1],\"autofocus\":[4],\"debounce\":[2],\"disabled\":[516],\"icon\":[1],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"readonly\":[516],\"required\":[4],\"spellcheck\":[4],\"state\":[513],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"autoGrow\":[4,\"auto-grow\"],\"value\":[1025],\"resize\":[513],\"setAriaAttribute\":[64],\"fitContent\":[64],\"setBlur\":[64],\"getInputElement\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}]]],[\"wcs-accordion\",[[1,\"wcs-accordion\",{\"hideActionText\":[516,\"hide-action-text\"],\"highlight\":[516],\"groupContentWithHeader\":[516,\"group-content-with-header\"]},[[0,\"wcsOpenChange\",\"wcsOpenChangeHandler\"]],{\"hideActionText\":[\"updateHideActiontextOnPanel\"],\"highlight\":[\"updateHighlightOnPanel\"],\"groupContentWithHeader\":[\"updateGroupContentWithHeader\"]}]]],[\"wcs-accordion-content\",[[1,\"wcs-accordion-content\"]]],[\"wcs-accordion-header\",[[1,\"wcs-accordion-header\"]]],[\"wcs-accordion-panel\",[[1,\"wcs-accordion-panel\",{\"open\":[1540],\"hideActionText\":[516,\"hide-action-text\"],\"highlight\":[516],\"groupContentWithHeader\":[516,\"group-content-with-header\"],\"setAriaAttribute\":[64],\"close\":[64]},null,{\"open\":[\"openChange\"]}]]],[\"wcs-action-bar\",[[1,\"wcs-action-bar\",{\"gutter\":[516],\"hasTabs\":[32]}]]],[\"wcs-app\",[[1,\"wcs-app\"]]],[\"wcs-badge\",[[1,\"wcs-badge\",{\"shape\":[1],\"color\":[1],\"size\":[513]}]]],[\"wcs-breadcrumb-item\",[[1,\"wcs-breadcrumb-item\",{\"last\":[4]}]]],[\"wcs-card\",[[1,\"wcs-card\",{\"mode\":[1537]}]]],[\"wcs-card-body\",[[1,\"wcs-card-body\"]]],[\"wcs-com-nav\",[[1,\"wcs-com-nav\",{\"appName\":[1,\"app-name\"],\"mobileMenuOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64]},[[0,\"wcsClickOnFinalAction\",\"onClickOnFinalAction\"],[8,\"keydown\",\"exitMobileMenuOnKeyDown\"]]]]],[\"wcs-com-nav-category\",[[1,\"wcs-com-nav-category\",{\"label\":[1],\"categoryOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64],\"close\":[64],\"open\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[8,\"wcsCategoryOpened\",\"onSubmenuOpened\"]]]]],[\"wcs-com-nav-item\",[[1,\"wcs-com-nav-item\",null,[[0,\"click\",\"onClick\"]]]]],[\"wcs-com-nav-submenu\",[[1,\"wcs-com-nav-submenu\",{\"label\":[1],\"panelTitle\":[1,\"panel-title\"],\"panelDescription\":[1,\"panel-description\"],\"menuOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64],\"close\":[64],\"open\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[8,\"wcsSubmenuOpened\",\"onSubmenuOpened\"],[8,\"keydown\",\"onEscapeKeyDown\"],[0,\"wcsClickOnFinalAction\",\"wcsCategoryItemClickedHandler\"]]]]],[\"wcs-divider\",[[1,\"wcs-divider\"]]],[\"wcs-dropdown-divider\",[[1,\"wcs-dropdown-divider\"]]],[\"wcs-dropdown-header\",[[1,\"wcs-dropdown-header\"]]],[\"wcs-dropdown-item\",[[4,\"wcs-dropdown-item\",null,[[1,\"mouseup\",\"onMouseUp\"],[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-field\",[[1,\"wcs-field\"]]],[\"wcs-field-content\",[[1,\"wcs-field-content\"]]],[\"wcs-field-label\",[[1,\"wcs-field-label\"]]],[\"wcs-footer\",[[1,\"wcs-footer\"]]],[\"wcs-galactic\",[[1,\"wcs-galactic\",{\"text\":[1],\"show\":[32]}]]],[\"wcs-grid-column\",[[1,\"wcs-grid-column\",{\"path\":[1],\"name\":[1],\"sort\":[4],\"sortFn\":[16],\"formatter\":[16],\"sortOrder\":[1025,\"sort-order\"],\"width\":[1],\"customCells\":[4,\"custom-cells\"],\"hidden\":[516],\"cursorPosition\":[16],\"columnPosition\":[2,\"column-position\"],\"setAriaAttribute\":[64]},null,{\"hidden\":[\"parseMyObjectProp\"],\"sortOrder\":[\"sortOrderChange\"]}]]],[\"wcs-grid-custom-cell\",[[1,\"wcs-grid-custom-cell\",{\"columnId\":[1,\"column-id\"],\"rowId\":[8,\"row-id\"]}]]],[\"wcs-header\",[[1,\"wcs-header\",{\"setAriaAttribute\":[64]}]]],[\"wcs-hint\",[[1,\"wcs-hint\",{\"small\":[1540]}]]],[\"wcs-icon\",[[0,\"wcs-icon\",{\"icon\":[1],\"size\":[1],\"setAriaAttribute\":[64]}]]],[\"wcs-list-item\",[[1,\"wcs-list-item\",{\"activated\":[1540]}]]],[\"wcs-list-item-properties\",[[1,\"wcs-list-item-properties\"]]],[\"wcs-list-item-property\",[[1,\"wcs-list-item-property\"]]],[\"wcs-native-select\",[[1,\"wcs-native-select\",{\"size\":[513],\"required\":[4],\"expanded\":[32],\"disabled\":[32],\"setAriaAttribute\":[64],\"updateStyles\":[64]},null,{\"required\":[\"requiredChanged\"]}]]],[\"wcs-nav\",[[1,\"wcs-nav\",{\"setAriaAttribute\":[64]}]]],[\"wcs-nav-item\",[[4,\"wcs-nav-item\",null,[[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-progress-radial\",[[1,\"wcs-progress-radial\",{\"size\":[2],\"showLabel\":[4,\"show-label\"],\"value\":[2],\"setAriaAttribute\":[64]}]]],[\"wcs-radio\",[[17,\"wcs-radio\",{\"value\":[1544],\"label\":[1537],\"disabled\":[1540],\"name\":[1025],\"mode\":[513],\"checked\":[32],\"radioTabIndex\":[32],\"updateState\":[64],\"setTabIndex\":[64],\"setAriaAttribute\":[64]}]]],[\"wcs-radio-group\",[[1,\"wcs-radio-group\",{\"value\":[1032],\"name\":[520],\"mode\":[513],\"setAriaAttribute\":[64]},[[0,\"wcsRadioClick\",\"handleRadioClick\"],[0,\"keydown\",\"handleKeyDown\"]],{\"value\":[\"onValueChangeHandler\"],\"name\":[\"updateAllRadioModeAndName\"],\"mode\":[\"updateAllRadioModeAndName\"]}]]],[\"wcs-skeleton-circle\",[[1,\"wcs-skeleton-circle\",{\"animation\":[513],\"radius\":[514]}]]],[\"wcs-skeleton-rectangle\",[[1,\"wcs-skeleton-rectangle\",{\"animation\":[513],\"rounded\":[516],\"height\":[513],\"width\":[513]}]]],[\"wcs-skeleton-text\",[[1,\"wcs-skeleton-text\",{\"animation\":[513],\"height\":[1]}]]],[\"wcs-switch\",[[17,\"wcs-switch\",{\"name\":[1],\"checked\":[516],\"labelAlignment\":[513,\"label-alignment\"],\"disabled\":[516],\"setAriaAttribute\":[64],\"getLabel\":[64]},[[0,\"click\",\"handleHostClick\"]]]]],[\"wcs-tab\",[[1,\"wcs-tab\",{\"header\":[513],\"itemKey\":[8,\"item-key\"]}]]],[\"wcs-tabs\",[[1,\"wcs-tabs\",{\"align\":[513],\"selectedIndex\":[2,\"selected-index\"],\"selectedKey\":[8,\"selected-key\"],\"headersOnly\":[4,\"headers-only\"],\"gutter\":[516],\"description\":[1],\"headers\":[32],\"currentActiveTabIndex\":[32],\"setAriaAttribute\":[64]},[[0,\"tabLoaded\",\"onTabLoaded\"]],{\"selectedIndex\":[\"selectedIndexChanged\"],\"selectedKey\":[\"selectedTabkeyChanged\"]}]]],[\"wcs-tooltip\",[[1,\"wcs-tooltip\",{\"for\":[1],\"position\":[513],\"interactive\":[4],\"maxWidth\":[8,\"max-width\"],\"delay\":[2],\"duration\":[2],\"trigger\":[1],\"theme\":[1],\"content\":[1],\"appendTo\":[1,\"append-to\"],\"hide\":[64],\"show\":[64],\"disable\":[64],\"enable\":[64]},[[8,\"keydown\",\"handleKeyDown\"]],{\"interactive\":[\"updateProps\"],\"position\":[\"updateProps\"],\"maxWidth\":[\"updateProps\"],\"theme\":[\"updateProps\"],\"delay\":[\"updateProps\"],\"duration\":[\"updateProps\"],\"trigger\":[\"updateProps\"],\"content\":[\"updateTippyContent\"]}]]],[\"wcs-progress-bar\",[[1,\"wcs-progress-bar\",{\"size\":[1],\"showLabel\":[4,\"show-label\"],\"value\":[2],\"setAriaAttribute\":[64]}]]],[\"wcs-select_2\",[[4,\"wcs-select-option\",{\"disabled\":[1540],\"selected\":[1540],\"highlighted\":[1540],\"value\":[8],\"chipColor\":[1,\"chip-color\"],\"chipBackgroundColor\":[1,\"chip-background-color\"],\"multiple\":[1540]},[[1,\"mouseup\",\"onMouseUp\"],[0,\"keydown\",\"handleKeydown\"]]],[1,\"wcs-select\",{\"size\":[513],\"value\":[1032],\"placeholder\":[1537],\"disabled\":[1540],\"required\":[4],\"multiple\":[516],\"autocomplete\":[516],\"serverMode\":[516,\"server-mode\"],\"filterFn\":[16],\"chips\":[516],\"name\":[1],\"compareWith\":[16],\"expanded\":[32],\"displayText\":[32],\"focused\":[32],\"showNoResultFoundLabel\":[32],\"autocompleteValue\":[32],\"overlayDirection\":[32],\"open\":[64],\"close\":[64],\"setAriaAttribute\":[64]},[[1,\"mouseup\",\"onMouseUp\"],[8,\"click\",\"onWindowClickEvent\"],[0,\"keydown\",\"onKeyDown\"],[0,\"wcsSelectOptionClick\",\"selectedOptionChanged\"],[0,\"focus\",\"onFocus\"],[2,\"blur\",\"onBlur\"]],{\"value\":[\"onValueChangeHandler\"]}]]],[\"wcs-error_3\",[[1,\"wcs-error\"],[1,\"wcs-form-field\",{\"isError\":[1540,\"is-error\"],\"hasPrefix\":[32],\"hasSuffix\":[32],\"spiedElement\":[32]},null,{\"isError\":[\"isErrorChange\"]}],[1,\"wcs-label\",{\"required\":[516],\"setAriaAttribute\":[64]}]]],[\"wcs-checkbox\",[[17,\"wcs-checkbox\",{\"name\":[1],\"indeterminate\":[1540],\"checked\":[1540],\"labelAlignment\":[1537,\"label-alignment\"],\"disabled\":[516],\"setAriaAttribute\":[64],\"getLabel\":[64]},[[0,\"click\",\"handleHostClick\"]]]]],[\"wcs-mat-icon\",[[1,\"wcs-mat-icon\",{\"icon\":[1],\"size\":[1],\"family\":[1],\"setAriaAttribute\":[64]}]]],[\"wcs-button_2\",[[17,\"wcs-button\",{\"type\":[1025],\"href\":[1],\"target\":[1],\"disabled\":[516],\"ripple\":[4],\"size\":[513],\"shape\":[513],\"mode\":[513],\"loading\":[1540],\"setAriaAttribute\":[64]},[[0,\"click\",\"onClick\"]],{\"ripple\":[\"onRippleChange\"]}],[1,\"wcs-spinner\",{\"mode\":[513]}]]]]"), options);
|
|
8
|
+
return bootstrapLazy(JSON.parse("[[\"wcs-editable-field\",[[1,\"wcs-editable-field\",{\"type\":[1],\"label\":[1],\"readonly\":[516],\"value\":[1032],\"validateFn\":[16],\"formatFn\":[16],\"errorMsg\":[1,\"error-msg\"],\"size\":[513],\"currentState\":[32],\"isError\":[32]},[[8,\"click\",\"onWindowClickEvent\"]],{\"value\":[\"onValueChange\"]}]]],[\"wcs-grid-pagination\",[[1,\"wcs-grid-pagination\",{\"availablePageSizes\":[16],\"currentPage\":[1026,\"current-page\"],\"pageSize\":[2,\"page-size\"],\"itemsCount\":[2,\"items-count\"],\"pageCount\":[2,\"page-count\"],\"setAriaAttribute\":[64]}]]],[\"wcs-alert-drawer\",[[1,\"wcs-alert-drawer\",{\"position\":[513],\"timeout\":[2],\"showProgressBar\":[4,\"show-progress-bar\"],\"show\":[64]}]]],[\"wcs-horizontal-stepper\",[[1,\"wcs-horizontal-stepper\",{\"currentStep\":[1026,\"current-step\"],\"steps\":[16],\"mode\":[1],\"checkOnComplete\":[516,\"check-on-complete\"],\"internalCurrentStepIndex\":[32],\"previous\":[64],\"next\":[64]},null,{\"currentStep\":[\"onCurrentStepChange\"]}]]],[\"wcs-breadcrumb\",[[1,\"wcs-breadcrumb\",{\"maxItems\":[2,\"max-items\"],\"itemsBeforeCollapse\":[2,\"items-before-collapse\"],\"itemsAfterCollapse\":[2,\"items-after-collapse\"],\"ariaLabelExpandButton\":[1,\"aria-label-expand-button\"],\"showHiddenItems\":[32],\"setAriaAttribute\":[64]},null,{\"maxItems\":[\"handleCollapsePropsChange\"],\"itemsBeforeCollapse\":[\"handleCollapsePropsChange\"],\"itemsAfterCollapse\":[\"handleCollapsePropsChange\"],\"ariaLabelExpandButton\":[\"handleAriaLabelExpandBtnChange\"]}]]],[\"wcs-counter\",[[17,\"wcs-counter\",{\"size\":[513],\"label\":[1],\"disabled\":[516],\"min\":[1026],\"max\":[1026],\"step\":[1026],\"value\":[1026],\"displayedValue\":[32],\"setAriaAttribute\":[64]},null,{\"value\":[\"valueChange\"]}]]],[\"wcs-grid\",[[1,\"wcs-grid\",{\"serverMode\":[516,\"server-mode\"],\"data\":[16],\"loading\":[516],\"selectionConfig\":[1,\"selection-config\"],\"selectedItems\":[8,\"selected-items\"],\"wcsGridPaginationId\":[1,\"wcs-grid-pagination-id\"],\"rowIdPath\":[1,\"row-id-path\"],\"rowCssPartsFn\":[16],\"columns\":[32],\"paginationEl\":[32],\"rows\":[32],\"cursorPosition\":[32],\"focusFirstCell\":[64],\"setAriaAttribute\":[64]},[[0,\"focus\",\"onFocus\"],[0,\"blur\",\"onBlur\"],[0,\"wcsHiddenChange\",\"onHiddenColumnChange\"],[0,\"keydown\",\"onKeyDown\"],[1,\"mousedown\",\"onClick\"],[0,\"wcsSortChange\",\"sortChangeEventHandler\"],[0,\"wcsGridPaginationChange\",\"paginationChangeEventHandler\"],[8,\"wcsGridPaginationChange\",\"paginationChangeEventHandlerOutside\"]],{\"cursorPosition\":[\"onCursorPositionChange\"],\"data\":[\"onDataChange\"],\"selectedItems\":[\"onSelectedItemsPropertyChange\"]}]]],[\"wcs-modal\",[[4,\"wcs-modal\",{\"withoutBackdrop\":[516,\"without-backdrop\"],\"show\":[1540],\"showCloseButton\":[516,\"show-close-button\"],\"closeButtonAriaLabel\":[1,\"close-button-aria-label\"],\"size\":[1],\"hideActions\":[516,\"hide-actions\"],\"modalTriggerControlsId\":[1,\"modal-trigger-controls-id\"],\"initialFocusElementId\":[1,\"initial-focus-element-id\"],\"disableAutoFocus\":[516,\"disable-auto-focus\"],\"setAriaAttribute\":[64]},[[4,\"keydown\",\"onKeyDown\"]],{\"show\":[\"onShowChange\"]}]]],[\"wcs-dropdown\",[[17,\"wcs-dropdown\",{\"noArrow\":[516,\"no-arrow\"],\"mode\":[1],\"shape\":[1],\"size\":[1],\"disabled\":[516],\"placement\":[1],\"expanded\":[32],\"setAriaAttribute\":[64]},[[0,\"blur\",\"onBlur\"],[8,\"click\",\"onWindowClickEvent\"],[0,\"wcsDropdownItemClick\",\"dropdownItemClick\"],[0,\"keydown\",\"onKeyDown\"]],{\"placement\":[\"placementChange\"]}]]],[\"wcs-galactic-menu\",[[1,\"wcs-galactic-menu\",{\"text\":[1],\"showPopoverMenu\":[32],\"setAriaAttribute\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-input\",[[17,\"wcs-input\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"accept\":[1],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"debounce\":[2],\"prefixLabel\":[1,\"prefix-label\"],\"suffixLabel\":[1,\"suffix-label\"],\"disabled\":[516],\"enterkeyhint\":[1],\"size\":[513],\"icon\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"multiple\":[516],\"name\":[1],\"hidePasswordButtonAriaLabel\":[1,\"hide-password-button-aria-label\"],\"showPasswordButtonAriaLabel\":[1,\"show-password-button-aria-label\"],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[516],\"required\":[516],\"spellcheck\":[4],\"state\":[513],\"step\":[1],\"type\":[1],\"value\":[1032],\"passwordReveal\":[32],\"setBlur\":[64],\"getInputElement\":[64],\"setAriaAttribute\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"passwordReveal\":[\"onPasswordRevealChange\"]}]]],[\"wcs-textarea\",[[17,\"wcs-textarea\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"autocapitalize\":[1],\"autofocus\":[4],\"debounce\":[2],\"disabled\":[516],\"icon\":[1],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"readonly\":[516],\"required\":[516],\"spellcheck\":[4],\"state\":[513],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"autoGrow\":[516,\"auto-grow\"],\"value\":[1025],\"resize\":[513],\"setAriaAttribute\":[64],\"fitContent\":[64],\"setBlur\":[64],\"getInputElement\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}]]],[\"wcs-accordion\",[[1,\"wcs-accordion\",{\"hideActionText\":[516,\"hide-action-text\"],\"highlight\":[516],\"groupContentWithHeader\":[516,\"group-content-with-header\"]},[[0,\"wcsOpenChange\",\"wcsOpenChangeHandler\"]],{\"hideActionText\":[\"updateHideActiontextOnPanel\"],\"highlight\":[\"updateHighlightOnPanel\"],\"groupContentWithHeader\":[\"updateGroupContentWithHeader\"]}]]],[\"wcs-accordion-content\",[[1,\"wcs-accordion-content\"]]],[\"wcs-accordion-header\",[[1,\"wcs-accordion-header\"]]],[\"wcs-accordion-panel\",[[1,\"wcs-accordion-panel\",{\"open\":[1540],\"hideActionText\":[516,\"hide-action-text\"],\"highlight\":[516],\"groupContentWithHeader\":[516,\"group-content-with-header\"],\"setAriaAttribute\":[64],\"close\":[64]},null,{\"open\":[\"openChange\"]}]]],[\"wcs-action-bar\",[[1,\"wcs-action-bar\",{\"gutter\":[516],\"hasTabs\":[32]}]]],[\"wcs-app\",[[1,\"wcs-app\"]]],[\"wcs-badge\",[[1,\"wcs-badge\",{\"shape\":[1],\"color\":[1],\"size\":[513]}]]],[\"wcs-breadcrumb-item\",[[1,\"wcs-breadcrumb-item\",{\"last\":[4]}]]],[\"wcs-card\",[[1,\"wcs-card\",{\"mode\":[1537],\"orientation\":[513]},null,{\"orientation\":[\"orientationChanged\"]}]]],[\"wcs-card-body\",[[1,\"wcs-card-body\",{\"orientation\":[32],\"setOrientation\":[64]}]]],[\"wcs-card-content\",[[1,\"wcs-card-content\"]]],[\"wcs-card-footer\",[[1,\"wcs-card-footer\"]]],[\"wcs-card-header\",[[1,\"wcs-card-header\"]]],[\"wcs-card-media\",[[1,\"wcs-card-media\",{\"orientation\":[32],\"setOrientation\":[64]}]]],[\"wcs-com-nav\",[[1,\"wcs-com-nav\",{\"appName\":[1,\"app-name\"],\"mobileMenuOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64]},[[0,\"wcsClickOnFinalAction\",\"onClickOnFinalAction\"],[8,\"keydown\",\"exitMobileMenuOnKeyDown\"]]]]],[\"wcs-com-nav-category\",[[1,\"wcs-com-nav-category\",{\"label\":[1],\"categoryOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64],\"close\":[64],\"open\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[8,\"wcsCategoryOpened\",\"onSubmenuOpened\"]]]]],[\"wcs-com-nav-item\",[[1,\"wcs-com-nav-item\",null,[[0,\"click\",\"onClick\"]]]]],[\"wcs-com-nav-submenu\",[[1,\"wcs-com-nav-submenu\",{\"label\":[1],\"panelTitle\":[1,\"panel-title\"],\"panelDescription\":[1,\"panel-description\"],\"menuOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64],\"close\":[64],\"open\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[8,\"wcsSubmenuOpened\",\"onSubmenuOpened\"],[8,\"keydown\",\"onEscapeKeyDown\"],[0,\"wcsClickOnFinalAction\",\"wcsCategoryItemClickedHandler\"]]]]],[\"wcs-divider\",[[1,\"wcs-divider\"]]],[\"wcs-dropdown-divider\",[[1,\"wcs-dropdown-divider\"]]],[\"wcs-dropdown-header\",[[1,\"wcs-dropdown-header\"]]],[\"wcs-dropdown-item\",[[4,\"wcs-dropdown-item\",null,[[1,\"mouseup\",\"onMouseUp\"],[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-field\",[[1,\"wcs-field\"]]],[\"wcs-field-content\",[[1,\"wcs-field-content\"]]],[\"wcs-field-label\",[[1,\"wcs-field-label\"]]],[\"wcs-footer\",[[1,\"wcs-footer\"]]],[\"wcs-galactic\",[[1,\"wcs-galactic\",{\"text\":[1],\"show\":[32]}]]],[\"wcs-grid-column\",[[1,\"wcs-grid-column\",{\"path\":[1],\"name\":[1],\"sort\":[516],\"sortFn\":[16],\"formatter\":[16],\"sortOrder\":[1025,\"sort-order\"],\"width\":[1],\"customCells\":[516,\"custom-cells\"],\"hidden\":[516],\"cursorPosition\":[16],\"columnPosition\":[2,\"column-position\"],\"setAriaAttribute\":[64]},null,{\"hidden\":[\"parseMyObjectProp\"],\"sortOrder\":[\"sortOrderChange\"]}]]],[\"wcs-grid-custom-cell\",[[1,\"wcs-grid-custom-cell\",{\"columnId\":[1,\"column-id\"],\"rowId\":[8,\"row-id\"]}]]],[\"wcs-header\",[[1,\"wcs-header\",{\"setAriaAttribute\":[64]}]]],[\"wcs-hint\",[[1,\"wcs-hint\",{\"small\":[1540]}]]],[\"wcs-icon\",[[0,\"wcs-icon\",{\"icon\":[1],\"size\":[1],\"setAriaAttribute\":[64]}]]],[\"wcs-list-item\",[[1,\"wcs-list-item\",{\"activated\":[1540]}]]],[\"wcs-list-item-properties\",[[1,\"wcs-list-item-properties\"]]],[\"wcs-list-item-property\",[[1,\"wcs-list-item-property\"]]],[\"wcs-native-select\",[[1,\"wcs-native-select\",{\"size\":[513],\"required\":[516],\"expanded\":[32],\"disabled\":[32],\"setAriaAttribute\":[64],\"updateStyles\":[64]},null,{\"required\":[\"requiredChanged\"]}]]],[\"wcs-nav\",[[1,\"wcs-nav\",{\"setAriaAttribute\":[64]}]]],[\"wcs-nav-item\",[[4,\"wcs-nav-item\",null,[[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-progress-radial\",[[1,\"wcs-progress-radial\",{\"size\":[2],\"showLabel\":[516,\"show-label\"],\"value\":[2],\"setAriaAttribute\":[64]}]]],[\"wcs-radio\",[[17,\"wcs-radio\",{\"value\":[1544],\"label\":[1537],\"disabled\":[1540],\"name\":[1025],\"mode\":[513],\"checked\":[32],\"radioTabIndex\":[32],\"updateState\":[64],\"setTabIndex\":[64],\"setAriaAttribute\":[64]}]]],[\"wcs-radio-group\",[[1,\"wcs-radio-group\",{\"value\":[1032],\"name\":[520],\"mode\":[513],\"setAriaAttribute\":[64]},[[0,\"wcsRadioClick\",\"handleRadioClick\"],[0,\"keydown\",\"handleKeyDown\"]],{\"value\":[\"onValueChangeHandler\"],\"name\":[\"updateAllRadioModeAndName\"],\"mode\":[\"updateAllRadioModeAndName\"]}]]],[\"wcs-skeleton-circle\",[[1,\"wcs-skeleton-circle\",{\"animation\":[513],\"radius\":[514]}]]],[\"wcs-skeleton-rectangle\",[[1,\"wcs-skeleton-rectangle\",{\"animation\":[513],\"rounded\":[516],\"height\":[513],\"width\":[513]}]]],[\"wcs-skeleton-text\",[[1,\"wcs-skeleton-text\",{\"animation\":[513],\"height\":[1]}]]],[\"wcs-switch\",[[17,\"wcs-switch\",{\"name\":[1],\"checked\":[516],\"labelAlignment\":[513,\"label-alignment\"],\"disabled\":[516],\"setAriaAttribute\":[64],\"getLabel\":[64]},[[0,\"click\",\"handleHostClick\"]]]]],[\"wcs-tab\",[[1,\"wcs-tab\",{\"header\":[513],\"itemKey\":[8,\"item-key\"]}]]],[\"wcs-tabs\",[[1,\"wcs-tabs\",{\"align\":[513],\"selectedIndex\":[2,\"selected-index\"],\"selectedKey\":[8,\"selected-key\"],\"headersOnly\":[516,\"headers-only\"],\"gutter\":[516],\"description\":[1],\"mobileOverlayExpanded\":[32],\"mobile\":[32],\"headers\":[32],\"currentActiveTabIndex\":[32],\"setAriaAttribute\":[64]},[[0,\"tabLoaded\",\"onTabLoaded\"],[8,\"click\",\"onWindowClickEvent\"]],{\"selectedIndex\":[\"selectedIndexChanged\"],\"selectedKey\":[\"selectedTabkeyChanged\"],\"mobile\":[\"onMobileChange\"]}]]],[\"wcs-tooltip\",[[1,\"wcs-tooltip\",{\"for\":[1],\"position\":[513],\"interactive\":[516],\"maxWidth\":[8,\"max-width\"],\"delay\":[2],\"duration\":[2],\"trigger\":[1],\"theme\":[1],\"content\":[1],\"appendTo\":[1,\"append-to\"],\"hide\":[64],\"show\":[64],\"disable\":[64],\"enable\":[64]},[[8,\"keydown\",\"handleKeyDown\"]],{\"interactive\":[\"updateProps\"],\"position\":[\"updateProps\"],\"maxWidth\":[\"updateProps\"],\"theme\":[\"updateProps\"],\"delay\":[\"updateProps\"],\"duration\":[\"updateProps\"],\"trigger\":[\"updateProps\"],\"content\":[\"updateTippyContent\"]}]]],[\"wcs-alert\",[[1,\"wcs-alert\",{\"show\":[1540],\"intent\":[513],\"timeout\":[2],\"showProgressBar\":[4,\"show-progress-bar\"]},[[1,\"mouseover\",\"mouseOverHandler\"],[1,\"mouseout\",\"mouseOutHandler\"]]]]],[\"wcs-progress-bar\",[[1,\"wcs-progress-bar\",{\"size\":[1],\"showLabel\":[516,\"show-label\"],\"value\":[2],\"setAriaAttribute\":[64]}]]],[\"wcs-select_2\",[[4,\"wcs-select-option\",{\"disabled\":[1540],\"selected\":[1540],\"highlighted\":[1540],\"value\":[8],\"chipColor\":[1,\"chip-color\"],\"chipBackgroundColor\":[1,\"chip-background-color\"],\"multiple\":[1540]},[[1,\"mouseup\",\"onMouseUp\"],[0,\"keydown\",\"handleKeydown\"]]],[1,\"wcs-select\",{\"size\":[513],\"value\":[1032],\"placeholder\":[1537],\"disabled\":[1540],\"required\":[516],\"multiple\":[516],\"autocomplete\":[516],\"serverMode\":[516,\"server-mode\"],\"filterFn\":[16],\"chips\":[516],\"name\":[1],\"compareWith\":[16],\"expanded\":[32],\"displayText\":[32],\"focused\":[32],\"showNoResultFoundLabel\":[32],\"autocompleteValue\":[32],\"overlayDirection\":[32],\"open\":[64],\"close\":[64],\"setAriaAttribute\":[64]},[[1,\"mouseup\",\"onMouseUp\"],[8,\"click\",\"onWindowClickEvent\"],[0,\"keydown\",\"onKeyDown\"],[0,\"wcsSelectOptionClick\",\"selectedOptionChanged\"],[0,\"focus\",\"onFocus\"],[2,\"blur\",\"onBlur\"]],{\"value\":[\"onValueChangeHandler\"]}]]],[\"wcs-error_3\",[[1,\"wcs-error\"],[1,\"wcs-form-field\",{\"isError\":[1540,\"is-error\"],\"hasPrefix\":[32],\"hasSuffix\":[32],\"spiedElement\":[32]},null,{\"isError\":[\"isErrorChange\"]}],[1,\"wcs-label\",{\"required\":[516],\"setAriaAttribute\":[64]}]]],[\"wcs-checkbox\",[[17,\"wcs-checkbox\",{\"name\":[1],\"indeterminate\":[1540],\"checked\":[1540],\"labelAlignment\":[1537,\"label-alignment\"],\"disabled\":[516],\"setAriaAttribute\":[64],\"getLabel\":[64]},[[0,\"click\",\"handleHostClick\"]]]]],[\"wcs-mat-icon\",[[1,\"wcs-mat-icon\",{\"icon\":[1],\"size\":[1],\"family\":[1],\"setAriaAttribute\":[64]}]]],[\"wcs-button_2\",[[17,\"wcs-button\",{\"type\":[1025],\"href\":[1],\"target\":[1],\"disabled\":[516],\"ripple\":[4],\"size\":[513],\"shape\":[513],\"mode\":[513],\"loading\":[1540],\"setAriaAttribute\":[64]},[[0,\"click\",\"onClick\"]],{\"ripple\":[\"onRippleChange\"]}],[1,\"wcs-spinner\",{\"mode\":[513]}]]]]"), options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -29,7 +29,7 @@ const AccordionPanel = class {
|
|
|
29
29
|
this.open = false;
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: '72253126a8cf58f763fd07bff54c0cf2c446afdc' }, h("button", Object.assign({ key: '97b70c995180acbd0fcfc97a43ea9208fdc464ff', "aria-expanded": this.open ? "true" : "false", "aria-controls": "content", class: "header", ref: (el) => this.nativeButton = el, onClick: () => this.open = !this.open }, this.inheritedAttributes), h("slot", { key: '1b2d8ad5d8ee9a30f5e3d90aad3888f2061cfab8', name: "header" }), h("span", { key: '27867e5c690c771735f63115661e2e4949aac3f3', class: "header-action" }, !this.hideActionText && (h("span", { key: '3ca56e1a94f8366117bb3cdeabeab8ee6ead8da8' }, this.open ? 'Fermez' : 'Ouvrez')), h(SelectArrow, { key: 'eddb7be148606307d13b785aae423b72410495c3', up: this.open }))), h("div", { key: '2be057b4461c0c969fd4285509dab6514487edb6', class: "content", id: "content" }, h("slot", { key: '5be6f3677c52dde4f2f64058d1a378e455da3d27', name: "content" }))));
|
|
33
33
|
}
|
|
34
34
|
get el() { return getElement(this); }
|
|
35
35
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"wcs-accordion-panel.entry.js","mappings":";;;;AAAA,MAAM,iBAAiB,GAAG,khJAAkhJ,CAAC;AAC7iJ,gCAAe,iBAAiB;;ACehC,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;MAqC3C,cAAc;;;;QAGf,wBAAmB,GAAyB,EAAE,CAAC;oBAEV,KAAK;8BAMD,KAAK;yBAOV,KAAK;sCAOQ,KAAK;;IAK9D,UAAU,CAAC,QAAiB;QACxB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACrC;IAED,iBAAiB;QACb,IAAI,CAAC,mBAAmB,mCACjB,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,GAC9B,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,yBAAyB,CAAC,CAC3D,CAAC;KACL;IAGD,MAAM,gBAAgB,CAAC,IAAuB,EAAE,KAAgC;QAC5E,oBAAoB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;KACxD;IAGD,MAAM,KAAK;QACP,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KACrB;IAED,MAAM;QAIF,QACI,EAAC,IAAI,uDACD,8FAAuB,IAAI,CAAC,IAAI,GAAG,MAAM,GAAE,OAAO,mBAC5B,SAAS,EACvB,KAAK,EAAC,QAAQ,EACd,GAAG,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,YAAY,GAAG,EAAE,EACnC,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IACjC,IAAI,CAAC,mBAAmB,GAChC,6DAAM,IAAI,EAAC,QAAQ,GAAE,EACrB,6DAAM,KAAK,EAAC,eAAe,IACtB,CAAC,IAAI,CAAC,cAAc,KACjB,+DAAO,IAAI,CAAC,IAAI,GAAG,QAAQ,GAAG,QAAQ,CAAQ,CAAC,EAEnD,EAAC,WAAW,qDAAC,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,CAC1B,CACF,EACT,4DAAK,KAAK,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,IAC7B,6DAAM,IAAI,EAAC,SAAS,GAAE,CACpB,CACH,EACT;KACL;;;;;;;;;;","names":[],"sources":["src/components/accordion-panel/accordion-panel.scss?tag=wcs-accordion-panel&encapsulation=shadow","src/components/accordion-panel/accordion-panel.tsx"],"sourcesContent":["@mixin accordion-panel-focus {\n outline: var(--wcs-accordion-panel-border-width-focus) var(--wcs-accordion-panel-border-style-focus) var(--wcs-accordion-panel-border-color-focus);\n}\n\n:host {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n\n --wcs-accordion-panel-color-default: var(--wcs-semantic-color-text-primary);\n --wcs-accordion-panel-color-highlight: var(--wcs-semantic-color-text-primary);\n --wcs-accordion-panel-color-hover: var(--wcs-semantic-color-text-primary);\n --wcs-accordion-panel-color-press: var(--wcs-semantic-color-text-primary);\n --wcs-accordion-panel-action-color-default: var(--wcs-semantic-color-foreground-action-secondary-default);\n --wcs-accordion-panel-action-color-highlight: var(--wcs-semantic-color-foreground-action-secondary-press);\n --wcs-accordion-panel-action-color-hover: var(--wcs-semantic-color-foreground-action-secondary-hover);\n --wcs-accordion-panel-action-color-press: var(--wcs-semantic-color-foreground-action-secondary-press);\n --wcs-accordion-panel-background-color-default: var(--wcs-semantic-color-background-action-secondary-default);\n --wcs-accordion-panel-background-color-highlight: var(--wcs-semantic-color-background-action-secondary-press);\n --wcs-accordion-panel-background-color-hover: var(--wcs-semantic-color-background-action-secondary-hover);\n --wcs-accordion-panel-background-color-press: var(--wcs-semantic-color-background-action-secondary-press);\n\n --wcs-accordion-panel-header-font-weight: var(--wcs-semantic-font-weight-medium);\n --wcs-accordion-panel-header-font-size: var(--wcs-semantic-font-size-heading-6);\n --wcs-accordion-panel-header-gap: calc(3 * var(--wcs-semantic-spacing-base));\n --wcs-accordion-panel-border-radius: var(--wcs-semantic-border-radius-base);\n --wcs-accordion-panel-border-radius-open: var(--wcs-accordion-panel-border-radius) var(--wcs-accordion-panel-border-radius) 0 0;\n --wcs-accordion-panel-padding-vertical: var(--wcs-semantic-spacing-large);\n --wcs-accordion-panel-padding-horizontal: calc(var(--wcs-semantic-spacing-base) * 3);\n\n --wcs-accordion-panel-header-border-width: var(--wcs-semantic-border-width-default);\n --wcs-accordion-panel-border-width: var(--wcs-semantic-border-width-default);\n --wcs-accordion-panel-border-width-focus: var(--wcs-semantic-border-width-large);\n --wcs-accordion-panel-border-color: var(--wcs-semantic-color-border-secondary);\n\n --wcs-accordion-panel-border-color-focus: var(--wcs-semantic-color-border-focus-base);\n --wcs-accordion-panel-border-style-focus: var(--wcs-semantic-border-style-focus-base);\n\n --wcs-accordion-transition-duration: var(--wcs-semantic-motion-duration-feedback-base);\n\n border: var(--wcs-accordion-panel-border-width) solid var(--wcs-accordion-panel-border-color);\n border-radius: var(--wcs-accordion-panel-border-radius);\n\n .header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wcs-accordion-panel-header-gap);\n padding: var(--wcs-accordion-panel-padding-vertical) var(--wcs-accordion-panel-padding-horizontal);\n border-radius: var(--wcs-accordion-panel-border-radius);\n font-weight: var(--wcs-accordion-panel-header-font-weight);\n // TODO replace px to rem\n font-size: var(--wcs-accordion-panel-header-font-size);\n font-family: var(--wcs-font-sans-serif);\n color: var(--wcs-accordion-panel-color-default);\n background-color: var(--wcs-accordion-panel-background-color-default);\n border: none;\n\n transition: background-color var(--wcs-accordion-transition-duration);\n\n @media (forced-colors: active) {\n // for WHCM\n border: var(--wcs-accordion-panel-header-border-width) solid ButtonBorder;\n }\n &:focus-visible {\n @include accordion-panel-focus;\n }\n\n &:hover {\n cursor: pointer;\n\n color: var(--wcs-accordion-panel-color-hover);\n background-color: var(--wcs-accordion-panel-background-color-hover);\n\n .header-action {\n color: var(--wcs-accordion-panel-action-color-hover);\n\n .arrow {\n fill: var(--wcs-accordion-panel-action-color-hover);\n }\n }\n }\n\n &:active {\n background-color: var(--wcs-accordion-panel-background-color-press);\n }\n }\n\n .header-action {\n display: flex;\n align-items: center;\n user-select: none;\n\n color: var(--wcs-accordion-panel-action-color-default);\n\n .arrow {\n fill: var(--wcs-accordion-panel-action-color-default);\n }\n }\n\n .content {\n display: none;\n }\n\n}\n\n:host([open]) {\n margin-bottom: 0;\n\n .header {\n border-radius: var(--wcs-accordion-panel-border-radius-open);\n }\n\n .content {\n display: block;\n }\n\n\n /* FIXME GroupContentWithHeader is deprecated. Remove this.\n &:host([group-content-with-header]) {\n .header {\n border-radius: var(--wcs-accordion-panel-border-radius-open);\n padding-bottom: 0;\n }\n\n .content {\n border-radius: 0 0 var(--wcs-accordion-panel-border-radius) var(--wcs-accordion-panel-border-radius);\n margin-bottom: var(--wcs-);\n background-color: var(--wcs-accordion-panel-background-color-default);\n }\n }\n */\n\n &:host([highlight]) {\n .header {\n background-color: var(--wcs-accordion-panel-background-color-highlight);\n color: var(--wcs-accordion-panel-color-highlight);\n }\n\n .header-action {\n color: var(--wcs-accordion-panel-action-color-highlight);\n\n .arrow {\n fill: var(--wcs-accordion-panel-action-color-highlight);\n }\n }\n\n /* FIXME GroupContentWithHeader is deprecated. Remove this.\n &:host([group-content-with-header]) {\n .content {\n background-color: var(--wcs-accordion-panel-background-color-highlight);\n color: var(--wcs-accordion-panel-color-highlight);\n }\n }\n */\n }\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n Watch\n} from '@stencil/core';\nimport { SelectArrow } from '../select/select-arrow';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from \"../../utils/helpers\";\n\nconst ACCORDION_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The accordion-panel is a subcomponent of `wcs-accordion`. It represents every panel of the accordion that can be expanded.\n * \n *\n * @cssprop --wcs-accordion-panel-color-default - Default color of the accordion panel\n * @cssprop --wcs-accordion-panel-color-highlight - Highlight color of the accordion panel\n * @cssprop --wcs-accordion-panel-color-hover - Hover color of the accordion panel\n * @cssprop --wcs-accordion-panel-color-press - Press color of the accordion panel\n * @cssprop --wcs-accordion-panel-action-color-default - Default action color of the accordion panel\n * @cssprop --wcs-accordion-panel-action-color-highlight - Highlight action color of the accordion panel\n * @cssprop --wcs-accordion-panel-action-color-hover - Hovered action color of the accordion panel\n * @cssprop --wcs-accordion-panel-action-color-press - Pressed action color of the accordion panel\n * @cssprop --wcs-accordion-panel-background-color-default - Default background color of the accordion panel\n * @cssprop --wcs-accordion-panel-background-color-highlight - Highlight background color of the accordion panel\n * @cssprop --wcs-accordion-panel-background-color-hover - Hover background color of the accordion panel\n * @cssprop --wcs-accordion-panel-background-color-press - Press background color of the accordion panel\n * @cssprop --wcs-accordion-panel-header-font-size - Font size of the accordion panel header\n * @cssprop --wcs-accordion-panel-header-font-weight - Font weight of the accordion panel header\n * @cssprop --wcs-accordion-panel-border-radius - Border radius of the accordion panel\n * @cssprop --wcs-accordion-panel-border-radius-open - Border radius of the open accordion panel\n * @cssprop --wcs-accordion-panel-padding-vertical - Vertical padding of the accordion panel\n * @cssprop --wcs-accordion-panel-padding-horizontal - Horizontal padding of the accordion panel\n * @cssprop --wcs-accordion-panel-header-border-width - Border width of the accordion panel header\n * @cssprop --wcs-accordion-panel-border-width - Border width of the accordion panel\n * @cssprop --wcs-accordion-panel-border-width-focus - Border width of the accordion panel when focused\n * @cssprop --wcs-accordion-panel-border-color - Border color of the accordion panel\n * @cssprop --wcs-accordion-panel-border-color-focus - Border color of the accordion panel when focused\n * @cssprop --wcs-accordion-panel-border-style-focus - Border style of the accordion panel when focused\n * @cssprop --wcs-accordion-transition-duration - Transition duration of the accordion panel\n */\n@Component({\n tag: 'wcs-accordion-panel',\n styleUrl: 'accordion-panel.scss',\n shadow: true\n})\nexport class AccordionPanel implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeButton?: HTMLButtonElement;\n private inheritedAttributes: { [k: string]: any } = {};\n \n @Prop({reflect: true, mutable: true}) open = false;\n\n /**\n * Specifies whether the component should display the open/close text.\n * if false, it won't show the open/close text.\n */\n @Prop({reflect: true}) hideActionText: boolean = false;\n\n /**\n * Specifies whether the component should highlight when open with primary color.\n * if true, the background color will be the primary color.\n * if false, the background color will be wcs-light.\n */\n @Prop({reflect: true}) highlight: boolean = false;\n\n /**\n * Specifies wether the component should group the content with header in one card\n * if true, there will be only one card with the header and the content\n * Nothing change when the panel is close\n */\n @Prop({reflect: true}) groupContentWithHeader: boolean = false;\n\n @Event() wcsOpenChange!: EventEmitter<boolean>;\n\n @Watch('open')\n openChange(newValue: boolean) {\n this.wcsOpenChange.emit(newValue);\n }\n\n componentWillLoad(): Promise<void> | void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, ACCORDION_INHERITED_ATTRS),\n };\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeButton, attr, value);\n }\n\n @Method()\n async close() {\n this.open = false;\n }\n\n render() {\n \n \n \n return (\n <Host>\n <button aria-expanded={this.open ? \"true\": \"false\"}\n aria-controls=\"content\"\n class=\"header\"\n ref={(el) => this.nativeButton = el}\n onClick={() => this.open = !this.open}\n {...this.inheritedAttributes}>\n <slot name=\"header\"/>\n <span class=\"header-action\">\n {!this.hideActionText && (\n <span>{this.open ? 'Fermez' : 'Ouvrez'}</span>)\n }\n <SelectArrow up={this.open}/>\n </span>\n </button>\n <div class=\"content\" id=\"content\">\n <slot name=\"content\"/>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"wcs-accordion-panel.entry.js","mappings":";;;;AAAA,MAAM,iBAAiB,GAAG,khJAAkhJ,CAAC;AAC7iJ,gCAAe,iBAAiB;;ACehC,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;MAqC3C,cAAc;;;;QAGf,wBAAmB,GAAyB,EAAE,CAAC;oBAED,KAAK;8BAMV,KAAK;yBAOV,KAAK;sCAOQ,KAAK;;IAK9D,UAAU,CAAC,QAAiB;QACxB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACrC;IAED,iBAAiB;QACb,IAAI,CAAC,mBAAmB,mCACjB,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,GAC9B,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,yBAAyB,CAAC,CAC3D,CAAC;KACL;IAGD,MAAM,gBAAgB,CAAC,IAAuB,EAAE,KAAgC;QAC5E,oBAAoB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;KACxD;IAGD,MAAM,KAAK;QACP,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KACrB;IAED,MAAM;QAIF,QACI,EAAC,IAAI,uDACD,8FAAuB,IAAI,CAAC,IAAI,GAAG,MAAM,GAAE,OAAO,mBAC5B,SAAS,EACvB,KAAK,EAAC,QAAQ,EACd,GAAG,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,YAAY,GAAG,EAAE,EACnC,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IACjC,IAAI,CAAC,mBAAmB,GAChC,6DAAM,IAAI,EAAC,QAAQ,GAAE,EACrB,6DAAM,KAAK,EAAC,eAAe,IACtB,CAAC,IAAI,CAAC,cAAc,KACjB,+DAAO,IAAI,CAAC,IAAI,GAAG,QAAQ,GAAG,QAAQ,CAAQ,CAAC,EAEnD,EAAC,WAAW,qDAAC,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,CAC1B,CACF,EACT,4DAAK,KAAK,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,IAC7B,6DAAM,IAAI,EAAC,SAAS,GAAE,CACpB,CACH,EACT;KACL;;;;;;;;;;","names":[],"sources":["src/components/accordion-panel/accordion-panel.scss?tag=wcs-accordion-panel&encapsulation=shadow","src/components/accordion-panel/accordion-panel.tsx"],"sourcesContent":["@mixin accordion-panel-focus {\n outline: var(--wcs-accordion-panel-border-width-focus) var(--wcs-accordion-panel-border-style-focus) var(--wcs-accordion-panel-border-color-focus);\n}\n\n:host {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n\n --wcs-accordion-panel-color-default: var(--wcs-semantic-color-text-primary);\n --wcs-accordion-panel-color-highlight: var(--wcs-semantic-color-text-primary);\n --wcs-accordion-panel-color-hover: var(--wcs-semantic-color-text-primary);\n --wcs-accordion-panel-color-press: var(--wcs-semantic-color-text-primary);\n --wcs-accordion-panel-action-color-default: var(--wcs-semantic-color-foreground-action-secondary-default);\n --wcs-accordion-panel-action-color-highlight: var(--wcs-semantic-color-foreground-action-secondary-press);\n --wcs-accordion-panel-action-color-hover: var(--wcs-semantic-color-foreground-action-secondary-hover);\n --wcs-accordion-panel-action-color-press: var(--wcs-semantic-color-foreground-action-secondary-press);\n --wcs-accordion-panel-background-color-default: var(--wcs-semantic-color-background-action-secondary-default);\n --wcs-accordion-panel-background-color-highlight: var(--wcs-semantic-color-background-action-secondary-press);\n --wcs-accordion-panel-background-color-hover: var(--wcs-semantic-color-background-action-secondary-hover);\n --wcs-accordion-panel-background-color-press: var(--wcs-semantic-color-background-action-secondary-press);\n\n --wcs-accordion-panel-header-font-weight: var(--wcs-semantic-font-weight-medium);\n --wcs-accordion-panel-header-font-size: var(--wcs-semantic-font-size-heading-6);\n --wcs-accordion-panel-header-gap: calc(3 * var(--wcs-semantic-spacing-base));\n --wcs-accordion-panel-border-radius: var(--wcs-semantic-border-radius-base);\n --wcs-accordion-panel-border-radius-open: var(--wcs-accordion-panel-border-radius) var(--wcs-accordion-panel-border-radius) 0 0;\n --wcs-accordion-panel-padding-vertical: var(--wcs-semantic-spacing-large);\n --wcs-accordion-panel-padding-horizontal: calc(var(--wcs-semantic-spacing-base) * 3);\n\n --wcs-accordion-panel-header-border-width: var(--wcs-semantic-border-width-default);\n --wcs-accordion-panel-border-width: var(--wcs-semantic-border-width-default);\n --wcs-accordion-panel-border-width-focus: var(--wcs-semantic-border-width-large);\n --wcs-accordion-panel-border-color: var(--wcs-semantic-color-border-secondary);\n\n --wcs-accordion-panel-border-color-focus: var(--wcs-semantic-color-border-focus-base);\n --wcs-accordion-panel-border-style-focus: var(--wcs-semantic-border-style-focus-base);\n\n --wcs-accordion-transition-duration: var(--wcs-semantic-motion-duration-feedback-base);\n\n border: var(--wcs-accordion-panel-border-width) solid var(--wcs-accordion-panel-border-color);\n border-radius: var(--wcs-accordion-panel-border-radius);\n\n .header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wcs-accordion-panel-header-gap);\n padding: var(--wcs-accordion-panel-padding-vertical) var(--wcs-accordion-panel-padding-horizontal);\n border-radius: var(--wcs-accordion-panel-border-radius);\n font-weight: var(--wcs-accordion-panel-header-font-weight);\n // TODO replace px to rem\n font-size: var(--wcs-accordion-panel-header-font-size);\n font-family: var(--wcs-font-sans-serif);\n color: var(--wcs-accordion-panel-color-default);\n background-color: var(--wcs-accordion-panel-background-color-default);\n border: none;\n\n transition: background-color var(--wcs-accordion-transition-duration);\n\n @media (forced-colors: active) {\n // for WHCM\n border: var(--wcs-accordion-panel-header-border-width) solid ButtonBorder;\n }\n &:focus-visible {\n @include accordion-panel-focus;\n }\n\n &:hover {\n cursor: pointer;\n\n color: var(--wcs-accordion-panel-color-hover);\n background-color: var(--wcs-accordion-panel-background-color-hover);\n\n .header-action {\n color: var(--wcs-accordion-panel-action-color-hover);\n\n .arrow {\n fill: var(--wcs-accordion-panel-action-color-hover);\n }\n }\n }\n\n &:active {\n background-color: var(--wcs-accordion-panel-background-color-press);\n }\n }\n\n .header-action {\n display: flex;\n align-items: center;\n user-select: none;\n\n color: var(--wcs-accordion-panel-action-color-default);\n\n .arrow {\n fill: var(--wcs-accordion-panel-action-color-default);\n }\n }\n\n .content {\n display: none;\n }\n\n}\n\n:host([open]) {\n margin-bottom: 0;\n\n .header {\n border-radius: var(--wcs-accordion-panel-border-radius-open);\n }\n\n .content {\n display: block;\n }\n\n\n /* FIXME GroupContentWithHeader is deprecated. Remove this.\n &:host([group-content-with-header]) {\n .header {\n border-radius: var(--wcs-accordion-panel-border-radius-open);\n padding-bottom: 0;\n }\n\n .content {\n border-radius: 0 0 var(--wcs-accordion-panel-border-radius) var(--wcs-accordion-panel-border-radius);\n margin-bottom: var(--wcs-);\n background-color: var(--wcs-accordion-panel-background-color-default);\n }\n }\n */\n\n &:host([highlight]) {\n .header {\n background-color: var(--wcs-accordion-panel-background-color-highlight);\n color: var(--wcs-accordion-panel-color-highlight);\n }\n\n .header-action {\n color: var(--wcs-accordion-panel-action-color-highlight);\n\n .arrow {\n fill: var(--wcs-accordion-panel-action-color-highlight);\n }\n }\n\n /* FIXME GroupContentWithHeader is deprecated. Remove this.\n &:host([group-content-with-header]) {\n .content {\n background-color: var(--wcs-accordion-panel-background-color-highlight);\n color: var(--wcs-accordion-panel-color-highlight);\n }\n }\n */\n }\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n Watch\n} from '@stencil/core';\nimport { SelectArrow } from '../select/select-arrow';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from \"../../utils/helpers\";\n\nconst ACCORDION_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The accordion-panel is a subcomponent of `wcs-accordion`. It represents every panel of the accordion that can be expanded.\n * \n *\n * @cssprop --wcs-accordion-panel-color-default - Default color of the accordion panel\n * @cssprop --wcs-accordion-panel-color-highlight - Highlight color of the accordion panel\n * @cssprop --wcs-accordion-panel-color-hover - Hover color of the accordion panel\n * @cssprop --wcs-accordion-panel-color-press - Press color of the accordion panel\n * @cssprop --wcs-accordion-panel-action-color-default - Default action color of the accordion panel\n * @cssprop --wcs-accordion-panel-action-color-highlight - Highlight action color of the accordion panel\n * @cssprop --wcs-accordion-panel-action-color-hover - Hovered action color of the accordion panel\n * @cssprop --wcs-accordion-panel-action-color-press - Pressed action color of the accordion panel\n * @cssprop --wcs-accordion-panel-background-color-default - Default background color of the accordion panel\n * @cssprop --wcs-accordion-panel-background-color-highlight - Highlight background color of the accordion panel\n * @cssprop --wcs-accordion-panel-background-color-hover - Hover background color of the accordion panel\n * @cssprop --wcs-accordion-panel-background-color-press - Press background color of the accordion panel\n * @cssprop --wcs-accordion-panel-header-font-size - Font size of the accordion panel header\n * @cssprop --wcs-accordion-panel-header-font-weight - Font weight of the accordion panel header\n * @cssprop --wcs-accordion-panel-border-radius - Border radius of the accordion panel\n * @cssprop --wcs-accordion-panel-border-radius-open - Border radius of the open accordion panel\n * @cssprop --wcs-accordion-panel-padding-vertical - Vertical padding of the accordion panel\n * @cssprop --wcs-accordion-panel-padding-horizontal - Horizontal padding of the accordion panel\n * @cssprop --wcs-accordion-panel-header-border-width - Border width of the accordion panel header\n * @cssprop --wcs-accordion-panel-border-width - Border width of the accordion panel\n * @cssprop --wcs-accordion-panel-border-width-focus - Border width of the accordion panel when focused\n * @cssprop --wcs-accordion-panel-border-color - Border color of the accordion panel\n * @cssprop --wcs-accordion-panel-border-color-focus - Border color of the accordion panel when focused\n * @cssprop --wcs-accordion-panel-border-style-focus - Border style of the accordion panel when focused\n * @cssprop --wcs-accordion-transition-duration - Transition duration of the accordion panel\n */\n@Component({\n tag: 'wcs-accordion-panel',\n styleUrl: 'accordion-panel.scss',\n shadow: true\n})\nexport class AccordionPanel implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeButton?: HTMLButtonElement;\n private inheritedAttributes: { [k: string]: any } = {};\n \n @Prop({reflect: true, mutable: true}) open: boolean = false;\n\n /**\n * Specifies whether the component should display the open/close text.\n * if false, it won't show the open/close text.\n */\n @Prop({reflect: true}) hideActionText: boolean = false;\n\n /**\n * Specifies whether the component should highlight when open with primary color.\n * if true, the background color will be the primary color.\n * if false, the background color will be wcs-light.\n */\n @Prop({reflect: true}) highlight: boolean = false;\n\n /**\n * Specifies wether the component should group the content with header in one card\n * if true, there will be only one card with the header and the content\n * Nothing change when the panel is close\n */\n @Prop({reflect: true}) groupContentWithHeader: boolean = false;\n\n @Event() wcsOpenChange!: EventEmitter<boolean>;\n\n @Watch('open')\n openChange(newValue: boolean) {\n this.wcsOpenChange.emit(newValue);\n }\n\n componentWillLoad(): Promise<void> | void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, ACCORDION_INHERITED_ATTRS),\n };\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeButton, attr, value);\n }\n\n @Method()\n async close() {\n this.open = false;\n }\n\n render() {\n \n \n \n return (\n <Host>\n <button aria-expanded={this.open ? \"true\": \"false\"}\n aria-controls=\"content\"\n class=\"header\"\n ref={(el) => this.nativeButton = el}\n onClick={() => this.open = !this.open}\n {...this.inheritedAttributes}>\n <slot name=\"header\"/>\n <span class=\"header-action\">\n {!this.hideActionText && (\n <span>{this.open ? 'Fermez' : 'Ouvrez'}</span>)\n }\n <SelectArrow up={this.open}/>\n </span>\n </button>\n <div class=\"content\" id=\"content\">\n <slot name=\"content\"/>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -13,7 +13,7 @@ const ActionBar = class {
|
|
|
13
13
|
this.hasTabs = !!this.el.querySelector('[slot="tabs"]');
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '4312c81132be4f4db1205a5f0bfae699c26e6436' }, h("div", { key: '746da3288b2092209451cf9014d5b5374bc36d70', class: "title-actions", "data-has-tabs": this.hasTabs }, h("h1", { key: 'e143ac0afe1fe76f2760859ba700d432d9d5756d' }, h("slot", { key: 'f5b7269692fd481a0d9fbc0e873580adfe9d6cc1' })), h("div", { key: '0ef5d4aca6cc88c96d541cd391e04a31ead116ee', class: "actions" }, h("slot", { key: '05364550979377548c2e4c97a21f3b52b27b457f', name: "actions" }))), h("div", { key: '613a7c98d9e9777f900e634500e541860a242fbc', class: "tabs-container" }, h("slot", { key: '35b753163a40381873e8fb07eb13fef58c0bcda6', name: "tabs" }))));
|
|
17
17
|
}
|
|
18
18
|
get el() { return getElement(this); }
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"wcs-action-bar.entry.js","mappings":";;AAAA,MAAM,YAAY,GAAG,oxDAAoxD,CAAC;AAC1yD,2BAAe,YAAY;;MCsBd,SAAS;;;;
|
|
1
|
+
{"file":"wcs-action-bar.entry.js","mappings":";;AAAA,MAAM,YAAY,GAAG,oxDAAoxD,CAAC;AAC1yD,2BAAe,YAAY;;MCsBd,SAAS;;;;uBAOkB,KAAK;;IAEzC,iBAAiB;QACb,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;KAC3D;IAED,MAAM;QACF,QACI,EAAC,IAAI,uDACD,4DAAK,KAAK,EAAC,eAAe,mBAAgB,IAAI,CAAC,OAAO,IAClD,6DACI,8DAAa,CACZ,EACL,4DAAK,KAAK,EAAC,SAAS,IAChB,6DAAM,IAAI,EAAC,SAAS,GAAQ,CAC1B,CACJ,EACN,4DAAK,KAAK,EAAC,gBAAgB,IACvB,6DAAM,IAAI,EAAC,MAAM,GAAQ,CACvB,CACH,EACT;KACL;;;;;;;","names":[],"sources":["src/components/action-bar/action-bar.scss?tag=wcs-action-bar&encapsulation=shadow","src/components/action-bar/action-bar.tsx"],"sourcesContent":[":host {\n --wcs-action-bar-background-color: var(--wcs-semantic-color-background-surface-primary);\n --wcs-action-bar-gap: var(--wcs-semantic-spacing-small);\n --wcs-action-bar-gap-actions: calc(4 * var(--wcs-semantic-spacing-base));\n --wcs-action-bar-min-height: calc(10 * var(--wcs-semantic-size-base));\n --wcs-action-bar-padding-horizontal: var(--wcs-semantic-spacing-large);\n --wcs-action-bar-padding-vertical: var(--wcs-semantic-spacing-base);\n\n --wcs-action-bar-tabs-margin-top: calc(1.5 * var(--wcs-semantic-spacing-base));\n\n --wcs-action-bar-title-font-size: var(--wcs-semantic-font-size-heading-4);\n --wcs-action-bar-title-font-weight: var(--wcs-semantic-font-weight-heavy);\n --wcs-action-bar-title-color: var(--wcs-semantic-color-text-primary);\n\n --wcs-tabs-gutter-border-width: var(--wcs-semantic-border-width-default);\n --wcs-tabs-gutter-background-color: var(--wcs-semantic-color-border-secondary);\n\n padding: 0 var(--wcs-action-bar-padding-horizontal);\n min-height: var(--wcs-action-bar-min-height);\n background-color: var(--wcs-action-bar-background-color);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: var(--wcs-action-bar-gap);\n\n .title-actions {\n padding-top: var(--wcs-action-bar-padding-vertical);\n padding-bottom: var(--wcs-action-bar-padding-vertical);\n gap: var(--wcs-action-bar-gap-actions);\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n }\n\n .title-actions[data-has-tabs] {\n padding-bottom: 0;\n }\n\n h1 {\n font-size: var(--wcs-action-bar-title-font-size);\n font-weight: var(--wcs-action-bar-title-font-weight);\n line-height: 1.25;\n margin: 0;\n color: var(--wcs-action-bar-title-color);\n }\n}\n\n:host([gutter]) {\n border-bottom: solid var(--wcs-tabs-gutter-border-width) var(--wcs-tabs-gutter-background-color);\n}\n\n::slotted([slot=actions]) {\n display: flex;\n}\n\n::slotted([slot=tabs]) {\n margin-top: var(--wcs-action-bar-tabs-margin-top);\n}\n","import { Component, ComponentInterface, Element, h, Host, Prop, State } from '@stencil/core';\n\n/**\n * The action-bar component is a group of elements appearing across the top of all pages on a business application.\n * \n * @cssprop --wcs-action-bar-background-color - Background color of the action bar\n * @cssprop --wcs-action-bar-gap - Gap between the title and the tabs\n * @cssprop --wcs-action-bar-gap-actions - Gap between the title and the actions\n * @cssprop --wcs-action-bar-min-height - Minimum height of the action bar\n * @cssprop --wcs-action-bar-padding-horizontal - Horizontal padding of the action bar\n * @cssprop --wcs-action-bar-padding-vertical - Vertical padding of the action bar\n * @cssprop --wcs-action-bar-tabs-margin-top - Margin top of the tabs when slotted\n * @cssprop --wcs-action-bar-title-font-size - Font size of the title\n * @cssprop --wcs-action-bar-title-font-weight - Font weight of the title\n * @cssprop --wcs-action-bar-title-color - Color of the title\n * @cssprop --wcs-tabs-gutter-border-width - Border width of the gutter\n * @cssprop --wcs-tabs-gutter-background-color - Background color of the gutter\n */\n@Component({\n tag: 'wcs-action-bar',\n styleUrl: 'action-bar.scss',\n shadow: true\n})\nexport class ActionBar implements ComponentInterface {\n @Element() private el: HTMLWcsActionBarElement;\n /**\n * Determines if the action bar should have a border at the bottom.\n * You should not use this property if a gutter is already present on tabs\n */\n @Prop({ reflect: true }) gutter: boolean;\n @State() private hasTabs: boolean = false;\n\n componentWillLoad(): Promise<void> | void {\n this.hasTabs = !!this.el.querySelector('[slot=\"tabs\"]');\n }\n\n render() {\n return (\n <Host>\n <div class=\"title-actions\" data-has-tabs={this.hasTabs}>\n <h1>\n <slot></slot>\n </h1>\n <div class=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n </div>\n <div class=\"tabs-container\">\n <slot name=\"tabs\"></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|