@paperless/core 1.17.5 → 1.19.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/CHANGELOG.md +25 -0
- package/dist/assets/i18n/page-size-select.i18n.en.json +2 -2
- package/dist/assets/i18n/page-size-select.i18n.nl.json +2 -2
- package/dist/assets/i18n/table-footer.i18n.en.json +1 -1
- package/dist/assets/i18n/table-footer.i18n.nl.json +1 -1
- package/dist/assets/i18n/table-header.i18n.en.json +4 -4
- package/dist/assets/i18n/table-header.i18n.nl.json +4 -4
- package/dist/assets/i18n/table.i18n.en.json +15 -15
- package/dist/assets/i18n/table.i18n.nl.json +15 -15
- package/dist/assets/icons/company.svg +8 -0
- package/dist/build/p-03090f03.entry.js.map +1 -1
- package/dist/build/p-085e6ff4.entry.js.map +1 -1
- package/dist/build/p-2becd73c.entry.js.map +1 -1
- package/dist/build/p-2cb55f24.entry.js.map +1 -1
- package/dist/build/p-2cd5062f.entry.js.map +1 -1
- package/dist/build/p-35c563a7.entry.js.map +1 -1
- package/dist/build/p-415c5040.entry.js.map +1 -1
- package/dist/build/p-424d5c8a.entry.js.map +1 -1
- package/dist/build/p-46a939e2.entry.js.map +1 -1
- package/dist/build/p-4c30c74b.entry.js.map +1 -1
- package/dist/build/p-4dc5647e.entry.js.map +1 -1
- package/dist/build/p-4e9e4ce2.entry.js.map +1 -1
- package/dist/build/p-606ad811.entry.js.map +1 -1
- package/dist/build/p-682db916.entry.js.map +1 -1
- package/dist/build/p-699e0b35.entry.js.map +1 -1
- package/dist/build/p-6a5aeb90.entry.js.map +1 -1
- package/dist/build/p-7793ba3a.entry.js.map +1 -1
- package/dist/build/p-7d15ff9a.entry.js.map +1 -1
- package/dist/build/p-8426ca20.entry.js.map +1 -1
- package/dist/build/p-93052b42.entry.js.map +1 -1
- package/dist/build/p-97bcf0b5.entry.js.map +1 -1
- package/dist/build/p-9c914665.entry.js.map +1 -1
- package/dist/build/p-9d3d72fa.entry.js.map +1 -1
- package/dist/build/p-a2b552f9.entry.js.map +1 -1
- package/dist/build/p-a7344d53.entry.js +2 -0
- package/dist/build/p-a7344d53.entry.js.map +1 -0
- package/dist/build/p-af6b813e.entry.js.map +1 -1
- package/dist/build/p-b6f43309.entry.js.map +1 -1
- package/dist/build/p-b7c0f157.entry.js.map +1 -1
- package/dist/build/p-c9b840a7.entry.js.map +1 -1
- package/dist/build/p-cb2674b5.entry.js.map +1 -1
- package/dist/build/p-cf7bd354.entry.js.map +1 -1
- package/dist/build/p-d0796984.entry.js.map +1 -1
- package/dist/build/p-d23db949.entry.js.map +1 -1
- package/dist/build/p-dace47c5.entry.js.map +1 -1
- package/dist/build/p-daeadc69.entry.js +2 -0
- package/dist/build/p-daeadc69.entry.js.map +1 -0
- package/dist/build/p-dd20caf1.entry.js.map +1 -1
- package/dist/build/p-dfa8eae9.entry.js +2 -0
- package/dist/build/p-dfa8eae9.entry.js.map +1 -0
- package/dist/build/p-ec15ee73.entry.js.map +1 -1
- package/dist/build/p-ec29eed0.entry.js.map +1 -1
- package/dist/build/p-f0f1a46b.entry.js.map +1 -1
- package/dist/build/p-f34e08ec.entry.js.map +1 -1
- package/dist/build/p-f9e52ae3.entry.js.map +1 -1
- package/dist/build/p-fac13366.entry.js.map +1 -1
- package/dist/build/paperless.css +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/index-1fde8b14.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/p-attachment.cjs.entry.js.map +1 -1
- package/dist/cjs/p-avatar-group.cjs.entry.js.map +1 -1
- package/dist/cjs/p-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +10 -5
- package/dist/cjs/p-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-calendar.cjs.entry.js +2 -2
- package/dist/cjs/p-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-card-body.cjs.entry.js.map +1 -1
- package/dist/cjs/p-card-container.cjs.entry.js.map +1 -1
- package/dist/cjs/p-card-header.cjs.entry.js.map +1 -1
- package/dist/cjs/p-content-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/p-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/p-cropper.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/p-drawer-body_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/p-dropdown-menu-container.cjs.entry.js.map +1 -1
- package/dist/cjs/p-dropdown_2.cjs.entry.js +7 -2
- package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js +40 -40
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js.map +1 -1
- package/dist/cjs/p-helper_3.cjs.entry.js +4 -4
- package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-info-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/p-label_3.cjs.entry.js +1 -1
- package/dist/cjs/p-label_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-layout.cjs.entry.js.map +1 -1
- package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/p-navbar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/p-page-size-select_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-profile.cjs.entry.js.map +1 -1
- package/dist/cjs/p-select.cjs.entry.js +136 -18
- package/dist/cjs/p-select.cjs.entry.js.map +1 -1
- package/dist/cjs/p-slider-indicator.cjs.entry.js.map +1 -1
- package/dist/cjs/p-status.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper-line.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tab-item.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table-column.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/p-toast-container.cjs.entry.js.map +1 -1
- package/dist/cjs/p-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/assets/icons/company.svg +8 -0
- package/dist/collection/components/atoms/avatar/avatar.component.js +1 -1
- package/dist/collection/components/atoms/avatar/avatar.component.js.map +1 -1
- package/dist/collection/components/atoms/avatar/test/avatar.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/avatar/test/avatar.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.js.map +1 -1
- package/dist/collection/components/atoms/avatar-group/test/avatar-group.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/avatar-group/test/avatar-group.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/backdrop/backdrop.component.js +1 -1
- package/dist/collection/components/atoms/backdrop/backdrop.component.js.map +1 -1
- package/dist/collection/components/atoms/backdrop/test/backdrop.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/backdrop/test/backdrop.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/button/button.component.js +1 -1
- package/dist/collection/components/atoms/button/button.component.js.map +1 -1
- package/dist/collection/components/atoms/button/test/button.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/button/test/button.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/card-body/card-body.component.js.map +1 -1
- package/dist/collection/components/atoms/card-body/test/card-body.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/card-body/test/card-body.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/card-container/card-container.component.js.map +1 -1
- package/dist/collection/components/atoms/card-container/test/card-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/card-container/test/card-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/card-header/card-header.component.js.map +1 -1
- package/dist/collection/components/atoms/card-header/test/card-header.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/card-header/test/card-header.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/counter/counter.component.js.map +1 -1
- package/dist/collection/components/atoms/counter/test/counter.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/counter/test/counter.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/divider/divider.component.js.map +1 -1
- package/dist/collection/components/atoms/divider/test/divider.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/divider/test/divider.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.js.map +1 -1
- package/dist/collection/components/atoms/drawer-body/test/drawer-body.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/drawer-body/test/drawer-body.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/drawer-container/drawer-container.component.js.map +1 -1
- package/dist/collection/components/atoms/drawer-container/test/drawer-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/drawer-container/test/drawer-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/drawer-header/drawer-header.component.js.map +1 -1
- package/dist/collection/components/atoms/drawer-header/test/drawer-header.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/drawer-header/test/drawer-header.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-container/test/dropdown-menu-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-container/test/dropdown-menu-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +22 -3
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/test/dropdown-menu-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/test/dropdown-menu-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-container/floating-menu-container.component.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-container/test/floating-menu-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-container/test/floating-menu-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-item/test/floating-menu-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-item/test/floating-menu-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/helper/helper.component.js.map +1 -1
- package/dist/collection/components/atoms/helper/test/helper.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/helper/test/helper.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/icon/icon.component.js +1 -1
- package/dist/collection/components/atoms/icon/icon.component.js.map +1 -1
- package/dist/collection/components/atoms/icon/test/icon.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/icon/test/icon.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/illustration/illustration.component.js +1 -1
- package/dist/collection/components/atoms/illustration/illustration.component.js.map +1 -1
- package/dist/collection/components/atoms/illustration/test/illustration.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/illustration/test/illustration.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/info-panel/info-panel.component.js.map +1 -1
- package/dist/collection/components/atoms/info-panel/test/info-panel.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/info-panel/test/info-panel.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/label/label.component.js +3 -3
- package/dist/collection/components/atoms/label/label.component.js.map +1 -1
- package/dist/collection/components/atoms/label/test/label.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/label/test/label.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/layout/layout.component.js.map +1 -1
- package/dist/collection/components/atoms/layout/test/layout.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/layout/test/layout.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/loader/loader.component.js +1 -1
- package/dist/collection/components/atoms/loader/loader.component.js.map +1 -1
- package/dist/collection/components/atoms/loader/test/loader.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/loader/test/loader.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.js.map +1 -1
- package/dist/collection/components/atoms/modal-body/test/modal-body.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/modal-body/test/modal-body.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/modal-container/modal-container.component.js.map +1 -1
- package/dist/collection/components/atoms/modal-container/test/modal-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/modal-container/test/modal-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.js.map +1 -1
- package/dist/collection/components/atoms/modal-footer/test/modal-footer.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/modal-footer/test/modal-footer.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/modal-header/modal-header.component.js.map +1 -1
- package/dist/collection/components/atoms/modal-header/test/modal-header.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/modal-header/test/modal-header.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.js.map +1 -1
- package/dist/collection/components/atoms/pagination-item/test/pagination-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/pagination-item/test/pagination-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/segment-container/segment-container.component.js.map +1 -1
- package/dist/collection/components/atoms/segment-container/test/segment-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/segment-container/test/segment-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/segment-item/segment-item.component.js +2 -2
- package/dist/collection/components/atoms/segment-item/segment-item.component.js.map +1 -1
- package/dist/collection/components/atoms/segment-item/test/segment-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/segment-item/test/segment-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js.map +1 -1
- package/dist/collection/components/atoms/slider-indicator/test/slider-indicator.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/slider-indicator/test/slider-indicator.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/status/status.component.js +1 -1
- package/dist/collection/components/atoms/status/status.component.js.map +1 -1
- package/dist/collection/components/atoms/status/test/status.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/status/test/status.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.js.map +1 -1
- package/dist/collection/components/atoms/stepper-item/test/stepper-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/stepper-item/test/stepper-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.js.map +1 -1
- package/dist/collection/components/atoms/stepper-line/test/stepper-line.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/stepper-line/test/stepper-line.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/tab-group/tab-group.component.js.map +1 -1
- package/dist/collection/components/atoms/tab-group/test/tab-group.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/tab-group/test/tab-group.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/tab-item/tab-item.component.js.map +1 -1
- package/dist/collection/components/atoms/tab-item/test/tab-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/tab-item/test/tab-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/table-container/table-container.component.js.map +1 -1
- package/dist/collection/components/atoms/table-container/test/table-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/table-container/test/table-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/toast-container/test/toast-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/toast-container/test/toast-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/toast-container/toast-container.component.js.map +1 -1
- package/dist/collection/components/atoms/tooltip/test/tooltip.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/tooltip/test/tooltip.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/tooltip/tooltip.component.js.map +1 -1
- package/dist/collection/components/helpers/table-column/table-column.component.js +1 -1
- package/dist/collection/components/helpers/table-column/table-column.component.js.map +1 -1
- package/dist/collection/components/molecules/accordion/accordion.component.js.map +1 -1
- package/dist/collection/components/molecules/accordion/test/accordion.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/accordion/test/accordion.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -1
- package/dist/collection/components/molecules/attachment/test/attachment.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/attachment/test/attachment.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +2 -2
- package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -1
- package/dist/collection/components/molecules/calendar/test/calendar.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/calendar/test/calendar.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/content-slider/content-slider.component.js.map +1 -1
- package/dist/collection/components/molecules/content-slider/test/content-slider.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/content-slider/test/content-slider.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/cropper/cropper.component.js.map +1 -1
- package/dist/collection/components/molecules/cropper/test/cropper.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/cropper/test/cropper.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/test/datepicker.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/test/datepicker.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +22 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -1
- package/dist/collection/components/molecules/dropdown/test/dropdown.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/dropdown/test/dropdown.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/input-error/input-error.component.js.map +1 -1
- package/dist/collection/components/molecules/input-error/test/input-error.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/input-error/test/input-error.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/input-group/input-group.component.js +5 -5
- package/dist/collection/components/molecules/input-group/input-group.component.js.map +1 -1
- package/dist/collection/components/molecules/input-group/test/input-group.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/input-group/test/input-group.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +1 -1
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js.map +1 -1
- package/dist/collection/components/molecules/navigation-item/test/navigation-item.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/navigation-item/test/navigation-item.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/page-size-select/page-size-select.component.js +2 -2
- package/dist/collection/components/molecules/page-size-select/page-size-select.component.js.map +1 -1
- package/dist/collection/components/molecules/page-size-select/test/page-size-select.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/page-size-select/test/page-size-select.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/pagination/pagination.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pagination.component.js.map +1 -1
- package/dist/collection/components/molecules/pagination/test/pagination.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/pagination/test/pagination.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/profile/profile.component.js.map +1 -1
- package/dist/collection/components/molecules/profile/test/profile.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/profile/test/profile.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/select/select.component.css +1 -1
- package/dist/collection/components/molecules/select/select.component.js +239 -19
- package/dist/collection/components/molecules/select/select.component.js.map +1 -1
- package/dist/collection/components/molecules/select/test/select.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/select/test/select.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/stepper/stepper.component.js.map +1 -1
- package/dist/collection/components/molecules/stepper/test/stepper.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/stepper/test/stepper.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/table-cell/table-cell.component.js +40 -40
- package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -1
- package/dist/collection/components/molecules/table-cell/test/table-cell.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/table-cell/test/table-cell.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/table-footer/table-footer.component.js +2 -2
- package/dist/collection/components/molecules/table-footer/table-footer.component.js.map +1 -1
- package/dist/collection/components/molecules/table-footer/test/table-footer.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/table-footer/test/table-footer.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/table-header/table-header.component.js +1 -1
- package/dist/collection/components/molecules/table-header/table-header.component.js.map +1 -1
- package/dist/collection/components/molecules/table-header/test/table-header.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/table-header/test/table-header.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -1
- package/dist/collection/components/molecules/table-row/test/table-row.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/table-row/test/table-row.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/toast/test/toast.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/toast/test/toast.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/toast/toast.component.js +1 -1
- package/dist/collection/components/molecules/toast/toast.component.js.map +1 -1
- package/dist/collection/components/organisms/drawer/drawer.component.js +2 -2
- package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -1
- package/dist/collection/components/organisms/drawer/test/drawer.component.e2e.js.map +1 -1
- package/dist/collection/components/organisms/drawer/test/drawer.component.spec.js.map +1 -1
- package/dist/collection/components/organisms/modal/modal.component.js.map +1 -1
- package/dist/collection/components/organisms/modal/test/modal.component.e2e.js.map +1 -1
- package/dist/collection/components/organisms/modal/test/modal.component.spec.js.map +1 -1
- package/dist/collection/components/organisms/navbar/navbar.component.js.map +1 -1
- package/dist/collection/components/organisms/navbar/test/navbar.component.e2e.js.map +1 -1
- package/dist/collection/components/organisms/navbar/test/navbar.component.spec.js.map +1 -1
- package/dist/collection/components/organisms/table/table.component.js +7 -7
- package/dist/collection/components/organisms/table/table.component.js.map +1 -1
- package/dist/collection/components/organisms/table/test/table.component.e2e.js.map +1 -1
- package/dist/collection/components/organisms/table/test/table.component.spec.js.map +1 -1
- package/dist/collection/utils/icons.js +2 -2
- package/dist/collection/utils/icons.js.map +1 -1
- package/dist/components/avatar.component.js +70 -0
- package/dist/components/avatar.component.js.map +1 -0
- package/dist/components/backdrop.component.js.map +1 -1
- package/dist/components/button.component.js.map +1 -1
- package/dist/components/calendar.component.js +2 -2
- package/dist/components/calendar.component.js.map +1 -1
- package/dist/components/counter.component.js.map +1 -1
- package/dist/components/divider.component.js.map +1 -1
- package/dist/components/drawer-body.component.js.map +1 -1
- package/dist/components/drawer-container.component.js.map +1 -1
- package/dist/components/drawer-header.component.js.map +1 -1
- package/dist/components/dropdown-menu-container.component.js.map +1 -1
- package/dist/components/dropdown-menu-item.component.js +4 -2
- package/dist/components/dropdown-menu-item.component.js.map +1 -1
- package/dist/components/dropdown.component.js +5 -0
- package/dist/components/dropdown.component.js.map +1 -1
- package/dist/components/floating-menu-container.component.js.map +1 -1
- package/dist/components/floating-menu-item.component.js.map +1 -1
- package/dist/components/helper.component.js.map +1 -1
- package/dist/components/icon.component.js +10 -5
- package/dist/components/icon.component.js.map +1 -1
- package/dist/components/illustration.component.js +1 -1
- package/dist/components/illustration.component.js.map +1 -1
- package/dist/components/input-error.component.js.map +1 -1
- package/dist/components/input-group.component.js +4 -4
- package/dist/components/input-group.component.js.map +1 -1
- package/dist/components/label.component.js.map +1 -1
- package/dist/components/loader.component.js.map +1 -1
- package/dist/components/modal-body.component.js.map +1 -1
- package/dist/components/modal-container.component.js.map +1 -1
- package/dist/components/modal-footer.component.js.map +1 -1
- package/dist/components/modal-header.component.js.map +1 -1
- package/dist/components/p-accordion.js.map +1 -1
- package/dist/components/p-attachment.js.map +1 -1
- package/dist/components/p-avatar-group.js.map +1 -1
- package/dist/components/p-avatar.js +1 -66
- package/dist/components/p-avatar.js.map +1 -1
- package/dist/components/p-card-body.js.map +1 -1
- package/dist/components/p-card-container.js.map +1 -1
- package/dist/components/p-card-header.js.map +1 -1
- package/dist/components/p-content-slider.js.map +1 -1
- package/dist/components/p-cropper.js.map +1 -1
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/components/p-drawer.js.map +1 -1
- package/dist/components/p-info-panel.js.map +1 -1
- package/dist/components/p-layout.js.map +1 -1
- package/dist/components/p-modal.js.map +1 -1
- package/dist/components/p-navbar.js.map +1 -1
- package/dist/components/p-navigation-item.js.map +1 -1
- package/dist/components/p-profile.js.map +1 -1
- package/dist/components/p-select.js +150 -20
- package/dist/components/p-select.js.map +1 -1
- package/dist/components/p-status.js.map +1 -1
- package/dist/components/p-stepper-item.js.map +1 -1
- package/dist/components/p-stepper.js.map +1 -1
- package/dist/components/p-tab-group.js.map +1 -1
- package/dist/components/p-tab-item.js.map +1 -1
- package/dist/components/p-table-column.js.map +1 -1
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/p-toast-container.js.map +1 -1
- package/dist/components/p-toast.js.map +1 -1
- package/dist/components/page-size-select.component.js.map +1 -1
- package/dist/components/pagination-item.component.js.map +1 -1
- package/dist/components/pagination.component.js.map +1 -1
- package/dist/components/segment-container.component.js.map +1 -1
- package/dist/components/segment-item.component.js +1 -1
- package/dist/components/segment-item.component.js.map +1 -1
- package/dist/components/slider-indicator.component.js.map +1 -1
- package/dist/components/stepper-line.component.js.map +1 -1
- package/dist/components/table-cell.component.js +39 -39
- package/dist/components/table-cell.component.js.map +1 -1
- package/dist/components/table-container.component.js.map +1 -1
- package/dist/components/table-footer.component.js.map +1 -1
- package/dist/components/table-header.component.js.map +1 -1
- package/dist/components/table-row.component.js.map +1 -1
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/esm/index-7b917f6b.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-accordion.entry.js.map +1 -1
- package/dist/esm/p-attachment.entry.js.map +1 -1
- package/dist/esm/p-avatar-group.entry.js.map +1 -1
- package/dist/esm/p-avatar.entry.js.map +1 -1
- package/dist/esm/p-backdrop.entry.js.map +1 -1
- package/dist/esm/p-button_3.entry.js +10 -5
- package/dist/esm/p-button_3.entry.js.map +1 -1
- package/dist/esm/p-calendar.entry.js +2 -2
- package/dist/esm/p-calendar.entry.js.map +1 -1
- package/dist/esm/p-card-body.entry.js.map +1 -1
- package/dist/esm/p-card-container.entry.js.map +1 -1
- package/dist/esm/p-card-header.entry.js.map +1 -1
- package/dist/esm/p-content-slider.entry.js.map +1 -1
- package/dist/esm/p-counter.entry.js.map +1 -1
- package/dist/esm/p-cropper.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/esm/p-divider.entry.js.map +1 -1
- package/dist/esm/p-drawer-body_3.entry.js.map +1 -1
- package/dist/esm/p-drawer.entry.js.map +1 -1
- package/dist/esm/p-dropdown-menu-container.entry.js.map +1 -1
- package/dist/esm/p-dropdown_2.entry.js +7 -2
- package/dist/esm/p-dropdown_2.entry.js.map +1 -1
- package/dist/esm/p-floating-menu-container_8.entry.js +40 -40
- package/dist/esm/p-floating-menu-container_8.entry.js.map +1 -1
- package/dist/esm/p-helper_3.entry.js +4 -4
- package/dist/esm/p-helper_3.entry.js.map +1 -1
- package/dist/esm/p-info-panel.entry.js.map +1 -1
- package/dist/esm/p-label_3.entry.js +1 -1
- package/dist/esm/p-label_3.entry.js.map +1 -1
- package/dist/esm/p-layout.entry.js.map +1 -1
- package/dist/esm/p-modal-body_4.entry.js.map +1 -1
- package/dist/esm/p-modal.entry.js.map +1 -1
- package/dist/esm/p-navbar.entry.js.map +1 -1
- package/dist/esm/p-navigation-item.entry.js.map +1 -1
- package/dist/esm/p-page-size-select_3.entry.js.map +1 -1
- package/dist/esm/p-profile.entry.js.map +1 -1
- package/dist/esm/p-select.entry.js +136 -18
- package/dist/esm/p-select.entry.js.map +1 -1
- package/dist/esm/p-slider-indicator.entry.js.map +1 -1
- package/dist/esm/p-status.entry.js.map +1 -1
- package/dist/esm/p-stepper-item.entry.js.map +1 -1
- package/dist/esm/p-stepper-line.entry.js.map +1 -1
- package/dist/esm/p-stepper.entry.js.map +1 -1
- package/dist/esm/p-tab-group.entry.js.map +1 -1
- package/dist/esm/p-tab-item.entry.js.map +1 -1
- package/dist/esm/p-table-column.entry.js.map +1 -1
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/p-toast-container.entry.js.map +1 -1
- package/dist/esm/p-toast.entry.js.map +1 -1
- package/dist/esm/p-tooltip.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-03090f03.entry.js.map +1 -1
- package/dist/paperless/p-085e6ff4.entry.js.map +1 -1
- package/dist/paperless/p-2becd73c.entry.js.map +1 -1
- package/dist/paperless/p-2cb55f24.entry.js.map +1 -1
- package/dist/paperless/p-2cd5062f.entry.js.map +1 -1
- package/dist/paperless/p-35c563a7.entry.js.map +1 -1
- package/dist/paperless/p-415c5040.entry.js.map +1 -1
- package/dist/paperless/p-424d5c8a.entry.js.map +1 -1
- package/dist/paperless/p-46a939e2.entry.js.map +1 -1
- package/dist/paperless/p-4c30c74b.entry.js.map +1 -1
- package/dist/paperless/p-4dc5647e.entry.js.map +1 -1
- package/dist/paperless/p-4e9e4ce2.entry.js.map +1 -1
- package/dist/paperless/p-606ad811.entry.js.map +1 -1
- package/dist/paperless/p-682db916.entry.js.map +1 -1
- package/dist/paperless/p-699e0b35.entry.js.map +1 -1
- package/dist/paperless/p-6a5aeb90.entry.js.map +1 -1
- package/dist/paperless/p-7793ba3a.entry.js.map +1 -1
- package/dist/paperless/p-7d15ff9a.entry.js.map +1 -1
- package/dist/paperless/p-8426ca20.entry.js.map +1 -1
- package/dist/paperless/p-93052b42.entry.js.map +1 -1
- package/dist/paperless/p-97bcf0b5.entry.js.map +1 -1
- package/dist/paperless/p-9c914665.entry.js.map +1 -1
- package/dist/paperless/p-9d3d72fa.entry.js.map +1 -1
- package/dist/paperless/p-a2b552f9.entry.js.map +1 -1
- package/dist/paperless/p-a7344d53.entry.js +2 -0
- package/dist/paperless/p-a7344d53.entry.js.map +1 -0
- package/dist/paperless/p-af6b813e.entry.js.map +1 -1
- package/dist/paperless/p-b6f43309.entry.js.map +1 -1
- package/dist/paperless/p-b7c0f157.entry.js.map +1 -1
- package/dist/paperless/p-c9b840a7.entry.js.map +1 -1
- package/dist/paperless/p-cb2674b5.entry.js.map +1 -1
- package/dist/paperless/p-cf7bd354.entry.js.map +1 -1
- package/dist/paperless/p-d0796984.entry.js.map +1 -1
- package/dist/paperless/p-d23db949.entry.js.map +1 -1
- package/dist/paperless/p-dace47c5.entry.js.map +1 -1
- package/dist/paperless/p-daeadc69.entry.js +2 -0
- package/dist/paperless/p-daeadc69.entry.js.map +1 -0
- package/dist/paperless/p-dd20caf1.entry.js.map +1 -1
- package/dist/paperless/p-dfa8eae9.entry.js +2 -0
- package/dist/paperless/p-dfa8eae9.entry.js.map +1 -0
- package/dist/paperless/p-ec15ee73.entry.js.map +1 -1
- package/dist/paperless/p-ec29eed0.entry.js.map +1 -1
- package/dist/paperless/p-f0f1a46b.entry.js.map +1 -1
- package/dist/paperless/p-f34e08ec.entry.js.map +1 -1
- package/dist/paperless/p-f9e52ae3.entry.js.map +1 -1
- package/dist/paperless/p-fac13366.entry.js.map +1 -1
- package/dist/paperless/paperless.css +7 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/style/form/_checkbox.scss +4 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +4 -0
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +4 -0
- package/dist/types/components/molecules/select/select.component.d.ts +34 -0
- package/dist/types/components.d.ts +105 -45
- package/dist/types/utils/icons.d.ts +1 -1
- package/hydrate/index.js +211 -75
- package/package.json +1 -1
- package/dist/assets/icons/fa/building.svg +0 -3
- package/dist/assets/icons/fa/buildings.svg +0 -3
- package/dist/build/p-573648d0.entry.js +0 -2
- package/dist/build/p-573648d0.entry.js.map +0 -1
- package/dist/build/p-9c7cfd25.entry.js +0 -2
- package/dist/build/p-9c7cfd25.entry.js.map +0 -1
- package/dist/build/p-c644d1e3.entry.js +0 -2
- package/dist/build/p-c644d1e3.entry.js.map +0 -1
- package/dist/collection/assets/icons/fa/building.svg +0 -3
- package/dist/collection/assets/icons/fa/buildings.svg +0 -3
- package/dist/paperless/p-573648d0.entry.js +0 -2
- package/dist/paperless/p-573648d0.entry.js.map +0 -1
- package/dist/paperless/p-9c7cfd25.entry.js +0 -2
- package/dist/paperless/p-9c7cfd25.entry.js.map +0 -1
- package/dist/paperless/p-c644d1e3.entry.js +0 -2
- package/dist/paperless/p-c644d1e3.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["contentSliderComponentCss","ContentSlider","this","_items","_shouldCheckLocation","componentWillRender","items","_el","querySelectorAll","Array","from","componentDidLoad","_innerSliderRef","style","setProperty","_calculateWidth","_calculateIndicator","disconnectedCallback","_innerSliderResizeObserver","disconnect","render","h","Host","class","disableDrag","_dragging","height","_outerHeight","ref","el","_sliderRef","onMouseDown","e","_mouseDownHandler","onTouchStart","onMouseMove","_mouseMoveHandler","onTouchMove","_setInnerSliderReft","onTransitionEnd","_transitionEndHandler","hideMobileIndicator","map","_","i","onClick","_scrollTo","disableIndicatorClick","active","_visibleIndex","innerSliderStyle","getComputedStyle","flexWrap","_startMouseX","x","sliderRect","getBoundingClientRect","type","_a","touches","clientX","innerSliderRect","offsetLeft","_startX","_lastIndex","preventDefault","getPropertyValue","pointerEvents","left","_lastMouseX","_b","_checkBoundary","mouseUpHandler","removeProperty","_checkLocation","resizeHandler","ResizeObserver","_calculateHeight","observe","manual","elRect","centerOffset","width","outer","parseInt","maxLeft","_totalWidth","length","item","visible","_isVisible","scrollToIndex","setTimeout","right","_isMobile","totalWidth","rect","sliderStyle","padding","gap","outerHeight","at"],"sources":["src/components/molecules/content-slider/content-slider.component.scss?tag=p-content-slider&encapsulation=shadow","src/components/molecules/content-slider/content-slider.component.tsx"],"sourcesContent":[":host {\n @apply flex flex-col overflow-hidden;\n\n @apply p-16 -m-16;\n\n .slider {\n @apply overflow-visible relative box-content;\n\n &.draggable {\n @apply cursor-grab desktop-xs:cursor-auto;\n\n &.dragging {\n @apply cursor-grabbing desktop-xs:cursor-auto;\n\n .inner-slider {\n @apply transition-none;\n }\n }\n }\n\n .inner-slider {\n @apply absolute flex flex-nowrap items-stretch w-full gap-2;\n\n @apply will-change-transform transform-gpu translate-x-0;\n\n @apply desktop-xs:gap-4 desktop-xs:flex-wrap;\n\n @apply transition-all;\n transition-duration: 0.5s;\n\n > ::slotted(*) {\n @apply w-full;\n @apply flex-shrink-0 z-10;\n\n @screen tablet {\n width: calc(50% - 0.5rem);\n }\n\n @screen desktop-xs {\n @apply w-0 flex-1;\n }\n\n position: relative;\n }\n }\n }\n\n .indicator {\n @apply flex justify-center items-center desktop-xs:hidden;\n\n .item {\n @apply mt-3 pt-1 px-1;\n }\n }\n}\n","import {\n Component,\n Element,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\n\n@Component({\n tag: 'p-content-slider',\n styleUrl: 'content-slider.component.scss',\n shadow: true,\n})\nexport class ContentSlider {\n /**\n * Wether to hide the indicator on mobile\n */\n @Prop() hideMobileIndicator: boolean = false;\n\n /**\n * Wether to disable dragging the content\n */\n @Prop() disableDrag: boolean = false;\n\n /**\n * Wether to disable auto centering the content\n */\n @Prop() disableAutoCenter: boolean = false;\n\n /**\n * Wether to disable clicking the indicator scrolls content\n */\n @Prop() disableIndicatorClick: boolean = false;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n @State() private _visibleIndex: number;\n @State() private _outerHeight = 0;\n @State() private _totalWidth = 0;\n private _sliderRef: HTMLElement;\n private _innerSliderRef: HTMLElement;\n private _items: HTMLElement[] = [];\n private _innerSliderResizeObserver: ResizeObserver;\n\n // mouse movement stuff\n private _startX: number;\n private _startMouseX: number;\n private _lastMouseX: number;\n private _lastIndex: number;\n private _shouldCheckLocation = false;\n @State() private _dragging = false;\n\n componentWillRender() {\n const items = this._el.querySelectorAll(':scope > *');\n this._items = Array.from(items) as HTMLElement[];\n }\n\n componentDidLoad() {\n this._innerSliderRef.style.setProperty('--tw-translate-x', `0px`);\n this._calculateWidth();\n this._calculateIndicator();\n }\n\n disconnectedCallback() {\n if (this._innerSliderResizeObserver) {\n this._innerSliderResizeObserver.disconnect();\n }\n }\n\n render() {\n return (\n <Host class=\"p-content-slider\">\n <div\n class={`slider ${!this.disableDrag && 'draggable'} ${\n this._dragging && 'dragging'\n }`}\n style={{\n height: `${this._outerHeight}px`,\n }}\n ref={(el) => (this._sliderRef = el)}\n onMouseDown={(e) => this._mouseDownHandler(e)}\n onTouchStart={(e) => this._mouseDownHandler(e)}\n onMouseMove={(e) => this._mouseMoveHandler(e)}\n onTouchMove={(e) => this._mouseMoveHandler(e)}\n >\n <div\n class=\"inner-slider\"\n ref={(ref) => this._setInnerSliderReft(ref)}\n onTransitionEnd={() => this._transitionEndHandler()}\n >\n <slot />\n </div>\n </div>\n <div\n class={`indicator ${this.hideMobileIndicator && 'hidden'}`}\n >\n {this._items.map((_, i) => (\n <div\n onClick={() => this._scrollTo(i, true)}\n class={`item ${\n !this.disableIndicatorClick && 'cursor-pointer'\n }`}\n >\n <p-slider-indicator\n active={i === this._visibleIndex}\n />\n </div>\n ))}\n </div>\n </Host>\n );\n }\n\n private _mouseDownHandler(e) {\n if (this.disableDrag || this._dragging) {\n return;\n }\n\n const innerSliderStyle = getComputedStyle(this._innerSliderRef);\n if (innerSliderStyle.flexWrap === 'wrap') {\n return;\n }\n\n this._startMouseX = e.x;\n const sliderRect = this._sliderRef.getBoundingClientRect();\n if (e.type === 'touchstart') {\n this._startMouseX = e.touches?.[0].clientX;\n }\n\n const innerSliderRect = this._innerSliderRef.getBoundingClientRect();\n const offsetLeft = innerSliderRect.x - sliderRect.x;\n\n this._startX = this._startMouseX - sliderRect.x - offsetLeft;\n this._lastIndex = this._visibleIndex;\n this._dragging = true;\n }\n\n private _mouseMoveHandler(e) {\n if (!e || !this._dragging || this.disableDrag) {\n return;\n }\n\n e.preventDefault();\n\n this._shouldCheckLocation = true;\n\n if (\n this._innerSliderRef.style.getPropertyValue('pointer-events') === ''\n ) {\n this._innerSliderRef.style.pointerEvents = 'none';\n }\n\n const sliderRect = this._sliderRef.getBoundingClientRect();\n let x = e.clientX - sliderRect.left;\n this._lastMouseX = e.x;\n if (e.type === 'touchmove') {\n x = e.touches?.[0].clientX - sliderRect.left;\n this._lastMouseX = e.touches?.[0].clientX;\n }\n\n this._innerSliderRef.style.setProperty(\n '--tw-translate-x',\n `${x - this._startX}px`\n );\n\n this._checkBoundary();\n this._calculateIndicator();\n }\n\n private _transitionEndHandler() {\n this._calculateIndicator();\n }\n\n @Listen('mouseup', { target: 'window' })\n @Listen('touchend', { target: 'window' })\n mouseUpHandler() {\n this._dragging = false;\n this._innerSliderRef.style.removeProperty('pointer-events');\n\n this._checkLocation();\n }\n\n @Listen('resize', { target: 'window' })\n resizeHandler() {\n if (this._innerSliderRef) {\n this._innerSliderRef.style.setProperty('--tw-translate-x', '0px');\n this._calculateWidth();\n this._calculateIndicator();\n }\n }\n\n private _setInnerSliderReft(ref) {\n this._innerSliderRef = ref;\n this._innerSliderResizeObserver = new ResizeObserver(() =>\n this._calculateHeight()\n );\n this._innerSliderResizeObserver.observe(this._innerSliderRef);\n }\n\n private _scrollTo(i: number, manual = false) {\n if (this.disableIndicatorClick && manual) {\n return;\n }\n\n const el = this._items[i];\n\n if (i === 0) {\n this._innerSliderRef.style.setProperty('--tw-translate-x', `0px`);\n return;\n }\n\n const sliderRect = this._sliderRef.getBoundingClientRect();\n const innerSliderRect = this._innerSliderRef.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n\n const offsetLeft = elRect.x - innerSliderRect.x;\n\n const centerOffset =\n offsetLeft + elRect.width / 2 - sliderRect.width / 2;\n\n this._innerSliderRef.style.setProperty(\n '--tw-translate-x',\n `-${centerOffset}px`\n );\n\n this._checkBoundary();\n this._calculateIndicator();\n }\n\n private _checkBoundary() {\n let outer = this._sliderRef.getBoundingClientRect();\n\n const left = parseInt(\n this._innerSliderRef.style.getPropertyValue('--tw-translate-x')\n );\n if (left > 0) {\n this._innerSliderRef.style.setProperty('--tw-translate-x', `0px`);\n }\n\n const maxLeft = (this._totalWidth - outer.width) * -1;\n if (left < maxLeft) {\n this._innerSliderRef.style.setProperty(\n '--tw-translate-x',\n `${maxLeft}px`\n );\n }\n }\n\n private _calculateIndicator() {\n for (let i = 0; i < this._items.length; i++) {\n const item = this._items[i];\n const visible = this._isVisible(item);\n\n if (visible) {\n this._visibleIndex = i;\n }\n\n if (i === 0 && visible) {\n break;\n }\n }\n }\n\n private _checkLocation() {\n if (!this._shouldCheckLocation) {\n return;\n }\n\n let scrollToIndex = null;\n if (this._lastIndex !== this._visibleIndex) {\n scrollToIndex = this._visibleIndex;\n }\n\n if (this._lastIndex === this._visibleIndex) {\n if (this._lastMouseX > this._startMouseX && this._lastIndex !== 0) {\n scrollToIndex = this._lastIndex - 1;\n }\n\n if (\n this._lastMouseX < this._startMouseX &&\n this._lastIndex !== this._items?.length - 1\n ) {\n scrollToIndex = this._lastIndex + 1;\n }\n }\n\n if (scrollToIndex !== null) {\n this._shouldCheckLocation = false;\n setTimeout(() => this._scrollTo(scrollToIndex), 100);\n }\n }\n\n private _isVisible(el: HTMLElement) {\n if (!this._el || !el) {\n return false;\n }\n\n const elRect = el.getBoundingClientRect();\n const sliderRect = this._sliderRef.getBoundingClientRect();\n\n return (\n (elRect.left >= sliderRect.left &&\n elRect.right <= sliderRect.right) ||\n (this._isMobile(el) &&\n elRect.left + elRect.width / 2 >= sliderRect.left &&\n elRect.left + elRect.width / 2 <= sliderRect.right)\n );\n }\n\n private _calculateWidth() {\n let totalWidth = 0;\n\n for (let item of this._items) {\n const rect = item.getBoundingClientRect();\n totalWidth += rect.width;\n }\n\n const sliderStyle = getComputedStyle(this._sliderRef);\n const padding = parseInt(sliderStyle.padding) * 2;\n\n const innerSliderStyle = getComputedStyle(this._innerSliderRef);\n const gap = parseInt(innerSliderStyle.gap) * (this._items.length - 1);\n\n totalWidth += padding + gap;\n\n this._totalWidth = totalWidth;\n }\n\n private _calculateHeight() {\n const outerHeight = this._items.at(0).getBoundingClientRect().height;\n if (outerHeight != this._outerHeight) {\n this._outerHeight = outerHeight;\n }\n }\n\n private _isMobile(el?: HTMLElement) {\n if (!el) {\n el = this._items.at(0);\n }\n\n const elRect = el.getBoundingClientRect();\n const sliderRect = this._sliderRef.getBoundingClientRect();\n\n return sliderRect.width - elRect.width < 10;\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAA4B,i2F,MCerBC,EAAa,M,yBA+BdC,KAAAC,OAAwB,GAQxBD,KAAAE,qBAAuB,M,yBAnCQ,M,iBAKR,M,uBAKM,M,2BAKI,M,+CAQT,E,iBACD,E,eAYF,K,CAE7B,mBAAAC,GACI,MAAMC,EAAQJ,KAAKK,IAAIC,iBAAiB,cACxCN,KAAKC,OAASM,MAAMC,KAAKJ,E,CAG7B,gBAAAK,GACIT,KAAKU,gBAAgBC,MAAMC,YAAY,mBAAoB,OAC3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,OAAOkG,GAAG,GAAG7C,wBAAwB9B,OAC9D,GAAI0E,GAAelG,KAAKyB,aAAc,CAClCzB,KAAKyB,aAAeyE,C,EAIpB,SAAAN,CAAUjE,GACd,IAAKA,EAAI,CACLA,EAAK3B,KAAKC,OAAOkG,GAAG,E,CAGxB,MAAMrB,EAASnD,EAAG2B,wBAClB,MAAMD,EAAarD,KAAK4B,WAAW0B,wBAEnC,OAAOD,EAAW2B,MAAQF,EAAOE,MAAQ,E"}
|
|
1
|
+
{"version":3,"names":["contentSliderComponentCss","ContentSlider","this","_items","_shouldCheckLocation","componentWillRender","items","_el","querySelectorAll","Array","from","componentDidLoad","_innerSliderRef","style","setProperty","_calculateWidth","_calculateIndicator","disconnectedCallback","_innerSliderResizeObserver","disconnect","render","h","Host","class","disableDrag","_dragging","height","_outerHeight","ref","el","_sliderRef","onMouseDown","e","_mouseDownHandler","onTouchStart","onMouseMove","_mouseMoveHandler","onTouchMove","_setInnerSliderReft","onTransitionEnd","_transitionEndHandler","hideMobileIndicator","map","_","i","onClick","_scrollTo","disableIndicatorClick","active","_visibleIndex","innerSliderStyle","getComputedStyle","flexWrap","_startMouseX","x","sliderRect","getBoundingClientRect","type","_a","touches","clientX","innerSliderRect","offsetLeft","_startX","_lastIndex","preventDefault","getPropertyValue","pointerEvents","left","_lastMouseX","_b","_checkBoundary","mouseUpHandler","removeProperty","_checkLocation","resizeHandler","ResizeObserver","_calculateHeight","observe","manual","elRect","centerOffset","width","outer","parseInt","maxLeft","_totalWidth","length","item","visible","_isVisible","scrollToIndex","setTimeout","right","_isMobile","totalWidth","rect","sliderStyle","padding","gap","outerHeight","at"],"sources":["src/components/molecules/content-slider/content-slider.component.scss?tag=p-content-slider&encapsulation=shadow","src/components/molecules/content-slider/content-slider.component.tsx"],"sourcesContent":[":host {\n\t@apply flex flex-col overflow-hidden;\n\n\t@apply p-16 -m-16;\n\n\t.slider {\n\t\t@apply overflow-visible relative box-content;\n\n\t\t&.draggable {\n\t\t\t@apply cursor-grab desktop-xs:cursor-auto;\n\n\t\t\t&.dragging {\n\t\t\t\t@apply cursor-grabbing desktop-xs:cursor-auto;\n\n\t\t\t\t.inner-slider {\n\t\t\t\t\t@apply transition-none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.inner-slider {\n\t\t\t@apply absolute flex flex-nowrap items-stretch w-full gap-2;\n\n\t\t\t@apply will-change-transform transform-gpu translate-x-0;\n\n\t\t\t@apply desktop-xs:gap-4 desktop-xs:flex-wrap;\n\n\t\t\t@apply transition-all;\n\t\t\ttransition-duration: 0.5s;\n\n\t\t\t> ::slotted(*) {\n\t\t\t\t@apply w-full;\n\t\t\t\t@apply flex-shrink-0 z-10;\n\n\t\t\t\t@screen tablet {\n\t\t\t\t\twidth: calc(50% - 0.5rem);\n\t\t\t\t}\n\n\t\t\t\t@screen desktop-xs {\n\t\t\t\t\t@apply w-0 flex-1;\n\t\t\t\t}\n\n\t\t\t\tposition: relative;\n\t\t\t}\n\t\t}\n\t}\n\n\t.indicator {\n\t\t@apply flex justify-center items-center desktop-xs:hidden;\n\n\t\t.item {\n\t\t\t@apply mt-3 pt-1 px-1;\n\t\t}\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-content-slider',\n\tstyleUrl: 'content-slider.component.scss',\n\tshadow: true,\n})\nexport class ContentSlider {\n\t/**\n\t * Wether to hide the indicator on mobile\n\t */\n\t@Prop() hideMobileIndicator: boolean = false;\n\n\t/**\n\t * Wether to disable dragging the content\n\t */\n\t@Prop() disableDrag: boolean = false;\n\n\t/**\n\t * Wether to disable auto centering the content\n\t */\n\t@Prop() disableAutoCenter: boolean = false;\n\n\t/**\n\t * Wether to disable clicking the indicator scrolls content\n\t */\n\t@Prop() disableIndicatorClick: boolean = false;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _visibleIndex: number;\n\t@State() private _outerHeight = 0;\n\t@State() private _totalWidth = 0;\n\tprivate _sliderRef: HTMLElement;\n\tprivate _innerSliderRef: HTMLElement;\n\tprivate _items: HTMLElement[] = [];\n\tprivate _innerSliderResizeObserver: ResizeObserver;\n\n\t// mouse movement stuff\n\tprivate _startX: number;\n\tprivate _startMouseX: number;\n\tprivate _lastMouseX: number;\n\tprivate _lastIndex: number;\n\tprivate _shouldCheckLocation = false;\n\t@State() private _dragging = false;\n\n\tcomponentWillRender() {\n\t\tconst items = this._el.querySelectorAll(':scope > *');\n\t\tthis._items = Array.from(items) as HTMLElement[];\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis._innerSliderRef.style.setProperty('--tw-translate-x', `0px`);\n\t\tthis._calculateWidth();\n\t\tthis._calculateIndicator();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._innerSliderResizeObserver) {\n\t\t\tthis._innerSliderResizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-content-slider\">\n\t\t\t\t<div\n\t\t\t\t\tclass={`slider ${!this.disableDrag && 'draggable'} ${\n\t\t\t\t\t\tthis._dragging && 'dragging'\n\t\t\t\t\t}`}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\theight: `${this._outerHeight}px`,\n\t\t\t\t\t}}\n\t\t\t\t\tref={(el) => (this._sliderRef = el)}\n\t\t\t\t\tonMouseDown={(e) => this._mouseDownHandler(e)}\n\t\t\t\t\tonTouchStart={(e) => this._mouseDownHandler(e)}\n\t\t\t\t\tonMouseMove={(e) => this._mouseMoveHandler(e)}\n\t\t\t\t\tonTouchMove={(e) => this._mouseMoveHandler(e)}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"inner-slider\"\n\t\t\t\t\t\tref={(ref) => this._setInnerSliderReft(ref)}\n\t\t\t\t\t\tonTransitionEnd={() => this._transitionEndHandler()}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclass={`indicator ${this.hideMobileIndicator && 'hidden'}`}\n\t\t\t\t>\n\t\t\t\t\t{this._items.map((_, i) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tonClick={() => this._scrollTo(i, true)}\n\t\t\t\t\t\t\tclass={`item ${\n\t\t\t\t\t\t\t\t!this.disableIndicatorClick && 'cursor-pointer'\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p-slider-indicator\n\t\t\t\t\t\t\t\tactive={i === this._visibleIndex}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _mouseDownHandler(e) {\n\t\tif (this.disableDrag || this._dragging) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst innerSliderStyle = getComputedStyle(this._innerSliderRef);\n\t\tif (innerSliderStyle.flexWrap === 'wrap') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._startMouseX = e.x;\n\t\tconst sliderRect = this._sliderRef.getBoundingClientRect();\n\t\tif (e.type === 'touchstart') {\n\t\t\tthis._startMouseX = e.touches?.[0].clientX;\n\t\t}\n\n\t\tconst innerSliderRect = this._innerSliderRef.getBoundingClientRect();\n\t\tconst offsetLeft = innerSliderRect.x - sliderRect.x;\n\n\t\tthis._startX = this._startMouseX - sliderRect.x - offsetLeft;\n\t\tthis._lastIndex = this._visibleIndex;\n\t\tthis._dragging = true;\n\t}\n\n\tprivate _mouseMoveHandler(e) {\n\t\tif (!e || !this._dragging || this.disableDrag) {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tthis._shouldCheckLocation = true;\n\n\t\tif (\n\t\t\tthis._innerSliderRef.style.getPropertyValue('pointer-events') === ''\n\t\t) {\n\t\t\tthis._innerSliderRef.style.pointerEvents = 'none';\n\t\t}\n\n\t\tconst sliderRect = this._sliderRef.getBoundingClientRect();\n\t\tlet x = e.clientX - sliderRect.left;\n\t\tthis._lastMouseX = e.x;\n\t\tif (e.type === 'touchmove') {\n\t\t\tx = e.touches?.[0].clientX - sliderRect.left;\n\t\t\tthis._lastMouseX = e.touches?.[0].clientX;\n\t\t}\n\n\t\tthis._innerSliderRef.style.setProperty(\n\t\t\t'--tw-translate-x',\n\t\t\t`${x - this._startX}px`\n\t\t);\n\n\t\tthis._checkBoundary();\n\t\tthis._calculateIndicator();\n\t}\n\n\tprivate _transitionEndHandler() {\n\t\tthis._calculateIndicator();\n\t}\n\n\t@Listen('mouseup', { target: 'window' })\n\t@Listen('touchend', { target: 'window' })\n\tmouseUpHandler() {\n\t\tthis._dragging = false;\n\t\tthis._innerSliderRef.style.removeProperty('pointer-events');\n\n\t\tthis._checkLocation();\n\t}\n\n\t@Listen('resize', { target: 'window' })\n\tresizeHandler() {\n\t\tif (this._innerSliderRef) {\n\t\t\tthis._innerSliderRef.style.setProperty('--tw-translate-x', '0px');\n\t\t\tthis._calculateWidth();\n\t\t\tthis._calculateIndicator();\n\t\t}\n\t}\n\n\tprivate _setInnerSliderReft(ref) {\n\t\tthis._innerSliderRef = ref;\n\t\tthis._innerSliderResizeObserver = new ResizeObserver(() =>\n\t\t\tthis._calculateHeight()\n\t\t);\n\t\tthis._innerSliderResizeObserver.observe(this._innerSliderRef);\n\t}\n\n\tprivate _scrollTo(i: number, manual = false) {\n\t\tif (this.disableIndicatorClick && manual) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst el = this._items[i];\n\n\t\tif (i === 0) {\n\t\t\tthis._innerSliderRef.style.setProperty('--tw-translate-x', `0px`);\n\t\t\treturn;\n\t\t}\n\n\t\tconst sliderRect = this._sliderRef.getBoundingClientRect();\n\t\tconst innerSliderRect = this._innerSliderRef.getBoundingClientRect();\n\t\tconst elRect = el.getBoundingClientRect();\n\n\t\tconst offsetLeft = elRect.x - innerSliderRect.x;\n\n\t\tconst centerOffset =\n\t\t\toffsetLeft + elRect.width / 2 - sliderRect.width / 2;\n\n\t\tthis._innerSliderRef.style.setProperty(\n\t\t\t'--tw-translate-x',\n\t\t\t`-${centerOffset}px`\n\t\t);\n\n\t\tthis._checkBoundary();\n\t\tthis._calculateIndicator();\n\t}\n\n\tprivate _checkBoundary() {\n\t\tlet outer = this._sliderRef.getBoundingClientRect();\n\n\t\tconst left = parseInt(\n\t\t\tthis._innerSliderRef.style.getPropertyValue('--tw-translate-x')\n\t\t);\n\t\tif (left > 0) {\n\t\t\tthis._innerSliderRef.style.setProperty('--tw-translate-x', `0px`);\n\t\t}\n\n\t\tconst maxLeft = (this._totalWidth - outer.width) * -1;\n\t\tif (left < maxLeft) {\n\t\t\tthis._innerSliderRef.style.setProperty(\n\t\t\t\t'--tw-translate-x',\n\t\t\t\t`${maxLeft}px`\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate _calculateIndicator() {\n\t\tfor (let i = 0; i < this._items.length; i++) {\n\t\t\tconst item = this._items[i];\n\t\t\tconst visible = this._isVisible(item);\n\n\t\t\tif (visible) {\n\t\t\t\tthis._visibleIndex = i;\n\t\t\t}\n\n\t\t\tif (i === 0 && visible) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _checkLocation() {\n\t\tif (!this._shouldCheckLocation) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet scrollToIndex = null;\n\t\tif (this._lastIndex !== this._visibleIndex) {\n\t\t\tscrollToIndex = this._visibleIndex;\n\t\t}\n\n\t\tif (this._lastIndex === this._visibleIndex) {\n\t\t\tif (this._lastMouseX > this._startMouseX && this._lastIndex !== 0) {\n\t\t\t\tscrollToIndex = this._lastIndex - 1;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tthis._lastMouseX < this._startMouseX &&\n\t\t\t\tthis._lastIndex !== this._items?.length - 1\n\t\t\t) {\n\t\t\t\tscrollToIndex = this._lastIndex + 1;\n\t\t\t}\n\t\t}\n\n\t\tif (scrollToIndex !== null) {\n\t\t\tthis._shouldCheckLocation = false;\n\t\t\tsetTimeout(() => this._scrollTo(scrollToIndex), 100);\n\t\t}\n\t}\n\n\tprivate _isVisible(el: HTMLElement) {\n\t\tif (!this._el || !el) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst elRect = el.getBoundingClientRect();\n\t\tconst sliderRect = this._sliderRef.getBoundingClientRect();\n\n\t\treturn (\n\t\t\t(elRect.left >= sliderRect.left &&\n\t\t\t\telRect.right <= sliderRect.right) ||\n\t\t\t(this._isMobile(el) &&\n\t\t\t\telRect.left + elRect.width / 2 >= sliderRect.left &&\n\t\t\t\telRect.left + elRect.width / 2 <= sliderRect.right)\n\t\t);\n\t}\n\n\tprivate _calculateWidth() {\n\t\tlet totalWidth = 0;\n\n\t\tfor (let item of this._items) {\n\t\t\tconst rect = item.getBoundingClientRect();\n\t\t\ttotalWidth += rect.width;\n\t\t}\n\n\t\tconst sliderStyle = getComputedStyle(this._sliderRef);\n\t\tconst padding = parseInt(sliderStyle.padding) * 2;\n\n\t\tconst innerSliderStyle = getComputedStyle(this._innerSliderRef);\n\t\tconst gap = parseInt(innerSliderStyle.gap) * (this._items.length - 1);\n\n\t\ttotalWidth += padding + gap;\n\n\t\tthis._totalWidth = totalWidth;\n\t}\n\n\tprivate _calculateHeight() {\n\t\tconst outerHeight = this._items.at(0).getBoundingClientRect().height;\n\t\tif (outerHeight != this._outerHeight) {\n\t\t\tthis._outerHeight = outerHeight;\n\t\t}\n\t}\n\n\tprivate _isMobile(el?: HTMLElement) {\n\t\tif (!el) {\n\t\t\tel = this._items.at(0);\n\t\t}\n\n\t\tconst elRect = el.getBoundingClientRect();\n\t\tconst sliderRect = this._sliderRef.getBoundingClientRect();\n\n\t\treturn sliderRect.width - elRect.width < 10;\n\t}\n}\n"],"mappings":"yDAAA,MAAMA,EAA4B,i2F,MCerBC,EAAa,M,yBA+BjBC,KAAAC,OAAwB,GAQxBD,KAAAE,qBAAuB,M,yBAnCQ,M,iBAKR,M,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AW,EAEhD,MAAMhD,EAAmBC,iBAAiBjD,KAAKU,iBAC/C,MAAMuF,EAAMf,SAASlC,EAAiBiD,MAAQjG,KAAKC,OAAOoF,OAAS,GAEnEQ,GAAcG,EAAUC,EAExBjG,KAAKoF,YAAcS,C,CAGZ,gBAAAlB,GACP,MAAMuB,EAAclG,KAAKC,OAAOkG,GAAG,GAAG7C,wBAAwB9B,OAC9D,GAAI0E,GAAelG,KAAKyB,aAAc,CACrCzB,KAAKyB,aAAeyE,C,EAId,SAAAN,CAAUjE,GACjB,IAAKA,EAAI,CACRA,EAAK3B,KAAKC,OAAOkG,GAAG,E,CAGrB,MAAMrB,EAASnD,EAAG2B,wBAClB,MAAMD,EAAarD,KAAK4B,WAAW0B,wBAEnC,OAAOD,EAAW2B,MAAQF,EAAOE,MAAQ,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["statusComponentCss","Status","render","h","Host","class","this","variant","_getIcon","icon","_getVariantIcon","flip","iconFlip","rotate","iconRotate"],"sources":["src/components/atoms/status/status.component.scss?tag=p-status","src/components/atoms/status/status.component.tsx"],"sourcesContent":["p-status {\n
|
|
1
|
+
{"version":3,"names":["statusComponentCss","Status","render","h","Host","class","this","variant","_getIcon","icon","_getVariantIcon","flip","iconFlip","rotate","iconRotate"],"sources":["src/components/atoms/status/status.component.scss?tag=p-status","src/components/atoms/status/status.component.tsx"],"sourcesContent":["p-status {\n\t@apply flex items-center;\n\t@apply text-sm text-storm-vague font-medium;\n\n\tp-icon {\n\t\t@apply mr-2 text-base;\n\t}\n\n\t&.variant-positive {\n\t\t@apply text-positive;\n\t}\n\n\t&.variant-unbiased {\n\t\t@apply text-unbiased;\n\t}\n\n\t&.variant-negative {\n\t\t@apply text-negative;\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../icon/icon.component';\n\n@Component({\n\ttag: 'p-status',\n\tstyleUrl: 'status.component.scss',\n})\nexport class Status {\n\t/**\n\t * The variant of the status\n\t */\n\t@Prop() variant: 'default' | 'positive' | 'unbiased' | 'negative' =\n\t\t'default';\n\n\t/**\n\t * Icon to show on the status\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-status variant-${this.variant}\n }`}\n\t\t\t>\n\t\t\t\t{this._getIcon()}\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _getIcon() {\n\t\tconst icon = this.icon || this._getVariantIcon();\n\n\t\tif (!icon) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\t<p-icon\n\t\t\t\tvariant={icon}\n\t\t\t\tflip={this.iconFlip}\n\t\t\t\trotate={this.iconRotate}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate _getVariantIcon() {\n\t\tlet icon = null;\n\t\tswitch (this.variant) {\n\t\t\tcase 'positive':\n\t\t\t\ticon = 'checkmark';\n\t\t\t\tbreak;\n\t\t\tcase 'negative':\n\t\t\t\ticon = 'negative';\n\t\t\t\tbreak;\n\t\t\tcase 'unbiased':\n\t\t\t\ticon = 'clock';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ticon = null;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn icon;\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAAqB,8xB,MCQdC,EAAM,M,sCAKjB,U,sEAiBD,MAAAC,GACC,OACCC,EAACC,EAAI,CACJC,MAAO,oBAAoBC,KAAKC,8BAG/BD,KAAKE,WACNL,EAAA,a,CAKK,QAAAK,GACP,MAAMC,EAAOH,KAAKG,MAAQH,KAAKI,kBAE/B,IAAKD,EAAM,CACV,M,CAGD,OACCN,EAAA,UACCI,QAASE,EACTE,KAAML,KAAKM,SACXC,OAAQP,KAAKQ,Y,CAKR,eAAAJ,GACP,IAAID,EAAO,KACX,OAAQH,KAAKC,SACZ,IAAK,WACJE,EAAO,YACP,MACD,IAAK,WACJA,EAAO,WACP,MACD,IAAK,WACJA,EAAO,QACP,MACD,QACCA,EAAO,KACP,MAGF,OAAOA,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["accordionComponentCss","Accordion","render","h","Host","class","onClick","this","_onClick","variant","rotate","open","header","closeable","openable","isOpen","emit"],"sources":["src/components/molecules/accordion/accordion.component.scss?tag=p-accordion&encapsulation=shadow","src/components/molecules/accordion/accordion.component.tsx"],"sourcesContent":[":host {\n
|
|
1
|
+
{"version":3,"names":["accordionComponentCss","Accordion","render","h","Host","class","onClick","this","_onClick","variant","rotate","open","header","closeable","openable","isOpen","emit"],"sources":["src/components/molecules/accordion/accordion.component.scss?tag=p-accordion&encapsulation=shadow","src/components/molecules/accordion/accordion.component.tsx"],"sourcesContent":[":host {\n\t@apply block mb-6;\n}\n","import { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-accordion',\n\tstyleUrl: 'accordion.component.scss',\n\tshadow: true,\n})\nexport class Accordion {\n\t/**\n\t * Header of the accordion\n\t */\n\t@Prop() header!: string;\n\n\t/**\n\t * Wether the accordion is open\n\t */\n\t@Prop() open: boolean = false;\n\n\t/**\n\t * Wether the accordion can be closed\n\t */\n\t@Prop() closeable: boolean = true;\n\n\t/**\n\t * Wether the accordion can be opened\n\t */\n\t@Prop() openable: boolean = true;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-accordion\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"flex items-center gap-3 text-storm-vague cursor-pointer\"\n\t\t\t\t\tonClick={() => this._onClick()}\n\t\t\t\t>\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tclass=\"flex\"\n\t\t\t\t\t\tvariant=\"chevron\"\n\t\t\t\t\t\trotate={this.open ? 0 : -90}\n\t\t\t\t\t/>\n\t\t\t\t\t<p class=\"m-0 font-medium text-lg whitespace-nowrap\">\n\t\t\t\t\t\t{this.header}\n\t\t\t\t\t</p>\n\t\t\t\t\t<p-divider />\n\t\t\t\t</div>\n\t\t\t\t{this.open && (\n\t\t\t\t\t<div class=\"mt-6\">\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _onClick() {\n\t\tif (!this.closeable && this.open) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.openable && !this.open) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.open = !this.open;\n\t\tthis.isOpen.emit(this.open);\n\t}\n}\n"],"mappings":"yDAAA,MAAMA,EAAwB,+kB,MCOjBC,EAAS,M,wFASG,M,eAKK,K,cAKD,I,CAU5B,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,eACXF,EAAA,OACCE,MAAM,0DACNC,QAAS,IAAMC,KAAKC,YAEpBL,EAAA,UACCE,MAAM,OACNI,QAAQ,UACRC,OAAQH,KAAKI,KAAO,GAAK,KAE1BR,EAAA,KAAGE,MAAM,6CACPE,KAAKK,QAEPT,EAAA,mBAEAI,KAAKI,MACLR,EAAA,OAAKE,MAAM,QACVF,EAAA,c,CAOG,QAAAK,GACP,IAAKD,KAAKM,WAAaN,KAAKI,KAAM,CACjC,M,CAGD,IAAKJ,KAAKO,WAAaP,KAAKI,KAAM,CACjC,M,CAGDJ,KAAKI,MAAQJ,KAAKI,KAClBJ,KAAKQ,OAAOC,KAAKT,KAAKI,K"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stepperLineComponentCss","StepperLine","render","h","Host","class"],"sources":["src/components/atoms/stepper-line/stepper-line.component.scss?tag=p-stepper-line&encapsulation=shadow","src/components/atoms/stepper-line/stepper-line.component.tsx"],"sourcesContent":[":host {\n
|
|
1
|
+
{"version":3,"names":["stepperLineComponentCss","StepperLine","render","h","Host","class"],"sources":["src/components/atoms/stepper-line/stepper-line.component.scss?tag=p-stepper-line&encapsulation=shadow","src/components/atoms/stepper-line/stepper-line.component.tsx"],"sourcesContent":[":host {\n\t@apply flex-auto;\n\t@apply transition duration-500 ease-in-out;\n\n\t@apply block;\n\n\t@apply bg-mystic-dark;\n}\n\n:host([direction='horizontal']) {\n\t@apply mb-[calc(.5rem-1px)] h-[2px];\n}\n\n:host([direction='vertical']) {\n\t@apply ml-[calc(.5rem-1px)] mr-[calc(.5rem-1px)] min-h-[1rem] w-[2px];\n}\n\n:host([active]) {\n\t@apply bg-indigo;\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper-line',\n\tstyleUrl: 'stepper-line.component.scss',\n\tshadow: true,\n})\nexport class StepperLine {\n\t/**\n\t * Wether the line is active\n\t */\n\t@Prop({ reflect: true }) active: boolean = false;\n\n\t/**\n\t * The direction of the stepper line\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\trender() {\n\t\treturn <Host class=\"p-stepper-line\"></Host>;\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAA0B,87D,MCOnBC,EAAW,M,qCAIoB,M,eAM1C,Y,CAED,MAAAC,GACC,OAAOC,EAACC,EAAI,CAACC,MAAM,kB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["addDays","dirtyDate","dirtyAmount","requiredArgs","arguments","date","toDate","amount","toInteger","isNaN","Date","NaN","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","addYears","endOfMonth","month","setHours","startOfMonth","getDay","day","getDaysInMonth","year","monthIndex","lastDayOfMonth","getYear","isSameMonth","dirtyDateLeft","dirtyDateRight","dateLeft","dateRight","isSameYear","dirtyMonth","dateWithDesiredMonth","Math","min","dirtyDayOfMonth","setYear","dirtyYear","calendarComponentCss","Calendar","this","_today","_weekDays","Array","from","keys","_getAutomaticMax","mode","componentWillLoad","disabledDates","_parseDisabledDates","minDate","_parseMinDate","maxDate","_parseMaxDate","_parseValue","value","_value","_viewDate","isBefore","_minDate","isAfter","_maxDate","componentDidRender","_view","_scrollYearIntoView","preselectToday","_setValue","isValid","JSON","parse","isArray","_disabledDates","map","filter","render","h","Host","class","variant","_getView","_getYearView","_getMonthView","_getDayView","_generateDaysInMonth","_canSetAmount","onClick","_changeMonth","rotate","_changeView","_canChangeView","format","weekday","active","disabled","current","offset","months","_generateMonths","_changeYear","_setMonth","years","_generateYears","length","_setYear","allowed","newDate","valueChange","emit","_isDisabledDay","startOfDay","isSameValue","isSameDay","days","dayOfWeek","disableWeekends","findIndex","maxYear","minYear","index","items","_el","shadowRoot","querySelector","scrollTo","top","offsetTop","view","type","startNewDate","ceil"],"sources":["../../node_modules/date-fns/esm/addDays/index.js","../../node_modules/date-fns/esm/addMonths/index.js","../../node_modules/date-fns/esm/addYears/index.js","../../node_modules/date-fns/esm/endOfMonth/index.js","../../node_modules/date-fns/esm/startOfMonth/index.js","../../node_modules/date-fns/esm/getDay/index.js","../../node_modules/date-fns/esm/getDaysInMonth/index.js","../../node_modules/date-fns/esm/getYear/index.js","../../node_modules/date-fns/esm/isSameMonth/index.js","../../node_modules/date-fns/esm/isSameYear/index.js","../../node_modules/date-fns/esm/setMonth/index.js","../../node_modules/date-fns/esm/setDate/index.js","../../node_modules/date-fns/esm/setYear/index.js","src/components/molecules/calendar/calendar.component.scss?tag=p-calendar&encapsulation=shadow","src/components/molecules/calendar/calendar.component.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n var dayOfMonth = date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nexport default function getDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth);\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\nexport default function setDate(dirtyDate, dirtyDayOfMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = toInteger(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n date.setFullYear(year);\n return date;\n}",":host {\n @apply block bg-white p-2;\n @apply w-[14rem];\n\n .view-day,\n .view-month,\n .view-year {\n @apply flex flex-col gap-2;\n @apply w-full h-[12rem];\n }\n\n .header {\n @apply flex justify-between items-center gap-1;\n @apply text-base;\n @apply w-full;\n\n span {\n @apply cursor-pointer h-8 px-2 rounded text-storm;\n\n &.disabled {\n @apply cursor-default;\n }\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.year {\n @apply font-semibold;\n }\n }\n\n .nav {\n @apply relative flex justify-center items-center cursor-pointer;\n @apply no-underline;\n @apply text-indigo;\n @apply w-6 h-6 rounded-round;\n transition-duration: 0.2s;\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.disabled {\n @apply opacity-0;\n }\n }\n }\n\n .view-day {\n @apply h-auto min-h-[12rem];\n\n .dates {\n @apply grid gap-1;\n grid-template-columns: repeat(7, 1fr);\n\n > span {\n @apply text-storm-medium font-semibold text-xs;\n @apply w-6;\n @apply self-center justify-self-center text-center;\n }\n\n > time {\n @apply flex justify-center items-center;\n @apply cursor-pointer;\n @apply w-6 h-6 box-border;\n @apply justify-self-center self-center;\n @apply rounded-round;\n\n @apply text-storm text-sm;\n @apply border border-solid border-transparent;\n\n transition-duration: 0.2s;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.other-month,\n &.disabled {\n @apply opacity-40 cursor-default;\n }\n\n &.disabled {\n @apply line-through;\n }\n\n &:hover:not(.disabled):not(.active):not(.other-month) {\n @apply bg-indigo-light text-storm;\n }\n }\n }\n }\n\n .view-month,\n .view-year {\n .items {\n @apply relative grid overflow-y-auto gap-1 w-full;\n @apply h-full items-center;\n grid-template-columns: repeat(3, 1fr);\n\n > div {\n @apply cursor-pointer;\n @apply flex justify-center items-center;\n @apply text-sm h-8 px-2 rounded;\n @apply text-storm;\n @apply border border-solid border-transparent;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.disabled {\n @apply line-through;\n @apply opacity-40 cursor-default;\n }\n\n &:hover:not(.disabled):not(.active) {\n @apply bg-mystic;\n }\n }\n }\n }\n\n .view-month {\n .items {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n .view-year {\n .header {\n @apply justify-center;\n }\n }\n}\n\n:host(.variant-default) {\n @apply rounded shadow-4;\n}\n\n:host(.variant-embedded) {\n @apply p-0;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n addDays,\n addMonths,\n addYears,\n endOfMonth,\n format,\n getDay,\n getDaysInMonth,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n isSameYear,\n isValid,\n setDate,\n setMonth,\n setYear,\n startOfDay,\n startOfMonth,\n} from 'date-fns';\n\n@Component({\n tag: 'p-calendar',\n styleUrl: 'calendar.component.scss',\n shadow: true,\n})\nexport class Calendar {\n /**\n * The variant of the button\n */\n @Prop() variant: 'default' | 'embedded' = 'default';\n\n /**\n * The current value\n */\n @Prop() value?: Date | string;\n\n /**\n * Wether to automatically preselect today\n */\n @Prop() preselectToday: boolean = false;\n\n /**\n * Disabled dates\n */\n @Prop() disabledDates?: Array<Date | string> | string;\n\n /**\n * Min date\n */\n @Prop() minDate: Date | string = new Date(1970, 0, 1);\n\n /**\n * Max date\n */\n @Prop() maxDate: Date | string = this._getAutomaticMax();\n\n /**\n * Wether to disable the weekends\n */\n @Prop() disableWeekends: boolean = false;\n\n /**\n * The mode of the datepicker\n */\n @Prop() mode: 'year' | 'month' | 'day' = 'day';\n\n /**\n * Event when the value changes\n */\n @Event({\n bubbles: false,\n })\n valueChange: EventEmitter<any>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n private _today = new Date();\n @State() private _view: 'year' | 'month' | 'day' = this.mode;\n @State() private _viewDate = this._today;\n\n @State() private _value: Date;\n @State() private _minDate: Date;\n @State() private _maxDate: Date;\n @State() private _disabledDates: Date[] = [];\n\n private _weekDays = Array.from(Array(7).keys());\n\n componentWillLoad() {\n if (this.disabledDates) {\n this._parseDisabledDates(this.disabledDates);\n }\n\n if (this.minDate) {\n this._parseMinDate(this.minDate);\n }\n\n if (this.maxDate) {\n this._parseMaxDate(this.maxDate);\n }\n\n this._parseValue(this.value);\n\n if (this._value) {\n this._viewDate = this._value;\n }\n\n if (isBefore(this._viewDate, this._minDate)) {\n this._viewDate = this._minDate;\n }\n\n if (isAfter(this._viewDate, this._maxDate)) {\n this._viewDate = this._maxDate;\n }\n }\n\n componentDidRender() {\n if (this._view === 'year') {\n this._scrollYearIntoView();\n }\n }\n\n @Watch('value')\n private _parseValue(value: string | Date) {\n if (!value && this.preselectToday) {\n value = new Date();\n }\n\n if (typeof value === 'string') {\n value = new Date(value);\n }\n\n this._setValue(value);\n }\n\n @Watch('minDate')\n private _parseMinDate(minDate: string | Date) {\n if (typeof minDate === 'string') {\n minDate = new Date(minDate);\n }\n\n if (!isValid(minDate)) {\n return;\n }\n\n this._minDate = minDate;\n\n if (isBefore(this._viewDate, this._minDate)) {\n this._viewDate = this._minDate;\n }\n }\n\n @Watch('maxDate')\n private _parseMaxDate(maxDate: string | Date) {\n if (typeof maxDate === 'string') {\n maxDate = new Date(maxDate);\n }\n\n if (!isValid(maxDate)) {\n return;\n }\n\n this._maxDate = maxDate;\n\n if (isAfter(this._viewDate, this._maxDate)) {\n this._viewDate = this._maxDate;\n }\n }\n\n @Watch('disabledDates')\n private _parseDisabledDates(disabledDates: Array<string | Date> | string) {\n if (typeof disabledDates === 'string') {\n disabledDates = JSON.parse(disabledDates);\n }\n\n if (!disabledDates || !Array.isArray(disabledDates)) {\n return;\n }\n\n // normalize all to date\n this._disabledDates = disabledDates\n .map((date) => {\n if (typeof date === 'string') {\n return new Date(date);\n }\n\n return date;\n })\n .filter((date) => isValid(date));\n }\n\n render() {\n return (\n <Host class={`p-calendar variant-${this.variant}`}>\n {this._getView()}\n </Host>\n );\n }\n\n private _getView() {\n if (this._view === 'year') {\n return this._getYearView();\n }\n\n if (this._view === 'month') {\n return this._getMonthView();\n }\n\n return this._getDayView();\n }\n\n /* With this, we shall hack the system in ways no one would ever have thought.\n <div class=\"col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7\"></div>\n */\n private _getDayView() {\n const daysInMonth = this._generateDaysInMonth();\n return (\n <div class=\"view-day\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('month', -1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('month')}\n class={!this._canChangeView('month') && 'disabled'}\n >\n {format(this._viewDate, 'MMMM')}\n </span>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('month', 1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"dates\">\n {this._weekDays.map((weekday) => (\n <span>\n {format(\n addDays(new Date(2022, 7, 1), weekday),\n 'eee'\n )}\n </span>\n ))}\n {daysInMonth.map((day) => {\n return (\n <time\n class={`day ${day.active && 'active'} ${\n day.disabled && 'disabled'\n } ${day.current && 'current'} ${\n day.offset !== false &&\n `col-start-${day.offset}`\n }`}\n onClick={() => this._setValue(day.date)}\n >\n {day.day}\n </time>\n );\n })}\n </div>\n </div>\n );\n }\n\n private _getMonthView() {\n const months = this._generateMonths();\n return (\n <div class=\"view-month\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('year', -1) && 'disabled'\n }`}\n onClick={() => this._changeYear(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('year', 1) && 'disabled'\n }`}\n onClick={() => this._changeYear(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"items\">\n {months.map((month) => (\n <div\n onClick={() => this._setMonth(month.month)}\n class={`month ${month.active && 'active'} ${\n month.disabled && 'disabled'\n } ${month.current && 'current'}`}\n >\n {format(setMonth(new Date(), month.month), 'MMMM')}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _getYearView() {\n const years = this._generateYears();\n return (\n <div class=\"view-year\">\n <div class=\"header\">\n <div>\n <span class=\"year disabled\">\n {years?.[0].year} - {years?.[years.length - 1].year}\n </span>\n </div>\n </div>\n <div class=\"items\">\n {years.map((year) => (\n <div\n onClick={() => this._setYear(year.year)}\n class={`year ${year.active && 'active'} ${\n year.current && 'current'\n }`}\n >\n {year.year}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _setYear(year: number) {\n const date = setYear(this._viewDate, year);\n if (this.mode === 'year') {\n return this._setValue(setMonth(setDate(date, 1), 0));\n }\n\n this._viewDate = setYear(this._viewDate, year);\n this._view = 'month';\n }\n\n private _setMonth(month: number) {\n const date = setMonth(this._viewDate, month);\n if (this.mode === 'month') {\n return this._setValue(setDate(date, 1));\n }\n\n this._viewDate = date;\n this._view = 'day';\n }\n\n private _changeMonth(amount = 1) {\n const allowed = this._canSetAmount('month', amount);\n if (!allowed) {\n return;\n }\n\n const newDate = addMonths(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _changeYear(amount = 1) {\n const allowed = this._canSetAmount('year', amount);\n if (!allowed) {\n return;\n }\n\n let newDate = addYears(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _setValue(value: Date) {\n if (value === null) {\n this._value = null;\n this.valueChange.emit(null);\n return;\n }\n\n if (!isValid(value)) {\n return;\n }\n\n if (this._isDisabledDay(value)) {\n return;\n }\n\n value = startOfDay(value);\n const isSameValue = isSameDay(value, this._value);\n\n if (isSameValue) {\n return;\n }\n\n this._value = value;\n this.valueChange.emit(value);\n }\n\n private _generateDaysInMonth() {\n const days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());\n\n return days.map((day) => {\n day = day + 1;\n const date = setDate(this._viewDate, day);\n\n const dayOfWeek = getDay(date);\n return {\n day,\n date,\n offset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,\n current: isSameDay(date, this._today),\n active: isSameDay(date, this._value),\n disabled: this._isDisabledDay(date),\n };\n });\n }\n\n private _isDisabledDay(day: Date) {\n return (\n (isBefore(day, this._minDate) && !isSameDay(day, this._maxDate)) ||\n (isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||\n ((getDay(day) === 0 || getDay(day) === 6) &&\n this.disableWeekends) ||\n this._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0\n );\n }\n\n private _generateMonths() {\n const year = getYear(this._viewDate);\n const months = Array.from(Array(12).keys());\n\n return months.map((month) => {\n const date = new Date(year, month, 1);\n return {\n month,\n current: isSameMonth(this._today, date),\n active: isSameMonth(this._value, date),\n disabled:\n isAfter(date, this._maxDate) ||\n isBefore(endOfMonth(date), this._minDate),\n };\n });\n }\n\n private _generateYears() {\n const maxYear = getYear(this._maxDate) + 1;\n const minYear = getYear(this._minDate);\n\n return Array.from(Array(maxYear - minYear).keys()).map((index) => {\n const year = minYear + index;\n return {\n year,\n current: getYear(this._today) === year,\n active: getYear(this._value) === year,\n };\n });\n }\n\n private _scrollYearIntoView() {\n const items = this._el.shadowRoot.querySelector('.view-year .items');\n if (!items) {\n return;\n }\n\n const active = items.querySelector('.year.active') as HTMLElement;\n if (active) {\n return items.scrollTo({\n top: active.offsetTop,\n });\n }\n\n const current = items.querySelector('.year.current') as HTMLElement;\n if (current) {\n return items.scrollTo({\n top: current.offsetTop,\n });\n }\n }\n\n private _changeView(view: 'year' | 'month') {\n if (!this._canChangeView(view)) {\n return;\n }\n\n this._view = view;\n }\n\n private _canChangeView(view: 'year' | 'month') {\n if (view === 'year') {\n if (isSameYear(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n if (isSameMonth(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n private _canSetAmount(type: 'month' | 'year', amount = 1) {\n if (type === 'month') {\n const newDate = addMonths(this._viewDate, amount);\n const startNewDate = startOfMonth(newDate);\n if (\n (isBefore(startNewDate, startOfMonth(this._minDate)) &&\n !isSameDay(startNewDate, this._minDate)) ||\n isAfter(startNewDate, endOfMonth(this._maxDate))\n ) {\n return false;\n }\n }\n\n if (type === 'year') {\n let newDate = addYears(this._viewDate, amount);\n const year = getYear(newDate);\n if (\n year < getYear(this._minDate) ||\n year > getYear(this._maxDate)\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n private _getAutomaticMax() {\n const date = addYears(new Date(), 50);\n\n let year = getYear(date);\n year = Math.ceil(year / 10) * 10;\n\n return setYear(date, year);\n }\n}\n"],"mappings":"4JAqBe,SAASA,EAAQC,EAAWC,GACzCC,EAAa,EAAGC,WAChB,IAAIC,EAAOC,EAAOL,GAClB,IAAIM,EAASC,EAAUN,GACvB,GAAIO,MAAMF,GAAS,CACjB,OAAO,IAAIG,KAAKC,IACpB,CACE,IAAKJ,EAAQ,CAEX,OAAOF,CACX,CACEA,EAAKO,QAAQP,EAAKQ,UAAYN,GAC9B,OAAOF,CACT,CCbe,SAASS,EAAUb,EAAWC,GAC3CC,EAAa,EAAGC,WAChB,IAAIC,EAAOC,EAAOL,GAClB,IAAIM,EAASC,EAAUN,GACvB,GAAIO,MAAMF,GAAS,CACjB,OAAO,IAAIG,KAAKC,IACpB,CACE,IAAKJ,EAAQ,CAEX,OAAOF,CACX,CACE,IAAIU,EAAaV,EAAKQ,UAUtB,IAAIG,EAAoB,IAAIN,KAAKL,EAAKY,WACtCD,EAAkBE,SAASb,EAAKc,WAAaZ,EAAS,EAAG,GACzD,IAAIa,EAAcJ,EAAkBH,UACpC,GAAIE,GAAcK,EA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AU7F,EAAS2B,KAAKkB,UAAW7D,GACvC,MAAMwB,EAAOG,EAAQkF,GACrB,GACIrF,EAAOG,EAAQgB,KAAKoB,WACpBvC,EAAOG,EAAQgB,KAAKsB,UACtB,CACE,OAAO,K,EAIf,OAAO,I,CAGH,gBAAAhB,GACJ,MAAMnD,EAAOkB,EAAS,IAAIb,KAAQ,IAElC,IAAIqB,EAAOG,EAAQ7B,GACnB0B,EAAOY,KAAKiG,KAAK7G,EAAO,IAAM,GAE9B,OAAOe,EAAQzC,EAAM0B,E"}
|
|
1
|
+
{"version":3,"names":["addDays","dirtyDate","dirtyAmount","requiredArgs","arguments","date","toDate","amount","toInteger","isNaN","Date","NaN","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","addYears","endOfMonth","month","setHours","startOfMonth","getDay","day","getDaysInMonth","year","monthIndex","lastDayOfMonth","getYear","isSameMonth","dirtyDateLeft","dirtyDateRight","dateLeft","dateRight","isSameYear","dirtyMonth","dateWithDesiredMonth","Math","min","dirtyDayOfMonth","setYear","dirtyYear","calendarComponentCss","Calendar","this","_today","_weekDays","Array","from","keys","_getAutomaticMax","mode","componentWillLoad","disabledDates","_parseDisabledDates","minDate","_parseMinDate","maxDate","_parseMaxDate","_parseValue","value","_value","_viewDate","isBefore","_minDate","isAfter","_maxDate","componentDidRender","_view","_scrollYearIntoView","preselectToday","_setValue","isValid","JSON","parse","isArray","_disabledDates","map","filter","render","h","Host","class","variant","_getView","_getYearView","_getMonthView","_getDayView","_generateDaysInMonth","_canSetAmount","onClick","_changeMonth","rotate","_changeView","_canChangeView","format","weekday","active","disabled","current","offset","months","_generateMonths","_changeYear","_setMonth","years","_generateYears","length","_setYear","allowed","newDate","valueChange","emit","_isDisabledDay","startOfDay","isSameValue","isSameDay","days","dayOfWeek","disableWeekends","findIndex","maxYear","minYear","index","items","_el","shadowRoot","querySelector","scrollTo","top","offsetTop","view","type","startNewDate","ceil"],"sources":["../../node_modules/date-fns/esm/addDays/index.js","../../node_modules/date-fns/esm/addMonths/index.js","../../node_modules/date-fns/esm/addYears/index.js","../../node_modules/date-fns/esm/endOfMonth/index.js","../../node_modules/date-fns/esm/startOfMonth/index.js","../../node_modules/date-fns/esm/getDay/index.js","../../node_modules/date-fns/esm/getDaysInMonth/index.js","../../node_modules/date-fns/esm/getYear/index.js","../../node_modules/date-fns/esm/isSameMonth/index.js","../../node_modules/date-fns/esm/isSameYear/index.js","../../node_modules/date-fns/esm/setMonth/index.js","../../node_modules/date-fns/esm/setDate/index.js","../../node_modules/date-fns/esm/setYear/index.js","src/components/molecules/calendar/calendar.component.scss?tag=p-calendar&encapsulation=shadow","src/components/molecules/calendar/calendar.component.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n var dayOfMonth = date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nexport default function getDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth);\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\nexport default function setDate(dirtyDate, dirtyDayOfMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = toInteger(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n date.setFullYear(year);\n return date;\n}",":host {\n\t@apply block bg-white p-2;\n\t@apply w-[14rem];\n\n\t.view-day,\n\t.view-month,\n\t.view-year {\n\t\t@apply flex flex-col gap-2;\n\t\t@apply w-full h-[12rem];\n\t}\n\n\t.header {\n\t\t@apply flex justify-between items-center gap-1;\n\t\t@apply text-base;\n\t\t@apply w-full;\n\n\t\tspan {\n\t\t\t@apply cursor-pointer h-8 px-2 rounded text-storm;\n\n\t\t\t&.disabled {\n\t\t\t\t@apply cursor-default;\n\t\t\t}\n\n\t\t\t&:hover:not(.disabled) {\n\t\t\t\t@apply bg-indigo-light;\n\t\t\t}\n\n\t\t\t&.year {\n\t\t\t\t@apply font-semibold;\n\t\t\t}\n\t\t}\n\n\t\t.nav {\n\t\t\t@apply relative flex justify-center items-center cursor-pointer;\n\t\t\t@apply no-underline;\n\t\t\t@apply text-indigo;\n\t\t\t@apply w-6 h-6 rounded-round;\n\t\t\ttransition-duration: 0.2s;\n\n\t\t\t&:hover:not(.disabled) {\n\t\t\t\t@apply bg-indigo-light;\n\t\t\t}\n\n\t\t\t&.disabled {\n\t\t\t\t@apply opacity-0;\n\t\t\t}\n\t\t}\n\t}\n\n\t.view-day {\n\t\t@apply h-auto min-h-[12rem];\n\n\t\t.dates {\n\t\t\t@apply grid gap-1;\n\t\t\tgrid-template-columns: repeat(7, 1fr);\n\n\t\t\t> span {\n\t\t\t\t@apply text-storm-medium font-semibold text-xs;\n\t\t\t\t@apply w-6;\n\t\t\t\t@apply self-center justify-self-center text-center;\n\t\t\t}\n\n\t\t\t> time {\n\t\t\t\t@apply flex justify-center items-center;\n\t\t\t\t@apply cursor-pointer;\n\t\t\t\t@apply w-6 h-6 box-border;\n\t\t\t\t@apply justify-self-center self-center;\n\t\t\t\t@apply rounded-round;\n\n\t\t\t\t@apply text-storm text-sm;\n\t\t\t\t@apply border border-solid border-transparent;\n\n\t\t\t\ttransition-duration: 0.2s;\n\n\t\t\t\t&.current {\n\t\t\t\t\t@apply border-storm-light;\n\t\t\t\t}\n\n\t\t\t\t&.active {\n\t\t\t\t\t@apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n\t\t\t\t}\n\n\t\t\t\t&.other-month,\n\t\t\t\t&.disabled {\n\t\t\t\t\t@apply opacity-40 cursor-default;\n\t\t\t\t}\n\n\t\t\t\t&.disabled {\n\t\t\t\t\t@apply line-through;\n\t\t\t\t}\n\n\t\t\t\t&:hover:not(.disabled):not(.active):not(.other-month) {\n\t\t\t\t\t@apply bg-indigo-light text-storm;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.view-month,\n\t.view-year {\n\t\t.items {\n\t\t\t@apply relative grid overflow-y-auto gap-1 w-full;\n\t\t\t@apply h-full items-center;\n\t\t\tgrid-template-columns: repeat(3, 1fr);\n\n\t\t\t> div {\n\t\t\t\t@apply cursor-pointer;\n\t\t\t\t@apply flex justify-center items-center;\n\t\t\t\t@apply text-sm h-8 px-2 rounded;\n\t\t\t\t@apply text-storm;\n\t\t\t\t@apply border border-solid border-transparent;\n\n\t\t\t\t&.current {\n\t\t\t\t\t@apply border-storm-light;\n\t\t\t\t}\n\n\t\t\t\t&.active {\n\t\t\t\t\t@apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n\t\t\t\t}\n\n\t\t\t\t&.disabled {\n\t\t\t\t\t@apply line-through;\n\t\t\t\t\t@apply opacity-40 cursor-default;\n\t\t\t\t}\n\n\t\t\t\t&:hover:not(.disabled):not(.active) {\n\t\t\t\t\t@apply bg-mystic;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.view-month {\n\t\t.items {\n\t\t\tgrid-template-columns: repeat(2, 1fr);\n\t\t}\n\t}\n\n\t.view-year {\n\t\t.header {\n\t\t\t@apply justify-center;\n\t\t}\n\t}\n}\n\n:host(.variant-default) {\n\t@apply rounded shadow-4;\n}\n\n:host(.variant-embedded) {\n\t@apply p-0;\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport {\n\taddDays,\n\taddMonths,\n\taddYears,\n\tendOfMonth,\n\tformat,\n\tgetDay,\n\tgetDaysInMonth,\n\tgetYear,\n\tisAfter,\n\tisBefore,\n\tisSameDay,\n\tisSameMonth,\n\tisSameYear,\n\tisValid,\n\tsetDate,\n\tsetMonth,\n\tsetYear,\n\tstartOfDay,\n\tstartOfMonth,\n} from 'date-fns';\n\n@Component({\n\ttag: 'p-calendar',\n\tstyleUrl: 'calendar.component.scss',\n\tshadow: true,\n})\nexport class Calendar {\n\t/**\n\t * The variant of the button\n\t */\n\t@Prop() variant: 'default' | 'embedded' = 'default';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value?: Date | string;\n\n\t/**\n\t * Wether to automatically preselect today\n\t */\n\t@Prop() preselectToday: boolean = false;\n\n\t/**\n\t * Disabled dates\n\t */\n\t@Prop() disabledDates?: Array<Date | string> | string;\n\n\t/**\n\t * Min date\n\t */\n\t@Prop() minDate: Date | string = new Date(1970, 0, 1);\n\n\t/**\n\t * Max date\n\t */\n\t@Prop() maxDate: Date | string = this._getAutomaticMax();\n\n\t/**\n\t * Wether to disable the weekends\n\t */\n\t@Prop() disableWeekends: boolean = false;\n\n\t/**\n\t * The mode of the datepicker\n\t */\n\t@Prop() mode: 'year' | 'month' | 'day' = 'day';\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _today = new Date();\n\t@State() private _view: 'year' | 'month' | 'day' = this.mode;\n\t@State() private _viewDate = this._today;\n\n\t@State() private _value: Date;\n\t@State() private _minDate: Date;\n\t@State() private _maxDate: Date;\n\t@State() private _disabledDates: Date[] = [];\n\n\tprivate _weekDays = Array.from(Array(7).keys());\n\n\tcomponentWillLoad() {\n\t\tif (this.disabledDates) {\n\t\t\tthis._parseDisabledDates(this.disabledDates);\n\t\t}\n\n\t\tif (this.minDate) {\n\t\t\tthis._parseMinDate(this.minDate);\n\t\t}\n\n\t\tif (this.maxDate) {\n\t\t\tthis._parseMaxDate(this.maxDate);\n\t\t}\n\n\t\tthis._parseValue(this.value);\n\n\t\tif (this._value) {\n\t\t\tthis._viewDate = this._value;\n\t\t}\n\n\t\tif (isBefore(this._viewDate, this._minDate)) {\n\t\t\tthis._viewDate = this._minDate;\n\t\t}\n\n\t\tif (isAfter(this._viewDate, this._maxDate)) {\n\t\t\tthis._viewDate = this._maxDate;\n\t\t}\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this._view === 'year') {\n\t\t\tthis._scrollYearIntoView();\n\t\t}\n\t}\n\n\t@Watch('value')\n\tprivate _parseValue(value: string | Date) {\n\t\tif (!value && this.preselectToday) {\n\t\t\tvalue = new Date();\n\t\t}\n\n\t\tif (typeof value === 'string') {\n\t\t\tvalue = new Date(value);\n\t\t}\n\n\t\tthis._setValue(value);\n\t}\n\n\t@Watch('minDate')\n\tprivate _parseMinDate(minDate: string | Date) {\n\t\tif (typeof minDate === 'string') {\n\t\t\tminDate = new Date(minDate);\n\t\t}\n\n\t\tif (!isValid(minDate)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._minDate = minDate;\n\n\t\tif (isBefore(this._viewDate, this._minDate)) {\n\t\t\tthis._viewDate = this._minDate;\n\t\t}\n\t}\n\n\t@Watch('maxDate')\n\tprivate _parseMaxDate(maxDate: string | Date) {\n\t\tif (typeof maxDate === 'string') {\n\t\t\tmaxDate = new Date(maxDate);\n\t\t}\n\n\t\tif (!isValid(maxDate)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._maxDate = maxDate;\n\n\t\tif (isAfter(this._viewDate, this._maxDate)) {\n\t\t\tthis._viewDate = this._maxDate;\n\t\t}\n\t}\n\n\t@Watch('disabledDates')\n\tprivate _parseDisabledDates(disabledDates: Array<string | Date> | string) {\n\t\tif (typeof disabledDates === 'string') {\n\t\t\tdisabledDates = JSON.parse(disabledDates);\n\t\t}\n\n\t\tif (!disabledDates || !Array.isArray(disabledDates)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// normalize all to date\n\t\tthis._disabledDates = disabledDates\n\t\t\t.map((date) => {\n\t\t\t\tif (typeof date === 'string') {\n\t\t\t\t\treturn new Date(date);\n\t\t\t\t}\n\n\t\t\t\treturn date;\n\t\t\t})\n\t\t\t.filter((date) => isValid(date));\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-calendar variant-${this.variant}`}>\n\t\t\t\t{this._getView()}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _getView() {\n\t\tif (this._view === 'year') {\n\t\t\treturn this._getYearView();\n\t\t}\n\n\t\tif (this._view === 'month') {\n\t\t\treturn this._getMonthView();\n\t\t}\n\n\t\treturn this._getDayView();\n\t}\n\n\t/* With this, we shall hack the system in ways no one would ever have thought.\n <div class=\"col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7\"></div>\n */\n\tprivate _getDayView() {\n\t\tconst daysInMonth = this._generateDaysInMonth();\n\t\treturn (\n\t\t\t<div class=\"view-day\">\n\t\t\t\t<div class=\"header\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`nav ${\n\t\t\t\t\t\t\t!this._canSetAmount('month', -1) && 'disabled'\n\t\t\t\t\t\t}`}\n\t\t\t\t\t\tonClick={() => this._changeMonth(-1)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<p-icon variant=\"chevron\" rotate={90} />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tonClick={() => this._changeView('month')}\n\t\t\t\t\t\t\tclass={!this._canChangeView('month') && 'disabled'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{format(this._viewDate, 'MMMM')}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tonClick={() => this._changeView('year')}\n\t\t\t\t\t\t\tclass={`year ${\n\t\t\t\t\t\t\t\t!this._canChangeView('year') && 'disabled'\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{getYear(this._viewDate)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`nav ${\n\t\t\t\t\t\t\t!this._canSetAmount('month', 1) && 'disabled'\n\t\t\t\t\t\t}`}\n\t\t\t\t\t\tonClick={() => this._changeMonth(1)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<p-icon variant=\"chevron\" rotate={-90} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"dates\">\n\t\t\t\t\t{this._weekDays.map((weekday) => (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{format(\n\t\t\t\t\t\t\t\taddDays(new Date(2022, 7, 1), weekday),\n\t\t\t\t\t\t\t\t'eee'\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t))}\n\t\t\t\t\t{daysInMonth.map((day) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\tclass={`day ${day.active && 'active'} ${\n\t\t\t\t\t\t\t\t\tday.disabled && 'disabled'\n\t\t\t\t\t\t\t\t} ${day.current && 'current'} ${\n\t\t\t\t\t\t\t\t\tday.offset !== false &&\n\t\t\t\t\t\t\t\t\t`col-start-${day.offset}`\n\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\tonClick={() => this._setValue(day.date)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{day.day}\n\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _getMonthView() {\n\t\tconst months = this._generateMonths();\n\t\treturn (\n\t\t\t<div class=\"view-month\">\n\t\t\t\t<div class=\"header\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`nav ${\n\t\t\t\t\t\t\t!this._canSetAmount('year', -1) && 'disabled'\n\t\t\t\t\t\t}`}\n\t\t\t\t\t\tonClick={() => this._changeYear(-1)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<p-icon variant=\"chevron\" rotate={90} />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tonClick={() => this._changeView('year')}\n\t\t\t\t\t\t\tclass={`year ${\n\t\t\t\t\t\t\t\t!this._canChangeView('year') && 'disabled'\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{getYear(this._viewDate)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`nav ${\n\t\t\t\t\t\t\t!this._canSetAmount('year', 1) && 'disabled'\n\t\t\t\t\t\t}`}\n\t\t\t\t\t\tonClick={() => this._changeYear(1)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<p-icon variant=\"chevron\" rotate={-90} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"items\">\n\t\t\t\t\t{months.map((month) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tonClick={() => this._setMonth(month.month)}\n\t\t\t\t\t\t\tclass={`month ${month.active && 'active'} ${\n\t\t\t\t\t\t\t\tmonth.disabled && 'disabled'\n\t\t\t\t\t\t\t} ${month.current && 'current'}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{format(setMonth(new Date(), month.month), 'MMMM')}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _getYearView() {\n\t\tconst years = this._generateYears();\n\t\treturn (\n\t\t\t<div class=\"view-year\">\n\t\t\t\t<div class=\"header\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span class=\"year disabled\">\n\t\t\t\t\t\t\t{years?.[0].year} - {years?.[years.length - 1].year}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"items\">\n\t\t\t\t\t{years.map((year) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tonClick={() => this._setYear(year.year)}\n\t\t\t\t\t\t\tclass={`year ${year.active && 'active'} ${\n\t\t\t\t\t\t\t\tyear.current && 'current'\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{year.year}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setYear(year: number) {\n\t\tconst date = setYear(this._viewDate, year);\n\t\tif (this.mode === 'year') {\n\t\t\treturn this._setValue(setMonth(setDate(date, 1), 0));\n\t\t}\n\n\t\tthis._viewDate = setYear(this._viewDate, year);\n\t\tthis._view = 'month';\n\t}\n\n\tprivate _setMonth(month: number) {\n\t\tconst date = setMonth(this._viewDate, month);\n\t\tif (this.mode === 'month') {\n\t\t\treturn this._setValue(setDate(date, 1));\n\t\t}\n\n\t\tthis._viewDate = date;\n\t\tthis._view = 'day';\n\t}\n\n\tprivate _changeMonth(amount = 1) {\n\t\tconst allowed = this._canSetAmount('month', amount);\n\t\tif (!allowed) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newDate = addMonths(this._viewDate, amount);\n\t\tthis._viewDate = newDate;\n\t}\n\n\tprivate _changeYear(amount = 1) {\n\t\tconst allowed = this._canSetAmount('year', amount);\n\t\tif (!allowed) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet newDate = addYears(this._viewDate, amount);\n\t\tthis._viewDate = newDate;\n\t}\n\n\tprivate _setValue(value: Date) {\n\t\tif (value === null) {\n\t\t\tthis._value = null;\n\t\t\tthis.valueChange.emit(null);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!isValid(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isDisabledDay(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvalue = startOfDay(value);\n\t\tconst isSameValue = isSameDay(value, this._value);\n\n\t\tif (isSameValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._value = value;\n\t\tthis.valueChange.emit(value);\n\t}\n\n\tprivate _generateDaysInMonth() {\n\t\tconst days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());\n\n\t\treturn days.map((day) => {\n\t\t\tday = day + 1;\n\t\t\tconst date = setDate(this._viewDate, day);\n\n\t\t\tconst dayOfWeek = getDay(date);\n\t\t\treturn {\n\t\t\t\tday,\n\t\t\t\tdate,\n\t\t\t\toffset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,\n\t\t\t\tcurrent: isSameDay(date, this._today),\n\t\t\t\tactive: isSameDay(date, this._value),\n\t\t\t\tdisabled: this._isDisabledDay(date),\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate _isDisabledDay(day: Date) {\n\t\treturn (\n\t\t\t(isBefore(day, this._minDate) && !isSameDay(day, this._maxDate)) ||\n\t\t\t(isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||\n\t\t\t((getDay(day) === 0 || getDay(day) === 6) &&\n\t\t\t\tthis.disableWeekends) ||\n\t\t\tthis._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0\n\t\t);\n\t}\n\n\tprivate _generateMonths() {\n\t\tconst year = getYear(this._viewDate);\n\t\tconst months = Array.from(Array(12).keys());\n\n\t\treturn months.map((month) => {\n\t\t\tconst date = new Date(year, month, 1);\n\t\t\treturn {\n\t\t\t\tmonth,\n\t\t\t\tcurrent: isSameMonth(this._today, date),\n\t\t\t\tactive: isSameMonth(this._value, date),\n\t\t\t\tdisabled:\n\t\t\t\t\tisAfter(date, this._maxDate) ||\n\t\t\t\t\tisBefore(endOfMonth(date), this._minDate),\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate _generateYears() {\n\t\tconst maxYear = getYear(this._maxDate) + 1;\n\t\tconst minYear = getYear(this._minDate);\n\n\t\treturn Array.from(Array(maxYear - minYear).keys()).map((index) => {\n\t\t\tconst year = minYear + index;\n\t\t\treturn {\n\t\t\t\tyear,\n\t\t\t\tcurrent: getYear(this._today) === year,\n\t\t\t\tactive: getYear(this._value) === year,\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate _scrollYearIntoView() {\n\t\tconst items = this._el.shadowRoot.querySelector('.view-year .items');\n\t\tif (!items) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst active = items.querySelector('.year.active') as HTMLElement;\n\t\tif (active) {\n\t\t\treturn items.scrollTo({\n\t\t\t\ttop: active.offsetTop,\n\t\t\t});\n\t\t}\n\n\t\tconst current = items.querySelector('.year.current') as HTMLElement;\n\t\tif (current) {\n\t\t\treturn items.scrollTo({\n\t\t\t\ttop: current.offsetTop,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate _changeView(view: 'year' | 'month') {\n\t\tif (!this._canChangeView(view)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._view = view;\n\t}\n\n\tprivate _canChangeView(view: 'year' | 'month') {\n\t\tif (view === 'year') {\n\t\t\tif (isSameYear(this._minDate, this._maxDate)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\tif (isSameMonth(this._minDate, this._maxDate)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tprivate _canSetAmount(type: 'month' | 'year', amount = 1) {\n\t\tif (type === 'month') {\n\t\t\tconst newDate = addMonths(this._viewDate, amount);\n\t\t\tconst startNewDate = startOfMonth(newDate);\n\t\t\tif (\n\t\t\t\t(isBefore(startNewDate, startOfMonth(this._minDate)) &&\n\t\t\t\t\t!isSameDay(startNewDate, this._minDate)) ||\n\t\t\t\tisAfter(startNewDate, endOfMonth(this._maxDate))\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (type === 'year') {\n\t\t\tlet newDate = addYears(this._viewDate, amount);\n\t\t\tconst year = getYear(newDate);\n\t\t\tif (\n\t\t\t\tyear < getYear(this._minDate) ||\n\t\t\t\tyear > getYear(this._maxDate)\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tprivate _getAutomaticMax() {\n\t\tconst date = addYears(new Date(), 50);\n\n\t\tlet year = getYear(date);\n\t\tyear = Math.ceil(year / 10) * 10;\n\n\t\treturn setYear(date, year);\n\t}\n}\n"],"mappings":"4JAqBe,SAASA,EAAQC,EAAWC,GACzCC,EAAa,EAAGC,WAChB,IAAIC,EAAOC,EAAOL,GAClB,IAAIM,EAASC,EAAUN,GACvB,GAAIO,MAAMF,GAAS,CACjB,OAAO,IAAIG,KAAKC,IACpB,CACE,IAAKJ,EAAQ,CAEX,OAAOF,CACX,CACEA,EAAKO,QAAQP,EAAKQ,UAAYN,GAC9B,OAAOF,CACT,CCbe,SAASS,EAAUb,EAAWC,GAC3CC,EAAa,EAAGC,WAChB,IAAIC,EAAOC,EAAOL,GAClB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