@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
|
@@ -19,20 +19,20 @@ const TableSortDirections = {
|
|
|
19
19
|
ASC: 'ascending',
|
|
20
20
|
DESC: 'descending',
|
|
21
21
|
};
|
|
22
|
-
const
|
|
22
|
+
const TableAccordionRowTypes = {
|
|
23
23
|
PARENT: 'parent',
|
|
24
24
|
CHILD: 'child',
|
|
25
|
-
HEADER: 'header'
|
|
25
|
+
HEADER: 'header',
|
|
26
26
|
};
|
|
27
27
|
const TableColourOptions = {
|
|
28
28
|
DEFAULT: 'default',
|
|
29
29
|
SELECTED: 'selected',
|
|
30
|
-
GROUP: 'group'
|
|
30
|
+
GROUP: 'group',
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
exports.ContentAlignment = ContentAlignment;
|
|
34
|
+
exports.TableAccordionRowTypes = TableAccordionRowTypes;
|
|
34
35
|
exports.TableColourOptions = TableColourOptions;
|
|
35
|
-
exports.TableRowTypes = TableRowTypes;
|
|
36
36
|
exports.TableRowgroupTypes = TableRowgroupTypes;
|
|
37
37
|
exports.TableSizes = TableSizes;
|
|
38
38
|
exports.TableSortDirections = TableSortDirections;
|
|
@@ -41,12 +41,14 @@
|
|
|
41
41
|
"./components/toggle-button/toggle-button.js",
|
|
42
42
|
"./components/toggle-group/toggle-group.js",
|
|
43
43
|
"./components/tooltip/tooltip.js",
|
|
44
|
+
"./components/wizard/wizard-step.js",
|
|
45
|
+
"./components/wizard/wizard.js",
|
|
44
46
|
"./components/wizard-icon/wizard-icon.js"
|
|
45
47
|
],
|
|
46
48
|
"compiler": {
|
|
47
49
|
"name": "@stencil/core",
|
|
48
|
-
"version": "3.
|
|
49
|
-
"typescriptVersion": "
|
|
50
|
+
"version": "3.4.2",
|
|
51
|
+
"typescriptVersion": "5.0.4"
|
|
50
52
|
},
|
|
51
53
|
"collections": [],
|
|
52
54
|
"bundles": []
|
|
@@ -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 */
|
|
@@ -227,7 +226,7 @@
|
|
|
227
226
|
.b2b-alert--info {
|
|
228
227
|
background-color: var(--b2b-color-info-50);
|
|
229
228
|
}
|
|
230
|
-
.b2b-alert--
|
|
229
|
+
.b2b-alert--info__icon {
|
|
231
230
|
color: var(--b2b-color-info-100);
|
|
232
231
|
}
|
|
233
232
|
.b2b-alert--warning {
|
|
@@ -240,10 +239,10 @@
|
|
|
240
239
|
.b2b-alert--success {
|
|
241
240
|
background-color: var(--b2b-color-success-50);
|
|
242
241
|
}
|
|
243
|
-
.b2b-alert--
|
|
242
|
+
.b2b-alert--success__icon {
|
|
244
243
|
color: var(--b2b-color-success-100);
|
|
245
244
|
}
|
|
246
|
-
.b2b-
|
|
245
|
+
.b2b-alert__close-icon {
|
|
247
246
|
padding-top: var(--b2b-size-7);
|
|
248
247
|
width: var(--b2b-size-30);
|
|
249
248
|
height: var(--b2b-size-35);
|
|
@@ -251,13 +250,13 @@
|
|
|
251
250
|
fill: var(--b2b-color-grey-400);
|
|
252
251
|
flex-shrink: 0;
|
|
253
252
|
}
|
|
254
|
-
.b2b-
|
|
253
|
+
.b2b-alert__content {
|
|
255
254
|
display: flex;
|
|
256
255
|
align-items: center;
|
|
257
256
|
flex: 2;
|
|
258
257
|
gap: var(--b2b-size-30);
|
|
259
258
|
}
|
|
260
|
-
.b2b-
|
|
259
|
+
.b2b-alert__content p {
|
|
261
260
|
width: 100%;
|
|
262
261
|
margin: 0;
|
|
263
262
|
padding: var(--b2b-size-5) 0 var(--b2b-size-1) 0;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('B2B-Alert', () => {
|
|
3
|
+
it('should render the alert component', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent(`<b2b-alert></alert>`);
|
|
6
|
+
const element = await page.find('b2b-alert');
|
|
7
|
+
expect(element).not.toBeNull();
|
|
8
|
+
});
|
|
9
|
+
it('should not be visible by default', async () => {
|
|
10
|
+
const page = await newE2EPage();
|
|
11
|
+
await page.setContent(`<b2b-alert></alert>`);
|
|
12
|
+
const element = await page.find('b2b-alert >>> div.b2b-alert');
|
|
13
|
+
expect(element).not.toHaveClass('b2b-alert--open');
|
|
14
|
+
const alert = await page.find('b2b-alert');
|
|
15
|
+
expect(await alert.getProperty('opened')).toBe(false);
|
|
16
|
+
});
|
|
17
|
+
it('should open the alert', async () => {
|
|
18
|
+
const page = await newE2EPage();
|
|
19
|
+
await page.setContent(`<b2b-alert opened></b2b-alert>`);
|
|
20
|
+
const element = await page.find('b2b-alert >>> div');
|
|
21
|
+
expect(await element.isVisible()).toBe(true);
|
|
22
|
+
});
|
|
23
|
+
it('should not render text in a small alert', async () => {
|
|
24
|
+
const page = await newE2EPage();
|
|
25
|
+
await page.setContent(`<b2b-alert opened>test</b2b-alert>`);
|
|
26
|
+
const element = await page.find('b2b-alert >>> p');
|
|
27
|
+
expect(element).toBeNull();
|
|
28
|
+
});
|
|
29
|
+
it('should render a large alert with text', async () => {
|
|
30
|
+
const page = await newE2EPage();
|
|
31
|
+
await page.setContent(`<b2b-alert opened size={large}>test</b2b-alert>`);
|
|
32
|
+
const element = await page.find({ text: 'test' });
|
|
33
|
+
expect(element).not.toBeNull();
|
|
34
|
+
});
|
|
35
|
+
it('should render a close button by default in a large alert', async () => {
|
|
36
|
+
const page = await newE2EPage();
|
|
37
|
+
await page.setContent(`<b2b-alert opened size="large">test</b2b-alert>`);
|
|
38
|
+
const alert = await page.find('b2b-alert >>> div');
|
|
39
|
+
const element = await page.find('b2b-alert >>> div.b2b-alert__close-icon');
|
|
40
|
+
expect(element).not.toBeNull();
|
|
41
|
+
await page.evaluate(() => {
|
|
42
|
+
document
|
|
43
|
+
.querySelector('b2b-alert')
|
|
44
|
+
.shadowRoot.querySelector('.b2b-alert__close-icon').click();
|
|
45
|
+
});
|
|
46
|
+
await page.waitForChanges();
|
|
47
|
+
expect(await alert.isVisible()).toBeFalsy();
|
|
48
|
+
});
|
|
49
|
+
it('should not render a close button on an error alert', async () => {
|
|
50
|
+
const page = await newE2EPage();
|
|
51
|
+
await page.setContent(`<b2b-alert opened size="large" type="error">test</b2b-alert>`);
|
|
52
|
+
const element = await page.find('b2b-alert >>> div.b2b-alert__close-icon');
|
|
53
|
+
expect(element).toBeNull();
|
|
54
|
+
});
|
|
55
|
+
it('should not render a close button in a small alert', async () => {
|
|
56
|
+
const page = await newE2EPage();
|
|
57
|
+
await page.setContent(`<b2b-alert opened>test</b2b-alert>`);
|
|
58
|
+
const element = await page.find('b2b-alert >>> div.b2b-alert__close-icon');
|
|
59
|
+
expect(element).toBeNull();
|
|
60
|
+
});
|
|
61
|
+
it('should render with a custom icon', async () => {
|
|
62
|
+
const page = await newE2EPage();
|
|
63
|
+
await page.setContent(`<b2b-alert opened custom-icon><b2b-icon icon="b2b_icon-menu"></b2b-icon></b2b-alert>`);
|
|
64
|
+
const element = await page.find('b2b-icon');
|
|
65
|
+
expect(element).not.toBeNull();
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -30,9 +30,9 @@ export class AlertComponent {
|
|
|
30
30
|
[`b2b-alert--${this.type}`]: true,
|
|
31
31
|
[`b2b-alert--${this.size}`]: true,
|
|
32
32
|
'b2b-alert--open': this.opened,
|
|
33
|
-
} }, h("div", { class: "b2b-
|
|
33
|
+
} }, h("div", { class: "b2b-alert__content" }, h("span", { class: { [`b2b-alert--${this.type}__icon`]: true } }, this.canCustomizeIcon() ? h("slot", null) : this.chooseIcon()), this.size === 'large' && (h("p", null, h("slot", null)))), this.canClose() && (
|
|
34
34
|
//using a custom icon as this component needs an icon size that is not supported in the icon component
|
|
35
|
-
h("div", { class: "b2b-
|
|
35
|
+
h("div", { class: "b2b-alert__close-icon", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { d: "M17.886 16l8.057-8.057a1.333 1.333 0 1 0-1.885-1.886l-8.057 8.057-8.057-8.057a1.333 1.333 0 1 0-1.886 1.886L14.115 16l-8.057 8.057a1.332 1.332 0 1 0 1.886 1.885l8.057-8.057 8.057 8.057a1.331 1.331 0 0 0 1.886 0 1.332 1.332 0 0 0 0-1.885L17.887 16z" })))))));
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "b2b-alert"; }
|
|
38
38
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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 */
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { newSpecPage } from '@stencil/core/testing';
|
|
2
|
+
import { h } from '@stencil/core';
|
|
3
|
+
import { AnchorComponent } from './anchor';
|
|
4
|
+
const testRef = 'https://www.otto.de';
|
|
5
|
+
it('should render the anchor component with default values', async () => {
|
|
6
|
+
const page = await newSpecPage({
|
|
7
|
+
components: [AnchorComponent],
|
|
8
|
+
template: () => (h("b2b-anchor", { href: testRef }, "This is a test anchor.")),
|
|
9
|
+
});
|
|
10
|
+
expect(page.root).toEqualHtml(`
|
|
11
|
+
<b2b-anchor>
|
|
12
|
+
<mock:shadow-root>
|
|
13
|
+
<a href="https://www.otto.de" class="b2b-anchor b2b-anchor--inherit" target="_self">
|
|
14
|
+
<slot></slot>
|
|
15
|
+
</a>
|
|
16
|
+
</mock:shadow-root>
|
|
17
|
+
This is a test anchor.
|
|
18
|
+
</b2b-anchor>
|
|
19
|
+
`);
|
|
20
|
+
});
|
|
21
|
+
it('should change the font size of the anchor component if specified', async () => {
|
|
22
|
+
const page = await newSpecPage({
|
|
23
|
+
components: [AnchorComponent],
|
|
24
|
+
template: () => (h("b2b-anchor", { href: testRef, size: "100" }, "This is a test anchor.")),
|
|
25
|
+
});
|
|
26
|
+
expect(page.root).toEqualHtml(`
|
|
27
|
+
<b2b-anchor>
|
|
28
|
+
<mock:shadow-root>
|
|
29
|
+
<a href="https://www.otto.de" class="b2b-anchor b2b-anchor--100" target="_self">
|
|
30
|
+
<slot></slot>
|
|
31
|
+
</a>
|
|
32
|
+
</mock:shadow-root>
|
|
33
|
+
This is a test anchor.
|
|
34
|
+
</b2b-anchor>
|
|
35
|
+
`);
|
|
36
|
+
});
|
|
37
|
+
it('should change the download string if specified', async () => {
|
|
38
|
+
const page = await newSpecPage({
|
|
39
|
+
components: [AnchorComponent],
|
|
40
|
+
template: () => (h("b2b-anchor", { href: testRef, download: "This is a test download" }, "This is a test anchor.")),
|
|
41
|
+
});
|
|
42
|
+
expect(page.root).toEqualHtml(`
|
|
43
|
+
<b2b-anchor>
|
|
44
|
+
<mock:shadow-root>
|
|
45
|
+
<a href="https://www.otto.de" class="b2b-anchor b2b-anchor--inherit" target="_self" download="This is a test download">
|
|
46
|
+
<slot></slot>
|
|
47
|
+
</a>
|
|
48
|
+
</mock:shadow-root>
|
|
49
|
+
This is a test anchor.
|
|
50
|
+
</b2b-anchor>
|
|
51
|
+
`);
|
|
52
|
+
});
|
|
53
|
+
it('should change the target property if specified', async () => {
|
|
54
|
+
const page = await newSpecPage({
|
|
55
|
+
components: [AnchorComponent],
|
|
56
|
+
template: () => (h("b2b-anchor", { href: testRef, target: "parent" }, "This is a test anchor.")),
|
|
57
|
+
});
|
|
58
|
+
expect(page.root).toEqualHtml(`
|
|
59
|
+
<b2b-anchor>
|
|
60
|
+
<mock:shadow-root>
|
|
61
|
+
<a href="https://www.otto.de" class="b2b-anchor b2b-anchor--inherit" target="_parent">
|
|
62
|
+
<slot></slot>
|
|
63
|
+
</a>
|
|
64
|
+
</mock:shadow-root>
|
|
65
|
+
This is a test anchor.
|
|
66
|
+
</b2b-anchor>
|
|
67
|
+
`);
|
|
68
|
+
});
|
|
@@ -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 */
|
|
@@ -254,40 +253,39 @@
|
|
|
254
253
|
display: flex;
|
|
255
254
|
align-items: center;
|
|
256
255
|
}
|
|
257
|
-
:host button.primary,
|
|
258
|
-
:host a.primary {
|
|
256
|
+
:host button.b2b-button--primary,
|
|
257
|
+
:host a.b2b-button--primary {
|
|
259
258
|
color: var(--b2b-color-white-100);
|
|
260
259
|
background-color: var(--b2b-color-red-100);
|
|
261
260
|
border: 1px solid var(--b2b-color-red-100);
|
|
262
261
|
}
|
|
263
|
-
:host button.primary:hover,
|
|
264
|
-
:host a.primary:hover {
|
|
262
|
+
:host button.b2b-button--primary:hover,
|
|
263
|
+
:host a.b2b-button--primary:hover {
|
|
265
264
|
background-color: var(--b2b-color-red-200);
|
|
266
265
|
}
|
|
267
|
-
:host button.primary.loading::after,
|
|
268
|
-
:host a.primary.loading::after {
|
|
266
|
+
:host button.b2b-button--primary.loading::after,
|
|
267
|
+
:host a.b2b-button--primary.loading::after {
|
|
269
268
|
border: 0.125rem solid rgba(255, 255, 255, 0.5);
|
|
270
269
|
border-top: 0.125rem solid var(--b2b-color-red-100);
|
|
271
270
|
}
|
|
272
|
-
:host button.secondary,
|
|
273
|
-
:host a.secondary {
|
|
271
|
+
:host button.b2b-button--secondary,
|
|
272
|
+
:host a.b2b-button--secondary {
|
|
274
273
|
color: var(--b2b-color-copy-default);
|
|
275
274
|
background-color: var(--b2b-button-secondary-background-color);
|
|
276
275
|
border: 1px solid var(--b2b-button-secondary-border-color);
|
|
277
276
|
border-right: var(--b2b-border-right);
|
|
278
277
|
}
|
|
279
|
-
:host button.secondary:hover,
|
|
280
|
-
:host a.secondary:hover {
|
|
278
|
+
:host button.b2b-button--secondary:hover,
|
|
279
|
+
:host a.b2b-button--secondary:hover {
|
|
281
280
|
background-color: var(--b2b-button-secondary-hover-background-color);
|
|
282
281
|
}
|
|
283
|
-
:host button.secondary.loading::after,
|
|
284
|
-
:host a.secondary.loading::after {
|
|
282
|
+
:host button.b2b-button--secondary.loading::after,
|
|
283
|
+
:host a.b2b-button--secondary.loading::after {
|
|
285
284
|
border: 0.125rem solid rgba(51, 51, 51, 0.2);
|
|
286
285
|
border-top: 0.125rem solid var(--b2b-color-copy-default);
|
|
287
286
|
}
|
|
288
|
-
:host button:disabled,
|
|
289
|
-
:host a:disabled
|
|
290
|
-
:host a.disabled {
|
|
287
|
+
:host button:disabled,
|
|
288
|
+
:host a:disabled {
|
|
291
289
|
cursor: default;
|
|
292
290
|
pointer-events: none;
|
|
293
291
|
background-color: var(--b2b-color-grey-50);
|
|
@@ -296,32 +294,29 @@
|
|
|
296
294
|
color: var(--b2b-color-grey-250);
|
|
297
295
|
}
|
|
298
296
|
:host button:disabled [slot=start],
|
|
299
|
-
:host button:disabled [slot=end],
|
|
300
|
-
:host button.disabled [slot=end],
|
|
297
|
+
:host button:disabled [slot=end],
|
|
301
298
|
:host a:disabled [slot=start],
|
|
302
|
-
:host a:disabled [slot=end]
|
|
303
|
-
:host a.disabled [slot=start],
|
|
304
|
-
:host a.disabled [slot=end] {
|
|
299
|
+
:host a:disabled [slot=end] {
|
|
305
300
|
fill: var(--b2b-color-grey-250);
|
|
306
301
|
}
|
|
307
302
|
:host button:focus,
|
|
308
303
|
:host a:focus {
|
|
309
304
|
z-index: 10;
|
|
310
305
|
}
|
|
311
|
-
:host(.loading) button,
|
|
312
|
-
:host(.loading) a {
|
|
306
|
+
:host(.b2b-button--loading) button,
|
|
307
|
+
:host(.b2b-button--loading) a {
|
|
313
308
|
color: transparent;
|
|
314
309
|
position: relative;
|
|
315
310
|
cursor: default;
|
|
316
311
|
pointer-events: none;
|
|
317
312
|
}
|
|
318
|
-
:host(.loading).primary::after, :host(.loading).primary:hover {
|
|
313
|
+
:host(.b2b-button--loading).b2b-button--primary::after, :host(.b2b-button--loading).b2b-button--primary:hover {
|
|
319
314
|
color: var(--b2b-color-white-100);
|
|
320
315
|
}
|
|
321
|
-
:host(.loading).secondary::after, :host(.loading).secondary:hover {
|
|
316
|
+
:host(.b2b-button--loading).b2b-button--secondary::after, :host(.b2b-button--loading).b2b-button--secondary:hover {
|
|
322
317
|
color: var(--b2b-color-copy-default);
|
|
323
318
|
}
|
|
324
|
-
:host(.loading) .
|
|
319
|
+
:host(.b2b-button--loading) .b2b-button__spinner {
|
|
325
320
|
box-sizing: border-box;
|
|
326
321
|
display: inline;
|
|
327
322
|
position: absolute !important;
|
|
@@ -330,32 +325,32 @@
|
|
|
330
325
|
margin-top: -0.625rem;
|
|
331
326
|
margin-left: -0.625rem;
|
|
332
327
|
}
|
|
333
|
-
:host(.loading) [slot=start],
|
|
334
|
-
:host(.loading) [slot=end] {
|
|
328
|
+
:host(.b2b-button--loading) [slot=start],
|
|
329
|
+
:host(.b2b-button--loading) [slot=end] {
|
|
335
330
|
visibility: hidden;
|
|
336
331
|
}
|
|
337
|
-
:host(.button
|
|
338
|
-
:host(.button
|
|
332
|
+
:host(.b2b-button--50) button,
|
|
333
|
+
:host(.b2b-button--50) a {
|
|
339
334
|
height: 1.875rem;
|
|
340
335
|
max-width: 100%;
|
|
341
336
|
}
|
|
342
|
-
:host(.button
|
|
343
|
-
:host(.button
|
|
337
|
+
:host(.b2b-button--100) button,
|
|
338
|
+
:host(.b2b-button--100) a {
|
|
344
339
|
height: 2.25rem;
|
|
345
340
|
}
|
|
346
|
-
:host(.button
|
|
347
|
-
:host(.button
|
|
341
|
+
:host(.b2b-button--active) button,
|
|
342
|
+
:host(.b2b-button--active) a {
|
|
348
343
|
background-color: var(--b2b-color-black-100);
|
|
349
344
|
color: var(--b2b-color-white-100);
|
|
350
345
|
border: 1px solid var(--b2b-button-secondary-border-color);
|
|
351
346
|
border-right: var(--b2b-border-right);
|
|
352
347
|
}
|
|
353
|
-
:host(.button
|
|
354
|
-
:host(.button
|
|
348
|
+
:host(.b2b-button--active) button:hover,
|
|
349
|
+
:host(.b2b-button--active) a:hover {
|
|
355
350
|
background-color: var(--b2b-color-black-100);
|
|
356
351
|
}
|
|
357
|
-
:host(.icon-only) button,
|
|
358
|
-
:host(.icon-only) a {
|
|
352
|
+
:host(.b2b-button--icon-only) button,
|
|
353
|
+
:host(.b2b-button--icon-only) a {
|
|
359
354
|
padding: 0 var(--b2b-size-20);
|
|
360
355
|
}
|
|
361
356
|
::slotted(*[slot=start]) {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('B2B-Button', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<b2b-button>Hello World</b2b-button>`);
|
|
7
|
+
});
|
|
8
|
+
it('should render the button component', async () => {
|
|
9
|
+
const element = await page.find('b2b-button');
|
|
10
|
+
expect(element).not.toBeNull();
|
|
11
|
+
});
|
|
12
|
+
it('should display text', async () => {
|
|
13
|
+
const element = await page.find('b2b-button');
|
|
14
|
+
expect(element).toEqualText('Hello World');
|
|
15
|
+
});
|
|
16
|
+
it('should emit click event when clicked', async () => {
|
|
17
|
+
const eventSpy = await page.spyOnEvent('click');
|
|
18
|
+
await page.click('b2b-button');
|
|
19
|
+
expect(eventSpy).toHaveReceivedEvent();
|
|
20
|
+
});
|
|
21
|
+
it('should not be able to click when disabled', async () => {
|
|
22
|
+
page = await newE2EPage();
|
|
23
|
+
await page.setContent(`<b2b-button disabled={true}>Hello World</b2b-button>`);
|
|
24
|
+
const eventSpy = await page.spyOnEvent('click');
|
|
25
|
+
await page.click('b2b-button');
|
|
26
|
+
expect(eventSpy).not.toHaveReceivedEvent();
|
|
27
|
+
});
|
|
28
|
+
it('should not be able to click when loading', async () => {
|
|
29
|
+
page = await newE2EPage();
|
|
30
|
+
await page.setContent(`<b2b-button loading={true}>Hello World</b2b-button>`);
|
|
31
|
+
const eventSpy = await page.spyOnEvent('click');
|
|
32
|
+
await page.click('b2b-button');
|
|
33
|
+
expect(eventSpy).not.toHaveReceivedEvent();
|
|
34
|
+
});
|
|
35
|
+
it('should support form submission from shadow dom', async () => {
|
|
36
|
+
const form = `
|
|
37
|
+
<form>
|
|
38
|
+
<b2b-button type='submit'>Hello World</b2b-button>
|
|
39
|
+
</form>
|
|
40
|
+
`;
|
|
41
|
+
page = await newE2EPage();
|
|
42
|
+
await page.setContent(form);
|
|
43
|
+
const submitEventSpy = await page.spyOnEvent('submit');
|
|
44
|
+
const formdataEventSpy = await page.spyOnEvent('formdata');
|
|
45
|
+
await page.click('b2b-button');
|
|
46
|
+
expect(submitEventSpy).toHaveReceivedEvent();
|
|
47
|
+
expect(formdataEventSpy).toHaveReceivedEvent();
|
|
48
|
+
});
|
|
49
|
+
it('should reduce padding on the button if there is only an icon', async () => {
|
|
50
|
+
page = await newE2EPage();
|
|
51
|
+
await page.setContent(`<b2b-button variant="primary" size="100">
|
|
52
|
+
<b2b-icon slot="end" icon="b2b_icon-check" size="100"></b2b-icon>
|
|
53
|
+
</b2b-button>`);
|
|
54
|
+
const button = await page.find('b2b-button');
|
|
55
|
+
expect(button).toHaveClass('b2b-button--icon-only');
|
|
56
|
+
});
|
|
57
|
+
it('should not reduce padding on the button if there is text', async () => {
|
|
58
|
+
page = await newE2EPage();
|
|
59
|
+
await page.setContent(`<b2b-button variant="primary" size="100">
|
|
60
|
+
<span>Hello World</span>
|
|
61
|
+
<b2b-icon slot="end" icon="b2b_icon-check" size="100"></b2b-icon>
|
|
62
|
+
</b2b-button>`);
|
|
63
|
+
const button = await page.find('b2b-button');
|
|
64
|
+
expect(button).not.toHaveClass('b2b-button--icon-only');
|
|
65
|
+
});
|
|
66
|
+
it('should not submit a form when the button is not of type submit', async () => {
|
|
67
|
+
const form = `
|
|
68
|
+
<form>
|
|
69
|
+
<b2b-button>Hello World</b2b-button>
|
|
70
|
+
</form>
|
|
71
|
+
`;
|
|
72
|
+
page = await newE2EPage();
|
|
73
|
+
await page.setContent(form);
|
|
74
|
+
const submitEventSpy = await page.spyOnEvent('submit');
|
|
75
|
+
const button = await page.find({ text: 'Hello World' });
|
|
76
|
+
await button.click();
|
|
77
|
+
page.waitForChanges();
|
|
78
|
+
expect(submitEventSpy).not.toHaveReceivedEvent();
|
|
79
|
+
});
|
|
80
|
+
});
|
|
@@ -28,6 +28,7 @@ export class ButtonComponent {
|
|
|
28
28
|
this.href = undefined;
|
|
29
29
|
this.target = 'self';
|
|
30
30
|
this.download = undefined;
|
|
31
|
+
this.groupDisabled = false;
|
|
31
32
|
}
|
|
32
33
|
/** Manually set focus to button element */
|
|
33
34
|
async setFocus() {
|
|
@@ -54,15 +55,18 @@ export class ButtonComponent {
|
|
|
54
55
|
}
|
|
55
56
|
spinner() {
|
|
56
57
|
const spinnerColor = this.variant === 'primary' ? 'inverse' : 'secondary';
|
|
57
|
-
return (h("div", { class: "
|
|
58
|
+
return (h("div", { class: "b2b-button__spinner" }, h("b2b-spinner", { color: spinnerColor, size: "50" })));
|
|
58
59
|
}
|
|
59
60
|
render() {
|
|
60
61
|
return (h(Host, { class: {
|
|
61
|
-
loading: this.canLoad(),
|
|
62
|
-
[`button
|
|
63
|
-
[`button
|
|
64
|
-
[`icon-only`]: this.checkIcon(),
|
|
65
|
-
} }, this.href !== undefined ? (h("a", { href: this.href, target: `_${this.target}`, download: this.download, class: {
|
|
62
|
+
[`b2b-button--loading`]: this.canLoad(),
|
|
63
|
+
[`b2b-button--${this.size}`]: true,
|
|
64
|
+
[`b2b-button--active`]: this.active,
|
|
65
|
+
[`b2b-button--icon-only`]: this.checkIcon(),
|
|
66
|
+
} }, this.href !== undefined ? (h("a", { href: this.href, target: `_${this.target}`, download: this.download, class: {
|
|
67
|
+
disabled: this.disabled || this.groupDisabled,
|
|
68
|
+
[`b2b-button--${this.variant}`]: true,
|
|
69
|
+
}, ref: el => (this.focusableElement = el) }, h("span", null, h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), this.canLoad() ? this.spinner() : null)) : (h("button", { disabled: this.disabled || this.groupDisabled, class: { [`b2b-button--${this.variant}`]: true }, type: this.type, ref: el => (this.focusableElement = el) }, h("span", null, h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), this.canLoad() ? this.spinner() : null))));
|
|
66
70
|
}
|
|
67
71
|
static get is() { return "b2b-button"; }
|
|
68
72
|
static get encapsulation() { return "shadow"; }
|
|
@@ -237,6 +241,27 @@ export class ButtonComponent {
|
|
|
237
241
|
},
|
|
238
242
|
"attribute": "download",
|
|
239
243
|
"reflect": false
|
|
244
|
+
},
|
|
245
|
+
"groupDisabled": {
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"mutable": false,
|
|
248
|
+
"complexType": {
|
|
249
|
+
"original": "boolean",
|
|
250
|
+
"resolved": "boolean",
|
|
251
|
+
"references": {}
|
|
252
|
+
},
|
|
253
|
+
"required": false,
|
|
254
|
+
"optional": false,
|
|
255
|
+
"docs": {
|
|
256
|
+
"tags": [{
|
|
257
|
+
"name": "internal",
|
|
258
|
+
"text": "Whether the parent input group is disabled. Per default, it is false."
|
|
259
|
+
}],
|
|
260
|
+
"text": ""
|
|
261
|
+
},
|
|
262
|
+
"attribute": "group-disabled",
|
|
263
|
+
"reflect": false,
|
|
264
|
+
"defaultValue": "false"
|
|
240
265
|
}
|
|
241
266
|
};
|
|
242
267
|
}
|
|
@@ -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 */
|