@otto-de/b2b-core-components 1.5.0 → 1.6.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-01fd54a1.entry.js +1 -0
- package/dist/b2b-core-components/{p-b95089a7.entry.js → p-04fc18cd.entry.js} +1 -1
- package/dist/b2b-core-components/{p-c20baf90.entry.js → p-077217b3.entry.js} +1 -1
- package/dist/b2b-core-components/{p-03beebf5.entry.js → p-0965b990.entry.js} +1 -1
- 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-197c1a6d.entry.js +1 -0
- package/dist/b2b-core-components/{p-75f84f53.entry.js → p-1d007eea.entry.js} +1 -1
- package/dist/b2b-core-components/{p-6997ceb0.entry.js → p-1e2752b2.entry.js} +1 -1
- package/dist/b2b-core-components/{p-06ef4c5e.entry.js → p-2328144b.entry.js} +1 -1
- 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-60c7f6f7.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-163fe245.entry.js → p-44ccd8f4.entry.js} +1 -1
- package/dist/b2b-core-components/{p-38791fb9.entry.js → p-542a358a.entry.js} +1 -1
- 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-e1622cb8.entry.js → p-6140304e.entry.js} +1 -1
- package/dist/b2b-core-components/p-62e43f91.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-bcf36531.entry.js → p-8ad1bb92.entry.js} +1 -1
- 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-c8294029.entry.js → p-b3ccfc58.entry.js} +1 -1
- package/dist/b2b-core-components/{p-2b3a67db.entry.js → p-b6a8a06f.entry.js} +1 -1
- package/dist/b2b-core-components/{p-5c2db521.entry.js → p-b8049234.entry.js} +1 -1
- package/dist/b2b-core-components/p-c294dd0c.entry.js +1 -0
- package/dist/b2b-core-components/{p-5d7866e8.entry.js → p-d07210e2.entry.js} +1 -1
- package/dist/b2b-core-components/p-d7bb8aa1.entry.js +1 -0
- package/dist/b2b-core-components/{p-76e240f8.entry.js → p-d83c2084.entry.js} +1 -1
- package/dist/b2b-core-components/{p-dcd80266.entry.js → p-db7d2ec3.entry.js} +1 -1
- package/dist/b2b-core-components/{p-9facba86.entry.js → p-dd79ab5b.entry.js} +1 -1
- package/dist/b2b-core-components/{p-bda69b9a.entry.js → p-e5b78075.entry.js} +1 -1
- package/dist/b2b-core-components/{p-7b04f40b.entry.js → p-e811411a.entry.js} +1 -1
- package/dist/b2b-core-components/p-f190bf79.entry.js +1 -0
- package/dist/b2b-core-components/{p-1e1bdb50.entry.js → p-f24515bf.entry.js} +1 -1
- 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 +1 -1
- package/dist/cjs/b2b-button_2.cjs.entry.js +12 -8
- package/dist/cjs/b2b-card.cjs.entry.js +1 -1
- package/dist/cjs/b2b-checkbox-group.cjs.entry.js +7 -5
- package/dist/cjs/{b2b-table-cell_2.cjs.entry.js → b2b-checkbox_3.cjs.entry.js} +94 -7
- 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 +1 -1
- package/dist/cjs/b2b-icon.cjs.entry.js +4 -4
- package/dist/cjs/b2b-input-group_2.cjs.entry.js +10 -21
- 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 +1 -1
- 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 +1 -1
- package/dist/cjs/b2b-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/b2b-required-separator.cjs.entry.js +3 -3
- package/dist/cjs/b2b-rounded-icon.cjs.entry.js +1 -1
- package/dist/cjs/b2b-scrollable-container.cjs.entry.js +1 -1
- package/dist/cjs/b2b-search.cjs.entry.js +1 -1
- package/dist/cjs/b2b-separator.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab.cjs.entry.js +1 -1
- package/dist/cjs/b2b-table-row.cjs.entry.js +77 -21
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +85 -24
- package/dist/cjs/b2b-table.cjs.entry.js +10 -10
- package/dist/cjs/b2b-textarea.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/b2b-wizard-step.cjs.entry.js +4 -4
- package/dist/cjs/b2b-wizard.cjs.entry.js +2 -2
- package/dist/cjs/{index-496aa5dd.js → index-04e07a00.js} +88 -31
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{table.types-bb0926c7.js → table.types-00c8228a.js} +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/alert/alert.css +7 -7
- 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 +2 -2
- package/dist/collection/components/anchor/anchor.spec.js +68 -0
- package/dist/collection/components/button/button.css +35 -39
- 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 +2 -2
- 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 +34 -13
- 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 +5 -5
- 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 +7 -7
- 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 +2 -2
- 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 +9 -9
- 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 +14 -14
- 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 +4 -4
- package/dist/collection/components/input-group/input-group.e2e.js +76 -0
- package/dist/collection/components/input-group/input-group.js +4 -21
- 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 +7 -7
- 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 +2 -2
- 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 +13 -18
- 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 +7 -7
- 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 +9 -9
- 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 +2 -2
- 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 +2 -2
- 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 +4 -4
- 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 +2 -2
- package/dist/collection/components/scrollable-container/scrollable-container.css +2 -2
- package/dist/collection/components/search/search.e2e.js +97 -0
- package/dist/collection/components/separator/separator.css +2 -2
- package/dist/collection/components/separator/separator.e2e.js +22 -0
- package/dist/collection/components/spinner/spinner.css +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/collection/components/table/table-header/table-header.css +17 -17
- package/dist/collection/components/table/table-header/table-header.js +4 -4
- package/dist/collection/components/table/table-row/table-row.css +3 -3
- package/dist/collection/components/table/table-row/table-row.js +185 -25
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +3 -3
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +118 -23
- package/dist/collection/components/table/table.css +2 -2
- package/dist/collection/components/table/table.e2e.js +370 -0
- package/dist/collection/components/table/table.js +8 -8
- package/dist/collection/components/table/table.stories.js +16 -7
- package/dist/collection/components/table/utils.js +18 -0
- package/dist/collection/components/textarea/textarea.css +2 -2
- package/dist/collection/components/textarea/textarea.e2e.js +91 -0
- package/dist/collection/components/toggle-button/toggle-button.css +9 -9
- 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 +3 -3
- 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 +14 -14
- 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 +2 -2
- package/dist/collection/components/wizard/wizard.css +3 -3
- package/dist/collection/components/wizard/wizard.e2e.js +149 -0
- package/dist/collection/components/wizard-icon/wizard-icon.css +2 -2
- package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
- package/dist/collection/utils/types/table.types.js +5 -1
- package/dist/collection/utils/utils.spec.js +15 -0
- package/dist/components/b2b-alert.js +4 -4
- package/dist/components/b2b-anchor.js +1 -1
- package/dist/components/b2b-card.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/components/b2b-radio-group.js +1 -1
- package/dist/components/b2b-required-separator.js +3 -3
- package/dist/components/b2b-scrollable-container.js +1 -1
- package/dist/components/b2b-search.js +1 -1
- package/dist/components/b2b-tab-group.js +1 -1
- package/dist/components/b2b-tab-panel.js +1 -1
- package/dist/components/b2b-tab.js +1 -1
- package/dist/components/b2b-table-row.js +97 -25
- package/dist/components/b2b-table-rowgroup.js +91 -27
- package/dist/components/b2b-table.js +9 -9
- package/dist/components/b2b-textarea.js +1 -1
- 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-step.js +4 -4
- package/dist/components/b2b-wizard.js +2 -2
- package/dist/components/button.js +13 -8
- package/dist/{esm/b2b-checkbox.entry.js → components/checkbox.js} +66 -13
- package/dist/components/headline.js +1 -1
- package/dist/components/icon.js +4 -4
- package/dist/components/input-group.js +7 -20
- 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 +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/table-cell.js +1 -1
- package/dist/components/table-header.js +6 -6
- package/dist/components/table.types.js +2 -2
- package/dist/components/wizard-icon.js +1 -1
- package/dist/custom-elements.json +22 -13
- package/dist/esm/b2b-alert.entry.js +4 -4
- package/dist/esm/b2b-anchor.entry.js +1 -1
- package/dist/esm/b2b-button_2.entry.js +12 -8
- package/dist/esm/b2b-card.entry.js +1 -1
- package/dist/esm/b2b-checkbox-group.entry.js +7 -5
- package/dist/esm/{b2b-table-cell_2.entry.js → b2b-checkbox_3.entry.js} +94 -8
- 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 +1 -1
- package/dist/esm/b2b-icon.entry.js +4 -4
- package/dist/esm/b2b-input-group_2.entry.js +10 -21
- 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 +1 -1
- 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 +1 -1
- package/dist/esm/b2b-radio-group.entry.js +1 -1
- package/dist/esm/b2b-required-separator.entry.js +3 -3
- package/dist/esm/b2b-rounded-icon.entry.js +1 -1
- package/dist/esm/b2b-scrollable-container.entry.js +1 -1
- package/dist/esm/b2b-search.entry.js +1 -1
- package/dist/esm/b2b-separator.entry.js +1 -1
- package/dist/esm/b2b-tab-group.entry.js +1 -1
- package/dist/esm/b2b-tab-panel.entry.js +1 -1
- package/dist/esm/b2b-tab.entry.js +1 -1
- package/dist/esm/b2b-table-row.entry.js +77 -21
- package/dist/esm/b2b-table-rowgroup.entry.js +85 -24
- package/dist/esm/b2b-table.entry.js +10 -10
- package/dist/esm/b2b-textarea.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/b2b-wizard-step.entry.js +4 -4
- package/dist/esm/b2b-wizard.entry.js +2 -2
- package/dist/esm/{index-026605c2.js → index-dfdbf4b9.js} +88 -31
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{table.types-9943c937.js → table.types-dd829d83.js} +2 -2
- 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.d.ts +0 -4
- 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.stories.d.ts +1 -1
- package/dist/types/components/scrollable-container/scrollable-container.stories.d.ts +1 -1
- 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-row/table-row.d.ts +23 -7
- package/dist/types/components/table/table-rowgroup/table-rowgroup.d.ts +12 -2
- package/dist/types/components/table/table.d.ts +1 -1
- 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.stories.d.ts +1 -1
- package/dist/types/components/wizard-icon/wizard-icon.stories.d.ts +1 -1
- package/dist/types/components.d.ts +71 -9
- 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/utils/types/table.types.d.ts +7 -2
- package/dist/web-types.json +76 -6
- package/loader/index.d.ts +1 -1
- package/package.json +4 -4
- package/dist/b2b-core-components/p-0675225a.entry.js +0 -1
- package/dist/b2b-core-components/p-080a0741.entry.js +0 -1
- package/dist/b2b-core-components/p-0f8bd310.entry.js +0 -1
- package/dist/b2b-core-components/p-14f1b674.entry.js +0 -1
- package/dist/b2b-core-components/p-1eb784f9.entry.js +0 -1
- package/dist/b2b-core-components/p-21bfe96a.entry.js +0 -1
- package/dist/b2b-core-components/p-3cd9088a.entry.js +0 -1
- package/dist/b2b-core-components/p-42da7a57.entry.js +0 -1
- package/dist/b2b-core-components/p-4fc894c8.entry.js +0 -1
- package/dist/b2b-core-components/p-710600ca.entry.js +0 -1
- package/dist/b2b-core-components/p-83cb9d03.entry.js +0 -1
- package/dist/b2b-core-components/p-a7417890.js +0 -2
- package/dist/b2b-core-components/p-c9dcb35a.entry.js +0 -1
- package/dist/b2b-core-components/p-cf010e88.entry.js +0 -1
- package/dist/b2b-core-components/p-e3cd216c.entry.js +0 -1
- package/dist/b2b-core-components/p-fa6cd2ac.entry.js +0 -1
- package/dist/b2b-core-components/p-fe96d81a.entry.js +0 -1
- package/dist/cjs/b2b-checkbox.cjs.entry.js +0 -74
- /package/dist/b2b-core-components/{p-de2c1003.js → p-34eb99cb.js} +0 -0
|
@@ -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
|
|
3
|
+
* Generated on Tue, 22 Aug 2023 12:55:37 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
125
|
+
* Generated on Tue, 22 Aug 2023 12:55:37 GMT
|
|
126
126
|
*/
|
|
127
127
|
:root [data-theme="dark"] {
|
|
128
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { newSpecPage } from '@stencil/core/testing';
|
|
2
|
+
import { h } from '@stencil/core';
|
|
3
|
+
import { LabelComponent } from './label';
|
|
4
|
+
it('should render the label component with default values', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [LabelComponent],
|
|
7
|
+
template: () => h("b2b-label", null, "Neutral"),
|
|
8
|
+
});
|
|
9
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
10
|
+
<span class="b2b-label b2b-label--neutral">
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</span>
|
|
13
|
+
`);
|
|
14
|
+
});
|
|
15
|
+
it('should render the label component with info styles', async () => {
|
|
16
|
+
const page = await newSpecPage({
|
|
17
|
+
components: [LabelComponent],
|
|
18
|
+
template: () => h("b2b-label", { type: "info" }, "Neutral"),
|
|
19
|
+
});
|
|
20
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
21
|
+
<span class="b2b-label b2b-label--info">
|
|
22
|
+
<slot></slot>
|
|
23
|
+
</span>
|
|
24
|
+
`);
|
|
25
|
+
});
|
|
26
|
+
it('should render the label component with success styles', async () => {
|
|
27
|
+
const page = await newSpecPage({
|
|
28
|
+
components: [LabelComponent],
|
|
29
|
+
template: () => h("b2b-label", { type: "success" }, "Neutral"),
|
|
30
|
+
});
|
|
31
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
32
|
+
<span class="b2b-label b2b-label--success">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</span>
|
|
35
|
+
`);
|
|
36
|
+
});
|
|
37
|
+
it('should render the label component with warning styles', async () => {
|
|
38
|
+
const page = await newSpecPage({
|
|
39
|
+
components: [LabelComponent],
|
|
40
|
+
template: () => h("b2b-label", { type: "warning" }, "Neutral"),
|
|
41
|
+
});
|
|
42
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
43
|
+
<span class="b2b-label b2b-label--warning">
|
|
44
|
+
<slot></slot>
|
|
45
|
+
</span>
|
|
46
|
+
`);
|
|
47
|
+
});
|
|
48
|
+
it('should render the label component with error styles', async () => {
|
|
49
|
+
const page = await newSpecPage({
|
|
50
|
+
components: [LabelComponent],
|
|
51
|
+
template: () => h("b2b-label", { type: "error" }, "Neutral"),
|
|
52
|
+
});
|
|
53
|
+
expect(page.root.shadowRoot).toEqualHtml(`
|
|
54
|
+
<span class="b2b-label b2b-label--error">
|
|
55
|
+
<slot></slot>
|
|
56
|
+
</span>
|
|
57
|
+
`);
|
|
58
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Tue, 22 Aug 2023 12:55:37 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
125
|
+
* Generated on Tue, 22 Aug 2023 12:55:37 GMT
|
|
126
126
|
*/
|
|
127
127
|
:root [data-theme="dark"] {
|
|
128
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
:host .b2b-modal--open {
|
|
236
236
|
display: flex;
|
|
237
237
|
}
|
|
238
|
-
:host .b2b-
|
|
238
|
+
:host .b2b-modal__backdrop {
|
|
239
239
|
top: 0;
|
|
240
240
|
left: 0;
|
|
241
241
|
z-index: 0;
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
height: 100%;
|
|
244
244
|
position: absolute;
|
|
245
245
|
}
|
|
246
|
-
:host .b2b-
|
|
246
|
+
:host .b2b-modal__dialog {
|
|
247
247
|
z-index: 1;
|
|
248
248
|
position: relative;
|
|
249
249
|
min-width: var(--b2b-component-modal-default-min-width);
|
|
@@ -253,53 +253,48 @@
|
|
|
253
253
|
box-shadow: 0 3px 8px 0 var(--b2b-color-background-overlay-transparent-40);
|
|
254
254
|
margin: auto;
|
|
255
255
|
}
|
|
256
|
-
:host .b2b-
|
|
256
|
+
:host .b2b-modal__dialog__header {
|
|
257
257
|
display: flex;
|
|
258
258
|
justify-content: space-between;
|
|
259
259
|
align-items: center;
|
|
260
260
|
margin-bottom: var(--b2b-size-space-75);
|
|
261
261
|
}
|
|
262
|
-
:host .b2b-
|
|
262
|
+
:host .b2b-modal__dialog__close {
|
|
263
263
|
cursor: pointer;
|
|
264
264
|
background: transparent;
|
|
265
265
|
padding: 0;
|
|
266
266
|
border: none;
|
|
267
|
-
/* this is a workaround to force purgecss to include the overwrites of the variable --b2b-icon-cursor */
|
|
268
267
|
}
|
|
269
|
-
:host .b2b-
|
|
268
|
+
:host .b2b-modal__dialog__close b2b-icon {
|
|
270
269
|
transition: all 0.3s ease;
|
|
271
|
-
--b2b-icon-cursor: pointer;
|
|
272
270
|
}
|
|
273
|
-
:host .b2b-
|
|
274
|
-
cursor: var(--b2b-icon-cursor);
|
|
275
|
-
}
|
|
276
|
-
:host .b2b-modal-dialog--footer {
|
|
271
|
+
:host .b2b-modal__dialog__footer {
|
|
277
272
|
display: flex;
|
|
278
273
|
justify-content: space-between;
|
|
279
274
|
padding-top: calc(var(--b2b-size-space-75) * 2);
|
|
280
275
|
margin-top: calc(var(--b2b-size-space-75) * 2);
|
|
281
276
|
border-top: var(--b2b-size-1) solid var(--b2b-color-border-100);
|
|
282
277
|
}
|
|
283
|
-
:host .b2b-
|
|
278
|
+
:host .b2b-modal__dialog__footer-left {
|
|
284
279
|
display: flex;
|
|
285
280
|
justify-content: flex-start;
|
|
286
281
|
}
|
|
287
|
-
:host .b2b-
|
|
282
|
+
:host .b2b-modal__dialog__footer-right {
|
|
288
283
|
display: flex;
|
|
289
284
|
justify-content: flex-end;
|
|
290
285
|
}
|
|
291
|
-
:host .b2b-
|
|
286
|
+
:host .b2b-modal__dialog--large {
|
|
292
287
|
max-width: var(--b2b-component-modal-large-max-width);
|
|
293
288
|
}
|
|
294
289
|
@media only screen and (max-width: var(--b2b-component-modal-large-max-width)) {
|
|
295
|
-
:host .b2b-
|
|
290
|
+
:host .b2b-modal__dialog--large {
|
|
296
291
|
left: 0;
|
|
297
292
|
width: auto;
|
|
298
293
|
max-width: var(--b2b-component-modal-large-max-width);
|
|
299
294
|
}
|
|
300
295
|
}
|
|
301
296
|
@media only screen and (max-width: var(--b2b-component-modal-default-max-width)) {
|
|
302
|
-
:host .b2b-
|
|
297
|
+
:host .b2b-modal__dialog {
|
|
303
298
|
left: 0;
|
|
304
299
|
width: auto;
|
|
305
300
|
max-width: var(--b2b-component-modal-default-max-width);
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('b2b-modal', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="false">Test</b2b-modal>');
|
|
6
|
+
const element = await page.find('b2b-modal');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
9
|
+
expect(await modalDiv.isVisible()).toBe(false);
|
|
10
|
+
});
|
|
11
|
+
it('open modal & heading', async () => {
|
|
12
|
+
const page = await newE2EPage();
|
|
13
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
14
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
15
|
+
expect(await modalDiv.isVisible()).toBe(true);
|
|
16
|
+
const headingElm = await modalDiv.find('b2b-headline');
|
|
17
|
+
expect(headingElm.textContent).toBe('Test Modal');
|
|
18
|
+
});
|
|
19
|
+
it('verify initial focus', async () => {
|
|
20
|
+
const page = await newE2EPage();
|
|
21
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
22
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
23
|
+
expect(await modalDiv.isVisible()).toBe(true);
|
|
24
|
+
await page.keyboard.press('Tab');
|
|
25
|
+
const closeContent = await page.evaluate(() => {
|
|
26
|
+
return document.activeElement.shadowRoot.activeElement.className;
|
|
27
|
+
});
|
|
28
|
+
expect(closeContent).toBe('b2b-modal__dialog__close');
|
|
29
|
+
});
|
|
30
|
+
it('verify focus trap', async () => {
|
|
31
|
+
const page = await newE2EPage();
|
|
32
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
33
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
34
|
+
expect(await modalDiv.isVisible()).toBe(true);
|
|
35
|
+
await page.keyboard.press('Tab');
|
|
36
|
+
let closeContent = await page.evaluate(() => {
|
|
37
|
+
return document.activeElement.shadowRoot.activeElement.className;
|
|
38
|
+
});
|
|
39
|
+
expect(closeContent).toBe('b2b-modal__dialog__close');
|
|
40
|
+
await page.keyboard.press('Tab');
|
|
41
|
+
closeContent = await page.evaluate(() => {
|
|
42
|
+
return document.activeElement.shadowRoot.activeElement.className;
|
|
43
|
+
});
|
|
44
|
+
expect(closeContent).toBe('b2b-modal__dialog__close');
|
|
45
|
+
});
|
|
46
|
+
it('verify close hover', async () => {
|
|
47
|
+
const page = await newE2EPage();
|
|
48
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
49
|
+
const modalDiv = await page.find('b2b-modal >>> div');
|
|
50
|
+
expect(await modalDiv.isVisible()).toBe(true);
|
|
51
|
+
const closeIcon = await page.find('b2b-modal >>> b2b-icon');
|
|
52
|
+
const closeIconColorBefore = await closeIcon.getProperty('color');
|
|
53
|
+
expect(closeIconColorBefore).toBe('secondary');
|
|
54
|
+
await closeIcon.hover();
|
|
55
|
+
await page.waitForChanges();
|
|
56
|
+
const closeIconColorAfter = await closeIcon.getProperty('color');
|
|
57
|
+
expect(closeIconColorAfter).toBe('primary');
|
|
58
|
+
});
|
|
59
|
+
it('verify close emit', async () => {
|
|
60
|
+
const page = await newE2EPage();
|
|
61
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
62
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
63
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
64
|
+
const closeIcon = await page.find('b2b-modal >>> b2b-icon');
|
|
65
|
+
await closeIcon.click();
|
|
66
|
+
expect(b2bBeforeClose).toHaveReceivedEvent();
|
|
67
|
+
expect(b2bClose).toHaveReceivedEvent();
|
|
68
|
+
});
|
|
69
|
+
it('verify esc emit', async () => {
|
|
70
|
+
const page = await newE2EPage();
|
|
71
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
72
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
73
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
74
|
+
await page.keyboard.press('Tab');
|
|
75
|
+
await page.keyboard.press('Escape');
|
|
76
|
+
expect(b2bBeforeClose).toHaveReceivedEvent();
|
|
77
|
+
expect(b2bClose).toHaveReceivedEvent();
|
|
78
|
+
});
|
|
79
|
+
it('verify esc no-emit', async () => {
|
|
80
|
+
const page = await newE2EPage();
|
|
81
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true" esc-dismiss="false">Test</b2b-modal>');
|
|
82
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
83
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
84
|
+
await page.keyboard.press('Tab');
|
|
85
|
+
await page.keyboard.press('Escape');
|
|
86
|
+
expect(b2bBeforeClose).not.toHaveReceivedEvent();
|
|
87
|
+
expect(b2bClose).not.toHaveReceivedEvent();
|
|
88
|
+
});
|
|
89
|
+
it('verify backdrop dismiss emit', async () => {
|
|
90
|
+
const page = await newE2EPage();
|
|
91
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true" backdrop-dismiss="true">Test</b2b-modal>');
|
|
92
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
93
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
94
|
+
await page.evaluate(() => {
|
|
95
|
+
document
|
|
96
|
+
.querySelector('b2b-modal')
|
|
97
|
+
.shadowRoot.querySelector('div > div.b2b-modal__backdrop').click();
|
|
98
|
+
});
|
|
99
|
+
expect(b2bBeforeClose).toHaveReceivedEvent();
|
|
100
|
+
expect(b2bClose).toHaveReceivedEvent();
|
|
101
|
+
});
|
|
102
|
+
it('verify backdrop dismiss not emit', async () => {
|
|
103
|
+
const page = await newE2EPage();
|
|
104
|
+
await page.setContent('<b2b-modal heading="Test Modal" opened="true">Test</b2b-modal>');
|
|
105
|
+
const b2bBeforeClose = await page.spyOnEvent('b2b-before-close');
|
|
106
|
+
const b2bClose = await page.spyOnEvent('b2b-close');
|
|
107
|
+
await page.evaluate(() => {
|
|
108
|
+
document
|
|
109
|
+
.querySelector('b2b-modal')
|
|
110
|
+
.shadowRoot.querySelector('div > div.b2b-modal__backdrop').click();
|
|
111
|
+
});
|
|
112
|
+
expect(b2bBeforeClose).not.toHaveReceivedEvent();
|
|
113
|
+
expect(b2bClose).not.toHaveReceivedEvent();
|
|
114
|
+
});
|
|
115
|
+
});
|
|
@@ -83,9 +83,9 @@ export class ModalComponent {
|
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
85
|
return (h(Host, null, h("div", { class: { 'b2b-modal': true, 'b2b-modal--open': this.opened } }, h("div", { "data-focus-trap-edge": true, onFocus: this.handleTopFocus, tabIndex: 0 }), h("div", { class: {
|
|
86
|
-
'b2b-
|
|
87
|
-
[`b2b-
|
|
88
|
-
} }, h("div", { class: "b2b-
|
|
86
|
+
'b2b-modal__dialog': true,
|
|
87
|
+
[`b2b-modal__dialog--${this.variant}`]: true,
|
|
88
|
+
} }, h("div", { class: "b2b-modal__dialog__header" }, h("b2b-headline", { align: "center", size: "200", noMargin: true }, this.heading), h("button", { type: "button", class: "b2b-modal__dialog__close", onMouseEnter: this.toggleIconHover, onMouseLeave: this.toggleIconHover, onClick: this.handleClickDismiss, ref: el => (this.closeButton = el) }, h("b2b-icon", { clickable: true, icon: "b2b_icon-close", color: this.iconHover ? 'primary' : 'secondary' }))), h("div", { class: "b2b-modal__dialog__body" }, h("slot", null)), h("div", { class: "b2b-modal__dialog__footer" }, h("div", { class: "b2b-modal__dialog__footer-left" }, h("slot", { name: "footer-left" })), h("div", { class: "b2b-modal__dialog__footer-right" }, h("slot", { name: "footer-right" })))), h("div", { "data-focus-trap-edge": true, onFocus: this.handleBottomFocus, tabIndex: 0 }), h("div", { class: "b2b-modal__backdrop", onClick: this.handleBackdropDismiss }))));
|
|
89
89
|
}
|
|
90
90
|
static get is() { return "b2b-modal"; }
|
|
91
91
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Tue, 22 Aug 2023 12:55:37 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
125
|
+
* Generated on Tue, 22 Aug 2023 12:55:37 GMT
|
|
126
126
|
*/
|
|
127
127
|
:root [data-theme="dark"] {
|
|
128
128
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -225,20 +225,20 @@
|
|
|
225
225
|
.b2b-pagination li {
|
|
226
226
|
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
227
227
|
}
|
|
228
|
-
.b2b-pagination li:first-child:not(.b2b-
|
|
228
|
+
.b2b-pagination li:first-child:not(.b2b-pagination__first-item) {
|
|
229
229
|
margin-right: var(--b2b-size-15);
|
|
230
230
|
}
|
|
231
|
-
.b2b-pagination li:last-child:not(.b2b-
|
|
231
|
+
.b2b-pagination li:last-child:not(.b2b-pagination__last-item) {
|
|
232
232
|
margin-left: var(--b2b-size-15);
|
|
233
233
|
}
|
|
234
|
-
.b2b-pagination li.b2b-
|
|
234
|
+
.b2b-pagination li.b2b-pagination__item b2b-button {
|
|
235
235
|
--b2b-border-radius: 0;
|
|
236
236
|
--b2b-border-right: 0;
|
|
237
237
|
}
|
|
238
|
-
.b2b-pagination li.b2b-
|
|
238
|
+
.b2b-pagination li.b2b-pagination__first-item b2b-button {
|
|
239
239
|
--b2b-border-radius: var(--b2b-size-border-no-radius-right);
|
|
240
240
|
}
|
|
241
|
-
.b2b-pagination li.b2b-
|
|
241
|
+
.b2b-pagination li.b2b-pagination__last-item b2b-button {
|
|
242
242
|
--b2b-border-right: 1px solid var(--b2b-button-secondary-border-color);
|
|
243
243
|
--b2b-border-radius: var(--b2b-size-border-no-radius-left);
|
|
244
244
|
}
|