@paperless/core 0.1.0-alpha.33 → 0.1.0-alpha.331
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 +3112 -0
- package/README.md +9 -1
- package/dist/assets/i18n/page-size-select.i18n.en.json +4 -0
- package/dist/assets/i18n/page-size-select.i18n.nl.json +4 -0
- package/dist/assets/i18n/table-footer.i18n.en.json +3 -0
- package/dist/assets/i18n/table-footer.i18n.nl.json +3 -0
- package/dist/assets/i18n/table-header.i18n.en.json +6 -0
- package/dist/assets/i18n/table-header.i18n.nl.json +6 -0
- package/dist/assets/i18n/table.i18n.en.json +13 -0
- package/dist/assets/i18n/table.i18n.nl.json +13 -0
- package/dist/assets/icons/camera.svg +10 -0
- package/dist/assets/icons/filter.svg +6 -13
- package/dist/assets/icons/menu.svg +25 -0
- package/dist/assets/icons/more.svg +18 -0
- package/dist/assets/icons/notification.svg +10 -0
- package/dist/assets/icons/reload.svg +10 -0
- package/dist/assets/icons/signout.svg +23 -0
- package/dist/assets/icons/switch.svg +20 -0
- package/dist/assets/illustrations/e-mail.svg +1 -0
- package/dist/assets/illustrations/empty-state-overview.svg +65 -0
- package/dist/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/build/index.esm.js +1 -0
- package/dist/build/p-05f73516.entry.js +1 -0
- package/dist/build/p-0688d548.entry.js +1 -0
- package/dist/build/p-07f28695.entry.js +1 -0
- package/dist/build/p-09ea2a1a.js +1 -0
- package/dist/build/p-12f5c483.entry.js +1 -0
- package/dist/build/p-1ba7cadc.entry.js +1 -0
- package/dist/build/p-2e47afc7.entry.js +1 -0
- package/dist/build/p-37fa2c13.entry.js +1 -0
- package/dist/build/p-3946e0a3.entry.js +1 -0
- package/dist/build/p-3a98b145.entry.js +1 -0
- package/dist/build/p-43d1544e.entry.js +1 -0
- package/dist/build/p-4e650fe4.js +1 -0
- package/dist/build/p-4fcd08ce.entry.js +1 -0
- package/dist/build/p-529ccaf7.entry.js +1 -0
- package/dist/build/p-5b7c22ee.entry.js +1 -0
- package/dist/build/p-62d49606.entry.js +1 -0
- package/dist/build/p-63de1c3d.entry.js +1 -0
- package/dist/build/p-681ed79b.entry.js +1 -0
- package/dist/build/p-6c60fd3d.js +1 -0
- package/dist/build/p-7df6230f.entry.js +1 -0
- package/dist/build/p-8a6728d5.js +1 -0
- package/dist/build/p-8c67da86.entry.js +1 -0
- package/dist/build/p-91d032b2.entry.js +1 -0
- package/dist/build/p-9315c1e2.entry.js +1 -0
- package/dist/build/p-98e3dcd7.entry.js +1 -0
- package/dist/build/p-ac5a17c4.entry.js +1 -0
- package/dist/build/p-b273ac6d.js +1 -0
- package/dist/build/p-b4af4b21.entry.js +1 -0
- package/dist/build/p-b72559e4.entry.js +1 -0
- package/dist/build/p-b8dd503c.entry.js +1 -0
- package/dist/build/p-c296a33d.entry.js +1 -0
- package/dist/build/p-c80933ab.entry.js +1 -0
- package/dist/build/p-c9f2fa8f.js +2 -0
- package/dist/build/p-d1022d64.entry.js +1 -0
- package/dist/build/p-d2cf5ab2.entry.js +1 -0
- package/dist/build/p-d5885f2b.entry.js +1 -0
- package/dist/build/p-dbb409ab.entry.js +1 -0
- package/dist/build/p-ddd3372b.entry.js +1 -0
- package/dist/build/p-e3e3c4d1.entry.js +1 -0
- package/dist/build/p-e4bd4022.entry.js +1 -0
- package/dist/build/p-e9ed032e.entry.js +1 -0
- package/dist/build/p-f1867cb5.entry.js +1 -0
- package/dist/build/p-f499f696.entry.js +1 -0
- package/dist/build/p-f86fcdf4.js +1 -0
- package/dist/build/p-fa3216a5.entry.js +1 -0
- package/dist/build/p-fd1e32c1.entry.js +1 -0
- package/dist/build/paperless.css +1 -81
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/child-of-e472f812.js +9 -0
- package/dist/cjs/constants-a4459ec9.js +7 -0
- package/dist/cjs/index-040ec3f9.js +2481 -0
- package/dist/cjs/{index-a46a39a5.js → index-195002a8.js} +662 -261
- package/dist/cjs/index.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/localization-9e2ac7f3.js +60 -0
- package/dist/cjs/object-get-by-path-6dc21ed5.js +12 -0
- package/dist/cjs/p-accordion.cjs.entry.js +34 -0
- package/dist/cjs/p-avatar-group.cjs.entry.js +20 -0
- package/dist/cjs/p-avatar.cjs.entry.js +22 -11
- package/dist/cjs/p-backdrop.cjs.entry.js +41 -0
- package/dist/cjs/p-button_3.cjs.entry.js +246 -104
- package/dist/cjs/p-calendar.cjs.entry.js +709 -0
- package/dist/cjs/p-card-body.cjs.entry.js +20 -0
- package/dist/cjs/p-card-container.cjs.entry.js +21 -0
- package/dist/cjs/p-card-header.cjs.entry.js +22 -0
- package/dist/cjs/p-content-slider.cjs.entry.js +210 -0
- package/dist/cjs/p-counter.cjs.entry.js +5 -3
- package/dist/cjs/p-datepicker.cjs.entry.js +4082 -0
- package/dist/cjs/p-divider.cjs.entry.js +6 -3
- package/dist/cjs/p-drawer-body_3.cjs.entry.js +49 -0
- package/dist/cjs/p-drawer.cjs.entry.js +63 -0
- package/dist/cjs/p-dropdown-menu-container.cjs.entry.js +5 -3
- package/dist/cjs/p-dropdown_2.cjs.entry.js +165 -0
- package/dist/cjs/p-helper_3.cjs.entry.js +204 -0
- package/dist/cjs/p-illustration_6.cjs.entry.js +2725 -0
- package/dist/cjs/p-info-panel.cjs.entry.js +4 -8
- package/dist/cjs/p-label_3.cjs.entry.js +63 -0
- package/dist/cjs/p-layout.cjs.entry.js +20 -0
- package/dist/cjs/p-modal-body_4.cjs.entry.js +77 -0
- package/dist/cjs/p-modal.cjs.entry.js +59 -0
- package/dist/cjs/p-navbar.cjs.entry.js +28 -0
- package/dist/cjs/p-navigation-item.cjs.entry.js +7 -6
- package/dist/cjs/p-page-size-select_3.cjs.entry.js +222 -0
- package/dist/cjs/p-profile.cjs.entry.js +43 -0
- package/dist/cjs/p-select.cjs.entry.js +183 -0
- package/dist/cjs/p-slider-indicator.cjs.entry.js +20 -0
- package/dist/cjs/p-status.cjs.entry.js +5 -5
- package/dist/cjs/p-stepper-item_2.cjs.entry.js +38 -0
- package/dist/cjs/p-stepper.cjs.entry.js +43 -0
- package/dist/cjs/p-tab-group.cjs.entry.js +19 -0
- package/dist/cjs/p-tab-item.cjs.entry.js +20 -0
- package/dist/cjs/p-table-column.cjs.entry.js +26 -0
- package/dist/cjs/p-table.cjs.entry.js +341 -0
- package/dist/cjs/p-toast-container.cjs.entry.js +20 -0
- package/dist/cjs/p-toast.cjs.entry.js +33 -0
- package/dist/cjs/paperless.cjs.js +3 -3
- package/dist/cjs/{popper-e0c4ed4c.js → popper-d7a0f999.js} +60 -49
- package/dist/collection/assets/icons/camera.svg +10 -0
- package/dist/collection/assets/icons/filter.svg +6 -13
- package/dist/collection/assets/icons/menu.svg +25 -0
- package/dist/collection/assets/icons/more.svg +18 -0
- package/dist/collection/assets/icons/notification.svg +10 -0
- package/dist/collection/assets/icons/reload.svg +10 -0
- package/dist/collection/assets/icons/signout.svg +23 -0
- package/dist/collection/assets/icons/switch.svg +20 -0
- package/dist/collection/assets/illustrations/e-mail.svg +1 -0
- package/dist/collection/assets/illustrations/empty-state-overview.svg +65 -0
- package/dist/collection/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/collection/collection-manifest.json +43 -3
- package/dist/collection/components/atoms/avatar/avatar.component.css +1 -31
- package/dist/collection/components/atoms/avatar/avatar.component.js +110 -90
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.css +1 -0
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.js +41 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.css +1 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.js +148 -0
- package/dist/collection/components/atoms/button/button.component.css +1 -79
- package/dist/collection/components/atoms/button/button.component.js +305 -251
- package/dist/collection/components/atoms/card-body/card-body.component.css +1 -0
- package/dist/collection/components/atoms/card-body/card-body.component.js +42 -0
- package/dist/collection/components/atoms/card-container/card-container.component.css +1 -0
- package/dist/collection/components/atoms/card-container/card-container.component.js +62 -0
- package/dist/collection/components/atoms/card-header/card-header.component.css +1 -0
- package/dist/collection/components/atoms/card-header/card-header.component.js +61 -0
- package/dist/collection/components/atoms/counter/counter.component.css +1 -5
- package/dist/collection/components/atoms/counter/counter.component.js +56 -9
- package/dist/collection/components/atoms/divider/divider.component.css +1 -3
- package/dist/collection/components/atoms/divider/divider.component.js +15 -8
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.css +1 -0
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.js +43 -0
- package/dist/collection/components/atoms/drawer-container/drawer-container.component.css +1 -0
- package/dist/collection/components/atoms/drawer-container/drawer-container.component.js +47 -0
- package/dist/collection/components/atoms/drawer-header/drawer-header.component.css +1 -0
- package/dist/collection/components/atoms/drawer-header/drawer-header.component.js +65 -0
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +1 -5
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js +56 -9
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -13
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +74 -30
- package/dist/collection/components/atoms/helper/helper.component.css +1 -7
- package/dist/collection/components/atoms/helper/helper.component.js +42 -12
- package/dist/collection/components/atoms/icon/icon.component.css +1 -0
- package/dist/collection/components/atoms/icon/icon.component.js +138 -91
- package/dist/collection/components/atoms/illustration/illustration.component.js +28 -23
- package/dist/collection/components/atoms/info-panel/info-panel.component.css +1 -28
- package/dist/collection/components/atoms/info-panel/info-panel.component.js +85 -89
- package/dist/collection/components/atoms/label/label.component.css +1 -0
- package/dist/collection/components/atoms/label/label.component.js +170 -0
- package/dist/collection/components/atoms/layout/layout.component.css +1 -0
- package/dist/collection/components/atoms/layout/layout.component.js +43 -0
- package/dist/collection/components/atoms/loader/loader.component.css +1 -26
- package/dist/collection/components/atoms/loader/loader.component.js +112 -114
- package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -0
- package/dist/collection/components/atoms/modal-body/modal-body.component.js +62 -0
- package/dist/collection/components/atoms/modal-container/modal-container.component.css +1 -0
- package/dist/collection/components/atoms/modal-container/modal-container.component.js +74 -0
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.css +1 -0
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.js +18 -0
- package/dist/collection/components/atoms/modal-header/modal-header.component.css +1 -0
- package/dist/collection/components/atoms/modal-header/modal-header.component.js +65 -0
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +1 -16
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.js +34 -32
- package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -5
- package/dist/collection/components/atoms/segment-container/segment-container.component.js +12 -9
- package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -21
- package/dist/collection/components/atoms/segment-item/segment-item.component.js +98 -87
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.css +1 -0
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js +43 -0
- package/dist/collection/components/atoms/status/status.component.css +1 -16
- package/dist/collection/components/atoms/status/status.component.js +98 -89
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.css +1 -0
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.js +100 -0
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.css +1 -0
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.js +62 -0
- package/dist/collection/components/atoms/tab-group/tab-group.component.css +1 -0
- package/dist/collection/components/atoms/tab-group/tab-group.component.js +18 -0
- package/dist/collection/components/atoms/tab-item/tab-item.component.css +1 -0
- package/dist/collection/components/atoms/tab-item/tab-item.component.js +43 -0
- package/dist/collection/components/atoms/table-container/table-container.component.css +1 -0
- package/dist/collection/components/atoms/table-container/table-container.component.js +18 -0
- package/dist/collection/components/atoms/toast-container/toast-container.component.css +1 -0
- package/dist/collection/components/atoms/toast-container/toast-container.component.js +43 -0
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -40
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +196 -164
- package/dist/collection/components/helpers/table-column/table-column.component.js +150 -0
- package/dist/collection/components/molecules/accordion/accordion.component.css +1 -0
- package/dist/collection/components/molecules/accordion/accordion.component.js +127 -0
- package/dist/collection/components/molecules/calendar/calendar.component.css +1 -0
- package/dist/collection/components/molecules/calendar/calendar.component.js +503 -0
- package/dist/collection/components/molecules/content-slider/content-slider.component.css +1 -0
- package/dist/collection/components/molecules/content-slider/content-slider.component.js +316 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.css +1 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +507 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -9
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +266 -127
- package/dist/collection/components/molecules/input-group/input-group.component.css +1 -0
- package/dist/collection/components/molecules/input-group/input-group.component.js +337 -0
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.css +1 -28
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +106 -104
- package/dist/collection/components/molecules/page-size-select/constants.js +2 -0
- package/dist/collection/components/molecules/page-size-select/page-size-select.component.js +204 -0
- package/dist/collection/components/molecules/pagination/pagination.component.css +1 -3
- package/dist/collection/components/molecules/pagination/pagination.component.js +118 -94
- package/dist/collection/components/molecules/profile/profile.component.css +1 -0
- package/dist/collection/components/molecules/profile/profile.component.js +89 -0
- package/dist/collection/components/molecules/select/select.component.css +1 -0
- package/dist/collection/components/molecules/select/select.component.js +570 -0
- package/dist/collection/components/molecules/stepper/stepper.component.css +1 -0
- package/dist/collection/components/molecules/stepper/stepper.component.js +84 -0
- package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -0
- package/dist/collection/components/molecules/table-cell/table-cell.component.js +262 -0
- package/dist/collection/components/molecules/table-footer/table-footer.component.css +1 -0
- package/dist/collection/components/molecules/table-footer/table-footer.component.js +275 -0
- package/dist/collection/components/molecules/table-header/table-header.component.css +1 -0
- package/dist/collection/components/molecules/table-header/table-header.component.js +380 -0
- package/dist/collection/components/molecules/table-row/table-row.component.css +1 -0
- package/dist/collection/components/molecules/table-row/table-row.component.js +64 -0
- package/dist/collection/components/molecules/toast/toast.component.css +1 -0
- package/dist/collection/components/molecules/toast/toast.component.js +196 -0
- package/dist/collection/components/organisms/drawer/drawer.component.css +1 -0
- package/dist/collection/components/organisms/drawer/drawer.component.js +233 -0
- package/dist/collection/components/organisms/modal/modal.component.js +258 -0
- package/dist/collection/components/organisms/navbar/navbar.component.css +1 -0
- package/dist/collection/components/organisms/navbar/navbar.component.js +89 -0
- package/dist/collection/components/organisms/table/table.component.css +1 -0
- package/dist/collection/components/organisms/table/table.component.js +1164 -0
- package/dist/collection/index.js +2 -1
- package/dist/collection/tailwind/animation.js +87 -0
- package/dist/collection/tailwind/backdrop-blur.js +3 -0
- package/dist/collection/tailwind/border-radius.js +1 -0
- package/dist/collection/tailwind/height.js +5 -0
- package/dist/collection/tailwind/screens.js +8 -0
- package/dist/collection/tailwind/shadows.js +11 -5
- package/dist/collection/tailwind/spacing.js +10 -0
- package/dist/collection/tailwind/typography.js +21 -0
- package/dist/collection/tailwind/width.js +23 -0
- package/dist/collection/tailwind/z-index.js +17 -0
- package/dist/collection/tailwind.config.js +29 -14
- package/dist/collection/types/index.js +2 -0
- package/dist/collection/types/table.js +1 -0
- package/dist/collection/types/tailwind.js +1 -0
- package/dist/collection/utils/icons.js +14 -0
- package/dist/collection/utils/illustrations.js +6 -0
- package/dist/collection/utils/index.js +6 -0
- package/dist/collection/utils/localization.js +55 -0
- package/dist/collection/utils/object-get-by-path.js +8 -0
- package/dist/collection/utils/transformers.js +4 -0
- package/dist/components/backdrop.component.js +57 -0
- package/dist/components/button.component.js +98 -0
- package/dist/components/calendar.component.js +3197 -0
- package/dist/components/counter.component.js +8 -3
- package/dist/components/divider.component.js +33 -0
- package/dist/components/drawer-body.component.js +33 -0
- package/dist/components/drawer-container.component.js +32 -0
- package/dist/components/drawer-header.component.js +52 -0
- package/dist/components/dropdown-menu-container.component.js +8 -3
- package/dist/components/dropdown-menu-item.component.js +43 -0
- package/dist/components/dropdown.component.js +182 -0
- package/dist/components/helper.component.js +39 -0
- package/dist/components/icon.component.js +182 -27
- package/dist/{cjs/p-illustration.cjs.entry.js → components/illustration.component.js} +188 -16
- package/dist/components/index.d.ts +59 -19
- package/dist/components/index.js +50 -0
- package/dist/components/input-group.component.js +116 -0
- package/dist/components/label.component.js +52 -0
- package/dist/components/loader.component.js +9 -13
- package/dist/components/localization.js +57 -0
- package/dist/components/modal-body.component.js +35 -0
- package/dist/components/modal-container.component.js +47 -0
- package/dist/components/modal-footer.component.js +36 -0
- package/dist/components/modal-header.component.js +52 -0
- package/dist/components/p-accordion.d.ts +11 -0
- package/dist/components/p-accordion.js +65 -0
- package/dist/components/p-avatar-group.d.ts +11 -0
- package/dist/components/p-avatar-group.js +35 -0
- package/dist/components/p-avatar.js +24 -14
- package/dist/components/p-backdrop.d.ts +11 -0
- package/dist/components/p-backdrop.js +6 -0
- package/dist/components/p-button.js +1 -102
- package/dist/components/p-calendar.d.ts +11 -0
- package/dist/components/p-calendar.js +6 -0
- package/dist/components/p-card-body.d.ts +11 -0
- package/dist/components/p-card-body.js +35 -0
- package/dist/components/p-card-container.d.ts +11 -0
- package/dist/components/p-card-container.js +38 -0
- package/dist/components/p-card-header.d.ts +11 -0
- package/dist/components/p-card-header.js +44 -0
- package/dist/components/p-content-slider.d.ts +11 -0
- package/dist/components/p-content-slider.js +239 -0
- package/dist/components/p-datepicker.d.ts +11 -0
- package/dist/components/p-datepicker.js +4156 -0
- package/dist/components/p-divider.js +1 -28
- package/dist/components/p-drawer-body.d.ts +11 -0
- package/dist/components/p-drawer-body.js +6 -0
- package/dist/components/p-drawer-container.d.ts +11 -0
- package/dist/components/p-drawer-container.js +6 -0
- package/dist/components/p-drawer-header.d.ts +11 -0
- package/dist/components/p-drawer-header.js +6 -0
- package/dist/components/p-drawer.d.ts +11 -0
- package/dist/components/p-drawer.js +128 -0
- package/dist/components/p-dropdown-menu-item.js +1 -34
- package/dist/components/p-dropdown.js +1 -161
- package/dist/components/p-helper.js +1 -34
- package/dist/components/p-illustration.js +1 -1432
- package/dist/components/p-info-panel.js +3 -7
- package/dist/components/p-input-group.d.ts +11 -0
- package/dist/components/p-input-group.js +6 -0
- package/dist/components/p-label.d.ts +11 -0
- package/dist/components/p-label.js +6 -0
- package/dist/components/p-layout.d.ts +11 -0
- package/dist/components/p-layout.js +36 -0
- package/dist/components/p-modal-body.d.ts +11 -0
- package/dist/components/p-modal-body.js +6 -0
- package/dist/components/p-modal-container.d.ts +11 -0
- package/dist/components/p-modal-container.js +6 -0
- package/dist/components/p-modal-footer.d.ts +11 -0
- package/dist/components/p-modal-footer.js +6 -0
- package/dist/components/p-modal-header.d.ts +11 -0
- package/dist/components/p-modal-header.js +6 -0
- package/dist/components/p-modal.d.ts +11 -0
- package/dist/components/p-modal.js +138 -0
- package/dist/components/p-navbar.d.ts +11 -0
- package/dist/components/p-navbar.js +70 -0
- package/dist/components/p-navigation-item.js +6 -5
- package/dist/components/p-page-size-select.d.ts +11 -0
- package/dist/components/p-page-size-select.js +6 -0
- package/dist/components/p-pagination.js +1 -195
- package/dist/components/p-profile.d.ts +11 -0
- package/dist/components/p-profile.js +79 -0
- package/dist/components/p-segment-container.js +1 -27
- package/dist/components/p-segment-item.js +1 -49
- package/dist/components/p-select.d.ts +11 -0
- package/dist/components/p-select.js +265 -0
- package/dist/components/p-slider-indicator.d.ts +11 -0
- package/dist/components/p-slider-indicator.js +6 -0
- package/dist/components/p-status.js +4 -4
- package/dist/components/p-stepper-item.d.ts +11 -0
- package/dist/components/p-stepper-item.js +6 -0
- package/dist/components/p-stepper-line.d.ts +11 -0
- package/dist/components/p-stepper-line.js +6 -0
- package/dist/components/p-stepper.d.ts +11 -0
- package/dist/components/p-stepper.js +78 -0
- package/dist/components/p-tab-group.d.ts +11 -0
- package/dist/components/p-tab-group.js +39 -0
- package/dist/components/p-tab-item.d.ts +11 -0
- package/dist/components/p-tab-item.js +36 -0
- package/dist/components/p-table-cell.d.ts +11 -0
- package/dist/components/p-table-cell.js +6 -0
- package/dist/components/p-table-column.d.ts +11 -0
- package/dist/components/p-table-column.js +46 -0
- package/dist/components/p-table-container.d.ts +11 -0
- package/dist/components/p-table-container.js +6 -0
- package/dist/components/p-table-footer.d.ts +11 -0
- package/dist/components/p-table-footer.js +6 -0
- package/dist/components/p-table-header.d.ts +11 -0
- package/dist/components/p-table-header.js +6 -0
- package/dist/components/p-table-row.d.ts +11 -0
- package/dist/components/p-table-row.js +6 -0
- package/dist/components/p-table.d.ts +11 -0
- package/dist/components/p-table.js +521 -0
- package/dist/components/p-toast-container.d.ts +11 -0
- package/dist/components/p-toast-container.js +36 -0
- package/dist/components/p-toast.d.ts +11 -0
- package/dist/components/p-toast.js +73 -0
- package/dist/components/page-size-select.component.js +105 -0
- package/dist/components/pagination-item.component.js +1 -4
- package/dist/components/pagination.component.js +194 -0
- package/dist/components/popper.js +60 -49
- package/dist/components/segment-container.component.js +29 -0
- package/dist/components/segment-item.component.js +51 -0
- package/dist/components/slider-indicator.component.js +33 -0
- package/dist/components/stepper-item.component.js +45 -0
- package/dist/components/stepper-line.component.js +35 -0
- package/dist/components/table-cell.component.js +143 -0
- package/dist/components/table-container.component.js +30 -0
- package/dist/components/table-footer.component.js +127 -0
- package/dist/components/table-header.component.js +1048 -0
- package/dist/components/table-row.component.js +43 -0
- package/dist/components/tooltip.component.js +16 -27
- package/dist/esm/child-of-90a8c4b5.js +7 -0
- package/dist/esm/constants-826f9460.js +4 -0
- package/dist/esm/index-340e085c.js +2458 -0
- package/dist/esm/{index-a68e547b.js → index-8170b4fb.js} +662 -261
- package/dist/esm/index.js +9 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/localization-901dc2d3.js +57 -0
- package/dist/esm/object-get-by-path-d6427a61.js +10 -0
- package/dist/esm/p-accordion.entry.js +30 -0
- package/dist/esm/p-avatar-group.entry.js +16 -0
- package/dist/esm/p-avatar.entry.js +22 -11
- package/dist/esm/p-backdrop.entry.js +37 -0
- package/dist/esm/p-button_3.entry.js +246 -104
- package/dist/esm/p-calendar.entry.js +705 -0
- package/dist/esm/p-card-body.entry.js +16 -0
- package/dist/esm/p-card-container.entry.js +17 -0
- package/dist/esm/p-card-header.entry.js +18 -0
- package/dist/esm/p-content-slider.entry.js +206 -0
- package/dist/esm/p-counter.entry.js +5 -3
- package/dist/esm/p-datepicker.entry.js +4078 -0
- package/dist/esm/p-divider.entry.js +6 -3
- package/dist/esm/p-drawer-body_3.entry.js +43 -0
- package/dist/esm/p-drawer.entry.js +59 -0
- package/dist/esm/p-dropdown-menu-container.entry.js +5 -3
- package/dist/esm/p-dropdown_2.entry.js +160 -0
- package/dist/esm/p-helper_3.entry.js +198 -0
- package/dist/esm/{p-illustration.entry.js → p-illustration_6.entry.js} +1305 -8
- package/dist/esm/p-info-panel.entry.js +4 -8
- package/dist/esm/p-label_3.entry.js +57 -0
- package/dist/esm/p-layout.entry.js +16 -0
- package/dist/esm/p-modal-body_4.entry.js +70 -0
- package/dist/esm/p-modal.entry.js +55 -0
- package/dist/esm/p-navbar.entry.js +24 -0
- package/dist/esm/p-navigation-item.entry.js +7 -6
- package/dist/esm/p-page-size-select_3.entry.js +216 -0
- package/dist/esm/p-profile.entry.js +39 -0
- package/dist/esm/p-select.entry.js +179 -0
- package/dist/esm/p-slider-indicator.entry.js +16 -0
- package/dist/esm/p-status.entry.js +5 -5
- package/dist/esm/p-stepper-item_2.entry.js +33 -0
- package/dist/esm/p-stepper.entry.js +39 -0
- package/dist/esm/p-tab-group.entry.js +15 -0
- package/dist/esm/p-tab-item.entry.js +16 -0
- package/dist/esm/p-table-column.entry.js +22 -0
- package/dist/esm/p-table.entry.js +337 -0
- package/dist/esm/p-toast-container.entry.js +16 -0
- package/dist/esm/p-toast.entry.js +29 -0
- package/dist/esm/paperless.js +3 -3
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{popper-41c6f9cd.js → popper-42db9fbd.js} +60 -49
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -0
- package/dist/paperless/p-05f73516.entry.js +1 -0
- package/dist/paperless/p-0688d548.entry.js +1 -0
- package/dist/paperless/p-07f28695.entry.js +1 -0
- package/dist/paperless/p-09ea2a1a.js +1 -0
- package/dist/paperless/p-12f5c483.entry.js +1 -0
- package/dist/paperless/p-1ba7cadc.entry.js +1 -0
- package/dist/paperless/p-2e47afc7.entry.js +1 -0
- package/dist/paperless/p-37fa2c13.entry.js +1 -0
- package/dist/paperless/p-3946e0a3.entry.js +1 -0
- package/dist/paperless/p-3a98b145.entry.js +1 -0
- package/dist/paperless/p-43d1544e.entry.js +1 -0
- package/dist/paperless/p-4e650fe4.js +1 -0
- package/dist/paperless/p-4fcd08ce.entry.js +1 -0
- package/dist/paperless/p-529ccaf7.entry.js +1 -0
- package/dist/paperless/p-5b7c22ee.entry.js +1 -0
- package/dist/paperless/p-62d49606.entry.js +1 -0
- package/dist/paperless/p-63de1c3d.entry.js +1 -0
- package/dist/paperless/p-681ed79b.entry.js +1 -0
- package/dist/paperless/p-6c60fd3d.js +1 -0
- package/dist/paperless/p-7df6230f.entry.js +1 -0
- package/dist/paperless/p-8a6728d5.js +1 -0
- package/dist/paperless/p-8c67da86.entry.js +1 -0
- package/dist/paperless/p-91d032b2.entry.js +1 -0
- package/dist/paperless/p-9315c1e2.entry.js +1 -0
- package/dist/paperless/p-98e3dcd7.entry.js +1 -0
- package/dist/paperless/p-ac5a17c4.entry.js +1 -0
- package/dist/paperless/p-b273ac6d.js +1 -0
- package/dist/paperless/p-b4af4b21.entry.js +1 -0
- package/dist/paperless/p-b72559e4.entry.js +1 -0
- package/dist/paperless/p-b8dd503c.entry.js +1 -0
- package/dist/paperless/p-c296a33d.entry.js +1 -0
- package/dist/paperless/p-c80933ab.entry.js +1 -0
- package/dist/paperless/p-c9f2fa8f.js +2 -0
- package/dist/paperless/p-d1022d64.entry.js +1 -0
- package/dist/paperless/p-d2cf5ab2.entry.js +1 -0
- package/dist/paperless/p-d5885f2b.entry.js +1 -0
- package/dist/paperless/p-dbb409ab.entry.js +1 -0
- package/dist/paperless/p-ddd3372b.entry.js +1 -0
- package/dist/paperless/p-e3e3c4d1.entry.js +1 -0
- package/dist/paperless/p-e4bd4022.entry.js +1 -0
- package/dist/paperless/p-e9ed032e.entry.js +1 -0
- package/dist/paperless/p-f1867cb5.entry.js +1 -0
- package/dist/paperless/p-f499f696.entry.js +1 -0
- package/dist/paperless/p-f86fcdf4.js +1 -0
- package/dist/paperless/p-fa3216a5.entry.js +1 -0
- package/dist/paperless/p-fd1e32c1.entry.js +1 -0
- package/dist/paperless/paperless.css +673 -26741
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/style/_fonts.scss +70 -0
- package/dist/style/_helpers.scss +5 -0
- package/dist/style/_reset.scss +31 -0
- package/dist/style/_tailwind.scss +3 -0
- package/dist/style/_typograhpy.scss +29 -0
- package/dist/style/_variables.scss +2 -0
- package/dist/style/form/_checkbox.scss +111 -0
- package/dist/style/form/_input.scss +22 -0
- package/dist/style/form/_mixins.scss +107 -0
- package/dist/style/form/_radio.scss +58 -0
- package/dist/style/form/_textarea.scss +18 -0
- package/dist/style/form/index.scss +4 -0
- package/dist/style/paperless.scss +12 -0
- package/dist/sw.js +2 -644
- package/dist/sw.js.map +1 -0
- package/dist/tailwind/animation.js +87 -0
- package/dist/tailwind/backdrop-blur.js +3 -0
- package/dist/tailwind/border-radius.js +11 -0
- package/dist/tailwind/colors.js +52 -0
- package/dist/tailwind/height.js +5 -0
- package/dist/tailwind/rotate.js +8 -0
- package/dist/tailwind/scale.js +3 -0
- package/dist/tailwind/screens.js +8 -0
- package/dist/tailwind/shadows.js +13 -0
- package/dist/tailwind/spacing.js +10 -0
- package/dist/tailwind/typography.js +21 -0
- package/dist/tailwind/width.js +23 -0
- package/dist/tailwind/z-index.js +17 -0
- package/dist/tailwind.config.js +29 -14
- package/dist/types/components/atoms/avatar/avatar.component.d.ts +3 -1
- package/dist/types/components/atoms/avatar-group/avatar-group.component.d.ts +7 -0
- package/dist/types/components/atoms/backdrop/backdrop.component.d.ts +31 -0
- package/dist/types/components/atoms/button/button.component.d.ts +14 -1
- package/dist/types/components/atoms/card-body/card-body.component.d.ts +7 -0
- package/dist/types/components/atoms/card-container/card-container.component.d.ts +11 -0
- package/dist/types/components/atoms/card-header/card-header.component.d.ts +11 -0
- package/dist/types/components/atoms/counter/counter.component.d.ts +8 -0
- package/dist/types/components/atoms/divider/divider.component.d.ts +4 -0
- package/dist/types/components/atoms/drawer-body/drawer-body.component.d.ts +7 -0
- package/dist/types/components/atoms/drawer-container/drawer-container.component.d.ts +7 -0
- package/dist/types/components/atoms/drawer-header/drawer-header.component.d.ts +12 -0
- package/dist/types/components/atoms/dropdown-menu-container/dropdown-menu-container.component.d.ts +8 -0
- package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +9 -0
- package/dist/types/components/atoms/helper/helper.component.d.ts +5 -0
- package/dist/types/components/atoms/icon/icon.component.d.ts +3 -3
- package/dist/types/components/atoms/label/label.component.d.ts +33 -0
- package/dist/types/components/atoms/layout/layout.component.d.ts +7 -0
- package/dist/types/components/atoms/loader/loader.component.d.ts +1 -1
- package/dist/types/components/atoms/modal-body/modal-body.component.d.ts +11 -0
- package/dist/types/components/atoms/modal-container/modal-container.component.d.ts +11 -0
- package/dist/types/components/atoms/modal-footer/modal-footer.component.d.ts +3 -0
- package/dist/types/components/atoms/modal-header/modal-header.component.d.ts +12 -0
- package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +2 -1
- package/dist/types/components/atoms/slider-indicator/slider-indicator.component.d.ts +7 -0
- package/dist/types/components/atoms/status/status.component.d.ts +2 -1
- package/dist/types/components/atoms/stepper-item/stepper-item.component.d.ts +19 -0
- package/dist/types/components/atoms/stepper-line/stepper-line.component.d.ts +11 -0
- package/dist/types/components/atoms/tab-group/tab-group.component.d.ts +3 -0
- package/dist/types/components/atoms/tab-item/tab-item.component.d.ts +7 -0
- package/dist/types/components/atoms/table-container/table-container.component.d.ts +3 -0
- package/dist/types/components/atoms/toast-container/toast-container.component.d.ts +7 -0
- package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +11 -2
- package/dist/types/components/helpers/table-column/table-column.component.d.ts +34 -0
- package/dist/types/components/molecules/accordion/accordion.component.d.ts +25 -0
- package/dist/types/components/molecules/calendar/calendar.component.d.ts +76 -0
- package/dist/types/components/molecules/content-slider/content-slider.component.d.ts +53 -0
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +93 -0
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +30 -3
- package/dist/types/components/molecules/input-group/input-group.component.d.ts +67 -0
- package/dist/types/components/molecules/page-size-select/constants.d.ts +2 -0
- package/dist/types/components/molecules/page-size-select/page-size-select.component.d.ts +50 -0
- package/dist/types/components/molecules/pagination/pagination.component.d.ts +7 -0
- package/dist/types/components/molecules/profile/profile.component.d.ts +20 -0
- package/dist/types/components/molecules/select/select.component.d.ts +115 -0
- package/dist/types/components/molecules/stepper/stepper.component.d.ts +18 -0
- package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +42 -0
- package/dist/types/components/molecules/table-footer/table-footer.component.d.ts +63 -0
- package/dist/types/components/molecules/table-header/table-header.component.d.ts +87 -0
- package/dist/types/components/molecules/table-row/table-row.component.d.ts +11 -0
- package/dist/types/components/molecules/toast/toast.component.d.ts +39 -0
- package/dist/types/components/organisms/drawer/drawer.component.d.ts +52 -0
- package/dist/types/components/organisms/modal/modal.component.d.ts +58 -0
- package/dist/types/components/organisms/navbar/navbar.component.d.ts +14 -0
- package/dist/types/components/organisms/table/table.component.d.ts +214 -0
- package/dist/types/components.d.ts +2829 -327
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/table.d.ts +27 -0
- package/dist/types/types/tailwind.d.ts +2 -0
- package/dist/types/utils/icons.d.ts +7 -0
- package/dist/types/utils/illustrations.d.ts +3 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/localization.d.ts +2 -0
- package/dist/types/utils/object-get-by-path.d.ts +1 -0
- package/dist/types/utils/transformers.d.ts +2 -0
- package/dist/workbox-5b279812.js +2 -0
- package/dist/workbox-5b279812.js.map +1 -0
- package/loader/package.json +1 -0
- package/package.json +65 -61
- package/dist/build/p-17c11169.entry.js +0 -1
- package/dist/build/p-41e5458b.entry.js +0 -1
- package/dist/build/p-42dab9d4.entry.js +0 -1
- package/dist/build/p-47b52f92.entry.js +0 -1
- package/dist/build/p-5ec6ea71.entry.js +0 -1
- package/dist/build/p-75f909ab.entry.js +0 -1
- package/dist/build/p-76464e0b.js +0 -2
- package/dist/build/p-8501ba07.entry.js +0 -1
- package/dist/build/p-87356769.entry.js +0 -1
- package/dist/build/p-9513868f.entry.js +0 -1
- package/dist/build/p-a669807e.entry.js +0 -1
- package/dist/build/p-a7086ffa.js +0 -1
- package/dist/build/p-aa28fef8.entry.js +0 -1
- package/dist/build/p-aae3d4f0.entry.js +0 -1
- package/dist/build/p-adcb0b93.entry.js +0 -1
- package/dist/build/p-bbec0e86.entry.js +0 -1
- package/dist/build/p-e7019eab.entry.js +0 -1
- package/dist/build/p-f689996b.entry.js +0 -1
- package/dist/build/p-faa4ee42.entry.js +0 -1
- package/dist/cjs/p-dropdown-menu-item.cjs.entry.js +0 -23
- package/dist/cjs/p-dropdown.cjs.entry.js +0 -141
- package/dist/cjs/p-helper.cjs.entry.js +0 -19
- package/dist/cjs/p-pagination-item.cjs.entry.js +0 -23
- package/dist/cjs/p-pagination.cjs.entry.js +0 -171
- package/dist/cjs/p-segment-container.cjs.entry.js +0 -19
- package/dist/cjs/p-segment-item.cjs.entry.js +0 -29
- package/dist/cjs/p-tooltip.cjs.entry.js +0 -137
- package/dist/collection/tailwind/grid.js +0 -26
- package/dist/collection/utils/utils.js +0 -3
- package/dist/esm/p-dropdown-menu-item.entry.js +0 -19
- package/dist/esm/p-dropdown.entry.js +0 -137
- package/dist/esm/p-helper.entry.js +0 -15
- package/dist/esm/p-pagination-item.entry.js +0 -19
- package/dist/esm/p-pagination.entry.js +0 -167
- package/dist/esm/p-segment-container.entry.js +0 -15
- package/dist/esm/p-segment-item.entry.js +0 -25
- package/dist/esm/p-tooltip.entry.js +0 -133
- package/dist/paperless/p-17c11169.entry.js +0 -1
- package/dist/paperless/p-41e5458b.entry.js +0 -1
- package/dist/paperless/p-42dab9d4.entry.js +0 -1
- package/dist/paperless/p-47b52f92.entry.js +0 -1
- package/dist/paperless/p-5ec6ea71.entry.js +0 -1
- package/dist/paperless/p-75f909ab.entry.js +0 -1
- package/dist/paperless/p-76464e0b.js +0 -2
- package/dist/paperless/p-8501ba07.entry.js +0 -1
- package/dist/paperless/p-87356769.entry.js +0 -1
- package/dist/paperless/p-9513868f.entry.js +0 -1
- package/dist/paperless/p-a669807e.entry.js +0 -1
- package/dist/paperless/p-a7086ffa.js +0 -1
- package/dist/paperless/p-aa28fef8.entry.js +0 -1
- package/dist/paperless/p-aae3d4f0.entry.js +0 -1
- package/dist/paperless/p-adcb0b93.entry.js +0 -1
- package/dist/paperless/p-bbec0e86.entry.js +0 -1
- package/dist/paperless/p-e7019eab.entry.js +0 -1
- package/dist/paperless/p-f689996b.entry.js +0 -1
- package/dist/paperless/p-faa4ee42.entry.js +0 -1
- package/dist/types/utils/utils.d.ts +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
export class Accordion {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.header = undefined;
|
|
5
|
+
this.open = false;
|
|
6
|
+
this.closeable = true;
|
|
7
|
+
this.openable = true;
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, { class: "p-accordion" }, h("div", { class: "flex items-center gap-3 text-storm-vague cursor-pointer", onClick: () => this._onClick() }, h("p-icon", { class: "flex", variant: "chevron", rotate: this.open ? 0 : -90 }), h("p", { class: "m-0 font-medium text-lg whitespace-nowrap" }, this.header), h("p-divider", null)), this.open && (h("div", { class: "mt-6" }, h("slot", null)))));
|
|
11
|
+
}
|
|
12
|
+
_onClick() {
|
|
13
|
+
if (!this.closeable && this.open) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (!this.openable && !this.open) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
this.open = !this.open;
|
|
20
|
+
this.isOpen.emit(this.open);
|
|
21
|
+
}
|
|
22
|
+
static get is() { return "p-accordion"; }
|
|
23
|
+
static get encapsulation() { return "shadow"; }
|
|
24
|
+
static get originalStyleUrls() {
|
|
25
|
+
return {
|
|
26
|
+
"$": ["accordion.component.scss"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static get styleUrls() {
|
|
30
|
+
return {
|
|
31
|
+
"$": ["accordion.component.css"]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static get properties() {
|
|
35
|
+
return {
|
|
36
|
+
"header": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"mutable": false,
|
|
39
|
+
"complexType": {
|
|
40
|
+
"original": "string",
|
|
41
|
+
"resolved": "string",
|
|
42
|
+
"references": {}
|
|
43
|
+
},
|
|
44
|
+
"required": true,
|
|
45
|
+
"optional": false,
|
|
46
|
+
"docs": {
|
|
47
|
+
"tags": [],
|
|
48
|
+
"text": "Header of the accordion"
|
|
49
|
+
},
|
|
50
|
+
"attribute": "header",
|
|
51
|
+
"reflect": false
|
|
52
|
+
},
|
|
53
|
+
"open": {
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"mutable": false,
|
|
56
|
+
"complexType": {
|
|
57
|
+
"original": "boolean",
|
|
58
|
+
"resolved": "boolean",
|
|
59
|
+
"references": {}
|
|
60
|
+
},
|
|
61
|
+
"required": false,
|
|
62
|
+
"optional": false,
|
|
63
|
+
"docs": {
|
|
64
|
+
"tags": [],
|
|
65
|
+
"text": "Wether the accordion is open"
|
|
66
|
+
},
|
|
67
|
+
"attribute": "open",
|
|
68
|
+
"reflect": false,
|
|
69
|
+
"defaultValue": "false"
|
|
70
|
+
},
|
|
71
|
+
"closeable": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"mutable": false,
|
|
74
|
+
"complexType": {
|
|
75
|
+
"original": "boolean",
|
|
76
|
+
"resolved": "boolean",
|
|
77
|
+
"references": {}
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"optional": false,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": "Wether the accordion can be closed"
|
|
84
|
+
},
|
|
85
|
+
"attribute": "closeable",
|
|
86
|
+
"reflect": false,
|
|
87
|
+
"defaultValue": "true"
|
|
88
|
+
},
|
|
89
|
+
"openable": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "boolean",
|
|
94
|
+
"resolved": "boolean",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "Wether the accordion can be opened"
|
|
102
|
+
},
|
|
103
|
+
"attribute": "openable",
|
|
104
|
+
"reflect": false,
|
|
105
|
+
"defaultValue": "true"
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
static get events() {
|
|
110
|
+
return [{
|
|
111
|
+
"method": "isOpen",
|
|
112
|
+
"name": "isOpen",
|
|
113
|
+
"bubbles": true,
|
|
114
|
+
"cancelable": true,
|
|
115
|
+
"composed": true,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": "Open change event"
|
|
119
|
+
},
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "boolean",
|
|
122
|
+
"resolved": "boolean",
|
|
123
|
+
"references": {}
|
|
124
|
+
}
|
|
125
|
+
}];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.relative{position:relative!important}.block{display:block!important}.flex{display:flex!important}.grid{display:grid!important}.h-\[12rem\]{height:12rem!important}.h-8{height:2rem!important}.h-6{height:1.5rem!important}.h-auto{height:auto!important}.h-full{height:100%!important}.min-h-\[12rem\]{min-height:12rem!important}.w-\[14rem\]{width:14rem!important}.w-full{width:100%!important}.w-6{width:1.5rem!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.self-center{align-self:center!important}.justify-self-center{justify-self:center!important}.overflow-y-auto{overflow-y:auto!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-indigo-light{--tw-border-opacity:1!important;border-color:rgb(241 246 255/var(--tw-border-opacity))!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.bg-indigo-light,.bg-white{--tw-bg-opacity:1!important}.bg-indigo-light{background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.text-storm{color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-indigo,.text-storm{--tw-text-opacity:1!important}.text-indigo{color:rgb(82 138 250/var(--tw-text-opacity))!important}.opacity-40{opacity:.4!important}*{box-sizing:border-box}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));display:block;padding:.5rem;width:14rem}:host .view-day,:host .view-month,:host .view-year{display:flex;flex-direction:column;gap:.5rem;height:12rem;width:100%}:host .header{align-items:center;display:flex;font-size:1rem;gap:.25rem;justify-content:space-between;line-height:1.5rem;width:100%}:host .header span{--tw-text-opacity:1;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;height:2rem;padding-left:.5rem;padding-right:.5rem}:host .header span.disabled{cursor:default}:host .header span:hover:not(.disabled){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host .header span.year{font-weight:600}:host .header .nav{--tw-text-opacity:1;align-items:center;border-radius:100%;color:rgb(82 138 250/var(--tw-text-opacity));cursor:pointer;display:flex;height:1.5rem;justify-content:center;position:relative;text-decoration-line:none;transition-duration:.2s;width:1.5rem}:host .header .nav:hover:not(.disabled){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host .header .nav.disabled{opacity:0}:host .view-day{height:auto;min-height:12rem}:host .view-day .dates{display:grid;gap:.25rem;grid-template-columns:repeat(7,1fr)}:host .view-day .dates>span{--tw-text-opacity:1;align-self:center;color:rgb(128 130 158/var(--tw-text-opacity));font-size:.75rem;font-weight:600;justify-self:center;line-height:1rem;text-align:center;width:1.5rem}:host .view-day .dates>time{--tw-text-opacity:1;align-items:center;align-self:center;border:1px solid transparent;border-radius:100%;box-sizing:border-box;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;height:1.5rem;justify-content:center;justify-self:center;line-height:1.25rem;transition-duration:.2s;width:1.5rem}:host .view-day .dates>time.current{--tw-border-opacity:1;border-color:rgb(176 178 203/var(--tw-border-opacity))}:host .view-day .dates>time.active{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-color:rgb(241 246 255/var(--tw-border-opacity));color:rgb(82 138 250/var(--tw-text-opacity));font-weight:600}:host .view-day .dates>time.disabled,:host .view-day .dates>time.other-month{cursor:default;opacity:.4}:host .view-day .dates>time.disabled{text-decoration-line:line-through}:host .view-day .dates>time:hover:not(.disabled):not(.active):not(.other-month){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(81 83 107/var(--tw-text-opacity))}:host .view-month .items,:host .view-year .items{align-items:center;display:grid;gap:.25rem;grid-template-columns:repeat(3,1fr);height:100%;overflow-y:auto;position:relative;width:100%}:host .view-month .items>div,:host .view-year .items>div{--tw-text-opacity:1;align-items:center;border:1px solid transparent;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;height:2rem;justify-content:center;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem}:host .view-month .items>div.current,:host .view-year .items>div.current{--tw-border-opacity:1;border-color:rgb(176 178 203/var(--tw-border-opacity))}:host .view-month .items>div.active,:host .view-year .items>div.active{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-color:rgb(241 246 255/var(--tw-border-opacity));color:rgb(82 138 250/var(--tw-text-opacity));font-weight:600}:host .view-month .items>div.disabled,:host .view-year .items>div.disabled{cursor:default;opacity:.4;text-decoration-line:line-through}:host .view-month .items>div:hover:not(.disabled):not(.active),:host .view-year .items>div:hover:not(.disabled):not(.active){--tw-bg-opacity:1;background-color:rgb(247 250 252/var(--tw-bg-opacity))}:host .view-month .items{grid-template-columns:repeat(2,1fr)}:host .view-year .header{justify-content:center}:host(.variant-default){--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.variant-embedded){padding:0}.static{position:static!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.visible{visibility:visible!important}.absolute{position:absolute!important}.rotate-0{--tw-rotate:0deg!important}.rotate-0,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-270{--tw-rotate:270deg!important}.rotate-315{--tw-rotate:315deg!important}.-rotate-0,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-135,.-rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-270,.-rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-315{--tw-rotate:-315deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-xxs{font-size:.6875rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.ml-2{margin-left:.5rem!important}.items-end{align-items:flex-end!important}.text-negative{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.text-negative-light{--tw-text-opacity:1!important;color:rgb(255 204 211/var(--tw-text-opacity))!important}.hover\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.col-start-1{grid-column-start:1!important}.col-start-2{grid-column-start:2!important}.col-start-3{grid-column-start:3!important}.col-start-4{grid-column-start:4!important}.col-start-5{grid-column-start:5!important}.col-start-6{grid-column-start:6!important}.col-start-7{grid-column-start:7!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}
|
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import { h, Host, } from '@stencil/core';
|
|
2
|
+
import { addDays, addMonths, addYears, endOfMonth, format, getDay, getDaysInMonth, getYear, isAfter, isBefore, isSameDay, isSameMonth, isSameYear, isValid, setDate, setMonth, setYear, startOfDay, startOfMonth, } from 'date-fns';
|
|
3
|
+
export class Calendar {
|
|
4
|
+
constructor() {
|
|
5
|
+
this._today = new Date();
|
|
6
|
+
this._weekDays = Array.from(Array(7).keys());
|
|
7
|
+
this.variant = 'default';
|
|
8
|
+
this.value = undefined;
|
|
9
|
+
this.preselectToday = false;
|
|
10
|
+
this.disabledDates = undefined;
|
|
11
|
+
this.minDate = new Date(1970, 0, 1);
|
|
12
|
+
this.maxDate = this._getAutomaticMax();
|
|
13
|
+
this.disableWeekends = false;
|
|
14
|
+
this.mode = 'day';
|
|
15
|
+
this._view = this.mode;
|
|
16
|
+
this._viewDate = this._today;
|
|
17
|
+
this._value = undefined;
|
|
18
|
+
this._minDate = undefined;
|
|
19
|
+
this._maxDate = undefined;
|
|
20
|
+
this._disabledDates = [];
|
|
21
|
+
}
|
|
22
|
+
componentWillLoad() {
|
|
23
|
+
if (this.disabledDates) {
|
|
24
|
+
this._parseDisabledDates(this.disabledDates);
|
|
25
|
+
}
|
|
26
|
+
if (this.minDate) {
|
|
27
|
+
this._parseMinDate(this.minDate);
|
|
28
|
+
}
|
|
29
|
+
if (this.maxDate) {
|
|
30
|
+
this._parseMaxDate(this.maxDate);
|
|
31
|
+
}
|
|
32
|
+
this._parseValue(this.value);
|
|
33
|
+
if (this._value) {
|
|
34
|
+
this._viewDate = this._value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
componentDidRender() {
|
|
38
|
+
if (this._view === 'year') {
|
|
39
|
+
this._scrollYearIntoView();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
_parseValue(value) {
|
|
43
|
+
if (!value && this.preselectToday) {
|
|
44
|
+
value = new Date();
|
|
45
|
+
}
|
|
46
|
+
if (typeof value === 'string') {
|
|
47
|
+
value = new Date(value);
|
|
48
|
+
}
|
|
49
|
+
if (!isValid(value)) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (this._isDisabledDay(value)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (isSameDay(this._value, value)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this._setValue(value);
|
|
59
|
+
}
|
|
60
|
+
_parseMinDate(minDate) {
|
|
61
|
+
if (typeof minDate === 'string') {
|
|
62
|
+
minDate = new Date(minDate);
|
|
63
|
+
}
|
|
64
|
+
if (!isValid(minDate)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this._minDate = minDate;
|
|
68
|
+
}
|
|
69
|
+
_parseMaxDate(maxDate) {
|
|
70
|
+
if (typeof maxDate === 'string') {
|
|
71
|
+
maxDate = new Date(maxDate);
|
|
72
|
+
}
|
|
73
|
+
if (!isValid(maxDate)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this._maxDate = maxDate;
|
|
77
|
+
}
|
|
78
|
+
_parseDisabledDates(disabledDates) {
|
|
79
|
+
if (typeof disabledDates === 'string') {
|
|
80
|
+
disabledDates = JSON.parse(disabledDates);
|
|
81
|
+
}
|
|
82
|
+
if (!disabledDates || !Array.isArray(disabledDates)) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
// normalize all to date
|
|
86
|
+
this._disabledDates = disabledDates
|
|
87
|
+
.map((date) => {
|
|
88
|
+
if (typeof date === 'string') {
|
|
89
|
+
return new Date(date);
|
|
90
|
+
}
|
|
91
|
+
return date;
|
|
92
|
+
})
|
|
93
|
+
.filter((date) => isValid(date));
|
|
94
|
+
}
|
|
95
|
+
render() {
|
|
96
|
+
return (h(Host, { class: `p-calendar variant-${this.variant}` }, this._getView()));
|
|
97
|
+
}
|
|
98
|
+
_getView() {
|
|
99
|
+
if (this._view === 'year') {
|
|
100
|
+
return this._getYearView();
|
|
101
|
+
}
|
|
102
|
+
if (this._view === 'month') {
|
|
103
|
+
return this._getMonthView();
|
|
104
|
+
}
|
|
105
|
+
return this._getDayView();
|
|
106
|
+
}
|
|
107
|
+
/* With this, we shall hack the system in ways no one would ever have thought.
|
|
108
|
+
<div class="col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7"></div>
|
|
109
|
+
*/
|
|
110
|
+
_getDayView() {
|
|
111
|
+
const daysInMonth = this._generateDaysInMonth();
|
|
112
|
+
return (h("div", { class: "view-day" }, h("div", { class: "header" }, h("div", { class: `nav ${!this._canSetAmount('month', -1) && 'disabled'}`, onClick: () => this._changeMonth(-1) }, h("p-icon", { variant: "chevron", rotate: 90 })), h("div", null, h("span", { onClick: () => this._changeView('month'), class: !this._canChangeView('month') && 'disabled' }, format(this._viewDate, 'MMMM')), h("span", { onClick: () => this._changeView('year'), class: `year ${!this._canChangeView('year') && 'disabled'}` }, getYear(this._viewDate))), h("div", { class: `nav ${!this._canSetAmount('month', 1) && 'disabled'}`, onClick: () => this._changeMonth(1) }, h("p-icon", { variant: "chevron", rotate: -90 }))), h("div", { class: "dates" }, this._weekDays.map((weekday) => (h("span", null, format(addDays(new Date(2022, 7, 1), weekday), 'eee')))), daysInMonth.map((day) => {
|
|
113
|
+
return (h("time", { class: `day ${day.active && 'active'} ${day.disabled && 'disabled'} ${day.current && 'current'} ${day.offset !== false &&
|
|
114
|
+
`col-start-${day.offset}`}`, onClick: () => this._setValue(day.date) }, day.day));
|
|
115
|
+
}))));
|
|
116
|
+
}
|
|
117
|
+
_getMonthView() {
|
|
118
|
+
const months = this._generateMonths();
|
|
119
|
+
return (h("div", { class: "view-month" }, h("div", { class: "header" }, h("div", { class: `nav ${!this._canSetAmount('year', -1) && 'disabled'}`, onClick: () => this._changeYear(-1) }, h("p-icon", { variant: "chevron", rotate: 90 })), h("div", null, h("span", { onClick: () => this._changeView('year'), class: `year ${!this._canChangeView('year') && 'disabled'}` }, getYear(this._viewDate))), h("div", { class: `nav ${!this._canSetAmount('year', 1) && 'disabled'}`, onClick: () => this._changeYear(1) }, h("p-icon", { variant: "chevron", rotate: -90 }))), h("div", { class: "items" }, months.map((month) => (h("div", { onClick: () => this._setMonth(month.month), class: `month ${month.active && 'active'} ${month.disabled && 'disabled'} ${month.current && 'current'}` }, format(setMonth(new Date(), month.month), 'MMMM')))))));
|
|
120
|
+
}
|
|
121
|
+
_getYearView() {
|
|
122
|
+
const years = this._generateYears();
|
|
123
|
+
return (h("div", { class: "view-year" }, h("div", { class: "header" }, h("div", null, h("span", { class: "year disabled" }, years === null || years === void 0 ? void 0 :
|
|
124
|
+
years[0].year, " - ", years === null || years === void 0 ? void 0 :
|
|
125
|
+
years[years.length - 1].year))), h("div", { class: "items" }, years.map((year) => (h("div", { onClick: () => this._setYear(year.year), class: `year ${year.active && 'active'} ${year.current && 'current'}` }, year.year))))));
|
|
126
|
+
}
|
|
127
|
+
_setYear(year) {
|
|
128
|
+
const date = setYear(this._viewDate, year);
|
|
129
|
+
if (this.mode === 'year') {
|
|
130
|
+
return this._setValue(setMonth(setDate(date, 1), 0));
|
|
131
|
+
}
|
|
132
|
+
this._viewDate = setYear(this._viewDate, year);
|
|
133
|
+
this._view = 'month';
|
|
134
|
+
}
|
|
135
|
+
_setMonth(month) {
|
|
136
|
+
const date = setMonth(this._viewDate, month);
|
|
137
|
+
if (this.mode === 'month') {
|
|
138
|
+
return this._setValue(setDate(date, 1));
|
|
139
|
+
}
|
|
140
|
+
this._viewDate = date;
|
|
141
|
+
this._view = 'day';
|
|
142
|
+
}
|
|
143
|
+
_changeMonth(amount = 1) {
|
|
144
|
+
const allowed = this._canSetAmount('month', amount);
|
|
145
|
+
if (!allowed) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const newDate = addMonths(this._viewDate, amount);
|
|
149
|
+
this._viewDate = newDate;
|
|
150
|
+
}
|
|
151
|
+
_changeYear(amount = 1) {
|
|
152
|
+
const allowed = this._canSetAmount('year', amount);
|
|
153
|
+
if (!allowed) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
let newDate = addYears(this._viewDate, amount);
|
|
157
|
+
this._viewDate = newDate;
|
|
158
|
+
}
|
|
159
|
+
_setValue(value) {
|
|
160
|
+
if (this._isDisabledDay(value)) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
value = startOfDay(value);
|
|
164
|
+
const isSameValue = isSameDay(value, this._value);
|
|
165
|
+
if (isSameValue) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this._value = value;
|
|
169
|
+
this.valueChange.emit(value);
|
|
170
|
+
}
|
|
171
|
+
_generateDaysInMonth() {
|
|
172
|
+
const days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());
|
|
173
|
+
return days.map((day) => {
|
|
174
|
+
day = day + 1;
|
|
175
|
+
const date = setDate(this._viewDate, day);
|
|
176
|
+
const dayOfWeek = getDay(date);
|
|
177
|
+
return {
|
|
178
|
+
day,
|
|
179
|
+
date,
|
|
180
|
+
offset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,
|
|
181
|
+
current: isSameDay(date, this._today),
|
|
182
|
+
active: isSameDay(date, this._value),
|
|
183
|
+
disabled: this._isDisabledDay(date),
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
_isDisabledDay(day) {
|
|
188
|
+
return (isBefore(day, this._minDate) ||
|
|
189
|
+
(isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||
|
|
190
|
+
((getDay(day) === 0 || getDay(day) === 6) &&
|
|
191
|
+
this.disableWeekends) ||
|
|
192
|
+
this._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0);
|
|
193
|
+
}
|
|
194
|
+
_generateMonths() {
|
|
195
|
+
const year = getYear(this._viewDate);
|
|
196
|
+
const months = Array.from(Array(12).keys());
|
|
197
|
+
return months.map((month) => {
|
|
198
|
+
const date = new Date(year, month, 1);
|
|
199
|
+
return {
|
|
200
|
+
month,
|
|
201
|
+
current: isSameMonth(this._today, date),
|
|
202
|
+
active: isSameMonth(this._value, date),
|
|
203
|
+
disabled: isAfter(date, this._maxDate) ||
|
|
204
|
+
isBefore(endOfMonth(date), this._minDate),
|
|
205
|
+
};
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
_generateYears() {
|
|
209
|
+
const maxYear = getYear(this._maxDate) + 1;
|
|
210
|
+
const minYear = getYear(this._minDate);
|
|
211
|
+
return Array.from(Array(maxYear - minYear).keys()).map((index) => {
|
|
212
|
+
const year = minYear + index;
|
|
213
|
+
return {
|
|
214
|
+
year,
|
|
215
|
+
current: getYear(this._today) === year,
|
|
216
|
+
active: getYear(this._value) === year,
|
|
217
|
+
};
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
_scrollYearIntoView() {
|
|
221
|
+
const items = this._el.shadowRoot.querySelector('.view-year .items');
|
|
222
|
+
if (!items) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const active = items.querySelector('.year.active');
|
|
226
|
+
if (active) {
|
|
227
|
+
return items.scrollTo({
|
|
228
|
+
top: active.offsetTop,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
const current = items.querySelector('.year.current');
|
|
232
|
+
if (current) {
|
|
233
|
+
return items.scrollTo({
|
|
234
|
+
top: current.offsetTop,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
_changeView(view) {
|
|
239
|
+
if (!this._canChangeView(view)) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
this._view = view;
|
|
243
|
+
}
|
|
244
|
+
_canChangeView(view) {
|
|
245
|
+
if (view === 'year') {
|
|
246
|
+
if (isSameYear(this._minDate, this._maxDate)) {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
if (isSameMonth(this._minDate, this._maxDate)) {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
_canSetAmount(type, amount = 1) {
|
|
257
|
+
if (type === 'month') {
|
|
258
|
+
const newDate = addMonths(this._viewDate, amount);
|
|
259
|
+
const startNewDate = startOfMonth(newDate);
|
|
260
|
+
if ((isBefore(startNewDate, this._minDate) &&
|
|
261
|
+
!isSameDay(startNewDate, this._minDate)) ||
|
|
262
|
+
isAfter(startNewDate, endOfMonth(this._maxDate))) {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (type === 'year') {
|
|
267
|
+
let newDate = addYears(this._viewDate, amount);
|
|
268
|
+
const year = getYear(newDate);
|
|
269
|
+
if (year < getYear(this._minDate) ||
|
|
270
|
+
year > getYear(this._maxDate)) {
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return true;
|
|
275
|
+
}
|
|
276
|
+
_getAutomaticMax() {
|
|
277
|
+
const date = addYears(new Date(), 50);
|
|
278
|
+
let year = getYear(date);
|
|
279
|
+
year = Math.ceil(year / 10) * 10;
|
|
280
|
+
return setYear(date, year);
|
|
281
|
+
}
|
|
282
|
+
static get is() { return "p-calendar"; }
|
|
283
|
+
static get encapsulation() { return "shadow"; }
|
|
284
|
+
static get originalStyleUrls() {
|
|
285
|
+
return {
|
|
286
|
+
"$": ["calendar.component.scss"]
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
static get styleUrls() {
|
|
290
|
+
return {
|
|
291
|
+
"$": ["calendar.component.css"]
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
static get properties() {
|
|
295
|
+
return {
|
|
296
|
+
"variant": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "'default' | 'embedded'",
|
|
301
|
+
"resolved": "\"default\" | \"embedded\"",
|
|
302
|
+
"references": {}
|
|
303
|
+
},
|
|
304
|
+
"required": false,
|
|
305
|
+
"optional": false,
|
|
306
|
+
"docs": {
|
|
307
|
+
"tags": [],
|
|
308
|
+
"text": "The variant of the button"
|
|
309
|
+
},
|
|
310
|
+
"attribute": "variant",
|
|
311
|
+
"reflect": false,
|
|
312
|
+
"defaultValue": "'default'"
|
|
313
|
+
},
|
|
314
|
+
"value": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"mutable": false,
|
|
317
|
+
"complexType": {
|
|
318
|
+
"original": "Date | 'string'",
|
|
319
|
+
"resolved": "\"string\" | Date",
|
|
320
|
+
"references": {
|
|
321
|
+
"Date": {
|
|
322
|
+
"location": "global"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"required": false,
|
|
327
|
+
"optional": true,
|
|
328
|
+
"docs": {
|
|
329
|
+
"tags": [],
|
|
330
|
+
"text": "The current value"
|
|
331
|
+
},
|
|
332
|
+
"attribute": "value",
|
|
333
|
+
"reflect": false
|
|
334
|
+
},
|
|
335
|
+
"preselectToday": {
|
|
336
|
+
"type": "boolean",
|
|
337
|
+
"mutable": false,
|
|
338
|
+
"complexType": {
|
|
339
|
+
"original": "boolean",
|
|
340
|
+
"resolved": "boolean",
|
|
341
|
+
"references": {}
|
|
342
|
+
},
|
|
343
|
+
"required": false,
|
|
344
|
+
"optional": false,
|
|
345
|
+
"docs": {
|
|
346
|
+
"tags": [],
|
|
347
|
+
"text": "Wether to automatically preselect today"
|
|
348
|
+
},
|
|
349
|
+
"attribute": "preselect-today",
|
|
350
|
+
"reflect": false,
|
|
351
|
+
"defaultValue": "false"
|
|
352
|
+
},
|
|
353
|
+
"disabledDates": {
|
|
354
|
+
"type": "string",
|
|
355
|
+
"mutable": false,
|
|
356
|
+
"complexType": {
|
|
357
|
+
"original": "Array<Date | 'string'> | string",
|
|
358
|
+
"resolved": "(\"string\" | Date)[] | string",
|
|
359
|
+
"references": {
|
|
360
|
+
"Array": {
|
|
361
|
+
"location": "global"
|
|
362
|
+
},
|
|
363
|
+
"Date": {
|
|
364
|
+
"location": "global"
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"required": false,
|
|
369
|
+
"optional": true,
|
|
370
|
+
"docs": {
|
|
371
|
+
"tags": [],
|
|
372
|
+
"text": "Disabled dates"
|
|
373
|
+
},
|
|
374
|
+
"attribute": "disabled-dates",
|
|
375
|
+
"reflect": false
|
|
376
|
+
},
|
|
377
|
+
"minDate": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"mutable": false,
|
|
380
|
+
"complexType": {
|
|
381
|
+
"original": "Date | 'string'",
|
|
382
|
+
"resolved": "\"string\" | Date",
|
|
383
|
+
"references": {
|
|
384
|
+
"Date": {
|
|
385
|
+
"location": "global"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"required": false,
|
|
390
|
+
"optional": false,
|
|
391
|
+
"docs": {
|
|
392
|
+
"tags": [],
|
|
393
|
+
"text": "Min date"
|
|
394
|
+
},
|
|
395
|
+
"attribute": "min-date",
|
|
396
|
+
"reflect": false,
|
|
397
|
+
"defaultValue": "new Date(1970, 0, 1)"
|
|
398
|
+
},
|
|
399
|
+
"maxDate": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"mutable": false,
|
|
402
|
+
"complexType": {
|
|
403
|
+
"original": "Date | 'string'",
|
|
404
|
+
"resolved": "\"string\" | Date",
|
|
405
|
+
"references": {
|
|
406
|
+
"Date": {
|
|
407
|
+
"location": "global"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"required": false,
|
|
412
|
+
"optional": false,
|
|
413
|
+
"docs": {
|
|
414
|
+
"tags": [],
|
|
415
|
+
"text": "Max date"
|
|
416
|
+
},
|
|
417
|
+
"attribute": "max-date",
|
|
418
|
+
"reflect": false,
|
|
419
|
+
"defaultValue": "this._getAutomaticMax()"
|
|
420
|
+
},
|
|
421
|
+
"disableWeekends": {
|
|
422
|
+
"type": "boolean",
|
|
423
|
+
"mutable": false,
|
|
424
|
+
"complexType": {
|
|
425
|
+
"original": "boolean",
|
|
426
|
+
"resolved": "boolean",
|
|
427
|
+
"references": {}
|
|
428
|
+
},
|
|
429
|
+
"required": false,
|
|
430
|
+
"optional": false,
|
|
431
|
+
"docs": {
|
|
432
|
+
"tags": [],
|
|
433
|
+
"text": "Wether to disable the weekends"
|
|
434
|
+
},
|
|
435
|
+
"attribute": "disable-weekends",
|
|
436
|
+
"reflect": false,
|
|
437
|
+
"defaultValue": "false"
|
|
438
|
+
},
|
|
439
|
+
"mode": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"mutable": false,
|
|
442
|
+
"complexType": {
|
|
443
|
+
"original": "'year' | 'month' | 'day'",
|
|
444
|
+
"resolved": "\"day\" | \"month\" | \"year\"",
|
|
445
|
+
"references": {}
|
|
446
|
+
},
|
|
447
|
+
"required": false,
|
|
448
|
+
"optional": false,
|
|
449
|
+
"docs": {
|
|
450
|
+
"tags": [],
|
|
451
|
+
"text": "The mode of the datepicker"
|
|
452
|
+
},
|
|
453
|
+
"attribute": "mode",
|
|
454
|
+
"reflect": false,
|
|
455
|
+
"defaultValue": "'day'"
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
static get states() {
|
|
460
|
+
return {
|
|
461
|
+
"_view": {},
|
|
462
|
+
"_viewDate": {},
|
|
463
|
+
"_value": {},
|
|
464
|
+
"_minDate": {},
|
|
465
|
+
"_maxDate": {},
|
|
466
|
+
"_disabledDates": {}
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
static get events() {
|
|
470
|
+
return [{
|
|
471
|
+
"method": "valueChange",
|
|
472
|
+
"name": "valueChange",
|
|
473
|
+
"bubbles": true,
|
|
474
|
+
"cancelable": true,
|
|
475
|
+
"composed": true,
|
|
476
|
+
"docs": {
|
|
477
|
+
"tags": [],
|
|
478
|
+
"text": "Event when the value changes"
|
|
479
|
+
},
|
|
480
|
+
"complexType": {
|
|
481
|
+
"original": "any",
|
|
482
|
+
"resolved": "any",
|
|
483
|
+
"references": {}
|
|
484
|
+
}
|
|
485
|
+
}];
|
|
486
|
+
}
|
|
487
|
+
static get elementRef() { return "_el"; }
|
|
488
|
+
static get watchers() {
|
|
489
|
+
return [{
|
|
490
|
+
"propName": "value",
|
|
491
|
+
"methodName": "_parseValue"
|
|
492
|
+
}, {
|
|
493
|
+
"propName": "minDate",
|
|
494
|
+
"methodName": "_parseMinDate"
|
|
495
|
+
}, {
|
|
496
|
+
"propName": "maxDate",
|
|
497
|
+
"methodName": "_parseMaxDate"
|
|
498
|
+
}, {
|
|
499
|
+
"propName": "disabledDates",
|
|
500
|
+
"methodName": "_parseDisabledDates"
|
|
501
|
+
}];
|
|
502
|
+
}
|
|
503
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.absolute{position:absolute!important}.relative{position:relative!important}.mt-3{margin-top:.75rem!important}.flex{display:flex!important}.w-full{width:100%!important}.w-0{width:0!important}.flex-shrink-0{flex-shrink:0!important}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-grab{cursor:grab!important}.cursor-grabbing{cursor:grabbing!important}.flex-col{flex-direction:column!important}.flex-nowrap{flex-wrap:nowrap!important}.items-center{align-items:center!important}.items-stretch{align-items:stretch!important}.justify-center{justify-content:center!important}.overflow-visible{overflow:visible!important}.p-16{padding:4rem!important}.pt-1{padding-top:.25rem!important}.will-change-transform{will-change:transform!important}*{box-sizing:border-box}:host{display:flex;flex-direction:column;margin:-4rem;overflow:hidden;padding:4rem}:host .slider{box-sizing:content-box;overflow:visible;position:relative}:host .slider.draggable{cursor:grab}@media (min-width:64rem){:host .slider.draggable{cursor:auto}}:host .slider.draggable.dragging{cursor:grabbing}@media (min-width:64rem){:host .slider.draggable.dragging{cursor:auto}}:host .slider.draggable.dragging .inner-slider{transition-property:none}:host .slider .inner-slider{--tw-translate-x:0px;align-items:stretch;display:flex;flex-wrap:nowrap;gap:.5rem;position:absolute;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:.15s;transition-duration:.5s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%;will-change:transform}@media (min-width:64rem){:host .slider .inner-slider{flex-wrap:wrap;gap:1rem}}:host .slider .inner-slider>::slotted(*){flex-shrink:0;position:relative;width:100%;z-index:10}@media (min-width:40rem){:host .slider .inner-slider>::slotted(*){width:calc(50% - .5rem)}}@media (min-width:64rem){:host .slider .inner-slider>::slotted(*){flex:1 1 0%;width:0}}:host .indicator{align-items:center;display:flex;justify-content:center}@media (min-width:64rem){:host .indicator{display:none}}:host .indicator .item{margin-top:.75rem;padding-left:.25rem;padding-right:.25rem;padding-top:.25rem}@media (min-width:64rem){.desktop-xs\:hidden{display:none!important}.desktop-xs\:gap-4{gap:1rem!important}}.visible{visibility:visible!important}.static{position:static!important}.hidden{display:none!important}.cursor-pointer{cursor:pointer!important}.resize{resize:both!important}
|