@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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('B2B-Multiselect-Dropdown', () => {
|
|
3
|
+
let page;
|
|
4
|
+
const optionsList = [
|
|
5
|
+
'Swift Carrot',
|
|
6
|
+
'Hydromelon',
|
|
7
|
+
'Skyshroom',
|
|
8
|
+
'Fortified Pumpkin',
|
|
9
|
+
'Hyrule Herb',
|
|
10
|
+
'Hylian Shroom',
|
|
11
|
+
'Mighty Banana',
|
|
12
|
+
'Endura Carrot',
|
|
13
|
+
'Golden Apple',
|
|
14
|
+
];
|
|
15
|
+
const setOptionsList = async () => {
|
|
16
|
+
const multiselect = await page.find('b2b-multiselect-dropdown');
|
|
17
|
+
multiselect.setProperty('optionsList', optionsList);
|
|
18
|
+
await page.waitForChanges();
|
|
19
|
+
};
|
|
20
|
+
const setMaxChipAmount = async (chips) => {
|
|
21
|
+
const multiselect = await page.find('b2b-multiselect-dropdown');
|
|
22
|
+
multiselect.setProperty('maxOptionsVisible', chips);
|
|
23
|
+
await page.waitForChanges();
|
|
24
|
+
};
|
|
25
|
+
beforeEach(async () => {
|
|
26
|
+
page = await newE2EPage();
|
|
27
|
+
await page.setContent(`<b2b-multiselect-dropdown
|
|
28
|
+
placeholder="Please select..."
|
|
29
|
+
search-placeholder="Search"
|
|
30
|
+
select-all-label="Select All"
|
|
31
|
+
label="Hylian fruits and vegetables"></b2b-multiselect-dropdown>`);
|
|
32
|
+
});
|
|
33
|
+
it('should render the multiselect dropdown', async () => {
|
|
34
|
+
const multiselect = await page.find('b2b-multiselect-dropdown');
|
|
35
|
+
await setOptionsList();
|
|
36
|
+
const options = await page.findAll('b2b-multiselect-dropdown >>> b2b-multiselect-option');
|
|
37
|
+
expect(options.length).toBe(10);
|
|
38
|
+
expect(multiselect).not.toBeNull();
|
|
39
|
+
});
|
|
40
|
+
it('should select an option and display it as a chip', async () => {
|
|
41
|
+
const multiselect = await page.find('b2b-multiselect-dropdown');
|
|
42
|
+
const selectedSpy = await page.spyOnEvent('b2b-selected');
|
|
43
|
+
await setOptionsList();
|
|
44
|
+
await multiselect.click();
|
|
45
|
+
await page.waitForChanges();
|
|
46
|
+
const opt = await page.find({ text: optionsList[0] });
|
|
47
|
+
await opt.click();
|
|
48
|
+
await page.waitForChanges();
|
|
49
|
+
const chip = await page.find('b2b-multiselect-dropdown >>> b2b-chip-component');
|
|
50
|
+
const val = await chip.getProperty('value');
|
|
51
|
+
expect(val).toEqualText(optionsList[0]);
|
|
52
|
+
expect(selectedSpy).toHaveReceivedEvent();
|
|
53
|
+
expect(selectedSpy).toHaveReceivedEventDetail(['Swift Carrot']);
|
|
54
|
+
});
|
|
55
|
+
it('should select all options and display them as chips', async () => {
|
|
56
|
+
const multiselect = await page.find('b2b-multiselect-dropdown');
|
|
57
|
+
const selectedSpy = await page.spyOnEvent('b2b-selected');
|
|
58
|
+
await setOptionsList();
|
|
59
|
+
await setMaxChipAmount(optionsList.length);
|
|
60
|
+
await multiselect.click();
|
|
61
|
+
await page.waitForChanges();
|
|
62
|
+
const opt = await page.find({ text: 'Select All' });
|
|
63
|
+
await opt.click();
|
|
64
|
+
await page.waitForChanges();
|
|
65
|
+
const chips = await page.findAll('b2b-multiselect-dropdown >>> b2b-chip-component');
|
|
66
|
+
expect(chips.length).toEqual(optionsList.length);
|
|
67
|
+
expect(selectedSpy).toHaveReceivedEvent();
|
|
68
|
+
expect(selectedSpy).toHaveReceivedEventDetail(optionsList);
|
|
69
|
+
});
|
|
70
|
+
it('should not display more chips than the maximum amount prop defines', async () => {
|
|
71
|
+
const multiselect = await page.find('b2b-multiselect-dropdown');
|
|
72
|
+
await setOptionsList();
|
|
73
|
+
await setMaxChipAmount(4);
|
|
74
|
+
await multiselect.click();
|
|
75
|
+
await page.waitForChanges();
|
|
76
|
+
const opt = await page.find({ text: 'Select All' });
|
|
77
|
+
await opt.click();
|
|
78
|
+
await page.waitForChanges();
|
|
79
|
+
const chips = await page.findAll('b2b-multiselect-dropdown >>> b2b-chip-component');
|
|
80
|
+
// account for overflow chip
|
|
81
|
+
expect(chips.length).toEqual(5);
|
|
82
|
+
});
|
|
83
|
+
/** TO DO: test chip closing
|
|
84
|
+
* Puppeteer has issues, but manual testing in vanilla, Vue and React confirmed logic works */
|
|
85
|
+
it('should filter options using the search', async () => {
|
|
86
|
+
const multiselect = await page.find('b2b-multiselect-dropdown');
|
|
87
|
+
await setOptionsList();
|
|
88
|
+
await multiselect.click();
|
|
89
|
+
await page.waitForChanges();
|
|
90
|
+
const input = await page.find('b2b-multiselect-dropdown >>> input');
|
|
91
|
+
await input.click();
|
|
92
|
+
await input.press('b');
|
|
93
|
+
await page.waitForChanges();
|
|
94
|
+
const options = await page.findAll('b2b-multiselect-dropdown >>> b2b-multiselect-option');
|
|
95
|
+
expect(options.length).toEqual(3);
|
|
96
|
+
await input.press('Backspace');
|
|
97
|
+
await page.waitForChanges();
|
|
98
|
+
const optionsAfter = await page.findAll('b2b-multiselect-dropdown >>> b2b-multiselect-option');
|
|
99
|
+
expect(optionsAfter.length).toEqual(10);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
export class B2bMultiSelectDropdown {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.handleInput = event => {
|
|
5
|
+
this.value = event.target.value.toLowerCase();
|
|
6
|
+
if (this.value !== '') {
|
|
7
|
+
const filteredList = this.optionsList.filter(option => option.toLowerCase().indexOf(this.value) > -1);
|
|
8
|
+
this.currentList = filteredList;
|
|
9
|
+
}
|
|
10
|
+
else if (this.value === '') {
|
|
11
|
+
this.currentList = this.optionsList;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
this.getOptions = () => {
|
|
15
|
+
return Array.from(this.hostElement.shadowRoot.querySelectorAll('b2b-multiselect-option')).slice(1);
|
|
16
|
+
};
|
|
17
|
+
this.renderChips = () => {
|
|
18
|
+
return this.selectedValues.map((option, index) => {
|
|
19
|
+
if (index < this.maxOptionsVisible) {
|
|
20
|
+
return (h("b2b-chip-component", { label: option, value: option, "onB2b-close": this.handleChipClose }));
|
|
21
|
+
}
|
|
22
|
+
else if (index === this.maxOptionsVisible) {
|
|
23
|
+
return (h("b2b-chip-component", { label: "...", class: "b2b-multiselect-dropdown__option--show-more-button", "has-close-button": "false", onClick: this.handleOverflowOptionsClick }));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
this.handleOverflowOptionsClick = () => {
|
|
31
|
+
if (!this.isElementFocused) {
|
|
32
|
+
this.setElementOnFocus();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.handleSelectedChange = event => {
|
|
36
|
+
const newOption = event.detail.selectedOption;
|
|
37
|
+
if (event.detail.selected) {
|
|
38
|
+
this.selectedValues = [...this.selectedValues, newOption];
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.selectedValues = this.selectedValues.filter(el => el !== newOption);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
this.handleChipClose = event => {
|
|
45
|
+
this.selectedValues = this.selectedValues.filter(el => el !== event.detail.value);
|
|
46
|
+
this.updateOption(event.detail.value);
|
|
47
|
+
this.resetFocus();
|
|
48
|
+
};
|
|
49
|
+
this.updateOption = (option) => {
|
|
50
|
+
const options = this.getOptions();
|
|
51
|
+
const optionToUpdate = options.find(el => el.option === option);
|
|
52
|
+
optionToUpdate.selected = false;
|
|
53
|
+
};
|
|
54
|
+
this.updateAllOptions = options => {
|
|
55
|
+
// Deselect all to avoid caching issues in Vue
|
|
56
|
+
options.forEach(option => (option.selected = false));
|
|
57
|
+
options
|
|
58
|
+
.filter(option => this.selectedValues.includes(option.option))
|
|
59
|
+
.forEach(option => (option.selected = true));
|
|
60
|
+
};
|
|
61
|
+
this.setElementOnFocus = () => {
|
|
62
|
+
this.isElementFocused = true;
|
|
63
|
+
};
|
|
64
|
+
this.setElementOnBlur = () => {
|
|
65
|
+
this.isElementFocused = false;
|
|
66
|
+
};
|
|
67
|
+
this.resetFocus = () => {
|
|
68
|
+
const el = this.hostElement.shadowRoot.querySelector('.b2b-multiselect-dropdown');
|
|
69
|
+
el.focus();
|
|
70
|
+
};
|
|
71
|
+
this.handleMouseDown = (event) => {
|
|
72
|
+
/** Keep dropdown open if a tag is removed */
|
|
73
|
+
if (this.isElementFocused) {
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.resetFocus();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
this.handleKeyDown = (event) => {
|
|
81
|
+
if (event.key === 'Enter') {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
this.resetFocus();
|
|
84
|
+
}
|
|
85
|
+
if (event.key === 'Escape') {
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
this.setElementOnBlur();
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
this.handleSelectAll = event => {
|
|
91
|
+
const newVal = event.detail.selected;
|
|
92
|
+
const options = this.getOptions();
|
|
93
|
+
const newVals = options.map(el => el.option);
|
|
94
|
+
for (let i = 0, n = options.length; i < n; i++) {
|
|
95
|
+
options[i].selected = newVal;
|
|
96
|
+
}
|
|
97
|
+
if (newVal) {
|
|
98
|
+
// filter out duplicates
|
|
99
|
+
this.selectedValues = Array.from(new Set([...this.selectedValues, ...newVals]));
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.selectedValues = this.selectedValues.filter(option => !newVals.includes(option));
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
this.updateSelectAll = (options) => {
|
|
106
|
+
let someSelected = options.some(option => option.selected === true);
|
|
107
|
+
let everySelected = options.every(option => option.selected === true);
|
|
108
|
+
const checkbox = this.hostElement.shadowRoot.querySelector('b2b-multiselect-option');
|
|
109
|
+
checkbox.selected = everySelected;
|
|
110
|
+
checkbox.indeterminate = someSelected && !everySelected;
|
|
111
|
+
};
|
|
112
|
+
this.label = undefined;
|
|
113
|
+
this.placeholder = undefined;
|
|
114
|
+
this.optionsList = [];
|
|
115
|
+
this.searchPlaceholder = undefined;
|
|
116
|
+
this.selectAllLabel = undefined;
|
|
117
|
+
this.maxOptionsVisible = 8;
|
|
118
|
+
this.selectedValues = [];
|
|
119
|
+
this.currentList = this.optionsList;
|
|
120
|
+
this.value = '';
|
|
121
|
+
this.isElementFocused = false;
|
|
122
|
+
this.hasOptionList = this.optionsList.length > 0;
|
|
123
|
+
}
|
|
124
|
+
/** Needed to trigger a re-render for async data */
|
|
125
|
+
watchPropHandler(newList) {
|
|
126
|
+
this.hasOptionList = newList.length > 0;
|
|
127
|
+
if (this.hasOptionList) {
|
|
128
|
+
this.currentList = newList;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
handleSelectedValuesChange() {
|
|
132
|
+
this.b2bChange.emit(this.selectedValues);
|
|
133
|
+
}
|
|
134
|
+
componentDidUpdate() {
|
|
135
|
+
const options = this.getOptions();
|
|
136
|
+
this.updateAllOptions(options);
|
|
137
|
+
this.updateSelectAll(options);
|
|
138
|
+
}
|
|
139
|
+
render() {
|
|
140
|
+
return (h(Host, { onFocus: this.setElementOnFocus, onBlur: this.setElementOnBlur, onClick: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("b2b-input-label", null, this.label), h("div", { class: {
|
|
141
|
+
'b2b-multiselect-dropdown': true,
|
|
142
|
+
'b2b-multiselect-dropdown--open': this.isElementFocused,
|
|
143
|
+
}, tabindex: 0, role: "combobox", "aria-expanded": this.isElementFocused }, this.selectedValues.length === 0 ? (h("span", { class: "b2b-multiselect-dropdown__placeholder" }, this.placeholder)) : (h("div", { class: "b2b-multiselect-dropdown__chip-container" }, this.renderChips())), h("b2b-icon", { icon: "b2b_icon-arrow-down" })), h("div", { class: {
|
|
144
|
+
'b2b-multiselect-dropdown__options-container': true,
|
|
145
|
+
'b2b-multiselect-dropdown__options-container--visible': this.isElementFocused,
|
|
146
|
+
} }, h("div", { class: "b2b-multiselect-dropdown__options", role: "listbox", "aria-label": this.label, tabIndex: -1 }, h("div", { class: "b2b-multiselect-dropdown__option__search" }, h("input", { type: "text", onInput: this.handleInput, class: "b2b-multiselect-dropdown__option__search__input", placeholder: this.searchPlaceholder })), h("b2b-multiselect-option", { class: "b2b-multiselect-dropdown__option__select-all", option: this.selectAllLabel, id: "select-all", "onB2b-option-selected": this.handleSelectAll }), this.hasOptionList &&
|
|
147
|
+
this.currentList.map(option => (h("b2b-multiselect-option", { "onB2b-option-selected": this.handleSelectedChange, option: option })))))));
|
|
148
|
+
}
|
|
149
|
+
static get is() { return "b2b-multiselect-dropdown"; }
|
|
150
|
+
static get encapsulation() { return "shadow"; }
|
|
151
|
+
static get originalStyleUrls() {
|
|
152
|
+
return {
|
|
153
|
+
"$": ["multiselect-dropdown.scss"]
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
static get styleUrls() {
|
|
157
|
+
return {
|
|
158
|
+
"$": ["multiselect-dropdown.css"]
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
static get properties() {
|
|
162
|
+
return {
|
|
163
|
+
"label": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"mutable": false,
|
|
166
|
+
"complexType": {
|
|
167
|
+
"original": "string",
|
|
168
|
+
"resolved": "string",
|
|
169
|
+
"references": {}
|
|
170
|
+
},
|
|
171
|
+
"required": true,
|
|
172
|
+
"optional": false,
|
|
173
|
+
"docs": {
|
|
174
|
+
"tags": [],
|
|
175
|
+
"text": "The input label."
|
|
176
|
+
},
|
|
177
|
+
"attribute": "label",
|
|
178
|
+
"reflect": false
|
|
179
|
+
},
|
|
180
|
+
"placeholder": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"mutable": false,
|
|
183
|
+
"complexType": {
|
|
184
|
+
"original": "string",
|
|
185
|
+
"resolved": "string",
|
|
186
|
+
"references": {}
|
|
187
|
+
},
|
|
188
|
+
"required": false,
|
|
189
|
+
"optional": false,
|
|
190
|
+
"docs": {
|
|
191
|
+
"tags": [],
|
|
192
|
+
"text": "The placeholder shown in the input field."
|
|
193
|
+
},
|
|
194
|
+
"attribute": "placeholder",
|
|
195
|
+
"reflect": true
|
|
196
|
+
},
|
|
197
|
+
"optionsList": {
|
|
198
|
+
"type": "unknown",
|
|
199
|
+
"mutable": false,
|
|
200
|
+
"complexType": {
|
|
201
|
+
"original": "string[]",
|
|
202
|
+
"resolved": "string[]",
|
|
203
|
+
"references": {}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [],
|
|
209
|
+
"text": "The list of options passed into the search dropdown. Can be static or dynamic, i.e. updated when the b2b-search or b2b-input emitters fire."
|
|
210
|
+
},
|
|
211
|
+
"defaultValue": "[]"
|
|
212
|
+
},
|
|
213
|
+
"searchPlaceholder": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"mutable": false,
|
|
216
|
+
"complexType": {
|
|
217
|
+
"original": "string",
|
|
218
|
+
"resolved": "string",
|
|
219
|
+
"references": {}
|
|
220
|
+
},
|
|
221
|
+
"required": false,
|
|
222
|
+
"optional": false,
|
|
223
|
+
"docs": {
|
|
224
|
+
"tags": [],
|
|
225
|
+
"text": "The placeholder shown in the search bar."
|
|
226
|
+
},
|
|
227
|
+
"attribute": "search-placeholder",
|
|
228
|
+
"reflect": false
|
|
229
|
+
},
|
|
230
|
+
"selectAllLabel": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "string",
|
|
235
|
+
"resolved": "string",
|
|
236
|
+
"references": {}
|
|
237
|
+
},
|
|
238
|
+
"required": false,
|
|
239
|
+
"optional": false,
|
|
240
|
+
"docs": {
|
|
241
|
+
"tags": [],
|
|
242
|
+
"text": "The string displayed as the select all label."
|
|
243
|
+
},
|
|
244
|
+
"attribute": "select-all-label",
|
|
245
|
+
"reflect": false
|
|
246
|
+
},
|
|
247
|
+
"maxOptionsVisible": {
|
|
248
|
+
"type": "number",
|
|
249
|
+
"mutable": false,
|
|
250
|
+
"complexType": {
|
|
251
|
+
"original": "number",
|
|
252
|
+
"resolved": "number",
|
|
253
|
+
"references": {}
|
|
254
|
+
},
|
|
255
|
+
"required": false,
|
|
256
|
+
"optional": false,
|
|
257
|
+
"docs": {
|
|
258
|
+
"tags": [],
|
|
259
|
+
"text": "The maximum amount of chips visible. Adjust this depending on available size of the dropdown."
|
|
260
|
+
},
|
|
261
|
+
"attribute": "max-options-visible",
|
|
262
|
+
"reflect": false,
|
|
263
|
+
"defaultValue": "8"
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
static get states() {
|
|
268
|
+
return {
|
|
269
|
+
"selectedValues": {},
|
|
270
|
+
"currentList": {},
|
|
271
|
+
"value": {},
|
|
272
|
+
"isElementFocused": {},
|
|
273
|
+
"hasOptionList": {}
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
static get events() {
|
|
277
|
+
return [{
|
|
278
|
+
"method": "b2bChange",
|
|
279
|
+
"name": "b2b-selected",
|
|
280
|
+
"bubbles": true,
|
|
281
|
+
"cancelable": true,
|
|
282
|
+
"composed": true,
|
|
283
|
+
"docs": {
|
|
284
|
+
"tags": [],
|
|
285
|
+
"text": "Emits when there is a change to the currently selected values."
|
|
286
|
+
},
|
|
287
|
+
"complexType": {
|
|
288
|
+
"original": "string[]",
|
|
289
|
+
"resolved": "string[]",
|
|
290
|
+
"references": {}
|
|
291
|
+
}
|
|
292
|
+
}];
|
|
293
|
+
}
|
|
294
|
+
static get elementRef() { return "hostElement"; }
|
|
295
|
+
static get watchers() {
|
|
296
|
+
return [{
|
|
297
|
+
"propName": "optionsList",
|
|
298
|
+
"methodName": "watchPropHandler"
|
|
299
|
+
}, {
|
|
300
|
+
"propName": "selectedValues",
|
|
301
|
+
"methodName": "handleSelectedValuesChange"
|
|
302
|
+
}];
|
|
303
|
+
}
|
|
304
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { getArgTypes } from "../../docs/config/utils";
|
|
14
|
+
import { html } from "lit-html";
|
|
15
|
+
import fruits from "./stories.data.json";
|
|
16
|
+
const multiselectArgs = getArgTypes('b2b-multiselect-dropdown');
|
|
17
|
+
const meta = {
|
|
18
|
+
title: 'Components/Form/Multiselect Dropdown',
|
|
19
|
+
component: 'b2b-multiselect-dropdown',
|
|
20
|
+
args: {
|
|
21
|
+
optionsList: [...fruits],
|
|
22
|
+
label: 'Fruits',
|
|
23
|
+
placeholder: 'Please select...',
|
|
24
|
+
searchPlaceholder: 'Search fruits',
|
|
25
|
+
selectAllLabel: 'Select All',
|
|
26
|
+
maxOptionsVisible: 8,
|
|
27
|
+
},
|
|
28
|
+
argTypes: Object.assign(Object.assign({}, multiselectArgs), { optionsList: { table: { disable: true } } }),
|
|
29
|
+
render: (_a) => {
|
|
30
|
+
var args = __rest(_a, []);
|
|
31
|
+
return html `<div style="width: 400px">
|
|
32
|
+
<b2b-multiselect-dropdown
|
|
33
|
+
label=${args.label}
|
|
34
|
+
max-options-visible=${args.maxOptionsVisible}
|
|
35
|
+
select-all-label=${args.selectAllLabel}
|
|
36
|
+
placeholder=${args.placeholder}
|
|
37
|
+
search-placeholder=${args.searchPlaceholder}
|
|
38
|
+
.optionsList=${args.optionsList}>
|
|
39
|
+
</b2b-multiselect-dropdown>
|
|
40
|
+
</div>`;
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export default meta;
|
|
44
|
+
export const Default = {
|
|
45
|
+
args: Object.assign({}, meta.args),
|
|
46
|
+
};
|
package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.css
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
.b2b-multiselect-dropdown__option {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
gap: var(--b2b-size-15);
|
|
5
|
+
padding: var(--b2b-size-20) var(--b2b-size-20) var(--b2b-size-25);
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
.b2b-multiselect-dropdown__option:hover {
|
|
9
|
+
background-color: var(--b2b-color-table-selected-hover);
|
|
10
|
+
}
|
package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class B2bMultiSelectOption {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.handleCheckboxChange = event => {
|
|
5
|
+
this.selected = event.detail.checked;
|
|
6
|
+
this.b2bOptionSelected.emit({
|
|
7
|
+
selected: this.selected,
|
|
8
|
+
selectedOption: this.option,
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
this.option = undefined;
|
|
12
|
+
this.selected = false;
|
|
13
|
+
this.indeterminate = false;
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, { role: "option", class: {
|
|
17
|
+
'b2b-multiselect-dropdown__option': true,
|
|
18
|
+
} }, h("b2b-checkbox", { checked: this.selected, "onB2b-change": this.handleCheckboxChange, label: this.option, indeterminate: this.indeterminate, value: this.option })));
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "b2b-multiselect-option"; }
|
|
21
|
+
static get originalStyleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["multiselect-option.scss"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get styleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["multiselect-option.css"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get properties() {
|
|
32
|
+
return {
|
|
33
|
+
"option": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "string",
|
|
38
|
+
"resolved": "string",
|
|
39
|
+
"references": {}
|
|
40
|
+
},
|
|
41
|
+
"required": true,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": "The label of the option."
|
|
46
|
+
},
|
|
47
|
+
"attribute": "option",
|
|
48
|
+
"reflect": false
|
|
49
|
+
},
|
|
50
|
+
"selected": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"mutable": true,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "boolean",
|
|
55
|
+
"resolved": "boolean",
|
|
56
|
+
"references": {}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": "Whether the option is currently selected."
|
|
63
|
+
},
|
|
64
|
+
"attribute": "selected",
|
|
65
|
+
"reflect": false,
|
|
66
|
+
"defaultValue": "false"
|
|
67
|
+
},
|
|
68
|
+
"indeterminate": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"mutable": false,
|
|
71
|
+
"complexType": {
|
|
72
|
+
"original": "boolean",
|
|
73
|
+
"resolved": "boolean",
|
|
74
|
+
"references": {}
|
|
75
|
+
},
|
|
76
|
+
"required": false,
|
|
77
|
+
"optional": true,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [{
|
|
80
|
+
"name": "internal",
|
|
81
|
+
"text": "Whether the checkbox is in indeterminate state."
|
|
82
|
+
}],
|
|
83
|
+
"text": ""
|
|
84
|
+
},
|
|
85
|
+
"attribute": "indeterminate",
|
|
86
|
+
"reflect": false,
|
|
87
|
+
"defaultValue": "false"
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
static get events() {
|
|
92
|
+
return [{
|
|
93
|
+
"method": "b2bOptionSelected",
|
|
94
|
+
"name": "b2b-option-selected",
|
|
95
|
+
"bubbles": true,
|
|
96
|
+
"cancelable": true,
|
|
97
|
+
"composed": true,
|
|
98
|
+
"docs": {
|
|
99
|
+
"tags": [],
|
|
100
|
+
"text": "Emits the option as a string whenever an option is selected."
|
|
101
|
+
},
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "MultiSelectOptionEventDetail",
|
|
104
|
+
"resolved": "MultiSelectOptionEventDetail",
|
|
105
|
+
"references": {
|
|
106
|
+
"MultiSelectOptionEventDetail": {
|
|
107
|
+
"location": "import",
|
|
108
|
+
"path": "../../../utils/interfaces/form.interface",
|
|
109
|
+
"id": "src/utils/interfaces/form.interface.d.ts::MultiSelectOptionEventDetail"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -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;
|
|
@@ -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;
|