@otto-de/b2b-core-components 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/b2b-core-components/b2b-core-components.css +1 -1
- package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
- package/dist/b2b-core-components/p-01fd54a1.entry.js +1 -0
- package/dist/b2b-core-components/p-04fc18cd.entry.js +1 -0
- package/dist/b2b-core-components/p-06aa96a8.entry.js +1 -0
- package/dist/b2b-core-components/p-077217b3.entry.js +1 -0
- package/dist/b2b-core-components/p-0965b990.entry.js +1 -0
- package/dist/b2b-core-components/p-0beabdb4.entry.js +1 -0
- package/dist/b2b-core-components/p-163466cf.entry.js +1 -0
- package/dist/b2b-core-components/{p-c2bcf0a8.entry.js → p-197c1a6d.entry.js} +1 -1
- package/dist/b2b-core-components/p-1d007eea.entry.js +1 -0
- package/dist/b2b-core-components/{p-400b3111.entry.js → p-1e2752b2.entry.js} +1 -1
- package/dist/b2b-core-components/p-2328144b.entry.js +1 -0
- package/dist/b2b-core-components/{p-9184036b.entry.js → p-2ad8bdb6.entry.js} +1 -1
- package/dist/b2b-core-components/p-2d01e68a.entry.js +1 -0
- package/dist/b2b-core-components/{p-34f6555e.entry.js → p-3c0671ef.entry.js} +1 -1
- package/dist/b2b-core-components/p-42e7f397.entry.js +1 -0
- package/dist/b2b-core-components/p-44ccd8f4.entry.js +1 -0
- package/dist/b2b-core-components/p-542a358a.entry.js +1 -0
- package/dist/b2b-core-components/p-54fd68eb.entry.js +1 -0
- package/dist/b2b-core-components/p-60badad5.entry.js +1 -0
- package/dist/b2b-core-components/p-6140304e.entry.js +1 -0
- package/dist/b2b-core-components/{p-f0aa5e83.entry.js → p-681d6880.entry.js} +1 -1
- package/dist/b2b-core-components/p-8ad1bb92.entry.js +1 -0
- package/dist/b2b-core-components/p-90a3ffed.entry.js +1 -0
- package/dist/b2b-core-components/p-97ef9805.entry.js +1 -0
- package/dist/b2b-core-components/{p-48d4d224.entry.js → p-a50ea33f.entry.js} +1 -1
- package/dist/b2b-core-components/p-b3ccfc58.entry.js +1 -0
- package/dist/b2b-core-components/p-b6a8a06f.entry.js +1 -0
- package/dist/b2b-core-components/p-b8049234.entry.js +1 -0
- package/dist/b2b-core-components/p-bb5e7c53.js +1 -0
- package/dist/b2b-core-components/p-c294dd0c.entry.js +1 -0
- package/dist/b2b-core-components/p-d07210e2.entry.js +1 -0
- package/dist/b2b-core-components/p-d7bb8aa1.entry.js +1 -0
- package/dist/b2b-core-components/p-d83c2084.entry.js +1 -0
- package/dist/b2b-core-components/p-db7d2ec3.entry.js +1 -0
- package/dist/b2b-core-components/{p-9facba86.entry.js → p-dd79ab5b.entry.js} +1 -1
- package/dist/b2b-core-components/p-e5b78075.entry.js +1 -0
- package/dist/b2b-core-components/p-e811411a.entry.js +1 -0
- package/dist/b2b-core-components/p-f190bf79.entry.js +1 -0
- package/dist/b2b-core-components/p-f24515bf.entry.js +1 -0
- package/dist/b2b-core-components/p-f3ce95bf.js +2 -0
- package/dist/b2b-core-components/p-f7e9f889.entry.js +1 -0
- package/dist/cjs/b2b-alert.cjs.entry.js +4 -4
- package/dist/cjs/b2b-anchor.cjs.entry.js +2 -2
- package/dist/cjs/b2b-button_2.cjs.entry.js +13 -9
- package/dist/cjs/b2b-card.cjs.entry.js +2 -2
- package/dist/cjs/b2b-checkbox-group.cjs.entry.js +7 -5
- package/dist/cjs/b2b-checkbox_3.cjs.entry.js +206 -0
- package/dist/cjs/b2b-core-components.cjs.js +3 -3
- package/dist/cjs/b2b-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/b2b-grid-col.cjs.entry.js +1 -1
- package/dist/cjs/b2b-grid-row.cjs.entry.js +2 -2
- package/dist/cjs/b2b-grid.cjs.entry.js +1 -1
- package/dist/cjs/b2b-headline.cjs.entry.js +2 -2
- package/dist/cjs/b2b-icon.cjs.entry.js +4 -4
- package/dist/cjs/b2b-input-group_2.cjs.entry.js +12 -9
- package/dist/cjs/b2b-input-label.cjs.entry.js +1 -1
- package/dist/cjs/b2b-input_2.cjs.entry.js +8 -7
- package/dist/cjs/b2b-label.cjs.entry.js +2 -2
- package/dist/cjs/b2b-modal.cjs.entry.js +5 -5
- package/dist/cjs/b2b-pagination.cjs.entry.js +5 -5
- package/dist/cjs/b2b-paragraph.cjs.entry.js +5 -5
- package/dist/cjs/b2b-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/b2b-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/b2b-required-separator.cjs.entry.js +3 -3
- package/dist/cjs/b2b-rounded-icon.cjs.entry.js +4 -2
- package/dist/cjs/b2b-scrollable-container.cjs.entry.js +2 -2
- package/dist/cjs/b2b-search.cjs.entry.js +6 -1
- package/dist/cjs/b2b-separator.cjs.entry.js +2 -2
- package/dist/cjs/b2b-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/b2b-tab.cjs.entry.js +2 -2
- package/dist/cjs/b2b-table-row.cjs.entry.js +78 -23
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +87 -26
- package/dist/cjs/b2b-table.cjs.entry.js +13 -13
- package/dist/cjs/b2b-textarea.cjs.entry.js +2 -2
- package/dist/cjs/b2b-toggle-button.cjs.entry.js +7 -7
- package/dist/cjs/b2b-toggle-group.cjs.entry.js +3 -3
- package/dist/cjs/b2b-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/b2b-wizard-icon.cjs.entry.js +6 -4
- package/dist/cjs/b2b-wizard-step.cjs.entry.js +26 -0
- package/dist/cjs/b2b-wizard.cjs.entry.js +61 -0
- package/dist/cjs/{index-496aa5dd.js → index-04e07a00.js} +100 -35
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{types-ef85a0bf.js → table.types-00c8228a.js} +4 -4
- package/dist/cjs/wizard.types-690c64bb.js +10 -0
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/alert/alert.css +8 -9
- package/dist/collection/components/alert/alert.e2e.js +67 -0
- package/dist/collection/components/alert/alert.js +2 -2
- package/dist/collection/components/anchor/anchor.css +3 -4
- package/dist/collection/components/anchor/anchor.spec.js +68 -0
- package/dist/collection/components/button/button.css +36 -41
- package/dist/collection/components/button/button.e2e.js +80 -0
- package/dist/collection/components/button/button.js +31 -6
- package/dist/collection/components/card/card.css +3 -4
- package/dist/collection/components/card/card.e2e.js +110 -0
- package/dist/collection/components/card/card.spec.js +32 -0
- package/dist/collection/components/checkbox/checkbox.css +36 -16
- package/dist/collection/components/checkbox/checkbox.e2e.js +30 -0
- package/dist/collection/components/checkbox/checkbox.js +81 -6
- package/dist/collection/components/checkbox/checkbox.spec.js +45 -0
- package/dist/collection/components/checkbox-group/checkbox-group.css +7 -8
- package/dist/collection/components/checkbox-group/checkbox-group.e2e.js +78 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +5 -3
- package/dist/collection/components/checkbox-group/checkbox-group.spec.js +38 -0
- package/dist/collection/components/dropdown/dropdown.css +9 -10
- package/dist/collection/components/dropdown/dropdown.e2e.js +48 -0
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/dropdown/dropdown.spec.js +52 -0
- package/dist/collection/components/grid/grid.e2e.js +17 -0
- package/dist/collection/components/grid/row.js +1 -1
- package/dist/collection/components/headline/headline.css +3 -4
- package/dist/collection/components/headline/headline.e2e.js +13 -0
- package/dist/collection/components/headline/headline.spec.js +67 -0
- package/dist/collection/components/icon/icon.css +10 -11
- package/dist/collection/components/icon/icon.js +2 -2
- package/dist/collection/components/icon/icon.spec.js +21 -0
- package/dist/collection/components/input/input.css +16 -17
- package/dist/collection/components/input/input.e2e.js +43 -0
- package/dist/collection/components/input/input.js +26 -4
- package/dist/collection/components/input/input.spec.js +45 -0
- package/dist/collection/components/input-group/input-group.css +6 -7
- package/dist/collection/components/input-group/input-group.e2e.js +76 -0
- package/dist/collection/components/input-group/input-group.js +6 -4
- package/dist/collection/components/input-group/input-group.spec.js +56 -0
- package/dist/collection/components/input-label/input-label.e2e.js +10 -0
- package/dist/collection/components/input-list/input-list.css +8 -9
- package/dist/collection/components/input-list/input-list.e2e.js +227 -0
- package/dist/collection/components/input-list/input-list.js +24 -2
- package/dist/collection/components/label/label.css +4 -5
- package/dist/collection/components/label/label.e2e.js +17 -0
- package/dist/collection/components/label/label.spec.js +58 -0
- package/dist/collection/components/modal/modal.css +14 -20
- package/dist/collection/components/modal/modal.e2e.js +115 -0
- package/dist/collection/components/modal/modal.js +3 -3
- package/dist/collection/components/pagination/pagination.css +8 -9
- package/dist/collection/components/pagination/pagination.e2e.js +256 -0
- package/dist/collection/components/pagination/pagination.js +3 -3
- package/dist/collection/components/pagination/pagination.spec.js +104 -0
- package/dist/collection/components/paragraph/paragraph.css +11 -12
- package/dist/collection/components/paragraph/paragraph.e2e.js +13 -0
- package/dist/collection/components/paragraph/paragraph.js +3 -3
- package/dist/collection/components/radio/radio.css +4 -5
- package/dist/collection/components/radio/radio.e2e.js +36 -0
- package/dist/collection/components/radio/radio.spec.js +38 -0
- package/dist/collection/components/radio-group/radio-group.css +4 -5
- package/dist/collection/components/radio-group/radio-group.e2e.js +71 -0
- package/dist/collection/components/radio-group/radio-group.spec.js +31 -0
- package/dist/collection/components/required-separator/required-separator.css +5 -6
- package/dist/collection/components/required-separator/required-separator.e2e.js +17 -0
- package/dist/collection/components/required-separator/required-separator.js +1 -1
- package/dist/collection/components/rounded-icon/rounded-icon.css +4 -5
- package/dist/collection/components/rounded-icon/rounded-icon.js +19 -0
- package/dist/collection/components/scrollable-container/scrollable-container.css +3 -4
- package/dist/collection/components/search/search.e2e.js +97 -0
- package/dist/collection/components/search/search.js +14 -0
- package/dist/collection/components/separator/separator.css +3 -4
- package/dist/collection/components/separator/separator.e2e.js +22 -0
- package/dist/collection/components/spinner/spinner.css +3 -4
- package/dist/collection/components/spinner/spinner.e2e.js +12 -0
- package/dist/collection/components/spinner/spinner.spec.js +41 -0
- package/dist/collection/components/tab/tab.css +3 -4
- package/dist/collection/components/tab/tab.e2e.js +35 -0
- package/dist/collection/components/tab/tab.spec.js +31 -0
- package/dist/collection/components/tab-group/tab-group.e2e.js +98 -0
- package/dist/collection/components/tab-panel/tab-panel.css +3 -4
- package/dist/collection/components/tab-panel/tab-panel.e2e.js +12 -0
- package/dist/collection/components/tab-panel/tab-panel.spec.js +10 -0
- package/dist/collection/components/table/stories.data.js +6 -6
- package/dist/collection/components/table/table-cell/table-cell.css +3 -4
- package/dist/collection/components/table/table-cell/table-cell.js +4 -4
- package/dist/collection/components/table/table-header/table-header.css +18 -19
- package/dist/collection/components/table/table-header/table-header.js +7 -7
- package/dist/collection/components/table/table-row/table-row.css +4 -5
- package/dist/collection/components/table/table-row/table-row.js +187 -28
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +4 -5
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +119 -24
- package/dist/collection/components/table/table.css +3 -4
- package/dist/collection/components/table/table.e2e.js +370 -0
- package/dist/collection/components/table/table.js +10 -10
- package/dist/collection/components/table/table.stories.js +17 -8
- package/dist/collection/components/table/utils.js +18 -0
- package/dist/collection/components/textarea/textarea.css +4 -5
- package/dist/collection/components/textarea/textarea.e2e.js +91 -0
- package/dist/collection/components/toggle-button/toggle-button.css +10 -11
- package/dist/collection/components/toggle-button/toggle-button.e2e.js +44 -0
- package/dist/collection/components/toggle-button/toggle-button.js +5 -5
- package/dist/collection/components/toggle-group/toggle-group.css +4 -5
- package/dist/collection/components/toggle-group/toggle-group.e2e.js +65 -0
- package/dist/collection/components/toggle-group/toggle-group.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +16 -17
- package/dist/collection/components/tooltip/tooltip.e2e.js +64 -0
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/components/wizard/wizard-step.js +95 -0
- package/dist/collection/components/wizard/wizard.css +240 -0
- package/dist/collection/components/wizard/wizard.e2e.js +149 -0
- package/dist/collection/components/wizard/wizard.js +125 -0
- package/dist/collection/components/wizard/wizard.stories.js +44 -0
- package/dist/collection/components/wizard-icon/wizard-icon.css +3 -4
- package/dist/collection/components/wizard-icon/wizard-icon.js +38 -8
- package/dist/collection/components/wizard-icon/wizard-icon.stories.js +14 -3
- package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
- package/dist/collection/{components/table/types.js → utils/types/table.types.js} +7 -3
- package/dist/collection/utils/types/wizard.types.js +6 -0
- package/dist/collection/utils/utils.spec.js +15 -0
- package/dist/components/b2b-alert.js +4 -4
- package/dist/components/b2b-anchor.js +2 -2
- package/dist/components/b2b-card.js +2 -2
- package/dist/components/b2b-checkbox-group.js +7 -5
- package/dist/components/b2b-checkbox.js +1 -99
- package/dist/components/b2b-dropdown.js +3 -3
- package/dist/components/b2b-grid-col.js +1 -1
- package/dist/components/b2b-grid-row.js +2 -2
- package/dist/components/b2b-grid.js +1 -1
- package/dist/components/b2b-label.js +2 -2
- package/dist/components/b2b-modal.js +5 -5
- package/dist/components/b2b-pagination.js +5 -5
- package/dist/components/b2b-paragraph.js +5 -5
- package/dist/components/b2b-radio-button.js +2 -2
- package/dist/components/b2b-radio-group.js +2 -2
- package/dist/components/b2b-required-separator.js +3 -3
- package/dist/components/b2b-scrollable-container.js +2 -2
- package/dist/components/b2b-search.js +7 -2
- package/dist/components/b2b-tab-group.js +1 -1
- package/dist/components/b2b-tab-panel.js +2 -2
- package/dist/components/b2b-tab.js +2 -2
- package/dist/components/b2b-table-row.js +97 -26
- package/dist/components/b2b-table-rowgroup.js +91 -27
- package/dist/components/b2b-table.js +11 -11
- package/dist/components/b2b-textarea.js +2 -2
- package/dist/components/b2b-toggle-button.js +7 -7
- package/dist/components/b2b-toggle-group.js +3 -3
- package/dist/components/b2b-tooltip.js +4 -4
- package/dist/components/b2b-wizard-icon.js +1 -47
- package/dist/components/b2b-wizard-step.d.ts +11 -0
- package/dist/components/b2b-wizard-step.js +62 -0
- package/dist/components/b2b-wizard.d.ts +11 -0
- package/dist/components/b2b-wizard.js +79 -0
- package/dist/components/button.js +13 -8
- package/dist/components/checkbox.js +123 -0
- package/dist/components/headline.js +2 -2
- package/dist/components/icon.js +4 -4
- package/dist/components/input-group.js +8 -6
- package/dist/components/input-label.js +1 -1
- package/dist/components/input-list-option.js +2 -2
- package/dist/components/input-list.js +6 -4
- package/dist/components/input.js +8 -6
- package/dist/components/rounded-icon.js +5 -2
- package/dist/components/separator.js +2 -2
- package/dist/components/spinner.js +2 -2
- package/dist/components/table-cell.js +3 -3
- package/dist/components/table-header.js +7 -7
- package/dist/components/{types.js → table.types.js} +4 -4
- package/dist/components/wizard-icon.js +52 -0
- package/dist/components/wizard.types.js +8 -0
- package/dist/custom-elements.json +132 -13
- package/dist/esm/b2b-alert.entry.js +4 -4
- package/dist/esm/b2b-anchor.entry.js +2 -2
- package/dist/esm/b2b-button_2.entry.js +13 -9
- package/dist/esm/b2b-card.entry.js +2 -2
- package/dist/esm/b2b-checkbox-group.entry.js +7 -5
- package/dist/esm/b2b-checkbox_3.entry.js +200 -0
- package/dist/esm/b2b-core-components.js +4 -4
- package/dist/esm/b2b-dropdown.entry.js +3 -3
- package/dist/esm/b2b-grid-col.entry.js +1 -1
- package/dist/esm/b2b-grid-row.entry.js +2 -2
- package/dist/esm/b2b-grid.entry.js +1 -1
- package/dist/esm/b2b-headline.entry.js +2 -2
- package/dist/esm/b2b-icon.entry.js +4 -4
- package/dist/esm/b2b-input-group_2.entry.js +12 -9
- package/dist/esm/b2b-input-label.entry.js +1 -1
- package/dist/esm/b2b-input_2.entry.js +8 -7
- package/dist/esm/b2b-label.entry.js +2 -2
- package/dist/esm/b2b-modal.entry.js +5 -5
- package/dist/esm/b2b-pagination.entry.js +5 -5
- package/dist/esm/b2b-paragraph.entry.js +5 -5
- package/dist/esm/b2b-radio-button.entry.js +2 -2
- package/dist/esm/b2b-radio-group.entry.js +2 -2
- package/dist/esm/b2b-required-separator.entry.js +3 -3
- package/dist/esm/b2b-rounded-icon.entry.js +4 -2
- package/dist/esm/b2b-scrollable-container.entry.js +2 -2
- package/dist/esm/b2b-search.entry.js +6 -1
- package/dist/esm/b2b-separator.entry.js +2 -2
- package/dist/esm/b2b-tab-group.entry.js +1 -1
- package/dist/esm/b2b-tab-panel.entry.js +2 -2
- package/dist/esm/b2b-tab.entry.js +2 -2
- package/dist/esm/b2b-table-row.entry.js +77 -22
- package/dist/esm/b2b-table-rowgroup.entry.js +85 -24
- package/dist/esm/b2b-table.entry.js +11 -11
- package/dist/esm/b2b-textarea.entry.js +2 -2
- package/dist/esm/b2b-toggle-button.entry.js +7 -7
- package/dist/esm/b2b-toggle-group.entry.js +3 -3
- package/dist/esm/b2b-tooltip.entry.js +4 -4
- package/dist/esm/b2b-wizard-icon.entry.js +6 -4
- package/dist/esm/b2b-wizard-step.entry.js +22 -0
- package/dist/esm/b2b-wizard.entry.js +57 -0
- package/dist/esm/{index-026605c2.js → index-dfdbf4b9.js} +100 -35
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{types-5aa59787.js → table.types-dd829d83.js} +4 -4
- package/dist/esm/wizard.types-2a03b8e0.js +8 -0
- package/dist/types/components/alert/alert.stories.d.ts +1 -1
- package/dist/types/components/anchor/anchor.stories.d.ts +1 -1
- package/dist/types/components/button/button.d.ts +2 -0
- package/dist/types/components/button/button.stories.d.ts +1 -1
- package/dist/types/components/card/card.stories.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +8 -1
- package/dist/types/components/checkbox/checkbox.stories.d.ts +1 -1
- package/dist/types/components/checkbox-group/checkbox-group.stories.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown.stories.d.ts +1 -1
- package/dist/types/components/grid/grid.stories.d.ts +1 -1
- package/dist/types/components/headline/headline.stories.d.ts +1 -1
- package/dist/types/components/icon/icon.stories.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +2 -0
- package/dist/types/components/input/input.stories.d.ts +1 -1
- package/dist/types/components/input-group/input-group.stories.d.ts +1 -1
- package/dist/types/components/input-list/input-list.d.ts +2 -0
- package/dist/types/components/input-list/input-list.stories.d.ts +1 -1
- package/dist/types/components/label/label.stories.d.ts +1 -1
- package/dist/types/components/modal/modal.stories.d.ts +1 -1
- package/dist/types/components/pagination/pagination.stories.d.ts +1 -1
- package/dist/types/components/paragraph/paragraph.stories.d.ts +1 -1
- package/dist/types/components/radio/radio.stories.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.stories.d.ts +1 -1
- package/dist/types/components/required-separator/required-separator.stories.d.ts +1 -1
- package/dist/types/components/rounded-icon/rounded-icon.d.ts +4 -0
- package/dist/types/components/rounded-icon/rounded-icon.stories.d.ts +1 -1
- package/dist/types/components/scrollable-container/scrollable-container.stories.d.ts +1 -1
- package/dist/types/components/search/search.d.ts +1 -0
- package/dist/types/components/search/search.stories.d.ts +1 -1
- package/dist/types/components/separator/separator.stories.d.ts +1 -1
- package/dist/types/components/spinner/spinner.stories.d.ts +1 -1
- package/dist/types/components/tab-group/tab-group.stories.d.ts +1 -1
- package/dist/types/components/table/table-cell/table-cell.d.ts +1 -1
- package/dist/types/components/table/table-header/table-header.d.ts +1 -1
- package/dist/types/components/table/table-row/table-row.d.ts +23 -7
- package/dist/types/components/table/table-rowgroup/table-rowgroup.d.ts +13 -3
- package/dist/types/components/table/table.d.ts +2 -2
- package/dist/types/components/table/table.stories.d.ts +2 -1
- package/dist/types/components/table/utils.d.ts +4 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +1 -1
- package/dist/types/components/toggle-group/toggle-group.stories.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.stories.d.ts +1 -1
- package/dist/types/components/wizard/wizard-step.d.ts +11 -0
- package/dist/types/components/wizard/wizard.d.ts +19 -0
- package/dist/types/components/wizard/wizard.stories.d.ts +5 -0
- package/dist/types/components/wizard-icon/wizard-icon.d.ts +6 -2
- package/dist/types/components/wizard-icon/wizard-icon.stories.d.ts +3 -1
- package/dist/types/components.d.ts +167 -13
- package/dist/types/docs/tokens/color.stories.d.ts +1 -1
- package/dist/types/docs/tokens/font.stories.d.ts +1 -1
- package/dist/types/docs/tokens/size.stories.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -0
- package/dist/types/utils/interfaces/content.interface.d.ts +4 -0
- package/dist/types/utils/interfaces/form.interface.d.ts +1 -0
- package/dist/types/{components/table/types.d.ts → utils/types/table.types.d.ts} +7 -2
- package/dist/types/utils/types/wizard.types.d.ts +8 -0
- package/dist/web-types.json +184 -9
- package/loader/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/b2b-core-components/p-08a50b6c.entry.js +0 -1
- package/dist/b2b-core-components/p-10414c0b.entry.js +0 -1
- package/dist/b2b-core-components/p-144a3c59.entry.js +0 -1
- package/dist/b2b-core-components/p-1493f7df.entry.js +0 -1
- package/dist/b2b-core-components/p-14f1b674.entry.js +0 -1
- package/dist/b2b-core-components/p-15a499b0.entry.js +0 -1
- package/dist/b2b-core-components/p-22dab2b4.entry.js +0 -1
- package/dist/b2b-core-components/p-4b25559c.entry.js +0 -1
- package/dist/b2b-core-components/p-515eb49e.entry.js +0 -1
- package/dist/b2b-core-components/p-541ffefb.entry.js +0 -1
- package/dist/b2b-core-components/p-5572aab3.entry.js +0 -1
- package/dist/b2b-core-components/p-5c316460.entry.js +0 -1
- package/dist/b2b-core-components/p-686d6598.entry.js +0 -1
- package/dist/b2b-core-components/p-6e0e6acc.entry.js +0 -1
- package/dist/b2b-core-components/p-6e3b27cd.entry.js +0 -1
- package/dist/b2b-core-components/p-7af1b977.entry.js +0 -1
- package/dist/b2b-core-components/p-7ca9b704.entry.js +0 -1
- package/dist/b2b-core-components/p-81a52d1a.entry.js +0 -1
- package/dist/b2b-core-components/p-8970ae74.entry.js +0 -1
- package/dist/b2b-core-components/p-925e40af.entry.js +0 -1
- package/dist/b2b-core-components/p-965ae161.entry.js +0 -1
- package/dist/b2b-core-components/p-99f8cf34.entry.js +0 -1
- package/dist/b2b-core-components/p-a6248754.entry.js +0 -1
- package/dist/b2b-core-components/p-a7417890.js +0 -2
- package/dist/b2b-core-components/p-b6e0a6ea.entry.js +0 -1
- package/dist/b2b-core-components/p-ba74cde5.entry.js +0 -1
- package/dist/b2b-core-components/p-bf4c58dc.entry.js +0 -1
- package/dist/b2b-core-components/p-d6ce3259.entry.js +0 -1
- package/dist/b2b-core-components/p-da6a1f55.entry.js +0 -1
- package/dist/b2b-core-components/p-f0c565ef.entry.js +0 -1
- package/dist/b2b-core-components/p-fc639b29.entry.js +0 -1
- package/dist/b2b-core-components/p-ff49e330.entry.js +0 -1
- package/dist/cjs/b2b-checkbox.cjs.entry.js +0 -74
- package/dist/cjs/b2b-table-cell_2.cjs.entry.js +0 -119
- package/dist/esm/b2b-checkbox.entry.js +0 -70
- package/dist/esm/b2b-table-cell_2.entry.js +0 -114
- /package/dist/b2b-core-components/{p-4130f1ae.js → p-34eb99cb.js} +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('B2B-Search', () => {
|
|
3
|
+
let page;
|
|
4
|
+
const optionsList = ['option1', 'option2', 'option3'];
|
|
5
|
+
const setOptionsList = async () => {
|
|
6
|
+
const search = await page.find('b2b-search');
|
|
7
|
+
search.setProperty('optionsList', optionsList);
|
|
8
|
+
await page.waitForChanges();
|
|
9
|
+
};
|
|
10
|
+
const typeInput = async (key = '8') => {
|
|
11
|
+
let input = await page.find('b2b-search >>> b2b-input-list');
|
|
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-search placeholder='search here'></b2b-search>
|
|
21
|
+
`);
|
|
22
|
+
});
|
|
23
|
+
it('should register input text when enabled', async () => {
|
|
24
|
+
const search = await page.find('b2b-search');
|
|
25
|
+
await typeInput('8');
|
|
26
|
+
let inputValue = search.getAttribute('value');
|
|
27
|
+
expect(inputValue).toBe('8');
|
|
28
|
+
});
|
|
29
|
+
it('should not receive input text when disabled', async () => {
|
|
30
|
+
const search = await page.find('b2b-search');
|
|
31
|
+
search.setAttribute('disabled', true);
|
|
32
|
+
await page.waitForChanges();
|
|
33
|
+
await typeInput();
|
|
34
|
+
let inputValue = search.getAttribute('value');
|
|
35
|
+
expect(inputValue).toBe(null);
|
|
36
|
+
});
|
|
37
|
+
it('should emit search event when clicking search button', async () => {
|
|
38
|
+
const searchEventSpy = await page.spyOnEvent('b2b-search');
|
|
39
|
+
const button = await page.find('b2b-search >>> b2b-button');
|
|
40
|
+
await button.click();
|
|
41
|
+
expect(searchEventSpy).toHaveReceivedEvent();
|
|
42
|
+
});
|
|
43
|
+
it('should emit search event with search input data', async () => {
|
|
44
|
+
const searchString = 'some search value';
|
|
45
|
+
const searchEventSpy = await page.spyOnEvent('b2b-search');
|
|
46
|
+
const searchInputEventSpy = await page.spyOnEvent('b2b-input');
|
|
47
|
+
const input = await page.find('b2b-search >>> b2b-input-list');
|
|
48
|
+
await input.triggerEvent('b2b-input', { detail: { value: searchString } });
|
|
49
|
+
await page.waitForChanges();
|
|
50
|
+
const button = await page.find('b2b-search >>> b2b-button');
|
|
51
|
+
await button.click();
|
|
52
|
+
expect(searchInputEventSpy).toHaveReceivedEvent();
|
|
53
|
+
expect(searchEventSpy).toHaveReceivedEventDetail({
|
|
54
|
+
searchTerm: searchString,
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
it('should emit search event on enter press', async () => {
|
|
58
|
+
const searchString = 'some search value';
|
|
59
|
+
const searchEventSpy = await page.spyOnEvent('b2b-search');
|
|
60
|
+
const searchInputEventSpy = await page.spyOnEvent('b2b-input');
|
|
61
|
+
const input = await page.find('b2b-search >>> b2b-input-list');
|
|
62
|
+
await input.triggerEvent('b2b-input', { detail: { value: searchString } });
|
|
63
|
+
await page.waitForChanges();
|
|
64
|
+
await page.keyboard.press('Tab');
|
|
65
|
+
await page.keyboard.press('Enter');
|
|
66
|
+
expect(searchInputEventSpy).toHaveReceivedEvent();
|
|
67
|
+
expect(searchEventSpy).toHaveReceivedEventDetail({
|
|
68
|
+
searchTerm: searchString,
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
it('should emit input event when typing on input', async () => {
|
|
72
|
+
const searchString = 'some search value';
|
|
73
|
+
const inputEventSpy = await page.spyOnEvent('b2b-input');
|
|
74
|
+
const input = await page.find('b2b-search >>> b2b-input-list');
|
|
75
|
+
await input.triggerEvent('b2b-input', { detail: { value: searchString } });
|
|
76
|
+
await page.waitForChanges();
|
|
77
|
+
expect(inputEventSpy).toHaveReceivedEvent();
|
|
78
|
+
expect(inputEventSpy).toHaveReceivedEventDetail({ value: searchString });
|
|
79
|
+
});
|
|
80
|
+
it('should emit selected option when clicking search button', async () => {
|
|
81
|
+
await setOptionsList();
|
|
82
|
+
const searchEventSpy = await page.spyOnEvent('b2b-search');
|
|
83
|
+
const input = await page.find('b2b-search >>> b2b-input-list');
|
|
84
|
+
// focus on input element, focus method did not work
|
|
85
|
+
await input.click();
|
|
86
|
+
await input.press('8');
|
|
87
|
+
await page.waitForChanges();
|
|
88
|
+
// Click first option on the list
|
|
89
|
+
const option = await page.find({ text: optionsList[0] });
|
|
90
|
+
await option.click();
|
|
91
|
+
const button = await page.find('b2b-search >>> b2b-button');
|
|
92
|
+
await button.click();
|
|
93
|
+
expect(searchEventSpy).toHaveReceivedEventDetail({
|
|
94
|
+
searchTerm: optionsList[0],
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
|
@@ -16,6 +16,11 @@ export class SearchComponent {
|
|
|
16
16
|
this.disabled = false;
|
|
17
17
|
this.closed = undefined;
|
|
18
18
|
}
|
|
19
|
+
handleKeyDown(event) {
|
|
20
|
+
if (event.key === 'Enter') {
|
|
21
|
+
this.b2bSearch.emit({ searchTerm: this.value });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
19
24
|
render() {
|
|
20
25
|
return (h(Host, null, h("b2b-input-group", { disabled: this.disabled }, h("b2b-input-list", { slot: "start", value: this.value, placeholder: this.placeholder, optionsList: this.optionsList, "onb2b-input": this.onInput, "onb2b-option-selected": this.onOptionSelected }, h("slot", null)), h("b2b-button", { slot: "end", variant: "primary", onClick: this.onSearchClicked }, h("b2b-icon", { icon: "b2b_icon-search", clickable: true })))));
|
|
21
26
|
}
|
|
@@ -123,4 +128,13 @@ export class SearchComponent {
|
|
|
123
128
|
}];
|
|
124
129
|
}
|
|
125
130
|
static get elementRef() { return "hostElement"; }
|
|
131
|
+
static get listeners() {
|
|
132
|
+
return [{
|
|
133
|
+
"name": "keydown",
|
|
134
|
+
"method": "handleKeyDown",
|
|
135
|
+
"target": undefined,
|
|
136
|
+
"capture": false,
|
|
137
|
+
"passive": false
|
|
138
|
+
}];
|
|
139
|
+
}
|
|
126
140
|
}
|
|
@@ -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,22 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('B2B-Separator', () => {
|
|
3
|
+
let page;
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<b2b-separator></b2b-separator>`);
|
|
7
|
+
const element = await page.find('b2b-separator');
|
|
8
|
+
expect(element).not.toBeNull();
|
|
9
|
+
});
|
|
10
|
+
it('displays a vertical separator', async () => {
|
|
11
|
+
page = await newE2EPage();
|
|
12
|
+
await page.setContent(`<div style="height: 18px;"><b2b-separator alignment="vertical"></b2b-separator></div>`);
|
|
13
|
+
const element = await page.find('b2b-separator >>> div');
|
|
14
|
+
expect(element).toHaveClass('b2b-separator--vertical');
|
|
15
|
+
});
|
|
16
|
+
it('displays a horizontal separator', async () => {
|
|
17
|
+
page = await newE2EPage();
|
|
18
|
+
await page.setContent(`<div style="width: 18px;"><b2b-separator alignment="horizontal"></b2b-separator></div>`);
|
|
19
|
+
const element = await page.find('b2b-separator >>> div');
|
|
20
|
+
expect(element).toHaveClass('b2b-separator--horizontal');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -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,12 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('B2B-Spinner', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<b2b-spinner></b2b-spinner>`);
|
|
7
|
+
});
|
|
8
|
+
it('should render spinner component', async () => {
|
|
9
|
+
const element = await page.find('b2b-spinner');
|
|
10
|
+
expect(element).not.toBeNull();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { newSpecPage } from '@stencil/core/testing';
|
|
2
|
+
import { h } from '@stencil/core';
|
|
3
|
+
import { SpinnerComponent } from './spinner';
|
|
4
|
+
describe('B2B-Spinner', () => {
|
|
5
|
+
async function renderPage(template) {
|
|
6
|
+
return newSpecPage({
|
|
7
|
+
components: [SpinnerComponent],
|
|
8
|
+
template: () => template,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
it('should render spinner with default attributes', async () => {
|
|
12
|
+
const page = await renderPage(h("b2b-spinner", null));
|
|
13
|
+
expect(page.root).toEqualHtml(`
|
|
14
|
+
<b2b-spinner>
|
|
15
|
+
<mock:shadow-root>
|
|
16
|
+
<div class="b2b-spinner b2b-spinner--size-100 b2b-spinner--color-primary"></div>
|
|
17
|
+
</mock:shadow-root>
|
|
18
|
+
</b2b-spinner>
|
|
19
|
+
`);
|
|
20
|
+
});
|
|
21
|
+
it('should render spinner with small size', async () => {
|
|
22
|
+
const page = await renderPage(h("b2b-spinner", { size: "50" }));
|
|
23
|
+
expect(page.root).toEqualHtml(`
|
|
24
|
+
<b2b-spinner>
|
|
25
|
+
<mock:shadow-root>
|
|
26
|
+
<div class="b2b-spinner b2b-spinner--size-50 b2b-spinner--color-primary"></div>
|
|
27
|
+
</mock:shadow-root>
|
|
28
|
+
</b2b-spinner>
|
|
29
|
+
`);
|
|
30
|
+
});
|
|
31
|
+
it('should render spinner with inverse color', async () => {
|
|
32
|
+
const page = await renderPage(h("b2b-spinner", { color: "inverse" }));
|
|
33
|
+
expect(page.root).toEqualHtml(`
|
|
34
|
+
<b2b-spinner>
|
|
35
|
+
<mock:shadow-root>
|
|
36
|
+
<div class="b2b-spinner b2b-spinner--size-100 b2b-spinner--color-inverse"></div>
|
|
37
|
+
</mock:shadow-root>
|
|
38
|
+
</b2b-spinner>
|
|
39
|
+
`);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -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,35 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('B2B Tab', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<b2b-tab>Tab 1</b2b-tab>`);
|
|
7
|
+
});
|
|
8
|
+
it('should render the tab component', async () => {
|
|
9
|
+
const element = await page.find('b2b-tab');
|
|
10
|
+
expect(element).not.toBeNull();
|
|
11
|
+
});
|
|
12
|
+
it('should emit when selected changes', async () => {
|
|
13
|
+
const selectedSpy = await page.spyOnEvent('b2b-change');
|
|
14
|
+
await page.$eval('b2b-tab', (element) => {
|
|
15
|
+
element.selected = true;
|
|
16
|
+
});
|
|
17
|
+
await page.waitForChanges();
|
|
18
|
+
expect(selectedSpy).toHaveReceivedEvent();
|
|
19
|
+
});
|
|
20
|
+
it('should focus on the tab if it is selected', async () => {
|
|
21
|
+
const element = await page.find('b2b-tab');
|
|
22
|
+
const selectedBefore = await element.getProperty('selected');
|
|
23
|
+
expect(selectedBefore).toBe(false);
|
|
24
|
+
await page.$eval('b2b-tab', (element) => {
|
|
25
|
+
element.selected = true;
|
|
26
|
+
});
|
|
27
|
+
await page.waitForChanges();
|
|
28
|
+
const selectedAfter = await element.getProperty('selected');
|
|
29
|
+
expect(selectedAfter).toBe(true);
|
|
30
|
+
const focus = await page.evaluate(() => {
|
|
31
|
+
return document.activeElement.ariaSelected;
|
|
32
|
+
});
|
|
33
|
+
expect(focus).not.toBeNull();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { newSpecPage } from '@stencil/core/testing';
|
|
2
|
+
import { h } from '@stencil/core';
|
|
3
|
+
import { B2bTabComponent } from './tab';
|
|
4
|
+
it('should match the snapshot', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [B2bTabComponent],
|
|
7
|
+
template: () => h("b2b-tab", null, "Tab 1"),
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
it('should not be selected by default', async () => {
|
|
12
|
+
const page = await newSpecPage({
|
|
13
|
+
components: [B2bTabComponent],
|
|
14
|
+
template: () => h("b2b-tab", null, "Tab 1"),
|
|
15
|
+
});
|
|
16
|
+
expect(page.rootInstance.selected).toBe(false);
|
|
17
|
+
});
|
|
18
|
+
it('should not have an error by default', async () => {
|
|
19
|
+
const page = await newSpecPage({
|
|
20
|
+
components: [B2bTabComponent],
|
|
21
|
+
template: () => h("b2b-tab", null, "Tab 1"),
|
|
22
|
+
});
|
|
23
|
+
expect(page.rootInstance.invalid).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
it('should not be disabled by default', async () => {
|
|
26
|
+
const page = await newSpecPage({
|
|
27
|
+
components: [B2bTabComponent],
|
|
28
|
+
template: () => h("b2b-tab", null, "Tab 1"),
|
|
29
|
+
});
|
|
30
|
+
expect(page.rootInstance.disabled).toBe(false);
|
|
31
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('B2B Tab Group', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`
|
|
7
|
+
<b2b-tab-group>
|
|
8
|
+
<b2b-tab slot="tab">
|
|
9
|
+
First Tab
|
|
10
|
+
</b2b-tab>
|
|
11
|
+
<b2b-tab-panel slot="panel">
|
|
12
|
+
First Panel
|
|
13
|
+
</b2b-tab-panel>
|
|
14
|
+
<b2b-tab slot="tab">
|
|
15
|
+
Second Tab
|
|
16
|
+
</b2b-tab>
|
|
17
|
+
<b2b-tab-panel slot="panel">
|
|
18
|
+
Second Panel
|
|
19
|
+
</b2b-tab-panel>
|
|
20
|
+
<b2b-tab slot="tab" disabled="true">
|
|
21
|
+
Disabled Tab
|
|
22
|
+
</b2b-tab>
|
|
23
|
+
<b2b-tab-panel slot="panel">
|
|
24
|
+
Disabled Panel
|
|
25
|
+
</b2b-tab-panel>
|
|
26
|
+
</b2b-tab-group>
|
|
27
|
+
`);
|
|
28
|
+
});
|
|
29
|
+
it('should render the tab group', async () => {
|
|
30
|
+
const element = await page.find('b2b-tab-group');
|
|
31
|
+
expect(element).not.toBeNull();
|
|
32
|
+
});
|
|
33
|
+
it('should select the first tab by default', async () => {
|
|
34
|
+
const tab = await page.find('b2b-tab');
|
|
35
|
+
const selected = await tab.getProperty('selected');
|
|
36
|
+
expect(selected).toBe(true);
|
|
37
|
+
});
|
|
38
|
+
it('should show the panel associated with the tab that is selected', async () => {
|
|
39
|
+
const tab = await page.find({ text: 'First Tab' });
|
|
40
|
+
const selected = await tab.getProperty('selected');
|
|
41
|
+
expect(selected).toBe(true);
|
|
42
|
+
const panel = await page.find({ text: 'First Panel' });
|
|
43
|
+
expect(await panel.isVisible()).toBe(true);
|
|
44
|
+
});
|
|
45
|
+
it('should not select a disabled tab', async () => {
|
|
46
|
+
const tab = await page.find({ text: 'Disabled Tab' });
|
|
47
|
+
const panel = await page.find({ text: 'Disabled Panel' });
|
|
48
|
+
const selected = await tab.getProperty('selected');
|
|
49
|
+
expect(selected).toBe(false);
|
|
50
|
+
await tab.click();
|
|
51
|
+
await page.waitForChanges();
|
|
52
|
+
const selectedAfter = await tab.getProperty('selected');
|
|
53
|
+
expect(selectedAfter).toBe(false);
|
|
54
|
+
expect(await panel.isVisible()).toBe(false);
|
|
55
|
+
});
|
|
56
|
+
it('should navigate to the next enabled tab using the keyboard', async () => {
|
|
57
|
+
const tabs = await page.findAll('b2b-tab');
|
|
58
|
+
expect(await tabs[0].getProperty('selected')).toBe(true);
|
|
59
|
+
await page.keyboard.down('ArrowRight');
|
|
60
|
+
await page.waitForChanges();
|
|
61
|
+
expect(await tabs[1].getProperty('selected')).toBe(true);
|
|
62
|
+
await page.keyboard.press('ArrowRight');
|
|
63
|
+
await page.waitForChanges();
|
|
64
|
+
expect(await tabs[2].getProperty('selected')).toBe(false);
|
|
65
|
+
expect(await tabs[0].getProperty('selected')).toBe(true);
|
|
66
|
+
});
|
|
67
|
+
it('should navigate to the previous tab using the keyboard', async () => {
|
|
68
|
+
const tabs = await page.findAll('b2b-tab');
|
|
69
|
+
expect(await tabs[0].getProperty('selected')).toBe(true);
|
|
70
|
+
await page.keyboard.down('ArrowLeft');
|
|
71
|
+
await page.waitForChanges();
|
|
72
|
+
// second tab is selected because it is first enabled from last
|
|
73
|
+
expect(await tabs[1].getProperty('selected')).toBe(true);
|
|
74
|
+
await page.keyboard.press('ArrowLeft');
|
|
75
|
+
await page.waitForChanges();
|
|
76
|
+
// first tab is selected because last tab is disabled
|
|
77
|
+
expect(await tabs[0].getProperty('selected')).toBe(true);
|
|
78
|
+
});
|
|
79
|
+
it('should emit when a new tab is selected', async () => {
|
|
80
|
+
const changeSpy = await page.spyOnEvent('b2b-selected');
|
|
81
|
+
const secondTab = await page.find({ text: 'Second Tab' });
|
|
82
|
+
await secondTab.click();
|
|
83
|
+
await page.waitForChanges();
|
|
84
|
+
expect(changeSpy).toHaveReceivedEvent();
|
|
85
|
+
});
|
|
86
|
+
it('should not navigate when external navigation is used', async () => {
|
|
87
|
+
const tabGroup = await page.find('b2b-tab-group');
|
|
88
|
+
await tabGroup.setProperty('useRouter', true);
|
|
89
|
+
await page.waitForChanges();
|
|
90
|
+
const tabs = await page.findAll('b2b-tab');
|
|
91
|
+
expect(await tabs[0].getProperty('selected')).toBe(true);
|
|
92
|
+
await page.keyboard.press('ArrowRight');
|
|
93
|
+
await page.waitForChanges();
|
|
94
|
+
await tabs[1].click();
|
|
95
|
+
await page.waitForChanges();
|
|
96
|
+
expect(await tabs[1].getProperty('selected')).toBe(false);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
@@ -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,12 @@
|
|
|
1
|
+
import { newE2EPage } from '@stencil/core/testing';
|
|
2
|
+
describe('B2B Tab Panel', () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<b2b-tab-panel name="tab-1">Tab 1</b2b-tab-panel>`);
|
|
7
|
+
});
|
|
8
|
+
it('should render the tab panel', async () => {
|
|
9
|
+
const element = await page.find('b2b-tab-panel');
|
|
10
|
+
expect(element).not.toBeNull();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { newSpecPage } from '@stencil/core/testing';
|
|
2
|
+
import { h } from '@stencil/core';
|
|
3
|
+
import { B2bTabPanelComponent } from './tab-panel';
|
|
4
|
+
it('should match the snapshot', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [B2bTabPanelComponent],
|
|
7
|
+
template: () => h("b2b-tab-panel", null, "Tab 1"),
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toMatchSnapshot();
|
|
10
|
+
});
|
|
@@ -6,36 +6,36 @@ export const sampleData = {
|
|
|
6
6
|
'Name A',
|
|
7
7
|
'Content 1',
|
|
8
8
|
'Content 1',
|
|
9
|
-
html ` <b2b-button>Action</b2b-button>`,
|
|
9
|
+
html ` <b2b-button size="50">Action</b2b-button>`,
|
|
10
10
|
],
|
|
11
11
|
[
|
|
12
12
|
'Name B',
|
|
13
13
|
'Content 2',
|
|
14
14
|
'Content 2',
|
|
15
|
-
html ` <b2b-button>Action</b2b-button>`,
|
|
15
|
+
html ` <b2b-button size="50">Action</b2b-button>`,
|
|
16
16
|
],
|
|
17
17
|
[
|
|
18
18
|
'Name C',
|
|
19
19
|
'Content 3',
|
|
20
20
|
'Content 3',
|
|
21
|
-
html ` <b2b-button>Action</b2b-button>`,
|
|
21
|
+
html ` <b2b-button size="50">Action</b2b-button>`,
|
|
22
22
|
],
|
|
23
23
|
[
|
|
24
24
|
'Name D',
|
|
25
25
|
'Content 4',
|
|
26
26
|
'Very, very, long, long data text that wraps over to next line',
|
|
27
|
-
html ` <b2b-button>Action</b2b-button>`,
|
|
27
|
+
html ` <b2b-button size="50">Action</b2b-button>`,
|
|
28
28
|
],
|
|
29
29
|
],
|
|
30
30
|
};
|
|
31
31
|
export const smallSampleData = {
|
|
32
32
|
columns: ['Column 1', 'Column 2', 'Column 3'],
|
|
33
33
|
rows: [
|
|
34
|
-
['Name A', 'Content 1', html ` <b2b-button>Action</b2b-button>`],
|
|
34
|
+
['Name A', 'Content 1', html ` <b2b-button size="50">Action</b2b-button>`],
|
|
35
35
|
[
|
|
36
36
|
'Name D',
|
|
37
37
|
'Very long data text that wraps over to next line, Very long data text that wraps over to next line',
|
|
38
|
-
html ` <b2b-button>Action</b2b-button>`,
|
|
38
|
+
html ` <b2b-button size="50">Action</b2b-button>`,
|
|
39
39
|
],
|
|
40
40
|
],
|
|
41
41
|
};
|
|
@@ -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 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
|
-
import { ContentAlignment, TableSizes } from '
|
|
2
|
+
import { ContentAlignment, TableSizes, } from '../../../utils/types/table.types';
|
|
3
3
|
export class TableCellComponent {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.expandTextHoverWaitTime = 600;
|
|
@@ -78,7 +78,7 @@ export class TableCellComponent {
|
|
|
78
78
|
"references": {
|
|
79
79
|
"TableSizes": {
|
|
80
80
|
"location": "import",
|
|
81
|
-
"path": "
|
|
81
|
+
"path": "../../../utils/types/table.types"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
},
|
|
@@ -101,7 +101,7 @@ export class TableCellComponent {
|
|
|
101
101
|
"references": {
|
|
102
102
|
"ContentAlignment": {
|
|
103
103
|
"location": "import",
|
|
104
|
-
"path": "
|
|
104
|
+
"path": "../../../utils/types/table.types"
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
},
|
|
@@ -142,7 +142,7 @@ export class TableCellComponent {
|
|
|
142
142
|
"references": {
|
|
143
143
|
"TableColourOptions": {
|
|
144
144
|
"location": "import",
|
|
145
|
-
"path": "
|
|
145
|
+
"path": "../../../utils/types/table.types"
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
},
|