@maggioli-design-system/magma 1.11.8 → 1.12.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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/magma-components.cjs.js +1 -1
- package/dist/cjs/mds-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-accordion-timer.cjs.entry.js +1 -1
- package/dist/cjs/mds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/mds-author.cjs.entry.js +2 -2
- package/dist/cjs/mds-avatar-stack-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar-stack.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar.cjs.entry.js +1 -1
- package/dist/cjs/mds-badge.cjs.entry.js +1 -1
- package/dist/cjs/mds-banner_3.cjs.entry.js +6 -6
- package/dist/cjs/mds-benchmark-bar.cjs.entry.js +1 -1
- package/dist/cjs/mds-bibliography.cjs.entry.js +7 -7
- package/dist/cjs/mds-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/mds-button-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/mds-button-group.cjs.entry.js +1 -1
- package/dist/cjs/mds-button_3.cjs.entry.js +2 -2
- package/dist/cjs/mds-calendar_2.cjs.entry.js +246 -128
- package/dist/cjs/mds-card-content.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-header.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-media.cjs.entry.js +1 -1
- package/dist/cjs/mds-card.cjs.entry.js +1 -1
- package/dist/cjs/mds-details.cjs.entry.js +1 -1
- package/dist/cjs/mds-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/mds-emoji.cjs.entry.js +1 -1
- package/dist/cjs/mds-entity.cjs.entry.js +4 -4
- package/dist/cjs/mds-file-preview.cjs.entry.js +2 -2
- package/dist/cjs/mds-file.cjs.entry.js +3 -3
- package/dist/cjs/mds-filter-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-filter.cjs.entry.js +1 -1
- package/dist/cjs/mds-header-bar.cjs.entry.js +3 -3
- package/dist/cjs/mds-header.cjs.entry.js +2 -2
- package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/mds-hr.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-date-range.cjs.entry.js +197 -55
- package/dist/cjs/mds-input-date.cjs.entry.js +16 -10
- package/dist/cjs/mds-input.cjs.entry.js +9 -9
- package/dist/collection/components/mds-accordion/mds-accordion.js +1 -1
- package/dist/collection/components/mds-accordion-item/mds-accordion-item.js +1 -1
- package/dist/collection/components/mds-accordion-timer/mds-accordion-timer.js +1 -1
- package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.js +1 -1
- package/dist/collection/components/mds-author/mds-author.js +2 -2
- package/dist/collection/components/mds-avatar/mds-avatar.js +1 -1
- package/dist/collection/components/mds-avatar-stack/mds-avatar-stack.js +1 -1
- package/dist/collection/components/mds-avatar-stack-item/mds-avatar-stack-item.js +1 -1
- package/dist/collection/components/mds-badge/mds-badge.js +1 -1
- package/dist/collection/components/mds-banner/mds-banner.js +2 -2
- package/dist/collection/components/mds-benchmark-bar/mds-benchmark-bar.js +1 -1
- package/dist/collection/components/mds-bibliography/mds-bibliography.js +7 -7
- package/dist/collection/components/mds-breadcrumb/mds-breadcrumb.js +2 -2
- package/dist/collection/components/mds-breadcrumb-item/mds-breadcrumb-item.js +1 -1
- package/dist/collection/components/mds-button/mds-button.js +1 -1
- package/dist/collection/components/mds-button-dropdown/mds-button-dropdown.js +1 -1
- package/dist/collection/components/mds-button-group/mds-button-group.js +1 -1
- package/dist/collection/components/mds-calendar/mds-calendar.css +50 -7
- package/dist/collection/components/mds-calendar/mds-calendar.js +413 -128
- package/dist/collection/components/mds-calendar-cell/mds-calendar-cell.js +1 -1
- package/dist/collection/components/mds-card/mds-card.js +1 -1
- package/dist/collection/components/mds-card-content/mds-card-content.js +1 -1
- package/dist/collection/components/mds-card-footer/mds-card-footer.js +1 -1
- package/dist/collection/components/mds-card-header/mds-card-header.js +1 -1
- package/dist/collection/components/mds-card-media/mds-card-media.js +1 -1
- package/dist/collection/components/mds-chip/mds-chip.js +3 -3
- package/dist/collection/components/mds-details/mds-details.js +1 -1
- package/dist/collection/components/mds-dropdown/mds-dropdown.js +2 -2
- package/dist/collection/components/mds-emoji/mds-emoji.js +1 -1
- package/dist/collection/components/mds-entity/mds-entity.js +4 -4
- package/dist/collection/components/mds-file/mds-file.js +3 -3
- package/dist/collection/components/mds-file-preview/mds-file-preview.js +2 -2
- package/dist/collection/components/mds-filter/mds-filter.js +1 -1
- package/dist/collection/components/mds-filter-item/mds-filter-item.js +1 -1
- package/dist/collection/components/mds-header/mds-header.js +2 -2
- package/dist/collection/components/mds-header-bar/mds-header-bar.js +3 -3
- package/dist/collection/components/mds-help/mds-help.js +1 -1
- package/dist/collection/components/mds-horizontal-scroll/mds-horizontal-scroll.js +1 -1
- package/dist/collection/components/mds-hr/mds-hr.js +1 -1
- package/dist/collection/components/mds-icon/mds-icon.js +1 -1
- package/dist/collection/components/mds-input/mds-input.js +9 -9
- package/dist/collection/components/mds-input-date/mds-input-date.js +19 -11
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.css +33 -1
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +220 -70
- package/dist/collection/components/mds-input-date-range/test/mds-input-date-range.stories.js +10 -0
- package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +1 -1
- package/dist/components/mds-accordion-item.js +1 -1
- package/dist/components/mds-accordion-timer-item.js +1 -1
- package/dist/components/mds-accordion-timer.js +1 -1
- package/dist/components/mds-accordion.js +1 -1
- package/dist/components/mds-author.js +2 -2
- package/dist/components/mds-avatar-stack-item2.js +1 -1
- package/dist/components/mds-avatar-stack.js +1 -1
- package/dist/components/mds-avatar2.js +1 -1
- package/dist/components/mds-badge2.js +1 -1
- package/dist/components/mds-banner2.js +2 -2
- package/dist/components/mds-benchmark-bar.js +1 -1
- package/dist/components/mds-bibliography.js +7 -7
- package/dist/components/mds-breadcrumb-item.js +1 -1
- package/dist/components/mds-breadcrumb.js +2 -2
- package/dist/components/mds-button-dropdown.js +1 -1
- package/dist/components/mds-button-group.js +1 -1
- package/dist/components/mds-button2.js +1 -1
- package/dist/components/mds-calendar-cell2.js +1 -1
- package/dist/components/mds-calendar2.js +256 -128
- package/dist/components/mds-card-content.js +1 -1
- package/dist/components/mds-card-footer.js +1 -1
- package/dist/components/mds-card-header.js +1 -1
- package/dist/components/mds-card-media.js +1 -1
- package/dist/components/mds-card.js +1 -1
- package/dist/components/mds-chip2.js +3 -3
- package/dist/components/mds-details.js +1 -1
- package/dist/components/mds-dropdown2.js +2 -2
- package/dist/components/mds-emoji.js +1 -1
- package/dist/components/mds-entity.js +4 -4
- package/dist/components/mds-file-preview2.js +2 -2
- package/dist/components/mds-file.js +3 -3
- package/dist/components/mds-filter-item2.js +1 -1
- package/dist/components/mds-filter.js +1 -1
- package/dist/components/mds-header-bar.js +3 -3
- package/dist/components/mds-header.js +2 -2
- package/dist/components/mds-help2.js +1 -1
- package/dist/components/mds-horizontal-scroll.js +1 -1
- package/dist/components/mds-hr.js +1 -1
- package/dist/components/mds-icon2.js +1 -1
- package/dist/components/mds-input-date-range.js +199 -55
- package/dist/components/mds-input-date.js +17 -10
- package/dist/components/mds-input2.js +9 -9
- package/dist/documentation.json +238 -32
- package/dist/esm/loader.js +1 -1
- package/dist/esm/magma-components.js +1 -1
- package/dist/esm/mds-accordion-item.entry.js +1 -1
- package/dist/esm/mds-accordion-timer-item.entry.js +1 -1
- package/dist/esm/mds-accordion-timer.entry.js +1 -1
- package/dist/esm/mds-accordion.entry.js +1 -1
- package/dist/esm/mds-author.entry.js +2 -2
- package/dist/esm/mds-avatar-stack-item.entry.js +1 -1
- package/dist/esm/mds-avatar-stack.entry.js +1 -1
- package/dist/esm/mds-avatar.entry.js +1 -1
- package/dist/esm/mds-badge.entry.js +1 -1
- package/dist/esm/mds-banner_3.entry.js +6 -6
- package/dist/esm/mds-benchmark-bar.entry.js +1 -1
- package/dist/esm/mds-bibliography.entry.js +7 -7
- package/dist/esm/mds-breadcrumb-item.entry.js +1 -1
- package/dist/esm/mds-breadcrumb.entry.js +2 -2
- package/dist/esm/mds-button-dropdown.entry.js +1 -1
- package/dist/esm/mds-button-group.entry.js +1 -1
- package/dist/esm/mds-button_3.entry.js +2 -2
- package/dist/esm/mds-calendar_2.entry.js +246 -128
- package/dist/esm/mds-card-content.entry.js +1 -1
- package/dist/esm/mds-card-footer.entry.js +1 -1
- package/dist/esm/mds-card-header.entry.js +1 -1
- package/dist/esm/mds-card-media.entry.js +1 -1
- package/dist/esm/mds-card.entry.js +1 -1
- package/dist/esm/mds-details.entry.js +1 -1
- package/dist/esm/mds-dropdown.entry.js +2 -2
- package/dist/esm/mds-emoji.entry.js +1 -1
- package/dist/esm/mds-entity.entry.js +4 -4
- package/dist/esm/mds-file-preview.entry.js +2 -2
- package/dist/esm/mds-file.entry.js +3 -3
- package/dist/esm/mds-filter-item.entry.js +1 -1
- package/dist/esm/mds-filter.entry.js +1 -1
- package/dist/esm/mds-header-bar.entry.js +3 -3
- package/dist/esm/mds-header.entry.js +2 -2
- package/dist/esm/mds-horizontal-scroll.entry.js +1 -1
- package/dist/esm/mds-hr.entry.js +1 -1
- package/dist/esm/mds-input-date-range.entry.js +197 -55
- package/dist/esm/mds-input-date.entry.js +16 -10
- package/dist/esm/mds-input.entry.js +9 -9
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/magma-components.js +1 -1
- package/dist/esm-es5/mds-accordion-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
- package/dist/esm-es5/mds-accordion.entry.js +1 -1
- package/dist/esm-es5/mds-author.entry.js +1 -1
- package/dist/esm-es5/mds-avatar-stack-item.entry.js +1 -1
- package/dist/esm-es5/mds-avatar-stack.entry.js +1 -1
- package/dist/esm-es5/mds-avatar.entry.js +1 -1
- package/dist/esm-es5/mds-badge.entry.js +1 -1
- package/dist/esm-es5/mds-banner_3.entry.js +1 -1
- package/dist/esm-es5/mds-benchmark-bar.entry.js +1 -1
- package/dist/esm-es5/mds-bibliography.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb-item.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb.entry.js +1 -1
- package/dist/esm-es5/mds-button-dropdown.entry.js +1 -1
- package/dist/esm-es5/mds-button-group.entry.js +1 -1
- package/dist/esm-es5/mds-button_3.entry.js +1 -1
- package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
- package/dist/esm-es5/mds-card-content.entry.js +1 -1
- package/dist/esm-es5/mds-card-footer.entry.js +1 -1
- package/dist/esm-es5/mds-card-header.entry.js +1 -1
- package/dist/esm-es5/mds-card-media.entry.js +1 -1
- package/dist/esm-es5/mds-card.entry.js +1 -1
- package/dist/esm-es5/mds-details.entry.js +1 -1
- package/dist/esm-es5/mds-dropdown.entry.js +1 -1
- package/dist/esm-es5/mds-emoji.entry.js +2 -2
- package/dist/esm-es5/mds-entity.entry.js +1 -1
- package/dist/esm-es5/mds-file-preview.entry.js +1 -1
- package/dist/esm-es5/mds-file.entry.js +1 -1
- package/dist/esm-es5/mds-filter-item.entry.js +1 -1
- package/dist/esm-es5/mds-filter.entry.js +1 -1
- package/dist/esm-es5/mds-header-bar.entry.js +1 -1
- package/dist/esm-es5/mds-header.entry.js +1 -1
- package/dist/esm-es5/mds-horizontal-scroll.entry.js +1 -1
- package/dist/esm-es5/mds-hr.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range.entry.js +1 -1
- package/dist/esm-es5/mds-input-date.entry.js +1 -1
- package/dist/esm-es5/mds-input.entry.js +1 -1
- package/dist/hydrate/index.js +539 -262
- package/dist/hydrate/index.mjs +539 -262
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/{p-e3b0adb8.entry.js → p-02c9dffb.entry.js} +1 -1
- package/dist/magma-components/{p-e8626e7a.system.entry.js → p-03b5bdae.system.entry.js} +1 -1
- package/dist/magma-components/{p-fec5168f.entry.js → p-09b27f6e.entry.js} +1 -1
- package/dist/magma-components/p-09cbad84.system.entry.js +1 -0
- package/dist/magma-components/{p-0c3b813d.entry.js → p-0a9db9fc.entry.js} +1 -1
- package/dist/magma-components/{p-beeaec1c.entry.js → p-10957e40.entry.js} +1 -1
- package/dist/magma-components/{p-42f5037a.entry.js → p-14cad758.entry.js} +1 -1
- package/dist/magma-components/{p-35d85970.entry.js → p-188c906e.entry.js} +1 -1
- package/dist/magma-components/{p-91e16169.system.entry.js → p-191e79c8.system.entry.js} +1 -1
- package/dist/magma-components/{p-1a8d42d1.system.entry.js → p-1c37f4ce.system.entry.js} +1 -1
- package/dist/magma-components/{p-30648e76.system.entry.js → p-1cd6c3fe.system.entry.js} +1 -1
- package/dist/magma-components/{p-c3ae9ba7.system.entry.js → p-1f52a479.system.entry.js} +1 -1
- package/dist/magma-components/p-20e0f9e3.entry.js +1 -0
- package/dist/magma-components/p-26cd6ec8.system.js +1 -1
- package/dist/magma-components/{p-237d60e2.system.entry.js → p-2910fa0c.system.entry.js} +1 -1
- package/dist/magma-components/{p-d95c9d2e.system.entry.js → p-2d947462.system.entry.js} +1 -1
- package/dist/magma-components/{p-0b25be9f.entry.js → p-342a07c7.entry.js} +1 -1
- package/dist/magma-components/{p-b228a186.system.entry.js → p-39d9f24d.system.entry.js} +1 -1
- package/dist/magma-components/{p-27cb23f6.entry.js → p-3a57f53d.entry.js} +1 -1
- package/dist/magma-components/{p-0689710c.system.entry.js → p-3b267a52.system.entry.js} +1 -1
- package/dist/magma-components/{p-224f80f4.entry.js → p-3bf7d52c.entry.js} +1 -1
- package/dist/magma-components/{p-2de8157b.system.entry.js → p-432be440.system.entry.js} +1 -1
- package/dist/magma-components/{p-5eca660e.system.entry.js → p-43a2f192.system.entry.js} +1 -1
- package/dist/magma-components/{p-eaf4805a.entry.js → p-48a2e8e4.entry.js} +1 -1
- package/dist/magma-components/{p-ff674ef9.entry.js → p-4ab9c985.entry.js} +1 -1
- package/dist/magma-components/{p-40eeffe8.entry.js → p-4b76248b.entry.js} +1 -1
- package/dist/magma-components/{p-11df77b3.entry.js → p-4cf97724.entry.js} +1 -1
- package/dist/magma-components/{p-0e2b6dd3.system.entry.js → p-5359bf5e.system.entry.js} +1 -1
- package/dist/magma-components/{p-536b4c16.entry.js → p-5619ed51.entry.js} +1 -1
- package/dist/magma-components/{p-d738a403.system.entry.js → p-5edd2f30.system.entry.js} +1 -1
- package/dist/magma-components/{p-033e85f1.entry.js → p-606cd4bb.entry.js} +1 -1
- package/dist/magma-components/{p-e9ade624.system.entry.js → p-61c35e05.system.entry.js} +1 -1
- package/dist/magma-components/{p-6e680417.system.entry.js → p-68a7d370.system.entry.js} +1 -1
- package/dist/magma-components/{p-409c9518.system.entry.js → p-7244ca7a.system.entry.js} +1 -1
- package/dist/magma-components/{p-a9d6984e.entry.js → p-726cd93c.entry.js} +1 -1
- package/dist/magma-components/{p-c2798c9a.system.entry.js → p-7359e097.system.entry.js} +1 -1
- package/dist/magma-components/{p-723fbfb0.entry.js → p-78088de2.entry.js} +1 -1
- package/dist/magma-components/{p-83b2ee17.entry.js → p-7ae676db.entry.js} +1 -1
- package/dist/magma-components/{p-6d3ea2b6.entry.js → p-7b788f04.entry.js} +1 -1
- package/dist/magma-components/{p-b727c3a6.system.entry.js → p-80518658.system.entry.js} +1 -1
- package/dist/magma-components/{p-f6ef6105.entry.js → p-8314f381.entry.js} +1 -1
- package/dist/magma-components/{p-86f45462.entry.js → p-8469b603.entry.js} +1 -1
- package/dist/magma-components/{p-09aaa62b.system.entry.js → p-855f1617.system.entry.js} +1 -1
- package/dist/magma-components/{p-cae0e727.entry.js → p-89757b16.entry.js} +1 -1
- package/dist/magma-components/{p-60342fa8.system.entry.js → p-8bc52935.system.entry.js} +1 -1
- package/dist/magma-components/{p-6b4bf0df.entry.js → p-8f091ceb.entry.js} +1 -1
- package/dist/magma-components/{p-8859d528.entry.js → p-94fb14aa.entry.js} +1 -1
- package/dist/magma-components/{p-755dff75.system.entry.js → p-9b7e1f4b.system.entry.js} +1 -1
- package/dist/magma-components/{p-dfdc83ab.entry.js → p-9d5ab31c.entry.js} +1 -1
- package/dist/magma-components/{p-ddd59ddb.system.entry.js → p-9d86dd4c.system.entry.js} +1 -1
- package/dist/magma-components/{p-9e08e8f1.system.entry.js → p-a776c78c.system.entry.js} +1 -1
- package/dist/magma-components/{p-854848ca.entry.js → p-aacb6b47.entry.js} +1 -1
- package/dist/magma-components/{p-bdc49c99.entry.js → p-b4bad440.entry.js} +1 -1
- package/dist/magma-components/{p-3095eab8.system.entry.js → p-b7aae63a.system.entry.js} +1 -1
- package/dist/magma-components/{p-03cadeb4.system.entry.js → p-b7b0f420.system.entry.js} +1 -1
- package/dist/magma-components/{p-788e95ce.entry.js → p-ba8142cf.entry.js} +1 -1
- package/dist/magma-components/{p-84cf6604.system.entry.js → p-be5a7e23.system.entry.js} +1 -1
- package/dist/magma-components/{p-61e3603c.system.entry.js → p-c3304189.system.entry.js} +1 -1
- package/dist/magma-components/{p-a201cbab.entry.js → p-c372fe03.entry.js} +1 -1
- package/dist/magma-components/{p-b4baf323.entry.js → p-c5730248.entry.js} +1 -1
- package/dist/magma-components/{p-3e50c4ab.entry.js → p-c5d2cd00.entry.js} +1 -1
- package/dist/magma-components/p-c6785782.entry.js +1 -0
- package/dist/magma-components/p-ca4ee5b5.system.entry.js +1 -0
- package/dist/magma-components/p-d7cf7569.entry.js +1 -0
- package/dist/magma-components/{p-6d1ce884.system.entry.js → p-d98a34dc.system.entry.js} +1 -1
- package/dist/magma-components/{p-2b3517af.system.entry.js → p-d99f38a7.system.entry.js} +1 -1
- package/dist/magma-components/{p-3c2df04e.system.entry.js → p-dd7b9422.system.entry.js} +1 -1
- package/dist/magma-components/{p-58b77d4f.entry.js → p-e0bd7509.entry.js} +1 -1
- package/dist/magma-components/{p-a786264e.system.entry.js → p-e32a0ec8.system.entry.js} +1 -1
- package/dist/magma-components/{p-12527b99.system.entry.js → p-ef488f9f.system.entry.js} +1 -1
- package/dist/magma-components/{p-70223843.system.entry.js → p-f250731c.system.entry.js} +1 -1
- package/dist/magma-components/{p-8de607ef.entry.js → p-f2e7d2f0.entry.js} +1 -1
- package/dist/magma-components/{p-a9c9e071.system.entry.js → p-f349e728.system.entry.js} +1 -1
- package/dist/magma-components/{p-1c2b1a44.system.entry.js → p-f584c1d7.system.entry.js} +1 -1
- package/dist/magma-components/{p-f5f97018.entry.js → p-fd25f69a.entry.js} +1 -1
- package/dist/magma-components/{p-977d3bf0.entry.js → p-fe3879f3.entry.js} +1 -1
- package/dist/magma-components/{p-50b07c72.system.entry.js → p-ff8d8818.system.entry.js} +1 -1
- package/dist/stats.json +790 -377
- package/dist/types/components/mds-calendar/mds-calendar.d.ts +43 -1
- package/dist/types/components/mds-input-date/mds-input-date.d.ts +1 -0
- package/dist/types/components/mds-input-date-range/mds-input-date-range.d.ts +23 -4
- package/dist/types/components/mds-input-date-range/test/mds-input-date-range.stories.d.ts +12 -0
- package/dist/types/components.d.ts +94 -6
- package/package.json +1 -1
- package/dist/magma-components/p-3da97c74.system.entry.js +0 -1
- package/dist/magma-components/p-643fd688.entry.js +0 -1
- package/dist/magma-components/p-80b11d2e.entry.js +0 -1
- package/dist/magma-components/p-e1f3cc6d.entry.js +0 -1
- package/dist/magma-components/p-ead9e4c4.system.entry.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* global EventListener, HTMLMdsCalendarElement, HTMLMdsDropdownElement, HTMLMdsInputDateElement, HTMLMdsInputDateRangeElement, HTMLMdsInputDateRangePreselectionElement */
|
|
2
|
+
import { Host, h, } from "@stencil/core";
|
|
2
3
|
import miBaselineCalendarToday from "@icon/mi/baseline/calendar-today.svg";
|
|
3
4
|
import { DateTime } from "luxon";
|
|
4
5
|
import clsx from "clsx";
|
|
@@ -12,6 +13,7 @@ export class MdsInputDateRange {
|
|
|
12
13
|
this.calendarKey = 0;
|
|
13
14
|
this.internalStartDate = '';
|
|
14
15
|
this.internalEndDate = '';
|
|
16
|
+
this.visibleCalendarDate = '';
|
|
15
17
|
this.hasPreselection = false;
|
|
16
18
|
this.t = new Locale({
|
|
17
19
|
el: localeEl,
|
|
@@ -44,10 +46,16 @@ export class MdsInputDateRange {
|
|
|
44
46
|
* @description Default is 500
|
|
45
47
|
*/
|
|
46
48
|
this.delay = 500;
|
|
49
|
+
/**
|
|
50
|
+
* Enables the linked dual-calendar range picker behavior.
|
|
51
|
+
*/
|
|
52
|
+
this.dualCalendar = false;
|
|
47
53
|
this.lastEmittedStartDate = null;
|
|
48
54
|
this.lastEmittedEndDate = null;
|
|
49
55
|
this.initialStartDate = '';
|
|
50
56
|
this.initialEndDate = '';
|
|
57
|
+
this.hoveredCalendarDate = null;
|
|
58
|
+
this.syncingInputSlots = new Set();
|
|
51
59
|
this.handleFocusOut = (event) => {
|
|
52
60
|
if (!this.host.contains(event.relatedTarget)) {
|
|
53
61
|
const startValid = DateTime.fromISO(this.internalStartDate).isValid;
|
|
@@ -55,20 +63,8 @@ export class MdsInputDateRange {
|
|
|
55
63
|
if (startValid && endValid) {
|
|
56
64
|
this.validateDateRange();
|
|
57
65
|
this.syncFormValue();
|
|
58
|
-
this.dateRangeSelected.emit({
|
|
59
|
-
startDate: this.internalStartDate,
|
|
60
|
-
endDate: this.internalEndDate,
|
|
61
|
-
});
|
|
62
66
|
this.checkPreselections();
|
|
63
|
-
|
|
64
|
-
if (this.internalStartDate !== this.lastEmittedStartDate ||
|
|
65
|
-
this.internalEndDate !== this.lastEmittedEndDate) {
|
|
66
|
-
this.valueChanged.emit({
|
|
67
|
-
startDate: this.internalStartDate,
|
|
68
|
-
endDate: this.internalEndDate,
|
|
69
|
-
});
|
|
70
|
-
this.lastEmittedStartDate = this.internalStartDate;
|
|
71
|
-
this.lastEmittedEndDate = this.internalEndDate;
|
|
67
|
+
this.emitValueChanged();
|
|
72
68
|
}
|
|
73
69
|
}
|
|
74
70
|
};
|
|
@@ -91,10 +87,152 @@ export class MdsInputDateRange {
|
|
|
91
87
|
ev.stopPropagation();
|
|
92
88
|
this.focusInput(this.host.querySelector('mds-input-date[slot="end"]'));
|
|
93
89
|
};
|
|
90
|
+
this.handleCalendarHover = (ev) => {
|
|
91
|
+
if (!this.internalStartDate || this.internalEndDate) {
|
|
92
|
+
this.clearHoverPreview();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const nextHoverDate = ev.detail.hoverDate;
|
|
96
|
+
if (this.hoveredCalendarDate === nextHoverDate)
|
|
97
|
+
return;
|
|
98
|
+
this.hoveredCalendarDate = nextHoverDate;
|
|
99
|
+
this.syncCalendarsHoverAttributes();
|
|
100
|
+
};
|
|
101
|
+
this.handleCalendarChange = (ev) => {
|
|
102
|
+
this.clearHoverPreview();
|
|
103
|
+
this.internalStartDate = ev.detail.startDate;
|
|
104
|
+
this.updateInputValue('start', this.internalStartDate);
|
|
105
|
+
if (ev.detail.endDate) {
|
|
106
|
+
this.internalEndDate = ev.detail.endDate;
|
|
107
|
+
this.updateInputValue('end', this.internalEndDate);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this.internalEndDate = '';
|
|
111
|
+
this.updateInputValue('end', this.internalEndDate);
|
|
112
|
+
}
|
|
113
|
+
this.syncFormValue();
|
|
114
|
+
this.syncCalendarsSelectionAttributes();
|
|
115
|
+
if (this.internalStartDate && this.internalEndDate) {
|
|
116
|
+
this.emitValueChanged();
|
|
117
|
+
this.closeDropdownAfterSelection();
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
this.handleCalendarNavigate = (ev) => {
|
|
121
|
+
if (!this.dualCalendar)
|
|
122
|
+
return;
|
|
123
|
+
const calendars = this.getCalendars();
|
|
124
|
+
const calendarIndex = calendars.indexOf(ev.target);
|
|
125
|
+
const currentDate = DateTime.fromISO(ev.detail.currentDate);
|
|
126
|
+
if (!currentDate.isValid)
|
|
127
|
+
return;
|
|
128
|
+
this.visibleCalendarDate = currentDate
|
|
129
|
+
.minus({ months: calendarIndex === 1 ? 1 : 0 })
|
|
130
|
+
.startOf('month')
|
|
131
|
+
.toISODate();
|
|
132
|
+
};
|
|
94
133
|
}
|
|
95
134
|
async updateLang() {
|
|
96
135
|
this.language = this.t.lang(this.host);
|
|
97
136
|
}
|
|
137
|
+
getCalendars() {
|
|
138
|
+
var _a, _b;
|
|
139
|
+
return Array.from((_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('mds-calendar')) !== null && _b !== void 0 ? _b : []);
|
|
140
|
+
}
|
|
141
|
+
resolveVisibleCalendarDate(startDate, endDate) {
|
|
142
|
+
var _a;
|
|
143
|
+
const initialDates = [startDate, endDate]
|
|
144
|
+
.map(value => DateTime.fromISO(value !== null && value !== void 0 ? value : ''))
|
|
145
|
+
.filter(date => date.isValid);
|
|
146
|
+
const initialVisibleDate = (_a = initialDates[0]) !== null && _a !== void 0 ? _a : DateTime.now();
|
|
147
|
+
return initialVisibleDate.startOf('month').toISODate();
|
|
148
|
+
}
|
|
149
|
+
getCalendarViewDate(monthOffset = 0) {
|
|
150
|
+
const visibleCalendarDate = DateTime.fromISO(this.visibleCalendarDate);
|
|
151
|
+
const startDate = DateTime.fromISO(this.internalStartDate);
|
|
152
|
+
let baseDate = DateTime.now();
|
|
153
|
+
if (visibleCalendarDate.isValid) {
|
|
154
|
+
baseDate = visibleCalendarDate;
|
|
155
|
+
}
|
|
156
|
+
else if (startDate.isValid) {
|
|
157
|
+
baseDate = startDate;
|
|
158
|
+
}
|
|
159
|
+
return baseDate.startOf('month').plus({ months: monthOffset }).toISODate();
|
|
160
|
+
}
|
|
161
|
+
setVisibleCalendarDate(date) {
|
|
162
|
+
const visibleCalendarDate = DateTime.fromISO(date);
|
|
163
|
+
if (visibleCalendarDate.isValid) {
|
|
164
|
+
this.visibleCalendarDate = visibleCalendarDate.startOf('month').toISODate();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
closeDropdownAfterSelection() {
|
|
168
|
+
if (this.delay === 0)
|
|
169
|
+
return;
|
|
170
|
+
const { dropdownRef } = this;
|
|
171
|
+
if (dropdownRef) {
|
|
172
|
+
setTimeout(() => {
|
|
173
|
+
dropdownRef.visible = false;
|
|
174
|
+
}, this.delay);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
syncCalendarsSelectionAttributes() {
|
|
178
|
+
var _a;
|
|
179
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('mds-calendar').forEach(calendar => {
|
|
180
|
+
if (this.internalStartDate) {
|
|
181
|
+
calendar.setAttribute('start-date', this.internalStartDate);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
calendar.removeAttribute('start-date');
|
|
185
|
+
}
|
|
186
|
+
if (this.internalEndDate) {
|
|
187
|
+
calendar.setAttribute('end-date', this.internalEndDate);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
calendar.removeAttribute('end-date');
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
this.syncCalendarsHoverAttributes();
|
|
194
|
+
}
|
|
195
|
+
syncCalendarsHoverAttributes() {
|
|
196
|
+
var _a;
|
|
197
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('mds-calendar').forEach(calendar => {
|
|
198
|
+
if (this.hoveredCalendarDate) {
|
|
199
|
+
calendar.setAttribute('hover-date', this.hoveredCalendarDate);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
calendar.removeAttribute('hover-date');
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
clearHoverPreview() {
|
|
207
|
+
if (this.hoveredCalendarDate === null)
|
|
208
|
+
return;
|
|
209
|
+
this.hoveredCalendarDate = null;
|
|
210
|
+
this.syncCalendarsHoverAttributes();
|
|
211
|
+
}
|
|
212
|
+
getEmittableDateRangeDetail() {
|
|
213
|
+
const startDate = DateTime.fromISO(this.internalStartDate);
|
|
214
|
+
const endDate = DateTime.fromISO(this.internalEndDate);
|
|
215
|
+
if (!startDate.isValid || !endDate.isValid) {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
startDate: this.internalStartDate,
|
|
220
|
+
endDate: this.internalEndDate,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
emitValueChanged() {
|
|
224
|
+
const detail = this.getEmittableDateRangeDetail();
|
|
225
|
+
if (!detail)
|
|
226
|
+
return false;
|
|
227
|
+
if (detail.startDate === this.lastEmittedStartDate &&
|
|
228
|
+
detail.endDate === this.lastEmittedEndDate) {
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
this.valueChanged.emit(detail);
|
|
232
|
+
this.lastEmittedStartDate = detail.startDate;
|
|
233
|
+
this.lastEmittedEndDate = detail.endDate;
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
98
236
|
handleStartDateChange(newValue) {
|
|
99
237
|
this.syncExternalDate('start', newValue);
|
|
100
238
|
}
|
|
@@ -107,6 +245,7 @@ export class MdsInputDateRange {
|
|
|
107
245
|
this.internalEndDate = this.endDate;
|
|
108
246
|
this.initialStartDate = this.startDate;
|
|
109
247
|
this.initialEndDate = this.endDate;
|
|
248
|
+
this.visibleCalendarDate = this.resolveVisibleCalendarDate(this.internalStartDate, this.internalEndDate);
|
|
110
249
|
// Se max è precedente a min, imposto max uguale a min
|
|
111
250
|
if (this.min && this.max) {
|
|
112
251
|
const minDate = DateTime.fromISO(this.min);
|
|
@@ -118,10 +257,11 @@ export class MdsInputDateRange {
|
|
|
118
257
|
this.syncFormValue();
|
|
119
258
|
}
|
|
120
259
|
disconnectedCallback() {
|
|
260
|
+
var _a;
|
|
121
261
|
this.host.removeEventListener('focusout', this.handleFocusOut);
|
|
262
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('mdsCalendarHover', this.handleCalendarHover);
|
|
122
263
|
}
|
|
123
264
|
async preselect(event) {
|
|
124
|
-
var _a, _b;
|
|
125
265
|
if (!this.togglePreselection) {
|
|
126
266
|
this.togglePreselection = Array.from(this.host.querySelectorAll('mds-input-date-range-preselection'));
|
|
127
267
|
}
|
|
@@ -129,9 +269,11 @@ export class MdsInputDateRange {
|
|
|
129
269
|
element.selected = false;
|
|
130
270
|
});
|
|
131
271
|
event.caller.selected = true;
|
|
272
|
+
this.clearHoverPreview();
|
|
132
273
|
const startDate = DateTime.fromISO(event.start);
|
|
133
274
|
if (startDate.isValid) {
|
|
134
275
|
this.internalStartDate = event.start;
|
|
276
|
+
this.setVisibleCalendarDate(this.internalStartDate);
|
|
135
277
|
this.updateInputValue('start', this.internalStartDate);
|
|
136
278
|
}
|
|
137
279
|
if (event.end !== undefined) {
|
|
@@ -145,31 +287,28 @@ export class MdsInputDateRange {
|
|
|
145
287
|
}
|
|
146
288
|
this.updateInputValue('end', this.internalEndDate);
|
|
147
289
|
this.syncFormValue();
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
150
|
-
await calendar.updateCurrentDate(this.
|
|
151
|
-
|
|
152
|
-
return;
|
|
153
|
-
const { dropdownRef } = this;
|
|
154
|
-
if (dropdownRef) {
|
|
155
|
-
setTimeout(() => {
|
|
156
|
-
dropdownRef.visible = false;
|
|
157
|
-
}, this.delay);
|
|
158
|
-
}
|
|
290
|
+
const calendars = this.getCalendars();
|
|
291
|
+
if (calendars.length) {
|
|
292
|
+
await Promise.all(calendars.map((calendar, index) => calendar.updateCurrentDate(this.getCalendarViewDate(index))));
|
|
293
|
+
this.closeDropdownAfterSelection();
|
|
159
294
|
}
|
|
160
|
-
this.
|
|
295
|
+
this.emitValueChanged();
|
|
161
296
|
return Promise.resolve();
|
|
162
297
|
}
|
|
163
298
|
componentDidLoad() {
|
|
299
|
+
var _a;
|
|
164
300
|
this.updateInputListeners();
|
|
165
301
|
this.updateInputValue('start', this.internalStartDate);
|
|
166
302
|
this.updateInputValue('end', this.internalEndDate);
|
|
167
303
|
this.syncFormValue();
|
|
168
304
|
this.host.addEventListener('focusout', this.handleFocusOut);
|
|
305
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('mdsCalendarHover', this.handleCalendarHover);
|
|
169
306
|
}
|
|
170
307
|
formResetCallback() {
|
|
308
|
+
this.clearHoverPreview();
|
|
171
309
|
this.internalStartDate = this.initialStartDate;
|
|
172
310
|
this.internalEndDate = this.initialEndDate;
|
|
311
|
+
this.visibleCalendarDate = this.resolveVisibleCalendarDate(this.initialStartDate, this.initialEndDate);
|
|
173
312
|
this.updateInputValue('start', this.internalStartDate);
|
|
174
313
|
this.updateInputValue('end', this.internalEndDate);
|
|
175
314
|
this.checkPreselections();
|
|
@@ -177,10 +316,12 @@ export class MdsInputDateRange {
|
|
|
177
316
|
}
|
|
178
317
|
syncExternalDate(slotName, newValue) {
|
|
179
318
|
const normalizedValue = newValue !== null && newValue !== void 0 ? newValue : '';
|
|
319
|
+
this.clearHoverPreview();
|
|
180
320
|
if (slotName === 'start') {
|
|
181
321
|
if (normalizedValue === this.internalStartDate)
|
|
182
322
|
return;
|
|
183
323
|
this.internalStartDate = normalizedValue;
|
|
324
|
+
this.setVisibleCalendarDate(this.internalStartDate);
|
|
184
325
|
}
|
|
185
326
|
else {
|
|
186
327
|
if (normalizedValue === this.internalEndDate)
|
|
@@ -198,7 +339,12 @@ export class MdsInputDateRange {
|
|
|
198
339
|
const slot = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
|
|
199
340
|
const input = slot === null || slot === void 0 ? void 0 : slot.assignedElements()[0];
|
|
200
341
|
if (input) {
|
|
201
|
-
|
|
342
|
+
this.syncingInputSlots.add(slotName);
|
|
343
|
+
input.setValue(newValue).finally(() => {
|
|
344
|
+
requestAnimationFrame(() => {
|
|
345
|
+
this.syncingInputSlots.delete(slotName);
|
|
346
|
+
});
|
|
347
|
+
});
|
|
202
348
|
}
|
|
203
349
|
}
|
|
204
350
|
updateInputListeners() {
|
|
@@ -217,9 +363,14 @@ export class MdsInputDateRange {
|
|
|
217
363
|
}
|
|
218
364
|
createFocusoutListener(slotName) {
|
|
219
365
|
return (ev) => {
|
|
366
|
+
if (this.syncingInputSlots.has(slotName)) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
220
369
|
const event = ev;
|
|
370
|
+
this.clearHoverPreview();
|
|
221
371
|
if (slotName === 'start') {
|
|
222
372
|
this.internalStartDate = event.detail;
|
|
373
|
+
this.setVisibleCalendarDate(this.internalStartDate);
|
|
223
374
|
}
|
|
224
375
|
else {
|
|
225
376
|
this.internalEndDate = event.detail;
|
|
@@ -256,34 +407,27 @@ export class MdsInputDateRange {
|
|
|
256
407
|
});
|
|
257
408
|
}
|
|
258
409
|
}
|
|
410
|
+
renderCalendarPreselectionPanel() {
|
|
411
|
+
if (!this.hasPreselection)
|
|
412
|
+
return null;
|
|
413
|
+
return (h("div", { class: "calendar-preselection-panel" }, h("div", { class: clsx('date-preselection', this.hasPreselection && 'date-preselection--has-preselection') }, h("slot", { name: "calendar-preselection" }))));
|
|
414
|
+
}
|
|
415
|
+
renderSingleCalendar() {
|
|
416
|
+
return (h("div", { class: "calendar-single" }, this.renderCalendarPreselectionPanel(), h("mds-calendar", Object.assign({ lang: this.language, key: this.calendarKey, rangePicker: true, onMdsCalendarChange: this.handleCalendarChange, onMdsCalendarPreselect: () => {
|
|
417
|
+
this.checkPreselections();
|
|
418
|
+
}, startDate: this.internalStartDate, endDate: this.internalEndDate }, (this.min ? { min: this.min } : {}), (this.max ? { max: this.max } : {})))));
|
|
419
|
+
}
|
|
420
|
+
renderDualCalendars() {
|
|
421
|
+
return (h("div", { class: "calendars" }, this.renderCalendarPreselectionPanel(), h("mds-calendar", Object.assign({ lang: this.language, key: `${this.calendarKey}-start`, rangePicker: true, showNextButton: false, disableMonthYearSelection: true, viewDate: this.getCalendarViewDate(), onMdsCalendarNavigate: this.handleCalendarNavigate, onMdsCalendarChange: this.handleCalendarChange, onMdsCalendarPreselect: () => {
|
|
422
|
+
this.checkPreselections();
|
|
423
|
+
}, startDate: this.internalStartDate, endDate: this.internalEndDate }, (this.min ? { min: this.min } : {}), (this.max ? { max: this.max } : {}))), h("mds-calendar", Object.assign({ lang: this.language, key: `${this.calendarKey}-end`, rangePicker: true, showPreviousButton: false, disableMonthYearSelection: true, viewDate: this.getCalendarViewDate(1), onMdsCalendarNavigate: this.handleCalendarNavigate, onMdsCalendarChange: this.handleCalendarChange, onMdsCalendarPreselect: () => {
|
|
424
|
+
this.checkPreselections();
|
|
425
|
+
}, startDate: this.internalStartDate, endDate: this.internalEndDate }, (this.min ? { min: this.min } : {}), (this.max ? { max: this.max } : {})))));
|
|
426
|
+
}
|
|
259
427
|
render() {
|
|
260
|
-
return (h(Host, { key: '
|
|
428
|
+
return (h(Host, { key: '9f1d15ce17187fb4346d4a8248d9fef359235f54', onClick: this.focusDateInput }, h("div", { key: '419236ee8bead4665a0164957282bcd5e7659661', class: "inputs" }, h("div", { key: 'e25a78a35ab091ccf357ade3a27b646b94ec42a6', class: "input-element" }, h("mds-text", { key: '7d93c5d1ee1a8c690aeb18b88607f081c3785c1e', class: "date-label", typography: "detail", onClick: this.focusStartDateInput }, this.t.get('from')), h("div", { key: 'bb2b95cf1de464d9158df7aecb950af7927e7272', class: "input-wrapper" }, h("slot", { key: '57cf6f4832fe383e22e5210e8d8f1584ac0a0f34', name: "start" }))), h("div", { key: 'dd707a289ce5862549a1d98b3010861af2fe05ac', class: "input-element" }, h("mds-text", { key: '212ba05e753f6b5f04032fc9eadbee33a66abccc', class: "date-label", typography: "detail", onClick: this.focusEndDateInput }, this.t.get('to')), h("div", { key: '15cf868bb6808fd8f2bf4a8c13720e813c277d66', class: "input-wrapper" }, h("slot", { key: '788d2c3ee00fd81724f1b058971a1366f3db6172', name: "end" })))), h("div", { key: 'ca0c8be9804fdd2b7c4b7d17d234328182023f0b', class: "action-open-calendar-wrapper" }, h("mds-button", { key: '9b4beb75e39698d2877c129b346024d785d8ba98', class: "action-open-calendar", variant: "dark", tone: "quiet", icon: miBaselineCalendarToday, id: "calendar-dropdown", onClick: () => {
|
|
261
429
|
this.calendarKey += 1;
|
|
262
|
-
} }), h("mds-dropdown", { key: '
|
|
263
|
-
this.internalStartDate = ev.detail.startDate;
|
|
264
|
-
this.updateInputValue('start', this.internalStartDate);
|
|
265
|
-
if (ev.detail.endDate) {
|
|
266
|
-
this.internalEndDate = ev.detail.endDate;
|
|
267
|
-
this.updateInputValue('end', this.internalEndDate);
|
|
268
|
-
}
|
|
269
|
-
this.syncFormValue();
|
|
270
|
-
if (this.internalStartDate && this.internalEndDate) {
|
|
271
|
-
this.dateRangeSelected.emit({
|
|
272
|
-
startDate: this.internalStartDate,
|
|
273
|
-
endDate: this.internalEndDate,
|
|
274
|
-
});
|
|
275
|
-
if (this.delay === 0)
|
|
276
|
-
return;
|
|
277
|
-
const { dropdownRef } = this;
|
|
278
|
-
if (dropdownRef) {
|
|
279
|
-
setTimeout(() => {
|
|
280
|
-
dropdownRef.visible = false;
|
|
281
|
-
}, this.delay);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}, onMdsCalendarPreselect: () => {
|
|
285
|
-
this.checkPreselections();
|
|
286
|
-
}, startDate: this.internalStartDate, endDate: this.internalEndDate }, (this.min ? { min: this.min } : {}), (this.max ? { max: this.max } : {})), h("div", { key: '5f94b5fef9bdca001020776e18c79875015452c7', slot: "preselection", class: clsx('date-preselection', this.hasPreselection && 'date-preselection--has-preselection') }, h("slot", { key: '58524f199d07343671ffc752be0ed74d21c3f021', name: "calendar-preselection" }))))));
|
|
430
|
+
} })), h("mds-dropdown", { key: '3274e94a6ae30fa2f060edeaa8f906972689af63', ref: el => (this.dropdownRef = el), target: "#calendar-dropdown", "auto-placement": false, placement: "bottom-end" }, this.dualCalendar ? this.renderDualCalendars() : this.renderSingleCalendar())));
|
|
287
431
|
}
|
|
288
432
|
syncFormValue() {
|
|
289
433
|
var _a, _b, _c, _d;
|
|
@@ -425,6 +569,26 @@ export class MdsInputDateRange {
|
|
|
425
569
|
"reflect": true,
|
|
426
570
|
"defaultValue": "500"
|
|
427
571
|
},
|
|
572
|
+
"dualCalendar": {
|
|
573
|
+
"type": "boolean",
|
|
574
|
+
"mutable": false,
|
|
575
|
+
"complexType": {
|
|
576
|
+
"original": "boolean",
|
|
577
|
+
"resolved": "boolean",
|
|
578
|
+
"references": {}
|
|
579
|
+
},
|
|
580
|
+
"required": false,
|
|
581
|
+
"optional": false,
|
|
582
|
+
"docs": {
|
|
583
|
+
"tags": [],
|
|
584
|
+
"text": "Enables the linked dual-calendar range picker behavior."
|
|
585
|
+
},
|
|
586
|
+
"getter": false,
|
|
587
|
+
"setter": false,
|
|
588
|
+
"attribute": "dual-calendar",
|
|
589
|
+
"reflect": true,
|
|
590
|
+
"defaultValue": "false"
|
|
591
|
+
},
|
|
428
592
|
"name": {
|
|
429
593
|
"type": "string",
|
|
430
594
|
"mutable": false,
|
|
@@ -451,6 +615,7 @@ export class MdsInputDateRange {
|
|
|
451
615
|
"calendarKey": {},
|
|
452
616
|
"internalStartDate": {},
|
|
453
617
|
"internalEndDate": {},
|
|
618
|
+
"visibleCalendarDate": {},
|
|
454
619
|
"dropdownRef": {},
|
|
455
620
|
"hasPreselection": {},
|
|
456
621
|
"language": {}
|
|
@@ -458,21 +623,6 @@ export class MdsInputDateRange {
|
|
|
458
623
|
}
|
|
459
624
|
static get events() {
|
|
460
625
|
return [{
|
|
461
|
-
"method": "dateRangeSelected",
|
|
462
|
-
"name": "mdsInputDateRangeSelect",
|
|
463
|
-
"bubbles": true,
|
|
464
|
-
"cancelable": true,
|
|
465
|
-
"composed": true,
|
|
466
|
-
"docs": {
|
|
467
|
-
"tags": [],
|
|
468
|
-
"text": ""
|
|
469
|
-
},
|
|
470
|
-
"complexType": {
|
|
471
|
-
"original": "{ startDate: string, endDate: string }",
|
|
472
|
-
"resolved": "{ startDate: string; endDate: string; }",
|
|
473
|
-
"references": {}
|
|
474
|
-
}
|
|
475
|
-
}, {
|
|
476
626
|
"method": "valueChanged",
|
|
477
627
|
"name": "mdsInputDateRangeValueChange",
|
|
478
628
|
"bubbles": true,
|
|
@@ -483,7 +633,7 @@ export class MdsInputDateRange {
|
|
|
483
633
|
"text": ""
|
|
484
634
|
},
|
|
485
635
|
"complexType": {
|
|
486
|
-
"original": "{
|
|
636
|
+
"original": "{\n startDate: string;\n endDate: string;\n }",
|
|
487
637
|
"resolved": "{ startDate: string; endDate: string; }",
|
|
488
638
|
"references": {}
|
|
489
639
|
}
|
package/dist/collection/components/mds-input-date-range/test/mds-input-date-range.stories.js
CHANGED
|
@@ -22,6 +22,10 @@ export default {
|
|
|
22
22
|
type: { name: 'string' },
|
|
23
23
|
description: 'Specifies the max date of the range, user cannot set dates after this date',
|
|
24
24
|
},
|
|
25
|
+
'dual-calendar': {
|
|
26
|
+
type: { name: 'boolean' },
|
|
27
|
+
description: 'Enables the linked dual-calendar range picker behavior',
|
|
28
|
+
},
|
|
25
29
|
},
|
|
26
30
|
};
|
|
27
31
|
const formatDate = (date = new Date()) => {
|
|
@@ -97,3 +101,9 @@ export const MinMax = {
|
|
|
97
101
|
export const Preselection = {
|
|
98
102
|
render: TemplatePreselection,
|
|
99
103
|
};
|
|
104
|
+
export const DualCalendar = {
|
|
105
|
+
render: Template,
|
|
106
|
+
args: {
|
|
107
|
+
'dual-calendar': true,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
@@ -97,7 +97,7 @@ export class MdsKeyboardKey {
|
|
|
97
97
|
"mutable": false,
|
|
98
98
|
"complexType": {
|
|
99
99
|
"original": "KeyboardKeyName",
|
|
100
|
-
"resolved": "\"option\" | \"a\" | \"b\" | \"i\" | \"p\" | \"q\" | \"s\" | \"u\" | \"end\" | \"g\" | \"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" | \"alt\" | \"altleft\" | \"altright\" | \"arrowdown\" | \"arrowleft\" | \"arrowright\" | \"arrowup\" | \"backspace\" | \"c\" | \"capslock\" | \"command\" | \"commandleft\" | \"commandright\" | \"control\" | \"controlleft\" | \"controlright\" | \"d\" | \"delete\" | \"e\" | \"enter\" | \"escape\" | \"f\" | \"f1\" | \"f10\" | \"f11\" | \"f12\" | \"f2\" | \"f3\" | \"f4\" | \"f5\" | \"f6\" | \"f7\" | \"f8\" | \"f9\" | \"h\" | \"home\" | \"j\" | \"k\" | \"l\" | \"m\" | \"n\" | \"o\" | \"optionleft\" | \"optionright\" | \"pagedown\" | \"pageup\" | \"r\" | \"
|
|
100
|
+
"resolved": "\"option\" | \"a\" | \"b\" | \"i\" | \"p\" | \"q\" | \"s\" | \"u\" | \"end\" | \"g\" | \"shift\" | \"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" | \"alt\" | \"altleft\" | \"altright\" | \"arrowdown\" | \"arrowleft\" | \"arrowright\" | \"arrowup\" | \"backspace\" | \"c\" | \"capslock\" | \"command\" | \"commandleft\" | \"commandright\" | \"control\" | \"controlleft\" | \"controlright\" | \"d\" | \"delete\" | \"e\" | \"enter\" | \"escape\" | \"f\" | \"f1\" | \"f10\" | \"f11\" | \"f12\" | \"f2\" | \"f3\" | \"f4\" | \"f5\" | \"f6\" | \"f7\" | \"f8\" | \"f9\" | \"h\" | \"home\" | \"j\" | \"k\" | \"l\" | \"m\" | \"n\" | \"o\" | \"optionleft\" | \"optionright\" | \"pagedown\" | \"pageup\" | \"r\" | \"shiftleft\" | \"shiftright\" | \"space\" | \"t\" | \"tab\" | \"v\" | \"w\" | \"windows\" | \"windowsleft\" | \"windowsright\" | \"x\" | \"y\" | \"z\"",
|
|
101
101
|
"references": {
|
|
102
102
|
"KeyboardKeyName": {
|
|
103
103
|
"location": "import",
|
|
@@ -28,7 +28,7 @@ const MdsAccordionItem$1 = /*@__PURE__*/ proxyCustomElement(class MdsAccordionIt
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '9f1cc3117afc29a68c815ece34fbe0921fabae13' }, h("button", { key: 'c25f41a95d7ac9d17d7ec1ad40bb675ad65118b9', "aria-controls": "content", "aria-expanded": this.selected ? 'true' : 'false', class: "action", id: "action", onClick: this.toggle, role: "button", tabindex: "0" }, h("mds-text", { key: '9d2b4ecfd24756915f9ba6a90dee193c0a9a0f2e', typography: this.typography, part: "label" }, this.label), h("mds-text", { key: '9182f95912f0b7730f5490ed004823b74cb86200', "aria-hidden": "true", class: "icon-button", typography: this.typography, part: "icon" }, h("i", { key: '7b3decf33b434cafb599cfb2b92f6499a6107f75', class: "icon", innerHTML: miBaselineKeyboardArrowDown }))), h("div", { key: '25fe5e0645f12ec051d1ce9e9f21b51d820ef707', class: "content", id: "content" }, h("div", { key: '478e6dc7a2b4dfaee5bb057ca51ff2328b85350c', "aria-labelledby": "action", class: "content-expander", part: "content", role: "region" }, h("slot", { key: '9de5537e2024754883a842c5ac14431e82398f8f' })))));
|
|
32
32
|
}
|
|
33
33
|
get element() { return this; }
|
|
34
34
|
static get style() { return MdsAccordionItemStyle0; }
|
|
@@ -62,7 +62,7 @@ const MdsAccordionTimerItem$1 = /*@__PURE__*/ proxyCustomElement(class MdsAccord
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
var _a;
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: 'e9ac7110c69c963436e949ca1fd5808b8f136fa1', onMouseEnter: this.mouseEnter, onMouseLeave: this.mouseLeave }, h("div", { key: '5491150224ae59baabc2cbd43b6de279c20d1509', class: "row" }, h("mds-progress", { key: '006bd6f0750f14a867ea793fdda10dc3dfed16db', "aria-hidden": "true", class: "progress-bar", progress: Number((_a = this.progress) === null || _a === void 0 ? void 0 : _a.toFixed(2)), direction: "vertical", part: "progress" }), h("div", { key: '3ce632fb1937949599a5bbadc555a69c58bd088f', class: "accordion" }, h("button", { key: '812c73ecf6ed995caee81217ed151f22d8e138c8', "aria-controls": "content", "aria-expanded": this.selected ? 'true' : 'false', class: "action focus-bounce", id: "action", onClick: this.toggle, role: "button", tabindex: "0" }, h("mds-text", { key: '95868c912027d2ea3c182307df9720aed8f05956', typography: this.typography, part: "label" }, this.description), h("mds-text", { key: '6d82c4a96302e7c48f131431f8ed4083fd2e5ddd', "aria-hidden": "true", class: "icon-button", typography: this.typography, part: "icon" }, h("i", { key: 'a0414f53ea6652b3ee68ed3dabef5df41d0798ae', class: "icon", innerHTML: miBaselineKeyboardArrowDown }))), h("div", { key: '76c27f6162e611edf832434ac247dcd5ca58d6cc', class: "content", id: "content" }, h("div", { key: '05a2c529875c430ab5303fbae07e96aeb3d38449', "aria-label": this.description, class: "content-expander", part: "content", role: "region" }, h("slot", { key: '0ea0b8b04f1ea0211a11cf3c68e762e5104ee30a' })))))));
|
|
66
66
|
}
|
|
67
67
|
static get watchers() { return {
|
|
68
68
|
"selected": ["handleSelected"]
|
|
@@ -144,7 +144,7 @@ const MdsAccordionTimer$1 = /*@__PURE__*/ proxyCustomElement(class MdsAccordionT
|
|
|
144
144
|
this.playTimer();
|
|
145
145
|
}
|
|
146
146
|
render() {
|
|
147
|
-
return (h(Host, { key: '
|
|
147
|
+
return (h(Host, { key: '18d9351e729eed662ef37aca4db1b1da573e7973' }, h("slot", { key: 'd766385ca2efd9650ec3572a8416d89a7ceabf21' })));
|
|
148
148
|
}
|
|
149
149
|
get element() { return this; }
|
|
150
150
|
static get watchers() { return {
|
|
@@ -53,7 +53,7 @@ const MdsAccordion$1 = /*@__PURE__*/ proxyCustomElement(class MdsAccordion exten
|
|
|
53
53
|
this.changedChildrenHandler(event);
|
|
54
54
|
}
|
|
55
55
|
render() {
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: 'c408ce575006a26accb7f111ec4a27ce04fcb4ed' }, h("slot", { key: 'b24a2d755fb82ee28d0226d01be146c49f6d0ffa' })));
|
|
57
57
|
}
|
|
58
58
|
get element() { return this; }
|
|
59
59
|
static get style() { return MdsAccordionStyle0; }
|
|
@@ -13,8 +13,8 @@ const MdsAuthor$1 = /*@__PURE__*/ proxyCustomElement(class MdsAuthor extends HTM
|
|
|
13
13
|
this.hasAvatar = this.hostElement.querySelector(':scope > [slot="avatar"]') !== null;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
17
|
-
h("div", { key: '
|
|
16
|
+
return (h(Host, { key: '6e11c7c0c249596f71a1c8366260de4860d10c81' }, this.hasAvatar &&
|
|
17
|
+
h("div", { key: 'b41bd067d754ea6608621fccc51dd6029fd5f878', class: "avatar" }, h("slot", { key: '8f081d0069fabf7a36214873873a214b52289336', name: "avatar" })), h("div", { key: '025a5d5749ef5e2a3edd4d202769d525a7572337', class: "info" }, h("slot", { key: '9bfc69fc97d959e6d43a768c00b9874951362685' }))));
|
|
18
18
|
}
|
|
19
19
|
get hostElement() { return this; }
|
|
20
20
|
static get style() { return MdsAuthorStyle0; }
|
|
@@ -20,7 +20,7 @@ const MdsAvatarStackItem = /*@__PURE__*/ proxyCustomElement(class MdsAvatarStack
|
|
|
20
20
|
this.tone = 'weak';
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '5e81510d889eb20e72a5c8534f0bd415047023be' }, h("mds-avatar", { key: '7dd1b1a0eb453faee2948dfabf62d8f39ccec5aa', class: "avatar", count: this.count, initials: this.initials, src: this.src, tone: this.tone, variant: this.variant })));
|
|
24
24
|
}
|
|
25
25
|
static get style() { return MdsAvatarStackItemStyle0; }
|
|
26
26
|
}, [1, "mds-avatar-stack-item", {
|
|
@@ -20,7 +20,7 @@ const MdsAvatarStack$1 = /*@__PURE__*/ proxyCustomElement(class MdsAvatarStack e
|
|
|
20
20
|
this.items = this.host.querySelectorAll(':scope > mds-avatar-stack-item');
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '67b032fe88171cab309b73832dea41d4e5b5d279' }, h("slot", { key: '2aff2dfc024c39b1cd31ea5626972f50ce06254a' }), this.total !== undefined && this.total - this.items.length > 0 && h("mds-avatar-stack-item", { key: 'bfc70722395cbc1997a0b22888e249769344a1a4', count: this.total - this.items.length })));
|
|
24
24
|
}
|
|
25
25
|
get host() { return this; }
|
|
26
26
|
static get style() { return MdsAvatarStackStyle0; }
|
|
@@ -140,7 +140,7 @@ const MdsAvatar = /*@__PURE__*/ proxyCustomElement(class MdsAvatar extends HTMLE
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
render() {
|
|
143
|
-
return (h(Host, { key: '
|
|
143
|
+
return (h(Host, { key: 'c3306ee1be95f9d93dcb0a102cb837f7a8d6dd18' }, h("div", { key: '43368870688c2972acf1b2e2e64a986b78643f43', class: clsx('avatar', this.initials && !this.fallback && !this.src && 'avatar--initials', (this.fallback || (!this.icon && !this.initials && !this.src)) && 'avatar--fallback', this.icon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, this.initials && !this.count && !this.fallback && !this.src && h("div", { key: '05d3820664d87acd0ae30f7526c457fef57d4ffd', class: "initials-text" }, h("span", { key: 'b24f8030d87f012fb00f532db07f7862c2f7dc10', class: "fit" }, this.initials.substring(0, 2))), this.count && !this.fallback && !this.src && h("div", { key: '6412b1d878bf29eeac7e7876cfdd443130a0c50b', class: "initials-text" }, h("span", { key: '2f92908d5d316b1fd4135b2d1861efd449a524d5', class: "fit" }, "+", this.count)), this.src && !this.count && !this.fallback && !this.icon && h("mds-img", { key: '116955f0a699604d2f40796298fbd3a3803cd9e5', class: "image", loading: "lazy", onMdsImgLoadError: () => { this.loaded = true; this.fallback = true; }, onMdsImgLoadSuccess: () => { this.loaded = true; }, src: this.src }), this.icon && !this.initials && !this.count && h("mds-icon", { key: '403e8c8ff2e3232101779ba5789f52dbd0b5b028', class: "icon", part: "icon", name: this.icon }), (this.fallback || (!this.icon && !this.initials && !this.count && !this.src)) && h("i", { key: '3899d50da7833d44c2c51aeac5224f46e5b65428', class: "fallback-icon", innerHTML: miBaselinePerson }))));
|
|
144
144
|
}
|
|
145
145
|
get element() { return this; }
|
|
146
146
|
static get watchers() { return {
|
|
@@ -23,7 +23,7 @@ const MdsBadge = /*@__PURE__*/ proxyCustomElement(class MdsBadge extends HTMLEle
|
|
|
23
23
|
this.typography = 'option';
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: 'aa594b056692eb558a04e7adbfa9c677c1c7f1fb' }, h("mds-text", { key: 'de789dae87de907f8424aff3706361516a4306f4', tag: "span", typography: this.typography, variant: this.typographyVariant }, h("slot", { key: '905909c0a22767fc1de32037f0b18af0d322f7c4' }))));
|
|
27
27
|
}
|
|
28
28
|
static get style() { return MdsBadgeStyle0; }
|
|
29
29
|
}, [1, "mds-badge", {
|
|
@@ -93,9 +93,9 @@ const MdsBanner = /*@__PURE__*/ proxyCustomElement(class MdsBanner extends HTMLE
|
|
|
93
93
|
this.km.detachClickBehavior();
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: '887b88791934b25523bcb5236a539da2e9087f30', "aria-label": this.headline }, h("div", { key: 'f3b61bb544a3095ccf06470c8c493bdaa2b8c8b0', class: "body" }, this.icon && h("mds-icon", { key: 'fd9149319c9c49d2a9976a9f0ae6e7ffa8fc1fd0', "aria-hidden": "true", class: "icon", name: this.icon }), h("div", { key: '3891eb5646291187cefd68e0875a35dd67852248', class: "content" }, this.headline && h("mds-text", { key: '9b85e11b0b71fefbdc9164be7f224e77f679eb34', "aria-hidden": "true", class: "headline", typography: "h6" }, this.headline), h("div", { key: '714fe7d8063fdca951d0d94845789dd39eaf1e6d', class: "text" }, h("slot", { key: '72d818fd156c6d69b82e5584ecc641eba215823a' }))), this.deletable && h("mds-button", { key: 'feb587470ccb3799609333d5c080e2d2c8b7005a', class: "close-button", icon: miBaselineClose, onClick: this.closeBanner, title: this.t.get('cancel') })), this.actions
|
|
97
97
|
&&
|
|
98
|
-
h("div", { key: '
|
|
98
|
+
h("div", { key: 'aec5c935e8e2f934bfe6fab2291704c8d89cea0a', class: "actions" }, h("slot", { key: '9d1765d04dda9a276bb90a4d9c250bc0d403fedc', name: "action" }))));
|
|
99
99
|
}
|
|
100
100
|
get host() { return this; }
|
|
101
101
|
static get style() { return MdsBannerStyle0; }
|
|
@@ -26,7 +26,7 @@ const MdsBenchmarkBar$1 = /*@__PURE__*/ proxyCustomElement(class MdsBenchmarkBar
|
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
28
|
var _a;
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: '474d8e0d71b7602003560184e41fa0f8e8f83443' }, h("div", { key: '70fb1afe85855dec88fb88441c56a1f9a4579b5a', class: "infos" }, h("mds-text", { key: 'ad956372b7529a3fc795330dd72446f1cfd2e3cb', typography: this.typography, class: "label", id: "label" }, h("slot", { key: 'f127170421f1e85d29d3e0d459e8c06318e7e053' })), h("mds-text", { key: '5c329fd79b7585b9e6108c3e8404577dd487dc5d', typography: this.typography, class: "value" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), h("mds-progress", { key: 'fa39a1348ca1fafb356f8faf7bff06d36424b1c0', "aria-labelledby": "label", "aria-valuetext": this.alias, class: "progress", variant: this.variant, progress: this.value / 100, part: "bar" })));
|
|
30
30
|
}
|
|
31
31
|
static get style() { return MdsBenchmarkBarStyle0; }
|
|
32
32
|
}, [1, "mds-benchmark-bar", {
|