wcs-core 7.0.0 → 7.1.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/design-tokens/dist/sncf-holding-root-scoped.css +589 -0
- package/design-tokens/dist/sncf-holding.css +13 -0
- package/design-tokens/dist/sncf-holding.json +54 -0
- package/design-tokens/dist/sncf-reseau-root-scoped.css +652 -0
- package/design-tokens/dist/sncf-reseau.css +10 -0
- 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 +13 -0
- 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-e4f29c78.js} +3 -3
- package/dist/cjs/{grid-pagination-2c752b22.js.map → grid-pagination-e4f29c78.js.map} +1 -1
- 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 +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-badge.cjs.entry.js +1 -1
- package/dist/cjs/wcs-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/wcs-button_2.cjs.entry.js +3 -3
- package/dist/cjs/wcs-button_2.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 +2 -2
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +2 -2
- package/dist/cjs/wcs-com-nav.cjs.entry.js +2 -2
- package/dist/cjs/wcs-counter.cjs.entry.js +13 -5
- package/dist/cjs/wcs-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-dropdown.cjs.entry.js +3 -3
- 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 +6 -6
- package/dist/cjs/wcs-header.cjs.entry.js +2 -2
- 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-icon.cjs.entry.js +2 -2
- package/dist/cjs/wcs-input.cjs.entry.js +5 -3
- 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-modal.cjs.entry.js +17 -3
- package/dist/cjs/wcs-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-native-select.cjs.entry.js +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 +2 -2
- package/dist/cjs/wcs-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/wcs-progress-radial.cjs.entry.js +3 -3
- 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 +8 -7
- 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 +2 -2
- 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/components/action-bar/action-bar.js +2 -2
- package/dist/collection/components/action-bar/action-bar.js.map +1 -1
- package/dist/collection/components/badge/badge.css +1 -0
- package/dist/collection/components/button/button.js +2 -2
- package/dist/collection/components/button/button.js.map +1 -1
- 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-item/com-nav-item.css +2 -1
- package/dist/collection/components/counter/counter.css +3 -0
- package/dist/collection/components/counter/counter.js +13 -5
- package/dist/collection/components/counter/counter.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.js +2 -2
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/editable-field/editable-field.css +31 -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/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 +3 -3
- package/dist/collection/components/grid-column/grid-column.js +2 -2
- 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.js +1 -1
- package/dist/collection/components/header/header.js +1 -1
- package/dist/collection/components/hint/hint.js +1 -1
- package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/input/input.css +10 -1
- package/dist/collection/components/input/input.js +42 -3
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/label/label.js +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 +1 -1
- 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.js +1 -1
- 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.js +2 -2
- package/dist/collection/components/progress-radial/progress-radial.js +2 -2
- 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.js +22 -3
- 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/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.js +2 -2
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.js +10 -8
- 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-976a86e9.js} +3 -3
- package/dist/esm/{grid-pagination-421689be.js.map → grid-pagination-976a86e9.js.map} +1 -1
- 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 +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-badge.entry.js +1 -1
- package/dist/esm/wcs-badge.entry.js.map +1 -1
- package/dist/esm/wcs-breadcrumb.entry.js +1 -1
- package/dist/esm/wcs-button_2.entry.js +3 -3
- package/dist/esm/wcs-button_2.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 +2 -2
- package/dist/esm/wcs-com-nav-item.entry.js +1 -1
- package/dist/esm/wcs-com-nav-item.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav-submenu.entry.js +2 -2
- package/dist/esm/wcs-com-nav.entry.js +2 -2
- package/dist/esm/wcs-counter.entry.js +13 -5
- package/dist/esm/wcs-counter.entry.js.map +1 -1
- package/dist/esm/wcs-dropdown-item.entry.js +1 -1
- package/dist/esm/wcs-dropdown.entry.js +3 -3
- 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 +6 -6
- package/dist/esm/wcs-header.entry.js +2 -2
- package/dist/esm/wcs-hint.entry.js +1 -1
- package/dist/esm/wcs-horizontal-stepper.entry.js +1 -1
- package/dist/esm/wcs-icon.entry.js +2 -2
- package/dist/esm/wcs-input.entry.js +5 -3
- 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-modal.entry.js +17 -3
- package/dist/esm/wcs-modal.entry.js.map +1 -1
- package/dist/esm/wcs-native-select.entry.js +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 +2 -2
- package/dist/esm/wcs-progress-bar.entry.js +3 -3
- package/dist/esm/wcs-progress-radial.entry.js +3 -3
- 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 +8 -7
- 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 +2 -2
- 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/checkbox/checkbox.d.ts +3 -1
- 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/input/input.d.ts +3 -0
- package/dist/types/components/list-item/list-item.d.ts +5 -0
- 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 +4 -0
- package/dist/types/components/switch/switch.d.ts +3 -1
- package/dist/types/components/tooltip/tooltip.d.ts +3 -5
- package/dist/types/components.d.ts +87 -16
- 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-45a6934d.entry.js → p-0ffdfc10.entry.js} +2 -2
- package/dist/wcs/{p-9f23c49e.entry.js → p-13090618.entry.js} +2 -2
- package/dist/wcs/{p-8f0e093f.entry.js → p-13e50077.entry.js} +2 -2
- package/dist/wcs/p-1438530e.entry.js +2 -0
- package/dist/wcs/p-1438530e.entry.js.map +1 -0
- package/dist/wcs/{p-2305f257.entry.js → p-16dd21cf.entry.js} +2 -2
- package/dist/wcs/{p-85a5bbb7.entry.js → p-206c01d5.entry.js} +2 -2
- package/dist/wcs/{p-85a5bbb7.entry.js.map → p-206c01d5.entry.js.map} +1 -1
- package/dist/wcs/{p-09d0a296.entry.js → p-21b964cd.entry.js} +3 -3
- package/dist/wcs/p-21b964cd.entry.js.map +1 -0
- package/dist/wcs/p-21d2f06f.entry.js +2 -0
- package/dist/wcs/p-21d2f06f.entry.js.map +1 -0
- package/dist/wcs/{p-2add4d4d.entry.js → p-258855a1.entry.js} +2 -2
- package/dist/wcs/{p-2c9e20c1.entry.js → p-294732f7.entry.js} +2 -2
- package/dist/wcs/{p-15ff9f93.entry.js → p-29f5b974.entry.js} +2 -2
- package/dist/wcs/{p-1ab0d13b.entry.js → p-2adf00be.entry.js} +2 -2
- package/dist/wcs/p-2adf00be.entry.js.map +1 -0
- package/dist/wcs/p-37800935.entry.js +2 -0
- package/dist/wcs/{p-76f07dbd.entry.js → p-388e6d75.entry.js} +2 -2
- package/dist/wcs/{p-8bd1b9ce.entry.js → p-43d70995.entry.js} +2 -2
- package/dist/wcs/{p-9553d60e.entry.js → p-4661290b.entry.js} +2 -2
- package/dist/wcs/{p-9553d60e.entry.js.map → p-4661290b.entry.js.map} +1 -1
- package/dist/wcs/{p-d2a4f609.entry.js → p-4dc52a25.entry.js} +2 -2
- package/dist/wcs/{p-25b96cde.entry.js → p-50523b53.entry.js} +2 -2
- package/dist/wcs/p-50523b53.entry.js.map +1 -0
- package/dist/wcs/p-52d77e1f.js +2 -0
- package/dist/wcs/p-52d77e1f.js.map +1 -0
- package/dist/wcs/p-5974be61.entry.js +2 -0
- package/dist/wcs/p-5974be61.entry.js.map +1 -0
- package/dist/wcs/{p-0fa370d7.entry.js → p-5bf73e05.entry.js} +3 -3
- package/dist/wcs/{p-0fa370d7.entry.js.map → p-5bf73e05.entry.js.map} +1 -1
- package/dist/wcs/{p-e19308cf.entry.js → p-5d5f50ed.entry.js} +2 -2
- package/dist/wcs/{p-94ff8939.entry.js → p-5de993d7.entry.js} +2 -2
- package/dist/wcs/p-5de993d7.entry.js.map +1 -0
- package/dist/wcs/{p-a788b5bd.entry.js → p-619e1110.entry.js} +2 -2
- package/dist/wcs/{p-9e03b379.entry.js → p-694724a2.entry.js} +2 -2
- package/dist/wcs/{p-f8d2be83.entry.js → p-6b06d2e7.entry.js} +2 -2
- package/dist/wcs/p-6f5d570a.entry.js +2 -0
- package/dist/wcs/p-6f5d570a.entry.js.map +1 -0
- package/dist/wcs/p-71db0ed5.entry.js +2 -0
- package/dist/wcs/{p-209145de.entry.js → p-76c92e22.entry.js} +2 -2
- package/dist/wcs/{p-f06aa79d.entry.js → p-796e690d.entry.js} +2 -2
- package/dist/wcs/{p-f06aa79d.entry.js.map → p-796e690d.entry.js.map} +1 -1
- package/dist/wcs/{p-97cbbcfc.entry.js → p-7d665a7e.entry.js} +2 -2
- package/dist/wcs/p-89b8c724.js +2 -0
- package/dist/wcs/{p-412b0021.js → p-8fcceaf1.js} +2 -2
- package/dist/wcs/p-9243a323.entry.js +2 -0
- package/dist/wcs/p-9243a323.entry.js.map +1 -0
- package/dist/wcs/p-94aa269f.entry.js +2 -0
- package/dist/wcs/p-94aa269f.entry.js.map +1 -0
- package/dist/wcs/{p-87b69cac.entry.js → p-9554196c.entry.js} +2 -2
- package/dist/wcs/{p-80a23f9c.entry.js → p-96bff8fe.entry.js} +2 -2
- package/dist/wcs/{p-80a23f9c.entry.js.map → p-96bff8fe.entry.js.map} +1 -1
- package/dist/wcs/{p-fa507e06.entry.js → p-9ad23e83.entry.js} +2 -2
- package/dist/wcs/{p-5ea2aba5.entry.js → p-9c012aae.entry.js} +2 -2
- package/dist/wcs/p-9dc3f9a5.entry.js +2 -0
- package/dist/wcs/p-9dc3f9a5.entry.js.map +1 -0
- package/dist/wcs/p-9eb66fa9.entry.js +2 -0
- package/dist/wcs/p-a7468a3a.js +2 -0
- package/dist/wcs/p-a7468a3a.js.map +1 -0
- package/dist/wcs/{p-4982f96c.entry.js → p-a7891233.entry.js} +2 -2
- package/dist/wcs/p-b2080509.entry.js +2 -0
- package/dist/wcs/{p-806315e6.entry.js.map → p-b2080509.entry.js.map} +1 -1
- package/dist/wcs/p-b96f4921.entry.js +2 -0
- package/dist/wcs/p-b96f4921.entry.js.map +1 -0
- package/dist/wcs/{p-276b8125.entry.js → p-c2d35aa6.entry.js} +3 -3
- package/dist/wcs/{p-276b8125.entry.js.map → p-c2d35aa6.entry.js.map} +1 -1
- package/dist/wcs/p-c752b85a.entry.js +2 -0
- package/dist/wcs/{p-b0f8190f.entry.js → p-d895ffb4.entry.js} +2 -2
- package/dist/wcs/{p-1e5aa960.entry.js → p-d9525519.entry.js} +2 -2
- package/dist/wcs/p-d9525519.entry.js.map +1 -0
- package/dist/wcs/{p-db81b74f.entry.js → p-da4636fa.entry.js} +2 -2
- package/dist/wcs/p-da4636fa.entry.js.map +1 -0
- package/dist/wcs/p-dd60a6db.entry.js +2 -0
- package/dist/wcs/p-dd60a6db.entry.js.map +1 -0
- package/dist/wcs/p-dddcd685.entry.js +2 -0
- package/dist/wcs/p-dddcd685.entry.js.map +1 -0
- package/dist/wcs/p-e36b2ad1.entry.js +2 -0
- package/dist/wcs/p-f87636f6.entry.js +2 -0
- package/dist/wcs/p-f87636f6.entry.js.map +1 -0
- package/dist/wcs/p-fc115de4.entry.js +2 -0
- package/dist/wcs/wcs.esm.js +1 -1
- package/dist/wcs/wcs.esm.js.map +1 -1
- package/package.json +1 -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/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.map +0 -1
- package/dist/wcs/p-1e5aa960.entry.js.map +0 -1
- package/dist/wcs/p-25b96cde.entry.js.map +0 -1
- package/dist/wcs/p-400a71d7.entry.js +0 -2
- 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-5f517eb5.entry.js +0 -2
- package/dist/wcs/p-806315e6.entry.js +0 -2
- package/dist/wcs/p-8780a429.entry.js +0 -2
- package/dist/wcs/p-8780a429.entry.js.map +0 -1
- package/dist/wcs/p-94ff8939.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-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-bf31245c.entry.js +0 -2
- package/dist/wcs/p-bf31245c.entry.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-d42831b2.entry.js +0 -2
- package/dist/wcs/p-d42831b2.entry.js.map +0 -1
- 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-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-45a6934d.entry.js.map → p-0ffdfc10.entry.js.map} +0 -0
- /package/dist/wcs/{p-9f23c49e.entry.js.map → p-13090618.entry.js.map} +0 -0
- /package/dist/wcs/{p-8f0e093f.entry.js.map → p-13e50077.entry.js.map} +0 -0
- /package/dist/wcs/{p-2305f257.entry.js.map → p-16dd21cf.entry.js.map} +0 -0
- /package/dist/wcs/{p-2add4d4d.entry.js.map → p-258855a1.entry.js.map} +0 -0
- /package/dist/wcs/{p-2c9e20c1.entry.js.map → p-294732f7.entry.js.map} +0 -0
- /package/dist/wcs/{p-15ff9f93.entry.js.map → p-29f5b974.entry.js.map} +0 -0
- /package/dist/wcs/{p-e64d7437.entry.js.map → p-37800935.entry.js.map} +0 -0
- /package/dist/wcs/{p-76f07dbd.entry.js.map → p-388e6d75.entry.js.map} +0 -0
- /package/dist/wcs/{p-8bd1b9ce.entry.js.map → p-43d70995.entry.js.map} +0 -0
- /package/dist/wcs/{p-d2a4f609.entry.js.map → p-4dc52a25.entry.js.map} +0 -0
- /package/dist/wcs/{p-e19308cf.entry.js.map → p-5d5f50ed.entry.js.map} +0 -0
- /package/dist/wcs/{p-a788b5bd.entry.js.map → p-619e1110.entry.js.map} +0 -0
- /package/dist/wcs/{p-9e03b379.entry.js.map → p-694724a2.entry.js.map} +0 -0
- /package/dist/wcs/{p-f8d2be83.entry.js.map → p-6b06d2e7.entry.js.map} +0 -0
- /package/dist/wcs/{p-5f517eb5.entry.js.map → p-71db0ed5.entry.js.map} +0 -0
- /package/dist/wcs/{p-209145de.entry.js.map → p-76c92e22.entry.js.map} +0 -0
- /package/dist/wcs/{p-97cbbcfc.entry.js.map → p-7d665a7e.entry.js.map} +0 -0
- /package/dist/wcs/{p-4d6d1d14.js.map → p-89b8c724.js.map} +0 -0
- /package/dist/wcs/{p-412b0021.js.map → p-8fcceaf1.js.map} +0 -0
- /package/dist/wcs/{p-87b69cac.entry.js.map → p-9554196c.entry.js.map} +0 -0
- /package/dist/wcs/{p-fa507e06.entry.js.map → p-9ad23e83.entry.js.map} +0 -0
- /package/dist/wcs/{p-5ea2aba5.entry.js.map → p-9c012aae.entry.js.map} +0 -0
- /package/dist/wcs/{p-19c77b5c.entry.js.map → p-9eb66fa9.entry.js.map} +0 -0
- /package/dist/wcs/{p-4982f96c.entry.js.map → p-a7891233.entry.js.map} +0 -0
- /package/dist/wcs/{p-400a71d7.entry.js.map → p-c752b85a.entry.js.map} +0 -0
- /package/dist/wcs/{p-b0f8190f.entry.js.map → p-d895ffb4.entry.js.map} +0 -0
- /package/dist/wcs/{p-f264d46f.entry.js.map → p-e36b2ad1.entry.js.map} +0 -0
- /package/dist/wcs/{p-a66a4289.entry.js.map → p-fc115de4.entry.js.map} +0 -0
package/dist/cjs/wcs.cjs.js
CHANGED
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy(JSON.parse("[[\"wcs-grid-pagination.cjs\",[[1,\"wcs-grid-pagination\",{\"availablePageSizes\":[16],\"currentPage\":[1026,\"current-page\"],\"pageSize\":[2,\"page-size\"],\"itemsCount\":[2,\"items-count\"],\"pageCount\":[2,\"page-count\"],\"setAriaAttribute\":[64]}]]],[\"wcs-editable-field.cjs\",[[1,\"wcs-editable-field\",{\"type\":[1],\"label\":[1],\"readonly\":[4],\"value\":[1032],\"validateFn\":[16],\"formatFn\":[16],\"errorMsg\":[1,\"error-msg\"],\"size\":[513],\"currentState\":[32],\"isError\":[32]},[[8,\"click\",\"onWindowClickEvent\"]],{\"value\":[\"onValueChange\"]}]]],[\"wcs-horizontal-stepper.cjs\",[[1,\"wcs-horizontal-stepper\",{\"currentStep\":[1026,\"current-step\"],\"steps\":[16],\"mode\":[1],\"checkOnComplete\":[4,\"check-on-complete\"],\"internalCurrentStepIndex\":[32],\"previous\":[64],\"next\":[64]},null,{\"currentStep\":[\"onCurrentStepChange\"]}]]],[\"wcs-breadcrumb.cjs\",[[1,\"wcs-breadcrumb\",{\"maxItems\":[2,\"max-items\"],\"itemsBeforeCollapse\":[2,\"items-before-collapse\"],\"itemsAfterCollapse\":[2,\"items-after-collapse\"],\"ariaLabelExpandButton\":[1,\"aria-label-expand-button\"],\"showHiddenItems\":[32],\"setAriaAttribute\":[64]},null,{\"maxItems\":[\"handleCollapsePropsChange\"],\"itemsBeforeCollapse\":[\"handleCollapsePropsChange\"],\"itemsAfterCollapse\":[\"handleCollapsePropsChange\"],\"ariaLabelExpandButton\":[\"handleAriaLabelExpandBtnChange\"]}]]],[\"wcs-counter.cjs\",[[17,\"wcs-counter\",{\"size\":[513],\"label\":[1],\"disabled\":[4],\"min\":[1026],\"max\":[1026],\"step\":[1026],\"value\":[1026],\"displayedValue\":[32],\"setAriaAttribute\":[64]},null,{\"value\":[\"valueChange\"]}]]],[\"wcs-grid.cjs\",[[1,\"wcs-grid\",{\"serverMode\":[4,\"server-mode\"],\"data\":[16],\"loading\":[4],\"selectionConfig\":[1,\"selection-config\"],\"selectedItems\":[8,\"selected-items\"],\"wcsGridPaginationId\":[1,\"wcs-grid-pagination-id\"],\"rowIdPath\":[1,\"row-id-path\"],\"rowCssPartsFn\":[16],\"columns\":[32],\"paginationEl\":[32],\"rows\":[32],\"cursorPosition\":[32],\"setAriaAttribute\":[64]},[[0,\"focus\",\"onFocus\"],[0,\"blur\",\"onBlur\"],[0,\"wcsHiddenChange\",\"onHiddenColumnChange\"],[0,\"keydown\",\"onKeyDown\"],[1,\"mousedown\",\"onClick\"],[0,\"wcsSortChange\",\"sortChangeEventHandler\"],[0,\"wcsGridPaginationChange\",\"paginationChangeEventHandler\"],[8,\"wcsGridPaginationChange\",\"paginationChangeEventHandlerOutside\"]],{\"cursorPosition\":[\"onCursorPositionChange\"],\"data\":[\"onDataChange\"],\"selectedItems\":[\"onSelectedItemsPropertyChange\"]}]]],[\"wcs-modal.cjs\",[[4,\"wcs-modal\",{\"withoutBackdrop\":[516,\"without-backdrop\"],\"show\":[1540],\"showCloseButton\":[516,\"show-close-button\"],\"closeButtonAriaLabel\":[1,\"close-button-aria-label\"],\"size\":[1],\"hideActions\":[516,\"hide-actions\"],\"modalTriggerControlsId\":[1,\"modal-trigger-controls-id\"],\"setAriaAttribute\":[64]},[[4,\"keydown\",\"onKeyDown\"]],{\"show\":[\"onShowChange\"]}]]],[\"wcs-dropdown.cjs\",[[17,\"wcs-dropdown\",{\"noArrow\":[4,\"no-arrow\"],\"mode\":[1],\"shape\":[1],\"size\":[1],\"disabled\":[4],\"placement\":[1],\"expanded\":[32],\"setAriaAttribute\":[64]},[[0,\"blur\",\"onBlur\"],[8,\"click\",\"onWindowClickEvent\"],[0,\"wcsDropdownItemClick\",\"dropdownItemClick\"],[0,\"keydown\",\"onKeyDown\"]],{\"placement\":[\"placementChange\"]}]]],[\"wcs-galactic-menu.cjs\",[[1,\"wcs-galactic-menu\",{\"text\":[1],\"showPopoverMenu\":[32],\"setAriaAttribute\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-input.cjs\",[[17,\"wcs-input\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"accept\":[1],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"debounce\":[2],\"prefixLabel\":[1,\"prefix-label\"],\"suffixLabel\":[1,\"suffix-label\"],\"disabled\":[4],\"enterkeyhint\":[1],\"size\":[513],\"icon\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"multiple\":[4],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"state\":[513],\"step\":[1],\"type\":[1],\"value\":[1032],\"passwordReveal\":[32],\"setBlur\":[64],\"getInputElement\":[64],\"setAriaAttribute\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"passwordReveal\":[\"onPasswordRevealChange\"]}]]],[\"wcs-textarea.cjs\",[[17,\"wcs-textarea\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"autocapitalize\":[1],\"autofocus\":[4],\"debounce\":[2],\"disabled\":[4],\"icon\":[1],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"state\":[513],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"autoGrow\":[4,\"auto-grow\"],\"value\":[1025],\"resize\":[513],\"setAriaAttribute\":[64],\"fitContent\":[64],\"setBlur\":[64],\"getInputElement\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}]]],[\"wcs-accordion.cjs\",[[1,\"wcs-accordion\",{\"hideActionText\":[516,\"hide-action-text\"],\"highlight\":[516],\"groupContentWithHeader\":[516,\"group-content-with-header\"]},[[0,\"wcsOpenChange\",\"wcsOpenChangeHandler\"]],{\"hideActionText\":[\"updateHideActiontextOnPanel\"],\"highlight\":[\"updateHighlightOnPanel\"],\"groupContentWithHeader\":[\"updateGroupContentWithHeader\"]}]]],[\"wcs-accordion-content.cjs\",[[1,\"wcs-accordion-content\"]]],[\"wcs-accordion-header.cjs\",[[1,\"wcs-accordion-header\"]]],[\"wcs-accordion-panel.cjs\",[[1,\"wcs-accordion-panel\",{\"open\":[1540],\"hideActionText\":[516,\"hide-action-text\"],\"highlight\":[516],\"groupContentWithHeader\":[516,\"group-content-with-header\"],\"setAriaAttribute\":[64],\"close\":[64]},null,{\"open\":[\"openChange\"]}]]],[\"wcs-action-bar.cjs\",[[1,\"wcs-action-bar\",{\"gutter\":[4],\"hasTabs\":[32]}]]],[\"wcs-app.cjs\",[[1,\"wcs-app\"]]],[\"wcs-badge.cjs\",[[1,\"wcs-badge\",{\"shape\":[1],\"color\":[1],\"size\":[513]}]]],[\"wcs-breadcrumb-item.cjs\",[[1,\"wcs-breadcrumb-item\",{\"last\":[4]}]]],[\"wcs-card.cjs\",[[1,\"wcs-card\",{\"mode\":[1537]}]]],[\"wcs-card-body.cjs\",[[1,\"wcs-card-body\"]]],[\"wcs-com-nav.cjs\",[[1,\"wcs-com-nav\",{\"appName\":[1,\"app-name\"],\"mobileMenuOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64]},[[0,\"wcsClickOnFinalAction\",\"onClickOnFinalAction\"],[8,\"keydown\",\"exitMobileMenuOnKeyDown\"]]]]],[\"wcs-com-nav-category.cjs\",[[1,\"wcs-com-nav-category\",{\"label\":[1],\"categoryOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64],\"close\":[64],\"open\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[8,\"wcsCategoryOpened\",\"onSubmenuOpened\"]]]]],[\"wcs-com-nav-item.cjs\",[[1,\"wcs-com-nav-item\",null,[[0,\"click\",\"onClick\"]]]]],[\"wcs-com-nav-submenu.cjs\",[[1,\"wcs-com-nav-submenu\",{\"label\":[1],\"panelTitle\":[1,\"panel-title\"],\"panelDescription\":[1,\"panel-description\"],\"menuOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64],\"close\":[64],\"open\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[8,\"wcsSubmenuOpened\",\"onSubmenuOpened\"],[8,\"keydown\",\"onEscapeKeyDown\"],[0,\"wcsClickOnFinalAction\",\"wcsCategoryItemClickedHandler\"]]]]],[\"wcs-divider.cjs\",[[1,\"wcs-divider\"]]],[\"wcs-dropdown-divider.cjs\",[[1,\"wcs-dropdown-divider\"]]],[\"wcs-dropdown-header.cjs\",[[1,\"wcs-dropdown-header\"]]],[\"wcs-dropdown-item.cjs\",[[4,\"wcs-dropdown-item\",null,[[1,\"mouseup\",\"onMouseUp\"],[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-field.cjs\",[[1,\"wcs-field\"]]],[\"wcs-field-content.cjs\",[[1,\"wcs-field-content\"]]],[\"wcs-field-label.cjs\",[[1,\"wcs-field-label\"]]],[\"wcs-footer.cjs\",[[1,\"wcs-footer\"]]],[\"wcs-galactic.cjs\",[[1,\"wcs-galactic\",{\"text\":[1],\"show\":[32]}]]],[\"wcs-grid-column.cjs\",[[1,\"wcs-grid-column\",{\"path\":[1],\"name\":[1],\"sort\":[4],\"sortFn\":[16],\"formatter\":[16],\"sortOrder\":[1025,\"sort-order\"],\"width\":[1],\"customCells\":[4,\"custom-cells\"],\"hidden\":[4],\"cursorPosition\":[16],\"columnPosition\":[2,\"column-position\"],\"setAriaAttribute\":[64]},null,{\"hidden\":[\"parseMyObjectProp\"],\"sortOrder\":[\"sortOrderChange\"]}]]],[\"wcs-grid-custom-cell.cjs\",[[1,\"wcs-grid-custom-cell\",{\"columnId\":[1,\"column-id\"],\"rowId\":[8,\"row-id\"]}]]],[\"wcs-header.cjs\",[[1,\"wcs-header\",{\"setAriaAttribute\":[64]}]]],[\"wcs-hint.cjs\",[[1,\"wcs-hint\",{\"small\":[1540]}]]],[\"wcs-icon.cjs\",[[0,\"wcs-icon\",{\"icon\":[1],\"size\":[1],\"setAriaAttribute\":[64]}]]],[\"wcs-label.cjs\",[[1,\"wcs-label\",{\"required\":[516],\"setAriaAttribute\":[64]}]]],[\"wcs-list-item.cjs\",[[1,\"wcs-list-item\",{\"activated\":[1028]}]]],[\"wcs-list-item-properties.cjs\",[[1,\"wcs-list-item-properties\"]]],[\"wcs-list-item-property.cjs\",[[1,\"wcs-list-item-property\"]]],[\"wcs-native-select.cjs\",[[1,\"wcs-native-select\",{\"size\":[513],\"required\":[4],\"expanded\":[32],\"disabled\":[32],\"setAriaAttribute\":[64],\"updateStyles\":[64]},null,{\"required\":[\"requiredChanged\"]}]]],[\"wcs-nav.cjs\",[[1,\"wcs-nav\",{\"setAriaAttribute\":[64]}]]],[\"wcs-nav-item.cjs\",[[4,\"wcs-nav-item\",null,[[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-progress-radial.cjs\",[[1,\"wcs-progress-radial\",{\"size\":[2],\"showLabel\":[4,\"show-label\"],\"value\":[2],\"setAriaAttribute\":[64]}]]],[\"wcs-radio.cjs\",[[17,\"wcs-radio\",{\"value\":[1544],\"label\":[1537],\"disabled\":[1028],\"name\":[1025],\"mode\":[513],\"checked\":[32],\"radioTabIndex\":[32],\"updateState\":[64],\"setTabIndex\":[64],\"setAriaAttribute\":[64]}]]],[\"wcs-radio-group.cjs\",[[1,\"wcs-radio-group\",{\"value\":[1032],\"name\":[520],\"mode\":[513]},[[0,\"wcsRadioClick\",\"handleRadioClick\"],[0,\"keydown\",\"handleKeyDown\"]],{\"value\":[\"onValueChangeHandler\"],\"name\":[\"updateAllRadioModeAndName\"],\"mode\":[\"updateAllRadioModeAndName\"]}]]],[\"wcs-skeleton-circle.cjs\",[[1,\"wcs-skeleton-circle\",{\"animation\":[513],\"radius\":[514]}]]],[\"wcs-skeleton-rectangle.cjs\",[[1,\"wcs-skeleton-rectangle\",{\"animation\":[513],\"rounded\":[516],\"height\":[513],\"width\":[513]}]]],[\"wcs-skeleton-text.cjs\",[[1,\"wcs-skeleton-text\",{\"animation\":[513],\"height\":[1]}]]],[\"wcs-switch.cjs\",[[17,\"wcs-switch\",{\"name\":[1],\"checked\":[516],\"labelAlignment\":[513,\"label-alignment\"],\"disabled\":[4],\"setAriaAttribute\":[64]},[[0,\"click\",\"handleHostClick\"]]]]],[\"wcs-tab.cjs\",[[1,\"wcs-tab\",{\"header\":[513],\"itemKey\":[8,\"item-key\"]}]]],[\"wcs-tabs.cjs\",[[1,\"wcs-tabs\",{\"align\":[513],\"selectedIndex\":[2,\"selected-index\"],\"selectedKey\":[8,\"selected-key\"],\"headersOnly\":[4,\"headers-only\"],\"gutter\":[4],\"description\":[1],\"headers\":[32],\"currentActiveTabIndex\":[32],\"setAriaAttribute\":[64]},[[0,\"tabLoaded\",\"onTabLoaded\"]],{\"selectedIndex\":[\"selectedIndexChanged\"],\"selectedKey\":[\"selectedTabkeyChanged\"]}]]],[\"wcs-tooltip.cjs\",[[1,\"wcs-tooltip\",{\"for\":[1],\"position\":[513],\"interactive\":[4],\"maxWidth\":[8,\"max-width\"],\"delay\":[2],\"duration\":[2],\"trigger\":[1],\"theme\":[1],\"content\":[1],\"appendTo\":[1,\"append-to\"],\"hide\":[64],\"show\":[64],\"disable\":[64],\"enable\":[64]},[[8,\"keydown\",\"handleKeyDown\"]],{\"interactive\":[\"updateProps\"],\"position\":[\"updateProps\"],\"maxWidth\":[\"updateProps\"],\"theme\":[\"updateProps\"],\"delay\":[\"updateProps\"],\"duration\":[\"updateProps\"],\"trigger\":[\"updateProps\"],\"content\":[\"updateTippyContent\"]}]]],[\"wcs-progress-bar.cjs\",[[1,\"wcs-progress-bar\",{\"size\":[1],\"showLabel\":[4,\"show-label\"],\"value\":[2],\"setAriaAttribute\":[64]}]]],[\"wcs-select_2.cjs\",[[4,\"wcs-select-option\",{\"disabled\":[1540],\"selected\":[1540],\"highlighted\":[1540],\"value\":[8],\"chipColor\":[1,\"chip-color\"],\"chipBackgroundColor\":[1,\"chip-background-color\"],\"multiple\":[1540]},[[1,\"mouseup\",\"onMouseUp\"],[0,\"keydown\",\"handleKeydown\"]]],[1,\"wcs-select\",{\"size\":[513],\"value\":[1032],\"placeholder\":[1537],\"disabled\":[1028],\"multiple\":[516],\"autocomplete\":[516],\"serverMode\":[516,\"server-mode\"],\"filterFn\":[16],\"chips\":[516],\"name\":[1],\"compareWith\":[16],\"expanded\":[32],\"displayText\":[32],\"focused\":[32],\"showNoResultFoundLabel\":[32],\"autocompleteValue\":[32],\"overlayDirection\":[32],\"open\":[64],\"close\":[64],\"setAriaAttribute\":[64]},[[1,\"mouseup\",\"onMouseUp\"],[8,\"click\",\"onWindowClickEvent\"],[0,\"keydown\",\"onKeyDown\"],[0,\"wcsSelectOptionClick\",\"selectedOptionChanged\"],[0,\"focus\",\"onFocus\"],[2,\"blur\",\"onBlur\"]],{\"value\":[\"onValueChangeHandler\"]}]]],[\"wcs-error_2.cjs\",[[1,\"wcs-error\"],[1,\"wcs-form-field\",{\"isError\":[1540,\"is-error\"],\"hasPrefix\":[32],\"hasSuffix\":[32],\"spiedElement\":[32]},null,{\"isError\":[\"isErrorChange\"]}]]],[\"wcs-checkbox.cjs\",[[17,\"wcs-checkbox\",{\"name\":[1],\"indeterminate\":[1540],\"checked\":[1540],\"labelAlignment\":[1537,\"label-alignment\"],\"disabled\":[516],\"setAriaAttribute\":[64]},[[0,\"click\",\"handleHostClick\"]]]]],[\"wcs-mat-icon.cjs\",[[1,\"wcs-mat-icon\",{\"icon\":[1],\"size\":[1],\"family\":[1],\"setAriaAttribute\":[64]}]]],[\"wcs-button_2.cjs\",[[17,\"wcs-button\",{\"type\":[1025],\"href\":[1],\"target\":[1],\"disabled\":[516],\"ripple\":[4],\"size\":[513],\"shape\":[513],\"mode\":[513],\"loading\":[1028],\"setAriaAttribute\":[64]},[[0,\"click\",\"onClick\"]],{\"ripple\":[\"onRippleChange\"]}],[1,\"wcs-spinner\",{\"mode\":[513]}]]]]"), options);
|
|
22
|
+
return index.bootstrapLazy(JSON.parse("[[\"wcs-editable-field.cjs\",[[1,\"wcs-editable-field\",{\"type\":[1],\"label\":[1],\"readonly\":[516],\"value\":[1032],\"validateFn\":[16],\"formatFn\":[16],\"errorMsg\":[1,\"error-msg\"],\"size\":[513],\"currentState\":[32],\"isError\":[32]},[[8,\"click\",\"onWindowClickEvent\"]],{\"value\":[\"onValueChange\"]}]]],[\"wcs-grid-pagination.cjs\",[[1,\"wcs-grid-pagination\",{\"availablePageSizes\":[16],\"currentPage\":[1026,\"current-page\"],\"pageSize\":[2,\"page-size\"],\"itemsCount\":[2,\"items-count\"],\"pageCount\":[2,\"page-count\"],\"setAriaAttribute\":[64]}]]],[\"wcs-horizontal-stepper.cjs\",[[1,\"wcs-horizontal-stepper\",{\"currentStep\":[1026,\"current-step\"],\"steps\":[16],\"mode\":[1],\"checkOnComplete\":[4,\"check-on-complete\"],\"internalCurrentStepIndex\":[32],\"previous\":[64],\"next\":[64]},null,{\"currentStep\":[\"onCurrentStepChange\"]}]]],[\"wcs-breadcrumb.cjs\",[[1,\"wcs-breadcrumb\",{\"maxItems\":[2,\"max-items\"],\"itemsBeforeCollapse\":[2,\"items-before-collapse\"],\"itemsAfterCollapse\":[2,\"items-after-collapse\"],\"ariaLabelExpandButton\":[1,\"aria-label-expand-button\"],\"showHiddenItems\":[32],\"setAriaAttribute\":[64]},null,{\"maxItems\":[\"handleCollapsePropsChange\"],\"itemsBeforeCollapse\":[\"handleCollapsePropsChange\"],\"itemsAfterCollapse\":[\"handleCollapsePropsChange\"],\"ariaLabelExpandButton\":[\"handleAriaLabelExpandBtnChange\"]}]]],[\"wcs-counter.cjs\",[[17,\"wcs-counter\",{\"size\":[513],\"label\":[1],\"disabled\":[516],\"min\":[1026],\"max\":[1026],\"step\":[1026],\"value\":[1026],\"displayedValue\":[32],\"setAriaAttribute\":[64]},null,{\"value\":[\"valueChange\"]}]]],[\"wcs-grid.cjs\",[[1,\"wcs-grid\",{\"serverMode\":[4,\"server-mode\"],\"data\":[16],\"loading\":[4],\"selectionConfig\":[1,\"selection-config\"],\"selectedItems\":[8,\"selected-items\"],\"wcsGridPaginationId\":[1,\"wcs-grid-pagination-id\"],\"rowIdPath\":[1,\"row-id-path\"],\"rowCssPartsFn\":[16],\"columns\":[32],\"paginationEl\":[32],\"rows\":[32],\"cursorPosition\":[32],\"setAriaAttribute\":[64]},[[0,\"focus\",\"onFocus\"],[0,\"blur\",\"onBlur\"],[0,\"wcsHiddenChange\",\"onHiddenColumnChange\"],[0,\"keydown\",\"onKeyDown\"],[1,\"mousedown\",\"onClick\"],[0,\"wcsSortChange\",\"sortChangeEventHandler\"],[0,\"wcsGridPaginationChange\",\"paginationChangeEventHandler\"],[8,\"wcsGridPaginationChange\",\"paginationChangeEventHandlerOutside\"]],{\"cursorPosition\":[\"onCursorPositionChange\"],\"data\":[\"onDataChange\"],\"selectedItems\":[\"onSelectedItemsPropertyChange\"]}]]],[\"wcs-modal.cjs\",[[4,\"wcs-modal\",{\"withoutBackdrop\":[516,\"without-backdrop\"],\"show\":[1540],\"showCloseButton\":[516,\"show-close-button\"],\"closeButtonAriaLabel\":[1,\"close-button-aria-label\"],\"size\":[1],\"hideActions\":[516,\"hide-actions\"],\"modalTriggerControlsId\":[1,\"modal-trigger-controls-id\"],\"initialFocusElementId\":[1,\"initial-focus-element-id\"],\"disableAutoFocus\":[4,\"disable-auto-focus\"],\"setAriaAttribute\":[64]},[[4,\"keydown\",\"onKeyDown\"]],{\"show\":[\"onShowChange\"]}]]],[\"wcs-dropdown.cjs\",[[17,\"wcs-dropdown\",{\"noArrow\":[4,\"no-arrow\"],\"mode\":[1],\"shape\":[1],\"size\":[1],\"disabled\":[516],\"placement\":[1],\"expanded\":[32],\"setAriaAttribute\":[64]},[[0,\"blur\",\"onBlur\"],[8,\"click\",\"onWindowClickEvent\"],[0,\"wcsDropdownItemClick\",\"dropdownItemClick\"],[0,\"keydown\",\"onKeyDown\"]],{\"placement\":[\"placementChange\"]}]]],[\"wcs-galactic-menu.cjs\",[[1,\"wcs-galactic-menu\",{\"text\":[1],\"showPopoverMenu\":[32],\"setAriaAttribute\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-input.cjs\",[[17,\"wcs-input\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"accept\":[1],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"debounce\":[2],\"prefixLabel\":[1,\"prefix-label\"],\"suffixLabel\":[1,\"suffix-label\"],\"disabled\":[516],\"enterkeyhint\":[1],\"size\":[513],\"icon\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"multiple\":[4],\"name\":[1],\"hidePasswordButtonAriaLabel\":[1,\"hide-password-button-aria-label\"],\"showPasswordButtonAriaLabel\":[1,\"show-password-button-aria-label\"],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[516],\"required\":[4],\"spellcheck\":[4],\"state\":[513],\"step\":[1],\"type\":[1],\"value\":[1032],\"passwordReveal\":[32],\"setBlur\":[64],\"getInputElement\":[64],\"setAriaAttribute\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"passwordReveal\":[\"onPasswordRevealChange\"]}]]],[\"wcs-textarea.cjs\",[[17,\"wcs-textarea\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"autocapitalize\":[1],\"autofocus\":[4],\"debounce\":[2],\"disabled\":[516],\"icon\":[1],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"readonly\":[516],\"required\":[4],\"spellcheck\":[4],\"state\":[513],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"autoGrow\":[4,\"auto-grow\"],\"value\":[1025],\"resize\":[513],\"setAriaAttribute\":[64],\"fitContent\":[64],\"setBlur\":[64],\"getInputElement\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}]]],[\"wcs-accordion.cjs\",[[1,\"wcs-accordion\",{\"hideActionText\":[516,\"hide-action-text\"],\"highlight\":[516],\"groupContentWithHeader\":[516,\"group-content-with-header\"]},[[0,\"wcsOpenChange\",\"wcsOpenChangeHandler\"]],{\"hideActionText\":[\"updateHideActiontextOnPanel\"],\"highlight\":[\"updateHighlightOnPanel\"],\"groupContentWithHeader\":[\"updateGroupContentWithHeader\"]}]]],[\"wcs-accordion-content.cjs\",[[1,\"wcs-accordion-content\"]]],[\"wcs-accordion-header.cjs\",[[1,\"wcs-accordion-header\"]]],[\"wcs-accordion-panel.cjs\",[[1,\"wcs-accordion-panel\",{\"open\":[1540],\"hideActionText\":[516,\"hide-action-text\"],\"highlight\":[516],\"groupContentWithHeader\":[516,\"group-content-with-header\"],\"setAriaAttribute\":[64],\"close\":[64]},null,{\"open\":[\"openChange\"]}]]],[\"wcs-action-bar.cjs\",[[1,\"wcs-action-bar\",{\"gutter\":[516],\"hasTabs\":[32]}]]],[\"wcs-app.cjs\",[[1,\"wcs-app\"]]],[\"wcs-badge.cjs\",[[1,\"wcs-badge\",{\"shape\":[1],\"color\":[1],\"size\":[513]}]]],[\"wcs-breadcrumb-item.cjs\",[[1,\"wcs-breadcrumb-item\",{\"last\":[4]}]]],[\"wcs-card.cjs\",[[1,\"wcs-card\",{\"mode\":[1537]}]]],[\"wcs-card-body.cjs\",[[1,\"wcs-card-body\"]]],[\"wcs-com-nav.cjs\",[[1,\"wcs-com-nav\",{\"appName\":[1,\"app-name\"],\"mobileMenuOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64]},[[0,\"wcsClickOnFinalAction\",\"onClickOnFinalAction\"],[8,\"keydown\",\"exitMobileMenuOnKeyDown\"]]]]],[\"wcs-com-nav-category.cjs\",[[1,\"wcs-com-nav-category\",{\"label\":[1],\"categoryOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64],\"close\":[64],\"open\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[8,\"wcsCategoryOpened\",\"onSubmenuOpened\"]]]]],[\"wcs-com-nav-item.cjs\",[[1,\"wcs-com-nav-item\",null,[[0,\"click\",\"onClick\"]]]]],[\"wcs-com-nav-submenu.cjs\",[[1,\"wcs-com-nav-submenu\",{\"label\":[1],\"panelTitle\":[1,\"panel-title\"],\"panelDescription\":[1,\"panel-description\"],\"menuOpen\":[32],\"currentActiveSizing\":[32],\"setAriaAttribute\":[64],\"close\":[64],\"open\":[64]},[[8,\"click\",\"onWindowClickEvent\"],[8,\"wcsSubmenuOpened\",\"onSubmenuOpened\"],[8,\"keydown\",\"onEscapeKeyDown\"],[0,\"wcsClickOnFinalAction\",\"wcsCategoryItemClickedHandler\"]]]]],[\"wcs-divider.cjs\",[[1,\"wcs-divider\"]]],[\"wcs-dropdown-divider.cjs\",[[1,\"wcs-dropdown-divider\"]]],[\"wcs-dropdown-header.cjs\",[[1,\"wcs-dropdown-header\"]]],[\"wcs-dropdown-item.cjs\",[[4,\"wcs-dropdown-item\",null,[[1,\"mouseup\",\"onMouseUp\"],[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-field.cjs\",[[1,\"wcs-field\"]]],[\"wcs-field-content.cjs\",[[1,\"wcs-field-content\"]]],[\"wcs-field-label.cjs\",[[1,\"wcs-field-label\"]]],[\"wcs-footer.cjs\",[[1,\"wcs-footer\"]]],[\"wcs-galactic.cjs\",[[1,\"wcs-galactic\",{\"text\":[1],\"show\":[32]}]]],[\"wcs-grid-column.cjs\",[[1,\"wcs-grid-column\",{\"path\":[1],\"name\":[1],\"sort\":[4],\"sortFn\":[16],\"formatter\":[16],\"sortOrder\":[1025,\"sort-order\"],\"width\":[1],\"customCells\":[4,\"custom-cells\"],\"hidden\":[516],\"cursorPosition\":[16],\"columnPosition\":[2,\"column-position\"],\"setAriaAttribute\":[64]},null,{\"hidden\":[\"parseMyObjectProp\"],\"sortOrder\":[\"sortOrderChange\"]}]]],[\"wcs-grid-custom-cell.cjs\",[[1,\"wcs-grid-custom-cell\",{\"columnId\":[1,\"column-id\"],\"rowId\":[8,\"row-id\"]}]]],[\"wcs-header.cjs\",[[1,\"wcs-header\",{\"setAriaAttribute\":[64]}]]],[\"wcs-hint.cjs\",[[1,\"wcs-hint\",{\"small\":[1540]}]]],[\"wcs-icon.cjs\",[[0,\"wcs-icon\",{\"icon\":[1],\"size\":[1],\"setAriaAttribute\":[64]}]]],[\"wcs-list-item.cjs\",[[1,\"wcs-list-item\",{\"activated\":[1540]}]]],[\"wcs-list-item-properties.cjs\",[[1,\"wcs-list-item-properties\"]]],[\"wcs-list-item-property.cjs\",[[1,\"wcs-list-item-property\"]]],[\"wcs-native-select.cjs\",[[1,\"wcs-native-select\",{\"size\":[513],\"required\":[4],\"expanded\":[32],\"disabled\":[32],\"setAriaAttribute\":[64],\"updateStyles\":[64]},null,{\"required\":[\"requiredChanged\"]}]]],[\"wcs-nav.cjs\",[[1,\"wcs-nav\",{\"setAriaAttribute\":[64]}]]],[\"wcs-nav-item.cjs\",[[4,\"wcs-nav-item\",null,[[0,\"keydown\",\"onKeyDown\"]]]]],[\"wcs-progress-radial.cjs\",[[1,\"wcs-progress-radial\",{\"size\":[2],\"showLabel\":[4,\"show-label\"],\"value\":[2],\"setAriaAttribute\":[64]}]]],[\"wcs-radio.cjs\",[[17,\"wcs-radio\",{\"value\":[1544],\"label\":[1537],\"disabled\":[1540],\"name\":[1025],\"mode\":[513],\"checked\":[32],\"radioTabIndex\":[32],\"updateState\":[64],\"setTabIndex\":[64],\"setAriaAttribute\":[64]}]]],[\"wcs-radio-group.cjs\",[[1,\"wcs-radio-group\",{\"value\":[1032],\"name\":[520],\"mode\":[513],\"setAriaAttribute\":[64]},[[0,\"wcsRadioClick\",\"handleRadioClick\"],[0,\"keydown\",\"handleKeyDown\"]],{\"value\":[\"onValueChangeHandler\"],\"name\":[\"updateAllRadioModeAndName\"],\"mode\":[\"updateAllRadioModeAndName\"]}]]],[\"wcs-skeleton-circle.cjs\",[[1,\"wcs-skeleton-circle\",{\"animation\":[513],\"radius\":[514]}]]],[\"wcs-skeleton-rectangle.cjs\",[[1,\"wcs-skeleton-rectangle\",{\"animation\":[513],\"rounded\":[516],\"height\":[513],\"width\":[513]}]]],[\"wcs-skeleton-text.cjs\",[[1,\"wcs-skeleton-text\",{\"animation\":[513],\"height\":[1]}]]],[\"wcs-switch.cjs\",[[17,\"wcs-switch\",{\"name\":[1],\"checked\":[516],\"labelAlignment\":[513,\"label-alignment\"],\"disabled\":[516],\"setAriaAttribute\":[64],\"getLabel\":[64]},[[0,\"click\",\"handleHostClick\"]]]]],[\"wcs-tab.cjs\",[[1,\"wcs-tab\",{\"header\":[513],\"itemKey\":[8,\"item-key\"]}]]],[\"wcs-tabs.cjs\",[[1,\"wcs-tabs\",{\"align\":[513],\"selectedIndex\":[2,\"selected-index\"],\"selectedKey\":[8,\"selected-key\"],\"headersOnly\":[4,\"headers-only\"],\"gutter\":[516],\"description\":[1],\"headers\":[32],\"currentActiveTabIndex\":[32],\"setAriaAttribute\":[64]},[[0,\"tabLoaded\",\"onTabLoaded\"]],{\"selectedIndex\":[\"selectedIndexChanged\"],\"selectedKey\":[\"selectedTabkeyChanged\"]}]]],[\"wcs-tooltip.cjs\",[[1,\"wcs-tooltip\",{\"for\":[1],\"position\":[513],\"interactive\":[4],\"maxWidth\":[8,\"max-width\"],\"delay\":[2],\"duration\":[2],\"trigger\":[1],\"theme\":[1],\"content\":[1],\"appendTo\":[1,\"append-to\"],\"hide\":[64],\"show\":[64],\"disable\":[64],\"enable\":[64]},[[8,\"keydown\",\"handleKeyDown\"]],{\"interactive\":[\"updateProps\"],\"position\":[\"updateProps\"],\"maxWidth\":[\"updateProps\"],\"theme\":[\"updateProps\"],\"delay\":[\"updateProps\"],\"duration\":[\"updateProps\"],\"trigger\":[\"updateProps\"],\"content\":[\"updateTippyContent\"]}]]],[\"wcs-progress-bar.cjs\",[[1,\"wcs-progress-bar\",{\"size\":[1],\"showLabel\":[4,\"show-label\"],\"value\":[2],\"setAriaAttribute\":[64]}]]],[\"wcs-select_2.cjs\",[[4,\"wcs-select-option\",{\"disabled\":[1540],\"selected\":[1540],\"highlighted\":[1540],\"value\":[8],\"chipColor\":[1,\"chip-color\"],\"chipBackgroundColor\":[1,\"chip-background-color\"],\"multiple\":[1540]},[[1,\"mouseup\",\"onMouseUp\"],[0,\"keydown\",\"handleKeydown\"]]],[1,\"wcs-select\",{\"size\":[513],\"value\":[1032],\"placeholder\":[1537],\"disabled\":[1540],\"required\":[4],\"multiple\":[516],\"autocomplete\":[516],\"serverMode\":[516,\"server-mode\"],\"filterFn\":[16],\"chips\":[516],\"name\":[1],\"compareWith\":[16],\"expanded\":[32],\"displayText\":[32],\"focused\":[32],\"showNoResultFoundLabel\":[32],\"autocompleteValue\":[32],\"overlayDirection\":[32],\"open\":[64],\"close\":[64],\"setAriaAttribute\":[64]},[[1,\"mouseup\",\"onMouseUp\"],[8,\"click\",\"onWindowClickEvent\"],[0,\"keydown\",\"onKeyDown\"],[0,\"wcsSelectOptionClick\",\"selectedOptionChanged\"],[0,\"focus\",\"onFocus\"],[2,\"blur\",\"onBlur\"]],{\"value\":[\"onValueChangeHandler\"]}]]],[\"wcs-error_3.cjs\",[[1,\"wcs-error\"],[1,\"wcs-form-field\",{\"isError\":[1540,\"is-error\"],\"hasPrefix\":[32],\"hasSuffix\":[32],\"spiedElement\":[32]},null,{\"isError\":[\"isErrorChange\"]}],[1,\"wcs-label\",{\"required\":[516],\"setAriaAttribute\":[64]}]]],[\"wcs-checkbox.cjs\",[[17,\"wcs-checkbox\",{\"name\":[1],\"indeterminate\":[1540],\"checked\":[1540],\"labelAlignment\":[1537,\"label-alignment\"],\"disabled\":[516],\"setAriaAttribute\":[64],\"getLabel\":[64]},[[0,\"click\",\"handleHostClick\"]]]]],[\"wcs-mat-icon.cjs\",[[1,\"wcs-mat-icon\",{\"icon\":[1],\"size\":[1],\"family\":[1],\"setAriaAttribute\":[64]}]]],[\"wcs-button_2.cjs\",[[17,\"wcs-button\",{\"type\":[1025],\"href\":[1],\"target\":[1],\"disabled\":[516],\"ripple\":[4],\"size\":[513],\"shape\":[513],\"mode\":[513],\"loading\":[1540],\"setAriaAttribute\":[64]},[[0,\"click\",\"onClick\"]],{\"ripple\":[\"onRippleChange\"]}],[1,\"wcs-spinner\",{\"mode\":[513]}]]]]"), options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -24,7 +24,7 @@ export class ActionBar {
|
|
|
24
24
|
this.hasTabs = !!this.el.querySelector('[slot="tabs"]');
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: 'd67394521e0f511ce6c4632ff2ac177920cee7f6' }, h("div", { key: '15e01e65524923776ff1e9a793a84ca395fc9cb6', class: "title-actions", "data-has-tabs": this.hasTabs }, h("h1", { key: '9b260476e27f3702402fccd690f1481cd2b6937a' }, h("slot", { key: '8610b80130c93f2f3b1bbd987d9c3eb8044389ae' })), h("div", { key: '4b8b05c7331d1de0ac889c475de8a675cb4ab96d', class: "actions" }, h("slot", { key: '129ffb87ce43f64a6793606ae5fbca423270bc9f', name: "actions" }))), h("div", { key: '21f236bd1e8cce919d2410f2865531dc85973079', class: "tabs-container" }, h("slot", { key: '4d137643a6576ee3d34d32dd38e63952ecb9171e', name: "tabs" }))));
|
|
28
28
|
}
|
|
29
29
|
static get is() { return "wcs-action-bar"; }
|
|
30
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -55,7 +55,7 @@ export class ActionBar {
|
|
|
55
55
|
"text": "Determines if the action bar should have a border at the bottom.\nYou should not use this property if a gutter is already present on tabs"
|
|
56
56
|
},
|
|
57
57
|
"attribute": "gutter",
|
|
58
|
-
"reflect":
|
|
58
|
+
"reflect": true
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-bar.js","sourceRoot":"","sources":["../../../src/components/action-bar/action-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE7F;;;;;;;;;;;;;;;GAeG;AAMH,MAAM,OAAO,SAAS;;;uBAOS,KAAK;;IAEhC,iBAAiB;QACb,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM;QACF,OAAO,CACH,EAAC,IAAI;YACD,4DAAK,KAAK,EAAC,eAAe,mBAAgB,IAAI,CAAC,OAAO;gBAClD;oBACI,8DAAa,CACZ;gBACL,4DAAK,KAAK,EAAC,SAAS;oBAChB,6DAAM,IAAI,EAAC,SAAS,GAAQ,CAC1B,CACJ;YACN,4DAAK,KAAK,EAAC,gBAAgB;gBACvB,6DAAM,IAAI,EAAC,MAAM,GAAQ,CACvB,CACH,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, ComponentInterface, Element, h, Host, Prop, State } from '@stencil/core';\n\n/**\n * The action-bar component is a group of elements appearing across the top of all pages on a business application.\n * \n * @cssprop --wcs-action-bar-background-color - Background color of the action bar\n * @cssprop --wcs-action-bar-gap - Gap between the title and the tabs\n * @cssprop --wcs-action-bar-gap-actions - Gap between the title and the actions\n * @cssprop --wcs-action-bar-min-height - Minimum height of the action bar\n * @cssprop --wcs-action-bar-padding-horizontal - Horizontal padding of the action bar\n * @cssprop --wcs-action-bar-padding-vertical - Vertical padding of the action bar\n * @cssprop --wcs-action-bar-tabs-margin-top - Margin top of the tabs when slotted\n * @cssprop --wcs-action-bar-title-font-size - Font size of the title\n * @cssprop --wcs-action-bar-title-font-weight - Font weight of the title\n * @cssprop --wcs-action-bar-title-color - Color of the title\n * @cssprop --wcs-tabs-gutter-border-width - Border width of the gutter\n * @cssprop --wcs-tabs-gutter-background-color - Background color of the gutter\n */\n@Component({\n tag: 'wcs-action-bar',\n styleUrl: 'action-bar.scss',\n shadow: true\n})\nexport class ActionBar implements ComponentInterface {\n @Element() private el: HTMLWcsActionBarElement;\n /**\n * Determines if the action bar should have a border at the bottom.\n * You should not use this property if a gutter is already present on tabs\n */\n @Prop() gutter: boolean;\n @State() private hasTabs = false;\n\n componentWillLoad(): Promise<void> | void {\n this.hasTabs = !!this.el.querySelector('[slot=\"tabs\"]');\n }\n\n render() {\n return (\n <Host>\n <div class=\"title-actions\" data-has-tabs={this.hasTabs}>\n <h1>\n <slot></slot>\n </h1>\n <div class=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n </div>\n <div class=\"tabs-container\">\n <slot name=\"tabs\"></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"action-bar.js","sourceRoot":"","sources":["../../../src/components/action-bar/action-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE7F;;;;;;;;;;;;;;;GAeG;AAMH,MAAM,OAAO,SAAS;;;uBAOS,KAAK;;IAEhC,iBAAiB;QACb,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM;QACF,OAAO,CACH,EAAC,IAAI;YACD,4DAAK,KAAK,EAAC,eAAe,mBAAgB,IAAI,CAAC,OAAO;gBAClD;oBACI,8DAAa,CACZ;gBACL,4DAAK,KAAK,EAAC,SAAS;oBAChB,6DAAM,IAAI,EAAC,SAAS,GAAQ,CAC1B,CACJ;YACN,4DAAK,KAAK,EAAC,gBAAgB;gBACvB,6DAAM,IAAI,EAAC,MAAM,GAAQ,CACvB,CACH,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, ComponentInterface, Element, h, Host, Prop, State } from '@stencil/core';\n\n/**\n * The action-bar component is a group of elements appearing across the top of all pages on a business application.\n * \n * @cssprop --wcs-action-bar-background-color - Background color of the action bar\n * @cssprop --wcs-action-bar-gap - Gap between the title and the tabs\n * @cssprop --wcs-action-bar-gap-actions - Gap between the title and the actions\n * @cssprop --wcs-action-bar-min-height - Minimum height of the action bar\n * @cssprop --wcs-action-bar-padding-horizontal - Horizontal padding of the action bar\n * @cssprop --wcs-action-bar-padding-vertical - Vertical padding of the action bar\n * @cssprop --wcs-action-bar-tabs-margin-top - Margin top of the tabs when slotted\n * @cssprop --wcs-action-bar-title-font-size - Font size of the title\n * @cssprop --wcs-action-bar-title-font-weight - Font weight of the title\n * @cssprop --wcs-action-bar-title-color - Color of the title\n * @cssprop --wcs-tabs-gutter-border-width - Border width of the gutter\n * @cssprop --wcs-tabs-gutter-background-color - Background color of the gutter\n */\n@Component({\n tag: 'wcs-action-bar',\n styleUrl: 'action-bar.scss',\n shadow: true\n})\nexport class ActionBar implements ComponentInterface {\n @Element() private el: HTMLWcsActionBarElement;\n /**\n * Determines if the action bar should have a border at the bottom.\n * You should not use this property if a gutter is already present on tabs\n */\n @Prop({ reflect: true }) gutter: boolean;\n @State() private hasTabs = false;\n\n componentWillLoad(): Promise<void> | void {\n this.hasTabs = !!this.el.querySelector('[slot=\"tabs\"]');\n }\n\n render() {\n return (\n <Host>\n <div class=\"title-actions\" data-has-tabs={this.hasTabs}>\n <h1>\n <slot></slot>\n </h1>\n <div class=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n </div>\n <div class=\"tabs-container\">\n <slot name=\"tabs\"></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -126,7 +126,7 @@ export class Button {
|
|
|
126
126
|
const attrs = this.href !== undefined
|
|
127
127
|
? { href: this.href, role: 'button', target: this.target }
|
|
128
128
|
: { type: this.type };
|
|
129
|
-
return (h(TagType, Object.assign({ key: '
|
|
129
|
+
return (h(TagType, Object.assign({ key: '228586d374a478c0e23a697ddd0bef43fb4011ed' }, attrs, { class: "wcs-inner-button", disabled: this.disabled || this.loading, ref: (el) => this.nativeButton = el }, this.inheritedAttributes), this.loading && h("wcs-spinner", { key: '1fdef7efc8d2d1febb2e9a83aa48a44426015b89' }), h("slot", { key: '63cedaddd96fe4e20f0ca9ff0f3ea1e373ebd3f0' })));
|
|
130
130
|
}
|
|
131
131
|
static get is() { return "wcs-button"; }
|
|
132
132
|
static get encapsulation() { return "shadow"; }
|
|
@@ -324,7 +324,7 @@ export class Button {
|
|
|
324
324
|
"text": "Flag to display spinner until the end of action"
|
|
325
325
|
},
|
|
326
326
|
"attribute": "loading",
|
|
327
|
-
"reflect":
|
|
327
|
+
"reflect": true,
|
|
328
328
|
"defaultValue": "false"
|
|
329
329
|
}
|
|
330
330
|
};
|
|
@@ -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,EA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CAAC;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,KAAK,SAAS;YACjC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YAC1D,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QAC1B,OAAO,CACH,EAAC,OAAO,qEACA,KAAK,IACT,KAAK,EAAC,kBAAkB,EACxB,QAAQ,EAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EACzC,GAAG,EAAE,CAAC,EAAyC,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,IACtE,IAAI,CAAC,mBAAmB;YAGxB,IAAI,CAAC,OAAO,IAAI,qEAA2B;YAE/C,8DAAO,CACD,CACb,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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AAC;QAC/B,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAChC,CAAC;IACL,CAAC;IAED,MAAM;QACF,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,KAAK,SAAS;YACjC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YAC1D,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QAC1B,OAAO,CACH,EAAC,OAAO,qEACA,KAAK,IACT,KAAK,EAAC,kBAAkB,EACxB,QAAQ,EAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EACzC,GAAG,EAAE,CAAC,EAAyC,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,IACtE,IAAI,CAAC,mBAAmB;YAGxB,IAAI,CAAC,OAAO,IAAI,qEAA2B;YAE/C,8DAAO,CACD,CACb,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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({ 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 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,5 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from "../../utils/helpers";
|
|
3
|
+
import { getSlottedContentText } from "../../utils/control-component-interface";
|
|
3
4
|
const CHECKBOX_INHERITED_ATTRS = ['tabindex', 'title'];
|
|
4
5
|
/**
|
|
5
6
|
* The checkbox component is an input for choosing one or more items from a set by checking / unchecking it.
|
|
@@ -64,6 +65,9 @@ export class Checkbox {
|
|
|
64
65
|
async setAriaAttribute(attr, value) {
|
|
65
66
|
setOrRemoveAttribute(this.nativeInput, attr, value);
|
|
66
67
|
}
|
|
68
|
+
async getLabel() {
|
|
69
|
+
return getSlottedContentText(this.el);
|
|
70
|
+
}
|
|
67
71
|
handleChange(e) {
|
|
68
72
|
e.stopImmediatePropagation();
|
|
69
73
|
e.preventDefault();
|
|
@@ -113,7 +117,7 @@ export class Checkbox {
|
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
119
|
render() {
|
|
116
|
-
return (h(Host, { key: '
|
|
120
|
+
return (h(Host, { key: 'a20390ff38ab6bf7ec5a0868d396857edd93daa1' }, h("label", { key: 'ab9d5f22c1f48f84dbd75ad4d4699f403cbfb059', htmlFor: this.name, class: "wcs-container", "aria-disabled": this.disabled }, h("input", Object.assign({ key: '05afab86b77b327fe9e4f3c9e1e44d67d3c7678d', onBlur: this.handleBlur.bind(this), onChange: this.handleChange.bind(this), onFocus: this.handleFocus.bind(this), onClick: this.handleInputClick.bind(this), checked: this.checked, class: "wcs-checkbox", type: "checkbox", ref: (el) => (this.nativeInput = el), name: this.name, disabled: this.disabled, id: this.name }, this.inheritedAttributes)), h("span", { key: 'f864ab3331ce992ea6b769b06cb29485485300e8', class: "wcs-checkmark" }), h("span", { key: '5709887a3b90454c7a2f711f553f3d95a6f98326', class: "text" }, h("slot", { key: 'ed2dc70d43b7915962c531e901a7abb84b1d34b6', onSlotchange: (_) => this.onSlotChange() })))));
|
|
117
121
|
}
|
|
118
122
|
static get is() { return "wcs-checkbox"; }
|
|
119
123
|
static get encapsulation() { return "shadow"; }
|
|
@@ -323,6 +327,23 @@ export class Checkbox {
|
|
|
323
327
|
"text": "",
|
|
324
328
|
"tags": []
|
|
325
329
|
}
|
|
330
|
+
},
|
|
331
|
+
"getLabel": {
|
|
332
|
+
"complexType": {
|
|
333
|
+
"signature": "() => Promise<string>",
|
|
334
|
+
"parameters": [],
|
|
335
|
+
"references": {
|
|
336
|
+
"Promise": {
|
|
337
|
+
"location": "global",
|
|
338
|
+
"id": "global::Promise"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"return": "Promise<string>"
|
|
342
|
+
},
|
|
343
|
+
"docs": {
|
|
344
|
+
"text": "Get the label text",
|
|
345
|
+
"tags": []
|
|
346
|
+
}
|
|
326
347
|
}
|
|
327
348
|
};
|
|
328
349
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,KAAK,EAGL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACT,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAErG,MAAM,wBAAwB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAQH,MAAM,OAAO,QAAQ;;QAGT,wBAAmB,GAAyB,EAAE,CAAC;QAC/C,eAAU,GAAG,gBAAgB,WAAW,EAAE,EAAE,CAAC;oBAEtC,IAAI,CAAC,UAAU;6BAI0B,KAAK;uBAKX,KAAK;8BAK0B,QAAQ;wBAK5C,KAAK;;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AC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EACpC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,IAAI,CAAC,IAAI,IACT,IAAI,CAAC,mBAAmB,EACvB;gBACT,6DAAM,KAAK,EAAC,eAAe,GAAQ;gBACnC,6DAAM,KAAK,EAAC,MAAM;oBACd,6DAAM,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,GAAI,CAC/C,CACH,CACL,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ;AAED,IAAI,WAAW,GAAG,CAAC,CAAC","sourcesContent":["import {\n Component,\n Prop,\n Event,\n EventEmitter,\n ComponentInterface,\n h,\n Host,\n Method,\n Element,\n Listen\n} from '@stencil/core';\nimport { CheckboxChangeEventDetail, CheckboxLabelAlignment } from './checkbox-interface';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from \"../../utils/helpers\";\n\nconst CHECKBOX_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The checkbox component is an input for choosing one or more items from a set by checking / unchecking it.\n * \n * @cssprop --wcs-checkbox-border-color-default - Default color of the border\n * @cssprop --wcs-checkbox-border-color-hover - Color of the border when hovered\n * @cssprop --wcs-checkbox-border-color-disabled - Color of the border when disabled\n * @cssprop --wcs-checkbox-border-color-selected - Color of the border when selected\n * @cssprop --wcs-checkbox-border-color-indeterminate - Color of the border when indeterminate\n * \n * @cssprop --wcs-checkbox-border-radius - Border radius of the checkbox\n * @cssprop --wcs-checkbox-border-width - Width of the border of the checkbox\n * \n * @cssprop --wcs-checkbox-size - Size of the checkbox\n * \n * @cssprop --wcs-checkbox-text-color-default - Color of the text when the checkbox is not selected\n * @cssprop --wcs-checkbox-text-color-disabled - Color of the text when the checkbox is disabled\n * @cssprop --wcs-checkbox-text-color-hover - Color of the text when the checkbox is hovered\n * @cssprop --wcs-checkbox-text-color-selected - Color of the text when the checkbox is selected\n * \n * @cssprop --wcs-checkbox-text-font-size - Font size of the text\n * @cssprop --wcs-checkbox-text-font-weight - Font weight of the text\n * \n * @cssprop --wcs-checkbox-background-color-default - Default background color of the checkbox\n * @cssprop --wcs-checkbox-background-color-hover - Background color of the checkbox when hovered\n * @cssprop --wcs-checkbox-background-color-disabled - Background color of the checkbox when disabled\n * @cssprop --wcs-checkbox-background-color-selected - Background color of the checkbox when selected\n * @cssprop --wcs-checkbox-background-color-indeterminate - Background color of the checkbox when indeterminate\n * \n * @cssprop --wcs-checkbox-outline-radius-focus - Border radius of the focus outline\n * @cssprop --wcs-checkbox-outline-color-focus - Color of the focus outline\n * \n * @cssprop --wcs-checkbox-gap - Gap between the checkbox and the label\n * @cssprop --wcs-checkmark-color - Color of the checkmark\n * @cssprop --wcs-checkmark-height - Height of the checkmark (From the bottom left to the top right of the checkmark)\n * @cssprop --wcs-checkmark-width - Width of the checkmark (From the bottom right to the top left of the checkmark)\n * @cssprop --wcs-checkmark-border-width - Width of the border of the checkmark\n *\n * @cssprop --wcs-indeterminate-bar-width - Width of the indeterminate bar\n * @cssprop --wcs-indeterminate-bar-height - Height of the indeterminate bar\n * @cssprop --wcs-indeterminate-bar-border-radius - Border-radius of the indeterminate bar\n * @cssprop --wcs-indeterminate-bar-background-color - Color of the indeterminate bar\n * \n * @cssprop --wcs-checkbox-transition-duration - Duration of the transition\n */\n@Component({\n tag: 'wcs-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Checkbox implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private nativeInput!: HTMLInputElement;\n private inheritedAttributes: { [k: string]: any } = {};\n private checkboxId = `wcs-checkbox-${checkboxIds++}`;\n\n @Prop() name = this.checkboxId;\n /**\n * If `true` the checkbox is in indeterminate state.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate = false;\n\n /**\n * If `true`, the checkbox is selected.\n */\n @Prop({ reflect: true, mutable: true }) checked = false;\n\n /**\n * Specifie the alignment of the checkbox with the label content\n */\n @Prop({ mutable: true, reflect: true }) labelAlignment: CheckboxLabelAlignment = 'center';\n\n /**\n * Specify whether the checkbox is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Emitted when the checked property has changed.\n */\n @Event() wcsChange!: EventEmitter<CheckboxChangeEventDetail>;\n\n /**\n * Emitted when the checkbox has focus.\n */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n componentWillLoad(): Promise<void> | void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, CHECKBOX_INHERITED_ATTRS),\n };\n }\n\n componentDidLoad() {\n this.onSlotChange();\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeInput, attr, value);\n }\n\n handleChange(e: Event) {\n e.stopImmediatePropagation();\n e.preventDefault();\n this.toggleCheckboxState();\n }\n \n @Listen('click')\n async handleHostClick(e: Event){\n e.preventDefault();\n e.stopPropagation();\n \n this.toggleCheckboxState();\n }\n\n handleInputClick(ev: PointerEvent) {\n // If the click event is coming from the mouse we ignore it.\n // We only want to handle the keyboard interactions as it is the only purpose of this native input\n if (ev.detail) {\n ev.stopImmediatePropagation()\n ev.preventDefault();\n }\n }\n\n toggleCheckboxState() {\n if (this.disabled) return;\n \n this.indeterminate = false;\n this.checked = !this.checked;\n this.wcsChange.emit({\n checked: this.checked,\n });\n }\n \n handleFocus(event: FocusEvent) {\n this.wcsFocus.emit(event);\n }\n\n handleBlur(event: FocusEvent) {\n this.wcsBlur.emit(event);\n }\n\n onSlotChange() { \n const slot = this.el.shadowRoot.querySelector('slot');\n if (slot) {\n // TODO: remove when pseudo-class that indicate a slot has content is supported in all major browsers \n // (https://github.com/w3c/csswg-drafts/issues/6867)\n // https://developer.mozilla.org/en-US/docs/Web/CSS/:empty\n const assignedNodes = slot.assignedNodes();\n if (assignedNodes.length > 0) {\n this.el.shadowRoot.querySelector('.text').classList.remove('hidden');\n } else {\n this.el.shadowRoot.querySelector('.text').classList.add('hidden');\n }\n }\n }\n \n render() {\n return (\n <Host>\n <label htmlFor={this.name} class=\"wcs-container\" aria-disabled={this.disabled}>\n <input\n onBlur={this.handleBlur.bind(this)}\n onChange={this.handleChange.bind(this)}\n onFocus={this.handleFocus.bind(this)}\n onClick={this.handleInputClick.bind(this)}\n checked={this.checked}\n class=\"wcs-checkbox\"\n type=\"checkbox\"\n ref={(el) => (this.nativeInput = el)}\n name={this.name}\n disabled={this.disabled}\n id={this.name}\n {...this.inheritedAttributes}\n ></input>\n <span class=\"wcs-checkmark\"></span>\n <span class=\"text\">\n <slot onSlotchange={(_) => this.onSlotChange()} />\n </span>\n </label>\n </Host>\n );\n }\n}\n\nlet checkboxIds = 0;\n"]}
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,KAAK,EAGL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACT,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACrG,OAAO,EAA6B,qBAAqB,EAAE,MAAM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AAe,mBAAgB,IAAI,CAAC,QAAQ;gBACzE,4EACI,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAClC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EACtC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EACpC,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EACzC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,UAAU,EACf,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EACpC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,IAAI,CAAC,IAAI,IACT,IAAI,CAAC,mBAAmB,EACvB;gBACT,6DAAM,KAAK,EAAC,eAAe,GAAQ;gBACnC,6DAAM,KAAK,EAAC,MAAM;oBACd,6DAAM,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,GAAI,CAC/C,CACH,CACL,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ;AAED,IAAI,WAAW,GAAG,CAAC,CAAC","sourcesContent":["import {\n Component,\n Prop,\n Event,\n EventEmitter,\n ComponentInterface,\n h,\n Host,\n Method,\n Element,\n Listen\n} from '@stencil/core';\nimport { CheckboxChangeEventDetail, CheckboxLabelAlignment } from './checkbox-interface';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\nimport { inheritAriaAttributes, inheritAttributes, setOrRemoveAttribute } from \"../../utils/helpers\";\nimport { ControlComponentWithLabel, getSlottedContentText } from \"../../utils/control-component-interface\";\n\nconst CHECKBOX_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The checkbox component is an input for choosing one or more items from a set by checking / unchecking it.\n * \n * @cssprop --wcs-checkbox-border-color-default - Default color of the border\n * @cssprop --wcs-checkbox-border-color-hover - Color of the border when hovered\n * @cssprop --wcs-checkbox-border-color-disabled - Color of the border when disabled\n * @cssprop --wcs-checkbox-border-color-selected - Color of the border when selected\n * @cssprop --wcs-checkbox-border-color-indeterminate - Color of the border when indeterminate\n * \n * @cssprop --wcs-checkbox-border-radius - Border radius of the checkbox\n * @cssprop --wcs-checkbox-border-width - Width of the border of the checkbox\n * \n * @cssprop --wcs-checkbox-size - Size of the checkbox\n * \n * @cssprop --wcs-checkbox-text-color-default - Color of the text when the checkbox is not selected\n * @cssprop --wcs-checkbox-text-color-disabled - Color of the text when the checkbox is disabled\n * @cssprop --wcs-checkbox-text-color-hover - Color of the text when the checkbox is hovered\n * @cssprop --wcs-checkbox-text-color-selected - Color of the text when the checkbox is selected\n * \n * @cssprop --wcs-checkbox-text-font-size - Font size of the text\n * @cssprop --wcs-checkbox-text-font-weight - Font weight of the text\n * \n * @cssprop --wcs-checkbox-background-color-default - Default background color of the checkbox\n * @cssprop --wcs-checkbox-background-color-hover - Background color of the checkbox when hovered\n * @cssprop --wcs-checkbox-background-color-disabled - Background color of the checkbox when disabled\n * @cssprop --wcs-checkbox-background-color-selected - Background color of the checkbox when selected\n * @cssprop --wcs-checkbox-background-color-indeterminate - Background color of the checkbox when indeterminate\n * \n * @cssprop --wcs-checkbox-outline-radius-focus - Border radius of the focus outline\n * @cssprop --wcs-checkbox-outline-color-focus - Color of the focus outline\n * \n * @cssprop --wcs-checkbox-gap - Gap between the checkbox and the label\n * @cssprop --wcs-checkmark-color - Color of the checkmark\n * @cssprop --wcs-checkmark-height - Height of the checkmark (From the bottom left to the top right of the checkmark)\n * @cssprop --wcs-checkmark-width - Width of the checkmark (From the bottom right to the top left of the checkmark)\n * @cssprop --wcs-checkmark-border-width - Width of the border of the checkmark\n *\n * @cssprop --wcs-indeterminate-bar-width - Width of the indeterminate bar\n * @cssprop --wcs-indeterminate-bar-height - Height of the indeterminate bar\n * @cssprop --wcs-indeterminate-bar-border-radius - Border-radius of the indeterminate bar\n * @cssprop --wcs-indeterminate-bar-background-color - Color of the indeterminate bar\n * \n * @cssprop --wcs-checkbox-transition-duration - Duration of the transition\n */\n@Component({\n tag: 'wcs-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Checkbox implements ComponentInterface, MutableAriaAttribute, ControlComponentWithLabel {\n @Element() private el!: HTMLElement;\n private nativeInput!: HTMLInputElement;\n private inheritedAttributes: { [k: string]: any } = {};\n private checkboxId = `wcs-checkbox-${checkboxIds++}`;\n\n @Prop() name = this.checkboxId;\n /**\n * If `true` the checkbox is in indeterminate state.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate = false;\n\n /**\n * If `true`, the checkbox is selected.\n */\n @Prop({ reflect: true, mutable: true }) checked = false;\n\n /**\n * Specifie the alignment of the checkbox with the label content\n */\n @Prop({ mutable: true, reflect: true }) labelAlignment: CheckboxLabelAlignment = 'center';\n\n /**\n * Specify whether the checkbox is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Emitted when the checked property has changed.\n */\n @Event() wcsChange!: EventEmitter<CheckboxChangeEventDetail>;\n\n /**\n * Emitted when the checkbox has focus.\n */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n componentWillLoad(): Promise<void> | void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, CHECKBOX_INHERITED_ATTRS),\n };\n }\n\n componentDidLoad() {\n this.onSlotChange();\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.nativeInput, attr, value);\n }\n\n @Method()\n async getLabel(): Promise<string> {\n return getSlottedContentText(this.el);\n }\n\n handleChange(e: Event) {\n e.stopImmediatePropagation();\n e.preventDefault();\n this.toggleCheckboxState();\n }\n \n @Listen('click')\n async handleHostClick(e: Event){\n e.preventDefault();\n e.stopPropagation();\n \n this.toggleCheckboxState();\n }\n\n handleInputClick(ev: PointerEvent) {\n // If the click event is coming from the mouse we ignore it.\n // We only want to handle the keyboard interactions as it is the only purpose of this native input\n if (ev.detail) {\n ev.stopImmediatePropagation()\n ev.preventDefault();\n }\n }\n\n toggleCheckboxState() {\n if (this.disabled) return;\n \n this.indeterminate = false;\n this.checked = !this.checked;\n this.wcsChange.emit({\n checked: this.checked,\n });\n }\n \n handleFocus(event: FocusEvent) {\n this.wcsFocus.emit(event);\n }\n\n handleBlur(event: FocusEvent) {\n this.wcsBlur.emit(event);\n }\n\n onSlotChange() { \n const slot = this.el.shadowRoot.querySelector('slot');\n if (slot) {\n // TODO: remove when pseudo-class that indicate a slot has content is supported in all major browsers \n // (https://github.com/w3c/csswg-drafts/issues/6867)\n // https://developer.mozilla.org/en-US/docs/Web/CSS/:empty\n const assignedNodes = slot.assignedNodes();\n if (assignedNodes.length > 0) {\n this.el.shadowRoot.querySelector('.text').classList.remove('hidden');\n } else {\n this.el.shadowRoot.querySelector('.text').classList.add('hidden');\n }\n }\n }\n \n render() {\n return (\n <Host>\n <label htmlFor={this.name} class=\"wcs-container\" aria-disabled={this.disabled}>\n <input\n onBlur={this.handleBlur.bind(this)}\n onChange={this.handleChange.bind(this)}\n onFocus={this.handleFocus.bind(this)}\n onClick={this.handleInputClick.bind(this)}\n checked={this.checked}\n class=\"wcs-checkbox\"\n type=\"checkbox\"\n ref={(el) => (this.nativeInput = el)}\n name={this.name}\n disabled={this.disabled}\n id={this.name}\n {...this.inheritedAttributes}\n ></input>\n <span class=\"wcs-checkmark\"></span>\n <span class=\"text\">\n <slot onSlotchange={(_) => this.onSlotChange()} />\n </span>\n </label>\n </Host>\n );\n }\n}\n\nlet checkboxIds = 0;\n"]}
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
:host ::slotted(a:focus-visible) {
|
|
50
50
|
outline: none;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
:host(:focus-within) {
|
|
53
54
|
outline: var(--wcs-semantic-border-width-large) dashed var(--wcs-com-nav-item-focus-outline-color);
|
|
54
55
|
outline-offset: 0.5rem;
|
|
55
56
|
border-radius: 2px;
|
|
@@ -68,6 +68,9 @@
|
|
|
68
68
|
background-clip: padding-box;
|
|
69
69
|
gap: var(--wcs-counter-gap);
|
|
70
70
|
}
|
|
71
|
+
:host .counter:focus-within {
|
|
72
|
+
outline: none;
|
|
73
|
+
}
|
|
71
74
|
:host .counter:has(.current-value:focus-visible) {
|
|
72
75
|
outline: var(--wcs-semantic-border-width-large) dashed var(--wcs-counter-outline-color-focus);
|
|
73
76
|
outline-offset: 0;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { inheritAriaAttributes, inheritAttributes, isEndKey, isHomeKey, isKeydown, isKeyup, setOrRemoveAttribute } from "../../utils/helpers";
|
|
2
|
+
import { inheritAriaAttributes, inheritAttributes, isEndKey, isHomeKey, isKeydown, isKeyup, parseCssTimeValueToMilliseconds, setOrRemoveAttribute } from "../../utils/helpers";
|
|
3
3
|
import { isWcsCounterSize, WcsCounterSizeValues } from "./counter-interface";
|
|
4
4
|
const COUNTER_INHERITED_ATTRS = ['tabindex', 'title'];
|
|
5
|
-
const ANIMATION_DURATION = 0.175; // seconds
|
|
6
5
|
/**
|
|
7
6
|
* Counter component, meant to be used for small range of values (e.g : 0 - 5).<br>
|
|
8
7
|
* For larger or specific ranges, please use [wcs-input (type number)](.?path=/docs/components-input--documentation)
|
|
@@ -32,6 +31,11 @@ const ANIMATION_DURATION = 0.175; // seconds
|
|
|
32
31
|
export class Counter {
|
|
33
32
|
constructor() {
|
|
34
33
|
this.inheritedAttributes = {};
|
|
34
|
+
/**
|
|
35
|
+
* Default animation duration, in milliseconds
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
this.ANIMATION_DURATION = 150;
|
|
35
39
|
this.animateRunning = false;
|
|
36
40
|
this.handleDecrement = () => {
|
|
37
41
|
if (this.disabled)
|
|
@@ -74,7 +78,7 @@ export class Counter {
|
|
|
74
78
|
});
|
|
75
79
|
this.displayedValue = this.value;
|
|
76
80
|
this.animateRunning = false;
|
|
77
|
-
},
|
|
81
|
+
}, this.ANIMATION_DURATION - 20);
|
|
78
82
|
};
|
|
79
83
|
this.size = 'm';
|
|
80
84
|
this.label = undefined;
|
|
@@ -93,6 +97,10 @@ export class Counter {
|
|
|
93
97
|
}
|
|
94
98
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, COUNTER_INHERITED_ATTRS));
|
|
95
99
|
}
|
|
100
|
+
componentDidRender() {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
this.ANIMATION_DURATION = (_b = parseCssTimeValueToMilliseconds((_a = window.getComputedStyle(this.el).getPropertyValue('--wcs-counter-transition-duration')) !== null && _a !== void 0 ? _a : '150ms')) !== null && _b !== void 0 ? _b : 150;
|
|
103
|
+
}
|
|
96
104
|
async setAriaAttribute(attr, value) {
|
|
97
105
|
setOrRemoveAttribute(this.spinButton, attr, value);
|
|
98
106
|
}
|
|
@@ -162,7 +170,7 @@ export class Counter {
|
|
|
162
170
|
});
|
|
163
171
|
}
|
|
164
172
|
render() {
|
|
165
|
-
return (h(Host, { key: '
|
|
173
|
+
return (h(Host, { key: 'a957d407947a81ebdc48dde3977ab2b2a19006ad' }, h("div", { key: 'dbc569a37c06b78b6e2dabb87731db62590b347f', class: "counter" }, h("wcs-button", { key: 'c7a9f3e34ac9907789a4218fc44b34698a5897e9', class: "wcs-primary", shape: "round", size: "s", tabindex: -1, onClick: () => this.handleDecrement(), onBlur: (event) => this.wcsBlur.emit(event), disabled: this.disabled || this.value === this.min }, h("wcs-mat-icon", { key: 'd6467a23f871a6beab70aff5d7c333c544eb9913', icon: "remove", size: "s" })), h("div", { key: '2a1fd878363e0667b2f14a5d767a0367aa6b7149', class: "counter-container", ref: input => this.counterContainer = input }, h("span", { key: '7741dec6872c3c1ba72b0191cb081b41cb43e303', id: "outlier-down", class: "outliers", hidden: true, "aria-hidden": "true" }, this.displayedValue - this.step), h("span", Object.assign({ key: '20e00232af8397a0fc042f6570d4c1d74fd14bb5', tabindex: this.disabled ? -1 : 0, role: "spinbutton", ref: (el) => this.spinButton = el, class: "current-value", onBlur: (event) => this.wcsBlur.emit(event), onKeyDown: (event) => this.onKeyDown(event), "aria-disabled": this.disabled ? 'true' : null, "aria-valuenow": this.value, "aria-valuetext": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-label": this.label }, this.inheritedAttributes), this.displayedValue), h("span", { key: '2794cbc223820ec7bd6fa055aed3ba6fe92fc319', id: "outlier-up", class: "outliers", hidden: true, "aria-hidden": "true" }, this.displayedValue + this.step)), h("wcs-button", { key: 'cbce7b7dba69d9c0546152e6b283fd85f389e7fc', class: "wcs-primary", shape: "round", size: "s", tabindex: -1, onClick: () => this.handleIncrement(), onBlur: (event) => this.wcsBlur.emit(event), disabled: this.disabled || this.value === this.max }, h("wcs-mat-icon", { key: 'af515fae89b19516f9706f1582a77b9daababb3b', icon: "add", size: "s" })))));
|
|
166
174
|
}
|
|
167
175
|
static get is() { return "wcs-counter"; }
|
|
168
176
|
static get encapsulation() { return "shadow"; }
|
|
@@ -235,7 +243,7 @@ export class Counter {
|
|
|
235
243
|
"text": "Specify whether the counter is disabled or not."
|
|
236
244
|
},
|
|
237
245
|
"attribute": "disabled",
|
|
238
|
-
"reflect":
|
|
246
|
+
"reflect": true,
|
|
239
247
|
"defaultValue": "false"
|
|
240
248
|
},
|
|
241
249
|
"min": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"counter.js","sourceRoot":"","sources":["../../../src/components/counter/counter.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACW,OAAO,EAC3B,KAAK,EAEL,CAAC,EACD,IAAI,EAAE,MAAM,EACZ,IAAI,EACJ,KAAK,EACL,KAAK,EACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,oBAAoB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAA4B,gBAAgB,EAAkB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGvH,MAAM,uBAAuB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAEtD,MAAM,kBAAkB,GAAG,KAAK,CAAA,CAAC,UAAU;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,MAAM,OAAO,OAAO;;QAIR,wBAAmB,GAAyB,EAAE,CAAC;QAkD/C,mBAAc,GAAG,KAAK,CAAC;QAkGvB,oBAAe,GAAG,GAAG,EAAE;YAC3B,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAC1B,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBAClD,0GAA0G;gBAC1G,6BAA6B;gBAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;gBAC3B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;gBACxB,IAAI,CAAC,YAAY,EAAE,CAAC;gBACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n ComponentInterface, Element,\n Event,\n EventEmitter,\n h,\n Host, Method,\n Prop,\n State,\n Watch\n} from '@stencil/core';\nimport {\n inheritAriaAttributes,\n inheritAttributes,\n isEndKey,\n isHomeKey,\n isKeydown,\n isKeyup,\n setOrRemoveAttribute\n} from '../../utils/helpers';\nimport { CounterChangeEventDetail, isWcsCounterSize, WcsCounterSize, WcsCounterSizeValues } from './counter-interface';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst COUNTER_INHERITED_ATTRS = ['tabindex', 'title'];\n\nconst ANIMATION_DURATION = 0.175 // seconds\n\n/**\n * Counter component, meant to be used for small range of values (e.g : 0 - 5).<br>\n * For larger or specific ranges, please use [wcs-input (type number)](.?path=/docs/components-input--documentation)\n * \n * @cssprop --wcs-counter-border-radius - Border radius of the counter\n * \n * @cssprop --wcs-counter-value-color-default - Default color of the value \n * @cssprop --wcs-counter-value-color-disabled - Color of the text when the counter is disabled\n * @cssprop --wcs-counter-font-weight - Font weight of the value\n * \n * @cssprop --wcs-counter-height-m - Height medium of the counter\n * @cssprop --wcs-counter-height-l - Height large of the counter\n * @cssprop --wcs-counter-font-size-m - Font size medium of the counter\n * @cssprop --wcs-counter-font-size-l - Font size large of the counter\n * @cssprop --wcs-counter-padding-m - Padding medium of the counter\n * @cssprop --wcs-counter-padding-l - Padding large of the counter\n * \n * @cssprop --wcs-counter-background-color - Background color of the counter\n * @cssprop --wcs-counter-gap - Gap between the buttons and the label\n * @cssprop --wcs-counter-gap-size-m - Gap between the buttons and the label when the size is M\n * @cssprop --wcs-counter-gap-size-l - Gap between the buttons and the label when the size is L\n * @cssprop --wcs-counter-outline-color-focus - Color of the focus outline\n *\n * @cssprop --wcs-counter-transition-duration - Duration of the animation\n * \n */\n@Component({\n tag: 'wcs-counter',\n styleUrl: 'counter.scss',\n shadow: {\n delegatesFocus: true\n },\n})\nexport class Counter implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private spinButton!: HTMLSpanElement;\n private counterContainer!: HTMLDivElement;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * Specify the size (height) of the counter.\n */\n @Prop({reflect: true}) size: WcsCounterSize = 'm';\n\n /**\n * The label of the counter.<br/>\n * e.g. Number of passengers, train carriages, railroad tracks...\n */\n @Prop({mutable: false}) label!: string;\n\n /**\n * Specify whether the counter is disabled or not.\n */\n @Prop() disabled = false;\n\n /**\n * The minimum value of the counter.\n * If the value of the min attribute isn't set, then the element has no minimum value.\n */\n @Prop({mutable: true}) min?: number;\n\n /**\n * The maximum value of the counter.\n * If the value of the max attribute isn't set, then the element has no maximum value.\n */\n @Prop({mutable: true}) max?: number;\n\n /**\n * Defines by how much the counter will be incremented or decremented.\n */\n @Prop({mutable: true}) step: number = 1;\n\n /**\n * Emitted when the value of the counter has changed.\n */\n @Event() wcsChange!: EventEmitter<CounterChangeEventDetail>;\n\n /**\n * The current value of the counter.\n */\n @Prop({mutable: true}) value!: number;\n\n /**\n * Only for animation and display purpose\n */\n @State() private displayedValue: number;\n\n private animateRunning = false;\n\n /**\n * Emitted when the counter loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n componentWillLoad() {\n this.handleValueChange();\n\n if (!isWcsCounterSize(this.size)) {\n console.warn(`Invalid size value for wcs-counter : \"${this.size}\". Must be one of \"${WcsCounterSizeValues.join(', ')}\"`);\n this.size = \"m\"; // Default fallback value\n }\n\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, COUNTER_INHERITED_ATTRS),\n };\n }\n \n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.spinButton, attr, value);\n }\n \n /**\n * Current value change => handle event and interval\n */\n @Watch('value')\n valueChange(newVal: any, oldVal: any) {\n if(oldVal === newVal) return;\n\n this.handleValueChange();\n }\n\n private handleValueChange() {\n this.setMinimumIfValueIsUndefinedOrNull();\n this.ensureValueIsNotOutOfMinMax();\n this.updateDisplayValueIfNoAnimationRunning();\n }\n\n private updateDisplayValueIfNoAnimationRunning() {\n if (!this.animateRunning) {\n this.displayedValue = this.value;\n }\n }\n\n private ensureValueIsNotOutOfMinMax() {\n if (this.max !== undefined && this.value > this.max) {\n this.value = this.max;\n } else if (this.min !== undefined && this.value < this.min) {\n this.value = this.min;\n }\n }\n\n private setMinimumIfValueIsUndefinedOrNull() {\n if (this.value === undefined || this.value === null) {\n this.value = this.min ?? 0;\n }\n }\n\n onKeyDown(_event: KeyboardEvent) {\n if (this.disabled) return; \n \n if (isKeyup(_event)) {\n _event.preventDefault();\n this.handleIncrement()\n }\n if (isKeydown(_event)) {\n _event.preventDefault();\n this.handleDecrement()\n }\n if (isHomeKey(_event)) {\n _event.preventDefault();\n if (this.min != null) {\n this.value = this.min;\n this.displayedValue = this.value;\n this.notifyChange();\n }\n }\n if (isEndKey(_event)) {\n _event.preventDefault();\n if (this.max != null) {\n this.value = this.max;\n this.displayedValue = this.value;\n this.notifyChange();\n }\n }\n }\n\n private notifyChange() {\n this.wcsChange.emit({\n value: this.value\n });\n }\n \n private handleDecrement = () => {\n if (this.disabled) return;\n if (this.min === undefined || this.value > this.min) {\n // we set animateRunning here to prevent the watch method on value prop from affecting the displayed value\n // before the animation runs.\n this.animateRunning = true; \n this.value -= this.step;\n this.notifyChange();\n this.animate('up');\n }\n };\n\n private handleIncrement = () => {\n if (this.disabled) return;\n if (this.max === undefined || this.value < this.max) {\n // we set animateRunning here to prevent the watch method on value prop from affecting the displayed value\n // before the animation runs.\n this.animateRunning = true; \n this.value += this.step;\n this.notifyChange();\n this.animate('down');\n }\n };\n\n private animate = (direction: 'up' | 'down'): void => {\n // In case someone call animate function, we want ensured that animateRunning is set to true to prevent other \n // method to mutate the displayedValue.\n this.animateRunning = true; \n\n const outliers = Array.from(this.counterContainer.children)\n .filter((span: HTMLSpanElement) => span.classList.contains('outliers'));\n\n this.counterContainer.classList.add('animate-' + direction);\n outliers.forEach((span: HTMLSpanElement) => {\n span.hidden = false;\n });\n setTimeout(() => {\n this.counterContainer.classList.remove('animate-' + direction);\n outliers.forEach((span: HTMLSpanElement) => {\n span.hidden = true;\n });\n this.displayedValue = this.value;\n\n this.animateRunning = false;\n }, 1000 * ANIMATION_DURATION - 20);\n }\n\n render() {\n return (\n <Host>\n <div class=\"counter\">\n <wcs-button class=\"wcs-primary\"\n shape=\"round\"\n size=\"s\"\n tabindex={-1}\n onClick={() => this.handleDecrement()}\n onBlur={(event) => this.wcsBlur.emit(event)}\n disabled={this.disabled || this.value === this.min}>\n <wcs-mat-icon icon=\"remove\" size=\"s\"></wcs-mat-icon> \n </wcs-button>\n <div class=\"counter-container\" ref={input => this.counterContainer = input}>\n <span id=\"outlier-down\"\n class=\"outliers\"\n hidden\n aria-hidden=\"true\">{this.displayedValue - this.step}</span>\n <span tabindex={this.disabled ? -1 : 0}\n role=\"spinbutton\"\n ref={(el) => this.spinButton = el}\n class=\"current-value\"\n onBlur={(event) => this.wcsBlur.emit(event)}\n onKeyDown={(event) => this.onKeyDown(event)}\n aria-disabled={this.disabled ? 'true' : null}\n aria-valuenow={this.value}\n aria-valuetext={this.value}\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n aria-label={this.label}\n {...this.inheritedAttributes}>{this.displayedValue}</span>\n <span id=\"outlier-up\"\n class=\"outliers\"\n hidden\n aria-hidden=\"true\">{this.displayedValue + this.step}</span>\n </div>\n <wcs-button class=\"wcs-primary\"\n shape=\"round\"\n size=\"s\"\n tabindex={-1}\n onClick={() => this.handleIncrement()}\n onBlur={(event) => this.wcsBlur.emit(event)}\n disabled={this.disabled || this.value === this.max}>\n <wcs-mat-icon icon=\"add\" size=\"s\"></wcs-mat-icon>\n </wcs-button>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"counter.js","sourceRoot":"","sources":["../../../src/components/counter/counter.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACW,OAAO,EAC3B,KAAK,EAEL,CAAC,EACD,IAAI,EAAE,MAAM,EACZ,IAAI,EACJ,KAAK,EACL,KAAK,EACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,+BAA+B,EAC/B,oBAAoB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAA4B,gBAAgB,EAAkB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGvH,MAAM,uBAAuB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAGtD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,MAAM,OAAO,OAAO;;QAIR,wBAAmB,GAAyB,EAAE,CAAC;QAEvD;;;WAGG;QACK,uBAAkB,GAAG,GAAG,CAAC;QAkDzB,mBAAc,GAAG,KAAK,CAAC;QAqGvB,oBAAe,GAAG,GAAG,EAAE;YAC3B,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAC1B,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBAClD,0GAA0G;gBAC1G,6BAA6B;gBAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;gBAC3B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;gBACxB,IAAI,CAAC,YAAY,EAAE,CAAC;gBACpB,IAAI,CAAC,OAAO,CAAC,IAA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,CAAC,IAAI,CAAC,KAAK,CAAC,EAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,GAAG;oBAC1D,qEAAc,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,GAAG,GAAgB,CACxC,CACX,CACH,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n ComponentInterface, Element,\n Event,\n EventEmitter,\n h,\n Host, Method,\n Prop,\n State,\n Watch\n} from '@stencil/core';\nimport {\n inheritAriaAttributes,\n inheritAttributes,\n isEndKey,\n isHomeKey,\n isKeydown,\n isKeyup,\n parseCssTimeValueToMilliseconds,\n setOrRemoveAttribute\n} from '../../utils/helpers';\nimport { CounterChangeEventDetail, isWcsCounterSize, WcsCounterSize, WcsCounterSizeValues } from './counter-interface';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\nconst COUNTER_INHERITED_ATTRS = ['tabindex', 'title'];\n\n\n/**\n * Counter component, meant to be used for small range of values (e.g : 0 - 5).<br>\n * For larger or specific ranges, please use [wcs-input (type number)](.?path=/docs/components-input--documentation)\n * \n * @cssprop --wcs-counter-border-radius - Border radius of the counter\n * \n * @cssprop --wcs-counter-value-color-default - Default color of the value \n * @cssprop --wcs-counter-value-color-disabled - Color of the text when the counter is disabled\n * @cssprop --wcs-counter-font-weight - Font weight of the value\n * \n * @cssprop --wcs-counter-height-m - Height medium of the counter\n * @cssprop --wcs-counter-height-l - Height large of the counter\n * @cssprop --wcs-counter-font-size-m - Font size medium of the counter\n * @cssprop --wcs-counter-font-size-l - Font size large of the counter\n * @cssprop --wcs-counter-padding-m - Padding medium of the counter\n * @cssprop --wcs-counter-padding-l - Padding large of the counter\n * \n * @cssprop --wcs-counter-background-color - Background color of the counter\n * @cssprop --wcs-counter-gap - Gap between the buttons and the label\n * @cssprop --wcs-counter-gap-size-m - Gap between the buttons and the label when the size is M\n * @cssprop --wcs-counter-gap-size-l - Gap between the buttons and the label when the size is L\n * @cssprop --wcs-counter-outline-color-focus - Color of the focus outline\n *\n * @cssprop --wcs-counter-transition-duration - Duration of the animation\n * \n */\n@Component({\n tag: 'wcs-counter',\n styleUrl: 'counter.scss',\n shadow: {\n delegatesFocus: true\n },\n})\nexport class Counter implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLElement;\n private spinButton!: HTMLSpanElement;\n private counterContainer!: HTMLDivElement;\n private inheritedAttributes: { [k: string]: any } = {};\n\n /**\n * Default animation duration, in milliseconds\n * @private\n */\n private ANIMATION_DURATION = 150;\n\n /**\n * Specify the size (height) of the counter.\n */\n @Prop({reflect: true}) size: WcsCounterSize = 'm';\n\n /**\n * The label of the counter.<br/>\n * e.g. Number of passengers, train carriages, railroad tracks...\n */\n @Prop({mutable: false}) label!: string;\n\n /**\n * Specify whether the counter is disabled or not.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * The minimum value of the counter.\n * If the value of the min attribute isn't set, then the element has no minimum value.\n */\n @Prop({mutable: true}) min?: number;\n\n /**\n * The maximum value of the counter.\n * If the value of the max attribute isn't set, then the element has no maximum value.\n */\n @Prop({mutable: true}) max?: number;\n\n /**\n * Defines by how much the counter will be incremented or decremented.\n */\n @Prop({mutable: true}) step: number = 1;\n\n /**\n * Emitted when the value of the counter has changed.\n */\n @Event() wcsChange!: EventEmitter<CounterChangeEventDetail>;\n\n /**\n * The current value of the counter.\n */\n @Prop({mutable: true}) value!: number;\n\n /**\n * Only for animation and display purpose\n */\n @State() private displayedValue: number;\n\n private animateRunning = false;\n\n /**\n * Emitted when the counter loses focus.\n */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n componentWillLoad() {\n this.handleValueChange();\n\n if (!isWcsCounterSize(this.size)) {\n console.warn(`Invalid size value for wcs-counter : \"${this.size}\". Must be one of \"${WcsCounterSizeValues.join(', ')}\"`);\n this.size = \"m\"; // Default fallback value\n }\n\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, COUNTER_INHERITED_ATTRS),\n };\n }\n \n componentDidRender() {\n this.ANIMATION_DURATION = parseCssTimeValueToMilliseconds(window.getComputedStyle(this.el).getPropertyValue('--wcs-counter-transition-duration') ?? '150ms') ?? 150;\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n setOrRemoveAttribute(this.spinButton, attr, value);\n }\n \n /**\n * Current value change => handle event and interval\n */\n @Watch('value')\n valueChange(newVal: any, oldVal: any) {\n if(oldVal === newVal) return;\n\n this.handleValueChange();\n }\n\n private handleValueChange() {\n this.setMinimumIfValueIsUndefinedOrNull();\n this.ensureValueIsNotOutOfMinMax();\n this.updateDisplayValueIfNoAnimationRunning();\n }\n\n private updateDisplayValueIfNoAnimationRunning() {\n if (!this.animateRunning) {\n this.displayedValue = this.value;\n }\n }\n\n private ensureValueIsNotOutOfMinMax() {\n if (this.max !== undefined && this.value > this.max) {\n this.value = this.max;\n } else if (this.min !== undefined && this.value < this.min) {\n this.value = this.min;\n }\n }\n\n private setMinimumIfValueIsUndefinedOrNull() {\n if (this.value === undefined || this.value === null) {\n this.value = this.min ?? 0;\n }\n }\n\n onKeyDown(_event: KeyboardEvent) {\n if (this.disabled) return; \n \n if (isKeyup(_event)) {\n _event.preventDefault();\n this.handleIncrement()\n }\n if (isKeydown(_event)) {\n _event.preventDefault();\n this.handleDecrement()\n }\n if (isHomeKey(_event)) {\n _event.preventDefault();\n if (this.min != null) {\n this.value = this.min;\n this.displayedValue = this.value;\n this.notifyChange();\n }\n }\n if (isEndKey(_event)) {\n _event.preventDefault();\n if (this.max != null) {\n this.value = this.max;\n this.displayedValue = this.value;\n this.notifyChange();\n }\n }\n }\n\n private notifyChange() {\n this.wcsChange.emit({\n value: this.value\n });\n }\n \n private handleDecrement = () => {\n if (this.disabled) return;\n if (this.min === undefined || this.value > this.min) {\n // we set animateRunning here to prevent the watch method on value prop from affecting the displayed value\n // before the animation runs.\n this.animateRunning = true; \n this.value -= this.step;\n this.notifyChange();\n this.animate('up');\n }\n };\n\n private handleIncrement = () => {\n if (this.disabled) return;\n if (this.max === undefined || this.value < this.max) {\n // we set animateRunning here to prevent the watch method on value prop from affecting the displayed value\n // before the animation runs.\n this.animateRunning = true; \n this.value += this.step;\n this.notifyChange();\n this.animate('down');\n }\n };\n\n private animate = (direction: 'up' | 'down'): void => {\n // In case someone call animate function, we want ensured that animateRunning is set to true to prevent other \n // method to mutate the displayedValue.\n this.animateRunning = true; \n\n const outliers = Array.from(this.counterContainer.children)\n .filter((span: HTMLSpanElement) => span.classList.contains('outliers'));\n\n this.counterContainer.classList.add('animate-' + direction);\n outliers.forEach((span: HTMLSpanElement) => {\n span.hidden = false;\n });\n setTimeout(() => {\n this.counterContainer.classList.remove('animate-' + direction);\n outliers.forEach((span: HTMLSpanElement) => {\n span.hidden = true;\n });\n this.displayedValue = this.value;\n\n this.animateRunning = false;\n }, this.ANIMATION_DURATION - 20);\n }\n\n render() {\n return (\n <Host>\n <div class=\"counter\">\n <wcs-button class=\"wcs-primary\"\n shape=\"round\"\n size=\"s\"\n tabindex={-1}\n onClick={() => this.handleDecrement()}\n onBlur={(event) => this.wcsBlur.emit(event)}\n disabled={this.disabled || this.value === this.min}>\n <wcs-mat-icon icon=\"remove\" size=\"s\"></wcs-mat-icon> \n </wcs-button>\n <div class=\"counter-container\" ref={input => this.counterContainer = input}>\n <span id=\"outlier-down\"\n class=\"outliers\"\n hidden\n aria-hidden=\"true\">{this.displayedValue - this.step}</span>\n <span tabindex={this.disabled ? -1 : 0}\n role=\"spinbutton\"\n ref={(el) => this.spinButton = el}\n class=\"current-value\"\n onBlur={(event) => this.wcsBlur.emit(event)}\n onKeyDown={(event) => this.onKeyDown(event)}\n aria-disabled={this.disabled ? 'true' : null}\n aria-valuenow={this.value}\n aria-valuetext={this.value}\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n aria-label={this.label}\n {...this.inheritedAttributes}>{this.displayedValue}</span>\n <span id=\"outlier-up\"\n class=\"outliers\"\n hidden\n aria-hidden=\"true\">{this.displayedValue + this.step}</span>\n </div>\n <wcs-button class=\"wcs-primary\"\n shape=\"round\"\n size=\"s\"\n tabindex={-1}\n onClick={() => this.handleIncrement()}\n onBlur={(event) => this.wcsBlur.emit(event)}\n disabled={this.disabled || this.value === this.max}>\n <wcs-mat-icon icon=\"add\" size=\"s\"></wcs-mat-icon>\n </wcs-button>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -203,7 +203,7 @@ export class Dropdown {
|
|
|
203
203
|
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, DROPDOWN_INHERITED_ATTRS));
|
|
204
204
|
}
|
|
205
205
|
render() {
|
|
206
|
-
return (h(Host, { key: '
|
|
206
|
+
return (h(Host, { key: '1480819d88a274e16ebb4544de646c47748d8223' }, h("button", Object.assign({ key: 'f5695efc0671635050c8a72a22894ec68691ae18', id: "dropdown-button", "aria-controls": "menu", disabled: this.disabled, "aria-haspopup": "true", role: "button", "aria-expanded": this.expanded ? 'true' : 'false', ref: el => this.nativeButton = el, onClick: ($event) => this.onButtonClick($event), onBlur: ($event) => $event.stopImmediatePropagation() }, this.inheritedAttributes), "Dropdown"), h("wcs-button", { key: '6a6f447e212cebee7af2e73fe03cfe862c820c27', mode: this.mode, shape: this.shape, disabled: this.disabled, size: this.size, ref: el => this.wcsButton = el, "aria-hidden": "true", tabindex: -1, onClick: ($event) => this.onButtonClick($event), onBlur: (e) => e.stopImmediatePropagation() }, h("div", { key: 'e2342ef539cfd88f61a5970f33c9cbce8dc29fa6', class: "wcs-button-content-wrapper" }, h("slot", { key: '1ce22f6b985d763763e4738d188e2e4f9540d8af', name: "placeholder" }), this.noArrow ? null : (h(SelectArrow, { up: this.expanded })))), h("div", { key: '2e62c382bf097f6c85f2c590f8b98feb9d0f2993', class: (this.expanded ? 'show ' : '') + 'popover', id: "menu", role: "menu", "aria-labelledby": "dropdown-button", tabindex: -1, ref: el => this.popoverDiv = el }, h("div", { key: '0556f15d918b936198d4ab61844ffada916bf328', role: "presentation", id: "arrow", "data-popper-arrow": true }), h("div", { key: '27129e6faa2a8921154b547e219e93543a72ac52', role: "presentation", class: "container" }, h("slot", { key: '484b677521290251daf185f50bbfc288538cb5ef', name: "item" }, h("span", { key: '6bdff4146ffe5a503fd024c6a0f89239c031daef', id: "is-empty" }))))));
|
|
207
207
|
}
|
|
208
208
|
static get is() { return "wcs-dropdown"; }
|
|
209
209
|
static get encapsulation() { return "shadow"; }
|
|
@@ -325,7 +325,7 @@ export class Dropdown {
|
|
|
325
325
|
"text": "Specifies whether the dropdown button is clickable or not"
|
|
326
326
|
},
|
|
327
327
|
"attribute": "disabled",
|
|
328
|
-
"reflect":
|
|
328
|
+
"reflect": true,
|
|
329
329
|
"defaultValue": "false"
|
|
330
330
|
},
|
|
331
331
|
"placement": {
|