quasar 2.19.3 → 2.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/Lang.json +1 -1
- package/dist/api/QCarouselSlide.json +1 -1
- package/dist/api/QChatMessage.json +1 -1
- package/dist/api/QImg.json +1 -1
- package/dist/api/QParallax.json +1 -1
- package/dist/api/QRange.json +1 -1
- package/dist/api/QSlider.json +1 -1
- package/dist/api/QTimelineEntry.json +1 -1
- package/dist/api/QTree.json +1 -1
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +2 -2
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +5 -5
- package/dist/icon-set/fontawesome-v5.umd.prod.js +5 -5
- package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +5 -5
- package/dist/icon-set/fontawesome-v6.umd.prod.js +5 -5
- package/dist/icon-set/fontawesome-v7-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v7.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +5 -5
- package/dist/icon-set/mdi-v4.umd.prod.js +5 -5
- package/dist/icon-set/mdi-v5.umd.prod.js +5 -5
- package/dist/icon-set/mdi-v6.umd.prod.js +5 -5
- package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +2 -2
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +5 -5
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +5 -5
- package/dist/icon-set/svg-fontawesome-v7.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +5 -5
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +5 -5
- package/dist/icon-set/svg-ionicons-v7.umd.prod.js +5 -5
- package/dist/icon-set/svg-ionicons-v8.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +5 -5
- package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +2 -2
- package/dist/icon-set/themify.umd.prod.js +2 -2
- package/dist/lang/ar-TN.umd.prod.js +2 -2
- package/dist/lang/ar.umd.prod.js +2 -2
- package/dist/lang/az-Latn.umd.prod.js +2 -2
- package/dist/lang/bg.umd.prod.js +2 -2
- package/dist/lang/bn.umd.prod.js +2 -2
- package/dist/lang/bs-BA.umd.prod.js +2 -2
- package/dist/lang/ca.umd.prod.js +2 -2
- package/dist/lang/cs.umd.prod.js +2 -2
- package/dist/lang/da.umd.prod.js +2 -2
- package/dist/lang/de-CH.umd.prod.js +2 -2
- package/dist/lang/de-DE.umd.prod.js +2 -2
- package/dist/lang/de.umd.prod.js +2 -2
- package/dist/lang/el.umd.prod.js +2 -2
- package/dist/lang/en-GB.umd.prod.js +2 -2
- package/dist/lang/en-US.umd.prod.js +2 -2
- package/dist/lang/eo.umd.prod.js +2 -2
- package/dist/lang/es.umd.prod.js +2 -2
- package/dist/lang/et.umd.prod.js +2 -2
- package/dist/lang/eu.umd.prod.js +2 -2
- package/dist/lang/fa-IR.umd.prod.js +2 -2
- package/dist/lang/fa.umd.prod.js +2 -2
- package/dist/lang/fi.umd.prod.js +2 -2
- package/dist/lang/fr.umd.prod.js +2 -2
- package/dist/lang/gn.umd.prod.js +2 -2
- package/dist/lang/he.umd.prod.js +2 -2
- package/dist/lang/hi.umd.prod.js +2 -2
- package/dist/lang/hr.umd.prod.js +2 -2
- package/dist/lang/hu.umd.prod.js +2 -2
- package/dist/lang/id.umd.prod.js +2 -2
- package/dist/lang/is.umd.prod.js +2 -2
- package/dist/lang/it.umd.prod.js +2 -2
- package/dist/lang/ja.umd.prod.js +2 -2
- package/dist/lang/kk.umd.prod.js +2 -2
- package/dist/lang/km.umd.prod.js +2 -2
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +2 -2
- package/dist/lang/lt.umd.prod.js +2 -2
- package/dist/lang/lu.umd.prod.js +2 -2
- package/dist/lang/lv.umd.prod.js +2 -2
- package/dist/lang/mk.umd.prod.js +2 -2
- package/dist/lang/ml.umd.prod.js +2 -2
- package/dist/lang/mm.umd.prod.js +2 -2
- package/dist/lang/ms-MY.umd.prod.js +2 -2
- package/dist/lang/ms.umd.prod.js +2 -2
- package/dist/lang/my.umd.prod.js +2 -2
- package/dist/lang/nb-NO.umd.prod.js +2 -2
- package/dist/lang/nl.umd.prod.js +2 -2
- package/dist/lang/pl.umd.prod.js +2 -2
- package/dist/lang/pt-BR.umd.prod.js +2 -2
- package/dist/lang/pt.umd.prod.js +2 -2
- package/dist/lang/ro.umd.prod.js +2 -2
- package/dist/lang/ru.umd.prod.js +2 -2
- package/dist/lang/sk.umd.prod.js +2 -2
- package/dist/lang/sl.umd.prod.js +2 -2
- package/dist/lang/sm.umd.prod.js +2 -2
- package/dist/lang/sq.umd.prod.js +2 -2
- package/dist/lang/sr-CYR.umd.prod.js +2 -2
- package/dist/lang/sr.umd.prod.js +2 -2
- package/dist/lang/sv.umd.prod.js +2 -2
- package/dist/lang/ta.umd.prod.js +2 -2
- package/dist/lang/th.umd.prod.js +2 -2
- package/dist/lang/tl.umd.prod.js +2 -2
- package/dist/lang/tr.umd.prod.js +2 -2
- package/dist/lang/ug.umd.prod.js +2 -2
- package/dist/lang/uk.umd.prod.js +2 -2
- package/dist/lang/ur-PK.umd.prod.js +2 -2
- package/dist/lang/uz-Cyrl.umd.prod.js +2 -2
- package/dist/lang/uz-Latn.umd.prod.js +2 -2
- package/dist/lang/vi.umd.prod.js +2 -2
- package/dist/lang/zh-CN.umd.prod.js +2 -2
- package/dist/lang/zh-TW.umd.prod.js +2 -2
- package/dist/quasar.client.js +2621 -2604
- package/dist/quasar.sass +1 -1
- package/dist/quasar.server.prod.cjs +11 -11
- package/dist/quasar.server.prod.js +25 -25
- package/dist/quasar.umd.js +2616 -2599
- package/dist/quasar.umd.prod.js +23 -23
- package/dist/types/api/dialog.d.ts +1 -1
- package/dist/types/api/qnotify.d.ts +1 -1
- package/dist/types/api/qpopupproxy.d.ts +1 -1
- package/dist/types/feature-flag.d.ts +2 -2
- package/dist/types/globals.d.ts +2 -2
- package/dist/types/icon-set.d.ts +16 -16
- package/dist/types/shim-icon-set.d.ts +1 -2
- package/dist/types/shim-lang.d.ts +1 -2
- package/dist/types/ts-helpers.d.ts +3 -3
- package/dist/types/tsconfig.json +1 -1
- package/dist/types/utils/scroll.d.ts +1 -1
- package/dist/types/utils.d.ts +2 -2
- package/dist/web-types/web-types.json +1 -1
- package/icon-set/bootstrap-icons.js +1 -1
- package/icon-set/eva-icons.js +22 -22
- package/icon-set/ionicons-v4.js +16 -16
- package/icon-set/svg-bootstrap-icons.js +1 -1
- package/icon-set/svg-eva-icons.js +22 -22
- package/icon-set/svg-fontawesome-v5.js +1 -1
- package/icon-set/svg-ionicons-v4.js +16 -16
- package/icon-set/svg-themify.js +7 -7
- package/icon-set/themify.js +7 -7
- package/lang/ar-TN.js +1 -1
- package/lang/ar.js +1 -1
- package/lang/az-Latn.js +1 -1
- package/lang/bg.js +1 -1
- package/lang/bn.js +1 -1
- package/lang/bs-BA.js +1 -1
- package/lang/ca.js +1 -1
- package/lang/cs.js +11 -6
- package/lang/da.js +1 -1
- package/lang/de-CH.js +1 -1
- package/lang/de-DE.js +1 -1
- package/lang/de.js +1 -1
- package/lang/el.js +1 -1
- package/lang/en-GB.js +1 -1
- package/lang/en-US.js +1 -1
- package/lang/eo.js +1 -1
- package/lang/es.js +1 -1
- package/lang/et.js +1 -1
- package/lang/eu.js +1 -1
- package/lang/fa-IR.js +1 -1
- package/lang/fa.js +1 -1
- package/lang/fi.js +1 -1
- package/lang/fr.js +1 -1
- package/lang/gn.js +1 -1
- package/lang/he.js +1 -1
- package/lang/hi.js +1 -1
- package/lang/hr.js +1 -1
- package/lang/hu.js +1 -1
- package/lang/id.js +1 -1
- package/lang/is.js +1 -1
- package/lang/it.js +1 -1
- package/lang/ja.js +1 -1
- package/lang/kk.js +1 -1
- package/lang/km.js +1 -1
- package/lang/kur-CKB.js +1 -1
- package/lang/lt.js +2 -2
- package/lang/lu.js +1 -1
- package/lang/lv.js +1 -1
- package/lang/mk.js +1 -1
- package/lang/ml.js +1 -1
- package/lang/mm.js +1 -1
- package/lang/ms-MY.js +1 -1
- package/lang/ms.js +1 -1
- package/lang/my.js +1 -1
- package/lang/nb-NO.js +1 -1
- package/lang/nl.js +1 -1
- package/lang/pl.js +1 -1
- package/lang/pt-BR.js +1 -1
- package/lang/pt.js +1 -1
- package/lang/ro.js +1 -1
- package/lang/ru.js +1 -1
- package/lang/sk.js +1 -1
- package/lang/sl.js +1 -1
- package/lang/sm.js +1 -1
- package/lang/sq.js +1 -1
- package/lang/sr-CYR.js +1 -1
- package/lang/sr.js +1 -1
- package/lang/sv.js +1 -1
- package/lang/ta.js +1 -1
- package/lang/th.js +1 -1
- package/lang/tl.js +1 -1
- package/lang/tr.js +1 -1
- package/lang/ug.js +1 -1
- package/lang/uk.js +1 -1
- package/lang/ur-PK.js +1 -1
- package/lang/uz-Cyrl.js +1 -1
- package/lang/uz-Latn.js +1 -1
- package/lang/vi.js +1 -1
- package/lang/zh-CN.js +1 -1
- package/lang/zh-TW.js +1 -1
- package/package.json +13 -17
- package/src/components/ajax-bar/QAjaxBar.js +22 -25
- package/src/components/avatar/QAvatar.js +3 -3
- package/src/components/avatar/QAvatar.test.js +2 -2
- package/src/components/badge/QBadge.js +9 -10
- package/src/components/badge/QBadge.test.js +2 -2
- package/src/components/banner/QBanner.js +6 -6
- package/src/components/banner/QBanner.test.js +2 -2
- package/src/components/bar/QBar.js +3 -3
- package/src/components/bar/QBar.test.js +2 -2
- package/src/components/breadcrumbs/QBreadcrumbs.js +5 -4
- package/src/components/breadcrumbs/QBreadcrumbs.test.js +3 -3
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +4 -4
- package/src/components/breadcrumbs/QBreadcrumbsEl.test.js +2 -2
- package/src/components/btn/QBtn.js +39 -44
- package/src/components/btn/QBtn.test.js +2 -2
- package/src/components/btn/use-btn.js +34 -47
- package/src/components/btn/use-btn.test.js +5 -5
- package/src/components/btn-dropdown/QBtnDropdown.js +15 -16
- package/src/components/btn-group/QBtnGroup.js +3 -3
- package/src/components/btn-toggle/QBtnToggle.js +5 -9
- package/src/components/card/QCard.js +5 -5
- package/src/components/card/QCardActions.js +2 -2
- package/src/components/card/QCardSection.js +2 -2
- package/src/components/carousel/QCarousel.js +32 -38
- package/src/components/carousel/QCarouselControl.js +1 -1
- package/src/components/carousel/QCarouselSlide.js +1 -1
- package/src/components/carousel/QCarouselSlide.json +1 -1
- package/src/components/chat/QChatMessage.js +13 -14
- package/src/components/chat/QChatMessage.json +1 -1
- package/src/components/checkbox/QCheckbox.js +5 -5
- package/src/components/checkbox/use-checkbox.js +38 -50
- package/src/components/chip/QChip.js +26 -34
- package/src/components/chip/QChip.test.js +2 -2
- package/src/components/circular-progress/QCircularProgress.js +8 -11
- package/src/components/circular-progress/circular-progress.test.js +1 -1
- package/src/components/color/QColor.js +75 -98
- package/src/components/date/QDate.js +128 -140
- package/src/components/date/use-datetime.js +3 -6
- package/src/components/dialog/QDialog.js +44 -51
- package/src/components/dialog/QDialog.test.js +7 -7
- package/src/components/drawer/QDrawer.js +110 -152
- package/src/components/editor/QEditor.js +44 -37
- package/src/components/editor/editor-caret.js +27 -31
- package/src/components/editor/editor-utils.js +9 -5
- package/src/components/expansion-item/QExpansionItem.js +36 -48
- package/src/components/fab/QFab.js +11 -11
- package/src/components/fab/QFabAction.js +2 -4
- package/src/components/fab/use-fab.js +6 -7
- package/src/components/field/QField.js +2 -2
- package/src/components/file/QFile.js +26 -33
- package/src/components/footer/QFooter.js +40 -53
- package/src/components/form/QForm.js +37 -43
- package/src/components/form/QFormChildMixin.js +3 -3
- package/src/components/header/QHeader.js +35 -47
- package/src/components/icon/QIcon.js +19 -19
- package/src/components/img/QImg.js +24 -24
- package/src/components/img/QImg.json +3 -3
- package/src/components/infinite-scroll/QInfiniteScroll.js +38 -52
- package/src/components/inner-loading/QInnerLoading.js +3 -3
- package/src/components/input/QInput.js +53 -52
- package/src/components/input/use-mask.js +56 -54
- package/src/components/intersection/QIntersection.js +6 -8
- package/src/components/item/QItem.js +20 -30
- package/src/components/item/QItemLabel.js +5 -7
- package/src/components/item/QItemSection.js +6 -6
- package/src/components/item/QList.js +6 -6
- package/src/components/item/QList.test.js +2 -2
- package/src/components/knob/QKnob.js +39 -44
- package/src/components/layout/QLayout.js +30 -34
- package/src/components/linear-progress/QLinearProgress.js +14 -23
- package/src/components/markup-table/QMarkupTable.js +7 -9
- package/src/components/menu/QMenu.js +36 -37
- package/src/components/no-ssr/QNoSsr.js +1 -1
- package/src/components/option-group/QOptionGroup.js +5 -5
- package/src/components/page/QPage.js +16 -18
- package/src/components/page/QPageContainer.js +9 -9
- package/src/components/page-scroller/QPageScroller.js +11 -13
- package/src/components/page-sticky/use-page-sticky.js +18 -18
- package/src/components/pagination/QPagination.js +24 -26
- package/src/components/parallax/QParallax.js +15 -9
- package/src/components/parallax/QParallax.json +1 -1
- package/src/components/popup-edit/QPopupEdit.js +10 -13
- package/src/components/popup-proxy/QPopupProxy.js +5 -7
- package/src/components/pull-to-refresh/QPullToRefresh.js +15 -17
- package/src/components/radio/QRadio.js +24 -29
- package/src/components/range/QRange.js +33 -37
- package/src/components/rating/QRating.js +59 -61
- package/src/components/resize-observer/QResizeObserver.js +55 -62
- package/src/components/scroll-area/QScrollArea.js +32 -36
- package/src/components/scroll-observer/QScrollObserver.js +3 -3
- package/src/components/select/QSelect.js +208 -269
- package/src/components/separator/QSeparator.js +7 -10
- package/src/components/skeleton/QSkeleton.js +4 -4
- package/src/components/slide-item/QSlideItem.js +7 -7
- package/src/components/slide-transition/QSlideTransition.js +4 -4
- package/src/components/slider/QSlider.js +13 -16
- package/src/components/slider/use-slider.js +53 -81
- package/src/components/slider/use-slider.json +3 -3
- package/src/components/space/QSpace.test.js +1 -1
- package/src/components/spinner/QSpinner.test.js +2 -2
- package/src/components/spinner/QSpinnerAudio.test.js +2 -2
- package/src/components/spinner/QSpinnerBall.test.js +2 -2
- package/src/components/spinner/QSpinnerBars.test.js +2 -2
- package/src/components/spinner/QSpinnerBox.test.js +2 -2
- package/src/components/spinner/QSpinnerClock.test.js +2 -2
- package/src/components/spinner/QSpinnerComment.test.js +2 -2
- package/src/components/spinner/QSpinnerCube.test.js +2 -2
- package/src/components/spinner/QSpinnerDots.test.js +2 -2
- package/src/components/spinner/QSpinnerFacebook.test.js +2 -2
- package/src/components/spinner/QSpinnerGears.test.js +2 -2
- package/src/components/spinner/QSpinnerGrid.test.js +2 -2
- package/src/components/spinner/QSpinnerHearts.test.js +2 -2
- package/src/components/spinner/QSpinnerHourglass.test.js +2 -2
- package/src/components/spinner/QSpinnerInfinity.test.js +2 -2
- package/src/components/spinner/QSpinnerIos.test.js +2 -2
- package/src/components/spinner/QSpinnerOrbit.test.js +2 -2
- package/src/components/spinner/QSpinnerOval.test.js +2 -2
- package/src/components/spinner/QSpinnerPie.test.js +2 -2
- package/src/components/spinner/QSpinnerPuff.test.js +2 -2
- package/src/components/spinner/QSpinnerRadio.test.js +2 -2
- package/src/components/spinner/QSpinnerRings.test.js +2 -2
- package/src/components/spinner/QSpinnerTail.test.js +2 -2
- package/src/components/spinner/use-spinner.test.js +1 -1
- package/src/components/splitter/QSplitter.js +19 -21
- package/src/components/stepper/QStep.js +12 -14
- package/src/components/stepper/QStepper.js +13 -14
- package/src/components/stepper/StepHeader.js +34 -35
- package/src/components/tab-panels/QTabPanels.js +3 -3
- package/src/components/table/QTable.js +82 -100
- package/src/components/table/QTd.js +3 -3
- package/src/components/table/QTh.js +5 -6
- package/src/components/table/QTr.js +3 -3
- package/src/components/table/table-column-selection.js +4 -6
- package/src/components/table/table-filter.js +2 -2
- package/src/components/table/table-pagination.js +14 -20
- package/src/components/table/table-row-expand.js +3 -3
- package/src/components/table/table-row-selection.js +10 -20
- package/src/components/table/table-sort.js +7 -7
- package/src/components/tabs/QRouteTab.js +1 -1
- package/src/components/tabs/QTab.js +1 -1
- package/src/components/tabs/QTabs.js +82 -109
- package/src/components/tabs/use-tab.js +36 -38
- package/src/components/time/QTime.js +109 -132
- package/src/components/timeline/QTimeline.js +7 -4
- package/src/components/timeline/QTimelineEntry.js +7 -6
- package/src/components/timeline/QTimelineEntry.json +1 -1
- package/src/components/toggle/QToggle.js +6 -8
- package/src/components/toolbar/QToolbar.js +2 -2
- package/src/components/toolbar/QToolbar.test.js +2 -2
- package/src/components/toolbar/QToolbarTitle.js +2 -4
- package/src/components/toolbar/QToolbarTitle.test.js +2 -2
- package/src/components/tooltip/QTooltip.js +27 -28
- package/src/components/tree/QTree.js +96 -114
- package/src/components/tree/QTree.json +1 -1
- package/src/components/uploader/QUploaderAddTrigger.js +2 -2
- package/src/components/uploader/uploader-core.js +44 -51
- package/src/components/uploader/xhr-uploader-plugin.js +13 -17
- package/src/components/video/QVideo.js +1 -1
- package/src/components/video/QVideo.test.js +2 -2
- package/src/components/virtual-scroll/QVirtualScroll.js +9 -10
- package/src/components/virtual-scroll/use-virtual-scroll.js +42 -50
- package/src/composables/private.use-align/use-align.js +2 -2
- package/src/composables/private.use-align/use-align.test.js +1 -1
- package/src/composables/private.use-anchor/use-anchor.js +23 -32
- package/src/composables/private.use-dark/use-dark.test.js +1 -1
- package/src/composables/private.use-field/use-field.js +79 -99
- package/src/composables/private.use-file/use-file-dom-props.js +2 -2
- package/src/composables/private.use-file/use-file.js +27 -27
- package/src/composables/private.use-fullscreen/use-fullscreen.js +15 -20
- package/src/composables/private.use-history/use-history.js +2 -2
- package/src/composables/private.use-history/use-history.test.js +1 -1
- package/src/composables/private.use-key-composition/use-key-composition.js +11 -12
- package/src/composables/private.use-model-toggle/use-model-toggle.js +16 -25
- package/src/composables/private.use-panel/use-panel.js +25 -27
- package/src/composables/private.use-portal/use-portal.js +11 -9
- package/src/composables/private.use-prevent-scroll/use-prevent-scroll.js +1 -4
- package/src/composables/private.use-ratio/use-ratio.js +6 -5
- package/src/composables/private.use-ratio/use-ratio.test.js +1 -1
- package/src/composables/private.use-refocus-target/use-refocus-target.js +2 -4
- package/src/composables/private.use-router-link/use-router-link.js +44 -55
- package/src/composables/private.use-scroll-target/use-scroll-target.js +1 -1
- package/src/composables/private.use-size/use-size.test.js +1 -1
- package/src/composables/private.use-transition/use-transition.test.js +1 -1
- package/src/composables/private.use-validate/use-validate.js +23 -36
- package/src/composables/use-dialog-plugin-component/use-dialog-plugin-component.js +1 -1
- package/src/composables/use-form/private.use-form.js +1 -1
- package/src/composables/use-form/private.use-form.test.js +3 -3
- package/src/composables/use-form/use-form-child.js +7 -7
- package/src/composables/use-hydration/use-hydration.js +2 -2
- package/src/composables/use-hydration/use-hydration.test.js +1 -1
- package/src/composables/use-id/use-id.js +4 -8
- package/src/composables/use-id/use-id.test.js +1 -1
- package/src/composables/use-interval/use-interval.js +2 -2
- package/src/composables/use-interval/use-interval.test.js +1 -1
- package/src/composables/use-meta/use-meta.js +3 -3
- package/src/composables/use-quasar/use-quasar.test.js +1 -1
- package/src/composables/use-render-cache/use-render-cache.js +1 -1
- package/src/composables/use-render-cache/use-render-cache.test.js +1 -1
- package/src/composables/use-split-attrs/use-split-attrs.js +3 -7
- package/src/composables/use-split-attrs/use-split-attrs.test.js +1 -1
- package/src/composables/use-tick/use-tick.js +3 -3
- package/src/composables/use-tick/use-tick.test.js +2 -2
- package/src/composables/use-timeout/use-timeout.js +2 -2
- package/src/composables/use-timeout/use-timeout.test.js +1 -1
- package/src/directives/close-popup/ClosePopup.js +4 -9
- package/src/directives/intersection/Intersection.js +5 -8
- package/src/directives/morph/Morph.js +12 -18
- package/src/directives/ripple/Ripple.js +19 -26
- package/src/directives/ripple/Ripple.test.js +2 -2
- package/src/directives/scroll/Scroll.js +2 -2
- package/src/directives/touch-hold/TouchHold.js +22 -28
- package/src/directives/touch-pan/TouchPan.js +68 -84
- package/src/directives/touch-repeat/TouchRepeat.js +28 -39
- package/src/directives/touch-swipe/TouchSwipe.js +30 -33
- package/src/index.ssr.js +2 -0
- package/src/index.umd.js +2 -0
- package/src/install-quasar.js +9 -9
- package/src/plugins/addressbar/AddressbarColor.js +9 -9
- package/src/plugins/addressbar/AddressbarColor.test.js +2 -2
- package/src/plugins/app-fullscreen/AppFullscreen.js +11 -10
- package/src/plugins/app-fullscreen/AppFullscreen.test.js +2 -2
- package/src/plugins/app-fullscreen/test/mock-fullscreen.js +2 -2
- package/src/plugins/app-visibility/AppVisibility.js +5 -5
- package/src/plugins/app-visibility/AppVisibility.test.js +2 -2
- package/src/plugins/bottom-sheet/BottomSheet.js +2 -2
- package/src/plugins/bottom-sheet/component/BottomSheetComponent.js +4 -4
- package/src/plugins/cookies/Cookies.js +50 -62
- package/src/plugins/dark/Dark.js +3 -5
- package/src/plugins/dark/Dark.test.js +1 -1
- package/src/plugins/dialog/Dialog.js +2 -2
- package/src/plugins/dialog/component/DialogPluginComponent.js +17 -20
- package/src/plugins/icon-set/IconSet.js +2 -4
- package/src/plugins/icon-set/IconSet.test.js +1 -1
- package/src/plugins/lang/Lang.js +7 -10
- package/src/plugins/lang/Lang.json +2 -2
- package/src/plugins/lang/Lang.test.js +2 -2
- package/src/plugins/loading/Loading.js +10 -12
- package/src/plugins/loading-bar/LoadingBar.js +4 -4
- package/src/plugins/meta/Meta.js +10 -11
- package/src/plugins/notify/Notify.js +67 -72
- package/src/plugins/platform/Platform.js +19 -21
- package/src/plugins/platform/Platform.test.js +1 -1
- package/src/plugins/private.body/Body.js +23 -29
- package/src/plugins/private.body/Body.test.js +1 -1
- package/src/plugins/private.history/History.js +17 -25
- package/src/plugins/private.history/History.test.js +1 -1
- package/src/plugins/screen/Screen.js +16 -16
- package/src/plugins/screen/Screen.test.js +1 -1
- package/src/plugins/storage/LocalStorage.js +3 -4
- package/src/plugins/storage/LocalStorage.test.js +2 -2
- package/src/plugins/storage/SessionStorage.js +3 -4
- package/src/plugins/storage/SessionStorage.test.js +2 -2
- package/src/plugins/storage/engine/web-storage.js +30 -23
- package/src/plugins/storage/engine/web-storage.test.js +1 -1
- package/src/utils/EventBus/EventBus.js +3 -4
- package/src/utils/EventBus/EventBus.test.js +1 -1
- package/src/utils/clone/clone.test.js +4 -8
- package/src/utils/colors/colors.js +38 -29
- package/src/utils/colors/colors.test.js +2 -2
- package/src/utils/copy-to-clipboard/copy-to-clipboard.js +6 -11
- package/src/utils/create-meta-mixin/create-meta-mixin.js +2 -2
- package/src/utils/create-uploader-component/create-uploader-component.js +12 -7
- package/src/utils/css-var/get-css-var.test.js +2 -2
- package/src/utils/css-var/set-css-var.test.js +2 -2
- package/src/utils/date/date.js +229 -172
- package/src/utils/date/private.persian.js +11 -11
- package/src/utils/debounce/debounce.js +3 -7
- package/src/utils/debounce/debounce.test.js +1 -1
- package/src/utils/dom/dom.js +2 -4
- package/src/utils/dom/dom.test.js +4 -4
- package/src/utils/event/event.js +21 -23
- package/src/utils/export-file/export-file.js +3 -3
- package/src/utils/extend/extend.js +15 -14
- package/src/utils/extend/extend.test.js +2 -2
- package/src/utils/format/format.js +4 -10
- package/src/utils/format/format.test.js +1 -1
- package/src/utils/frame-debounce/frame-debounce.js +23 -12
- package/src/utils/frame-debounce/frame-debounce.test.js +1 -1
- package/src/utils/is/is.js +15 -26
- package/src/utils/is/is.test.js +8 -7
- package/src/utils/morph/morph.js +57 -48
- package/src/utils/open-url/open-url.js +7 -7
- package/src/utils/patterns/patterns.js +26 -23
- package/src/utils/patterns/patterns.test.js +1 -1
- package/src/utils/private.click-outside/click-outside.js +5 -5
- package/src/utils/private.config/instance-config.js +2 -0
- package/src/utils/private.config/instance-config.test.js +4 -4
- package/src/utils/private.config/nodes.js +5 -5
- package/src/utils/private.config/nodes.test.js +4 -4
- package/src/utils/private.create/create.test.js +1 -1
- package/src/utils/private.dialog/create-dialog.js +9 -12
- package/src/utils/private.focus/focus-manager.js +5 -1
- package/src/utils/private.focus/focus-manager.test.js +4 -4
- package/src/utils/private.focus/focusout.js +2 -2
- package/src/utils/private.focus/focusout.test.js +1 -1
- package/src/utils/private.get-emits-object/get-emits-object.test.js +1 -1
- package/src/utils/private.inject-obj-prop/inject-obj-prop.test.js +2 -2
- package/src/utils/private.keyboard/escape-key.js +5 -5
- package/src/utils/private.keyboard/escape-key.test.js +1 -1
- package/src/utils/private.keyboard/key-composition.js +4 -6
- package/src/utils/private.noop-ssr-directive-transform/noop-ssr-directive-transform.js +3 -1
- package/src/utils/private.noop-ssr-directive-transform/noop-ssr-directive-transform.test.js +1 -1
- package/src/utils/private.portal/portal.js +5 -5
- package/src/utils/private.position-engine/position-engine.js +20 -22
- package/src/utils/private.render/render.js +5 -7
- package/src/utils/private.render/render.test.js +5 -5
- package/src/utils/private.rtl/rtl.js +3 -2
- package/src/utils/private.rtl/rtl.test.js +1 -1
- package/src/utils/private.selection/selection.js +1 -1
- package/src/utils/private.selection/selection.test.js +2 -2
- package/src/utils/private.sort/sort.test.js +2 -2
- package/src/utils/private.touch/touch.js +10 -14
- package/src/utils/private.touch/touch.test.js +1 -1
- package/src/utils/private.vm/vm.js +2 -2
- package/src/utils/private.vm/vm.test.js +4 -4
- package/src/utils/run-sequential-promises/run-sequential-promises.js +44 -54
- package/src/utils/run-sequential-promises/run-sequential-promises.test.js +183 -0
- package/src/utils/scroll/prevent-scroll.js +9 -9
- package/src/utils/scroll/scroll.js +11 -12
- package/src/utils/throttle/throttle.js +4 -3
- package/src/utils/throttle/throttle.test.js +1 -1
- package/src/utils/uid/uid.js +51 -77
- package/src/utils/uid/uid.test.js +3 -3
- package/wrappers/index.cjs +2 -2
- package/wrappers/index.js +2 -2
- package/dist/vetur/quasar-attributes.json +0 -1
- package/dist/vetur/quasar-tags.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, getCurrentInstance, h, nextTick, ref, watch } from 'vue'
|
|
2
2
|
|
|
3
3
|
import TouchPan from '../../directives/touch-pan/TouchPan.js'
|
|
4
4
|
|
|
@@ -25,12 +25,12 @@ import throttle from '../../utils/throttle/throttle.js'
|
|
|
25
25
|
import { stop } from '../../utils/event/event.js'
|
|
26
26
|
import {
|
|
27
27
|
hexToRgb,
|
|
28
|
+
hsvToRgb,
|
|
29
|
+
luminosity,
|
|
28
30
|
rgbToHex,
|
|
29
|
-
rgbToString,
|
|
30
|
-
textToRgb,
|
|
31
31
|
rgbToHsv,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
rgbToString,
|
|
33
|
+
textToRgb
|
|
34
34
|
} from '../../utils/colors/colors.js'
|
|
35
35
|
import { hDir } from '../../utils/private.render/render.js'
|
|
36
36
|
|
|
@@ -141,6 +141,12 @@ const thumbPath = 'M5 5 h10 v10 h-10 v-10 z'
|
|
|
141
141
|
const alphaTrackImg =
|
|
142
142
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg=='
|
|
143
143
|
|
|
144
|
+
const numericRE = /^[0-9]+$/
|
|
145
|
+
const hexRE = /^#[0-9A-Fa-f]+$/
|
|
146
|
+
const rgbRE = /^rgb\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3}\)$/
|
|
147
|
+
const rgbaRE =
|
|
148
|
+
/^rgba\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/
|
|
149
|
+
|
|
144
150
|
export default createComponent({
|
|
145
151
|
name: 'QColor',
|
|
146
152
|
|
|
@@ -190,15 +196,11 @@ export default createComponent({
|
|
|
190
196
|
const errorIconRef = ref(null)
|
|
191
197
|
|
|
192
198
|
const forceHex = computed(() =>
|
|
193
|
-
props.formatModel === 'auto'
|
|
194
|
-
? null
|
|
195
|
-
: props.formatModel.indexOf('hex') !== -1
|
|
199
|
+
props.formatModel === 'auto' ? null : props.formatModel.includes('hex')
|
|
196
200
|
)
|
|
197
201
|
|
|
198
202
|
const forceAlpha = computed(() =>
|
|
199
|
-
props.formatModel === 'auto'
|
|
200
|
-
? null
|
|
201
|
-
: props.formatModel.indexOf('a') !== -1
|
|
203
|
+
props.formatModel === 'auto' ? null : props.formatModel.includes('a')
|
|
202
204
|
)
|
|
203
205
|
|
|
204
206
|
const topView = ref(
|
|
@@ -217,9 +219,7 @@ export default createComponent({
|
|
|
217
219
|
const view = ref(props.defaultView)
|
|
218
220
|
const model = ref(parseModel(props.modelValue || props.defaultValue))
|
|
219
221
|
|
|
220
|
-
const editable = computed(
|
|
221
|
-
() => props.disable !== true && props.readonly !== true
|
|
222
|
-
)
|
|
222
|
+
const editable = computed(() => !props.disable && !props.readonly)
|
|
223
223
|
|
|
224
224
|
const isHex = computed(
|
|
225
225
|
() =>
|
|
@@ -236,7 +236,7 @@ export default createComponent({
|
|
|
236
236
|
const formAttrs = computed(() => ({
|
|
237
237
|
type: 'hidden',
|
|
238
238
|
name: props.name,
|
|
239
|
-
value: model.value[isOutputHex.value
|
|
239
|
+
value: model.value[isOutputHex.value ? 'hex' : 'rgb']
|
|
240
240
|
}))
|
|
241
241
|
|
|
242
242
|
const injectFormInput = useFormInject(formAttrs)
|
|
@@ -267,7 +267,7 @@ export default createComponent({
|
|
|
267
267
|
|
|
268
268
|
const spectrumPointerStyle = computed(() => ({
|
|
269
269
|
top: `${100 - model.value.v}%`,
|
|
270
|
-
[$q.lang.rtl
|
|
270
|
+
[$q.lang.rtl ? 'right' : 'left']: `${model.value.s}%`
|
|
271
271
|
}))
|
|
272
272
|
|
|
273
273
|
const computedPalette = computed(() =>
|
|
@@ -279,17 +279,15 @@ export default createComponent({
|
|
|
279
279
|
const classes = computed(
|
|
280
280
|
() =>
|
|
281
281
|
'q-color-picker' +
|
|
282
|
-
(props.bordered
|
|
283
|
-
(props.square
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
(
|
|
287
|
-
(props.disable === true ? ' disabled' : '') +
|
|
288
|
-
(isDark.value === true ? ' q-color-picker--dark q-dark' : '')
|
|
282
|
+
(props.bordered ? ' q-color-picker--bordered' : '') +
|
|
283
|
+
(props.square ? ' q-color-picker--square no-border-radius' : '') +
|
|
284
|
+
(props.flat ? ' q-color-picker--flat no-shadow' : '') +
|
|
285
|
+
(props.disable ? ' disabled' : '') +
|
|
286
|
+
(isDark.value ? ' q-color-picker--dark q-dark' : '')
|
|
289
287
|
)
|
|
290
288
|
|
|
291
289
|
const attributes = computed(() =>
|
|
292
|
-
props.disable
|
|
290
|
+
props.disable ? { 'aria-disabled': 'true' } : {}
|
|
293
291
|
)
|
|
294
292
|
|
|
295
293
|
const spectrumDirective = computed(() => [
|
|
@@ -332,11 +330,11 @@ export default createComponent({
|
|
|
332
330
|
model.value.b = rgb.b
|
|
333
331
|
model.value.a = rgb.a
|
|
334
332
|
|
|
335
|
-
const value = model.value[isOutputHex.value
|
|
333
|
+
const value = model.value[isOutputHex.value ? 'hex' : 'rgb']
|
|
336
334
|
|
|
337
335
|
// emit new value
|
|
338
336
|
emit('update:modelValue', value)
|
|
339
|
-
if (change
|
|
337
|
+
if (change) emit('change', value)
|
|
340
338
|
}
|
|
341
339
|
|
|
342
340
|
function parseModel(v) {
|
|
@@ -345,12 +343,12 @@ export default createComponent({
|
|
|
345
343
|
? forceAlpha.value
|
|
346
344
|
: props.formatModel === 'auto'
|
|
347
345
|
? null
|
|
348
|
-
: props.formatModel.
|
|
346
|
+
: props.formatModel.includes('a')
|
|
349
347
|
|
|
350
348
|
if (
|
|
351
349
|
typeof v !== 'string' ||
|
|
352
350
|
v.length === 0 ||
|
|
353
|
-
testPattern.anyColor(v.
|
|
351
|
+
!testPattern.anyColor(v.replaceAll(' ', ''))
|
|
354
352
|
) {
|
|
355
353
|
return {
|
|
356
354
|
h: 0,
|
|
@@ -359,7 +357,7 @@ export default createComponent({
|
|
|
359
357
|
r: 0,
|
|
360
358
|
g: 0,
|
|
361
359
|
b: 0,
|
|
362
|
-
a: alpha
|
|
360
|
+
a: alpha ? 100 : void 0,
|
|
363
361
|
hex: void 0,
|
|
364
362
|
rgb: void 0
|
|
365
363
|
}
|
|
@@ -367,7 +365,7 @@ export default createComponent({
|
|
|
367
365
|
|
|
368
366
|
const localModel = textToRgb(v)
|
|
369
367
|
|
|
370
|
-
if (alpha
|
|
368
|
+
if (alpha && localModel.a === void 0) {
|
|
371
369
|
localModel.a = 100
|
|
372
370
|
}
|
|
373
371
|
|
|
@@ -386,10 +384,7 @@ export default createComponent({
|
|
|
386
384
|
rect = panel.getBoundingClientRect()
|
|
387
385
|
|
|
388
386
|
let x = Math.min(width, Math.max(0, left - rect.left))
|
|
389
|
-
|
|
390
|
-
if ($q.lang.rtl === true) {
|
|
391
|
-
x = width - x
|
|
392
|
-
}
|
|
387
|
+
if ($q.lang.rtl) x = width - x
|
|
393
388
|
|
|
394
389
|
const y = Math.min(height, Math.max(0, top - rect.top)),
|
|
395
390
|
s = Math.round((100 * x) / width),
|
|
@@ -398,7 +393,7 @@ export default createComponent({
|
|
|
398
393
|
h: model.value.h,
|
|
399
394
|
s,
|
|
400
395
|
v,
|
|
401
|
-
a: hasAlpha.value
|
|
396
|
+
a: hasAlpha.value ? model.value.a : void 0
|
|
402
397
|
})
|
|
403
398
|
|
|
404
399
|
model.value.s = s
|
|
@@ -412,7 +407,7 @@ export default createComponent({
|
|
|
412
407
|
h: hue,
|
|
413
408
|
s: model.value.s,
|
|
414
409
|
v: model.value.v,
|
|
415
|
-
a: hasAlpha.value
|
|
410
|
+
a: hasAlpha.value ? model.value.a : void 0
|
|
416
411
|
})
|
|
417
412
|
|
|
418
413
|
model.value.h = hue
|
|
@@ -426,15 +421,15 @@ export default createComponent({
|
|
|
426
421
|
function onNumericChange(value, formatModel, max, evt, change) {
|
|
427
422
|
if (evt !== void 0) stop(evt)
|
|
428
423
|
|
|
429
|
-
if (
|
|
430
|
-
if (change
|
|
424
|
+
if (!numericRE.test(value)) {
|
|
425
|
+
if (change) proxy.$forceUpdate()
|
|
431
426
|
return
|
|
432
427
|
}
|
|
433
428
|
|
|
434
429
|
const val = Math.floor(Number(value))
|
|
435
430
|
|
|
436
431
|
if (val < 0 || val > max) {
|
|
437
|
-
if (change
|
|
432
|
+
if (change) proxy.$forceUpdate()
|
|
438
433
|
return
|
|
439
434
|
}
|
|
440
435
|
|
|
@@ -442,12 +437,7 @@ export default createComponent({
|
|
|
442
437
|
r: formatModel === 'r' ? val : model.value.r,
|
|
443
438
|
g: formatModel === 'g' ? val : model.value.g,
|
|
444
439
|
b: formatModel === 'b' ? val : model.value.b,
|
|
445
|
-
a:
|
|
446
|
-
hasAlpha.value === true
|
|
447
|
-
? formatModel === 'a'
|
|
448
|
-
? val
|
|
449
|
-
: model.value.a
|
|
450
|
-
: void 0
|
|
440
|
+
a: hasAlpha.value ? (formatModel === 'a' ? val : model.value.a) : void 0
|
|
451
441
|
}
|
|
452
442
|
|
|
453
443
|
if (formatModel !== 'a') {
|
|
@@ -459,7 +449,7 @@ export default createComponent({
|
|
|
459
449
|
|
|
460
450
|
updateModel(rgb, change)
|
|
461
451
|
|
|
462
|
-
if (change
|
|
452
|
+
if (!change && evt?.target.selectionEnd !== void 0) {
|
|
463
453
|
const index = evt.target.selectionEnd
|
|
464
454
|
nextTick(() => {
|
|
465
455
|
evt.target.setSelectionRange(index, index)
|
|
@@ -474,10 +464,7 @@ export default createComponent({
|
|
|
474
464
|
stop(evt)
|
|
475
465
|
|
|
476
466
|
if (topView.value === 'hex') {
|
|
477
|
-
if (
|
|
478
|
-
inp.length !== (hasAlpha.value === true ? 9 : 7) ||
|
|
479
|
-
!/^#[0-9A-Fa-f]+$/.test(inp)
|
|
480
|
-
) {
|
|
467
|
+
if (inp.length !== (hasAlpha.value ? 9 : 7) || !hexRE.test(inp)) {
|
|
481
468
|
return true
|
|
482
469
|
}
|
|
483
470
|
|
|
@@ -487,39 +474,31 @@ export default createComponent({
|
|
|
487
474
|
|
|
488
475
|
if (!inp.endsWith(')')) {
|
|
489
476
|
return true
|
|
490
|
-
} else if (hasAlpha.value
|
|
477
|
+
} else if (!hasAlpha.value && inp.startsWith('rgb(')) {
|
|
491
478
|
localModel = inp
|
|
492
|
-
.
|
|
479
|
+
.slice(4, -1)
|
|
493
480
|
.split(',')
|
|
494
|
-
.map(n => parseInt(n, 10))
|
|
481
|
+
.map(n => Number.parseInt(n, 10))
|
|
495
482
|
|
|
496
|
-
if (
|
|
497
|
-
localModel.length !== 3 ||
|
|
498
|
-
!/^rgb\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3}\)$/.test(inp)
|
|
499
|
-
) {
|
|
483
|
+
if (localModel.length !== 3 || !rgbRE.test(inp)) {
|
|
500
484
|
return true
|
|
501
485
|
}
|
|
502
|
-
} else if (hasAlpha.value
|
|
503
|
-
localModel = inp.
|
|
504
|
-
|
|
505
|
-
if (
|
|
506
|
-
localModel.length !== 4 ||
|
|
507
|
-
!/^rgba\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/.test(
|
|
508
|
-
inp
|
|
509
|
-
)
|
|
510
|
-
) {
|
|
486
|
+
} else if (hasAlpha.value && inp.startsWith('rgba(')) {
|
|
487
|
+
localModel = inp.slice(5, -1).split(',')
|
|
488
|
+
|
|
489
|
+
if (localModel.length !== 4 || !rgbaRE.test(inp)) {
|
|
511
490
|
return true
|
|
512
491
|
}
|
|
513
492
|
|
|
514
493
|
for (let i = 0; i < 3; i++) {
|
|
515
|
-
const v = parseInt(localModel[i], 10)
|
|
494
|
+
const v = Number.parseInt(localModel[i], 10)
|
|
516
495
|
if (v < 0 || v > 255) {
|
|
517
496
|
return true
|
|
518
497
|
}
|
|
519
498
|
localModel[i] = v
|
|
520
499
|
}
|
|
521
500
|
|
|
522
|
-
const v = parseFloat(localModel[3])
|
|
501
|
+
const v = Number.parseFloat(localModel[3])
|
|
523
502
|
if (v < 0 || v > 1) {
|
|
524
503
|
return true
|
|
525
504
|
}
|
|
@@ -535,7 +514,7 @@ export default createComponent({
|
|
|
535
514
|
localModel[1] > 255 ||
|
|
536
515
|
localModel[2] < 0 ||
|
|
537
516
|
localModel[2] > 255 ||
|
|
538
|
-
(hasAlpha.value
|
|
517
|
+
(hasAlpha.value && (localModel[3] < 0 || localModel[3] > 1))
|
|
539
518
|
) {
|
|
540
519
|
return true
|
|
541
520
|
}
|
|
@@ -544,7 +523,7 @@ export default createComponent({
|
|
|
544
523
|
r: localModel[0],
|
|
545
524
|
g: localModel[1],
|
|
546
525
|
b: localModel[2],
|
|
547
|
-
a: hasAlpha.value
|
|
526
|
+
a: hasAlpha.value ? localModel[3] * 100 : void 0
|
|
548
527
|
}
|
|
549
528
|
}
|
|
550
529
|
|
|
@@ -555,7 +534,7 @@ export default createComponent({
|
|
|
555
534
|
|
|
556
535
|
updateModel(rgb, change)
|
|
557
536
|
|
|
558
|
-
if (change
|
|
537
|
+
if (!change) {
|
|
559
538
|
const index = evt.target.selectionEnd
|
|
560
539
|
nextTick(() => {
|
|
561
540
|
evt.target.setSelectionRange(index, index)
|
|
@@ -620,7 +599,7 @@ export default createComponent({
|
|
|
620
599
|
function getHeader() {
|
|
621
600
|
const child = []
|
|
622
601
|
|
|
623
|
-
if (props.noHeaderTabs
|
|
602
|
+
if (!props.noHeaderTabs) {
|
|
624
603
|
child.push(
|
|
625
604
|
h(
|
|
626
605
|
QTabs,
|
|
@@ -633,13 +612,13 @@ export default createComponent({
|
|
|
633
612
|
},
|
|
634
613
|
() => [
|
|
635
614
|
h(QTab, {
|
|
636
|
-
label: 'HEX' + (hasAlpha.value
|
|
615
|
+
label: 'HEX' + (hasAlpha.value ? 'A' : ''),
|
|
637
616
|
name: 'hex',
|
|
638
617
|
ripple: false
|
|
639
618
|
}),
|
|
640
619
|
|
|
641
620
|
h(QTab, {
|
|
642
|
-
label: 'RGB' + (hasAlpha.value
|
|
621
|
+
label: 'RGB' + (hasAlpha.value ? 'A' : ''),
|
|
643
622
|
name: 'rgb',
|
|
644
623
|
ripple: false
|
|
645
624
|
})
|
|
@@ -658,14 +637,14 @@ export default createComponent({
|
|
|
658
637
|
h('input', {
|
|
659
638
|
class: 'fit',
|
|
660
639
|
value: model.value[topView.value],
|
|
661
|
-
...(editable.value
|
|
640
|
+
...(editable.value ? {} : { readonly: true }),
|
|
662
641
|
...getCache('topIn', {
|
|
663
642
|
onInput: evt => {
|
|
664
|
-
updateErrorIcon(onEditorChange(evt)
|
|
643
|
+
updateErrorIcon(onEditorChange(evt))
|
|
665
644
|
},
|
|
666
645
|
onChange: stop,
|
|
667
646
|
onBlur: evt => {
|
|
668
|
-
if (onEditorChange(evt, true)
|
|
647
|
+
if (onEditorChange(evt, true)) proxy.$forceUpdate()
|
|
669
648
|
updateErrorIcon(false)
|
|
670
649
|
}
|
|
671
650
|
})
|
|
@@ -787,9 +766,9 @@ export default createComponent({
|
|
|
787
766
|
ref: spectrumRef,
|
|
788
767
|
class:
|
|
789
768
|
'q-color-picker__spectrum non-selectable relative-position cursor-pointer' +
|
|
790
|
-
(editable.value
|
|
769
|
+
(editable.value ? '' : ' readonly'),
|
|
791
770
|
style: spectrumStyle.value,
|
|
792
|
-
...(editable.value
|
|
771
|
+
...(editable.value
|
|
793
772
|
? {
|
|
794
773
|
onClick: onSpectrumClick,
|
|
795
774
|
onMousedown: onActivate
|
|
@@ -824,14 +803,14 @@ export default createComponent({
|
|
|
824
803
|
trackSize: '8px',
|
|
825
804
|
innerTrackColor: 'transparent',
|
|
826
805
|
selectionColor: 'transparent',
|
|
827
|
-
readonly: editable.value
|
|
806
|
+
readonly: !editable.value,
|
|
828
807
|
thumbPath,
|
|
829
808
|
'onUpdate:modelValue': onHue,
|
|
830
809
|
onChange: onHueChange
|
|
831
810
|
})
|
|
832
811
|
]
|
|
833
812
|
|
|
834
|
-
if (hasAlpha.value
|
|
813
|
+
if (hasAlpha.value) {
|
|
835
814
|
sliders.push(
|
|
836
815
|
h(QSlider, {
|
|
837
816
|
class: 'q-color-picker__alpha non-selectable',
|
|
@@ -843,7 +822,7 @@ export default createComponent({
|
|
|
843
822
|
innerTrackColor: 'transparent',
|
|
844
823
|
selectionColor: 'transparent',
|
|
845
824
|
trackImg: alphaTrackImg,
|
|
846
|
-
readonly: editable.value
|
|
825
|
+
readonly: !editable.value,
|
|
847
826
|
hideSelection: true,
|
|
848
827
|
thumbPath,
|
|
849
828
|
...getCache('alphaSlide', {
|
|
@@ -877,7 +856,7 @@ export default createComponent({
|
|
|
877
856
|
max: 255,
|
|
878
857
|
color: 'red',
|
|
879
858
|
dark: isDark.value,
|
|
880
|
-
readonly: editable.value
|
|
859
|
+
readonly: !editable.value,
|
|
881
860
|
...getCache('rSlide', {
|
|
882
861
|
'onUpdate:modelValue': value => onNumericChange(value, 'r', 255),
|
|
883
862
|
onChange: value => onNumericChange(value, 'r', 255, void 0, true)
|
|
@@ -886,7 +865,7 @@ export default createComponent({
|
|
|
886
865
|
h('input', {
|
|
887
866
|
value: model.value.r,
|
|
888
867
|
maxlength: 3,
|
|
889
|
-
readonly: editable.value
|
|
868
|
+
readonly: !editable.value,
|
|
890
869
|
onChange: stop,
|
|
891
870
|
...getCache('rIn', {
|
|
892
871
|
onInput: evt => onNumericChange(evt.target.value, 'r', 255, evt),
|
|
@@ -904,7 +883,7 @@ export default createComponent({
|
|
|
904
883
|
max: 255,
|
|
905
884
|
color: 'green',
|
|
906
885
|
dark: isDark.value,
|
|
907
|
-
readonly: editable.value
|
|
886
|
+
readonly: !editable.value,
|
|
908
887
|
...getCache('gSlide', {
|
|
909
888
|
'onUpdate:modelValue': value => onNumericChange(value, 'g', 255),
|
|
910
889
|
onChange: value => onNumericChange(value, 'g', 255, void 0, true)
|
|
@@ -913,7 +892,7 @@ export default createComponent({
|
|
|
913
892
|
h('input', {
|
|
914
893
|
value: model.value.g,
|
|
915
894
|
maxlength: 3,
|
|
916
|
-
readonly: editable.value
|
|
895
|
+
readonly: !editable.value,
|
|
917
896
|
onChange: stop,
|
|
918
897
|
...getCache('gIn', {
|
|
919
898
|
onInput: evt => onNumericChange(evt.target.value, 'g', 255, evt),
|
|
@@ -930,7 +909,7 @@ export default createComponent({
|
|
|
930
909
|
min: 0,
|
|
931
910
|
max: 255,
|
|
932
911
|
color: 'blue',
|
|
933
|
-
readonly: editable.value
|
|
912
|
+
readonly: !editable.value,
|
|
934
913
|
dark: isDark.value,
|
|
935
914
|
...getCache('bSlide', {
|
|
936
915
|
'onUpdate:modelValue': value => onNumericChange(value, 'b', 255),
|
|
@@ -940,7 +919,7 @@ export default createComponent({
|
|
|
940
919
|
h('input', {
|
|
941
920
|
value: model.value.b,
|
|
942
921
|
maxlength: 3,
|
|
943
|
-
readonly: editable.value
|
|
922
|
+
readonly: !editable.value,
|
|
944
923
|
onChange: stop,
|
|
945
924
|
...getCache('bIn', {
|
|
946
925
|
onInput: evt => onNumericChange(evt.target.value, 'b', 255, evt),
|
|
@@ -950,13 +929,13 @@ export default createComponent({
|
|
|
950
929
|
})
|
|
951
930
|
]),
|
|
952
931
|
|
|
953
|
-
hasAlpha.value
|
|
932
|
+
hasAlpha.value
|
|
954
933
|
? h('div', { class: 'row items-center no-wrap' }, [
|
|
955
934
|
h('div', 'A'),
|
|
956
935
|
h(QSlider, {
|
|
957
936
|
modelValue: model.value.a,
|
|
958
937
|
color: 'grey',
|
|
959
|
-
readonly: editable.value
|
|
938
|
+
readonly: !editable.value,
|
|
960
939
|
dark: isDark.value,
|
|
961
940
|
...getCache('aSlide', {
|
|
962
941
|
'onUpdate:modelValue': value =>
|
|
@@ -968,7 +947,7 @@ export default createComponent({
|
|
|
968
947
|
h('input', {
|
|
969
948
|
value: model.value.a,
|
|
970
949
|
maxlength: 3,
|
|
971
|
-
readonly: editable.value
|
|
950
|
+
readonly: !editable.value,
|
|
972
951
|
onChange: stop,
|
|
973
952
|
...getCache('aIn', {
|
|
974
953
|
onInput: evt =>
|
|
@@ -987,7 +966,7 @@ export default createComponent({
|
|
|
987
966
|
h('div', {
|
|
988
967
|
class: 'q-color-picker__cube col-auto',
|
|
989
968
|
style: { backgroundColor: color },
|
|
990
|
-
...(editable.value
|
|
969
|
+
...(editable.value
|
|
991
970
|
? getCache('palette#' + color, {
|
|
992
971
|
onClick: () => {
|
|
993
972
|
onPalettePick(color)
|
|
@@ -1002,9 +981,7 @@ export default createComponent({
|
|
|
1002
981
|
{
|
|
1003
982
|
class:
|
|
1004
983
|
'row items-center q-color-picker__palette-rows' +
|
|
1005
|
-
(editable.value
|
|
1006
|
-
? ' q-color-picker__palette-rows--editable'
|
|
1007
|
-
: '')
|
|
984
|
+
(editable.value ? ' q-color-picker__palette-rows--editable' : '')
|
|
1008
985
|
},
|
|
1009
986
|
computedPalette.value.map(fn)
|
|
1010
987
|
)
|
|
@@ -1014,12 +991,12 @@ export default createComponent({
|
|
|
1014
991
|
return () => {
|
|
1015
992
|
const child = [getContent()]
|
|
1016
993
|
|
|
1017
|
-
if (props.name !== void 0 && props.disable
|
|
994
|
+
if (props.name !== void 0 && !props.disable) {
|
|
1018
995
|
injectFormInput(child, 'push')
|
|
1019
996
|
}
|
|
1020
997
|
|
|
1021
|
-
if (props.noHeader
|
|
1022
|
-
if (props.noFooter
|
|
998
|
+
if (!props.noHeader) child.unshift(getHeader())
|
|
999
|
+
if (!props.noFooter) child.push(getFooter())
|
|
1023
1000
|
|
|
1024
1001
|
return h(
|
|
1025
1002
|
'div',
|