wcs-core 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -11
- package/design-tokens/dist/sncf-groupe-root-scoped.css +590 -0
- package/design-tokens/dist/sncf-groupe.css +590 -0
- package/design-tokens/dist/sncf-groupe.json +10693 -0
- package/design-tokens/dist/sncf-holding-root-scoped.css +590 -0
- package/design-tokens/dist/sncf-holding.css +437 -423
- package/design-tokens/dist/sncf-holding.json +80 -3
- package/design-tokens/dist/sncf-reseau-root-scoped.css +652 -0
- package/design-tokens/dist/sncf-reseau.css +473 -463
- package/design-tokens/dist/sncf-reseau.json +54 -0
- package/design-tokens/dist/sncf-voyageurs-root-scoped.css +550 -0
- package/design-tokens/dist/sncf-voyageurs.css +394 -381
- package/design-tokens/dist/sncf-voyageurs.json +54 -0
- package/dist/cjs/{com-nav-utils-9f6c99b8.js → com-nav-utils-ff4f0bef.js} +2 -2
- package/dist/cjs/{com-nav-utils-9f6c99b8.js.map → com-nav-utils-ff4f0bef.js.map} +1 -1
- package/dist/cjs/control-component-interface-d9b68f28.js +43 -0
- package/dist/cjs/control-component-interface-d9b68f28.js.map +1 -0
- package/dist/cjs/{grid-pagination-2c752b22.js → grid-pagination-4505d7b6.js} +26 -6
- package/dist/cjs/grid-pagination-4505d7b6.js.map +1 -0
- package/dist/cjs/{helpers-871f5a3d.js → helpers-2f1a8ddc.js} +44 -1
- package/dist/cjs/helpers-2f1a8ddc.js.map +1 -0
- package/dist/cjs/{keyboard-event-d2c81ce0.js → keyboard-event-40ecdc27.js} +2 -2
- package/dist/cjs/{keyboard-event-d2c81ce0.js.map → keyboard-event-40ecdc27.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/wcs-accordion-panel.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/wcs-button_2.cjs.entry.js +4 -9
- 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 +6 -2
- package/dist/cjs/wcs-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav-category.cjs.entry.js +4 -4
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js +2 -2
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +4 -4
- package/dist/cjs/wcs-com-nav.cjs.entry.js +4 -4
- package/dist/cjs/wcs-counter.cjs.entry.js +13 -15
- 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 +2 -2
- package/dist/cjs/wcs-dropdown.cjs.entry.js +3 -8
- package/dist/cjs/wcs-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-editable-field.cjs.entry.js +81 -55
- package/dist/cjs/wcs-editable-field.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-error_3.cjs.entry.js +209 -0
- package/dist/cjs/wcs-error_3.cjs.entry.js.map +1 -0
- 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-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +4 -4
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-galactic.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid-column.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/wcs-grid.cjs.entry.js +14 -6
- package/dist/cjs/wcs-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-header.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/wcs-input.cjs.entry.js +5 -13
- 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-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-mat-icon.cjs.entry.js +2 -2
- package/dist/cjs/wcs-mat-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-modal.cjs.entry.js +18 -4
- 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 +3 -3
- package/dist/cjs/wcs-nav-item.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-nav.cjs.entry.js +3 -3
- package/dist/cjs/wcs-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/wcs-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-progress-radial.cjs.entry.js +3 -3
- package/dist/cjs/wcs-progress-radial.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-radio-group.cjs.entry.js +5 -2
- package/dist/cjs/wcs-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-radio.cjs.entry.js +2 -2
- package/dist/cjs/wcs-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-select_2.cjs.entry.js +21 -13
- 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 +6 -2
- 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 +150 -7
- package/dist/cjs/wcs-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-textarea.cjs.entry.js +2 -2
- package/dist/cjs/wcs-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-tooltip.cjs.entry.js +8 -4
- 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 +2 -2
- 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 +5 -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 +2 -7
- 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 +22 -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.css +2 -1
- 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 +7 -1
- package/dist/collection/components/counter/counter.js +13 -10
- 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 +3 -8
- 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 +34 -10
- package/dist/collection/components/editable-field/editable-field.e2e.js +176 -0
- package/dist/collection/components/editable-field/editable-field.e2e.js.map +1 -0
- package/dist/collection/components/editable-field/editable-field.js +83 -57
- package/dist/collection/components/editable-field/editable-field.js.map +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/footer/footer.js.map +1 -1
- package/dist/collection/components/form-field/form-field.css +39 -12
- package/dist/collection/components/form-field/form-field.e2e.js +122 -0
- package/dist/collection/components/form-field/form-field.e2e.js.map +1 -0
- package/dist/collection/components/form-field/form-field.js +29 -12
- 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.css +1 -0
- 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 +4 -4
- 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 +14 -1
- package/dist/collection/components/input/input.js +44 -10
- 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 +7 -2
- package/dist/collection/components/list-item/list-item.js.map +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 +58 -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.css +24 -6
- 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 +2 -2
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/radio-group/radio-group.js +39 -2
- package/dist/collection/components/radio-group/radio-group.js.map +1 -1
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +35 -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 +23 -2
- 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 +181 -6
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/components/textarea/textarea.js +5 -5
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.js +11 -9
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/utils/control-component-interface.js +37 -0
- package/dist/collection/utils/control-component-interface.js.map +1 -0
- package/dist/collection/utils/helpers.js +40 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/esm/{com-nav-utils-1366c701.js → com-nav-utils-ee7bf77c.js} +2 -2
- package/dist/esm/{com-nav-utils-1366c701.js.map → com-nav-utils-ee7bf77c.js.map} +1 -1
- package/dist/esm/control-component-interface-9f09e520.js +40 -0
- package/dist/esm/control-component-interface-9f09e520.js.map +1 -0
- package/dist/esm/{grid-pagination-421689be.js → grid-pagination-731726a6.js} +26 -6
- package/dist/esm/grid-pagination-731726a6.js.map +1 -0
- package/dist/esm/{helpers-f137ec8d.js → helpers-ece6a2d3.js} +42 -2
- package/dist/esm/helpers-ece6a2d3.js.map +1 -0
- package/dist/esm/{keyboard-event-bdea408a.js → keyboard-event-26b65ae5.js} +2 -2
- package/dist/esm/{keyboard-event-bdea408a.js.map → keyboard-event-26b65ae5.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/wcs-accordion-panel.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/wcs-button_2.entry.js +4 -9
- 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 +6 -2
- package/dist/esm/wcs-checkbox.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav-category.entry.js +4 -4
- package/dist/esm/wcs-com-nav-item.entry.js +2 -2
- package/dist/esm/wcs-com-nav-item.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav-submenu.entry.js +4 -4
- package/dist/esm/wcs-com-nav.entry.js +4 -4
- package/dist/esm/wcs-counter.entry.js +13 -15
- 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 +2 -2
- package/dist/esm/wcs-dropdown.entry.js +3 -8
- package/dist/esm/wcs-dropdown.entry.js.map +1 -1
- package/dist/esm/wcs-editable-field.entry.js +81 -55
- package/dist/esm/wcs-editable-field.entry.js.map +1 -1
- package/dist/esm/wcs-error_3.entry.js +203 -0
- package/dist/esm/wcs-error_3.entry.js.map +1 -0
- 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-footer.entry.js.map +1 -1
- package/dist/esm/wcs-galactic-menu.entry.js +4 -4
- package/dist/esm/wcs-galactic-menu.entry.js.map +1 -1
- package/dist/esm/wcs-galactic.entry.js +1 -1
- package/dist/esm/wcs-grid-column.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/wcs-grid.entry.js +14 -6
- package/dist/esm/wcs-grid.entry.js.map +1 -1
- package/dist/esm/wcs-header.entry.js +3 -3
- 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 +2 -2
- package/dist/esm/wcs-input.entry.js +5 -13
- 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-list-item.entry.js.map +1 -1
- package/dist/esm/wcs-mat-icon.entry.js +2 -2
- package/dist/esm/wcs-mat-icon.entry.js.map +1 -1
- package/dist/esm/wcs-modal.entry.js +18 -4
- 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 +3 -3
- package/dist/esm/wcs-nav-item.entry.js.map +1 -1
- package/dist/esm/wcs-nav.entry.js +3 -3
- package/dist/esm/wcs-nav.entry.js.map +1 -1
- package/dist/esm/wcs-progress-bar.entry.js +4 -4
- package/dist/esm/wcs-progress-bar.entry.js.map +1 -1
- package/dist/esm/wcs-progress-radial.entry.js +3 -3
- package/dist/esm/wcs-progress-radial.entry.js.map +1 -1
- package/dist/esm/wcs-radio-group.entry.js +5 -2
- package/dist/esm/wcs-radio-group.entry.js.map +1 -1
- package/dist/esm/wcs-radio.entry.js +2 -2
- package/dist/esm/wcs-radio.entry.js.map +1 -1
- package/dist/esm/wcs-select_2.entry.js +21 -13
- 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 +6 -2
- 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 +150 -7
- package/dist/esm/wcs-tabs.entry.js.map +1 -1
- package/dist/esm/wcs-textarea.entry.js +2 -2
- package/dist/esm/wcs-textarea.entry.js.map +1 -1
- package/dist/esm/wcs-tooltip.entry.js +8 -4
- 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/checkbox/checkbox.d.ts +3 -1
- package/dist/types/components/counter/counter-interface.d.ts +1 -3
- package/dist/types/components/counter/counter.d.ts +6 -0
- package/dist/types/components/editable-field/editable-field.d.ts +23 -9
- 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/input/input.d.ts +3 -0
- package/dist/types/components/list-item/list-item.d.ts +5 -0
- 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/modal/modal.d.ts +23 -0
- package/dist/types/components/radio-group/radio-group.d.ts +3 -1
- package/dist/types/components/select/select.d.ts +11 -1
- package/dist/types/components/switch/switch.d.ts +3 -1
- package/dist/types/components/tabs/tabs.d.ts +55 -0
- package/dist/types/components/tooltip/tooltip.d.ts +3 -5
- package/dist/types/components.d.ts +658 -22
- package/dist/types/utils/control-component-interface.d.ts +22 -0
- package/dist/types/utils/helpers.d.ts +21 -0
- package/dist/wcs/p-0017d766.js +2 -0
- package/dist/wcs/{p-5ea2aba5.entry.js → p-0424e545.entry.js} +2 -2
- package/dist/wcs/{p-25b96cde.entry.js → p-0758d22e.entry.js} +2 -2
- package/dist/wcs/p-0758d22e.entry.js.map +1 -0
- 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-87b69cac.entry.js → p-1244daa0.entry.js} +2 -2
- package/dist/wcs/{p-80a23f9c.entry.js → p-18fa39f4.entry.js} +2 -2
- package/dist/wcs/{p-80a23f9c.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-d2a4f609.entry.js → p-1fbe0328.entry.js} +2 -2
- package/dist/wcs/p-1fbe0328.entry.js.map +1 -0
- package/dist/wcs/{p-276b8125.entry.js → p-204f2722.entry.js} +9 -9
- package/dist/wcs/p-204f2722.entry.js.map +1 -0
- package/dist/wcs/p-27b438c0.entry.js +2 -0
- package/dist/wcs/{p-45a6934d.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-4982f96c.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-9553d60e.entry.js → p-496115a5.entry.js} +2 -2
- package/dist/wcs/{p-9553d60e.entry.js.map → p-496115a5.entry.js.map} +1 -1
- package/dist/wcs/p-4fb2d985.entry.js +2 -0
- package/dist/wcs/p-4fb2d985.entry.js.map +1 -0
- package/dist/wcs/{p-b0f8190f.entry.js → p-5202b323.entry.js} +2 -2
- package/dist/wcs/p-52d77e1f.js +2 -0
- package/dist/wcs/p-52d77e1f.js.map +1 -0
- 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-806315e6.entry.js.map → p-580b3142.entry.js.map} +1 -1
- 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-622f7403.entry.js +2 -0
- package/dist/wcs/p-622f7403.entry.js.map +1 -0
- 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-209145de.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-2c9e20c1.entry.js → p-850fa9c9.entry.js} +2 -2
- package/dist/wcs/{p-f06aa79d.entry.js → p-86ec9ead.entry.js} +2 -2
- package/dist/wcs/{p-f06aa79d.entry.js.map → p-86ec9ead.entry.js.map} +1 -1
- package/dist/wcs/p-89b8c724.js +2 -0
- package/dist/wcs/p-8c2605fd.entry.js +2 -0
- package/dist/wcs/p-8c2605fd.entry.js.map +1 -0
- package/dist/wcs/{p-2305f257.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-a7468a3a.js +2 -0
- package/dist/wcs/p-a7468a3a.js.map +1 -0
- package/dist/wcs/{p-0fa370d7.entry.js → p-a94e685c.entry.js} +3 -3
- package/dist/wcs/{p-0fa370d7.entry.js.map → p-a94e685c.entry.js.map} +1 -1
- package/dist/wcs/{p-97cbbcfc.entry.js → p-a956dc84.entry.js} +2 -2
- package/dist/wcs/p-a956dc84.entry.js.map +1 -0
- package/dist/wcs/{p-e19308cf.entry.js → p-aadf37e7.entry.js} +2 -2
- package/dist/wcs/{p-f8d2be83.entry.js → p-ad286030.entry.js} +2 -2
- package/dist/wcs/p-ad5192cd.entry.js +2 -0
- package/dist/wcs/p-b0a6eec6.entry.js +2 -0
- package/dist/wcs/p-b0a6eec6.entry.js.map +1 -0
- package/dist/wcs/{p-fa507e06.entry.js → p-b28b2fba.entry.js} +2 -2
- package/dist/wcs/p-b28b2fba.entry.js.map +1 -0
- package/dist/wcs/{p-15ff9f93.entry.js → p-bc009574.entry.js} +2 -2
- package/dist/wcs/{p-15ff9f93.entry.js.map → p-bc009574.entry.js.map} +1 -1
- package/dist/wcs/p-c211a5d1.entry.js +2 -0
- package/dist/wcs/{p-85a5bbb7.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-9e03b379.entry.js → p-c84ae00d.entry.js} +2 -2
- package/dist/wcs/p-cad10435.entry.js +2 -0
- package/dist/wcs/{p-8f0e093f.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-a788b5bd.entry.js → p-cbda74f6.entry.js} +2 -2
- package/dist/wcs/{p-09d0a296.entry.js → p-d27d4a53.entry.js} +3 -3
- 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-dff8641e.entry.js +2 -0
- package/dist/wcs/p-dff8641e.entry.js.map +1 -0
- package/dist/wcs/p-e26c19e5.entry.js +2 -0
- package/dist/wcs/{p-1e5aa960.entry.js → p-e56b9ce2.entry.js} +2 -2
- package/dist/wcs/p-e56b9ce2.entry.js.map +1 -0
- 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-db81b74f.entry.js → p-fd187bce.entry.js} +2 -2
- package/dist/wcs/p-fd187bce.entry.js.map +1 -0
- package/dist/wcs/p-fdeae83e.entry.js +2 -0
- package/dist/wcs/p-fdeae83e.entry.js.map +1 -0
- 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-2c752b22.js.map +0 -1
- package/dist/cjs/helpers-871f5a3d.js.map +0 -1
- package/dist/cjs/wcs-error_2.cjs.entry.js +0 -168
- package/dist/cjs/wcs-error_2.cjs.entry.js.map +0 -1
- package/dist/cjs/wcs-label.cjs.entry.js +0 -33
- package/dist/cjs/wcs-label.cjs.entry.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-421689be.js.map +0 -1
- package/dist/esm/helpers-f137ec8d.js.map +0 -1
- package/dist/esm/wcs-error_2.entry.js +0 -163
- package/dist/esm/wcs-error_2.entry.js.map +0 -1
- package/dist/esm/wcs-label.entry.js +0 -29
- package/dist/esm/wcs-label.entry.js.map +0 -1
- package/dist/wcs/p-08e86d69.entry.js +0 -2
- package/dist/wcs/p-08e86d69.entry.js.map +0 -1
- package/dist/wcs/p-09d0a296.entry.js.map +0 -1
- package/dist/wcs/p-0fdaec9e.entry.js +0 -2
- package/dist/wcs/p-0fdaec9e.entry.js.map +0 -1
- package/dist/wcs/p-19c77b5c.entry.js +0 -2
- package/dist/wcs/p-1ab0d13b.entry.js +0 -2
- package/dist/wcs/p-1ab0d13b.entry.js.map +0 -1
- package/dist/wcs/p-1e5aa960.entry.js.map +0 -1
- package/dist/wcs/p-209145de.entry.js +0 -2
- package/dist/wcs/p-25b96cde.entry.js.map +0 -1
- package/dist/wcs/p-276b8125.entry.js.map +0 -1
- package/dist/wcs/p-2add4d4d.entry.js +0 -2
- package/dist/wcs/p-2add4d4d.entry.js.map +0 -1
- package/dist/wcs/p-400a71d7.entry.js +0 -2
- package/dist/wcs/p-412b0021.js +0 -2
- package/dist/wcs/p-412b0021.js.map +0 -1
- package/dist/wcs/p-4ca7c59f.entry.js +0 -2
- package/dist/wcs/p-4ca7c59f.entry.js.map +0 -1
- package/dist/wcs/p-4d6d1d14.js +0 -2
- package/dist/wcs/p-52cd0abb.entry.js +0 -2
- package/dist/wcs/p-52cd0abb.entry.js.map +0 -1
- package/dist/wcs/p-550012c2.entry.js +0 -2
- package/dist/wcs/p-5f517eb5.entry.js +0 -2
- package/dist/wcs/p-76f07dbd.entry.js +0 -2
- package/dist/wcs/p-76f07dbd.entry.js.map +0 -1
- package/dist/wcs/p-806315e6.entry.js +0 -2
- package/dist/wcs/p-85a5bbb7.entry.js.map +0 -1
- package/dist/wcs/p-8780a429.entry.js +0 -2
- package/dist/wcs/p-8780a429.entry.js.map +0 -1
- package/dist/wcs/p-8bd1b9ce.entry.js +0 -2
- package/dist/wcs/p-8bd1b9ce.entry.js.map +0 -1
- package/dist/wcs/p-8f0e093f.entry.js +0 -2
- package/dist/wcs/p-94ff8939.entry.js +0 -2
- package/dist/wcs/p-94ff8939.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-97cbbcfc.entry.js.map +0 -1
- package/dist/wcs/p-985c4cf2.entry.js +0 -2
- package/dist/wcs/p-985c4cf2.entry.js.map +0 -1
- package/dist/wcs/p-9f23c49e.entry.js +0 -2
- package/dist/wcs/p-9f23c49e.entry.js.map +0 -1
- package/dist/wcs/p-a3aece7a.js +0 -2
- package/dist/wcs/p-a3aece7a.js.map +0 -1
- package/dist/wcs/p-a66a4289.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-bf31245c.entry.js +0 -2
- package/dist/wcs/p-bf31245c.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-cd592a00.entry.js +0 -2
- package/dist/wcs/p-cd592a00.entry.js.map +0 -1
- package/dist/wcs/p-d2a4f609.entry.js.map +0 -1
- package/dist/wcs/p-d42831b2.entry.js +0 -2
- package/dist/wcs/p-d42831b2.entry.js.map +0 -1
- package/dist/wcs/p-d443d419.entry.js +0 -2
- package/dist/wcs/p-d7acbf01.js +0 -2
- package/dist/wcs/p-db81b74f.entry.js.map +0 -1
- package/dist/wcs/p-dbbf0980.entry.js +0 -2
- package/dist/wcs/p-dbbf0980.entry.js.map +0 -1
- package/dist/wcs/p-e64d7437.entry.js +0 -2
- package/dist/wcs/p-e86575d3.entry.js +0 -2
- package/dist/wcs/p-e86575d3.entry.js.map +0 -1
- package/dist/wcs/p-f264d46f.entry.js +0 -2
- package/dist/wcs/p-fa507e06.entry.js.map +0 -1
- package/dist/wcs/p-fd9e731d.entry.js +0 -2
- package/dist/wcs/p-fd9e731d.entry.js.map +0 -1
- /package/dist/wcs/{p-d7acbf01.js.map → p-0017d766.js.map} +0 -0
- /package/dist/wcs/{p-5ea2aba5.entry.js.map → p-0424e545.entry.js.map} +0 -0
- /package/dist/wcs/{p-f264d46f.entry.js.map → p-0b8157e7.entry.js.map} +0 -0
- /package/dist/wcs/{p-87b69cac.entry.js.map → p-1244daa0.entry.js.map} +0 -0
- /package/dist/wcs/{p-e64d7437.entry.js.map → p-27b438c0.entry.js.map} +0 -0
- /package/dist/wcs/{p-45a6934d.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-400a71d7.entry.js.map → p-3823f54e.entry.js.map} +0 -0
- /package/dist/wcs/{p-4982f96c.entry.js.map → p-3a18535f.entry.js.map} +0 -0
- /package/dist/wcs/{p-b0f8190f.entry.js.map → p-5202b323.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-2c9e20c1.entry.js.map → p-850fa9c9.entry.js.map} +0 -0
- /package/dist/wcs/{p-4d6d1d14.js.map → p-89b8c724.js.map} +0 -0
- /package/dist/wcs/{p-2305f257.entry.js.map → p-8e9bd0f1.entry.js.map} +0 -0
- /package/dist/wcs/{p-e19308cf.entry.js.map → p-aadf37e7.entry.js.map} +0 -0
- /package/dist/wcs/{p-f8d2be83.entry.js.map → p-ad286030.entry.js.map} +0 -0
- /package/dist/wcs/{p-a66a4289.entry.js.map → p-ad5192cd.entry.js.map} +0 -0
- /package/dist/wcs/{p-19c77b5c.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-9e03b379.entry.js.map → p-c84ae00d.entry.js.map} +0 -0
- /package/dist/wcs/{p-a788b5bd.entry.js.map → p-cbda74f6.entry.js.map} +0 -0
- /package/dist/wcs/{p-5f517eb5.entry.js.map → p-e26c19e5.entry.js.map} +0 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { parseCssTimeValueToMilliseconds } from "../../utils/helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Serve as a container for displaying `wcs-alert` components. Directly use this component to display alerts in your applications.
|
|
5
|
+
*
|
|
6
|
+
* ## Usage
|
|
7
|
+
*
|
|
8
|
+
* You can place the `wcs-alert-drawer` component anywhere in your application. It will be used to display alerts.
|
|
9
|
+
* You need to set `position` property to define where the alert drawer will be displayed on the screen.
|
|
10
|
+
*
|
|
11
|
+
* About alerts order:
|
|
12
|
+
* - alerts are ordered up-bottom if the position is `top` and bottom-up if the position is `bottom`
|
|
13
|
+
*
|
|
14
|
+
* ## Accessibility guidelines 💡
|
|
15
|
+
*
|
|
16
|
+
* - The component has `aria-live="polite"` and `aria-atomic="true"` attributes to announce the new alerts to screen readers
|
|
17
|
+
*
|
|
18
|
+
* ## Configuration (on the web component)
|
|
19
|
+
*
|
|
20
|
+
* Per default, the `wcs-alert-drawer` is configured with:
|
|
21
|
+
* - `position: 'top-right'`
|
|
22
|
+
* - `showProgressBar: false`
|
|
23
|
+
* - `timeout: 5000`
|
|
24
|
+
*
|
|
25
|
+
* When using the `WcsAlertDrawer::show(alert: WcsAlertConfig)` method, you can override the default configuration by
|
|
26
|
+
* overriding it through the argument.
|
|
27
|
+
* You can also set them in the `wcs-alert-drawer` component directly as attributes
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <wcs-alert-drawer position="top-right" show-progress-bar timeout="10000">
|
|
31
|
+
* ```
|
|
32
|
+
* With this configuration, all alerts will be displayed with a progress bar and a timeout of 10 seconds.
|
|
33
|
+
*
|
|
34
|
+
* @slot - the alert drawer content, where alerts you put as children will be displayed
|
|
35
|
+
*
|
|
36
|
+
* @cssprop --wcs-alert-drawer-gap - Gap between alerts
|
|
37
|
+
* @cssprop --wcs-alert-drawer-margin-horizontal - Margin horizontal of the alert drawer
|
|
38
|
+
* @cssprop --wcs-alert-drawer-margin-vertical - Margin vertical of the alert drawer
|
|
39
|
+
* @cssprop --wcs-alert-drawer-hide-alert-animation-duration - Duration of the hide alert animation
|
|
40
|
+
* @cssprop --wcs-alert-drawer-min-width - Minimum width of the alert drawer => define the width of the alerts
|
|
41
|
+
*/
|
|
42
|
+
export class AlertDrawer {
|
|
43
|
+
constructor() {
|
|
44
|
+
/*
|
|
45
|
+
https://www.reddit.com/r/Frontend/comments/1ato11w/comment/kqz4gt8/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
|
|
46
|
+
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef
|
|
47
|
+
*/
|
|
48
|
+
this.alertEventListeners = new WeakMap();
|
|
49
|
+
this.timeoutId = undefined;
|
|
50
|
+
this.userPrefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
51
|
+
/**
|
|
52
|
+
* Handles the dismissal of an alert
|
|
53
|
+
* @param alert The alert element
|
|
54
|
+
*/
|
|
55
|
+
this.close = (alert) => {
|
|
56
|
+
if (!this.userPrefersReducedMotion) {
|
|
57
|
+
this.timeoutId = setTimeout(() => {
|
|
58
|
+
alert.remove();
|
|
59
|
+
// Cleanup the event listener reference
|
|
60
|
+
this.alertEventListeners.delete(alert);
|
|
61
|
+
}, parseCssTimeValueToMilliseconds(window.getComputedStyle(this.el).getPropertyValue("--wcs-alert-drawer-hide-alert-animation-duration")) || 300);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// If the user has reduced motion preference, remove the alert immediately
|
|
65
|
+
alert.remove();
|
|
66
|
+
// Cleanup the event listener reference
|
|
67
|
+
this.alertEventListeners.delete(alert);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
this.position = 'bottom-right';
|
|
71
|
+
this.timeout = 5000;
|
|
72
|
+
this.showProgressBar = false;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Method exposed on `wcs-alert-drawer` to show an alert programmatically via the JS API
|
|
76
|
+
* @example
|
|
77
|
+
* Plain javascript (example inside a script tag):
|
|
78
|
+
* ```javascript
|
|
79
|
+
* document.querySelector('wcs-alert-drawer').show({
|
|
80
|
+
* title: 'Alert title',
|
|
81
|
+
* subtitle: 'Alert subtitle',
|
|
82
|
+
* intent: 'info',
|
|
83
|
+
* showProgressBar: true,
|
|
84
|
+
* timeout: 5000
|
|
85
|
+
* });
|
|
86
|
+
* @param alert The alert to show
|
|
87
|
+
*/
|
|
88
|
+
async show(alert) {
|
|
89
|
+
this.alertsContainer.appendChild(this.renderToast(alert));
|
|
90
|
+
}
|
|
91
|
+
renderToast(alert) {
|
|
92
|
+
var _a, _b;
|
|
93
|
+
const alertElement = document.createElement('wcs-alert');
|
|
94
|
+
alertElement.setAttribute('intent', alert.intent);
|
|
95
|
+
// Uses the alert config if defined, otherwise falls back to the drawer default
|
|
96
|
+
// as the showProgressBar is a boolean attribute, we need to set it to an empty string only if true
|
|
97
|
+
if (((_a = alert.showProgressBar) !== null && _a !== void 0 ? _a : this.showProgressBar)) {
|
|
98
|
+
alertElement.setAttribute('show-progress-bar', '');
|
|
99
|
+
}
|
|
100
|
+
// Uses the alert config if defined, otherwise falls back to the drawer default
|
|
101
|
+
alertElement.setAttribute('timeout', String((_b = alert.timeout) !== null && _b !== void 0 ? _b : this.timeout));
|
|
102
|
+
const listener = () => this.close(alertElement);
|
|
103
|
+
this.alertEventListeners.set(alertElement, listener);
|
|
104
|
+
alertElement.addEventListener("wcsAlertDismiss", listener);
|
|
105
|
+
const title = document.createElement('span');
|
|
106
|
+
title.setAttribute('slot', 'title');
|
|
107
|
+
title.textContent = alert.title;
|
|
108
|
+
alertElement.appendChild(title);
|
|
109
|
+
const subtitle = document.createElement('span');
|
|
110
|
+
subtitle.setAttribute('slot', 'subtitle');
|
|
111
|
+
subtitle.textContent = alert.subtitle;
|
|
112
|
+
alertElement.appendChild(subtitle);
|
|
113
|
+
return alertElement;
|
|
114
|
+
}
|
|
115
|
+
render() {
|
|
116
|
+
// https://www.clever-cloud.com/doc/clever-components/?path=/docs/%F0%9F%9B%A0-toast-cc-toaster--docs#about-accessibility
|
|
117
|
+
return (h(Host, { key: '18a68f9f7727b29da85e0852dc87de30d79581ed', role: "region", "aria-label": "Informations", "aria-live": "polite", "aria-atomic": "true" }, h("div", { key: 'ee0d30077439b991e5ff6eb02b24873f015dce5e', ref: (el) => this.alertsContainer = el, id: "alerts-container" })));
|
|
118
|
+
}
|
|
119
|
+
disconnectedCallback() {
|
|
120
|
+
this.alertEventListeners = new WeakMap(); // Clear the event listeners, weakmap is not iterable
|
|
121
|
+
clearTimeout(this.timeoutId);
|
|
122
|
+
}
|
|
123
|
+
static get is() { return "wcs-alert-drawer"; }
|
|
124
|
+
static get encapsulation() { return "shadow"; }
|
|
125
|
+
static get originalStyleUrls() {
|
|
126
|
+
return {
|
|
127
|
+
"$": ["alert-drawer.scss"]
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
static get styleUrls() {
|
|
131
|
+
return {
|
|
132
|
+
"$": ["alert-drawer.css"]
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
static get properties() {
|
|
136
|
+
return {
|
|
137
|
+
"position": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "WcsAlertDrawerPosition",
|
|
142
|
+
"resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"top\" | \"top-left\" | \"top-right\"",
|
|
143
|
+
"references": {
|
|
144
|
+
"WcsAlertDrawerPosition": {
|
|
145
|
+
"location": "import",
|
|
146
|
+
"path": "./alert-drawer-interface",
|
|
147
|
+
"id": "src/components/alert-drawer/alert-drawer-interface.ts::WcsAlertDrawerPosition"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"required": false,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": "Position of the alert drawer on the screen"
|
|
156
|
+
},
|
|
157
|
+
"attribute": "position",
|
|
158
|
+
"reflect": true,
|
|
159
|
+
"defaultValue": "'bottom-right'"
|
|
160
|
+
},
|
|
161
|
+
"timeout": {
|
|
162
|
+
"type": "number",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "number",
|
|
166
|
+
"resolved": "number",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "Timeout for the alert to be dismissed automatically"
|
|
174
|
+
},
|
|
175
|
+
"attribute": "timeout",
|
|
176
|
+
"reflect": false,
|
|
177
|
+
"defaultValue": "5000"
|
|
178
|
+
},
|
|
179
|
+
"showProgressBar": {
|
|
180
|
+
"type": "boolean",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "boolean",
|
|
184
|
+
"resolved": "boolean",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": false,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [],
|
|
191
|
+
"text": "Whether to show the progress bar or not"
|
|
192
|
+
},
|
|
193
|
+
"attribute": "show-progress-bar",
|
|
194
|
+
"reflect": false,
|
|
195
|
+
"defaultValue": "false"
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
static get methods() {
|
|
200
|
+
return {
|
|
201
|
+
"show": {
|
|
202
|
+
"complexType": {
|
|
203
|
+
"signature": "(alert: WcsAlertConfig) => Promise<void>",
|
|
204
|
+
"parameters": [{
|
|
205
|
+
"name": "alert",
|
|
206
|
+
"type": "{ title: string; subtitle: string; intent: WcsAlertIntent; showProgressBar?: boolean; timeout?: number; }",
|
|
207
|
+
"docs": "The alert to show"
|
|
208
|
+
}],
|
|
209
|
+
"references": {
|
|
210
|
+
"Promise": {
|
|
211
|
+
"location": "global",
|
|
212
|
+
"id": "global::Promise"
|
|
213
|
+
},
|
|
214
|
+
"WcsAlertConfig": {
|
|
215
|
+
"location": "import",
|
|
216
|
+
"path": "../alert/alert-interface",
|
|
217
|
+
"id": "src/components/alert/alert-interface.ts::WcsAlertConfig"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"return": "Promise<void>"
|
|
221
|
+
},
|
|
222
|
+
"docs": {
|
|
223
|
+
"text": "Method exposed on `wcs-alert-drawer` to show an alert programmatically via the JS API",
|
|
224
|
+
"tags": [{
|
|
225
|
+
"name": "example",
|
|
226
|
+
"text": "Plain javascript (example inside a script tag):\n```javascript\n document.querySelector('wcs-alert-drawer').show({\n title: 'Alert title',\n subtitle: 'Alert subtitle',\n intent: 'info',\n showProgressBar: true,\n timeout: 5000\n });"
|
|
227
|
+
}, {
|
|
228
|
+
"name": "param",
|
|
229
|
+
"text": "alert The alert to show"
|
|
230
|
+
}]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
static get elementRef() { return "el"; }
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=alert-drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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Q,CAAC;QACtC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAEnC,OAAO,YAAY,CAAC;IACxB,CAAC;IAED,MAAM;QACF,yHAAyH;QACzH,OAAO,CACH,EAAC,IAAI,qDAAC,IAAI,EAAC,QAAQ,gBAAY,cAAc,eAAW,QAAQ,iBAAa,MAAM;YAC/E,4DAAK,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,GAAG,EAAE,EAAE,EAAE,EAAC,kBAAkB,GAC5D,CACH,CACV,CAAC;IACN,CAAC;IAED,oBAAoB;QAChB,IAAI,CAAC,mBAAmB,GAAG,IAAI,OAAO,EAAE,CAAC,CAAC,qDAAqD;QAC/F,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Element, h, Host, Method, Prop } from '@stencil/core';\nimport { parseCssTimeValueToMilliseconds } from '../../utils/helpers';\nimport { WcsAlertDrawerPosition } from \"./alert-drawer-interface\";\nimport { WcsAlertConfig } from \"../alert/alert-interface\";\n\n/**\n * Serve as a container for displaying `wcs-alert` components. Directly use this component to display alerts in your applications.\n * \n * ## Usage\n * \n * You can place the `wcs-alert-drawer` component anywhere in your application. It will be used to display alerts.\n * You need to set `position` property to define where the alert drawer will be displayed on the screen.\n * \n * About alerts order:\n * - alerts are ordered up-bottom if the position is `top` and bottom-up if the position is `bottom`\n * \n * ## Accessibility guidelines 💡\n * \n * - The component has `aria-live=\"polite\"` and `aria-atomic=\"true\"` attributes to announce the new alerts to screen readers\n * \n * ## Configuration (on the web component)\n *\n * Per default, the `wcs-alert-drawer` is configured with:\n * - `position: 'top-right'`\n * - `showProgressBar: false`\n * - `timeout: 5000`\n *\n * When using the `WcsAlertDrawer::show(alert: WcsAlertConfig)` method, you can override the default configuration by \n * overriding it through the argument.\n * You can also set them in the `wcs-alert-drawer` component directly as attributes\n * \n * ```html\n * <wcs-alert-drawer position=\"top-right\" show-progress-bar timeout=\"10000\">\n * ```\n * With this configuration, all alerts will be displayed with a progress bar and a timeout of 10 seconds.\n * \n * @slot - the alert drawer content, where alerts you put as children will be displayed\n * \n * @cssprop --wcs-alert-drawer-gap - Gap between alerts\n * @cssprop --wcs-alert-drawer-margin-horizontal - Margin horizontal of the alert drawer\n * @cssprop --wcs-alert-drawer-margin-vertical - Margin vertical of the alert drawer\n * @cssprop --wcs-alert-drawer-hide-alert-animation-duration - Duration of the hide alert animation\n * @cssprop --wcs-alert-drawer-min-width - Minimum width of the alert drawer => define the width of the alerts\n */\n@Component({\n tag: 'wcs-alert-drawer',\n styleUrl: 'alert-drawer.scss',\n shadow: true,\n})\nexport class AlertDrawer {\n @Element()\n private el!: HTMLWcsAlertDrawerElement;\n\n /**\n * Position of the alert drawer on the screen\n */\n @Prop({ reflect: true }) position: WcsAlertDrawerPosition = 'bottom-right';\n\n /**\n * Timeout for the alert to be dismissed automatically\n */\n @Prop() timeout: number = 5000;\n /**\n * Whether to show the progress bar or not\n */\n @Prop() showProgressBar: boolean = false;\n\n /*\n https://www.reddit.com/r/Frontend/comments/1ato11w/comment/kqz4gt8/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button\n https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef\n */\n private alertEventListeners = new WeakMap<HTMLElement, (evt: AnimationEvent) => void>();\n private timeoutId = undefined;\n\n private userPrefersReducedMotion: boolean = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n private alertsContainer: HTMLDivElement;\n\n /**\n * Handles the dismissal of an alert\n * @param alert The alert element\n */\n private close = (alert: HTMLWcsAlertElement): void => {\n if (!this.userPrefersReducedMotion) {\n this.timeoutId = setTimeout(() => {\n alert.remove();\n // Cleanup the event listener reference\n this.alertEventListeners.delete(alert);\n }, parseCssTimeValueToMilliseconds(window.getComputedStyle(this.el).getPropertyValue(\"--wcs-alert-drawer-hide-alert-animation-duration\")) || 300);\n } else {\n // If the user has reduced motion preference, remove the alert immediately\n alert.remove();\n // Cleanup the event listener reference\n this.alertEventListeners.delete(alert);\n }\n };\n\n /**\n * Method exposed on `wcs-alert-drawer` to show an alert programmatically via the JS API\n * @example\n * Plain javascript (example inside a script tag):\n * ```javascript\n * document.querySelector('wcs-alert-drawer').show({\n * title: 'Alert title',\n * subtitle: 'Alert subtitle',\n * intent: 'info',\n * showProgressBar: true,\n * timeout: 5000\n * });\n * @param alert The alert to show\n */\n @Method()\n async show(alert: WcsAlertConfig): Promise<void> {\n this.alertsContainer.appendChild(this.renderToast(alert));\n }\n\n private renderToast(alert: WcsAlertConfig): HTMLWcsAlertElement {\n const alertElement = document.createElement('wcs-alert') as HTMLWcsAlertElement;\n alertElement.setAttribute('intent', alert.intent);\n\n // Uses the alert config if defined, otherwise falls back to the drawer default\n // as the showProgressBar is a boolean attribute, we need to set it to an empty string only if true\n if ((alert.showProgressBar ?? this.showProgressBar)) {\n alertElement.setAttribute('show-progress-bar', '');\n }\n \n // Uses the alert config if defined, otherwise falls back to the drawer default\n alertElement.setAttribute('timeout', String(alert.timeout ?? this.timeout));\n\n const listener = () => this.close(alertElement);\n this.alertEventListeners.set(alertElement, listener);\n alertElement.addEventListener(\"wcsAlertDismiss\", listener);\n \n const title = document.createElement('span') as HTMLSpanElement;\n title.setAttribute('slot', 'title');\n title.textContent = alert.title;\n alertElement.appendChild(title);\n\n const subtitle = document.createElement('span') as HTMLSpanElement;\n subtitle.setAttribute('slot', 'subtitle');\n subtitle.textContent = alert.subtitle;\n alertElement.appendChild(subtitle);\n\n return alertElement;\n }\n\n render() {\n // https://www.clever-cloud.com/doc/clever-components/?path=/docs/%F0%9F%9B%A0-toast-cc-toaster--docs#about-accessibility\n return (\n <Host role=\"region\" aria-label=\"Informations\" aria-live=\"polite\" aria-atomic=\"true\">\n <div ref={(el) => this.alertsContainer = el} id=\"alerts-container\">\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.alertEventListeners = new WeakMap(); // Clear the event listeners, weakmap is not iterable\n clearTimeout(this.timeoutId);\n }\n}\n"]}
|
|
@@ -2,9 +2,9 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
export class App {
|
|
3
3
|
render() {
|
|
4
4
|
return [
|
|
5
|
-
h("slot", { key: '
|
|
6
|
-
h("slot", { key: '
|
|
7
|
-
h("slot", { key: '
|
|
5
|
+
h("slot", { key: '615427e4b1e7219b1b78fbca36f8385f64119314', name: "header" }),
|
|
6
|
+
h("slot", { key: 'da5fbe3b8d0eb3963d9e42a9e3396f9bf3d49c0d', name: "sidebar" }),
|
|
7
|
+
h("slot", { key: '3227284afd347f4af0c47ad0f9b46712502df225', name: "content" })
|
|
8
8
|
];
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "wcs-app"; }
|
|
@@ -12,14 +12,18 @@
|
|
|
12
12
|
--wcs-badge-background-color-lighter: var(--wcs-semantic-color-background-surface-accent-lighter);
|
|
13
13
|
--wcs-badge-color: var(--wcs-semantic-color-foreground-primary);
|
|
14
14
|
--wcs-badge-color-lighter: var(--wcs-semantic-color-foreground-inverse);
|
|
15
|
-
--wcs-badge-gap: var(--wcs-semantic-spacing-base);
|
|
16
15
|
--wcs-badge-padding-horizontal-l: var(--wcs-semantic-spacing-base);
|
|
17
16
|
--wcs-badge-padding-horizontal-m: var(--wcs-semantic-spacing-base);
|
|
18
17
|
--wcs-badge-padding-horizontal-s: calc(0.75 * var(--wcs-semantic-spacing-base));
|
|
18
|
+
--wcs-badge-height: var(--wcs-badge-height-m);
|
|
19
|
+
--wcs-badge-gap: calc(var(--wcs-semantic-spacing-base) / 2);
|
|
20
|
+
--wcs-badge-font-size: var(--wcs-badge-font-size-m);
|
|
21
|
+
--wcs-badge-padding-horizontal: var(--wcs-badge-padding-horizontal-m);
|
|
19
22
|
display: inline-flex;
|
|
20
23
|
gap: var(--wcs-badge-gap);
|
|
21
24
|
padding: 0 var(--wcs-badge-padding-horizontal);
|
|
22
25
|
height: var(--wcs-badge-height);
|
|
26
|
+
inline-size: fit-content;
|
|
23
27
|
font-size: var(--wcs-badge-font-size);
|
|
24
28
|
box-sizing: border-box;
|
|
25
29
|
font-weight: var(--wcs-badge-font-weight);
|
|
@@ -30,7 +30,7 @@ export class Badge {
|
|
|
30
30
|
this.size = 'm';
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h("slot", { key: '
|
|
33
|
+
return (h("slot", { key: '6d9646b28344f4d1f05a3efaf798a6273252a8bf' }));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "wcs-badge"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -131,7 +131,7 @@ export class Breadcrumb {
|
|
|
131
131
|
}
|
|
132
132
|
render() {
|
|
133
133
|
const showExpandBtn = this.shouldCollapseItems() && !this.showHiddenItems;
|
|
134
|
-
return (h(Host, { key: '
|
|
134
|
+
return (h(Host, { key: 'f1c0ed14b8806df5c1ba717f6354d2e4c201dcd1' }, h("nav", Object.assign({ key: 'ae39ce6d5af6868105c1cb349d70d04da9931274', class: `wcs-breadcrumb-container${this.showHiddenItems ? ' show-hidden-items' : ''}`, "aria-label": NAV_ARIA_LABEL_DEFAULT }, this.inheritedAttributes, { ref: (el) => this.navEl = el }), h("div", { key: '82f4a76da057076e5d7299df7972bb918220b6ac', role: "list" }, h("slot", { key: 'e3180e059e1467c9821e5d10b0694f39194ce4f4', onSlotchange: this.handleSlotChange.bind(this) }), h("slot", { key: 'e865695a1082a503321d519193f47c54f2d86ba5', name: "non-collapsed" }), h("slot", { key: '53a846e67fe320236a8f0b80216c72fa676304bb', name: "items-before-expand-btn" }), h("slot", { key: 'a6f9243e94d5f4e05e6e3ca89a574ac37128689a', name: "hidden-items" }), showExpandBtn && this.renderExpandAllButton(), h("slot", { key: '0ca62fc184565b82a12d1314bdfb51161934775b', name: "items-after-expand-btn" })))));
|
|
135
135
|
}
|
|
136
136
|
static get is() { return "wcs-breadcrumb"; }
|
|
137
137
|
static get encapsulation() { return "shadow"; }
|
|
@@ -27,7 +27,7 @@ export class BreadcrumbItem {
|
|
|
27
27
|
this.last = false;
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '56e9780cd4ef4603b3a7364384222ffbc69bd4a5', role: "listitem" }, h("slot", { key: 'd3b484440c71efc646b2de9cb5f6ff8154887207' }), !this.last && (h("span", { key: '47eb0cbd394d31e46b0d919ab77d2f61d1d0aeef', class: "item-icon", "aria-hidden": "true" }, ICONS_FONT_CHEVRON_UNICODE))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "wcs-breadcrumb-item"; }
|
|
33
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.js","sourceRoot":"","sources":["../../../src/components/breadcrumb-item/breadcrumb-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,MAAM,OAAO,cAAc;;
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.js","sourceRoot":"","sources":["../../../src/components/breadcrumb-item/breadcrumb-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,MAAM,OAAO,cAAc;;oBAQC,KAAK;;IAE7B,MAAM;QACF,OAAO,CACH,EAAC,IAAI,qDAAC,IAAI,EAAC,UAAU;YACjB,8DAAQ;YACP,CAAC,IAAI,CAAC,IAAI,IAAI,CACX,6DAAM,KAAK,EAAC,WAAW,iBAAa,MAAM,IACrC,0BAA0B,CACxB,CACV,CACE,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, ComponentInterface, h, Host, Prop } from '@stencil/core';\n\nimport { ICONS_FONT_CHEVRON_UNICODE } from '../breadcrumb/breadcrumb-constants';\n\n/**\n * The breadcrumb item represents a link inside a breadcrumb.\n * \n * @slot <no-name> Main container slot\n * \n * @cssprop --wcs-breadcrumb-item-max-height - Maximum height of the breadcrumb item\n * @cssprop --wcs-breadcrumb-item-line-height - Line height of the breadcrumb item\n * @cssprop --wcs-breadcrumb-item-font-size - Font size of the breadcrumb item\n * \n * @cssprop --wcs-breadcrumb-item-icon-color - Color of the breadcrumb item icon\n * @cssprop --wcs-breadcrumb-item-icon-font-size - Font size of the breadcrumb item icon\n * \n * @cssprop --wcs-breadcrumb-item-gap - Gap between text and chevron icon\n * @cssprop --wcs-breadcrumb-item-link-color - Color of the breadcrumb item link\n * @cssprop --wcs-breadcrumb-item-link-color-hover - Color of the breadcrumb item link when hovered\n * @cssprop --wcs-breadcrumb-item-link-font-weight - Font weight of the breadcrumb item link\n * \n * @cssprop --wcs-breadcrumb-item-border-width-focus - Border width of the breadcrumb item when focused\n * @cssprop --wcs-breadcrumb-item-border-color-focus - Border color of the breadcrumb item when focused\n * \n * @cssprop --wcs-breadcrumb-item-active-color - Color of the breadcrumb item when the link is active\n */\n@Component({\n tag: 'wcs-breadcrumb-item',\n styleUrl: 'breadcrumb-item.scss',\n shadow: true,\n})\nexport class BreadcrumbItem implements ComponentInterface {\n /**\n * Automatically set by the parent breadcrumb.\n * True if it is the last breadcrumb item.\n * (You shouldn't set this prop by yourself) \n * @internal\n * @ignore\n */\n @Prop() last: boolean = false;\n\n render() {\n return (\n <Host role=\"listitem\">\n <slot />\n {!this.last && (\n <span class=\"item-icon\" aria-hidden=\"true\">\n {ICONS_FONT_CHEVRON_UNICODE}\n </span>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function isWcsButtonSize(size) {
|
|
3
|
-
// @ts-ignore : ignore size type, as it is checked with WcsButtonSizeValues
|
|
4
|
-
return WcsButtonSizeValues.includes(size);
|
|
5
|
-
}
|
|
1
|
+
export {};
|
|
6
2
|
//# sourceMappingURL=button-interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-interface.js","sourceRoot":"","sources":["../../../src/components/button/button-interface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button-interface.js","sourceRoot":"","sources":["../../../src/components/button/button-interface.ts"],"names":[],"mappings":"","sourcesContent":["import { WcsSize } from '../../shared-types';\n\nexport type WcsButtonType = 'button' | 'submit';\n\nexport type WcsButtonShape = 'normal' | 'round' | 'square';\n\nexport type WcsButtonMode = 'plain' | 'stroked' | 'clear';\n\nexport type WcsButtonSize = Extract<WcsSize, 's' | 'm' | 'l'>;\n"]}
|
|
@@ -247,13 +247,13 @@
|
|
|
247
247
|
margin: calc(-1 * var(--wcs-button-padding-size-l));
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
:host([size=m]) {
|
|
250
|
+
:host, :host([size=m]) {
|
|
251
251
|
--wcs-button-padding: 0 var(--wcs-button-padding-size-m);
|
|
252
252
|
--wcs-button-height: var(--wcs-button-height-m);
|
|
253
253
|
--wcs-button-min-width: var(--wcs-button-height-m);
|
|
254
254
|
--wcs-button-font-size: var(--wcs-button-font-size-m);
|
|
255
255
|
}
|
|
256
|
-
:host([size=m]):host([shape=round]) ::slotted(wcs-mat-icon), :host([size=m]):host([shape=square]) ::slotted(wcs-mat-icon) {
|
|
256
|
+
:host:host([shape=round]) ::slotted(wcs-mat-icon), :host:host([shape=square]) ::slotted(wcs-mat-icon), :host([size=m]):host([shape=round]) ::slotted(wcs-mat-icon), :host([size=m]):host([shape=square]) ::slotted(wcs-mat-icon) {
|
|
257
257
|
margin: calc(-1 * var(--wcs-button-padding-size-m));
|
|
258
258
|
}
|
|
259
259
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { MDCRipple } from "@material/ripple";
|
|
3
|
-
import { isWcsButtonSize, WcsButtonSizeValues } from "./button-interface";
|
|
4
3
|
import { hasShadowDom, inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from "../../utils/helpers";
|
|
5
4
|
const BUTTON_INHERITED_ATTRS = ['tabindex', 'title'];
|
|
6
5
|
/**
|
|
@@ -92,10 +91,6 @@ export class Button {
|
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
componentWillLoad() {
|
|
95
|
-
if (!isWcsButtonSize(this.size)) {
|
|
96
|
-
console.warn(`Invalid size value for wcs-button : "${this.size}". Must be one of "${WcsButtonSizeValues.join(', ')}"`);
|
|
97
|
-
this.size = "m"; // Default fallback value
|
|
98
|
-
}
|
|
99
94
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, BUTTON_INHERITED_ATTRS));
|
|
100
95
|
}
|
|
101
96
|
componentDidLoad() {
|
|
@@ -126,7 +121,7 @@ export class Button {
|
|
|
126
121
|
const attrs = this.href !== undefined
|
|
127
122
|
? { href: this.href, role: 'button', target: this.target }
|
|
128
123
|
: { type: this.type };
|
|
129
|
-
return (h(TagType, Object.assign({ key: '
|
|
124
|
+
return (h(TagType, Object.assign({ key: '0405add37ee45734819cae0f9e91507e979d1c9a' }, attrs, { class: "wcs-inner-button", disabled: this.disabled || this.loading, ref: (el) => this.nativeButton = el }, this.inheritedAttributes), this.loading && h("wcs-spinner", { key: '03debd8eb23a9db035b92c1e9f51e9fe44a6996b' }), h("slot", { key: 'c36416630b0987bd6ef750bfc7ef211c084dd942' })));
|
|
130
125
|
}
|
|
131
126
|
static get is() { return "wcs-button"; }
|
|
132
127
|
static get encapsulation() { return "shadow"; }
|
|
@@ -324,7 +319,7 @@ export class Button {
|
|
|
324
319
|
"text": "Flag to display spinner until the end of action"
|
|
325
320
|
},
|
|
326
321
|
"attribute": "loading",
|
|
327
|
-
"reflect":
|
|
322
|
+
"reflect": true,
|
|
328
323
|
"defaultValue": "false"
|
|
329
324
|
}
|
|
330
325
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EACH,eAAe,EAIf,mBAAmB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGnH,MAAM,sBAAsB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAQH,MAAM,OAAO,MAAM;;QAGP,wBAAmB,GAAyB,EAAE,CAAC;oBAKR,QAAQ;;;wBAiBnB,KAAK;sBAKxB,IAAI;oBAM0B,GAAG;qBAKD,QAAQ;oBAKV,OAAO;uBAKZ,KAAK;;IAE/C;;;OAGG;IAEH,OAAO,CAAC,EAAS;QACb,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAChC,EAAE,CAAC,wBAAwB,EAAE,CAAC;QAClC,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,YAAY,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, ComponentInterface, Element, h, Listen, Method, Prop, Watch } from '@stencil/core';\n\nimport { MDCRipple } from '@material/ripple';\n\nimport {\n isWcsButtonSize,\n WcsButtonMode,\n WcsButtonShape,\n WcsButtonSize,\n WcsButtonSizeValues,\n WcsButtonType\n} from './button-interface';\nimport { hasShadowDom, inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from '../../utils/helpers';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst BUTTON_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The button component is used to trigger an action. It can also be a link when specifying href.\n * \n * ## Accessibility guidelines 💡\n * > If your button doesn't contain text but only an image, you must set a relevant aria-label on the icon 👉 [see \"Square\" story below](#square)\n * \n * ## Click event\n *\n * The WCS button relies on the native click event to pass a user click to your app.\n * For now, it's not possible for us to prevent the click event to be fired when the button's disabled attribute is true.\n * This means you'll receive click events on a disabled wcs button.\n * If you're using the button with a library like Angular or React, they have internal mechanisms to prevent this behavior. Your callbacks will therefore not be called.\n * To fix this problem, we plan to provide a wcsClick event in addition to the native click for applications developed without frameworks.\n *\n * @cssprop --wcs-button-plain-color-default - Text/icon color of a plain button\n * @cssprop --wcs-button-stroked-color-default - text/icon color of a stroked button\n * @cssprop --wcs-button-clear-color-default - text/icon color of a clear button\n * \n * @cssprop --wcs-button-color-disabled - text/icon color disabled for mode plain, stroked, clear\n *\n * @cssprop --wcs-button-plain-background-color-default background color of a plain button\n * @cssprop --wcs-button-plain-background-color-disabled - disabled background color of a plain button\n * @cssprop --wcs-button-stroked-background-color-default background color of a stroked button\n * @cssprop --wcs-button-stroked-background-color-disabled - disabled background color of a stroked button\n * @cssprop --wcs-button-clear-background-color-default background color of a clear button\n * @cssprop --wcs-button-clear-background-color-disabled - disabled background color of a clear button\n * \n * @cssprop --wcs-button-plain-ripple-color-default - ripple background color of a plain button\n * @cssprop --wcs-button-stroked-ripple-color-default - ripple background color of a stroked button\n * @cssprop --wcs-button-clear-ripple-color-default - ripple background color of a clear button\n * @cssprop --wcs-button-border-radius-default - border radius for a default button\n * @cssprop --wcs-button-border-radius-rounded - border radius for a rounded button\n *\n * @cssprop --wcs-button-stroked-border-width - border width of a stroked button\n * @cssprop --wcs-button-stroked-border-color-default - default border color of a stroked button\n * @cssprop --wcs-button-stroked-border-color-disabled - disabled border color of a stroked button\n *\n * @cssprop --wcs-button-height-s - height for a size s button\n * @cssprop --wcs-button-font-size-s - font-size for a size s button\n * @cssprop --wcs-button-padding-size-s - padding for a size s button\n *\n * @cssprop --wcs-button-height-m - height for a size m button\n * @cssprop --wcs-button-font-size-m - font-size for a size m button\n * @cssprop --wcs-button-padding-size-m - padding for a size m button\n *\n * @cssprop --wcs-button-height-l - height for a size l button\n * @cssprop --wcs-button-font-size-l - font-size for a size l button\n * @cssprop --wcs-button-padding-size-l - padding for a size l button\n *\n * @cssprop --wcs-button-font-weight - font weight of a plain,stroked,clear button\n */\n@Component({\n tag: 'wcs-button',\n styleUrl: 'button.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class Button implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * Specify the button type.\n */\n @Prop({ mutable: true }) type: WcsButtonType = 'button';\n\n /**\n * Set a URL to point to.<br/>\n * If specified use a `a` tag instead of `btn`.\n */\n @Prop() href?: string;\n\n /**\n * Specifies where to open the linked document when using href (see prop above)<br/>\n * Default '_self' will open the linked document in the same frame as it was clicked\n */\n @Prop() target?: '_blank' | '_self';\n\n /**\n * Specify whether the button is disabled or not.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Specify whether the button should have a ripple effect or not.\n */\n @Prop() ripple = true;\n private mdcRipple: MDCRipple;\n\n /**\n * Specify the size of the button.\n */\n @Prop({ reflect: true }) size: WcsButtonSize = 'm';\n\n /**\n * Specify the shape of the button.\n */\n @Prop({ reflect: true }) shape: WcsButtonShape = 'normal';\n\n /**\n * This attribute specify the appearance of the button.\n */\n @Prop({ reflect: true }) mode: WcsButtonMode = 'plain';\n\n /**\n * Flag to display spinner until the end of action\n */\n @Prop({mutable: true}) loading: boolean = false;\n\n /**\n * Native event click is emit event if we decide to stop propagation of it\n * @param ev\n */\n @Listen('click') // TODO: define custom event click to be able to stop it's propagation when the custom button is disabled or is in loading state\n onClick(ev: Event) {\n if (this.disabled || this.loading) {\n ev.stopImmediatePropagation();\n }\n if (this.type !== 'button' && hasShadowDom(this.el)) {\n // this button wants to specifically submit a form\n // climb up the dom to see if we're in a <form>\n // and if so, then use JS to submit it\n const form = this.el.closest('form');\n if (form) {\n ev.preventDefault();\n\n const fakeButton = window.document.createElement('button');\n fakeButton.type = this.type;\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n }\n\n componentWillLoad(): Promise<void> | void {\n if (!isWcsButtonSize(this.size)) {\n console.warn(`Invalid size value for wcs-button : \"${this.size}\". Must be one of \"${WcsButtonSizeValues.join(', ')}\"`);\n this.size = \"m\"; // Default fallback value\n }\n\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, BUTTON_INHERITED_ATTRS),\n };\n }\n\n componentDidLoad() {\n this.mdcRipple = new MDCRipple(this.el.shadowRoot.querySelector('.wcs-inner-button'));\n }\n \n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeButton, attr, value);\n }\n\n private enabledRippleEffect() {\n this.mdcRipple.disabled = false;\n }\n\n private disabledRippleEffect() {\n this.mdcRipple.disabled = true;\n }\n\n private getTagName() {\n return this.href !== undefined ? 'a' : 'button';\n }\n\n @Watch('ripple')\n onRippleChange(): void {\n if (this.ripple) {\n this.enabledRippleEffect();\n } else {\n this.disabledRippleEffect();\n }\n }\n\n render() {\n const TagType = this.getTagName();\n const attrs = this.href !== undefined\n ? { href: this.href, role: 'button', target: this.target }\n : { type: this.type };\n return (\n <TagType\n {...attrs}\n class=\"wcs-inner-button\"\n disabled = {this.disabled || this.loading}\n ref={(el: HTMLButtonElement | HTMLAnchorElement) => this.nativeButton = el}\n {...this.inheritedAttributes}\n >\n {\n this.loading && <wcs-spinner></wcs-spinner>\n }\n <slot/>\n </TagType>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAQ7C,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGnH,MAAM,sBAAsB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAQH,MAAM,OAAO,MAAM;;QAGP,wBAAmB,GAAyB,EAAE,CAAC;oBAKR,QAAQ;;;wBAiBV,KAAK;sBAKjC,IAAI;oBAM0B,GAAG;qBAKD,QAAQ;oBAKV,OAAO;uBAKK,KAAK;;IAEhE;;;OAGG;IAEH,OAAO,CAAC,EAAS;QACb,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAChC,EAAE,CAAC,wBAAw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;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, ComponentInterface, Element, h, Listen, Method, Prop, Watch } from '@stencil/core';\n\nimport { MDCRipple } from '@material/ripple';\n\nimport {\n WcsButtonMode,\n WcsButtonShape,\n WcsButtonSize,\n WcsButtonType\n} from './button-interface';\nimport { hasShadowDom, inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from '../../utils/helpers';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst BUTTON_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The button component is used to trigger an action. It can also be a link when specifying href.\n * \n * ## Accessibility guidelines 💡\n * > If your button doesn't contain text but only an image, you must set a relevant aria-label on the icon 👉 [see \"Square\" story below](#square)\n * \n * ## Click event\n *\n * The WCS button relies on the native click event to pass a user click to your app.\n * For now, it's not possible for us to prevent the click event to be fired when the button's disabled attribute is true.\n * This means you'll receive click events on a disabled wcs button.\n * If you're using the button with a library like Angular or React, they have internal mechanisms to prevent this behavior. Your callbacks will therefore not be called.\n * To fix this problem, we plan to provide a wcsClick event in addition to the native click for applications developed without frameworks.\n *\n * @cssprop --wcs-button-plain-color-default - Text/icon color of a plain button\n * @cssprop --wcs-button-stroked-color-default - text/icon color of a stroked button\n * @cssprop --wcs-button-clear-color-default - text/icon color of a clear button\n * \n * @cssprop --wcs-button-color-disabled - text/icon color disabled for mode plain, stroked, clear\n *\n * @cssprop --wcs-button-plain-background-color-default background color of a plain button\n * @cssprop --wcs-button-plain-background-color-disabled - disabled background color of a plain button\n * @cssprop --wcs-button-stroked-background-color-default background color of a stroked button\n * @cssprop --wcs-button-stroked-background-color-disabled - disabled background color of a stroked button\n * @cssprop --wcs-button-clear-background-color-default background color of a clear button\n * @cssprop --wcs-button-clear-background-color-disabled - disabled background color of a clear button\n * \n * @cssprop --wcs-button-plain-ripple-color-default - ripple background color of a plain button\n * @cssprop --wcs-button-stroked-ripple-color-default - ripple background color of a stroked button\n * @cssprop --wcs-button-clear-ripple-color-default - ripple background color of a clear button\n * @cssprop --wcs-button-border-radius-default - border radius for a default button\n * @cssprop --wcs-button-border-radius-rounded - border radius for a rounded button\n *\n * @cssprop --wcs-button-stroked-border-width - border width of a stroked button\n * @cssprop --wcs-button-stroked-border-color-default - default border color of a stroked button\n * @cssprop --wcs-button-stroked-border-color-disabled - disabled border color of a stroked button\n *\n * @cssprop --wcs-button-height-s - height for a size s button\n * @cssprop --wcs-button-font-size-s - font-size for a size s button\n * @cssprop --wcs-button-padding-size-s - padding for a size s button\n *\n * @cssprop --wcs-button-height-m - height for a size m button\n * @cssprop --wcs-button-font-size-m - font-size for a size m button\n * @cssprop --wcs-button-padding-size-m - padding for a size m button\n *\n * @cssprop --wcs-button-height-l - height for a size l button\n * @cssprop --wcs-button-font-size-l - font-size for a size l button\n * @cssprop --wcs-button-padding-size-l - padding for a size l button\n *\n * @cssprop --wcs-button-font-weight - font weight of a plain,stroked,clear button\n */\n@Component({\n tag: 'wcs-button',\n styleUrl: 'button.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class Button implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * Specify the button type.\n */\n @Prop({ mutable: true }) type: WcsButtonType = 'button';\n\n /**\n * Set a URL to point to.<br/>\n * If specified use a `a` tag instead of `btn`.\n */\n @Prop() href?: string;\n\n /**\n * Specifies where to open the linked document when using href (see prop above)<br/>\n * Default '_self' will open the linked document in the same frame as it was clicked\n */\n @Prop() target?: '_blank' | '_self';\n\n /**\n * Specify whether the button is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Specify whether the button should have a ripple effect or not.\n */\n @Prop() ripple = true;\n private mdcRipple: MDCRipple;\n\n /**\n * Specify the size of the button.\n */\n @Prop({ reflect: true }) size: WcsButtonSize = 'm';\n\n /**\n * Specify the shape of the button.\n */\n @Prop({ reflect: true }) shape: WcsButtonShape = 'normal';\n\n /**\n * This attribute specify the appearance of the button.\n */\n @Prop({ reflect: true }) mode: WcsButtonMode = 'plain';\n\n /**\n * Flag to display spinner until the end of action\n */\n @Prop({ reflect: true, mutable: true }) loading: boolean = false;\n\n /**\n * Native event click is emit event if we decide to stop propagation of it\n * @param ev\n */\n @Listen('click') // TODO: define custom event click to be able to stop it's propagation when the custom button is disabled or is in loading state\n onClick(ev: Event) {\n if (this.disabled || this.loading) {\n ev.stopImmediatePropagation();\n }\n if (this.type !== 'button' && hasShadowDom(this.el)) {\n // this button wants to specifically submit a form\n // climb up the dom to see if we're in a <form>\n // and if so, then use JS to submit it\n const form = this.el.closest('form');\n if (form) {\n ev.preventDefault();\n\n const fakeButton = window.document.createElement('button');\n fakeButton.type = this.type;\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n }\n\n componentWillLoad(): Promise<void> | void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, BUTTON_INHERITED_ATTRS),\n };\n }\n\n componentDidLoad() {\n this.mdcRipple = new MDCRipple(this.el.shadowRoot.querySelector('.wcs-inner-button'));\n }\n \n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeButton, attr, value);\n }\n\n private enabledRippleEffect() {\n this.mdcRipple.disabled = false;\n }\n\n private disabledRippleEffect() {\n this.mdcRipple.disabled = true;\n }\n\n private getTagName() {\n return this.href !== undefined ? 'a' : 'button';\n }\n\n @Watch('ripple')\n onRippleChange(): void {\n if (this.ripple) {\n this.enabledRippleEffect();\n } else {\n this.disabledRippleEffect();\n }\n }\n\n render() {\n const TagType = this.getTagName();\n const attrs = this.href !== undefined\n ? { href: this.href, role: 'button', target: this.target }\n : { type: this.type };\n return (\n <TagType\n {...attrs}\n class=\"wcs-inner-button\"\n disabled = {this.disabled || this.loading}\n ref={(el: HTMLButtonElement | HTMLAnchorElement) => this.nativeButton = el}\n {...this.inheritedAttributes}\n >\n {\n this.loading && <wcs-spinner></wcs-spinner>\n }\n <slot/>\n </TagType>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-interface.js","sourceRoot":"","sources":["../../../src/components/card/card-interface.ts"],"names":[],"mappings":"","sourcesContent":["export type CardMode = 'flat' | 'raised';\n"]}
|
|
1
|
+
{"version":3,"file":"card-interface.js","sourceRoot":"","sources":["../../../src/components/card/card-interface.ts"],"names":[],"mappings":"","sourcesContent":["export type CardMode = 'flat' | 'raised';\nexport type CardOrientation = 'horizontal' | 'vertical';\n"]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--wcs-card-border-width: var(--wcs-semantic-border-width-default);
|
|
5
5
|
--wcs-card-background-color: var(--wcs-semantic-color-background-surface-primary);
|
|
6
6
|
--wcs-card-text-color: var(--wcs-semantic-color-text-primary);
|
|
7
|
+
--wcs-card-horizontal-min-height: 160px;
|
|
7
8
|
position: relative;
|
|
8
9
|
display: flex;
|
|
9
10
|
flex-direction: column;
|
|
@@ -22,4 +23,13 @@
|
|
|
22
23
|
|
|
23
24
|
:host([mode=flat]) {
|
|
24
25
|
border: solid var(--wcs-card-border-width) var(--wcs-card-border-color);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([orientation=horizontal]) {
|
|
29
|
+
flex-direction: row;
|
|
30
|
+
min-height: var(--wcs-card-horizontal-height);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([orientation=vertical]) {
|
|
34
|
+
flex-direction: column;
|
|
25
35
|
}
|
|
@@ -3,18 +3,48 @@ import { h } from "@stencil/core";
|
|
|
3
3
|
* The card component is a container that display content such as text, images, buttons, and lists.
|
|
4
4
|
* A card can be a single component, but is often made up of a header, title, subtitle, and content.
|
|
5
5
|
*
|
|
6
|
+
* While they're very flexible, it's important to use them consistently. You may use `wcs-card-media` outside `wcs-card-body`
|
|
7
|
+
* and `wcs-card-header` `wcs-card-content` `wcs-card-footer` within `wcs-card-body` to make sure the card is well-designed.
|
|
8
|
+
*
|
|
9
|
+
* @slot - Default slot for the card content
|
|
10
|
+
*
|
|
6
11
|
* @cssprop --wcs-card-border-color - Border color of the card
|
|
7
12
|
* @cssprop --wcs-card-border-radius - Border radius of the card
|
|
8
13
|
* @cssprop --wcs-card-border-width - Border width of the card
|
|
9
14
|
* @cssprop --wcs-card-background-color - Background color of the card
|
|
10
15
|
* @cssprop --wcs-card-text-color - Text color of the card
|
|
16
|
+
* @cssprop --wcs-card-horizontal-min-height - Min height of the card when horizontal
|
|
11
17
|
*/
|
|
12
18
|
export class Card {
|
|
13
19
|
constructor() {
|
|
14
20
|
this.mode = 'flat';
|
|
21
|
+
this.orientation = null;
|
|
22
|
+
}
|
|
23
|
+
orientationChanged() {
|
|
24
|
+
this.updateWcsCardImageOrientation();
|
|
25
|
+
}
|
|
26
|
+
onSlotChange() {
|
|
27
|
+
if (this.orientation) {
|
|
28
|
+
this.updateWcsCardBodyOrientation();
|
|
29
|
+
this.updateWcsCardImageOrientation();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
updateWcsCardImageOrientation() {
|
|
33
|
+
var _a;
|
|
34
|
+
(_a = this.findWcsCardMedia()) === null || _a === void 0 ? void 0 : _a.setOrientation(this.orientation);
|
|
35
|
+
}
|
|
36
|
+
updateWcsCardBodyOrientation() {
|
|
37
|
+
var _a;
|
|
38
|
+
(_a = this.findWcsCardBody()) === null || _a === void 0 ? void 0 : _a.setOrientation(this.orientation);
|
|
39
|
+
}
|
|
40
|
+
findWcsCardMedia() {
|
|
41
|
+
return this.el.querySelector('wcs-card-media');
|
|
42
|
+
}
|
|
43
|
+
findWcsCardBody() {
|
|
44
|
+
return this.el.querySelector('wcs-card-body');
|
|
15
45
|
}
|
|
16
46
|
render() {
|
|
17
|
-
return (h("slot", { key: '
|
|
47
|
+
return (h("slot", { key: '20a57cf8fc64155e65a98bdb69618ec013ea5a7f', onSlotchange: () => this.onSlotChange() }));
|
|
18
48
|
}
|
|
19
49
|
static get is() { return "wcs-card"; }
|
|
20
50
|
static get encapsulation() { return "shadow"; }
|
|
@@ -53,8 +83,39 @@ export class Card {
|
|
|
53
83
|
"attribute": "mode",
|
|
54
84
|
"reflect": true,
|
|
55
85
|
"defaultValue": "'flat'"
|
|
86
|
+
},
|
|
87
|
+
"orientation": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"mutable": false,
|
|
90
|
+
"complexType": {
|
|
91
|
+
"original": "CardOrientation",
|
|
92
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
93
|
+
"references": {
|
|
94
|
+
"CardOrientation": {
|
|
95
|
+
"location": "import",
|
|
96
|
+
"path": "./card-interface",
|
|
97
|
+
"id": "src/components/card/card-interface.ts::CardOrientation"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": "The orientation of the card, can be horizontal or vertical"
|
|
106
|
+
},
|
|
107
|
+
"attribute": "orientation",
|
|
108
|
+
"reflect": true,
|
|
109
|
+
"defaultValue": "null"
|
|
56
110
|
}
|
|
57
111
|
};
|
|
58
112
|
}
|
|
113
|
+
static get elementRef() { return "el"; }
|
|
114
|
+
static get watchers() {
|
|
115
|
+
return [{
|
|
116
|
+
"propName": "orientation",
|
|
117
|
+
"methodName": "orientationChanged"
|
|
118
|
+
}];
|
|
119
|
+
}
|
|
59
120
|
}
|
|
60
121
|
//# sourceMappingURL=card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGvF;;;;;;;;;;;;;;;GAeG;AAMH,MAAM,OAAO,IAAI;;oBAGI,MAAM;2BAKQ,IAAI;;IAGnC,kBAAkB;QACd,IAAI,CAAC,6BAA6B,EAAE,CAAC;IACzC,CAAC;IAEO,YAAY;QAChB,IAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YAClB,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,6BAA6B,EAAE,CAAC;QACzC,CAAC;IACL,CAAC;IAEO,6BAA6B;;QACjC,MAAA,IAAI,CAAC,gBAAgB,EAAE,0CAAE,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9D,CAAC;IAEO,4BAA4B;;QAChC,MAAA,IAAI,CAAC,eAAe,EAAE,0CAAE,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7D,CAAC;IAEO,gBAAgB;QACpB,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACnD,CAAC;IAEO,eAAe;QACnB,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,CACH,6DAAM,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CACnD,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, ComponentInterface, h, Prop, Element, Watch } from '@stencil/core';\nimport { CardMode, CardOrientation } from './card-interface';\n\n/**\n * The card component is a container that display content such as text, images, buttons, and lists. \n * A card can be a single component, but is often made up of a header, title, subtitle, and content.\n * \n * While they're very flexible, it's important to use them consistently. You may use `wcs-card-media` outside `wcs-card-body`\n * and `wcs-card-header` `wcs-card-content` `wcs-card-footer` within `wcs-card-body` to make sure the card is well-designed.\n *\n * @slot - Default slot for the card content\n * \n * @cssprop --wcs-card-border-color - Border color of the card\n * @cssprop --wcs-card-border-radius - Border radius of the card\n * @cssprop --wcs-card-border-width - Border width of the card\n * @cssprop --wcs-card-background-color - Background color of the card\n * @cssprop --wcs-card-text-color - Text color of the card\n * @cssprop --wcs-card-horizontal-min-height - Min height of the card when horizontal\n */\n@Component({\n tag: 'wcs-card',\n styleUrl: 'card.scss',\n shadow: true\n})\nexport class Card implements ComponentInterface {\n @Element() private el!: HTMLElement;\n @Prop({reflect: true, mutable: true})\n mode: CardMode = 'flat';\n /**\n * The orientation of the card, can be horizontal or vertical\n */\n @Prop({reflect: true})\n orientation: CardOrientation = null;\n\n @Watch('orientation')\n orientationChanged() {\n this.updateWcsCardImageOrientation();\n }\n\n private onSlotChange() {\n if(this.orientation) {\n this.updateWcsCardBodyOrientation();\n this.updateWcsCardImageOrientation();\n }\n }\n\n private updateWcsCardImageOrientation() {\n this.findWcsCardMedia()?.setOrientation(this.orientation);\n }\n\n private updateWcsCardBodyOrientation() {\n this.findWcsCardBody()?.setOrientation(this.orientation);\n }\n\n private findWcsCardMedia(): HTMLWcsCardMediaElement {\n return this.el.querySelector('wcs-card-media');\n }\n\n private findWcsCardBody(): HTMLWcsCardBodyElement {\n return this.el.querySelector('wcs-card-body');\n }\n\n render() {\n return (\n <slot onSlotchange={() => this.onSlotChange()}/>\n );\n }\n}\n"]}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
--wcs-card-body-padding: var(--wcs-semantic-spacing-
|
|
2
|
+
--wcs-card-body-padding: var(--wcs-semantic-spacing-base-300);
|
|
3
|
+
--wcs-card-body-gap: var(--wcs-semantic-spacing-base);
|
|
3
4
|
flex: 1 1 auto;
|
|
4
5
|
padding: var(--wcs-card-body-padding);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host(.horizontal), :host(.vertical) {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: var(--wcs-card-body-gap);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
::slotted(p) {
|
|
15
|
+
margin: 0;
|
|
5
16
|
}
|