quasar 2.18.7 → 2.19.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/README.md +2 -0
- package/dist/api/BottomSheet.json +1 -1
- package/dist/api/Dialog.json +1 -1
- package/dist/api/Intersection.json +1 -1
- package/dist/api/Lang.json +1 -1
- package/dist/api/LocalStorage.json +1 -1
- package/dist/api/Notify.json +1 -1
- package/dist/api/QBtnDropdown.json +1 -1
- package/dist/api/QBtnToggle.json +1 -1
- package/dist/api/QCarousel.json +1 -1
- package/dist/api/QCarouselControl.json +1 -1
- package/dist/api/QChatMessage.json +1 -1
- package/dist/api/QCheckbox.json +1 -1
- package/dist/api/QColor.json +1 -1
- package/dist/api/QDate.json +1 -1
- package/dist/api/QEditor.json +1 -1
- package/dist/api/QField.json +1 -1
- package/dist/api/QFile.json +1 -1
- package/dist/api/QInput.json +1 -1
- package/dist/api/QIntersection.json +1 -1
- package/dist/api/QMenu.json +1 -1
- package/dist/api/QOptionGroup.json +1 -1
- package/dist/api/QPageScroller.json +1 -1
- package/dist/api/QPageSticky.json +1 -1
- package/dist/api/QPopupEdit.json +1 -1
- package/dist/api/QRange.json +1 -1
- package/dist/api/QRating.json +1 -1
- package/dist/api/QScrollArea.json +1 -1
- package/dist/api/QSelect.json +1 -1
- package/dist/api/QSlider.json +1 -1
- package/dist/api/QSplitter.json +1 -1
- package/dist/api/QStepper.json +1 -1
- package/dist/api/QTabPanels.json +1 -1
- package/dist/api/QTable.json +1 -1
- package/dist/api/QTime.json +1 -1
- package/dist/api/QToggle.json +1 -1
- package/dist/api/QTooltip.json +1 -1
- package/dist/api/QTree.json +1 -1
- package/dist/api/QUploader.json +1 -1
- package/dist/api/QVirtualScroll.json +1 -1
- package/dist/api/Ripple.json +1 -1
- package/dist/api/SessionStorage.json +1 -1
- package/dist/icon-set/bootstrap-icons.umd.prod.js +5 -6
- package/dist/icon-set/eva-icons.umd.prod.js +5 -6
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +5 -6
- package/dist/icon-set/fontawesome-v5.umd.prod.js +5 -6
- package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +5 -6
- package/dist/icon-set/fontawesome-v6.umd.prod.js +5 -6
- package/dist/icon-set/ionicons-v4.umd.prod.js +5 -6
- package/dist/icon-set/line-awesome.umd.prod.js +5 -6
- package/dist/icon-set/material-icons-outlined.umd.prod.js +5 -6
- package/dist/icon-set/material-icons-round.umd.prod.js +5 -6
- package/dist/icon-set/material-icons-sharp.umd.prod.js +5 -6
- package/dist/icon-set/material-icons.umd.prod.js +5 -6
- package/dist/icon-set/material-symbols-outlined.umd.prod.js +5 -6
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +5 -6
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v3.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v4.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v5.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v6.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v7.umd.prod.js +5 -6
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +5 -6
- package/dist/icon-set/svg-eva-icons.umd.prod.js +5 -6
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +5 -6
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +5 -6
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +5 -6
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +5 -6
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +5 -6
- package/dist/icon-set/svg-line-awesome.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-icons.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +5 -6
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +5 -6
- package/dist/icon-set/svg-mdi-v7.umd.prod.js +5 -6
- package/dist/icon-set/svg-themify.umd.prod.js +5 -6
- package/dist/icon-set/themify.umd.prod.js +5 -6
- package/dist/lang/ar-TN.umd.prod.js +5 -6
- package/dist/lang/ar.umd.prod.js +5 -6
- package/dist/lang/az-Latn.umd.prod.js +5 -6
- package/dist/lang/bg.umd.prod.js +5 -6
- package/dist/lang/bn.umd.prod.js +5 -6
- package/dist/lang/bs-BA.umd.prod.js +5 -6
- package/dist/lang/ca.umd.prod.js +5 -6
- package/dist/lang/cs.umd.prod.js +5 -6
- package/dist/lang/da.umd.prod.js +5 -6
- package/dist/lang/de-CH.umd.prod.js +5 -6
- package/dist/lang/de-DE.umd.prod.js +5 -6
- package/dist/lang/de.umd.prod.js +5 -6
- package/dist/lang/el.umd.prod.js +5 -6
- package/dist/lang/en-GB.umd.prod.js +5 -6
- package/dist/lang/en-US.umd.prod.js +5 -6
- package/dist/lang/eo.umd.prod.js +5 -6
- package/dist/lang/es.umd.prod.js +5 -6
- package/dist/lang/et.umd.prod.js +5 -6
- package/dist/lang/eu.umd.prod.js +5 -6
- package/dist/lang/fa-IR.umd.prod.js +5 -6
- package/dist/lang/fa.umd.prod.js +5 -6
- package/dist/lang/fi.umd.prod.js +5 -6
- package/dist/lang/fr.umd.prod.js +5 -6
- package/dist/lang/gn.umd.prod.js +5 -6
- package/dist/lang/he.umd.prod.js +5 -6
- package/dist/lang/hi.umd.prod.js +5 -6
- package/dist/lang/hr.umd.prod.js +5 -6
- package/dist/lang/hu.umd.prod.js +5 -6
- package/dist/lang/id.umd.prod.js +5 -6
- package/dist/lang/is.umd.prod.js +5 -6
- package/dist/lang/it.umd.prod.js +5 -6
- package/dist/lang/ja.umd.prod.js +5 -6
- package/dist/lang/kk.umd.prod.js +5 -6
- package/dist/lang/km.umd.prod.js +5 -6
- package/dist/lang/ko-KR.umd.prod.js +5 -6
- package/dist/lang/kur-CKB.umd.prod.js +5 -6
- package/dist/lang/lt.umd.prod.js +5 -6
- package/dist/lang/lu.umd.prod.js +5 -6
- package/dist/lang/lv.umd.prod.js +5 -6
- package/dist/lang/mk.umd.prod.js +5 -6
- package/dist/lang/ml.umd.prod.js +5 -6
- package/dist/lang/mm.umd.prod.js +5 -6
- package/dist/lang/ms-MY.umd.prod.js +5 -6
- package/dist/lang/ms.umd.prod.js +5 -6
- package/dist/lang/my.umd.prod.js +5 -6
- package/dist/lang/nb-NO.umd.prod.js +5 -6
- package/dist/lang/nl.umd.prod.js +5 -6
- package/dist/lang/pl.umd.prod.js +5 -6
- package/dist/lang/pt-BR.umd.prod.js +5 -6
- package/dist/lang/pt.umd.prod.js +5 -6
- package/dist/lang/ro.umd.prod.js +5 -6
- package/dist/lang/ru.umd.prod.js +5 -6
- package/dist/lang/sk.umd.prod.js +5 -6
- package/dist/lang/sl.umd.prod.js +5 -6
- package/dist/lang/sm.umd.prod.js +5 -6
- package/dist/lang/sq.umd.prod.js +5 -6
- package/dist/lang/sr-CYR.umd.prod.js +5 -6
- package/dist/lang/sr.umd.prod.js +5 -6
- package/dist/lang/sv.umd.prod.js +5 -6
- package/dist/lang/ta.umd.prod.js +5 -6
- package/dist/lang/th.umd.prod.js +5 -6
- package/dist/lang/tl.umd.prod.js +5 -6
- package/dist/lang/tr.umd.prod.js +5 -6
- package/dist/lang/ug.umd.prod.js +5 -6
- package/dist/lang/uk.umd.prod.js +5 -6
- package/dist/lang/ur-PK.umd.prod.js +5 -6
- package/dist/lang/uz-Cyrl.umd.prod.js +5 -6
- package/dist/lang/uz-Latn.umd.prod.js +5 -6
- package/dist/lang/vi.umd.prod.js +5 -6
- package/dist/lang/zh-CN.umd.prod.js +5 -6
- package/dist/lang/zh-TW.umd.prod.js +5 -6
- package/dist/quasar.addon.prod.css +1 -1
- package/dist/quasar.addon.rtl.prod.css +1 -1
- package/dist/quasar.client.js +24830 -29220
- package/dist/quasar.css +15 -28
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +14 -28
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +4 -25
- package/dist/quasar.server.prod.cjs +78 -79
- package/dist/quasar.server.prod.js +78 -79
- package/dist/quasar.umd.js +25876 -29791
- package/dist/quasar.umd.prod.js +78 -79
- package/dist/types/api/dialog.d.ts +1 -1
- package/dist/types/api/qinput.d.ts +1 -1
- package/dist/types/api/qtable.d.ts +1 -1
- package/dist/types/api/qtree.d.ts +1 -1
- package/dist/types/api/quploader.d.ts +1 -1
- package/dist/types/api/slider.d.ts +2 -4
- package/dist/types/api/validation.d.ts +1 -1
- package/dist/types/api/web-storage.d.ts +6 -6
- package/dist/types/feature-flag.d.ts +1 -1
- package/dist/types/globals.d.ts +7 -4
- package/dist/types/index.d.ts +126 -414
- package/dist/types/lang.d.ts +3 -3
- package/dist/types/ts-helpers.d.ts +4 -9
- package/dist/types/utils/colors.d.ts +1 -1
- package/dist/types/utils/date.d.ts +8 -8
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils/run-sequential-promises.d.ts +12 -12
- package/dist/types/utils/scroll.d.ts +5 -5
- package/dist/types/utils.d.ts +16 -19
- package/dist/web-types/web-types.json +1 -1
- package/icon-set/bootstrap-icons.js +1 -4
- package/icon-set/svg-bootstrap-icons.js +1 -4
- package/icon-set/svg-fontawesome-v5.js +0 -1
- package/icon-set/svg-ionicons-v5.js +2 -2
- package/lang/ar-TN.js +10 -8
- package/lang/ar.js +10 -8
- package/lang/az-Latn.js +13 -9
- package/lang/bg.js +10 -8
- package/lang/bn.js +14 -9
- package/lang/bs-BA.js +13 -9
- package/lang/ca.js +18 -14
- package/lang/cs.js +9 -7
- package/lang/da.js +10 -8
- package/lang/de-CH.js +13 -9
- package/lang/de-DE.js +13 -9
- package/lang/de.js +13 -9
- package/lang/el.js +10 -8
- package/lang/en-GB.js +10 -8
- package/lang/en-US.js +10 -8
- package/lang/eo.js +14 -9
- package/lang/es.js +10 -8
- package/lang/et.js +15 -12
- package/lang/eu.js +15 -12
- package/lang/fa-IR.js +16 -8
- package/lang/fa.js +16 -8
- package/lang/fi.js +17 -8
- package/lang/fr.js +21 -13
- package/lang/gn.js +14 -12
- package/lang/he.js +15 -10
- package/lang/hi.js +8 -8
- package/lang/hr.js +13 -9
- package/lang/hu.js +10 -8
- package/lang/id.js +11 -9
- package/lang/is.js +13 -9
- package/lang/it.js +14 -9
- package/lang/ja.js +13 -8
- package/lang/kk.js +22 -11
- package/lang/km.js +9 -8
- package/lang/ko-KR.js +9 -10
- package/lang/kur-CKB.js +16 -17
- package/lang/lt.js +26 -19
- package/lang/lu.js +13 -9
- package/lang/lv.js +13 -9
- package/lang/mk.js +10 -8
- package/lang/ml.js +15 -14
- package/lang/mm.js +16 -13
- package/lang/ms-MY.js +16 -11
- package/lang/ms.js +10 -8
- package/lang/my.js +15 -8
- package/lang/nb-NO.js +10 -8
- package/lang/nl.js +13 -9
- package/lang/pl.js +13 -9
- package/lang/pt-BR.js +17 -10
- package/lang/pt.js +17 -10
- package/lang/ro.js +10 -8
- package/lang/ru.js +25 -12
- package/lang/sk.js +18 -9
- package/lang/sl.js +12 -8
- package/lang/sm.js +51 -47
- package/lang/sq.js +13 -9
- package/lang/sr-CYR.js +10 -8
- package/lang/sr.js +10 -8
- package/lang/sv.js +10 -8
- package/lang/ta.js +10 -8
- package/lang/th.js +12 -11
- package/lang/tl.js +10 -8
- package/lang/tr.js +8 -5
- package/lang/ug.js +16 -8
- package/lang/uk.js +22 -11
- package/lang/ur-PK.js +13 -11
- package/lang/uz-Cyrl.js +5 -5
- package/lang/uz-Latn.js +24 -24
- package/lang/vi.js +13 -9
- package/lang/zh-CN.js +18 -9
- package/lang/zh-TW.js +20 -10
- package/package.json +50 -64
- package/src/api.extends.json +15 -12
- package/src/components/ajax-bar/QAjaxBar.js +91 -65
- package/src/components/ajax-bar/QAjaxBar.json +2 -2
- package/src/components/ajax-bar/index.js +1 -3
- package/src/components/avatar/QAvatar.js +36 -28
- package/src/components/avatar/QAvatar.json +2 -2
- package/src/components/avatar/QAvatar.test.js +29 -78
- package/src/components/avatar/index.js +1 -3
- package/src/components/badge/QBadge.js +33 -26
- package/src/components/badge/QBadge.json +3 -3
- package/src/components/badge/QBadge.test.js +40 -95
- package/src/components/badge/index.js +1 -3
- package/src/components/banner/QBanner.js +46 -25
- package/src/components/banner/QBanner.test.js +14 -35
- package/src/components/banner/index.js +1 -3
- package/src/components/bar/QBar.js +21 -11
- package/src/components/bar/QBar.test.js +6 -17
- package/src/components/bar/index.js +1 -3
- package/src/components/breadcrumbs/QBreadcrumbs.js +44 -32
- package/src/components/breadcrumbs/QBreadcrumbs.json +10 -3
- package/src/components/breadcrumbs/QBreadcrumbs.test.js +56 -69
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +28 -22
- package/src/components/breadcrumbs/QBreadcrumbsEl.json +5 -8
- package/src/components/breadcrumbs/QBreadcrumbsEl.test.js +60 -134
- package/src/components/breadcrumbs/index.js +1 -4
- package/src/components/btn/QBtn.js +159 -103
- package/src/components/btn/QBtn.json +3 -6
- package/src/components/btn/QBtn.test.js +269 -496
- package/src/components/btn/index.js +1 -3
- package/src/components/btn/use-btn.js +82 -70
- package/src/components/btn/use-btn.json +33 -16
- package/src/components/btn/use-btn.test.js +30 -47
- package/src/components/btn-dropdown/QBtnDropdown.js +143 -104
- package/src/components/btn-dropdown/QBtnDropdown.json +41 -16
- package/src/components/btn-dropdown/index.js +1 -3
- package/src/components/btn-group/QBtnGroup.js +18 -6
- package/src/components/btn-group/index.js +1 -3
- package/src/components/btn-toggle/QBtnToggle.js +80 -61
- package/src/components/btn-toggle/QBtnToggle.json +16 -9
- package/src/components/btn-toggle/index.js +1 -3
- package/src/components/card/QCard.js +14 -9
- package/src/components/card/QCard.json +1 -1
- package/src/components/card/QCardActions.js +8 -5
- package/src/components/card/QCardActions.json +9 -1
- package/src/components/card/QCardSection.js +5 -4
- package/src/components/card/QCardSection.json +1 -1
- package/src/components/card/index.js +1 -5
- package/src/components/carousel/QCarousel.js +194 -125
- package/src/components/carousel/QCarousel.json +10 -11
- package/src/components/carousel/QCarouselControl.js +26 -13
- package/src/components/carousel/QCarouselControl.json +10 -5
- package/src/components/carousel/QCarouselSlide.js +13 -10
- package/src/components/carousel/QCarouselSlide.json +1 -1
- package/src/components/carousel/index.js +1 -5
- package/src/components/chat/QChatMessage.js +62 -57
- package/src/components/chat/QChatMessage.json +8 -5
- package/src/components/chat/index.js +1 -3
- package/src/components/checkbox/QCheckbox.js +56 -41
- package/src/components/checkbox/QCheckbox.json +1 -1
- package/src/components/checkbox/index.js +1 -3
- package/src/components/checkbox/use-checkbox.js +112 -83
- package/src/components/checkbox/use-checkbox.json +15 -12
- package/src/components/chip/QChip.js +101 -73
- package/src/components/chip/QChip.json +6 -6
- package/src/components/chip/QChip.test.js +72 -180
- package/src/components/chip/index.js +1 -3
- package/src/components/circular-progress/QCircularProgress.js +92 -57
- package/src/components/circular-progress/QCircularProgress.json +2 -2
- package/src/components/circular-progress/index.js +1 -3
- package/src/components/color/QColor.js +550 -367
- package/src/components/color/QColor.json +8 -8
- package/src/components/color/index.js +1 -3
- package/src/components/date/QDate.js +902 -607
- package/src/components/date/QDate.json +32 -23
- package/src/components/date/index.js +1 -3
- package/src/components/date/use-datetime.js +12 -14
- package/src/components/date/use-datetime.json +7 -7
- package/src/components/dialog/QDialog.js +178 -139
- package/src/components/dialog/QDialog.json +8 -4
- package/src/components/dialog/QDialog.test.js +123 -228
- package/src/components/dialog/index.js +1 -3
- package/src/components/drawer/QDrawer.js +306 -242
- package/src/components/drawer/QDrawer.json +4 -4
- package/src/components/drawer/index.js +1 -3
- package/src/components/editor/QEditor.js +409 -190
- package/src/components/editor/QEditor.json +33 -32
- package/src/components/editor/editor-caret.js +78 -83
- package/src/components/editor/editor-utils.js +176 -130
- package/src/components/editor/index.js +1 -3
- package/src/components/expansion-item/QExpansionItem.js +149 -103
- package/src/components/expansion-item/QExpansionItem.json +21 -24
- package/src/components/expansion-item/index.js +1 -3
- package/src/components/fab/QFab.js +86 -54
- package/src/components/fab/QFab.json +6 -3
- package/src/components/fab/QFabAction.js +34 -29
- package/src/components/fab/QFabAction.json +4 -7
- package/src/components/fab/index.js +1 -4
- package/src/components/fab/use-fab.js +20 -20
- package/src/components/fab/use-fab.json +10 -13
- package/src/components/field/QField.js +7 -5
- package/src/components/field/QField.json +6 -6
- package/src/components/field/QField.sass +0 -8
- package/src/components/field/index.js +1 -3
- package/src/components/file/QFile.js +95 -74
- package/src/components/file/QFile.json +17 -14
- package/src/components/file/index.js +1 -3
- package/src/components/footer/QFooter.js +110 -67
- package/src/components/footer/QFooter.json +2 -2
- package/src/components/footer/index.js +1 -3
- package/src/components/form/QForm.js +93 -58
- package/src/components/form/QForm.json +2 -2
- package/src/components/form/QFormChildMixin.js +10 -11
- package/src/components/form/QFormChildMixin.json +2 -2
- package/src/components/form/index.js +1 -4
- package/src/components/header/QHeader.js +93 -56
- package/src/components/header/QHeader.json +2 -2
- package/src/components/header/index.js +1 -3
- package/src/components/icon/QIcon.js +70 -57
- package/src/components/icon/QIcon.json +2 -2
- package/src/components/icon/index.js +1 -3
- package/src/components/img/QImg.js +104 -98
- package/src/components/img/QImg.json +20 -18
- package/src/components/img/index.js +1 -3
- package/src/components/infinite-scroll/QInfiniteScroll.js +123 -64
- package/src/components/infinite-scroll/QInfiniteScroll.json +1 -1
- package/src/components/infinite-scroll/index.js +1 -3
- package/src/components/inner-loading/QInnerLoading.js +31 -23
- package/src/components/inner-loading/QInnerLoading.json +9 -9
- package/src/components/inner-loading/index.js +1 -3
- package/src/components/input/QInput.js +179 -137
- package/src/components/input/QInput.json +25 -15
- package/src/components/input/index.js +1 -3
- package/src/components/input/use-mask.js +328 -243
- package/src/components/input/use-mask.json +16 -8
- package/src/components/intersection/QIntersection.js +45 -28
- package/src/components/intersection/QIntersection.json +7 -10
- package/src/components/intersection/index.js +1 -3
- package/src/components/item/QItem.js +60 -52
- package/src/components/item/QItem.json +6 -9
- package/src/components/item/QItemLabel.js +23 -15
- package/src/components/item/QItemLabel.json +1 -1
- package/src/components/item/QItemSection.js +11 -8
- package/src/components/item/QList.js +21 -13
- package/src/components/item/QList.json +1 -1
- package/src/components/item/QList.test.js +7 -11
- package/src/components/item/index.js +1 -7
- package/src/components/knob/QKnob.js +86 -76
- package/src/components/knob/QKnob.json +6 -3
- package/src/components/knob/index.js +1 -3
- package/src/components/layout/QLayout.js +98 -69
- package/src/components/layout/QLayout.json +2 -2
- package/src/components/layout/index.js +1 -3
- package/src/components/linear-progress/QLinearProgress.js +78 -47
- package/src/components/linear-progress/QLinearProgress.json +3 -3
- package/src/components/linear-progress/index.js +1 -3
- package/src/components/markup-table/QMarkupTable.js +25 -17
- package/src/components/markup-table/QMarkupTable.json +2 -2
- package/src/components/markup-table/index.js +1 -3
- package/src/components/menu/QMenu.js +144 -100
- package/src/components/menu/QMenu.json +39 -10
- package/src/components/menu/index.js +1 -3
- package/src/components/no-ssr/QNoSsr.js +5 -5
- package/src/components/no-ssr/QNoSsr.json +2 -2
- package/src/components/no-ssr/index.js +1 -3
- package/src/components/option-group/QOptionGroup.js +84 -66
- package/src/components/option-group/QOptionGroup.json +35 -21
- package/src/components/option-group/index.js +1 -3
- package/src/components/page/QPage.js +35 -22
- package/src/components/page/QPage.json +1 -1
- package/src/components/page/QPageContainer.js +24 -11
- package/src/components/page/index.js +1 -4
- package/src/components/page-scroller/QPageScroller.js +49 -32
- package/src/components/page-scroller/QPageScroller.json +2 -2
- package/src/components/page-scroller/index.js +1 -3
- package/src/components/page-sticky/QPageSticky.js +1 -1
- package/src/components/page-sticky/QPageSticky.json +9 -4
- package/src/components/page-sticky/index.js +1 -3
- package/src/components/page-sticky/use-page-sticky.js +47 -36
- package/src/components/pagination/QPagination.js +210 -146
- package/src/components/pagination/QPagination.json +35 -21
- package/src/components/pagination/index.js +1 -3
- package/src/components/parallax/QParallax.js +81 -56
- package/src/components/parallax/index.js +1 -3
- package/src/components/popup-edit/QPopupEdit.js +88 -59
- package/src/components/popup-edit/QPopupEdit.json +40 -16
- package/src/components/popup-edit/index.js +1 -3
- package/src/components/popup-proxy/QPopupProxy.js +30 -19
- package/src/components/popup-proxy/QPopupProxy.json +3 -3
- package/src/components/popup-proxy/index.js +1 -3
- package/src/components/pull-to-refresh/QPullToRefresh.js +71 -49
- package/src/components/pull-to-refresh/index.js +1 -3
- package/src/components/radio/QRadio.js +133 -95
- package/src/components/radio/QRadio.json +11 -8
- package/src/components/radio/index.js +1 -3
- package/src/components/range/QRange.js +151 -104
- package/src/components/range/QRange.json +9 -9
- package/src/components/range/index.js +1 -3
- package/src/components/rating/QRating.js +171 -112
- package/src/components/rating/QRating.json +19 -12
- package/src/components/rating/index.js +1 -3
- package/src/components/resize-observer/QResizeObserver.js +52 -30
- package/src/components/resize-observer/QResizeObserver.json +2 -2
- package/src/components/resize-observer/index.js +1 -3
- package/src/components/responsive/QResponsive.js +27 -14
- package/src/components/responsive/QResponsive.json +1 -1
- package/src/components/responsive/index.js +1 -3
- package/src/components/scroll-area/QScrollArea.js +279 -192
- package/src/components/scroll-area/QScrollArea.json +31 -21
- package/src/components/scroll-area/ScrollAreaControls.js +6 -11
- package/src/components/scroll-area/index.js +1 -3
- package/src/components/scroll-observer/QScrollObserver.js +46 -26
- package/src/components/scroll-observer/QScrollObserver.json +4 -4
- package/src/components/scroll-observer/index.js +1 -3
- package/src/components/select/QSelect.js +710 -519
- package/src/components/select/QSelect.json +70 -45
- package/src/components/select/index.js +1 -3
- package/src/components/separator/QSeparator.js +34 -30
- package/src/components/separator/QSeparator.json +4 -4
- package/src/components/separator/index.js +1 -3
- package/src/components/skeleton/QSkeleton.js +49 -23
- package/src/components/skeleton/QSkeleton.json +26 -9
- package/src/components/skeleton/index.js +1 -3
- package/src/components/slide-item/QSlideItem.js +121 -94
- package/src/components/slide-item/QSlideItem.json +2 -2
- package/src/components/slide-item/index.js +1 -3
- package/src/components/slide-transition/QSlideTransition.js +34 -26
- package/src/components/slide-transition/index.js +1 -3
- package/src/components/slider/QSlider.js +64 -43
- package/src/components/slider/QSlider.json +6 -6
- package/src/components/slider/index.js +1 -3
- package/src/components/slider/use-slider.js +327 -220
- package/src/components/slider/use-slider.json +32 -32
- package/src/components/space/QSpace.js +1 -1
- package/src/components/space/QSpace.test.js +1 -4
- package/src/components/space/index.js +1 -3
- package/src/components/spinner/QSpinner.js +23 -18
- package/src/components/spinner/QSpinner.json +1 -1
- package/src/components/spinner/QSpinner.test.js +11 -27
- package/src/components/spinner/QSpinnerAudio.js +13 -11
- package/src/components/spinner/QSpinnerAudio.json +1 -1
- package/src/components/spinner/QSpinnerAudio.test.js +9 -21
- package/src/components/spinner/QSpinnerBall.js +13 -11
- package/src/components/spinner/QSpinnerBall.json +1 -1
- package/src/components/spinner/QSpinnerBall.test.js +9 -21
- package/src/components/spinner/QSpinnerBars.js +13 -11
- package/src/components/spinner/QSpinnerBars.json +1 -1
- package/src/components/spinner/QSpinnerBars.test.js +9 -21
- package/src/components/spinner/QSpinnerBox.js +13 -11
- package/src/components/spinner/QSpinnerBox.json +1 -1
- package/src/components/spinner/QSpinnerBox.test.js +9 -21
- package/src/components/spinner/QSpinnerClock.js +13 -11
- package/src/components/spinner/QSpinnerClock.json +1 -1
- package/src/components/spinner/QSpinnerClock.test.js +9 -21
- package/src/components/spinner/QSpinnerComment.js +13 -11
- package/src/components/spinner/QSpinnerComment.json +1 -1
- package/src/components/spinner/QSpinnerComment.test.js +9 -21
- package/src/components/spinner/QSpinnerCube.js +13 -11
- package/src/components/spinner/QSpinnerCube.json +1 -1
- package/src/components/spinner/QSpinnerCube.test.js +9 -21
- package/src/components/spinner/QSpinnerDots.js +13 -11
- package/src/components/spinner/QSpinnerDots.json +1 -1
- package/src/components/spinner/QSpinnerDots.test.js +9 -21
- package/src/components/spinner/QSpinnerFacebook.js +13 -11
- package/src/components/spinner/QSpinnerFacebook.json +1 -1
- package/src/components/spinner/QSpinnerFacebook.test.js +9 -21
- package/src/components/spinner/QSpinnerGears.js +13 -11
- package/src/components/spinner/QSpinnerGears.json +1 -1
- package/src/components/spinner/QSpinnerGears.test.js +9 -21
- package/src/components/spinner/QSpinnerGrid.js +13 -11
- package/src/components/spinner/QSpinnerGrid.json +1 -1
- package/src/components/spinner/QSpinnerGrid.test.js +9 -21
- package/src/components/spinner/QSpinnerHearts.js +13 -11
- package/src/components/spinner/QSpinnerHearts.json +1 -1
- package/src/components/spinner/QSpinnerHearts.test.js +9 -21
- package/src/components/spinner/QSpinnerHourglass.js +13 -11
- package/src/components/spinner/QSpinnerHourglass.json +1 -1
- package/src/components/spinner/QSpinnerHourglass.test.js +9 -21
- package/src/components/spinner/QSpinnerInfinity.js +12 -10
- package/src/components/spinner/QSpinnerInfinity.json +1 -1
- package/src/components/spinner/QSpinnerInfinity.test.js +9 -21
- package/src/components/spinner/QSpinnerIos.js +13 -11
- package/src/components/spinner/QSpinnerIos.json +1 -1
- package/src/components/spinner/QSpinnerIos.test.js +9 -21
- package/src/components/spinner/QSpinnerOrbit.js +13 -11
- package/src/components/spinner/QSpinnerOrbit.json +1 -1
- package/src/components/spinner/QSpinnerOrbit.test.js +9 -21
- package/src/components/spinner/QSpinnerOval.js +13 -11
- package/src/components/spinner/QSpinnerOval.json +1 -1
- package/src/components/spinner/QSpinnerOval.test.js +9 -21
- package/src/components/spinner/QSpinnerPie.js +13 -11
- package/src/components/spinner/QSpinnerPie.json +1 -1
- package/src/components/spinner/QSpinnerPie.test.js +9 -21
- package/src/components/spinner/QSpinnerPuff.js +13 -11
- package/src/components/spinner/QSpinnerPuff.json +1 -1
- package/src/components/spinner/QSpinnerPuff.test.js +9 -21
- package/src/components/spinner/QSpinnerRadio.js +13 -11
- package/src/components/spinner/QSpinnerRadio.json +1 -1
- package/src/components/spinner/QSpinnerRadio.test.js +9 -21
- package/src/components/spinner/QSpinnerRings.js +13 -11
- package/src/components/spinner/QSpinnerRings.json +1 -1
- package/src/components/spinner/QSpinnerRings.test.js +9 -21
- package/src/components/spinner/QSpinnerTail.js +12 -10
- package/src/components/spinner/QSpinnerTail.json +1 -1
- package/src/components/spinner/QSpinnerTail.test.js +9 -21
- package/src/components/spinner/index.js +0 -1
- package/src/components/spinner/spinner.json +2 -2
- package/src/components/spinner/use-spinner.js +7 -7
- package/src/components/spinner/use-spinner.test.js +1 -1
- package/src/components/splitter/QSplitter.js +133 -94
- package/src/components/splitter/QSplitter.json +10 -19
- package/src/components/splitter/index.js +1 -3
- package/src/components/stepper/QStep.js +65 -42
- package/src/components/stepper/QStep.json +5 -5
- package/src/components/stepper/QStepper.js +62 -39
- package/src/components/stepper/QStepper.json +2 -2
- package/src/components/stepper/QStepperNavigation.js +1 -1
- package/src/components/stepper/StepHeader.js +87 -67
- package/src/components/stepper/index.js +1 -5
- package/src/components/tab-panels/QTabPanel.js +3 -2
- package/src/components/tab-panels/QTabPanel.json +1 -1
- package/src/components/tab-panels/QTabPanels.js +12 -6
- package/src/components/tab-panels/QTabPanels.json +1 -1
- package/src/components/tab-panels/index.js +1 -4
- package/src/components/table/QTable.js +544 -426
- package/src/components/table/QTable.json +168 -165
- package/src/components/table/QTd.js +18 -13
- package/src/components/table/QTd.json +1 -1
- package/src/components/table/QTh.js +25 -20
- package/src/components/table/QTh.json +1 -1
- package/src/components/table/QTr.js +17 -9
- package/src/components/table/QTr.json +1 -1
- package/src/components/table/get-table-middle.js +2 -4
- package/src/components/table/index.js +1 -6
- package/src/components/table/table-column-selection.js +45 -35
- package/src/components/table/table-filter.js +9 -8
- package/src/components/table/table-pagination.js +75 -52
- package/src/components/table/table-row-expand.js +15 -16
- package/src/components/table/table-row-selection.js +31 -31
- package/src/components/table/table-sort.js +26 -29
- package/src/components/tabs/QRouteTab.js +10 -12
- package/src/components/tabs/QRouteTab.json +6 -6
- package/src/components/tabs/QTab.js +1 -1
- package/src/components/tabs/QTab.json +1 -1
- package/src/components/tabs/QTabs.js +283 -205
- package/src/components/tabs/QTabs.json +9 -9
- package/src/components/tabs/index.js +1 -5
- package/src/components/tabs/use-tab.js +127 -103
- package/src/components/tabs/use-tab.json +8 -8
- package/src/components/time/QTime.js +502 -383
- package/src/components/time/QTime.json +19 -15
- package/src/components/time/index.js +1 -3
- package/src/components/timeline/QTimeline.js +10 -7
- package/src/components/timeline/QTimeline.json +2 -2
- package/src/components/timeline/QTimelineEntry.js +44 -27
- package/src/components/timeline/QTimelineEntry.json +7 -5
- package/src/components/timeline/index.js +1 -4
- package/src/components/toggle/QToggle.js +29 -19
- package/src/components/toggle/QToggle.json +1 -1
- package/src/components/toggle/index.js +1 -3
- package/src/components/toolbar/QToolbar.js +7 -5
- package/src/components/toolbar/QToolbar.test.js +2 -6
- package/src/components/toolbar/QToolbarTitle.js +5 -4
- package/src/components/toolbar/QToolbarTitle.test.js +2 -6
- package/src/components/toolbar/index.js +1 -4
- package/src/components/tooltip/QTooltip.js +125 -72
- package/src/components/tooltip/QTooltip.json +34 -10
- package/src/components/tooltip/index.js +1 -3
- package/src/components/tree/QTree.js +417 -297
- package/src/components/tree/QTree.json +27 -25
- package/src/components/tree/index.js +1 -3
- package/src/components/uploader/QUploader.json +9 -6
- package/src/components/uploader/QUploaderAddTrigger.js +5 -2
- package/src/components/uploader/index.js +1 -4
- package/src/components/uploader/uploader-core.js +262 -178
- package/src/components/uploader/xhr-uploader-plugin.js +96 -89
- package/src/components/uploader/xhr-uploader-plugin.json +29 -29
- package/src/components/video/QVideo.js +25 -19
- package/src/components/video/QVideo.json +5 -5
- package/src/components/video/QVideo.test.js +55 -85
- package/src/components/video/index.js +1 -3
- package/src/components/virtual-scroll/QVirtualScroll.js +89 -37
- package/src/components/virtual-scroll/QVirtualScroll.json +6 -6
- package/src/components/virtual-scroll/index.js +1 -3
- package/src/components/virtual-scroll/use-virtual-scroll.js +421 -240
- package/src/components/virtual-scroll/use-virtual-scroll.json +20 -13
- package/src/composables/private.use-align/use-align.js +8 -5
- package/src/composables/private.use-align/use-align.test.js +9 -17
- package/src/composables/private.use-anchor/use-anchor-static.json +2 -7
- package/src/composables/private.use-anchor/use-anchor.js +79 -62
- package/src/composables/private.use-anchor/use-anchor.json +1 -1
- package/src/composables/private.use-dark/use-dark.js +2 -6
- package/src/composables/private.use-dark/use-dark.test.js +7 -21
- package/src/composables/private.use-field/use-field.js +384 -251
- package/src/composables/private.use-field/use-field.json +10 -10
- package/src/composables/private.use-file/use-file-dom-props.js +11 -15
- package/src/composables/private.use-file/use-file.js +86 -67
- package/src/composables/private.use-file/use-file.json +8 -8
- package/src/composables/private.use-fullscreen/use-fullscreen.js +35 -17
- package/src/composables/private.use-fullscreen/use-fullscreen.json +1 -1
- package/src/composables/private.use-history/use-history.js +4 -4
- package/src/composables/private.use-history/use-history.test.js +9 -21
- package/src/composables/private.use-key-composition/use-key-composition.js +16 -12
- package/src/composables/private.use-model-toggle/use-model-toggle.js +44 -35
- package/src/composables/private.use-model-toggle/use-model-toggle.json +2 -2
- package/src/composables/private.use-panel/use-panel.child.json +1 -1
- package/src/composables/private.use-panel/use-panel.js +131 -91
- package/src/composables/private.use-panel/use-panel.json +18 -18
- package/src/composables/private.use-portal/use-portal.js +20 -15
- package/src/composables/private.use-prevent-scroll/use-prevent-scroll.js +4 -4
- package/src/composables/private.use-ratio/use-ratio.js +3 -3
- package/src/composables/private.use-ratio/use-ratio.json +2 -7
- package/src/composables/private.use-refocus-target/use-refocus-target.js +7 -8
- package/src/composables/private.use-router-link/use-router-link.js +111 -110
- package/src/composables/private.use-router-link/use-router-link.json +6 -9
- package/src/composables/private.use-scroll-target/use-scroll-target.js +14 -11
- package/src/composables/private.use-size/use-size.js +6 -4
- package/src/composables/private.use-size/use-size.json +1 -1
- package/src/composables/private.use-size/use-size.test.js +1 -1
- package/src/composables/private.use-transition/use-transition.js +17 -11
- package/src/composables/private.use-transition/use-transition.json +1 -1
- package/src/composables/private.use-transition/use-transition.test.js +7 -21
- package/src/composables/private.use-validate/use-validate.js +78 -67
- package/src/composables/private.use-validate/use-validate.json +9 -12
- package/src/composables/use-dialog-plugin-component/use-dialog-plugin-component.js +12 -6
- package/src/composables/use-form/private.use-form.js +4 -4
- package/src/composables/use-form/private.use-form.json +1 -1
- package/src/composables/use-form/private.use-form.test.js +17 -15
- package/src/composables/use-form/use-form-child.js +25 -14
- package/src/composables/use-hydration/use-hydration.js +1 -1
- package/src/composables/use-hydration/use-hydration.test.js +2 -4
- package/src/composables/use-id/use-id.js +10 -12
- package/src/composables/use-id/use-id.test.js +1 -1
- package/src/composables/use-interval/use-interval.js +3 -3
- package/src/composables/use-interval/use-interval.test.js +6 -9
- package/src/composables/use-meta/use-meta.js +13 -10
- package/src/composables/use-quasar/use-quasar.js +1 -1
- package/src/composables/use-quasar/use-quasar.test.js +4 -10
- package/src/composables/use-render-cache/use-render-cache.js +16 -24
- package/src/composables/use-split-attrs/use-split-attrs.js +9 -5
- package/src/composables/use-split-attrs/use-split-attrs.test.js +17 -15
- package/src/composables/use-tick/use-tick.js +10 -5
- package/src/composables/use-tick/use-tick.test.js +5 -8
- package/src/composables/use-timeout/use-timeout.js +3 -3
- package/src/composables/use-timeout/use-timeout.test.js +6 -9
- package/src/composables.js +0 -1
- package/src/css/core/helpers.sass +3 -16
- package/src/directives/close-popup/ClosePopup.js +41 -35
- package/src/directives/close-popup/ClosePopup.json +1 -1
- package/src/directives/intersection/Intersection.js +25 -28
- package/src/directives/intersection/Intersection.json +6 -6
- package/src/directives/morph/Morph.js +87 -87
- package/src/directives/morph/Morph.json +15 -13
- package/src/directives/mutation/Mutation.js +23 -24
- package/src/directives/mutation/Mutation.json +11 -11
- package/src/directives/ripple/Ripple.js +88 -79
- package/src/directives/ripple/Ripple.json +10 -10
- package/src/directives/ripple/Ripple.test.js +31 -87
- package/src/directives/scroll/Scroll.js +43 -30
- package/src/directives/scroll/Scroll.json +4 -2
- package/src/directives/scroll-fire/ScrollFire.js +43 -38
- package/src/directives/scroll-fire/ScrollFire.json +1 -1
- package/src/directives/touch-hold/TouchHold.js +155 -139
- package/src/directives/touch-hold/TouchHold.json +2 -2
- package/src/directives/touch-pan/TouchPan.js +311 -278
- package/src/directives/touch-pan/TouchPan.json +6 -4
- package/src/directives/touch-repeat/TouchRepeat.js +222 -188
- package/src/directives/touch-repeat/TouchRepeat.json +5 -3
- package/src/directives/touch-swipe/TouchSwipe.js +235 -214
- package/src/directives/touch-swipe/TouchSwipe.json +5 -3
- package/src/flags.dev.js +10 -17
- package/src/index.dev.js +2 -0
- package/src/index.ssr.js +2 -6
- package/src/index.umd.js +4 -2
- package/src/install-quasar.js +92 -76
- package/src/plugins/addressbar/AddressbarColor.js +28 -25
- package/src/plugins/addressbar/AddressbarColor.json +1 -1
- package/src/plugins/addressbar/AddressbarColor.test.js +10 -9
- package/src/plugins/app-fullscreen/AppFullscreen.js +50 -51
- package/src/plugins/app-fullscreen/AppFullscreen.json +6 -10
- package/src/plugins/app-fullscreen/AppFullscreen.test.js +11 -26
- package/src/plugins/app-fullscreen/test/mock-fullscreen.js +7 -5
- package/src/plugins/app-visibility/AppVisibility.js +21 -17
- package/src/plugins/app-visibility/AppVisibility.test.js +3 -1
- package/src/plugins/bottom-sheet/BottomSheet.js +1 -1
- package/src/plugins/bottom-sheet/BottomSheet.json +9 -9
- package/src/plugins/bottom-sheet/component/BottomSheetComponent.js +132 -95
- package/src/plugins/cookies/Cookies.js +50 -58
- package/src/plugins/cookies/Cookies.json +24 -16
- package/src/plugins/dark/Dark.js +61 -55
- package/src/plugins/dark/Dark.json +6 -6
- package/src/plugins/dark/Dark.test.js +26 -44
- package/src/plugins/dialog/Dialog.js +1 -1
- package/src/plugins/dialog/Dialog.json +29 -21
- package/src/plugins/dialog/component/DialogPluginComponent.js +122 -121
- package/src/plugins/icon-set/IconSet.js +63 -56
- package/src/plugins/icon-set/IconSet.json +421 -419
- package/src/plugins/icon-set/IconSet.test.js +8 -7
- package/src/plugins/lang/Lang.js +115 -96
- package/src/plugins/lang/Lang.json +201 -175
- package/src/plugins/lang/Lang.test.js +52 -20
- package/src/plugins/loading/Loading.js +175 -143
- package/src/plugins/loading/Loading.json +15 -15
- package/src/plugins/loading-bar/LoadingBar.js +61 -56
- package/src/plugins/loading-bar/LoadingBar.json +2 -2
- package/src/plugins/meta/Meta.js +91 -81
- package/src/plugins/notify/Notify.js +275 -221
- package/src/plugins/notify/Notify.json +79 -71
- package/src/plugins/platform/Platform.js +105 -112
- package/src/plugins/platform/Platform.json +12 -8
- package/src/plugins/platform/Platform.test.js +4 -7
- package/src/plugins/private.body/Body.js +19 -23
- package/src/plugins/private.body/Body.test.js +4 -6
- package/src/plugins/private.history/History.js +27 -30
- package/src/plugins/screen/Screen.js +160 -147
- package/src/plugins/screen/Screen.json +6 -6
- package/src/plugins/screen/Screen.test.js +6 -12
- package/src/plugins/storage/LocalStorage.js +5 -4
- package/src/plugins/storage/LocalStorage.json +1 -1
- package/src/plugins/storage/LocalStorage.test.js +56 -62
- package/src/plugins/storage/SessionStorage.js +5 -4
- package/src/plugins/storage/SessionStorage.json +1 -1
- package/src/plugins/storage/SessionStorage.test.js +56 -62
- package/src/plugins/storage/engine/web-storage.js +24 -26
- package/src/plugins/storage/engine/web-storage.json +45 -15
- package/src/utils/EventBus/EventBus.js +12 -13
- package/src/utils/clone/clone.js +27 -28
- package/src/utils/clone/clone.test.js +27 -52
- package/src/utils/colors/colors.js +69 -63
- package/src/utils/colors/colors.test.js +360 -270
- package/src/utils/copy-to-clipboard/copy-to-clipboard.js +9 -10
- package/src/utils/create-meta-mixin/create-meta-mixin.js +17 -19
- package/src/utils/create-uploader-component/create-uploader-component.js +20 -14
- package/src/utils/css-var/get-css-var.js +4 -2
- package/src/utils/css-var/get-css-var.test.js +4 -11
- package/src/utils/css-var/set-css-var.js +2 -2
- package/src/utils/css-var/set-css-var.test.js +6 -12
- package/src/utils/date/date.js +251 -243
- package/src/utils/date/private.persian.js +54 -44
- package/src/utils/debounce/debounce.js +5 -5
- package/src/utils/debounce/debounce.test.js +3 -10
- package/src/utils/dom/dom.js +21 -22
- package/src/utils/dom/dom.test.js +19 -39
- package/src/utils/event/event.js +53 -49
- package/src/utils/export-file/export-file.js +11 -12
- package/src/utils/extend/extend.js +30 -26
- package/src/utils/extend/extend.test.js +36 -42
- package/src/utils/format/format.js +11 -13
- package/src/utils/format/format.test.js +50 -61
- package/src/utils/frame-debounce/frame-debounce.js +5 -3
- package/src/utils/frame-debounce/frame-debounce.test.js +3 -10
- package/src/utils/is/is.js +27 -23
- package/src/utils/is/is.test.js +100 -84
- package/src/utils/morph/morph.js +470 -377
- package/src/utils/open-url/open-url.js +10 -21
- package/src/utils/patterns/patterns.js +11 -7
- package/src/utils/patterns/patterns.test.js +2 -0
- package/src/utils/private.click-outside/click-outside.js +28 -26
- package/src/utils/private.config/instance-config.js +1 -1
- package/src/utils/private.config/instance-config.test.js +11 -7
- package/src/utils/private.config/nodes.js +14 -14
- package/src/utils/private.config/nodes.test.js +32 -38
- package/src/utils/private.create/create.js +10 -4
- package/src/utils/private.create/create.test.js +11 -7
- package/src/utils/private.dialog/create-dialog.js +70 -59
- package/src/utils/private.dialog/create-dialog.json +13 -6
- package/src/utils/private.focus/focus-manager.js +7 -8
- package/src/utils/private.focus/focus-manager.test.js +13 -18
- package/src/utils/private.focus/focusout.js +4 -4
- package/src/utils/private.focus/focusout.test.js +10 -22
- package/src/utils/private.get-emits-object/get-emits-object.js +2 -2
- package/src/utils/private.get-emits-object/get-emits-object.test.js +4 -10
- package/src/utils/private.inject-obj-prop/inject-obj-prop.js +3 -3
- package/src/utils/private.inject-obj-prop/inject-obj-prop.test.js +20 -49
- package/src/utils/private.keyboard/escape-key.js +10 -10
- package/src/utils/private.keyboard/escape-key.test.js +10 -22
- package/src/utils/private.keyboard/key-composition.js +9 -7
- package/src/utils/private.portal/portal.js +7 -10
- package/src/utils/private.position-engine/position-engine.js +127 -75
- package/src/utils/private.render/render.js +9 -24
- package/src/utils/private.render/render.test.js +40 -55
- package/src/utils/private.rtl/rtl.js +1 -3
- package/src/utils/private.selection/selection.js +6 -6
- package/src/utils/private.selection/selection.test.js +7 -13
- package/src/utils/private.sort/sort.js +4 -6
- package/src/utils/private.symbols/symbols.js +1 -1
- package/src/utils/private.touch/touch.js +16 -16
- package/src/utils/private.touch/touch.test.js +56 -16
- package/src/utils/private.vm/vm.js +6 -7
- package/src/utils/private.vm/vm.test.js +32 -32
- package/src/utils/run-sequential-promises/run-sequential-promises.js +56 -50
- package/src/utils/scroll/prevent-scroll.js +75 -47
- package/src/utils/scroll/scroll.js +51 -44
- package/src/utils/throttle/throttle.js +7 -4
- package/src/utils/throttle/throttle.test.js +2 -7
- package/src/utils/uid/uid.js +34 -22
- package/wrappers/index.cjs +17 -15
- package/wrappers/index.js +15 -15
|
@@ -10,32 +10,136 @@ import QTab from '../tabs/QTab.js'
|
|
|
10
10
|
import QTabPanels from '../tab-panels/QTabPanels.js'
|
|
11
11
|
import QTabPanel from '../tab-panels/QTabPanel.js'
|
|
12
12
|
|
|
13
|
-
import useDark, {
|
|
13
|
+
import useDark, {
|
|
14
|
+
useDarkProps
|
|
15
|
+
} from '../../composables/private.use-dark/use-dark.js'
|
|
14
16
|
import useRenderCache from '../../composables/use-render-cache/use-render-cache.js'
|
|
15
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
useFormInject,
|
|
19
|
+
useFormProps
|
|
20
|
+
} from '../../composables/use-form/private.use-form.js'
|
|
16
21
|
|
|
17
22
|
import { createComponent } from '../../utils/private.create/create.js'
|
|
18
23
|
import { testPattern } from '../../utils/patterns/patterns.js'
|
|
19
24
|
import throttle from '../../utils/throttle/throttle.js'
|
|
20
25
|
import { stop } from '../../utils/event/event.js'
|
|
21
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
hexToRgb,
|
|
28
|
+
rgbToHex,
|
|
29
|
+
rgbToString,
|
|
30
|
+
textToRgb,
|
|
31
|
+
rgbToHsv,
|
|
32
|
+
hsvToRgb,
|
|
33
|
+
luminosity
|
|
34
|
+
} from '../../utils/colors/colors.js'
|
|
22
35
|
import { hDir } from '../../utils/private.render/render.js'
|
|
23
36
|
|
|
24
37
|
const palette = [
|
|
25
|
-
'rgb(255,204,204)',
|
|
26
|
-
'rgb(255,
|
|
27
|
-
'rgb(255,
|
|
28
|
-
'rgb(
|
|
29
|
-
'rgb(
|
|
30
|
-
'rgb(
|
|
31
|
-
'rgb(
|
|
32
|
-
'rgb(
|
|
33
|
-
'rgb(
|
|
34
|
-
'rgb(255,
|
|
38
|
+
'rgb(255,204,204)',
|
|
39
|
+
'rgb(255,230,204)',
|
|
40
|
+
'rgb(255,255,204)',
|
|
41
|
+
'rgb(204,255,204)',
|
|
42
|
+
'rgb(204,255,230)',
|
|
43
|
+
'rgb(204,255,255)',
|
|
44
|
+
'rgb(204,230,255)',
|
|
45
|
+
'rgb(204,204,255)',
|
|
46
|
+
'rgb(230,204,255)',
|
|
47
|
+
'rgb(255,204,255)',
|
|
48
|
+
'rgb(255,153,153)',
|
|
49
|
+
'rgb(255,204,153)',
|
|
50
|
+
'rgb(255,255,153)',
|
|
51
|
+
'rgb(153,255,153)',
|
|
52
|
+
'rgb(153,255,204)',
|
|
53
|
+
'rgb(153,255,255)',
|
|
54
|
+
'rgb(153,204,255)',
|
|
55
|
+
'rgb(153,153,255)',
|
|
56
|
+
'rgb(204,153,255)',
|
|
57
|
+
'rgb(255,153,255)',
|
|
58
|
+
'rgb(255,102,102)',
|
|
59
|
+
'rgb(255,179,102)',
|
|
60
|
+
'rgb(255,255,102)',
|
|
61
|
+
'rgb(102,255,102)',
|
|
62
|
+
'rgb(102,255,179)',
|
|
63
|
+
'rgb(102,255,255)',
|
|
64
|
+
'rgb(102,179,255)',
|
|
65
|
+
'rgb(102,102,255)',
|
|
66
|
+
'rgb(179,102,255)',
|
|
67
|
+
'rgb(255,102,255)',
|
|
68
|
+
'rgb(255,51,51)',
|
|
69
|
+
'rgb(255,153,51)',
|
|
70
|
+
'rgb(255,255,51)',
|
|
71
|
+
'rgb(51,255,51)',
|
|
72
|
+
'rgb(51,255,153)',
|
|
73
|
+
'rgb(51,255,255)',
|
|
74
|
+
'rgb(51,153,255)',
|
|
75
|
+
'rgb(51,51,255)',
|
|
76
|
+
'rgb(153,51,255)',
|
|
77
|
+
'rgb(255,51,255)',
|
|
78
|
+
'rgb(255,0,0)',
|
|
79
|
+
'rgb(255,128,0)',
|
|
80
|
+
'rgb(255,255,0)',
|
|
81
|
+
'rgb(0,255,0)',
|
|
82
|
+
'rgb(0,255,128)',
|
|
83
|
+
'rgb(0,255,255)',
|
|
84
|
+
'rgb(0,128,255)',
|
|
85
|
+
'rgb(0,0,255)',
|
|
86
|
+
'rgb(128,0,255)',
|
|
87
|
+
'rgb(255,0,255)',
|
|
88
|
+
'rgb(245,0,0)',
|
|
89
|
+
'rgb(245,123,0)',
|
|
90
|
+
'rgb(245,245,0)',
|
|
91
|
+
'rgb(0,245,0)',
|
|
92
|
+
'rgb(0,245,123)',
|
|
93
|
+
'rgb(0,245,245)',
|
|
94
|
+
'rgb(0,123,245)',
|
|
95
|
+
'rgb(0,0,245)',
|
|
96
|
+
'rgb(123,0,245)',
|
|
97
|
+
'rgb(245,0,245)',
|
|
98
|
+
'rgb(214,0,0)',
|
|
99
|
+
'rgb(214,108,0)',
|
|
100
|
+
'rgb(214,214,0)',
|
|
101
|
+
'rgb(0,214,0)',
|
|
102
|
+
'rgb(0,214,108)',
|
|
103
|
+
'rgb(0,214,214)',
|
|
104
|
+
'rgb(0,108,214)',
|
|
105
|
+
'rgb(0,0,214)',
|
|
106
|
+
'rgb(108,0,214)',
|
|
107
|
+
'rgb(214,0,214)',
|
|
108
|
+
'rgb(163,0,0)',
|
|
109
|
+
'rgb(163,82,0)',
|
|
110
|
+
'rgb(163,163,0)',
|
|
111
|
+
'rgb(0,163,0)',
|
|
112
|
+
'rgb(0,163,82)',
|
|
113
|
+
'rgb(0,163,163)',
|
|
114
|
+
'rgb(0,82,163)',
|
|
115
|
+
'rgb(0,0,163)',
|
|
116
|
+
'rgb(82,0,163)',
|
|
117
|
+
'rgb(163,0,163)',
|
|
118
|
+
'rgb(92,0,0)',
|
|
119
|
+
'rgb(92,46,0)',
|
|
120
|
+
'rgb(92,92,0)',
|
|
121
|
+
'rgb(0,92,0)',
|
|
122
|
+
'rgb(0,92,46)',
|
|
123
|
+
'rgb(0,92,92)',
|
|
124
|
+
'rgb(0,46,92)',
|
|
125
|
+
'rgb(0,0,92)',
|
|
126
|
+
'rgb(46,0,92)',
|
|
127
|
+
'rgb(92,0,92)',
|
|
128
|
+
'rgb(255,255,255)',
|
|
129
|
+
'rgb(205,205,205)',
|
|
130
|
+
'rgb(178,178,178)',
|
|
131
|
+
'rgb(153,153,153)',
|
|
132
|
+
'rgb(127,127,127)',
|
|
133
|
+
'rgb(102,102,102)',
|
|
134
|
+
'rgb(76,76,76)',
|
|
135
|
+
'rgb(51,51,51)',
|
|
136
|
+
'rgb(25,25,25)',
|
|
137
|
+
'rgb(0,0,0)'
|
|
35
138
|
]
|
|
36
139
|
|
|
37
140
|
const thumbPath = 'M5 5 h10 v10 h-10 v-10 z'
|
|
38
|
-
const alphaTrackImg =
|
|
141
|
+
const alphaTrackImg =
|
|
142
|
+
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg=='
|
|
39
143
|
|
|
40
144
|
export default createComponent({
|
|
41
145
|
name: 'QColor',
|
|
@@ -50,13 +154,13 @@ export default createComponent({
|
|
|
50
154
|
defaultView: {
|
|
51
155
|
type: String,
|
|
52
156
|
default: 'spectrum',
|
|
53
|
-
validator: v => [
|
|
157
|
+
validator: v => ['spectrum', 'tune', 'palette'].includes(v)
|
|
54
158
|
},
|
|
55
159
|
|
|
56
160
|
formatModel: {
|
|
57
161
|
type: String,
|
|
58
162
|
default: 'auto',
|
|
59
|
-
validator: v => [
|
|
163
|
+
validator: v => ['auto', 'hex', 'rgb', 'hexa', 'rgba'].includes(v)
|
|
60
164
|
},
|
|
61
165
|
|
|
62
166
|
palette: Array,
|
|
@@ -73,9 +177,9 @@ export default createComponent({
|
|
|
73
177
|
readonly: Boolean
|
|
74
178
|
},
|
|
75
179
|
|
|
76
|
-
emits: [
|
|
180
|
+
emits: ['update:modelValue', 'change'],
|
|
77
181
|
|
|
78
|
-
setup
|
|
182
|
+
setup(props, { emit }) {
|
|
79
183
|
const { proxy } = getCurrentInstance()
|
|
80
184
|
const { $q } = proxy
|
|
81
185
|
|
|
@@ -85,130 +189,141 @@ export default createComponent({
|
|
|
85
189
|
const spectrumRef = ref(null)
|
|
86
190
|
const errorIconRef = ref(null)
|
|
87
191
|
|
|
88
|
-
const forceHex = computed(() =>
|
|
192
|
+
const forceHex = computed(() =>
|
|
89
193
|
props.formatModel === 'auto'
|
|
90
194
|
? null
|
|
91
195
|
: props.formatModel.indexOf('hex') !== -1
|
|
92
|
-
)
|
|
196
|
+
)
|
|
93
197
|
|
|
94
|
-
const forceAlpha = computed(() =>
|
|
198
|
+
const forceAlpha = computed(() =>
|
|
95
199
|
props.formatModel === 'auto'
|
|
96
200
|
? null
|
|
97
201
|
: props.formatModel.indexOf('a') !== -1
|
|
98
|
-
)
|
|
202
|
+
)
|
|
99
203
|
|
|
100
204
|
const topView = ref(
|
|
101
205
|
props.formatModel === 'auto'
|
|
102
|
-
?
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
206
|
+
? props.modelValue === void 0 ||
|
|
207
|
+
props.modelValue === null ||
|
|
208
|
+
props.modelValue === '' ||
|
|
209
|
+
props.modelValue.startsWith('#')
|
|
210
|
+
? 'hex'
|
|
211
|
+
: 'rgb'
|
|
212
|
+
: props.formatModel.startsWith('hex')
|
|
213
|
+
? 'hex'
|
|
214
|
+
: 'rgb'
|
|
108
215
|
)
|
|
109
216
|
|
|
110
217
|
const view = ref(props.defaultView)
|
|
111
218
|
const model = ref(parseModel(props.modelValue || props.defaultValue))
|
|
112
219
|
|
|
113
|
-
const editable = computed(
|
|
220
|
+
const editable = computed(
|
|
221
|
+
() => props.disable !== true && props.readonly !== true
|
|
222
|
+
)
|
|
114
223
|
|
|
115
|
-
const isHex = computed(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
224
|
+
const isHex = computed(
|
|
225
|
+
() =>
|
|
226
|
+
props.modelValue === void 0 ||
|
|
227
|
+
props.modelValue === null ||
|
|
228
|
+
props.modelValue === '' ||
|
|
229
|
+
props.modelValue.startsWith('#')
|
|
120
230
|
)
|
|
121
231
|
|
|
122
|
-
const isOutputHex = computed(() =>
|
|
123
|
-
forceHex.value !== null
|
|
124
|
-
|
|
125
|
-
: isHex.value
|
|
126
|
-
))
|
|
232
|
+
const isOutputHex = computed(() =>
|
|
233
|
+
forceHex.value !== null ? forceHex.value : isHex.value
|
|
234
|
+
)
|
|
127
235
|
|
|
128
236
|
const formAttrs = computed(() => ({
|
|
129
237
|
type: 'hidden',
|
|
130
238
|
name: props.name,
|
|
131
|
-
value: model.value[
|
|
239
|
+
value: model.value[isOutputHex.value === true ? 'hex' : 'rgb']
|
|
132
240
|
}))
|
|
133
241
|
|
|
134
242
|
const injectFormInput = useFormInject(formAttrs)
|
|
135
243
|
|
|
136
|
-
const hasAlpha = computed(() =>
|
|
137
|
-
forceAlpha.value !== null
|
|
138
|
-
|
|
139
|
-
: model.value.a !== void 0
|
|
140
|
-
))
|
|
244
|
+
const hasAlpha = computed(() =>
|
|
245
|
+
forceAlpha.value !== null ? forceAlpha.value : model.value.a !== void 0
|
|
246
|
+
)
|
|
141
247
|
|
|
142
248
|
const currentBgColor = computed(() => ({
|
|
143
249
|
backgroundColor: model.value.rgb || '#000'
|
|
144
250
|
}))
|
|
145
251
|
|
|
146
252
|
const headerClass = computed(() => {
|
|
147
|
-
const light =
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
253
|
+
const light =
|
|
254
|
+
model.value.a !== void 0 && model.value.a < 65
|
|
255
|
+
? true
|
|
256
|
+
: luminosity(model.value) > 0.4
|
|
257
|
+
|
|
258
|
+
return (
|
|
259
|
+
'q-color-picker__header-content' +
|
|
260
|
+
` q-color-picker__header-content--${light ? 'light' : 'dark'}`
|
|
261
|
+
)
|
|
153
262
|
})
|
|
154
263
|
|
|
155
264
|
const spectrumStyle = computed(() => ({
|
|
156
|
-
background: `hsl(${
|
|
265
|
+
background: `hsl(${model.value.h},100%,50%)`
|
|
157
266
|
}))
|
|
158
267
|
|
|
159
268
|
const spectrumPointerStyle = computed(() => ({
|
|
160
|
-
top: `${
|
|
161
|
-
[
|
|
269
|
+
top: `${100 - model.value.v}%`,
|
|
270
|
+
[$q.lang.rtl === true ? 'right' : 'left']: `${model.value.s}%`
|
|
162
271
|
}))
|
|
163
272
|
|
|
164
|
-
const computedPalette = computed(() =>
|
|
273
|
+
const computedPalette = computed(() =>
|
|
165
274
|
props.palette !== void 0 && props.palette.length !== 0
|
|
166
275
|
? props.palette
|
|
167
276
|
: palette
|
|
168
|
-
))
|
|
169
|
-
|
|
170
|
-
const classes = computed(() =>
|
|
171
|
-
'q-color-picker'
|
|
172
|
-
+ (props.bordered === true ? ' q-color-picker--bordered' : '')
|
|
173
|
-
+ (props.square === true ? ' q-color-picker--square no-border-radius' : '')
|
|
174
|
-
+ (props.flat === true ? ' q-color-picker--flat no-shadow' : '')
|
|
175
|
-
+ (props.disable === true ? ' disabled' : '')
|
|
176
|
-
+ (isDark.value === true ? ' q-color-picker--dark q-dark' : '')
|
|
177
277
|
)
|
|
178
278
|
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
:
|
|
183
|
-
|
|
279
|
+
const classes = computed(
|
|
280
|
+
() =>
|
|
281
|
+
'q-color-picker' +
|
|
282
|
+
(props.bordered === true ? ' q-color-picker--bordered' : '') +
|
|
283
|
+
(props.square === true
|
|
284
|
+
? ' q-color-picker--square no-border-radius'
|
|
285
|
+
: '') +
|
|
286
|
+
(props.flat === true ? ' q-color-picker--flat no-shadow' : '') +
|
|
287
|
+
(props.disable === true ? ' disabled' : '') +
|
|
288
|
+
(isDark.value === true ? ' q-color-picker--dark q-dark' : '')
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
const attributes = computed(() =>
|
|
292
|
+
props.disable === true ? { 'aria-disabled': 'true' } : {}
|
|
293
|
+
)
|
|
184
294
|
|
|
185
|
-
const spectrumDirective = computed(() =>
|
|
186
|
-
|
|
187
|
-
return [ [
|
|
295
|
+
const spectrumDirective = computed(() => [
|
|
296
|
+
[
|
|
188
297
|
TouchPan,
|
|
189
298
|
onSpectrumPan,
|
|
190
299
|
void 0,
|
|
191
300
|
{ prevent: true, stop: true, mouse: true }
|
|
192
|
-
]
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
watch(() => props.modelValue, v => {
|
|
196
|
-
const localModel = parseModel(v || props.defaultValue)
|
|
197
|
-
if (localModel.hex !== model.value.hex) {
|
|
198
|
-
model.value = localModel
|
|
199
|
-
}
|
|
200
|
-
})
|
|
301
|
+
]
|
|
302
|
+
])
|
|
201
303
|
|
|
202
|
-
watch(
|
|
203
|
-
|
|
204
|
-
|
|
304
|
+
watch(
|
|
305
|
+
() => props.modelValue,
|
|
306
|
+
v => {
|
|
307
|
+
const localModel = parseModel(v || props.defaultValue)
|
|
205
308
|
if (localModel.hex !== model.value.hex) {
|
|
206
309
|
model.value = localModel
|
|
207
310
|
}
|
|
208
311
|
}
|
|
209
|
-
|
|
312
|
+
)
|
|
210
313
|
|
|
211
|
-
|
|
314
|
+
watch(
|
|
315
|
+
() => props.defaultValue,
|
|
316
|
+
v => {
|
|
317
|
+
if (!props.modelValue && v) {
|
|
318
|
+
const localModel = parseModel(v)
|
|
319
|
+
if (localModel.hex !== model.value.hex) {
|
|
320
|
+
model.value = localModel
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
function updateModel(rgb, change) {
|
|
212
327
|
// update internally
|
|
213
328
|
model.value.hex = rgbToHex(rgb)
|
|
214
329
|
model.value.rgb = rgbToString(rgb)
|
|
@@ -217,23 +332,26 @@ export default createComponent({
|
|
|
217
332
|
model.value.b = rgb.b
|
|
218
333
|
model.value.a = rgb.a
|
|
219
334
|
|
|
220
|
-
const value = model.value[
|
|
335
|
+
const value = model.value[isOutputHex.value === true ? 'hex' : 'rgb']
|
|
221
336
|
|
|
222
337
|
// emit new value
|
|
223
338
|
emit('update:modelValue', value)
|
|
224
|
-
change === true
|
|
339
|
+
if (change === true) emit('change', value)
|
|
225
340
|
}
|
|
226
341
|
|
|
227
|
-
function parseModel
|
|
228
|
-
const alpha =
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
342
|
+
function parseModel(v) {
|
|
343
|
+
const alpha =
|
|
344
|
+
forceAlpha.value !== void 0
|
|
345
|
+
? forceAlpha.value
|
|
346
|
+
: props.formatModel === 'auto'
|
|
347
|
+
? null
|
|
348
|
+
: props.formatModel.indexOf('a') !== -1
|
|
349
|
+
|
|
350
|
+
if (
|
|
351
|
+
typeof v !== 'string' ||
|
|
352
|
+
v.length === 0 ||
|
|
353
|
+
testPattern.anyColor(v.replace(/ /g, '')) !== true
|
|
354
|
+
) {
|
|
237
355
|
return {
|
|
238
356
|
h: 0,
|
|
239
357
|
s: 0,
|
|
@@ -247,24 +365,23 @@ export default createComponent({
|
|
|
247
365
|
}
|
|
248
366
|
}
|
|
249
367
|
|
|
250
|
-
const
|
|
368
|
+
const localModel = textToRgb(v)
|
|
251
369
|
|
|
252
|
-
if (alpha === true &&
|
|
253
|
-
|
|
370
|
+
if (alpha === true && localModel.a === void 0) {
|
|
371
|
+
localModel.a = 100
|
|
254
372
|
}
|
|
255
373
|
|
|
256
|
-
|
|
257
|
-
|
|
374
|
+
localModel.hex = rgbToHex(localModel)
|
|
375
|
+
localModel.rgb = rgbToString(localModel)
|
|
258
376
|
|
|
259
|
-
return Object.assign(
|
|
377
|
+
return Object.assign(localModel, rgbToHsv(localModel))
|
|
260
378
|
}
|
|
261
379
|
|
|
262
|
-
function changeSpectrum
|
|
380
|
+
function changeSpectrum(left, top, change) {
|
|
263
381
|
const panel = spectrumRef.value
|
|
264
382
|
if (panel === null) return
|
|
265
383
|
|
|
266
|
-
const
|
|
267
|
-
width = panel.clientWidth,
|
|
384
|
+
const width = panel.clientWidth,
|
|
268
385
|
height = panel.clientHeight,
|
|
269
386
|
rect = panel.getBoundingClientRect()
|
|
270
387
|
|
|
@@ -274,9 +391,8 @@ export default createComponent({
|
|
|
274
391
|
x = width - x
|
|
275
392
|
}
|
|
276
393
|
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
s = Math.round(100 * x / width),
|
|
394
|
+
const y = Math.min(height, Math.max(0, top - rect.top)),
|
|
395
|
+
s = Math.round((100 * x) / width),
|
|
280
396
|
v = Math.round(100 * Math.max(0, Math.min(1, -(y / height) + 1))),
|
|
281
397
|
rgb = hsvToRgb({
|
|
282
398
|
h: model.value.h,
|
|
@@ -290,35 +406,35 @@ export default createComponent({
|
|
|
290
406
|
updateModel(rgb, change)
|
|
291
407
|
}
|
|
292
408
|
|
|
293
|
-
function onHue
|
|
294
|
-
const
|
|
409
|
+
function onHue(val, change) {
|
|
410
|
+
const hue = Math.round(val)
|
|
295
411
|
const rgb = hsvToRgb({
|
|
296
|
-
h,
|
|
412
|
+
h: hue,
|
|
297
413
|
s: model.value.s,
|
|
298
414
|
v: model.value.v,
|
|
299
415
|
a: hasAlpha.value === true ? model.value.a : void 0
|
|
300
416
|
})
|
|
301
417
|
|
|
302
|
-
model.value.h =
|
|
418
|
+
model.value.h = hue
|
|
303
419
|
updateModel(rgb, change)
|
|
304
420
|
}
|
|
305
421
|
|
|
306
|
-
function onHueChange
|
|
422
|
+
function onHueChange(val) {
|
|
307
423
|
onHue(val, true)
|
|
308
424
|
}
|
|
309
425
|
|
|
310
|
-
function onNumericChange
|
|
311
|
-
evt !== void 0
|
|
426
|
+
function onNumericChange(value, formatModel, max, evt, change) {
|
|
427
|
+
if (evt !== void 0) stop(evt)
|
|
312
428
|
|
|
313
429
|
if (!/^[0-9]+$/.test(value)) {
|
|
314
|
-
change === true
|
|
430
|
+
if (change === true) proxy.$forceUpdate()
|
|
315
431
|
return
|
|
316
432
|
}
|
|
317
433
|
|
|
318
434
|
const val = Math.floor(Number(value))
|
|
319
435
|
|
|
320
436
|
if (val < 0 || val > max) {
|
|
321
|
-
change === true
|
|
437
|
+
if (change === true) proxy.$forceUpdate()
|
|
322
438
|
return
|
|
323
439
|
}
|
|
324
440
|
|
|
@@ -326,9 +442,12 @@ export default createComponent({
|
|
|
326
442
|
r: formatModel === 'r' ? val : model.value.r,
|
|
327
443
|
g: formatModel === 'g' ? val : model.value.g,
|
|
328
444
|
b: formatModel === 'b' ? val : model.value.b,
|
|
329
|
-
a:
|
|
330
|
-
|
|
331
|
-
|
|
445
|
+
a:
|
|
446
|
+
hasAlpha.value === true
|
|
447
|
+
? formatModel === 'a'
|
|
448
|
+
? val
|
|
449
|
+
: model.value.a
|
|
450
|
+
: void 0
|
|
332
451
|
}
|
|
333
452
|
|
|
334
453
|
if (formatModel !== 'a') {
|
|
@@ -348,7 +467,7 @@ export default createComponent({
|
|
|
348
467
|
}
|
|
349
468
|
}
|
|
350
469
|
|
|
351
|
-
function onEditorChange
|
|
470
|
+
function onEditorChange(evt, change) {
|
|
352
471
|
let rgb
|
|
353
472
|
const inp = evt.target.value
|
|
354
473
|
|
|
@@ -356,74 +475,76 @@ export default createComponent({
|
|
|
356
475
|
|
|
357
476
|
if (topView.value === 'hex') {
|
|
358
477
|
if (
|
|
359
|
-
inp.length !== (hasAlpha.value === true ? 9 : 7)
|
|
360
|
-
|
|
478
|
+
inp.length !== (hasAlpha.value === true ? 9 : 7) ||
|
|
479
|
+
!/^#[0-9A-Fa-f]+$/.test(inp)
|
|
361
480
|
) {
|
|
362
481
|
return true
|
|
363
482
|
}
|
|
364
483
|
|
|
365
484
|
rgb = hexToRgb(inp)
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
let model
|
|
485
|
+
} else {
|
|
486
|
+
let localModel
|
|
369
487
|
|
|
370
488
|
if (!inp.endsWith(')')) {
|
|
371
489
|
return true
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
490
|
+
} else if (hasAlpha.value !== true && inp.startsWith('rgb(')) {
|
|
491
|
+
localModel = inp
|
|
492
|
+
.substring(4, inp.length - 1)
|
|
493
|
+
.split(',')
|
|
494
|
+
.map(n => parseInt(n, 10))
|
|
375
495
|
|
|
376
496
|
if (
|
|
377
|
-
|
|
378
|
-
|
|
497
|
+
localModel.length !== 3 ||
|
|
498
|
+
!/^rgb\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3}\)$/.test(inp)
|
|
379
499
|
) {
|
|
380
500
|
return true
|
|
381
501
|
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
model = inp.substring(5, inp.length - 1).split(',')
|
|
502
|
+
} else if (hasAlpha.value === true && inp.startsWith('rgba(')) {
|
|
503
|
+
localModel = inp.substring(5, inp.length - 1).split(',')
|
|
385
504
|
|
|
386
505
|
if (
|
|
387
|
-
|
|
388
|
-
|
|
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
|
+
)
|
|
389
510
|
) {
|
|
390
511
|
return true
|
|
391
512
|
}
|
|
392
513
|
|
|
393
514
|
for (let i = 0; i < 3; i++) {
|
|
394
|
-
const v = parseInt(
|
|
515
|
+
const v = parseInt(localModel[i], 10)
|
|
395
516
|
if (v < 0 || v > 255) {
|
|
396
517
|
return true
|
|
397
518
|
}
|
|
398
|
-
|
|
519
|
+
localModel[i] = v
|
|
399
520
|
}
|
|
400
521
|
|
|
401
|
-
const v = parseFloat(
|
|
522
|
+
const v = parseFloat(localModel[3])
|
|
402
523
|
if (v < 0 || v > 1) {
|
|
403
524
|
return true
|
|
404
525
|
}
|
|
405
|
-
|
|
406
|
-
}
|
|
407
|
-
else {
|
|
526
|
+
localModel[3] = v
|
|
527
|
+
} else {
|
|
408
528
|
return true
|
|
409
529
|
}
|
|
410
530
|
|
|
411
531
|
if (
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
532
|
+
localModel[0] < 0 ||
|
|
533
|
+
localModel[0] > 255 ||
|
|
534
|
+
localModel[1] < 0 ||
|
|
535
|
+
localModel[1] > 255 ||
|
|
536
|
+
localModel[2] < 0 ||
|
|
537
|
+
localModel[2] > 255 ||
|
|
538
|
+
(hasAlpha.value === true && (localModel[3] < 0 || localModel[3] > 1))
|
|
416
539
|
) {
|
|
417
540
|
return true
|
|
418
541
|
}
|
|
419
542
|
|
|
420
543
|
rgb = {
|
|
421
|
-
r:
|
|
422
|
-
g:
|
|
423
|
-
b:
|
|
424
|
-
a: hasAlpha.value === true
|
|
425
|
-
? model[ 3 ] * 100
|
|
426
|
-
: void 0
|
|
544
|
+
r: localModel[0],
|
|
545
|
+
g: localModel[1],
|
|
546
|
+
b: localModel[2],
|
|
547
|
+
a: hasAlpha.value === true ? localModel[3] * 100 : void 0
|
|
427
548
|
}
|
|
428
549
|
}
|
|
429
550
|
|
|
@@ -442,7 +563,7 @@ export default createComponent({
|
|
|
442
563
|
}
|
|
443
564
|
}
|
|
444
565
|
|
|
445
|
-
function onPalettePick
|
|
566
|
+
function onPalettePick(color) {
|
|
446
567
|
const def = parseModel(color)
|
|
447
568
|
const rgb = { r: def.r, g: def.g, b: def.b, a: def.a }
|
|
448
569
|
|
|
@@ -457,25 +578,19 @@ export default createComponent({
|
|
|
457
578
|
updateModel(rgb, true)
|
|
458
579
|
}
|
|
459
580
|
|
|
460
|
-
function onSpectrumPan
|
|
581
|
+
function onSpectrumPan(evt) {
|
|
461
582
|
if (evt.isFinal) {
|
|
462
|
-
changeSpectrum(
|
|
463
|
-
|
|
464
|
-
evt.position.top,
|
|
465
|
-
true
|
|
466
|
-
)
|
|
467
|
-
}
|
|
468
|
-
else {
|
|
583
|
+
changeSpectrum(evt.position.left, evt.position.top, true)
|
|
584
|
+
} else {
|
|
469
585
|
onSpectrumChange(evt)
|
|
470
586
|
}
|
|
471
587
|
}
|
|
472
588
|
|
|
473
|
-
const onSpectrumChange = throttle(
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
)
|
|
589
|
+
const onSpectrumChange = throttle(evt => {
|
|
590
|
+
changeSpectrum(evt.position.left, evt.position.top)
|
|
591
|
+
}, 20)
|
|
477
592
|
|
|
478
|
-
function onSpectrumClick
|
|
593
|
+
function onSpectrumClick(evt) {
|
|
479
594
|
changeSpectrum(
|
|
480
595
|
evt.pageX - window.pageXOffset,
|
|
481
596
|
evt.pageY - window.pageYOffset,
|
|
@@ -483,14 +598,14 @@ export default createComponent({
|
|
|
483
598
|
)
|
|
484
599
|
}
|
|
485
600
|
|
|
486
|
-
function onActivate
|
|
601
|
+
function onActivate(evt) {
|
|
487
602
|
changeSpectrum(
|
|
488
603
|
evt.pageX - window.pageXOffset,
|
|
489
604
|
evt.pageY - window.pageYOffset
|
|
490
605
|
)
|
|
491
606
|
}
|
|
492
607
|
|
|
493
|
-
function updateErrorIcon
|
|
608
|
+
function updateErrorIcon(val) {
|
|
494
609
|
// we MUST avoid vue triggering a render,
|
|
495
610
|
// so manually changing this
|
|
496
611
|
if (errorIconRef.value !== null) {
|
|
@@ -498,163 +613,206 @@ export default createComponent({
|
|
|
498
613
|
}
|
|
499
614
|
}
|
|
500
615
|
|
|
501
|
-
function setTopView
|
|
616
|
+
function setTopView(val) {
|
|
502
617
|
topView.value = val
|
|
503
618
|
}
|
|
504
619
|
|
|
505
|
-
function getHeader
|
|
620
|
+
function getHeader() {
|
|
506
621
|
const child = []
|
|
507
622
|
|
|
508
|
-
props.noHeaderTabs !== true
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
623
|
+
if (props.noHeaderTabs !== true) {
|
|
624
|
+
child.push(
|
|
625
|
+
h(
|
|
626
|
+
QTabs,
|
|
627
|
+
{
|
|
628
|
+
class: 'q-color-picker__header-tabs',
|
|
629
|
+
modelValue: topView.value,
|
|
630
|
+
dense: true,
|
|
631
|
+
align: 'justify',
|
|
632
|
+
'onUpdate:modelValue': setTopView
|
|
633
|
+
},
|
|
634
|
+
() => [
|
|
635
|
+
h(QTab, {
|
|
636
|
+
label: 'HEX' + (hasAlpha.value === true ? 'A' : ''),
|
|
637
|
+
name: 'hex',
|
|
638
|
+
ripple: false
|
|
639
|
+
}),
|
|
640
|
+
|
|
641
|
+
h(QTab, {
|
|
642
|
+
label: 'RGB' + (hasAlpha.value === true ? 'A' : ''),
|
|
643
|
+
name: 'rgb',
|
|
644
|
+
ripple: false
|
|
645
|
+
})
|
|
646
|
+
]
|
|
647
|
+
)
|
|
648
|
+
)
|
|
649
|
+
}
|
|
529
650
|
|
|
530
651
|
child.push(
|
|
531
|
-
h(
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
:
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
652
|
+
h(
|
|
653
|
+
'div',
|
|
654
|
+
{
|
|
655
|
+
class: 'q-color-picker__header-banner row flex-center no-wrap'
|
|
656
|
+
},
|
|
657
|
+
[
|
|
658
|
+
h('input', {
|
|
659
|
+
class: 'fit',
|
|
660
|
+
value: model.value[topView.value],
|
|
661
|
+
...(editable.value !== true ? { readonly: true } : {}),
|
|
662
|
+
...getCache('topIn', {
|
|
663
|
+
onInput: evt => {
|
|
664
|
+
updateErrorIcon(onEditorChange(evt) === true)
|
|
665
|
+
},
|
|
666
|
+
onChange: stop,
|
|
667
|
+
onBlur: evt => {
|
|
668
|
+
if (onEditorChange(evt, true) === true) proxy.$forceUpdate()
|
|
669
|
+
updateErrorIcon(false)
|
|
670
|
+
}
|
|
671
|
+
})
|
|
672
|
+
}),
|
|
673
|
+
|
|
674
|
+
h(QIcon, {
|
|
675
|
+
ref: errorIconRef,
|
|
676
|
+
class: 'q-color-picker__error-icon absolute no-pointer-events',
|
|
677
|
+
name: $q.iconSet.type.negative
|
|
550
678
|
})
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
h(QIcon, {
|
|
554
|
-
ref: errorIconRef,
|
|
555
|
-
class: 'q-color-picker__error-icon absolute no-pointer-events',
|
|
556
|
-
name: $q.iconSet.type.negative
|
|
557
|
-
})
|
|
558
|
-
])
|
|
679
|
+
]
|
|
680
|
+
)
|
|
559
681
|
)
|
|
560
682
|
|
|
561
|
-
return h(
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
class:
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
683
|
+
return h(
|
|
684
|
+
'div',
|
|
685
|
+
{
|
|
686
|
+
class: 'q-color-picker__header relative-position overflow-hidden'
|
|
687
|
+
},
|
|
688
|
+
[
|
|
689
|
+
h('div', { class: 'q-color-picker__header-bg absolute-full' }),
|
|
690
|
+
|
|
691
|
+
h(
|
|
692
|
+
'div',
|
|
693
|
+
{
|
|
694
|
+
class: headerClass.value,
|
|
695
|
+
style: currentBgColor.value
|
|
696
|
+
},
|
|
697
|
+
child
|
|
698
|
+
)
|
|
699
|
+
]
|
|
700
|
+
)
|
|
571
701
|
}
|
|
572
702
|
|
|
573
|
-
function getContent
|
|
574
|
-
return h(
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
703
|
+
function getContent() {
|
|
704
|
+
return h(
|
|
705
|
+
QTabPanels,
|
|
706
|
+
{
|
|
707
|
+
modelValue: view.value,
|
|
708
|
+
animated: true
|
|
709
|
+
},
|
|
710
|
+
() => [
|
|
711
|
+
h(
|
|
712
|
+
QTabPanel,
|
|
713
|
+
{
|
|
714
|
+
class: 'q-color-picker__spectrum-tab overflow-hidden',
|
|
715
|
+
name: 'spectrum'
|
|
716
|
+
},
|
|
717
|
+
getSpectrumTab
|
|
718
|
+
),
|
|
719
|
+
|
|
720
|
+
h(
|
|
721
|
+
QTabPanel,
|
|
722
|
+
{
|
|
723
|
+
class: 'q-pa-md q-color-picker__tune-tab',
|
|
724
|
+
name: 'tune'
|
|
725
|
+
},
|
|
726
|
+
getTuneTab
|
|
727
|
+
),
|
|
728
|
+
|
|
729
|
+
h(
|
|
730
|
+
QTabPanel,
|
|
731
|
+
{
|
|
732
|
+
class: 'q-color-picker__palette-tab',
|
|
733
|
+
name: 'palette'
|
|
734
|
+
},
|
|
735
|
+
getPaletteTab
|
|
736
|
+
)
|
|
737
|
+
]
|
|
738
|
+
)
|
|
593
739
|
}
|
|
594
740
|
|
|
595
|
-
function setView
|
|
741
|
+
function setView(val) {
|
|
596
742
|
view.value = val
|
|
597
743
|
}
|
|
598
744
|
|
|
599
|
-
function getFooter
|
|
600
|
-
return h(
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
745
|
+
function getFooter() {
|
|
746
|
+
return h(
|
|
747
|
+
'div',
|
|
748
|
+
{
|
|
749
|
+
class: 'q-color-picker__footer relative-position overflow-hidden'
|
|
750
|
+
},
|
|
751
|
+
[
|
|
752
|
+
h(
|
|
753
|
+
QTabs,
|
|
754
|
+
{
|
|
755
|
+
class: 'absolute-full',
|
|
756
|
+
modelValue: view.value,
|
|
757
|
+
dense: true,
|
|
758
|
+
align: 'justify',
|
|
759
|
+
'onUpdate:modelValue': setView
|
|
760
|
+
},
|
|
761
|
+
() => [
|
|
762
|
+
h(QTab, {
|
|
763
|
+
icon: $q.iconSet.colorPicker.spectrum,
|
|
764
|
+
name: 'spectrum',
|
|
765
|
+
ripple: false
|
|
766
|
+
}),
|
|
767
|
+
|
|
768
|
+
h(QTab, {
|
|
769
|
+
icon: $q.iconSet.colorPicker.tune,
|
|
770
|
+
name: 'tune',
|
|
771
|
+
ripple: false
|
|
772
|
+
}),
|
|
773
|
+
|
|
774
|
+
h(QTab, {
|
|
775
|
+
icon: $q.iconSet.colorPicker.palette,
|
|
776
|
+
name: 'palette',
|
|
777
|
+
ripple: false
|
|
778
|
+
})
|
|
779
|
+
]
|
|
780
|
+
)
|
|
781
|
+
]
|
|
782
|
+
)
|
|
629
783
|
}
|
|
630
784
|
|
|
631
|
-
function getSpectrumTab
|
|
785
|
+
function getSpectrumTab() {
|
|
632
786
|
const data = {
|
|
633
787
|
ref: spectrumRef,
|
|
634
|
-
class:
|
|
635
|
-
|
|
788
|
+
class:
|
|
789
|
+
'q-color-picker__spectrum non-selectable relative-position cursor-pointer' +
|
|
790
|
+
(editable.value !== true ? ' readonly' : ''),
|
|
636
791
|
style: spectrumStyle.value,
|
|
637
792
|
...(editable.value === true
|
|
638
793
|
? {
|
|
639
794
|
onClick: onSpectrumClick,
|
|
640
795
|
onMousedown: onActivate
|
|
641
796
|
}
|
|
642
|
-
: {}
|
|
643
|
-
)
|
|
797
|
+
: {})
|
|
644
798
|
}
|
|
645
799
|
|
|
646
800
|
const child = [
|
|
647
801
|
h('div', { style: { paddingBottom: '100%' } }),
|
|
648
802
|
h('div', { class: 'q-color-picker__spectrum-white absolute-full' }),
|
|
649
803
|
h('div', { class: 'q-color-picker__spectrum-black absolute-full' }),
|
|
650
|
-
h(
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
804
|
+
h(
|
|
805
|
+
'div',
|
|
806
|
+
{
|
|
807
|
+
class: 'absolute',
|
|
808
|
+
style: spectrumPointerStyle.value
|
|
809
|
+
},
|
|
810
|
+
[
|
|
811
|
+
model.value.hex !== void 0
|
|
812
|
+
? h('div', { class: 'q-color-picker__spectrum-circle' })
|
|
813
|
+
: null
|
|
814
|
+
]
|
|
815
|
+
)
|
|
658
816
|
]
|
|
659
817
|
|
|
660
818
|
const sliders = [
|
|
@@ -673,34 +831,43 @@ export default createComponent({
|
|
|
673
831
|
})
|
|
674
832
|
]
|
|
675
833
|
|
|
676
|
-
hasAlpha.value === true
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
834
|
+
if (hasAlpha.value === true) {
|
|
835
|
+
sliders.push(
|
|
836
|
+
h(QSlider, {
|
|
837
|
+
class: 'q-color-picker__alpha non-selectable',
|
|
838
|
+
modelValue: model.value.a,
|
|
839
|
+
min: 0,
|
|
840
|
+
max: 100,
|
|
841
|
+
trackSize: '8px',
|
|
842
|
+
trackColor: 'white',
|
|
843
|
+
innerTrackColor: 'transparent',
|
|
844
|
+
selectionColor: 'transparent',
|
|
845
|
+
trackImg: alphaTrackImg,
|
|
846
|
+
readonly: editable.value !== true,
|
|
847
|
+
hideSelection: true,
|
|
848
|
+
thumbPath,
|
|
849
|
+
...getCache('alphaSlide', {
|
|
850
|
+
'onUpdate:modelValue': value => onNumericChange(value, 'a', 100),
|
|
851
|
+
onChange: value => onNumericChange(value, 'a', 100, void 0, true)
|
|
852
|
+
})
|
|
693
853
|
})
|
|
694
|
-
|
|
695
|
-
|
|
854
|
+
)
|
|
855
|
+
}
|
|
696
856
|
|
|
697
857
|
return [
|
|
698
|
-
hDir(
|
|
858
|
+
hDir(
|
|
859
|
+
'div',
|
|
860
|
+
data,
|
|
861
|
+
child,
|
|
862
|
+
'spec',
|
|
863
|
+
editable.value,
|
|
864
|
+
() => spectrumDirective.value
|
|
865
|
+
),
|
|
699
866
|
h('div', { class: 'q-color-picker__sliders' }, sliders)
|
|
700
867
|
]
|
|
701
868
|
}
|
|
702
869
|
|
|
703
|
-
function getTuneTab
|
|
870
|
+
function getTuneTab() {
|
|
704
871
|
return [
|
|
705
872
|
h('div', { class: 'row items-center no-wrap' }, [
|
|
706
873
|
h('div', 'R'),
|
|
@@ -723,7 +890,8 @@ export default createComponent({
|
|
|
723
890
|
onChange: stop,
|
|
724
891
|
...getCache('rIn', {
|
|
725
892
|
onInput: evt => onNumericChange(evt.target.value, 'r', 255, evt),
|
|
726
|
-
onBlur: evt =>
|
|
893
|
+
onBlur: evt =>
|
|
894
|
+
onNumericChange(evt.target.value, 'r', 255, evt, true)
|
|
727
895
|
})
|
|
728
896
|
})
|
|
729
897
|
]),
|
|
@@ -749,7 +917,8 @@ export default createComponent({
|
|
|
749
917
|
onChange: stop,
|
|
750
918
|
...getCache('gIn', {
|
|
751
919
|
onInput: evt => onNumericChange(evt.target.value, 'g', 255, evt),
|
|
752
|
-
onBlur: evt =>
|
|
920
|
+
onBlur: evt =>
|
|
921
|
+
onNumericChange(evt.target.value, 'g', 255, evt, true)
|
|
753
922
|
})
|
|
754
923
|
})
|
|
755
924
|
]),
|
|
@@ -775,77 +944,91 @@ export default createComponent({
|
|
|
775
944
|
onChange: stop,
|
|
776
945
|
...getCache('bIn', {
|
|
777
946
|
onInput: evt => onNumericChange(evt.target.value, 'b', 255, evt),
|
|
778
|
-
onBlur: evt =>
|
|
947
|
+
onBlur: evt =>
|
|
948
|
+
onNumericChange(evt.target.value, 'b', 255, evt, true)
|
|
779
949
|
})
|
|
780
950
|
})
|
|
781
951
|
]),
|
|
782
952
|
|
|
783
|
-
hasAlpha.value === true
|
|
784
|
-
h('div', '
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
953
|
+
hasAlpha.value === true
|
|
954
|
+
? h('div', { class: 'row items-center no-wrap' }, [
|
|
955
|
+
h('div', 'A'),
|
|
956
|
+
h(QSlider, {
|
|
957
|
+
modelValue: model.value.a,
|
|
958
|
+
color: 'grey',
|
|
959
|
+
readonly: editable.value !== true,
|
|
960
|
+
dark: isDark.value,
|
|
961
|
+
...getCache('aSlide', {
|
|
962
|
+
'onUpdate:modelValue': value =>
|
|
963
|
+
onNumericChange(value, 'a', 100),
|
|
964
|
+
onChange: value =>
|
|
965
|
+
onNumericChange(value, 'a', 100, void 0, true)
|
|
966
|
+
})
|
|
967
|
+
}),
|
|
968
|
+
h('input', {
|
|
969
|
+
value: model.value.a,
|
|
970
|
+
maxlength: 3,
|
|
971
|
+
readonly: editable.value !== true,
|
|
972
|
+
onChange: stop,
|
|
973
|
+
...getCache('aIn', {
|
|
974
|
+
onInput: evt =>
|
|
975
|
+
onNumericChange(evt.target.value, 'a', 100, evt),
|
|
976
|
+
onBlur: evt =>
|
|
977
|
+
onNumericChange(evt.target.value, 'a', 100, evt, true)
|
|
978
|
+
})
|
|
979
|
+
})
|
|
980
|
+
])
|
|
981
|
+
: null
|
|
806
982
|
]
|
|
807
983
|
}
|
|
808
984
|
|
|
809
|
-
function getPaletteTab
|
|
810
|
-
const fn = color =>
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
editable.value === true
|
|
985
|
+
function getPaletteTab() {
|
|
986
|
+
const fn = color =>
|
|
987
|
+
h('div', {
|
|
988
|
+
class: 'q-color-picker__cube col-auto',
|
|
989
|
+
style: { backgroundColor: color },
|
|
990
|
+
...(editable.value === true
|
|
815
991
|
? getCache('palette#' + color, {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
992
|
+
onClick: () => {
|
|
993
|
+
onPalettePick(color)
|
|
994
|
+
}
|
|
995
|
+
})
|
|
996
|
+
: {})
|
|
997
|
+
})
|
|
821
998
|
|
|
822
999
|
return [
|
|
823
|
-
h(
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1000
|
+
h(
|
|
1001
|
+
'div',
|
|
1002
|
+
{
|
|
1003
|
+
class:
|
|
1004
|
+
'row items-center q-color-picker__palette-rows' +
|
|
1005
|
+
(editable.value === true
|
|
1006
|
+
? ' q-color-picker__palette-rows--editable'
|
|
1007
|
+
: '')
|
|
1008
|
+
},
|
|
1009
|
+
computedPalette.value.map(fn)
|
|
1010
|
+
)
|
|
827
1011
|
]
|
|
828
1012
|
}
|
|
829
1013
|
|
|
830
1014
|
return () => {
|
|
831
|
-
const child = [
|
|
1015
|
+
const child = [getContent()]
|
|
832
1016
|
|
|
833
1017
|
if (props.name !== void 0 && props.disable !== true) {
|
|
834
1018
|
injectFormInput(child, 'push')
|
|
835
1019
|
}
|
|
836
1020
|
|
|
837
|
-
props.noHeader !== true
|
|
838
|
-
|
|
839
|
-
)
|
|
1021
|
+
if (props.noHeader !== true) child.unshift(getHeader())
|
|
1022
|
+
if (props.noFooter !== true) child.push(getFooter())
|
|
840
1023
|
|
|
841
|
-
|
|
842
|
-
|
|
1024
|
+
return h(
|
|
1025
|
+
'div',
|
|
1026
|
+
{
|
|
1027
|
+
class: classes.value,
|
|
1028
|
+
...attributes.value
|
|
1029
|
+
},
|
|
1030
|
+
child
|
|
843
1031
|
)
|
|
844
|
-
|
|
845
|
-
return h('div', {
|
|
846
|
-
class: classes.value,
|
|
847
|
-
...attributes.value
|
|
848
|
-
}, child)
|
|
849
1032
|
}
|
|
850
1033
|
}
|
|
851
1034
|
})
|