quasar 2.18.7 → 2.19.0

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