quasar 2.18.6 → 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 (858) 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 -29218
  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 -29789
  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 +127 -415
  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/vetur/quasar-attributes.json +1 -1
  185. package/dist/web-types/web-types.json +1 -1
  186. package/icon-set/bootstrap-icons.js +1 -4
  187. package/icon-set/svg-bootstrap-icons.js +1 -4
  188. package/icon-set/svg-fontawesome-v5.js +0 -1
  189. package/icon-set/svg-ionicons-v5.js +2 -2
  190. package/lang/ar-TN.js +10 -8
  191. package/lang/ar.js +10 -8
  192. package/lang/az-Latn.js +13 -9
  193. package/lang/bg.js +10 -8
  194. package/lang/bn.js +14 -9
  195. package/lang/bs-BA.js +13 -9
  196. package/lang/ca.js +18 -14
  197. package/lang/cs.js +9 -7
  198. package/lang/da.js +10 -8
  199. package/lang/de-CH.js +13 -9
  200. package/lang/de-DE.js +13 -9
  201. package/lang/de.js +13 -9
  202. package/lang/el.js +10 -8
  203. package/lang/en-GB.js +10 -8
  204. package/lang/en-US.js +10 -8
  205. package/lang/eo.js +14 -9
  206. package/lang/es.js +10 -8
  207. package/lang/et.js +15 -12
  208. package/lang/eu.js +15 -12
  209. package/lang/fa-IR.js +16 -8
  210. package/lang/fa.js +16 -8
  211. package/lang/fi.js +17 -8
  212. package/lang/fr.js +21 -13
  213. package/lang/gn.js +14 -12
  214. package/lang/he.js +15 -10
  215. package/lang/hi.js +8 -8
  216. package/lang/hr.js +13 -9
  217. package/lang/hu.js +10 -8
  218. package/lang/id.js +11 -9
  219. package/lang/is.js +13 -9
  220. package/lang/it.js +14 -9
  221. package/lang/ja.js +13 -8
  222. package/lang/kk.js +22 -11
  223. package/lang/km.js +9 -8
  224. package/lang/ko-KR.js +9 -10
  225. package/lang/kur-CKB.js +16 -17
  226. package/lang/lt.js +26 -19
  227. package/lang/lu.js +13 -9
  228. package/lang/lv.js +13 -9
  229. package/lang/mk.js +10 -8
  230. package/lang/ml.js +15 -14
  231. package/lang/mm.js +16 -13
  232. package/lang/ms-MY.js +16 -11
  233. package/lang/ms.js +10 -8
  234. package/lang/my.js +15 -8
  235. package/lang/nb-NO.js +10 -8
  236. package/lang/nl.js +13 -9
  237. package/lang/pl.js +13 -9
  238. package/lang/pt-BR.js +17 -10
  239. package/lang/pt.js +17 -10
  240. package/lang/ro.js +10 -8
  241. package/lang/ru.js +25 -12
  242. package/lang/sk.js +18 -9
  243. package/lang/sl.js +12 -8
  244. package/lang/sm.js +51 -47
  245. package/lang/sq.js +13 -9
  246. package/lang/sr-CYR.js +10 -8
  247. package/lang/sr.js +10 -8
  248. package/lang/sv.js +10 -8
  249. package/lang/ta.js +10 -8
  250. package/lang/th.js +12 -11
  251. package/lang/tl.js +10 -8
  252. package/lang/tr.js +8 -5
  253. package/lang/ug.js +16 -8
  254. package/lang/uk.js +22 -11
  255. package/lang/ur-PK.js +13 -11
  256. package/lang/uz-Cyrl.js +5 -5
  257. package/lang/uz-Latn.js +24 -24
  258. package/lang/vi.js +13 -9
  259. package/lang/zh-CN.js +18 -9
  260. package/lang/zh-TW.js +20 -10
  261. package/package.json +52 -66
  262. package/src/api.extends.json +15 -12
  263. package/src/components/ajax-bar/QAjaxBar.js +91 -65
  264. package/src/components/ajax-bar/QAjaxBar.json +2 -2
  265. package/src/components/ajax-bar/index.js +1 -3
  266. package/src/components/avatar/QAvatar.js +36 -28
  267. package/src/components/avatar/QAvatar.json +2 -2
  268. package/src/components/avatar/QAvatar.test.js +29 -78
  269. package/src/components/avatar/index.js +1 -3
  270. package/src/components/badge/QBadge.js +33 -26
  271. package/src/components/badge/QBadge.json +3 -3
  272. package/src/components/badge/QBadge.test.js +40 -95
  273. package/src/components/badge/index.js +1 -3
  274. package/src/components/banner/QBanner.js +46 -25
  275. package/src/components/banner/QBanner.test.js +14 -35
  276. package/src/components/banner/index.js +1 -3
  277. package/src/components/bar/QBar.js +21 -11
  278. package/src/components/bar/QBar.test.js +6 -17
  279. package/src/components/bar/index.js +1 -3
  280. package/src/components/breadcrumbs/QBreadcrumbs.js +44 -32
  281. package/src/components/breadcrumbs/QBreadcrumbs.json +10 -3
  282. package/src/components/breadcrumbs/QBreadcrumbs.test.js +56 -69
  283. package/src/components/breadcrumbs/QBreadcrumbsEl.js +28 -22
  284. package/src/components/breadcrumbs/QBreadcrumbsEl.json +5 -8
  285. package/src/components/breadcrumbs/QBreadcrumbsEl.test.js +60 -134
  286. package/src/components/breadcrumbs/index.js +1 -4
  287. package/src/components/btn/QBtn.js +159 -103
  288. package/src/components/btn/QBtn.json +3 -6
  289. package/src/components/btn/QBtn.test.js +269 -496
  290. package/src/components/btn/index.js +1 -3
  291. package/src/components/btn/use-btn.js +82 -70
  292. package/src/components/btn/use-btn.json +33 -16
  293. package/src/components/btn/use-btn.test.js +30 -47
  294. package/src/components/btn-dropdown/QBtnDropdown.js +143 -104
  295. package/src/components/btn-dropdown/QBtnDropdown.json +42 -17
  296. package/src/components/btn-dropdown/index.js +1 -3
  297. package/src/components/btn-group/QBtnGroup.js +18 -6
  298. package/src/components/btn-group/index.js +1 -3
  299. package/src/components/btn-toggle/QBtnToggle.js +80 -61
  300. package/src/components/btn-toggle/QBtnToggle.json +16 -9
  301. package/src/components/btn-toggle/index.js +1 -3
  302. package/src/components/card/QCard.js +14 -9
  303. package/src/components/card/QCard.json +1 -1
  304. package/src/components/card/QCardActions.js +8 -5
  305. package/src/components/card/QCardActions.json +9 -1
  306. package/src/components/card/QCardSection.js +5 -4
  307. package/src/components/card/QCardSection.json +1 -1
  308. package/src/components/card/index.js +1 -5
  309. package/src/components/carousel/QCarousel.js +194 -125
  310. package/src/components/carousel/QCarousel.json +10 -11
  311. package/src/components/carousel/QCarouselControl.js +26 -13
  312. package/src/components/carousel/QCarouselControl.json +10 -5
  313. package/src/components/carousel/QCarouselSlide.js +13 -10
  314. package/src/components/carousel/QCarouselSlide.json +1 -1
  315. package/src/components/carousel/index.js +1 -5
  316. package/src/components/chat/QChatMessage.js +62 -57
  317. package/src/components/chat/QChatMessage.json +8 -5
  318. package/src/components/chat/index.js +1 -3
  319. package/src/components/checkbox/QCheckbox.js +56 -41
  320. package/src/components/checkbox/QCheckbox.json +1 -1
  321. package/src/components/checkbox/index.js +1 -3
  322. package/src/components/checkbox/use-checkbox.js +112 -83
  323. package/src/components/checkbox/use-checkbox.json +15 -12
  324. package/src/components/chip/QChip.js +101 -73
  325. package/src/components/chip/QChip.json +6 -6
  326. package/src/components/chip/QChip.test.js +72 -180
  327. package/src/components/chip/index.js +1 -3
  328. package/src/components/circular-progress/QCircularProgress.js +92 -57
  329. package/src/components/circular-progress/QCircularProgress.json +2 -2
  330. package/src/components/circular-progress/index.js +1 -3
  331. package/src/components/color/QColor.js +550 -367
  332. package/src/components/color/QColor.json +8 -8
  333. package/src/components/color/index.js +1 -3
  334. package/src/components/date/QDate.js +902 -607
  335. package/src/components/date/QDate.json +32 -23
  336. package/src/components/date/index.js +1 -3
  337. package/src/components/date/use-datetime.js +12 -14
  338. package/src/components/date/use-datetime.json +7 -7
  339. package/src/components/dialog/QDialog.js +178 -139
  340. package/src/components/dialog/QDialog.json +8 -4
  341. package/src/components/dialog/QDialog.test.js +123 -228
  342. package/src/components/dialog/index.js +1 -3
  343. package/src/components/drawer/QDrawer.js +306 -242
  344. package/src/components/drawer/QDrawer.json +4 -4
  345. package/src/components/drawer/index.js +1 -3
  346. package/src/components/editor/QEditor.js +409 -190
  347. package/src/components/editor/QEditor.json +33 -32
  348. package/src/components/editor/editor-caret.js +78 -83
  349. package/src/components/editor/editor-utils.js +176 -130
  350. package/src/components/editor/index.js +1 -3
  351. package/src/components/expansion-item/QExpansionItem.js +149 -103
  352. package/src/components/expansion-item/QExpansionItem.json +21 -24
  353. package/src/components/expansion-item/index.js +1 -3
  354. package/src/components/fab/QFab.js +86 -54
  355. package/src/components/fab/QFab.json +6 -3
  356. package/src/components/fab/QFabAction.js +34 -29
  357. package/src/components/fab/QFabAction.json +4 -7
  358. package/src/components/fab/index.js +1 -4
  359. package/src/components/fab/use-fab.js +20 -20
  360. package/src/components/fab/use-fab.json +10 -13
  361. package/src/components/field/QField.js +7 -5
  362. package/src/components/field/QField.json +6 -6
  363. package/src/components/field/QField.sass +5 -6
  364. package/src/components/field/index.js +1 -3
  365. package/src/components/file/QFile.js +95 -74
  366. package/src/components/file/QFile.json +17 -14
  367. package/src/components/file/index.js +1 -3
  368. package/src/components/footer/QFooter.js +110 -67
  369. package/src/components/footer/QFooter.json +2 -2
  370. package/src/components/footer/index.js +1 -3
  371. package/src/components/form/QForm.js +93 -58
  372. package/src/components/form/QForm.json +2 -2
  373. package/src/components/form/QFormChildMixin.js +10 -11
  374. package/src/components/form/QFormChildMixin.json +2 -2
  375. package/src/components/form/index.js +1 -4
  376. package/src/components/header/QHeader.js +93 -56
  377. package/src/components/header/QHeader.json +2 -2
  378. package/src/components/header/index.js +1 -3
  379. package/src/components/icon/QIcon.js +70 -57
  380. package/src/components/icon/QIcon.json +2 -2
  381. package/src/components/icon/index.js +1 -3
  382. package/src/components/img/QImg.js +104 -98
  383. package/src/components/img/QImg.json +20 -18
  384. package/src/components/img/index.js +1 -3
  385. package/src/components/infinite-scroll/QInfiniteScroll.js +123 -64
  386. package/src/components/infinite-scroll/QInfiniteScroll.json +1 -1
  387. package/src/components/infinite-scroll/index.js +1 -3
  388. package/src/components/inner-loading/QInnerLoading.js +31 -23
  389. package/src/components/inner-loading/QInnerLoading.json +9 -9
  390. package/src/components/inner-loading/index.js +1 -3
  391. package/src/components/input/QInput.js +179 -137
  392. package/src/components/input/QInput.json +25 -15
  393. package/src/components/input/index.js +1 -3
  394. package/src/components/input/use-mask.js +328 -243
  395. package/src/components/input/use-mask.json +16 -8
  396. package/src/components/intersection/QIntersection.js +45 -28
  397. package/src/components/intersection/QIntersection.json +7 -10
  398. package/src/components/intersection/index.js +1 -3
  399. package/src/components/item/QItem.js +60 -52
  400. package/src/components/item/QItem.json +6 -9
  401. package/src/components/item/QItemLabel.js +23 -15
  402. package/src/components/item/QItemLabel.json +1 -1
  403. package/src/components/item/QItemSection.js +11 -8
  404. package/src/components/item/QList.js +21 -13
  405. package/src/components/item/QList.json +1 -1
  406. package/src/components/item/QList.test.js +7 -11
  407. package/src/components/item/index.js +1 -7
  408. package/src/components/knob/QKnob.js +86 -76
  409. package/src/components/knob/QKnob.json +6 -3
  410. package/src/components/knob/index.js +1 -3
  411. package/src/components/layout/QLayout.js +98 -69
  412. package/src/components/layout/QLayout.json +2 -2
  413. package/src/components/layout/index.js +1 -3
  414. package/src/components/linear-progress/QLinearProgress.js +78 -47
  415. package/src/components/linear-progress/QLinearProgress.json +3 -3
  416. package/src/components/linear-progress/index.js +1 -3
  417. package/src/components/markup-table/QMarkupTable.js +25 -17
  418. package/src/components/markup-table/QMarkupTable.json +2 -2
  419. package/src/components/markup-table/index.js +1 -3
  420. package/src/components/menu/QMenu.js +144 -100
  421. package/src/components/menu/QMenu.json +39 -10
  422. package/src/components/menu/index.js +1 -3
  423. package/src/components/no-ssr/QNoSsr.js +5 -5
  424. package/src/components/no-ssr/QNoSsr.json +2 -2
  425. package/src/components/no-ssr/index.js +1 -3
  426. package/src/components/option-group/QOptionGroup.js +84 -66
  427. package/src/components/option-group/QOptionGroup.json +35 -21
  428. package/src/components/option-group/index.js +1 -3
  429. package/src/components/page/QPage.js +35 -22
  430. package/src/components/page/QPage.json +1 -1
  431. package/src/components/page/QPageContainer.js +24 -11
  432. package/src/components/page/index.js +1 -4
  433. package/src/components/page-scroller/QPageScroller.js +49 -32
  434. package/src/components/page-scroller/QPageScroller.json +2 -2
  435. package/src/components/page-scroller/index.js +1 -3
  436. package/src/components/page-sticky/QPageSticky.js +1 -1
  437. package/src/components/page-sticky/QPageSticky.json +9 -4
  438. package/src/components/page-sticky/index.js +1 -3
  439. package/src/components/page-sticky/use-page-sticky.js +47 -36
  440. package/src/components/pagination/QPagination.js +210 -146
  441. package/src/components/pagination/QPagination.json +35 -21
  442. package/src/components/pagination/index.js +1 -3
  443. package/src/components/parallax/QParallax.js +81 -56
  444. package/src/components/parallax/index.js +1 -3
  445. package/src/components/popup-edit/QPopupEdit.js +88 -59
  446. package/src/components/popup-edit/QPopupEdit.json +40 -16
  447. package/src/components/popup-edit/index.js +1 -3
  448. package/src/components/popup-proxy/QPopupProxy.js +30 -19
  449. package/src/components/popup-proxy/QPopupProxy.json +3 -3
  450. package/src/components/popup-proxy/index.js +1 -3
  451. package/src/components/pull-to-refresh/QPullToRefresh.js +71 -49
  452. package/src/components/pull-to-refresh/index.js +1 -3
  453. package/src/components/radio/QRadio.js +133 -95
  454. package/src/components/radio/QRadio.json +11 -8
  455. package/src/components/radio/index.js +1 -3
  456. package/src/components/range/QRange.js +151 -104
  457. package/src/components/range/QRange.json +9 -9
  458. package/src/components/range/index.js +1 -3
  459. package/src/components/rating/QRating.js +171 -112
  460. package/src/components/rating/QRating.json +19 -12
  461. package/src/components/rating/index.js +1 -3
  462. package/src/components/resize-observer/QResizeObserver.js +52 -30
  463. package/src/components/resize-observer/QResizeObserver.json +2 -2
  464. package/src/components/resize-observer/index.js +1 -3
  465. package/src/components/responsive/QResponsive.js +27 -14
  466. package/src/components/responsive/QResponsive.json +1 -1
  467. package/src/components/responsive/index.js +1 -3
  468. package/src/components/scroll-area/QScrollArea.js +279 -192
  469. package/src/components/scroll-area/QScrollArea.json +31 -21
  470. package/src/components/scroll-area/ScrollAreaControls.js +6 -11
  471. package/src/components/scroll-area/index.js +1 -3
  472. package/src/components/scroll-observer/QScrollObserver.js +46 -26
  473. package/src/components/scroll-observer/QScrollObserver.json +4 -4
  474. package/src/components/scroll-observer/index.js +1 -3
  475. package/src/components/select/QSelect.js +710 -519
  476. package/src/components/select/QSelect.json +70 -45
  477. package/src/components/select/index.js +1 -3
  478. package/src/components/separator/QSeparator.js +34 -30
  479. package/src/components/separator/QSeparator.json +4 -4
  480. package/src/components/separator/index.js +1 -3
  481. package/src/components/skeleton/QSkeleton.js +49 -23
  482. package/src/components/skeleton/QSkeleton.json +26 -9
  483. package/src/components/skeleton/index.js +1 -3
  484. package/src/components/slide-item/QSlideItem.js +121 -94
  485. package/src/components/slide-item/QSlideItem.json +2 -2
  486. package/src/components/slide-item/index.js +1 -3
  487. package/src/components/slide-transition/QSlideTransition.js +34 -26
  488. package/src/components/slide-transition/index.js +1 -3
  489. package/src/components/slider/QSlider.js +64 -43
  490. package/src/components/slider/QSlider.json +6 -6
  491. package/src/components/slider/index.js +1 -3
  492. package/src/components/slider/use-slider.js +327 -220
  493. package/src/components/slider/use-slider.json +32 -32
  494. package/src/components/space/QSpace.js +1 -1
  495. package/src/components/space/QSpace.test.js +1 -4
  496. package/src/components/space/index.js +1 -3
  497. package/src/components/spinner/QSpinner.js +23 -18
  498. package/src/components/spinner/QSpinner.json +1 -1
  499. package/src/components/spinner/QSpinner.test.js +11 -27
  500. package/src/components/spinner/QSpinnerAudio.js +13 -11
  501. package/src/components/spinner/QSpinnerAudio.json +1 -1
  502. package/src/components/spinner/QSpinnerAudio.test.js +9 -21
  503. package/src/components/spinner/QSpinnerBall.js +13 -11
  504. package/src/components/spinner/QSpinnerBall.json +1 -1
  505. package/src/components/spinner/QSpinnerBall.test.js +9 -21
  506. package/src/components/spinner/QSpinnerBars.js +13 -11
  507. package/src/components/spinner/QSpinnerBars.json +1 -1
  508. package/src/components/spinner/QSpinnerBars.test.js +9 -21
  509. package/src/components/spinner/QSpinnerBox.js +13 -11
  510. package/src/components/spinner/QSpinnerBox.json +1 -1
  511. package/src/components/spinner/QSpinnerBox.test.js +9 -21
  512. package/src/components/spinner/QSpinnerClock.js +13 -11
  513. package/src/components/spinner/QSpinnerClock.json +1 -1
  514. package/src/components/spinner/QSpinnerClock.test.js +9 -21
  515. package/src/components/spinner/QSpinnerComment.js +13 -11
  516. package/src/components/spinner/QSpinnerComment.json +1 -1
  517. package/src/components/spinner/QSpinnerComment.test.js +9 -21
  518. package/src/components/spinner/QSpinnerCube.js +13 -11
  519. package/src/components/spinner/QSpinnerCube.json +1 -1
  520. package/src/components/spinner/QSpinnerCube.test.js +9 -21
  521. package/src/components/spinner/QSpinnerDots.js +13 -11
  522. package/src/components/spinner/QSpinnerDots.json +1 -1
  523. package/src/components/spinner/QSpinnerDots.test.js +9 -21
  524. package/src/components/spinner/QSpinnerFacebook.js +13 -11
  525. package/src/components/spinner/QSpinnerFacebook.json +1 -1
  526. package/src/components/spinner/QSpinnerFacebook.test.js +9 -21
  527. package/src/components/spinner/QSpinnerGears.js +13 -11
  528. package/src/components/spinner/QSpinnerGears.json +1 -1
  529. package/src/components/spinner/QSpinnerGears.test.js +9 -21
  530. package/src/components/spinner/QSpinnerGrid.js +13 -11
  531. package/src/components/spinner/QSpinnerGrid.json +1 -1
  532. package/src/components/spinner/QSpinnerGrid.test.js +9 -21
  533. package/src/components/spinner/QSpinnerHearts.js +13 -11
  534. package/src/components/spinner/QSpinnerHearts.json +1 -1
  535. package/src/components/spinner/QSpinnerHearts.test.js +9 -21
  536. package/src/components/spinner/QSpinnerHourglass.js +13 -11
  537. package/src/components/spinner/QSpinnerHourglass.json +1 -1
  538. package/src/components/spinner/QSpinnerHourglass.test.js +9 -21
  539. package/src/components/spinner/QSpinnerInfinity.js +12 -10
  540. package/src/components/spinner/QSpinnerInfinity.json +1 -1
  541. package/src/components/spinner/QSpinnerInfinity.test.js +9 -21
  542. package/src/components/spinner/QSpinnerIos.js +13 -11
  543. package/src/components/spinner/QSpinnerIos.json +1 -1
  544. package/src/components/spinner/QSpinnerIos.test.js +9 -21
  545. package/src/components/spinner/QSpinnerOrbit.js +13 -11
  546. package/src/components/spinner/QSpinnerOrbit.json +1 -1
  547. package/src/components/spinner/QSpinnerOrbit.test.js +9 -21
  548. package/src/components/spinner/QSpinnerOval.js +13 -11
  549. package/src/components/spinner/QSpinnerOval.json +1 -1
  550. package/src/components/spinner/QSpinnerOval.test.js +9 -21
  551. package/src/components/spinner/QSpinnerPie.js +13 -11
  552. package/src/components/spinner/QSpinnerPie.json +1 -1
  553. package/src/components/spinner/QSpinnerPie.test.js +9 -21
  554. package/src/components/spinner/QSpinnerPuff.js +13 -11
  555. package/src/components/spinner/QSpinnerPuff.json +1 -1
  556. package/src/components/spinner/QSpinnerPuff.test.js +9 -21
  557. package/src/components/spinner/QSpinnerRadio.js +13 -11
  558. package/src/components/spinner/QSpinnerRadio.json +1 -1
  559. package/src/components/spinner/QSpinnerRadio.test.js +9 -21
  560. package/src/components/spinner/QSpinnerRings.js +13 -11
  561. package/src/components/spinner/QSpinnerRings.json +1 -1
  562. package/src/components/spinner/QSpinnerRings.test.js +9 -21
  563. package/src/components/spinner/QSpinnerTail.js +12 -10
  564. package/src/components/spinner/QSpinnerTail.json +1 -1
  565. package/src/components/spinner/QSpinnerTail.test.js +9 -21
  566. package/src/components/spinner/index.js +0 -1
  567. package/src/components/spinner/spinner.json +2 -2
  568. package/src/components/spinner/use-spinner.js +7 -7
  569. package/src/components/spinner/use-spinner.test.js +1 -1
  570. package/src/components/splitter/QSplitter.js +133 -94
  571. package/src/components/splitter/QSplitter.json +10 -19
  572. package/src/components/splitter/index.js +1 -3
  573. package/src/components/stepper/QStep.js +65 -42
  574. package/src/components/stepper/QStep.json +5 -5
  575. package/src/components/stepper/QStepper.js +62 -39
  576. package/src/components/stepper/QStepper.json +2 -2
  577. package/src/components/stepper/QStepperNavigation.js +1 -1
  578. package/src/components/stepper/StepHeader.js +87 -67
  579. package/src/components/stepper/index.js +1 -5
  580. package/src/components/tab-panels/QTabPanel.js +3 -2
  581. package/src/components/tab-panels/QTabPanel.json +1 -1
  582. package/src/components/tab-panels/QTabPanels.js +12 -6
  583. package/src/components/tab-panels/QTabPanels.json +1 -1
  584. package/src/components/tab-panels/index.js +1 -4
  585. package/src/components/table/QTable.js +544 -426
  586. package/src/components/table/QTable.json +168 -165
  587. package/src/components/table/QTd.js +18 -13
  588. package/src/components/table/QTd.json +1 -1
  589. package/src/components/table/QTh.js +25 -20
  590. package/src/components/table/QTh.json +1 -1
  591. package/src/components/table/QTr.js +17 -9
  592. package/src/components/table/QTr.json +1 -1
  593. package/src/components/table/get-table-middle.js +2 -4
  594. package/src/components/table/index.js +1 -6
  595. package/src/components/table/table-column-selection.js +45 -35
  596. package/src/components/table/table-filter.js +9 -8
  597. package/src/components/table/table-pagination.js +75 -52
  598. package/src/components/table/table-row-expand.js +15 -16
  599. package/src/components/table/table-row-selection.js +31 -31
  600. package/src/components/table/table-sort.js +26 -29
  601. package/src/components/tabs/QRouteTab.js +10 -12
  602. package/src/components/tabs/QRouteTab.json +6 -6
  603. package/src/components/tabs/QTab.js +1 -1
  604. package/src/components/tabs/QTab.json +1 -1
  605. package/src/components/tabs/QTabs.js +283 -205
  606. package/src/components/tabs/QTabs.json +9 -9
  607. package/src/components/tabs/index.js +1 -5
  608. package/src/components/tabs/use-tab.js +127 -103
  609. package/src/components/tabs/use-tab.json +8 -8
  610. package/src/components/time/QTime.js +502 -383
  611. package/src/components/time/QTime.json +19 -15
  612. package/src/components/time/index.js +1 -3
  613. package/src/components/timeline/QTimeline.js +10 -7
  614. package/src/components/timeline/QTimeline.json +2 -2
  615. package/src/components/timeline/QTimelineEntry.js +44 -27
  616. package/src/components/timeline/QTimelineEntry.json +7 -5
  617. package/src/components/timeline/index.js +1 -4
  618. package/src/components/toggle/QToggle.js +29 -19
  619. package/src/components/toggle/QToggle.json +1 -1
  620. package/src/components/toggle/index.js +1 -3
  621. package/src/components/toolbar/QToolbar.js +7 -5
  622. package/src/components/toolbar/QToolbar.test.js +2 -6
  623. package/src/components/toolbar/QToolbarTitle.js +5 -4
  624. package/src/components/toolbar/QToolbarTitle.test.js +2 -6
  625. package/src/components/toolbar/index.js +1 -4
  626. package/src/components/tooltip/QTooltip.js +125 -72
  627. package/src/components/tooltip/QTooltip.json +34 -10
  628. package/src/components/tooltip/index.js +1 -3
  629. package/src/components/tree/QTree.js +417 -297
  630. package/src/components/tree/QTree.json +27 -25
  631. package/src/components/tree/index.js +1 -3
  632. package/src/components/uploader/QUploader.json +9 -6
  633. package/src/components/uploader/QUploaderAddTrigger.js +5 -2
  634. package/src/components/uploader/index.js +1 -4
  635. package/src/components/uploader/uploader-core.js +262 -178
  636. package/src/components/uploader/xhr-uploader-plugin.js +96 -89
  637. package/src/components/uploader/xhr-uploader-plugin.json +29 -29
  638. package/src/components/video/QVideo.js +25 -19
  639. package/src/components/video/QVideo.json +5 -5
  640. package/src/components/video/QVideo.test.js +55 -85
  641. package/src/components/video/index.js +1 -3
  642. package/src/components/virtual-scroll/QVirtualScroll.js +89 -37
  643. package/src/components/virtual-scroll/QVirtualScroll.json +6 -6
  644. package/src/components/virtual-scroll/index.js +1 -3
  645. package/src/components/virtual-scroll/use-virtual-scroll.js +421 -240
  646. package/src/components/virtual-scroll/use-virtual-scroll.json +20 -13
  647. package/src/composables/private.use-align/use-align.js +8 -5
  648. package/src/composables/private.use-align/use-align.test.js +9 -17
  649. package/src/composables/private.use-anchor/use-anchor-static.json +2 -7
  650. package/src/composables/private.use-anchor/use-anchor.js +79 -62
  651. package/src/composables/private.use-anchor/use-anchor.json +1 -1
  652. package/src/composables/private.use-dark/use-dark.js +2 -6
  653. package/src/composables/private.use-dark/use-dark.test.js +7 -21
  654. package/src/composables/private.use-field/use-field.js +384 -251
  655. package/src/composables/private.use-field/use-field.json +10 -10
  656. package/src/composables/private.use-file/use-file-dom-props.js +11 -15
  657. package/src/composables/private.use-file/use-file.js +86 -67
  658. package/src/composables/private.use-file/use-file.json +8 -8
  659. package/src/composables/private.use-fullscreen/use-fullscreen.js +35 -17
  660. package/src/composables/private.use-fullscreen/use-fullscreen.json +1 -1
  661. package/src/composables/private.use-history/use-history.js +4 -4
  662. package/src/composables/private.use-history/use-history.test.js +9 -21
  663. package/src/composables/private.use-key-composition/use-key-composition.js +16 -12
  664. package/src/composables/private.use-model-toggle/use-model-toggle.js +44 -35
  665. package/src/composables/private.use-model-toggle/use-model-toggle.json +2 -2
  666. package/src/composables/private.use-panel/use-panel.child.json +1 -1
  667. package/src/composables/private.use-panel/use-panel.js +131 -91
  668. package/src/composables/private.use-panel/use-panel.json +18 -18
  669. package/src/composables/private.use-portal/use-portal.js +20 -15
  670. package/src/composables/private.use-prevent-scroll/use-prevent-scroll.js +4 -4
  671. package/src/composables/private.use-ratio/use-ratio.js +3 -3
  672. package/src/composables/private.use-ratio/use-ratio.json +2 -7
  673. package/src/composables/private.use-refocus-target/use-refocus-target.js +7 -8
  674. package/src/composables/private.use-router-link/use-router-link.js +111 -110
  675. package/src/composables/private.use-router-link/use-router-link.json +6 -9
  676. package/src/composables/private.use-scroll-target/use-scroll-target.js +14 -11
  677. package/src/composables/private.use-size/use-size.js +6 -4
  678. package/src/composables/private.use-size/use-size.json +1 -1
  679. package/src/composables/private.use-size/use-size.test.js +1 -1
  680. package/src/composables/private.use-transition/use-transition.js +17 -11
  681. package/src/composables/private.use-transition/use-transition.json +1 -1
  682. package/src/composables/private.use-transition/use-transition.test.js +7 -21
  683. package/src/composables/private.use-validate/use-validate.js +78 -67
  684. package/src/composables/private.use-validate/use-validate.json +9 -12
  685. package/src/composables/use-dialog-plugin-component/use-dialog-plugin-component.js +12 -6
  686. package/src/composables/use-form/private.use-form.js +4 -4
  687. package/src/composables/use-form/private.use-form.json +1 -1
  688. package/src/composables/use-form/private.use-form.test.js +17 -15
  689. package/src/composables/use-form/use-form-child.js +25 -14
  690. package/src/composables/use-hydration/use-hydration.js +1 -1
  691. package/src/composables/use-hydration/use-hydration.test.js +2 -4
  692. package/src/composables/use-id/use-id.js +10 -12
  693. package/src/composables/use-id/use-id.test.js +1 -1
  694. package/src/composables/use-interval/use-interval.js +3 -3
  695. package/src/composables/use-interval/use-interval.test.js +6 -9
  696. package/src/composables/use-meta/use-meta.js +13 -10
  697. package/src/composables/use-quasar/use-quasar.js +1 -1
  698. package/src/composables/use-quasar/use-quasar.test.js +4 -10
  699. package/src/composables/use-render-cache/use-render-cache.js +16 -24
  700. package/src/composables/use-split-attrs/use-split-attrs.js +9 -5
  701. package/src/composables/use-split-attrs/use-split-attrs.test.js +17 -15
  702. package/src/composables/use-tick/use-tick.js +10 -5
  703. package/src/composables/use-tick/use-tick.test.js +5 -8
  704. package/src/composables/use-timeout/use-timeout.js +3 -3
  705. package/src/composables/use-timeout/use-timeout.test.js +6 -9
  706. package/src/composables.js +0 -1
  707. package/src/css/core/helpers.sass +4 -9
  708. package/src/directives/close-popup/ClosePopup.js +41 -35
  709. package/src/directives/close-popup/ClosePopup.json +1 -1
  710. package/src/directives/intersection/Intersection.js +25 -28
  711. package/src/directives/intersection/Intersection.json +6 -6
  712. package/src/directives/morph/Morph.js +87 -87
  713. package/src/directives/morph/Morph.json +15 -13
  714. package/src/directives/mutation/Mutation.js +23 -24
  715. package/src/directives/mutation/Mutation.json +11 -11
  716. package/src/directives/ripple/Ripple.js +88 -79
  717. package/src/directives/ripple/Ripple.json +10 -10
  718. package/src/directives/ripple/Ripple.test.js +31 -87
  719. package/src/directives/scroll/Scroll.js +43 -30
  720. package/src/directives/scroll/Scroll.json +4 -2
  721. package/src/directives/scroll-fire/ScrollFire.js +43 -38
  722. package/src/directives/scroll-fire/ScrollFire.json +1 -1
  723. package/src/directives/touch-hold/TouchHold.js +155 -139
  724. package/src/directives/touch-hold/TouchHold.json +2 -2
  725. package/src/directives/touch-pan/TouchPan.js +311 -278
  726. package/src/directives/touch-pan/TouchPan.json +6 -4
  727. package/src/directives/touch-repeat/TouchRepeat.js +222 -188
  728. package/src/directives/touch-repeat/TouchRepeat.json +5 -3
  729. package/src/directives/touch-swipe/TouchSwipe.js +235 -214
  730. package/src/directives/touch-swipe/TouchSwipe.json +5 -3
  731. package/src/flags.dev.js +10 -17
  732. package/src/index.dev.js +2 -0
  733. package/src/index.ssr.js +2 -6
  734. package/src/index.umd.js +4 -2
  735. package/src/install-quasar.js +92 -76
  736. package/src/plugins/addressbar/AddressbarColor.js +28 -25
  737. package/src/plugins/addressbar/AddressbarColor.json +1 -1
  738. package/src/plugins/addressbar/AddressbarColor.test.js +10 -9
  739. package/src/plugins/app-fullscreen/AppFullscreen.js +50 -51
  740. package/src/plugins/app-fullscreen/AppFullscreen.json +6 -10
  741. package/src/plugins/app-fullscreen/AppFullscreen.test.js +11 -26
  742. package/src/plugins/app-fullscreen/test/mock-fullscreen.js +7 -5
  743. package/src/plugins/app-visibility/AppVisibility.js +21 -17
  744. package/src/plugins/app-visibility/AppVisibility.test.js +3 -1
  745. package/src/plugins/bottom-sheet/BottomSheet.js +1 -1
  746. package/src/plugins/bottom-sheet/BottomSheet.json +9 -9
  747. package/src/plugins/bottom-sheet/component/BottomSheetComponent.js +132 -95
  748. package/src/plugins/cookies/Cookies.js +50 -58
  749. package/src/plugins/cookies/Cookies.json +24 -16
  750. package/src/plugins/dark/Dark.js +61 -55
  751. package/src/plugins/dark/Dark.json +6 -6
  752. package/src/plugins/dark/Dark.test.js +26 -44
  753. package/src/plugins/dialog/Dialog.js +1 -1
  754. package/src/plugins/dialog/Dialog.json +29 -21
  755. package/src/plugins/dialog/component/DialogPluginComponent.js +122 -121
  756. package/src/plugins/icon-set/IconSet.js +63 -56
  757. package/src/plugins/icon-set/IconSet.json +421 -419
  758. package/src/plugins/icon-set/IconSet.test.js +8 -7
  759. package/src/plugins/lang/Lang.js +115 -96
  760. package/src/plugins/lang/Lang.json +201 -175
  761. package/src/plugins/lang/Lang.test.js +52 -20
  762. package/src/plugins/loading/Loading.js +175 -143
  763. package/src/plugins/loading/Loading.json +15 -15
  764. package/src/plugins/loading-bar/LoadingBar.js +61 -56
  765. package/src/plugins/loading-bar/LoadingBar.json +2 -2
  766. package/src/plugins/meta/Meta.js +91 -81
  767. package/src/plugins/notify/Notify.js +275 -221
  768. package/src/plugins/notify/Notify.json +79 -71
  769. package/src/plugins/platform/Platform.js +105 -112
  770. package/src/plugins/platform/Platform.json +12 -8
  771. package/src/plugins/platform/Platform.test.js +4 -7
  772. package/src/plugins/private.body/Body.js +19 -23
  773. package/src/plugins/private.body/Body.test.js +4 -6
  774. package/src/plugins/private.history/History.js +27 -30
  775. package/src/plugins/screen/Screen.js +160 -147
  776. package/src/plugins/screen/Screen.json +6 -6
  777. package/src/plugins/screen/Screen.test.js +6 -12
  778. package/src/plugins/storage/LocalStorage.js +5 -4
  779. package/src/plugins/storage/LocalStorage.json +1 -1
  780. package/src/plugins/storage/LocalStorage.test.js +56 -62
  781. package/src/plugins/storage/SessionStorage.js +5 -4
  782. package/src/plugins/storage/SessionStorage.json +1 -1
  783. package/src/plugins/storage/SessionStorage.test.js +56 -62
  784. package/src/plugins/storage/engine/web-storage.js +24 -26
  785. package/src/plugins/storage/engine/web-storage.json +45 -15
  786. package/src/utils/EventBus/EventBus.js +12 -13
  787. package/src/utils/clone/clone.js +27 -28
  788. package/src/utils/clone/clone.test.js +27 -52
  789. package/src/utils/colors/colors.js +69 -63
  790. package/src/utils/colors/colors.test.js +360 -270
  791. package/src/utils/copy-to-clipboard/copy-to-clipboard.js +9 -10
  792. package/src/utils/create-meta-mixin/create-meta-mixin.js +17 -19
  793. package/src/utils/create-uploader-component/create-uploader-component.js +20 -14
  794. package/src/utils/css-var/get-css-var.js +4 -2
  795. package/src/utils/css-var/get-css-var.test.js +4 -11
  796. package/src/utils/css-var/set-css-var.js +2 -2
  797. package/src/utils/css-var/set-css-var.test.js +6 -12
  798. package/src/utils/date/date.js +251 -243
  799. package/src/utils/date/private.persian.js +54 -44
  800. package/src/utils/debounce/debounce.js +5 -5
  801. package/src/utils/debounce/debounce.test.js +3 -10
  802. package/src/utils/dom/dom.js +21 -22
  803. package/src/utils/dom/dom.test.js +19 -39
  804. package/src/utils/event/event.js +53 -49
  805. package/src/utils/export-file/export-file.js +11 -12
  806. package/src/utils/extend/extend.js +30 -26
  807. package/src/utils/extend/extend.test.js +36 -42
  808. package/src/utils/format/format.js +11 -13
  809. package/src/utils/format/format.test.js +50 -61
  810. package/src/utils/frame-debounce/frame-debounce.js +5 -3
  811. package/src/utils/frame-debounce/frame-debounce.test.js +3 -10
  812. package/src/utils/is/is.js +27 -23
  813. package/src/utils/is/is.test.js +100 -84
  814. package/src/utils/morph/morph.js +470 -377
  815. package/src/utils/open-url/open-url.js +18 -21
  816. package/src/utils/patterns/patterns.js +11 -7
  817. package/src/utils/patterns/patterns.test.js +2 -0
  818. package/src/utils/private.click-outside/click-outside.js +28 -26
  819. package/src/utils/private.config/instance-config.js +1 -1
  820. package/src/utils/private.config/instance-config.test.js +11 -7
  821. package/src/utils/private.config/nodes.js +14 -14
  822. package/src/utils/private.config/nodes.test.js +32 -38
  823. package/src/utils/private.create/create.js +10 -4
  824. package/src/utils/private.create/create.test.js +11 -7
  825. package/src/utils/private.dialog/create-dialog.js +70 -59
  826. package/src/utils/private.dialog/create-dialog.json +13 -6
  827. package/src/utils/private.focus/focus-manager.js +7 -8
  828. package/src/utils/private.focus/focus-manager.test.js +13 -18
  829. package/src/utils/private.focus/focusout.js +4 -4
  830. package/src/utils/private.focus/focusout.test.js +10 -22
  831. package/src/utils/private.get-emits-object/get-emits-object.js +2 -2
  832. package/src/utils/private.get-emits-object/get-emits-object.test.js +4 -10
  833. package/src/utils/private.inject-obj-prop/inject-obj-prop.js +3 -3
  834. package/src/utils/private.inject-obj-prop/inject-obj-prop.test.js +20 -49
  835. package/src/utils/private.keyboard/escape-key.js +10 -10
  836. package/src/utils/private.keyboard/escape-key.test.js +10 -22
  837. package/src/utils/private.keyboard/key-composition.js +9 -7
  838. package/src/utils/private.portal/portal.js +7 -10
  839. package/src/utils/private.position-engine/position-engine.js +127 -75
  840. package/src/utils/private.render/render.js +9 -24
  841. package/src/utils/private.render/render.test.js +40 -55
  842. package/src/utils/private.rtl/rtl.js +1 -3
  843. package/src/utils/private.selection/selection.js +6 -6
  844. package/src/utils/private.selection/selection.test.js +7 -13
  845. package/src/utils/private.sort/sort.js +4 -6
  846. package/src/utils/private.symbols/symbols.js +1 -1
  847. package/src/utils/private.touch/touch.js +16 -16
  848. package/src/utils/private.touch/touch.test.js +56 -16
  849. package/src/utils/private.vm/vm.js +6 -7
  850. package/src/utils/private.vm/vm.test.js +32 -32
  851. package/src/utils/run-sequential-promises/run-sequential-promises.js +57 -51
  852. package/src/utils/scroll/prevent-scroll.js +75 -47
  853. package/src/utils/scroll/scroll.js +51 -44
  854. package/src/utils/throttle/throttle.js +7 -4
  855. package/src/utils/throttle/throttle.test.js +2 -7
  856. package/src/utils/uid/uid.js +34 -22
  857. package/wrappers/index.cjs +17 -15
  858. package/wrappers/index.js +15 -15
@@ -1,6 +1,13 @@
1
1
  import {
2
- h, ref, computed, watch,
3
- withDirectives, vShow, nextTick, getCurrentInstance, onBeforeUpdate
2
+ h,
3
+ ref,
4
+ computed,
5
+ watch,
6
+ withDirectives,
7
+ vShow,
8
+ nextTick,
9
+ getCurrentInstance,
10
+ onBeforeUpdate
4
11
  } from 'vue'
5
12
 
6
13
  import QIcon from '../icon/QIcon.js'
@@ -8,14 +15,16 @@ import QCheckbox from '../checkbox/QCheckbox.js'
8
15
  import QSlideTransition from '../slide-transition/QSlideTransition.js'
9
16
  import QSpinner from '../spinner/QSpinner.js'
10
17
 
11
- import useDark, { useDarkProps } from '../../composables/private.use-dark/use-dark.js'
18
+ import useDark, {
19
+ useDarkProps
20
+ } from '../../composables/private.use-dark/use-dark.js'
12
21
 
13
22
  import { createComponent } from '../../utils/private.create/create.js'
14
23
  import { stopAndPrevent } from '../../utils/event/event.js'
15
24
  import { shouldIgnoreKey } from '../../utils/private.keyboard/key-composition.js'
16
25
  import { injectProp } from '../../utils/private.inject-obj-prop/inject-obj-prop.js'
17
26
 
18
- const tickStrategyOptions = [ 'none', 'strict', 'leaf', 'leaf-filtered' ]
27
+ const tickStrategyOptions = ['none', 'strict', 'leaf', 'leaf-filtered']
19
28
 
20
29
  export default createComponent({
21
30
  name: 'QTree',
@@ -83,7 +92,7 @@ export default createComponent({
83
92
  'afterHide'
84
93
  ],
85
94
 
86
- setup (props, { slots, emit }) {
95
+ setup(props, { slots, emit }) {
87
96
  const { proxy } = getCurrentInstance()
88
97
  const { $q } = proxy
89
98
 
@@ -99,67 +108,83 @@ export default createComponent({
99
108
  blurTargets = {}
100
109
  })
101
110
 
102
- const classes = computed(() =>
103
- `q-tree q-tree--${ props.dense === true ? 'dense' : 'standard' }`
104
- + (props.noConnectors === true ? ' q-tree--no-connectors' : '')
105
- + (isDark.value === true ? ' q-tree--dark' : '')
106
- + (props.color !== void 0 ? ` text-${ props.color }` : '')
111
+ const classes = computed(
112
+ () =>
113
+ `q-tree q-tree--${props.dense === true ? 'dense' : 'standard'}` +
114
+ (props.noConnectors === true ? ' q-tree--no-connectors' : '') +
115
+ (isDark.value === true ? ' q-tree--dark' : '') +
116
+ (props.color !== void 0 ? ` text-${props.color}` : '')
107
117
  )
108
118
 
109
119
  const hasSelection = computed(() => props.selected !== void 0)
110
120
 
111
121
  const computedIcon = computed(() => props.icon || $q.iconSet.tree.icon)
112
122
 
113
- const computedControlColor = computed(() => props.controlColor || props.color)
123
+ const computedControlColor = computed(
124
+ () => props.controlColor || props.color
125
+ )
114
126
 
115
- const textColorClass = computed(() => (
116
- props.textColor !== void 0
117
- ? ` text-${ props.textColor }`
118
- : ''
119
- ))
127
+ const textColorClass = computed(() =>
128
+ props.textColor !== void 0 ? ` text-${props.textColor}` : ''
129
+ )
120
130
 
121
131
  const selectedColorClass = computed(() => {
122
132
  const color = props.selectedColor || props.color
123
- return color ? ` text-${ color }` : ''
133
+ return color ? ` text-${color}` : ''
124
134
  })
125
135
 
126
- const computedFilterMethod = computed(() => (
136
+ const computedFilterMethod = computed(() =>
127
137
  props.filterMethod !== void 0
128
138
  ? props.filterMethod
129
139
  : (node, filter) => {
130
140
  const filt = filter.toLowerCase()
131
- return node[ props.labelKey ]
132
- && node[ props.labelKey ].toLowerCase().indexOf(filt) !== -1
141
+ return (
142
+ node[props.labelKey] &&
143
+ node[props.labelKey].toLowerCase().indexOf(filt) !== -1
144
+ )
133
145
  }
134
- ))
146
+ )
135
147
 
136
148
  const meta = computed(() => {
137
- const meta = {}
149
+ const acc = {}
138
150
 
139
151
  const travel = (node, parent) => {
140
- const tickStrategy = node.tickStrategy || (parent ? parent.tickStrategy : props.tickStrategy)
141
- const
142
- key = node[ props.nodeKey ],
143
- isParent = node[ props.childrenKey ] && Array.isArray(node[ props.childrenKey ]) && node[ props.childrenKey ].length !== 0,
144
- selectable = node.disabled !== true && hasSelection.value === true && node.selectable !== false,
152
+ const tickStrategy =
153
+ node.tickStrategy ||
154
+ (parent ? parent.tickStrategy : props.tickStrategy)
155
+ const key = node[props.nodeKey],
156
+ isParent =
157
+ node[props.childrenKey] &&
158
+ Array.isArray(node[props.childrenKey]) &&
159
+ node[props.childrenKey].length !== 0,
160
+ selectable =
161
+ node.disabled !== true &&
162
+ hasSelection.value === true &&
163
+ node.selectable !== false,
145
164
  expandable = node.disabled !== true && node.expandable !== false,
146
165
  hasTicking = tickStrategy !== 'none',
147
166
  strictTicking = tickStrategy === 'strict',
148
167
  leafFilteredTicking = tickStrategy === 'leaf-filtered',
149
- leafTicking = tickStrategy === 'leaf' || tickStrategy === 'leaf-filtered'
168
+ leafTicking =
169
+ tickStrategy === 'leaf' || tickStrategy === 'leaf-filtered'
150
170
 
151
171
  let tickable = node.disabled !== true && node.tickable !== false
152
- if (leafTicking === true && tickable === true && parent && parent.tickable !== true) {
172
+ if (
173
+ leafTicking === true &&
174
+ tickable === true &&
175
+ parent &&
176
+ parent.tickable !== true
177
+ ) {
153
178
  tickable = false
154
179
  }
155
180
 
156
181
  let localLazy = node.lazy
157
182
  if (
158
- localLazy === true
159
- && lazy.value[ key ] !== void 0
160
- && Array.isArray(node[ props.childrenKey ]) === true
183
+ localLazy === true &&
184
+ lazy.value[key] !== void 0 &&
185
+ Array.isArray(node[props.childrenKey]) === true
161
186
  ) {
162
- localLazy = lazy.value[ key ]
187
+ localLazy = lazy.value[key]
163
188
  }
164
189
 
165
190
  const m = {
@@ -168,71 +193,97 @@ export default createComponent({
168
193
  isParent,
169
194
  lazy: localLazy,
170
195
  disabled: node.disabled,
171
- link: node.disabled !== true && (selectable === true || (expandable === true && (isParent === true || localLazy === true))),
196
+ link:
197
+ node.disabled !== true &&
198
+ (selectable === true ||
199
+ (expandable === true &&
200
+ (isParent === true || localLazy === true))),
172
201
  children: [],
173
- matchesFilter: props.filter ? computedFilterMethod.value(node, props.filter) : true,
202
+ matchesFilter: props.filter
203
+ ? computedFilterMethod.value(node, props.filter)
204
+ : true,
174
205
 
175
206
  selected: key === props.selected && selectable === true,
176
207
  selectable,
177
- expanded: isParent === true ? innerExpanded.value.includes(key) : false,
208
+ expanded:
209
+ isParent === true ? innerExpanded.value.includes(key) : false,
178
210
  expandable,
179
- noTick: node.noTick === true || (strictTicking !== true && localLazy && localLazy !== 'loaded'),
211
+ noTick:
212
+ node.noTick === true ||
213
+ (strictTicking !== true && localLazy && localLazy !== 'loaded'),
180
214
  tickable,
181
215
  tickStrategy,
182
216
  hasTicking,
183
217
  strictTicking,
184
218
  leafFilteredTicking,
185
219
  leafTicking,
186
- ticked: strictTicking === true
187
- ? innerTicked.value.includes(key)
188
- : (isParent === true ? false : innerTicked.value.includes(key))
220
+ ticked:
221
+ strictTicking === true
222
+ ? innerTicked.value.includes(key)
223
+ : isParent === true
224
+ ? false
225
+ : innerTicked.value.includes(key)
189
226
  }
190
227
 
191
- meta[ key ] = m
228
+ acc[key] = m
192
229
 
193
230
  if (isParent === true) {
194
- m.children = node[ props.childrenKey ].map(n => travel(n, m))
231
+ m.children = node[props.childrenKey].map(n => travel(n, m))
195
232
 
196
233
  if (props.filter) {
197
234
  if (m.matchesFilter !== true) {
198
235
  m.matchesFilter = m.children.some(n => n.matchesFilter)
199
- }
200
- else if (
201
- m.noTick !== true
202
- && m.disabled !== true
203
- && m.tickable === true
204
- && leafFilteredTicking === true
205
- && m.children.every(n => n.matchesFilter !== true || n.noTick === true || n.tickable !== true) === true
236
+ } else if (
237
+ m.noTick !== true &&
238
+ m.disabled !== true &&
239
+ m.tickable === true &&
240
+ leafFilteredTicking === true &&
241
+ m.children.every(
242
+ n =>
243
+ n.matchesFilter !== true ||
244
+ n.noTick === true ||
245
+ n.tickable !== true
246
+ ) === true
206
247
  ) {
207
248
  m.tickable = false
208
249
  }
209
250
  }
210
251
 
211
252
  if (m.matchesFilter === true) {
212
- if (m.noTick !== true && strictTicking !== true && m.children.every(n => n.noTick) === true) {
253
+ if (
254
+ m.noTick !== true &&
255
+ strictTicking !== true &&
256
+ m.children.every(n => n.noTick) === true
257
+ ) {
213
258
  m.noTick = true
214
259
  }
215
260
 
216
261
  if (leafTicking) {
217
262
  m.ticked = false
218
- m.indeterminate = m.children.some(node => node.indeterminate === true)
219
- m.tickable = m.tickable === true && m.children.some(node => node.tickable)
263
+ m.indeterminate = m.children.some(
264
+ entry => entry.indeterminate === true
265
+ )
266
+ m.tickable =
267
+ m.tickable === true && m.children.some(entry => entry.tickable)
220
268
 
221
269
  if (m.indeterminate !== true) {
222
- const sel = m.children
223
- .reduce((acc, meta) => (meta.ticked === true ? acc + 1 : acc), 0)
270
+ const sel = m.children.reduce(
271
+ (localAcc, entry) =>
272
+ entry.ticked === true ? localAcc + 1 : localAcc,
273
+ 0
274
+ )
224
275
 
225
276
  if (sel === m.children.length) {
226
277
  m.ticked = true
227
- }
228
- else if (sel > 0) {
278
+ } else if (sel > 0) {
229
279
  m.indeterminate = true
230
280
  }
231
281
  }
232
282
 
233
283
  if (m.indeterminate === true) {
234
- m.indeterminateNextState = m.children
235
- .every(meta => meta.tickable !== true || meta.ticked !== true)
284
+ m.indeterminateNextState = m.children.every(
285
+ entry => entry.tickable !== true || entry.ticked !== true
286
+ )
236
287
  }
237
288
  }
238
289
  }
@@ -242,18 +293,24 @@ export default createComponent({
242
293
  }
243
294
 
244
295
  props.nodes.forEach(node => travel(node, null))
245
- return meta
296
+ return acc
246
297
  })
247
298
 
248
- watch(() => props.ticked, val => {
249
- innerTicked.value = val
250
- })
299
+ watch(
300
+ () => props.ticked,
301
+ val => {
302
+ innerTicked.value = val
303
+ }
304
+ )
251
305
 
252
- watch(() => props.expanded, val => {
253
- innerExpanded.value = val
254
- })
306
+ watch(
307
+ () => props.expanded,
308
+ val => {
309
+ innerExpanded.value = val
310
+ }
311
+ )
255
312
 
256
- function getNodeByKey (key) {
313
+ function getNodeByKey(key) {
257
314
  const reduce = [].reduce
258
315
 
259
316
  const find = (result, node) => {
@@ -263,47 +320,44 @@ export default createComponent({
263
320
  if (Array.isArray(node) === true) {
264
321
  return reduce.call(Object(node), find, result)
265
322
  }
266
- if (node[ props.nodeKey ] === key) {
323
+ if (node[props.nodeKey] === key) {
267
324
  return node
268
325
  }
269
- if (node[ props.childrenKey ]) {
270
- return find(null, node[ props.childrenKey ])
326
+ if (node[props.childrenKey]) {
327
+ return find(null, node[props.childrenKey])
271
328
  }
272
329
  }
273
330
 
274
331
  return find(null, props.nodes)
275
332
  }
276
333
 
277
- function getTickedNodes () {
334
+ function getTickedNodes() {
278
335
  return innerTicked.value.map(key => getNodeByKey(key))
279
336
  }
280
337
 
281
- function getExpandedNodes () {
338
+ function getExpandedNodes() {
282
339
  return innerExpanded.value.map(key => getNodeByKey(key))
283
340
  }
284
341
 
285
- function isExpanded (key) {
286
- return key && meta.value[ key ]
287
- ? meta.value[ key ].expanded
288
- : false
342
+ function isExpanded(key) {
343
+ return key && meta.value[key] ? meta.value[key].expanded : false
289
344
  }
290
345
 
291
- function collapseAll () {
346
+ function collapseAll() {
292
347
  if (props.expanded !== void 0) {
293
348
  emit('update:expanded', [])
294
- }
295
- else {
349
+ } else {
296
350
  innerExpanded.value = []
297
351
  }
298
352
  }
299
353
 
300
- function expandAll () {
354
+ function expandAll() {
301
355
  const expanded = []
302
356
  const travel = node => {
303
- if (node[ props.childrenKey ] && node[ props.childrenKey ].length !== 0) {
357
+ if (node[props.childrenKey] && node[props.childrenKey].length !== 0) {
304
358
  if (node.expandable !== false && node.disabled !== true) {
305
- expanded.push(node[ props.nodeKey ])
306
- node[ props.childrenKey ].forEach(travel)
359
+ expanded.push(node[props.nodeKey])
360
+ node[props.childrenKey].forEach(travel)
307
361
  }
308
362
  }
309
363
  }
@@ -312,47 +366,51 @@ export default createComponent({
312
366
 
313
367
  if (props.expanded !== void 0) {
314
368
  emit('update:expanded', expanded)
315
- }
316
- else {
369
+ } else {
317
370
  innerExpanded.value = expanded
318
371
  }
319
372
  }
320
373
 
321
- function setExpanded (key, state, node = getNodeByKey(key), m = meta.value[ key ]) {
374
+ function setExpanded(
375
+ key,
376
+ state,
377
+ node = getNodeByKey(key),
378
+ m = meta.value[key]
379
+ ) {
322
380
  if (m.lazy && m.lazy !== 'loaded') {
323
381
  if (m.lazy === 'loading') return
324
382
 
325
- lazy.value[ key ] = 'loading'
326
- if (Array.isArray(node[ props.childrenKey ]) !== true) {
327
- node[ props.childrenKey ] = []
383
+ lazy.value[key] = 'loading'
384
+ if (Array.isArray(node[props.childrenKey]) !== true) {
385
+ node[props.childrenKey] = []
328
386
  }
329
387
  emit('lazyLoad', {
330
388
  node,
331
389
  key,
332
390
  done: children => {
333
- lazy.value[ key ] = 'loaded'
334
- node[ props.childrenKey ] = Array.isArray(children) === true ? children : []
391
+ lazy.value[key] = 'loaded'
392
+ node[props.childrenKey] =
393
+ Array.isArray(children) === true ? children : []
335
394
  nextTick(() => {
336
- const localMeta = meta.value[ key ]
395
+ const localMeta = meta.value[key]
337
396
  if (localMeta?.isParent === true) {
338
397
  localSetExpanded(key, true)
339
398
  }
340
399
  })
341
400
  },
342
401
  fail: () => {
343
- delete lazy.value[ key ]
344
- if (node[ props.childrenKey ].length === 0) {
345
- delete node[ props.childrenKey ]
402
+ delete lazy.value[key]
403
+ if (node[props.childrenKey].length === 0) {
404
+ delete node[props.childrenKey]
346
405
  }
347
406
  }
348
407
  })
349
- }
350
- else if (m.isParent === true && m.expandable === true) {
408
+ } else if (m.isParent === true && m.expandable === true) {
351
409
  localSetExpanded(key, state)
352
410
  }
353
411
  }
354
412
 
355
- function localSetExpanded (key, state) {
413
+ function localSetExpanded(key, state) {
356
414
  let target = innerExpanded.value
357
415
  const shouldEmit = props.expanded !== void 0
358
416
 
@@ -362,18 +420,17 @@ export default createComponent({
362
420
 
363
421
  if (state) {
364
422
  if (props.accordion) {
365
- if (meta.value[ key ]) {
423
+ if (meta.value[key]) {
366
424
  const collapse = []
367
- if (meta.value[ key ].parent) {
368
- meta.value[ key ].parent.children.forEach(m => {
425
+ if (meta.value[key].parent) {
426
+ meta.value[key].parent.children.forEach(m => {
369
427
  if (m.key !== key && m.expandable === true) {
370
428
  collapse.push(m.key)
371
429
  }
372
430
  })
373
- }
374
- else {
431
+ } else {
375
432
  props.nodes.forEach(node => {
376
- const k = node[ props.nodeKey ]
433
+ const k = node[props.nodeKey]
377
434
  if (k !== key) {
378
435
  collapse.push(k)
379
436
  }
@@ -385,28 +442,25 @@ export default createComponent({
385
442
  }
386
443
  }
387
444
 
388
- target = target.concat([ key ])
389
- .filter((key, index, self) => self.indexOf(key) === index)
390
- }
391
- else {
445
+ target = target
446
+ .concat([key])
447
+ .filter((entryKey, index, self) => self.indexOf(entryKey) === index)
448
+ } else {
392
449
  target = target.filter(k => k !== key)
393
450
  }
394
451
 
395
452
  if (shouldEmit === true) {
396
453
  emit('update:expanded', target)
397
- }
398
- else {
454
+ } else {
399
455
  innerExpanded.value = target
400
456
  }
401
457
  }
402
458
 
403
- function isTicked (key) {
404
- return key && meta.value[ key ]
405
- ? meta.value[ key ].ticked
406
- : false
459
+ function isTicked(key) {
460
+ return key && meta.value[key] ? meta.value[key].ticked : false
407
461
  }
408
462
 
409
- function setTicked (keys, state) {
463
+ function setTicked(keys, state) {
410
464
  let target = innerTicked.value
411
465
  const shouldEmit = props.ticked !== void 0
412
466
 
@@ -415,10 +469,10 @@ export default createComponent({
415
469
  }
416
470
 
417
471
  if (state) {
418
- target = target.concat(keys)
472
+ target = target
473
+ .concat(keys)
419
474
  .filter((key, index, self) => self.indexOf(key) === index)
420
- }
421
- else {
475
+ } else {
422
476
  target = target.filter(k => keys.includes(k) === false)
423
477
  }
424
478
 
@@ -427,35 +481,49 @@ export default createComponent({
427
481
  }
428
482
  }
429
483
 
430
- function getSlotScope (node, meta, key) {
431
- const scope = { tree: proxy, node, key, color: props.color, dark: isDark.value }
484
+ function getSlotScope(node, localMeta, key) {
485
+ const scope = {
486
+ tree: proxy,
487
+ node,
488
+ key,
489
+ color: props.color,
490
+ dark: isDark.value
491
+ }
432
492
 
433
493
  injectProp(
434
494
  scope,
435
495
  'expanded',
436
- () => { return meta.expanded },
437
- val => { val !== meta.expanded && setExpanded(key, val) }
496
+ () => localMeta.expanded,
497
+ val => {
498
+ if (val !== localMeta.expanded) {
499
+ setExpanded(key, val)
500
+ }
501
+ }
438
502
  )
439
503
 
440
504
  injectProp(
441
505
  scope,
442
506
  'ticked',
443
- () => { return meta.ticked },
444
- val => { val !== meta.ticked && setTicked([ key ], val) }
507
+ () => localMeta.ticked,
508
+ val => {
509
+ if (val !== localMeta.ticked) {
510
+ setTicked([key], val)
511
+ }
512
+ }
445
513
  )
446
514
 
447
515
  return scope
448
516
  }
449
517
 
450
- function getChildren (nodes) {
518
+ function getChildren(nodes) {
451
519
  return (
452
520
  props.filter
453
- ? nodes.filter(n => meta.value[ n[ props.nodeKey ] ].matchesFilter)
521
+ ? nodes.filter(n => meta.value[n[props.nodeKey]].matchesFilter)
454
522
  : nodes
455
523
  ).map(child => getNode(child))
456
524
  }
457
525
 
458
- function getNodeMedia (node) {
526
+ function getNodeMedia(node) {
459
527
  if (node.icon !== void 0) {
460
528
  return h(QIcon, {
461
529
  class: 'q-tree__icon q-mr-sm',
@@ -466,183 +534,229 @@ export default createComponent({
466
534
  const src = node.img || node.avatar
467
535
  if (src) {
468
536
  return h('img', {
469
- class: `q-tree__${ node.img ? 'img' : 'avatar' } q-mr-sm`,
537
+ class: `q-tree__${node.img ? 'img' : 'avatar'} q-mr-sm`,
470
538
  src
471
539
  })
472
540
  }
473
541
  }
474
542
 
475
- function onShow () {
543
+ function onShow() {
476
544
  emit('afterShow')
477
545
  }
478
546
 
479
- function onHide () {
547
+ function onHide() {
480
548
  emit('afterHide')
481
549
  }
482
550
 
483
- function getNode (node) {
484
- const
485
- key = node[ props.nodeKey ],
486
- m = meta.value[ key ],
551
+ function getNode(node) {
552
+ const key = node[props.nodeKey],
553
+ m = meta.value[key],
487
554
  header = node.header
488
- ? slots[ `header-${ node.header }` ] || slots[ 'default-header' ]
489
- : slots[ 'default-header' ]
555
+ ? slots[`header-${node.header}`] || slots['default-header']
556
+ : slots['default-header']
490
557
 
491
- const children = m.isParent === true
492
- ? getChildren(node[ props.childrenKey ])
493
- : []
558
+ const children =
559
+ m.isParent === true ? getChildren(node[props.childrenKey]) : []
494
560
 
495
561
  const isParent = children.length !== 0 || (m.lazy && m.lazy !== 'loaded')
496
562
 
497
563
  let body = node.body
498
- ? slots[ `body-${ node.body }` ] || slots[ 'default-body' ]
499
- : slots[ 'default-body' ]
564
+ ? slots[`body-${node.body}`] || slots['default-body']
565
+ : slots['default-body']
500
566
 
501
- const slotScope = header !== void 0 || body !== void 0
502
- ? getSlotScope(node, m, key)
503
- : null
567
+ const slotScope =
568
+ header !== void 0 || body !== void 0 ? getSlotScope(node, m, key) : null
504
569
 
505
570
  if (body !== void 0) {
506
571
  body = h('div', { class: 'q-tree__node-body relative-position' }, [
507
- h('div', { class: textColorClass.value }, [
508
- body(slotScope)
509
- ])
572
+ h('div', { class: textColorClass.value }, [body(slotScope)])
510
573
  ])
511
574
  }
512
575
 
513
- return h('div', {
514
- key,
515
- class: 'q-tree__node relative-position'
516
- + ` q-tree__node--${ isParent === true ? 'parent' : 'child' }`
517
- }, [
518
- h('div', {
519
- class: 'q-tree__node-header relative-position row no-wrap items-center'
520
- + (m.link === true ? ' q-tree__node--link q-hoverable q-focusable' : '')
521
- + (m.selected === true ? ' q-tree__node--selected' : '')
522
- + (m.disabled === true ? ' q-tree__node--disabled' : ''),
523
- tabindex: m.link === true ? 0 : -1,
524
- ariaExpanded: children.length > 0 ? m.expanded : null,
525
- role: 'treeitem',
526
- onClick: (e) => {
527
- onClick(node, m, e)
528
- },
529
- onKeypress (e) {
530
- if (shouldIgnoreKey(e) !== true) {
531
- if (e.keyCode === 13) { onClick(node, m, e, true) }
532
- else if (e.keyCode === 32) { onExpandClick(node, m, e, true) }
533
- }
534
- }
535
- }, [
536
- h('div', {
537
- class: 'q-focus-helper',
538
- tabindex: -1,
539
- ref: el => { blurTargets[ m.key ] = el }
540
- }),
541
-
542
- m.lazy === 'loading'
543
- ? h(QSpinner, {
544
- class: 'q-tree__spinner',
545
- color: computedControlColor.value
546
- })
547
- : (
548
- isParent === true
576
+ return h(
577
+ 'div',
578
+ {
579
+ key,
580
+ class:
581
+ 'q-tree__node relative-position' +
582
+ ` q-tree__node--${isParent === true ? 'parent' : 'child'}`
583
+ },
584
+ [
585
+ h(
586
+ 'div',
587
+ {
588
+ class:
589
+ 'q-tree__node-header relative-position row no-wrap items-center' +
590
+ (m.link === true
591
+ ? ' q-tree__node--link q-hoverable q-focusable'
592
+ : '') +
593
+ (m.selected === true ? ' q-tree__node--selected' : '') +
594
+ (m.disabled === true ? ' q-tree__node--disabled' : ''),
595
+ tabindex: m.link === true ? 0 : -1,
596
+ ariaExpanded: children.length > 0 ? m.expanded : null,
597
+ role: 'treeitem',
598
+ onClick: e => {
599
+ onClick(node, m, e)
600
+ },
601
+ onKeypress(e) {
602
+ if (shouldIgnoreKey(e) !== true) {
603
+ if (e.keyCode === 13) {
604
+ onClick(node, m, e, true)
605
+ } else if (e.keyCode === 32) {
606
+ onExpandClick(node, m, e, true)
607
+ }
608
+ }
609
+ }
610
+ },
611
+ [
612
+ h('div', {
613
+ class: 'q-focus-helper',
614
+ tabindex: -1,
615
+ ref: el => {
616
+ blurTargets[m.key] = el
617
+ }
618
+ }),
619
+
620
+ m.lazy === 'loading'
621
+ ? h(QSpinner, {
622
+ class: 'q-tree__spinner',
623
+ color: computedControlColor.value
624
+ })
625
+ : isParent === true
549
626
  ? h(QIcon, {
550
- class: 'q-tree__arrow'
551
- + (m.expanded === true ? ' q-tree__arrow--rotate' : ''),
552
- name: computedIcon.value,
553
- onClick (e) { onExpandClick(node, m, e) }
627
+ class:
628
+ 'q-tree__arrow' +
629
+ (m.expanded === true ? ' q-tree__arrow--rotate' : ''),
630
+ name: computedIcon.value,
631
+ onClick(e) {
632
+ onExpandClick(node, m, e)
633
+ }
634
+ })
635
+ : null,
636
+
637
+ m.hasTicking === true && m.noTick !== true
638
+ ? h(QCheckbox, {
639
+ class: 'q-tree__tickbox',
640
+ modelValue: m.indeterminate === true ? null : m.ticked,
641
+ color: computedControlColor.value,
642
+ dark: isDark.value,
643
+ dense: true,
644
+ keepColor: true,
645
+ disable: m.tickable !== true,
646
+ onKeydown: stopAndPrevent,
647
+ 'onUpdate:modelValue': v => {
648
+ onTickedClick(m, v)
649
+ }
554
650
  })
555
- : null
556
- ),
557
-
558
- m.hasTicking === true && m.noTick !== true
559
- ? h(QCheckbox, {
560
- class: 'q-tree__tickbox',
561
- modelValue: m.indeterminate === true ? null : m.ticked,
562
- color: computedControlColor.value,
563
- dark: isDark.value,
564
- dense: true,
565
- keepColor: true,
566
- disable: m.tickable !== true,
567
- onKeydown: stopAndPrevent,
568
- 'onUpdate:modelValue': v => {
569
- onTickedClick(m, v)
570
- }
571
- })
572
- : null,
573
-
574
- h('div', {
575
- class: 'q-tree__node-header-content col row no-wrap items-center'
576
- + (m.selected === true ? selectedColorClass.value : textColorClass.value)
577
- }, [
578
- header
579
- ? header(slotScope)
580
- : [
581
- getNodeMedia(node),
582
- h('div', node[ props.labelKey ])
651
+ : null,
652
+
653
+ h(
654
+ 'div',
655
+ {
656
+ class:
657
+ 'q-tree__node-header-content col row no-wrap items-center' +
658
+ (m.selected === true
659
+ ? selectedColorClass.value
660
+ : textColorClass.value)
661
+ },
662
+ [
663
+ header
664
+ ? header(slotScope)
665
+ : [getNodeMedia(node), h('div', node[props.labelKey])]
583
666
  ]
584
- ])
585
- ]),
586
-
587
- isParent === true
588
- ? (
589
- props.noTransition === true
590
- ? (
591
- m.expanded === true
592
- ? h('div', {
593
- class: 'q-tree__node-collapsible' + textColorClass.value,
594
- key: `${ key }__q`
595
- }, [
596
- body,
597
- h('div', {
598
- class: 'q-tree__children'
599
- + (m.disabled === true ? ' q-tree__node--disabled' : ''),
667
+ )
668
+ ]
669
+ ),
670
+
671
+ isParent === true
672
+ ? props.noTransition === true
673
+ ? m.expanded === true
674
+ ? h(
675
+ 'div',
676
+ {
677
+ class: 'q-tree__node-collapsible' + textColorClass.value,
678
+ key: `${key}__q`
679
+ },
680
+ [
681
+ body,
682
+ h(
683
+ 'div',
684
+ {
685
+ class:
686
+ 'q-tree__children' +
687
+ (m.disabled === true
688
+ ? ' q-tree__node--disabled'
689
+ : ''),
600
690
  role: 'group'
601
- }, children)
602
- ])
603
- : null
691
+ },
692
+ children
693
+ )
694
+ ]
604
695
  )
605
-
606
- : h(QSlideTransition, {
607
- duration: props.duration,
608
- onShow,
609
- onHide
610
- }, () => withDirectives(
611
- h('div', {
612
- class: 'q-tree__node-collapsible' + textColorClass.value,
613
- key: `${ key }__q`
614
- }, [
615
- body,
616
- h('div', {
617
- class: 'q-tree__children'
618
- + (m.disabled === true ? ' q-tree__node--disabled' : ''),
619
- role: 'group'
620
- }, children)
621
- ]),
622
- [ [ vShow, m.expanded ] ]
623
- ))
624
- )
625
- : body
626
- ])
696
+ : null
697
+ : h(
698
+ QSlideTransition,
699
+ {
700
+ duration: props.duration,
701
+ onShow,
702
+ onHide
703
+ },
704
+ () =>
705
+ withDirectives(
706
+ h(
707
+ 'div',
708
+ {
709
+ class:
710
+ 'q-tree__node-collapsible' + textColorClass.value,
711
+ key: `${key}__q`
712
+ },
713
+ [
714
+ body,
715
+ h(
716
+ 'div',
717
+ {
718
+ class:
719
+ 'q-tree__children' +
720
+ (m.disabled === true
721
+ ? ' q-tree__node--disabled'
722
+ : ''),
723
+ role: 'group'
724
+ },
725
+ children
726
+ )
727
+ ]
728
+ ),
729
+ [[vShow, m.expanded]]
730
+ )
731
+ )
732
+ : body
733
+ ]
734
+ )
627
735
  }
628
736
 
629
- function blur (key) {
630
- blurTargets[ key ]?.focus()
737
+ function blur(key) {
738
+ blurTargets[key]?.focus()
631
739
  }
632
740
 
633
- function onClick (node, meta, e, keyboard) {
634
- keyboard !== true && meta.selectable !== false && blur(meta.key)
741
+ function onClick(node, localMeta, e, keyboard) {
742
+ if (keyboard !== true && localMeta.selectable !== false) {
743
+ blur(localMeta.key)
744
+ }
635
745
 
636
- if (hasSelection.value && meta.selectable) {
746
+ if (hasSelection.value && localMeta.selectable) {
637
747
  if (props.noSelectionUnset === false) {
638
- emit('update:selected', meta.key !== props.selected ? meta.key : null)
639
- }
640
- else if (meta.key !== props.selected) {
641
- emit('update:selected', meta.key === void 0 ? null : meta.key)
748
+ emit(
749
+ 'update:selected',
750
+ localMeta.key !== props.selected ? localMeta.key : null
751
+ )
752
+ } else if (localMeta.key !== props.selected) {
753
+ emit(
754
+ 'update:selected',
755
+ localMeta.key === void 0 ? null : localMeta.key
756
+ )
642
757
  }
643
- }
644
- else {
645
- onExpandClick(node, meta, e, keyboard)
758
+ } else {
759
+ onExpandClick(node, localMeta, e, keyboard)
646
760
  }
647
761
 
648
762
  if (typeof node.handler === 'function') {
@@ -650,46 +764,53 @@ export default createComponent({
650
764
  }
651
765
  }
652
766
 
653
- function onExpandClick (node, meta, e, keyboard) {
767
+ function onExpandClick(node, localMeta, e, keyboard) {
654
768
  if (e !== void 0) {
655
769
  stopAndPrevent(e)
656
770
  }
657
- keyboard !== true && meta.selectable !== false && blur(meta.key)
658
- setExpanded(meta.key, !meta.expanded, node, meta)
771
+ if (keyboard !== true && localMeta.selectable !== false) {
772
+ blur(localMeta.key)
773
+ }
774
+ setExpanded(localMeta.key, !localMeta.expanded, node, localMeta)
659
775
  }
660
776
 
661
- function onTickedClick (meta, state) {
662
- if (meta.indeterminate === true) {
663
- state = meta.indeterminateNextState
777
+ function onTickedClick(localMeta, state) {
778
+ if (localMeta.indeterminate === true) {
779
+ state = localMeta.indeterminateNextState
664
780
  }
665
- if (meta.strictTicking) {
666
- setTicked([ meta.key ], state)
667
- }
668
- else if (meta.leafTicking) {
781
+ if (localMeta.strictTicking) {
782
+ setTicked([localMeta.key], state)
783
+ } else if (localMeta.leafTicking) {
669
784
  const keys = []
670
- const travel = meta => {
671
- if (meta.isParent) {
672
- if (state !== true && meta.noTick !== true && meta.tickable === true) {
673
- keys.push(meta.key)
785
+ const travel = nodeMeta => {
786
+ if (nodeMeta.isParent) {
787
+ if (
788
+ state !== true &&
789
+ nodeMeta.noTick !== true &&
790
+ nodeMeta.tickable === true
791
+ ) {
792
+ keys.push(nodeMeta.key)
674
793
  }
675
- if (meta.leafTicking === true) {
676
- meta.children.forEach(travel)
794
+ if (nodeMeta.leafTicking === true) {
795
+ nodeMeta.children.forEach(travel)
677
796
  }
678
- }
679
- else if (
680
- meta.noTick !== true
681
- && meta.tickable === true
682
- && (meta.leafFilteredTicking !== true || meta.matchesFilter === true)
797
+ } else if (
798
+ nodeMeta.noTick !== true &&
799
+ nodeMeta.tickable === true &&
800
+ (nodeMeta.leafFilteredTicking !== true ||
801
+ nodeMeta.matchesFilter === true)
683
802
  ) {
684
- keys.push(meta.key)
803
+ keys.push(nodeMeta.key)
685
804
  }
686
805
  }
687
- travel(meta)
806
+ travel(localMeta)
688
807
  setTicked(keys, state)
689
808
  }
690
809
  }
691
810
 
692
- props.defaultExpandAll === true && expandAll()
811
+ if (props.defaultExpandAll === true) {
812
+ expandAll()
813
+ }
693
814
 
694
815
  // expose public methods
695
816
  Object.assign(proxy, {
@@ -708,16 +829,15 @@ export default createComponent({
708
829
  const children = getChildren(props.nodes)
709
830
 
710
831
  return h(
711
- 'div', {
832
+ 'div',
833
+ {
712
834
  class: classes.value,
713
835
  role: 'tree'
714
836
  },
715
837
  children.length === 0
716
- ? (
717
- props.filter
718
- ? props.noResultsLabel || $q.lang.tree.noResults
719
- : props.noNodesLabel || $q.lang.tree.noNodes
720
- )
838
+ ? props.filter
839
+ ? props.noResultsLabel || $q.lang.tree.noResults
840
+ : props.noNodesLabel || $q.lang.tree.noNodes
721
841
  : children
722
842
  )
723
843
  }