@otto-de/b2b-core-components 1.33.0 → 1.34.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.esm.js +1 -1
- package/dist/b2b-core-components/{p-28a06853.entry.js → p-04ac661d.entry.js} +1 -1
- package/dist/b2b-core-components/{p-57842105.entry.js → p-04f5748b.entry.js} +1 -1
- package/dist/b2b-core-components/{p-2d625559.entry.js → p-0648230f.entry.js} +1 -1
- package/dist/b2b-core-components/{p-0bd177d4.entry.js → p-0aa0c59a.entry.js} +1 -1
- package/dist/b2b-core-components/{p-7df12ddf.entry.js → p-0ab41eb5.entry.js} +1 -1
- package/dist/b2b-core-components/{p-e7590b6e.entry.js → p-13d37dec.entry.js} +1 -1
- package/dist/b2b-core-components/{p-bf9c8817.entry.js → p-17778cfc.entry.js} +1 -1
- package/dist/b2b-core-components/p-1af4d133.entry.js +1 -0
- package/dist/b2b-core-components/{p-fc431bbe.entry.js → p-2486830b.entry.js} +1 -1
- package/dist/b2b-core-components/p-2488ef54.entry.js +1 -0
- package/dist/b2b-core-components/{p-6abfdb73.entry.js → p-260dcc05.entry.js} +1 -1
- package/dist/b2b-core-components/{p-797c85c2.entry.js → p-371df3f8.entry.js} +1 -1
- package/dist/b2b-core-components/p-3c3edafd.entry.js +1 -0
- package/dist/b2b-core-components/p-3d8e14e6.entry.js +1 -0
- package/dist/b2b-core-components/{p-521303c4.entry.js → p-433a3f3e.entry.js} +1 -1
- package/dist/b2b-core-components/{p-fb0338a8.entry.js → p-4b27240b.entry.js} +1 -1
- package/dist/b2b-core-components/p-4e0ed246.entry.js +1 -0
- package/dist/b2b-core-components/p-5f3ba5e6.js +1 -0
- package/dist/b2b-core-components/{p-6749d668.entry.js → p-66c435c1.entry.js} +1 -1
- package/dist/b2b-core-components/{p-db92de92.entry.js → p-79a01d0d.entry.js} +1 -1
- package/dist/b2b-core-components/{p-092855b3.entry.js → p-81cffff6.entry.js} +1 -1
- package/dist/b2b-core-components/p-89e817e9.entry.js +1 -0
- package/dist/b2b-core-components/{p-26755654.entry.js → p-8aba659a.entry.js} +1 -1
- package/dist/b2b-core-components/{p-0322b052.entry.js → p-8ae9c2fe.entry.js} +1 -1
- package/dist/b2b-core-components/{p-16872771.entry.js → p-997a232e.entry.js} +1 -1
- package/dist/b2b-core-components/{p-2daee203.entry.js → p-a46674a7.entry.js} +1 -1
- package/dist/b2b-core-components/{p-848e4af7.entry.js → p-a9c9552f.entry.js} +1 -1
- package/dist/b2b-core-components/{p-1abe3f2f.entry.js → p-b175fb79.entry.js} +1 -1
- package/dist/b2b-core-components/{p-bade1cab.entry.js → p-b4310b58.entry.js} +1 -1
- package/dist/b2b-core-components/p-b481eb09.entry.js +1 -0
- package/dist/b2b-core-components/{p-40371f89.entry.js → p-b9a6ad5d.entry.js} +1 -1
- package/dist/b2b-core-components/{p-01f46118.entry.js → p-c086532b.entry.js} +1 -1
- package/dist/b2b-core-components/{p-58e9953b.entry.js → p-c25832e1.entry.js} +1 -1
- package/dist/b2b-core-components/{p-ff6a0874.entry.js → p-c43e067a.entry.js} +1 -1
- package/dist/b2b-core-components/{p-76573f9f.entry.js → p-c8b5c7e2.entry.js} +1 -1
- package/dist/b2b-core-components/{p-190a7350.entry.js → p-c8cc1797.entry.js} +1 -1
- package/dist/b2b-core-components/{p-ed5c6006.entry.js → p-d163d252.entry.js} +1 -1
- package/dist/b2b-core-components/{p-dcef84a5.entry.js → p-d2f4db88.entry.js} +1 -1
- package/dist/b2b-core-components/{p-fedefca2.entry.js → p-d62e615b.entry.js} +1 -1
- package/dist/b2b-core-components/p-d97a7119.entry.js +1 -0
- package/dist/b2b-core-components/p-dff37884.entry.js +1 -0
- package/dist/b2b-core-components/{p-b1191aa7.entry.js → p-e3877fc1.entry.js} +1 -1
- package/dist/b2b-core-components/{p-e2518c43.entry.js → p-e512628d.entry.js} +1 -1
- package/dist/b2b-core-components/p-e8151556.entry.js +1 -0
- package/dist/b2b-core-components/p-e90d3aba.entry.js +1 -0
- package/dist/b2b-core-components/{p-3a088f2b.entry.js → p-f3c0fe56.entry.js} +1 -1
- package/dist/b2b-core-components/{p-840dd6cd.entry.js → p-f4f20944.entry.js} +1 -1
- package/dist/b2b-core-components/{p-ef598009.entry.js → p-f9f9820a.entry.js} +1 -1
- package/dist/cjs/b2b-button_2.cjs.entry.js +1 -1
- package/dist/cjs/b2b-chip-component_2.cjs.entry.js +2 -2
- package/dist/cjs/b2b-core-components.cjs.js +1 -1
- package/dist/cjs/{b2b-date-picker-days_5.cjs.entry.js → b2b-date-picker-days-header_4.cjs.entry.js} +0 -174
- package/dist/cjs/b2b-date-picker-days.cjs.entry.js +180 -0
- package/dist/cjs/b2b-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/b2b-date-range-picker-days_2.cjs.entry.js +201 -0
- package/dist/cjs/b2b-date-range-picker.cjs.entry.js +159 -0
- package/dist/cjs/b2b-dropdown.cjs.entry.js +28 -24
- package/dist/cjs/b2b-flyout-menu-option.cjs.entry.js +1 -1
- package/dist/cjs/b2b-flyout-menu.cjs.entry.js +3 -3
- package/dist/cjs/b2b-grid-col.cjs.entry.js +1 -1
- package/dist/cjs/b2b-grid-row.cjs.entry.js +2 -2
- package/dist/cjs/b2b-grid.cjs.entry.js +1 -1
- package/dist/cjs/b2b-icon-100.cjs.entry.js +0 -1
- package/dist/cjs/b2b-input-group_2.cjs.entry.js +3 -3
- package/dist/cjs/b2b-input-label.cjs.entry.js +2 -2
- package/dist/cjs/b2b-input_2.cjs.entry.js +5 -5
- 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 +3 -3
- package/dist/cjs/b2b-pagination.cjs.entry.js +1 -1
- package/dist/cjs/b2b-progress-bar.cjs.entry.js +3 -3
- 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 +1 -1
- package/dist/cjs/b2b-rounded-icon.cjs.entry.js +4 -4
- package/dist/cjs/b2b-scrollable-container.cjs.entry.js +1 -1
- package/dist/cjs/b2b-search.cjs.entry.js +1 -1
- package/dist/cjs/b2b-separator.cjs.entry.js +1 -1
- package/dist/cjs/b2b-shimmer.cjs.entry.js +1 -1
- package/dist/cjs/b2b-snackbar.cjs.entry.js +4 -4
- package/dist/cjs/b2b-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/b2b-tab.cjs.entry.js +2 -2
- package/dist/cjs/b2b-table-cell_2.cjs.entry.js +3 -3
- package/dist/cjs/b2b-table-row.cjs.entry.js +2 -2
- package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +2 -2
- package/dist/cjs/b2b-table.cjs.entry.js +2 -2
- package/dist/cjs/b2b-textarea.cjs.entry.js +2 -2
- package/dist/cjs/b2b-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/b2b-toggle-chip.cjs.entry.js +3 -3
- package/dist/cjs/b2b-toggle-group.cjs.entry.js +2 -2
- package/dist/cjs/b2b-toggle-switch.cjs.entry.js +5 -5
- package/dist/cjs/b2b-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/b2b-wizard-icon.cjs.entry.js +1 -1
- package/dist/cjs/b2b-wizard-step.cjs.entry.js +2 -2
- package/dist/cjs/b2b-wizard.cjs.entry.js +1 -1
- package/dist/cjs/date-range-picker-utils-f4b4f5bf.js +135 -0
- package/dist/cjs/index-668808fd.js +14 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/date-picker/date-picker.css +1 -1
- package/dist/collection/components/date-picker/date-picker.js +2 -2
- package/dist/collection/components/date-range-picker/date-range-picker-days.css +280 -0
- package/dist/collection/components/date-range-picker/date-range-picker-days.e2e.js +19 -0
- package/dist/collection/components/date-range-picker/date-range-picker-days.js +349 -0
- package/dist/collection/components/date-range-picker/date-range-picker-utils.js +126 -0
- package/dist/collection/components/date-range-picker/date-range-picker-utils.spec.js +189 -0
- package/dist/collection/components/date-range-picker/date-range-picker.css +327 -0
- package/dist/collection/components/date-range-picker/date-range-picker.e2e.js +45 -0
- package/dist/collection/components/date-range-picker/date-range-picker.js +466 -0
- package/dist/collection/components/date-range-picker/date-range-picker.spec.js +18 -0
- package/dist/collection/components/date-range-picker/date-range-picker.stories.js +131 -0
- package/dist/collection/components/dropdown/dropdown.js +30 -25
- package/dist/collection/components/flyout-menu/flyout-menu-option.js +1 -1
- package/dist/collection/components/flyout-menu/flyout-menu.js +3 -3
- package/dist/collection/components/grid/column.js +1 -1
- package/dist/collection/components/grid/grid.js +1 -1
- package/dist/collection/components/grid/row.js +2 -2
- package/dist/collection/components/icon-100/icon-100.stories.js +1 -1
- package/dist/collection/components/icon-100/types.js +0 -1
- package/dist/collection/components/input/input.js +4 -4
- package/dist/collection/components/input-group/input-group.js +1 -1
- package/dist/collection/components/input-label/input-label.js +2 -2
- package/dist/collection/components/input-list/input-list-option.js +1 -1
- package/dist/collection/components/input-list/input-list.js +2 -2
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/modal/modal.js +2 -2
- package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +3 -3
- package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js +2 -2
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/paragraph/paragraph.js +2 -2
- package/dist/collection/components/progress-bar/progress-bar.js +3 -3
- package/dist/collection/components/radio/radio.js +2 -2
- package/dist/collection/components/radio-group/radio-group.js +2 -2
- package/dist/collection/components/required-separator/required-separator.js +1 -1
- package/dist/collection/components/rounded-icon/rounded-icon.js +4 -4
- package/dist/collection/components/scrollable-container/scrollable-container.js +1 -1
- package/dist/collection/components/search/search.js +1 -1
- package/dist/collection/components/separator/separator.js +1 -1
- package/dist/collection/components/shimmer/shimmer.js +1 -1
- package/dist/collection/components/snackbar/snackbar.js +5 -5
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-group/tab-group.js +1 -1
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/table/table-cell/table-cell.js +2 -2
- package/dist/collection/components/table/table-header/table-header.js +1 -1
- package/dist/collection/components/table/table-row/table-row.js +2 -2
- package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +2 -2
- package/dist/collection/components/table/table.js +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/toggle-button/toggle-button.js +3 -3
- package/dist/collection/components/toggle-chip/toggle-chip.js +3 -3
- package/dist/collection/components/toggle-group/toggle-group.js +2 -2
- package/dist/collection/components/toggle-switch/toggle-switch.css +1 -1
- package/dist/collection/components/toggle-switch/toggle-switch.js +4 -4
- package/dist/collection/components/toggle-switch/toggle-switch.stories.js +15 -9
- package/dist/collection/components/tooltip/tooltip.js +3 -3
- package/dist/collection/components/wizard/wizard-step.js +2 -2
- package/dist/collection/components/wizard/wizard.js +1 -1
- package/dist/collection/components/wizard-icon/wizard-icon.js +1 -1
- package/dist/collection/docs/config/utils.js +10 -7
- package/dist/components/b2b-date-picker.js +1 -1
- package/dist/components/b2b-date-range-picker-days.d.ts +11 -0
- package/dist/components/b2b-date-range-picker-days.js +6 -0
- package/dist/components/b2b-date-range-picker.d.ts +11 -0
- package/dist/components/b2b-date-range-picker.js +246 -0
- package/dist/components/b2b-dropdown.js +29 -24
- package/dist/components/b2b-flyout-menu-option.js +1 -1
- package/dist/components/b2b-flyout-menu.js +3 -3
- package/dist/components/b2b-grid-col.js +1 -1
- package/dist/components/b2b-grid-row.js +2 -2
- package/dist/components/b2b-grid.js +1 -1
- package/dist/components/b2b-label.js +2 -2
- package/dist/components/b2b-modal.js +2 -2
- package/dist/components/b2b-multiselect-dropdown.js +3 -3
- package/dist/components/b2b-pagination.js +1 -1
- package/dist/components/b2b-paragraph.js +1 -51
- package/dist/components/b2b-progress-bar.js +3 -3
- package/dist/components/b2b-radio-button.js +2 -2
- package/dist/components/b2b-radio-group.js +2 -2
- package/dist/components/b2b-required-separator.js +1 -1
- package/dist/components/b2b-scrollable-container.js +1 -1
- package/dist/components/b2b-search.js +1 -1
- package/dist/components/b2b-shimmer.js +1 -1
- package/dist/components/b2b-snackbar.js +4 -4
- package/dist/components/b2b-tab-group.js +1 -1
- package/dist/components/b2b-tab-panel.js +1 -1
- package/dist/components/b2b-tab.js +2 -2
- package/dist/components/b2b-table-row.js +2 -2
- package/dist/components/b2b-table-rowgroup.js +2 -2
- package/dist/components/b2b-table.js +2 -2
- package/dist/components/b2b-textarea.js +2 -2
- package/dist/components/b2b-toggle-button.js +3 -3
- package/dist/components/b2b-toggle-chip.js +3 -3
- package/dist/components/b2b-toggle-group.js +2 -2
- package/dist/components/b2b-toggle-switch.js +5 -5
- package/dist/components/b2b-tooltip.js +3 -3
- package/dist/components/b2b-wizard-step.js +2 -2
- package/dist/components/b2b-wizard.js +1 -1
- package/dist/components/date-range-picker-days.js +316 -0
- package/dist/components/icon-100.js +0 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input-label.js +2 -2
- package/dist/components/input-list-option.js +1 -1
- package/dist/components/input-list.js +2 -2
- package/dist/components/input.js +4 -4
- package/dist/components/multiselect-option.js +2 -2
- package/dist/{cjs/b2b-paragraph.cjs.entry.js → components/paragraph.js} +31 -13
- package/dist/components/rounded-icon.js +4 -4
- package/dist/components/separator.js +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/table-cell.js +2 -2
- package/dist/components/table-header.js +1 -1
- package/dist/components/wizard-icon.js +1 -1
- package/dist/custom-elements.json +70 -0
- package/dist/esm/b2b-button_2.entry.js +1 -1
- package/dist/esm/b2b-chip-component_2.entry.js +2 -2
- package/dist/esm/b2b-core-components.js +1 -1
- package/dist/esm/{b2b-date-picker-days_5.entry.js → b2b-date-picker-days-header_4.entry.js} +2 -175
- package/dist/esm/b2b-date-picker-days.entry.js +176 -0
- package/dist/esm/b2b-date-picker.entry.js +1 -1
- package/dist/esm/b2b-date-range-picker-days_2.entry.js +196 -0
- package/dist/esm/b2b-date-range-picker.entry.js +155 -0
- package/dist/esm/b2b-dropdown.entry.js +28 -24
- package/dist/esm/b2b-flyout-menu-option.entry.js +1 -1
- package/dist/esm/b2b-flyout-menu.entry.js +3 -3
- package/dist/esm/b2b-grid-col.entry.js +1 -1
- package/dist/esm/b2b-grid-row.entry.js +2 -2
- package/dist/esm/b2b-grid.entry.js +1 -1
- package/dist/esm/b2b-icon-100.entry.js +0 -1
- package/dist/esm/b2b-input-group_2.entry.js +3 -3
- package/dist/esm/b2b-input-label.entry.js +2 -2
- package/dist/esm/b2b-input_2.entry.js +5 -5
- 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 +3 -3
- package/dist/esm/b2b-pagination.entry.js +1 -1
- package/dist/esm/b2b-progress-bar.entry.js +3 -3
- 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 +1 -1
- package/dist/esm/b2b-rounded-icon.entry.js +4 -4
- package/dist/esm/b2b-scrollable-container.entry.js +1 -1
- package/dist/esm/b2b-search.entry.js +1 -1
- package/dist/esm/b2b-separator.entry.js +1 -1
- package/dist/esm/b2b-shimmer.entry.js +1 -1
- package/dist/esm/b2b-snackbar.entry.js +4 -4
- package/dist/esm/b2b-tab-group.entry.js +1 -1
- package/dist/esm/b2b-tab-panel.entry.js +1 -1
- package/dist/esm/b2b-tab.entry.js +2 -2
- package/dist/esm/b2b-table-cell_2.entry.js +3 -3
- package/dist/esm/b2b-table-row.entry.js +2 -2
- package/dist/esm/b2b-table-rowgroup.entry.js +2 -2
- package/dist/esm/b2b-table.entry.js +2 -2
- package/dist/esm/b2b-textarea.entry.js +2 -2
- package/dist/esm/b2b-toggle-button.entry.js +3 -3
- package/dist/esm/b2b-toggle-chip.entry.js +3 -3
- package/dist/esm/b2b-toggle-group.entry.js +2 -2
- package/dist/esm/b2b-toggle-switch.entry.js +5 -5
- package/dist/esm/b2b-tooltip.entry.js +3 -3
- package/dist/esm/b2b-wizard-icon.entry.js +1 -1
- package/dist/esm/b2b-wizard-step.entry.js +2 -2
- package/dist/esm/b2b-wizard.entry.js +1 -1
- package/dist/esm/date-range-picker-utils-92a5fb50.js +128 -0
- package/dist/esm/index-ab9eb36d.js +14 -6
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/date-range-picker/date-range-picker-days.d.ts +57 -0
- package/dist/types/components/date-range-picker/date-range-picker-utils.d.ts +58 -0
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +89 -0
- package/dist/types/components/date-range-picker/date-range-picker.stories.d.ts +23 -0
- package/dist/types/components/dropdown/dropdown.d.ts +2 -2
- package/dist/types/components/icon-100/types.d.ts +1 -1
- package/dist/types/components/snackbar/snackbar.d.ts +2 -2
- package/dist/types/components/toggle-switch/toggle-switch.stories.d.ts +16 -4
- package/dist/types/components.d.ts +214 -2
- package/dist/types/docs/config/utils.d.ts +14 -0
- package/dist/types/utils/interfaces/form.interface.d.ts +6 -2
- package/dist/web-types.json +206 -3
- package/package.json +2 -2
- package/dist/b2b-core-components/icons-100/b2b_icon-cosmetics.png +0 -0
- package/dist/b2b-core-components/p-15df2a47.entry.js +0 -1
- package/dist/b2b-core-components/p-1d6f73dd.entry.js +0 -1
- package/dist/b2b-core-components/p-3369f3c0.entry.js +0 -1
- package/dist/b2b-core-components/p-67484ecc.entry.js +0 -1
- package/dist/b2b-core-components/p-6d64a994.entry.js +0 -1
- package/dist/b2b-core-components/p-76bf79ec.entry.js +0 -1
- package/dist/b2b-core-components/p-82a2809e.entry.js +0 -1
- package/dist/b2b-core-components/p-917a7f00.entry.js +0 -1
- package/dist/b2b-core-components/p-d88113f5.entry.js +0 -1
- package/dist/collection/components/icon-100/icons-100/b2b_icon-cosmetics.png +0 -0
- package/dist/esm/b2b-paragraph.entry.js +0 -31
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
export class DropdownComponent {
|
|
3
3
|
constructor() {
|
|
4
|
-
this.truncatedText = '';
|
|
5
4
|
this.onClickOutside = (ev) => {
|
|
6
5
|
if (!this.hostElement.contains(ev.target))
|
|
7
6
|
this.isOpen = false;
|
|
@@ -23,7 +22,7 @@ export class DropdownComponent {
|
|
|
23
22
|
const target = event.target;
|
|
24
23
|
const value = target.getAttribute('data-value');
|
|
25
24
|
const label = (_a = target.textContent) === null || _a === void 0 ? void 0 : _a.trim();
|
|
26
|
-
if (value) {
|
|
25
|
+
if (value != null) {
|
|
27
26
|
this.selectedValue = value;
|
|
28
27
|
this.selectedText = label || '';
|
|
29
28
|
this.b2bChange.emit(value);
|
|
@@ -33,16 +32,22 @@ export class DropdownComponent {
|
|
|
33
32
|
}
|
|
34
33
|
};
|
|
35
34
|
this.updateTruncatedText = () => {
|
|
36
|
-
if (!this.selectEl)
|
|
37
|
-
return;
|
|
38
35
|
const rawText = this.selectedText || this.placeholder;
|
|
36
|
+
if (this.selectEl == null) {
|
|
37
|
+
this.truncatedText = rawText;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
39
40
|
const style = window.getComputedStyle(this.selectEl);
|
|
40
41
|
const canvas = document.createElement('canvas');
|
|
41
42
|
const ctx = canvas.getContext('2d');
|
|
42
|
-
if (
|
|
43
|
+
if (ctx == null)
|
|
43
44
|
return;
|
|
44
45
|
ctx.font = `${style.fontWeight} ${style.fontSize} ${style.fontFamily}`;
|
|
45
46
|
let baseWidth = this.selectEl.clientWidth;
|
|
47
|
+
if (baseWidth == null) {
|
|
48
|
+
this.truncatedText = rawText;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
46
51
|
const parentContainer = this.selectEl.parentElement;
|
|
47
52
|
if (parentContainer && parentContainer.clientWidth > baseWidth) {
|
|
48
53
|
baseWidth = parentContainer.clientWidth;
|
|
@@ -77,24 +82,18 @@ export class DropdownComponent {
|
|
|
77
82
|
this.selectedValue = '';
|
|
78
83
|
this.selectedText = '';
|
|
79
84
|
this.options = [];
|
|
85
|
+
this.truncatedText = '';
|
|
80
86
|
}
|
|
81
87
|
/** Method to programmatically clear selection of the dropdown. */
|
|
82
88
|
async clearSelection() {
|
|
83
|
-
this.selectedValue = this.placeholderValue
|
|
84
|
-
this.selectedText =
|
|
89
|
+
this.selectedValue = this.placeholderValue;
|
|
90
|
+
this.selectedText = '';
|
|
85
91
|
this.options = this.options.map(opt => (Object.assign(Object.assign({}, opt), { selected: false })));
|
|
86
92
|
this.isOpen = false;
|
|
87
93
|
this.updateTruncatedText();
|
|
88
94
|
}
|
|
89
95
|
componentWillLoad() {
|
|
90
|
-
this.selectedValue = this.placeholderValue || '';
|
|
91
|
-
this.selectedText = '';
|
|
92
|
-
}
|
|
93
|
-
componentDidLoad() {
|
|
94
96
|
this.initializeOptions();
|
|
95
|
-
this.updateTruncatedText();
|
|
96
|
-
document.addEventListener('click', this.onClickOutside);
|
|
97
|
-
window.addEventListener('resize', this.updateTruncatedText);
|
|
98
97
|
if (typeof MutationObserver !== 'undefined') {
|
|
99
98
|
this.mutationObserver = new MutationObserver(() => {
|
|
100
99
|
this.initializeOptions();
|
|
@@ -102,21 +101,28 @@ export class DropdownComponent {
|
|
|
102
101
|
this.mutationObserver.observe(this.hostElement, {
|
|
103
102
|
childList: true,
|
|
104
103
|
subtree: true,
|
|
104
|
+
attributes: true,
|
|
105
|
+
attributeFilter: ['value', 'selected', 'disabled'],
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
}
|
|
109
|
+
componentDidLoad() {
|
|
110
|
+
this.updateTruncatedText(); // `componentWillLoad()` is unable to truncate it to the proper size
|
|
111
|
+
document.addEventListener('click', this.onClickOutside);
|
|
112
|
+
window.addEventListener('resize', this.updateTruncatedText);
|
|
113
|
+
}
|
|
108
114
|
disconnectedCallback() {
|
|
115
|
+
var _a;
|
|
109
116
|
document.removeEventListener('click', this.onClickOutside);
|
|
110
117
|
window.removeEventListener('resize', this.updateTruncatedText);
|
|
111
|
-
|
|
112
|
-
this.mutationObserver.disconnect();
|
|
113
|
-
}
|
|
118
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
114
119
|
}
|
|
115
120
|
watchDropdownState() {
|
|
116
121
|
if (this.isOpen)
|
|
117
122
|
this.closeOtherDropdowns();
|
|
118
123
|
}
|
|
119
124
|
initializeOptions() {
|
|
125
|
+
var _a, _b;
|
|
120
126
|
const nativeOptions = Array.from(this.hostElement.querySelectorAll('option'));
|
|
121
127
|
this.options = nativeOptions.map(opt => {
|
|
122
128
|
var _a;
|
|
@@ -128,10 +134,8 @@ export class DropdownComponent {
|
|
|
128
134
|
});
|
|
129
135
|
});
|
|
130
136
|
const selected = this.options.find(o => o.selected);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
this.selectedText = selected.label;
|
|
134
|
-
}
|
|
137
|
+
this.selectedValue = (_a = selected === null || selected === void 0 ? void 0 : selected.value) !== null && _a !== void 0 ? _a : this.placeholderValue;
|
|
138
|
+
this.selectedText = (_b = selected === null || selected === void 0 ? void 0 : selected.label) !== null && _b !== void 0 ? _b : '';
|
|
135
139
|
this.updateTruncatedText();
|
|
136
140
|
}
|
|
137
141
|
closeOtherDropdowns() {
|
|
@@ -145,15 +149,15 @@ export class DropdownComponent {
|
|
|
145
149
|
const hasError = this.invalid && !this.disabled && !this.groupDisabled;
|
|
146
150
|
const showHint = this.hint && !hasError;
|
|
147
151
|
const showError = this.error && hasError;
|
|
148
|
-
return (h(Host, { key: '
|
|
152
|
+
return (h(Host, { key: 'e719de6e666225d6b807810570bd32d4906a2647', class: {
|
|
149
153
|
'b2b-dropdown': true,
|
|
150
154
|
'b2b-dropdown--error': hasError,
|
|
151
155
|
'b2b-dropdown--disabled': this.disabled || this.groupDisabled,
|
|
152
|
-
} }, this.label && (h("b2b-input-label", { id: this.name, required: this.required }, this.label)), h("div", { key: '
|
|
156
|
+
} }, this.label && (h("b2b-input-label", { id: this.name, required: this.required }, this.label)), h("div", { key: '690c9a335c7171312fb9de9cf6894af979eaa471', class: "b2b-dropdown__wrapper", onFocus: this.onFocus, onBlur: this.onBlur }, h("div", { key: 'fcbbc73636118d451f0ec5aa5ce1cd2baa0dec9b', class: {
|
|
153
157
|
'b2b-dropdown__select': true,
|
|
154
158
|
'b2b-dropdown__select--open': this.isOpen,
|
|
155
159
|
'b2b-dropdown__select--focused': this.focused,
|
|
156
|
-
}, ref: el => (this.selectEl = el), onClick: this.toggleDropdown, role: "combobox", "aria-expanded": `${this.isOpen}`, "aria-labelledby": this.name }, this.
|
|
160
|
+
}, ref: el => (this.selectEl = el), onClick: this.toggleDropdown, role: "combobox", "aria-expanded": `${this.isOpen}`, "aria-labelledby": this.name }, this.truncatedText), this.isOpen && (h("div", { class: "b2b-dropdown__options", role: "listbox" }, this.options.map(option => (h("div", { key: option.value, class: {
|
|
157
161
|
'b2b-dropdown__option': true,
|
|
158
162
|
'b2b-dropdown__option--selected': option.selected,
|
|
159
163
|
'b2b-dropdown__option--disabled': option.disabled,
|
|
@@ -360,7 +364,8 @@ export class DropdownComponent {
|
|
|
360
364
|
"focused": {},
|
|
361
365
|
"selectedValue": {},
|
|
362
366
|
"selectedText": {},
|
|
363
|
-
"options": {}
|
|
367
|
+
"options": {},
|
|
368
|
+
"truncatedText": {}
|
|
364
369
|
};
|
|
365
370
|
}
|
|
366
371
|
static get events() {
|
|
@@ -16,7 +16,7 @@ export class FlyoutMenuOptionComponent {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'd9f5fada05c44e475d2e645d51c3ba268844a8e3', class: {
|
|
20
20
|
'b2b-flyout-menu__option': true,
|
|
21
21
|
'b2b-flyout-menu__option--disabled': this.disabled,
|
|
22
22
|
'b2b-flyout-menu__option--separator': this.separator,
|
|
@@ -144,12 +144,12 @@ export class FlyoutMenuComponent {
|
|
|
144
144
|
options[index].focus();
|
|
145
145
|
}
|
|
146
146
|
render() {
|
|
147
|
-
return (h(Host, { key: '
|
|
147
|
+
return (h(Host, { key: '5e1d292b710d19a4bf5ece7047d4c5288b24f9b5' }, h("div", { key: 'd7d781fa8dfdd9f4bdecad06209400610a7f37bf', class: {
|
|
148
148
|
'b2b-flyout-menu': true,
|
|
149
|
-
} }, h("div", { key: '
|
|
149
|
+
} }, h("div", { key: '124c0ee9f83a252aabac1f09a11932ffde4b6bf1', class: "b2b-flyout-menu__trigger" }, h("slot", { key: '588027fd799f42d6b095ad82247cc6974424fc23', name: "trigger" })), h("div", { key: 'baa37193ac12427e868c6742a526516f91e37a02', onFocusout: this.blurMenu, class: {
|
|
150
150
|
'b2b-flyout-menu__options__container': true,
|
|
151
151
|
'b2b-flyout-menu__options__container--on': this.opened,
|
|
152
|
-
} }, h("div", { key: '
|
|
152
|
+
} }, h("div", { key: '043ff6439dca6d4fccaa29f4bda5c52645154196', class: "b2b-flyout-menu__arrow" }), h("slot", { key: 'e95bcf37c9d1fc77509fbdf2de47001d88d7630a', name: "option" })))));
|
|
153
153
|
}
|
|
154
154
|
static get is() { return "b2b-flyout-menu"; }
|
|
155
155
|
static get encapsulation() { return "shadow"; }
|
|
@@ -13,7 +13,7 @@ export class B2bGridColumnComponent {
|
|
|
13
13
|
this.textAlign = 'left';
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: 'ca84abbad02173e29f80329a4faab238aa41ec9d', style: Object.assign(Object.assign({}, this.calculateGrowDimension(this.span)), { ['text-align']: `${this.textAlign}` }) }, h("slot", { key: 'e11625544ba0b0fc501ff811e8f5ca1ac89194c9' })));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "b2b-grid-col"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ export class B2bGridComponent {
|
|
|
4
4
|
this.margin = 24;
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '01c61abbb9d20b4479031e0545967f08782650dc', style: { ['padding']: `${this.margin}px` }, class: "b2b-grid" }, h("slot", { key: '64a173edfae1ff772091163fecc55bebdc2462b9' })));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "b2b-grid"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -66,7 +66,7 @@ export class B2bGridRowComponent {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
69
|
+
return (h(Host, { key: '019e65e7db27c37305f49e396389c72fbcf82281', style: {
|
|
70
70
|
['justify-content']: `${this.justify}`,
|
|
71
71
|
['gap']: `${this.columnGap}px`,
|
|
72
72
|
['margin']: `${this.rowGap}px 0`,
|
|
@@ -74,7 +74,7 @@ export class B2bGridRowComponent {
|
|
|
74
74
|
['display']: 'flex',
|
|
75
75
|
['flex-wrap']: 'wrap',
|
|
76
76
|
['box-sizing']: 'border-box',
|
|
77
|
-
} }, h("slot", { key: '
|
|
77
|
+
} }, h("slot", { key: 'e203c9bde0b21f923b356b6e330ab6e4227fd1a5' })));
|
|
78
78
|
}
|
|
79
79
|
static get is() { return "b2b-grid-row"; }
|
|
80
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,7 +56,7 @@ export const Inverse = {
|
|
|
56
56
|
},
|
|
57
57
|
};
|
|
58
58
|
export const SizeGreaterThan24 = {
|
|
59
|
-
args: Object.assign(Object.assign({}, meta.args), { size:
|
|
59
|
+
args: Object.assign(Object.assign({}, meta.args), { size: 32 }),
|
|
60
60
|
};
|
|
61
61
|
export const Inherit = {
|
|
62
62
|
render: ({ icon, color, size, clickable, focusable }) => {
|
|
@@ -98,18 +98,18 @@ export class InputComponent {
|
|
|
98
98
|
this.filterHintSlotContent();
|
|
99
99
|
}
|
|
100
100
|
render() {
|
|
101
|
-
return (h(Host, { key: '
|
|
101
|
+
return (h(Host, { key: 'b18e9dad8fdc84804b77049fd7b94c6b05541c3f', class: {
|
|
102
102
|
'b2b-input': true,
|
|
103
103
|
'b2b-input--error': this.invalid && !this.disabled,
|
|
104
|
-
} }, (this.label || this.labelSlot) && (h("b2b-input-label", { id: this.name, required: this.required }, h("slot", { name: "label" }, this.label))), h("div", { key: '
|
|
104
|
+
} }, (this.label || this.labelSlot) && (h("b2b-input-label", { id: this.name, required: this.required }, h("slot", { name: "label" }, this.label))), h("div", { key: '655f632484049add498904c26d766670eb3b9203', class: {
|
|
105
105
|
'b2b-input__wrapper': true,
|
|
106
106
|
'b2b-input__wrapper--focused': this.hasFocus,
|
|
107
107
|
'b2b-input__wrapper--disabled': this.disabled || this.groupDisabled,
|
|
108
|
-
} }, h("slot", { key: '
|
|
108
|
+
} }, h("slot", { key: '1d0650fa02aa56cf183a8c3c89e5791a53c54944', name: "start" }), this.hasTextPrefix && h("div", { class: "border" }), h("input", { key: '88e9aa5076bd6dd59eafac8491d6fafc9eec8b5e', class: {
|
|
109
109
|
'b2b-input__native-input': true,
|
|
110
110
|
['b2b-input__native-input--align-' + this.inputTextAlign]: true,
|
|
111
111
|
'b2b-input__native-input--disabled': this.disabled || this.groupDisabled,
|
|
112
|
-
}, "aria-labelledby": this.name, type: this.type, placeholder: this.placeholder, value: this.value, name: this.name, disabled: this.disabled || this.groupDisabled, autoFocus: this.focusOnLoad, onFocus: this.onFocus, onBlur: this.onBlur, onInput: this.onInput, ref: el => (this.focusableElement = el) }), this.hasTextSuffix && h("div", { class: "border" }), h("slot", { key: '
|
|
112
|
+
}, "aria-labelledby": this.name, type: this.type, placeholder: this.placeholder, value: this.value, name: this.name, disabled: this.disabled || this.groupDisabled, autoFocus: this.focusOnLoad, onFocus: this.onFocus, onBlur: this.onBlur, onInput: this.onInput, ref: el => (this.focusableElement = el) }), this.hasTextSuffix && h("div", { class: "border" }), h("slot", { key: 'c93445fb93de27a7e1d4681bc7a48d44bb8baa1a', name: "end" })), (this.hint !== undefined || this.hintSlot) &&
|
|
113
113
|
(!this.invalid || this.disabled || this.groupDisabled) ? (h("span", null, h("slot", { name: "hint" }, this.hint))) : (''), this.error !== undefined && this.invalid && !this.disabled ? (h("span", null, this.error)) : ('')));
|
|
114
114
|
}
|
|
115
115
|
static get is() { return "b2b-input"; }
|
|
@@ -49,7 +49,7 @@ export class B2BInputGroup {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: '30fc190f60b27b6f11fdcc7ed37cc95eee557e5e' }, h("div", { key: '054b44ad5994365e1ea8034a854e2d1b23c6d5e2', class: { 'b2b-input-wrapper': true } }, h("slot", { key: '73b19a2684e84873ada8ec3b2f5c4f465f1fb382', name: "start" }), h("slot", { key: 'f0d15628f49e1d7c83eafaa7a631bd71a673ff97' }), h("slot", { key: '00209dc3c6bf3b3e4418e79dcb6387effc0d8531', name: "end" })), (this.hint || (this.invalid && !this.disabled)) && (h("span", { class: {
|
|
53
53
|
'b2b-input-wrapper__hint': true,
|
|
54
54
|
'b2b-input-wrapper__hint--error': this.invalid && !this.disabled,
|
|
55
55
|
} }, this.invalid && !this.disabled ? this.error : this.hint))));
|
|
@@ -5,11 +5,11 @@ export class InputLabelComponent {
|
|
|
5
5
|
this.disabled = false;
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '87fe33e03bfe683d013e8d992bba9e3863834514' }, h("label", { key: 'e88216535eb3d9638fc75a638daffb81bcdf0bb1', class: {
|
|
9
9
|
'b2b-input-label': true,
|
|
10
10
|
'b2b-input-label--required': this.required,
|
|
11
11
|
'b2b-input-label--disabled': this.disabled,
|
|
12
|
-
} }, h("slot", { key: '
|
|
12
|
+
} }, h("slot", { key: 'cf1736baaf9fd224071f3e21122c263b9865c318' }))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "b2b-input-label"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,7 +12,7 @@ export class InputListOptionComponent {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '566b7cf1696550467c5b8c29cedccf5f8821dc6e', class: "b2b-input-list__option", onClick: this.handleClick, role: "option" }, this.option));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "b2b-input-list-option"; }
|
|
18
18
|
static get originalStyleUrls() {
|
|
@@ -137,13 +137,13 @@ export class InputListComponent {
|
|
|
137
137
|
*/
|
|
138
138
|
render() {
|
|
139
139
|
const groupOrderClass = this.getGroupOrderClassName() || '';
|
|
140
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: 'c22a6a73eca142a88eb7cc3f4c975b579df1d709', onBlur: this.setElementOnBlur, onFocus: this.setElementOnFocus }, h("div", { key: '3fb28f6a327c958fcf9d178c4d1814915a13ad3a', class: {
|
|
141
141
|
'b2b-input-list': true,
|
|
142
142
|
'b2b-input-list__options-on': this.hasOptionList &&
|
|
143
143
|
this.isElementFocused &&
|
|
144
144
|
Boolean(this.value),
|
|
145
145
|
[groupOrderClass]: true,
|
|
146
|
-
} }, h("b2b-input", { key: '
|
|
146
|
+
} }, h("b2b-input", { key: '2cd2ba2a073ca4b1980ac5621b60f0ee351e5cca', type: "text", label: this.label, value: this.value, disabled: this.disabled || this.groupDisabled, "onb2b-input": this.handleInput, placeholder: this.placeholder, required: this.required }, !(this.disabled || this.groupDisabled) && Boolean(this.value) && (h("b2b-icon-100", { icon: "b2b_icon-close", "aria-label": "reset", slot: "end", tabIndex: 0, onMouseDown: this.resetInput, onKeyDown: this.resetInput }))), this.isElementFocused && Boolean(this.value) ? (h("div", { class: "b2b-input-list__options-container" }, this.hasOptionList ? (h("div", { class: "b2b-input-list__options", role: "listbox" }, this.optionsList.map(option => (h("b2b-input-list-option", { option: option, tabIndex: -1, "onb2b-option-selected": this.onOptionSelected }))))) : (h("slot", null)))) : null)));
|
|
147
147
|
}
|
|
148
148
|
static get is() { return "b2b-input-list"; }
|
|
149
149
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,10 +4,10 @@ export class LabelComponent {
|
|
|
4
4
|
this.type = 'neutral';
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h("span", { key: '
|
|
7
|
+
return (h("span", { key: '8b3e3c895c71501e761b6a80843403df68190cca', class: {
|
|
8
8
|
'b2b-label': true,
|
|
9
9
|
[`b2b-label--${this.type}`]: true,
|
|
10
|
-
} }, h("slot", { key: '
|
|
10
|
+
} }, h("slot", { key: '737f1fff0fd98d426cc910a6af713786aa7bd1cc' })));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "b2b-label"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -82,10 +82,10 @@ export class ModalComponent {
|
|
|
82
82
|
this.attemptFocus(this.getFirstFocusableElement());
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: '1ae4da3d85c98d784c5aa3254eec819791538b75' }, h("div", { key: 'a504235885dd6d98d6f909d9cf3d67adf0f1f6c0', class: { 'b2b-modal': true, 'b2b-modal--open': this.opened } }, h("div", { key: 'fffccabe0df78b009dc23f7dac95f5bbf7ce07e4', "data-focus-trap-edge": true, onFocus: this.handleTopFocus, tabIndex: 0 }), h("div", { key: 'd4c09be02aa93046ad8835da3affb70c0d7685dc', class: {
|
|
86
86
|
'b2b-modal__dialog': true,
|
|
87
87
|
[`b2b-modal__dialog--${this.variant}`]: true,
|
|
88
|
-
} }, h("div", { key: '
|
|
88
|
+
} }, h("div", { key: '85add6446151ec3df71ba825bab64d100306bc10', class: "b2b-modal__dialog__header" }, h("div", { key: '3fc56d466fe2eb9e6ca594ff867c48fe05ffda09', class: "b2b-modal__dialog__header-left" }, h("b2b-headline", { key: 'cf348827107b36494427ddaac019a539c379364a', align: "center", size: "200", noMargin: true }, this.heading), h("slot", { key: '8df87ec03dcdb11bbf96c1c49c9ea9d81a84a558', name: "header-icon" })), h("div", { key: '80f6e9e7d7ad6e71c15525a7a12eb885c48c6c2a', class: "b2b-modal__dialog__header-right" }, h("button", { key: '7e2373011323d5abc38803862f30aa0b3ae394e6', type: "button", class: "b2b-modal__dialog__close", onMouseEnter: this.toggleIconHover, onMouseLeave: this.toggleIconHover, onClick: this.handleClickDismiss, ref: el => (this.closeButton = el) }, h("b2b-icon-100", { key: 'a4955d65f73cf81cd919e5dbcf63db3251cf7449', clickable: true, icon: "b2b_icon-close", color: this.iconHover ? 'primary' : 'secondary' })))), h("div", { key: '3147b6a75f66f90d45f1a404f9dfb140634a6a35', class: "b2b-modal__dialog__body" }, h("slot", { key: '7ad81c8b9e610720c3ed918d255017a32d4128d4' })), h("div", { key: '7e7b6105f3bc4b1ad06eb7b7c7f43c91eb310c51', class: "b2b-modal__dialog__footer" }, h("div", { key: 'd3abac0aade1244074f2bb038e736e981d67f5ae', class: "b2b-modal__dialog__footer-left" }, h("slot", { key: '61599dfd481e53897522fabc44915546ac3d0f59', name: "footer-left" })), h("div", { key: '07c6cfca3f4e1545644292e4c04c9f02149d37b8', class: "b2b-modal__dialog__footer-right" }, h("slot", { key: '7b161e0e61c4e36c0ae1a2930b95e39991d72879', name: "footer-right" })))), h("div", { key: 'd5ac30a02abfd2b89dce1d913971a417198cd155', "data-focus-trap-edge": true, onFocus: this.handleBottomFocus, tabIndex: 0 }), h("div", { key: '570e98eefabd147193cb04d9d493e46a08411e3f', class: "b2b-modal__backdrop", onClick: this.handleBackdropDismiss }))));
|
|
89
89
|
}
|
|
90
90
|
static get is() { return "b2b-modal"; }
|
|
91
91
|
static get encapsulation() { return "shadow"; }
|
|
@@ -207,16 +207,16 @@ export class B2bMultiSelectDropdown {
|
|
|
207
207
|
const hasError = this.invalid && !disabled;
|
|
208
208
|
const showHint = this.hint && !hasError;
|
|
209
209
|
const showError = this.errorMessage && hasError;
|
|
210
|
-
return (h(Host, { key: '
|
|
210
|
+
return (h(Host, { key: 'ce7c585a53dfb0dc39216bca8de421f5c6f6bb63', onFocus: this.setElementOnFocus, onBlur: this.setElementOnBlur, onClick: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("b2b-input-label", { key: '5f70368b3502a9e3f313f701e254d0efefae6fd8', required: this.required }, this.label), h("div", { key: '3bc73b137d9b53d54b8a692965b83c299a09faa1', class: {
|
|
211
211
|
'b2b-multiselect-dropdown': true,
|
|
212
212
|
'b2b-multiselect-dropdown--open': this.isOpen,
|
|
213
213
|
'b2b-multiselect-dropdown--error': hasError,
|
|
214
214
|
'b2b-multiselect-dropdown--disabled': disabled,
|
|
215
215
|
'b2b-multiselect-dropdown--focused': this.invalid && this.isElementFocused,
|
|
216
|
-
}, tabindex: 0, role: "combobox", onClick: () => (this.isOpen = !this.isOpen && !disabled), "aria-expanded": this.isElementFocused }, h("div", { key: '
|
|
216
|
+
}, tabindex: 0, role: "combobox", onClick: () => (this.isOpen = !this.isOpen && !disabled), "aria-expanded": this.isElementFocused }, h("div", { key: 'b4e95e6072ebe7a49f1ff092521758bef17c9443', class: "b2b-multiselect-dropdown__chip-container" }, this.currentSelectedValues.length === 0 ? (h("span", { class: "b2b-multiselect-dropdown__placeholder" }, this.placeholder)) : (this.renderChips())), h("b2b-icon-100", { key: 'a79e61c1e78be92e394772e4fe45ccaa840bb23c', icon: "b2b_icon-arrow-down" })), h("div", { key: 'f8b8c5d70b18c1ffc175b966e1568ec719fd5aa6', class: {
|
|
217
217
|
'b2b-multiselect-dropdown__options-container': true,
|
|
218
218
|
'b2b-multiselect-dropdown__options-container--visible': this.isOpen,
|
|
219
|
-
} }, h("div", { key: '
|
|
219
|
+
} }, h("div", { key: '94b799c83a30906027023ee78c9202afc152cb98', class: "b2b-multiselect-dropdown__options", role: "listbox", "aria-label": this.label, tabIndex: -1 }, h("div", { key: 'c844dc9be611cf2533549cf03bdc1fb5cf7e5755', class: "b2b-multiselect-dropdown__option__search" }, h("input", { key: 'ec3380739b47ae8ee490ed4bf9369a81045f2d3b', type: "text", onInput: this.handleInput, class: "b2b-multiselect-dropdown__option__search__input", placeholder: this.searchPlaceholder })), h("b2b-multiselect-option", { key: 'bf17215713121f4f359872c8c1f6ed4f1ec32e45', class: "b2b-multiselect-dropdown__option__select-all", option: this.selectAllLabel, id: "select-all", "onB2b-option-selected": this.handleSelectAll }), this.hasOptionList &&
|
|
220
220
|
this.currentList.map(option => (h("b2b-multiselect-option", { "onB2b-option-selected": this.handleSelectedChange, option: option.value, label: option.label }))))), showHint && (h("span", { class: "b2b-multiselect-dropdown__hint" }, this.hint)), showError && (h("span", { class: "b2b-multiselect-dropdown__error-message" }, this.errorMessage))));
|
|
221
221
|
}
|
|
222
222
|
static get is() { return "b2b-multiselect-dropdown"; }
|
package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js
CHANGED
|
@@ -15,9 +15,9 @@ export class B2bMultiSelectOption {
|
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
17
|
var _a;
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: '0147313a2d52d7cdf334f118f8a5eae6fb2a73df', role: "option", class: {
|
|
19
19
|
'b2b-multiselect-dropdown__option': true,
|
|
20
|
-
} }, h("b2b-checkbox", { key: '
|
|
20
|
+
} }, h("b2b-checkbox", { key: 'bf1504c0924dbda95990369b31c010804b2ceac7', checked: this.selected, "onB2b-change": this.handleCheckboxChange, label: (_a = this.label) !== null && _a !== void 0 ? _a : this.option, indeterminate: this.indeterminate, value: this.option })));
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "b2b-multiselect-option"; }
|
|
23
23
|
static get originalStyleUrls() {
|
|
@@ -91,7 +91,7 @@ export class PaginationComponent {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
render() {
|
|
94
|
-
return (h("nav", { key: '
|
|
94
|
+
return (h("nav", { key: '6f43e77c9989aafe2f5ff9d7de619853f807ceb9' }, h("ol", { key: 'ebc029acf51035b9859ed5793a29fc689c536484', class: "b2b-pagination" }, this.activePage !== 1 && (h("li", { class: "b2b-pagination--previous" }, h("b2b-button", { onClick: this.selectPreviousPage, size: "50", variant: "secondary", "aria-label": this.ariaLabelPreviousPage }, "\u2039" /* PaginationConstants.BACK */))), this.navItems.map((navItem, index) => {
|
|
95
95
|
const isItemActive = this.activePage === navItem;
|
|
96
96
|
return (h("li", { class: this.getItemClass(navItem) }, h("b2b-button", { onClick: () => this.setSelectedPage(navItem, index), active: isItemActive, disabled: isItemActive, size: "50", variant: "secondary" }, navItem)));
|
|
97
97
|
}), this.activePage !== this.totalPages && (h("li", { class: "b2b-pagination--next" }, h("b2b-button", { onClick: this.selectNextPage, size: "50", variant: "secondary", "aria-label": this.ariaLabelNextPage }, "\u203A" /* PaginationConstants.NEXT */))))));
|
|
@@ -13,7 +13,7 @@ export class ParagraphComponent {
|
|
|
13
13
|
this.display = 'block';
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h("p", { key: '
|
|
16
|
+
return (h("p", { key: '9372543c8a22d33c6ed0c53e3e8b277e0ce78883', style: {
|
|
17
17
|
display: this.display,
|
|
18
18
|
}, class: {
|
|
19
19
|
'b2b-paragraph': true,
|
|
@@ -22,7 +22,7 @@ export class ParagraphComponent {
|
|
|
22
22
|
['b2b-paragraph--align-' + this.align]: true,
|
|
23
23
|
['b2b-paragraph--no-margin']: !this.margin,
|
|
24
24
|
['b2b-paragraph--variant-' + this.variant]: true,
|
|
25
|
-
} }, h("slot", { key: '
|
|
25
|
+
} }, h("slot", { key: 'ca3169be5b0239e40911fa2071c744404a6bbbae' })));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "b2b-paragraph"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,11 +17,11 @@ export class ProgressBarComponent {
|
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
const labelExists = this.label !== undefined && this.label !== '';
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '4511acab06e497842a84eed7cfa9beb7d575dbe7' }, h("div", { key: '03b04648866fed3e0c276ca8218201639b23f6fc', class: {
|
|
21
21
|
[`b2b-progress-bar__${this.labelPosition}-${this.labelType}`]: true,
|
|
22
|
-
} }, h("div", { key: '
|
|
22
|
+
} }, h("div", { key: '8ddd2295fd43f56b8393178e38ea414e96f332ed', class: "b2b-progress-bar__wrapper" }, h("div", { key: 'e6ea32124f8df1b937dd8f62e1e06d306229cd75', class: "b2b-progress-bar__progress", style: {
|
|
23
23
|
width: `${this.getProgress()}%`,
|
|
24
|
-
} })), h("div", { key: '
|
|
24
|
+
} })), h("div", { key: '36a7f3c4c5229350ea3a37827fa0613db0ab33b7', class: {
|
|
25
25
|
'b2b-progress-bar__label': labelExists,
|
|
26
26
|
'b2b-progress-bar__label-none': !labelExists,
|
|
27
27
|
[`b2b-progress-bar__label__${this.labelPosition}-${this.labelType}`]: labelExists,
|
|
@@ -53,11 +53,11 @@ export class B2bRadioButtonComponent {
|
|
|
53
53
|
return Array.from(document.querySelectorAll(`b2b-radio-button[name="${this.name}"]`)).filter((radio) => radio.value !== this.value);
|
|
54
54
|
}
|
|
55
55
|
render() {
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '5fbc72c2f038679ea04d1c99a6f687e4829d7d51', onClick: this.onClick }, h("div", { key: '895c751c5086b2f7d466635020a39a96d1c9f220', class: {
|
|
57
57
|
'b2b-radio': true,
|
|
58
58
|
'b2b-radio--error': this.invalid && !this.disabled,
|
|
59
59
|
'b2b-radio--disabled': this.disabled,
|
|
60
|
-
} }, h("div", { key: '
|
|
60
|
+
} }, h("div", { key: '0f6b79277a4ad8520b77054c79bf835e6e2a0a7c', class: "b2b-radio-items" }, h("input", { key: 'bd9d51857f574d9c37d482ae6b23bd25027369a5', class: "b2b-radio-input", "aria-labelledby": this.name, type: "radio", checked: this.checked, disabled: this.disabled, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, value: this.value }), h("b2b-input-label", { key: '8ab71684ff2f26fdbe119c852109ce3b44ed1c4f', id: this.name, required: this.required, disabled: this.disabled }, h("slot", { key: '474cc5a22301f4be53130579845152da0caa849b', name: "label" }, this.label))), (this.hint !== undefined && !this.invalid) ||
|
|
61
61
|
(this.hint !== undefined && this.disabled) ? (h("span", null, this.hint)) : (''), this.error !== undefined && this.invalid && !this.disabled ? (h("span", null, this.error)) : (''))));
|
|
62
62
|
}
|
|
63
63
|
static get is() { return "b2b-radio-button"; }
|
|
@@ -67,11 +67,11 @@ export class RadioButtonGroupComponent {
|
|
|
67
67
|
this.removeChildText();
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: 'c47db22cd7ab5484813e052db015d2b8d1405bb9' }, h("div", { key: '1e7fc6246f83ea53debd5ef7fc42772e3c41a936', class: {
|
|
71
71
|
'b2b-radio-group': true,
|
|
72
72
|
'b2b-radio-group--error': this.invalid && !this.disabled,
|
|
73
73
|
[`b2b-radio-group--${this.alignment}`]: true,
|
|
74
|
-
} }, (this.label || this.labelSlot) && (h("b2b-input-label", { id: this.name, required: this.required }, h("slot", { name: "label" }, this.label))), h("fieldset", { key: '
|
|
74
|
+
} }, (this.label || this.labelSlot) && (h("b2b-input-label", { id: this.name, required: this.required }, h("slot", { name: "label" }, this.label))), h("fieldset", { key: 'a406988d11f921c8eb16296820212da84d014e8c' }, h("div", { key: '2b6fb5ac504cdc65b354d8d30727b0fb6e725376', class: "b2b-radio-group-options" }, h("slot", { key: 'd7161d2da1c4241830815da13fe87067ecb55931' }))), (this.hint !== undefined && !this.invalid) ||
|
|
75
75
|
(this.hint !== undefined && this.disabled) ? (h("span", null, this.hint)) : (''), this.error !== undefined && this.invalid && !this.disabled ? (h("span", null, this.error)) : (''))));
|
|
76
76
|
}
|
|
77
77
|
static get is() { return "b2b-radio-group"; }
|
|
@@ -4,7 +4,7 @@ export class B2BRequiredSeparator {
|
|
|
4
4
|
this.label = 'Pflichtfeld';
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: 'dbb1404fe0a21058185803fc23cbe4a53378d25f' }, h("div", { key: 'fa4568e39ddc882fde2a8ae6c667145e6b0ff71f', class: "b2b-required-separator__label" }, h("span", { key: 'cff2204e59e777da55f39e4fa4be2a376fd7645b', class: "b2b-required-separator__asterisk" }, "* "), h("span", { key: '8d57dbea0fe1841c2fd52e65e2268c60eea7ea60' }, this.label)), h("b2b-separator", { key: '653ca12e5bed8038775144314e7a0c424437c33f' })));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "b2b-required-separator"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -6,16 +6,16 @@ export class RoundedIconComponent {
|
|
|
6
6
|
this.contentColor = 'var(--b2b-color-copy-default)';
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: '1d7eea4ad65056f16127e2029811239e0540560b' }, h("div", { key: '153f0ace757daff8776fac4fbe1cc9a05e9c0dfa', style: {
|
|
10
10
|
['background-color']: this.color,
|
|
11
11
|
['border']: `1px solid ${this.borderColor || this.color}`,
|
|
12
12
|
}, class: {
|
|
13
13
|
'b2b-rounded-icon': true,
|
|
14
|
-
} }, h("div", { key: '
|
|
14
|
+
} }, h("div", { key: '7b28d41d6d5cb38c21aa4487cca0ce070663909a', style: {
|
|
15
15
|
['color']: this.contentColor,
|
|
16
|
-
} }, h("slot", { key: '
|
|
16
|
+
} }, h("slot", { key: '32e90de259f352aff82118dd1f9904475fc875e2', name: "icon" })), h("div", { key: '38f7a97f95191cd039a4bbbcf20a9b5ce1826a8e', style: {
|
|
17
17
|
['color']: this.contentColor,
|
|
18
|
-
} }, h("slot", { key: '
|
|
18
|
+
} }, h("slot", { key: 'e994e7fbd49f656c865ce8517833be0d6bbb852e', name: "text" })))));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "b2b-rounded-icon"; }
|
|
21
21
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class ScrollableContainerComponent {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: 'c5c71924d38f1788a60b19e49ad09a3aa5d637f6' }, h("slot", { key: '4fa412e60d51aa58e9e6d40936bb4f4a4725dab5' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "b2b-scrollable-container"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,7 +22,7 @@ export class SearchComponent {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '65315a3718f55f1d9b63c2b3a437bd292a512eb3' }, h("b2b-input-group", { key: '7f1e64e2fe99e4b8ecca7f90547c7e08b0c2a8f3', disabled: this.disabled }, h("b2b-input-list", { key: '7a140c8635b7f193125597a4b6a1df62c81796f3', slot: "start", value: this.value, placeholder: this.placeholder, optionsList: this.optionsList, "onb2b-input": this.onInput, "onb2b-option-selected": this.onOptionSelected }, h("slot", { key: '2674546c9fc2e6347c42350f94dc91876357e336' })), h("b2b-button", { key: '75cdcd94bb0f25af3448bb76ed6f5103ceb6711c', slot: "end", variant: "primary", onClick: this.onSearchClicked }, h("b2b-icon-100", { key: '0d846a636b31a4e8b67933611b2da76442ad7795', icon: "b2b_icon-search", clickable: true })))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "b2b-search"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ export class B2bSeparatorComponent {
|
|
|
4
4
|
this.alignment = 'horizontal';
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: 'f1ab4806be7ac4128d95a047421be58502b0cadf' }, h("div", { key: 'c478fc67a79c15a6d74af39eb6747d25d3d58922', class: {
|
|
8
8
|
[`b2b-separator--${this.alignment}`]: true,
|
|
9
9
|
} })));
|
|
10
10
|
}
|
|
@@ -10,7 +10,7 @@ export class ShimmerComponent {
|
|
|
10
10
|
width: `${this.width}px`,
|
|
11
11
|
height: `${this.height}px`,
|
|
12
12
|
};
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '82fc3e95ff0f946ae6cfd5c59ab1a0e04df62ca5' }, this.loading ? (h("div", { class: "b2b-shimmer", style: shimmerStyle })) : (h("slot", null))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "b2b-shimmer"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, Host
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class SnackbarComponent {
|
|
3
3
|
constructor() {
|
|
4
4
|
/** when user hovers over snackbar, the timer is paused. */
|
|
@@ -86,17 +86,17 @@ export class SnackbarComponent {
|
|
|
86
86
|
clearTimeout(this.timeoutId);
|
|
87
87
|
}
|
|
88
88
|
render() {
|
|
89
|
-
return (h(Host, { key: '
|
|
89
|
+
return (h(Host, { key: '55fbed7dd9fa44a54d25277ca6f1e75429ba1b37', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("div", { key: 'dff92b0614f3e59e0c809b975310646814b8145e', class: {
|
|
90
90
|
'b2b-snackbar': true,
|
|
91
91
|
[`b2b-snackbar--${this.type}`]: true,
|
|
92
92
|
'b2b-snackbar--opened': this.opened,
|
|
93
|
-
}, style:
|
|
93
|
+
}, style: { width: this.width || 'auto' } }, h("div", { key: '1fc6e6367e35c1b1a05f43ea2660a905f22c9711', class: "b2b-snackbar__content" }, h("span", { key: 'c8e4bc8512f84f110f520f6678df3a1b140a0367', class: { [`b2b-snackbar--${this.type}__icon`]: true } }, this.chooseIcon()), h("p", { key: '746bbc4361665af9e7ca661a2961bf000f4e073d', class: "b2b-snackbar__content__description" }, this.description)), this.isActionPresent() && (h("div", { class: {
|
|
94
94
|
'b2b-snackbar__action': true,
|
|
95
95
|
[`b2b-snackbar__action--${this.type}`]: true,
|
|
96
|
-
}, onClick: this.handleActionClick }, h("a", null, this.actionLabel))), h("div", { key: '
|
|
96
|
+
}, onClick: this.handleActionClick }, h("a", null, this.actionLabel))), h("div", { key: 'c8384158b5bdec6af91cae1adc66763cbdf528d1', class: {
|
|
97
97
|
'b2b-snackbar__close-icon': true,
|
|
98
98
|
[`b2b-snackbar__close-icon--${this.type}`]: true,
|
|
99
|
-
}, onClick: this.close }, h("b2b-icon-100", { key: '
|
|
99
|
+
}, onClick: this.close }, h("b2b-icon-100", { key: '8315309a832f0767ecbbc40ef147b0005a66ce7a', clickable: true, size: 24, icon: "b2b_icon-close" })))));
|
|
100
100
|
}
|
|
101
101
|
static get is() { return "b2b-snackbar"; }
|
|
102
102
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,7 +9,7 @@ export class SpinnerComponent {
|
|
|
9
9
|
this.color = 'primary';
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h("div", { key: '
|
|
12
|
+
return (h("div", { key: '0d638dd6efcfd16c740a35d99f99f0432e50ae67', class: {
|
|
13
13
|
'b2b-spinner': true,
|
|
14
14
|
['b2b-spinner--size-' + this.size]: true,
|
|
15
15
|
['b2b-spinner--color-' + this.color]: true,
|