@otto-de/b2b-core-components 1.30.0 → 1.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
- package/dist/b2b-core-components/p-00666ca7.entry.js +1 -0
- package/dist/b2b-core-components/p-0a63f5f8.entry.js +1 -0
- package/dist/b2b-core-components/{p-9cfba835.entry.js → p-0bf05f33.entry.js} +1 -1
- package/dist/b2b-core-components/{p-68e07419.entry.js → p-0edac105.entry.js} +1 -1
- package/dist/b2b-core-components/p-0ffc90ee.entry.js +1 -0
- package/dist/b2b-core-components/p-168c8684.entry.js +1 -0
- package/dist/b2b-core-components/p-19392020.js +1 -0
- package/dist/b2b-core-components/p-1a908833.entry.js +1 -0
- package/dist/b2b-core-components/{p-a37d6cea.entry.js → p-1dff8b34.entry.js} +1 -1
- package/dist/b2b-core-components/p-2d5df8f7.entry.js +1 -0
- package/dist/b2b-core-components/p-2dc0c5c0.entry.js +1 -0
- package/dist/b2b-core-components/p-318eb15e.entry.js +1 -0
- package/dist/b2b-core-components/p-33c01bb2.entry.js +1 -0
- package/dist/b2b-core-components/p-375cefbd.entry.js +1 -0
- package/dist/b2b-core-components/p-383d0a10.entry.js +1 -0
- package/dist/b2b-core-components/{p-08577a40.entry.js → p-400fa973.entry.js} +1 -1
- package/dist/b2b-core-components/p-413729d1.entry.js +1 -0
- package/dist/b2b-core-components/p-4528e98c.entry.js +1 -0
- package/dist/b2b-core-components/p-49bafb74.entry.js +1 -0
- package/dist/b2b-core-components/{p-745ad406.entry.js → p-4bc0ec9a.entry.js} +1 -1
- package/dist/b2b-core-components/p-564c62d0.entry.js +1 -0
- package/dist/b2b-core-components/{p-6040dca2.entry.js → p-6025d667.entry.js} +1 -1
- package/dist/b2b-core-components/p-61b2a6ad.js +1 -0
- package/dist/b2b-core-components/{p-54d478b6.entry.js → p-661d0249.entry.js} +1 -1
- package/dist/b2b-core-components/p-6dd7fd7b.entry.js +1 -0
- package/dist/b2b-core-components/p-6ff5114b.entry.js +1 -0
- package/dist/b2b-core-components/p-742a18f1.entry.js +1 -0
- package/dist/b2b-core-components/{p-23acc468.entry.js → p-781611fb.entry.js} +1 -1
- package/dist/b2b-core-components/{p-0847e62e.entry.js → p-7bb6f06e.entry.js} +1 -1
- package/dist/b2b-core-components/p-7dd8f3cb.entry.js +1 -0
- package/dist/b2b-core-components/p-815d7a53.entry.js +1 -0
- package/dist/b2b-core-components/{p-5063e5b7.entry.js → p-850c8e01.entry.js} +1 -1
- package/dist/b2b-core-components/{p-e8b1fee4.entry.js → p-86ff8e6c.entry.js} +1 -1
- package/dist/b2b-core-components/{p-552f43c1.entry.js → p-9819f622.entry.js} +1 -1
- package/dist/b2b-core-components/{p-ccf78e23.entry.js → p-9dde1af0.entry.js} +1 -1
- package/dist/b2b-core-components/{p-24c94653.entry.js → p-9f88b476.entry.js} +1 -1
- package/dist/b2b-core-components/p-a155219a.entry.js +1 -0
- package/dist/b2b-core-components/p-a96c8ba0.entry.js +1 -0
- package/dist/b2b-core-components/p-b33059ab.entry.js +1 -0
- package/dist/b2b-core-components/p-b5fdf7df.entry.js +1 -0
- package/dist/b2b-core-components/p-b6a753e8.js +2 -0
- package/dist/b2b-core-components/p-bba0b41b.entry.js +1 -0
- package/dist/b2b-core-components/p-be93498d.entry.js +1 -0
- package/dist/b2b-core-components/p-bfbe4aff.entry.js +1 -0
- package/dist/b2b-core-components/p-c597637e.entry.js +1 -0
- package/dist/b2b-core-components/{p-eb01bb4f.entry.js → p-c67bcebc.entry.js} +1 -1
- package/dist/b2b-core-components/p-cb4cc427.entry.js +1 -0
- package/dist/b2b-core-components/{p-a63dfd99.entry.js → p-d1c8105b.entry.js} +1 -1
- package/dist/b2b-core-components/{p-2f9efe3f.entry.js → p-d26ec403.entry.js} +1 -1
- package/dist/b2b-core-components/p-d3204d75.entry.js +1 -0
- package/dist/b2b-core-components/p-d6457a1d.entry.js +1 -0
- package/dist/b2b-core-components/p-db205434.entry.js +1 -0
- package/dist/b2b-core-components/p-e1255160.js +1 -0
- package/dist/b2b-core-components/p-e520c7cf.entry.js +1 -0
- package/dist/b2b-core-components/p-f2fdce36.entry.js +1 -0
- package/dist/b2b-core-components/p-f5786cad.entry.js +1 -0
- package/dist/b2b-core-components/{p-58fb3508.entry.js → p-f5e9dbf4.entry.js} +1 -1
- package/dist/b2b-core-components/p-f9e278da.entry.js +1 -0
- package/dist/b2b-core-components/p-fa85955c.entry.js +1 -0
- package/dist/b2b-core-components/{p-eb78706f.entry.js → p-fae54521.entry.js} +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/b2b-alert.cjs.entry.js +13 -15
- package/dist/cjs/b2b-anchor.cjs.entry.js +8 -10
- package/dist/cjs/b2b-background-box.cjs.entry.js +7 -10
- package/dist/cjs/b2b-breadcrumb-item.cjs.entry.js +10 -8
- package/dist/cjs/b2b-breadcrumb.cjs.entry.js +10 -9
- package/dist/cjs/b2b-button_2.cjs.entry.js +20 -25
- package/dist/cjs/b2b-card.cjs.entry.js +8 -8
- package/dist/cjs/b2b-checkbox-group.cjs.entry.js +15 -13
- package/dist/cjs/b2b-checkbox.cjs.entry.js +22 -19
- package/dist/cjs/b2b-chip-component_2.cjs.entry.js +24 -20
- package/dist/cjs/b2b-core-components.cjs.js +14 -13
- package/dist/cjs/b2b-date-picker-days_5.cjs.entry.js +50 -40
- package/dist/cjs/b2b-date-picker.cjs.entry.js +37 -36
- package/dist/cjs/b2b-dropdown.cjs.entry.js +26 -24
- package/dist/cjs/b2b-flyout-menu-option.cjs.entry.js +10 -8
- package/dist/cjs/b2b-flyout-menu.cjs.entry.js +9 -7
- package/dist/cjs/b2b-grid-col.cjs.entry.js +6 -4
- package/dist/cjs/b2b-grid-row.cjs.entry.js +5 -7
- package/dist/cjs/b2b-grid.cjs.entry.js +6 -4
- package/dist/cjs/b2b-headline.cjs.entry.js +5 -5
- package/dist/cjs/b2b-icon-100.cjs.entry.js +12 -12
- package/dist/cjs/b2b-icon-50.cjs.entry.js +10 -9
- package/dist/cjs/b2b-icon.cjs.entry.js +12 -12
- package/dist/cjs/b2b-input-group_2.cjs.entry.js +24 -24
- package/dist/cjs/b2b-input-label.cjs.entry.js +7 -6
- package/dist/cjs/b2b-input_2.cjs.entry.js +33 -33
- package/dist/cjs/b2b-label.cjs.entry.js +7 -5
- package/dist/cjs/b2b-modal.cjs.entry.js +16 -18
- package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +27 -24
- package/dist/cjs/b2b-pagination.cjs.entry.js +12 -13
- package/dist/cjs/b2b-paragraph.cjs.entry.js +7 -10
- package/dist/cjs/b2b-progress-bar.cjs.entry.js +12 -9
- package/dist/cjs/b2b-radio-button.cjs.entry.js +19 -15
- package/dist/cjs/b2b-radio-group.cjs.entry.js +17 -13
- package/dist/cjs/b2b-required-separator.cjs.entry.js +6 -4
- package/dist/cjs/b2b-rounded-icon.cjs.entry.js +10 -12
- package/dist/cjs/b2b-scrollable-container.cjs.entry.js +6 -3
- package/dist/cjs/b2b-search.cjs.entry.js +10 -9
- package/dist/cjs/b2b-separator.cjs.entry.js +6 -4
- package/dist/cjs/b2b-shimmer.cjs.entry.js +9 -3
- package/dist/cjs/b2b-snackbar.cjs.entry.js +19 -18
- package/dist/cjs/b2b-tab-group.cjs.entry.js +6 -6
- package/dist/cjs/b2b-tab-panel.cjs.entry.js +6 -3
- package/dist/cjs/b2b-tab.cjs.entry.js +8 -8
- package/dist/cjs/b2b-table-cell_2.cjs.entry.js +30 -37
- package/dist/cjs/b2b-table-row.cjs.entry.js +19 -17
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +16 -23
- package/dist/cjs/b2b-table.cjs.entry.js +10 -13
- package/dist/cjs/b2b-textarea.cjs.entry.js +23 -17
- package/dist/cjs/b2b-toggle-button.cjs.entry.js +14 -10
- package/dist/cjs/b2b-toggle-chip.cjs.entry.js +14 -10
- package/dist/cjs/b2b-toggle-group.cjs.entry.js +11 -7
- package/dist/cjs/b2b-toggle-switch.cjs.entry.js +15 -13
- package/dist/cjs/b2b-tooltip.cjs.entry.js +12 -11
- package/dist/cjs/b2b-wizard-icon.cjs.entry.js +9 -8
- package/dist/cjs/b2b-wizard-step.cjs.entry.js +8 -9
- package/dist/cjs/b2b-wizard.cjs.entry.js +10 -12
- package/dist/cjs/index-668808fd.js +2516 -0
- package/dist/cjs/loader.cjs.js +6 -3
- package/dist/cjs/{request-Dwsj-gbA.js → request-801c6ba1.js} +0 -2
- package/dist/cjs/{utils--ZrBSHVe.js → utils-499e9db5.js} +9 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/alert/alert.e2e.js +67 -0
- package/dist/collection/components/alert/alert.js +12 -27
- package/dist/collection/components/anchor/anchor.js +9 -26
- package/dist/collection/components/anchor/anchor.spec.js +68 -0
- package/dist/collection/components/background-box/background-box.e2e.js +63 -0
- package/dist/collection/components/background-box/background-box.js +8 -26
- package/dist/collection/components/background-box/background-box.spec.js +64 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item.js +7 -14
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.js +50 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +6 -12
- package/dist/collection/components/button/button.e2e.js +80 -0
- package/dist/collection/components/button/button.js +23 -52
- package/dist/collection/components/card/card.e2e.js +110 -0
- package/dist/collection/components/card/card.js +5 -14
- package/dist/collection/components/card/card.spec.js +32 -0
- package/dist/collection/components/checkbox/checkbox.e2e.js +38 -0
- package/dist/collection/components/checkbox/checkbox.js +26 -50
- package/dist/collection/components/checkbox/checkbox.spec.js +45 -0
- package/dist/collection/components/checkbox-group/checkbox-group.e2e.js +83 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +16 -31
- package/dist/collection/components/checkbox-group/checkbox-group.spec.js +38 -0
- package/dist/collection/components/chip/chip.e2e.js +99 -0
- package/dist/collection/components/chip/chip.js +17 -30
- package/dist/collection/components/date-picker/date-picker-days-header.js +3 -6
- package/dist/collection/components/date-picker/date-picker-days.js +20 -44
- package/dist/collection/components/date-picker/date-picker-header.e2e.js +38 -0
- package/dist/collection/components/date-picker/date-picker-header.js +10 -15
- package/dist/collection/components/date-picker/date-picker-months.e2e.js +39 -0
- package/dist/collection/components/date-picker/date-picker-months.js +5 -9
- package/dist/collection/components/date-picker/date-picker-years.e2e.js +39 -0
- package/dist/collection/components/date-picker/date-picker-years.js +4 -5
- package/dist/collection/components/date-picker/date-picker.e2e.js +137 -0
- package/dist/collection/components/date-picker/date-picker.js +44 -76
- package/dist/collection/components/dropdown/dropdown.e2e.js +89 -0
- package/dist/collection/components/dropdown/dropdown.js +27 -46
- package/dist/collection/components/dropdown/dropdown.spec.js +52 -0
- package/dist/collection/components/flyout-menu/flyout-menu-option.js +7 -14
- package/dist/collection/components/flyout-menu/flyout-menu.e2e.js +97 -0
- package/dist/collection/components/flyout-menu/flyout-menu.js +5 -8
- package/dist/collection/components/grid/column.js +5 -9
- package/dist/collection/components/grid/grid.e2e.js +17 -0
- package/dist/collection/components/grid/grid.js +2 -5
- package/dist/collection/components/grid/row.js +6 -18
- package/dist/collection/components/headline/headline.e2e.js +13 -0
- package/dist/collection/components/headline/headline.js +3 -12
- package/dist/collection/components/headline/headline.spec.js +67 -0
- package/dist/collection/components/icon/icon.js +11 -24
- package/dist/collection/components/icon/icon.spec.js +21 -0
- package/dist/collection/components/icon-100/icon-100.e2e.js +40 -0
- package/dist/collection/components/icon-100/icon-100.js +11 -24
- package/dist/collection/components/icon-50/icon-50.e2e.js +32 -0
- package/dist/collection/components/icon-50/icon-50.js +8 -18
- package/dist/collection/components/input/input.e2e.js +84 -0
- package/dist/collection/components/input/input.js +33 -64
- package/dist/collection/components/input/input.spec.js +45 -0
- package/dist/collection/components/input-group/input-group.e2e.js +77 -0
- package/dist/collection/components/input-group/input-group.js +9 -17
- package/dist/collection/components/input-group/input-group.spec.js +56 -0
- package/dist/collection/components/input-label/input-label.e2e.js +10 -0
- package/dist/collection/components/input-label/input-label.js +4 -10
- package/dist/collection/components/input-list/input-list-option.js +3 -4
- package/dist/collection/components/input-list/input-list.e2e.js +242 -0
- package/dist/collection/components/input-list/input-list.js +17 -36
- package/dist/collection/components/label/label.e2e.js +17 -0
- package/dist/collection/components/label/label.js +3 -6
- package/dist/collection/components/label/label.spec.js +58 -0
- package/dist/collection/components/modal/modal.e2e.js +115 -0
- package/dist/collection/components/modal/modal.js +14 -29
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.e2e.js +74 -0
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +33 -57
- package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js +8 -15
- package/dist/collection/components/pagination/pagination.e2e.js +257 -0
- package/dist/collection/components/pagination/pagination.js +10 -22
- package/dist/collection/components/pagination/pagination.spec.js +103 -0
- package/dist/collection/components/paragraph/paragraph.e2e.js +13 -0
- package/dist/collection/components/paragraph/paragraph.js +8 -26
- package/dist/collection/components/progress-bar/progress-bar.e2e.js +43 -0
- package/dist/collection/components/progress-bar/progress-bar.js +11 -19
- package/dist/collection/components/radio/radio.e2e.js +45 -0
- package/dist/collection/components/radio/radio.js +20 -37
- package/dist/collection/components/radio/radio.spec.js +38 -0
- package/dist/collection/components/radio-group/radio-group.e2e.js +86 -0
- package/dist/collection/components/radio-group/radio-group.js +19 -34
- package/dist/collection/components/radio-group/radio-group.spec.js +31 -0
- package/dist/collection/components/required-separator/required-separator.e2e.js +17 -0
- package/dist/collection/components/required-separator/required-separator.js +2 -5
- package/dist/collection/components/rounded-icon/rounded-icon.js +8 -19
- package/dist/collection/components/scrollable-container/scrollable-container.js +1 -1
- package/dist/collection/components/search/search.e2e.js +98 -0
- package/dist/collection/components/search/search.js +9 -19
- package/dist/collection/components/separator/separator.e2e.js +22 -0
- package/dist/collection/components/separator/separator.js +2 -5
- package/dist/collection/components/shimmer/shimmer.e2e.js +18 -0
- package/dist/collection/components/shimmer/shimmer.js +9 -10
- package/dist/collection/components/shimmer/shimmer.spec.js +35 -0
- package/dist/collection/components/snackbar/snackbar.e2e.js +61 -0
- package/dist/collection/components/snackbar/snackbar.js +20 -38
- package/dist/collection/components/spinner/spinner.e2e.js +12 -0
- package/dist/collection/components/spinner/spinner.js +3 -9
- package/dist/collection/components/spinner/spinner.spec.js +41 -0
- package/dist/collection/components/tab/tab.e2e.js +35 -0
- package/dist/collection/components/tab/tab.js +5 -14
- package/dist/collection/components/tab/tab.spec.js +31 -0
- package/dist/collection/components/tab-group/tab-group.e2e.js +99 -0
- package/dist/collection/components/tab-group/tab-group.js +3 -7
- package/dist/collection/components/tab-panel/tab-panel.e2e.js +12 -0
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tab-panel/tab-panel.spec.js +10 -0
- package/dist/collection/components/table/table-cell/table-cell.js +17 -40
- package/dist/collection/components/table/table-header/table-header.js +19 -37
- package/dist/collection/components/table/table-row/table-row.js +18 -33
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +15 -37
- package/dist/collection/components/table/table.e2e.js +405 -0
- package/dist/collection/components/table/table.js +4 -12
- package/dist/collection/components/textarea/textarea.e2e.js +91 -0
- package/dist/collection/components/textarea/textarea.js +30 -52
- package/dist/collection/components/toggle-button/toggle-button.e2e.js +44 -0
- package/dist/collection/components/toggle-button/toggle-button.js +13 -22
- package/dist/collection/components/toggle-chip/toggle-chip.e2e.js +47 -0
- package/dist/collection/components/toggle-chip/toggle-chip.js +13 -22
- package/dist/collection/components/toggle-group/toggle-group.e2e.js +65 -0
- package/dist/collection/components/toggle-group/toggle-group.js +7 -10
- package/dist/collection/components/toggle-switch/toggle-switch.e2e.js +50 -0
- package/dist/collection/components/toggle-switch/toggle-switch.js +14 -25
- package/dist/collection/components/tooltip/tooltip.e2e.js +64 -0
- package/dist/collection/components/tooltip/tooltip.js +11 -21
- package/dist/collection/components/wizard/wizard-step.js +5 -15
- package/dist/collection/components/wizard/wizard.e2e.js +149 -0
- package/dist/collection/components/wizard/wizard.js +7 -18
- package/dist/collection/components/wizard-icon/wizard-icon.js +6 -14
- package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
- package/dist/collection/utils/utils.spec.js +15 -0
- package/dist/components/b2b-alert.js +13 -17
- package/dist/components/b2b-anchor.js +7 -11
- package/dist/components/b2b-background-box.js +6 -11
- package/dist/components/b2b-breadcrumb-item.js +9 -9
- package/dist/components/b2b-breadcrumb.js +9 -10
- package/dist/components/b2b-button.js +1 -1
- package/dist/components/b2b-card.js +7 -9
- package/dist/components/b2b-checkbox-group.js +15 -15
- package/dist/components/b2b-checkbox.js +1 -1
- package/dist/components/b2b-chip-component.js +1 -1
- package/dist/components/b2b-date-picker-days-header.js +1 -1
- package/dist/components/b2b-date-picker-days.js +1 -1
- package/dist/components/b2b-date-picker-header.js +1 -1
- package/dist/components/b2b-date-picker-months.js +1 -1
- package/dist/components/b2b-date-picker-years.js +1 -1
- package/dist/components/b2b-date-picker.js +43 -44
- package/dist/components/b2b-dropdown.js +26 -26
- package/dist/components/b2b-flyout-menu-option.js +9 -9
- package/dist/components/b2b-flyout-menu.js +8 -8
- package/dist/components/b2b-grid-col.js +5 -5
- package/dist/components/b2b-grid-row.js +4 -8
- package/dist/components/b2b-grid.js +5 -5
- package/dist/components/b2b-headline.js +1 -1
- package/dist/components/b2b-icon-100.js +1 -1
- package/dist/components/b2b-icon-50.js +13 -11
- package/dist/components/b2b-icon.js +16 -15
- package/dist/components/b2b-input-group.js +1 -1
- package/dist/components/b2b-input-label.js +1 -1
- package/dist/components/b2b-input-list-option.js +1 -1
- package/dist/components/b2b-input-list.js +1 -1
- package/dist/components/b2b-input.js +1 -1
- package/dist/components/b2b-label.js +6 -6
- package/dist/components/b2b-modal.js +17 -21
- package/dist/components/b2b-multiselect-dropdown.js +31 -30
- package/dist/components/b2b-multiselect-option.js +1 -1
- package/dist/components/b2b-pagination.js +13 -16
- package/dist/components/b2b-paragraph.js +6 -11
- package/dist/components/b2b-progress-bar.js +11 -10
- package/dist/components/b2b-radio-button.js +19 -17
- package/dist/components/b2b-radio-group.js +17 -15
- package/dist/components/b2b-required-separator.js +6 -6
- package/dist/components/b2b-rounded-icon.js +1 -1
- package/dist/components/b2b-scrollable-container.js +5 -4
- package/dist/components/b2b-search.js +18 -19
- package/dist/components/b2b-separator.js +1 -1
- package/dist/components/b2b-shimmer.js +8 -4
- package/dist/components/b2b-snackbar.js +19 -20
- package/dist/components/b2b-spinner.js +1 -1
- package/dist/components/b2b-tab-group.js +6 -8
- package/dist/components/b2b-tab-panel.js +5 -4
- package/dist/components/b2b-tab.js +7 -9
- package/dist/components/b2b-table-cell.js +1 -1
- package/dist/components/b2b-table-header.js +1 -1
- package/dist/components/b2b-table-row.js +23 -23
- package/dist/components/b2b-table-rowgroup.js +15 -24
- package/dist/components/b2b-table.js +9 -14
- package/dist/components/b2b-textarea.js +23 -19
- package/dist/components/b2b-toggle-button.js +13 -11
- package/dist/components/b2b-toggle-chip.js +13 -11
- package/dist/components/b2b-toggle-group.js +10 -8
- package/dist/components/b2b-toggle-switch.js +14 -14
- package/dist/components/b2b-tooltip.js +11 -12
- package/dist/components/b2b-wizard-icon.js +1 -1
- package/dist/components/b2b-wizard-step.js +10 -13
- package/dist/components/b2b-wizard.js +9 -13
- package/dist/components/{p-CE7t2D9r.js → button.js} +17 -23
- package/dist/components/{p-CLYM9t6v.js → checkbox.js} +22 -21
- package/dist/components/{p-ClL49BcQ.js → chip.js} +15 -13
- package/dist/components/{p-FI-HbnMh.js → date-picker-days-header.js} +7 -7
- package/dist/components/{p-0Vy4494O.js → date-picker-days.js} +24 -21
- package/dist/components/{p-C_U38W4s.js → date-picker-header.js} +17 -15
- package/dist/components/{p-1ZoTG5p9.js → date-picker-months.js} +9 -8
- package/dist/components/{p-dMZsx2Fh.js → date-picker-years.js} +8 -6
- package/dist/components/{p-Bo-B8kdb.js → headline.js} +4 -6
- package/dist/components/{p-B9RvgUY3.js → icon-100.js} +15 -14
- package/dist/components/index.js +1 -1929
- package/dist/components/{p-TB2jJFV6.js → input-group.js} +9 -8
- package/dist/components/{p-Zg4AtKjq.js → input-label.js} +6 -7
- package/dist/components/{p-QTGqu3he.js → input-list-option.js} +7 -5
- package/dist/components/{p-BacBJzW_.js → input-list.js} +21 -24
- package/dist/components/{p-CuUquHzL.js → input.js} +28 -32
- package/dist/components/{p-B7bjXySI.js → multiselect-option.js} +12 -12
- package/dist/{esm/request-B8W50WyB.js → components/request.js} +5 -2
- package/dist/components/{p-i758rnm2.js → rounded-icon.js} +9 -13
- package/dist/components/{p-DO7N8IC0.js → separator.js} +5 -5
- package/dist/components/{p-3cu_Madt.js → spinner.js} +5 -6
- package/dist/components/{p-9OQH2pET.js → table-cell.js} +15 -23
- package/dist/components/{p-BVLpVPNb.js → table-header.js} +17 -18
- package/dist/{esm/utils-BA6KE1BD.js → components/utils.js} +10 -3
- package/dist/components/{p-N6d2-6pL.js → wizard-icon.js} +10 -11
- package/dist/custom-elements.json +0 -24
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/b2b-alert.entry.js +11 -15
- package/dist/esm/b2b-anchor.entry.js +6 -10
- package/dist/esm/b2b-background-box.entry.js +5 -10
- package/dist/esm/b2b-breadcrumb-item.entry.js +8 -8
- package/dist/esm/b2b-breadcrumb.entry.js +8 -9
- package/dist/esm/b2b-button_2.entry.js +18 -25
- package/dist/esm/b2b-card.entry.js +6 -8
- package/dist/esm/b2b-checkbox-group.entry.js +13 -13
- package/dist/esm/b2b-checkbox.entry.js +20 -19
- package/dist/esm/b2b-chip-component_2.entry.js +22 -20
- package/dist/esm/b2b-core-components.js +12 -12
- package/dist/esm/b2b-date-picker-days_5.entry.js +48 -40
- package/dist/esm/b2b-date-picker.entry.js +35 -36
- package/dist/esm/b2b-dropdown.entry.js +24 -24
- package/dist/esm/b2b-flyout-menu-option.entry.js +8 -8
- package/dist/esm/b2b-flyout-menu.entry.js +7 -7
- package/dist/esm/b2b-grid-col.entry.js +4 -4
- package/dist/esm/b2b-grid-row.entry.js +3 -7
- package/dist/esm/b2b-grid.entry.js +4 -4
- package/dist/esm/b2b-headline.entry.js +3 -5
- package/dist/esm/b2b-icon-100.entry.js +10 -12
- package/dist/esm/b2b-icon-50.entry.js +8 -9
- package/dist/esm/b2b-icon.entry.js +10 -12
- package/dist/esm/b2b-input-group_2.entry.js +22 -24
- package/dist/esm/b2b-input-label.entry.js +5 -6
- package/dist/esm/b2b-input_2.entry.js +31 -33
- package/dist/esm/b2b-label.entry.js +5 -5
- package/dist/esm/b2b-modal.entry.js +14 -18
- package/dist/esm/b2b-multiselect-dropdown.entry.js +25 -24
- package/dist/esm/b2b-pagination.entry.js +10 -13
- package/dist/esm/b2b-paragraph.entry.js +5 -10
- package/dist/esm/b2b-progress-bar.entry.js +10 -9
- package/dist/esm/b2b-radio-button.entry.js +17 -15
- package/dist/esm/b2b-radio-group.entry.js +15 -13
- package/dist/esm/b2b-required-separator.entry.js +4 -4
- package/dist/esm/b2b-rounded-icon.entry.js +8 -12
- package/dist/esm/b2b-scrollable-container.entry.js +4 -3
- package/dist/esm/b2b-search.entry.js +8 -9
- package/dist/esm/b2b-separator.entry.js +4 -4
- package/dist/esm/b2b-shimmer.entry.js +7 -3
- package/dist/esm/b2b-snackbar.entry.js +17 -18
- package/dist/esm/b2b-tab-group.entry.js +4 -6
- package/dist/esm/b2b-tab-panel.entry.js +4 -3
- package/dist/esm/b2b-tab.entry.js +6 -8
- package/dist/esm/b2b-table-cell_2.entry.js +28 -37
- package/dist/esm/b2b-table-row.entry.js +17 -17
- package/dist/esm/b2b-table-rowgroup.entry.js +14 -23
- package/dist/esm/b2b-table.entry.js +8 -13
- package/dist/esm/b2b-textarea.entry.js +21 -17
- package/dist/esm/b2b-toggle-button.entry.js +12 -10
- package/dist/esm/b2b-toggle-chip.entry.js +12 -10
- package/dist/esm/b2b-toggle-group.entry.js +9 -7
- package/dist/esm/b2b-toggle-switch.entry.js +13 -13
- package/dist/esm/b2b-tooltip.entry.js +10 -11
- package/dist/esm/b2b-wizard-icon.entry.js +7 -8
- package/dist/esm/b2b-wizard-step.entry.js +6 -9
- package/dist/esm/b2b-wizard.entry.js +8 -12
- package/dist/esm/index-ab9eb36d.js +2487 -0
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/{components/p-CPfvpKl5.js → esm/request-1d048f8a.js} +0 -2
- package/dist/{components/p-BA6KE1BD.js → esm/utils-868299de.js} +10 -3
- package/dist/loader/cdn.js +3 -1
- package/dist/loader/index.cjs.js +3 -1
- package/dist/loader/index.d.ts +0 -3
- package/dist/loader/index.es2017.js +3 -1
- package/dist/loader/index.js +3 -1
- package/dist/loader/package.json +11 -0
- package/dist/types/components.d.ts +0 -413
- package/dist/types/stencil-public-runtime.d.ts +11 -32
- package/dist/web-types.json +8 -7
- package/package.json +10 -11
- package/dist/b2b-core-components/p-0002d8d5.entry.js +0 -1
- package/dist/b2b-core-components/p-0386f660.entry.js +0 -1
- package/dist/b2b-core-components/p-0a08e2c8.entry.js +0 -1
- package/dist/b2b-core-components/p-0d8cc4eb.entry.js +0 -1
- package/dist/b2b-core-components/p-197dc9c0.entry.js +0 -1
- package/dist/b2b-core-components/p-220b8c79.entry.js +0 -1
- package/dist/b2b-core-components/p-2933f053.entry.js +0 -1
- package/dist/b2b-core-components/p-3a9f7db8.entry.js +0 -1
- package/dist/b2b-core-components/p-3e0919b3.entry.js +0 -1
- package/dist/b2b-core-components/p-42d9f79d.entry.js +0 -1
- package/dist/b2b-core-components/p-4bb42493.entry.js +0 -1
- package/dist/b2b-core-components/p-4c550170.entry.js +0 -1
- package/dist/b2b-core-components/p-50559efd.entry.js +0 -1
- package/dist/b2b-core-components/p-55db3d57.entry.js +0 -1
- package/dist/b2b-core-components/p-6e7abebc.entry.js +0 -1
- package/dist/b2b-core-components/p-7b75a0a4.entry.js +0 -1
- package/dist/b2b-core-components/p-7cbe33ef.entry.js +0 -1
- package/dist/b2b-core-components/p-8544b7e1.entry.js +0 -1
- package/dist/b2b-core-components/p-88037ad2.entry.js +0 -1
- package/dist/b2b-core-components/p-930425a1.entry.js +0 -1
- package/dist/b2b-core-components/p-B9l4NfeG.js +0 -1
- package/dist/b2b-core-components/p-BA6KE1BD.js +0 -1
- package/dist/b2b-core-components/p-a1a4efd4.entry.js +0 -1
- package/dist/b2b-core-components/p-a61eecf7.entry.js +0 -1
- package/dist/b2b-core-components/p-ada918c2.entry.js +0 -1
- package/dist/b2b-core-components/p-bb020c1c.entry.js +0 -1
- package/dist/b2b-core-components/p-bbb4c6f3.entry.js +0 -1
- package/dist/b2b-core-components/p-c0af184a.entry.js +0 -1
- package/dist/b2b-core-components/p-c40f7176.entry.js +0 -1
- package/dist/b2b-core-components/p-c6043d6a.entry.js +0 -1
- package/dist/b2b-core-components/p-c649c112.entry.js +0 -1
- package/dist/b2b-core-components/p-c69e9220.entry.js +0 -1
- package/dist/b2b-core-components/p-d1b46208.entry.js +0 -1
- package/dist/b2b-core-components/p-d2d40ae5.entry.js +0 -1
- package/dist/b2b-core-components/p-e8e156a4.entry.js +0 -1
- package/dist/b2b-core-components/p-ebcc2cce.entry.js +0 -1
- package/dist/b2b-core-components/p-edea84cc.entry.js +0 -1
- package/dist/b2b-core-components/p-f831e483.entry.js +0 -1
- package/dist/b2b-core-components/p-fdfb094e.entry.js +0 -1
- package/dist/b2b-core-components/p-zl-jO_Vq.js +0 -2
- package/dist/cjs/index-CIrNIFXs.js +0 -2406
- package/dist/esm/index-zl-jO_Vq.js +0 -2378
- /package/dist/b2b-core-components/{p-B8geQC3V.js → p-48608c23.js} +0 -0
- /package/dist/b2b-core-components/{p-BgHEmQ44.js → p-c500d93c.js} +0 -0
- /package/dist/cjs/{date-picker-util-VbL9p5ie.js → date-picker-util-51276571.js} +0 -0
- /package/dist/cjs/{wizard.types-uAv3s7tK.js → wizard.types-40a1058c.js} +0 -0
- /package/dist/components/{p-BsfreBZY.js → date-picker.types.js} +0 -0
- /package/dist/components/{p-BgHEmQ44.js → wizard.types.js} +0 -0
- /package/dist/esm/{date-picker-util-B8geQC3V.js → date-picker-util-44201ca6.js} +0 -0
- /package/dist/esm/{wizard.types-BgHEmQ44.js → wizard.types-40ae9b73.js} +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('b2b-modal', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="false">Test</b2b-modal>');
|
|
6
|
+
const element = await page.find('b2b-modal');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
9
|
+
expect(await modalDiv.isVisible()).toBe(false);
|
|
10
|
+
});
|
|
11
|
+
it('open modal & heading', async () => {
|
|
12
|
+
const page = await newE2EPage();
|
|
13
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
14
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
15
|
+
expect(await modalDiv.isVisible()).toBe(true);
|
|
16
|
+
const headingElm = await modalDiv.find('b2b-headline');
|
|
17
|
+
expect(headingElm.textContent).toBe('Test Modal');
|
|
18
|
+
});
|
|
19
|
+
it('verify initial focus', async () => {
|
|
20
|
+
const page = await newE2EPage();
|
|
21
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
22
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
23
|
+
expect(await modalDiv.isVisible()).toBe(true);
|
|
24
|
+
await page.keyboard.press('Tab');
|
|
25
|
+
const closeContent = await page.evaluate(() => {
|
|
26
|
+
return document.activeElement.shadowRoot.activeElement.className;
|
|
27
|
+
});
|
|
28
|
+
expect(closeContent).toBe('b2b-modal__dialog__close');
|
|
29
|
+
});
|
|
30
|
+
it('verify focus trap', async () => {
|
|
31
|
+
const page = await newE2EPage();
|
|
32
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
33
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
34
|
+
expect(await modalDiv.isVisible()).toBe(true);
|
|
35
|
+
await page.keyboard.press('Tab');
|
|
36
|
+
let closeContent = await page.evaluate(() => {
|
|
37
|
+
return document.activeElement.shadowRoot.activeElement.className;
|
|
38
|
+
});
|
|
39
|
+
expect(closeContent).toBe('b2b-modal__dialog__close');
|
|
40
|
+
await page.keyboard.press('Tab');
|
|
41
|
+
closeContent = await page.evaluate(() => {
|
|
42
|
+
return document.activeElement.shadowRoot.activeElement.className;
|
|
43
|
+
});
|
|
44
|
+
expect(closeContent).toBe('b2b-modal__dialog__close');
|
|
45
|
+
});
|
|
46
|
+
it('verify close hover', async () => {
|
|
47
|
+
const page = await newE2EPage();
|
|
48
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
49
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
50
|
+
expect(await modalDiv.isVisible()).toBe(true);
|
|
51
|
+
const closeIcon = await page.find('b2b-modal >>> b2b-icon-100');
|
|
52
|
+
const closeIconColorBefore = await closeIcon.getProperty('color');
|
|
53
|
+
expect(closeIconColorBefore).toBe('secondary');
|
|
54
|
+
await closeIcon.hover();
|
|
55
|
+
await page.waitForChanges();
|
|
56
|
+
const closeIconColorAfter = await closeIcon.getProperty('color');
|
|
57
|
+
expect(closeIconColorAfter).toBe('primary');
|
|
58
|
+
});
|
|
59
|
+
it('verify close emit', async () => {
|
|
60
|
+
const page = await newE2EPage();
|
|
61
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
62
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
63
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
64
|
+
const closeIcon = await page.find('b2b-modal >>> b2b-icon-100');
|
|
65
|
+
await closeIcon.click();
|
|
66
|
+
expect(b2bBeforeClose).toHaveReceivedEvent();
|
|
67
|
+
expect(b2bClose).toHaveReceivedEvent();
|
|
68
|
+
});
|
|
69
|
+
it('verify esc emit', async () => {
|
|
70
|
+
const page = await newE2EPage();
|
|
71
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
72
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
73
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
74
|
+
await page.keyboard.press('Tab');
|
|
75
|
+
await page.keyboard.press('Escape');
|
|
76
|
+
expect(b2bBeforeClose).toHaveReceivedEvent();
|
|
77
|
+
expect(b2bClose).toHaveReceivedEvent();
|
|
78
|
+
});
|
|
79
|
+
it('verify esc no-emit', async () => {
|
|
80
|
+
const page = await newE2EPage();
|
|
81
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true" esc-dismiss="false">Test</b2b-modal>');
|
|
82
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
83
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
84
|
+
await page.keyboard.press('Tab');
|
|
85
|
+
await page.keyboard.press('Escape');
|
|
86
|
+
expect(b2bBeforeClose).not.toHaveReceivedEvent();
|
|
87
|
+
expect(b2bClose).not.toHaveReceivedEvent();
|
|
88
|
+
});
|
|
89
|
+
it('verify backdrop dismiss emit', async () => {
|
|
90
|
+
const page = await newE2EPage();
|
|
91
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true" backdrop-dismiss="true">Test</b2b-modal>');
|
|
92
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
93
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
94
|
+
await page.evaluate(() => {
|
|
95
|
+
document
|
|
96
|
+
.querySelector('b2b-modal')
|
|
97
|
+
.shadowRoot.querySelector('div > div.b2b-modal__backdrop').click();
|
|
98
|
+
});
|
|
99
|
+
expect(b2bBeforeClose).toHaveReceivedEvent();
|
|
100
|
+
expect(b2bClose).toHaveReceivedEvent();
|
|
101
|
+
});
|
|
102
|
+
it('verify backdrop dismiss not emit', async () => {
|
|
103
|
+
const page = await newE2EPage();
|
|
104
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
105
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
106
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
107
|
+
await page.evaluate(() => {
|
|
108
|
+
document
|
|
109
|
+
.querySelector('b2b-modal')
|
|
110
|
+
.shadowRoot.querySelector('div > div.b2b-modal__backdrop').click();
|
|
111
|
+
});
|
|
112
|
+
expect(b2bBeforeClose).not.toHaveReceivedEvent();
|
|
113
|
+
expect(b2bClose).not.toHaveReceivedEvent();
|
|
114
|
+
});
|
|
115
|
+
});
|
|
@@ -5,18 +5,6 @@ import { isFocusable, isHidden, queryShadowRoot } from "../../utils/focus-trap";
|
|
|
5
5
|
*/
|
|
6
6
|
export class ModalComponent {
|
|
7
7
|
constructor() {
|
|
8
|
-
/** Whether the modal is shown or not. Default is false */
|
|
9
|
-
this.opened = false;
|
|
10
|
-
/** A boolean that indicates whether the modal can be dismissed by clicking
|
|
11
|
-
in the backdrop outside the modal. */
|
|
12
|
-
this.backdropDismiss = false;
|
|
13
|
-
/** A boolean to indicate whether the modal can be dismissed by pressing
|
|
14
|
-
the escape key on the keyboard */
|
|
15
|
-
this.escDismiss = true;
|
|
16
|
-
/** The size of the modal. If not specified, will assume the default size */
|
|
17
|
-
this.variant = 'default';
|
|
18
|
-
this.iconHover = false;
|
|
19
|
-
this.isOpen = this.opened || false;
|
|
20
8
|
this.focusableElements = [];
|
|
21
9
|
this.toggleIconHover = () => {
|
|
22
10
|
this.iconHover = !this.iconHover;
|
|
@@ -40,6 +28,13 @@ export class ModalComponent {
|
|
|
40
28
|
this.handleBottomFocus = () => {
|
|
41
29
|
this.attemptFocus(this.getFirstFocusableElement());
|
|
42
30
|
};
|
|
31
|
+
this.heading = undefined;
|
|
32
|
+
this.opened = false;
|
|
33
|
+
this.backdropDismiss = false;
|
|
34
|
+
this.escDismiss = true;
|
|
35
|
+
this.variant = 'default';
|
|
36
|
+
this.iconHover = false;
|
|
37
|
+
this.isOpen = this.opened || false;
|
|
43
38
|
}
|
|
44
39
|
handleKeypress(event) {
|
|
45
40
|
if (!this.isOpen || !this.escDismiss) {
|
|
@@ -87,10 +82,10 @@ export class ModalComponent {
|
|
|
87
82
|
this.attemptFocus(this.getFirstFocusableElement());
|
|
88
83
|
}
|
|
89
84
|
render() {
|
|
90
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: 'b4b05e83f2b046b95c1a6b99497d1773c2a9b47a' }, h("div", { key: '53f334ae7646d4f76356bfbab36f2fa15a5b573e', class: { 'b2b-modal': true, 'b2b-modal--open': this.opened } }, h("div", { key: '9956a9df55629700f513900645edf57069040607', "data-focus-trap-edge": true, onFocus: this.handleTopFocus, tabIndex: 0 }), h("div", { key: '42ec92fe4ea857844ead5918d7feeeb300af11d7', class: {
|
|
91
86
|
'b2b-modal__dialog': true,
|
|
92
87
|
[`b2b-modal__dialog--${this.variant}`]: true,
|
|
93
|
-
} }, h("div", { key: '
|
|
88
|
+
} }, h("div", { key: 'dbf97f26ae5ed4389ab13b90acdbcff506ba97a9', class: "b2b-modal__dialog__header" }, h("div", { key: '2d690ee0a36fca230335db2512e9e62067dd660e', class: "b2b-modal__dialog__header-left" }, h("b2b-headline", { key: 'd1e0a7f337bdca5aace7ca7bc401be91a3841e52', align: "center", size: "200", noMargin: true }, this.heading), h("slot", { key: '1353d71a10811f8d59f8234f7061085256690f35', name: "header-icon" })), h("div", { key: 'a7d169dc476c7026999251f31c90ba856f93a875', class: "b2b-modal__dialog__header-right" }, h("button", { key: '173acf84e14e203f2a69398e89736a90f9db05d4', type: "button", class: "b2b-modal__dialog__close", onMouseEnter: this.toggleIconHover, onMouseLeave: this.toggleIconHover, onClick: this.handleClickDismiss, ref: el => (this.closeButton = el) }, h("b2b-icon-100", { key: '20e5481f4b9210323e280dc9f8c372ac852a36c5', clickable: true, icon: "b2b_icon-close", color: this.iconHover ? 'primary' : 'secondary' })))), h("div", { key: 'abc50a9191e9bd392bea9541f5e6a9502de6ac0c', class: "b2b-modal__dialog__body" }, h("slot", { key: '9e985a993cfe662e1cb3e6a75bcdb12f7b521e29' })), h("div", { key: '62245e1b1d7706f711536df32bed44c341995a43', class: "b2b-modal__dialog__footer" }, h("div", { key: '0f1312eb1fcd6baf7693db1ac699d4a58e229f9c', class: "b2b-modal__dialog__footer-left" }, h("slot", { key: '8db890620ed795d59eecb1b880b3404978808981', name: "footer-left" })), h("div", { key: '508d4f186971487006cd44a5df7f5e1c52cb3029', class: "b2b-modal__dialog__footer-right" }, h("slot", { key: '19d4db8090b390e6104105dff3e82715d1de9a6a', name: "footer-right" })))), h("div", { key: '7de78642381949b8a07724df7c7df090793f9925', "data-focus-trap-edge": true, onFocus: this.handleBottomFocus, tabIndex: 0 }), h("div", { key: 'e8b96691c75061fb0525219c7227ac4f1f54e7ee', class: "b2b-modal__backdrop", onClick: this.handleBackdropDismiss }))));
|
|
94
89
|
}
|
|
95
90
|
static get is() { return "b2b-modal"; }
|
|
96
91
|
static get encapsulation() { return "shadow"; }
|
|
@@ -108,7 +103,6 @@ export class ModalComponent {
|
|
|
108
103
|
return {
|
|
109
104
|
"heading": {
|
|
110
105
|
"type": "string",
|
|
111
|
-
"attribute": "heading",
|
|
112
106
|
"mutable": false,
|
|
113
107
|
"complexType": {
|
|
114
108
|
"original": "string",
|
|
@@ -121,13 +115,11 @@ export class ModalComponent {
|
|
|
121
115
|
"tags": [],
|
|
122
116
|
"text": "The title for the modal. This is required."
|
|
123
117
|
},
|
|
124
|
-
"
|
|
125
|
-
"setter": false,
|
|
118
|
+
"attribute": "heading",
|
|
126
119
|
"reflect": false
|
|
127
120
|
},
|
|
128
121
|
"opened": {
|
|
129
122
|
"type": "boolean",
|
|
130
|
-
"attribute": "opened",
|
|
131
123
|
"mutable": true,
|
|
132
124
|
"complexType": {
|
|
133
125
|
"original": "boolean",
|
|
@@ -140,14 +132,12 @@ export class ModalComponent {
|
|
|
140
132
|
"tags": [],
|
|
141
133
|
"text": "Whether the modal is shown or not. Default is false"
|
|
142
134
|
},
|
|
143
|
-
"
|
|
144
|
-
"setter": false,
|
|
135
|
+
"attribute": "opened",
|
|
145
136
|
"reflect": true,
|
|
146
137
|
"defaultValue": "false"
|
|
147
138
|
},
|
|
148
139
|
"backdropDismiss": {
|
|
149
140
|
"type": "boolean",
|
|
150
|
-
"attribute": "backdrop-dismiss",
|
|
151
141
|
"mutable": false,
|
|
152
142
|
"complexType": {
|
|
153
143
|
"original": "boolean",
|
|
@@ -160,14 +150,12 @@ export class ModalComponent {
|
|
|
160
150
|
"tags": [],
|
|
161
151
|
"text": "A boolean that indicates whether the modal can be dismissed by clicking\nin the backdrop outside the modal."
|
|
162
152
|
},
|
|
163
|
-
"
|
|
164
|
-
"setter": false,
|
|
153
|
+
"attribute": "backdrop-dismiss",
|
|
165
154
|
"reflect": false,
|
|
166
155
|
"defaultValue": "false"
|
|
167
156
|
},
|
|
168
157
|
"escDismiss": {
|
|
169
158
|
"type": "boolean",
|
|
170
|
-
"attribute": "esc-dismiss",
|
|
171
159
|
"mutable": false,
|
|
172
160
|
"complexType": {
|
|
173
161
|
"original": "boolean",
|
|
@@ -180,14 +168,12 @@ export class ModalComponent {
|
|
|
180
168
|
"tags": [],
|
|
181
169
|
"text": "A boolean to indicate whether the modal can be dismissed by pressing\nthe escape key on the keyboard"
|
|
182
170
|
},
|
|
183
|
-
"
|
|
184
|
-
"setter": false,
|
|
171
|
+
"attribute": "esc-dismiss",
|
|
185
172
|
"reflect": false,
|
|
186
173
|
"defaultValue": "true"
|
|
187
174
|
},
|
|
188
175
|
"variant": {
|
|
189
176
|
"type": "string",
|
|
190
|
-
"attribute": "variant",
|
|
191
177
|
"mutable": false,
|
|
192
178
|
"complexType": {
|
|
193
179
|
"original": "'default' | 'large'",
|
|
@@ -200,8 +186,7 @@ export class ModalComponent {
|
|
|
200
186
|
"tags": [],
|
|
201
187
|
"text": "The size of the modal. If not specified, will assume the default size"
|
|
202
188
|
},
|
|
203
|
-
"
|
|
204
|
-
"setter": false,
|
|
189
|
+
"attribute": "variant",
|
|
205
190
|
"reflect": false,
|
|
206
191
|
"defaultValue": "'default'"
|
|
207
192
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('b2b-multiselect-dropdown', () => {
|
|
3
|
+
it('should render with placeholder', async () => {
|
|
4
|
+
const page = await newE2EPage({
|
|
5
|
+
html: `<b2b-multiselect-dropdown placeholder="Select an option"></b2b-multiselect-dropdown>`,
|
|
6
|
+
});
|
|
7
|
+
const placeholder = await page.find('b2b-multiselect-dropdown >>> .b2b-multiselect-dropdown__placeholder');
|
|
8
|
+
expect(placeholder).not.toBeNull();
|
|
9
|
+
expect(placeholder).toEqualText('Select an option');
|
|
10
|
+
});
|
|
11
|
+
it('should render with hint message', async () => {
|
|
12
|
+
const page = await newE2EPage({
|
|
13
|
+
html: `<b2b-multiselect-dropdown hint="Choose wisely!"></b2b-multiselect-dropdown>`,
|
|
14
|
+
});
|
|
15
|
+
const hint = await page.find('b2b-multiselect-dropdown >>> .b2b-multiselect-dropdown__hint');
|
|
16
|
+
const text = hint.textContent;
|
|
17
|
+
expect(text).toBe('Choose wisely!');
|
|
18
|
+
});
|
|
19
|
+
it('should open dropdown on click and displays options', async () => {
|
|
20
|
+
const page = await newE2EPage({
|
|
21
|
+
html: `<b2b-multiselect-dropdown placeholder="Choose" options-list="Swift Carrot, Happy Onion, Cool Tomato"></b2b-multiselect-dropdown>`,
|
|
22
|
+
});
|
|
23
|
+
const trigger = await page.find('b2b-multiselect-dropdown >>> .b2b-multiselect-dropdown');
|
|
24
|
+
await trigger.click();
|
|
25
|
+
await page.waitForChanges();
|
|
26
|
+
const allOptions = await page.findAll('b2b-multiselect-dropdown >>> b2b-multiselect-option');
|
|
27
|
+
expect(allOptions.length).toBeGreaterThan(1);
|
|
28
|
+
const checkbox = await allOptions[1].find('b2b-checkbox');
|
|
29
|
+
await checkbox.click();
|
|
30
|
+
const values = await Promise.all(allOptions.slice(1).map(async (opt) => {
|
|
31
|
+
const cb = await opt.find('b2b-checkbox');
|
|
32
|
+
return cb.getAttribute('value');
|
|
33
|
+
}));
|
|
34
|
+
expect(values).toContain('Swift Carrot');
|
|
35
|
+
expect(values).toContain('Happy Onion');
|
|
36
|
+
expect(values).toContain('Cool Tomato');
|
|
37
|
+
});
|
|
38
|
+
it('should emits b2b-selected event on option select and render the chips', async () => {
|
|
39
|
+
const page = await newE2EPage({
|
|
40
|
+
html: `<b2b-multiselect-dropdown options-list="Alpha, Beta"></b2b-multiselect-dropdown>`,
|
|
41
|
+
});
|
|
42
|
+
const trigger = await page.find('b2b-multiselect-dropdown >>> .b2b-multiselect-dropdown');
|
|
43
|
+
await page.waitForChanges();
|
|
44
|
+
await trigger.click();
|
|
45
|
+
await page.waitForChanges();
|
|
46
|
+
const spy = await page.spyOnEvent('b2b-selected');
|
|
47
|
+
const allOptions = await page.findAll('b2b-multiselect-dropdown >>> b2b-multiselect-option');
|
|
48
|
+
const checkbox = await allOptions[1].find('b2b-checkbox');
|
|
49
|
+
await checkbox.click();
|
|
50
|
+
await page.waitForChanges();
|
|
51
|
+
expect(spy).toHaveReceivedEvent();
|
|
52
|
+
const chip = await page.find('b2b-multiselect-dropdown >>> b2b-chip-component');
|
|
53
|
+
expect(chip).not.toBeNull();
|
|
54
|
+
const valueHandle = await chip.getProperty('value');
|
|
55
|
+
expect(valueHandle).toBe('Alpha');
|
|
56
|
+
});
|
|
57
|
+
it('should render two chips when select all is clicked', async () => {
|
|
58
|
+
const page = await newE2EPage({
|
|
59
|
+
html: `<b2b-multiselect-dropdown options-list="Alpha, Beta"></b2b-multiselect-dropdown>`,
|
|
60
|
+
});
|
|
61
|
+
const trigger = await page.find('b2b-multiselect-dropdown >>> .b2b-multiselect-dropdown');
|
|
62
|
+
await page.waitForChanges();
|
|
63
|
+
await trigger.click();
|
|
64
|
+
await page.waitForChanges();
|
|
65
|
+
const spy = await page.spyOnEvent('b2b-selected');
|
|
66
|
+
const allOptions = await page.findAll('b2b-multiselect-dropdown >>> b2b-multiselect-option');
|
|
67
|
+
const checkbox = await allOptions[0].find('b2b-checkbox');
|
|
68
|
+
await checkbox.click();
|
|
69
|
+
await page.waitForChanges();
|
|
70
|
+
expect(spy).toHaveReceivedEvent();
|
|
71
|
+
const chips = await page.findAll('b2b-multiselect-dropdown >>> b2b-chip-component');
|
|
72
|
+
expect(chips.length).toBe(2);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
export class B2bMultiSelectDropdown {
|
|
3
3
|
constructor() {
|
|
4
|
-
/** The initial values to be selected in the dropdown. */
|
|
5
|
-
this.selectedValues = [];
|
|
6
|
-
/** The list of options passed into the search dropdown. Can be static or dynamic, i.e. updated when the b2b-search or b2b-input emitters fire. */
|
|
7
|
-
this.optionsList = [];
|
|
8
|
-
/** The maximum amount of chips visible. Adjust this depending on available size of the dropdown. */
|
|
9
|
-
this.maxOptionsVisible = 8;
|
|
10
|
-
/** Adds an asterisk at the end of the label to signify that the field is required. */
|
|
11
|
-
this.required = false;
|
|
12
|
-
/** Whether the multi select dropdown is currently invalid. Per default, it is false. */
|
|
13
|
-
this.invalid = false;
|
|
14
|
-
/** Whether or not the field is disabled. Default is false. */
|
|
15
|
-
this.disabled = false;
|
|
16
|
-
this.currentSelectedValues = [];
|
|
17
|
-
this.currentList = this.optionsList;
|
|
18
|
-
this.value = '';
|
|
19
|
-
this.isElementFocused = false;
|
|
20
|
-
this.isOpen = false;
|
|
21
|
-
this.hasOptionList = this.optionsList.length > 0;
|
|
22
4
|
this.handleInput = event => {
|
|
23
5
|
if (this.disabled) {
|
|
24
6
|
return;
|
|
@@ -148,6 +130,24 @@ export class B2bMultiSelectDropdown {
|
|
|
148
130
|
checkbox.selected = everySelected;
|
|
149
131
|
checkbox.indeterminate = someSelected && !everySelected;
|
|
150
132
|
};
|
|
133
|
+
this.label = undefined;
|
|
134
|
+
this.placeholder = undefined;
|
|
135
|
+
this.selectedValues = [];
|
|
136
|
+
this.optionsList = [];
|
|
137
|
+
this.searchPlaceholder = undefined;
|
|
138
|
+
this.selectAllLabel = undefined;
|
|
139
|
+
this.maxOptionsVisible = 8;
|
|
140
|
+
this.required = false;
|
|
141
|
+
this.invalid = false;
|
|
142
|
+
this.errorMessage = undefined;
|
|
143
|
+
this.hint = undefined;
|
|
144
|
+
this.disabled = false;
|
|
145
|
+
this.currentSelectedValues = [];
|
|
146
|
+
this.currentList = this.optionsList;
|
|
147
|
+
this.value = '';
|
|
148
|
+
this.isElementFocused = false;
|
|
149
|
+
this.isOpen = false;
|
|
150
|
+
this.hasOptionList = this.optionsList.length > 0;
|
|
151
151
|
}
|
|
152
152
|
parsePropToArray(value) {
|
|
153
153
|
if (Array.isArray(value))
|
|
@@ -191,16 +191,16 @@ export class B2bMultiSelectDropdown {
|
|
|
191
191
|
this.updateSelectAll(options);
|
|
192
192
|
}
|
|
193
193
|
render() {
|
|
194
|
-
return (h(Host, { key: '
|
|
194
|
+
return (h(Host, { key: 'c105c46f7461d0a2692282ed15d07460e31273b9', onFocus: this.setElementOnFocus, onBlur: this.setElementOnBlur, onClick: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("b2b-input-label", { key: '93fc16c4f74cb669bc7d0d82a673b414224eb4b1', required: this.required }, this.label), h("div", { key: '397e2d0b2315f5fdce8c2cf041ac4a92f9effea5', class: {
|
|
195
195
|
'b2b-multiselect-dropdown': true,
|
|
196
196
|
'b2b-multiselect-dropdown--open': this.isOpen,
|
|
197
197
|
'b2b-multiselect-dropdown--error': this.invalid && !this.disabled,
|
|
198
198
|
'b2b-multiselect-dropdown--disabled': this.disabled,
|
|
199
199
|
'b2b-multiselect-dropdown--focused': this.invalid && this.isElementFocused,
|
|
200
|
-
}, tabindex: 0, role: "combobox", onClick: () => (this.isOpen = !this.isOpen), "aria-expanded": this.isElementFocused }, h("div", { key: '
|
|
200
|
+
}, tabindex: 0, role: "combobox", onClick: () => (this.isOpen = !this.isOpen), "aria-expanded": this.isElementFocused }, h("div", { key: '2b3693ab1bd0fb6be6b13efa8eb8561b10480104', class: "b2b-multiselect-dropdown__chip-container" }, this.currentSelectedValues.length === 0 ? (h("span", { class: "b2b-multiselect-dropdown__placeholder" }, this.placeholder)) : (this.renderChips())), h("b2b-icon-100", { key: 'ee601f312e28840cdc16501dc60b016a6106cc3e', icon: "b2b_icon-arrow-down" })), h("div", { key: '50b47c0f1f20afd3ec6ed093237a202ed1d9a59b', class: {
|
|
201
201
|
'b2b-multiselect-dropdown__options-container': true,
|
|
202
202
|
'b2b-multiselect-dropdown__options-container--visible': this.isOpen,
|
|
203
|
-
} }, h("div", { key: '
|
|
203
|
+
} }, h("div", { key: 'b8c651872eca608e3c02c42920cf0d8e6d117aa9', class: "b2b-multiselect-dropdown__options", role: "listbox", "aria-label": this.label, tabIndex: -1 }, h("div", { key: '2a0d909d9994ac59a22e60c0ed729cf90d74cf92', class: "b2b-multiselect-dropdown__option__search" }, h("input", { key: '66081cd675bb03da68a445c090c69632611e1a32', type: "text", onInput: this.handleInput, class: "b2b-multiselect-dropdown__option__search__input", placeholder: this.searchPlaceholder })), h("b2b-multiselect-option", { key: 'a1b146c742e206c05341aab80f49629a536b9c09', class: "b2b-multiselect-dropdown__option__select-all", option: this.selectAllLabel, id: "select-all", "onB2b-option-selected": this.handleSelectAll }), this.hasOptionList &&
|
|
204
204
|
this.currentList.map(option => (h("b2b-multiselect-option", { "onB2b-option-selected": this.handleSelectedChange, option: option }))))), (this.hint !== undefined && !this.invalid) ||
|
|
205
205
|
(this.hint !== undefined && this.disabled) ? (h("span", { class: "b2b-multiselect-dropdown__hint" }, this.hint)) : (''), this.errorMessage !== undefined && this.invalid && !this.disabled ? (h("span", { class: "b2b-multiselect-dropdown__error-message" }, this.errorMessage)) : ('')));
|
|
206
206
|
}
|
|
@@ -220,7 +220,6 @@ export class B2bMultiSelectDropdown {
|
|
|
220
220
|
return {
|
|
221
221
|
"label": {
|
|
222
222
|
"type": "string",
|
|
223
|
-
"attribute": "label",
|
|
224
223
|
"mutable": false,
|
|
225
224
|
"complexType": {
|
|
226
225
|
"original": "string",
|
|
@@ -233,13 +232,11 @@ export class B2bMultiSelectDropdown {
|
|
|
233
232
|
"tags": [],
|
|
234
233
|
"text": "The input label."
|
|
235
234
|
},
|
|
236
|
-
"
|
|
237
|
-
"setter": false,
|
|
235
|
+
"attribute": "label",
|
|
238
236
|
"reflect": false
|
|
239
237
|
},
|
|
240
238
|
"placeholder": {
|
|
241
239
|
"type": "string",
|
|
242
|
-
"attribute": "placeholder",
|
|
243
240
|
"mutable": false,
|
|
244
241
|
"complexType": {
|
|
245
242
|
"original": "string",
|
|
@@ -252,13 +249,11 @@ export class B2bMultiSelectDropdown {
|
|
|
252
249
|
"tags": [],
|
|
253
250
|
"text": "The placeholder shown in the input field."
|
|
254
251
|
},
|
|
255
|
-
"
|
|
256
|
-
"setter": false,
|
|
252
|
+
"attribute": "placeholder",
|
|
257
253
|
"reflect": true
|
|
258
254
|
},
|
|
259
255
|
"selectedValues": {
|
|
260
256
|
"type": "string",
|
|
261
|
-
"attribute": "selected-values",
|
|
262
257
|
"mutable": false,
|
|
263
258
|
"complexType": {
|
|
264
259
|
"original": "string | string[]",
|
|
@@ -271,14 +266,12 @@ export class B2bMultiSelectDropdown {
|
|
|
271
266
|
"tags": [],
|
|
272
267
|
"text": "The initial values to be selected in the dropdown."
|
|
273
268
|
},
|
|
274
|
-
"
|
|
275
|
-
"setter": false,
|
|
269
|
+
"attribute": "selected-values",
|
|
276
270
|
"reflect": false,
|
|
277
271
|
"defaultValue": "[]"
|
|
278
272
|
},
|
|
279
273
|
"optionsList": {
|
|
280
274
|
"type": "string",
|
|
281
|
-
"attribute": "options-list",
|
|
282
275
|
"mutable": false,
|
|
283
276
|
"complexType": {
|
|
284
277
|
"original": "string | string[]",
|
|
@@ -291,14 +284,12 @@ export class B2bMultiSelectDropdown {
|
|
|
291
284
|
"tags": [],
|
|
292
285
|
"text": "The list of options passed into the search dropdown. Can be static or dynamic, i.e. updated when the b2b-search or b2b-input emitters fire."
|
|
293
286
|
},
|
|
294
|
-
"
|
|
295
|
-
"setter": false,
|
|
287
|
+
"attribute": "options-list",
|
|
296
288
|
"reflect": false,
|
|
297
289
|
"defaultValue": "[]"
|
|
298
290
|
},
|
|
299
291
|
"searchPlaceholder": {
|
|
300
292
|
"type": "string",
|
|
301
|
-
"attribute": "search-placeholder",
|
|
302
293
|
"mutable": false,
|
|
303
294
|
"complexType": {
|
|
304
295
|
"original": "string",
|
|
@@ -311,13 +302,11 @@ export class B2bMultiSelectDropdown {
|
|
|
311
302
|
"tags": [],
|
|
312
303
|
"text": "The placeholder shown in the search bar."
|
|
313
304
|
},
|
|
314
|
-
"
|
|
315
|
-
"setter": false,
|
|
305
|
+
"attribute": "search-placeholder",
|
|
316
306
|
"reflect": false
|
|
317
307
|
},
|
|
318
308
|
"selectAllLabel": {
|
|
319
309
|
"type": "string",
|
|
320
|
-
"attribute": "select-all-label",
|
|
321
310
|
"mutable": false,
|
|
322
311
|
"complexType": {
|
|
323
312
|
"original": "string",
|
|
@@ -330,13 +319,11 @@ export class B2bMultiSelectDropdown {
|
|
|
330
319
|
"tags": [],
|
|
331
320
|
"text": "The string displayed as the select all label."
|
|
332
321
|
},
|
|
333
|
-
"
|
|
334
|
-
"setter": false,
|
|
322
|
+
"attribute": "select-all-label",
|
|
335
323
|
"reflect": false
|
|
336
324
|
},
|
|
337
325
|
"maxOptionsVisible": {
|
|
338
326
|
"type": "number",
|
|
339
|
-
"attribute": "max-options-visible",
|
|
340
327
|
"mutable": false,
|
|
341
328
|
"complexType": {
|
|
342
329
|
"original": "number",
|
|
@@ -349,14 +336,12 @@ export class B2bMultiSelectDropdown {
|
|
|
349
336
|
"tags": [],
|
|
350
337
|
"text": "The maximum amount of chips visible. Adjust this depending on available size of the dropdown."
|
|
351
338
|
},
|
|
352
|
-
"
|
|
353
|
-
"setter": false,
|
|
339
|
+
"attribute": "max-options-visible",
|
|
354
340
|
"reflect": false,
|
|
355
341
|
"defaultValue": "8"
|
|
356
342
|
},
|
|
357
343
|
"required": {
|
|
358
344
|
"type": "boolean",
|
|
359
|
-
"attribute": "required",
|
|
360
345
|
"mutable": false,
|
|
361
346
|
"complexType": {
|
|
362
347
|
"original": "boolean",
|
|
@@ -369,14 +354,12 @@ export class B2bMultiSelectDropdown {
|
|
|
369
354
|
"tags": [],
|
|
370
355
|
"text": "Adds an asterisk at the end of the label to signify that the field is required."
|
|
371
356
|
},
|
|
372
|
-
"
|
|
373
|
-
"setter": false,
|
|
357
|
+
"attribute": "required",
|
|
374
358
|
"reflect": true,
|
|
375
359
|
"defaultValue": "false"
|
|
376
360
|
},
|
|
377
361
|
"invalid": {
|
|
378
362
|
"type": "boolean",
|
|
379
|
-
"attribute": "invalid",
|
|
380
363
|
"mutable": false,
|
|
381
364
|
"complexType": {
|
|
382
365
|
"original": "boolean",
|
|
@@ -389,14 +372,12 @@ export class B2bMultiSelectDropdown {
|
|
|
389
372
|
"tags": [],
|
|
390
373
|
"text": "Whether the multi select dropdown is currently invalid. Per default, it is false."
|
|
391
374
|
},
|
|
392
|
-
"
|
|
393
|
-
"setter": false,
|
|
375
|
+
"attribute": "invalid",
|
|
394
376
|
"reflect": true,
|
|
395
377
|
"defaultValue": "false"
|
|
396
378
|
},
|
|
397
379
|
"errorMessage": {
|
|
398
380
|
"type": "string",
|
|
399
|
-
"attribute": "error-message",
|
|
400
381
|
"mutable": false,
|
|
401
382
|
"complexType": {
|
|
402
383
|
"original": "string",
|
|
@@ -409,13 +390,11 @@ export class B2bMultiSelectDropdown {
|
|
|
409
390
|
"tags": [],
|
|
410
391
|
"text": "The error message that is shown if the multi select dropdown is invalid."
|
|
411
392
|
},
|
|
412
|
-
"
|
|
413
|
-
"setter": false,
|
|
393
|
+
"attribute": "error-message",
|
|
414
394
|
"reflect": false
|
|
415
395
|
},
|
|
416
396
|
"hint": {
|
|
417
397
|
"type": "string",
|
|
418
|
-
"attribute": "hint",
|
|
419
398
|
"mutable": false,
|
|
420
399
|
"complexType": {
|
|
421
400
|
"original": "string",
|
|
@@ -428,13 +407,11 @@ export class B2bMultiSelectDropdown {
|
|
|
428
407
|
"tags": [],
|
|
429
408
|
"text": "The hint text that appears underneath the multi select dropdown field."
|
|
430
409
|
},
|
|
431
|
-
"
|
|
432
|
-
"setter": false,
|
|
410
|
+
"attribute": "hint",
|
|
433
411
|
"reflect": false
|
|
434
412
|
},
|
|
435
413
|
"disabled": {
|
|
436
414
|
"type": "boolean",
|
|
437
|
-
"attribute": "disabled",
|
|
438
415
|
"mutable": false,
|
|
439
416
|
"complexType": {
|
|
440
417
|
"original": "boolean",
|
|
@@ -447,8 +424,7 @@ export class B2bMultiSelectDropdown {
|
|
|
447
424
|
"tags": [],
|
|
448
425
|
"text": "Whether or not the field is disabled. Default is false."
|
|
449
426
|
},
|
|
450
|
-
"
|
|
451
|
-
"setter": false,
|
|
427
|
+
"attribute": "disabled",
|
|
452
428
|
"reflect": true,
|
|
453
429
|
"defaultValue": "false"
|
|
454
430
|
}
|
package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class B2bMultiSelectOption {
|
|
3
3
|
constructor() {
|
|
4
|
-
/** Whether the option is currently selected. */
|
|
5
|
-
this.selected = false;
|
|
6
|
-
/** @internal Whether the checkbox is in indeterminate state. */
|
|
7
|
-
this.indeterminate = false;
|
|
8
4
|
this.handleCheckboxChange = event => {
|
|
9
5
|
this.selected = event.detail.checked;
|
|
10
6
|
this.b2bOptionSelected.emit({
|
|
@@ -12,11 +8,14 @@ export class B2bMultiSelectOption {
|
|
|
12
8
|
selectedOption: this.option,
|
|
13
9
|
});
|
|
14
10
|
};
|
|
11
|
+
this.option = undefined;
|
|
12
|
+
this.selected = false;
|
|
13
|
+
this.indeterminate = false;
|
|
15
14
|
}
|
|
16
15
|
render() {
|
|
17
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: 'c3c1955fd6ff4019b2cbc860ded4a0d51dc7b4ee', role: "option", class: {
|
|
18
17
|
'b2b-multiselect-dropdown__option': true,
|
|
19
|
-
} }, h("b2b-checkbox", { key: '
|
|
18
|
+
} }, h("b2b-checkbox", { key: '898231cd21f30da27314fa0b938a030c39fedbca', checked: this.selected, "onB2b-change": this.handleCheckboxChange, label: this.option, indeterminate: this.indeterminate, value: this.option })));
|
|
20
19
|
}
|
|
21
20
|
static get is() { return "b2b-multiselect-option"; }
|
|
22
21
|
static get originalStyleUrls() {
|
|
@@ -33,7 +32,6 @@ export class B2bMultiSelectOption {
|
|
|
33
32
|
return {
|
|
34
33
|
"option": {
|
|
35
34
|
"type": "string",
|
|
36
|
-
"attribute": "option",
|
|
37
35
|
"mutable": false,
|
|
38
36
|
"complexType": {
|
|
39
37
|
"original": "string",
|
|
@@ -46,13 +44,11 @@ export class B2bMultiSelectOption {
|
|
|
46
44
|
"tags": [],
|
|
47
45
|
"text": "The label of the option."
|
|
48
46
|
},
|
|
49
|
-
"
|
|
50
|
-
"setter": false,
|
|
47
|
+
"attribute": "option",
|
|
51
48
|
"reflect": false
|
|
52
49
|
},
|
|
53
50
|
"selected": {
|
|
54
51
|
"type": "boolean",
|
|
55
|
-
"attribute": "selected",
|
|
56
52
|
"mutable": true,
|
|
57
53
|
"complexType": {
|
|
58
54
|
"original": "boolean",
|
|
@@ -65,14 +61,12 @@ export class B2bMultiSelectOption {
|
|
|
65
61
|
"tags": [],
|
|
66
62
|
"text": "Whether the option is currently selected."
|
|
67
63
|
},
|
|
68
|
-
"
|
|
69
|
-
"setter": false,
|
|
64
|
+
"attribute": "selected",
|
|
70
65
|
"reflect": false,
|
|
71
66
|
"defaultValue": "false"
|
|
72
67
|
},
|
|
73
68
|
"indeterminate": {
|
|
74
69
|
"type": "boolean",
|
|
75
|
-
"attribute": "indeterminate",
|
|
76
70
|
"mutable": false,
|
|
77
71
|
"complexType": {
|
|
78
72
|
"original": "boolean",
|
|
@@ -88,8 +82,7 @@ export class B2bMultiSelectOption {
|
|
|
88
82
|
}],
|
|
89
83
|
"text": ""
|
|
90
84
|
},
|
|
91
|
-
"
|
|
92
|
-
"setter": false,
|
|
85
|
+
"attribute": "indeterminate",
|
|
93
86
|
"reflect": false,
|
|
94
87
|
"defaultValue": "false"
|
|
95
88
|
}
|