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,22 @@
|
|
|
1
|
+
export default function (fn) {
|
|
2
|
+
let wait = false, frame, callArgs
|
|
3
|
+
|
|
4
|
+
function debounced (/* ...args */) {
|
|
5
|
+
callArgs = arguments
|
|
6
|
+
if (wait === true) { return }
|
|
7
|
+
|
|
8
|
+
wait = true
|
|
9
|
+
frame = requestAnimationFrame(() => {
|
|
10
|
+
fn.apply(this, callArgs)
|
|
11
|
+
callArgs = void 0
|
|
12
|
+
wait = false
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
debounced.cancel = () => {
|
|
17
|
+
window.cancelAnimationFrame(frame)
|
|
18
|
+
wait = false
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return debounced
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
export default function getCssVar (propName, element = document.body) {
|
|
3
|
+
if (typeof propName !== 'string') {
|
|
4
|
+
throw new TypeError('Expected a string as propName')
|
|
5
|
+
}
|
|
6
|
+
if (!(element instanceof Element)) {
|
|
7
|
+
throw new TypeError('Expected a DOM element')
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return getComputedStyle(element).getPropertyValue(`--q-${ propName }`).trim() || null
|
|
11
|
+
}
|
|
@@ -0,0 +1,987 @@
|
|
|
1
|
+
let id = 0
|
|
2
|
+
let offsetBase = void 0
|
|
3
|
+
|
|
4
|
+
function getAbsolutePosition (el, resize) {
|
|
5
|
+
if (offsetBase === void 0) {
|
|
6
|
+
offsetBase = document.createElement('div')
|
|
7
|
+
offsetBase.style.cssText = 'position: absolute; left: 0; top: 0'
|
|
8
|
+
document.body.appendChild(offsetBase)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const boundingRect = el.getBoundingClientRect()
|
|
12
|
+
const baseRect = offsetBase.getBoundingClientRect()
|
|
13
|
+
const { marginLeft, marginRight, marginTop, marginBottom } = window.getComputedStyle(el)
|
|
14
|
+
const marginH = parseInt(marginLeft, 10) + parseInt(marginRight, 10)
|
|
15
|
+
const marginV = parseInt(marginTop, 10) + parseInt(marginBottom, 10)
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
left: boundingRect.left - baseRect.left,
|
|
19
|
+
top: boundingRect.top - baseRect.top,
|
|
20
|
+
width: boundingRect.right - boundingRect.left,
|
|
21
|
+
height: boundingRect.bottom - boundingRect.top,
|
|
22
|
+
widthM: boundingRect.right - boundingRect.left + (resize === true ? 0 : marginH),
|
|
23
|
+
heightM: boundingRect.bottom - boundingRect.top + (resize === true ? 0 : marginV),
|
|
24
|
+
marginH: resize === true ? marginH : 0,
|
|
25
|
+
marginV: resize === true ? marginV : 0
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function getAbsoluteSize (el) {
|
|
30
|
+
return {
|
|
31
|
+
width: el.scrollWidth,
|
|
32
|
+
height: el.scrollHeight
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// firefox rulez
|
|
37
|
+
const styleEdges = [ 'Top', 'Right', 'Bottom', 'Left' ]
|
|
38
|
+
const styleBorderRadiuses = [ 'borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius' ]
|
|
39
|
+
const reStyleSkipKey = /-block|-inline|block-|inline-/
|
|
40
|
+
const reStyleSkipRule = /(-block|-inline|block-|inline-).*:/
|
|
41
|
+
|
|
42
|
+
function getComputedStyle (el, props) {
|
|
43
|
+
const style = window.getComputedStyle(el)
|
|
44
|
+
const fixed = {}
|
|
45
|
+
for (let i = 0; i < props.length; i++) {
|
|
46
|
+
const prop = props[ i ]
|
|
47
|
+
|
|
48
|
+
if (style[ prop ] === '') {
|
|
49
|
+
if (prop === 'cssText') {
|
|
50
|
+
const styleLen = style.length
|
|
51
|
+
let val = ''
|
|
52
|
+
|
|
53
|
+
for (let i = 0; i < styleLen; i++) {
|
|
54
|
+
if (reStyleSkipKey.test(style[ i ]) !== true) {
|
|
55
|
+
val += style[ i ] + ': ' + style[ style[ i ] ] + '; '
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
fixed[ prop ] = val
|
|
60
|
+
}
|
|
61
|
+
else if ([ 'borderWidth', 'borderStyle', 'borderColor' ].indexOf(prop) > -1) {
|
|
62
|
+
const suffix = prop.replace('border', '')
|
|
63
|
+
let val = ''
|
|
64
|
+
for (let j = 0; j < styleEdges.length; j++) {
|
|
65
|
+
const subProp = 'border' + styleEdges[ j ] + suffix
|
|
66
|
+
val += style[ subProp ] + ' '
|
|
67
|
+
}
|
|
68
|
+
fixed[ prop ] = val
|
|
69
|
+
}
|
|
70
|
+
else if (prop === 'borderRadius') {
|
|
71
|
+
let val1 = ''
|
|
72
|
+
let val2 = ''
|
|
73
|
+
for (let j = 0; j < styleBorderRadiuses.length; j++) {
|
|
74
|
+
const val = style[ styleBorderRadiuses[ j ] ].split(' ')
|
|
75
|
+
val1 += val[ 0 ] + ' '
|
|
76
|
+
val2 += (val[ 1 ] === void 0 ? val[ 0 ] : val[ 1 ]) + ' '
|
|
77
|
+
}
|
|
78
|
+
fixed[ prop ] = val1 + '/ ' + val2
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
fixed[ prop ] = style[ prop ]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
if (prop === 'cssText') {
|
|
86
|
+
fixed[ prop ] = style[ prop ]
|
|
87
|
+
.split(';')
|
|
88
|
+
.filter(val => reStyleSkipRule.test(val) !== true)
|
|
89
|
+
.join(';')
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
fixed[ prop ] = style[ prop ]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return fixed
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const zIndexPositions = [ 'absolute', 'fixed', 'relative', 'sticky' ]
|
|
101
|
+
|
|
102
|
+
function getMaxZIndex (elStart) {
|
|
103
|
+
let el = elStart
|
|
104
|
+
let maxIndex = 0
|
|
105
|
+
|
|
106
|
+
while (el !== null && el !== document) {
|
|
107
|
+
const { position, zIndex } = window.getComputedStyle(el)
|
|
108
|
+
const zIndexNum = Number(zIndex)
|
|
109
|
+
|
|
110
|
+
if (
|
|
111
|
+
zIndexNum > maxIndex
|
|
112
|
+
&& (el === elStart || zIndexPositions.includes(position) === true)
|
|
113
|
+
) {
|
|
114
|
+
maxIndex = zIndexNum
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
el = el.parentNode
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return maxIndex
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function normalizeElements (opts) {
|
|
124
|
+
return {
|
|
125
|
+
from: opts.from,
|
|
126
|
+
to: opts.to !== void 0
|
|
127
|
+
? opts.to
|
|
128
|
+
: opts.from
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function normalizeOptions (options) {
|
|
133
|
+
if (typeof options === 'number') {
|
|
134
|
+
options = {
|
|
135
|
+
duration: options
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else if (typeof options === 'function') {
|
|
139
|
+
options = {
|
|
140
|
+
onEnd: options
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
...options,
|
|
146
|
+
|
|
147
|
+
waitFor: options.waitFor === void 0 ? 0 : options.waitFor,
|
|
148
|
+
|
|
149
|
+
duration: isNaN(options.duration) === true ? 300 : parseInt(options.duration, 10),
|
|
150
|
+
easing: typeof options.easing === 'string' && options.easing.length > 0 ? options.easing : 'ease-in-out',
|
|
151
|
+
delay: isNaN(options.delay) === true ? 0 : parseInt(options.delay, 10),
|
|
152
|
+
fill: typeof options.fill === 'string' && options.fill.length > 0 ? options.fill : 'none',
|
|
153
|
+
|
|
154
|
+
resize: options.resize === true,
|
|
155
|
+
useCSS: options.useCSS === true,
|
|
156
|
+
hideFromClone: options.hideFromClone === true,
|
|
157
|
+
keepToClone: options.keepToClone === true,
|
|
158
|
+
|
|
159
|
+
tween: options.tween === true,
|
|
160
|
+
tweenFromOpacity: isNaN(options.tweenFromOpacity) === true ? 0.6 : parseFloat(options.tweenFromOpacity),
|
|
161
|
+
tweenToOpacity: isNaN(options.tweenToOpacity) === true ? 0.5 : parseFloat(options.tweenToOpacity)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function getElement (element) {
|
|
166
|
+
const type = typeof element
|
|
167
|
+
|
|
168
|
+
return type === 'function'
|
|
169
|
+
? element()
|
|
170
|
+
: (
|
|
171
|
+
type === 'string'
|
|
172
|
+
? document.querySelector(element)
|
|
173
|
+
: element
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function isValidElement (element) {
|
|
178
|
+
return element
|
|
179
|
+
&& element.ownerDocument === document
|
|
180
|
+
&& element.parentNode !== null
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export default function morph (_options) {
|
|
184
|
+
let cancel = () => false
|
|
185
|
+
let cancelStatus = false
|
|
186
|
+
let endElementTo = true
|
|
187
|
+
|
|
188
|
+
const elements = normalizeElements(_options)
|
|
189
|
+
const options = normalizeOptions(_options)
|
|
190
|
+
|
|
191
|
+
const elFrom = getElement(elements.from)
|
|
192
|
+
if (isValidElement(elFrom) !== true) {
|
|
193
|
+
// we return a cancel function that return false, meaning the cancel function failed
|
|
194
|
+
return cancel
|
|
195
|
+
}
|
|
196
|
+
// we clean other morphs running on this element
|
|
197
|
+
typeof elFrom.qMorphCancel === 'function' && elFrom.qMorphCancel()
|
|
198
|
+
|
|
199
|
+
let animationFromClone = void 0
|
|
200
|
+
let animationFromTween = void 0
|
|
201
|
+
let animationToClone = void 0
|
|
202
|
+
let animationTo = void 0
|
|
203
|
+
|
|
204
|
+
const elFromParent = elFrom.parentNode
|
|
205
|
+
const elFromNext = elFrom.nextElementSibling
|
|
206
|
+
|
|
207
|
+
// we get the dimensions and characteristics
|
|
208
|
+
// of the parent of the initial element before changes
|
|
209
|
+
const elFromPosition = getAbsolutePosition(elFrom, options.resize)
|
|
210
|
+
const {
|
|
211
|
+
width: elFromParentWidthBefore,
|
|
212
|
+
height: elFromParentHeightBefore
|
|
213
|
+
} = getAbsoluteSize(elFromParent)
|
|
214
|
+
const {
|
|
215
|
+
borderWidth: elFromBorderWidth,
|
|
216
|
+
borderStyle: elFromBorderStyle,
|
|
217
|
+
borderColor: elFromBorderColor,
|
|
218
|
+
borderRadius: elFromBorderRadius,
|
|
219
|
+
backgroundColor: elFromBackground,
|
|
220
|
+
transform: elFromTransform,
|
|
221
|
+
position: elFromPositioningType,
|
|
222
|
+
cssText: elFromCssText
|
|
223
|
+
} = getComputedStyle(elFrom, [ 'borderWidth', 'borderStyle', 'borderColor', 'borderRadius', 'backgroundColor', 'transform', 'position', 'cssText' ])
|
|
224
|
+
const elFromClassSaved = elFrom.classList.toString()
|
|
225
|
+
const elFromStyleSaved = elFrom.style.cssText
|
|
226
|
+
|
|
227
|
+
// we make a clone of the initial element and
|
|
228
|
+
// use it to display until the final element is ready
|
|
229
|
+
// and to change the occupied space during animation
|
|
230
|
+
const elFromClone = elFrom.cloneNode(true)
|
|
231
|
+
const elFromTween = options.tween === true ? elFrom.cloneNode(true) : void 0
|
|
232
|
+
|
|
233
|
+
if (elFromTween !== void 0) {
|
|
234
|
+
elFromTween.className = elFromTween.classList.toString().split(' ').filter(c => /^bg-/.test(c) === false).join(' ')
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// if the initial element is not going to be removed do not show the placeholder
|
|
238
|
+
options.hideFromClone === true && elFromClone.classList.add('q-morph--internal')
|
|
239
|
+
|
|
240
|
+
// prevent interaction with placeholder
|
|
241
|
+
elFromClone.setAttribute('aria-hidden', 'true')
|
|
242
|
+
elFromClone.style.transition = 'none'
|
|
243
|
+
elFromClone.style.animation = 'none'
|
|
244
|
+
elFromClone.style.pointerEvents = 'none'
|
|
245
|
+
elFromParent.insertBefore(elFromClone, elFromNext)
|
|
246
|
+
|
|
247
|
+
// we mark the element with its cleanup function
|
|
248
|
+
elFrom.qMorphCancel = () => {
|
|
249
|
+
cancelStatus = true
|
|
250
|
+
|
|
251
|
+
// we clean the clone of the initial element
|
|
252
|
+
elFromClone.remove()
|
|
253
|
+
elFromTween !== void 0 && elFromTween.remove()
|
|
254
|
+
|
|
255
|
+
options.hideFromClone === true && elFromClone.classList.remove('q-morph--internal')
|
|
256
|
+
|
|
257
|
+
// we remove the cleanup function from the element
|
|
258
|
+
elFrom.qMorphCancel = void 0
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// will be called after Vue catches up with the changes done by _options.onToggle() function
|
|
262
|
+
const calculateFinalState = () => {
|
|
263
|
+
const elTo = getElement(elements.to)
|
|
264
|
+
if (cancelStatus === true || isValidElement(elTo) !== true) {
|
|
265
|
+
typeof elFrom.qMorphCancel === 'function' && elFrom.qMorphCancel()
|
|
266
|
+
|
|
267
|
+
return
|
|
268
|
+
}
|
|
269
|
+
// we clean other morphs running on this element
|
|
270
|
+
elFrom !== elTo && typeof elTo.qMorphCancel === 'function' && elTo.qMorphCancel()
|
|
271
|
+
|
|
272
|
+
// we hide the final element and the clone of the initial element
|
|
273
|
+
// we don't hide the final element if we want both it and the animated one visible
|
|
274
|
+
options.keepToClone !== true && elTo.classList.add('q-morph--internal')
|
|
275
|
+
elFromClone.classList.add('q-morph--internal')
|
|
276
|
+
|
|
277
|
+
// we get the dimensions of the parent of the initial element after changes
|
|
278
|
+
// the difference is how much we should animate the clone
|
|
279
|
+
const {
|
|
280
|
+
width: elFromParentWidthAfter,
|
|
281
|
+
height: elFromParentHeightAfter
|
|
282
|
+
} = getAbsoluteSize(elFromParent)
|
|
283
|
+
|
|
284
|
+
// we get the dimensions of the parent of the final element before changes
|
|
285
|
+
const {
|
|
286
|
+
width: elToParentWidthBefore,
|
|
287
|
+
height: elToParentHeightBefore
|
|
288
|
+
} = getAbsoluteSize(elTo.parentNode)
|
|
289
|
+
|
|
290
|
+
// then we show the clone of the initial element if we don't want it hidden
|
|
291
|
+
options.hideFromClone !== true && elFromClone.classList.remove('q-morph--internal')
|
|
292
|
+
|
|
293
|
+
// we mark the element with its cleanup function
|
|
294
|
+
elTo.qMorphCancel = () => {
|
|
295
|
+
cancelStatus = true
|
|
296
|
+
|
|
297
|
+
// we clean the clone of the initial element
|
|
298
|
+
elFromClone.remove()
|
|
299
|
+
elFromTween !== void 0 && elFromTween.remove()
|
|
300
|
+
|
|
301
|
+
options.hideFromClone === true && elFromClone.classList.remove('q-morph--internal')
|
|
302
|
+
|
|
303
|
+
// we show the final element
|
|
304
|
+
options.keepToClone !== true && elTo.classList.remove('q-morph--internal')
|
|
305
|
+
|
|
306
|
+
// we remove the cleanup function from the elements
|
|
307
|
+
elFrom.qMorphCancel = void 0
|
|
308
|
+
elTo.qMorphCancel = void 0
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// will be called after waitFor (give time to render the final element)
|
|
312
|
+
const animate = () => {
|
|
313
|
+
if (cancelStatus === true) {
|
|
314
|
+
typeof elTo.qMorphCancel === 'function' && elTo.qMorphCancel()
|
|
315
|
+
|
|
316
|
+
return
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// now the animation starts, so we only need the clone
|
|
320
|
+
// of the initial element as a spacer
|
|
321
|
+
// we also hide it to calculate the dimensions of the
|
|
322
|
+
// parent of the final element after the changes
|
|
323
|
+
if (options.hideFromClone !== true) {
|
|
324
|
+
elFromClone.classList.add('q-morph--internal')
|
|
325
|
+
elFromClone.innerHTML = ''
|
|
326
|
+
elFromClone.style.left = 0
|
|
327
|
+
elFromClone.style.right = 'unset'
|
|
328
|
+
elFromClone.style.top = 0
|
|
329
|
+
elFromClone.style.bottom = 'unset'
|
|
330
|
+
elFromClone.style.transform = 'none'
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// we show the final element
|
|
334
|
+
if (options.keepToClone !== true) {
|
|
335
|
+
elTo.classList.remove('q-morph--internal')
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// we get the dimensions of the parent of the final element after changes
|
|
339
|
+
// the difference is how much we should animate the clone
|
|
340
|
+
const elToParent = elTo.parentNode
|
|
341
|
+
const {
|
|
342
|
+
width: elToParentWidthAfter,
|
|
343
|
+
height: elToParentHeightAfter
|
|
344
|
+
} = getAbsoluteSize(elToParent)
|
|
345
|
+
|
|
346
|
+
const elToClone = elTo.cloneNode(options.keepToClone)
|
|
347
|
+
elToClone.setAttribute('aria-hidden', 'true')
|
|
348
|
+
if (options.keepToClone !== true) {
|
|
349
|
+
elToClone.style.left = 0
|
|
350
|
+
elToClone.style.right = 'unset'
|
|
351
|
+
elToClone.style.top = 0
|
|
352
|
+
elToClone.style.bottom = 'unset'
|
|
353
|
+
elToClone.style.transform = 'none'
|
|
354
|
+
elToClone.style.pointerEvents = 'none'
|
|
355
|
+
}
|
|
356
|
+
elToClone.classList.add('q-morph--internal')
|
|
357
|
+
|
|
358
|
+
// if elFrom is the same as elTo the next element is elFromClone
|
|
359
|
+
const elToNext = elTo === elFrom && elFromParent === elToParent ? elFromClone : elTo.nextElementSibling
|
|
360
|
+
elToParent.insertBefore(elToClone, elToNext)
|
|
361
|
+
|
|
362
|
+
const {
|
|
363
|
+
borderWidth: elToBorderWidth,
|
|
364
|
+
borderStyle: elToBorderStyle,
|
|
365
|
+
borderColor: elToBorderColor,
|
|
366
|
+
borderRadius: elToBorderRadius,
|
|
367
|
+
backgroundColor: elToBackground,
|
|
368
|
+
transform: elToTransform,
|
|
369
|
+
position: elToPositioningType,
|
|
370
|
+
cssText: elToCssText
|
|
371
|
+
} = getComputedStyle(elTo, [ 'borderWidth', 'borderStyle', 'borderColor', 'borderRadius', 'backgroundColor', 'transform', 'position', 'cssText' ])
|
|
372
|
+
const elToClassSaved = elTo.classList.toString()
|
|
373
|
+
const elToStyleSaved = elTo.style.cssText
|
|
374
|
+
|
|
375
|
+
// we set the computed styles on the element (to be able to remove classes)
|
|
376
|
+
elTo.style.cssText = elToCssText
|
|
377
|
+
elTo.style.transform = 'none'
|
|
378
|
+
elTo.style.animation = 'none'
|
|
379
|
+
elTo.style.transition = 'none'
|
|
380
|
+
// we strip the background classes (background color can no longer be animated if !important is used)
|
|
381
|
+
elTo.className = elToClassSaved.split(' ').filter(c => /^bg-/.test(c) === false).join(' ')
|
|
382
|
+
|
|
383
|
+
const elToPosition = getAbsolutePosition(elTo, options.resize)
|
|
384
|
+
|
|
385
|
+
const deltaX = elFromPosition.left - elToPosition.left
|
|
386
|
+
const deltaY = elFromPosition.top - elToPosition.top
|
|
387
|
+
const scaleX = elFromPosition.width / (elToPosition.width > 0 ? elToPosition.width : 10)
|
|
388
|
+
const scaleY = elFromPosition.height / (elToPosition.height > 0 ? elToPosition.height : 100)
|
|
389
|
+
|
|
390
|
+
const elFromParentWidthDiff = elFromParentWidthBefore - elFromParentWidthAfter
|
|
391
|
+
const elFromParentHeightDiff = elFromParentHeightBefore - elFromParentHeightAfter
|
|
392
|
+
const elToParentWidthDiff = elToParentWidthAfter - elToParentWidthBefore
|
|
393
|
+
const elToParentHeightDiff = elToParentHeightAfter - elToParentHeightBefore
|
|
394
|
+
|
|
395
|
+
const elFromCloneWidth = Math.max(elFromPosition.widthM, elFromParentWidthDiff)
|
|
396
|
+
const elFromCloneHeight = Math.max(elFromPosition.heightM, elFromParentHeightDiff)
|
|
397
|
+
const elToCloneWidth = Math.max(elToPosition.widthM, elToParentWidthDiff)
|
|
398
|
+
const elToCloneHeight = Math.max(elToPosition.heightM, elToParentHeightDiff)
|
|
399
|
+
|
|
400
|
+
const elSharedSize = elFrom === elTo
|
|
401
|
+
&& [ 'absolute', 'fixed' ].includes(elToPositioningType) === false
|
|
402
|
+
&& [ 'absolute', 'fixed' ].includes(elFromPositioningType) === false
|
|
403
|
+
|
|
404
|
+
// if the final element has fixed position or if a parent
|
|
405
|
+
// has fixed position we need to animate it as fixed
|
|
406
|
+
let elToNeedsFixedPosition = elToPositioningType === 'fixed'
|
|
407
|
+
let parent = elToParent
|
|
408
|
+
while (elToNeedsFixedPosition !== true && parent !== document) {
|
|
409
|
+
elToNeedsFixedPosition = window.getComputedStyle(parent).position === 'fixed'
|
|
410
|
+
parent = parent.parentNode
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// we show the spacer for the initial element
|
|
414
|
+
if (options.hideFromClone !== true) {
|
|
415
|
+
elFromClone.style.display = 'block'
|
|
416
|
+
elFromClone.style.flex = '0 0 auto'
|
|
417
|
+
elFromClone.style.opacity = 0
|
|
418
|
+
elFromClone.style.minWidth = 'unset'
|
|
419
|
+
elFromClone.style.maxWidth = 'unset'
|
|
420
|
+
elFromClone.style.minHeight = 'unset'
|
|
421
|
+
elFromClone.style.maxHeight = 'unset'
|
|
422
|
+
elFromClone.classList.remove('q-morph--internal')
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// we show the spacer for the final element
|
|
426
|
+
if (options.keepToClone !== true) {
|
|
427
|
+
elToClone.style.display = 'block'
|
|
428
|
+
elToClone.style.flex = '0 0 auto'
|
|
429
|
+
elToClone.style.opacity = 0
|
|
430
|
+
elToClone.style.minWidth = 'unset'
|
|
431
|
+
elToClone.style.maxWidth = 'unset'
|
|
432
|
+
elToClone.style.minHeight = 'unset'
|
|
433
|
+
elToClone.style.maxHeight = 'unset'
|
|
434
|
+
}
|
|
435
|
+
elToClone.classList.remove('q-morph--internal')
|
|
436
|
+
|
|
437
|
+
// we apply classes specified by user
|
|
438
|
+
if (typeof options.classes === 'string') {
|
|
439
|
+
elTo.className += ' ' + options.classes
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// we apply styles specified by user
|
|
443
|
+
if (typeof options.style === 'string') {
|
|
444
|
+
elTo.style.cssText += ' ' + options.style
|
|
445
|
+
}
|
|
446
|
+
else if (options.style === Object(options.style)) {
|
|
447
|
+
for (const prop in options.style) {
|
|
448
|
+
elTo.style[ prop ] = options.style[ prop ]
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const elFromZIndex = getMaxZIndex(elFromClone)
|
|
453
|
+
const elToZIndex = getMaxZIndex(elTo)
|
|
454
|
+
|
|
455
|
+
// we position the morphing element
|
|
456
|
+
// if we use fixed position for the final element we need to adjust for scroll
|
|
457
|
+
const documentScroll = elToNeedsFixedPosition === true
|
|
458
|
+
? document.documentElement
|
|
459
|
+
: { scrollLeft: 0, scrollTop: 0 }
|
|
460
|
+
elTo.style.position = elToNeedsFixedPosition === true ? 'fixed' : 'absolute'
|
|
461
|
+
elTo.style.left = `${ elToPosition.left - documentScroll.scrollLeft }px`
|
|
462
|
+
elTo.style.right = 'unset'
|
|
463
|
+
elTo.style.top = `${ elToPosition.top - documentScroll.scrollTop }px`
|
|
464
|
+
elTo.style.margin = 0
|
|
465
|
+
|
|
466
|
+
if (options.resize === true) {
|
|
467
|
+
elTo.style.minWidth = 'unset'
|
|
468
|
+
elTo.style.maxWidth = 'unset'
|
|
469
|
+
elTo.style.minHeight = 'unset'
|
|
470
|
+
elTo.style.maxHeight = 'unset'
|
|
471
|
+
elTo.style.overflow = 'hidden'
|
|
472
|
+
elTo.style.overflowX = 'hidden'
|
|
473
|
+
elTo.style.overflowY = 'hidden'
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
document.body.appendChild(elTo)
|
|
477
|
+
|
|
478
|
+
if (elFromTween !== void 0) {
|
|
479
|
+
elFromTween.style.cssText = elFromCssText
|
|
480
|
+
elFromTween.style.transform = 'none'
|
|
481
|
+
elFromTween.style.animation = 'none'
|
|
482
|
+
elFromTween.style.transition = 'none'
|
|
483
|
+
|
|
484
|
+
elFromTween.style.position = elTo.style.position
|
|
485
|
+
elFromTween.style.left = `${ elFromPosition.left - documentScroll.scrollLeft }px`
|
|
486
|
+
elFromTween.style.right = 'unset'
|
|
487
|
+
elFromTween.style.top = `${ elFromPosition.top - documentScroll.scrollTop }px`
|
|
488
|
+
elFromTween.style.margin = 0
|
|
489
|
+
elFromTween.style.pointerEvents = 'none'
|
|
490
|
+
|
|
491
|
+
if (options.resize === true) {
|
|
492
|
+
elFromTween.style.minWidth = 'unset'
|
|
493
|
+
elFromTween.style.maxWidth = 'unset'
|
|
494
|
+
elFromTween.style.minHeight = 'unset'
|
|
495
|
+
elFromTween.style.maxHeight = 'unset'
|
|
496
|
+
elFromTween.style.overflow = 'hidden'
|
|
497
|
+
elFromTween.style.overflowX = 'hidden'
|
|
498
|
+
elFromTween.style.overflowY = 'hidden'
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
document.body.appendChild(elFromTween)
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
const commonCleanup = aborted => {
|
|
505
|
+
// we put the element back in it's place
|
|
506
|
+
// and restore the styles and classes
|
|
507
|
+
if (elFrom === elTo && endElementTo !== true) {
|
|
508
|
+
elTo.style.cssText = elFromStyleSaved
|
|
509
|
+
elTo.className = elFromClassSaved
|
|
510
|
+
}
|
|
511
|
+
else {
|
|
512
|
+
elTo.style.cssText = elToStyleSaved
|
|
513
|
+
elTo.className = elToClassSaved
|
|
514
|
+
}
|
|
515
|
+
elToClone.parentNode === elToParent && elToParent.insertBefore(elTo, elToClone)
|
|
516
|
+
|
|
517
|
+
// we clean the spacers
|
|
518
|
+
elFromClone.remove()
|
|
519
|
+
elToClone.remove()
|
|
520
|
+
elFromTween !== void 0 && elFromTween.remove()
|
|
521
|
+
|
|
522
|
+
// cancel will be no longer available
|
|
523
|
+
cancel = () => false
|
|
524
|
+
|
|
525
|
+
elFrom.qMorphCancel = void 0
|
|
526
|
+
elTo.qMorphCancel = void 0
|
|
527
|
+
|
|
528
|
+
// we are ready
|
|
529
|
+
if (typeof options.onEnd === 'function') {
|
|
530
|
+
options.onEnd(endElementTo === true ? 'to' : 'from', aborted === true)
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
if (options.useCSS !== true && typeof elTo.animate === 'function') {
|
|
535
|
+
const resizeFrom = options.resize === true
|
|
536
|
+
? {
|
|
537
|
+
transform: `translate(${ deltaX }px, ${ deltaY }px)`,
|
|
538
|
+
width: `${ elFromCloneWidth }px`,
|
|
539
|
+
height: `${ elFromCloneHeight }px`
|
|
540
|
+
}
|
|
541
|
+
: {
|
|
542
|
+
transform: `translate(${ deltaX }px, ${ deltaY }px) scale(${ scaleX }, ${ scaleY })`
|
|
543
|
+
}
|
|
544
|
+
const resizeTo = options.resize === true
|
|
545
|
+
? {
|
|
546
|
+
width: `${ elToCloneWidth }px`,
|
|
547
|
+
height: `${ elToCloneHeight }px`
|
|
548
|
+
}
|
|
549
|
+
: {}
|
|
550
|
+
const resizeFromTween = options.resize === true
|
|
551
|
+
? {
|
|
552
|
+
width: `${ elFromCloneWidth }px`,
|
|
553
|
+
height: `${ elFromCloneHeight }px`
|
|
554
|
+
}
|
|
555
|
+
: {}
|
|
556
|
+
const resizeToTween = options.resize === true
|
|
557
|
+
? {
|
|
558
|
+
transform: `translate(${ -1 * deltaX }px, ${ -1 * deltaY }px)`,
|
|
559
|
+
width: `${ elToCloneWidth }px`,
|
|
560
|
+
height: `${ elToCloneHeight }px`
|
|
561
|
+
}
|
|
562
|
+
: {
|
|
563
|
+
transform: `translate(${ -1 * deltaX }px, ${ -1 * deltaY }px) scale(${ 1 / scaleX }, ${ 1 / scaleY })`
|
|
564
|
+
}
|
|
565
|
+
const tweenFrom = elFromTween !== void 0
|
|
566
|
+
? { opacity: options.tweenToOpacity }
|
|
567
|
+
: { backgroundColor: elFromBackground }
|
|
568
|
+
const tweenTo = elFromTween !== void 0
|
|
569
|
+
? { opacity: 1 }
|
|
570
|
+
: { backgroundColor: elToBackground }
|
|
571
|
+
animationTo = elTo.animate([
|
|
572
|
+
{
|
|
573
|
+
margin: 0,
|
|
574
|
+
borderWidth: elFromBorderWidth,
|
|
575
|
+
borderStyle: elFromBorderStyle,
|
|
576
|
+
borderColor: elFromBorderColor,
|
|
577
|
+
borderRadius: elFromBorderRadius,
|
|
578
|
+
zIndex: elFromZIndex,
|
|
579
|
+
transformOrigin: '0 0',
|
|
580
|
+
...resizeFrom,
|
|
581
|
+
...tweenFrom
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
margin: 0,
|
|
585
|
+
borderWidth: elToBorderWidth,
|
|
586
|
+
borderStyle: elToBorderStyle,
|
|
587
|
+
borderColor: elToBorderColor,
|
|
588
|
+
borderRadius: elToBorderRadius,
|
|
589
|
+
zIndex: elToZIndex,
|
|
590
|
+
transformOrigin: '0 0',
|
|
591
|
+
transform: elToTransform,
|
|
592
|
+
...resizeTo,
|
|
593
|
+
...tweenTo
|
|
594
|
+
}
|
|
595
|
+
], {
|
|
596
|
+
duration: options.duration,
|
|
597
|
+
easing: options.easing,
|
|
598
|
+
fill: options.fill,
|
|
599
|
+
delay: options.delay
|
|
600
|
+
})
|
|
601
|
+
|
|
602
|
+
animationFromTween = elFromTween === void 0 ? void 0 : elFromTween.animate([
|
|
603
|
+
{
|
|
604
|
+
opacity: options.tweenFromOpacity,
|
|
605
|
+
margin: 0,
|
|
606
|
+
borderWidth: elFromBorderWidth,
|
|
607
|
+
borderStyle: elFromBorderStyle,
|
|
608
|
+
borderColor: elFromBorderColor,
|
|
609
|
+
borderRadius: elFromBorderRadius,
|
|
610
|
+
zIndex: elFromZIndex,
|
|
611
|
+
transformOrigin: '0 0',
|
|
612
|
+
transform: elFromTransform,
|
|
613
|
+
...resizeFromTween
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
opacity: 0,
|
|
617
|
+
margin: 0,
|
|
618
|
+
borderWidth: elToBorderWidth,
|
|
619
|
+
borderStyle: elToBorderStyle,
|
|
620
|
+
borderColor: elToBorderColor,
|
|
621
|
+
borderRadius: elToBorderRadius,
|
|
622
|
+
zIndex: elToZIndex,
|
|
623
|
+
transformOrigin: '0 0',
|
|
624
|
+
...resizeToTween
|
|
625
|
+
}
|
|
626
|
+
], {
|
|
627
|
+
duration: options.duration,
|
|
628
|
+
easing: options.easing,
|
|
629
|
+
fill: options.fill,
|
|
630
|
+
delay: options.delay
|
|
631
|
+
})
|
|
632
|
+
|
|
633
|
+
animationFromClone = options.hideFromClone === true || elSharedSize === true ? void 0 : elFromClone.animate([
|
|
634
|
+
{
|
|
635
|
+
margin: `${ elFromParentHeightDiff < 0 ? elFromParentHeightDiff / 2 : 0 }px ${ elFromParentWidthDiff < 0 ? elFromParentWidthDiff / 2 : 0 }px`,
|
|
636
|
+
width: `${ elFromCloneWidth + elFromPosition.marginH }px`,
|
|
637
|
+
height: `${ elFromCloneHeight + elFromPosition.marginV }px`
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
margin: 0,
|
|
641
|
+
width: 0,
|
|
642
|
+
height: 0
|
|
643
|
+
}
|
|
644
|
+
], {
|
|
645
|
+
duration: options.duration,
|
|
646
|
+
easing: options.easing,
|
|
647
|
+
fill: options.fill,
|
|
648
|
+
delay: options.delay
|
|
649
|
+
})
|
|
650
|
+
|
|
651
|
+
animationToClone = options.keepToClone === true ? void 0 : elToClone.animate([
|
|
652
|
+
elSharedSize === true
|
|
653
|
+
? {
|
|
654
|
+
margin: `${ elFromParentHeightDiff < 0 ? elFromParentHeightDiff / 2 : 0 }px ${ elFromParentWidthDiff < 0 ? elFromParentWidthDiff / 2 : 0 }px`,
|
|
655
|
+
width: `${ elFromCloneWidth + elFromPosition.marginH }px`,
|
|
656
|
+
height: `${ elFromCloneHeight + elFromPosition.marginV }px`
|
|
657
|
+
}
|
|
658
|
+
: {
|
|
659
|
+
margin: 0,
|
|
660
|
+
width: 0,
|
|
661
|
+
height: 0
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
margin: `${ elToParentHeightDiff < 0 ? elToParentHeightDiff / 2 : 0 }px ${ elToParentWidthDiff < 0 ? elToParentWidthDiff / 2 : 0 }px`,
|
|
665
|
+
width: `${ elToCloneWidth + elToPosition.marginH }px`,
|
|
666
|
+
height: `${ elToCloneHeight + elToPosition.marginV }px`
|
|
667
|
+
}
|
|
668
|
+
], {
|
|
669
|
+
duration: options.duration,
|
|
670
|
+
easing: options.easing,
|
|
671
|
+
fill: options.fill,
|
|
672
|
+
delay: options.delay
|
|
673
|
+
})
|
|
674
|
+
|
|
675
|
+
const cleanup = abort => {
|
|
676
|
+
animationFromClone !== void 0 && animationFromClone.cancel()
|
|
677
|
+
animationFromTween !== void 0 && animationFromTween.cancel()
|
|
678
|
+
animationToClone !== void 0 && animationToClone.cancel()
|
|
679
|
+
animationTo.cancel()
|
|
680
|
+
|
|
681
|
+
animationTo.removeEventListener('finish', cleanup)
|
|
682
|
+
animationTo.removeEventListener('cancel', cleanup)
|
|
683
|
+
|
|
684
|
+
commonCleanup(abort)
|
|
685
|
+
|
|
686
|
+
// we clean the animations
|
|
687
|
+
animationFromClone = void 0
|
|
688
|
+
animationFromTween = void 0
|
|
689
|
+
animationToClone = void 0
|
|
690
|
+
animationTo = void 0
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
elFrom.qMorphCancel = () => {
|
|
694
|
+
elFrom.qMorphCancel = void 0
|
|
695
|
+
cancelStatus = true
|
|
696
|
+
cleanup()
|
|
697
|
+
}
|
|
698
|
+
elTo.qMorphCancel = () => {
|
|
699
|
+
elTo.qMorphCancel = void 0
|
|
700
|
+
cancelStatus = true
|
|
701
|
+
cleanup()
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
animationTo.addEventListener('finish', cleanup)
|
|
705
|
+
animationTo.addEventListener('cancel', cleanup)
|
|
706
|
+
|
|
707
|
+
cancel = abort => {
|
|
708
|
+
// we are not in a morph that we can cancel
|
|
709
|
+
if (cancelStatus === true || animationTo === void 0) {
|
|
710
|
+
return false
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
if (abort === true) {
|
|
714
|
+
cleanup(true)
|
|
715
|
+
return true
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
endElementTo = endElementTo !== true
|
|
719
|
+
|
|
720
|
+
animationFromClone !== void 0 && animationFromClone.reverse()
|
|
721
|
+
animationFromTween !== void 0 && animationFromTween.reverse()
|
|
722
|
+
animationToClone !== void 0 && animationToClone.reverse()
|
|
723
|
+
animationTo.reverse()
|
|
724
|
+
|
|
725
|
+
return true
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
else {
|
|
729
|
+
const qAnimId = `q-morph-anim-${ ++id }`
|
|
730
|
+
const style = document.createElement('style')
|
|
731
|
+
const resizeFrom = options.resize === true
|
|
732
|
+
? `
|
|
733
|
+
transform: translate(${ deltaX }px, ${ deltaY }px);
|
|
734
|
+
width: ${ elFromCloneWidth }px;
|
|
735
|
+
height: ${ elFromCloneHeight }px;
|
|
736
|
+
`
|
|
737
|
+
: `transform: translate(${ deltaX }px, ${ deltaY }px) scale(${ scaleX }, ${ scaleY });`
|
|
738
|
+
const resizeTo = options.resize === true
|
|
739
|
+
? `
|
|
740
|
+
width: ${ elToCloneWidth }px;
|
|
741
|
+
height: ${ elToCloneHeight }px;
|
|
742
|
+
`
|
|
743
|
+
: ''
|
|
744
|
+
const resizeFromTween = options.resize === true
|
|
745
|
+
? `
|
|
746
|
+
width: ${ elFromCloneWidth }px;
|
|
747
|
+
height: ${ elFromCloneHeight }px;
|
|
748
|
+
`
|
|
749
|
+
: ''
|
|
750
|
+
const resizeToTween = options.resize === true
|
|
751
|
+
? `
|
|
752
|
+
transform: translate(${ -1 * deltaX }px, ${ -1 * deltaY }px);
|
|
753
|
+
width: ${ elToCloneWidth }px;
|
|
754
|
+
height: ${ elToCloneHeight }px;
|
|
755
|
+
`
|
|
756
|
+
: `transform: translate(${ -1 * deltaX }px, ${ -1 * deltaY }px) scale(${ 1 / scaleX }, ${ 1 / scaleY });`
|
|
757
|
+
const tweenFrom = elFromTween !== void 0
|
|
758
|
+
? `opacity: ${ options.tweenToOpacity };`
|
|
759
|
+
: `background-color: ${ elFromBackground };`
|
|
760
|
+
const tweenTo = elFromTween !== void 0
|
|
761
|
+
? 'opacity: 1;'
|
|
762
|
+
: `background-color: ${ elToBackground };`
|
|
763
|
+
const keyframesFromTween = elFromTween === void 0
|
|
764
|
+
? ''
|
|
765
|
+
: `
|
|
766
|
+
@keyframes ${ qAnimId }-from-tween {
|
|
767
|
+
0% {
|
|
768
|
+
opacity: ${ options.tweenFromOpacity };
|
|
769
|
+
margin: 0;
|
|
770
|
+
border-width: ${ elFromBorderWidth };
|
|
771
|
+
border-style: ${ elFromBorderStyle };
|
|
772
|
+
border-color: ${ elFromBorderColor };
|
|
773
|
+
border-radius: ${ elFromBorderRadius };
|
|
774
|
+
z-index: ${ elFromZIndex };
|
|
775
|
+
transform-origin: 0 0;
|
|
776
|
+
transform: ${ elFromTransform };
|
|
777
|
+
${ resizeFromTween }
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
100% {
|
|
781
|
+
opacity: 0;
|
|
782
|
+
margin: 0;
|
|
783
|
+
border-width: ${ elToBorderWidth };
|
|
784
|
+
border-style: ${ elToBorderStyle };
|
|
785
|
+
border-color: ${ elToBorderColor };
|
|
786
|
+
border-radius: ${ elToBorderRadius };
|
|
787
|
+
z-index: ${ elToZIndex };
|
|
788
|
+
transform-origin: 0 0;
|
|
789
|
+
${ resizeToTween }
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
`
|
|
793
|
+
const keyframesFrom = options.hideFromClone === true || elSharedSize === true
|
|
794
|
+
? ''
|
|
795
|
+
: `
|
|
796
|
+
@keyframes ${ qAnimId }-from {
|
|
797
|
+
0% {
|
|
798
|
+
margin: ${ elFromParentHeightDiff < 0 ? elFromParentHeightDiff / 2 : 0 }px ${ elFromParentWidthDiff < 0 ? elFromParentWidthDiff / 2 : 0 }px;
|
|
799
|
+
width: ${ elFromCloneWidth + elFromPosition.marginH }px;
|
|
800
|
+
height: ${ elFromCloneHeight + elFromPosition.marginV }px;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
100% {
|
|
804
|
+
margin: 0;
|
|
805
|
+
width: 0;
|
|
806
|
+
height: 0;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
`
|
|
810
|
+
const keyframeToStart = elSharedSize === true
|
|
811
|
+
? `
|
|
812
|
+
margin: ${ elFromParentHeightDiff < 0 ? elFromParentHeightDiff / 2 : 0 }px ${ elFromParentWidthDiff < 0 ? elFromParentWidthDiff / 2 : 0 }px;
|
|
813
|
+
width: ${ elFromCloneWidth + elFromPosition.marginH }px;
|
|
814
|
+
height: ${ elFromCloneHeight + elFromPosition.marginV }px;
|
|
815
|
+
`
|
|
816
|
+
: `
|
|
817
|
+
margin: 0;
|
|
818
|
+
width: 0;
|
|
819
|
+
height: 0;
|
|
820
|
+
`
|
|
821
|
+
const keyframesTo = options.keepToClone === true
|
|
822
|
+
? ''
|
|
823
|
+
: `
|
|
824
|
+
@keyframes ${ qAnimId }-to {
|
|
825
|
+
0% {
|
|
826
|
+
${ keyframeToStart }
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
100% {
|
|
830
|
+
margin: ${ elToParentHeightDiff < 0 ? elToParentHeightDiff / 2 : 0 }px ${ elToParentWidthDiff < 0 ? elToParentWidthDiff / 2 : 0 }px;
|
|
831
|
+
width: ${ elToCloneWidth + elToPosition.marginH }px;
|
|
832
|
+
height: ${ elToCloneHeight + elToPosition.marginV }px;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
`
|
|
836
|
+
style.innerHTML = `
|
|
837
|
+
@keyframes ${ qAnimId } {
|
|
838
|
+
0% {
|
|
839
|
+
margin: 0;
|
|
840
|
+
border-width: ${ elFromBorderWidth };
|
|
841
|
+
border-style: ${ elFromBorderStyle };
|
|
842
|
+
border-color: ${ elFromBorderColor };
|
|
843
|
+
border-radius: ${ elFromBorderRadius };
|
|
844
|
+
background-color: ${ elFromBackground };
|
|
845
|
+
z-index: ${ elFromZIndex };
|
|
846
|
+
transform-origin: 0 0;
|
|
847
|
+
${ resizeFrom }
|
|
848
|
+
${ tweenFrom }
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
100% {
|
|
852
|
+
margin: 0;
|
|
853
|
+
border-width: ${ elToBorderWidth };
|
|
854
|
+
border-style: ${ elToBorderStyle };
|
|
855
|
+
border-color: ${ elToBorderColor };
|
|
856
|
+
border-radius: ${ elToBorderRadius };
|
|
857
|
+
background-color: ${ elToBackground };
|
|
858
|
+
z-index: ${ elToZIndex };
|
|
859
|
+
transform-origin: 0 0;
|
|
860
|
+
transform: ${ elToTransform };
|
|
861
|
+
${ resizeTo }
|
|
862
|
+
${ tweenTo }
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
${ keyframesFrom }
|
|
867
|
+
|
|
868
|
+
${ keyframesFromTween }
|
|
869
|
+
|
|
870
|
+
${ keyframesTo }
|
|
871
|
+
`
|
|
872
|
+
document.head.appendChild(style)
|
|
873
|
+
|
|
874
|
+
let animationDirection = 'normal'
|
|
875
|
+
|
|
876
|
+
elFromClone.style.animation = `${ options.duration }ms ${ options.easing } ${ options.delay }ms ${ animationDirection } ${ options.fill } ${ qAnimId }-from`
|
|
877
|
+
if (elFromTween !== void 0) {
|
|
878
|
+
elFromTween.style.animation = `${ options.duration }ms ${ options.easing } ${ options.delay }ms ${ animationDirection } ${ options.fill } ${ qAnimId }-from-tween`
|
|
879
|
+
}
|
|
880
|
+
elToClone.style.animation = `${ options.duration }ms ${ options.easing } ${ options.delay }ms ${ animationDirection } ${ options.fill } ${ qAnimId }-to`
|
|
881
|
+
elTo.style.animation = `${ options.duration }ms ${ options.easing } ${ options.delay }ms ${ animationDirection } ${ options.fill } ${ qAnimId }`
|
|
882
|
+
|
|
883
|
+
const cleanup = ev => {
|
|
884
|
+
if (ev === Object(ev) && ev.animationName !== qAnimId) {
|
|
885
|
+
return
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
elTo.removeEventListener('animationend', cleanup)
|
|
889
|
+
elTo.removeEventListener('animationcancel', cleanup)
|
|
890
|
+
|
|
891
|
+
commonCleanup()
|
|
892
|
+
|
|
893
|
+
// we clean the animations
|
|
894
|
+
style.remove()
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
elFrom.qMorphCancel = () => {
|
|
898
|
+
elFrom.qMorphCancel = void 0
|
|
899
|
+
cancelStatus = true
|
|
900
|
+
cleanup()
|
|
901
|
+
}
|
|
902
|
+
elTo.qMorphCancel = () => {
|
|
903
|
+
elTo.qMorphCancel = void 0
|
|
904
|
+
cancelStatus = true
|
|
905
|
+
cleanup()
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
elTo.addEventListener('animationend', cleanup)
|
|
909
|
+
elTo.addEventListener('animationcancel', cleanup)
|
|
910
|
+
|
|
911
|
+
cancel = abort => {
|
|
912
|
+
// we are not in a morph that we can cancel
|
|
913
|
+
if (cancelStatus === true || !elTo || !elFromClone || !elToClone) {
|
|
914
|
+
return false
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
if (abort === true) {
|
|
918
|
+
cleanup()
|
|
919
|
+
|
|
920
|
+
return true
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
endElementTo = endElementTo !== true
|
|
924
|
+
|
|
925
|
+
animationDirection = animationDirection === 'normal' ? 'reverse' : 'normal'
|
|
926
|
+
|
|
927
|
+
elFromClone.style.animationDirection = animationDirection
|
|
928
|
+
elFromTween.style.animationDirection = animationDirection
|
|
929
|
+
elToClone.style.animationDirection = animationDirection
|
|
930
|
+
elTo.style.animationDirection = animationDirection
|
|
931
|
+
|
|
932
|
+
return true
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
if (
|
|
938
|
+
options.waitFor > 0
|
|
939
|
+
|| options.waitFor === 'transitionend'
|
|
940
|
+
|| (options.waitFor === Object(options.waitFor) && typeof options.waitFor.then === 'function')
|
|
941
|
+
) {
|
|
942
|
+
const delayPromise = options.waitFor > 0
|
|
943
|
+
? new Promise(resolve => setTimeout(resolve, options.waitFor))
|
|
944
|
+
: (
|
|
945
|
+
options.waitFor === 'transitionend'
|
|
946
|
+
? new Promise(resolve => {
|
|
947
|
+
const timer = setTimeout(() => {
|
|
948
|
+
endFn()
|
|
949
|
+
}, 400)
|
|
950
|
+
|
|
951
|
+
const endFn = ev => {
|
|
952
|
+
clearTimeout(timer)
|
|
953
|
+
|
|
954
|
+
if (elTo) {
|
|
955
|
+
elTo.removeEventListener('transitionend', endFn)
|
|
956
|
+
elTo.removeEventListener('transitioncancel', endFn)
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
resolve()
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
elTo.addEventListener('transitionend', endFn)
|
|
963
|
+
elTo.addEventListener('transitioncancel', endFn)
|
|
964
|
+
})
|
|
965
|
+
: options.waitFor
|
|
966
|
+
)
|
|
967
|
+
|
|
968
|
+
delayPromise
|
|
969
|
+
.then(animate)
|
|
970
|
+
.catch(() => {
|
|
971
|
+
typeof elTo.qMorphCancel === 'function' && elTo.qMorphCancel()
|
|
972
|
+
})
|
|
973
|
+
}
|
|
974
|
+
else {
|
|
975
|
+
animate()
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
typeof _options.onToggle === 'function' && _options.onToggle()
|
|
980
|
+
requestAnimationFrame(calculateFinalState)
|
|
981
|
+
|
|
982
|
+
// we return the cancel function
|
|
983
|
+
// returns:
|
|
984
|
+
// false if the cancel cannot be performed (the morph ended already or has not started)
|
|
985
|
+
// true else
|
|
986
|
+
return abort => cancel(abort)
|
|
987
|
+
}
|