@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
|
@@ -37,7 +37,7 @@ const MdsButtonDropdown = class {
|
|
|
37
37
|
this.truncate = 'word';
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return (index.h(index.Host, { key: '
|
|
40
|
+
return (index.h(index.Host, { key: '0bb4a9850fc0a03291258f0d411b50769ec01a77' }, index.h("mds-button", { key: '8647ce67f62822980f3b030ad2f0dade027c2b1a', active: this.active, autoFocus: this.autoFocus, await: this.await, disabled: this.disabled, href: this.href, icon: this.icon, size: this.size, target: this.target, tone: this.tone, type: this.type, variant: this.variant }, this.label), index.h("mds-button", { key: '427b779bebdcf5a399b647485b26a3f271a7e813', active: this.active, autoFocus: this.autoFocus, await: this.await, class: "dropdown-action", disabled: this.disabled, href: this.href, icon: keyboardArrowDown.miBaselineKeyboardArrowDown, size: this.size, target: this.target, tone: this.tone, type: this.type, variant: this.variant }), index.h("mds-dropdown", { key: '9d20cd3ac389c3fcf6d72f39dff7a088b8d8a83b', target: '.dropdown-action', part: "dropdown" }, index.h("slot", { key: 'c366fad5c5d8d5eae317660fb26a5ee704d78b30' }))));
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
MdsButtonDropdown.style = MdsButtonDropdownStyle0;
|
|
@@ -12,7 +12,7 @@ const MdsButtonGroup = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '
|
|
15
|
+
return (index.h(index.Host, { key: 'feac7d0149984045e05c2f9f555dcde0ee4f3882' }, index.h("slot", { key: '81f58342763cc799aab7fcc3b8bd2739b64b34ce' })));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
MdsButtonGroup.style = MdsButtonGroupStyle0;
|
|
@@ -219,7 +219,7 @@ const MdsButton = class {
|
|
|
219
219
|
}
|
|
220
220
|
render() {
|
|
221
221
|
this.typography = buttonSizeTypographyVariant[this.size];
|
|
222
|
-
return (index.h(index.Host, { key: '
|
|
222
|
+
return (index.h(index.Host, { key: '4686bd8d7cb9225f100a4127b6a126377b518d19', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, index.h("div", { key: 'df39bb0ebb2a804af20924648169709397af2c7e', class: "await" }, index.h("mds-spinner", { key: '2815525a17ea474db3f4064a3bbdf6e953211b13', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && index.h("mds-icon", { key: 'f464e79898cfa4f68d05fefcb454c26e6088cfaf', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), index.h("mds-text", { key: '0f30b6ca2508f8928f4fc28c6deb28e93e963db5', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, index.h("slot", { key: '1d5d0ae7bcdf9abbc87ddbb4bea702971b618e9d', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && index.h("slot", { key: '0d9dca292a5cb40f51e4c517a399e85286047fc4', name: "notification" }), this.icon && this.iconPosition === 'right' && index.h("mds-icon", { key: 'f97aff53f85a69e3bd51517fb66f781123c37373', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
|
|
223
223
|
}
|
|
224
224
|
static get formAssociated() { return true; }
|
|
225
225
|
get host() { return index.getElement(this); }
|
|
@@ -523,7 +523,7 @@ const MdsIcon = class {
|
|
|
523
523
|
this.svgHTML = await IconsSetService.fetchSvg(this.name);
|
|
524
524
|
}
|
|
525
525
|
render() {
|
|
526
|
-
return (index.h(index.Host, { key: '
|
|
526
|
+
return (index.h(index.Host, { key: '43b9527b1f2650abead16b06c90286fea09adb34' }, this.svgHTML && index.h("i", { key: '8527fafd0f60b6aa32a2d8e35cd33e9d2403d7b5', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
|
|
527
527
|
}
|
|
528
528
|
get hostElement() { return index.getElement(this); }
|
|
529
529
|
static get watchers() { return {
|
|
@@ -13,13 +13,15 @@ const miBaselineForwardIos = `<svg xmlns="http://www.w3.org/2000/svg" width="24"
|
|
|
13
13
|
|
|
14
14
|
const miBaselineBackIosNew = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.77 3.77L16 2L6 12l10 10l1.77-1.77L9.54 12z"/></svg>`;
|
|
15
15
|
|
|
16
|
-
const mdsCalendarCss = ":host{--mds-calendar-day-number-other-month-color:rgb(var(--tone-neutral-07));--mds-calendar-day-number-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-gap:0.125rem;--mds-calendar-cell-other-month-visibility:visible;--mds-calendar-border-radius:0.5rem;--mds-calendar-background:rgb(var(--tone-neutral));--mds-calendar-padding:1rem;background-color:rgb(var(--tone-neutral-09));border-radius:var(--mds-calendar-border-radius);cursor:auto;display:-ms-inline-flexbox;display:inline-flex;max-width:380px;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content;overflow:hidden}.calendar-view{background-color:var(--mds-calendar-background);border-radius:inherit;display:grid;padding:var(--mds-calendar-padding)}.calendar-preselection{display:none;gap:0.125rem;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;padding:var(--mds-calendar-padding)}.calendar-preselection--has-preselection{display:grid}nav{display:-ms-flexbox;display:flex;gap:0.5rem;-ms-flex-pack:justify;justify-content:space-between}.action{padding-left:0.5rem;padding-right:0.5rem;-ms-flex-pack:left;justify-content:left;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content}.action-back,.action-forward{-ms-flex-negative:0;flex-shrink:0}.select-month-or-year{background-color:rgb(var(--tone-neutral-09));border-radius:
|
|
16
|
+
const mdsCalendarCss = ":host{--mds-calendar-day-number-other-month-color:rgb(var(--tone-neutral-07));--mds-calendar-day-number-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-gap:0.125rem;--mds-calendar-cell-other-month-visibility:visible;--mds-calendar-border-radius:0.5rem;--mds-calendar-background:rgb(var(--tone-neutral));--mds-calendar-padding:1rem;--mds-calendar-select-month-or-year-height:2.25rem;--mds-calendar-select-month-or-year-width:14rem;background-color:rgb(var(--tone-neutral-09));border-radius:var(--mds-calendar-border-radius);cursor:auto;display:-ms-inline-flexbox;display:inline-flex;max-width:380px;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content;overflow:hidden}.calendar-view{background-color:var(--mds-calendar-background);border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;-ms-flex:1 1 auto;flex:1 1 auto;padding:var(--mds-calendar-padding)}.calendar-preselection{display:none;gap:0.125rem;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;padding:var(--mds-calendar-padding)}.calendar-preselection--has-preselection{display:grid}nav{display:-ms-flexbox;display:flex;gap:0.5rem;-ms-flex-pack:justify;justify-content:space-between;min-width:0}.action{padding-left:0.5rem;padding-right:0.5rem;-ms-flex-pack:left;justify-content:left;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content}.action-back,.action-forward{-ms-flex-negative:0;flex-shrink:0}.select-month-or-year{-ms-flex-align:stretch;align-items:stretch;background-color:rgb(var(--tone-neutral-09));block-size:var(--mds-calendar-select-month-or-year-height);border-radius:var(--mds-calendar-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--mds-calendar-select-month-or-year-width);flex:0 0 var(--mds-calendar-select-month-or-year-width);height:var(--mds-calendar-select-month-or-year-height);-ms-flex-pack:start;justify-content:flex-start;inline-size:var(--mds-calendar-select-month-or-year-width);max-block-size:var(--mds-calendar-select-month-or-year-height);max-height:var(--mds-calendar-select-month-or-year-height);max-inline-size:var(--mds-calendar-select-month-or-year-width);min-block-size:var(--mds-calendar-select-month-or-year-height);min-height:var(--mds-calendar-select-month-or-year-height);min-inline-size:var(--mds-calendar-select-month-or-year-width);overflow:hidden}.action-month,.action-year{--mds-button-radius:0;-ms-flex-item-align:stretch;align-self:stretch;block-size:100%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:default;height:100%;max-block-size:100%;max-height:100%;min-block-size:0;min-height:0;padding-left:0.5rem;padding-right:0.5rem}.action-month{-ms-flex:1 1 auto;flex:1 1 auto;min-width:0}.action-year{-ms-flex:0 0 4.5rem;flex:0 0 4.5rem}.action-month::part(label),.action-year::part(label){overflow:visible;text-overflow:clip;white-space:nowrap}.week-day-name{-ms-flex-align:center;align-items:center;aspect-ratio:1;min-height:auto;padding:0}.month-view{display:grid}.month-view__days-names,.month-view__cells{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(7, minmax(1px, 100%));min-width:0}.month-view{display:grid}.month-view__month-names,.month-view__years{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(3, minmax(1px, 100%));min-width:0}";
|
|
17
17
|
const MdsCalendarStyle0 = mdsCalendarCss;
|
|
18
18
|
|
|
19
19
|
const MdsCalendar = class {
|
|
20
20
|
constructor(hostRef) {
|
|
21
21
|
index.registerInstance(this, hostRef);
|
|
22
22
|
this.datesEmitter = index.createEvent(this, "mdsCalendarChange", 7);
|
|
23
|
+
this.navigationEmitter = index.createEvent(this, "mdsCalendarNavigate", 7);
|
|
24
|
+
this.hoverEmitter = index.createEvent(this, "mdsCalendarHover", 7);
|
|
23
25
|
this.checkPreselectionsEmitter = index.createEvent(this, "mdsCalendarPreselect", 7);
|
|
24
26
|
this.hasPreselection = false;
|
|
25
27
|
this.currentDate = luxon.DateTime_1.now();
|
|
@@ -37,6 +39,34 @@ const MdsCalendar = class {
|
|
|
37
39
|
el: {},
|
|
38
40
|
});
|
|
39
41
|
this.rangePicker = true;
|
|
42
|
+
/**
|
|
43
|
+
* Shows the previous navigation button in the calendar header.
|
|
44
|
+
*/
|
|
45
|
+
this.showPreviousButton = true;
|
|
46
|
+
/**
|
|
47
|
+
* Shows the next navigation button in the calendar header.
|
|
48
|
+
*/
|
|
49
|
+
this.showNextButton = true;
|
|
50
|
+
/**
|
|
51
|
+
* Disables switching to month or year selection views from the calendar header.
|
|
52
|
+
*/
|
|
53
|
+
this.disableMonthYearSelection = false;
|
|
54
|
+
/**
|
|
55
|
+
* Shows the preselection area above the calendar view.
|
|
56
|
+
*/
|
|
57
|
+
this.showPreselection = false;
|
|
58
|
+
/**
|
|
59
|
+
* Specifies the date used to determine the visible month without changing the selection.
|
|
60
|
+
* @description It's in ISO format (YYYY-MM-DD).
|
|
61
|
+
* @example '2023-10-01'
|
|
62
|
+
*/
|
|
63
|
+
this.viewDate = null;
|
|
64
|
+
/**
|
|
65
|
+
* Specifies the date used to preview the range selection across multiple visible calendars.
|
|
66
|
+
* @description It's in ISO format (YYYY-MM-DD).
|
|
67
|
+
* @example '2023-10-15'
|
|
68
|
+
*/
|
|
69
|
+
this.hoverDate = null;
|
|
40
70
|
/**
|
|
41
71
|
* Specifies the start date of the selection
|
|
42
72
|
* @description It's in ISO format (YYYY-MM-DD).
|
|
@@ -65,6 +95,47 @@ const MdsCalendar = class {
|
|
|
65
95
|
this.internalEndDate = this.endDate;
|
|
66
96
|
this.currentMonth = '';
|
|
67
97
|
this.currentYear = '';
|
|
98
|
+
this.handleMouseOver = (event) => {
|
|
99
|
+
const target = event.target;
|
|
100
|
+
if (!target.matches('mds-calendar-cell') ||
|
|
101
|
+
!this.rangePicker ||
|
|
102
|
+
!this.internalStartDate ||
|
|
103
|
+
this.internalEndDate) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const hoverDate = target.getAttribute('date');
|
|
107
|
+
if (hoverDate) {
|
|
108
|
+
this.hoverEmitter.emit({ hoverDate });
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
this.handleMouseLeave = () => {
|
|
112
|
+
if (!this.rangePicker || !this.internalStartDate || this.internalEndDate || !this.hoverDate) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
this.hoverEmitter.emit({ hoverDate: null });
|
|
116
|
+
};
|
|
117
|
+
this.handleMonthActionClick = (event) => {
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
if (this.disableMonthYearSelection) {
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
this.currentView = this.currentView === 'months' ? 'calendar' : 'months';
|
|
124
|
+
requestAnimationFrame(() => {
|
|
125
|
+
this.updateCalendar().then(() => this.setDates());
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
this.handleYearActionClick = (event) => {
|
|
129
|
+
event.stopPropagation();
|
|
130
|
+
if (this.disableMonthYearSelection) {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.currentView = this.currentView === 'years' ? 'calendar' : 'years';
|
|
135
|
+
requestAnimationFrame(() => {
|
|
136
|
+
this.updateCalendar().then(() => this.setDates());
|
|
137
|
+
});
|
|
138
|
+
};
|
|
68
139
|
}
|
|
69
140
|
async updateLang() {
|
|
70
141
|
this.language = this.t.lang(this.host);
|
|
@@ -72,14 +143,25 @@ const MdsCalendar = class {
|
|
|
72
143
|
handleStartDate(newValue) {
|
|
73
144
|
if (newValue !== null && newValue !== '') {
|
|
74
145
|
this.internalStartDate = date.sanitizeISO8601Date(newValue === null || newValue === void 0 ? void 0 : newValue.toString());
|
|
146
|
+
this.startDateTime = luxon.DateTime_1.fromISO(this.internalStartDate);
|
|
147
|
+
this.startDateIdentifier = this.startDateTime.toISODate();
|
|
75
148
|
if (this.internalEndDate) {
|
|
76
|
-
const startDateTime = luxon.DateTime_1.fromISO(this.internalStartDate);
|
|
77
149
|
const endDateTime = luxon.DateTime_1.fromISO(this.internalEndDate);
|
|
78
|
-
if (startDateTime > endDateTime) {
|
|
150
|
+
if (this.startDateTime > endDateTime) {
|
|
79
151
|
console.warn('startDate is after endDate, swapping values');
|
|
80
152
|
return;
|
|
81
153
|
}
|
|
82
154
|
}
|
|
155
|
+
else if (this.rangePicker) {
|
|
156
|
+
this.isFirstClick = false;
|
|
157
|
+
}
|
|
158
|
+
this.updateDates();
|
|
159
|
+
}
|
|
160
|
+
else if (newValue === null || newValue === '') {
|
|
161
|
+
this.internalStartDate = null;
|
|
162
|
+
this.startDateIdentifier = null;
|
|
163
|
+
this.startDateTime = null;
|
|
164
|
+
this.isFirstClick = true;
|
|
83
165
|
this.updateDates();
|
|
84
166
|
}
|
|
85
167
|
}
|
|
@@ -90,21 +172,48 @@ const MdsCalendar = class {
|
|
|
90
172
|
}
|
|
91
173
|
else if (newValue !== null && newValue !== '') {
|
|
92
174
|
this.internalEndDate = date.sanitizeISO8601Date(newValue === null || newValue === void 0 ? void 0 : newValue.toString());
|
|
175
|
+
this.endDateTime = luxon.DateTime_1.fromISO(this.internalEndDate);
|
|
176
|
+
this.endDateIdentifier = this.endDateTime.toISODate();
|
|
93
177
|
if (this.internalStartDate) {
|
|
94
178
|
const startDateTime = luxon.DateTime_1.fromISO(this.internalStartDate);
|
|
95
|
-
|
|
96
|
-
if (startDateTime > endDateTime) {
|
|
179
|
+
if (startDateTime > this.endDateTime) {
|
|
97
180
|
console.warn('startDate is after endDate, swapping values');
|
|
98
181
|
return;
|
|
99
182
|
}
|
|
100
183
|
}
|
|
101
184
|
this.updateDates();
|
|
102
185
|
}
|
|
186
|
+
else if (newValue === null || newValue === '') {
|
|
187
|
+
this.internalEndDate = null;
|
|
188
|
+
this.endDateIdentifier = null;
|
|
189
|
+
this.endDateTime = null;
|
|
190
|
+
this.updateDates();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
handleViewDate(newValue) {
|
|
194
|
+
if (newValue !== null && newValue !== '') {
|
|
195
|
+
const viewDate = luxon.DateTime_1.fromISO(newValue.toString());
|
|
196
|
+
if (viewDate.isValid) {
|
|
197
|
+
this.currentDate = viewDate;
|
|
198
|
+
this.updateCalendar().then(() => {
|
|
199
|
+
requestAnimationFrame(() => this.setDates());
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
handleHoverDate() {
|
|
205
|
+
requestAnimationFrame(() => this.setDates());
|
|
103
206
|
}
|
|
104
207
|
componentWillLoad() {
|
|
105
208
|
var _a, _b;
|
|
106
209
|
this.language = this.t.lang(this.host);
|
|
107
|
-
if (this.
|
|
210
|
+
if (this.viewDate) {
|
|
211
|
+
const viewDate = luxon.DateTime_1.fromISO(this.viewDate.toString());
|
|
212
|
+
if (viewDate.isValid) {
|
|
213
|
+
this.currentDate = viewDate;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
else if (this.internalStartDate) {
|
|
108
217
|
this.internalStartDate = date.sanitizeISO8601Date((_a = this.internalStartDate) === null || _a === void 0 ? void 0 : _a.toString());
|
|
109
218
|
this.startDateTime = luxon.DateTime_1.fromISO(this.internalStartDate);
|
|
110
219
|
if (this.startDateTime.isValid) {
|
|
@@ -118,40 +227,33 @@ const MdsCalendar = class {
|
|
|
118
227
|
this.updateCalendar();
|
|
119
228
|
}
|
|
120
229
|
componentDidLoad() {
|
|
121
|
-
var _a, _b, _c;
|
|
122
|
-
this.hasPreselection =
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.handleHover(target);
|
|
127
|
-
}
|
|
128
|
-
});
|
|
230
|
+
var _a, _b, _c, _d, _e;
|
|
231
|
+
this.hasPreselection =
|
|
232
|
+
((_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector('.date-preselection--has-preselection')) !== null;
|
|
233
|
+
(_c = (_b = this.host) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.addEventListener('mouseover', this.handleMouseOver);
|
|
234
|
+
(_e = (_d = this.host) === null || _d === void 0 ? void 0 : _d.shadowRoot) === null || _e === void 0 ? void 0 : _e.addEventListener('mouseleave', this.handleMouseLeave);
|
|
129
235
|
this.setDates();
|
|
130
236
|
}
|
|
131
237
|
disconnectedCallback() {
|
|
132
|
-
var _a, _b;
|
|
133
|
-
(_b = (_a = this.host) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseover',
|
|
134
|
-
|
|
135
|
-
if (target.matches('mds-calendar-cell') && this.startDateIdentifier && this.rangePicker) {
|
|
136
|
-
this.handleHover(target);
|
|
137
|
-
}
|
|
138
|
-
});
|
|
238
|
+
var _a, _b, _c, _d;
|
|
239
|
+
(_b = (_a = this.host) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseover', this.handleMouseOver);
|
|
240
|
+
(_d = (_c = this.host) === null || _c === void 0 ? void 0 : _c.shadowRoot) === null || _d === void 0 ? void 0 : _d.removeEventListener('mouseleave', this.handleMouseLeave);
|
|
139
241
|
}
|
|
140
242
|
async updateCurrentDate(date) {
|
|
141
243
|
this.currentDate = luxon.DateTime_1.fromISO(date);
|
|
244
|
+
await this.updateCalendar();
|
|
245
|
+
await new Promise(resolve => {
|
|
246
|
+
requestAnimationFrame(() => {
|
|
247
|
+
this.setDates();
|
|
248
|
+
resolve();
|
|
249
|
+
});
|
|
250
|
+
});
|
|
142
251
|
return Promise.resolve();
|
|
143
252
|
}
|
|
144
253
|
updateDates() {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
else if (this.internalStartDate && !this.rangePicker) {
|
|
151
|
-
this.updateCalendar().then(() => {
|
|
152
|
-
requestAnimationFrame(() => this.setDates());
|
|
153
|
-
});
|
|
154
|
-
}
|
|
254
|
+
this.updateCalendar().then(() => {
|
|
255
|
+
requestAnimationFrame(() => this.setDates());
|
|
256
|
+
});
|
|
155
257
|
}
|
|
156
258
|
async updateCalendar() {
|
|
157
259
|
try {
|
|
@@ -173,25 +275,45 @@ const MdsCalendar = class {
|
|
|
173
275
|
const { shadowRoot } = calendar;
|
|
174
276
|
if (!shadowRoot)
|
|
175
277
|
return;
|
|
176
|
-
const calendarCells = shadowRoot.querySelectorAll('mds-calendar-cell[selection]');
|
|
177
|
-
if (this.
|
|
178
|
-
if (this.
|
|
179
|
-
this.
|
|
278
|
+
const calendarCells = shadowRoot.querySelectorAll('mds-calendar-cell[selection], mds-calendar-cell[preview]');
|
|
279
|
+
if (this.rangePicker) {
|
|
280
|
+
if (this.hoverDate && !this.internalEndDate) {
|
|
281
|
+
this.setHoverSelection(calendarCells, shadowRoot);
|
|
180
282
|
}
|
|
181
283
|
else {
|
|
182
|
-
this.
|
|
284
|
+
this.setRangeSelection(calendarCells, shadowRoot);
|
|
183
285
|
}
|
|
184
286
|
}
|
|
287
|
+
else {
|
|
288
|
+
this.setSingleSelection(calendarCells, shadowRoot);
|
|
289
|
+
}
|
|
185
290
|
}
|
|
186
|
-
|
|
291
|
+
clearSelectionState(calendarCells) {
|
|
187
292
|
calendarCells.forEach(day => {
|
|
188
293
|
day.removeAttribute('selection');
|
|
189
294
|
day.removeAttribute('preview');
|
|
190
295
|
});
|
|
191
|
-
|
|
296
|
+
}
|
|
297
|
+
setRangeSelection(calendarCells, shadowRoot) {
|
|
298
|
+
this.clearSelectionState(calendarCells);
|
|
299
|
+
if (!this.internalStartDate)
|
|
192
300
|
return;
|
|
193
301
|
this.startDateTime = luxon.DateTime_1.fromISO(this.internalStartDate.toString());
|
|
302
|
+
if (!this.internalEndDate) {
|
|
303
|
+
this.startDateIdentifier = this.startDateTime.toISODate();
|
|
304
|
+
this.isFirstClick = false;
|
|
305
|
+
const cells = shadowRoot.querySelectorAll('mds-calendar-cell');
|
|
306
|
+
cells.forEach(cell => {
|
|
307
|
+
if (cell.getAttribute('date') === this.startDateTime.toFormat('yyyy-MM-dd')) {
|
|
308
|
+
cell.setAttribute('selection', 'single');
|
|
309
|
+
cell.setAttribute('preview', 'true');
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
194
314
|
this.endDateTime = luxon.DateTime_1.fromISO(this.internalEndDate.toString());
|
|
315
|
+
this.startDateIdentifier = this.startDateTime.toISODate();
|
|
316
|
+
this.endDateIdentifier = this.endDateTime.toISODate();
|
|
195
317
|
const cells = shadowRoot.querySelectorAll('mds-calendar-cell');
|
|
196
318
|
if (cells) {
|
|
197
319
|
let isBetweenDates;
|
|
@@ -218,10 +340,48 @@ const MdsCalendar = class {
|
|
|
218
340
|
}
|
|
219
341
|
}
|
|
220
342
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
343
|
+
setHoverSelection(calendarCells, shadowRoot) {
|
|
344
|
+
this.clearSelectionState(calendarCells);
|
|
345
|
+
if (!this.internalStartDate || !this.hoverDate) {
|
|
346
|
+
this.setRangeSelection(calendarCells, shadowRoot);
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const startDate = luxon.DateTime_1.fromISO(this.internalStartDate);
|
|
350
|
+
const hoverDate = luxon.DateTime_1.fromISO(this.hoverDate);
|
|
351
|
+
if (!startDate.isValid || !hoverDate.isValid) {
|
|
352
|
+
this.setRangeSelection(calendarCells, shadowRoot);
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
const isForwardSelection = startDate <= hoverDate;
|
|
356
|
+
const cells = Array.from(shadowRoot.querySelectorAll('mds-calendar-cell'));
|
|
357
|
+
cells.forEach(cell => {
|
|
358
|
+
const cellDateString = cell.getAttribute('date');
|
|
359
|
+
if (!cellDateString)
|
|
360
|
+
return;
|
|
361
|
+
const cellDate = luxon.DateTime_1.fromISO(cellDateString);
|
|
362
|
+
if (!cellDate.isValid)
|
|
363
|
+
return;
|
|
364
|
+
const isInRange = isForwardSelection
|
|
365
|
+
? cellDate >= startDate && cellDate <= hoverDate
|
|
366
|
+
: cellDate >= hoverDate && cellDate <= startDate;
|
|
367
|
+
if (!isInRange)
|
|
368
|
+
return;
|
|
369
|
+
cell.setAttribute('preview', 'true');
|
|
370
|
+
let selectionType = 'middle';
|
|
371
|
+
if (startDate.equals(hoverDate) && cellDate.equals(startDate)) {
|
|
372
|
+
selectionType = 'single';
|
|
373
|
+
}
|
|
374
|
+
else if (cellDate.equals(startDate)) {
|
|
375
|
+
selectionType = isForwardSelection ? 'start' : 'end';
|
|
376
|
+
}
|
|
377
|
+
else if (cellDate.equals(hoverDate)) {
|
|
378
|
+
selectionType = isForwardSelection ? 'end' : 'start';
|
|
379
|
+
}
|
|
380
|
+
cell.setAttribute('selection', selectionType);
|
|
224
381
|
});
|
|
382
|
+
}
|
|
383
|
+
setSingleSelection(calendarCells, shadowRoot) {
|
|
384
|
+
this.clearSelectionState(calendarCells);
|
|
225
385
|
if (!this.internalStartDate)
|
|
226
386
|
return;
|
|
227
387
|
this.startDateTime = luxon.DateTime_1.fromISO(this.internalStartDate.toString());
|
|
@@ -243,6 +403,10 @@ const MdsCalendar = class {
|
|
|
243
403
|
this.updateCalendar().then(() => {
|
|
244
404
|
requestAnimationFrame(() => this.setDates());
|
|
245
405
|
});
|
|
406
|
+
this.navigationEmitter.emit({
|
|
407
|
+
currentDate: this.currentDate.toISODate(),
|
|
408
|
+
delta,
|
|
409
|
+
});
|
|
246
410
|
}
|
|
247
411
|
calculateWeekDaysInMonth() {
|
|
248
412
|
const startOfMonth = this.currentDate.startOf('month');
|
|
@@ -267,6 +431,17 @@ const MdsCalendar = class {
|
|
|
267
431
|
}
|
|
268
432
|
handleRange(element, dayInfo) {
|
|
269
433
|
var _a, _b;
|
|
434
|
+
const pendingStartDate = this.startDate || this.host.getAttribute('start-date');
|
|
435
|
+
if (this.rangePicker &&
|
|
436
|
+
pendingStartDate &&
|
|
437
|
+
!this.endDate &&
|
|
438
|
+
!this.internalEndDate &&
|
|
439
|
+
this.isFirstClick) {
|
|
440
|
+
this.internalStartDate = date.sanitizeISO8601Date(pendingStartDate.toString());
|
|
441
|
+
this.startDateTime = luxon.DateTime_1.fromISO(this.internalStartDate);
|
|
442
|
+
this.startDateIdentifier = this.startDateTime.toISODate();
|
|
443
|
+
this.isFirstClick = false;
|
|
444
|
+
}
|
|
270
445
|
const resetSelection = () => {
|
|
271
446
|
this.internalStartDate = null;
|
|
272
447
|
this.internalEndDate = null;
|
|
@@ -303,14 +478,16 @@ const MdsCalendar = class {
|
|
|
303
478
|
element.setAttribute('selection', 'single');
|
|
304
479
|
element.setAttribute('preview', 'true');
|
|
305
480
|
});
|
|
481
|
+
this.datesEmitter.emit({ startDate: this.internalStartDate });
|
|
306
482
|
return;
|
|
307
483
|
}
|
|
308
484
|
const calendar = this.host;
|
|
309
485
|
const mdsCalendarCellElements = (_a = calendar === null || calendar === void 0 ? void 0 : calendar.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('mds-calendar-cell');
|
|
310
|
-
const startDateElementIndex = Array.from(mdsCalendarCellElements !== null && mdsCalendarCellElements !== void 0 ? mdsCalendarCellElements : [])
|
|
311
|
-
.findIndex((cell) => cell.getAttribute('date') === this.startDateIdentifier);
|
|
486
|
+
const startDateElementIndex = Array.from(mdsCalendarCellElements !== null && mdsCalendarCellElements !== void 0 ? mdsCalendarCellElements : []).findIndex((cell) => cell.getAttribute('date') === this.startDateIdentifier);
|
|
312
487
|
const elementIndex = Array.from(mdsCalendarCellElements !== null && mdsCalendarCellElements !== void 0 ? mdsCalendarCellElements : []).indexOf(element);
|
|
313
|
-
if (this.startDateIdentifier &&
|
|
488
|
+
if (this.startDateIdentifier &&
|
|
489
|
+
luxon.DateTime_1.fromISO(this.startDateIdentifier) <
|
|
490
|
+
luxon.DateTime_1.fromISO(element.getAttribute('date'))) {
|
|
314
491
|
this.endDateIdentifier = element.getAttribute('date');
|
|
315
492
|
this.endDateTime = dayInfo;
|
|
316
493
|
this.internalEndDate = this.endDateTime.toISO().split('T')[0];
|
|
@@ -336,66 +513,6 @@ const MdsCalendar = class {
|
|
|
336
513
|
this.checkPreselectionsEmitter.emit();
|
|
337
514
|
}
|
|
338
515
|
}
|
|
339
|
-
handleHover(element) {
|
|
340
|
-
var _a, _b;
|
|
341
|
-
const typedElement = element;
|
|
342
|
-
const startDate = luxon.DateTime_1.fromISO(this.internalStartDate);
|
|
343
|
-
if (!startDate.isValid || this.endDateIdentifier !== null)
|
|
344
|
-
return;
|
|
345
|
-
const calendar = this.host;
|
|
346
|
-
const mdsCalendarCellElements = Array.from((_b = (_a = calendar === null || calendar === void 0 ? void 0 : calendar.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('mds-calendar-cell')) !== null && _b !== void 0 ? _b : []);
|
|
347
|
-
const hoveredDateStr = typedElement.getAttribute('date');
|
|
348
|
-
if (!hoveredDateStr)
|
|
349
|
-
return;
|
|
350
|
-
const hoveredDate = luxon.DateTime_1.fromISO(hoveredDateStr);
|
|
351
|
-
if (!hoveredDate.isValid)
|
|
352
|
-
return;
|
|
353
|
-
const startTypedElement = mdsCalendarCellElements.find(cell => cell.getAttribute('date') === this.internalStartDate);
|
|
354
|
-
mdsCalendarCellElements.forEach(cell => {
|
|
355
|
-
cell.removeAttribute('preview');
|
|
356
|
-
cell.removeAttribute('selection');
|
|
357
|
-
});
|
|
358
|
-
typedElement.setAttribute('preview', 'true');
|
|
359
|
-
const typedDateStr = typedElement.getAttribute('date');
|
|
360
|
-
if (typedDateStr) {
|
|
361
|
-
const typedDate = luxon.DateTime_1.fromISO(typedDateStr);
|
|
362
|
-
if (typedDate.isValid && startTypedElement) {
|
|
363
|
-
if (startDate < typedDate) {
|
|
364
|
-
startTypedElement.setAttribute('selection', 'start');
|
|
365
|
-
}
|
|
366
|
-
else if (startDate > typedDate) {
|
|
367
|
-
startTypedElement.setAttribute('selection', 'end');
|
|
368
|
-
typedElement.setAttribute('selection', 'start');
|
|
369
|
-
}
|
|
370
|
-
else {
|
|
371
|
-
typedElement.setAttribute('selection', 'single');
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
if (startDate.equals(hoveredDate)) {
|
|
376
|
-
typedElement.setAttribute('selection', 'single');
|
|
377
|
-
}
|
|
378
|
-
else {
|
|
379
|
-
const [start, end] = startDate < hoveredDate ? [startDate, hoveredDate] : [hoveredDate, startDate];
|
|
380
|
-
mdsCalendarCellElements.forEach(cell => {
|
|
381
|
-
const cellDateStr = cell.getAttribute('date');
|
|
382
|
-
if (!cellDateStr)
|
|
383
|
-
return;
|
|
384
|
-
const cellDate = luxon.DateTime_1.fromISO(cellDateStr);
|
|
385
|
-
if (!cellDate.isValid)
|
|
386
|
-
return;
|
|
387
|
-
if (cellDate >= start && cellDate <= end) {
|
|
388
|
-
cell.setAttribute('preview', 'true');
|
|
389
|
-
let selectionType = 'middle';
|
|
390
|
-
if (cellDate.equals(start))
|
|
391
|
-
selectionType = 'start';
|
|
392
|
-
if (cellDate.equals(end))
|
|
393
|
-
selectionType = 'end';
|
|
394
|
-
cell.setAttribute('selection', selectionType);
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
516
|
handleSingleSelection(element, dayInfo) {
|
|
400
517
|
var _a;
|
|
401
518
|
const calendar = this.host;
|
|
@@ -412,7 +529,8 @@ const MdsCalendar = class {
|
|
|
412
529
|
}
|
|
413
530
|
}
|
|
414
531
|
render() {
|
|
415
|
-
return (index.h(index.Host, { key: '
|
|
532
|
+
return (index.h(index.Host, { key: '271209054e3f86d3c167ab6f2d84c801619f7fdb' }, index.h("div", { key: '084902141f92f15f4b62ec34fc826b939f0ff05b', class: clsx.clsx('calendar-preselection', (this.showPreselection || this.hasPreselection) &&
|
|
533
|
+
'calendar-preselection--has-preselection') }, index.h("slot", { key: '986c1168978cc658b3a7409adafac5651cae7c77', name: "preselection" })), index.h("div", { key: 'bbb9882d52d1fd89758704604c3a52016535561e', class: "calendar-view" }, index.h("nav", { key: '9f993a0c44e484303716cef6530d9d95e84226a1' }, this.showPreviousButton && (index.h("mds-button", { key: 'f78027217275a9f0896fdfaa2ed99fd10064f581', class: "action-back", icon: miBaselineBackIosNew, variant: "dark", tone: "quiet", onClick: event => {
|
|
416
534
|
if (this.currentView === 'calendar') {
|
|
417
535
|
event.stopPropagation();
|
|
418
536
|
this.changeMonth(-1);
|
|
@@ -424,19 +542,7 @@ const MdsCalendar = class {
|
|
|
424
542
|
else {
|
|
425
543
|
event.stopPropagation();
|
|
426
544
|
}
|
|
427
|
-
} }), index.h("div", { key: '
|
|
428
|
-
event.stopPropagation();
|
|
429
|
-
this.currentView = this.currentView === 'months' ? 'calendar' : 'months';
|
|
430
|
-
requestAnimationFrame(() => {
|
|
431
|
-
this.updateCalendar().then(() => this.setDates());
|
|
432
|
-
});
|
|
433
|
-
} }, this.currentMonth), (this.currentView === 'calendar' || this.currentView === 'years') && index.h("mds-button", { key: 'd79d4de0219d05724b173290fa39a034324d950b', class: "action-year", variant: "dark", tone: "quiet", onClick: event => {
|
|
434
|
-
event.stopPropagation();
|
|
435
|
-
this.currentView = this.currentView === 'years' ? 'calendar' : 'years';
|
|
436
|
-
requestAnimationFrame(() => {
|
|
437
|
-
this.updateCalendar().then(() => this.setDates());
|
|
438
|
-
});
|
|
439
|
-
} }, this.currentYear)), index.h("mds-button", { key: '596683e3960b61627fbe8d774db076e2297cd99a', class: "action-forward", icon: miBaselineForwardIos, variant: "dark", tone: "quiet", onClick: event => {
|
|
545
|
+
} })), index.h("div", { key: 'e2916642b7072db24f8e800fb033260a9c2a3dcd', class: "select-month-or-year" }, (this.currentView === 'calendar' || this.currentView === 'months') && (index.h("mds-button", { key: '112c7d69205f2c57587a4ba12ecd7b445ef66170', class: "action-month", truncate: "none", variant: "dark", tone: "quiet", onClick: this.handleMonthActionClick }, this.currentMonth)), (this.currentView === 'calendar' || this.currentView === 'years') && (index.h("mds-button", { key: '91f990cfdafb34e3983f7e375e695dce5fde11fd', class: "action-year", truncate: "none", variant: "dark", tone: "quiet", onClick: this.handleYearActionClick }, this.currentYear))), this.showNextButton && (index.h("mds-button", { key: 'd297451100785c186b8ae054fa0203007f218cb7', class: "action-forward", icon: miBaselineForwardIos, variant: "dark", tone: "quiet", onClick: event => {
|
|
440
546
|
if (this.currentView === 'calendar') {
|
|
441
547
|
event.stopPropagation();
|
|
442
548
|
this.changeMonth(1);
|
|
@@ -448,11 +554,15 @@ const MdsCalendar = class {
|
|
|
448
554
|
else {
|
|
449
555
|
event.stopPropagation();
|
|
450
556
|
}
|
|
451
|
-
} })), this.currentView === 'calendar' && (index.h("section", { key: '
|
|
452
|
-
if (this.min &&
|
|
557
|
+
} }))), this.currentView === 'calendar' && (index.h("section", { key: 'bf8eba9f66065c91d0f4feac4ddbc93c1fc63ad4', class: "month-view" }, index.h("header", { key: 'c90bf7ed93129ab8bfc3ecaab99fb2d012adab39', class: "month-view__days-names" }, this.weekdays.map(day => (index.h("mds-button", { class: "week-day-name", variant: "dark", tone: "quiet" }, day)))), index.h("div", { key: '6b5fb95ad179b38fefe0986b48a3a12a287ccf61', class: "month-view__cells" }, this.weekDaysinMonth.map((dayInfo, index$1) => (index.h("mds-calendar-cell", { key: index$1, today: luxon.DateTime_1.now().toFormat('yyyy-MM-dd') === dayInfo.date.toFormat('yyyy-MM-dd'), date: dayInfo.date.toFormat('yyyy-MM-dd'), month: dayInfo.isCurrentMonth ? 'current' : 'other', disabled: (() => {
|
|
558
|
+
if (this.min &&
|
|
559
|
+
this.min !== '' &&
|
|
560
|
+
dayInfo.date < luxon.DateTime_1.fromISO(this.min)) {
|
|
453
561
|
return true;
|
|
454
562
|
}
|
|
455
|
-
if (this.max &&
|
|
563
|
+
if (this.max &&
|
|
564
|
+
this.max !== '' &&
|
|
565
|
+
dayInfo.date > luxon.DateTime_1.fromISO(this.max)) {
|
|
456
566
|
return true;
|
|
457
567
|
}
|
|
458
568
|
return undefined;
|
|
@@ -463,9 +573,15 @@ const MdsCalendar = class {
|
|
|
463
573
|
this.handleRange(target, dayInfo.date);
|
|
464
574
|
else
|
|
465
575
|
this.handleSingleSelection(target, dayInfo.date);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
|
|
576
|
+
}, title: dayInfo.date
|
|
577
|
+
.setLocale(this.language)
|
|
578
|
+
.toFormat('cccc d LLLL')
|
|
579
|
+
.replace(/^./, char => char.toUpperCase()) }, dayInfo.date.toFormat('dd'))))))), this.currentView === 'months' && (index.h("section", { key: '5353ed4497b33fb5260cf6c2d1f087b228a0cda3', class: "month-selection" }, index.h("header", { key: '70247928e4a74589900b0acd3b8d02686e41a4d1', class: "month-view__month-names" }, Array.from({ length: 12 }).map((_, index$1) => {
|
|
580
|
+
const monthName = luxon.DateTime_1.local()
|
|
581
|
+
.set({ month: index$1 + 1 })
|
|
582
|
+
.setLocale(this.language)
|
|
583
|
+
.toFormat('MMMM');
|
|
584
|
+
return (index.h("mds-button", { class: "action", variant: "dark", tone: "quiet", onClick: event => {
|
|
469
585
|
event.stopPropagation();
|
|
470
586
|
this.currentDate = this.currentDate.set({ month: index$1 + 1 });
|
|
471
587
|
this.currentMonth = this.currentDate.toFormat('MMMM');
|
|
@@ -474,9 +590,9 @@ const MdsCalendar = class {
|
|
|
474
590
|
requestAnimationFrame(() => this.setDates());
|
|
475
591
|
});
|
|
476
592
|
} }, monthName));
|
|
477
|
-
})))), this.currentView === 'years' && (index.h("section", { key: '
|
|
593
|
+
})))), this.currentView === 'years' && (index.h("section", { key: '99dca1c5f3ce083cb3bb117ce8bb705faa83e19c', class: "year-selection" }, index.h("header", { key: '7d479a8c05815560306486bf0825a521c971a6e4', class: "month-view__years" }, Array.from({ length: 12 }).map((_, index$1) => {
|
|
478
594
|
const year = this.selectedYear + index$1;
|
|
479
|
-
return (index.h("mds-button", { class:
|
|
595
|
+
return (index.h("mds-button", { class: "action", variant: "dark", tone: "quiet", onClick: event => {
|
|
480
596
|
event.stopPropagation();
|
|
481
597
|
this.currentDate = this.currentDate.set({ year });
|
|
482
598
|
this.currentYear = year.toString();
|
|
@@ -490,7 +606,9 @@ const MdsCalendar = class {
|
|
|
490
606
|
get host() { return index.getElement(this); }
|
|
491
607
|
static get watchers() { return {
|
|
492
608
|
"startDate": ["handleStartDate"],
|
|
493
|
-
"endDate": ["handleEndDate"]
|
|
609
|
+
"endDate": ["handleEndDate"],
|
|
610
|
+
"viewDate": ["handleViewDate"],
|
|
611
|
+
"hoverDate": ["handleHoverDate"]
|
|
494
612
|
}; }
|
|
495
613
|
};
|
|
496
614
|
MdsCalendar.style = MdsCalendarStyle0;
|
|
@@ -524,7 +642,7 @@ const MdsCalendarCell = class {
|
|
|
524
642
|
this.today = undefined;
|
|
525
643
|
}
|
|
526
644
|
render() {
|
|
527
|
-
return (index.h(index.Host, { key: '
|
|
645
|
+
return (index.h(index.Host, { key: '09389f01297dc7e38499fc5783fbe7b5be73cee5' }, index.h("div", { key: '6501ca7b41eed8696e60156abf53f0cbbecae8d5', class: "inner-dot" }), index.h("div", { key: '34f8e50ba0032d7d9d3dd63aafc5ac536f1a0adf', class: "area-background" }), index.h("mds-button", { key: 'bedafcb2817bfeac6ebee9fa3e0887a41a1bce9b', class: "action", variant: "dark", tone: "quiet", disabled: this.disabled }, index.h("slot", { key: '197f10e47b61a6c6140774cd3e2443df61d9e4a4' }))));
|
|
528
646
|
}
|
|
529
647
|
};
|
|
530
648
|
MdsCalendarCell.style = MdsCalendarCellStyle0;
|
|
@@ -12,7 +12,7 @@ const MdsCardContent = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '
|
|
15
|
+
return (index.h(index.Host, { key: '6d999f7edd0c6a6f9600ba642c7701c76cb2e652', slot: "content" }, index.h("slot", { key: 'd8261aefdf99a1e04ce0759351c4b112c14db22e' })));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
MdsCardContent.style = MdsCardContentStyle0;
|
|
@@ -12,7 +12,7 @@ const MdsCardFooter = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '
|
|
15
|
+
return (index.h(index.Host, { key: '27d1cfe59341aec8873e3e58b67ff878447b4e7e', slot: "footer" }, index.h("slot", { key: '1f77196c1c48afe232aaa1062d77100da3e34964' })));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
MdsCardFooter.style = MdsCardFooterStyle0;
|