quasar 2.1.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/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/api/AddressbarColor.json +22 -0
- package/dist/api/AppFullscreen.json +71 -0
- package/dist/api/AppVisibility.json +15 -0
- package/dist/api/BottomSheet.json +212 -0
- package/dist/api/ClosePopup.json +21 -0
- package/dist/api/Cookies.json +189 -0
- package/dist/api/Dark.json +50 -0
- package/dist/api/Dialog.json +471 -0
- package/dist/api/Intersection.json +279 -0
- package/dist/api/Loading.json +256 -0
- package/dist/api/LoadingBar.json +55 -0
- package/dist/api/LocalStorage.json +191 -0
- package/dist/api/Meta.json +6 -0
- package/dist/api/Morph.json +193 -0
- package/dist/api/Mutation.json +122 -0
- package/dist/api/Notify.json +1068 -0
- package/dist/api/Platform.json +70 -0
- package/dist/api/QAjaxBar.json +91 -0
- package/dist/api/QAvatar.json +72 -0
- package/dist/api/QBadge.json +78 -0
- package/dist/api/QBanner.json +39 -0
- package/dist/api/QBar.json +23 -0
- package/dist/api/QBreadcrumbs.json +83 -0
- package/dist/api/QBreadcrumbsEl.json +101 -0
- package/dist/api/QBtn.json +288 -0
- package/dist/api/QBtnDropdown.json +484 -0
- package/dist/api/QBtnGroup.json +53 -0
- package/dist/api/QBtnToggle.json +249 -0
- package/dist/api/QCard.json +45 -0
- package/dist/api/QCardActions.json +33 -0
- package/dist/api/QCardSection.json +30 -0
- package/dist/api/QCarousel.json +393 -0
- package/dist/api/QCarouselControl.json +42 -0
- package/dist/api/QCarouselSlide.json +44 -0
- package/dist/api/QChatMessage.json +128 -0
- package/dist/api/QCheckbox.json +172 -0
- package/dist/api/QChip.json +206 -0
- package/dist/api/QCircularProgress.json +135 -0
- package/dist/api/QColor.json +131 -0
- package/dist/api/QDate.json +550 -0
- package/dist/api/QDialog.json +210 -0
- package/dist/api/QDrawer.json +262 -0
- package/dist/api/QEditor.json +385 -0
- package/dist/api/QExpansionItem.json +339 -0
- package/dist/api/QFab.json +310 -0
- package/dist/api/QFabAction.json +222 -0
- package/dist/api/QField.json +417 -0
- package/dist/api/QFile.json +623 -0
- package/dist/api/QFooter.json +61 -0
- package/dist/api/QForm.json +102 -0
- package/dist/api/QFormChildMixin.json +24 -0
- package/dist/api/QHeader.json +70 -0
- package/dist/api/QIcon.json +64 -0
- package/dist/api/QImg.json +236 -0
- package/dist/api/QInfiniteScroll.json +120 -0
- package/dist/api/QInnerLoading.json +77 -0
- package/dist/api/QInput.json +494 -0
- package/dist/api/QIntersection.json +91 -0
- package/dist/api/QItem.json +119 -0
- package/dist/api/QItemLabel.json +41 -0
- package/dist/api/QItemSection.json +38 -0
- package/dist/api/QKnob.json +196 -0
- package/dist/api/QLayout.json +110 -0
- package/dist/api/QLinearProgress.json +94 -0
- package/dist/api/QList.json +38 -0
- package/dist/api/QMarkupTable.json +58 -0
- package/dist/api/QMenu.json +323 -0
- package/dist/api/QNoSsr.json +37 -0
- package/dist/api/QOptionGroup.json +109 -0
- package/dist/api/QPage.json +47 -0
- package/dist/api/QPageContainer.json +11 -0
- package/dist/api/QPageScroller.json +73 -0
- package/dist/api/QPageSticky.json +46 -0
- package/dist/api/QPagination.json +324 -0
- package/dist/api/QParallax.json +85 -0
- package/dist/api/QPopupEdit.json +337 -0
- package/dist/api/QPopupProxy.json +147 -0
- package/dist/api/QPullToRefresh.json +87 -0
- package/dist/api/QRadio.json +133 -0
- package/dist/api/QRange.json +269 -0
- package/dist/api/QRating.json +167 -0
- package/dist/api/QResizeObserver.json +59 -0
- package/dist/api/QResponsive.json +26 -0
- package/dist/api/QRouteTab.json +190 -0
- package/dist/api/QScrollArea.json +338 -0
- package/dist/api/QScrollObserver.json +146 -0
- package/dist/api/QSelect.json +1341 -0
- package/dist/api/QSeparator.json +62 -0
- package/dist/api/QSkeleton.json +104 -0
- package/dist/api/QSlideItem.json +202 -0
- package/dist/api/QSlideTransition.json +36 -0
- package/dist/api/QSlider.json +196 -0
- package/dist/api/QSpace.json +6 -0
- package/dist/api/QSpinner.json +38 -0
- package/dist/api/QSpinnerAudio.json +28 -0
- package/dist/api/QSpinnerBall.json +28 -0
- package/dist/api/QSpinnerBars.json +28 -0
- package/dist/api/QSpinnerBox.json +28 -0
- package/dist/api/QSpinnerClock.json +28 -0
- package/dist/api/QSpinnerComment.json +28 -0
- package/dist/api/QSpinnerCube.json +28 -0
- package/dist/api/QSpinnerDots.json +28 -0
- package/dist/api/QSpinnerFacebook.json +28 -0
- package/dist/api/QSpinnerGears.json +28 -0
- package/dist/api/QSpinnerGrid.json +28 -0
- package/dist/api/QSpinnerHearts.json +28 -0
- package/dist/api/QSpinnerHourglass.json +28 -0
- package/dist/api/QSpinnerInfinity.json +28 -0
- package/dist/api/QSpinnerIos.json +28 -0
- package/dist/api/QSpinnerOrbit.json +28 -0
- package/dist/api/QSpinnerOval.json +28 -0
- package/dist/api/QSpinnerPie.json +28 -0
- package/dist/api/QSpinnerPuff.json +28 -0
- package/dist/api/QSpinnerRadio.json +28 -0
- package/dist/api/QSpinnerRings.json +28 -0
- package/dist/api/QSpinnerTail.json +28 -0
- package/dist/api/QSplitter.json +142 -0
- package/dist/api/QStep.json +158 -0
- package/dist/api/QStepper.json +317 -0
- package/dist/api/QStepperNavigation.json +11 -0
- package/dist/api/QTab.json +111 -0
- package/dist/api/QTabPanel.json +34 -0
- package/dist/api/QTabPanels.json +193 -0
- package/dist/api/QTable.json +2645 -0
- package/dist/api/QTabs.json +165 -0
- package/dist/api/QTd.json +31 -0
- package/dist/api/QTh.json +26 -0
- package/dist/api/QTime.json +278 -0
- package/dist/api/QTimeline.json +48 -0
- package/dist/api/QTimelineEntry.json +101 -0
- package/dist/api/QToggle.json +216 -0
- package/dist/api/QToolbar.json +18 -0
- package/dist/api/QToolbarTitle.json +18 -0
- package/dist/api/QTooltip.json +274 -0
- package/dist/api/QTr.json +26 -0
- package/dist/api/QTree.json +552 -0
- package/dist/api/QUploader.json +481 -0
- package/dist/api/QUploaderAddTrigger.json +6 -0
- package/dist/api/QVideo.json +30 -0
- package/dist/api/QVirtualScroll.json +291 -0
- package/dist/api/Ripple.json +111 -0
- package/dist/api/Screen.json +207 -0
- package/dist/api/Scroll.json +31 -0
- package/dist/api/ScrollFire.json +21 -0
- package/dist/api/SessionStorage.json +191 -0
- package/dist/api/TouchHold.json +86 -0
- package/dist/api/TouchPan.json +200 -0
- package/dist/api/TouchRepeat.json +156 -0
- package/dist/api/TouchSwipe.json +118 -0
- package/dist/icon-set/bootstrap-icons.umd.prod.js +6 -0
- package/dist/icon-set/eva-icons.umd.prod.js +6 -0
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +6 -0
- package/dist/icon-set/fontawesome-v5.umd.prod.js +6 -0
- package/dist/icon-set/ionicons-v4.umd.prod.js +6 -0
- package/dist/icon-set/line-awesome.umd.prod.js +6 -0
- package/dist/icon-set/material-icons-outlined.umd.prod.js +6 -0
- package/dist/icon-set/material-icons-round.umd.prod.js +6 -0
- package/dist/icon-set/material-icons-sharp.umd.prod.js +6 -0
- package/dist/icon-set/material-icons.umd.prod.js +6 -0
- package/dist/icon-set/mdi-v3.umd.prod.js +6 -0
- package/dist/icon-set/mdi-v4.umd.prod.js +6 -0
- package/dist/icon-set/mdi-v5.umd.prod.js +6 -0
- package/dist/icon-set/mdi-v6.umd.prod.js +6 -0
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +6 -0
- package/dist/icon-set/svg-eva-icons.umd.prod.js +6 -0
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +6 -0
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +6 -0
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +6 -0
- package/dist/icon-set/svg-line-awesome.umd.prod.js +6 -0
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +6 -0
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +6 -0
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +6 -0
- package/dist/icon-set/svg-material-icons.umd.prod.js +6 -0
- package/dist/icon-set/svg-mdi-v4.umd.prod.js +6 -0
- package/dist/icon-set/svg-mdi-v5.umd.prod.js +6 -0
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +6 -0
- package/dist/icon-set/svg-themify.umd.prod.js +6 -0
- package/dist/icon-set/themify.umd.prod.js +6 -0
- package/dist/lang/ar.umd.prod.js +6 -0
- package/dist/lang/az-Latn.umd.prod.js +6 -0
- package/dist/lang/bg.umd.prod.js +6 -0
- package/dist/lang/bn.umd.prod.js +6 -0
- package/dist/lang/ca.umd.prod.js +6 -0
- package/dist/lang/cs.umd.prod.js +6 -0
- package/dist/lang/da.umd.prod.js +6 -0
- package/dist/lang/de.umd.prod.js +6 -0
- package/dist/lang/el.umd.prod.js +6 -0
- package/dist/lang/en-GB.umd.prod.js +6 -0
- package/dist/lang/en-US.umd.prod.js +6 -0
- package/dist/lang/eo.umd.prod.js +6 -0
- package/dist/lang/es.umd.prod.js +6 -0
- package/dist/lang/et.umd.prod.js +6 -0
- package/dist/lang/fa-IR.umd.prod.js +6 -0
- package/dist/lang/fa.umd.prod.js +6 -0
- package/dist/lang/fi.umd.prod.js +6 -0
- package/dist/lang/fr.umd.prod.js +6 -0
- package/dist/lang/gn.umd.prod.js +6 -0
- package/dist/lang/he.umd.prod.js +6 -0
- package/dist/lang/hr.umd.prod.js +6 -0
- package/dist/lang/hu.umd.prod.js +6 -0
- package/dist/lang/id.umd.prod.js +6 -0
- package/dist/lang/is.umd.prod.js +6 -0
- package/dist/lang/it.umd.prod.js +6 -0
- package/dist/lang/ja.umd.prod.js +6 -0
- package/dist/lang/km.umd.prod.js +6 -0
- package/dist/lang/ko-KR.umd.prod.js +6 -0
- package/dist/lang/kur-CKB.umd.prod.js +6 -0
- package/dist/lang/lu.umd.prod.js +6 -0
- package/dist/lang/lv.umd.prod.js +6 -0
- package/dist/lang/ml.umd.prod.js +6 -0
- package/dist/lang/ms.umd.prod.js +6 -0
- package/dist/lang/nb-NO.umd.prod.js +6 -0
- package/dist/lang/nl.umd.prod.js +6 -0
- package/dist/lang/pl.umd.prod.js +6 -0
- package/dist/lang/pt-BR.umd.prod.js +6 -0
- package/dist/lang/pt.umd.prod.js +6 -0
- package/dist/lang/ro.umd.prod.js +6 -0
- package/dist/lang/ru.umd.prod.js +6 -0
- package/dist/lang/sk.umd.prod.js +6 -0
- package/dist/lang/sl.umd.prod.js +6 -0
- package/dist/lang/sr.umd.prod.js +6 -0
- package/dist/lang/sv.umd.prod.js +6 -0
- package/dist/lang/ta.umd.prod.js +6 -0
- package/dist/lang/th.umd.prod.js +6 -0
- package/dist/lang/tr.umd.prod.js +6 -0
- package/dist/lang/ug.umd.prod.js +6 -0
- package/dist/lang/uk.umd.prod.js +6 -0
- package/dist/lang/vi.umd.prod.js +6 -0
- package/dist/lang/zh-CN.umd.prod.js +6 -0
- package/dist/lang/zh-TW.umd.prod.js +6 -0
- package/dist/quasar.addon.css +6291 -0
- package/dist/quasar.addon.prod.css +1 -0
- package/dist/quasar.addon.rtl.css +9286 -0
- package/dist/quasar.addon.rtl.prod.css +1 -0
- package/dist/quasar.cjs.prod.js +6 -0
- package/dist/quasar.css +11392 -0
- package/dist/quasar.esm.prod.js +6 -0
- package/dist/quasar.prod.css +1 -0
- package/dist/quasar.rtl.css +13790 -0
- package/dist/quasar.rtl.prod.css +1 -0
- package/dist/quasar.sass +7314 -0
- package/dist/quasar.umd.js +38430 -0
- package/dist/quasar.umd.prod.js +6 -0
- package/dist/ssr-directives/Morph.js +55 -0
- package/dist/ssr-directives/index.js +14 -0
- package/dist/transforms/api-list.json +151 -0
- package/dist/transforms/auto-import.json +267 -0
- package/dist/transforms/import-map.json +178 -0
- package/dist/transforms/import-transformation.js +9 -0
- package/dist/transforms/loader-asset-urls.json +40 -0
- package/dist/types/api/cookies.d.ts +1 -0
- package/dist/types/api/web-storage.d.ts +30 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/composables.d.ts +30 -0
- package/dist/types/extras/animations.d.ts +106 -0
- package/dist/types/extras/fonts.d.ts +1 -0
- package/dist/types/extras/icon-set.d.ts +123 -0
- package/dist/types/extras.d.ts +3 -0
- package/dist/types/feature-flag.d.ts +57 -0
- package/dist/types/globals.d.ts +69 -0
- package/dist/types/index.d.ts +8818 -0
- package/dist/types/lang.d.ts +131 -0
- package/dist/types/meta.d.ts +16 -0
- package/dist/types/plugin.d.ts +17 -0
- package/dist/types/shim-icon-set.d.ts +7 -0
- package/dist/types/shim-lang.d.ts +7 -0
- package/dist/types/ts-helpers.d.ts +22 -0
- package/dist/types/tsconfig.json +7 -0
- package/dist/types/typings.json +4 -0
- package/dist/types/utils/colors.d.ts +28 -0
- package/dist/types/utils/date.d.ts +50 -0
- package/dist/types/utils/dom.d.ts +14 -0
- package/dist/types/utils/event.d.ts +28 -0
- package/dist/types/utils/format.d.ts +7 -0
- package/dist/types/utils/scroll.d.ts +20 -0
- package/dist/types/utils.d.ts +138 -0
- package/dist/vetur/quasar-attributes.json +5522 -0
- package/dist/vetur/quasar-tags.json +1992 -0
- package/dist/web-types/web-types.json +18572 -0
- package/icon-set/bootstrap-icons.js +136 -0
- package/icon-set/eva-icons.js +186 -0
- package/icon-set/fontawesome-v5-pro.js +128 -0
- package/icon-set/fontawesome-v5.js +128 -0
- package/icon-set/ionicons-v4.js +180 -0
- package/icon-set/line-awesome.js +128 -0
- package/icon-set/material-icons-outlined.js +128 -0
- package/icon-set/material-icons-round.js +128 -0
- package/icon-set/material-icons-sharp.js +128 -0
- package/icon-set/material-icons.js +128 -0
- package/icon-set/mdi-v3.js +141 -0
- package/icon-set/mdi-v4.js +141 -0
- package/icon-set/mdi-v5.js +141 -0
- package/icon-set/mdi-v6.js +141 -0
- package/icon-set/svg-bootstrap-icons.js +211 -0
- package/icon-set/svg-eva-icons.js +234 -0
- package/icon-set/svg-fontawesome-v5.js +198 -0
- package/icon-set/svg-ionicons-v4.js +235 -0
- package/icon-set/svg-ionicons-v5.js +225 -0
- package/icon-set/svg-line-awesome.js +198 -0
- package/icon-set/svg-material-icons-outlined.js +203 -0
- package/icon-set/svg-material-icons-round.js +203 -0
- package/icon-set/svg-material-icons-sharp.js +203 -0
- package/icon-set/svg-material-icons.js +203 -0
- package/icon-set/svg-mdi-v4.js +218 -0
- package/icon-set/svg-mdi-v5.js +225 -0
- package/icon-set/svg-mdi-v6.js +225 -0
- package/icon-set/svg-themify.js +232 -0
- package/icon-set/themify.js +169 -0
- package/lang/ar.js +96 -0
- package/lang/az-Latn.js +91 -0
- package/lang/bg.js +91 -0
- package/lang/bn.js +91 -0
- package/lang/ca.js +91 -0
- package/lang/cs.js +102 -0
- package/lang/da.js +91 -0
- package/lang/de.js +91 -0
- package/lang/el.js +91 -0
- package/lang/en-GB.js +91 -0
- package/lang/en-US.js +91 -0
- package/lang/eo.js +91 -0
- package/lang/es.js +91 -0
- package/lang/et.js +91 -0
- package/lang/fa-IR.js +92 -0
- package/lang/fa.js +92 -0
- package/lang/fi.js +92 -0
- package/lang/fr.js +94 -0
- package/lang/gn.js +91 -0
- package/lang/he.js +92 -0
- package/lang/hr.js +91 -0
- package/lang/hu.js +91 -0
- package/lang/id.js +91 -0
- package/lang/index.json +210 -0
- package/lang/is.js +91 -0
- package/lang/it.js +91 -0
- package/lang/ja.js +90 -0
- package/lang/km.js +91 -0
- package/lang/ko-KR.js +91 -0
- package/lang/kur-CKB.js +101 -0
- package/lang/lu.js +91 -0
- package/lang/lv.js +91 -0
- package/lang/ml.js +95 -0
- package/lang/ms.js +91 -0
- package/lang/nb-NO.js +92 -0
- package/lang/nl.js +91 -0
- package/lang/pl.js +91 -0
- package/lang/pt-BR.js +91 -0
- package/lang/pt.js +91 -0
- package/lang/ro.js +91 -0
- package/lang/ru.js +95 -0
- package/lang/sk.js +91 -0
- package/lang/sl.js +91 -0
- package/lang/sr.js +91 -0
- package/lang/sv.js +91 -0
- package/lang/ta.js +91 -0
- package/lang/th.js +91 -0
- package/lang/tr.js +87 -0
- package/lang/ug.js +92 -0
- package/lang/uk.js +95 -0
- package/lang/vi.js +91 -0
- package/lang/zh-CN.js +90 -0
- package/lang/zh-TW.js +90 -0
- package/package.json +108 -0
- package/src/api-file-example.json +94 -0
- package/src/api.extends.json +264 -0
- package/src/body.js +109 -0
- package/src/components/ajax-bar/QAjaxBar.js +238 -0
- package/src/components/ajax-bar/QAjaxBar.json +76 -0
- package/src/components/ajax-bar/QAjaxBar.sass +27 -0
- package/src/components/ajax-bar/index.js +5 -0
- package/src/components/avatar/QAvatar.js +61 -0
- package/src/components/avatar/QAvatar.json +42 -0
- package/src/components/avatar/QAvatar.sass +22 -0
- package/src/components/avatar/index.js +5 -0
- package/src/components/badge/QBadge.js +59 -0
- package/src/components/badge/QBadge.json +65 -0
- package/src/components/badge/QBadge.sass +32 -0
- package/src/components/badge/index.js +5 -0
- package/src/components/banner/QBanner.js +57 -0
- package/src/components/banner/QBanner.json +39 -0
- package/src/components/banner/QBanner.sass +38 -0
- package/src/components/banner/index.js +5 -0
- package/src/components/bar/QBar.js +30 -0
- package/src/components/bar/QBar.json +22 -0
- package/src/components/bar/QBar.sass +31 -0
- package/src/components/bar/index.js +5 -0
- package/src/components/breadcrumbs/QBreadcrumbs.js +90 -0
- package/src/components/breadcrumbs/QBreadcrumbs.json +57 -0
- package/src/components/breadcrumbs/QBreadcrumbs.sass +16 -0
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +57 -0
- package/src/components/breadcrumbs/QBreadcrumbsEl.json +36 -0
- package/src/components/breadcrumbs/index.js +7 -0
- package/src/components/btn/QBtn.js +362 -0
- package/src/components/btn/QBtn.json +70 -0
- package/src/components/btn/QBtn.sass +157 -0
- package/src/components/btn/index.js +5 -0
- package/src/components/btn/use-btn.js +195 -0
- package/src/components/btn/use-btn.json +172 -0
- package/src/components/btn-dropdown/QBtnDropdown.js +215 -0
- package/src/components/btn-dropdown/QBtnDropdown.json +138 -0
- package/src/components/btn-dropdown/QBtnDropdown.sass +15 -0
- package/src/components/btn-dropdown/index.js +5 -0
- package/src/components/btn-group/QBtnGroup.js +31 -0
- package/src/components/btn-group/QBtnGroup.json +61 -0
- package/src/components/btn-group/QBtnGroup.sass +85 -0
- package/src/components/btn-group/index.js +5 -0
- package/src/components/btn-toggle/QBtnToggle.js +166 -0
- package/src/components/btn-toggle/QBtnToggle.json +194 -0
- package/src/components/btn-toggle/QBtnToggle.sass +2 -0
- package/src/components/btn-toggle/index.js +5 -0
- package/src/components/card/QCard.js +37 -0
- package/src/components/card/QCard.json +35 -0
- package/src/components/card/QCard.sass +96 -0
- package/src/components/card/QCardActions.js +25 -0
- package/src/components/card/QCardActions.json +27 -0
- package/src/components/card/QCardSection.js +25 -0
- package/src/components/card/QCardSection.json +25 -0
- package/src/components/card/index.js +9 -0
- package/src/components/carousel/QCarousel.js +267 -0
- package/src/components/carousel/QCarousel.json +150 -0
- package/src/components/carousel/QCarousel.sass +126 -0
- package/src/components/carousel/QCarouselControl.js +36 -0
- package/src/components/carousel/QCarouselControl.json +34 -0
- package/src/components/carousel/QCarouselSlide.js +27 -0
- package/src/components/carousel/QCarouselSlide.json +36 -0
- package/src/components/carousel/index.js +9 -0
- package/src/components/chat/QChatMessage.js +155 -0
- package/src/components/chat/QChatMessage.json +115 -0
- package/src/components/chat/QChatMessage.sass +75 -0
- package/src/components/chat/index.js +5 -0
- package/src/components/checkbox/QCheckbox.js +35 -0
- package/src/components/checkbox/QCheckbox.json +7 -0
- package/src/components/checkbox/QCheckbox.sass +114 -0
- package/src/components/checkbox/index.js +5 -0
- package/src/components/checkbox/use-checkbox.js +236 -0
- package/src/components/checkbox/use-checkbox.json +127 -0
- package/src/components/chip/QChip.js +197 -0
- package/src/components/chip/QChip.json +146 -0
- package/src/components/chip/QChip.sass +83 -0
- package/src/components/chip/index.js +5 -0
- package/src/components/circular-progress/QCircularProgress.js +135 -0
- package/src/components/circular-progress/QCircularProgress.json +107 -0
- package/src/components/circular-progress/QCircularProgress.sass +38 -0
- package/src/components/circular-progress/index.js +5 -0
- package/src/components/circular-progress/use-circular-progress.js +38 -0
- package/src/components/color/QColor.js +830 -0
- package/src/components/color/QColor.json +96 -0
- package/src/components/color/QColor.sass +188 -0
- package/src/components/color/index.js +5 -0
- package/src/components/date/QDate.js +1450 -0
- package/src/components/date/QDate.json +439 -0
- package/src/components/date/QDate.sass +249 -0
- package/src/components/date/index.js +5 -0
- package/src/components/date/use-datetime.js +95 -0
- package/src/components/date/use-datetime.json +86 -0
- package/src/components/dialog/QDialog.js +402 -0
- package/src/components/dialog/QDialog.json +126 -0
- package/src/components/dialog/QDialog.sass +106 -0
- package/src/components/dialog/index.js +5 -0
- package/src/components/dialog-bottom-sheet/BottomSheet.js +177 -0
- package/src/components/dialog-bottom-sheet/BottomSheet.sass +37 -0
- package/src/components/dialog-plugin/DialogPlugin.js +323 -0
- package/src/components/dialog-plugin/DialogPlugin.sass +11 -0
- package/src/components/drawer/QDrawer.js +693 -0
- package/src/components/drawer/QDrawer.json +164 -0
- package/src/components/drawer/index.js +5 -0
- package/src/components/editor/QEditor.js +539 -0
- package/src/components/editor/QEditor.json +301 -0
- package/src/components/editor/QEditor.sass +83 -0
- package/src/components/editor/editor-caret.js +363 -0
- package/src/components/editor/editor-utils.js +287 -0
- package/src/components/editor/index.js +5 -0
- package/src/components/expansion-item/QExpansionItem.js +337 -0
- package/src/components/expansion-item/QExpansionItem.json +175 -0
- package/src/components/expansion-item/QExpansionItem.sass +72 -0
- package/src/components/expansion-item/index.js +5 -0
- package/src/components/fab/QFab.js +136 -0
- package/src/components/fab/QFab.json +73 -0
- package/src/components/fab/QFab.sass +154 -0
- package/src/components/fab/QFabAction.js +96 -0
- package/src/components/fab/QFabAction.json +59 -0
- package/src/components/fab/index.js +7 -0
- package/src/components/fab/use-fab.js +90 -0
- package/src/components/fab/use-fab.json +123 -0
- package/src/components/field/QField.js +17 -0
- package/src/components/field/QField.json +112 -0
- package/src/components/field/QField.sass +535 -0
- package/src/components/field/index.js +5 -0
- package/src/components/file/QFile.js +273 -0
- package/src/components/file/QFile.json +179 -0
- package/src/components/file/QFile.sass +19 -0
- package/src/components/file/index.js +5 -0
- package/src/components/footer/QFooter.js +200 -0
- package/src/components/footer/QFooter.json +60 -0
- package/src/components/footer/index.js +5 -0
- package/src/components/form/QForm.js +184 -0
- package/src/components/form/QForm.json +120 -0
- package/src/components/form/QForm.sass +2 -0
- package/src/components/form/QFormChildMixin.js +40 -0
- package/src/components/form/QFormChildMixin.json +22 -0
- package/src/components/form/index.js +7 -0
- package/src/components/header/QHeader.js +179 -0
- package/src/components/header/QHeader.json +70 -0
- package/src/components/header/index.js +5 -0
- package/src/components/icon/QIcon.js +202 -0
- package/src/components/icon/QIcon.json +45 -0
- package/src/components/icon/QIcon.sass +38 -0
- package/src/components/icon/index.js +5 -0
- package/src/components/img/QImg.js +287 -0
- package/src/components/img/QImg.json +225 -0
- package/src/components/img/QImg.sass +40 -0
- package/src/components/img/index.js +5 -0
- package/src/components/infinite-scroll/QInfiniteScroll.js +215 -0
- package/src/components/infinite-scroll/QInfiniteScroll.json +109 -0
- package/src/components/infinite-scroll/index.js +5 -0
- package/src/components/inner-loading/QInnerLoading.js +57 -0
- package/src/components/inner-loading/QInnerLoading.json +35 -0
- package/src/components/inner-loading/QInnerLoading.sass +4 -0
- package/src/components/inner-loading/index.js +5 -0
- package/src/components/input/QInput.js +394 -0
- package/src/components/input/QInput.json +131 -0
- package/src/components/input/QInput.sass +58 -0
- package/src/components/input/index.js +5 -0
- package/src/components/input/use-mask.js +543 -0
- package/src/components/input/use-mask.json +31 -0
- package/src/components/intersection/QIntersection.js +97 -0
- package/src/components/intersection/QIntersection.json +78 -0
- package/src/components/intersection/QIntersection.sass +2 -0
- package/src/components/intersection/index.js +5 -0
- package/src/components/item/QItem.js +156 -0
- package/src/components/item/QItem.json +65 -0
- package/src/components/item/QItem.sass +119 -0
- package/src/components/item/QItemLabel.js +42 -0
- package/src/components/item/QItemLabel.json +38 -0
- package/src/components/item/QItemSection.js +28 -0
- package/src/components/item/QItemSection.json +43 -0
- package/src/components/item/QList.js +34 -0
- package/src/components/item/QList.json +37 -0
- package/src/components/item/index.js +13 -0
- package/src/components/knob/QKnob.js +278 -0
- package/src/components/knob/QKnob.json +140 -0
- package/src/components/knob/QKnob.sass +21 -0
- package/src/components/knob/index.js +5 -0
- package/src/components/layout/QLayout.js +208 -0
- package/src/components/layout/QLayout.json +102 -0
- package/src/components/layout/QLayout.sass +181 -0
- package/src/components/layout/index.js +5 -0
- package/src/components/linear-progress/QLinearProgress.js +115 -0
- package/src/components/linear-progress/QLinearProgress.json +77 -0
- package/src/components/linear-progress/QLinearProgress.sass +71 -0
- package/src/components/linear-progress/index.js +5 -0
- package/src/components/markup-table/QMarkupTable.js +49 -0
- package/src/components/markup-table/QMarkupTable.json +48 -0
- package/src/components/markup-table/index.js +5 -0
- package/src/components/menu/QMenu.js +369 -0
- package/src/components/menu/QMenu.json +142 -0
- package/src/components/menu/QMenu.sass +16 -0
- package/src/components/menu/index.js +5 -0
- package/src/components/no-ssr/QNoSsr.js +46 -0
- package/src/components/no-ssr/QNoSsr.json +30 -0
- package/src/components/no-ssr/index.js +5 -0
- package/src/components/option-group/QOptionGroup.js +114 -0
- package/src/components/option-group/QOptionGroup.json +80 -0
- package/src/components/option-group/QOptionGroup.sass +5 -0
- package/src/components/option-group/index.js +5 -0
- package/src/components/page/QPage.js +55 -0
- package/src/components/page/QPage.json +44 -0
- package/src/components/page/QPageContainer.js +42 -0
- package/src/components/page/QPageContainer.json +11 -0
- package/src/components/page/index.js +7 -0
- package/src/components/page-scroller/QPageScroller.js +116 -0
- package/src/components/page-scroller/QPageScroller.json +36 -0
- package/src/components/page-scroller/index.js +5 -0
- package/src/components/page-sticky/QPageSticky.js +14 -0
- package/src/components/page-sticky/QPageSticky.json +39 -0
- package/src/components/page-sticky/index.js +5 -0
- package/src/components/page-sticky/use-page-sticky.js +117 -0
- package/src/components/pagination/QPagination.js +374 -0
- package/src/components/pagination/QPagination.json +254 -0
- package/src/components/pagination/QPagination.sass +9 -0
- package/src/components/pagination/index.js +5 -0
- package/src/components/parallax/QParallax.js +166 -0
- package/src/components/parallax/QParallax.json +73 -0
- package/src/components/parallax/QParallax.sass +15 -0
- package/src/components/parallax/index.js +5 -0
- package/src/components/popup-edit/QPopupEdit.js +193 -0
- package/src/components/popup-edit/QPopupEdit.json +283 -0
- package/src/components/popup-edit/QPopupEdit.sass +8 -0
- package/src/components/popup-edit/index.js +5 -0
- package/src/components/popup-proxy/QPopupProxy.js +104 -0
- package/src/components/popup-proxy/QPopupProxy.json +65 -0
- package/src/components/popup-proxy/index.js +5 -0
- package/src/components/pull-to-refresh/QPullToRefresh.js +213 -0
- package/src/components/pull-to-refresh/QPullToRefresh.json +66 -0
- package/src/components/pull-to-refresh/QPullToRefresh.sass +13 -0
- package/src/components/pull-to-refresh/index.js +5 -0
- package/src/components/radio/QRadio.js +179 -0
- package/src/components/radio/QRadio.json +94 -0
- package/src/components/radio/QRadio.sass +95 -0
- package/src/components/radio/index.js +5 -0
- package/src/components/range/QRange.js +529 -0
- package/src/components/range/QRange.json +208 -0
- package/src/components/range/index.js +5 -0
- package/src/components/rating/QRating.js +216 -0
- package/src/components/rating/QRating.json +110 -0
- package/src/components/rating/QRating.sass +29 -0
- package/src/components/rating/index.js +5 -0
- package/src/components/resize-observer/QResizeObserver.js +139 -0
- package/src/components/resize-observer/QResizeObserver.json +51 -0
- package/src/components/resize-observer/index.js +5 -0
- package/src/components/responsive/QResponsive.js +29 -0
- package/src/components/responsive/QResponsive.json +13 -0
- package/src/components/responsive/QResponsive.sass +19 -0
- package/src/components/responsive/index.js +5 -0
- package/src/components/scroll-area/QScrollArea.js +446 -0
- package/src/components/scroll-area/QScrollArea.json +300 -0
- package/src/components/scroll-area/QScrollArea.sass +37 -0
- package/src/components/scroll-area/index.js +5 -0
- package/src/components/scroll-observer/QScrollObserver.js +135 -0
- package/src/components/scroll-observer/QScrollObserver.json +115 -0
- package/src/components/scroll-observer/index.js +5 -0
- package/src/components/select/QSelect.js +1556 -0
- package/src/components/select/QSelect.json +789 -0
- package/src/components/select/QSelect.sass +64 -0
- package/src/components/select/index.js +5 -0
- package/src/components/separator/QSeparator.js +85 -0
- package/src/components/separator/QSeparator.json +42 -0
- package/src/components/separator/QSeparator.sass +32 -0
- package/src/components/separator/index.js +5 -0
- package/src/components/skeleton/QSkeleton.js +72 -0
- package/src/components/skeleton/QSkeleton.json +76 -0
- package/src/components/skeleton/QSkeleton.sass +140 -0
- package/src/components/skeleton/index.js +5 -0
- package/src/components/slide-item/QSlideItem.js +232 -0
- package/src/components/slide-item/QSlideItem.json +186 -0
- package/src/components/slide-item/QSlideItem.sass +41 -0
- package/src/components/slide-item/index.js +5 -0
- package/src/components/slide-transition/QSlideTransition.js +113 -0
- package/src/components/slide-transition/QSlideTransition.json +37 -0
- package/src/components/slide-transition/index.js +5 -0
- package/src/components/slider/QSlider.js +239 -0
- package/src/components/slider/QSlider.json +147 -0
- package/src/components/slider/QSlider.sass +225 -0
- package/src/components/slider/index.js +5 -0
- package/src/components/slider/use-slider.js +304 -0
- package/src/components/space/QSpace.js +11 -0
- package/src/components/space/QSpace.json +5 -0
- package/src/components/space/QSpace.sass +2 -0
- package/src/components/space/index.js +5 -0
- package/src/components/spinner/QSpinner.js +38 -0
- package/src/components/spinner/QSpinner.json +21 -0
- package/src/components/spinner/QSpinner.sass +34 -0
- package/src/components/spinner/QSpinnerAudio.js +88 -0
- package/src/components/spinner/QSpinnerAudio.json +3 -0
- package/src/components/spinner/QSpinnerBall.js +104 -0
- package/src/components/spinner/QSpinnerBall.json +3 -0
- package/src/components/spinner/QSpinnerBars.js +143 -0
- package/src/components/spinner/QSpinnerBars.json +3 -0
- package/src/components/spinner/QSpinnerBox.js +61 -0
- package/src/components/spinner/QSpinnerBox.json +3 -0
- package/src/components/spinner/QSpinnerClock.js +72 -0
- package/src/components/spinner/QSpinnerClock.json +3 -0
- package/src/components/spinner/QSpinnerComment.js +84 -0
- package/src/components/spinner/QSpinnerComment.json +3 -0
- package/src/components/spinner/QSpinnerCube.js +132 -0
- package/src/components/spinner/QSpinnerCube.json +3 -0
- package/src/components/spinner/QSpinnerDots.js +104 -0
- package/src/components/spinner/QSpinnerDots.json +3 -0
- package/src/components/spinner/QSpinnerFacebook.js +103 -0
- package/src/components/spinner/QSpinnerFacebook.json +3 -0
- package/src/components/spinner/QSpinnerGears.js +59 -0
- package/src/components/spinner/QSpinnerGears.json +3 -0
- package/src/components/spinner/QSpinnerGrid.js +152 -0
- package/src/components/spinner/QSpinnerGrid.json +3 -0
- package/src/components/spinner/QSpinnerHearts.js +54 -0
- package/src/components/spinner/QSpinnerHearts.json +3 -0
- package/src/components/spinner/QSpinnerHourglass.js +112 -0
- package/src/components/spinner/QSpinnerHourglass.json +3 -0
- package/src/components/spinner/QSpinnerInfinity.js +42 -0
- package/src/components/spinner/QSpinnerInfinity.json +3 -0
- package/src/components/spinner/QSpinnerIos.js +174 -0
- package/src/components/spinner/QSpinnerIos.json +3 -0
- package/src/components/spinner/QSpinnerOrbit.js +51 -0
- package/src/components/spinner/QSpinnerOrbit.json +3 -0
- package/src/components/spinner/QSpinnerOval.js +50 -0
- package/src/components/spinner/QSpinnerOval.json +3 -0
- package/src/components/spinner/QSpinnerPie.js +81 -0
- package/src/components/spinner/QSpinnerPie.json +3 -0
- package/src/components/spinner/QSpinnerPuff.js +83 -0
- package/src/components/spinner/QSpinnerPuff.json +3 -0
- package/src/components/spinner/QSpinnerRadio.js +76 -0
- package/src/components/spinner/QSpinnerRadio.json +3 -0
- package/src/components/spinner/QSpinnerRings.js +106 -0
- package/src/components/spinner/QSpinnerRings.json +3 -0
- package/src/components/spinner/QSpinnerTail.js +83 -0
- package/src/components/spinner/QSpinnerTail.json +3 -0
- package/src/components/spinner/__spinner-mixin.json +13 -0
- package/src/components/spinner/index.js +51 -0
- package/src/components/spinner/use-spinner.js +24 -0
- package/src/components/splitter/QSplitter.js +205 -0
- package/src/components/splitter/QSplitter.json +129 -0
- package/src/components/splitter/QSplitter.sass +54 -0
- package/src/components/splitter/index.js +5 -0
- package/src/components/stepper/QStep.js +132 -0
- package/src/components/stepper/QStep.json +101 -0
- package/src/components/stepper/QStepper.js +133 -0
- package/src/components/stepper/QStepper.json +108 -0
- package/src/components/stepper/QStepper.sass +210 -0
- package/src/components/stepper/QStepperNavigation.js +11 -0
- package/src/components/stepper/QStepperNavigation.json +11 -0
- package/src/components/stepper/StepHeader.js +165 -0
- package/src/components/stepper/index.js +9 -0
- package/src/components/tab-panels/QTabPanel.js +14 -0
- package/src/components/tab-panels/QTabPanel.json +19 -0
- package/src/components/tab-panels/QTabPanel.sass +5 -0
- package/src/components/tab-panels/QTabPanels.js +42 -0
- package/src/components/tab-panels/QTabPanels.json +13 -0
- package/src/components/tab-panels/index.js +7 -0
- package/src/components/table/QTable.js +1068 -0
- package/src/components/table/QTable.json +2318 -0
- package/src/components/table/QTable.sass +283 -0
- package/src/components/table/QTd.js +43 -0
- package/src/components/table/QTd.json +32 -0
- package/src/components/table/QTh.js +69 -0
- package/src/components/table/QTh.json +26 -0
- package/src/components/table/QTr.js +22 -0
- package/src/components/table/QTr.json +26 -0
- package/src/components/table/get-table-middle.js +7 -0
- package/src/components/table/index.js +11 -0
- package/src/components/table/table-column-selection.js +88 -0
- package/src/components/table/table-filter.js +35 -0
- package/src/components/table/table-pagination.js +213 -0
- package/src/components/table/table-row-expand.js +56 -0
- package/src/components/table/table-row-selection.js +87 -0
- package/src/components/table/table-sort.js +124 -0
- package/src/components/tabs/QRouteTab.js +36 -0
- package/src/components/tabs/QRouteTab.json +55 -0
- package/src/components/tabs/QTab.js +16 -0
- package/src/components/tabs/QTab.json +78 -0
- package/src/components/tabs/QTabs.js +465 -0
- package/src/components/tabs/QTabs.json +141 -0
- package/src/components/tabs/QTabs.sass +189 -0
- package/src/components/tabs/index.js +9 -0
- package/src/components/tabs/use-tab.js +199 -0
- package/src/components/time/QTime.js +918 -0
- package/src/components/time/QTime.json +174 -0
- package/src/components/time/QTime.sass +186 -0
- package/src/components/time/index.js +5 -0
- package/src/components/timeline/QTimeline.js +43 -0
- package/src/components/timeline/QTimeline.json +37 -0
- package/src/components/timeline/QTimeline.sass +243 -0
- package/src/components/timeline/QTimelineEntry.js +110 -0
- package/src/components/timeline/QTimelineEntry.json +84 -0
- package/src/components/timeline/index.js +7 -0
- package/src/components/toggle/QToggle.js +56 -0
- package/src/components/toggle/QToggle.json +39 -0
- package/src/components/toggle/QToggle.sass +132 -0
- package/src/components/toggle/index.js +5 -0
- package/src/components/toolbar/QToolbar.js +20 -0
- package/src/components/toolbar/QToolbar.json +19 -0
- package/src/components/toolbar/QToolbar.sass +25 -0
- package/src/components/toolbar/QToolbarTitle.js +20 -0
- package/src/components/toolbar/QToolbarTitle.json +19 -0
- package/src/components/toolbar/index.js +7 -0
- package/src/components/tooltip/QTooltip.js +309 -0
- package/src/components/tooltip/QTooltip.json +113 -0
- package/src/components/tooltip/QTooltip.sass +18 -0
- package/src/components/tooltip/index.js +5 -0
- package/src/components/tree/QTree.js +694 -0
- package/src/components/tree/QTree.json +524 -0
- package/src/components/tree/QTree.sass +132 -0
- package/src/components/tree/index.js +5 -0
- package/src/components/uploader/QUploader.js +4 -0
- package/src/components/uploader/QUploader.json +144 -0
- package/src/components/uploader/QUploader.sass +134 -0
- package/src/components/uploader/QUploaderAddTrigger.js +13 -0
- package/src/components/uploader/QUploaderAddTrigger.json +5 -0
- package/src/components/uploader/index.js +7 -0
- package/src/components/uploader/uploader-core.js +481 -0
- package/src/components/uploader/xhr-uploader-plugin.js +258 -0
- package/src/components/uploader/xhr-uploader-plugin.json +203 -0
- package/src/components/video/QVideo.js +36 -0
- package/src/components/video/QVideo.json +19 -0
- package/src/components/video/QVideo.sass +24 -0
- package/src/components/video/index.js +5 -0
- package/src/components/virtual-scroll/QVirtualScroll.js +161 -0
- package/src/components/virtual-scroll/QVirtualScroll.json +95 -0
- package/src/components/virtual-scroll/QVirtualScroll.sass +40 -0
- package/src/components/virtual-scroll/index.js +5 -0
- package/src/components/virtual-scroll/use-virtual-scroll.js +727 -0
- package/src/components/virtual-scroll/use-virtual-scroll.json +141 -0
- package/src/components.js +79 -0
- package/src/composables/private/use-align.js +31 -0
- package/src/composables/private/use-anchor.js +208 -0
- package/src/composables/private/use-anchor.json +29 -0
- package/src/composables/private/use-cache.js +21 -0
- package/src/composables/private/use-can-render.js +16 -0
- package/src/composables/private/use-dark.js +17 -0
- package/src/composables/private/use-field.js +589 -0
- package/src/composables/private/use-field.json +246 -0
- package/src/composables/private/use-file-dom-props.js +44 -0
- package/src/composables/private/use-file.js +201 -0
- package/src/composables/private/use-file.json +106 -0
- package/src/composables/private/use-form.js +29 -0
- package/src/composables/private/use-form.json +10 -0
- package/src/composables/private/use-fullscreen.js +101 -0
- package/src/composables/private/use-fullscreen.json +32 -0
- package/src/composables/private/use-history.js +31 -0
- package/src/composables/private/use-key-composition.js +26 -0
- package/src/composables/private/use-model-toggle.js +151 -0
- package/src/composables/private/use-model-toggle.json +51 -0
- package/src/composables/private/use-panel.child.json +17 -0
- package/src/composables/private/use-panel.js +277 -0
- package/src/composables/private/use-panel.json +142 -0
- package/src/composables/private/use-panel.sass +11 -0
- package/src/composables/private/use-portal.js +100 -0
- package/src/composables/private/use-portal.json +3 -0
- package/src/composables/private/use-prevent-scroll.js +17 -0
- package/src/composables/private/use-ratio.js +18 -0
- package/src/composables/private/use-ratio.json +14 -0
- package/src/composables/private/use-refocus-target.js +33 -0
- package/src/composables/private/use-router-link.js +213 -0
- package/src/composables/private/use-router-link.json +43 -0
- package/src/composables/private/use-scroll-target.js +46 -0
- package/src/composables/private/use-size.js +22 -0
- package/src/composables/private/use-size.json +10 -0
- package/src/composables/private/use-split-attrs.js +33 -0
- package/src/composables/private/use-tick.js +39 -0
- package/src/composables/private/use-timeout.js +20 -0
- package/src/composables/private/use-transition.js +35 -0
- package/src/composables/private/use-transition.json +21 -0
- package/src/composables/private/use-validate.js +215 -0
- package/src/composables/private/use-validate.json +77 -0
- package/src/composables/use-dialog-plugin-component.js +39 -0
- package/src/composables/use-form-child.js +35 -0
- package/src/composables/use-meta.js +49 -0
- package/src/composables/use-quasar.js +10 -0
- package/src/composables.js +11 -0
- package/src/css/core/animations.sass +90 -0
- package/src/css/core/colors.sass +1788 -0
- package/src/css/core/dark.sass +7 -0
- package/src/css/core/elevation.sass +27 -0
- package/src/css/core/flex.sass +158 -0
- package/src/css/core/helpers.sass +61 -0
- package/src/css/core/mouse.sass +40 -0
- package/src/css/core/orientation.sass +18 -0
- package/src/css/core/positioning.sass +101 -0
- package/src/css/core/size.sass +75 -0
- package/src/css/core/touch.sass +9 -0
- package/src/css/core/transitions.sass +153 -0
- package/src/css/core/typography.sass +70 -0
- package/src/css/core/visibility.sass +163 -0
- package/src/css/flex-addon.sass +212 -0
- package/src/css/helpers/math.sass +42 -0
- package/src/css/helpers/string.sass +17 -0
- package/src/css/index.sass +102 -0
- package/src/css/normalize.sass +177 -0
- package/src/css/variables.sass +550 -0
- package/src/directives/ClosePopup.js +66 -0
- package/src/directives/ClosePopup.json +17 -0
- package/src/directives/Intersection.js +90 -0
- package/src/directives/Intersection.json +231 -0
- package/src/directives/Morph.js +211 -0
- package/src/directives/Morph.json +177 -0
- package/src/directives/Morph.sass +7 -0
- package/src/directives/Morph.ssr.js +45 -0
- package/src/directives/Mutation.js +63 -0
- package/src/directives/Mutation.json +124 -0
- package/src/directives/Ripple.js +141 -0
- package/src/directives/Ripple.json +105 -0
- package/src/directives/Ripple.sass +29 -0
- package/src/directives/Scroll.js +49 -0
- package/src/directives/Scroll.json +24 -0
- package/src/directives/ScrollFire.js +65 -0
- package/src/directives/ScrollFire.json +19 -0
- package/src/directives/TouchHold.js +159 -0
- package/src/directives/TouchHold.json +82 -0
- package/src/directives/TouchPan.js +410 -0
- package/src/directives/TouchPan.json +187 -0
- package/src/directives/TouchRepeat.js +241 -0
- package/src/directives/TouchRepeat.json +153 -0
- package/src/directives/TouchSwipe.js +265 -0
- package/src/directives/TouchSwipe.json +113 -0
- package/src/directives.js +25 -0
- package/src/history.js +118 -0
- package/src/icon-set.js +60 -0
- package/src/index.all.js +25 -0
- package/src/index.umd.js +28 -0
- package/src/install-quasar.js +137 -0
- package/src/lang.js +100 -0
- package/src/plugins/AddressbarColor.js +69 -0
- package/src/plugins/AddressbarColor.json +21 -0
- package/src/plugins/AppFullscreen.js +110 -0
- package/src/plugins/AppFullscreen.json +74 -0
- package/src/plugins/AppVisibility.js +40 -0
- package/src/plugins/AppVisibility.json +16 -0
- package/src/plugins/BottomSheet.js +13 -0
- package/src/plugins/BottomSheet.json +91 -0
- package/src/plugins/Cookies.js +204 -0
- package/src/plugins/Cookies.json +160 -0
- package/src/plugins/Dark.js +98 -0
- package/src/plugins/Dark.json +40 -0
- package/src/plugins/Dialog.js +13 -0
- package/src/plugins/Dialog.json +322 -0
- package/src/plugins/Loading.js +151 -0
- package/src/plugins/Loading.json +182 -0
- package/src/plugins/Loading.sass +26 -0
- package/src/plugins/LoadingBar.js +67 -0
- package/src/plugins/LoadingBar.json +58 -0
- package/src/plugins/LocalStorage.js +16 -0
- package/src/plugins/LocalStorage.json +5 -0
- package/src/plugins/Meta.js +257 -0
- package/src/plugins/Meta.json +5 -0
- package/src/plugins/Notify.js +513 -0
- package/src/plugins/Notify.json +838 -0
- package/src/plugins/Notify.sass +203 -0
- package/src/plugins/Platform.js +366 -0
- package/src/plugins/Platform.json +73 -0
- package/src/plugins/Screen.js +176 -0
- package/src/plugins/Screen.json +192 -0
- package/src/plugins/SessionStorage.js +16 -0
- package/src/plugins/SessionStorage.json +5 -0
- package/src/plugins.js +33 -0
- package/src/utils/clone.js +6 -0
- package/src/utils/colors.js +295 -0
- package/src/utils/copy-to-clipboard.js +29 -0
- package/src/utils/create-meta-mixin.js +67 -0
- package/src/utils/create-uploader-component.js +21 -0
- package/src/utils/date.js +888 -0
- package/src/utils/debounce.js +26 -0
- package/src/utils/dom.js +98 -0
- package/src/utils/event.js +170 -0
- package/src/utils/export-file.js +65 -0
- package/src/utils/extend.js +83 -0
- package/src/utils/format.js +56 -0
- package/src/utils/frame-debounce.js +22 -0
- package/src/utils/get-css-var.js +11 -0
- package/src/utils/morph.js +987 -0
- package/src/utils/open-url.js +62 -0
- package/src/utils/patterns.js +31 -0
- package/src/utils/prevent-scroll.js +195 -0
- package/src/utils/private/click-outside.js +81 -0
- package/src/utils/private/date-persian.js +281 -0
- package/src/utils/private/define-reactive-plugin.js +21 -0
- package/src/utils/private/escape-key.js +53 -0
- package/src/utils/private/focus-manager.js +36 -0
- package/src/utils/private/focusout.js +28 -0
- package/src/utils/private/global-config.js +7 -0
- package/src/utils/private/global-dialog.js +161 -0
- package/src/utils/private/global-dialog.json +123 -0
- package/src/utils/private/global-nodes.js +43 -0
- package/src/utils/private/is.js +150 -0
- package/src/utils/private/key-composition.js +18 -0
- package/src/utils/private/noop-ssr-directive-transform.js +1 -0
- package/src/utils/private/option-sizes.js +7 -0
- package/src/utils/private/portal.js +56 -0
- package/src/utils/private/position-engine.js +244 -0
- package/src/utils/private/render.js +63 -0
- package/src/utils/private/selection.js +17 -0
- package/src/utils/private/sort.js +20 -0
- package/src/utils/private/symbols.js +9 -0
- package/src/utils/private/touch.js +55 -0
- package/src/utils/private/vm.js +38 -0
- package/src/utils/private/web-storage.js +135 -0
- package/src/utils/private/web-storage.json +150 -0
- package/src/utils/scroll.js +198 -0
- package/src/utils/set-css-var.js +13 -0
- package/src/utils/throttle.js +13 -0
- package/src/utils/uid.js +72 -0
- package/src/utils.js +46 -0
- package/src/vue-plugin.js +10 -0
- package/wrappers/index.js +31 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import Platform from '../plugins/Platform.js'
|
|
2
|
+
|
|
3
|
+
import { noop } from '../utils/event.js'
|
|
4
|
+
|
|
5
|
+
function parseFeatures (winFeatures) {
|
|
6
|
+
const cfg = Object.assign({ noopener: true }, winFeatures)
|
|
7
|
+
const feat = []
|
|
8
|
+
Object.keys(cfg).forEach(key => {
|
|
9
|
+
if (cfg[ key ] === true) {
|
|
10
|
+
feat.push(key)
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
return feat.join(',')
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function openWindow (url, reject, windowFeatures) {
|
|
17
|
+
let open = window.open
|
|
18
|
+
|
|
19
|
+
if (Platform.is.cordova === true) {
|
|
20
|
+
if (cordova !== void 0 && cordova.InAppBrowser !== void 0 && cordova.InAppBrowser.open !== void 0) {
|
|
21
|
+
open = cordova.InAppBrowser.open
|
|
22
|
+
}
|
|
23
|
+
else if (navigator !== void 0 && navigator.app !== void 0) {
|
|
24
|
+
return navigator.app.loadUrl(url, {
|
|
25
|
+
openExternal: true
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const win = open(url, '_blank', parseFeatures(windowFeatures))
|
|
31
|
+
|
|
32
|
+
if (win) {
|
|
33
|
+
Platform.is.desktop && win.focus()
|
|
34
|
+
return win
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
reject && reject()
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default (url, reject, windowFeatures) => {
|
|
42
|
+
if (
|
|
43
|
+
Platform.is.ios === true
|
|
44
|
+
&& window.SafariViewController !== void 0
|
|
45
|
+
) {
|
|
46
|
+
window.SafariViewController.isAvailable(available => {
|
|
47
|
+
if (available) {
|
|
48
|
+
window.SafariViewController.show(
|
|
49
|
+
{ url },
|
|
50
|
+
noop,
|
|
51
|
+
reject
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
openWindow(url, reject, windowFeatures)
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return openWindow(url, reject, windowFeatures)
|
|
62
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// file referenced from docs
|
|
2
|
+
|
|
3
|
+
const
|
|
4
|
+
hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,
|
|
5
|
+
hexa = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,
|
|
6
|
+
hexOrHexa = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,
|
|
7
|
+
rgb = /^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,
|
|
8
|
+
rgba = /^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/
|
|
9
|
+
|
|
10
|
+
export const testPattern = {
|
|
11
|
+
date: v => /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(v),
|
|
12
|
+
time: v => /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(v),
|
|
13
|
+
fulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(v),
|
|
14
|
+
timeOrFulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(v),
|
|
15
|
+
|
|
16
|
+
hexColor: v => hex.test(v),
|
|
17
|
+
hexaColor: v => hexa.test(v),
|
|
18
|
+
hexOrHexaColor: v => hexOrHexa.test(v),
|
|
19
|
+
|
|
20
|
+
rgbColor: v => rgb.test(v),
|
|
21
|
+
rgbaColor: v => rgba.test(v),
|
|
22
|
+
rgbOrRgbaColor: v => rgb.test(v) || rgba.test(v),
|
|
23
|
+
|
|
24
|
+
hexOrRgbColor: v => hex.test(v) || rgb.test(v),
|
|
25
|
+
hexaOrRgbaColor: v => hexa.test(v) || rgba.test(v),
|
|
26
|
+
anyColor: v => hexOrHexa.test(v) || rgb.test(v) || rgba.test(v)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
testPattern
|
|
31
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { getEventPath, listenOpts, stopAndPrevent } from '../utils/event.js'
|
|
2
|
+
import { hasScrollbar, getVerticalScrollPosition, getHorizontalScrollPosition } from '../utils/scroll.js'
|
|
3
|
+
import { client } from '../plugins/Platform.js'
|
|
4
|
+
|
|
5
|
+
let
|
|
6
|
+
registered = 0,
|
|
7
|
+
scrollPositionX,
|
|
8
|
+
scrollPositionY,
|
|
9
|
+
maxScrollTop,
|
|
10
|
+
vpPendingUpdate = false,
|
|
11
|
+
bodyLeft,
|
|
12
|
+
bodyTop,
|
|
13
|
+
closeTimer
|
|
14
|
+
|
|
15
|
+
function onWheel (e) {
|
|
16
|
+
if (shouldPreventScroll(e)) {
|
|
17
|
+
stopAndPrevent(e)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function shouldPreventScroll (e) {
|
|
22
|
+
if (e.target === document.body || e.target.classList.contains('q-layout__backdrop')) {
|
|
23
|
+
return true
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const
|
|
27
|
+
path = getEventPath(e),
|
|
28
|
+
shift = e.shiftKey && !e.deltaX,
|
|
29
|
+
scrollY = !shift && Math.abs(e.deltaX) <= Math.abs(e.deltaY),
|
|
30
|
+
delta = shift || scrollY ? e.deltaY : e.deltaX
|
|
31
|
+
|
|
32
|
+
for (let index = 0; index < path.length; index++) {
|
|
33
|
+
const el = path[ index ]
|
|
34
|
+
|
|
35
|
+
if (hasScrollbar(el, scrollY)) {
|
|
36
|
+
return scrollY
|
|
37
|
+
? (
|
|
38
|
+
delta < 0 && el.scrollTop === 0
|
|
39
|
+
? true
|
|
40
|
+
: delta > 0 && el.scrollTop + el.clientHeight === el.scrollHeight
|
|
41
|
+
)
|
|
42
|
+
: (
|
|
43
|
+
delta < 0 && el.scrollLeft === 0
|
|
44
|
+
? true
|
|
45
|
+
: delta > 0 && el.scrollLeft + el.clientWidth === el.scrollWidth
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return true
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function onAppleScroll (e) {
|
|
54
|
+
if (e.target === document) {
|
|
55
|
+
// required, otherwise iOS blocks further scrolling
|
|
56
|
+
// until the mobile scrollbar dissappears
|
|
57
|
+
document.scrollingElement.scrollTop = document.scrollingElement.scrollTop // eslint-disable-line
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function onAppleResize (evt) {
|
|
62
|
+
if (vpPendingUpdate === true) {
|
|
63
|
+
return
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
vpPendingUpdate = true
|
|
67
|
+
|
|
68
|
+
requestAnimationFrame(() => {
|
|
69
|
+
vpPendingUpdate = false
|
|
70
|
+
|
|
71
|
+
const
|
|
72
|
+
{ height } = evt.target,
|
|
73
|
+
{ clientHeight, scrollTop } = document.scrollingElement
|
|
74
|
+
|
|
75
|
+
if (maxScrollTop === void 0 || height !== window.innerHeight) {
|
|
76
|
+
maxScrollTop = clientHeight - height
|
|
77
|
+
document.scrollingElement.scrollTop = scrollTop
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (scrollTop > maxScrollTop) {
|
|
81
|
+
document.scrollingElement.scrollTop -= Math.ceil((scrollTop - maxScrollTop) / 8)
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function apply (action) {
|
|
87
|
+
const
|
|
88
|
+
body = document.body,
|
|
89
|
+
hasViewport = window.visualViewport !== void 0
|
|
90
|
+
|
|
91
|
+
if (action === 'add') {
|
|
92
|
+
const { overflowY, overflowX } = window.getComputedStyle(body)
|
|
93
|
+
|
|
94
|
+
scrollPositionX = getHorizontalScrollPosition(window)
|
|
95
|
+
scrollPositionY = getVerticalScrollPosition(window)
|
|
96
|
+
bodyLeft = body.style.left
|
|
97
|
+
bodyTop = body.style.top
|
|
98
|
+
|
|
99
|
+
body.style.left = `-${ scrollPositionX }px`
|
|
100
|
+
body.style.top = `-${ scrollPositionY }px`
|
|
101
|
+
|
|
102
|
+
if (overflowX !== 'hidden' && (overflowX === 'scroll' || body.scrollWidth > window.innerWidth)) {
|
|
103
|
+
body.classList.add('q-body--force-scrollbar-x')
|
|
104
|
+
}
|
|
105
|
+
if (overflowY !== 'hidden' && (overflowY === 'scroll' || body.scrollHeight > window.innerHeight)) {
|
|
106
|
+
body.classList.add('q-body--force-scrollbar-y')
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
body.classList.add('q-body--prevent-scroll')
|
|
110
|
+
document.qScrollPrevented = true
|
|
111
|
+
if (client.is.ios === true) {
|
|
112
|
+
if (hasViewport === true) {
|
|
113
|
+
window.scrollTo(0, 0)
|
|
114
|
+
window.visualViewport.addEventListener('resize', onAppleResize, listenOpts.passiveCapture)
|
|
115
|
+
window.visualViewport.addEventListener('scroll', onAppleResize, listenOpts.passiveCapture)
|
|
116
|
+
window.scrollTo(0, 0)
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
window.addEventListener('scroll', onAppleScroll, listenOpts.passiveCapture)
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (client.is.desktop === true && client.is.mac === true) {
|
|
125
|
+
// ref. https://developers.google.com/web/updates/2017/01/scrolling-intervention
|
|
126
|
+
window[ `${ action }EventListener` ]('wheel', onWheel, listenOpts.notPassive)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (action === 'remove') {
|
|
130
|
+
if (client.is.ios === true) {
|
|
131
|
+
if (hasViewport === true) {
|
|
132
|
+
window.visualViewport.removeEventListener('resize', onAppleResize, listenOpts.passiveCapture)
|
|
133
|
+
window.visualViewport.removeEventListener('scroll', onAppleResize, listenOpts.passiveCapture)
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
window.removeEventListener('scroll', onAppleScroll, listenOpts.passiveCapture)
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
body.classList.remove('q-body--prevent-scroll')
|
|
141
|
+
body.classList.remove('q-body--force-scrollbar-x')
|
|
142
|
+
body.classList.remove('q-body--force-scrollbar-y')
|
|
143
|
+
|
|
144
|
+
document.qScrollPrevented = false
|
|
145
|
+
|
|
146
|
+
body.style.left = bodyLeft
|
|
147
|
+
body.style.top = bodyTop
|
|
148
|
+
|
|
149
|
+
window.scrollTo(scrollPositionX, scrollPositionY)
|
|
150
|
+
maxScrollTop = void 0
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export default function (state) {
|
|
155
|
+
let action = 'add'
|
|
156
|
+
|
|
157
|
+
if (state === true) {
|
|
158
|
+
registered++
|
|
159
|
+
|
|
160
|
+
if (closeTimer !== void 0) {
|
|
161
|
+
clearTimeout(closeTimer)
|
|
162
|
+
closeTimer = void 0
|
|
163
|
+
return
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (registered > 1) {
|
|
167
|
+
return
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
if (registered === 0) {
|
|
172
|
+
return
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
registered--
|
|
176
|
+
|
|
177
|
+
if (registered > 0) {
|
|
178
|
+
return
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
action = 'remove'
|
|
182
|
+
|
|
183
|
+
if (client.is.ios === true && client.is.nativeMobile === true) {
|
|
184
|
+
clearTimeout(closeTimer)
|
|
185
|
+
|
|
186
|
+
closeTimer = setTimeout(() => {
|
|
187
|
+
apply(action)
|
|
188
|
+
closeTimer = void 0
|
|
189
|
+
}, 100)
|
|
190
|
+
return
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
apply(action)
|
|
195
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { listenOpts } from '../event.js'
|
|
2
|
+
|
|
3
|
+
let timer
|
|
4
|
+
|
|
5
|
+
const
|
|
6
|
+
{ notPassiveCapture } = listenOpts,
|
|
7
|
+
registeredList = []
|
|
8
|
+
|
|
9
|
+
function hasModalsAbove (node) {
|
|
10
|
+
while ((node = node.nextElementSibling) !== null) {
|
|
11
|
+
if (node.classList.contains('q-dialog--modal')) {
|
|
12
|
+
return true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return false
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function globalHandler (evt) {
|
|
20
|
+
clearTimeout(timer)
|
|
21
|
+
|
|
22
|
+
const target = evt.target
|
|
23
|
+
|
|
24
|
+
if (
|
|
25
|
+
target === void 0
|
|
26
|
+
|| target.nodeType === 8
|
|
27
|
+
|| target.classList.contains('no-pointer-events') === true
|
|
28
|
+
) {
|
|
29
|
+
return
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
for (let i = registeredList.length - 1; i >= 0; i--) {
|
|
33
|
+
const state = registeredList[ i ]
|
|
34
|
+
if (
|
|
35
|
+
(
|
|
36
|
+
state.anchorEl.value === null
|
|
37
|
+
|| state.anchorEl.value.contains(target) === false
|
|
38
|
+
)
|
|
39
|
+
&& (
|
|
40
|
+
target === document.body
|
|
41
|
+
|| (state.innerRef.value !== null && state.innerRef.value.contains(target) === false)
|
|
42
|
+
)
|
|
43
|
+
&& (
|
|
44
|
+
state.getEl !== void 0
|
|
45
|
+
? hasModalsAbove(state.getEl()) !== true
|
|
46
|
+
: true
|
|
47
|
+
)
|
|
48
|
+
) {
|
|
49
|
+
// mark the event as being processed by clickOutside
|
|
50
|
+
// used to prevent refocus after menu close
|
|
51
|
+
evt.qClickOutside = true
|
|
52
|
+
state.onClickOutside(evt)
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function addClickOutside (clickOutsideProps) {
|
|
61
|
+
registeredList.push(clickOutsideProps)
|
|
62
|
+
|
|
63
|
+
if (registeredList.length === 1) {
|
|
64
|
+
document.addEventListener('mousedown', globalHandler, notPassiveCapture)
|
|
65
|
+
document.addEventListener('touchstart', globalHandler, notPassiveCapture)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function removeClickOutside (clickOutsideProps) {
|
|
70
|
+
const index = registeredList.findIndex(h => h === clickOutsideProps)
|
|
71
|
+
|
|
72
|
+
if (index > -1) {
|
|
73
|
+
registeredList.splice(index, 1)
|
|
74
|
+
|
|
75
|
+
if (registeredList.length === 0) {
|
|
76
|
+
clearTimeout(timer)
|
|
77
|
+
document.removeEventListener('mousedown', globalHandler, notPassiveCapture)
|
|
78
|
+
document.removeEventListener('touchstart', globalHandler, notPassiveCapture)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// taken from https://github.com/jalaali/jalaali-js
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Jalaali years starting the 33-year rule.
|
|
5
|
+
*/
|
|
6
|
+
const breaks = [
|
|
7
|
+
-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210,
|
|
8
|
+
1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
Converts a Gregorian date to Jalaali.
|
|
13
|
+
*/
|
|
14
|
+
export function toJalaali (gy, gm, gd) {
|
|
15
|
+
if (Object.prototype.toString.call(gy) === '[object Date]') {
|
|
16
|
+
gd = gy.getDate()
|
|
17
|
+
gm = gy.getMonth() + 1
|
|
18
|
+
gy = gy.getFullYear()
|
|
19
|
+
}
|
|
20
|
+
return d2j(g2d(gy, gm, gd))
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
Converts a Jalaali date to Gregorian.
|
|
25
|
+
*/
|
|
26
|
+
export function toGregorian (jy, jm, jd) {
|
|
27
|
+
return d2g(j2d(jy, jm, jd))
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
Checks whether a Jalaali date is valid or not.
|
|
32
|
+
*/
|
|
33
|
+
export function isValidJalaaliDate (jy, jm, jd) {
|
|
34
|
+
return jy >= -61 && jy <= 3177
|
|
35
|
+
&& jm >= 1 && jm <= 12
|
|
36
|
+
&& jd >= 1 && jd <= jalaaliMonthLength(jy, jm)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
Is this a leap year or not?
|
|
41
|
+
*/
|
|
42
|
+
function isLeapJalaaliYear (jy) {
|
|
43
|
+
return jalCalLeap(jy) === 0
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/*
|
|
47
|
+
Number of days in a given month in a Jalaali year.
|
|
48
|
+
*/
|
|
49
|
+
export function jalaaliMonthLength (jy, jm) {
|
|
50
|
+
if (jm <= 6) return 31
|
|
51
|
+
if (jm <= 11) return 30
|
|
52
|
+
if (isLeapJalaaliYear(jy)) return 30
|
|
53
|
+
return 29
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
This function determines if the Jalaali (Persian) year is
|
|
58
|
+
leap (366-day long) or is the common year (365 days)
|
|
59
|
+
|
|
60
|
+
@param jy Jalaali calendar year (-61 to 3177)
|
|
61
|
+
@returns number of years since the last leap year (0 to 4)
|
|
62
|
+
*/
|
|
63
|
+
function jalCalLeap (jy) {
|
|
64
|
+
const bl = breaks.length
|
|
65
|
+
let
|
|
66
|
+
jp = breaks[ 0 ],
|
|
67
|
+
jm,
|
|
68
|
+
jump,
|
|
69
|
+
leap,
|
|
70
|
+
n,
|
|
71
|
+
i
|
|
72
|
+
|
|
73
|
+
if (jy < jp || jy >= breaks[ bl - 1 ]) { throw new Error('Invalid Jalaali year ' + jy) }
|
|
74
|
+
|
|
75
|
+
for (i = 1; i < bl; i += 1) {
|
|
76
|
+
jm = breaks[ i ]
|
|
77
|
+
jump = jm - jp
|
|
78
|
+
if (jy < jm) { break }
|
|
79
|
+
jp = jm
|
|
80
|
+
}
|
|
81
|
+
n = jy - jp
|
|
82
|
+
|
|
83
|
+
if (jump - n < 6) { n = n - jump + div(jump + 4, 33) * 33 }
|
|
84
|
+
leap = mod(mod(n + 1, 33) - 1, 4)
|
|
85
|
+
if (leap === -1) {
|
|
86
|
+
leap = 4
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return leap
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/*
|
|
93
|
+
This function determines if the Jalaali (Persian) year is
|
|
94
|
+
leap (366-day long) or is the common year (365 days), and
|
|
95
|
+
finds the day in March (Gregorian calendar) of the first
|
|
96
|
+
day of the Jalaali year (jy).
|
|
97
|
+
|
|
98
|
+
@param jy Jalaali calendar year (-61 to 3177)
|
|
99
|
+
@param withoutLeap when don't need leap (true or false) default is false
|
|
100
|
+
@return
|
|
101
|
+
leap: number of years since the last leap year (0 to 4)
|
|
102
|
+
gy: Gregorian year of the beginning of Jalaali year
|
|
103
|
+
march: the March day of Farvardin the 1st (1st day of jy)
|
|
104
|
+
@see: http://www.astro.uni.torun.pl/~kb/Papers/EMP/PersianC-EMP.htm
|
|
105
|
+
@see: http://www.fourmilab.ch/documents/calendar/
|
|
106
|
+
*/
|
|
107
|
+
function jalCal (jy, withoutLeap) {
|
|
108
|
+
const
|
|
109
|
+
bl = breaks.length,
|
|
110
|
+
gy = jy + 621
|
|
111
|
+
let
|
|
112
|
+
leapJ = -14,
|
|
113
|
+
jp = breaks[ 0 ],
|
|
114
|
+
jm,
|
|
115
|
+
jump,
|
|
116
|
+
leap,
|
|
117
|
+
n,
|
|
118
|
+
i
|
|
119
|
+
|
|
120
|
+
if (jy < jp || jy >= breaks[ bl - 1 ]) { throw new Error('Invalid Jalaali year ' + jy) }
|
|
121
|
+
|
|
122
|
+
// Find the limiting years for the Jalaali year jy.
|
|
123
|
+
for (i = 1; i < bl; i += 1) {
|
|
124
|
+
jm = breaks[ i ]
|
|
125
|
+
jump = jm - jp
|
|
126
|
+
if (jy < jm) { break }
|
|
127
|
+
leapJ = leapJ + div(jump, 33) * 8 + div(mod(jump, 33), 4)
|
|
128
|
+
jp = jm
|
|
129
|
+
}
|
|
130
|
+
n = jy - jp
|
|
131
|
+
|
|
132
|
+
// Find the number of leap years from AD 621 to the beginning
|
|
133
|
+
// of the current Jalaali year in the Persian calendar.
|
|
134
|
+
leapJ = leapJ + div(n, 33) * 8 + div(mod(n, 33) + 3, 4)
|
|
135
|
+
if (mod(jump, 33) === 4 && jump - n === 4) { leapJ += 1 }
|
|
136
|
+
|
|
137
|
+
// And the same in the Gregorian calendar (until the year gy).
|
|
138
|
+
const leapG = div(gy, 4) - div((div(gy, 100) + 1) * 3, 4) - 150
|
|
139
|
+
|
|
140
|
+
// Determine the Gregorian date of Farvardin the 1st.
|
|
141
|
+
const march = 20 + leapJ - leapG
|
|
142
|
+
|
|
143
|
+
// Find how many years have passed since the last leap year.
|
|
144
|
+
if (!withoutLeap) {
|
|
145
|
+
if (jump - n < 6) { n = n - jump + div(jump + 4, 33) * 33 }
|
|
146
|
+
leap = mod(mod(n + 1, 33) - 1, 4)
|
|
147
|
+
if (leap === -1) {
|
|
148
|
+
leap = 4
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return {
|
|
153
|
+
leap: leap,
|
|
154
|
+
gy: gy,
|
|
155
|
+
march: march
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/*
|
|
160
|
+
Converts a date of the Jalaali calendar to the Julian Day number.
|
|
161
|
+
|
|
162
|
+
@param jy Jalaali year (1 to 3100)
|
|
163
|
+
@param jm Jalaali month (1 to 12)
|
|
164
|
+
@param jd Jalaali day (1 to 29/31)
|
|
165
|
+
@return Julian Day number
|
|
166
|
+
*/
|
|
167
|
+
function j2d (jy, jm, jd) {
|
|
168
|
+
const r = jalCal(jy, true)
|
|
169
|
+
return g2d(r.gy, 3, r.march) + (jm - 1) * 31 - div(jm, 7) * (jm - 7) + jd - 1
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/*
|
|
173
|
+
Converts the Julian Day number to a date in the Jalaali calendar.
|
|
174
|
+
|
|
175
|
+
@param jdn Julian Day number
|
|
176
|
+
@return
|
|
177
|
+
jy: Jalaali year (1 to 3100)
|
|
178
|
+
jm: Jalaali month (1 to 12)
|
|
179
|
+
jd: Jalaali day (1 to 29/31)
|
|
180
|
+
*/
|
|
181
|
+
function d2j (jdn) {
|
|
182
|
+
const gy = d2g(jdn).gy // Calculate Gregorian year (gy).
|
|
183
|
+
let
|
|
184
|
+
jy = gy - 621,
|
|
185
|
+
jd,
|
|
186
|
+
jm,
|
|
187
|
+
k
|
|
188
|
+
const
|
|
189
|
+
r = jalCal(jy, false),
|
|
190
|
+
jdn1f = g2d(gy, 3, r.march)
|
|
191
|
+
|
|
192
|
+
// Find number of days that passed since 1 Farvardin.
|
|
193
|
+
k = jdn - jdn1f
|
|
194
|
+
if (k >= 0) {
|
|
195
|
+
if (k <= 185) {
|
|
196
|
+
// The first 6 months.
|
|
197
|
+
jm = 1 + div(k, 31)
|
|
198
|
+
jd = mod(k, 31) + 1
|
|
199
|
+
return {
|
|
200
|
+
jy: jy,
|
|
201
|
+
jm: jm,
|
|
202
|
+
jd: jd
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
// The remaining months.
|
|
207
|
+
k -= 186
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
// Previous Jalaali year.
|
|
212
|
+
jy -= 1
|
|
213
|
+
k += 179
|
|
214
|
+
if (r.leap === 1) { k += 1 }
|
|
215
|
+
}
|
|
216
|
+
jm = 7 + div(k, 30)
|
|
217
|
+
jd = mod(k, 30) + 1
|
|
218
|
+
return {
|
|
219
|
+
jy: jy,
|
|
220
|
+
jm: jm,
|
|
221
|
+
jd: jd
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/*
|
|
226
|
+
Calculates the Julian Day number from Gregorian or Julian
|
|
227
|
+
calendar dates. This integer number corresponds to the noon of
|
|
228
|
+
the date (i.e. 12 hours of Universal Time).
|
|
229
|
+
The procedure was tested to be good since 1 March, -100100 (of both
|
|
230
|
+
calendars) up to a few million years into the future.
|
|
231
|
+
|
|
232
|
+
@param gy Calendar year (years BC numbered 0, -1, -2, ...)
|
|
233
|
+
@param gm Calendar month (1 to 12)
|
|
234
|
+
@param gd Calendar day of the month (1 to 28/29/30/31)
|
|
235
|
+
@return Julian Day number
|
|
236
|
+
*/
|
|
237
|
+
function g2d (gy, gm, gd) {
|
|
238
|
+
let d = div((gy + div(gm - 8, 6) + 100100) * 1461, 4)
|
|
239
|
+
+ div(153 * mod(gm + 9, 12) + 2, 5)
|
|
240
|
+
+ gd - 34840408
|
|
241
|
+
d = d - div(div(gy + 100100 + div(gm - 8, 6), 100) * 3, 4) + 752
|
|
242
|
+
return d
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/*
|
|
246
|
+
Calculates Gregorian and Julian calendar dates from the Julian Day number
|
|
247
|
+
(jdn) for the period since jdn=-34839655 (i.e. the year -100100 of both
|
|
248
|
+
calendars) to some millions years ahead of the present.
|
|
249
|
+
|
|
250
|
+
@param jdn Julian Day number
|
|
251
|
+
@return
|
|
252
|
+
gy: Calendar year (years BC numbered 0, -1, -2, ...)
|
|
253
|
+
gm: Calendar month (1 to 12)
|
|
254
|
+
gd: Calendar day of the month M (1 to 28/29/30/31)
|
|
255
|
+
*/
|
|
256
|
+
function d2g (jdn) {
|
|
257
|
+
let j = 4 * jdn + 139361631
|
|
258
|
+
j = j + div(div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908
|
|
259
|
+
const
|
|
260
|
+
i = div(mod(j, 1461), 4) * 5 + 308,
|
|
261
|
+
gd = div(mod(i, 153), 5) + 1,
|
|
262
|
+
gm = mod(div(i, 153), 12) + 1,
|
|
263
|
+
gy = div(j, 1461) - 100100 + div(8 - gm, 6)
|
|
264
|
+
return {
|
|
265
|
+
gy: gy,
|
|
266
|
+
gm: gm,
|
|
267
|
+
gd: gd
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/*
|
|
272
|
+
Utility helper functions.
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
function div (a, b) {
|
|
276
|
+
return ~~(a / b)
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function mod (a, b) {
|
|
280
|
+
return a - ~~(a / b) * b
|
|
281
|
+
}
|