@otto-de/b2b-core-components 1.30.0 → 1.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
- package/dist/b2b-core-components/p-00666ca7.entry.js +1 -0
- package/dist/b2b-core-components/p-0a63f5f8.entry.js +1 -0
- package/dist/b2b-core-components/{p-9cfba835.entry.js → p-0bf05f33.entry.js} +1 -1
- package/dist/b2b-core-components/{p-68e07419.entry.js → p-0edac105.entry.js} +1 -1
- package/dist/b2b-core-components/p-0ffc90ee.entry.js +1 -0
- package/dist/b2b-core-components/p-168c8684.entry.js +1 -0
- package/dist/b2b-core-components/p-19392020.js +1 -0
- package/dist/b2b-core-components/p-1a908833.entry.js +1 -0
- package/dist/b2b-core-components/{p-a37d6cea.entry.js → p-1dff8b34.entry.js} +1 -1
- package/dist/b2b-core-components/p-2d5df8f7.entry.js +1 -0
- package/dist/b2b-core-components/p-2dc0c5c0.entry.js +1 -0
- package/dist/b2b-core-components/p-318eb15e.entry.js +1 -0
- package/dist/b2b-core-components/p-33c01bb2.entry.js +1 -0
- package/dist/b2b-core-components/p-375cefbd.entry.js +1 -0
- package/dist/b2b-core-components/p-383d0a10.entry.js +1 -0
- package/dist/b2b-core-components/{p-08577a40.entry.js → p-400fa973.entry.js} +1 -1
- package/dist/b2b-core-components/p-413729d1.entry.js +1 -0
- package/dist/b2b-core-components/p-4528e98c.entry.js +1 -0
- package/dist/b2b-core-components/p-49bafb74.entry.js +1 -0
- package/dist/b2b-core-components/{p-745ad406.entry.js → p-4bc0ec9a.entry.js} +1 -1
- package/dist/b2b-core-components/p-564c62d0.entry.js +1 -0
- package/dist/b2b-core-components/{p-6040dca2.entry.js → p-6025d667.entry.js} +1 -1
- package/dist/b2b-core-components/p-61b2a6ad.js +1 -0
- package/dist/b2b-core-components/{p-54d478b6.entry.js → p-661d0249.entry.js} +1 -1
- package/dist/b2b-core-components/p-6dd7fd7b.entry.js +1 -0
- package/dist/b2b-core-components/p-6ff5114b.entry.js +1 -0
- package/dist/b2b-core-components/p-742a18f1.entry.js +1 -0
- package/dist/b2b-core-components/{p-23acc468.entry.js → p-781611fb.entry.js} +1 -1
- package/dist/b2b-core-components/{p-0847e62e.entry.js → p-7bb6f06e.entry.js} +1 -1
- package/dist/b2b-core-components/p-7dd8f3cb.entry.js +1 -0
- package/dist/b2b-core-components/p-815d7a53.entry.js +1 -0
- package/dist/b2b-core-components/{p-5063e5b7.entry.js → p-850c8e01.entry.js} +1 -1
- package/dist/b2b-core-components/{p-e8b1fee4.entry.js → p-86ff8e6c.entry.js} +1 -1
- package/dist/b2b-core-components/{p-552f43c1.entry.js → p-9819f622.entry.js} +1 -1
- package/dist/b2b-core-components/{p-ccf78e23.entry.js → p-9dde1af0.entry.js} +1 -1
- package/dist/b2b-core-components/{p-24c94653.entry.js → p-9f88b476.entry.js} +1 -1
- package/dist/b2b-core-components/p-a155219a.entry.js +1 -0
- package/dist/b2b-core-components/p-a96c8ba0.entry.js +1 -0
- package/dist/b2b-core-components/p-b33059ab.entry.js +1 -0
- package/dist/b2b-core-components/p-b5fdf7df.entry.js +1 -0
- package/dist/b2b-core-components/p-b6a753e8.js +2 -0
- package/dist/b2b-core-components/p-bba0b41b.entry.js +1 -0
- package/dist/b2b-core-components/p-be93498d.entry.js +1 -0
- package/dist/b2b-core-components/p-bfbe4aff.entry.js +1 -0
- package/dist/b2b-core-components/p-c597637e.entry.js +1 -0
- package/dist/b2b-core-components/{p-eb01bb4f.entry.js → p-c67bcebc.entry.js} +1 -1
- package/dist/b2b-core-components/p-cb4cc427.entry.js +1 -0
- package/dist/b2b-core-components/{p-a63dfd99.entry.js → p-d1c8105b.entry.js} +1 -1
- package/dist/b2b-core-components/{p-2f9efe3f.entry.js → p-d26ec403.entry.js} +1 -1
- package/dist/b2b-core-components/p-d3204d75.entry.js +1 -0
- package/dist/b2b-core-components/p-d6457a1d.entry.js +1 -0
- package/dist/b2b-core-components/p-db205434.entry.js +1 -0
- package/dist/b2b-core-components/p-e1255160.js +1 -0
- package/dist/b2b-core-components/p-e520c7cf.entry.js +1 -0
- package/dist/b2b-core-components/p-f2fdce36.entry.js +1 -0
- package/dist/b2b-core-components/p-f5786cad.entry.js +1 -0
- package/dist/b2b-core-components/{p-58fb3508.entry.js → p-f5e9dbf4.entry.js} +1 -1
- package/dist/b2b-core-components/p-f9e278da.entry.js +1 -0
- package/dist/b2b-core-components/p-fa85955c.entry.js +1 -0
- package/dist/b2b-core-components/{p-eb78706f.entry.js → p-fae54521.entry.js} +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/b2b-alert.cjs.entry.js +13 -15
- package/dist/cjs/b2b-anchor.cjs.entry.js +8 -10
- package/dist/cjs/b2b-background-box.cjs.entry.js +7 -10
- package/dist/cjs/b2b-breadcrumb-item.cjs.entry.js +10 -8
- package/dist/cjs/b2b-breadcrumb.cjs.entry.js +10 -9
- package/dist/cjs/b2b-button_2.cjs.entry.js +20 -25
- package/dist/cjs/b2b-card.cjs.entry.js +8 -8
- package/dist/cjs/b2b-checkbox-group.cjs.entry.js +15 -13
- package/dist/cjs/b2b-checkbox.cjs.entry.js +22 -19
- package/dist/cjs/b2b-chip-component_2.cjs.entry.js +24 -20
- package/dist/cjs/b2b-core-components.cjs.js +14 -13
- package/dist/cjs/b2b-date-picker-days_5.cjs.entry.js +50 -40
- package/dist/cjs/b2b-date-picker.cjs.entry.js +37 -36
- package/dist/cjs/b2b-dropdown.cjs.entry.js +26 -24
- package/dist/cjs/b2b-flyout-menu-option.cjs.entry.js +10 -8
- package/dist/cjs/b2b-flyout-menu.cjs.entry.js +9 -7
- package/dist/cjs/b2b-grid-col.cjs.entry.js +6 -4
- package/dist/cjs/b2b-grid-row.cjs.entry.js +5 -7
- package/dist/cjs/b2b-grid.cjs.entry.js +6 -4
- package/dist/cjs/b2b-headline.cjs.entry.js +5 -5
- package/dist/cjs/b2b-icon-100.cjs.entry.js +12 -12
- package/dist/cjs/b2b-icon-50.cjs.entry.js +10 -9
- package/dist/cjs/b2b-icon.cjs.entry.js +12 -12
- package/dist/cjs/b2b-input-group_2.cjs.entry.js +24 -24
- package/dist/cjs/b2b-input-label.cjs.entry.js +7 -6
- package/dist/cjs/b2b-input_2.cjs.entry.js +33 -33
- package/dist/cjs/b2b-label.cjs.entry.js +7 -5
- package/dist/cjs/b2b-modal.cjs.entry.js +16 -18
- package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +27 -24
- package/dist/cjs/b2b-pagination.cjs.entry.js +12 -13
- package/dist/cjs/b2b-paragraph.cjs.entry.js +7 -10
- package/dist/cjs/b2b-progress-bar.cjs.entry.js +12 -9
- package/dist/cjs/b2b-radio-button.cjs.entry.js +19 -15
- package/dist/cjs/b2b-radio-group.cjs.entry.js +17 -13
- package/dist/cjs/b2b-required-separator.cjs.entry.js +6 -4
- package/dist/cjs/b2b-rounded-icon.cjs.entry.js +10 -12
- package/dist/cjs/b2b-scrollable-container.cjs.entry.js +6 -3
- package/dist/cjs/b2b-search.cjs.entry.js +10 -9
- package/dist/cjs/b2b-separator.cjs.entry.js +6 -4
- package/dist/cjs/b2b-shimmer.cjs.entry.js +9 -3
- package/dist/cjs/b2b-snackbar.cjs.entry.js +19 -18
- package/dist/cjs/b2b-tab-group.cjs.entry.js +6 -6
- package/dist/cjs/b2b-tab-panel.cjs.entry.js +6 -3
- package/dist/cjs/b2b-tab.cjs.entry.js +8 -8
- package/dist/cjs/b2b-table-cell_2.cjs.entry.js +30 -37
- package/dist/cjs/b2b-table-row.cjs.entry.js +19 -17
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +16 -23
- package/dist/cjs/b2b-table.cjs.entry.js +10 -13
- package/dist/cjs/b2b-textarea.cjs.entry.js +23 -17
- package/dist/cjs/b2b-toggle-button.cjs.entry.js +14 -10
- package/dist/cjs/b2b-toggle-chip.cjs.entry.js +14 -10
- package/dist/cjs/b2b-toggle-group.cjs.entry.js +11 -7
- package/dist/cjs/b2b-toggle-switch.cjs.entry.js +15 -13
- package/dist/cjs/b2b-tooltip.cjs.entry.js +12 -11
- package/dist/cjs/b2b-wizard-icon.cjs.entry.js +9 -8
- package/dist/cjs/b2b-wizard-step.cjs.entry.js +8 -9
- package/dist/cjs/b2b-wizard.cjs.entry.js +10 -12
- package/dist/cjs/index-668808fd.js +2516 -0
- package/dist/cjs/loader.cjs.js +6 -3
- package/dist/cjs/{request-Dwsj-gbA.js → request-801c6ba1.js} +0 -2
- package/dist/cjs/{utils--ZrBSHVe.js → utils-499e9db5.js} +9 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/alert/alert.e2e.js +67 -0
- package/dist/collection/components/alert/alert.js +12 -27
- package/dist/collection/components/anchor/anchor.js +9 -26
- package/dist/collection/components/anchor/anchor.spec.js +68 -0
- package/dist/collection/components/background-box/background-box.e2e.js +63 -0
- package/dist/collection/components/background-box/background-box.js +8 -26
- package/dist/collection/components/background-box/background-box.spec.js +64 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item.js +7 -14
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.js +50 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +6 -12
- package/dist/collection/components/button/button.e2e.js +80 -0
- package/dist/collection/components/button/button.js +23 -52
- package/dist/collection/components/card/card.e2e.js +110 -0
- package/dist/collection/components/card/card.js +5 -14
- package/dist/collection/components/card/card.spec.js +32 -0
- package/dist/collection/components/checkbox/checkbox.e2e.js +38 -0
- package/dist/collection/components/checkbox/checkbox.js +26 -50
- package/dist/collection/components/checkbox/checkbox.spec.js +45 -0
- package/dist/collection/components/checkbox-group/checkbox-group.e2e.js +83 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +16 -31
- package/dist/collection/components/checkbox-group/checkbox-group.spec.js +38 -0
- package/dist/collection/components/chip/chip.e2e.js +99 -0
- package/dist/collection/components/chip/chip.js +17 -30
- package/dist/collection/components/date-picker/date-picker-days-header.js +3 -6
- package/dist/collection/components/date-picker/date-picker-days.js +20 -44
- package/dist/collection/components/date-picker/date-picker-header.e2e.js +38 -0
- package/dist/collection/components/date-picker/date-picker-header.js +10 -15
- package/dist/collection/components/date-picker/date-picker-months.e2e.js +39 -0
- package/dist/collection/components/date-picker/date-picker-months.js +5 -9
- package/dist/collection/components/date-picker/date-picker-years.e2e.js +39 -0
- package/dist/collection/components/date-picker/date-picker-years.js +4 -5
- package/dist/collection/components/date-picker/date-picker.e2e.js +137 -0
- package/dist/collection/components/date-picker/date-picker.js +44 -76
- package/dist/collection/components/dropdown/dropdown.e2e.js +89 -0
- package/dist/collection/components/dropdown/dropdown.js +27 -46
- package/dist/collection/components/dropdown/dropdown.spec.js +52 -0
- package/dist/collection/components/flyout-menu/flyout-menu-option.js +7 -14
- package/dist/collection/components/flyout-menu/flyout-menu.e2e.js +97 -0
- package/dist/collection/components/flyout-menu/flyout-menu.js +5 -8
- package/dist/collection/components/grid/column.js +5 -9
- package/dist/collection/components/grid/grid.e2e.js +17 -0
- package/dist/collection/components/grid/grid.js +2 -5
- package/dist/collection/components/grid/row.js +6 -18
- package/dist/collection/components/headline/headline.e2e.js +13 -0
- package/dist/collection/components/headline/headline.js +3 -12
- package/dist/collection/components/headline/headline.spec.js +67 -0
- package/dist/collection/components/icon/icon.js +11 -24
- package/dist/collection/components/icon/icon.spec.js +21 -0
- package/dist/collection/components/icon-100/icon-100.e2e.js +40 -0
- package/dist/collection/components/icon-100/icon-100.js +11 -24
- package/dist/collection/components/icon-50/icon-50.e2e.js +32 -0
- package/dist/collection/components/icon-50/icon-50.js +8 -18
- package/dist/collection/components/input/input.e2e.js +84 -0
- package/dist/collection/components/input/input.js +33 -64
- package/dist/collection/components/input/input.spec.js +45 -0
- package/dist/collection/components/input-group/input-group.e2e.js +77 -0
- package/dist/collection/components/input-group/input-group.js +9 -17
- package/dist/collection/components/input-group/input-group.spec.js +56 -0
- package/dist/collection/components/input-label/input-label.e2e.js +10 -0
- package/dist/collection/components/input-label/input-label.js +4 -10
- package/dist/collection/components/input-list/input-list-option.js +3 -4
- package/dist/collection/components/input-list/input-list.e2e.js +242 -0
- package/dist/collection/components/input-list/input-list.js +17 -36
- package/dist/collection/components/label/label.e2e.js +17 -0
- package/dist/collection/components/label/label.js +3 -6
- package/dist/collection/components/label/label.spec.js +58 -0
- package/dist/collection/components/modal/modal.e2e.js +115 -0
- package/dist/collection/components/modal/modal.js +14 -29
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.e2e.js +74 -0
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +33 -57
- package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js +8 -15
- package/dist/collection/components/pagination/pagination.e2e.js +257 -0
- package/dist/collection/components/pagination/pagination.js +10 -22
- package/dist/collection/components/pagination/pagination.spec.js +103 -0
- package/dist/collection/components/paragraph/paragraph.e2e.js +13 -0
- package/dist/collection/components/paragraph/paragraph.js +8 -26
- package/dist/collection/components/progress-bar/progress-bar.e2e.js +43 -0
- package/dist/collection/components/progress-bar/progress-bar.js +11 -19
- package/dist/collection/components/radio/radio.e2e.js +45 -0
- package/dist/collection/components/radio/radio.js +20 -37
- package/dist/collection/components/radio/radio.spec.js +38 -0
- package/dist/collection/components/radio-group/radio-group.e2e.js +86 -0
- package/dist/collection/components/radio-group/radio-group.js +19 -34
- package/dist/collection/components/radio-group/radio-group.spec.js +31 -0
- package/dist/collection/components/required-separator/required-separator.e2e.js +17 -0
- package/dist/collection/components/required-separator/required-separator.js +2 -5
- package/dist/collection/components/rounded-icon/rounded-icon.js +8 -19
- package/dist/collection/components/scrollable-container/scrollable-container.js +1 -1
- package/dist/collection/components/search/search.e2e.js +98 -0
- package/dist/collection/components/search/search.js +9 -19
- package/dist/collection/components/separator/separator.e2e.js +22 -0
- package/dist/collection/components/separator/separator.js +2 -5
- package/dist/collection/components/shimmer/shimmer.e2e.js +18 -0
- package/dist/collection/components/shimmer/shimmer.js +9 -10
- package/dist/collection/components/shimmer/shimmer.spec.js +35 -0
- package/dist/collection/components/snackbar/snackbar.e2e.js +61 -0
- package/dist/collection/components/snackbar/snackbar.js +20 -38
- package/dist/collection/components/spinner/spinner.e2e.js +12 -0
- package/dist/collection/components/spinner/spinner.js +3 -9
- package/dist/collection/components/spinner/spinner.spec.js +41 -0
- package/dist/collection/components/tab/tab.e2e.js +35 -0
- package/dist/collection/components/tab/tab.js +5 -14
- package/dist/collection/components/tab/tab.spec.js +31 -0
- package/dist/collection/components/tab-group/tab-group.e2e.js +99 -0
- package/dist/collection/components/tab-group/tab-group.js +3 -7
- package/dist/collection/components/tab-panel/tab-panel.e2e.js +12 -0
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tab-panel/tab-panel.spec.js +10 -0
- package/dist/collection/components/table/table-cell/table-cell.js +17 -40
- package/dist/collection/components/table/table-header/table-header.js +19 -37
- package/dist/collection/components/table/table-row/table-row.js +18 -33
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +15 -37
- package/dist/collection/components/table/table.e2e.js +405 -0
- package/dist/collection/components/table/table.js +4 -12
- package/dist/collection/components/textarea/textarea.e2e.js +91 -0
- package/dist/collection/components/textarea/textarea.js +30 -52
- package/dist/collection/components/toggle-button/toggle-button.e2e.js +44 -0
- package/dist/collection/components/toggle-button/toggle-button.js +13 -22
- package/dist/collection/components/toggle-chip/toggle-chip.e2e.js +47 -0
- package/dist/collection/components/toggle-chip/toggle-chip.js +13 -22
- package/dist/collection/components/toggle-group/toggle-group.e2e.js +65 -0
- package/dist/collection/components/toggle-group/toggle-group.js +7 -10
- package/dist/collection/components/toggle-switch/toggle-switch.e2e.js +50 -0
- package/dist/collection/components/toggle-switch/toggle-switch.js +14 -25
- package/dist/collection/components/tooltip/tooltip.e2e.js +64 -0
- package/dist/collection/components/tooltip/tooltip.js +11 -21
- package/dist/collection/components/wizard/wizard-step.js +5 -15
- package/dist/collection/components/wizard/wizard.e2e.js +149 -0
- package/dist/collection/components/wizard/wizard.js +7 -18
- package/dist/collection/components/wizard-icon/wizard-icon.js +6 -14
- package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
- package/dist/collection/utils/utils.spec.js +15 -0
- package/dist/components/b2b-alert.js +13 -17
- package/dist/components/b2b-anchor.js +7 -11
- package/dist/components/b2b-background-box.js +6 -11
- package/dist/components/b2b-breadcrumb-item.js +9 -9
- package/dist/components/b2b-breadcrumb.js +9 -10
- package/dist/components/b2b-button.js +1 -1
- package/dist/components/b2b-card.js +7 -9
- package/dist/components/b2b-checkbox-group.js +15 -15
- package/dist/components/b2b-checkbox.js +1 -1
- package/dist/components/b2b-chip-component.js +1 -1
- package/dist/components/b2b-date-picker-days-header.js +1 -1
- package/dist/components/b2b-date-picker-days.js +1 -1
- package/dist/components/b2b-date-picker-header.js +1 -1
- package/dist/components/b2b-date-picker-months.js +1 -1
- package/dist/components/b2b-date-picker-years.js +1 -1
- package/dist/components/b2b-date-picker.js +43 -44
- package/dist/components/b2b-dropdown.js +26 -26
- package/dist/components/b2b-flyout-menu-option.js +9 -9
- package/dist/components/b2b-flyout-menu.js +8 -8
- package/dist/components/b2b-grid-col.js +5 -5
- package/dist/components/b2b-grid-row.js +4 -8
- package/dist/components/b2b-grid.js +5 -5
- package/dist/components/b2b-headline.js +1 -1
- package/dist/components/b2b-icon-100.js +1 -1
- package/dist/components/b2b-icon-50.js +13 -11
- package/dist/components/b2b-icon.js +16 -15
- package/dist/components/b2b-input-group.js +1 -1
- package/dist/components/b2b-input-label.js +1 -1
- package/dist/components/b2b-input-list-option.js +1 -1
- package/dist/components/b2b-input-list.js +1 -1
- package/dist/components/b2b-input.js +1 -1
- package/dist/components/b2b-label.js +6 -6
- package/dist/components/b2b-modal.js +17 -21
- package/dist/components/b2b-multiselect-dropdown.js +31 -30
- package/dist/components/b2b-multiselect-option.js +1 -1
- package/dist/components/b2b-pagination.js +13 -16
- package/dist/components/b2b-paragraph.js +6 -11
- package/dist/components/b2b-progress-bar.js +11 -10
- package/dist/components/b2b-radio-button.js +19 -17
- package/dist/components/b2b-radio-group.js +17 -15
- package/dist/components/b2b-required-separator.js +6 -6
- package/dist/components/b2b-rounded-icon.js +1 -1
- package/dist/components/b2b-scrollable-container.js +5 -4
- package/dist/components/b2b-search.js +18 -19
- package/dist/components/b2b-separator.js +1 -1
- package/dist/components/b2b-shimmer.js +8 -4
- package/dist/components/b2b-snackbar.js +19 -20
- package/dist/components/b2b-spinner.js +1 -1
- package/dist/components/b2b-tab-group.js +6 -8
- package/dist/components/b2b-tab-panel.js +5 -4
- package/dist/components/b2b-tab.js +7 -9
- package/dist/components/b2b-table-cell.js +1 -1
- package/dist/components/b2b-table-header.js +1 -1
- package/dist/components/b2b-table-row.js +23 -23
- package/dist/components/b2b-table-rowgroup.js +15 -24
- package/dist/components/b2b-table.js +9 -14
- package/dist/components/b2b-textarea.js +23 -19
- package/dist/components/b2b-toggle-button.js +13 -11
- package/dist/components/b2b-toggle-chip.js +13 -11
- package/dist/components/b2b-toggle-group.js +10 -8
- package/dist/components/b2b-toggle-switch.js +14 -14
- package/dist/components/b2b-tooltip.js +11 -12
- package/dist/components/b2b-wizard-icon.js +1 -1
- package/dist/components/b2b-wizard-step.js +10 -13
- package/dist/components/b2b-wizard.js +9 -13
- package/dist/components/{p-CE7t2D9r.js → button.js} +17 -23
- package/dist/components/{p-CLYM9t6v.js → checkbox.js} +22 -21
- package/dist/components/{p-ClL49BcQ.js → chip.js} +15 -13
- package/dist/components/{p-FI-HbnMh.js → date-picker-days-header.js} +7 -7
- package/dist/components/{p-0Vy4494O.js → date-picker-days.js} +24 -21
- package/dist/components/{p-C_U38W4s.js → date-picker-header.js} +17 -15
- package/dist/components/{p-1ZoTG5p9.js → date-picker-months.js} +9 -8
- package/dist/components/{p-dMZsx2Fh.js → date-picker-years.js} +8 -6
- package/dist/components/{p-Bo-B8kdb.js → headline.js} +4 -6
- package/dist/components/{p-B9RvgUY3.js → icon-100.js} +15 -14
- package/dist/components/index.js +1 -1929
- package/dist/components/{p-TB2jJFV6.js → input-group.js} +9 -8
- package/dist/components/{p-Zg4AtKjq.js → input-label.js} +6 -7
- package/dist/components/{p-QTGqu3he.js → input-list-option.js} +7 -5
- package/dist/components/{p-BacBJzW_.js → input-list.js} +21 -24
- package/dist/components/{p-CuUquHzL.js → input.js} +28 -32
- package/dist/components/{p-B7bjXySI.js → multiselect-option.js} +12 -12
- package/dist/{esm/request-B8W50WyB.js → components/request.js} +5 -2
- package/dist/components/{p-i758rnm2.js → rounded-icon.js} +9 -13
- package/dist/components/{p-DO7N8IC0.js → separator.js} +5 -5
- package/dist/components/{p-3cu_Madt.js → spinner.js} +5 -6
- package/dist/components/{p-9OQH2pET.js → table-cell.js} +15 -23
- package/dist/components/{p-BVLpVPNb.js → table-header.js} +17 -18
- package/dist/{esm/utils-BA6KE1BD.js → components/utils.js} +10 -3
- package/dist/components/{p-N6d2-6pL.js → wizard-icon.js} +10 -11
- package/dist/custom-elements.json +0 -24
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/b2b-alert.entry.js +11 -15
- package/dist/esm/b2b-anchor.entry.js +6 -10
- package/dist/esm/b2b-background-box.entry.js +5 -10
- package/dist/esm/b2b-breadcrumb-item.entry.js +8 -8
- package/dist/esm/b2b-breadcrumb.entry.js +8 -9
- package/dist/esm/b2b-button_2.entry.js +18 -25
- package/dist/esm/b2b-card.entry.js +6 -8
- package/dist/esm/b2b-checkbox-group.entry.js +13 -13
- package/dist/esm/b2b-checkbox.entry.js +20 -19
- package/dist/esm/b2b-chip-component_2.entry.js +22 -20
- package/dist/esm/b2b-core-components.js +12 -12
- package/dist/esm/b2b-date-picker-days_5.entry.js +48 -40
- package/dist/esm/b2b-date-picker.entry.js +35 -36
- package/dist/esm/b2b-dropdown.entry.js +24 -24
- package/dist/esm/b2b-flyout-menu-option.entry.js +8 -8
- package/dist/esm/b2b-flyout-menu.entry.js +7 -7
- package/dist/esm/b2b-grid-col.entry.js +4 -4
- package/dist/esm/b2b-grid-row.entry.js +3 -7
- package/dist/esm/b2b-grid.entry.js +4 -4
- package/dist/esm/b2b-headline.entry.js +3 -5
- package/dist/esm/b2b-icon-100.entry.js +10 -12
- package/dist/esm/b2b-icon-50.entry.js +8 -9
- package/dist/esm/b2b-icon.entry.js +10 -12
- package/dist/esm/b2b-input-group_2.entry.js +22 -24
- package/dist/esm/b2b-input-label.entry.js +5 -6
- package/dist/esm/b2b-input_2.entry.js +31 -33
- package/dist/esm/b2b-label.entry.js +5 -5
- package/dist/esm/b2b-modal.entry.js +14 -18
- package/dist/esm/b2b-multiselect-dropdown.entry.js +25 -24
- package/dist/esm/b2b-pagination.entry.js +10 -13
- package/dist/esm/b2b-paragraph.entry.js +5 -10
- package/dist/esm/b2b-progress-bar.entry.js +10 -9
- package/dist/esm/b2b-radio-button.entry.js +17 -15
- package/dist/esm/b2b-radio-group.entry.js +15 -13
- package/dist/esm/b2b-required-separator.entry.js +4 -4
- package/dist/esm/b2b-rounded-icon.entry.js +8 -12
- package/dist/esm/b2b-scrollable-container.entry.js +4 -3
- package/dist/esm/b2b-search.entry.js +8 -9
- package/dist/esm/b2b-separator.entry.js +4 -4
- package/dist/esm/b2b-shimmer.entry.js +7 -3
- package/dist/esm/b2b-snackbar.entry.js +17 -18
- package/dist/esm/b2b-tab-group.entry.js +4 -6
- package/dist/esm/b2b-tab-panel.entry.js +4 -3
- package/dist/esm/b2b-tab.entry.js +6 -8
- package/dist/esm/b2b-table-cell_2.entry.js +28 -37
- package/dist/esm/b2b-table-row.entry.js +17 -17
- package/dist/esm/b2b-table-rowgroup.entry.js +14 -23
- package/dist/esm/b2b-table.entry.js +8 -13
- package/dist/esm/b2b-textarea.entry.js +21 -17
- package/dist/esm/b2b-toggle-button.entry.js +12 -10
- package/dist/esm/b2b-toggle-chip.entry.js +12 -10
- package/dist/esm/b2b-toggle-group.entry.js +9 -7
- package/dist/esm/b2b-toggle-switch.entry.js +13 -13
- package/dist/esm/b2b-tooltip.entry.js +10 -11
- package/dist/esm/b2b-wizard-icon.entry.js +7 -8
- package/dist/esm/b2b-wizard-step.entry.js +6 -9
- package/dist/esm/b2b-wizard.entry.js +8 -12
- package/dist/esm/index-ab9eb36d.js +2487 -0
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/{components/p-CPfvpKl5.js → esm/request-1d048f8a.js} +0 -2
- package/dist/{components/p-BA6KE1BD.js → esm/utils-868299de.js} +10 -3
- package/dist/loader/cdn.js +3 -1
- package/dist/loader/index.cjs.js +3 -1
- package/dist/loader/index.d.ts +0 -3
- package/dist/loader/index.es2017.js +3 -1
- package/dist/loader/index.js +3 -1
- package/dist/loader/package.json +11 -0
- package/dist/types/components.d.ts +0 -413
- package/dist/types/stencil-public-runtime.d.ts +11 -32
- package/dist/web-types.json +8 -7
- package/package.json +10 -11
- package/dist/b2b-core-components/p-0002d8d5.entry.js +0 -1
- package/dist/b2b-core-components/p-0386f660.entry.js +0 -1
- package/dist/b2b-core-components/p-0a08e2c8.entry.js +0 -1
- package/dist/b2b-core-components/p-0d8cc4eb.entry.js +0 -1
- package/dist/b2b-core-components/p-197dc9c0.entry.js +0 -1
- package/dist/b2b-core-components/p-220b8c79.entry.js +0 -1
- package/dist/b2b-core-components/p-2933f053.entry.js +0 -1
- package/dist/b2b-core-components/p-3a9f7db8.entry.js +0 -1
- package/dist/b2b-core-components/p-3e0919b3.entry.js +0 -1
- package/dist/b2b-core-components/p-42d9f79d.entry.js +0 -1
- package/dist/b2b-core-components/p-4bb42493.entry.js +0 -1
- package/dist/b2b-core-components/p-4c550170.entry.js +0 -1
- package/dist/b2b-core-components/p-50559efd.entry.js +0 -1
- package/dist/b2b-core-components/p-55db3d57.entry.js +0 -1
- package/dist/b2b-core-components/p-6e7abebc.entry.js +0 -1
- package/dist/b2b-core-components/p-7b75a0a4.entry.js +0 -1
- package/dist/b2b-core-components/p-7cbe33ef.entry.js +0 -1
- package/dist/b2b-core-components/p-8544b7e1.entry.js +0 -1
- package/dist/b2b-core-components/p-88037ad2.entry.js +0 -1
- package/dist/b2b-core-components/p-930425a1.entry.js +0 -1
- package/dist/b2b-core-components/p-B9l4NfeG.js +0 -1
- package/dist/b2b-core-components/p-BA6KE1BD.js +0 -1
- package/dist/b2b-core-components/p-a1a4efd4.entry.js +0 -1
- package/dist/b2b-core-components/p-a61eecf7.entry.js +0 -1
- package/dist/b2b-core-components/p-ada918c2.entry.js +0 -1
- package/dist/b2b-core-components/p-bb020c1c.entry.js +0 -1
- package/dist/b2b-core-components/p-bbb4c6f3.entry.js +0 -1
- package/dist/b2b-core-components/p-c0af184a.entry.js +0 -1
- package/dist/b2b-core-components/p-c40f7176.entry.js +0 -1
- package/dist/b2b-core-components/p-c6043d6a.entry.js +0 -1
- package/dist/b2b-core-components/p-c649c112.entry.js +0 -1
- package/dist/b2b-core-components/p-c69e9220.entry.js +0 -1
- package/dist/b2b-core-components/p-d1b46208.entry.js +0 -1
- package/dist/b2b-core-components/p-d2d40ae5.entry.js +0 -1
- package/dist/b2b-core-components/p-e8e156a4.entry.js +0 -1
- package/dist/b2b-core-components/p-ebcc2cce.entry.js +0 -1
- package/dist/b2b-core-components/p-edea84cc.entry.js +0 -1
- package/dist/b2b-core-components/p-f831e483.entry.js +0 -1
- package/dist/b2b-core-components/p-fdfb094e.entry.js +0 -1
- package/dist/b2b-core-components/p-zl-jO_Vq.js +0 -2
- package/dist/cjs/index-CIrNIFXs.js +0 -2406
- package/dist/esm/index-zl-jO_Vq.js +0 -2378
- /package/dist/b2b-core-components/{p-B8geQC3V.js → p-48608c23.js} +0 -0
- /package/dist/b2b-core-components/{p-BgHEmQ44.js → p-c500d93c.js} +0 -0
- /package/dist/cjs/{date-picker-util-VbL9p5ie.js → date-picker-util-51276571.js} +0 -0
- /package/dist/cjs/{wizard.types-uAv3s7tK.js → wizard.types-40a1058c.js} +0 -0
- /package/dist/components/{p-BsfreBZY.js → date-picker.types.js} +0 -0
- /package/dist/components/{p-BgHEmQ44.js → wizard.types.js} +0 -0
- /package/dist/esm/{date-picker-util-B8geQC3V.js → date-picker-util-44201ca6.js} +0 -0
- /package/dist/esm/{wizard.types-BgHEmQ44.js → wizard.types-40ae9b73.js} +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('B2B-Input', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`
|
|
7
|
+
<b2b-input></b2b-input>
|
|
8
|
+
`);
|
|
9
|
+
});
|
|
10
|
+
it('should register input text when enabled', async () => {
|
|
11
|
+
let inputElement = await page.find('b2b-input');
|
|
12
|
+
const nativeInput = await page.find('b2b-input >>> input');
|
|
13
|
+
await nativeInput.type('a value');
|
|
14
|
+
inputElement = await page.find('b2b-input');
|
|
15
|
+
let inputValue = inputElement.getAttribute('value');
|
|
16
|
+
expect(inputValue).toBe('a value');
|
|
17
|
+
});
|
|
18
|
+
it('should not receive input text when disabled', async () => {
|
|
19
|
+
const inputElement = await page.find('b2b-input');
|
|
20
|
+
inputElement.setAttribute('disabled', true);
|
|
21
|
+
await page.waitForChanges();
|
|
22
|
+
const nativeInput = await page.find('b2b-input >>> input');
|
|
23
|
+
await nativeInput.type('a value');
|
|
24
|
+
let inputValue = inputElement.getAttribute('value');
|
|
25
|
+
expect(inputValue).toBe(null);
|
|
26
|
+
});
|
|
27
|
+
it('should clear input when cleared called', async () => {
|
|
28
|
+
let inputElement = await page.find('b2b-input');
|
|
29
|
+
const nativeInput = await page.find('b2b-input >>> input');
|
|
30
|
+
await nativeInput.type('a value');
|
|
31
|
+
inputElement = await page.find('b2b-input');
|
|
32
|
+
let inputValue = inputElement.getAttribute('value');
|
|
33
|
+
expect(inputValue).toBe('a value');
|
|
34
|
+
await inputElement.callMethod('clearInput');
|
|
35
|
+
await page.waitForChanges();
|
|
36
|
+
inputElement = await page.find('b2b-input');
|
|
37
|
+
inputValue = inputElement.getAttribute('value');
|
|
38
|
+
expect(inputValue).toBe('');
|
|
39
|
+
});
|
|
40
|
+
it('should emit an empty value when cleared', async () => {
|
|
41
|
+
const onInputEventSpy = await page.spyOnEvent('b2b-input');
|
|
42
|
+
const inputElement = await page.find('b2b-input');
|
|
43
|
+
await inputElement.callMethod('clearInput');
|
|
44
|
+
expect(onInputEventSpy).toHaveReceivedEventDetail({ value: '' });
|
|
45
|
+
});
|
|
46
|
+
it('should use label slot when provided', async () => {
|
|
47
|
+
const slotPage = await newE2EPage();
|
|
48
|
+
await slotPage.setContent(`
|
|
49
|
+
<b2b-input>
|
|
50
|
+
<span slot="label">Label Slot</span>
|
|
51
|
+
</b2b-input>
|
|
52
|
+
`);
|
|
53
|
+
const labelElement = await slotPage.find('span');
|
|
54
|
+
expect(labelElement).toEqualText('Label Slot');
|
|
55
|
+
});
|
|
56
|
+
it('should use hint slot when provided', async () => {
|
|
57
|
+
const slotPage = await newE2EPage();
|
|
58
|
+
await slotPage.setContent(`
|
|
59
|
+
<b2b-input>
|
|
60
|
+
<span slot="hint">Hint Slot<b2b-anchor href="https://example.com">Hello World!</b2b-anchor></span>
|
|
61
|
+
</b2b-input>
|
|
62
|
+
`);
|
|
63
|
+
await slotPage.waitForChanges();
|
|
64
|
+
const outerHTML = await slotPage.evaluate(() => {
|
|
65
|
+
const span = document.querySelector('span[slot="hint"]');
|
|
66
|
+
return span.outerHTML;
|
|
67
|
+
});
|
|
68
|
+
expect(outerHTML).toBe('<span slot="hint">Hint Slot<b2b-anchor href="https://example.com" class="hydrated">Hello World!</b2b-anchor></span>');
|
|
69
|
+
});
|
|
70
|
+
it('should not display unsupported elements in the hint slot', async () => {
|
|
71
|
+
const slotPage = await newE2EPage();
|
|
72
|
+
await slotPage.setContent(`
|
|
73
|
+
<b2b-input>
|
|
74
|
+
<span slot="hint">Hint Slot<div>This should be removed</div></span>
|
|
75
|
+
</b2b-input>
|
|
76
|
+
`);
|
|
77
|
+
await slotPage.waitForChanges();
|
|
78
|
+
const outerHTML = await slotPage.evaluate(() => {
|
|
79
|
+
const span = document.querySelector('span[slot="hint"]');
|
|
80
|
+
return span.outerHTML;
|
|
81
|
+
});
|
|
82
|
+
expect(outerHTML).toBe('<span slot="hint">Hint Slot</span>');
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -4,27 +4,6 @@ import { h, Host, } from "@stencil/core";
|
|
|
4
4
|
*/
|
|
5
5
|
export class InputComponent {
|
|
6
6
|
constructor() {
|
|
7
|
-
/** Adds an asterisk at the end of the label to signify that the field is required. */
|
|
8
|
-
this.required = false;
|
|
9
|
-
/** The type of the input. All native HTML types except date or month are supported. Default is text. */
|
|
10
|
-
this.type = 'text';
|
|
11
|
-
/** Whether or not the input is disabled. Default is false. */
|
|
12
|
-
this.disabled = false;
|
|
13
|
-
/** Whether the input is currently invalid. If true, the input is rendered with error styles. Per default it is false. */
|
|
14
|
-
this.invalid = false;
|
|
15
|
-
/** A placeholder for the input field. Per default, it is null. */
|
|
16
|
-
this.placeholder = null;
|
|
17
|
-
/** The default value of the input field. If defined, it will prefill the input. */
|
|
18
|
-
this.value = null;
|
|
19
|
-
/** When setting the autofocus to true, the input element will be focused when the page loads. */
|
|
20
|
-
this.focusOnLoad = false;
|
|
21
|
-
/** @internal Whether the parent input group is disabled. Per default, it is false. */
|
|
22
|
-
this.groupDisabled = false;
|
|
23
|
-
/** The alignment of the text. */
|
|
24
|
-
this.inputTextAlign = 'left';
|
|
25
|
-
this.hasFocus = false;
|
|
26
|
-
this.hasTextPrefix = false;
|
|
27
|
-
this.hasTextSuffix = false;
|
|
28
7
|
// TODO: find a way to test it maybe when migrating to new testing framework
|
|
29
8
|
this.handleFormData = (event) => {
|
|
30
9
|
if (this.name != undefined) {
|
|
@@ -60,6 +39,22 @@ export class InputComponent {
|
|
|
60
39
|
}
|
|
61
40
|
return false;
|
|
62
41
|
};
|
|
42
|
+
this.label = undefined;
|
|
43
|
+
this.required = false;
|
|
44
|
+
this.type = 'text';
|
|
45
|
+
this.disabled = false;
|
|
46
|
+
this.invalid = false;
|
|
47
|
+
this.placeholder = null;
|
|
48
|
+
this.value = null;
|
|
49
|
+
this.name = undefined;
|
|
50
|
+
this.hint = undefined;
|
|
51
|
+
this.error = undefined;
|
|
52
|
+
this.focusOnLoad = false;
|
|
53
|
+
this.groupDisabled = false;
|
|
54
|
+
this.inputTextAlign = 'left';
|
|
55
|
+
this.hasFocus = false;
|
|
56
|
+
this.hasTextPrefix = false;
|
|
57
|
+
this.hasTextSuffix = false;
|
|
63
58
|
}
|
|
64
59
|
/** Manually set focus to the element */
|
|
65
60
|
async setFocus() {
|
|
@@ -105,18 +100,18 @@ export class InputComponent {
|
|
|
105
100
|
this.filterHintSlotContent();
|
|
106
101
|
}
|
|
107
102
|
render() {
|
|
108
|
-
return (h(Host, { key: '
|
|
103
|
+
return (h(Host, { key: 'd1aefdd1ee067638b48a8bb7469e4075843c5201', class: {
|
|
109
104
|
'b2b-input': true,
|
|
110
105
|
'b2b-input--error': this.invalid && !this.disabled,
|
|
111
|
-
} }, (this.label || this.labelSlot) && (h("b2b-input-label", {
|
|
106
|
+
} }, (this.label || this.labelSlot) && (h("b2b-input-label", { id: this.name, required: this.required }, h("slot", { name: "label" }, this.label))), h("div", { key: '03191ca189bf06ef720e3a3f6cd6ff1463f583eb', class: {
|
|
112
107
|
'b2b-input__wrapper': true,
|
|
113
108
|
'b2b-input__wrapper--focused': this.hasFocus,
|
|
114
109
|
'b2b-input__wrapper--disabled': this.disabled || this.groupDisabled,
|
|
115
|
-
} }, h("slot", { key: '
|
|
110
|
+
} }, h("slot", { key: '35e271cc677187e48dc1deb6eecbe533350c938f', name: "start" }), this.hasTextPrefix && h("div", { class: "border" }), h("input", { key: '30c671a92ceadb7d869f2349e03647d5faa69d20', class: {
|
|
116
111
|
'b2b-input__native-input': true,
|
|
117
112
|
['b2b-input__native-input--align-' + this.inputTextAlign]: true,
|
|
118
113
|
'b2b-input__native-input--disabled': this.disabled,
|
|
119
|
-
}, "aria-labelledby": this.name, type: this.type, placeholder: this.placeholder, value: this.value, name: this.name, disabled: this.disabled || this.groupDisabled, autoFocus: this.focusOnLoad, onFocus: this.onFocus, onBlur: this.onBlur, onInput: this.onInput, ref: el => (this.focusableElement = el) }), this.hasTextSuffix && h("div", {
|
|
114
|
+
}, "aria-labelledby": this.name, type: this.type, placeholder: this.placeholder, value: this.value, name: this.name, disabled: this.disabled || this.groupDisabled, autoFocus: this.focusOnLoad, onFocus: this.onFocus, onBlur: this.onBlur, onInput: this.onInput, ref: el => (this.focusableElement = el) }), this.hasTextSuffix && h("div", { class: "border" }), h("slot", { key: '0b0403289cbcbfaff7e2d37f1d5330bccd9d81e1', name: "end" })), (this.hint !== undefined || this.hintSlot) &&
|
|
120
115
|
(!this.invalid || this.disabled) ? (h("span", null, h("slot", { name: "hint" }, this.hint))) : (''), this.error !== undefined && this.invalid && !this.disabled ? (h("span", null, this.error)) : ('')));
|
|
121
116
|
}
|
|
122
117
|
static get is() { return "b2b-input"; }
|
|
@@ -135,7 +130,6 @@ export class InputComponent {
|
|
|
135
130
|
return {
|
|
136
131
|
"label": {
|
|
137
132
|
"type": "string",
|
|
138
|
-
"attribute": "label",
|
|
139
133
|
"mutable": false,
|
|
140
134
|
"complexType": {
|
|
141
135
|
"original": "string",
|
|
@@ -148,13 +142,11 @@ export class InputComponent {
|
|
|
148
142
|
"tags": [],
|
|
149
143
|
"text": "The input label."
|
|
150
144
|
},
|
|
151
|
-
"
|
|
152
|
-
"setter": false,
|
|
145
|
+
"attribute": "label",
|
|
153
146
|
"reflect": false
|
|
154
147
|
},
|
|
155
148
|
"required": {
|
|
156
149
|
"type": "boolean",
|
|
157
|
-
"attribute": "required",
|
|
158
150
|
"mutable": false,
|
|
159
151
|
"complexType": {
|
|
160
152
|
"original": "boolean",
|
|
@@ -167,14 +159,12 @@ export class InputComponent {
|
|
|
167
159
|
"tags": [],
|
|
168
160
|
"text": "Adds an asterisk at the end of the label to signify that the field is required."
|
|
169
161
|
},
|
|
170
|
-
"
|
|
171
|
-
"setter": false,
|
|
162
|
+
"attribute": "required",
|
|
172
163
|
"reflect": true,
|
|
173
164
|
"defaultValue": "false"
|
|
174
165
|
},
|
|
175
166
|
"type": {
|
|
176
167
|
"type": "string",
|
|
177
|
-
"attribute": "type",
|
|
178
168
|
"mutable": false,
|
|
179
169
|
"complexType": {
|
|
180
170
|
"original": "| 'text'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'url'",
|
|
@@ -187,14 +177,12 @@ export class InputComponent {
|
|
|
187
177
|
"tags": [],
|
|
188
178
|
"text": "The type of the input. All native HTML types except date or month are supported. Default is text."
|
|
189
179
|
},
|
|
190
|
-
"
|
|
191
|
-
"setter": false,
|
|
180
|
+
"attribute": "type",
|
|
192
181
|
"reflect": true,
|
|
193
182
|
"defaultValue": "'text'"
|
|
194
183
|
},
|
|
195
184
|
"disabled": {
|
|
196
185
|
"type": "boolean",
|
|
197
|
-
"attribute": "disabled",
|
|
198
186
|
"mutable": false,
|
|
199
187
|
"complexType": {
|
|
200
188
|
"original": "boolean",
|
|
@@ -207,14 +195,12 @@ export class InputComponent {
|
|
|
207
195
|
"tags": [],
|
|
208
196
|
"text": "Whether or not the input is disabled. Default is false."
|
|
209
197
|
},
|
|
210
|
-
"
|
|
211
|
-
"setter": false,
|
|
198
|
+
"attribute": "disabled",
|
|
212
199
|
"reflect": true,
|
|
213
200
|
"defaultValue": "false"
|
|
214
201
|
},
|
|
215
202
|
"invalid": {
|
|
216
203
|
"type": "boolean",
|
|
217
|
-
"attribute": "invalid",
|
|
218
204
|
"mutable": false,
|
|
219
205
|
"complexType": {
|
|
220
206
|
"original": "boolean",
|
|
@@ -227,14 +213,12 @@ export class InputComponent {
|
|
|
227
213
|
"tags": [],
|
|
228
214
|
"text": "Whether the input is currently invalid. If true, the input is rendered with error styles. Per default it is false."
|
|
229
215
|
},
|
|
230
|
-
"
|
|
231
|
-
"setter": false,
|
|
216
|
+
"attribute": "invalid",
|
|
232
217
|
"reflect": true,
|
|
233
218
|
"defaultValue": "false"
|
|
234
219
|
},
|
|
235
220
|
"placeholder": {
|
|
236
221
|
"type": "string",
|
|
237
|
-
"attribute": "placeholder",
|
|
238
222
|
"mutable": false,
|
|
239
223
|
"complexType": {
|
|
240
224
|
"original": "string",
|
|
@@ -247,14 +231,12 @@ export class InputComponent {
|
|
|
247
231
|
"tags": [],
|
|
248
232
|
"text": "A placeholder for the input field. Per default, it is null."
|
|
249
233
|
},
|
|
250
|
-
"
|
|
251
|
-
"setter": false,
|
|
234
|
+
"attribute": "placeholder",
|
|
252
235
|
"reflect": true,
|
|
253
236
|
"defaultValue": "null"
|
|
254
237
|
},
|
|
255
238
|
"value": {
|
|
256
239
|
"type": "string",
|
|
257
|
-
"attribute": "value",
|
|
258
240
|
"mutable": true,
|
|
259
241
|
"complexType": {
|
|
260
242
|
"original": "string",
|
|
@@ -267,14 +249,12 @@ export class InputComponent {
|
|
|
267
249
|
"tags": [],
|
|
268
250
|
"text": "The default value of the input field. If defined, it will prefill the input."
|
|
269
251
|
},
|
|
270
|
-
"
|
|
271
|
-
"setter": false,
|
|
252
|
+
"attribute": "value",
|
|
272
253
|
"reflect": true,
|
|
273
254
|
"defaultValue": "null"
|
|
274
255
|
},
|
|
275
256
|
"name": {
|
|
276
257
|
"type": "string",
|
|
277
|
-
"attribute": "name",
|
|
278
258
|
"mutable": false,
|
|
279
259
|
"complexType": {
|
|
280
260
|
"original": "string",
|
|
@@ -287,13 +267,11 @@ export class InputComponent {
|
|
|
287
267
|
"tags": [],
|
|
288
268
|
"text": "The name of the input. Use it to group label and input together and make it more accessible."
|
|
289
269
|
},
|
|
290
|
-
"
|
|
291
|
-
"setter": false,
|
|
270
|
+
"attribute": "name",
|
|
292
271
|
"reflect": true
|
|
293
272
|
},
|
|
294
273
|
"hint": {
|
|
295
274
|
"type": "string",
|
|
296
|
-
"attribute": "hint",
|
|
297
275
|
"mutable": false,
|
|
298
276
|
"complexType": {
|
|
299
277
|
"original": "string",
|
|
@@ -306,13 +284,11 @@ export class InputComponent {
|
|
|
306
284
|
"tags": [],
|
|
307
285
|
"text": "The hint text that appears underneath the input field."
|
|
308
286
|
},
|
|
309
|
-
"
|
|
310
|
-
"setter": false,
|
|
287
|
+
"attribute": "hint",
|
|
311
288
|
"reflect": false
|
|
312
289
|
},
|
|
313
290
|
"error": {
|
|
314
291
|
"type": "string",
|
|
315
|
-
"attribute": "error",
|
|
316
292
|
"mutable": false,
|
|
317
293
|
"complexType": {
|
|
318
294
|
"original": "string",
|
|
@@ -325,13 +301,11 @@ export class InputComponent {
|
|
|
325
301
|
"tags": [],
|
|
326
302
|
"text": "The error message that is shown if the input is invalid."
|
|
327
303
|
},
|
|
328
|
-
"
|
|
329
|
-
"setter": false,
|
|
304
|
+
"attribute": "error",
|
|
330
305
|
"reflect": false
|
|
331
306
|
},
|
|
332
307
|
"focusOnLoad": {
|
|
333
308
|
"type": "boolean",
|
|
334
|
-
"attribute": "focus-on-load",
|
|
335
309
|
"mutable": false,
|
|
336
310
|
"complexType": {
|
|
337
311
|
"original": "boolean",
|
|
@@ -344,14 +318,12 @@ export class InputComponent {
|
|
|
344
318
|
"tags": [],
|
|
345
319
|
"text": "When setting the autofocus to true, the input element will be focused when the page loads."
|
|
346
320
|
},
|
|
347
|
-
"
|
|
348
|
-
"setter": false,
|
|
321
|
+
"attribute": "focus-on-load",
|
|
349
322
|
"reflect": false,
|
|
350
323
|
"defaultValue": "false"
|
|
351
324
|
},
|
|
352
325
|
"groupDisabled": {
|
|
353
326
|
"type": "boolean",
|
|
354
|
-
"attribute": "group-disabled",
|
|
355
327
|
"mutable": false,
|
|
356
328
|
"complexType": {
|
|
357
329
|
"original": "boolean",
|
|
@@ -367,14 +339,12 @@ export class InputComponent {
|
|
|
367
339
|
}],
|
|
368
340
|
"text": ""
|
|
369
341
|
},
|
|
370
|
-
"
|
|
371
|
-
"setter": false,
|
|
342
|
+
"attribute": "group-disabled",
|
|
372
343
|
"reflect": false,
|
|
373
344
|
"defaultValue": "false"
|
|
374
345
|
},
|
|
375
346
|
"inputTextAlign": {
|
|
376
347
|
"type": "string",
|
|
377
|
-
"attribute": "input-text-align",
|
|
378
348
|
"mutable": false,
|
|
379
349
|
"complexType": {
|
|
380
350
|
"original": "'left' | 'right' | 'center'",
|
|
@@ -387,8 +357,7 @@ export class InputComponent {
|
|
|
387
357
|
"tags": [],
|
|
388
358
|
"text": "The alignment of the text."
|
|
389
359
|
},
|
|
390
|
-
"
|
|
391
|
-
"setter": false,
|
|
360
|
+
"attribute": "input-text-align",
|
|
392
361
|
"reflect": false,
|
|
393
362
|
"defaultValue": "'left'"
|
|
394
363
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
|
+
import { InputComponent } from "./input";
|
|
4
|
+
it('should render the input', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [InputComponent],
|
|
7
|
+
template: () => h("b2b-input", { label: "test" }),
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
it('should render with a placeholder', async () => {
|
|
12
|
+
const page = await newSpecPage({
|
|
13
|
+
components: [InputComponent],
|
|
14
|
+
template: () => (h("b2b-input", { label: "test", placeholder: "test placeholder" })),
|
|
15
|
+
});
|
|
16
|
+
expect(page.root).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
it('should render a hint message if a hint string is specified', async () => {
|
|
19
|
+
const page = await newSpecPage({
|
|
20
|
+
components: [InputComponent],
|
|
21
|
+
template: () => (h("b2b-input", { label: "test", hint: "This is a test hint" })),
|
|
22
|
+
});
|
|
23
|
+
expect(page.root).toMatchSnapshot();
|
|
24
|
+
});
|
|
25
|
+
it('should apply an error style to the host element if invalid is set to true', async () => {
|
|
26
|
+
const page = await newSpecPage({
|
|
27
|
+
components: [InputComponent],
|
|
28
|
+
template: () => (h("b2b-input", { label: "test", error: "This is a test error", invalid: true })),
|
|
29
|
+
});
|
|
30
|
+
expect(page.root).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
it('should render an error message if an error is specified and the input is set to invalid', async () => {
|
|
33
|
+
const page = await newSpecPage({
|
|
34
|
+
components: [InputComponent],
|
|
35
|
+
template: () => (h("b2b-input", { label: "test", error: "This is a test error", invalid: true })),
|
|
36
|
+
});
|
|
37
|
+
expect(page.root).toMatchSnapshot();
|
|
38
|
+
});
|
|
39
|
+
it('should render a hint if invalid and disabled are true at the same time', async () => {
|
|
40
|
+
const page = await newSpecPage({
|
|
41
|
+
components: [InputComponent],
|
|
42
|
+
template: () => (h("b2b-input", { label: "test", error: "This is a test error", hint: "This is a test hint", invalid: true, disabled: true })),
|
|
43
|
+
});
|
|
44
|
+
expect(page.root).toMatchSnapshot();
|
|
45
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('B2B Input Group', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`
|
|
7
|
+
<b2b-input-group hint="A group hint" error="A group error">
|
|
8
|
+
<b2b-input slot="start" label="Search Term"></b2b-input>
|
|
9
|
+
<b2b-dropdown label="Data Set" invalid error="an error">
|
|
10
|
+
<option value="one">€</option>
|
|
11
|
+
<option value="one">$</option>
|
|
12
|
+
</b2b-dropdown>
|
|
13
|
+
<b2b-input label="Another input" invalid error="an error"></b2b-input>
|
|
14
|
+
<b2b-dropdown>
|
|
15
|
+
<option value="one">€</option>
|
|
16
|
+
<option value="one">$</option>
|
|
17
|
+
</b2b-dropdown>
|
|
18
|
+
<b2b-button slot="end" variant="primary" disabled><b2b-icon-100 icon="b2b_icon-search"></b2b-icon-100></b2b-button>
|
|
19
|
+
</b2b-input-group>`);
|
|
20
|
+
});
|
|
21
|
+
it('should render the input group component', async () => {
|
|
22
|
+
const element = await page.find('b2b-input-group');
|
|
23
|
+
expect(element).not.toBeNull();
|
|
24
|
+
});
|
|
25
|
+
it('should disable the input group component', async () => {
|
|
26
|
+
let element = await page.find('b2b-input-group');
|
|
27
|
+
expect(element).not.toHaveAttribute('disabled');
|
|
28
|
+
element.setAttribute('disabled', true);
|
|
29
|
+
await page.waitForChanges();
|
|
30
|
+
element = await page.find('b2b-input-group');
|
|
31
|
+
expect(element).toHaveAttribute('disabled');
|
|
32
|
+
});
|
|
33
|
+
it('should disable individual elements of the group and keep their state when the group is dis- and enabled', async () => {
|
|
34
|
+
let button = await page.find('b2b-button');
|
|
35
|
+
expect(await button.getProperty('disabled')).toBe(true);
|
|
36
|
+
let group = await page.find('b2b-input-group');
|
|
37
|
+
await group.setProperty('disabled', true);
|
|
38
|
+
await page.waitForChanges();
|
|
39
|
+
expect(await group.getProperty('disabled')).toBe(true);
|
|
40
|
+
await group.setProperty('disabled', false);
|
|
41
|
+
await page.waitForChanges();
|
|
42
|
+
expect(await group.getProperty('disabled')).toBe(false);
|
|
43
|
+
expect(await button.getProperty('disabled')).toBe(true);
|
|
44
|
+
});
|
|
45
|
+
it('should render a group hint if one is specified', async () => {
|
|
46
|
+
const element = await page.find('b2b-input-group >>> span');
|
|
47
|
+
expect(element).toEqualText('A group hint');
|
|
48
|
+
});
|
|
49
|
+
it('should render a group error if one is specified and the group is set to invalid', async () => {
|
|
50
|
+
const element = await page.find('b2b-input-group');
|
|
51
|
+
element.setAttribute('invalid', true);
|
|
52
|
+
await page.waitForChanges();
|
|
53
|
+
const error = await page.find('b2b-input-group >>> span');
|
|
54
|
+
expect(error).toEqualText('A group error');
|
|
55
|
+
});
|
|
56
|
+
it('should not render a group error if the group is disabled', async () => {
|
|
57
|
+
const element = await page.find('b2b-input-group');
|
|
58
|
+
const hint = await page.find('b2b-input-group >>> span');
|
|
59
|
+
element.setAttribute('disabled', true);
|
|
60
|
+
expect(hint).toEqualText('A group hint');
|
|
61
|
+
});
|
|
62
|
+
it('should remove all children texts from individual components', async () => {
|
|
63
|
+
const input = await page.find('b2b-input');
|
|
64
|
+
expect(input.error).not.toBeDefined;
|
|
65
|
+
expect(input.hint).not.toBeDefined;
|
|
66
|
+
const dropdown = await page.find('b2b-dropdown');
|
|
67
|
+
expect(dropdown.error).not.toBeDefined;
|
|
68
|
+
expect(dropdown.hint).not.toBeDefined;
|
|
69
|
+
});
|
|
70
|
+
it('should not prevent individual events from being triggered in the children', async () => {
|
|
71
|
+
const input = await page.find('b2b-input >>> input');
|
|
72
|
+
const inputSpy = await page.spyOnEvent('b2b-input');
|
|
73
|
+
await input.press('KeyA');
|
|
74
|
+
await page.waitForChanges();
|
|
75
|
+
expect(inputSpy).toHaveReceivedEvent();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class B2BInputGroup {
|
|
3
3
|
constructor() {
|
|
4
|
-
/** Whether or not the input group is invalid and should be rendered with error styles as a whole. Per default it is false. */
|
|
5
|
-
this.invalid = false;
|
|
6
|
-
/** Whether or not the input group is disabled as a whole. Per default it is false. */
|
|
7
|
-
this.disabled = false;
|
|
8
4
|
this.removeText = () => {
|
|
9
5
|
const nodes = this.getChildNodes();
|
|
10
6
|
nodes.forEach(node => {
|
|
@@ -41,6 +37,10 @@ export class B2BInputGroup {
|
|
|
41
37
|
this.getChildNodes = () => {
|
|
42
38
|
return Array.from(this.host.children);
|
|
43
39
|
};
|
|
40
|
+
this.invalid = false;
|
|
41
|
+
this.disabled = false;
|
|
42
|
+
this.error = undefined;
|
|
43
|
+
this.hint = undefined;
|
|
44
44
|
}
|
|
45
45
|
invalidChanged() {
|
|
46
46
|
this.toggleAllError();
|
|
@@ -56,7 +56,7 @@ export class B2BInputGroup {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '24026d76ddfed82c245b4d3642ecb01afb7f77a8' }, h("div", { key: '28919f9eaf9621f23f48dee02160d7096ca2d371', class: { 'b2b-input-wrapper': true } }, h("slot", { key: '49b4c84997cfcfe6ac0866c01a06919b5e209a3f', name: "start" }), h("slot", { key: 'e20d5a7f1590833eed730eea609e439bc077ea98' }), h("slot", { key: '1991b8a7e3094d5f8531c227de435b36f32e9b33', name: "end" })), (this.hint || (this.invalid && !this.disabled)) && (h("span", { class: {
|
|
60
60
|
'b2b-input-wrapper__hint': true,
|
|
61
61
|
'b2b-input-wrapper__hint--error': this.invalid && !this.disabled,
|
|
62
62
|
} }, this.invalid && !this.disabled ? this.error : this.hint))));
|
|
@@ -77,7 +77,6 @@ export class B2BInputGroup {
|
|
|
77
77
|
return {
|
|
78
78
|
"invalid": {
|
|
79
79
|
"type": "boolean",
|
|
80
|
-
"attribute": "invalid",
|
|
81
80
|
"mutable": false,
|
|
82
81
|
"complexType": {
|
|
83
82
|
"original": "boolean",
|
|
@@ -90,14 +89,12 @@ export class B2BInputGroup {
|
|
|
90
89
|
"tags": [],
|
|
91
90
|
"text": "Whether or not the input group is invalid and should be rendered with error styles as a whole. Per default it is false."
|
|
92
91
|
},
|
|
93
|
-
"
|
|
94
|
-
"setter": false,
|
|
92
|
+
"attribute": "invalid",
|
|
95
93
|
"reflect": false,
|
|
96
94
|
"defaultValue": "false"
|
|
97
95
|
},
|
|
98
96
|
"disabled": {
|
|
99
97
|
"type": "boolean",
|
|
100
|
-
"attribute": "disabled",
|
|
101
98
|
"mutable": false,
|
|
102
99
|
"complexType": {
|
|
103
100
|
"original": "boolean",
|
|
@@ -110,14 +107,12 @@ export class B2BInputGroup {
|
|
|
110
107
|
"tags": [],
|
|
111
108
|
"text": "Whether or not the input group is disabled as a whole. Per default it is false."
|
|
112
109
|
},
|
|
113
|
-
"
|
|
114
|
-
"setter": false,
|
|
110
|
+
"attribute": "disabled",
|
|
115
111
|
"reflect": false,
|
|
116
112
|
"defaultValue": "false"
|
|
117
113
|
},
|
|
118
114
|
"error": {
|
|
119
115
|
"type": "string",
|
|
120
|
-
"attribute": "error",
|
|
121
116
|
"mutable": false,
|
|
122
117
|
"complexType": {
|
|
123
118
|
"original": "string",
|
|
@@ -130,13 +125,11 @@ export class B2BInputGroup {
|
|
|
130
125
|
"tags": [],
|
|
131
126
|
"text": "A group error text. It will only show if invalid is set to true."
|
|
132
127
|
},
|
|
133
|
-
"
|
|
134
|
-
"setter": false,
|
|
128
|
+
"attribute": "error",
|
|
135
129
|
"reflect": false
|
|
136
130
|
},
|
|
137
131
|
"hint": {
|
|
138
132
|
"type": "string",
|
|
139
|
-
"attribute": "hint",
|
|
140
133
|
"mutable": false,
|
|
141
134
|
"complexType": {
|
|
142
135
|
"original": "string",
|
|
@@ -149,8 +142,7 @@ export class B2BInputGroup {
|
|
|
149
142
|
"tags": [],
|
|
150
143
|
"text": "The hint text that appears underneath the input group."
|
|
151
144
|
},
|
|
152
|
-
"
|
|
153
|
-
"setter": false,
|
|
145
|
+
"attribute": "hint",
|
|
154
146
|
"reflect": false
|
|
155
147
|
}
|
|
156
148
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
|
+
import { B2BInputGroup } from "./input-group";
|
|
4
|
+
import { InputComponent } from "../input/input";
|
|
5
|
+
import { ButtonComponent } from "../button/button";
|
|
6
|
+
import { DropdownComponent } from "../dropdown/dropdown";
|
|
7
|
+
describe('B2B Input Group', () => {
|
|
8
|
+
it('should render content wrapped in the input group', async () => {
|
|
9
|
+
const page = await newSpecPage({
|
|
10
|
+
components: [
|
|
11
|
+
B2BInputGroup,
|
|
12
|
+
InputComponent,
|
|
13
|
+
ButtonComponent,
|
|
14
|
+
DropdownComponent,
|
|
15
|
+
],
|
|
16
|
+
template: () => (h("b2b-input-group", null, h("b2b-input", { label: "Search Term" }), h("b2b-dropdown", null, h("option", { value: "data-1" }, "Data Set 1"), h("option", { value: "data-2" }, "Data Set 2")), h("b2b-button", { variant: "primary" }, "Search"))),
|
|
17
|
+
});
|
|
18
|
+
expect(page.root).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
it('should render a group hint if it is specified', async () => {
|
|
21
|
+
const page = await newSpecPage({
|
|
22
|
+
components: [
|
|
23
|
+
B2BInputGroup,
|
|
24
|
+
InputComponent,
|
|
25
|
+
ButtonComponent,
|
|
26
|
+
DropdownComponent,
|
|
27
|
+
],
|
|
28
|
+
template: () => (h("b2b-input-group", { hint: "A group hint" }, h("b2b-input", { label: "Search Term" }), h("b2b-dropdown", null, h("option", { value: "data-1" }, "Data Set 1"), h("option", { value: "data-2" }, "Data Set 2")), h("b2b-button", { variant: "primary" }, "Search"))),
|
|
29
|
+
});
|
|
30
|
+
expect(page.root).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
it('should render a group error if one is specified and the group is invalid', async () => {
|
|
33
|
+
const page = await newSpecPage({
|
|
34
|
+
components: [
|
|
35
|
+
B2BInputGroup,
|
|
36
|
+
InputComponent,
|
|
37
|
+
ButtonComponent,
|
|
38
|
+
DropdownComponent,
|
|
39
|
+
],
|
|
40
|
+
template: () => (h("b2b-input-group", { error: "A group error", invalid: true }, h("b2b-input", { label: "Search Term" }), h("b2b-dropdown", null, h("option", { value: "data-1" }, "Data Set 1"), h("option", { value: "data-2" }, "Data Set 2")), h("b2b-button", { variant: "primary" }, "Search"))),
|
|
41
|
+
});
|
|
42
|
+
expect(page.root).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
it('should not render a group error if the group is invalid and disabled', async () => {
|
|
45
|
+
const page = await newSpecPage({
|
|
46
|
+
components: [
|
|
47
|
+
B2BInputGroup,
|
|
48
|
+
InputComponent,
|
|
49
|
+
ButtonComponent,
|
|
50
|
+
DropdownComponent,
|
|
51
|
+
],
|
|
52
|
+
template: () => (h("b2b-input-group", { invalid: true, disabled: true, hint: "A group hint", error: "A group error" }, h("b2b-input", { label: "Search Term" }), h("b2b-dropdown", null, h("option", { value: "data-1" }, "Data Set 1"), h("option", { value: "data-2" }, "Data Set 2")), h("b2b-button", { variant: "primary" }, "Search"))),
|
|
53
|
+
});
|
|
54
|
+
expect(page.root).toMatchSnapshot();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('b2b-input-label', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<b2b-input-label for="testId">A label</b2b-input-label>');
|
|
6
|
+
const element = await page.find('b2b-input-label');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
expect(element).toBeDefined();
|
|
9
|
+
});
|
|
10
|
+
});
|