@otto-de/b2b-core-components 1.4.0 → 1.6.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.css +1 -1
- package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
- package/dist/b2b-core-components/p-01fd54a1.entry.js +1 -0
- package/dist/b2b-core-components/p-04fc18cd.entry.js +1 -0
- package/dist/b2b-core-components/p-06aa96a8.entry.js +1 -0
- package/dist/b2b-core-components/p-077217b3.entry.js +1 -0
- package/dist/b2b-core-components/p-0965b990.entry.js +1 -0
- package/dist/b2b-core-components/p-0beabdb4.entry.js +1 -0
- package/dist/b2b-core-components/p-163466cf.entry.js +1 -0
- package/dist/b2b-core-components/{p-c2bcf0a8.entry.js → p-197c1a6d.entry.js} +1 -1
- package/dist/b2b-core-components/p-1d007eea.entry.js +1 -0
- package/dist/b2b-core-components/{p-400b3111.entry.js → p-1e2752b2.entry.js} +1 -1
- package/dist/b2b-core-components/p-2328144b.entry.js +1 -0
- package/dist/b2b-core-components/{p-9184036b.entry.js → p-2ad8bdb6.entry.js} +1 -1
- package/dist/b2b-core-components/p-2d01e68a.entry.js +1 -0
- package/dist/b2b-core-components/{p-34f6555e.entry.js → p-3c0671ef.entry.js} +1 -1
- package/dist/b2b-core-components/p-42e7f397.entry.js +1 -0
- package/dist/b2b-core-components/p-44ccd8f4.entry.js +1 -0
- package/dist/b2b-core-components/p-542a358a.entry.js +1 -0
- package/dist/b2b-core-components/p-54fd68eb.entry.js +1 -0
- package/dist/b2b-core-components/p-60badad5.entry.js +1 -0
- package/dist/b2b-core-components/p-6140304e.entry.js +1 -0
- package/dist/b2b-core-components/{p-f0aa5e83.entry.js → p-681d6880.entry.js} +1 -1
- package/dist/b2b-core-components/p-8ad1bb92.entry.js +1 -0
- package/dist/b2b-core-components/p-90a3ffed.entry.js +1 -0
- package/dist/b2b-core-components/p-97ef9805.entry.js +1 -0
- package/dist/b2b-core-components/{p-48d4d224.entry.js → p-a50ea33f.entry.js} +1 -1
- package/dist/b2b-core-components/p-b3ccfc58.entry.js +1 -0
- package/dist/b2b-core-components/p-b6a8a06f.entry.js +1 -0
- package/dist/b2b-core-components/p-b8049234.entry.js +1 -0
- package/dist/b2b-core-components/p-bb5e7c53.js +1 -0
- package/dist/b2b-core-components/p-c294dd0c.entry.js +1 -0
- package/dist/b2b-core-components/p-d07210e2.entry.js +1 -0
- package/dist/b2b-core-components/p-d7bb8aa1.entry.js +1 -0
- package/dist/b2b-core-components/p-d83c2084.entry.js +1 -0
- package/dist/b2b-core-components/p-db7d2ec3.entry.js +1 -0
- package/dist/b2b-core-components/{p-9facba86.entry.js → p-dd79ab5b.entry.js} +1 -1
- package/dist/b2b-core-components/p-e5b78075.entry.js +1 -0
- package/dist/b2b-core-components/p-e811411a.entry.js +1 -0
- package/dist/b2b-core-components/p-f190bf79.entry.js +1 -0
- package/dist/b2b-core-components/p-f24515bf.entry.js +1 -0
- package/dist/b2b-core-components/p-f3ce95bf.js +2 -0
- package/dist/b2b-core-components/p-f7e9f889.entry.js +1 -0
- package/dist/cjs/b2b-alert.cjs.entry.js +4 -4
- package/dist/cjs/b2b-anchor.cjs.entry.js +2 -2
- package/dist/cjs/b2b-button_2.cjs.entry.js +13 -9
- package/dist/cjs/b2b-card.cjs.entry.js +2 -2
- package/dist/cjs/b2b-checkbox-group.cjs.entry.js +7 -5
- package/dist/cjs/b2b-checkbox_3.cjs.entry.js +206 -0
- package/dist/cjs/b2b-core-components.cjs.js +3 -3
- package/dist/cjs/b2b-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/b2b-grid-col.cjs.entry.js +1 -1
- package/dist/cjs/b2b-grid-row.cjs.entry.js +2 -2
- package/dist/cjs/b2b-grid.cjs.entry.js +1 -1
- package/dist/cjs/b2b-headline.cjs.entry.js +2 -2
- package/dist/cjs/b2b-icon.cjs.entry.js +4 -4
- package/dist/cjs/b2b-input-group_2.cjs.entry.js +12 -9
- package/dist/cjs/b2b-input-label.cjs.entry.js +1 -1
- package/dist/cjs/b2b-input_2.cjs.entry.js +8 -7
- package/dist/cjs/b2b-label.cjs.entry.js +2 -2
- package/dist/cjs/b2b-modal.cjs.entry.js +5 -5
- package/dist/cjs/b2b-pagination.cjs.entry.js +5 -5
- package/dist/cjs/b2b-paragraph.cjs.entry.js +5 -5
- package/dist/cjs/b2b-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/b2b-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/b2b-required-separator.cjs.entry.js +3 -3
- package/dist/cjs/b2b-rounded-icon.cjs.entry.js +4 -2
- package/dist/cjs/b2b-scrollable-container.cjs.entry.js +2 -2
- package/dist/cjs/b2b-search.cjs.entry.js +6 -1
- package/dist/cjs/b2b-separator.cjs.entry.js +2 -2
- package/dist/cjs/b2b-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/b2b-tab.cjs.entry.js +2 -2
- package/dist/cjs/b2b-table-row.cjs.entry.js +78 -23
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +87 -26
- package/dist/cjs/b2b-table.cjs.entry.js +13 -13
- package/dist/cjs/b2b-textarea.cjs.entry.js +2 -2
- package/dist/cjs/b2b-toggle-button.cjs.entry.js +7 -7
- package/dist/cjs/b2b-toggle-group.cjs.entry.js +3 -3
- package/dist/cjs/b2b-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/b2b-wizard-icon.cjs.entry.js +6 -4
- package/dist/cjs/b2b-wizard-step.cjs.entry.js +26 -0
- package/dist/cjs/b2b-wizard.cjs.entry.js +61 -0
- package/dist/cjs/{index-496aa5dd.js → index-04e07a00.js} +100 -35
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{types-ef85a0bf.js → table.types-00c8228a.js} +4 -4
- package/dist/cjs/wizard.types-690c64bb.js +10 -0
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/alert/alert.css +8 -9
- package/dist/collection/components/alert/alert.e2e.js +67 -0
- package/dist/collection/components/alert/alert.js +2 -2
- package/dist/collection/components/anchor/anchor.css +3 -4
- package/dist/collection/components/anchor/anchor.spec.js +68 -0
- package/dist/collection/components/button/button.css +36 -41
- package/dist/collection/components/button/button.e2e.js +80 -0
- package/dist/collection/components/button/button.js +31 -6
- package/dist/collection/components/card/card.css +3 -4
- package/dist/collection/components/card/card.e2e.js +110 -0
- package/dist/collection/components/card/card.spec.js +32 -0
- package/dist/collection/components/checkbox/checkbox.css +36 -16
- package/dist/collection/components/checkbox/checkbox.e2e.js +30 -0
- package/dist/collection/components/checkbox/checkbox.js +81 -6
- package/dist/collection/components/checkbox/checkbox.spec.js +45 -0
- package/dist/collection/components/checkbox-group/checkbox-group.css +7 -8
- package/dist/collection/components/checkbox-group/checkbox-group.e2e.js +78 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +5 -3
- package/dist/collection/components/checkbox-group/checkbox-group.spec.js +38 -0
- package/dist/collection/components/dropdown/dropdown.css +9 -10
- package/dist/collection/components/dropdown/dropdown.e2e.js +48 -0
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/dropdown/dropdown.spec.js +52 -0
- package/dist/collection/components/grid/grid.e2e.js +17 -0
- package/dist/collection/components/grid/row.js +1 -1
- package/dist/collection/components/headline/headline.css +3 -4
- package/dist/collection/components/headline/headline.e2e.js +13 -0
- package/dist/collection/components/headline/headline.spec.js +67 -0
- package/dist/collection/components/icon/icon.css +10 -11
- package/dist/collection/components/icon/icon.js +2 -2
- package/dist/collection/components/icon/icon.spec.js +21 -0
- package/dist/collection/components/input/input.css +16 -17
- package/dist/collection/components/input/input.e2e.js +43 -0
- package/dist/collection/components/input/input.js +26 -4
- package/dist/collection/components/input/input.spec.js +45 -0
- package/dist/collection/components/input-group/input-group.css +6 -7
- package/dist/collection/components/input-group/input-group.e2e.js +76 -0
- package/dist/collection/components/input-group/input-group.js +6 -4
- 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-list/input-list.css +8 -9
- package/dist/collection/components/input-list/input-list.e2e.js +227 -0
- package/dist/collection/components/input-list/input-list.js +24 -2
- package/dist/collection/components/label/label.css +4 -5
- package/dist/collection/components/label/label.e2e.js +17 -0
- package/dist/collection/components/label/label.spec.js +58 -0
- package/dist/collection/components/modal/modal.css +14 -20
- package/dist/collection/components/modal/modal.e2e.js +115 -0
- package/dist/collection/components/modal/modal.js +3 -3
- package/dist/collection/components/pagination/pagination.css +8 -9
- package/dist/collection/components/pagination/pagination.e2e.js +256 -0
- package/dist/collection/components/pagination/pagination.js +3 -3
- package/dist/collection/components/pagination/pagination.spec.js +104 -0
- package/dist/collection/components/paragraph/paragraph.css +11 -12
- package/dist/collection/components/paragraph/paragraph.e2e.js +13 -0
- package/dist/collection/components/paragraph/paragraph.js +3 -3
- package/dist/collection/components/radio/radio.css +4 -5
- package/dist/collection/components/radio/radio.e2e.js +36 -0
- package/dist/collection/components/radio/radio.spec.js +38 -0
- package/dist/collection/components/radio-group/radio-group.css +4 -5
- package/dist/collection/components/radio-group/radio-group.e2e.js +71 -0
- package/dist/collection/components/radio-group/radio-group.spec.js +31 -0
- package/dist/collection/components/required-separator/required-separator.css +5 -6
- package/dist/collection/components/required-separator/required-separator.e2e.js +17 -0
- package/dist/collection/components/required-separator/required-separator.js +1 -1
- package/dist/collection/components/rounded-icon/rounded-icon.css +4 -5
- package/dist/collection/components/rounded-icon/rounded-icon.js +19 -0
- package/dist/collection/components/scrollable-container/scrollable-container.css +3 -4
- package/dist/collection/components/search/search.e2e.js +97 -0
- package/dist/collection/components/search/search.js +14 -0
- package/dist/collection/components/separator/separator.css +3 -4
- package/dist/collection/components/separator/separator.e2e.js +22 -0
- package/dist/collection/components/spinner/spinner.css +3 -4
- package/dist/collection/components/spinner/spinner.e2e.js +12 -0
- package/dist/collection/components/spinner/spinner.spec.js +41 -0
- package/dist/collection/components/tab/tab.css +3 -4
- package/dist/collection/components/tab/tab.e2e.js +35 -0
- package/dist/collection/components/tab/tab.spec.js +31 -0
- package/dist/collection/components/tab-group/tab-group.e2e.js +98 -0
- package/dist/collection/components/tab-panel/tab-panel.css +3 -4
- package/dist/collection/components/tab-panel/tab-panel.e2e.js +12 -0
- package/dist/collection/components/tab-panel/tab-panel.spec.js +10 -0
- package/dist/collection/components/table/stories.data.js +6 -6
- package/dist/collection/components/table/table-cell/table-cell.css +3 -4
- package/dist/collection/components/table/table-cell/table-cell.js +4 -4
- package/dist/collection/components/table/table-header/table-header.css +18 -19
- package/dist/collection/components/table/table-header/table-header.js +7 -7
- package/dist/collection/components/table/table-row/table-row.css +4 -5
- package/dist/collection/components/table/table-row/table-row.js +187 -28
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +4 -5
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +119 -24
- package/dist/collection/components/table/table.css +3 -4
- package/dist/collection/components/table/table.e2e.js +370 -0
- package/dist/collection/components/table/table.js +10 -10
- package/dist/collection/components/table/table.stories.js +17 -8
- package/dist/collection/components/table/utils.js +18 -0
- package/dist/collection/components/textarea/textarea.css +4 -5
- package/dist/collection/components/textarea/textarea.e2e.js +91 -0
- package/dist/collection/components/toggle-button/toggle-button.css +10 -11
- package/dist/collection/components/toggle-button/toggle-button.e2e.js +44 -0
- package/dist/collection/components/toggle-button/toggle-button.js +5 -5
- package/dist/collection/components/toggle-group/toggle-group.css +4 -5
- package/dist/collection/components/toggle-group/toggle-group.e2e.js +65 -0
- package/dist/collection/components/toggle-group/toggle-group.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +16 -17
- package/dist/collection/components/tooltip/tooltip.e2e.js +64 -0
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/components/wizard/wizard-step.js +95 -0
- package/dist/collection/components/wizard/wizard.css +240 -0
- package/dist/collection/components/wizard/wizard.e2e.js +149 -0
- package/dist/collection/components/wizard/wizard.js +125 -0
- package/dist/collection/components/wizard/wizard.stories.js +44 -0
- package/dist/collection/components/wizard-icon/wizard-icon.css +3 -4
- package/dist/collection/components/wizard-icon/wizard-icon.js +38 -8
- package/dist/collection/components/wizard-icon/wizard-icon.stories.js +14 -3
- package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
- package/dist/collection/{components/table/types.js → utils/types/table.types.js} +7 -3
- package/dist/collection/utils/types/wizard.types.js +6 -0
- package/dist/collection/utils/utils.spec.js +15 -0
- package/dist/components/b2b-alert.js +4 -4
- package/dist/components/b2b-anchor.js +2 -2
- package/dist/components/b2b-card.js +2 -2
- package/dist/components/b2b-checkbox-group.js +7 -5
- package/dist/components/b2b-checkbox.js +1 -99
- package/dist/components/b2b-dropdown.js +3 -3
- package/dist/components/b2b-grid-col.js +1 -1
- package/dist/components/b2b-grid-row.js +2 -2
- package/dist/components/b2b-grid.js +1 -1
- package/dist/components/b2b-label.js +2 -2
- package/dist/components/b2b-modal.js +5 -5
- package/dist/components/b2b-pagination.js +5 -5
- package/dist/components/b2b-paragraph.js +5 -5
- package/dist/components/b2b-radio-button.js +2 -2
- package/dist/components/b2b-radio-group.js +2 -2
- package/dist/components/b2b-required-separator.js +3 -3
- package/dist/components/b2b-scrollable-container.js +2 -2
- package/dist/components/b2b-search.js +7 -2
- package/dist/components/b2b-tab-group.js +1 -1
- package/dist/components/b2b-tab-panel.js +2 -2
- package/dist/components/b2b-tab.js +2 -2
- package/dist/components/b2b-table-row.js +97 -26
- package/dist/components/b2b-table-rowgroup.js +91 -27
- package/dist/components/b2b-table.js +11 -11
- package/dist/components/b2b-textarea.js +2 -2
- package/dist/components/b2b-toggle-button.js +7 -7
- package/dist/components/b2b-toggle-group.js +3 -3
- package/dist/components/b2b-tooltip.js +4 -4
- package/dist/components/b2b-wizard-icon.js +1 -47
- package/dist/components/b2b-wizard-step.d.ts +11 -0
- package/dist/components/b2b-wizard-step.js +62 -0
- package/dist/components/b2b-wizard.d.ts +11 -0
- package/dist/components/b2b-wizard.js +79 -0
- package/dist/components/button.js +13 -8
- package/dist/components/checkbox.js +123 -0
- package/dist/components/headline.js +2 -2
- package/dist/components/icon.js +4 -4
- package/dist/components/input-group.js +8 -6
- package/dist/components/input-label.js +1 -1
- package/dist/components/input-list-option.js +2 -2
- package/dist/components/input-list.js +6 -4
- package/dist/components/input.js +8 -6
- package/dist/components/rounded-icon.js +5 -2
- package/dist/components/separator.js +2 -2
- package/dist/components/spinner.js +2 -2
- package/dist/components/table-cell.js +3 -3
- package/dist/components/table-header.js +7 -7
- package/dist/components/{types.js → table.types.js} +4 -4
- package/dist/components/wizard-icon.js +52 -0
- package/dist/components/wizard.types.js +8 -0
- package/dist/custom-elements.json +132 -13
- package/dist/esm/b2b-alert.entry.js +4 -4
- package/dist/esm/b2b-anchor.entry.js +2 -2
- package/dist/esm/b2b-button_2.entry.js +13 -9
- package/dist/esm/b2b-card.entry.js +2 -2
- package/dist/esm/b2b-checkbox-group.entry.js +7 -5
- package/dist/esm/b2b-checkbox_3.entry.js +200 -0
- package/dist/esm/b2b-core-components.js +4 -4
- package/dist/esm/b2b-dropdown.entry.js +3 -3
- package/dist/esm/b2b-grid-col.entry.js +1 -1
- package/dist/esm/b2b-grid-row.entry.js +2 -2
- package/dist/esm/b2b-grid.entry.js +1 -1
- package/dist/esm/b2b-headline.entry.js +2 -2
- package/dist/esm/b2b-icon.entry.js +4 -4
- package/dist/esm/b2b-input-group_2.entry.js +12 -9
- package/dist/esm/b2b-input-label.entry.js +1 -1
- package/dist/esm/b2b-input_2.entry.js +8 -7
- package/dist/esm/b2b-label.entry.js +2 -2
- package/dist/esm/b2b-modal.entry.js +5 -5
- package/dist/esm/b2b-pagination.entry.js +5 -5
- package/dist/esm/b2b-paragraph.entry.js +5 -5
- package/dist/esm/b2b-radio-button.entry.js +2 -2
- package/dist/esm/b2b-radio-group.entry.js +2 -2
- package/dist/esm/b2b-required-separator.entry.js +3 -3
- package/dist/esm/b2b-rounded-icon.entry.js +4 -2
- package/dist/esm/b2b-scrollable-container.entry.js +2 -2
- package/dist/esm/b2b-search.entry.js +6 -1
- package/dist/esm/b2b-separator.entry.js +2 -2
- package/dist/esm/b2b-tab-group.entry.js +1 -1
- package/dist/esm/b2b-tab-panel.entry.js +2 -2
- package/dist/esm/b2b-tab.entry.js +2 -2
- package/dist/esm/b2b-table-row.entry.js +77 -22
- package/dist/esm/b2b-table-rowgroup.entry.js +85 -24
- package/dist/esm/b2b-table.entry.js +11 -11
- package/dist/esm/b2b-textarea.entry.js +2 -2
- package/dist/esm/b2b-toggle-button.entry.js +7 -7
- package/dist/esm/b2b-toggle-group.entry.js +3 -3
- package/dist/esm/b2b-tooltip.entry.js +4 -4
- package/dist/esm/b2b-wizard-icon.entry.js +6 -4
- package/dist/esm/b2b-wizard-step.entry.js +22 -0
- package/dist/esm/b2b-wizard.entry.js +57 -0
- package/dist/esm/{index-026605c2.js → index-dfdbf4b9.js} +100 -35
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{types-5aa59787.js → table.types-dd829d83.js} +4 -4
- package/dist/esm/wizard.types-2a03b8e0.js +8 -0
- package/dist/types/components/alert/alert.stories.d.ts +1 -1
- package/dist/types/components/anchor/anchor.stories.d.ts +1 -1
- package/dist/types/components/button/button.d.ts +2 -0
- package/dist/types/components/button/button.stories.d.ts +1 -1
- package/dist/types/components/card/card.stories.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +8 -1
- package/dist/types/components/checkbox/checkbox.stories.d.ts +1 -1
- package/dist/types/components/checkbox-group/checkbox-group.stories.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown.stories.d.ts +1 -1
- package/dist/types/components/grid/grid.stories.d.ts +1 -1
- package/dist/types/components/headline/headline.stories.d.ts +1 -1
- package/dist/types/components/icon/icon.stories.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +2 -0
- package/dist/types/components/input/input.stories.d.ts +1 -1
- package/dist/types/components/input-group/input-group.stories.d.ts +1 -1
- package/dist/types/components/input-list/input-list.d.ts +2 -0
- package/dist/types/components/input-list/input-list.stories.d.ts +1 -1
- package/dist/types/components/label/label.stories.d.ts +1 -1
- package/dist/types/components/modal/modal.stories.d.ts +1 -1
- package/dist/types/components/pagination/pagination.stories.d.ts +1 -1
- package/dist/types/components/paragraph/paragraph.stories.d.ts +1 -1
- package/dist/types/components/radio/radio.stories.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.stories.d.ts +1 -1
- package/dist/types/components/required-separator/required-separator.stories.d.ts +1 -1
- package/dist/types/components/rounded-icon/rounded-icon.d.ts +4 -0
- package/dist/types/components/rounded-icon/rounded-icon.stories.d.ts +1 -1
- package/dist/types/components/scrollable-container/scrollable-container.stories.d.ts +1 -1
- package/dist/types/components/search/search.d.ts +1 -0
- package/dist/types/components/search/search.stories.d.ts +1 -1
- package/dist/types/components/separator/separator.stories.d.ts +1 -1
- package/dist/types/components/spinner/spinner.stories.d.ts +1 -1
- package/dist/types/components/tab-group/tab-group.stories.d.ts +1 -1
- package/dist/types/components/table/table-cell/table-cell.d.ts +1 -1
- package/dist/types/components/table/table-header/table-header.d.ts +1 -1
- package/dist/types/components/table/table-row/table-row.d.ts +23 -7
- package/dist/types/components/table/table-rowgroup/table-rowgroup.d.ts +13 -3
- package/dist/types/components/table/table.d.ts +2 -2
- package/dist/types/components/table/table.stories.d.ts +2 -1
- package/dist/types/components/table/utils.d.ts +4 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +1 -1
- package/dist/types/components/toggle-group/toggle-group.stories.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.stories.d.ts +1 -1
- package/dist/types/components/wizard/wizard-step.d.ts +11 -0
- package/dist/types/components/wizard/wizard.d.ts +19 -0
- package/dist/types/components/wizard/wizard.stories.d.ts +5 -0
- package/dist/types/components/wizard-icon/wizard-icon.d.ts +6 -2
- package/dist/types/components/wizard-icon/wizard-icon.stories.d.ts +3 -1
- package/dist/types/components.d.ts +167 -13
- package/dist/types/docs/tokens/color.stories.d.ts +1 -1
- package/dist/types/docs/tokens/font.stories.d.ts +1 -1
- package/dist/types/docs/tokens/size.stories.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -0
- package/dist/types/utils/interfaces/content.interface.d.ts +4 -0
- package/dist/types/utils/interfaces/form.interface.d.ts +1 -0
- package/dist/types/{components/table/types.d.ts → utils/types/table.types.d.ts} +7 -2
- package/dist/types/utils/types/wizard.types.d.ts +8 -0
- package/dist/web-types.json +184 -9
- package/loader/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/b2b-core-components/p-08a50b6c.entry.js +0 -1
- package/dist/b2b-core-components/p-10414c0b.entry.js +0 -1
- package/dist/b2b-core-components/p-144a3c59.entry.js +0 -1
- package/dist/b2b-core-components/p-1493f7df.entry.js +0 -1
- package/dist/b2b-core-components/p-14f1b674.entry.js +0 -1
- package/dist/b2b-core-components/p-15a499b0.entry.js +0 -1
- package/dist/b2b-core-components/p-22dab2b4.entry.js +0 -1
- package/dist/b2b-core-components/p-4b25559c.entry.js +0 -1
- package/dist/b2b-core-components/p-515eb49e.entry.js +0 -1
- package/dist/b2b-core-components/p-541ffefb.entry.js +0 -1
- package/dist/b2b-core-components/p-5572aab3.entry.js +0 -1
- package/dist/b2b-core-components/p-5c316460.entry.js +0 -1
- package/dist/b2b-core-components/p-686d6598.entry.js +0 -1
- package/dist/b2b-core-components/p-6e0e6acc.entry.js +0 -1
- package/dist/b2b-core-components/p-6e3b27cd.entry.js +0 -1
- package/dist/b2b-core-components/p-7af1b977.entry.js +0 -1
- package/dist/b2b-core-components/p-7ca9b704.entry.js +0 -1
- package/dist/b2b-core-components/p-81a52d1a.entry.js +0 -1
- package/dist/b2b-core-components/p-8970ae74.entry.js +0 -1
- package/dist/b2b-core-components/p-925e40af.entry.js +0 -1
- package/dist/b2b-core-components/p-965ae161.entry.js +0 -1
- package/dist/b2b-core-components/p-99f8cf34.entry.js +0 -1
- package/dist/b2b-core-components/p-a6248754.entry.js +0 -1
- package/dist/b2b-core-components/p-a7417890.js +0 -2
- package/dist/b2b-core-components/p-b6e0a6ea.entry.js +0 -1
- package/dist/b2b-core-components/p-ba74cde5.entry.js +0 -1
- package/dist/b2b-core-components/p-bf4c58dc.entry.js +0 -1
- package/dist/b2b-core-components/p-d6ce3259.entry.js +0 -1
- package/dist/b2b-core-components/p-da6a1f55.entry.js +0 -1
- package/dist/b2b-core-components/p-f0c565ef.entry.js +0 -1
- package/dist/b2b-core-components/p-fc639b29.entry.js +0 -1
- package/dist/b2b-core-components/p-ff49e330.entry.js +0 -1
- package/dist/cjs/b2b-checkbox.cjs.entry.js +0 -74
- package/dist/cjs/b2b-table-cell_2.cjs.entry.js +0 -119
- package/dist/esm/b2b-checkbox.entry.js +0 -70
- package/dist/esm/b2b-table-cell_2.entry.js +0 -114
- /package/dist/b2b-core-components/{p-4130f1ae.js → p-34eb99cb.js} +0 -0
|
@@ -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
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Tue,
|
|
3
|
+
* Generated on Tue, 22 Aug 2023 11:28:34 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
--b2b-size-copy-200: var(--b2b-size-45);
|
|
77
77
|
--b2b-size-copy-125: var(--b2b-size-40);
|
|
78
78
|
--b2b-size-copy-100: var(--b2b-size-35);
|
|
79
|
-
--b2b-size-copy-
|
|
80
|
-
--b2b-size-copy-50: var(--b2b-size-25);
|
|
79
|
+
--b2b-size-copy-50: var(--b2b-size-30);
|
|
81
80
|
--b2b-size-border-no-radius-bottom: var(--b2b-size-7) var(--b2b-size-7) 0 0;
|
|
82
81
|
--b2b-size-border-no-radius-top: 0 0 var(--b2b-size-7) var(--b2b-size-7);
|
|
83
82
|
--b2b-size-border-no-radius-right: var(--b2b-size-7) 0 0 var(--b2b-size-7);
|
|
@@ -123,7 +122,7 @@
|
|
|
123
122
|
}
|
|
124
123
|
/**
|
|
125
124
|
* Do not edit directly
|
|
126
|
-
* Generated on Tue,
|
|
125
|
+
* Generated on Tue, 22 Aug 2023 11:28:34 GMT
|
|
127
126
|
*/
|
|
128
127
|
:root [data-theme="dark"] {
|
|
129
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -220,14 +219,14 @@
|
|
|
220
219
|
width: 100%;
|
|
221
220
|
flex: 0 0 auto;
|
|
222
221
|
}
|
|
223
|
-
:host .b2b-input-
|
|
224
|
-
font-size: var(--b2b-size-copy-
|
|
222
|
+
:host .b2b-input-wrapper__hint {
|
|
223
|
+
font-size: var(--b2b-size-copy-50);
|
|
225
224
|
line-height: var(--b2b-size-copy-line-height-75);
|
|
226
225
|
display: block;
|
|
227
226
|
margin-top: var(--b2b-size-10);
|
|
228
227
|
color: var(--b2b-color-grey-300);
|
|
229
228
|
}
|
|
230
|
-
:host .b2b-input-
|
|
229
|
+
:host .b2b-input-wrapper__hint--error {
|
|
231
230
|
color: var(--b2b-color-error-100);
|
|
232
231
|
}
|
|
233
232
|
::slotted(*[slot=start]) {
|
|
@@ -0,0 +1,76 @@
|
|
|
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 icon="b2b_icon-search"></b2b-icon></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
|
+
const element = await page.find('b2b-input-group');
|
|
27
|
+
expect(element).not.toHaveAttribute('disabled');
|
|
28
|
+
element.setAttribute('disabled', true);
|
|
29
|
+
await page.waitForChanges();
|
|
30
|
+
expect(element).toHaveAttribute('disabled');
|
|
31
|
+
});
|
|
32
|
+
it('should disable individual elements of the group and keep their state when the group is dis- and enabled', async () => {
|
|
33
|
+
let button = await page.find('b2b-button');
|
|
34
|
+
expect(await button.getProperty('disabled')).toBe(true);
|
|
35
|
+
let group = await page.find('b2b-input-group');
|
|
36
|
+
await group.setProperty('disabled', true);
|
|
37
|
+
await page.waitForChanges();
|
|
38
|
+
expect(await group.getProperty('disabled')).toBe(true);
|
|
39
|
+
await group.setProperty('disabled', false);
|
|
40
|
+
await page.waitForChanges();
|
|
41
|
+
expect(await group.getProperty('disabled')).toBe(false);
|
|
42
|
+
expect(await button.getProperty('disabled')).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
it('should render a group hint if one is specified', async () => {
|
|
45
|
+
const element = await page.find('b2b-input-group >>> span');
|
|
46
|
+
expect(element).toEqualText('A group hint');
|
|
47
|
+
});
|
|
48
|
+
it('should render a group error if one is specified and the group is set to invalid', async () => {
|
|
49
|
+
const element = await page.find('b2b-input-group');
|
|
50
|
+
const error = await page.find('b2b-input-group >>> span');
|
|
51
|
+
element.setAttribute('invalid', true);
|
|
52
|
+
await page.waitForChanges();
|
|
53
|
+
expect(error).toEqualText('A group error');
|
|
54
|
+
});
|
|
55
|
+
it('should not render a group error if the group is disabled', async () => {
|
|
56
|
+
const element = await page.find('b2b-input-group');
|
|
57
|
+
const hint = await page.find('b2b-input-group >>> span');
|
|
58
|
+
element.setAttribute('disabled', true);
|
|
59
|
+
expect(hint).toEqualText('A group hint');
|
|
60
|
+
});
|
|
61
|
+
it('should remove all children texts from individual components', async () => {
|
|
62
|
+
const input = await page.find('b2b-input');
|
|
63
|
+
expect(input.error).not.toBeDefined;
|
|
64
|
+
expect(input.hint).not.toBeDefined;
|
|
65
|
+
const dropdown = await page.find('b2b-dropdown');
|
|
66
|
+
expect(dropdown.error).not.toBeDefined;
|
|
67
|
+
expect(dropdown.hint).not.toBeDefined;
|
|
68
|
+
});
|
|
69
|
+
it('should not prevent individual events from being triggered in the children', async () => {
|
|
70
|
+
const input = await page.find('b2b-input >>> input');
|
|
71
|
+
const inputSpy = await page.spyOnEvent('b2b-input');
|
|
72
|
+
await input.press('KeyA');
|
|
73
|
+
await page.waitForChanges();
|
|
74
|
+
expect(inputSpy).toHaveReceivedEvent();
|
|
75
|
+
});
|
|
76
|
+
});
|
|
@@ -30,7 +30,7 @@ export class B2BInputGroup {
|
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
32
|
nodes.forEach(node => {
|
|
33
|
-
node.
|
|
33
|
+
node.groupDisabled = this.disabled;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
};
|
|
@@ -51,12 +51,14 @@ export class B2BInputGroup {
|
|
|
51
51
|
connectedCallback() {
|
|
52
52
|
this.removeText();
|
|
53
53
|
this.toggleAllError();
|
|
54
|
-
this.
|
|
54
|
+
if (this.disabled) {
|
|
55
|
+
this.toggleAllDisabled();
|
|
56
|
+
}
|
|
55
57
|
}
|
|
56
58
|
render() {
|
|
57
59
|
return (h(Host, null, h("div", { class: { 'b2b-input-wrapper': true } }, h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), (this.hint || (this.invalid && !this.disabled)) && (h("span", { class: {
|
|
58
|
-
'b2b-input-
|
|
59
|
-
'b2b-input-
|
|
60
|
+
'b2b-input-wrapper__hint': true,
|
|
61
|
+
'b2b-input-wrapper__hint--error': this.invalid && !this.disabled,
|
|
60
62
|
} }, this.invalid && !this.disabled ? this.error : this.hint))));
|
|
61
63
|
}
|
|
62
64
|
static get is() { return "b2b-input-group"; }
|
|
@@ -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
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Tue,
|
|
3
|
+
* Generated on Tue, 22 Aug 2023 11:28:34 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
--b2b-size-copy-200: var(--b2b-size-45);
|
|
77
77
|
--b2b-size-copy-125: var(--b2b-size-40);
|
|
78
78
|
--b2b-size-copy-100: var(--b2b-size-35);
|
|
79
|
-
--b2b-size-copy-
|
|
80
|
-
--b2b-size-copy-50: var(--b2b-size-25);
|
|
79
|
+
--b2b-size-copy-50: var(--b2b-size-30);
|
|
81
80
|
--b2b-size-border-no-radius-bottom: var(--b2b-size-7) var(--b2b-size-7) 0 0;
|
|
82
81
|
--b2b-size-border-no-radius-top: 0 0 var(--b2b-size-7) var(--b2b-size-7);
|
|
83
82
|
--b2b-size-border-no-radius-right: var(--b2b-size-7) 0 0 var(--b2b-size-7);
|
|
@@ -123,7 +122,7 @@
|
|
|
123
122
|
}
|
|
124
123
|
/**
|
|
125
124
|
* Do not edit directly
|
|
126
|
-
* Generated on Tue,
|
|
125
|
+
* Generated on Tue, 22 Aug 2023 11:28:34 GMT
|
|
127
126
|
*/
|
|
128
127
|
:root [data-theme="dark"] {
|
|
129
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -229,22 +228,22 @@
|
|
|
229
228
|
.b2b-input-list.b2b-input-list__options-on b2b-input {
|
|
230
229
|
--b2b-border-radius: var(--b2b-size-border-no-radius-bottom);
|
|
231
230
|
}
|
|
232
|
-
.b2b-input-list.b2b-group-
|
|
231
|
+
.b2b-input-list.b2b-group-input__start b2b-input {
|
|
233
232
|
--b2b-border-radius: inherit;
|
|
234
233
|
--b2b-border-right: inherit;
|
|
235
234
|
}
|
|
236
|
-
.b2b-input-list.b2b-group-
|
|
235
|
+
.b2b-input-list.b2b-group-input__start.b2b-input-list__options-on b2b-input {
|
|
237
236
|
--b2b-border-radius: var(--b2b-size-border-radius-100) 0 0 0;
|
|
238
237
|
}
|
|
239
|
-
.b2b-input-list.b2b-group-
|
|
238
|
+
.b2b-input-list.b2b-group-input__middle b2b-input {
|
|
240
239
|
--b2b-border-radius: inherit;
|
|
241
240
|
--b2b-border-right: inherit;
|
|
242
241
|
}
|
|
243
|
-
.b2b-input-list.b2b-group-
|
|
242
|
+
.b2b-input-list.b2b-group-input__end b2b-input {
|
|
244
243
|
--b2b-border-radius: inherit;
|
|
245
244
|
--b2b-border-right: inherit;
|
|
246
245
|
}
|
|
247
|
-
.b2b-input-list.b2b-group-
|
|
246
|
+
.b2b-input-list.b2b-group-input__end.b2b-input-list__options-on b2b-input {
|
|
248
247
|
--b2b-border-radius: 0 var(--b2b-size-border-radius-100) 0 0;
|
|
249
248
|
}
|
|
250
249
|
.b2b-input-list.b2b-input-list__options-on:focus {
|
|
@@ -0,0 +1,227 @@
|
|
|
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', 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
|
+
});
|
|
37
|
+
it('should not show search list when input is not focused', async () => {
|
|
38
|
+
await setOptionsList();
|
|
39
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
40
|
+
expect(searchListResults).toBeNull();
|
|
41
|
+
});
|
|
42
|
+
it('should not show search list when no list is provided', async () => {
|
|
43
|
+
const input = await page.find('b2b-input-list >>> b2b-input');
|
|
44
|
+
await input.click();
|
|
45
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
46
|
+
expect(searchListResults).toBeNull();
|
|
47
|
+
});
|
|
48
|
+
it('should not show search list when the input has no value', async () => {
|
|
49
|
+
await setOptionsList();
|
|
50
|
+
const input = await page.find('b2b-input-list');
|
|
51
|
+
// focus on input element, focus method did not work
|
|
52
|
+
await input.click();
|
|
53
|
+
await input.press('8');
|
|
54
|
+
await page.waitForChanges();
|
|
55
|
+
let searchListResults = await page.find({ text: optionsList[0] });
|
|
56
|
+
expect(await searchListResults.isVisible()).toBe(true);
|
|
57
|
+
await input.click();
|
|
58
|
+
await input.press('Backspace');
|
|
59
|
+
await page.waitForChanges();
|
|
60
|
+
searchListResults = await page.find({ text: optionsList[0] });
|
|
61
|
+
expect(searchListResults).toBeNull();
|
|
62
|
+
});
|
|
63
|
+
it('should show search list when input is focused, the input has value and list is provided in props', async () => {
|
|
64
|
+
await setOptionsList();
|
|
65
|
+
await typeInput();
|
|
66
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
67
|
+
expect(await searchListResults.isVisible()).toBe(true);
|
|
68
|
+
});
|
|
69
|
+
it('should emit selected option when it is selected', async () => {
|
|
70
|
+
const optionSelectedEventSpy = await page.spyOnEvent('b2b-option-selected');
|
|
71
|
+
await setOptionsList();
|
|
72
|
+
await typeInput();
|
|
73
|
+
// Click first option on the list
|
|
74
|
+
const option = await page.find({ text: optionsList[0] });
|
|
75
|
+
// focus on input element, focus method did not work
|
|
76
|
+
await option.click();
|
|
77
|
+
expect(optionSelectedEventSpy).toHaveReceivedEvent();
|
|
78
|
+
expect(optionSelectedEventSpy).toHaveReceivedEventDetail({
|
|
79
|
+
selectedOption: optionsList[0],
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
it('should hide results when one option is selected', async () => {
|
|
83
|
+
await setOptionsList();
|
|
84
|
+
await typeInput();
|
|
85
|
+
// Click first option on the list
|
|
86
|
+
const option = await page.find({ text: optionsList[0] });
|
|
87
|
+
expect(await option.isVisible()).toBe(true);
|
|
88
|
+
await option.click();
|
|
89
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
90
|
+
expect(searchListResults).toBeNull();
|
|
91
|
+
});
|
|
92
|
+
it('should fill up input value with option selected', async () => {
|
|
93
|
+
await setOptionsList();
|
|
94
|
+
await typeInput('8');
|
|
95
|
+
const input = await page.find('b2b-input-list >>> b2b-input');
|
|
96
|
+
let inputValue = await input.getProperty('value');
|
|
97
|
+
expect(inputValue).toBe('8');
|
|
98
|
+
// Click first option on the list
|
|
99
|
+
const option = await page.find({ text: optionsList[0] });
|
|
100
|
+
await option.click();
|
|
101
|
+
inputValue = await input.getProperty('value');
|
|
102
|
+
expect(inputValue).toBe(optionsList[0]);
|
|
103
|
+
});
|
|
104
|
+
it('should navigate with the arrow keys', async () => {
|
|
105
|
+
await setOptionsList();
|
|
106
|
+
await typeInput();
|
|
107
|
+
await page.keyboard.press('ArrowDown');
|
|
108
|
+
page.waitForChanges();
|
|
109
|
+
await page.keyboard.press('ArrowDown');
|
|
110
|
+
page.waitForChanges();
|
|
111
|
+
const firstActiveEl = await page.evaluate(() => {
|
|
112
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
113
|
+
});
|
|
114
|
+
expect(firstActiveEl).toEqualText('option2');
|
|
115
|
+
await page.keyboard.press('ArrowUp');
|
|
116
|
+
page.waitForChanges();
|
|
117
|
+
const activeEl = await page.evaluate(() => {
|
|
118
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
119
|
+
});
|
|
120
|
+
expect(activeEl).toEqualText('option1');
|
|
121
|
+
});
|
|
122
|
+
it('should navigate to the first option if the home key is pressed', async () => {
|
|
123
|
+
await setOptionsList();
|
|
124
|
+
await typeInput();
|
|
125
|
+
await page.keyboard.press('ArrowDown');
|
|
126
|
+
page.waitForChanges();
|
|
127
|
+
await page.keyboard.press('ArrowDown');
|
|
128
|
+
page.waitForChanges();
|
|
129
|
+
const firstActiveEl = await page.evaluate(() => {
|
|
130
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
131
|
+
});
|
|
132
|
+
expect(firstActiveEl).toEqualText('option2');
|
|
133
|
+
await page.keyboard.press('Home');
|
|
134
|
+
page.waitForChanges();
|
|
135
|
+
const activeEl = await page.evaluate(() => {
|
|
136
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
137
|
+
});
|
|
138
|
+
expect(activeEl).toEqualText('option1');
|
|
139
|
+
});
|
|
140
|
+
it('should navigate to the last option if the end key is pressed', async () => {
|
|
141
|
+
await setOptionsList();
|
|
142
|
+
await typeInput();
|
|
143
|
+
await page.keyboard.press('ArrowDown');
|
|
144
|
+
await page.waitForChanges();
|
|
145
|
+
const firstActiveEl = await page.evaluate(() => {
|
|
146
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
147
|
+
});
|
|
148
|
+
expect(firstActiveEl).toEqualText('option1');
|
|
149
|
+
await page.keyboard.press('End');
|
|
150
|
+
await page.waitForChanges();
|
|
151
|
+
const activeEl = await page.evaluate(() => {
|
|
152
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
153
|
+
});
|
|
154
|
+
expect(activeEl).toEqualText('option3');
|
|
155
|
+
});
|
|
156
|
+
it('should not navigate with any other key than up, down, end or home', async () => {
|
|
157
|
+
await setOptionsList();
|
|
158
|
+
await typeInput();
|
|
159
|
+
await page.keyboard.press('A');
|
|
160
|
+
await page.waitForChanges();
|
|
161
|
+
const firstActiveEl = await page.evaluate(() => {
|
|
162
|
+
return document.activeElement.shadowRoot.activeElement.textContent;
|
|
163
|
+
});
|
|
164
|
+
expect(firstActiveEl).not.toEqualText('option1');
|
|
165
|
+
});
|
|
166
|
+
it('should not navigate when the input is not visible', async () => {
|
|
167
|
+
await setOptionsList();
|
|
168
|
+
await page.waitForChanges();
|
|
169
|
+
await page.keyboard.press('ArrowDown');
|
|
170
|
+
await page.waitForChanges();
|
|
171
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
172
|
+
expect(searchListResults).toBeNull();
|
|
173
|
+
});
|
|
174
|
+
it('should emit an option when it is focused and the enter key is pressed', async () => {
|
|
175
|
+
const optionSelectedEventSpy = await page.spyOnEvent('b2b-option-selected');
|
|
176
|
+
await setOptionsList();
|
|
177
|
+
await typeInput();
|
|
178
|
+
await page.keyboard.press('ArrowDown');
|
|
179
|
+
await page.waitForChanges();
|
|
180
|
+
await page.keyboard.press('Enter');
|
|
181
|
+
await page.waitForChanges();
|
|
182
|
+
expect(optionSelectedEventSpy).toHaveReceivedEvent();
|
|
183
|
+
expect(optionSelectedEventSpy).toHaveReceivedEventDetail({
|
|
184
|
+
selectedOption: optionsList[0],
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
it('should close the input list when the escape key is pressed', async () => {
|
|
188
|
+
await setOptionsList();
|
|
189
|
+
await typeInput();
|
|
190
|
+
await page.keyboard.press('ArrowDown');
|
|
191
|
+
await page.keyboard.press('Escape');
|
|
192
|
+
await page.waitForChanges();
|
|
193
|
+
const searchListResults = await page.find({ text: optionsList[0] });
|
|
194
|
+
expect(searchListResults).toBeNull();
|
|
195
|
+
});
|
|
196
|
+
it('should show the close icon when the input has text', async () => {
|
|
197
|
+
await setOptionsList();
|
|
198
|
+
await typeInput();
|
|
199
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon');
|
|
200
|
+
expect(closeIcon).not.toBeNull();
|
|
201
|
+
});
|
|
202
|
+
it('should not show the close icon if the input is empty', async () => {
|
|
203
|
+
await setOptionsList();
|
|
204
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon');
|
|
205
|
+
expect(closeIcon).toBeNull();
|
|
206
|
+
});
|
|
207
|
+
it('should clear the input when the clear icon is clicked', async () => {
|
|
208
|
+
await setOptionsList();
|
|
209
|
+
await typeInput('8');
|
|
210
|
+
let input = await page.find('b2b-input-list >>> b2b-input');
|
|
211
|
+
let inputValue = await input.getAttribute('value');
|
|
212
|
+
expect(inputValue).toBe('8');
|
|
213
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon');
|
|
214
|
+
closeIcon.click();
|
|
215
|
+
await page.waitForChanges();
|
|
216
|
+
inputValue = await input.getAttribute('value');
|
|
217
|
+
expect(inputValue).toBe('');
|
|
218
|
+
});
|
|
219
|
+
it('should emit clear event when the clear icon is clicked', async () => {
|
|
220
|
+
const onInputEventSpy = await page.spyOnEvent('b2b-clear');
|
|
221
|
+
await typeInput();
|
|
222
|
+
const closeIcon = await page.find('b2b-input-list >>> b2b-icon');
|
|
223
|
+
closeIcon.click();
|
|
224
|
+
await page.waitForChanges();
|
|
225
|
+
expect(onInputEventSpy).toHaveReceivedEvent();
|
|
226
|
+
});
|
|
227
|
+
});
|
|
@@ -37,7 +37,7 @@ export class InputListComponent {
|
|
|
37
37
|
const parentNodeName = this.hostElement.parentNode.nodeName;
|
|
38
38
|
if (parentNodeName === 'B2B-INPUT-GROUP') {
|
|
39
39
|
const slotName = ((_a = this.hostElement.assignedSlot) === null || _a === void 0 ? void 0 : _a.name) || 'middle';
|
|
40
|
-
return `b2b-group-
|
|
40
|
+
return `b2b-group-input__${slotName}`;
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
this.getAllOptions = () => {
|
|
@@ -84,6 +84,7 @@ export class InputListComponent {
|
|
|
84
84
|
this.optionsList = [];
|
|
85
85
|
this.value = null;
|
|
86
86
|
this.disabled = false;
|
|
87
|
+
this.groupDisabled = false;
|
|
87
88
|
this.hasOptionList = this.optionsList.length > 0;
|
|
88
89
|
this.isElementFocused = false;
|
|
89
90
|
}
|
|
@@ -147,7 +148,7 @@ export class InputListComponent {
|
|
|
147
148
|
this.isElementFocused &&
|
|
148
149
|
Boolean(this.value),
|
|
149
150
|
[groupOrderClass]: true,
|
|
150
|
-
} }, h("b2b-input", { type: "text", label: this.label, value: this.value, disabled: this.disabled, "onb2b-input": this.handleInput, placeholder: this.placeholder, required: this.required }, Boolean(this.value) && (h("b2b-icon", { 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
|
+
} }, h("b2b-input", { type: "text", label: this.label, value: this.value, disabled: this.disabled || this.groupDisabled, "onb2b-input": this.handleInput, placeholder: this.placeholder, required: this.required }, Boolean(this.value) && (h("b2b-icon", { 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
152
|
}
|
|
152
153
|
static get is() { return "b2b-input-list"; }
|
|
153
154
|
static get encapsulation() { return "shadow"; }
|
|
@@ -266,6 +267,27 @@ export class InputListComponent {
|
|
|
266
267
|
"attribute": "disabled",
|
|
267
268
|
"reflect": true,
|
|
268
269
|
"defaultValue": "false"
|
|
270
|
+
},
|
|
271
|
+
"groupDisabled": {
|
|
272
|
+
"type": "boolean",
|
|
273
|
+
"mutable": false,
|
|
274
|
+
"complexType": {
|
|
275
|
+
"original": "boolean",
|
|
276
|
+
"resolved": "boolean",
|
|
277
|
+
"references": {}
|
|
278
|
+
},
|
|
279
|
+
"required": false,
|
|
280
|
+
"optional": false,
|
|
281
|
+
"docs": {
|
|
282
|
+
"tags": [{
|
|
283
|
+
"name": "internal",
|
|
284
|
+
"text": "Whether the parent input group is disabled. Per default, it is false."
|
|
285
|
+
}],
|
|
286
|
+
"text": ""
|
|
287
|
+
},
|
|
288
|
+
"attribute": "group-disabled",
|
|
289
|
+
"reflect": false,
|
|
290
|
+
"defaultValue": "false"
|
|
269
291
|
}
|
|
270
292
|
};
|
|
271
293
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Tue,
|
|
3
|
+
* Generated on Tue, 22 Aug 2023 11:28:34 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
--b2b-size-copy-200: var(--b2b-size-45);
|
|
77
77
|
--b2b-size-copy-125: var(--b2b-size-40);
|
|
78
78
|
--b2b-size-copy-100: var(--b2b-size-35);
|
|
79
|
-
--b2b-size-copy-
|
|
80
|
-
--b2b-size-copy-50: var(--b2b-size-25);
|
|
79
|
+
--b2b-size-copy-50: var(--b2b-size-30);
|
|
81
80
|
--b2b-size-border-no-radius-bottom: var(--b2b-size-7) var(--b2b-size-7) 0 0;
|
|
82
81
|
--b2b-size-border-no-radius-top: 0 0 var(--b2b-size-7) var(--b2b-size-7);
|
|
83
82
|
--b2b-size-border-no-radius-right: var(--b2b-size-7) 0 0 var(--b2b-size-7);
|
|
@@ -123,7 +122,7 @@
|
|
|
123
122
|
}
|
|
124
123
|
/**
|
|
125
124
|
* Do not edit directly
|
|
126
|
-
* Generated on Tue,
|
|
125
|
+
* Generated on Tue, 22 Aug 2023 11:28:34 GMT
|
|
127
126
|
*/
|
|
128
127
|
:root [data-theme="dark"] {
|
|
129
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -217,7 +216,7 @@
|
|
|
217
216
|
.b2b-label {
|
|
218
217
|
display: inline-block;
|
|
219
218
|
font-family: var(--b2b-font-family-default);
|
|
220
|
-
font-size: var(--b2b-size-copy-
|
|
219
|
+
font-size: var(--b2b-size-copy-50);
|
|
221
220
|
line-height: var(--b2b-size-copy-line-height-50);
|
|
222
221
|
border-radius: var(--b2b-size-30);
|
|
223
222
|
border: 1px solid var(--b2b-color-white-100);
|
|
@@ -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
|
+
});
|