@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
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
export class ButtonComponent {
|
|
3
3
|
constructor() {
|
|
4
|
-
/** The button variant. If not specified, the button will be the secondary variant. */
|
|
5
|
-
this.variant = 'secondary';
|
|
6
|
-
/** The button type. Matches native HTML types. The default type is 'button'. */
|
|
7
|
-
this.type = 'button';
|
|
8
|
-
/** The size of the button, 100 is the default state */
|
|
9
|
-
this.size = '100';
|
|
10
|
-
/** The width of the button. Per default, it will fit the content */
|
|
11
|
-
this.width = 'fit-content';
|
|
12
|
-
/** Whether the button is disabled. */
|
|
13
|
-
this.disabled = false;
|
|
14
|
-
/** Whether the button is currently loading. Set to true to hide text and display loading spinner instead */
|
|
15
|
-
this.loading = false;
|
|
16
|
-
/** Whether the button is currently active. Set to true when using the button to signify a permanent active state */
|
|
17
|
-
this.active = false;
|
|
18
|
-
/** The target of the button if it should behave like an anchor. Per default it is self. */
|
|
19
|
-
this.target = 'self';
|
|
20
|
-
/** @internal Whether the parent input group is disabled. Per default, it is false. */
|
|
21
|
-
this.groupDisabled = false;
|
|
22
4
|
this.canLoad = () => {
|
|
23
5
|
return this.disabled === false && this.loading;
|
|
24
6
|
};
|
|
@@ -37,6 +19,17 @@ export class ButtonComponent {
|
|
|
37
19
|
}
|
|
38
20
|
return false;
|
|
39
21
|
};
|
|
22
|
+
this.variant = 'secondary';
|
|
23
|
+
this.type = 'button';
|
|
24
|
+
this.size = '100';
|
|
25
|
+
this.width = 'fit-content';
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
this.loading = false;
|
|
28
|
+
this.active = false;
|
|
29
|
+
this.href = undefined;
|
|
30
|
+
this.target = 'self';
|
|
31
|
+
this.download = undefined;
|
|
32
|
+
this.groupDisabled = false;
|
|
40
33
|
}
|
|
41
34
|
/** Manually set focus to button element */
|
|
42
35
|
async setFocus() {
|
|
@@ -66,7 +59,7 @@ export class ButtonComponent {
|
|
|
66
59
|
return (h("div", { class: "b2b-button__spinner" }, h("b2b-spinner", { color: spinnerColor, size: "50" })));
|
|
67
60
|
}
|
|
68
61
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '4050874af416fc23c0d67dc335aacb005f0d2279', class: {
|
|
70
63
|
[`b2b-button--loading`]: this.canLoad(),
|
|
71
64
|
[`b2b-button--${this.size}`]: true,
|
|
72
65
|
[`b2b-button--active`]: this.active,
|
|
@@ -93,7 +86,6 @@ export class ButtonComponent {
|
|
|
93
86
|
return {
|
|
94
87
|
"variant": {
|
|
95
88
|
"type": "string",
|
|
96
|
-
"attribute": "variant",
|
|
97
89
|
"mutable": false,
|
|
98
90
|
"complexType": {
|
|
99
91
|
"original": "'primary' | 'secondary'",
|
|
@@ -106,14 +98,12 @@ export class ButtonComponent {
|
|
|
106
98
|
"tags": [],
|
|
107
99
|
"text": "The button variant. If not specified, the button will be the secondary variant."
|
|
108
100
|
},
|
|
109
|
-
"
|
|
110
|
-
"setter": false,
|
|
101
|
+
"attribute": "variant",
|
|
111
102
|
"reflect": false,
|
|
112
103
|
"defaultValue": "'secondary'"
|
|
113
104
|
},
|
|
114
105
|
"type": {
|
|
115
106
|
"type": "string",
|
|
116
|
-
"attribute": "type",
|
|
117
107
|
"mutable": false,
|
|
118
108
|
"complexType": {
|
|
119
109
|
"original": "'button' | 'submit' | 'reset'",
|
|
@@ -126,14 +116,12 @@ export class ButtonComponent {
|
|
|
126
116
|
"tags": [],
|
|
127
117
|
"text": "The button type. Matches native HTML types. The default type is 'button'."
|
|
128
118
|
},
|
|
129
|
-
"
|
|
130
|
-
"setter": false,
|
|
119
|
+
"attribute": "type",
|
|
131
120
|
"reflect": false,
|
|
132
121
|
"defaultValue": "'button'"
|
|
133
122
|
},
|
|
134
123
|
"size": {
|
|
135
124
|
"type": "string",
|
|
136
|
-
"attribute": "size",
|
|
137
125
|
"mutable": false,
|
|
138
126
|
"complexType": {
|
|
139
127
|
"original": "'100' | '50'",
|
|
@@ -146,14 +134,12 @@ export class ButtonComponent {
|
|
|
146
134
|
"tags": [],
|
|
147
135
|
"text": "The size of the button, 100 is the default state"
|
|
148
136
|
},
|
|
149
|
-
"
|
|
150
|
-
"setter": false,
|
|
137
|
+
"attribute": "size",
|
|
151
138
|
"reflect": false,
|
|
152
139
|
"defaultValue": "'100'"
|
|
153
140
|
},
|
|
154
141
|
"width": {
|
|
155
142
|
"type": "string",
|
|
156
|
-
"attribute": "width",
|
|
157
143
|
"mutable": false,
|
|
158
144
|
"complexType": {
|
|
159
145
|
"original": "'fit-content' | 'fit-container' | 'custom'",
|
|
@@ -166,14 +152,12 @@ export class ButtonComponent {
|
|
|
166
152
|
"tags": [],
|
|
167
153
|
"text": "The width of the button. Per default, it will fit the content"
|
|
168
154
|
},
|
|
169
|
-
"
|
|
170
|
-
"setter": false,
|
|
155
|
+
"attribute": "width",
|
|
171
156
|
"reflect": false,
|
|
172
157
|
"defaultValue": "'fit-content'"
|
|
173
158
|
},
|
|
174
159
|
"disabled": {
|
|
175
160
|
"type": "boolean",
|
|
176
|
-
"attribute": "disabled",
|
|
177
161
|
"mutable": false,
|
|
178
162
|
"complexType": {
|
|
179
163
|
"original": "boolean",
|
|
@@ -186,14 +170,12 @@ export class ButtonComponent {
|
|
|
186
170
|
"tags": [],
|
|
187
171
|
"text": "Whether the button is disabled."
|
|
188
172
|
},
|
|
189
|
-
"
|
|
190
|
-
"setter": false,
|
|
173
|
+
"attribute": "disabled",
|
|
191
174
|
"reflect": true,
|
|
192
175
|
"defaultValue": "false"
|
|
193
176
|
},
|
|
194
177
|
"loading": {
|
|
195
178
|
"type": "boolean",
|
|
196
|
-
"attribute": "loading",
|
|
197
179
|
"mutable": false,
|
|
198
180
|
"complexType": {
|
|
199
181
|
"original": "boolean",
|
|
@@ -206,14 +188,12 @@ export class ButtonComponent {
|
|
|
206
188
|
"tags": [],
|
|
207
189
|
"text": "Whether the button is currently loading. Set to true to hide text and display loading spinner instead"
|
|
208
190
|
},
|
|
209
|
-
"
|
|
210
|
-
"setter": false,
|
|
191
|
+
"attribute": "loading",
|
|
211
192
|
"reflect": false,
|
|
212
193
|
"defaultValue": "false"
|
|
213
194
|
},
|
|
214
195
|
"active": {
|
|
215
196
|
"type": "boolean",
|
|
216
|
-
"attribute": "active",
|
|
217
197
|
"mutable": false,
|
|
218
198
|
"complexType": {
|
|
219
199
|
"original": "boolean",
|
|
@@ -226,14 +206,12 @@ export class ButtonComponent {
|
|
|
226
206
|
"tags": [],
|
|
227
207
|
"text": "Whether the button is currently active. Set to true when using the button to signify a permanent active state"
|
|
228
208
|
},
|
|
229
|
-
"
|
|
230
|
-
"setter": false,
|
|
209
|
+
"attribute": "active",
|
|
231
210
|
"reflect": true,
|
|
232
211
|
"defaultValue": "false"
|
|
233
212
|
},
|
|
234
213
|
"href": {
|
|
235
214
|
"type": "string",
|
|
236
|
-
"attribute": "href",
|
|
237
215
|
"mutable": false,
|
|
238
216
|
"complexType": {
|
|
239
217
|
"original": "string",
|
|
@@ -246,13 +224,11 @@ export class ButtonComponent {
|
|
|
246
224
|
"tags": [],
|
|
247
225
|
"text": "An optional anchor. If specified, the button will render an anchor element that can be use for navigation or download files"
|
|
248
226
|
},
|
|
249
|
-
"
|
|
250
|
-
"setter": false,
|
|
227
|
+
"attribute": "href",
|
|
251
228
|
"reflect": false
|
|
252
229
|
},
|
|
253
230
|
"target": {
|
|
254
231
|
"type": "string",
|
|
255
|
-
"attribute": "target",
|
|
256
232
|
"mutable": false,
|
|
257
233
|
"complexType": {
|
|
258
234
|
"original": "'self' | 'blank'",
|
|
@@ -265,14 +241,12 @@ export class ButtonComponent {
|
|
|
265
241
|
"tags": [],
|
|
266
242
|
"text": "The target of the button if it should behave like an anchor. Per default it is self."
|
|
267
243
|
},
|
|
268
|
-
"
|
|
269
|
-
"setter": false,
|
|
244
|
+
"attribute": "target",
|
|
270
245
|
"reflect": false,
|
|
271
246
|
"defaultValue": "'self'"
|
|
272
247
|
},
|
|
273
248
|
"download": {
|
|
274
249
|
"type": "string",
|
|
275
|
-
"attribute": "download",
|
|
276
250
|
"mutable": false,
|
|
277
251
|
"complexType": {
|
|
278
252
|
"original": "string",
|
|
@@ -285,13 +259,11 @@ export class ButtonComponent {
|
|
|
285
259
|
"tags": [],
|
|
286
260
|
"text": "If set to true, the browser will attempt to donwload and save the URL instead of opening it. The name of the created file\ndefaults to the URL string, but can be changed by the user."
|
|
287
261
|
},
|
|
288
|
-
"
|
|
289
|
-
"setter": false,
|
|
262
|
+
"attribute": "download",
|
|
290
263
|
"reflect": false
|
|
291
264
|
},
|
|
292
265
|
"groupDisabled": {
|
|
293
266
|
"type": "boolean",
|
|
294
|
-
"attribute": "group-disabled",
|
|
295
267
|
"mutable": false,
|
|
296
268
|
"complexType": {
|
|
297
269
|
"original": "boolean",
|
|
@@ -307,8 +279,7 @@ export class ButtonComponent {
|
|
|
307
279
|
}],
|
|
308
280
|
"text": ""
|
|
309
281
|
},
|
|
310
|
-
"
|
|
311
|
-
"setter": false,
|
|
282
|
+
"attribute": "group-disabled",
|
|
312
283
|
"reflect": false,
|
|
313
284
|
"defaultValue": "false"
|
|
314
285
|
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('B2B-Card', () => {
|
|
3
|
+
let page;
|
|
4
|
+
it('should render the card component', async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<b2b-card>Hello World</b2b-card>`);
|
|
7
|
+
const element = await page.find('b2b-card');
|
|
8
|
+
expect(element).not.toBeNull();
|
|
9
|
+
});
|
|
10
|
+
it('should display content', async () => {
|
|
11
|
+
page = await newE2EPage();
|
|
12
|
+
await page.setContent(`<b2b-card>Hello World</b2b-card>`);
|
|
13
|
+
const element = await page.find('b2b-card');
|
|
14
|
+
expect(element).toEqualText('Hello World');
|
|
15
|
+
});
|
|
16
|
+
it('should disable the card', async () => {
|
|
17
|
+
page = await newE2EPage();
|
|
18
|
+
await page.setContent(`<b2b-card disabled="true">Hello World</b2b-card>`);
|
|
19
|
+
const element = await page.find('b2b-card');
|
|
20
|
+
const style = await element.getComputedStyle();
|
|
21
|
+
expect(style.pointerEvents).toBe('none');
|
|
22
|
+
expect(style.color).toBe('rgb(119, 119, 119)');
|
|
23
|
+
});
|
|
24
|
+
it('should pop up when hovered', async () => {
|
|
25
|
+
page = await newE2EPage();
|
|
26
|
+
await page.setContent(`<b2b-card>Hello World</b2b-card>`);
|
|
27
|
+
const element = await page.find('b2b-card');
|
|
28
|
+
await element.hover();
|
|
29
|
+
await page.waitForChanges();
|
|
30
|
+
await new Promise(resolve => setTimeout(resolve, 400));
|
|
31
|
+
const style = await element.getComputedStyle();
|
|
32
|
+
expect(style.boxShadow).toBe('rgba(0, 0, 0, 0.15) 5px 5px 6px 0px');
|
|
33
|
+
});
|
|
34
|
+
it('should pop up when focused', async () => {
|
|
35
|
+
page = await newE2EPage();
|
|
36
|
+
await page.setContent(`<b2b-card>Hello World</b2b-card>`);
|
|
37
|
+
const element = await page.find('b2b-card');
|
|
38
|
+
await element.click();
|
|
39
|
+
await page.waitForChanges();
|
|
40
|
+
await new Promise(resolve => setTimeout(resolve, 400));
|
|
41
|
+
const style = await element.getComputedStyle();
|
|
42
|
+
expect(style.boxShadow).toBe('rgba(0, 0, 0, 0.15) 5px 5px 6px 0px');
|
|
43
|
+
});
|
|
44
|
+
it('should not pop up when hovered on disabled card', async () => {
|
|
45
|
+
page = await newE2EPage();
|
|
46
|
+
await page.setContent(`<b2b-card disabled="true">Hello World</b2b-card>`);
|
|
47
|
+
const element = await page.find('b2b-card');
|
|
48
|
+
await element.hover();
|
|
49
|
+
await page.waitForChanges();
|
|
50
|
+
const style = await element.getComputedStyle();
|
|
51
|
+
expect(style.boxShadow).toBe('rgba(0, 0, 0, 0.15) 2px 2px 5px 0px');
|
|
52
|
+
});
|
|
53
|
+
it('should emit on click', async () => {
|
|
54
|
+
page = await newE2EPage();
|
|
55
|
+
await page.setContent(`<b2b-card>Hello World</b2b-card>`);
|
|
56
|
+
const element = await page.find('b2b-card');
|
|
57
|
+
const clickSpy = await page.spyOnEvent('b2b-selected');
|
|
58
|
+
await element.click();
|
|
59
|
+
await page.waitForChanges();
|
|
60
|
+
expect(clickSpy).toHaveReceivedEvent();
|
|
61
|
+
});
|
|
62
|
+
it('should emit on enter press', async () => {
|
|
63
|
+
page = await newE2EPage();
|
|
64
|
+
await page.setContent(`<b2b-card>Hello World</b2b-card>`);
|
|
65
|
+
const clickSpy = await page.spyOnEvent('b2b-selected');
|
|
66
|
+
await page.keyboard.press('Tab');
|
|
67
|
+
await page.keyboard.press('Enter');
|
|
68
|
+
await page.waitForChanges();
|
|
69
|
+
expect(clickSpy).toHaveReceivedEvent();
|
|
70
|
+
});
|
|
71
|
+
it('should not emit when disabled', async () => {
|
|
72
|
+
page = await newE2EPage();
|
|
73
|
+
await page.setContent(`<b2b-card disabled>Hello World</b2b-card>`);
|
|
74
|
+
const element = await page.find('b2b-card');
|
|
75
|
+
const clickSpy = await page.spyOnEvent('b2b-selected');
|
|
76
|
+
await page.keyboard.press('Tab');
|
|
77
|
+
await page.keyboard.press('Enter');
|
|
78
|
+
await element.click();
|
|
79
|
+
await page.waitForChanges();
|
|
80
|
+
expect(clickSpy).not.toHaveReceivedEvent();
|
|
81
|
+
});
|
|
82
|
+
// it seems we cannot redirect within the context of stencil's e2e testing library
|
|
83
|
+
it('should redirect when a href is passed', async () => {
|
|
84
|
+
page = await newE2EPage();
|
|
85
|
+
const link = 'https://www.otto.de/';
|
|
86
|
+
await page.setContent(`<b2b-card href="${link}">Hello World</b2b-card>`);
|
|
87
|
+
const element = await page.find('b2b-card >>> a');
|
|
88
|
+
const href = await element.getProperty('href');
|
|
89
|
+
expect(href).toEqualText(link);
|
|
90
|
+
});
|
|
91
|
+
it('should focus on next card when navigating with keyboard and first card has a href value', async () => {
|
|
92
|
+
page = await newE2EPage();
|
|
93
|
+
await page.setContent(`<div>
|
|
94
|
+
<b2b-card id='card1' href="www.something.com"></b2b-card>
|
|
95
|
+
<b2b-card id='card2'>Hello World</b2b-card>
|
|
96
|
+
</div>`);
|
|
97
|
+
await page.keyboard.press('Tab');
|
|
98
|
+
await page.waitForChanges();
|
|
99
|
+
let activeElId = await page.evaluate(() => {
|
|
100
|
+
return document.activeElement.id;
|
|
101
|
+
});
|
|
102
|
+
expect(activeElId).toEqualText('card1');
|
|
103
|
+
await page.keyboard.press('Tab');
|
|
104
|
+
await page.waitForChanges();
|
|
105
|
+
activeElId = await page.evaluate(() => {
|
|
106
|
+
return document.activeElement.id;
|
|
107
|
+
});
|
|
108
|
+
expect(activeElId).toEqualText('card2');
|
|
109
|
+
});
|
|
110
|
+
});
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
export class CardComponent {
|
|
3
3
|
constructor() {
|
|
4
|
-
/** Disables the card. Per default, it is false */
|
|
5
4
|
this.disabled = false;
|
|
6
|
-
/** An optional href in case the card is used to redirect on click. */
|
|
7
5
|
this.href = '';
|
|
8
|
-
/** The target of the card if used with an href. Blank per default. */
|
|
9
6
|
this.target = 'blank';
|
|
10
7
|
}
|
|
11
8
|
onClick() {
|
|
@@ -29,10 +26,10 @@ export class CardComponent {
|
|
|
29
26
|
return 0;
|
|
30
27
|
}
|
|
31
28
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'f9fd7890d85a2c69fb416cacd1038a3e50ba8ce2', tabIndex: this.getTabIndex(), "aria-disabled": this.disabled ? 'true' : null, class: {
|
|
33
30
|
'b2b-card': true,
|
|
34
31
|
'b2b-card--disabled': this.disabled,
|
|
35
|
-
} }, this.href != '' && h("a", {
|
|
32
|
+
} }, this.href != '' && h("a", { href: this.href, target: `_${this.target}` }), this.disabled && h("div", { class: "b2b-card--disabled-overlay" }), h("slot", { key: '1258394d2cf138a0625c70af043d4590a45262db' })));
|
|
36
33
|
}
|
|
37
34
|
static get is() { return "b2b-card"; }
|
|
38
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -50,7 +47,6 @@ export class CardComponent {
|
|
|
50
47
|
return {
|
|
51
48
|
"disabled": {
|
|
52
49
|
"type": "boolean",
|
|
53
|
-
"attribute": "disabled",
|
|
54
50
|
"mutable": false,
|
|
55
51
|
"complexType": {
|
|
56
52
|
"original": "boolean",
|
|
@@ -63,14 +59,12 @@ export class CardComponent {
|
|
|
63
59
|
"tags": [],
|
|
64
60
|
"text": "Disables the card. Per default, it is false"
|
|
65
61
|
},
|
|
66
|
-
"
|
|
67
|
-
"setter": false,
|
|
62
|
+
"attribute": "disabled",
|
|
68
63
|
"reflect": false,
|
|
69
64
|
"defaultValue": "false"
|
|
70
65
|
},
|
|
71
66
|
"href": {
|
|
72
67
|
"type": "string",
|
|
73
|
-
"attribute": "href",
|
|
74
68
|
"mutable": false,
|
|
75
69
|
"complexType": {
|
|
76
70
|
"original": "string",
|
|
@@ -83,14 +77,12 @@ export class CardComponent {
|
|
|
83
77
|
"tags": [],
|
|
84
78
|
"text": "An optional href in case the card is used to redirect on click."
|
|
85
79
|
},
|
|
86
|
-
"
|
|
87
|
-
"setter": false,
|
|
80
|
+
"attribute": "href",
|
|
88
81
|
"reflect": false,
|
|
89
82
|
"defaultValue": "''"
|
|
90
83
|
},
|
|
91
84
|
"target": {
|
|
92
85
|
"type": "string",
|
|
93
|
-
"attribute": "target",
|
|
94
86
|
"mutable": false,
|
|
95
87
|
"complexType": {
|
|
96
88
|
"original": "'blank' | 'self'",
|
|
@@ -103,8 +95,7 @@ export class CardComponent {
|
|
|
103
95
|
"tags": [],
|
|
104
96
|
"text": "The target of the card if used with an href. Blank per default."
|
|
105
97
|
},
|
|
106
|
-
"
|
|
107
|
-
"setter": false,
|
|
98
|
+
"attribute": "target",
|
|
108
99
|
"reflect": false,
|
|
109
100
|
"defaultValue": "'blank'"
|
|
110
101
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
|
+
import { CardComponent } from "./card";
|
|
4
|
+
it('should render the card with default values', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [CardComponent],
|
|
7
|
+
template: () => h("b2b-card", null, "B2B Card"),
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toEqualHtml(`
|
|
10
|
+
<b2b-card class="b2b-card" tabindex="0">
|
|
11
|
+
<mock:shadow-root>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</mock:shadow-root>
|
|
14
|
+
B2B Card
|
|
15
|
+
</b2b-card>
|
|
16
|
+
`);
|
|
17
|
+
});
|
|
18
|
+
it('should disable the card', async () => {
|
|
19
|
+
const page = await newSpecPage({
|
|
20
|
+
components: [CardComponent],
|
|
21
|
+
template: () => h("b2b-card", { disabled: true }, "B2B Card"),
|
|
22
|
+
});
|
|
23
|
+
expect(page.root).toEqualHtml(`
|
|
24
|
+
<b2b-card tabindex="-1" aria-disabled="true" class="b2b-card b2b-card--disabled">
|
|
25
|
+
<mock:shadow-root>
|
|
26
|
+
<div class="b2b-card--disabled-overlay"></div>
|
|
27
|
+
<slot></slot>
|
|
28
|
+
</mock:shadow-root>
|
|
29
|
+
B2B Card
|
|
30
|
+
</b2b-card>
|
|
31
|
+
`);
|
|
32
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('b2b-checkbox', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<b2b-checkbox label="test"></b2b-checkbox>');
|
|
6
|
+
const element = await page.find('b2b-checkbox');
|
|
7
|
+
expect(element).toBeDefined();
|
|
8
|
+
expect(element).not.toHaveAttribute('checked');
|
|
9
|
+
});
|
|
10
|
+
it('can be checked', async () => {
|
|
11
|
+
const page = await newE2EPage();
|
|
12
|
+
await page.setContent('<b2b-checkbox label="test"></b2b-checkbox>');
|
|
13
|
+
const container = await page.find('b2b-checkbox');
|
|
14
|
+
let element = await page.find('b2b-checkbox >>> .b2b-checkbox');
|
|
15
|
+
expect(element).not.toHaveClass('b2b-checkbox--checked');
|
|
16
|
+
await container.click();
|
|
17
|
+
await page.waitForChanges();
|
|
18
|
+
element = await page.find('b2b-checkbox >>> .b2b-checkbox');
|
|
19
|
+
expect(element).toHaveClass('b2b-checkbox--checked');
|
|
20
|
+
});
|
|
21
|
+
it('can be indeterminate and will change to checked once clicked', async () => {
|
|
22
|
+
const page = await newE2EPage();
|
|
23
|
+
await page.setContent('<b2b-checkbox label="test" indeterminate></b2b-checkbox>');
|
|
24
|
+
const container = await page.find('b2b-checkbox');
|
|
25
|
+
let element = await page.find('b2b-checkbox >>> .b2b-checkbox');
|
|
26
|
+
expect(element).toHaveClass('b2b-checkbox--indeterminate');
|
|
27
|
+
await container.click();
|
|
28
|
+
await page.waitForChanges();
|
|
29
|
+
element = await page.find('b2b-checkbox >>> .b2b-checkbox');
|
|
30
|
+
expect(element).toHaveClass('b2b-checkbox--checked');
|
|
31
|
+
});
|
|
32
|
+
it('use label slot if provided', async () => {
|
|
33
|
+
const page = await newE2EPage();
|
|
34
|
+
await page.setContent('<b2b-checkbox><span slot="label">Custom label</span></b2b-checkbox>');
|
|
35
|
+
const element = await page.find('span');
|
|
36
|
+
expect(element).toEqualText('Custom label');
|
|
37
|
+
});
|
|
38
|
+
});
|