@otto-de/b2b-core-components 1.33.0 → 1.35.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-bf9c8817.entry.js → p-17778cfc.entry.js} +1 -1
- package/dist/b2b-core-components/{p-26755654.entry.js → p-18bb4d69.entry.js} +1 -1
- package/dist/b2b-core-components/p-1af4d133.entry.js +1 -0
- package/dist/b2b-core-components/{p-e7590b6e.entry.js → p-21644e6c.entry.js} +1 -1
- package/dist/b2b-core-components/{p-6749d668.entry.js → p-23af5193.entry.js} +1 -1
- 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-3c3edafd.entry.js +1 -0
- package/dist/b2b-core-components/p-3d8e14e6.entry.js +1 -0
- package/dist/b2b-core-components/{p-092855b3.entry.js → p-419de188.entry.js} +1 -1
- 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-0322b052.entry.js → p-670e355a.entry.js} +1 -1
- package/dist/b2b-core-components/{p-e2518c43.entry.js → p-7889e94a.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-89e817e9.entry.js +1 -0
- package/dist/b2b-core-components/{p-797c85c2.entry.js → p-8cb6813a.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-abcbd1cc.entry.js +1 -0
- package/dist/b2b-core-components/p-ae7a752e.entry.js +1 -0
- 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-c430b5ba.entry.js +1 -0
- 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-ff6a0874.entry.js → p-dcaff8ab.entry.js} +1 -1
- 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-e8151556.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-custom-dropdown.cjs.entry.js +9 -5
- 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 +53 -26
- 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-time-picker.cjs.entry.js +157 -0
- 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 +18 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/custom-dropdown/custom-dropdown.css +13 -1
- package/dist/collection/components/custom-dropdown/custom-dropdown.e2e.js +69 -0
- package/dist/collection/components/custom-dropdown/custom-dropdown.js +26 -4
- package/dist/collection/components/custom-dropdown/custom-dropdown.stories.js +11 -0
- 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 +55 -27
- 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/time-picker/time-picker.css +345 -0
- package/dist/collection/components/time-picker/time-picker.e2e.js +135 -0
- package/dist/collection/components/time-picker/time-picker.js +411 -0
- package/dist/collection/components/time-picker/time-picker.stories.js +80 -0
- 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-custom-dropdown.js +10 -5
- 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 +54 -26
- 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-time-picker.d.ts +11 -0
- package/dist/components/b2b-time-picker.js +200 -0
- 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 +126 -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-custom-dropdown.entry.js +9 -5
- 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 +53 -26
- 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-time-picker.entry.js +153 -0
- 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 +18 -6
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/custom-dropdown/custom-dropdown.d.ts +2 -0
- package/dist/types/components/custom-dropdown/custom-dropdown.stories.d.ts +3 -0
- 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 +3 -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/time-picker/time-picker.d.ts +50 -0
- package/dist/types/components/time-picker/time-picker.stories.d.ts +10 -0
- package/dist/types/components/toggle-switch/toggle-switch.stories.d.ts +16 -4
- package/dist/types/components.d.ts +338 -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 +357 -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-24c6aa56.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
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
export class TimePickerComponent {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.onFocus = (ev) => {
|
|
5
|
+
this.hasFocus = true;
|
|
6
|
+
this.isOpen = true;
|
|
7
|
+
this.b2bFocus.emit(ev);
|
|
8
|
+
};
|
|
9
|
+
this.onBlur = (ev) => {
|
|
10
|
+
this.hasFocus = false;
|
|
11
|
+
this.isOpen = false;
|
|
12
|
+
this.b2bBlur.emit(ev);
|
|
13
|
+
};
|
|
14
|
+
this.onInput = (ev) => {
|
|
15
|
+
this.isOpen = false;
|
|
16
|
+
const input = ev.target;
|
|
17
|
+
this.value = input.value;
|
|
18
|
+
this.b2bInput.emit({ value: this.value });
|
|
19
|
+
};
|
|
20
|
+
this.validateInput = (value) => {
|
|
21
|
+
const match = value.match(/^(\d{2}):(\d{2})$/);
|
|
22
|
+
let isValid = false;
|
|
23
|
+
if (match) {
|
|
24
|
+
const hour = parseInt(match[1], 10);
|
|
25
|
+
const minute = parseInt(match[2], 10);
|
|
26
|
+
isValid = hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59;
|
|
27
|
+
}
|
|
28
|
+
if (!isValid && value.length > 0) {
|
|
29
|
+
this.internalErrorMessage = 'Invalid format';
|
|
30
|
+
this.internalInvalid = true;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.internalErrorMessage = '';
|
|
34
|
+
this.internalInvalid = false;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.onSelect = (event) => {
|
|
38
|
+
var _a;
|
|
39
|
+
const target = event.target;
|
|
40
|
+
const selectedValue = target.getAttribute('data-value');
|
|
41
|
+
if (selectedValue !== null) {
|
|
42
|
+
this.value = selectedValue;
|
|
43
|
+
this.b2bChange.emit(selectedValue);
|
|
44
|
+
this.internalInvalid = false;
|
|
45
|
+
this.internalErrorMessage = '';
|
|
46
|
+
this.hasFocus = false;
|
|
47
|
+
this.isOpen = false;
|
|
48
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.blur();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
this.onClear = () => {
|
|
52
|
+
this.value = '';
|
|
53
|
+
this.internalInvalid = false;
|
|
54
|
+
this.internalErrorMessage = '';
|
|
55
|
+
this.hasFocus = false;
|
|
56
|
+
this.b2bClear.emit();
|
|
57
|
+
};
|
|
58
|
+
this.toggleDropdown = () => {
|
|
59
|
+
var _a;
|
|
60
|
+
this.isOpen = !this.isOpen;
|
|
61
|
+
if (this.isOpen) {
|
|
62
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
this.label = undefined;
|
|
66
|
+
this.required = false;
|
|
67
|
+
this.placeholder = 'hh:mm';
|
|
68
|
+
this.invalid = false;
|
|
69
|
+
this.hint = undefined;
|
|
70
|
+
this.interval = 15;
|
|
71
|
+
this.error = undefined;
|
|
72
|
+
this.value = null;
|
|
73
|
+
this.hasFocus = false;
|
|
74
|
+
this.isOpen = false;
|
|
75
|
+
this.availableTimes = [];
|
|
76
|
+
this.internalErrorMessage = '';
|
|
77
|
+
this.internalInvalid = false;
|
|
78
|
+
}
|
|
79
|
+
componentWillLoad() {
|
|
80
|
+
this.availableTimes = this.getAvailableTimes();
|
|
81
|
+
if (this.value) {
|
|
82
|
+
this.validateInput(this.value);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
handleIntervalChange() {
|
|
86
|
+
this.availableTimes = this.getAvailableTimes();
|
|
87
|
+
}
|
|
88
|
+
validateValue(newValue) {
|
|
89
|
+
this.value = newValue;
|
|
90
|
+
this.validateInput(newValue);
|
|
91
|
+
}
|
|
92
|
+
get isInvalid() {
|
|
93
|
+
return this.invalid || this.internalInvalid;
|
|
94
|
+
}
|
|
95
|
+
get currentErrorMessage() {
|
|
96
|
+
return this.error || this.internalErrorMessage;
|
|
97
|
+
}
|
|
98
|
+
getAvailableTimes() {
|
|
99
|
+
const times = [];
|
|
100
|
+
const step = this.interval || 15;
|
|
101
|
+
for (let hour = 0; hour < 24; hour++) {
|
|
102
|
+
for (let minute = 0; minute < 60; minute += step) {
|
|
103
|
+
const time = `${hour.toString().padStart(2, '0')}:${minute
|
|
104
|
+
.toString()
|
|
105
|
+
.padStart(2, '0')}`;
|
|
106
|
+
times.push(time);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return times;
|
|
110
|
+
}
|
|
111
|
+
render() {
|
|
112
|
+
return (h(Host, { key: '82d85e61e12453aa332eb1771c2ecacf84a93bce', class: {
|
|
113
|
+
'b2b-time-picker': true,
|
|
114
|
+
'b2b-time-picker--error': this.isInvalid,
|
|
115
|
+
} }, this.label && (h("b2b-input-label", { id: this.label, required: this.required }, this.label)), h("div", { key: 'e6e70210043bd5c220c03610ab4681378889b075', class: {
|
|
116
|
+
'b2b-time-picker__wrapper': true,
|
|
117
|
+
'b2b-time-picker__wrapper--focused': this.hasFocus,
|
|
118
|
+
'b2b-time-picker__wrapper--filled': !this.hasFocus && !this.invalid && this.value !== '',
|
|
119
|
+
'b2b-time-picker__wrapper--error': this.isInvalid,
|
|
120
|
+
} }, h("input", { key: '91994a1908b2c5dd5886c442fd5a3ca6415f3619', ref: el => (this.inputRef = el), class: {
|
|
121
|
+
'b2b-time-picker__native-input': true,
|
|
122
|
+
}, type: "text", placeholder: this.placeholder, value: this.value, onFocus: this.onFocus, onBlur: this.onBlur, onInput: this.onInput }), h("div", { key: '4052c5c017944c767ccbf286dd4de11e74509848', class: "b2b-icons" }, this.value && (h("div", { class: "b2b-close-icon", onClick: this.onClear }, h("b2b-icon-100", { icon: "b2b_icon-close", "aria-label": "clear input", clickable: true }))), h("div", { key: '92996f5e06fc7e325088d09185b4496a00df68f5', class: "b2b-duration-icon", onMouseDown: e => {
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
this.toggleDropdown();
|
|
125
|
+
} }, h("b2b-icon-100", { key: 'e24b25b79ef06002af8ce83ecf41e88b967ca4ed', icon: "b2b_icon-duration", clickable: true })))), h("div", { key: 'e3154f9b414215660041e6779668c0bb50f06284', class: {
|
|
126
|
+
'b2b-time-picker__options-container': true,
|
|
127
|
+
'b2b-time-picker__options-container--visible': this.isOpen && this.hasFocus,
|
|
128
|
+
}, onMouseDown: e => e.preventDefault() }, h("div", { key: '92e172240eaae8ddb7cef7dab5aaf02b55df44ea', class: "b2b-time-picker__options", role: "listbox", "aria-label": this.label, tabIndex: -1 }, this.availableTimes.map(time => (h("div", { key: time, class: {
|
|
129
|
+
'b2b-time-picker__option': true,
|
|
130
|
+
'b2b-time-picker__option--selected': time === this.value,
|
|
131
|
+
}, "data-value": time, onClick: this.onSelect, role: "option", "aria-selected": time === this.value ? 'true' : 'false' }, time))))), h("span", { class: {
|
|
132
|
+
'b2b-time-picker__hint': true,
|
|
133
|
+
'b2b-time-picker__hint--error': this.isInvalid,
|
|
134
|
+
} }, this.isInvalid ? this.currentErrorMessage : this.hint)));
|
|
135
|
+
}
|
|
136
|
+
static get is() { return "b2b-time-picker"; }
|
|
137
|
+
static get encapsulation() { return "shadow"; }
|
|
138
|
+
static get originalStyleUrls() {
|
|
139
|
+
return {
|
|
140
|
+
"$": ["time-picker.scss"]
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
static get styleUrls() {
|
|
144
|
+
return {
|
|
145
|
+
"$": ["time-picker.css"]
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
static get properties() {
|
|
149
|
+
return {
|
|
150
|
+
"label": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "string",
|
|
155
|
+
"resolved": "string",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": true,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "The time picker label."
|
|
163
|
+
},
|
|
164
|
+
"attribute": "label",
|
|
165
|
+
"reflect": false
|
|
166
|
+
},
|
|
167
|
+
"required": {
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "boolean",
|
|
172
|
+
"resolved": "boolean",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": false,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": "Adds an asterisk at the end of the label to signify that the field is required."
|
|
180
|
+
},
|
|
181
|
+
"attribute": "required",
|
|
182
|
+
"reflect": true,
|
|
183
|
+
"defaultValue": "false"
|
|
184
|
+
},
|
|
185
|
+
"placeholder": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"mutable": false,
|
|
188
|
+
"complexType": {
|
|
189
|
+
"original": "string",
|
|
190
|
+
"resolved": "string",
|
|
191
|
+
"references": {}
|
|
192
|
+
},
|
|
193
|
+
"required": false,
|
|
194
|
+
"optional": false,
|
|
195
|
+
"docs": {
|
|
196
|
+
"tags": [],
|
|
197
|
+
"text": "The placeholder for the time picker input field."
|
|
198
|
+
},
|
|
199
|
+
"attribute": "placeholder",
|
|
200
|
+
"reflect": true,
|
|
201
|
+
"defaultValue": "'hh:mm'"
|
|
202
|
+
},
|
|
203
|
+
"invalid": {
|
|
204
|
+
"type": "boolean",
|
|
205
|
+
"mutable": false,
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "boolean",
|
|
208
|
+
"resolved": "boolean",
|
|
209
|
+
"references": {}
|
|
210
|
+
},
|
|
211
|
+
"required": false,
|
|
212
|
+
"optional": false,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": "Whether the time picker is currently invalid. If true, the time picker is rendered with error styles. Per default, it is false."
|
|
216
|
+
},
|
|
217
|
+
"attribute": "invalid",
|
|
218
|
+
"reflect": true,
|
|
219
|
+
"defaultValue": "false"
|
|
220
|
+
},
|
|
221
|
+
"hint": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"mutable": false,
|
|
224
|
+
"complexType": {
|
|
225
|
+
"original": "string",
|
|
226
|
+
"resolved": "string",
|
|
227
|
+
"references": {}
|
|
228
|
+
},
|
|
229
|
+
"required": false,
|
|
230
|
+
"optional": true,
|
|
231
|
+
"docs": {
|
|
232
|
+
"tags": [],
|
|
233
|
+
"text": "The hint text that appears underneath the time picker field."
|
|
234
|
+
},
|
|
235
|
+
"attribute": "hint",
|
|
236
|
+
"reflect": false
|
|
237
|
+
},
|
|
238
|
+
"interval": {
|
|
239
|
+
"type": "number",
|
|
240
|
+
"mutable": false,
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "number",
|
|
243
|
+
"resolved": "number",
|
|
244
|
+
"references": {}
|
|
245
|
+
},
|
|
246
|
+
"required": false,
|
|
247
|
+
"optional": true,
|
|
248
|
+
"docs": {
|
|
249
|
+
"tags": [],
|
|
250
|
+
"text": "The interval in minutes for the time options. Default is 15 minutes."
|
|
251
|
+
},
|
|
252
|
+
"attribute": "interval",
|
|
253
|
+
"reflect": false,
|
|
254
|
+
"defaultValue": "15"
|
|
255
|
+
},
|
|
256
|
+
"error": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"mutable": false,
|
|
259
|
+
"complexType": {
|
|
260
|
+
"original": "string",
|
|
261
|
+
"resolved": "string",
|
|
262
|
+
"references": {}
|
|
263
|
+
},
|
|
264
|
+
"required": false,
|
|
265
|
+
"optional": true,
|
|
266
|
+
"docs": {
|
|
267
|
+
"tags": [],
|
|
268
|
+
"text": "The error message that is shown if the input is invalid."
|
|
269
|
+
},
|
|
270
|
+
"attribute": "error",
|
|
271
|
+
"reflect": false
|
|
272
|
+
},
|
|
273
|
+
"value": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"mutable": true,
|
|
276
|
+
"complexType": {
|
|
277
|
+
"original": "string",
|
|
278
|
+
"resolved": "string",
|
|
279
|
+
"references": {}
|
|
280
|
+
},
|
|
281
|
+
"required": false,
|
|
282
|
+
"optional": false,
|
|
283
|
+
"docs": {
|
|
284
|
+
"tags": [],
|
|
285
|
+
"text": "The value of the time picker. It has to be in the format \"hh:mm\"."
|
|
286
|
+
},
|
|
287
|
+
"attribute": "value",
|
|
288
|
+
"reflect": true,
|
|
289
|
+
"defaultValue": "null"
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
static get states() {
|
|
294
|
+
return {
|
|
295
|
+
"hasFocus": {},
|
|
296
|
+
"isOpen": {},
|
|
297
|
+
"availableTimes": {},
|
|
298
|
+
"internalErrorMessage": {},
|
|
299
|
+
"internalInvalid": {}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
static get events() {
|
|
303
|
+
return [{
|
|
304
|
+
"method": "b2bFocus",
|
|
305
|
+
"name": "b2b-focus",
|
|
306
|
+
"bubbles": true,
|
|
307
|
+
"cancelable": true,
|
|
308
|
+
"composed": true,
|
|
309
|
+
"docs": {
|
|
310
|
+
"tags": [],
|
|
311
|
+
"text": "Emits whenever the time picker receives focus."
|
|
312
|
+
},
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "FocusEvent",
|
|
315
|
+
"resolved": "FocusEvent",
|
|
316
|
+
"references": {
|
|
317
|
+
"FocusEvent": {
|
|
318
|
+
"location": "global",
|
|
319
|
+
"id": "global::FocusEvent"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}, {
|
|
324
|
+
"method": "b2bBlur",
|
|
325
|
+
"name": "b2b-blur",
|
|
326
|
+
"bubbles": true,
|
|
327
|
+
"cancelable": true,
|
|
328
|
+
"composed": true,
|
|
329
|
+
"docs": {
|
|
330
|
+
"tags": [],
|
|
331
|
+
"text": "Emits whenever the time picker loses focus."
|
|
332
|
+
},
|
|
333
|
+
"complexType": {
|
|
334
|
+
"original": "FocusEvent",
|
|
335
|
+
"resolved": "FocusEvent",
|
|
336
|
+
"references": {
|
|
337
|
+
"FocusEvent": {
|
|
338
|
+
"location": "global",
|
|
339
|
+
"id": "global::FocusEvent"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}, {
|
|
344
|
+
"method": "b2bInput",
|
|
345
|
+
"name": "b2b-input",
|
|
346
|
+
"bubbles": true,
|
|
347
|
+
"cancelable": true,
|
|
348
|
+
"composed": true,
|
|
349
|
+
"docs": {
|
|
350
|
+
"tags": [],
|
|
351
|
+
"text": "Emits whenever the input value changes."
|
|
352
|
+
},
|
|
353
|
+
"complexType": {
|
|
354
|
+
"original": "InputChangeEvent",
|
|
355
|
+
"resolved": "InputChangeEvent",
|
|
356
|
+
"references": {
|
|
357
|
+
"InputChangeEvent": {
|
|
358
|
+
"location": "import",
|
|
359
|
+
"path": "../../utils/interfaces/form.interface",
|
|
360
|
+
"id": "src/utils/interfaces/form.interface.d.ts::InputChangeEvent"
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}, {
|
|
365
|
+
"method": "b2bChange",
|
|
366
|
+
"name": "b2b-selected",
|
|
367
|
+
"bubbles": true,
|
|
368
|
+
"cancelable": true,
|
|
369
|
+
"composed": true,
|
|
370
|
+
"docs": {
|
|
371
|
+
"tags": [],
|
|
372
|
+
"text": "Emits whenever a time is selected from the dropdown."
|
|
373
|
+
},
|
|
374
|
+
"complexType": {
|
|
375
|
+
"original": "string",
|
|
376
|
+
"resolved": "string",
|
|
377
|
+
"references": {}
|
|
378
|
+
}
|
|
379
|
+
}, {
|
|
380
|
+
"method": "b2bClear",
|
|
381
|
+
"name": "b2b-clear",
|
|
382
|
+
"bubbles": true,
|
|
383
|
+
"cancelable": true,
|
|
384
|
+
"composed": true,
|
|
385
|
+
"docs": {
|
|
386
|
+
"tags": [],
|
|
387
|
+
"text": "Emits when the user clicks the clear button."
|
|
388
|
+
},
|
|
389
|
+
"complexType": {
|
|
390
|
+
"original": "DateClear",
|
|
391
|
+
"resolved": "DateClear",
|
|
392
|
+
"references": {
|
|
393
|
+
"DateClear": {
|
|
394
|
+
"location": "import",
|
|
395
|
+
"path": "../../utils/interfaces/form.interface",
|
|
396
|
+
"id": "src/utils/interfaces/form.interface.d.ts::DateClear"
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}];
|
|
401
|
+
}
|
|
402
|
+
static get watchers() {
|
|
403
|
+
return [{
|
|
404
|
+
"propName": "interval",
|
|
405
|
+
"methodName": "handleIntervalChange"
|
|
406
|
+
}, {
|
|
407
|
+
"propName": "value",
|
|
408
|
+
"methodName": "validateValue"
|
|
409
|
+
}];
|
|
410
|
+
}
|
|
411
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 { userEvent } from "@storybook/test";
|
|
16
|
+
getArgTypes('b2b-time-picker');
|
|
17
|
+
const meta = {
|
|
18
|
+
title: 'Components/Form/Time Picker',
|
|
19
|
+
component: 'b2b-time-picker',
|
|
20
|
+
args: {
|
|
21
|
+
required: false,
|
|
22
|
+
invalid: false,
|
|
23
|
+
error: '',
|
|
24
|
+
label: 'Uhrzeit auswählen',
|
|
25
|
+
placeholder: 'hh:mm',
|
|
26
|
+
value: '',
|
|
27
|
+
interval: 15,
|
|
28
|
+
hint: 'A hint',
|
|
29
|
+
},
|
|
30
|
+
argTypes: Object.assign(Object.assign({}, getArgTypes('b2b-time-picker')), { value: Object.assign(Object.assign({}, getArgTypes('b2b-time-picker').value), { control: false }), interval: Object.assign(Object.assign({}, getArgTypes('b2b-time-picker').interval), { control: { type: 'range', min: 15, max: 60, step: 5 } }) }),
|
|
31
|
+
render: (_a) => {
|
|
32
|
+
var args = __rest(_a, []);
|
|
33
|
+
return html ` <div style="margin-left: 2px">
|
|
34
|
+
<b2b-time-picker
|
|
35
|
+
label=${args.label}
|
|
36
|
+
required=${args.required}
|
|
37
|
+
hint=${args.hint}
|
|
38
|
+
placeholder=${args.placeholder}
|
|
39
|
+
error=${args.error}
|
|
40
|
+
interval=${args.interval}
|
|
41
|
+
value=${args.value}
|
|
42
|
+
invalid=${args.invalid}></b2b-time-picker>
|
|
43
|
+
</div>`;
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export default meta;
|
|
47
|
+
export const Default = {
|
|
48
|
+
args: Object.assign(Object.assign({}, meta.args), { required: true }),
|
|
49
|
+
};
|
|
50
|
+
export const Focused = {
|
|
51
|
+
args: Object.assign({}, meta.args),
|
|
52
|
+
play: async ({ canvasElement }) => {
|
|
53
|
+
setTimeout(async () => {
|
|
54
|
+
var _a;
|
|
55
|
+
const timePicker = canvasElement.querySelector('b2b-time-picker');
|
|
56
|
+
const b2bTimePickerWrapper = (_a = timePicker.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input');
|
|
57
|
+
await userEvent.click(b2bTimePickerWrapper);
|
|
58
|
+
}, 500);
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
export const Filled = {
|
|
62
|
+
args: Object.assign(Object.assign({}, meta.args), { value: '10:30' }),
|
|
63
|
+
};
|
|
64
|
+
export const Error = {
|
|
65
|
+
args: Object.assign(Object.assign({}, meta.args), { invalid: true, error: 'This is an error message' }),
|
|
66
|
+
};
|
|
67
|
+
export const FilledWithIncorrectTime = {
|
|
68
|
+
args: Object.assign(Object.assign({}, meta.args), { invalid: true, error: 'This is an error message', value: '25:61' }),
|
|
69
|
+
};
|
|
70
|
+
export const CustomIntervalSet = {
|
|
71
|
+
args: Object.assign(Object.assign({}, meta.args), { interval: 60 }),
|
|
72
|
+
play: async ({ canvasElement }) => {
|
|
73
|
+
setTimeout(async () => {
|
|
74
|
+
var _a;
|
|
75
|
+
const timePicker = canvasElement.querySelector('b2b-time-picker');
|
|
76
|
+
const b2bTimePickerWrapper = (_a = timePicker.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input');
|
|
77
|
+
await userEvent.click(b2bTimePickerWrapper);
|
|
78
|
+
}, 500);
|
|
79
|
+
},
|
|
80
|
+
};
|
|
@@ -31,13 +31,13 @@ export class B2bToggleButtonComponent {
|
|
|
31
31
|
return Array.from(document.querySelectorAll(`b2b-toggle-button[name="${this.name}"]`)).filter((toggle) => toggle.value !== this.value);
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '087925aae07f41b1fe50efb4dceda7e3e48849bc', onClick: this.onClick }, h("span", { key: 'e85fea0b039ff481a18a8e194480e5432fcc6b80', class: {
|
|
35
35
|
'b2b-toggle-button': true,
|
|
36
36
|
'b2b-toggle-button--disabled': this.disabled,
|
|
37
|
-
} }, h("input", { key: '
|
|
37
|
+
} }, h("input", { key: 'd50119c68578e8db12e49a8a408c8b7b2611ea29', tabindex: 0, class: {
|
|
38
38
|
'b2b-toggle-button__input': true,
|
|
39
39
|
'b2b-toggle-button__input--disabled': this.disabled,
|
|
40
|
-
}, "aria-labelledby": this.name, type: "radio", checked: this.checked && !this.disabled, disabled: this.disabled, name: this.name, value: this.value }), h("label", { key: '
|
|
40
|
+
}, "aria-labelledby": this.name, type: "radio", checked: this.checked && !this.disabled, disabled: this.disabled, name: this.name, value: this.value }), h("label", { key: 'bc66888b0740d13031c0467717af4e76c4d19a67', id: this.name, tabindex: -1, class: {
|
|
41
41
|
'b2b-toggle-button__label': true,
|
|
42
42
|
'b2b-toggle-button__label--disabled': this.disabled,
|
|
43
43
|
'b2b-toggle-button__label--checked': this.checked && !this.disabled,
|
|
@@ -32,11 +32,11 @@ export class B2BToggleChipComponent {
|
|
|
32
32
|
this.disabled = false;
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: '9b02a8f340b5531879187d4ac97fccb6ae619a69' }, h("span", { key: '59994cb3e4c28bdf673d329d12d0e56e628c140b', onClick: this.onClick, onKeyDown: this.onKeyDown, class: {
|
|
36
36
|
'b2b-toggle-chip': true,
|
|
37
|
-
} }, h("input", { key: '
|
|
37
|
+
} }, h("input", { key: '7492ffd930e3ebb62f3df0cece70b2cc232444df', "aria-labelledby": this.name, tabindex: this.disabled ? -1 : 0, class: {
|
|
38
38
|
'b2b-toggle-chip__input': true,
|
|
39
|
-
}, type: "checkbox", checked: this.active && !this.disabled, disabled: this.disabled, name: this.name, value: this.value }), h("label", { key: '
|
|
39
|
+
}, type: "checkbox", checked: this.active && !this.disabled, disabled: this.disabled, name: this.name, value: this.value }), h("label", { key: 'c47d4a9483d9bccdd16722af2fd74e50f8a10257', id: this.name, tabIndex: -1, class: {
|
|
40
40
|
'b2b-toggle-chip__label': true,
|
|
41
41
|
'b2b-toggle-chip__label--active': this.active && !this.disabled,
|
|
42
42
|
'b2b-toggle-chip__label--disabled': this.disabled,
|
|
@@ -45,10 +45,10 @@ export class B2BToggleGroup {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: '99ff703edae5a8759af9e4b9093c2db32108d2cd' }, h("div", { key: 'f4b20d4fcf809ec622688866ae736233d16d90ee', class: {
|
|
49
49
|
'b2b-toggle-group': true,
|
|
50
50
|
'b2b-toggle-group--disabled': this.disabled,
|
|
51
|
-
} }, h("fieldset", { key: '
|
|
51
|
+
} }, h("fieldset", { key: '97ec3070e1935d8803c8e3b7bac17f3eb92864f1' }, h("slot", { key: '787e72239b2f2300a1150787044ad5fe38c6588e' })))));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "b2b-toggle-group"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,17 +38,17 @@ export class B2bToggleSwitchComponent {
|
|
|
38
38
|
render() {
|
|
39
39
|
// workaround for purgecss as safelist doesn't work
|
|
40
40
|
const isLeft = this.labelPosition === 'left';
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '5a9a846632b7b3cca02a79a9ed043f5ab9d1c6fa' }, h("div", { key: '115479ac6e5df73f04d6f73e01a541c805a31a63', class: {
|
|
42
42
|
'b2b-toggle': true,
|
|
43
43
|
'b2b-toggle--disabled': this.disabled,
|
|
44
44
|
'b2b-toggle--checked': this.state,
|
|
45
|
-
} }, h("div", { key: '
|
|
45
|
+
} }, h("div", { key: 'cf530d51f4fd327135935ea500193031dedefe4e', class: {
|
|
46
46
|
'b2b-toggle__label': true,
|
|
47
47
|
'b2b-toggle__label--left': isLeft,
|
|
48
|
-
} }, h("span", { key: '
|
|
48
|
+
} }, h("span", { key: 'f758117b3dbf6256bfc810dc818c63e7aa5f5597', class: "b2b-toggle__switch", role: "switch", tabIndex: 0, onKeyDown: this.onKeyDown, onClick: this.onClick }, h("svg", { key: '08626107d93016092543c78e25c82abd0fea42f3', class: {
|
|
49
49
|
'b2b-toggle__icon': true,
|
|
50
50
|
'b2b-toggle__icon--show': this.state,
|
|
51
|
-
}, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 30 30" }, h("path", { key: '
|
|
51
|
+
}, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 30 30" }, h("path", { key: 'a57ece77901fca3e09462f88cedd7d9407d7a91c', d: "M11.798 25.082c-.341 0-.681-.13-.942-.389l-7.132-7.115a1.334 1.334 0 0 1 1.884-1.888l6.19 6.175L26.391 7.307a1.334 1.334 0 0 1 1.884 1.888L12.74 24.693c-.26.259-.601.389-.942.389z" }))), this.label && (h("span", { class: {
|
|
52
52
|
'b2b-toggle__text': true,
|
|
53
53
|
'b2b-toggle__text--left': isLeft,
|
|
54
54
|
} }, this.label))))));
|
|
@@ -12,12 +12,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
import { getArgTypes } from "../../docs/config/utils";
|
|
14
14
|
import { html } from "lit-html";
|
|
15
|
-
|
|
15
|
+
export default {
|
|
16
16
|
title: 'Components/Interaction/Toggle Switch',
|
|
17
17
|
component: 'b2b-toggle-switch',
|
|
18
18
|
args: {
|
|
19
19
|
label: 'Label',
|
|
20
|
-
disabled:
|
|
20
|
+
disabled: false,
|
|
21
21
|
labelPosition: 'left',
|
|
22
22
|
state: true,
|
|
23
23
|
},
|
|
@@ -31,16 +31,22 @@ const meta = {
|
|
|
31
31
|
state="${args.state}" />`;
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
-
export
|
|
35
|
-
export const SwitchOn = {
|
|
36
|
-
args: Object.assign({}, meta.args),
|
|
37
|
-
};
|
|
34
|
+
export const SwitchOn = {};
|
|
38
35
|
export const SwitchOff = {
|
|
39
|
-
args:
|
|
36
|
+
args: {
|
|
37
|
+
disabled: false,
|
|
38
|
+
state: false,
|
|
39
|
+
},
|
|
40
40
|
};
|
|
41
41
|
export const SwitchOnDisabled = {
|
|
42
|
-
args:
|
|
42
|
+
args: {
|
|
43
|
+
state: true,
|
|
44
|
+
disabled: true,
|
|
45
|
+
},
|
|
43
46
|
};
|
|
44
47
|
export const SwitchOffDisabled = {
|
|
45
|
-
args:
|
|
48
|
+
args: {
|
|
49
|
+
state: false,
|
|
50
|
+
disabled: true,
|
|
51
|
+
},
|
|
46
52
|
};
|
|
@@ -59,13 +59,13 @@ export class B2BTooltipComponent {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: 'd433aa3cbd4216722933e50fd2613afb8be0a32a', onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave }, h("span", { key: '31a5bc21f1adc031dc0d92732659138bf4e27681', class: {
|
|
63
63
|
[`b2b-tooltip--${this.position}`]: true,
|
|
64
64
|
'b2b-tooltip__trigger': true,
|
|
65
|
-
} }, h("slot", { key: '
|
|
65
|
+
} }, h("slot", { key: 'bbec9da1933c391822594f5d555bcefe316c02f3' }), h("div", { key: '4697390b2e16363008a437b9b1af37ea82ee2660', class: {
|
|
66
66
|
'b2b-tooltip__content': true,
|
|
67
67
|
'b2b-tooltip--visible': this.opened,
|
|
68
|
-
} }, h("slot", { key: '
|
|
68
|
+
} }, h("slot", { key: '2e78f5e154563a7c0e9d2e1067e00aa56991ae0c', name: "content" }, this.content)))));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "b2b-tooltip"; }
|
|
71
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,10 +7,10 @@ export class WizardStepComponent {
|
|
|
7
7
|
this.checkIcon = true;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '6748e7f67b3cec569003e9b99c413dbdfb99f402' }, h("div", { key: '2ab2e6f5f76238bbe5e943551c7b0fb36df9d121', class: "b2b_wizard__step" }, h("b2b-wizard-icon", { key: '13b0071f3d02918551d65e22fb1511f3ca666926', step: this.step, state: this.state, checkIcon: this.checkIcon }), h("div", { key: '416cef0fe8bee41e1ee1b566ed5b9b7bc6469fb4', class: {
|
|
11
11
|
'b2b_wizard__step__label': true,
|
|
12
12
|
'b2b_wizard__step__label--default': this.state === WizardStatus.DEFAULT,
|
|
13
|
-
} }, h("slot", { key: '
|
|
13
|
+
} }, h("slot", { key: 'f06b1de799fc54b8ece414795b7ab0750a382108' })))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "b2b-wizard-step"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,7 +44,7 @@ export class WizardComponent {
|
|
|
44
44
|
this.setStepsState();
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: '489668ca4d9f27816d504f8238131697c0fe3857' }, h("div", { key: '984c7faaaf101d267b9fb89e2dd60ef4046a6443', class: "b2b_wizard" }, h("slot", { key: '87ab15ff841b158a6874cec12c4ab8c19f78df01' }))));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "b2b-wizard"; }
|
|
50
50
|
static get encapsulation() { return "shadow"; }
|