@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
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class InputLabelComponent {
|
|
3
3
|
constructor() {
|
|
4
|
-
/** Adds an asterisk at the end of the label to signify that the field is required. */
|
|
5
4
|
this.required = false;
|
|
6
|
-
/** Will render the label with a disabled style. The default value is false. */
|
|
7
5
|
this.disabled = false;
|
|
8
6
|
}
|
|
9
7
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: 'd65e36229d0da25028f11d3a09882824d34ef5ad' }, h("label", { key: 'd41e79b91dc83d081948c37a1f9a362e5eafd2ff', class: {
|
|
11
9
|
'b2b-input-label': true,
|
|
12
10
|
'b2b-input-label--required': this.required,
|
|
13
11
|
'b2b-input-label--disabled': this.disabled,
|
|
14
|
-
} }, h("slot", { key: '
|
|
12
|
+
} }, h("slot", { key: '5615f825313d29875390bcc1feadac5cb642bc8a' }))));
|
|
15
13
|
}
|
|
16
14
|
static get is() { return "b2b-input-label"; }
|
|
17
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -29,7 +27,6 @@ export class InputLabelComponent {
|
|
|
29
27
|
return {
|
|
30
28
|
"required": {
|
|
31
29
|
"type": "boolean",
|
|
32
|
-
"attribute": "required",
|
|
33
30
|
"mutable": false,
|
|
34
31
|
"complexType": {
|
|
35
32
|
"original": "boolean",
|
|
@@ -42,14 +39,12 @@ export class InputLabelComponent {
|
|
|
42
39
|
"tags": [],
|
|
43
40
|
"text": "Adds an asterisk at the end of the label to signify that the field is required."
|
|
44
41
|
},
|
|
45
|
-
"
|
|
46
|
-
"setter": false,
|
|
42
|
+
"attribute": "required",
|
|
47
43
|
"reflect": false,
|
|
48
44
|
"defaultValue": "false"
|
|
49
45
|
},
|
|
50
46
|
"disabled": {
|
|
51
47
|
"type": "boolean",
|
|
52
|
-
"attribute": "disabled",
|
|
53
48
|
"mutable": false,
|
|
54
49
|
"complexType": {
|
|
55
50
|
"original": "boolean",
|
|
@@ -62,8 +57,7 @@ export class InputLabelComponent {
|
|
|
62
57
|
"tags": [],
|
|
63
58
|
"text": "Will render the label with a disabled style. The default value is false."
|
|
64
59
|
},
|
|
65
|
-
"
|
|
66
|
-
"setter": false,
|
|
60
|
+
"attribute": "disabled",
|
|
67
61
|
"reflect": false,
|
|
68
62
|
"defaultValue": "false"
|
|
69
63
|
}
|
|
@@ -4,6 +4,7 @@ export class InputListOptionComponent {
|
|
|
4
4
|
this.handleClick = () => {
|
|
5
5
|
this.b2bOptionSelected.emit({ selectedOption: this.option });
|
|
6
6
|
};
|
|
7
|
+
this.option = undefined;
|
|
7
8
|
}
|
|
8
9
|
handleKeyDown(event) {
|
|
9
10
|
if (event.key === 'Enter') {
|
|
@@ -11,7 +12,7 @@ export class InputListOptionComponent {
|
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'a08b2363f67ea513b438d8a0c7b3addb7af5155a', class: "b2b-input-list__option", onClick: this.handleClick, role: "option" }, this.option));
|
|
15
16
|
}
|
|
16
17
|
static get is() { return "b2b-input-list-option"; }
|
|
17
18
|
static get originalStyleUrls() {
|
|
@@ -28,7 +29,6 @@ export class InputListOptionComponent {
|
|
|
28
29
|
return {
|
|
29
30
|
"option": {
|
|
30
31
|
"type": "string",
|
|
31
|
-
"attribute": "option",
|
|
32
32
|
"mutable": false,
|
|
33
33
|
"complexType": {
|
|
34
34
|
"original": "string",
|
|
@@ -41,8 +41,7 @@ export class InputListOptionComponent {
|
|
|
41
41
|
"tags": [],
|
|
42
42
|
"text": "The option name."
|
|
43
43
|
},
|
|
44
|
-
"
|
|
45
|
-
"setter": false,
|
|
44
|
+
"attribute": "option",
|
|
46
45
|
"reflect": false
|
|
47
46
|
}
|
|
48
47
|
};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('B2B-InputList', () => {
|
|
3
|
+
let page;
|
|
4
|
+
const optionsList = ['option1', 'option2', 'option3'];
|
|
5
|
+
const setOptionsList = async () => {
|
|
6
|
+
const search = await page.find('b2b-input-list');
|
|
7
|
+
search.setProperty('optionsList', optionsList);
|
|
8
|
+
await page.waitForChanges();
|
|
9
|
+
};
|
|
10
|
+
const typeInput = async (key = '8') => {
|
|
11
|
+
let input = await page.find('b2b-input-list >>> b2b-input');
|
|
12
|
+
// focus on input element, focus method did not work
|
|
13
|
+
await input.click();
|
|
14
|
+
await input.press(key);
|
|
15
|
+
await page.waitForChanges();
|
|
16
|
+
};
|
|
17
|
+
beforeEach(async () => {
|
|
18
|
+
page = await newE2EPage();
|
|
19
|
+
await page.setContent(`
|
|
20
|
+
<b2b-input-list placeholder='some text'></b2b-input-list>
|
|
21
|
+
`);
|
|
22
|
+
});
|
|
23
|
+
it('should register input text when enabled', async () => {
|
|
24
|
+
const inputList = await page.find('b2b-input-list');
|
|
25
|
+
await typeInput('8');
|
|
26
|
+
let inputValue = inputList.getAttribute('value');
|
|
27
|
+
expect(inputValue).toBe('8');
|
|
28
|
+
});
|
|
29
|
+
it('should not receive input text when disabled & should not show close icon', async () => {
|
|
30
|
+
const inputList = await page.find('b2b-input-list');
|
|
31
|
+
inputList.setAttribute('disabled', true);
|
|
32
|
+
await page.waitForChanges();
|
|
33
|
+
await typeInput();
|
|
34
|
+
let inputValue = inputList.getAttribute('value');
|
|
35
|
+
expect(inputValue).toBe(null);
|
|
36
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon-100');
|
|
37
|
+
expect(closeIcon).toBeNull();
|
|
38
|
+
});
|
|
39
|
+
it('should not not show close icon when input list has text and is disabled', async () => {
|
|
40
|
+
await typeInput('b');
|
|
41
|
+
await typeInput('2');
|
|
42
|
+
await typeInput('b');
|
|
43
|
+
const inputList = await page.find('b2b-input-list');
|
|
44
|
+
inputList.setAttribute('disabled', true);
|
|
45
|
+
await page.waitForChanges();
|
|
46
|
+
let inputValue = inputList.getAttribute('value');
|
|
47
|
+
expect(inputValue).toBe('b2b');
|
|
48
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon-100');
|
|
49
|
+
expect(closeIcon).toBeNull();
|
|
50
|
+
});
|
|
51
|
+
it('should not show search list when input is not focused', async () => {
|
|
52
|
+
await setOptionsList();
|
|
53
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
54
|
+
expect(searchListResults).toBeNull();
|
|
55
|
+
});
|
|
56
|
+
it('should not show search list when no list is provided', async () => {
|
|
57
|
+
const input = await page.find('b2b-input-list >>> b2b-input');
|
|
58
|
+
await input.click();
|
|
59
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
60
|
+
expect(searchListResults).toBeNull();
|
|
61
|
+
});
|
|
62
|
+
it('should not show search list when the input has no value', async () => {
|
|
63
|
+
await setOptionsList();
|
|
64
|
+
const input = await page.find('b2b-input-list');
|
|
65
|
+
// focus on input element, focus method did not work
|
|
66
|
+
await input.click();
|
|
67
|
+
await input.press('8');
|
|
68
|
+
await page.waitForChanges();
|
|
69
|
+
let searchListResults = await page.find({ text: optionsList[0] });
|
|
70
|
+
expect(await searchListResults.isVisible()).toBe(true);
|
|
71
|
+
await input.click();
|
|
72
|
+
await input.press('Backspace');
|
|
73
|
+
await page.waitForChanges();
|
|
74
|
+
searchListResults = await page.find({ text: optionsList[0] });
|
|
75
|
+
expect(searchListResults).toBeNull();
|
|
76
|
+
});
|
|
77
|
+
it('should show search list when input is focused, the input has value and list is provided in props', async () => {
|
|
78
|
+
await setOptionsList();
|
|
79
|
+
await typeInput();
|
|
80
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
81
|
+
expect(await searchListResults.isVisible()).toBe(true);
|
|
82
|
+
});
|
|
83
|
+
it('should emit selected option when it is selected', async () => {
|
|
84
|
+
const optionSelectedEventSpy = await page.spyOnEvent('b2b-option-selected');
|
|
85
|
+
await setOptionsList();
|
|
86
|
+
await typeInput();
|
|
87
|
+
// Click first option on the list
|
|
88
|
+
const option = await page.find({ text: optionsList[0] });
|
|
89
|
+
// focus on input element, focus method did not work
|
|
90
|
+
await option.click();
|
|
91
|
+
expect(optionSelectedEventSpy).toHaveReceivedEvent();
|
|
92
|
+
expect(optionSelectedEventSpy).toHaveReceivedEventDetail({
|
|
93
|
+
selectedOption: optionsList[0],
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
it('should hide results when one option is selected', async () => {
|
|
97
|
+
await setOptionsList();
|
|
98
|
+
await typeInput();
|
|
99
|
+
// Click first option on the list
|
|
100
|
+
const option = await page.find({ text: optionsList[0] });
|
|
101
|
+
expect(await option.isVisible()).toBe(true);
|
|
102
|
+
await option.click();
|
|
103
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
104
|
+
expect(searchListResults).toBeNull();
|
|
105
|
+
});
|
|
106
|
+
it('should fill up input value with option selected', async () => {
|
|
107
|
+
await setOptionsList();
|
|
108
|
+
await typeInput('8');
|
|
109
|
+
const input = await page.find('b2b-input-list >>> b2b-input');
|
|
110
|
+
let inputValue = await input.getProperty('value');
|
|
111
|
+
expect(inputValue).toBe('8');
|
|
112
|
+
// Click first option on the list
|
|
113
|
+
const option = await page.find({ text: optionsList[0] });
|
|
114
|
+
await option.click();
|
|
115
|
+
inputValue = await input.getProperty('value');
|
|
116
|
+
expect(inputValue).toBe(optionsList[0]);
|
|
117
|
+
});
|
|
118
|
+
it('should navigate with the arrow keys', async () => {
|
|
119
|
+
await setOptionsList();
|
|
120
|
+
await typeInput();
|
|
121
|
+
await page.keyboard.press('ArrowDown');
|
|
122
|
+
page.waitForChanges();
|
|
123
|
+
await page.keyboard.press('ArrowDown');
|
|
124
|
+
page.waitForChanges();
|
|
125
|
+
const firstActiveEl = await page.evaluate(() => {
|
|
126
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
127
|
+
});
|
|
128
|
+
expect(firstActiveEl).toEqualText('option2');
|
|
129
|
+
await page.keyboard.press('ArrowUp');
|
|
130
|
+
page.waitForChanges();
|
|
131
|
+
const activeEl = await page.evaluate(() => {
|
|
132
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
133
|
+
});
|
|
134
|
+
expect(activeEl).toEqualText('option1');
|
|
135
|
+
});
|
|
136
|
+
it('should navigate to the first option if the home key is pressed', async () => {
|
|
137
|
+
await setOptionsList();
|
|
138
|
+
await typeInput();
|
|
139
|
+
await page.keyboard.press('ArrowDown');
|
|
140
|
+
page.waitForChanges();
|
|
141
|
+
await page.keyboard.press('ArrowDown');
|
|
142
|
+
page.waitForChanges();
|
|
143
|
+
const firstActiveEl = await page.evaluate(() => {
|
|
144
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
145
|
+
});
|
|
146
|
+
expect(firstActiveEl).toEqualText('option2');
|
|
147
|
+
await page.keyboard.press('Home');
|
|
148
|
+
page.waitForChanges();
|
|
149
|
+
const activeEl = await page.evaluate(() => {
|
|
150
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
151
|
+
});
|
|
152
|
+
expect(activeEl).toEqualText('option1');
|
|
153
|
+
});
|
|
154
|
+
it('should navigate to the last option if the end key is pressed', async () => {
|
|
155
|
+
await setOptionsList();
|
|
156
|
+
await typeInput();
|
|
157
|
+
await page.keyboard.press('ArrowDown');
|
|
158
|
+
await page.waitForChanges();
|
|
159
|
+
const firstActiveEl = await page.evaluate(() => {
|
|
160
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
161
|
+
});
|
|
162
|
+
expect(firstActiveEl).toEqualText('option1');
|
|
163
|
+
await page.keyboard.press('End');
|
|
164
|
+
await page.waitForChanges();
|
|
165
|
+
const activeEl = await page.evaluate(() => {
|
|
166
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
167
|
+
});
|
|
168
|
+
expect(activeEl).toEqualText('option3');
|
|
169
|
+
});
|
|
170
|
+
it('should not navigate with any other key than up, down, end or home', async () => {
|
|
171
|
+
await setOptionsList();
|
|
172
|
+
await typeInput();
|
|
173
|
+
await page.keyboard.press('A');
|
|
174
|
+
await page.waitForChanges();
|
|
175
|
+
const firstActiveEl = await page.evaluate(() => {
|
|
176
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
177
|
+
});
|
|
178
|
+
expect(firstActiveEl).not.toEqualText('option1');
|
|
179
|
+
});
|
|
180
|
+
it('should not navigate when the input is not visible', async () => {
|
|
181
|
+
await setOptionsList();
|
|
182
|
+
await page.waitForChanges();
|
|
183
|
+
await page.keyboard.press('ArrowDown');
|
|
184
|
+
await page.waitForChanges();
|
|
185
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
186
|
+
expect(searchListResults).toBeNull();
|
|
187
|
+
});
|
|
188
|
+
it('should emit an option when it is focused and the enter key is pressed', async () => {
|
|
189
|
+
const optionSelectedEventSpy = await page.spyOnEvent('b2b-option-selected');
|
|
190
|
+
await setOptionsList();
|
|
191
|
+
await typeInput();
|
|
192
|
+
await page.keyboard.press('ArrowDown');
|
|
193
|
+
await page.waitForChanges();
|
|
194
|
+
await page.keyboard.press('Enter');
|
|
195
|
+
await page.waitForChanges();
|
|
196
|
+
expect(optionSelectedEventSpy).toHaveReceivedEvent();
|
|
197
|
+
expect(optionSelectedEventSpy).toHaveReceivedEventDetail({
|
|
198
|
+
selectedOption: optionsList[0],
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
it('should close the input list when the escape key is pressed', async () => {
|
|
202
|
+
await setOptionsList();
|
|
203
|
+
await typeInput();
|
|
204
|
+
await page.keyboard.press('ArrowDown');
|
|
205
|
+
await page.keyboard.press('Escape');
|
|
206
|
+
await page.waitForChanges();
|
|
207
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
208
|
+
expect(searchListResults).toBeNull();
|
|
209
|
+
});
|
|
210
|
+
it('should show the close icon when the input has text', async () => {
|
|
211
|
+
await setOptionsList();
|
|
212
|
+
await typeInput();
|
|
213
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon-100');
|
|
214
|
+
expect(closeIcon).not.toBeNull();
|
|
215
|
+
});
|
|
216
|
+
it('should not show the close icon if the input is empty', async () => {
|
|
217
|
+
await setOptionsList();
|
|
218
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon-100');
|
|
219
|
+
expect(closeIcon).toBeNull();
|
|
220
|
+
});
|
|
221
|
+
it('should clear the input when the clear icon is clicked', async () => {
|
|
222
|
+
await setOptionsList();
|
|
223
|
+
await typeInput('8');
|
|
224
|
+
let input = await page.find('b2b-input-list >>> b2b-input');
|
|
225
|
+
let inputValue = await input.getAttribute('value');
|
|
226
|
+
expect(inputValue).toBe('8');
|
|
227
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon-100');
|
|
228
|
+
closeIcon.click();
|
|
229
|
+
await page.waitForChanges();
|
|
230
|
+
inputValue = await input.getAttribute('value');
|
|
231
|
+
expect(inputValue).toBe('');
|
|
232
|
+
});
|
|
233
|
+
it('should emit clear event when the clear icon is clicked', async () => {
|
|
234
|
+
const onInputEventSpy = await page.spyOnEvent('b2b-clear');
|
|
235
|
+
await typeInput();
|
|
236
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon-100');
|
|
237
|
+
closeIcon.click();
|
|
238
|
+
await page.waitForChanges();
|
|
239
|
+
expect(onInputEventSpy).toHaveReceivedEvent();
|
|
240
|
+
});
|
|
241
|
+
});
|
|
@@ -8,19 +8,6 @@ const keys = {
|
|
|
8
8
|
};
|
|
9
9
|
export class InputListComponent {
|
|
10
10
|
constructor() {
|
|
11
|
-
/** Adds an asterisk at the end of the label to signify that the field is required. */
|
|
12
|
-
this.required = false;
|
|
13
|
-
/** The list of options passed into the search dropdown. Can be static or dynamic, i.e. updated when the b2b-search or b2b-input emitters fire. */
|
|
14
|
-
this.optionsList = [];
|
|
15
|
-
/** The default value of the input field. If defined, it will prefill the input. */
|
|
16
|
-
this.value = null;
|
|
17
|
-
/** Whether or not the input is disabled. Default is false. */
|
|
18
|
-
this.disabled = false;
|
|
19
|
-
/** @internal Whether the parent input group is disabled. Per default, it is false. */
|
|
20
|
-
this.groupDisabled = false;
|
|
21
|
-
// @State() value: string = '';
|
|
22
|
-
this.hasOptionList = this.optionsList.length > 0;
|
|
23
|
-
this.isElementFocused = false;
|
|
24
11
|
this.onOptionSelected = event => {
|
|
25
12
|
this.setElementOnBlur();
|
|
26
13
|
this.value = event.detail.selectedOption;
|
|
@@ -86,6 +73,15 @@ export class InputListComponent {
|
|
|
86
73
|
await inputElement.clearInput();
|
|
87
74
|
}
|
|
88
75
|
};
|
|
76
|
+
this.label = undefined;
|
|
77
|
+
this.required = false;
|
|
78
|
+
this.placeholder = undefined;
|
|
79
|
+
this.optionsList = [];
|
|
80
|
+
this.value = null;
|
|
81
|
+
this.disabled = false;
|
|
82
|
+
this.groupDisabled = false;
|
|
83
|
+
this.hasOptionList = this.optionsList.length > 0;
|
|
84
|
+
this.isElementFocused = false;
|
|
89
85
|
}
|
|
90
86
|
handleKeyDown(event) {
|
|
91
87
|
/** we need to be informed when a user changes focus to the clear button
|
|
@@ -141,13 +137,13 @@ export class InputListComponent {
|
|
|
141
137
|
*/
|
|
142
138
|
render() {
|
|
143
139
|
const groupOrderClass = this.getGroupOrderClassName() || '';
|
|
144
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: '1c98a26046f943cbc2a8cfc75e518117d9b6d88c', onBlur: this.setElementOnBlur, onFocus: this.setElementOnFocus }, h("div", { key: '12546194e29a272ad58f8ba911621414f67fdbdd', class: {
|
|
145
141
|
'b2b-input-list': true,
|
|
146
142
|
'b2b-input-list__options-on': this.hasOptionList &&
|
|
147
143
|
this.isElementFocused &&
|
|
148
144
|
Boolean(this.value),
|
|
149
145
|
[groupOrderClass]: true,
|
|
150
|
-
} }, h("b2b-input", { key: '
|
|
146
|
+
} }, h("b2b-input", { key: '2670186f46694d0647b313c0533a569398494aaf', type: "text", label: this.label, value: this.value, disabled: this.disabled || this.groupDisabled, "onb2b-input": this.handleInput, placeholder: this.placeholder, required: this.required }, !(this.disabled || this.groupDisabled) && Boolean(this.value) && (h("b2b-icon-100", { icon: "b2b_icon-close", "aria-label": "reset", slot: "end", tabIndex: 0, onMouseDown: this.resetInput, onKeyDown: this.resetInput }))), this.isElementFocused && Boolean(this.value) ? (h("div", { class: "b2b-input-list__options-container" }, this.hasOptionList ? (h("div", { class: "b2b-input-list__options", role: "listbox" }, this.optionsList.map(option => (h("b2b-input-list-option", { option: option, tabIndex: -1, "onb2b-option-selected": this.onOptionSelected }))))) : (h("slot", null)))) : null)));
|
|
151
147
|
}
|
|
152
148
|
static get is() { return "b2b-input-list"; }
|
|
153
149
|
static get encapsulation() { return "shadow"; }
|
|
@@ -165,7 +161,6 @@ export class InputListComponent {
|
|
|
165
161
|
return {
|
|
166
162
|
"label": {
|
|
167
163
|
"type": "string",
|
|
168
|
-
"attribute": "label",
|
|
169
164
|
"mutable": false,
|
|
170
165
|
"complexType": {
|
|
171
166
|
"original": "string",
|
|
@@ -178,13 +173,11 @@ export class InputListComponent {
|
|
|
178
173
|
"tags": [],
|
|
179
174
|
"text": "The input label."
|
|
180
175
|
},
|
|
181
|
-
"
|
|
182
|
-
"setter": false,
|
|
176
|
+
"attribute": "label",
|
|
183
177
|
"reflect": false
|
|
184
178
|
},
|
|
185
179
|
"required": {
|
|
186
180
|
"type": "boolean",
|
|
187
|
-
"attribute": "required",
|
|
188
181
|
"mutable": false,
|
|
189
182
|
"complexType": {
|
|
190
183
|
"original": "boolean",
|
|
@@ -197,14 +190,12 @@ export class InputListComponent {
|
|
|
197
190
|
"tags": [],
|
|
198
191
|
"text": "Adds an asterisk at the end of the label to signify that the field is required."
|
|
199
192
|
},
|
|
200
|
-
"
|
|
201
|
-
"setter": false,
|
|
193
|
+
"attribute": "required",
|
|
202
194
|
"reflect": true,
|
|
203
195
|
"defaultValue": "false"
|
|
204
196
|
},
|
|
205
197
|
"placeholder": {
|
|
206
198
|
"type": "string",
|
|
207
|
-
"attribute": "placeholder",
|
|
208
199
|
"mutable": false,
|
|
209
200
|
"complexType": {
|
|
210
201
|
"original": "string",
|
|
@@ -217,13 +208,11 @@ export class InputListComponent {
|
|
|
217
208
|
"tags": [],
|
|
218
209
|
"text": "The placeholder shown in the input field."
|
|
219
210
|
},
|
|
220
|
-
"
|
|
221
|
-
"setter": false,
|
|
211
|
+
"attribute": "placeholder",
|
|
222
212
|
"reflect": true
|
|
223
213
|
},
|
|
224
214
|
"optionsList": {
|
|
225
215
|
"type": "unknown",
|
|
226
|
-
"attribute": "options-list",
|
|
227
216
|
"mutable": false,
|
|
228
217
|
"complexType": {
|
|
229
218
|
"original": "string[]",
|
|
@@ -236,13 +225,10 @@ export class InputListComponent {
|
|
|
236
225
|
"tags": [],
|
|
237
226
|
"text": "The list of options passed into the search dropdown. Can be static or dynamic, i.e. updated when the b2b-search or b2b-input emitters fire."
|
|
238
227
|
},
|
|
239
|
-
"getter": false,
|
|
240
|
-
"setter": false,
|
|
241
228
|
"defaultValue": "[]"
|
|
242
229
|
},
|
|
243
230
|
"value": {
|
|
244
231
|
"type": "string",
|
|
245
|
-
"attribute": "value",
|
|
246
232
|
"mutable": true,
|
|
247
233
|
"complexType": {
|
|
248
234
|
"original": "string",
|
|
@@ -255,14 +241,12 @@ export class InputListComponent {
|
|
|
255
241
|
"tags": [],
|
|
256
242
|
"text": "The default value of the input field. If defined, it will prefill the input."
|
|
257
243
|
},
|
|
258
|
-
"
|
|
259
|
-
"setter": false,
|
|
244
|
+
"attribute": "value",
|
|
260
245
|
"reflect": true,
|
|
261
246
|
"defaultValue": "null"
|
|
262
247
|
},
|
|
263
248
|
"disabled": {
|
|
264
249
|
"type": "boolean",
|
|
265
|
-
"attribute": "disabled",
|
|
266
250
|
"mutable": false,
|
|
267
251
|
"complexType": {
|
|
268
252
|
"original": "boolean",
|
|
@@ -275,14 +259,12 @@ export class InputListComponent {
|
|
|
275
259
|
"tags": [],
|
|
276
260
|
"text": "Whether or not the input is disabled. Default is false."
|
|
277
261
|
},
|
|
278
|
-
"
|
|
279
|
-
"setter": false,
|
|
262
|
+
"attribute": "disabled",
|
|
280
263
|
"reflect": true,
|
|
281
264
|
"defaultValue": "false"
|
|
282
265
|
},
|
|
283
266
|
"groupDisabled": {
|
|
284
267
|
"type": "boolean",
|
|
285
|
-
"attribute": "group-disabled",
|
|
286
268
|
"mutable": false,
|
|
287
269
|
"complexType": {
|
|
288
270
|
"original": "boolean",
|
|
@@ -298,8 +280,7 @@ export class InputListComponent {
|
|
|
298
280
|
}],
|
|
299
281
|
"text": ""
|
|
300
282
|
},
|
|
301
|
-
"
|
|
302
|
-
"setter": false,
|
|
283
|
+
"attribute": "group-disabled",
|
|
303
284
|
"reflect": false,
|
|
304
285
|
"defaultValue": "false"
|
|
305
286
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('B2B-Label', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<b2b-label>Neutral</b2b-label>`);
|
|
7
|
+
});
|
|
8
|
+
it('should render the label component', async () => {
|
|
9
|
+
const element = await page.find('b2b-label');
|
|
10
|
+
expect(element).not.toBeNull();
|
|
11
|
+
expect(element).toEqualText('Neutral');
|
|
12
|
+
});
|
|
13
|
+
it('should present the label component in the default style', async () => {
|
|
14
|
+
const element = await page.find('b2b-label >>> span');
|
|
15
|
+
expect(element).toHaveClass('b2b-label--neutral');
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class LabelComponent {
|
|
3
3
|
constructor() {
|
|
4
|
-
/** The type of the label. Per default it is neutral. */
|
|
5
4
|
this.type = 'neutral';
|
|
6
5
|
}
|
|
7
6
|
render() {
|
|
8
|
-
return (h("span", { key: '
|
|
7
|
+
return (h("span", { key: '36fd4a402ca1ac859e61f65a03e387d700d7133c', class: {
|
|
9
8
|
'b2b-label': true,
|
|
10
9
|
[`b2b-label--${this.type}`]: true,
|
|
11
|
-
} }, h("slot", { key: '
|
|
10
|
+
} }, h("slot", { key: 'f6baa21d06fa1ac1e7192f639bea7d070a4881d8' })));
|
|
12
11
|
}
|
|
13
12
|
static get is() { return "b2b-label"; }
|
|
14
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -26,7 +25,6 @@ export class LabelComponent {
|
|
|
26
25
|
return {
|
|
27
26
|
"type": {
|
|
28
27
|
"type": "string",
|
|
29
|
-
"attribute": "type",
|
|
30
28
|
"mutable": false,
|
|
31
29
|
"complexType": {
|
|
32
30
|
"original": "'neutral' | 'info' | 'success' | 'warning' | 'error'",
|
|
@@ -39,8 +37,7 @@ export class LabelComponent {
|
|
|
39
37
|
"tags": [],
|
|
40
38
|
"text": "The type of the label. Per default it is neutral."
|
|
41
39
|
},
|
|
42
|
-
"
|
|
43
|
-
"setter": false,
|
|
40
|
+
"attribute": "type",
|
|
44
41
|
"reflect": false,
|
|
45
42
|
"defaultValue": "'neutral'"
|
|
46
43
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
|
+
import { LabelComponent } from "./label";
|
|
4
|
+
it('should render the label component with default values', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [LabelComponent],
|
|
7
|
+
template: () => h("b2b-label", null, "Neutral"),
|
|
8
|
+
});
|
|
9
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
10
|
+
<span class="b2b-label b2b-label--neutral">
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</span>
|
|
13
|
+
`);
|
|
14
|
+
});
|
|
15
|
+
it('should render the label component with info styles', async () => {
|
|
16
|
+
const page = await newSpecPage({
|
|
17
|
+
components: [LabelComponent],
|
|
18
|
+
template: () => h("b2b-label", { type: "info" }, "Neutral"),
|
|
19
|
+
});
|
|
20
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
21
|
+
<span class="b2b-label b2b-label--info">
|
|
22
|
+
<slot></slot>
|
|
23
|
+
</span>
|
|
24
|
+
`);
|
|
25
|
+
});
|
|
26
|
+
it('should render the label component with success styles', async () => {
|
|
27
|
+
const page = await newSpecPage({
|
|
28
|
+
components: [LabelComponent],
|
|
29
|
+
template: () => h("b2b-label", { type: "success" }, "Neutral"),
|
|
30
|
+
});
|
|
31
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
32
|
+
<span class="b2b-label b2b-label--success">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</span>
|
|
35
|
+
`);
|
|
36
|
+
});
|
|
37
|
+
it('should render the label component with warning styles', async () => {
|
|
38
|
+
const page = await newSpecPage({
|
|
39
|
+
components: [LabelComponent],
|
|
40
|
+
template: () => h("b2b-label", { type: "warning" }, "Neutral"),
|
|
41
|
+
});
|
|
42
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
43
|
+
<span class="b2b-label b2b-label--warning">
|
|
44
|
+
<slot></slot>
|
|
45
|
+
</span>
|
|
46
|
+
`);
|
|
47
|
+
});
|
|
48
|
+
it('should render the label component with error styles', async () => {
|
|
49
|
+
const page = await newSpecPage({
|
|
50
|
+
components: [LabelComponent],
|
|
51
|
+
template: () => h("b2b-label", { type: "error" }, "Neutral"),
|
|
52
|
+
});
|
|
53
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
54
|
+
<span class="b2b-label b2b-label--error">
|
|
55
|
+
<slot></slot>
|
|
56
|
+
</span>
|
|
57
|
+
`);
|
|
58
|
+
});
|