quasar 2.10.0 → 2.10.2

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 (319) hide show
  1. package/dist/api/Dialog.json +28 -69
  2. package/dist/api/Intersection.json +25 -100
  3. package/dist/api/Loading.json +5 -20
  4. package/dist/api/LoadingBar.json +1 -7
  5. package/dist/api/LocalStorage.json +4 -16
  6. package/dist/api/Morph.json +2 -14
  7. package/dist/api/Notify.json +0 -3
  8. package/dist/api/Platform.json +1 -4
  9. package/dist/api/QAjaxBar.json +1 -11
  10. package/dist/api/QBreadcrumbs.json +0 -8
  11. package/dist/api/QBtn.json +0 -3
  12. package/dist/api/QBtnDropdown.json +0 -12
  13. package/dist/api/QCarousel.json +0 -10
  14. package/dist/api/QCarouselControl.json +0 -3
  15. package/dist/api/QCircularProgress.json +0 -23
  16. package/dist/api/QColor.json +0 -3
  17. package/dist/api/QDialog.json +18 -9
  18. package/dist/api/QDrawer.json +0 -6
  19. package/dist/api/QExpansionItem.json +0 -3
  20. package/dist/api/QFab.json +1 -6
  21. package/dist/api/QFabAction.json +1 -3
  22. package/dist/api/QField.json +1 -6
  23. package/dist/api/QFile.json +12 -29
  24. package/dist/api/QFooter.json +0 -3
  25. package/dist/api/QHeader.json +0 -6
  26. package/dist/api/QInfiniteScroll.json +9 -16
  27. package/dist/api/QInnerLoading.json +0 -4
  28. package/dist/api/QInput.json +8 -15
  29. package/dist/api/QIntersection.json +0 -4
  30. package/dist/api/QItemLabel.json +0 -5
  31. package/dist/api/QKnob.json +3 -36
  32. package/dist/api/QLayout.json +6 -24
  33. package/dist/api/QLinearProgress.json +0 -6
  34. package/dist/api/QList.json +15 -0
  35. package/dist/api/QMenu.json +7 -12
  36. package/dist/api/QOptionGroup.json +0 -3
  37. package/dist/api/QPage.json +2 -8
  38. package/dist/api/QPageScroller.json +0 -9
  39. package/dist/api/QPageSticky.json +0 -3
  40. package/dist/api/QPagination.json +4 -25
  41. package/dist/api/QParallax.json +2 -14
  42. package/dist/api/QPopupEdit.json +0 -8
  43. package/dist/api/QPopupProxy.json +21 -4
  44. package/dist/api/QRange.json +5 -32
  45. package/dist/api/QRating.json +0 -4
  46. package/dist/api/QResizeObserver.json +2 -8
  47. package/dist/api/QScrollArea.json +8 -36
  48. package/dist/api/QScrollObserver.json +6 -24
  49. package/dist/api/QSelect.json +18 -108
  50. package/dist/api/QSlideItem.json +1 -6
  51. package/dist/api/QSlideTransition.json +0 -4
  52. package/dist/api/QSlider.json +3 -24
  53. package/dist/api/QSpinner.json +0 -4
  54. package/dist/api/QSplitter.json +1 -4
  55. package/dist/api/QStepper.json +0 -7
  56. package/dist/api/QTabPanels.json +0 -7
  57. package/dist/api/QTable.json +43 -191
  58. package/dist/api/QTabs.json +0 -6
  59. package/dist/api/QTime.json +3 -12
  60. package/dist/api/QTooltip.json +7 -18
  61. package/dist/api/QTree.json +0 -3
  62. package/dist/api/QUploader.json +5 -16
  63. package/dist/api/QVirtualScroll.json +11 -56
  64. package/dist/api/Screen.json +9 -36
  65. package/dist/api/Scroll.json +2 -8
  66. package/dist/api/SessionStorage.json +4 -16
  67. package/dist/api/TouchHold.json +3 -12
  68. package/dist/api/TouchPan.json +7 -28
  69. package/dist/api/TouchRepeat.json +6 -24
  70. package/dist/api/TouchSwipe.json +3 -12
  71. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  72. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  73. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  74. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  75. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  76. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  77. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  78. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  79. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  80. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  81. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  82. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  83. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  84. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  85. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  86. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  87. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  88. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  89. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  90. package/dist/icon-set/mdi-v7.umd.prod.js +6 -0
  91. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  92. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  93. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  94. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  95. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  96. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  97. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  98. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  99. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  100. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  101. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  102. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  103. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  104. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  105. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  106. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  107. package/dist/icon-set/svg-mdi-v7.umd.prod.js +6 -0
  108. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  109. package/dist/icon-set/themify.umd.prod.js +1 -1
  110. package/dist/lang/ar-TN.umd.prod.js +1 -1
  111. package/dist/lang/ar.umd.prod.js +1 -1
  112. package/dist/lang/az-Latn.umd.prod.js +1 -1
  113. package/dist/lang/bg.umd.prod.js +1 -1
  114. package/dist/lang/bn.umd.prod.js +1 -1
  115. package/dist/lang/ca.umd.prod.js +1 -1
  116. package/dist/lang/cs.umd.prod.js +1 -1
  117. package/dist/lang/da.umd.prod.js +1 -1
  118. package/dist/lang/de.umd.prod.js +1 -1
  119. package/dist/lang/el.umd.prod.js +1 -1
  120. package/dist/lang/en-GB.umd.prod.js +1 -1
  121. package/dist/lang/en-US.umd.prod.js +1 -1
  122. package/dist/lang/eo.umd.prod.js +1 -1
  123. package/dist/lang/es.umd.prod.js +1 -1
  124. package/dist/lang/et.umd.prod.js +1 -1
  125. package/dist/lang/eu.umd.prod.js +1 -1
  126. package/dist/lang/fa-IR.umd.prod.js +1 -1
  127. package/dist/lang/fa.umd.prod.js +1 -1
  128. package/dist/lang/fi.umd.prod.js +1 -1
  129. package/dist/lang/fr.umd.prod.js +1 -1
  130. package/dist/lang/gn.umd.prod.js +1 -1
  131. package/dist/lang/he.umd.prod.js +1 -1
  132. package/dist/lang/hr.umd.prod.js +1 -1
  133. package/dist/lang/hu.umd.prod.js +1 -1
  134. package/dist/lang/id.umd.prod.js +1 -1
  135. package/dist/lang/is.umd.prod.js +1 -1
  136. package/dist/lang/it.umd.prod.js +1 -1
  137. package/dist/lang/ja.umd.prod.js +1 -1
  138. package/dist/lang/km.umd.prod.js +1 -1
  139. package/dist/lang/ko-KR.umd.prod.js +1 -1
  140. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  141. package/dist/lang/kz.umd.prod.js +1 -1
  142. package/dist/lang/lt.umd.prod.js +1 -1
  143. package/dist/lang/lu.umd.prod.js +1 -1
  144. package/dist/lang/lv.umd.prod.js +1 -1
  145. package/dist/lang/ml.umd.prod.js +1 -1
  146. package/dist/lang/mm.umd.prod.js +1 -1
  147. package/dist/lang/ms.umd.prod.js +1 -1
  148. package/dist/lang/my.umd.prod.js +1 -1
  149. package/dist/lang/nb-NO.umd.prod.js +1 -1
  150. package/dist/lang/nl.umd.prod.js +1 -1
  151. package/dist/lang/pl.umd.prod.js +1 -1
  152. package/dist/lang/pt-BR.umd.prod.js +1 -1
  153. package/dist/lang/pt.umd.prod.js +1 -1
  154. package/dist/lang/ro.umd.prod.js +1 -1
  155. package/dist/lang/ru.umd.prod.js +1 -1
  156. package/dist/lang/sk.umd.prod.js +1 -1
  157. package/dist/lang/sl.umd.prod.js +1 -1
  158. package/dist/lang/sm.umd.prod.js +1 -1
  159. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  160. package/dist/lang/sr.umd.prod.js +1 -1
  161. package/dist/lang/sv.umd.prod.js +1 -1
  162. package/dist/lang/ta.umd.prod.js +1 -1
  163. package/dist/lang/th.umd.prod.js +1 -1
  164. package/dist/lang/tr.umd.prod.js +1 -1
  165. package/dist/lang/ug.umd.prod.js +1 -1
  166. package/dist/lang/uk.umd.prod.js +1 -1
  167. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  168. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  169. package/dist/lang/vi.umd.prod.js +1 -1
  170. package/dist/lang/zh-CN.umd.prod.js +1 -1
  171. package/dist/lang/zh-TW.umd.prod.js +1 -1
  172. package/dist/quasar.cjs.prod.js +2 -2
  173. package/dist/quasar.css +3 -3
  174. package/dist/quasar.esm.js +223 -192
  175. package/dist/quasar.esm.prod.js +2 -2
  176. package/dist/quasar.prod.css +1 -1
  177. package/dist/quasar.rtl.css +10 -3
  178. package/dist/quasar.rtl.prod.css +1 -1
  179. package/dist/quasar.sass +5 -4
  180. package/dist/quasar.umd.js +222 -191
  181. package/dist/quasar.umd.prod.js +2 -2
  182. package/dist/types/api/dialog.d.ts +101 -0
  183. package/dist/types/api/qpopupproxy.d.ts +3 -0
  184. package/dist/types/api.d.ts +2 -0
  185. package/dist/types/index.d.ts +56 -97
  186. package/dist/vetur/quasar-attributes.json +4 -0
  187. package/dist/vetur/quasar-tags.json +2 -1
  188. package/dist/web-types/web-types.json +142 -132
  189. package/icon-set/mdi-v7.js +146 -0
  190. package/icon-set/mdi-v7.mjs +141 -0
  191. package/icon-set/svg-mdi-v7.js +224 -0
  192. package/icon-set/svg-mdi-v7.mjs +224 -0
  193. package/package.json +4 -4
  194. package/src/api.extends.json +1 -2
  195. package/src/components/ajax-bar/QAjaxBar.json +5 -11
  196. package/src/components/breadcrumbs/QBreadcrumbs.json +0 -2
  197. package/src/components/breadcrumbs/QBreadcrumbsEl.json +1 -2
  198. package/src/components/btn/QBtn.json +1 -3
  199. package/src/components/btn/__tests__/QBtn.spec.js +87 -14
  200. package/src/components/btn/__tests__/use-btn.spec.js +385 -58
  201. package/src/components/btn-dropdown/QBtnDropdown.js +4 -12
  202. package/src/components/btn-dropdown/QBtnDropdown.json +0 -2
  203. package/src/components/btn-toggle/QBtnToggle.json +2 -4
  204. package/src/components/carousel/QCarousel.json +4 -9
  205. package/src/components/carousel/QCarouselControl.json +0 -1
  206. package/src/components/checkbox/use-checkbox.json +1 -2
  207. package/src/components/circular-progress/QCircularProgress.json +0 -5
  208. package/src/components/color/QColor.json +0 -1
  209. package/src/components/date/QDate.js +6 -4
  210. package/src/components/date/QDate.json +28 -56
  211. package/src/components/dialog/QDialog.js +34 -41
  212. package/src/components/dialog/QDialog.json +9 -2
  213. package/src/components/dialog-bottom-sheet/BottomSheet.js +1 -2
  214. package/src/components/dialog-plugin/DialogPlugin.js +4 -4
  215. package/src/components/drawer/QDrawer.js +5 -5
  216. package/src/components/drawer/QDrawer.json +0 -4
  217. package/src/components/editor/QEditor.json +3 -6
  218. package/src/components/expansion-item/QExpansionItem.js +3 -4
  219. package/src/components/expansion-item/QExpansionItem.json +3 -8
  220. package/src/components/fab/QFab.js +3 -6
  221. package/src/components/fab/QFab.json +0 -1
  222. package/src/components/fab/QFab.sass +2 -1
  223. package/src/components/fab/use-fab.json +0 -1
  224. package/src/components/field/QField.json +0 -1
  225. package/src/components/file/QFile.js +4 -1
  226. package/src/components/file/QFile.json +19 -20
  227. package/src/components/footer/QFooter.json +0 -1
  228. package/src/components/form/QForm.js +5 -3
  229. package/src/components/form/QForm.json +2 -4
  230. package/src/components/header/QHeader.json +0 -4
  231. package/src/components/img/QImg.js +20 -19
  232. package/src/components/infinite-scroll/QInfiniteScroll.json +9 -6
  233. package/src/components/inner-loading/QInnerLoading.js +2 -5
  234. package/src/components/input/QInput.js +12 -3
  235. package/src/components/input/QInput.json +11 -7
  236. package/src/components/input/use-mask.js +3 -1
  237. package/src/components/intersection/QIntersection.json +0 -1
  238. package/src/components/item/QItem.json +1 -2
  239. package/src/components/item/QItemLabel.json +0 -1
  240. package/src/components/item/QList.js +7 -2
  241. package/src/components/item/QList.json +7 -0
  242. package/src/components/knob/QKnob.js +3 -3
  243. package/src/components/knob/QKnob.json +3 -12
  244. package/src/components/layout/QLayout.js +1 -1
  245. package/src/components/layout/QLayout.json +6 -12
  246. package/src/components/linear-progress/QLinearProgress.json +0 -2
  247. package/src/components/menu/QMenu.js +12 -6
  248. package/src/components/menu/QMenu.json +0 -2
  249. package/src/components/option-group/QOptionGroup.json +2 -5
  250. package/src/components/page/QPage.json +3 -6
  251. package/src/components/page-scroller/QPageScroller.json +0 -2
  252. package/src/components/page-sticky/QPageSticky.json +0 -1
  253. package/src/components/pagination/QPagination.json +5 -13
  254. package/src/components/parallax/QParallax.json +2 -6
  255. package/src/components/popup-edit/QPopupEdit.js +3 -3
  256. package/src/components/popup-edit/QPopupEdit.json +4 -10
  257. package/src/components/popup-proxy/QPopupProxy.js +6 -0
  258. package/src/components/popup-proxy/QPopupProxy.json +19 -1
  259. package/src/components/radio/QRadio.json +1 -2
  260. package/src/components/range/QRange.json +2 -4
  261. package/src/components/rating/QRating.json +0 -1
  262. package/src/components/resize-observer/QResizeObserver.json +2 -4
  263. package/src/components/scroll-area/QScrollArea.js +15 -4
  264. package/src/components/scroll-area/QScrollArea.json +24 -50
  265. package/src/components/scroll-observer/QScrollObserver.js +2 -0
  266. package/src/components/scroll-observer/QScrollObserver.json +6 -12
  267. package/src/components/select/QSelect.js +28 -27
  268. package/src/components/select/QSelect.json +30 -65
  269. package/src/components/select/QSelect.sass +2 -2
  270. package/src/components/slide-item/QSlideItem.json +1 -2
  271. package/src/components/slide-transition/QSlideTransition.json +0 -1
  272. package/src/components/slider/use-slider.json +33 -70
  273. package/src/components/spinner/QSpinner.json +0 -1
  274. package/src/components/splitter/QSplitter.json +1 -2
  275. package/src/components/table/QTable.js +3 -3
  276. package/src/components/table/QTable.json +118 -239
  277. package/src/components/tabs/QRouteTab.json +0 -1
  278. package/src/components/tabs/QTabs.json +0 -2
  279. package/src/components/time/QTime.json +10 -20
  280. package/src/components/tooltip/QTooltip.js +2 -5
  281. package/src/components/tooltip/QTooltip.json +0 -4
  282. package/src/components/tree/QTree.js +6 -6
  283. package/src/components/tree/QTree.json +15 -31
  284. package/src/components/uploader/QUploader.json +13 -22
  285. package/src/components/uploader/xhr-uploader-plugin.js +1 -1
  286. package/src/components/uploader/xhr-uploader-plugin.json +25 -50
  287. package/src/components/virtual-scroll/QVirtualScroll.json +5 -10
  288. package/src/components/virtual-scroll/use-virtual-scroll.js +1 -1
  289. package/src/components/virtual-scroll/use-virtual-scroll.json +8 -19
  290. package/src/composables/private/use-field.js +1 -1
  291. package/src/composables/private/use-field.json +2 -3
  292. package/src/composables/private/use-file.json +4 -13
  293. package/src/composables/private/use-model-toggle.js +3 -3
  294. package/src/composables/private/use-panel.js +2 -2
  295. package/src/composables/private/use-panel.json +0 -2
  296. package/src/composables/private/use-portal.js +5 -1
  297. package/src/composables/private/use-portal.json +7 -1
  298. package/src/composables/private/use-transition.js +17 -11
  299. package/src/composables/private/use-transition.json +0 -1
  300. package/src/composables/private/use-validate.json +1 -3
  301. package/src/directives/Intersection.json +26 -53
  302. package/src/directives/Morph.json +4 -8
  303. package/src/directives/Mutation.json +6 -12
  304. package/src/directives/Scroll.json +2 -4
  305. package/src/directives/TouchHold.json +3 -6
  306. package/src/directives/TouchPan.json +7 -14
  307. package/src/directives/TouchRepeat.json +6 -12
  308. package/src/directives/TouchSwipe.json +3 -6
  309. package/src/plugins/BottomSheet.json +1 -2
  310. package/src/plugins/Cookies.json +2 -4
  311. package/src/plugins/Dialog.json +35 -73
  312. package/src/plugins/Loading.json +6 -11
  313. package/src/plugins/LoadingBar.json +3 -6
  314. package/src/plugins/Notify.json +4 -5
  315. package/src/plugins/Platform.json +3 -6
  316. package/src/plugins/Screen.json +9 -18
  317. package/src/utils/private/global-dialog.json +6 -12
  318. package/src/utils/private/portal.js +4 -4
  319. package/src/utils/private/web-storage.json +6 -10
@@ -75,7 +75,6 @@
75
75
  "desc": "Side to stick navigation to",
76
76
  "default": "bottom/right",
77
77
  "values": [ "top", "right", "bottom", "left" ],
78
- "examples": [ "left" ],
79
78
  "category": "content"
80
79
  },
81
80
 
@@ -117,18 +116,15 @@
117
116
  "scope": {
118
117
  "index": {
119
118
  "type": "Number",
120
- "desc": "The 0-based index of corresponding slide",
121
- "__exemption": [ "examples" ]
119
+ "desc": "The 0-based index of corresponding slide"
122
120
  },
123
121
  "maxIndex": {
124
122
  "type": "Number",
125
- "desc": "The available number of slides",
126
- "__exemption": [ "examples" ]
123
+ "desc": "The available number of slides"
127
124
  },
128
125
  "name": {
129
126
  "type": "Any",
130
- "desc": "The name of the corresponding slide",
131
- "__exemption": [ "examples" ]
127
+ "desc": "The name of the corresponding slide"
132
128
  },
133
129
  "active": {
134
130
  "type": "Boolean",
@@ -136,8 +132,7 @@
136
132
  },
137
133
  "btnProps": {
138
134
  "type": "Object",
139
- "desc": "Default QBtn props that can be binded to your own QBtn",
140
- "__exemption": [ "examples" ]
135
+ "desc": "Default QBtn props that can be binded to your own QBtn"
141
136
  },
142
137
  "onClick": {
143
138
  "type": "Function",
@@ -13,7 +13,6 @@
13
13
  "bottom-right", "bottom-left",
14
14
  "top", "right", "bottom", "left"
15
15
  ],
16
- "examples": [ "top-right" ],
17
16
  "category": "position"
18
17
  },
19
18
 
@@ -118,8 +118,7 @@
118
118
  "value": {
119
119
  "type": "Any",
120
120
  "desc": "New model value",
121
- "required": true,
122
- "__exemption": [ "examples" ]
121
+ "required": true
123
122
  },
124
123
  "evt": {
125
124
  "extends": "evt",
@@ -10,7 +10,6 @@
10
10
  "type": "Number",
11
11
  "default": 0,
12
12
  "desc": "Current progress (must be between min/max)",
13
- "examples": [ 0, 100, 52.32 ],
14
13
  "category": "model"
15
14
  },
16
15
 
@@ -18,7 +17,6 @@
18
17
  "type": "Number",
19
18
  "default": 0,
20
19
  "desc": "Minimum value defining 'no progress' (must be lower than 'max')",
21
- "examples": [ 0, 100, 52.32 ],
22
20
  "category": "model"
23
21
  },
24
22
 
@@ -26,7 +24,6 @@
26
24
  "type": "Number",
27
25
  "default": 100,
28
26
  "desc": "Maximum value defining 100% progress made (must be higher than 'min')",
29
- "examples": [ 100, 52.32 ],
30
27
  "category": "model"
31
28
  },
32
29
 
@@ -64,7 +61,6 @@
64
61
  "type": "Number",
65
62
  "default": 0.2,
66
63
  "desc": "Thickness of progress arc as a ratio (0.0 < x < 1.0) of component size",
67
- "examples": [ 1, 0.3 ],
68
64
  "category": "style"
69
65
  },
70
66
 
@@ -72,7 +68,6 @@
72
68
  "type": "Number",
73
69
  "desc": "Angle to rotate progress arc by",
74
70
  "default": 0,
75
- "examples": [ 0, 40, 90 ],
76
71
  "category": "content"
77
72
  },
78
73
 
@@ -32,7 +32,6 @@
32
32
  "desc": "Forces a certain model format upon the model",
33
33
  "default": "auto",
34
34
  "values": [ "auto", "hex", "rgb", "hexa", "rgba" ],
35
- "examples": [ "hex" ],
36
35
  "category": "model"
37
36
  },
38
37
 
@@ -82,7 +82,7 @@ export default createComponent({
82
82
 
83
83
  emits: [
84
84
  ...useDatetimeEmits,
85
- 'range-start', 'range-end', 'navigation'
85
+ 'rangeStart', 'rangeEnd', 'navigation'
86
86
  ],
87
87
 
88
88
  setup (props, { slots, emit }) {
@@ -708,7 +708,9 @@ export default createComponent({
708
708
  })
709
709
 
710
710
  watch(view, () => {
711
- blurTargetRef.value !== null && blurTargetRef.value.focus()
711
+ if (blurTargetRef.value !== null && proxy.$el.contains(document.activeElement) === true) {
712
+ blurTargetRef.value.focus()
713
+ }
712
714
  })
713
715
 
714
716
  watch(() => viewModel.value.year, year => {
@@ -1391,7 +1393,7 @@ export default createComponent({
1391
1393
  finalHash: initHash
1392
1394
  }
1393
1395
 
1394
- emit('range-start', getShortDate(day))
1396
+ emit('rangeStart', getShortDate(day))
1395
1397
  }
1396
1398
  else {
1397
1399
  const
@@ -1404,7 +1406,7 @@ export default createComponent({
1404
1406
  editRange.value = null
1405
1407
  addToModel(initHash === finalHash ? day : { target: day, ...payload })
1406
1408
 
1407
- emit('range-end', {
1409
+ emit('rangeEnd', {
1408
1410
  from: getShortDate(payload.from),
1409
1411
  to: getShortDate(payload.to)
1410
1412
  })
@@ -210,20 +210,17 @@
210
210
  "year": {
211
211
  "type": "Number",
212
212
  "required": true,
213
- "desc": "The year of the date that the user has clicked/tapped on",
214
- "__exemption": [ "examples" ]
213
+ "desc": "The year of the date that the user has clicked/tapped on"
215
214
  },
216
215
  "month": {
217
216
  "type": "Number",
218
217
  "required": true,
219
- "desc": "The month of the date that the user has clicked/tapped on",
220
- "__exemption": [ "examples" ]
218
+ "desc": "The month of the date that the user has clicked/tapped on"
221
219
  },
222
220
  "day": {
223
221
  "type": "Number",
224
222
  "required": true,
225
- "desc": "The day of the month that the user has clicked/tapped on",
226
- "__exemption": [ "examples" ]
223
+ "desc": "The day of the month that the user has clicked/tapped on"
227
224
  },
228
225
  "from": {
229
226
  "type": "Object",
@@ -233,20 +230,17 @@
233
230
  "year": {
234
231
  "type": "Number",
235
232
  "required": true,
236
- "desc": "The year",
237
- "__exemption": [ "examples" ]
233
+ "desc": "The year"
238
234
  },
239
235
  "month": {
240
236
  "type": "Number",
241
237
  "required": true,
242
- "desc": "The month",
243
- "__exemption": [ "examples" ]
238
+ "desc": "The month"
244
239
  },
245
240
  "day": {
246
241
  "type": "Number",
247
242
  "required": true,
248
- "desc": "The day of month",
249
- "__exemption": [ "examples" ]
243
+ "desc": "The day of month"
250
244
  }
251
245
  }
252
246
  },
@@ -258,20 +252,17 @@
258
252
  "year": {
259
253
  "type": "Number",
260
254
  "required": true,
261
- "desc": "The year",
262
- "__exemption": [ "examples" ]
255
+ "desc": "The year"
263
256
  },
264
257
  "month": {
265
258
  "type": "Number",
266
259
  "required": true,
267
- "desc": "The month",
268
- "__exemption": [ "examples" ]
260
+ "desc": "The month"
269
261
  },
270
262
  "day": {
271
263
  "type": "Number",
272
264
  "required": true,
273
- "desc": "The day of month",
274
- "__exemption": [ "examples" ]
265
+ "desc": "The day of month"
275
266
  }
276
267
  }
277
268
  }
@@ -290,14 +281,12 @@
290
281
  "year": {
291
282
  "type": "Number",
292
283
  "required": true,
293
- "desc": "The year",
294
- "__exemption": [ "examples" ]
284
+ "desc": "The year"
295
285
  },
296
286
  "month": {
297
287
  "type": "Number",
298
288
  "required": true,
299
- "desc": "The month",
300
- "__exemption": [ "examples" ]
289
+ "desc": "The month"
301
290
  }
302
291
  }
303
292
  }
@@ -314,20 +303,17 @@
314
303
  "year": {
315
304
  "type": "Number",
316
305
  "required": true,
317
- "desc": "The year",
318
- "__exemption": [ "examples" ]
306
+ "desc": "The year"
319
307
  },
320
308
  "month": {
321
309
  "type": "Number",
322
310
  "required": true,
323
- "desc": "The month",
324
- "__exemption": [ "examples" ]
311
+ "desc": "The month"
325
312
  },
326
313
  "day": {
327
314
  "type": "Number",
328
315
  "required": true,
329
- "desc": "The day of month",
330
- "__exemption": [ "examples" ]
316
+ "desc": "The day of month"
331
317
  }
332
318
  }
333
319
  }
@@ -349,20 +335,17 @@
349
335
  "year": {
350
336
  "type": "Number",
351
337
  "required": true,
352
- "desc": "The year",
353
- "__exemption": [ "examples" ]
338
+ "desc": "The year"
354
339
  },
355
340
  "month": {
356
341
  "type": "Number",
357
342
  "required": true,
358
- "desc": "The month",
359
- "__exemption": [ "examples" ]
343
+ "desc": "The month"
360
344
  },
361
345
  "day": {
362
346
  "type": "Number",
363
347
  "required": true,
364
- "desc": "The day of month",
365
- "__exemption": [ "examples" ]
348
+ "desc": "The day of month"
366
349
  }
367
350
  }
368
351
  },
@@ -374,20 +357,17 @@
374
357
  "year": {
375
358
  "type": "Number",
376
359
  "required": true,
377
- "desc": "The year",
378
- "__exemption": [ "examples" ]
360
+ "desc": "The year"
379
361
  },
380
362
  "month": {
381
363
  "type": "Number",
382
364
  "required": true,
383
- "desc": "The month",
384
- "__exemption": [ "examples" ]
365
+ "desc": "The month"
385
366
  },
386
367
  "day": {
387
368
  "type": "Number",
388
369
  "required": true,
389
- "desc": "The day of month",
390
- "__exemption": [ "examples" ]
370
+ "desc": "The day of month"
391
371
  }
392
372
  }
393
373
  }
@@ -435,13 +415,11 @@
435
415
  "params": {
436
416
  "year": {
437
417
  "type": "Number",
438
- "desc": "The year",
439
- "__exemption": [ "examples" ]
418
+ "desc": "The year"
440
419
  },
441
420
  "month": {
442
421
  "type": "Number",
443
- "desc": "The month",
444
- "__exemption": [ "examples" ]
422
+ "desc": "The month"
445
423
  }
446
424
  }
447
425
  },
@@ -455,18 +433,15 @@
455
433
  "definition": {
456
434
  "year": {
457
435
  "type": "Number",
458
- "desc": "The year",
459
- "__exemption": [ "examples" ]
436
+ "desc": "The year"
460
437
  },
461
438
  "month": {
462
439
  "type": "Number",
463
- "desc": "The month",
464
- "__exemption": [ "examples" ]
440
+ "desc": "The month"
465
441
  },
466
442
  "day": {
467
443
  "type": "Number",
468
- "desc": "The day of month",
469
- "__exemption": [ "examples" ]
444
+ "desc": "The day of month"
470
445
  }
471
446
  }
472
447
  },
@@ -476,18 +451,15 @@
476
451
  "definition": {
477
452
  "year": {
478
453
  "type": "Number",
479
- "desc": "The year",
480
- "__exemption": [ "examples" ]
454
+ "desc": "The year"
481
455
  },
482
456
  "month": {
483
457
  "type": "Number",
484
- "desc": "The month",
485
- "__exemption": [ "examples" ]
458
+ "desc": "The month"
486
459
  },
487
460
  "day": {
488
461
  "type": "Number",
489
- "desc": "The day of month",
490
- "__exemption": [ "examples" ]
462
+ "desc": "The day of month"
491
463
  }
492
464
  }
493
465
  }
@@ -1,10 +1,10 @@
1
- import { h, ref, computed, watch, onBeforeUnmount, nextTick, Transition, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUnmount, Transition, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useHistory from '../../composables/private/use-history.js'
4
4
  import useTimeout from '../../composables/private/use-timeout.js'
5
5
  import useTick from '../../composables/private/use-tick.js'
6
6
  import useModelToggle, { useModelToggleProps, useModelToggleEmits } from '../../composables/private/use-model-toggle.js'
7
- import { useTransitionProps } from '../../composables/private/use-transition.js'
7
+ import useTransition, { useTransitionProps } from '../../composables/private/use-transition.js'
8
8
  import usePortal from '../../composables/private/use-portal.js'
9
9
  import usePreventScroll from '../../composables/private/use-prevent-scroll.js'
10
10
 
@@ -25,7 +25,7 @@ const positionClass = {
25
25
  left: 'fixed-left items-center'
26
26
  }
27
27
 
28
- const transitions = {
28
+ const defaultTransitions = {
29
29
  standard: [ 'scale', 'scale' ],
30
30
  top: [ 'slide-down', 'slide-up' ],
31
31
  bottom: [ 'slide-up', 'slide-down' ],
@@ -42,8 +42,8 @@ export default createComponent({
42
42
  ...useModelToggleProps,
43
43
  ...useTransitionProps,
44
44
 
45
- transitionShow: String,
46
- transitionHide: String,
45
+ transitionShow: String, // override useTransitionProps
46
+ transitionHide: String, // override useTransitionProps
47
47
 
48
48
  persistent: Boolean,
49
49
  autoClose: Boolean,
@@ -74,7 +74,7 @@ export default createComponent({
74
74
 
75
75
  emits: [
76
76
  ...useModelToggleEmits,
77
- 'shake', 'click', 'escape-key'
77
+ 'shake', 'click', 'escapeKey'
78
78
  ],
79
79
 
80
80
  setup (props, { slots, emit, attrs }) {
@@ -82,7 +82,6 @@ export default createComponent({
82
82
 
83
83
  const innerRef = ref(null)
84
84
  const showing = ref(false)
85
- const transitionState = ref(false)
86
85
  const animating = ref(false)
87
86
 
88
87
  let shakeTimeout, refocusTarget = null, isMaximized, avoidAutoClose
@@ -97,6 +96,12 @@ export default createComponent({
97
96
  const { registerTimeout } = useTimeout()
98
97
  const { registerTick, removeTick } = useTick()
99
98
 
99
+ const { transitionProps, transitionStyle } = useTransition(
100
+ props,
101
+ () => defaultTransitions[ props.position ][ 0 ],
102
+ () => defaultTransitions[ props.position ][ 1 ]
103
+ )
104
+
100
105
  const { showPortal, hidePortal, portalIsAccessible, renderPortal } = usePortal(
101
106
  vm, innerRef, renderPortalContent, /* pls do check if on a global dialog */ true
102
107
  )
@@ -121,26 +126,6 @@ export default createComponent({
121
126
  + (props.square === true ? ' q-dialog__inner--square' : '')
122
127
  )
123
128
 
124
- const transitionShow = computed(() =>
125
- 'q-transition--'
126
- + (props.transitionShow === void 0 ? transitions[ props.position ][ 0 ] : props.transitionShow)
127
- )
128
-
129
- const transitionHide = computed(() =>
130
- 'q-transition--'
131
- + (props.transitionHide === void 0 ? transitions[ props.position ][ 1 ] : props.transitionHide)
132
- )
133
-
134
- const transition = computed(() => (
135
- transitionState.value === true
136
- ? transitionHide.value
137
- : transitionShow.value
138
- ))
139
-
140
- const transitionStyle = computed(
141
- () => `--q-transition-duration: ${ props.transitionDuration }ms`
142
- )
143
-
144
129
  const useBackdrop = computed(() => showing.value === true && props.seamless !== true)
145
130
 
146
131
  const onEvents = computed(() => (
@@ -155,12 +140,6 @@ export default createComponent({
155
140
  attrs.class
156
141
  ])
157
142
 
158
- watch(showing, val => {
159
- nextTick(() => {
160
- transitionState.value = val
161
- })
162
- })
163
-
164
143
  watch(() => props.maximized, state => {
165
144
  showing.value === true && updateMaximized(state)
166
145
  })
@@ -240,7 +219,10 @@ export default createComponent({
240
219
  hidePortal()
241
220
 
242
221
  if (refocusTarget !== null) {
243
- refocusTarget.focus()
222
+ ((evt && evt.type.indexOf('key') === 0
223
+ ? refocusTarget.closest('[tabindex]:not([tabindex^="-"])')
224
+ : void 0
225
+ ) || refocusTarget).focus()
244
226
  refocusTarget = null
245
227
  }
246
228
 
@@ -260,13 +242,23 @@ export default createComponent({
260
242
  return
261
243
  }
262
244
 
263
- node = node.querySelector(selector || '[autofocus], [data-autofocus]') || node
245
+ node = (selector !== '' ? node.querySelector(selector) : null)
246
+ || node.querySelector('[autofocus][tabindex], [data-autofocus][tabindex]')
247
+ || node.querySelector('[autofocus] [tabindex], [data-autofocus] [tabindex]')
248
+ || node.querySelector('[autofocus], [data-autofocus]')
249
+ || node
264
250
  node.focus({ preventScroll: true })
265
251
  })
266
252
  }
267
253
 
268
- function shake () {
269
- focus()
254
+ function shake (focusTarget) {
255
+ if (focusTarget && typeof focusTarget.focus === 'function') {
256
+ focusTarget.focus({ preventScroll: true })
257
+ }
258
+ else {
259
+ focus()
260
+ }
261
+
270
262
  emit('shake')
271
263
 
272
264
  const node = innerRef.value
@@ -292,7 +284,7 @@ export default createComponent({
292
284
  props.maximized !== true && props.noShake !== true && shake()
293
285
  }
294
286
  else {
295
- emit('escape-key')
287
+ emit('escapeKey')
296
288
  hide()
297
289
  }
298
290
  }
@@ -347,7 +339,7 @@ export default createComponent({
347
339
  hide(e)
348
340
  }
349
341
  else if (props.noShake !== true) {
350
- shake()
342
+ shake(e.relatedTarget)
351
343
  }
352
344
  }
353
345
 
@@ -390,14 +382,15 @@ export default createComponent({
390
382
  class: 'q-dialog__backdrop fixed-full',
391
383
  style: transitionStyle.value,
392
384
  'aria-hidden': 'true',
393
- onMousedown: onBackdropClick
385
+ tabindex: -1,
386
+ onFocusin: onBackdropClick
394
387
  })
395
388
  : null
396
389
  )),
397
390
 
398
391
  h(
399
392
  Transition,
400
- { name: transition.value, appear: true },
393
+ transitionProps.value,
401
394
  () => (
402
395
  showing.value === true
403
396
  ? h('div', {
@@ -65,7 +65,6 @@
65
65
  "desc": "Stick dialog to one of the sides (top, right, bottom or left)",
66
66
  "default": "standard",
67
67
  "values": [ "standard", "top", "right", "bottom", "left" ],
68
- "examples": [ "top", "right" ],
69
68
  "category": "content"
70
69
  },
71
70
 
@@ -127,7 +126,15 @@
127
126
  },
128
127
 
129
128
  "shake": {
130
- "desc": "Shakes dialog"
129
+ "desc": "Shakes dialog",
130
+ "params": {
131
+ "focusTarget": {
132
+ "type": "Element",
133
+ "desc": "Optional DOM Element to be focused after shake",
134
+ "examples": [ "document.getElementById('example')" ],
135
+ "addedIn": "v2.10.1"
136
+ }
137
+ }
131
138
  }
132
139
  },
133
140
 
@@ -103,8 +103,7 @@ export default createComponent({
103
103
  tabindex: 0,
104
104
  clickable: true,
105
105
  dark: isDark.value,
106
- onClick () { onOk(action) },
107
- onKeyup (e) { e.keyCode === 13 && onOk(action) }
106
+ onClick () { onOk(action) }
108
107
  }, () => [
109
108
  h(
110
109
  QItemSection,
@@ -211,12 +211,12 @@ export default createComponent({
211
211
  function getPrompt () {
212
212
  return [
213
213
  h(QInput, {
214
- modelValue: model.value,
215
- ...formProps.value,
216
214
  color: vmColor.value,
217
215
  dense: true,
218
216
  autofocus: true,
219
217
  dark: isDark.value,
218
+ ...formProps.value,
219
+ modelValue: model.value,
220
220
  'onUpdate:modelValue': onUpdateModel,
221
221
  onKeyup: onInputKeyup
222
222
  })
@@ -226,11 +226,11 @@ export default createComponent({
226
226
  function getOptions () {
227
227
  return [
228
228
  h(QOptionGroup, {
229
- modelValue: model.value,
230
- ...formProps.value,
231
229
  color: vmColor.value,
232
230
  options: props.options.items,
233
231
  dark: isDark.value,
232
+ ...formProps.value,
233
+ modelValue: model.value,
234
234
  'onUpdate:modelValue': onUpdateModel
235
235
  })
236
236
  ]
@@ -66,7 +66,7 @@ export default createComponent({
66
66
 
67
67
  emits: [
68
68
  ...useModelToggleEmits,
69
- 'on-layout', 'mini-state'
69
+ 'onLayout', 'miniState'
70
70
  ],
71
71
 
72
72
  setup (props, { slots, emit, attrs }) {
@@ -399,7 +399,7 @@ export default createComponent({
399
399
  watch(offset, val => { updateLayout('offset', val) })
400
400
 
401
401
  watch(onLayout, val => {
402
- emit('on-layout', val)
402
+ emit('onLayout', val)
403
403
  updateLayout('space', val)
404
404
  })
405
405
 
@@ -423,7 +423,7 @@ export default createComponent({
423
423
  }
424
424
  })
425
425
 
426
- watch(isMini, val => { emit('mini-state', val) })
426
+ watch(isMini, val => { emit('miniState', val) })
427
427
 
428
428
  function applyPosition (position) {
429
429
  if (position === void 0) {
@@ -588,8 +588,8 @@ export default createComponent({
588
588
  }
589
589
 
590
590
  onMounted(() => {
591
- emit('on-layout', onLayout.value)
592
- emit('mini-state', isMini.value)
591
+ emit('onLayout', onLayout.value)
592
+ emit('miniState', isMini.value)
593
593
 
594
594
  lastDesktopState = props.showIfAbove === true
595
595
 
@@ -11,7 +11,6 @@
11
11
  "desc": "Side to attach to",
12
12
  "values": [ "left", "right" ],
13
13
  "default": "left",
14
- "examples": [ "right" ],
15
14
  "category": "behavior"
16
15
  },
17
16
 
@@ -68,9 +67,6 @@
68
67
  "default", "desktop", "mobile"
69
68
  ],
70
69
  "default": "default",
71
- "examples": [
72
- "mobile"
73
- ],
74
70
  "category": "behavior"
75
71
  },
76
72