@otto-de/b2b-core-components 1.30.0 → 1.31.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/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-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-e40069cd.entry.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 +36 -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 +78 -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 +86 -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 +81 -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 +76 -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 +241 -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 +255 -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 +83 -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 +97 -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 +401 -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 +28 -51
- 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 +7 -7
- package/package.json +8 -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,401 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('B2B-Table', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
page.setDefaultTimeout(10000);
|
|
7
|
+
await page.setContent(`
|
|
8
|
+
<b2b-table size='equal'>
|
|
9
|
+
<b2b-table-rowgroup type='header'>
|
|
10
|
+
<b2b-table-row>
|
|
11
|
+
<b2b-table-header sort-direction="not-sorted" sort-icon-align="left">Title 1</b2b-table-header>
|
|
12
|
+
<b2b-table-header>Title 2</b2b-table-header>
|
|
13
|
+
<b2b-table-header sort-direction="descending" sort-id='title3' sort-icon-align="right">Title 3</b2b-table-header>
|
|
14
|
+
</b2b-table-row>
|
|
15
|
+
</b2b-table-rowgroup>
|
|
16
|
+
<b2b-table-rowgroup type='body'>
|
|
17
|
+
<b2b-table-row>
|
|
18
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
19
|
+
<b2b-table-cell>data 2a</b2b-table-cell>
|
|
20
|
+
<b2b-table-cell>data 3a</b2b-table-cell>
|
|
21
|
+
</b2b-table-row>
|
|
22
|
+
</b2b-table-rowgroup>
|
|
23
|
+
</b2b-table>
|
|
24
|
+
`);
|
|
25
|
+
});
|
|
26
|
+
const tableWithAccordion = `
|
|
27
|
+
<b2b-table size="expand">
|
|
28
|
+
<b2b-table-rowgroup type="header" accordion>
|
|
29
|
+
<b2b-table-row id="test-header">
|
|
30
|
+
<b2b-table-header>Title 1</b2b-table-header>
|
|
31
|
+
<b2b-table-header>Title 2</b2b-table-header>
|
|
32
|
+
</b2b-table-row>
|
|
33
|
+
</b2b-table-rowgroup>
|
|
34
|
+
<b2b-table-rowgroup type="body" accordion>
|
|
35
|
+
<b2b-table-row id="test-parent">
|
|
36
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
37
|
+
<b2b-table-cell>data 2a</b2b-table-cell>
|
|
38
|
+
</b2b-table-row>
|
|
39
|
+
<b2b-table-row id="test-child">
|
|
40
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
41
|
+
<b2b-table-cell>data 2a</b2b-table-cell>
|
|
42
|
+
</b2b-table-row>
|
|
43
|
+
</b2b-table-rowgroup>
|
|
44
|
+
</b2b-table>`;
|
|
45
|
+
const tableWithSelection = `
|
|
46
|
+
<b2b-table size="expand">
|
|
47
|
+
<b2b-table-rowgroup type="header" accordion selectable>
|
|
48
|
+
<b2b-table-row id="test-header">
|
|
49
|
+
<b2b-table-header>Title 1</b2b-table-header>
|
|
50
|
+
<b2b-table-header>Title 2</b2b-table-header>
|
|
51
|
+
</b2b-table-row>
|
|
52
|
+
</b2b-table-rowgroup>
|
|
53
|
+
<b2b-table-rowgroup type="body" accordion selectable opened>
|
|
54
|
+
<b2b-table-row id="test-parent" value="peaches">
|
|
55
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
56
|
+
<b2b-table-cell>data 2a</b2b-table-cell>
|
|
57
|
+
</b2b-table-row>
|
|
58
|
+
<b2b-table-row id="test-child" value="cherries">
|
|
59
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
60
|
+
<b2b-table-cell>data 2a</b2b-table-cell>
|
|
61
|
+
</b2b-table-row>
|
|
62
|
+
<b2b-table-row id="second-child" value="plums">
|
|
63
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
64
|
+
<b2b-table-cell>data 2a</b2b-table-cell>
|
|
65
|
+
</b2b-table-row>
|
|
66
|
+
</b2b-table-rowgroup>
|
|
67
|
+
</b2b-table>`;
|
|
68
|
+
const tableWithColspan = `
|
|
69
|
+
<b2b-table size='colspan'>
|
|
70
|
+
<b2b-table-rowgroup type='header'>
|
|
71
|
+
<b2b-table-row>
|
|
72
|
+
<b2b-table-header colspan="2">Title 1 + 2</b2b-table-header>
|
|
73
|
+
<b2b-table-header>Title 2</b2b-table-header>
|
|
74
|
+
</b2b-table-row>
|
|
75
|
+
</b2b-table-rowgroup>
|
|
76
|
+
<b2b-table-rowgroup type='body'>
|
|
77
|
+
<b2b-table-row>
|
|
78
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
79
|
+
<b2b-table-cell colspan="2">data 2a + 3a</b2b-table-cell>
|
|
80
|
+
</b2b-table-row>
|
|
81
|
+
</b2b-table-rowgroup>
|
|
82
|
+
</b2b-table>
|
|
83
|
+
`;
|
|
84
|
+
it('should render the table component', async () => {
|
|
85
|
+
const element = await page.find('b2b-table');
|
|
86
|
+
expect(element).not.toBeNull();
|
|
87
|
+
});
|
|
88
|
+
it('should set cell sizes according to table size', async () => {
|
|
89
|
+
const cells = await page.findAll('b2b-table-cell');
|
|
90
|
+
cells.map(cell => {
|
|
91
|
+
expect(cell.getAttribute('size')).toBe('equal');
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
it('should set headers to fixed only if table is scrollable', async () => {
|
|
95
|
+
const cells = await page.findAll('b2b-table-header');
|
|
96
|
+
cells.map(cell => {
|
|
97
|
+
expect(cell.getAttribute('fixed')).not.toBe('true');
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
it('should set headers to fixed if table is scrollable', async () => {
|
|
101
|
+
page = await newE2EPage();
|
|
102
|
+
await page.setContent(`
|
|
103
|
+
<b2b-scrollable-container>
|
|
104
|
+
<b2b-table size='equal'>
|
|
105
|
+
<b2b-table-rowgroup type='header'>
|
|
106
|
+
<b2b-table-row>
|
|
107
|
+
<b2b-table-header>Title 1</b2b-table-header>
|
|
108
|
+
<b2b-table-header>Title 2</b2b-table-header>
|
|
109
|
+
</b2b-table-row>
|
|
110
|
+
</b2b-table>
|
|
111
|
+
</b2b-scrollable-container>
|
|
112
|
+
`);
|
|
113
|
+
const rowGroup = await page.find('b2b-table-rowgroup');
|
|
114
|
+
expect(await rowGroup.getProperty('fixed')).toBe(true);
|
|
115
|
+
});
|
|
116
|
+
it('should set header rows not highlightable', async () => {
|
|
117
|
+
const headerRow = await page.find('b2b-table-rowgroup[type=header] b2b-table-row');
|
|
118
|
+
const isHeaderRowSelectable = await headerRow.getProperty('highlight');
|
|
119
|
+
expect(isHeaderRowSelectable).toBe(false);
|
|
120
|
+
const dataRow = await page.find('b2b-table-rowgroup[type=body] b2b-table-row');
|
|
121
|
+
const isDataRowSelectable = await dataRow.getProperty('highlight');
|
|
122
|
+
expect(isDataRowSelectable).toBe(true);
|
|
123
|
+
});
|
|
124
|
+
it('should show a descending sorting button when a column header is hovered or focused', async () => {
|
|
125
|
+
const headerCol = await page.find({ text: 'Title 1' });
|
|
126
|
+
const sortArrow = await page.find('b2b-table-header >>> svg');
|
|
127
|
+
const ariaState = await headerCol.getAttribute('aria-sort');
|
|
128
|
+
expect(await sortArrow.isVisible()).toBe(false);
|
|
129
|
+
expect(ariaState).toEqualText('other');
|
|
130
|
+
await headerCol.hover();
|
|
131
|
+
await page.waitForChanges();
|
|
132
|
+
expect(await sortArrow.isVisible()).toBe(true);
|
|
133
|
+
});
|
|
134
|
+
it('should emit the sort direction when a column header is clicked', async () => {
|
|
135
|
+
const headerCol = await page.find({ text: 'Title 1' });
|
|
136
|
+
const b2bChange = await page.spyOnEvent('b2b-change');
|
|
137
|
+
const sortArrow = await page.find('b2b-table-header >>> svg');
|
|
138
|
+
let ariaState = await headerCol.getAttribute('aria-sort');
|
|
139
|
+
expect(sortArrow).toHaveClass('b2b-table-header__sort--right');
|
|
140
|
+
expect(ariaState).toEqualText('other');
|
|
141
|
+
await headerCol.click();
|
|
142
|
+
ariaState = await headerCol.getAttribute('aria-sort');
|
|
143
|
+
expect(ariaState).toEqualText('ascending');
|
|
144
|
+
expect(b2bChange).toHaveReceivedEvent();
|
|
145
|
+
});
|
|
146
|
+
it('should emit the sort direction when a column header is focused and enter is pressed', async () => {
|
|
147
|
+
const headerCol = await page.find({ text: 'Title 1' });
|
|
148
|
+
const b2bChange = await page.spyOnEvent('b2b-change');
|
|
149
|
+
let ariaState = await headerCol.getAttribute('aria-sort');
|
|
150
|
+
expect(ariaState).toEqualText('other');
|
|
151
|
+
await page.keyboard.press('Tab');
|
|
152
|
+
await page.keyboard.press('Enter');
|
|
153
|
+
await page.waitForChanges();
|
|
154
|
+
ariaState = await headerCol.getAttribute('aria-sort');
|
|
155
|
+
expect(ariaState).toEqualText('ascending');
|
|
156
|
+
expect(b2bChange).toHaveReceivedEvent();
|
|
157
|
+
});
|
|
158
|
+
it('should un-sort siblings when sorting any column', async () => {
|
|
159
|
+
const headerCol = await page.find({ text: 'Title 3' });
|
|
160
|
+
let ariaState = await headerCol.getAttribute('aria-sort');
|
|
161
|
+
expect(ariaState).toEqualText('descending');
|
|
162
|
+
await page.keyboard.press('Tab');
|
|
163
|
+
await page.keyboard.press('Enter');
|
|
164
|
+
await page.waitForChanges();
|
|
165
|
+
ariaState = await headerCol.getAttribute('aria-sort');
|
|
166
|
+
expect(ariaState).toEqualText('other');
|
|
167
|
+
});
|
|
168
|
+
it('should not change sorting of siblings if they do not implement sorting', async () => {
|
|
169
|
+
const headerCol = await page.find({ text: 'Title 2' });
|
|
170
|
+
let ariaState = await headerCol.getAttribute('aria-sort');
|
|
171
|
+
expect(ariaState).toEqualText('other');
|
|
172
|
+
await page.keyboard.press('Tab');
|
|
173
|
+
await page.keyboard.press('Enter');
|
|
174
|
+
await page.waitForChanges();
|
|
175
|
+
ariaState = await headerCol.getAttribute('aria-sort');
|
|
176
|
+
expect(ariaState).toEqualText('other');
|
|
177
|
+
const sortDirection = await headerCol.getAttribute('sort-direction');
|
|
178
|
+
expect(sortDirection).toBeNull();
|
|
179
|
+
});
|
|
180
|
+
it('Table should emit an event with the sorting column and direction', async () => {
|
|
181
|
+
const headerCol = await page.find({ text: 'Title 1' });
|
|
182
|
+
const b2bChange = await page.spyOnEvent('b2b-sort-change');
|
|
183
|
+
await headerCol.click();
|
|
184
|
+
expect(b2bChange).toHaveReceivedEvent();
|
|
185
|
+
expect(b2bChange).toHaveReceivedEventDetail({
|
|
186
|
+
sortedColumn: 'Title 1',
|
|
187
|
+
sortDirection: 'ascending',
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
it('Table sort-change event should emit header sort-id if provided', async () => {
|
|
191
|
+
const headerCol = await page.find({ text: 'Title 3' });
|
|
192
|
+
const b2bChange = await page.spyOnEvent('b2b-sort-change');
|
|
193
|
+
await headerCol.click();
|
|
194
|
+
expect(b2bChange).toHaveReceivedEvent();
|
|
195
|
+
expect(b2bChange).toHaveReceivedEventDetail({
|
|
196
|
+
sortedColumn: 'title3',
|
|
197
|
+
sortDirection: 'ascending',
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
it('should render the first row of a rowgroup as an accordion parent if accordion is true on a rowgroup and the rowgroup type is body', async () => {
|
|
201
|
+
page = await newE2EPage();
|
|
202
|
+
await page.setContent(tableWithAccordion);
|
|
203
|
+
const firstRow = await page.find('#test-parent');
|
|
204
|
+
const arrowCell = await firstRow.find('b2b-table-row__accordion-icon');
|
|
205
|
+
expect(arrowCell).toBeDefined();
|
|
206
|
+
});
|
|
207
|
+
it('should render all rows as accordion children when they are in the same rowgroup of type body in which accordion is true', async () => {
|
|
208
|
+
page = await newE2EPage();
|
|
209
|
+
await page.setContent(tableWithAccordion);
|
|
210
|
+
const childRow = await page.find('#test-child');
|
|
211
|
+
const controlCell = await childRow.find('.b2b-table-row__control-cell--accordion');
|
|
212
|
+
expect(controlCell).toBeDefined();
|
|
213
|
+
});
|
|
214
|
+
it('should add an extra column for controls if accordion is true on a rowgroup', async () => {
|
|
215
|
+
page = await newE2EPage();
|
|
216
|
+
await page.setContent(tableWithAccordion);
|
|
217
|
+
const header = await page.find('#test-header >>> b2b-table-header');
|
|
218
|
+
expect(header).toEqualText('');
|
|
219
|
+
const parent = await page.find('#test-parent >>> b2b-table-cell');
|
|
220
|
+
const parentControl = await parent.find('button');
|
|
221
|
+
expect(parentControl).toBeDefined;
|
|
222
|
+
});
|
|
223
|
+
it('should show children accordion rows if the arrow is clicked in a parent accordion row', async () => {
|
|
224
|
+
page = await newE2EPage();
|
|
225
|
+
await page.setContent(tableWithAccordion);
|
|
226
|
+
const parent = await page.find('#test-parent >>> b2b-table-cell');
|
|
227
|
+
const parentControl = await parent.find('button');
|
|
228
|
+
const child = await page.find('#test-child');
|
|
229
|
+
const styleBefore = await child.getComputedStyle();
|
|
230
|
+
expect(styleBefore['visibility']).toEqual('collapse');
|
|
231
|
+
await parentControl.click();
|
|
232
|
+
await page.waitForChanges();
|
|
233
|
+
const styleAfter = await child.getComputedStyle();
|
|
234
|
+
expect(styleAfter['visibility']).toEqual('visible');
|
|
235
|
+
});
|
|
236
|
+
it('should show children accordion rows if the arrow is focused and enter is pressed in a parent accordion row', async () => {
|
|
237
|
+
page = await newE2EPage();
|
|
238
|
+
await page.setContent(tableWithAccordion);
|
|
239
|
+
const child = await page.find('#test-child');
|
|
240
|
+
const styleBefore = await child.getComputedStyle();
|
|
241
|
+
expect(styleBefore['visibility']).toEqual('collapse');
|
|
242
|
+
await page.keyboard.press('Tab');
|
|
243
|
+
await page.keyboard.press('Enter');
|
|
244
|
+
await page.waitForChanges();
|
|
245
|
+
const styleAfter = await child.getComputedStyle();
|
|
246
|
+
expect(styleAfter['visibility']).toEqual('visible');
|
|
247
|
+
});
|
|
248
|
+
it('should hide children accordion rows if the arrow is pressed again', async () => {
|
|
249
|
+
page = await newE2EPage();
|
|
250
|
+
await page.setContent(tableWithAccordion);
|
|
251
|
+
const parent = await page.find('#test-parent >>> b2b-table-cell');
|
|
252
|
+
const parentControl = await parent.find('button');
|
|
253
|
+
const child = await page.find('#test-child');
|
|
254
|
+
const styleBefore = await child.getComputedStyle();
|
|
255
|
+
expect(styleBefore['visibility']).toEqual('collapse');
|
|
256
|
+
await parentControl.click();
|
|
257
|
+
await page.waitForChanges();
|
|
258
|
+
await parentControl.click();
|
|
259
|
+
await page.waitForChanges();
|
|
260
|
+
const styleAfter = await child.getComputedStyle();
|
|
261
|
+
expect(styleAfter['visibility']).toEqual('collapse');
|
|
262
|
+
});
|
|
263
|
+
it('should render accordion opened if prop set to true', async () => {
|
|
264
|
+
page = await newE2EPage();
|
|
265
|
+
await page.setContent(`<b2b-table size="expand">
|
|
266
|
+
<b2b-table-rowgroup type="header" accordion>
|
|
267
|
+
<b2b-table-row id="test-header">
|
|
268
|
+
<b2b-table-header>Title 1</b2b-table-header>
|
|
269
|
+
<b2b-table-header>Title 2</b2b-table-header>
|
|
270
|
+
</b2b-table-row>
|
|
271
|
+
</b2b-table-rowgroup>
|
|
272
|
+
<b2b-table-rowgroup type="body" accordion opened>
|
|
273
|
+
<b2b-table-row id="test-parent">
|
|
274
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
275
|
+
<b2b-table-cell>data 2a</b2b-table-cell>
|
|
276
|
+
</b2b-table-row>
|
|
277
|
+
<b2b-table-row id="test-child">
|
|
278
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
279
|
+
<b2b-table-cell>data 2a</b2b-table-cell>
|
|
280
|
+
</b2b-table-row>
|
|
281
|
+
</b2b-table-rowgroup>
|
|
282
|
+
</b2b-table>`);
|
|
283
|
+
const child = await page.find('#test-child');
|
|
284
|
+
const toggleIconClass = await page.evaluate(() => {
|
|
285
|
+
const parentRow = document.querySelector('#test-parent');
|
|
286
|
+
const toggleIcon = parentRow.shadowRoot.querySelector('b2b-table-cell button');
|
|
287
|
+
return toggleIcon.className;
|
|
288
|
+
});
|
|
289
|
+
expect(toggleIconClass).toContain('b2b-table-row__accordion-icon--open');
|
|
290
|
+
const childInitialStyle = await child.getComputedStyle();
|
|
291
|
+
expect(childInitialStyle['visibility']).toEqual('visible');
|
|
292
|
+
});
|
|
293
|
+
it('should render a checkbox column when selectable is set to true on a rowgroup', async () => {
|
|
294
|
+
page = await newE2EPage();
|
|
295
|
+
await page.setContent(tableWithSelection);
|
|
296
|
+
const headerCheckbox = await page.find('#test-header >>> b2b-checkbox');
|
|
297
|
+
expect(headerCheckbox).not.toBeNull();
|
|
298
|
+
const rowCheckbox = await page.find('#test-parent >>> b2b-checkbox');
|
|
299
|
+
expect(rowCheckbox).not.toBeNull();
|
|
300
|
+
});
|
|
301
|
+
it('should toggle all rows when the header row is clicked', async () => {
|
|
302
|
+
page = await newE2EPage();
|
|
303
|
+
await page.setContent(tableWithSelection);
|
|
304
|
+
const headerCheckbox = await page.find('#test-header >>> b2b-checkbox');
|
|
305
|
+
await headerCheckbox.click();
|
|
306
|
+
const firstRow = await page.find('#test-parent');
|
|
307
|
+
const secondRow = await page.find('#test-child');
|
|
308
|
+
const thirdRow = await page.find('#second-child');
|
|
309
|
+
expect(await firstRow.getProperty('checked')).toBe(true);
|
|
310
|
+
expect(await secondRow.getProperty('checked')).toBe(true);
|
|
311
|
+
expect(await thirdRow.getProperty('checked')).toBe(true);
|
|
312
|
+
await headerCheckbox.click();
|
|
313
|
+
expect(await firstRow.getProperty('checked')).toBe(false);
|
|
314
|
+
expect(await secondRow.getProperty('checked')).toBe(false);
|
|
315
|
+
expect(await thirdRow.getProperty('checked')).toBe(false);
|
|
316
|
+
});
|
|
317
|
+
it('should toggle all children rows of a parent accordion row if the parent is selected', async () => {
|
|
318
|
+
page = await newE2EPage();
|
|
319
|
+
await page.setContent(tableWithSelection);
|
|
320
|
+
const firstRow = await page.find('#test-parent >>> b2b-checkbox');
|
|
321
|
+
expect(firstRow).not.toBeNull();
|
|
322
|
+
await firstRow.click();
|
|
323
|
+
const secondRow = await page.find('#test-child');
|
|
324
|
+
expect(await secondRow.getProperty('checked')).toBe(true);
|
|
325
|
+
await firstRow.click();
|
|
326
|
+
expect(await secondRow.getProperty('checked')).toBe(false);
|
|
327
|
+
});
|
|
328
|
+
it('should display an indeterminate checkbox if some rows are checked', async () => {
|
|
329
|
+
page = await newE2EPage();
|
|
330
|
+
await page.setContent(tableWithSelection);
|
|
331
|
+
const checkbox = await page.find('#test-child >>> b2b-checkbox');
|
|
332
|
+
expect(checkbox).not.toBeNull();
|
|
333
|
+
await checkbox.click();
|
|
334
|
+
const secondRow = await page.find('#test-child');
|
|
335
|
+
expect(await secondRow.getProperty('checked')).toBe(true);
|
|
336
|
+
const header = await page.find('#test-header');
|
|
337
|
+
expect(await header.getProperty('indeterminate')).toBe(true);
|
|
338
|
+
});
|
|
339
|
+
it('should display an indeterminate checkbox in the parent row of an accordion if not all children are checked', async () => {
|
|
340
|
+
page = await newE2EPage();
|
|
341
|
+
await page.setContent(tableWithSelection);
|
|
342
|
+
const secondRow = await page.find('#test-child >>> b2b-checkbox');
|
|
343
|
+
await secondRow.click();
|
|
344
|
+
expect(await secondRow.getProperty('checked')).toBe(true);
|
|
345
|
+
const firstRow = await page.find('#test-parent >>> b2b-checkbox');
|
|
346
|
+
expect(await firstRow.getProperty('indeterminate')).toBe(true);
|
|
347
|
+
});
|
|
348
|
+
it('should emit the currently selected values when a row is selected or unselected', async () => {
|
|
349
|
+
page = await newE2EPage();
|
|
350
|
+
await page.setContent(tableWithSelection);
|
|
351
|
+
const selectSpy = await page.spyOnEvent('b2b-row-selected');
|
|
352
|
+
const secondRow = await page.find('#test-child >>> b2b-checkbox');
|
|
353
|
+
await secondRow.click();
|
|
354
|
+
await page.waitForChanges();
|
|
355
|
+
expect(selectSpy).toHaveReceivedEvent();
|
|
356
|
+
expect(selectSpy).toHaveReceivedEventDetail({
|
|
357
|
+
checked: true,
|
|
358
|
+
value: 'cherries',
|
|
359
|
+
});
|
|
360
|
+
await secondRow.click();
|
|
361
|
+
await page.waitForChanges();
|
|
362
|
+
expect(selectSpy).toHaveReceivedEvent();
|
|
363
|
+
expect(selectSpy).toHaveReceivedEventDetail({
|
|
364
|
+
checked: false,
|
|
365
|
+
value: 'cherries',
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
it('should emit the currently selected values in an accordion when a row of that accordion is selected or unselected', async () => {
|
|
369
|
+
page = await newE2EPage();
|
|
370
|
+
await page.setContent(tableWithSelection);
|
|
371
|
+
const selectSpy = await page.spyOnEvent('b2b-group-selected');
|
|
372
|
+
const secondRow = await page.find('#test-parent >>> b2b-checkbox');
|
|
373
|
+
await secondRow.click();
|
|
374
|
+
await page.waitForChanges();
|
|
375
|
+
expect(selectSpy).toHaveReceivedEvent();
|
|
376
|
+
expect(selectSpy).toHaveReceivedEventDetail({
|
|
377
|
+
group: 'peaches',
|
|
378
|
+
values: ['cherries', 'plums'],
|
|
379
|
+
});
|
|
380
|
+
const thirdRow = await page.find('#second-child >>> b2b-checkbox');
|
|
381
|
+
await thirdRow.click();
|
|
382
|
+
await page.waitForChanges();
|
|
383
|
+
expect(selectSpy).toHaveReceivedEvent();
|
|
384
|
+
expect(selectSpy).toHaveReceivedEventDetail({
|
|
385
|
+
group: 'peaches',
|
|
386
|
+
values: ['cherries'],
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
it('should allow setting the colspan property on cells if the table size is colspan', async () => {
|
|
390
|
+
page = await newE2EPage();
|
|
391
|
+
await page.setContent(tableWithColspan);
|
|
392
|
+
const header = await page.find({ text: 'Title 1 + 2' });
|
|
393
|
+
const table = await page.find('b2b-table');
|
|
394
|
+
const row = await page.find('b2b-table-row');
|
|
395
|
+
const cell = await page.find({ text: 'data 2a + 3a' });
|
|
396
|
+
expect(await cell.style.flexBasis).toBeDefined;
|
|
397
|
+
expect(row).toHaveClass('b2b-table-row--colspan');
|
|
398
|
+
expect(table).toHaveClass('b2b-table--colspan');
|
|
399
|
+
expect(await header.getProperty('colspan')).toEqual(2);
|
|
400
|
+
});
|
|
401
|
+
});
|
|
@@ -3,13 +3,6 @@ import { TableSizes, TableSortDirections } from "../../utils/types/table.types";
|
|
|
3
3
|
import { getAllRows } from "./utils";
|
|
4
4
|
export class TableComponent {
|
|
5
5
|
constructor() {
|
|
6
|
-
/** The size of the table. Both will expand to 100% of parent size.
|
|
7
|
-
* Expand cells will use as much space as content needs and text will wrap.
|
|
8
|
-
* Equal will keep all column sizes proportional to the number of columns.
|
|
9
|
-
* Colspan behaves same as equal, but allows you to set a colspan attribute on individual columns or cells
|
|
10
|
-
* to make them span more than one column.
|
|
11
|
-
**/
|
|
12
|
-
this.size = TableSizes.EXPAND;
|
|
13
6
|
this.getAllCellsByRow = (row) => {
|
|
14
7
|
return Array.from(row.children);
|
|
15
8
|
};
|
|
@@ -19,6 +12,7 @@ export class TableComponent {
|
|
|
19
12
|
rowGroups[i].size = this.size;
|
|
20
13
|
}
|
|
21
14
|
};
|
|
15
|
+
this.size = TableSizes.EXPAND;
|
|
22
16
|
}
|
|
23
17
|
onColumnSelected(event) {
|
|
24
18
|
if (event.target.nodeName === 'B2B-TABLE-HEADER') {
|
|
@@ -66,9 +60,9 @@ export class TableComponent {
|
|
|
66
60
|
}
|
|
67
61
|
}
|
|
68
62
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
63
|
+
return (h(Host, { key: '70f900f2160167e3f808c9c432cfa3bb134624c0', class: {
|
|
70
64
|
['b2b-table--' + this.size]: true,
|
|
71
|
-
}, role: "table" }, h("slot", { key: '
|
|
65
|
+
}, role: "table" }, h("slot", { key: 'c0b35190bb004dd3332e3b2bb856e30a1adee829' })));
|
|
72
66
|
}
|
|
73
67
|
static get is() { return "b2b-table"; }
|
|
74
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -86,7 +80,6 @@ export class TableComponent {
|
|
|
86
80
|
return {
|
|
87
81
|
"size": {
|
|
88
82
|
"type": "string",
|
|
89
|
-
"attribute": "size",
|
|
90
83
|
"mutable": false,
|
|
91
84
|
"complexType": {
|
|
92
85
|
"original": "TableSizes",
|
|
@@ -105,8 +98,7 @@ export class TableComponent {
|
|
|
105
98
|
"tags": [],
|
|
106
99
|
"text": "The size of the table. Both will expand to 100% of parent size.\nExpand cells will use as much space as content needs and text will wrap.\nEqual will keep all column sizes proportional to the number of columns.\nColspan behaves same as equal, but allows you to set a colspan attribute on individual columns or cells\nto make them span more than one column."
|
|
107
100
|
},
|
|
108
|
-
"
|
|
109
|
-
"setter": false,
|
|
101
|
+
"attribute": "size",
|
|
110
102
|
"reflect": false,
|
|
111
103
|
"defaultValue": "TableSizes.EXPAND"
|
|
112
104
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('B2B-Textarea', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<b2b-textarea label="Test"></b2b-textarea>`);
|
|
7
|
+
});
|
|
8
|
+
it('should render the textarea component', async () => {
|
|
9
|
+
const element = await page.find('b2b-textarea');
|
|
10
|
+
expect(element).not.toBeNull();
|
|
11
|
+
});
|
|
12
|
+
it('should render the label', async () => {
|
|
13
|
+
const label = await page.find({ text: 'Test' });
|
|
14
|
+
expect(label).not.toBeNull();
|
|
15
|
+
});
|
|
16
|
+
it('should emit when the user types', async () => {
|
|
17
|
+
const element = await page.find('b2b-textarea >>> textarea');
|
|
18
|
+
const inputSpy = await page.spyOnEvent('b2b-input');
|
|
19
|
+
await element.type('ABC');
|
|
20
|
+
page.waitForChanges();
|
|
21
|
+
expect(inputSpy).toHaveReceivedEvent();
|
|
22
|
+
});
|
|
23
|
+
it('should not allow typing when disabled', async () => {
|
|
24
|
+
const textarea = `<b2b-textarea label="Test" disabled></b2b-textarea>`;
|
|
25
|
+
page = await newE2EPage();
|
|
26
|
+
await page.setContent(textarea);
|
|
27
|
+
const element = await page.find('b2b-textarea >>> textarea');
|
|
28
|
+
const inputSpy = await page.spyOnEvent('b2b-input');
|
|
29
|
+
await element.type('ABC');
|
|
30
|
+
expect(inputSpy).not.toHaveReceivedEvent();
|
|
31
|
+
});
|
|
32
|
+
it('should autofocus', async () => {
|
|
33
|
+
const textarea = `<b2b-textarea label="Test" autofocus></b2b-textarea>`;
|
|
34
|
+
page = await newE2EPage();
|
|
35
|
+
await page.setContent(textarea);
|
|
36
|
+
const element = await page.find('b2b-textarea');
|
|
37
|
+
expect(element).toHaveAttribute('autofocus');
|
|
38
|
+
});
|
|
39
|
+
it('should display a hint text', async () => {
|
|
40
|
+
const textarea = `<b2b-textarea label="Test" hint="A test hint"></b2b-textarea>`;
|
|
41
|
+
page = await newE2EPage();
|
|
42
|
+
await page.setContent(textarea);
|
|
43
|
+
const hint = await page.find('b2b-textarea >>> span');
|
|
44
|
+
expect(hint).toEqualText('A test hint');
|
|
45
|
+
});
|
|
46
|
+
it('should display an error text when the textarea is invalid', async () => {
|
|
47
|
+
const textarea = `<b2b-textarea label="Test" error="A test error" invalid></b2b-textarea>`;
|
|
48
|
+
page = await newE2EPage();
|
|
49
|
+
await page.setContent(textarea);
|
|
50
|
+
const error = await page.find('b2b-textarea >>> span');
|
|
51
|
+
expect(error).toEqualText('A test error');
|
|
52
|
+
});
|
|
53
|
+
it('should not display a hint when an error message is present and the textarea is invalid', async () => {
|
|
54
|
+
const textarea = `<b2b-textarea label="Test" error="A test error" hint="A test hint" invalid></b2b-textarea>`;
|
|
55
|
+
page = await newE2EPage();
|
|
56
|
+
await page.setContent(textarea);
|
|
57
|
+
const error = await page.find('b2b-textarea >>> span');
|
|
58
|
+
expect(error).toEqualText('A test error');
|
|
59
|
+
});
|
|
60
|
+
it('should not display an error if the textarea is invalid and disabled', async () => {
|
|
61
|
+
const textarea = `<b2b-textarea label="Test" error="A test error" hint="A test hint" invalid disabled></b2b-textarea>`;
|
|
62
|
+
page = await newE2EPage();
|
|
63
|
+
await page.setContent(textarea);
|
|
64
|
+
const hint = await page.find('b2b-textarea >>> span');
|
|
65
|
+
expect(hint).toEqualText('A test hint');
|
|
66
|
+
});
|
|
67
|
+
it('should accept a maximum length', async () => {
|
|
68
|
+
const textarea = `<b2b-textarea label="Test" max-length="10"></b2b-textarea>`;
|
|
69
|
+
const input = 'An input with 27 characters';
|
|
70
|
+
page = await newE2EPage();
|
|
71
|
+
await page.setContent(textarea);
|
|
72
|
+
const element = await page.find('b2b-textarea >>> textarea');
|
|
73
|
+
await element.type(input);
|
|
74
|
+
const value = await element.getProperty('value');
|
|
75
|
+
expect(value).toEqual('An input w');
|
|
76
|
+
});
|
|
77
|
+
it('should support form building from the shadow DOM', async () => {
|
|
78
|
+
const form = `<form>
|
|
79
|
+
<b2b-textarea label="Test"></textarea>
|
|
80
|
+
<button type="submit">Submit</button>
|
|
81
|
+
</form>`;
|
|
82
|
+
page = await newE2EPage();
|
|
83
|
+
await page.setContent(form);
|
|
84
|
+
const handleFormData = jest.fn();
|
|
85
|
+
const formdataEventSpy = await page.spyOnEvent('formdata', handleFormData);
|
|
86
|
+
await page.evaluate(() => {
|
|
87
|
+
document.querySelector('button').click();
|
|
88
|
+
});
|
|
89
|
+
expect(formdataEventSpy).toHaveReceivedEvent();
|
|
90
|
+
});
|
|
91
|
+
});
|