@otto-de/b2b-core-components 1.9.0-beta.2 → 1.9.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/icons/b2b_icon-ellipsis.svg +2 -2
- package/dist/b2b-core-components/icons/b2b_icon-trend-left.svg +12 -0
- package/dist/b2b-core-components/icons/b2b_icon-trend-right.svg +12 -0
- package/dist/b2b-core-components/p-13fa3a4b.entry.js +1 -0
- package/dist/b2b-core-components/p-14877996.entry.js +1 -0
- package/dist/b2b-core-components/p-14ddd82d.entry.js +1 -0
- package/dist/b2b-core-components/p-1c910821.entry.js +1 -0
- package/dist/b2b-core-components/p-234c9f55.entry.js +1 -0
- package/dist/b2b-core-components/p-248aecd5.entry.js +1 -0
- package/dist/b2b-core-components/p-2ba2b197.entry.js +1 -0
- package/dist/b2b-core-components/p-2da63e79.entry.js +1 -0
- package/dist/b2b-core-components/{p-a4c859d6.entry.js → p-2f9dfb71.entry.js} +1 -1
- package/dist/b2b-core-components/p-32baa768.entry.js +1 -0
- package/dist/b2b-core-components/p-3770da05.entry.js +1 -0
- package/dist/b2b-core-components/{p-d92add70.entry.js → p-3819c303.entry.js} +1 -1
- package/dist/b2b-core-components/p-4442a592.entry.js +1 -0
- package/dist/b2b-core-components/p-4667ced4.entry.js +1 -0
- package/dist/b2b-core-components/p-4835ee48.entry.js +1 -0
- package/dist/b2b-core-components/{p-6463d394.entry.js → p-5cce2644.entry.js} +1 -1
- package/dist/b2b-core-components/p-5e0def0d.entry.js +1 -0
- package/dist/b2b-core-components/p-6855efb8.entry.js +1 -0
- package/dist/b2b-core-components/p-699c3c91.js +1 -0
- package/dist/b2b-core-components/{p-75cff1be.entry.js → p-6a6d2b46.entry.js} +1 -1
- package/dist/b2b-core-components/p-6e7aff80.entry.js +1 -0
- package/dist/b2b-core-components/{p-024220fb.entry.js → p-6f18a232.entry.js} +1 -1
- package/dist/b2b-core-components/p-6f991dbb.entry.js +1 -0
- package/dist/b2b-core-components/p-753858f9.entry.js +1 -0
- package/dist/b2b-core-components/p-7a1a5afc.entry.js +1 -0
- package/dist/b2b-core-components/p-7cc4b76a.entry.js +1 -0
- package/dist/b2b-core-components/p-7d0a8bb5.entry.js +1 -0
- package/dist/b2b-core-components/p-808eb548.entry.js +1 -0
- package/dist/b2b-core-components/{p-5c18c291.js → p-844e306b.js} +2 -2
- package/dist/b2b-core-components/{p-af7e9d0b.entry.js → p-8e3fb1f8.entry.js} +1 -1
- package/dist/b2b-core-components/p-98d0d2ff.js +1 -0
- package/dist/b2b-core-components/p-a1313d78.entry.js +1 -0
- package/dist/b2b-core-components/p-acd597e0.entry.js +1 -0
- package/dist/b2b-core-components/p-b27d0a36.entry.js +1 -0
- package/dist/b2b-core-components/p-b315985b.entry.js +1 -0
- package/dist/b2b-core-components/p-b36f0e3b.entry.js +1 -0
- package/dist/b2b-core-components/p-b74ef511.entry.js +1 -0
- package/dist/b2b-core-components/p-b82636f4.entry.js +1 -0
- package/dist/b2b-core-components/p-bf601862.entry.js +1 -0
- package/dist/b2b-core-components/{p-a635b768.entry.js → p-bf7a6f93.entry.js} +1 -1
- package/dist/b2b-core-components/p-c812257d.entry.js +1 -0
- package/dist/b2b-core-components/p-d5f6f1ec.entry.js +1 -0
- package/dist/b2b-core-components/p-dd0771f1.entry.js +1 -0
- package/dist/b2b-core-components/p-dfce95eb.entry.js +1 -0
- package/dist/b2b-core-components/{p-2b0b7edf.entry.js → p-dff862c4.entry.js} +1 -1
- package/dist/b2b-core-components/p-e10d8020.entry.js +1 -0
- package/dist/b2b-core-components/p-e3b360a8.entry.js +1 -0
- package/dist/b2b-core-components/p-f2da9141.entry.js +1 -0
- package/dist/b2b-core-components/p-fcd25ead.entry.js +1 -0
- package/dist/cjs/b2b-alert.cjs.entry.js +2 -2
- package/dist/cjs/b2b-anchor.cjs.entry.js +4 -4
- package/dist/cjs/b2b-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/b2b-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/b2b-button_2.cjs.entry.js +5 -3
- package/dist/cjs/b2b-card.cjs.entry.js +2 -2
- package/dist/cjs/b2b-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/b2b-checkbox.cjs.entry.js +93 -0
- package/dist/cjs/b2b-chip-component_2.cjs.entry.js +73 -0
- package/dist/cjs/b2b-core-components.cjs.js +2 -2
- package/dist/cjs/b2b-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/b2b-grid-col.cjs.entry.js +1 -1
- package/dist/cjs/b2b-grid-row.cjs.entry.js +1 -1
- 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 -2
- package/dist/cjs/b2b-input-group_2.cjs.entry.js +4 -4
- package/dist/cjs/b2b-input-label.cjs.entry.js +1 -1
- package/dist/cjs/b2b-input_2.cjs.entry.js +3 -3
- package/dist/cjs/b2b-label.cjs.entry.js +2 -2
- package/dist/cjs/b2b-modal.cjs.entry.js +2 -2
- package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +166 -0
- package/dist/cjs/b2b-pagination.cjs.entry.js +2 -2
- package/dist/cjs/b2b-paragraph.cjs.entry.js +2 -2
- package/dist/cjs/b2b-progress-bar.cjs.entry.js +42 -0
- 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 +2 -2
- package/dist/cjs/b2b-rounded-icon.cjs.entry.js +2 -2
- package/dist/cjs/b2b-scrollable-container.cjs.entry.js +2 -2
- package/dist/cjs/b2b-search.cjs.entry.js +1 -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-cell_2.cjs.entry.js +157 -0
- package/dist/cjs/b2b-table-row.cjs.entry.js +23 -24
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +44 -41
- package/dist/cjs/b2b-table.cjs.entry.js +32 -11
- package/dist/cjs/b2b-textarea.cjs.entry.js +2 -2
- package/dist/cjs/b2b-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/b2b-toggle-chip.cjs.entry.js +59 -0
- package/dist/cjs/b2b-toggle-group.cjs.entry.js +2 -2
- package/dist/cjs/b2b-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/b2b-wizard-icon.cjs.entry.js +2 -2
- package/dist/cjs/b2b-wizard-step.cjs.entry.js +2 -2
- package/dist/cjs/b2b-wizard.cjs.entry.js +2 -2
- package/dist/cjs/{index-ceb9958a.js → index-8ed011c3.js} +25 -6
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{table.types-679aefd5.js → table.types-d3ab0872.js} +1 -0
- package/dist/cjs/utils-3b16cd5d.js +40 -0
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/alert/alert.css +6 -4
- package/dist/collection/components/anchor/anchor.css +18 -8
- package/dist/collection/components/anchor/anchor.js +3 -3
- package/dist/collection/components/breadcrumb/breadcrumb.css +6 -4
- package/dist/collection/components/button/button.css +32 -4
- package/dist/collection/components/button/button.js +20 -0
- package/dist/collection/components/button/button.stories.js +18 -0
- package/dist/collection/components/card/card.css +6 -4
- package/dist/collection/components/checkbox/checkbox.css +6 -4
- package/dist/collection/components/checkbox-group/checkbox-group.css +6 -4
- package/dist/collection/components/chip/chip.css +10 -6
- package/dist/collection/components/chip/chip.js +8 -1
- package/dist/collection/components/chip/chip.stories.js +0 -1
- package/dist/collection/components/dropdown/dropdown.css +6 -4
- package/dist/collection/components/headline/headline.css +6 -4
- package/dist/collection/components/icon/icon.css +6 -4
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icons/b2b_icon-ellipsis.svg +2 -2
- package/dist/collection/components/icon/icons/b2b_icon-trend-left.svg +12 -0
- package/dist/collection/components/icon/icons/b2b_icon-trend-right.svg +12 -0
- package/dist/collection/components/icon/types.js +2 -0
- package/dist/collection/components/input/input.css +6 -4
- package/dist/collection/components/input-group/input-group.css +6 -4
- package/dist/collection/components/input-list/input-list.css +6 -4
- package/dist/collection/components/input-list/input-list.e2e.js +15 -1
- package/dist/collection/components/input-list/input-list.js +1 -1
- package/dist/collection/components/input-list/input-list.stories.js +31 -3
- package/dist/collection/components/label/label.css +6 -4
- package/dist/collection/components/modal/modal.css +6 -4
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.css +293 -0
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.e2e.js +101 -0
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +304 -0
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.stories.js +46 -0
- package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.css +10 -0
- package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js +115 -0
- package/dist/collection/components/pagination/pagination.css +6 -4
- package/dist/collection/components/paragraph/paragraph.css +6 -4
- package/dist/collection/components/progress-bar/progress-bar.css +266 -0
- package/dist/collection/components/progress-bar/progress-bar.e2e.js +43 -0
- package/dist/collection/components/progress-bar/progress-bar.js +117 -0
- package/dist/collection/components/progress-bar/progress-bar.stories.js +54 -0
- package/dist/collection/components/radio/radio.css +6 -4
- package/dist/collection/components/radio-group/radio-group.css +6 -4
- package/dist/collection/components/required-separator/required-separator.css +6 -4
- package/dist/collection/components/rounded-icon/rounded-icon.css +6 -4
- package/dist/collection/components/scrollable-container/scrollable-container.css +6 -4
- package/dist/collection/components/separator/separator.css +6 -4
- package/dist/collection/components/spinner/spinner.css +6 -4
- package/dist/collection/components/tab/tab.css +6 -4
- package/dist/collection/components/tab-panel/tab-panel.css +6 -4
- package/dist/collection/components/table/stories.data.js +0 -1
- package/dist/collection/components/table/table-cell/table-cell.css +14 -7
- package/dist/collection/components/table/table-cell/table-cell.js +52 -4
- package/dist/collection/components/table/table-header/table-header.css +12 -18
- package/dist/collection/components/table/table-header/table-header.js +94 -15
- package/dist/collection/components/table/table-row/table-row.css +17 -9
- package/dist/collection/components/table/table-row/table-row.js +47 -22
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +15 -4
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +75 -11
- package/dist/collection/components/table/table.css +12 -7
- package/dist/collection/components/table/table.e2e.js +31 -5
- package/dist/collection/components/table/table.js +31 -10
- package/dist/collection/components/table/table.stories.js +52 -17
- package/dist/collection/components/table/utils.js +14 -0
- package/dist/collection/components/textarea/textarea.css +6 -4
- package/dist/collection/components/toggle-button/toggle-button.css +6 -4
- package/dist/collection/components/toggle-chip/toggle-chip.css +273 -0
- package/dist/collection/components/toggle-chip/toggle-chip.e2e.js +47 -0
- package/dist/collection/components/toggle-chip/toggle-chip.js +192 -0
- package/dist/collection/components/toggle-group/toggle-group.css +6 -4
- package/dist/collection/components/tooltip/tooltip.css +6 -4
- package/dist/collection/components/wizard/wizard.css +6 -4
- package/dist/collection/components/wizard-icon/wizard-icon.css +6 -4
- package/dist/collection/utils/types/table.types.js +1 -0
- package/dist/components/b2b-alert.js +1 -1
- package/dist/components/b2b-anchor.js +4 -4
- package/dist/components/b2b-breadcrumb-item.js +1 -1
- package/dist/components/b2b-breadcrumb.js +1 -1
- package/dist/components/b2b-card.js +1 -1
- package/dist/components/b2b-checkbox-group.js +1 -1
- package/dist/components/b2b-chip-component.js +1 -54
- package/dist/components/b2b-dropdown.js +1 -1
- package/dist/components/b2b-label.js +1 -1
- package/dist/components/b2b-modal.js +1 -1
- package/dist/components/b2b-multiselect-dropdown.d.ts +11 -0
- package/dist/components/b2b-multiselect-dropdown.js +225 -0
- package/dist/components/b2b-multiselect-option.d.ts +11 -0
- package/dist/components/b2b-multiselect-option.js +6 -0
- package/dist/components/b2b-pagination.js +1 -1
- package/dist/components/b2b-paragraph.js +1 -1
- package/dist/components/b2b-progress-bar.d.ts +11 -0
- package/dist/components/b2b-progress-bar.js +61 -0
- package/dist/components/b2b-radio-button.js +1 -1
- package/dist/components/b2b-radio-group.js +1 -1
- package/dist/components/b2b-required-separator.js +1 -1
- package/dist/components/b2b-scrollable-container.js +1 -1
- package/dist/components/b2b-tab-panel.js +1 -1
- package/dist/components/b2b-tab.js +1 -1
- package/dist/components/b2b-table-row.js +23 -23
- package/dist/components/b2b-table-rowgroup.js +34 -31
- package/dist/components/b2b-table.js +30 -10
- package/dist/components/b2b-textarea.js +1 -1
- package/dist/components/b2b-toggle-button.js +1 -1
- package/dist/components/b2b-toggle-chip.d.ts +11 -0
- package/dist/components/b2b-toggle-chip.js +80 -0
- package/dist/components/b2b-toggle-group.js +1 -1
- package/dist/components/b2b-tooltip.js +1 -1
- package/dist/components/b2b-wizard-step.js +1 -1
- package/dist/components/b2b-wizard.js +1 -1
- package/dist/components/button.js +4 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/chip.js +63 -0
- package/dist/components/headline.js +1 -1
- package/dist/components/icon.js +3 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input-list-option.js +1 -1
- package/dist/components/input-list.js +2 -2
- package/dist/components/input.js +1 -1
- package/dist/components/multiselect-option.js +58 -0
- package/dist/components/rounded-icon.js +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/table-cell.js +12 -3
- package/dist/components/table-header.js +31 -14
- package/dist/components/utils.js +70 -0
- package/dist/components/wizard-icon.js +1 -1
- package/dist/custom-elements.json +181 -14
- package/dist/esm/b2b-alert.entry.js +2 -2
- package/dist/esm/b2b-anchor.entry.js +4 -4
- package/dist/esm/b2b-breadcrumb-item.entry.js +2 -2
- package/dist/esm/b2b-breadcrumb.entry.js +2 -2
- package/dist/esm/b2b-button_2.entry.js +5 -3
- package/dist/esm/b2b-card.entry.js +2 -2
- package/dist/esm/b2b-checkbox-group.entry.js +2 -2
- package/dist/esm/b2b-checkbox.entry.js +89 -0
- package/dist/esm/b2b-chip-component_2.entry.js +68 -0
- package/dist/esm/b2b-core-components.js +3 -3
- package/dist/esm/b2b-dropdown.entry.js +2 -2
- package/dist/esm/b2b-grid-col.entry.js +1 -1
- package/dist/esm/b2b-grid-row.entry.js +1 -1
- 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 -2
- package/dist/esm/b2b-input-group_2.entry.js +4 -4
- package/dist/esm/b2b-input-label.entry.js +1 -1
- package/dist/esm/b2b-input_2.entry.js +3 -3
- package/dist/esm/b2b-label.entry.js +2 -2
- package/dist/esm/b2b-modal.entry.js +2 -2
- package/dist/esm/b2b-multiselect-dropdown.entry.js +162 -0
- package/dist/esm/b2b-pagination.entry.js +2 -2
- package/dist/esm/b2b-paragraph.entry.js +2 -2
- package/dist/esm/b2b-progress-bar.entry.js +38 -0
- 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 +2 -2
- package/dist/esm/b2b-rounded-icon.entry.js +2 -2
- package/dist/esm/b2b-scrollable-container.entry.js +2 -2
- package/dist/esm/b2b-search.entry.js +1 -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-cell_2.entry.js +152 -0
- package/dist/esm/b2b-table-row.entry.js +23 -24
- package/dist/esm/b2b-table-rowgroup.entry.js +33 -30
- package/dist/esm/b2b-table.entry.js +32 -11
- package/dist/esm/b2b-textarea.entry.js +2 -2
- package/dist/esm/b2b-toggle-button.entry.js +2 -2
- package/dist/esm/b2b-toggle-chip.entry.js +55 -0
- package/dist/esm/b2b-toggle-group.entry.js +2 -2
- package/dist/esm/b2b-tooltip.entry.js +2 -2
- package/dist/esm/b2b-wizard-icon.entry.js +2 -2
- package/dist/esm/b2b-wizard-step.entry.js +2 -2
- package/dist/esm/b2b-wizard.entry.js +2 -2
- package/dist/esm/{index-f0a4762b.js → index-1916a410.js} +25 -6
- package/dist/esm/loader.js +3 -3
- package/dist/{components/table.types.js → esm/table.types-aedae1a4.js} +1 -0
- package/dist/esm/utils-5221c150.js +34 -0
- package/dist/types/components/button/button.d.ts +2 -0
- package/dist/types/components/button/button.stories.d.ts +1 -0
- package/dist/types/components/chip/chip.d.ts +1 -0
- package/dist/types/components/icon/types.d.ts +1 -1
- package/dist/types/components/input-list/input-list.stories.d.ts +2 -1
- package/dist/types/components/multiselect-dropdown/multiselect-dropdown.d.ts +43 -0
- package/dist/types/components/multiselect-dropdown/multiselect-dropdown.stories.d.ts +5 -0
- package/dist/types/components/multiselect-dropdown/multiselect-option/multiselect-option.d.ts +14 -0
- package/dist/types/components/progress-bar/progress-bar.d.ts +13 -0
- package/dist/types/components/progress-bar/progress-bar.stories.d.ts +9 -0
- package/dist/types/components/table/table-cell/table-cell.d.ts +6 -2
- package/dist/types/components/table/table-header/table-header.d.ts +14 -3
- package/dist/types/components/table/table-row/table-row.d.ts +5 -2
- package/dist/types/components/table/table-rowgroup/table-rowgroup.d.ts +5 -2
- package/dist/types/components/table/table.d.ts +6 -0
- package/dist/types/components/table/table.stories.d.ts +2 -1
- package/dist/types/components/table/utils.d.ts +2 -0
- package/dist/types/components/toggle-chip/toggle-chip.d.ts +21 -0
- package/dist/types/components.d.ts +306 -15
- package/dist/types/utils/interfaces/form.interface.d.ts +5 -0
- package/dist/types/utils/interfaces/interaction.interface.d.ts +4 -0
- package/dist/types/utils/types/table.types.d.ts +1 -0
- package/dist/web-types.json +307 -14
- package/package.json +2 -2
- package/dist/b2b-core-components/p-0034d167.entry.js +0 -1
- package/dist/b2b-core-components/p-0354d337.entry.js +0 -1
- package/dist/b2b-core-components/p-068eb8ba.entry.js +0 -1
- package/dist/b2b-core-components/p-0f60ff5a.entry.js +0 -1
- package/dist/b2b-core-components/p-220d5f79.entry.js +0 -1
- package/dist/b2b-core-components/p-299d5c71.entry.js +0 -1
- package/dist/b2b-core-components/p-2ad195d3.entry.js +0 -1
- package/dist/b2b-core-components/p-340f01f8.entry.js +0 -1
- package/dist/b2b-core-components/p-381bd00a.entry.js +0 -1
- package/dist/b2b-core-components/p-39f965f2.entry.js +0 -1
- package/dist/b2b-core-components/p-46f1d12d.entry.js +0 -1
- package/dist/b2b-core-components/p-50633227.entry.js +0 -1
- package/dist/b2b-core-components/p-57a842ba.entry.js +0 -1
- package/dist/b2b-core-components/p-66048f63.entry.js +0 -1
- package/dist/b2b-core-components/p-6814fed4.entry.js +0 -1
- package/dist/b2b-core-components/p-71bcb908.entry.js +0 -1
- package/dist/b2b-core-components/p-7a1e9ef2.entry.js +0 -1
- package/dist/b2b-core-components/p-7d05e787.entry.js +0 -1
- package/dist/b2b-core-components/p-89dc58cc.entry.js +0 -1
- package/dist/b2b-core-components/p-8fb5f715.entry.js +0 -1
- package/dist/b2b-core-components/p-a4ba259c.entry.js +0 -1
- package/dist/b2b-core-components/p-a7d829d8.entry.js +0 -1
- package/dist/b2b-core-components/p-a8043eb7.entry.js +0 -1
- package/dist/b2b-core-components/p-a896e061.entry.js +0 -1
- package/dist/b2b-core-components/p-b1064afb.js +0 -1
- package/dist/b2b-core-components/p-c59bffbe.entry.js +0 -1
- package/dist/b2b-core-components/p-c93fc43f.entry.js +0 -1
- package/dist/b2b-core-components/p-cfd92648.entry.js +0 -1
- package/dist/b2b-core-components/p-da2823f1.entry.js +0 -1
- package/dist/b2b-core-components/p-e8d1236b.entry.js +0 -1
- package/dist/b2b-core-components/p-e9f3a7af.entry.js +0 -1
- package/dist/b2b-core-components/p-edbe9fc0.entry.js +0 -1
- package/dist/b2b-core-components/p-f1625da0.entry.js +0 -1
- package/dist/b2b-core-components/p-f6f7c598.entry.js +0 -1
- package/dist/b2b-core-components/p-ff36af9f.entry.js +0 -1
- package/dist/cjs/b2b-checkbox_3.cjs.entry.js +0 -222
- package/dist/cjs/b2b-chip-component.cjs.entry.js +0 -40
- package/dist/esm/b2b-checkbox_3.entry.js +0 -216
- package/dist/esm/b2b-chip-component.entry.js +0 -36
- package/dist/esm/table.types-c4d9046e.js +0 -36
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 15 Feb 2024 09:42:32 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
--b2b-color-warning-50: #ffd998;
|
|
46
46
|
--b2b-color-error-100: #e6344b;
|
|
47
47
|
--b2b-color-primary: #d4021d;
|
|
48
|
+
--b2b-color-red-250: #850012;
|
|
48
49
|
--b2b-color-red-200: #bb0004;
|
|
49
50
|
--b2b-color-red-150: #e6344b;
|
|
50
51
|
--b2b-color-red-100: #d4021d;
|
|
@@ -61,8 +62,8 @@
|
|
|
61
62
|
--b2b-color-black-100: #222222;
|
|
62
63
|
--b2b-color-black-50: #333333;
|
|
63
64
|
--b2b-size-headline-line-height-400: var(--b2b-size-60);
|
|
64
|
-
--b2b-size-headline-line-height-200: var(--b2b-size-
|
|
65
|
-
--b2b-size-headline-line-height-100: var(--b2b-size-
|
|
65
|
+
--b2b-size-headline-line-height-200: var(--b2b-size-60);
|
|
66
|
+
--b2b-size-headline-line-height-100: var(--b2b-size-60);
|
|
66
67
|
--b2b-size-headline-400: var(--b2b-size-60);
|
|
67
68
|
--b2b-size-headline-200: var(--b2b-size-45);
|
|
68
69
|
--b2b-size-headline-100: var(--b2b-size-40);
|
|
@@ -122,7 +123,7 @@
|
|
|
122
123
|
}
|
|
123
124
|
/**
|
|
124
125
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 15 Feb 2024 09:42:32 GMT
|
|
126
127
|
*/
|
|
127
128
|
:root [data-theme="dark"] {
|
|
128
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -161,6 +162,7 @@
|
|
|
161
162
|
--b2b-color-warning-50: #ffd998;
|
|
162
163
|
--b2b-color-error-100: #e6344b;
|
|
163
164
|
--b2b-color-primary: #d4021d;
|
|
165
|
+
--b2b-color-red-250: #850012;
|
|
164
166
|
--b2b-color-red-200: #bb0004;
|
|
165
167
|
--b2b-color-red-150: #e6344b;
|
|
166
168
|
--b2b-color-red-100: #d4021d;
|
|
@@ -228,6 +230,10 @@
|
|
|
228
230
|
transform: rotate(90deg);
|
|
229
231
|
transition: transform 0.2s ease-in-out;
|
|
230
232
|
}
|
|
233
|
+
:host(.b2b-table-row--colspan) {
|
|
234
|
+
flex-flow: row nowrap;
|
|
235
|
+
display: flex;
|
|
236
|
+
}
|
|
231
237
|
:host(.b2b-table-row--color-default) {
|
|
232
238
|
background-color: inherit;
|
|
233
239
|
}
|
|
@@ -258,9 +264,11 @@
|
|
|
258
264
|
:host(.b2b-table-row--color-group:hover) ::slotted(*) {
|
|
259
265
|
--b2b-table-cell-text-expand-bg: var(--b2b-color-table-expand-hover);
|
|
260
266
|
}
|
|
261
|
-
.b2b-table-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
.b2b-table-row__control-cell--checkbox {
|
|
268
|
+
flex: 0 0 var(--b2b-size-40);
|
|
269
|
+
width: var(--b2b-size-40);
|
|
270
|
+
}
|
|
271
|
+
.b2b-table-row__control-cell--accordion {
|
|
272
|
+
flex: 0 0 var(--b2b-size-60);
|
|
273
|
+
width: var(--b2b-size-60);
|
|
266
274
|
}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
|
-
import { TableAccordionRowTypes, TableColourOptions, } from "../../../utils/types/table.types";
|
|
2
|
+
import { TableAccordionRowTypes, TableColourOptions, TableSizes, } from "../../../utils/types/table.types";
|
|
3
3
|
export class TableRowComponent {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.toggleOpen = () => {
|
|
6
6
|
this.isOpen = !this.isOpen;
|
|
7
7
|
this.b2bOpen.emit(this.isOpen);
|
|
8
8
|
};
|
|
9
|
+
this.setTotalCols = () => {
|
|
10
|
+
let cells = Array.from(this.hostElement.children);
|
|
11
|
+
let cols = 0;
|
|
12
|
+
cells.forEach(cell => {
|
|
13
|
+
cols += cell.colspan ? cell.colspan : 1;
|
|
14
|
+
});
|
|
15
|
+
cells.forEach(cell => {
|
|
16
|
+
cell.totalCols = cols;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
9
19
|
this.getRowColor = () => {
|
|
10
20
|
if (this.accordionType === TableAccordionRowTypes.PARENT)
|
|
11
21
|
return TableColourOptions.GROUP;
|
|
12
22
|
return this.color;
|
|
13
23
|
};
|
|
14
|
-
|
|
15
|
-
const accordionSize = '24px';
|
|
16
|
-
const checkboxSize = '16px';
|
|
17
|
-
if (Boolean(this.selectable)) {
|
|
18
|
-
return checkboxSize;
|
|
19
|
-
}
|
|
20
|
-
else if (Boolean(this.accordionType)) {
|
|
21
|
-
return accordionSize;
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
24
|
+
/** Only needs to be added if we control the state of the selection. */
|
|
27
25
|
this.shouldAddCheckbox = () => {
|
|
28
26
|
let checkbox = this.hostElement.querySelector('b2b-checkbox');
|
|
29
27
|
return this.selectable && !Boolean(checkbox);
|
|
@@ -35,12 +33,10 @@ export class TableRowComponent {
|
|
|
35
33
|
let parent = this.getParentRowGroup();
|
|
36
34
|
if (this.shouldAddCheckbox()) {
|
|
37
35
|
if (parent.type === 'header') {
|
|
38
|
-
return (h("b2b-table-header", {
|
|
39
|
-
['width']: this.getRowWidth(),
|
|
40
|
-
} }, h("b2b-checkbox", { standalone: true, checked: this.checked, indeterminate: this.indeterminate })));
|
|
36
|
+
return (h("b2b-table-header", { class: "b2b-table-row__control-cell--checkbox" }, h("b2b-checkbox", { standalone: true, checked: this.checked, indeterminate: this.indeterminate })));
|
|
41
37
|
}
|
|
42
38
|
else {
|
|
43
|
-
return (h("b2b-table-cell",
|
|
39
|
+
return (h("b2b-table-cell", { class: "b2b-table-row__control-cell--checkbox" }, h("b2b-checkbox", { standalone: true, checked: this.checked, value: this.value, indeterminate: this.indeterminate })));
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
42
|
};
|
|
@@ -48,16 +44,14 @@ export class TableRowComponent {
|
|
|
48
44
|
if (this.accordionType != undefined) {
|
|
49
45
|
switch (this.accordionType) {
|
|
50
46
|
case TableAccordionRowTypes.HEADER:
|
|
51
|
-
return (h("b2b-table-header", {
|
|
52
|
-
['width']: this.getRowWidth(),
|
|
53
|
-
} }));
|
|
47
|
+
return (h("b2b-table-header", { class: "b2b-table-row__control-cell--accordion" }));
|
|
54
48
|
case TableAccordionRowTypes.PARENT:
|
|
55
49
|
return (h("b2b-table-cell", null, h("button", { onClick: this.toggleOpen, class: {
|
|
56
50
|
'b2b-table-row__accordion-icon': true,
|
|
57
51
|
'b2b-table-row__accordion-icon--open': this.isOpen,
|
|
58
52
|
} }, h("b2b-icon", { icon: "b2b_icon-arrow-right", clickable: true }))));
|
|
59
53
|
case TableAccordionRowTypes.CHILD:
|
|
60
|
-
return h("b2b-table-cell",
|
|
54
|
+
return (h("b2b-table-cell", { class: "b2b-table-row__control-cell--accordion" }));
|
|
61
55
|
}
|
|
62
56
|
}
|
|
63
57
|
};
|
|
@@ -65,6 +59,7 @@ export class TableRowComponent {
|
|
|
65
59
|
this.color = 'default';
|
|
66
60
|
this.accordionType = undefined;
|
|
67
61
|
this.selectable = undefined;
|
|
62
|
+
this.size = undefined;
|
|
68
63
|
this.value = undefined;
|
|
69
64
|
this.indeterminate = false;
|
|
70
65
|
this.checked = false;
|
|
@@ -86,6 +81,9 @@ export class TableRowComponent {
|
|
|
86
81
|
this.b2bOpen.emit(isOpen);
|
|
87
82
|
}
|
|
88
83
|
componentWillLoad() {
|
|
84
|
+
if (this.size === TableSizes.COLSPAN) {
|
|
85
|
+
this.setTotalCols();
|
|
86
|
+
}
|
|
89
87
|
if (this.selectable &&
|
|
90
88
|
!Boolean(this.value) &&
|
|
91
89
|
this.getParentRowGroup().type !== 'header') {
|
|
@@ -95,6 +93,7 @@ export class TableRowComponent {
|
|
|
95
93
|
render() {
|
|
96
94
|
return (h(Host, { class: {
|
|
97
95
|
'b2b-table-row': true,
|
|
96
|
+
['b2b-table-row--colspan']: this.size === TableSizes.COLSPAN,
|
|
98
97
|
['b2b-table-row--highlight']: this.highlight,
|
|
99
98
|
[`b2b-table-row--color-${this.getRowColor()}`]: true,
|
|
100
99
|
}, role: "row" }, this.getAccordionColumns(), this.getCheckbox(), h("slot", null)));
|
|
@@ -201,6 +200,32 @@ export class TableRowComponent {
|
|
|
201
200
|
"attribute": "selectable",
|
|
202
201
|
"reflect": false
|
|
203
202
|
},
|
|
203
|
+
"size": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"mutable": false,
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "TableSizes",
|
|
208
|
+
"resolved": "\"colspan\" | \"equal\" | \"expand\"",
|
|
209
|
+
"references": {
|
|
210
|
+
"TableSizes": {
|
|
211
|
+
"location": "import",
|
|
212
|
+
"path": "../../../utils/types/table.types",
|
|
213
|
+
"id": "src/utils/types/table.types.ts::TableSizes"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"required": false,
|
|
218
|
+
"optional": true,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [{
|
|
221
|
+
"name": "internal",
|
|
222
|
+
"text": "Whether colspans are possible in the table."
|
|
223
|
+
}],
|
|
224
|
+
"text": ""
|
|
225
|
+
},
|
|
226
|
+
"attribute": "size",
|
|
227
|
+
"reflect": false
|
|
228
|
+
},
|
|
204
229
|
"value": {
|
|
205
230
|
"type": "string",
|
|
206
231
|
"mutable": false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 15 Feb 2024 09:42:32 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
--b2b-color-warning-50: #ffd998;
|
|
46
46
|
--b2b-color-error-100: #e6344b;
|
|
47
47
|
--b2b-color-primary: #d4021d;
|
|
48
|
+
--b2b-color-red-250: #850012;
|
|
48
49
|
--b2b-color-red-200: #bb0004;
|
|
49
50
|
--b2b-color-red-150: #e6344b;
|
|
50
51
|
--b2b-color-red-100: #d4021d;
|
|
@@ -61,8 +62,8 @@
|
|
|
61
62
|
--b2b-color-black-100: #222222;
|
|
62
63
|
--b2b-color-black-50: #333333;
|
|
63
64
|
--b2b-size-headline-line-height-400: var(--b2b-size-60);
|
|
64
|
-
--b2b-size-headline-line-height-200: var(--b2b-size-
|
|
65
|
-
--b2b-size-headline-line-height-100: var(--b2b-size-
|
|
65
|
+
--b2b-size-headline-line-height-200: var(--b2b-size-60);
|
|
66
|
+
--b2b-size-headline-line-height-100: var(--b2b-size-60);
|
|
66
67
|
--b2b-size-headline-400: var(--b2b-size-60);
|
|
67
68
|
--b2b-size-headline-200: var(--b2b-size-45);
|
|
68
69
|
--b2b-size-headline-100: var(--b2b-size-40);
|
|
@@ -122,7 +123,7 @@
|
|
|
122
123
|
}
|
|
123
124
|
/**
|
|
124
125
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 15 Feb 2024 09:42:32 GMT
|
|
126
127
|
*/
|
|
127
128
|
:root [data-theme="dark"] {
|
|
128
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -161,6 +162,7 @@
|
|
|
161
162
|
--b2b-color-warning-50: #ffd998;
|
|
162
163
|
--b2b-color-error-100: #e6344b;
|
|
163
164
|
--b2b-color-primary: #d4021d;
|
|
165
|
+
--b2b-color-red-250: #850012;
|
|
164
166
|
--b2b-color-red-200: #bb0004;
|
|
165
167
|
--b2b-color-red-150: #e6344b;
|
|
166
168
|
--b2b-color-red-100: #d4021d;
|
|
@@ -218,4 +220,13 @@
|
|
|
218
220
|
}
|
|
219
221
|
:host(.b2b-table-rowgroup__header) {
|
|
220
222
|
display: table-header-group;
|
|
223
|
+
}
|
|
224
|
+
:host(.b2b-table-rowgroup--fixed) {
|
|
225
|
+
position: sticky;
|
|
226
|
+
top: 0;
|
|
227
|
+
z-index: 2;
|
|
228
|
+
background-color: var(--b2b-color-white-100);
|
|
229
|
+
}
|
|
230
|
+
:host(.b2b-table-rowgroup--colspan) {
|
|
231
|
+
display: block;
|
|
221
232
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
|
-
import { TableAccordionRowTypes, TableRowgroupTypes, } from "../../../utils/types/table.types";
|
|
2
|
+
import { TableAccordionRowTypes, TableRowgroupTypes, TableSizes, } from "../../../utils/types/table.types";
|
|
3
3
|
import { updateCheckboxState, getFirstRow, getAllRows, getRemainingRows, } from "../utils";
|
|
4
4
|
export class TableRowgroupComponent {
|
|
5
5
|
constructor() {
|
|
@@ -39,23 +39,42 @@ export class TableRowgroupComponent {
|
|
|
39
39
|
};
|
|
40
40
|
this.toggleChildRowVisibility = (isOpen) => {
|
|
41
41
|
const children = getRemainingRows(this.host);
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
child
|
|
45
|
-
|
|
42
|
+
if (this.size === TableSizes.COLSPAN) {
|
|
43
|
+
if (isOpen) {
|
|
44
|
+
children.forEach(child => {
|
|
45
|
+
child.hidden = false;
|
|
46
|
+
child.setAttribute('aria-hidden', 'false');
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
children.forEach(child => {
|
|
51
|
+
child.hidden = true;
|
|
52
|
+
child.setAttribute('aria-hidden', 'true');
|
|
53
|
+
});
|
|
54
|
+
}
|
|
46
55
|
}
|
|
47
56
|
else {
|
|
48
|
-
|
|
49
|
-
child
|
|
50
|
-
|
|
57
|
+
if (isOpen) {
|
|
58
|
+
children.forEach(child => {
|
|
59
|
+
child.style.visibility = 'visible';
|
|
60
|
+
child.setAttribute('aria-hidden', 'false');
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
children.forEach(child => {
|
|
65
|
+
child.style.visibility = 'collapse';
|
|
66
|
+
child.setAttribute('aria-hidden', 'true');
|
|
67
|
+
});
|
|
68
|
+
}
|
|
51
69
|
}
|
|
52
70
|
};
|
|
53
71
|
this.type = TableRowgroupTypes.HEADER;
|
|
72
|
+
this.size = undefined;
|
|
54
73
|
this.accordion = false;
|
|
55
74
|
this.selectable = false;
|
|
75
|
+
this.fixed = false;
|
|
56
76
|
this.opened = false;
|
|
57
77
|
this.selectedValues = [];
|
|
58
|
-
this.indeterminate = false;
|
|
59
78
|
}
|
|
60
79
|
handleOpenChange(event) {
|
|
61
80
|
this.toggleChildRowVisibility(event.detail);
|
|
@@ -112,6 +131,8 @@ export class TableRowgroupComponent {
|
|
|
112
131
|
render() {
|
|
113
132
|
return (h(Host, { class: {
|
|
114
133
|
['b2b-table-rowgroup__' + this.type]: true,
|
|
134
|
+
'b2b-table-rowgroup--fixed': this.fixed,
|
|
135
|
+
'b2b-table-rowgroup--colspan': this.size === TableSizes.COLSPAN,
|
|
115
136
|
}, role: "rowgroup" }, h("slot", null)));
|
|
116
137
|
}
|
|
117
138
|
static get is() { return "b2b-table-rowgroup"; }
|
|
@@ -152,6 +173,32 @@ export class TableRowgroupComponent {
|
|
|
152
173
|
"reflect": false,
|
|
153
174
|
"defaultValue": "TableRowgroupTypes.HEADER"
|
|
154
175
|
},
|
|
176
|
+
"size": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"mutable": false,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "TableSizes",
|
|
181
|
+
"resolved": "\"colspan\" | \"equal\" | \"expand\"",
|
|
182
|
+
"references": {
|
|
183
|
+
"TableSizes": {
|
|
184
|
+
"location": "import",
|
|
185
|
+
"path": "../../../utils/types/table.types",
|
|
186
|
+
"id": "src/utils/types/table.types.ts::TableSizes"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"required": false,
|
|
191
|
+
"optional": false,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [{
|
|
194
|
+
"name": "internal",
|
|
195
|
+
"text": "the table size."
|
|
196
|
+
}],
|
|
197
|
+
"text": ""
|
|
198
|
+
},
|
|
199
|
+
"attribute": "size",
|
|
200
|
+
"reflect": false
|
|
201
|
+
},
|
|
155
202
|
"accordion": {
|
|
156
203
|
"type": "boolean",
|
|
157
204
|
"mutable": false,
|
|
@@ -188,6 +235,24 @@ export class TableRowgroupComponent {
|
|
|
188
235
|
"reflect": false,
|
|
189
236
|
"defaultValue": "false"
|
|
190
237
|
},
|
|
238
|
+
"fixed": {
|
|
239
|
+
"type": "boolean",
|
|
240
|
+
"mutable": false,
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "boolean",
|
|
243
|
+
"resolved": "boolean",
|
|
244
|
+
"references": {}
|
|
245
|
+
},
|
|
246
|
+
"required": false,
|
|
247
|
+
"optional": false,
|
|
248
|
+
"docs": {
|
|
249
|
+
"tags": [],
|
|
250
|
+
"text": "Sets the header rowgroup position to sticky. Use this in a scrollable container."
|
|
251
|
+
},
|
|
252
|
+
"attribute": "fixed",
|
|
253
|
+
"reflect": false,
|
|
254
|
+
"defaultValue": "false"
|
|
255
|
+
},
|
|
191
256
|
"opened": {
|
|
192
257
|
"type": "boolean",
|
|
193
258
|
"mutable": false,
|
|
@@ -210,8 +275,7 @@ export class TableRowgroupComponent {
|
|
|
210
275
|
}
|
|
211
276
|
static get states() {
|
|
212
277
|
return {
|
|
213
|
-
"selectedValues": {}
|
|
214
|
-
"indeterminate": {}
|
|
278
|
+
"selectedValues": {}
|
|
215
279
|
};
|
|
216
280
|
}
|
|
217
281
|
static get events() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 15 Feb 2024 09:42:32 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root, :host {
|
|
6
6
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
--b2b-color-warning-50: #ffd998;
|
|
46
46
|
--b2b-color-error-100: #e6344b;
|
|
47
47
|
--b2b-color-primary: #d4021d;
|
|
48
|
+
--b2b-color-red-250: #850012;
|
|
48
49
|
--b2b-color-red-200: #bb0004;
|
|
49
50
|
--b2b-color-red-150: #e6344b;
|
|
50
51
|
--b2b-color-red-100: #d4021d;
|
|
@@ -61,8 +62,8 @@
|
|
|
61
62
|
--b2b-color-black-100: #222222;
|
|
62
63
|
--b2b-color-black-50: #333333;
|
|
63
64
|
--b2b-size-headline-line-height-400: var(--b2b-size-60);
|
|
64
|
-
--b2b-size-headline-line-height-200: var(--b2b-size-
|
|
65
|
-
--b2b-size-headline-line-height-100: var(--b2b-size-
|
|
65
|
+
--b2b-size-headline-line-height-200: var(--b2b-size-60);
|
|
66
|
+
--b2b-size-headline-line-height-100: var(--b2b-size-60);
|
|
66
67
|
--b2b-size-headline-400: var(--b2b-size-60);
|
|
67
68
|
--b2b-size-headline-200: var(--b2b-size-45);
|
|
68
69
|
--b2b-size-headline-100: var(--b2b-size-40);
|
|
@@ -122,7 +123,7 @@
|
|
|
122
123
|
}
|
|
123
124
|
/**
|
|
124
125
|
* Do not edit directly
|
|
125
|
-
* Generated on
|
|
126
|
+
* Generated on Thu, 15 Feb 2024 09:42:32 GMT
|
|
126
127
|
*/
|
|
127
128
|
:root [data-theme="dark"] {
|
|
128
129
|
--b2b-size-200: 5rem; /* 80px */
|
|
@@ -161,6 +162,7 @@
|
|
|
161
162
|
--b2b-color-warning-50: #ffd998;
|
|
162
163
|
--b2b-color-error-100: #e6344b;
|
|
163
164
|
--b2b-color-primary: #d4021d;
|
|
165
|
+
--b2b-color-red-250: #850012;
|
|
164
166
|
--b2b-color-red-200: #bb0004;
|
|
165
167
|
--b2b-color-red-150: #e6344b;
|
|
166
168
|
--b2b-color-red-100: #d4021d;
|
|
@@ -215,12 +217,15 @@
|
|
|
215
217
|
}
|
|
216
218
|
:host {
|
|
217
219
|
text-align: left;
|
|
218
|
-
|
|
220
|
+
width: 100%;
|
|
219
221
|
}
|
|
220
222
|
:host(.b2b-table--expand) {
|
|
221
|
-
|
|
223
|
+
display: table;
|
|
222
224
|
}
|
|
223
225
|
:host(.b2b-table--equal) {
|
|
224
|
-
|
|
226
|
+
display: table;
|
|
225
227
|
table-layout: fixed;
|
|
228
|
+
}
|
|
229
|
+
:host(.b2b-table--colspan) {
|
|
230
|
+
display: block;
|
|
226
231
|
}
|
|
@@ -2,7 +2,7 @@ import { newE2EPage } from "@stencil/core/testing";
|
|
|
2
2
|
describe('B2B-Table', () => {
|
|
3
3
|
let page;
|
|
4
4
|
beforeEach(async () => {
|
|
5
|
-
page = await newE2EPage();
|
|
5
|
+
page = await newE2EPage({ timeout: 10000 });
|
|
6
6
|
await page.setContent(`
|
|
7
7
|
<b2b-table size='equal'>
|
|
8
8
|
<b2b-table-rowgroup type='header'>
|
|
@@ -64,6 +64,22 @@ describe('B2B-Table', () => {
|
|
|
64
64
|
</b2b-table-row>
|
|
65
65
|
</b2b-table-rowgroup>
|
|
66
66
|
</b2b-table>`;
|
|
67
|
+
const tableWithColspan = `
|
|
68
|
+
<b2b-table size='colspan'>
|
|
69
|
+
<b2b-table-rowgroup type='header'>
|
|
70
|
+
<b2b-table-row>
|
|
71
|
+
<b2b-table-header colspan="2">Title 1 + 2</b2b-table-header>
|
|
72
|
+
<b2b-table-header>Title 2</b2b-table-header>
|
|
73
|
+
</b2b-table-row>
|
|
74
|
+
</b2b-table-rowgroup>
|
|
75
|
+
<b2b-table-rowgroup type='body'>
|
|
76
|
+
<b2b-table-row>
|
|
77
|
+
<b2b-table-cell><p>data 1a</p></b2b-table-cell>
|
|
78
|
+
<b2b-table-cell colspan="2">data 2a + 3a</b2b-table-cell>
|
|
79
|
+
</b2b-table-row>
|
|
80
|
+
</b2b-table-rowgroup>
|
|
81
|
+
</b2b-table>
|
|
82
|
+
`;
|
|
67
83
|
it('should render the table component', async () => {
|
|
68
84
|
const element = await page.find('b2b-table');
|
|
69
85
|
expect(element).not.toBeNull();
|
|
@@ -93,10 +109,8 @@ describe('B2B-Table', () => {
|
|
|
93
109
|
</b2b-table>
|
|
94
110
|
</b2b-scrollable-container>
|
|
95
111
|
`);
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
expect(cell.getAttribute('fixed')).toBe('true');
|
|
99
|
-
});
|
|
112
|
+
const rowGroup = await page.find('b2b-table-rowgroup');
|
|
113
|
+
expect(await rowGroup.getProperty('fixed')).toBe(true);
|
|
100
114
|
});
|
|
101
115
|
it('should set header rows not highlightable', async () => {
|
|
102
116
|
const headerRow = await page.find('b2b-table-rowgroup[type=header] b2b-table-row');
|
|
@@ -371,4 +385,16 @@ describe('B2B-Table', () => {
|
|
|
371
385
|
values: ['cherries'],
|
|
372
386
|
});
|
|
373
387
|
});
|
|
388
|
+
it('should allow setting the colspan property on cells if the table size is colspan', async () => {
|
|
389
|
+
page = await newE2EPage();
|
|
390
|
+
await page.setContent(tableWithColspan);
|
|
391
|
+
const header = await page.find({ text: 'Title 1 + 2' });
|
|
392
|
+
const table = await page.find('b2b-table');
|
|
393
|
+
const row = await page.find('b2b-table-row');
|
|
394
|
+
const cell = await page.find({ text: 'data 2a + 3a' });
|
|
395
|
+
expect(await cell.style.flexBasis).toBeDefined;
|
|
396
|
+
expect(row).toHaveClass('b2b-table-row--colspan');
|
|
397
|
+
expect(table).toHaveClass('b2b-table--colspan');
|
|
398
|
+
expect(await header.getProperty('colspan')).toEqual(2);
|
|
399
|
+
});
|
|
374
400
|
});
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { TableSizes, TableSortDirections } from "../../utils/types/table.types";
|
|
3
|
+
import { getAllRows } from "./utils";
|
|
3
4
|
export class TableComponent {
|
|
4
5
|
constructor() {
|
|
6
|
+
this.getAllCellsByRow = (row) => {
|
|
7
|
+
return Array.from(row.children);
|
|
8
|
+
};
|
|
9
|
+
this.setRowGroupSize = () => {
|
|
10
|
+
const rowGroups = Array.from(this.host.querySelectorAll('b2b-table-rowgroup'));
|
|
11
|
+
for (let i = 0, n = rowGroups.length; i < n; i++) {
|
|
12
|
+
rowGroups[i].size = this.size;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
5
15
|
this.size = TableSizes.EXPAND;
|
|
6
16
|
}
|
|
7
17
|
onColumnSelected(event) {
|
|
@@ -13,19 +23,30 @@ export class TableComponent {
|
|
|
13
23
|
}
|
|
14
24
|
}
|
|
15
25
|
setCellSize() {
|
|
16
|
-
const
|
|
17
|
-
|
|
26
|
+
const rows = getAllRows(this.host);
|
|
27
|
+
for (let i = 0, n = rows.length; i < n; i++) {
|
|
28
|
+
rows[i].size = this.size;
|
|
29
|
+
const cells = this.getAllCellsByRow(rows[i]);
|
|
30
|
+
for (let i = 0, n = cells.length; i < n; i++) {
|
|
31
|
+
cells[i].setAttribute('size', this.size);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
18
34
|
}
|
|
19
35
|
setFixedHeaders() {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
const rowGroup = this.host.querySelector('b2b-table-rowgroup');
|
|
37
|
+
rowGroup.fixed = true;
|
|
38
|
+
}
|
|
39
|
+
componentWillLoad() {
|
|
40
|
+
this.isScrollable = this.host.closest('b2b-scrollable-container') !== null;
|
|
41
|
+
this.setCellSize();
|
|
42
|
+
if (!this.isScrollable) {
|
|
43
|
+
this.setRowGroupSize();
|
|
24
44
|
}
|
|
25
45
|
}
|
|
26
46
|
componentDidRender() {
|
|
27
|
-
this.
|
|
28
|
-
|
|
47
|
+
if (this.isScrollable) {
|
|
48
|
+
this.setFixedHeaders();
|
|
49
|
+
}
|
|
29
50
|
}
|
|
30
51
|
componentDidLoad() {
|
|
31
52
|
const tableHeaders = this.host.querySelectorAll('b2b-table-header');
|
|
@@ -62,7 +83,7 @@ export class TableComponent {
|
|
|
62
83
|
"mutable": false,
|
|
63
84
|
"complexType": {
|
|
64
85
|
"original": "TableSizes",
|
|
65
|
-
"resolved": "\"equal\" | \"expand\"",
|
|
86
|
+
"resolved": "\"colspan\" | \"equal\" | \"expand\"",
|
|
66
87
|
"references": {
|
|
67
88
|
"TableSizes": {
|
|
68
89
|
"location": "import",
|
|
@@ -75,7 +96,7 @@ export class TableComponent {
|
|
|
75
96
|
"optional": false,
|
|
76
97
|
"docs": {
|
|
77
98
|
"tags": [],
|
|
78
|
-
"text": "The size of the table. Both will expand to 100% of parent size.\nExpand cells will use as much space as content needs and text will wrap.\nEqual will keep all column sizes proportional to the number of columns."
|
|
99
|
+
"text": "The size of the table. Both will expand to 100% of parent size.\nExpand cells will use as much space as content needs and text will wrap.\nEqual will keep all column sizes proportional to the number of columns.\nColspan behaves same as equal, but allows you to set a colspan attribute on individual columns or cells\nto make them span more than one column."
|
|
79
100
|
},
|
|
80
101
|
"attribute": "size",
|
|
81
102
|
"reflect": false,
|