quasar 2.3.1 → 2.4.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 (315) hide show
  1. package/dist/api/AppFullscreen.json +15 -8
  2. package/dist/api/BottomSheet.json +6 -0
  3. package/dist/api/Cookies.json +4 -3
  4. package/dist/api/Dialog.json +24 -10
  5. package/dist/api/Loading.json +0 -2
  6. package/dist/api/LoadingBar.json +8 -3
  7. package/dist/api/Morph.json +14 -7
  8. package/dist/api/Mutation.json +1 -1
  9. package/dist/api/Notify.json +41 -27
  10. package/dist/api/QAjaxBar.json +6 -3
  11. package/dist/api/QBreadcrumbs.json +8 -4
  12. package/dist/api/QBreadcrumbsEl.json +35 -12
  13. package/dist/api/QBtn.json +36 -17
  14. package/dist/api/QBtnDropdown.json +41 -20
  15. package/dist/api/QBtnToggle.json +7 -2
  16. package/dist/api/QCard.json +2 -1
  17. package/dist/api/QCardActions.json +2 -1
  18. package/dist/api/QCardSection.json +2 -1
  19. package/dist/api/QCarousel.json +10 -5
  20. package/dist/api/QCarouselControl.json +4 -2
  21. package/dist/api/QChatMessage.json +0 -4
  22. package/dist/api/QCheckbox.json +8 -4
  23. package/dist/api/QChip.json +2 -1
  24. package/dist/api/QCircularProgress.json +14 -7
  25. package/dist/api/QColor.json +6 -3
  26. package/dist/api/QDate.json +33 -5
  27. package/dist/api/QDialog.json +8 -4
  28. package/dist/api/QDrawer.json +10 -5
  29. package/dist/api/QEditor.json +10 -5
  30. package/dist/api/QExpansionItem.json +36 -13
  31. package/dist/api/QFab.json +41 -6
  32. package/dist/api/QFabAction.json +12 -2
  33. package/dist/api/QField.json +3 -1
  34. package/dist/api/QFile.json +8 -2
  35. package/dist/api/QFooter.json +2 -1
  36. package/dist/api/QForm.json +1 -1
  37. package/dist/api/QHeader.json +4 -2
  38. package/dist/api/QIcon.json +2 -1
  39. package/dist/api/QImg.json +8 -4
  40. package/dist/api/QInfiniteScroll.json +6 -3
  41. package/dist/api/QInnerLoading.json +8 -4
  42. package/dist/api/QInput.json +3 -1
  43. package/dist/api/QIntersection.json +4 -2
  44. package/dist/api/QItem.json +33 -11
  45. package/dist/api/QKnob.json +8 -4
  46. package/dist/api/QLayout.json +9 -1
  47. package/dist/api/QLinearProgress.json +4 -2
  48. package/dist/api/QMarkupTable.json +2 -1
  49. package/dist/api/QMenu.json +8 -4
  50. package/dist/api/QNoSsr.json +2 -1
  51. package/dist/api/QOptionGroup.json +76 -5
  52. package/dist/api/QPage.json +2 -1
  53. package/dist/api/QPageScroller.json +8 -4
  54. package/dist/api/QPageSticky.json +2 -1
  55. package/dist/api/QPagination.json +10 -6
  56. package/dist/api/QParallax.json +2 -1
  57. package/dist/api/QPopupEdit.json +5 -2
  58. package/dist/api/QPopupProxy.json +7 -4
  59. package/dist/api/QRange.json +600 -111
  60. package/dist/api/QRating.json +5 -2
  61. package/dist/api/QResizeObserver.json +4 -1
  62. package/dist/api/QRouteTab.json +35 -13
  63. package/dist/api/QScrollArea.json +29 -6
  64. package/dist/api/QScrollObserver.json +13 -1
  65. package/dist/api/QSelect.json +76 -47
  66. package/dist/api/QSeparator.json +2 -1
  67. package/dist/api/QSkeleton.json +8 -4
  68. package/dist/api/QSlideItem.json +9 -0
  69. package/dist/api/QSlideTransition.json +2 -1
  70. package/dist/api/QSlider.json +512 -43
  71. package/dist/api/QSpinner.json +2 -1
  72. package/dist/api/QSplitter.json +4 -2
  73. package/dist/api/QStep.json +2 -1
  74. package/dist/api/QStepper.json +6 -3
  75. package/dist/api/QTab.json +4 -2
  76. package/dist/api/QTabPanels.json +6 -3
  77. package/dist/api/QTable.json +154 -88
  78. package/dist/api/QTabs.json +4 -2
  79. package/dist/api/QTime.json +16 -4
  80. package/dist/api/QTimeline.json +4 -2
  81. package/dist/api/QTimelineEntry.json +4 -2
  82. package/dist/api/QToggle.json +8 -4
  83. package/dist/api/QTooltip.json +18 -9
  84. package/dist/api/QTree.json +34 -19
  85. package/dist/api/QUploader.json +28 -6
  86. package/dist/api/QVirtualScroll.json +26 -11
  87. package/dist/api/ScrollFire.json +1 -1
  88. package/dist/api/TouchHold.json +2 -1
  89. package/dist/api/TouchRepeat.json +2 -1
  90. package/dist/api/TouchSwipe.json +2 -1
  91. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  92. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  93. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  94. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  95. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  96. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  97. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  98. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  99. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  100. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  101. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  102. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  103. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  104. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  105. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  106. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  107. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  108. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  109. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  110. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +6 -0
  111. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  112. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  113. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  114. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  115. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  116. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  117. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  118. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  119. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  120. package/dist/icon-set/themify.umd.prod.js +1 -1
  121. package/dist/lang/ar.umd.prod.js +1 -1
  122. package/dist/lang/az-Latn.umd.prod.js +1 -1
  123. package/dist/lang/bg.umd.prod.js +1 -1
  124. package/dist/lang/bn.umd.prod.js +1 -1
  125. package/dist/lang/ca.umd.prod.js +1 -1
  126. package/dist/lang/cs.umd.prod.js +1 -1
  127. package/dist/lang/da.umd.prod.js +1 -1
  128. package/dist/lang/de.umd.prod.js +1 -1
  129. package/dist/lang/el.umd.prod.js +1 -1
  130. package/dist/lang/en-GB.umd.prod.js +1 -1
  131. package/dist/lang/en-US.umd.prod.js +1 -1
  132. package/dist/lang/eo.umd.prod.js +1 -1
  133. package/dist/lang/es.umd.prod.js +1 -1
  134. package/dist/lang/et.umd.prod.js +1 -1
  135. package/dist/lang/fa-IR.umd.prod.js +1 -1
  136. package/dist/lang/fa.umd.prod.js +1 -1
  137. package/dist/lang/fi.umd.prod.js +1 -1
  138. package/dist/lang/fr.umd.prod.js +1 -1
  139. package/dist/lang/gn.umd.prod.js +1 -1
  140. package/dist/lang/he.umd.prod.js +1 -1
  141. package/dist/lang/hr.umd.prod.js +1 -1
  142. package/dist/lang/hu.umd.prod.js +1 -1
  143. package/dist/lang/id.umd.prod.js +1 -1
  144. package/dist/lang/is.umd.prod.js +1 -1
  145. package/dist/lang/it.umd.prod.js +1 -1
  146. package/dist/lang/ja.umd.prod.js +1 -1
  147. package/dist/lang/km.umd.prod.js +1 -1
  148. package/dist/lang/ko-KR.umd.prod.js +1 -1
  149. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  150. package/dist/lang/lt.umd.prod.js +1 -1
  151. package/dist/lang/lu.umd.prod.js +1 -1
  152. package/dist/lang/lv.umd.prod.js +1 -1
  153. package/dist/lang/ml.umd.prod.js +1 -1
  154. package/dist/lang/ms.umd.prod.js +1 -1
  155. package/dist/lang/nb-NO.umd.prod.js +1 -1
  156. package/dist/lang/nl.umd.prod.js +1 -1
  157. package/dist/lang/pl.umd.prod.js +1 -1
  158. package/dist/lang/pt-BR.umd.prod.js +1 -1
  159. package/dist/lang/pt.umd.prod.js +1 -1
  160. package/dist/lang/ro.umd.prod.js +1 -1
  161. package/dist/lang/ru.umd.prod.js +1 -1
  162. package/dist/lang/sk.umd.prod.js +1 -1
  163. package/dist/lang/sl.umd.prod.js +1 -1
  164. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  165. package/dist/lang/sr.umd.prod.js +1 -1
  166. package/dist/lang/sv.umd.prod.js +1 -1
  167. package/dist/lang/ta.umd.prod.js +1 -1
  168. package/dist/lang/th.umd.prod.js +1 -1
  169. package/dist/lang/tr.umd.prod.js +1 -1
  170. package/dist/lang/ug.umd.prod.js +1 -1
  171. package/dist/lang/uk.umd.prod.js +1 -1
  172. package/dist/lang/vi.umd.prod.js +1 -1
  173. package/dist/lang/zh-CN.umd.prod.js +1 -1
  174. package/dist/lang/zh-TW.umd.prod.js +1 -1
  175. package/dist/quasar.cjs.prod.js +2 -2
  176. package/dist/quasar.css +268 -184
  177. package/dist/quasar.esm.prod.js +2 -2
  178. package/dist/quasar.prod.css +1 -1
  179. package/dist/quasar.rtl.css +340 -263
  180. package/dist/quasar.rtl.prod.css +1 -1
  181. package/dist/quasar.sass +272 -212
  182. package/dist/quasar.umd.js +16532 -16216
  183. package/dist/quasar.umd.prod.js +2 -2
  184. package/dist/ssr-directives/Morph.js +1 -1
  185. package/dist/transforms/loader-asset-urls.json +20 -0
  186. package/dist/types/api/cookies.d.ts +1 -1
  187. package/dist/types/api/slider.d.ts +46 -0
  188. package/dist/types/api/validation.d.ts +4 -0
  189. package/dist/types/api.d.ts +2 -0
  190. package/dist/types/composables.d.ts +7 -3
  191. package/dist/types/extras/icon-set.d.ts +1 -0
  192. package/dist/types/index.d.ts +759 -177
  193. package/dist/vetur/quasar-attributes.json +251 -83
  194. package/dist/vetur/quasar-tags.json +59 -17
  195. package/dist/web-types/web-types.json +587 -155
  196. package/icon-set/svg-ionicons-v6.js +225 -0
  197. package/package.json +2 -2
  198. package/src/api.extends.json +0 -1
  199. package/src/components/breadcrumbs/QBreadcrumbs.js +7 -2
  200. package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
  201. package/src/components/breadcrumbs/QBreadcrumbsEl.js +14 -8
  202. package/src/components/btn/QBtn.js +6 -5
  203. package/src/components/btn/use-btn.js +21 -21
  204. package/src/components/btn/use-btn.json +22 -13
  205. package/src/components/btn-dropdown/QBtnDropdown.json +1 -0
  206. package/src/components/btn-toggle/QBtnToggle.json +3 -0
  207. package/src/components/checkbox/use-checkbox.js +1 -1
  208. package/src/components/chip/QChip.json +1 -2
  209. package/src/components/color/QColor.js +32 -26
  210. package/src/components/color/QColor.sass +10 -23
  211. package/src/components/date/QDate.json +25 -1
  212. package/src/components/date/QDate.sass +2 -0
  213. package/src/components/drawer/QDrawer.js +18 -15
  214. package/src/components/editor/QEditor.js +3 -3
  215. package/src/components/editor/QEditor.sass +10 -1
  216. package/src/components/expansion-item/QExpansionItem.js +4 -1
  217. package/src/components/expansion-item/QExpansionItem.json +2 -1
  218. package/src/components/fab/QFab.js +18 -12
  219. package/src/components/fab/QFab.json +36 -1
  220. package/src/components/fab/QFab.sass +1 -1
  221. package/src/components/fab/QFabAction.js +14 -7
  222. package/src/components/fab/QFabAction.json +10 -0
  223. package/src/components/field/QField.json +3 -3
  224. package/src/components/file/QFile.js +12 -5
  225. package/src/components/file/QFile.json +9 -6
  226. package/src/components/file/QFile.sass +4 -2
  227. package/src/components/footer/QFooter.js +1 -1
  228. package/src/components/form/QForm.json +2 -3
  229. package/src/components/header/QHeader.js +1 -1
  230. package/src/components/icon/QIcon.js +2 -2
  231. package/src/components/infinite-scroll/QInfiniteScroll.js +4 -5
  232. package/src/components/item/QItem.js +2 -3
  233. package/src/components/layout/QLayout.json +8 -1
  234. package/src/components/linear-progress/QLinearProgress.js +3 -2
  235. package/src/components/linear-progress/QLinearProgress.sass +1 -1
  236. package/src/components/option-group/QOptionGroup.js +3 -0
  237. package/src/components/option-group/QOptionGroup.json +48 -2
  238. package/src/components/pagination/QPagination.json +0 -1
  239. package/src/components/parallax/QParallax.js +4 -2
  240. package/src/components/popup-edit/QPopupEdit.js +2 -5
  241. package/src/components/popup-edit/QPopupEdit.json +1 -0
  242. package/src/components/popup-proxy/QPopupProxy.json +2 -1
  243. package/src/components/radio/QRadio.js +2 -7
  244. package/src/components/range/QRange.js +103 -222
  245. package/src/components/range/QRange.json +11 -121
  246. package/src/components/rating/QRating.json +1 -1
  247. package/src/components/resize-observer/QResizeObserver.json +2 -0
  248. package/src/components/scroll-area/QScrollArea.js +11 -14
  249. package/src/components/scroll-area/QScrollArea.json +29 -9
  250. package/src/components/scroll-observer/QScrollObserver.json +11 -0
  251. package/src/components/select/QSelect.js +1 -1
  252. package/src/components/select/QSelect.json +41 -15
  253. package/src/components/slide-item/QSlideItem.json +9 -0
  254. package/src/components/slider/QSlider.js +46 -132
  255. package/src/components/slider/QSlider.json +1 -121
  256. package/src/components/slider/QSlider.sass +198 -132
  257. package/src/components/slider/use-slider.js +453 -109
  258. package/src/components/slider/use-slider.json +546 -0
  259. package/src/components/stepper/QStepper.js +3 -3
  260. package/src/components/stepper/QStepper.sass +24 -26
  261. package/src/components/table/QTable.js +27 -47
  262. package/src/components/table/QTable.json +104 -55
  263. package/src/components/table/table-pagination.js +4 -0
  264. package/src/components/tabs/QRouteTab.js +1 -2
  265. package/src/components/tabs/QRouteTab.json +0 -7
  266. package/src/components/tabs/QTabs.js +71 -20
  267. package/src/components/tabs/use-tab.js +26 -13
  268. package/src/components/time/QTime.json +8 -0
  269. package/src/components/tree/QTree.js +14 -12
  270. package/src/components/tree/QTree.json +26 -21
  271. package/src/components/tree/QTree.sass +45 -41
  272. package/src/components/uploader/QUploader.json +14 -2
  273. package/src/components/uploader/uploader-core.js +16 -9
  274. package/src/components/uploader/xhr-uploader-plugin.json +8 -3
  275. package/src/components/virtual-scroll/QVirtualScroll.json +15 -0
  276. package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
  277. package/src/components/virtual-scroll/use-virtual-scroll.js +30 -17
  278. package/src/components/virtual-scroll/use-virtual-scroll.json +7 -5
  279. package/src/composables/private/use-field.js +7 -7
  280. package/src/composables/private/use-file.js +20 -5
  281. package/src/composables/private/use-form.js +2 -3
  282. package/src/composables/private/use-fullscreen.js +15 -4
  283. package/src/composables/private/use-router-link.js +44 -23
  284. package/src/composables/private/use-router-link.json +26 -10
  285. package/src/composables/private/use-split-attrs.js +12 -9
  286. package/src/composables/private/use-validate.js +21 -15
  287. package/src/composables/private/use-validate.json +1 -0
  288. package/src/composables/use-dialog-plugin-component.js +1 -0
  289. package/src/css/core/helpers.sass +3 -0
  290. package/src/css/core/positioning.sass +5 -0
  291. package/src/directives/Mutation.json +2 -3
  292. package/src/directives/ScrollFire.js +1 -0
  293. package/src/directives/ScrollFire.json +2 -3
  294. package/src/icon-set.js +2 -4
  295. package/src/plugins/AppFullscreen.js +70 -53
  296. package/src/plugins/AppFullscreen.json +8 -8
  297. package/src/plugins/AppVisibility.js +2 -3
  298. package/src/plugins/BottomSheet.js +3 -5
  299. package/src/plugins/Cookies.json +2 -2
  300. package/src/plugins/Dialog.js +3 -5
  301. package/src/plugins/Dialog.json +6 -5
  302. package/src/plugins/LoadingBar.js +17 -18
  303. package/src/plugins/LoadingBar.json +4 -3
  304. package/src/plugins/Notify.js +296 -295
  305. package/src/plugins/Notify.json +13 -19
  306. package/src/plugins/Platform.js +14 -14
  307. package/src/utils/date.js +4 -4
  308. package/src/utils/dom.js +2 -2
  309. package/src/utils/open-url.js +2 -2
  310. package/src/utils/patterns.js +1 -0
  311. package/src/utils/private/define-reactive-plugin.js +10 -8
  312. package/src/utils/private/global-dialog.js +6 -8
  313. package/src/utils/private/global-dialog.json +6 -0
  314. package/src/utils/private/inject-obj-prop.js +13 -0
  315. package/src/utils/private/is.js +2 -2
@@ -2,38 +2,54 @@
2
2
  "props": {
3
3
  "to": {
4
4
  "type": [ "String", "Object" ],
5
- "desc": "Equivalent to Vue Router <router-link> 'to' property",
5
+ "desc": "Equivalent to Vue Router <router-link> 'to' property; Superseeded by 'href' prop if used",
6
6
  "examples": [
7
7
  "/home/dashboard",
8
8
  ":to=\"{ name: 'my-route-name' }\""
9
9
  ],
10
- "category": "behavior"
10
+ "category": "navigation"
11
11
  },
12
12
 
13
13
  "exact": {
14
14
  "type": "Boolean",
15
- "desc": "Equivalent to Vue Router <router-link> 'exact' property",
16
- "category": "behavior"
15
+ "desc": "Equivalent to Vue Router <router-link> 'exact' property; Superseeded by 'href' prop if used",
16
+ "category": "navigation"
17
17
  },
18
18
 
19
19
  "replace": {
20
20
  "type": "Boolean",
21
- "desc": "Equivalent to Vue Router <router-link> 'replace' property",
22
- "category": "behavior"
21
+ "desc": "Equivalent to Vue Router <router-link> 'replace' property; Superseeded by 'href' prop if used",
22
+ "category": "navigation"
23
23
  },
24
24
 
25
25
  "active-class": {
26
26
  "type": "String",
27
- "desc": "Equivalent to Vue Router <router-link> 'active-class' property",
27
+ "desc": "Equivalent to Vue Router <router-link> 'active-class' property; Superseeded by 'href' prop if used",
28
28
  "examples": [ "my-active-class" ],
29
- "category": "behavior"
29
+ "category": "navigation"
30
30
  },
31
31
 
32
32
  "exact-active-class": {
33
33
  "type": "String",
34
- "desc": "Equivalent to Vue Router <router-link> 'active-class' property",
34
+ "desc": "Equivalent to Vue Router <router-link> 'active-class' property; Superseeded by 'href' prop if used",
35
35
  "examples": [ "my-exact-active-class" ],
36
- "category": "behavior"
36
+ "category": "navigation"
37
+ },
38
+
39
+ "href": {
40
+ "type": "String",
41
+ "desc": "Native <a> link href attribute; Has priority over the 'to'/'exact'/'replace'/'active-class'/'exact-active-class' props",
42
+ "examples": [ "http://quasar.dev" ],
43
+ "category": "navigation",
44
+ "addedIn": "v2.4"
45
+ },
46
+
47
+ "target": {
48
+ "type": "String",
49
+ "desc": "Native <a> link target attribute; Use it only along with 'href' prop; Has priority over the 'to'/'exact'/'replace'/'active-class'/'exact-active-class' props",
50
+ "examples": [ "_blank", "_self", "_parent", "_top" ],
51
+ "category": "navigation",
52
+ "addedIn": "v2.4"
37
53
  },
38
54
 
39
55
  "disable": {
@@ -2,27 +2,30 @@ import { ref, onBeforeUpdate } from 'vue'
2
2
 
3
3
  const listenerRE = /^on[A-Z]/
4
4
 
5
- export default function (attrs) {
5
+ export default function (attrs, vnode) {
6
6
  const acc = {
7
7
  listeners: ref({}),
8
8
  attributes: ref({})
9
9
  }
10
10
 
11
11
  function update () {
12
- const listeners = {}
13
12
  const attributes = {}
13
+ const listeners = {}
14
14
 
15
- Object.keys(attrs).forEach(key => {
16
- if (listenerRE.test(key) === true) {
17
- listeners[ key ] = attrs[ key ]
18
- }
19
- else if (key !== 'class' && key !== 'style') {
15
+ for (const key in attrs) {
16
+ if (key !== 'class' && key !== 'style' && listenerRE.test(key) === false) {
20
17
  attributes[ key ] = attrs[ key ]
21
18
  }
22
- })
19
+ }
20
+
21
+ for (const key in vnode.props) {
22
+ if (listenerRE.test(key) === true) {
23
+ listeners[ key ] = vnode.props[ key ]
24
+ }
25
+ }
23
26
 
24
- acc.listeners.value = listeners
25
27
  acc.attributes.value = attributes
28
+ acc.listeners.value = listeners
26
29
  }
27
30
 
28
31
  onBeforeUpdate(update)
@@ -2,6 +2,8 @@ import { ref, computed, watch, onBeforeUnmount, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useFormChild from '../use-form-child.js'
4
4
  import { testPattern } from '../../utils/patterns.js'
5
+ import { debounce } from '../../utils.js'
6
+ import { injectProp } from '../../utils/private/inject-obj-prop.js'
5
7
 
6
8
  const lazyRulesValues = [ true, false, 'ondemand' ]
7
9
 
@@ -35,7 +37,8 @@ export default function (focused, innerLoading) {
35
37
  let validateIndex = 0, unwatchRules
36
38
 
37
39
  const hasRules = computed(() =>
38
- props.rules !== void 0
40
+ props.disable !== true
41
+ && props.rules !== void 0
39
42
  && props.rules !== null
40
43
  && props.rules.length > 0
41
44
  )
@@ -44,7 +47,7 @@ export default function (focused, innerLoading) {
44
47
  props.error === true || innerError.value === true
45
48
  )
46
49
 
47
- const computedErrorMessage = computed(() => (
50
+ const errorMessage = computed(() => (
48
51
  typeof props.errorMessage === 'string' && props.errorMessage.length > 0
49
52
  ? props.errorMessage
50
53
  : innerErrorMessage.value
@@ -69,15 +72,16 @@ export default function (focused, innerLoading) {
69
72
  }, { immediate: true })
70
73
 
71
74
  watch(focused, val => {
72
- if (props.lazyRules !== 'ondemand') {
73
- if (val === true) {
74
- if (isDirtyModel.value === null) {
75
- isDirtyModel.value = false
76
- }
75
+ if (val === true) {
76
+ if (isDirtyModel.value === null) {
77
+ isDirtyModel.value = false
77
78
  }
78
- else if (isDirtyModel.value === false && hasRules.value === true) {
79
- isDirtyModel.value = true
80
- validate()
79
+ }
80
+ else if (isDirtyModel.value === false) {
81
+ isDirtyModel.value = true
82
+
83
+ if (hasRules.value === true && props.lazyRules !== 'ondemand') {
84
+ debouncedValidate()
81
85
  }
82
86
  }
83
87
  })
@@ -88,6 +92,7 @@ export default function (focused, innerLoading) {
88
92
  isDirtyModel.value = null
89
93
  innerError.value = false
90
94
  innerErrorMessage.value = null
95
+ debouncedValidate.cancel()
91
96
  }
92
97
 
93
98
  /*
@@ -189,25 +194,26 @@ export default function (focused, innerLoading) {
189
194
  && props.lazyRules !== 'ondemand'
190
195
  && (isDirtyModel.value === true || (props.lazyRules !== true && changedRules !== true))
191
196
  ) {
192
- validate()
197
+ debouncedValidate()
193
198
  }
194
199
  }
195
200
 
201
+ const debouncedValidate = debounce(validate, 0)
202
+
196
203
  onBeforeUnmount(() => {
197
204
  unwatchRules !== void 0 && unwatchRules()
205
+ debouncedValidate.cancel()
198
206
  })
199
207
 
200
208
  // expose public methods & props
201
209
  Object.assign(proxy, { resetValidation, validate })
202
- Object.defineProperty(proxy, 'hasError', {
203
- get: () => hasError.value
204
- })
210
+ injectProp(proxy, 'hasError', () => hasError.value)
205
211
 
206
212
  return {
207
213
  isDirtyModel,
208
214
  hasRules,
209
215
  hasError,
210
- computedErrorMessage,
216
+ errorMessage,
211
217
 
212
218
  validate,
213
219
  resetValidation
@@ -28,6 +28,7 @@
28
28
 
29
29
  "rules": {
30
30
  "type": "Array",
31
+ "tsType": "ValidationRule",
31
32
  "desc": "Array of Functions/Strings; If String, then it must be a name of one of the embedded validation rules",
32
33
  "examples": [
33
34
  ":rules=\"[ val => val.length <= 3 || 'Please use maximum 3 characters' ]\"",
@@ -36,6 +36,7 @@ function useDialogPluginComponent () {
36
36
  }
37
37
  }
38
38
 
39
+ // Don't forget to update the types in "ui/types/composables.d.ts"
39
40
  const emits = [ 'ok', 'hide' ]
40
41
 
41
42
  useDialogPluginComponent.emits = emits
@@ -49,6 +49,9 @@
49
49
  outline: 0
50
50
  text-decoration: none
51
51
 
52
+ &--focusable:focus-visible
53
+ text-decoration: underline dashed currentColor 1px
54
+
52
55
  body.electron
53
56
  .q-electron-drag
54
57
  -webkit-user-select: none
@@ -69,6 +69,11 @@
69
69
  max-width: 100vw
70
70
  max-height: 100vh
71
71
 
72
+ body.q-ios-padding .fullscreen
73
+ padding-top: $ios-statusbar-height !important
74
+ padding-top: env(safe-area-inset-top) !important
75
+ padding-bottom: env(safe-area-inset-bottom) !important
76
+
72
77
  .absolute-full, .fullscreen, .fixed-full
73
78
  top: 0
74
79
  right: 0
@@ -27,9 +27,8 @@
27
27
  },
28
28
 
29
29
  "target": {
30
- "type": "Object",
31
- "desc": "The DOM element that the mutation affected, depending on the mutation type",
32
- "__exemption": [ "examples" ]
30
+ "type": "Element",
31
+ "desc": "The DOM element that the mutation affected, depending on the mutation type"
33
32
  },
34
33
 
35
34
  "addedNodes": {
@@ -61,6 +61,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
61
61
  beforeUnmount (el) {
62
62
  const ctx = el.__qscrollfire
63
63
  ctx.scrollTarget.removeEventListener('scroll', ctx.scroll, passive)
64
+ ctx.scroll.cancel()
64
65
  delete el.__qscrollfire
65
66
  }
66
67
  }
@@ -8,9 +8,8 @@
8
8
  "desc": "Function to call when scrolling and element comes into the viewport (use a non-function to disable)",
9
9
  "params": {
10
10
  "el": {
11
- "type": "Object",
12
- "desc": "DOM element that scroll-fire is applied to",
13
- "__exemption": [ "examples" ]
11
+ "type": "Element",
12
+ "desc": "DOM element that scroll-fire is applied to"
14
13
  }
15
14
  },
16
15
  "returns": null,
package/src/icon-set.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import defineReactivePlugin from './utils/private/define-reactive-plugin.js'
2
2
  import materialIcons from '../icon-set/material-icons.js'
3
+ import { injectProp } from './utils/private/inject-obj-prop.js'
3
4
 
4
5
  const Plugin = defineReactivePlugin({
5
6
  iconMapFn: null,
@@ -42,10 +43,7 @@ const Plugin = defineReactivePlugin({
42
43
 
43
44
  $q.iconSet = this.__icons
44
45
 
45
- Object.defineProperty($q, 'iconMapFn', {
46
- get: () => this.iconMapFn,
47
- set: val => { this.iconMapFn = val }
48
- })
46
+ injectProp($q, 'iconMapFn', () => this.iconMapFn, val => { this.iconMapFn = val })
49
47
 
50
48
  if (this.__installed === true) {
51
49
  iconSet !== void 0 && this.set(iconSet)
@@ -3,15 +3,41 @@ import { changeGlobalNodesTarget } from '../utils/private/global-nodes.js'
3
3
 
4
4
  const prefixes = {}
5
5
 
6
+ function assignFn (fn) {
7
+ Object.assign(Plugin, {
8
+ request: fn,
9
+ exit: fn,
10
+ toggle: fn
11
+ })
12
+ }
13
+
6
14
  function getFullscreenElement () {
7
15
  return (
8
16
  document.fullscreenElement
9
17
  || document.mozFullScreenElement
10
18
  || document.webkitFullscreenElement
11
19
  || document.msFullscreenElement
20
+ || null
12
21
  )
13
22
  }
14
23
 
24
+ function updateEl () {
25
+ const newEl = Plugin.activeEl = Plugin.isActive === false
26
+ ? null
27
+ : getFullscreenElement()
28
+
29
+ changeGlobalNodesTarget(
30
+ newEl === null || newEl === document.documentElement
31
+ ? document.body
32
+ : newEl
33
+ )
34
+ }
35
+
36
+ function togglePluginState () {
37
+ Plugin.isActive = Plugin.isActive === false
38
+ updateEl()
39
+ }
40
+
15
41
  // needed for consistency across browsers
16
42
  function promisify (target, fn) {
17
43
  try {
@@ -31,80 +57,71 @@ const Plugin = defineReactivePlugin({
31
57
  }, {
32
58
  isCapable: false,
33
59
 
34
- request (target) {
35
- if (Plugin.isCapable === true && Plugin.isActive === false) {
36
- const el = target || document.documentElement
37
- return promisify(el, prefixes.request)
38
- }
39
-
40
- return Plugin.__getErr()
41
- },
42
-
43
- exit () {
44
- return Plugin.isCapable === true && Plugin.isActive === true
45
- ? promisify(document, prefixes.exit)
46
- : Plugin.__getErr()
47
- },
48
-
49
- toggle (target) {
50
- return Plugin.isActive === true
51
- ? Plugin.exit()
52
- : Plugin.request(target)
53
- },
54
-
55
60
  install ({ $q }) {
56
61
  $q.fullscreen = this
57
62
  }
58
63
  })
59
64
 
60
- if (__QUASAR_SSR_SERVER__ !== true) {
61
- function init () {
62
- prefixes.request = [
63
- 'requestFullscreen',
64
- 'msRequestFullscreen', 'mozRequestFullScreen', 'webkitRequestFullscreen'
65
- ].find(request => document.documentElement[ request ] !== void 0)
65
+ if (__QUASAR_SSR_SERVER__ === true) {
66
+ assignFn(() => Promise.resolve())
67
+ }
68
+ else {
69
+ prefixes.request = [
70
+ 'requestFullscreen',
71
+ 'msRequestFullscreen', 'mozRequestFullScreen', 'webkitRequestFullscreen'
72
+ ].find(request => document.documentElement[ request ] !== void 0)
66
73
 
67
- Plugin.isCapable = prefixes.request !== void 0
74
+ Plugin.isCapable = prefixes.request !== void 0
68
75
 
69
- if (Plugin.isCapable === false) {
70
- // it means the browser does NOT support it
71
- Plugin.__getErr = () => Promise.reject('Not capable')
72
- return
73
- }
76
+ if (Plugin.isCapable === false) {
77
+ // it means the browser does NOT support it
78
+ assignFn(() => Promise.reject('Not capable'))
79
+ }
80
+ else {
81
+ Object.assign(Plugin, {
82
+ request (target) {
83
+ const el = target || document.documentElement
84
+ const { activeEl } = Plugin
85
+
86
+ if (el === activeEl) {
87
+ return Promise.resolve()
88
+ }
89
+
90
+ const queue = activeEl !== null && el.contains(activeEl) === true
91
+ ? Plugin.exit()
92
+ : Promise.resolve()
74
93
 
75
- Plugin.__getErr = () => Promise.resolve()
94
+ return queue.finally(() => promisify(el, prefixes.request))
95
+ },
96
+
97
+ exit () {
98
+ return Plugin.isActive === true
99
+ ? promisify(document, prefixes.exit)
100
+ : Promise.resolve()
101
+ },
102
+
103
+ toggle (target) {
104
+ return Plugin.isActive === true
105
+ ? Plugin.exit()
106
+ : Plugin.request(target)
107
+ }
108
+ })
76
109
 
77
110
  prefixes.exit = [
78
111
  'exitFullscreen',
79
112
  'msExitFullscreen', 'mozCancelFullScreen', 'webkitExitFullscreen'
80
113
  ].find(exit => document[ exit ])
81
114
 
82
- Plugin.isActive = !!getFullscreenElement()
115
+ Plugin.isActive = Boolean(getFullscreenElement())
116
+ Plugin.isActive === true && updateEl()
83
117
 
84
118
  ;[
85
119
  'onfullscreenchange',
86
120
  'onmsfullscreenchange', 'onwebkitfullscreenchange'
87
121
  ].forEach(evt => {
88
- document[ evt ] = () => {
89
- Plugin.isActive = Plugin.isActive === false
90
-
91
- if (Plugin.isActive === false) {
92
- Plugin.activeEl = null
93
- changeGlobalNodesTarget(document.body)
94
- }
95
- else {
96
- Plugin.activeEl = getFullscreenElement()
97
- changeGlobalNodesTarget(
98
- Plugin.activeEl === document.documentElement
99
- ? document.body
100
- : Plugin.activeEl
101
- )
102
- }
103
- }
122
+ document[ evt ] = togglePluginState
104
123
  })
105
124
  }
106
-
107
- init()
108
125
  }
109
126
 
110
127
  export default Plugin
@@ -17,9 +17,9 @@
17
17
  },
18
18
 
19
19
  "activeEl": {
20
- "type": "Object",
20
+ "type": [ "Element", "null" ],
21
21
  "desc": "The DOM element used as root for fullscreen, otherwise 'null'",
22
- "__exemption": [ "examples" ]
22
+ "examples": [ "document.fullscreenElement", "null" ]
23
23
  }
24
24
  },
25
25
 
@@ -34,8 +34,8 @@
34
34
  }
35
35
  },
36
36
  "returns": {
37
- "type": "Promise<any>",
38
- "desc": "A Promise with the outcome (true -> validation was a success, false -> invalid models detected)",
37
+ "type": "Promise<void>",
38
+ "desc": "A Promise which is resolved when transitioned to fullscreen mode. It gets rejected with 'Not capable' if the browser is not capable, and with an Error object if something else went wrong.",
39
39
  "examples": [
40
40
  "request().then(response => { ... }).catch(err => { ... })"
41
41
  ]
@@ -45,8 +45,8 @@
45
45
  "exit": {
46
46
  "desc": "Request exiting out of Fullscreen mode",
47
47
  "returns": {
48
- "type": "Promise<any>",
49
- "desc": "A Promise with the outcome (true -> validation was a success, false -> invalid models detected)",
48
+ "type": "Promise<void>",
49
+ "desc": "A Promise which is resolved when exited out of fullscreen mode. It gets rejected with 'Not capable' if the browser is not capable, and with an Error object if something else went wrong.",
50
50
  "examples": [
51
51
  "exit().then(response => { ... }).catch(err => { ... })"
52
52
  ]
@@ -63,8 +63,8 @@
63
63
  }
64
64
  },
65
65
  "returns": {
66
- "type": "Promise<any>",
67
- "desc": "A Promise with the outcome (true -> validation was a success, false -> invalid models detected)",
66
+ "type": "Promise<void>",
67
+ "desc": "A Promise which is resolved when transitioned to / exited out of fullscreen mode. It gets rejected with 'Not capable' if the browser is not capable, and with an Error object if something else went wrong.",
68
68
  "examples": [
69
69
  "toggle().then(response => { ... }).catch(err => { ... })"
70
70
  ]
@@ -1,4 +1,5 @@
1
1
  import defineReactivePlugin from '../utils/private/define-reactive-plugin.js'
2
+ import { injectProp } from '../utils/private/inject-obj-prop.js'
2
3
 
3
4
  const Plugin = defineReactivePlugin({
4
5
  appVisible: true
@@ -9,9 +10,7 @@ const Plugin = defineReactivePlugin({
9
10
  return
10
11
  }
11
12
 
12
- Object.defineProperty($q, 'appVisible', {
13
- get: () => this.appVisible
14
- })
13
+ injectProp($q, 'appVisible', () => this.appVisible)
15
14
  }
16
15
  })
17
16
 
@@ -3,11 +3,9 @@ import globalDialog from '../utils/private/global-dialog.js'
3
3
 
4
4
  export default {
5
5
  install ({ $q, parentApp }) {
6
- if (this.__installed === true) {
7
- $q.bottomSheet = globalDialog(BottomSheet, false, parentApp)
8
- }
9
- else {
10
- this.create = $q.bottomSheet = globalDialog(BottomSheet, false, parentApp)
6
+ $q.bottomSheet = globalDialog(BottomSheet, false, parentApp)
7
+ if (this.__installed !== true) {
8
+ this.create = $q.bottomSheet
11
9
  }
12
10
  }
13
11
  }
@@ -73,8 +73,8 @@
73
73
  },
74
74
  "sameSite": {
75
75
  "type": "String",
76
- "desc": "SameSite cookie option (not supported by IE11)",
77
- "examples": [ "Strict", "Lax" ]
76
+ "desc": "SameSite cookie option",
77
+ "values": [ "Lax", "Strict", "None" ]
78
78
  },
79
79
  "httpOnly": {
80
80
  "type": "Boolean",
@@ -3,11 +3,9 @@ import globalDialog from '../utils/private/global-dialog.js'
3
3
 
4
4
  export default {
5
5
  install ({ $q, parentApp }) {
6
- if (this.__installed === true) {
7
- $q.dialog = globalDialog(DialogPlugin, true, parentApp)
8
- }
9
- else {
10
- this.create = $q.dialog = globalDialog(DialogPlugin, true, parentApp)
6
+ $q.dialog = globalDialog(DialogPlugin, true, parentApp)
7
+ if (this.__installed !== true) {
8
+ this.create = $q.dialog
11
9
  }
12
10
  }
13
11
  }
@@ -46,8 +46,8 @@
46
46
  "definition": {
47
47
  "model": {
48
48
  "type": "String",
49
- "desc": "The initial value of the input",
50
49
  "required": true,
50
+ "desc": "The initial value of the input",
51
51
  "__exemption": [ "examples" ]
52
52
  },
53
53
 
@@ -64,6 +64,7 @@
64
64
  "params": {
65
65
  "val": {
66
66
  "type": "String",
67
+ "required": true,
67
68
  "desc": "The value of the input",
68
69
  "__exemption": [ "examples" ]
69
70
  }
@@ -151,8 +152,8 @@
151
152
  "definition": {
152
153
  "model": {
153
154
  "type": [ "String", "Array" ],
154
- "desc": "The value of the selection (String if it's of type radio or Array otherwise)",
155
155
  "required": true,
156
+ "desc": "The value of the selection (String if it's of type radio or Array otherwise)",
156
157
  "examples": [ "[]" ]
157
158
  },
158
159
 
@@ -177,6 +178,7 @@
177
178
  "params": {
178
179
  "model": {
179
180
  "type": [ "String", "Array" ],
181
+ "required": true,
180
182
  "desc": "The current model (String if it's of type radio or Array otherwise)",
181
183
  "examples": [
182
184
  "opt2",
@@ -304,9 +306,8 @@
304
306
  },
305
307
 
306
308
  "component": {
307
- "type": "Any",
308
- "desc": "Use custom dialog component; use along with 'componentProps' prop where possible",
309
- "__exemption": [ "examples" ]
309
+ "type": "Component",
310
+ "desc": "Use custom dialog component; use along with 'componentProps' prop where possible"
310
311
  },
311
312
 
312
313
  "componentProps": {