quasar 2.10.0 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/dist/api/Dialog.json +25 -68
  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 +0 -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/svg-bootstrap-icons.umd.prod.js +1 -1
  91. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  92. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  93. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  94. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  95. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  96. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  97. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  98. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  99. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  100. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  101. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  102. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  103. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  104. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  105. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  106. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  107. package/dist/icon-set/themify.umd.prod.js +1 -1
  108. package/dist/lang/ar-TN.umd.prod.js +1 -1
  109. package/dist/lang/ar.umd.prod.js +1 -1
  110. package/dist/lang/az-Latn.umd.prod.js +1 -1
  111. package/dist/lang/bg.umd.prod.js +1 -1
  112. package/dist/lang/bn.umd.prod.js +1 -1
  113. package/dist/lang/ca.umd.prod.js +1 -1
  114. package/dist/lang/cs.umd.prod.js +1 -1
  115. package/dist/lang/da.umd.prod.js +1 -1
  116. package/dist/lang/de.umd.prod.js +1 -1
  117. package/dist/lang/el.umd.prod.js +1 -1
  118. package/dist/lang/en-GB.umd.prod.js +1 -1
  119. package/dist/lang/en-US.umd.prod.js +1 -1
  120. package/dist/lang/eo.umd.prod.js +1 -1
  121. package/dist/lang/es.umd.prod.js +1 -1
  122. package/dist/lang/et.umd.prod.js +1 -1
  123. package/dist/lang/eu.umd.prod.js +1 -1
  124. package/dist/lang/fa-IR.umd.prod.js +1 -1
  125. package/dist/lang/fa.umd.prod.js +1 -1
  126. package/dist/lang/fi.umd.prod.js +1 -1
  127. package/dist/lang/fr.umd.prod.js +1 -1
  128. package/dist/lang/gn.umd.prod.js +1 -1
  129. package/dist/lang/he.umd.prod.js +1 -1
  130. package/dist/lang/hr.umd.prod.js +1 -1
  131. package/dist/lang/hu.umd.prod.js +1 -1
  132. package/dist/lang/id.umd.prod.js +1 -1
  133. package/dist/lang/is.umd.prod.js +1 -1
  134. package/dist/lang/it.umd.prod.js +1 -1
  135. package/dist/lang/ja.umd.prod.js +1 -1
  136. package/dist/lang/km.umd.prod.js +1 -1
  137. package/dist/lang/ko-KR.umd.prod.js +1 -1
  138. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  139. package/dist/lang/kz.umd.prod.js +1 -1
  140. package/dist/lang/lt.umd.prod.js +1 -1
  141. package/dist/lang/lu.umd.prod.js +1 -1
  142. package/dist/lang/lv.umd.prod.js +1 -1
  143. package/dist/lang/ml.umd.prod.js +1 -1
  144. package/dist/lang/mm.umd.prod.js +1 -1
  145. package/dist/lang/ms.umd.prod.js +1 -1
  146. package/dist/lang/my.umd.prod.js +1 -1
  147. package/dist/lang/nb-NO.umd.prod.js +1 -1
  148. package/dist/lang/nl.umd.prod.js +1 -1
  149. package/dist/lang/pl.umd.prod.js +1 -1
  150. package/dist/lang/pt-BR.umd.prod.js +1 -1
  151. package/dist/lang/pt.umd.prod.js +1 -1
  152. package/dist/lang/ro.umd.prod.js +1 -1
  153. package/dist/lang/ru.umd.prod.js +1 -1
  154. package/dist/lang/sk.umd.prod.js +1 -1
  155. package/dist/lang/sl.umd.prod.js +1 -1
  156. package/dist/lang/sm.umd.prod.js +1 -1
  157. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  158. package/dist/lang/sr.umd.prod.js +1 -1
  159. package/dist/lang/sv.umd.prod.js +1 -1
  160. package/dist/lang/ta.umd.prod.js +1 -1
  161. package/dist/lang/th.umd.prod.js +1 -1
  162. package/dist/lang/tr.umd.prod.js +1 -1
  163. package/dist/lang/ug.umd.prod.js +1 -1
  164. package/dist/lang/uk.umd.prod.js +1 -1
  165. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  166. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  167. package/dist/lang/vi.umd.prod.js +1 -1
  168. package/dist/lang/zh-CN.umd.prod.js +1 -1
  169. package/dist/lang/zh-TW.umd.prod.js +1 -1
  170. package/dist/quasar.cjs.prod.js +2 -2
  171. package/dist/quasar.css +2 -2
  172. package/dist/quasar.esm.js +166 -158
  173. package/dist/quasar.esm.prod.js +2 -2
  174. package/dist/quasar.prod.css +1 -1
  175. package/dist/quasar.rtl.css +2 -2
  176. package/dist/quasar.rtl.prod.css +1 -1
  177. package/dist/quasar.sass +3 -3
  178. package/dist/quasar.umd.js +166 -158
  179. package/dist/quasar.umd.prod.js +2 -2
  180. package/dist/types/index.d.ts +50 -55
  181. package/dist/vetur/quasar-attributes.json +4 -0
  182. package/dist/vetur/quasar-tags.json +2 -1
  183. package/dist/web-types/web-types.json +142 -132
  184. package/package.json +3 -3
  185. package/src/api.extends.json +1 -2
  186. package/src/components/ajax-bar/QAjaxBar.json +5 -11
  187. package/src/components/breadcrumbs/QBreadcrumbs.json +0 -2
  188. package/src/components/breadcrumbs/QBreadcrumbsEl.json +1 -2
  189. package/src/components/btn/QBtn.json +1 -3
  190. package/src/components/btn/__tests__/QBtn.spec.js +87 -14
  191. package/src/components/btn/__tests__/use-btn.spec.js +385 -58
  192. package/src/components/btn-dropdown/QBtnDropdown.js +4 -11
  193. package/src/components/btn-dropdown/QBtnDropdown.json +0 -2
  194. package/src/components/btn-toggle/QBtnToggle.json +2 -4
  195. package/src/components/carousel/QCarousel.json +4 -9
  196. package/src/components/carousel/QCarouselControl.json +0 -1
  197. package/src/components/checkbox/use-checkbox.json +1 -2
  198. package/src/components/circular-progress/QCircularProgress.json +0 -5
  199. package/src/components/color/QColor.json +0 -1
  200. package/src/components/date/QDate.js +3 -3
  201. package/src/components/date/QDate.json +28 -56
  202. package/src/components/dialog/QDialog.js +30 -40
  203. package/src/components/dialog/QDialog.json +9 -2
  204. package/src/components/dialog-bottom-sheet/BottomSheet.js +1 -2
  205. package/src/components/dialog-plugin/DialogPlugin.js +4 -4
  206. package/src/components/drawer/QDrawer.js +5 -5
  207. package/src/components/drawer/QDrawer.json +0 -4
  208. package/src/components/editor/QEditor.json +3 -6
  209. package/src/components/expansion-item/QExpansionItem.js +3 -3
  210. package/src/components/expansion-item/QExpansionItem.json +3 -8
  211. package/src/components/fab/QFab.json +0 -1
  212. package/src/components/fab/use-fab.json +0 -1
  213. package/src/components/field/QField.json +0 -1
  214. package/src/components/file/QFile.js +4 -1
  215. package/src/components/file/QFile.json +19 -20
  216. package/src/components/footer/QFooter.json +0 -1
  217. package/src/components/form/QForm.js +5 -3
  218. package/src/components/form/QForm.json +2 -4
  219. package/src/components/header/QHeader.json +0 -4
  220. package/src/components/infinite-scroll/QInfiniteScroll.json +9 -6
  221. package/src/components/inner-loading/QInnerLoading.js +2 -5
  222. package/src/components/input/QInput.js +4 -1
  223. package/src/components/input/QInput.json +11 -7
  224. package/src/components/input/use-mask.js +1 -1
  225. package/src/components/intersection/QIntersection.json +0 -1
  226. package/src/components/item/QItem.json +1 -2
  227. package/src/components/item/QItemLabel.json +0 -1
  228. package/src/components/item/QList.js +7 -2
  229. package/src/components/item/QList.json +7 -0
  230. package/src/components/knob/QKnob.js +3 -3
  231. package/src/components/knob/QKnob.json +3 -12
  232. package/src/components/layout/QLayout.js +1 -1
  233. package/src/components/layout/QLayout.json +6 -12
  234. package/src/components/linear-progress/QLinearProgress.json +0 -2
  235. package/src/components/menu/QMenu.js +8 -5
  236. package/src/components/menu/QMenu.json +0 -2
  237. package/src/components/option-group/QOptionGroup.json +2 -5
  238. package/src/components/page/QPage.json +3 -6
  239. package/src/components/page-scroller/QPageScroller.json +0 -2
  240. package/src/components/page-sticky/QPageSticky.json +0 -1
  241. package/src/components/pagination/QPagination.json +5 -13
  242. package/src/components/parallax/QParallax.json +2 -6
  243. package/src/components/popup-edit/QPopupEdit.js +3 -3
  244. package/src/components/popup-edit/QPopupEdit.json +4 -10
  245. package/src/components/popup-proxy/QPopupProxy.json +0 -1
  246. package/src/components/radio/QRadio.json +1 -2
  247. package/src/components/range/QRange.json +2 -4
  248. package/src/components/rating/QRating.json +0 -1
  249. package/src/components/resize-observer/QResizeObserver.json +2 -4
  250. package/src/components/scroll-area/QScrollArea.js +15 -4
  251. package/src/components/scroll-area/QScrollArea.json +24 -50
  252. package/src/components/scroll-observer/QScrollObserver.js +2 -0
  253. package/src/components/scroll-observer/QScrollObserver.json +6 -12
  254. package/src/components/select/QSelect.js +20 -24
  255. package/src/components/select/QSelect.json +30 -65
  256. package/src/components/select/QSelect.sass +2 -2
  257. package/src/components/slide-item/QSlideItem.json +1 -2
  258. package/src/components/slide-transition/QSlideTransition.json +0 -1
  259. package/src/components/slider/use-slider.json +33 -70
  260. package/src/components/spinner/QSpinner.json +0 -1
  261. package/src/components/splitter/QSplitter.json +1 -2
  262. package/src/components/table/QTable.js +3 -3
  263. package/src/components/table/QTable.json +118 -239
  264. package/src/components/tabs/QRouteTab.json +0 -1
  265. package/src/components/tabs/QTabs.json +0 -2
  266. package/src/components/time/QTime.json +10 -20
  267. package/src/components/tooltip/QTooltip.js +2 -5
  268. package/src/components/tooltip/QTooltip.json +0 -4
  269. package/src/components/tree/QTree.js +6 -6
  270. package/src/components/tree/QTree.json +15 -31
  271. package/src/components/uploader/QUploader.json +13 -22
  272. package/src/components/uploader/xhr-uploader-plugin.js +1 -1
  273. package/src/components/uploader/xhr-uploader-plugin.json +25 -50
  274. package/src/components/virtual-scroll/QVirtualScroll.json +5 -10
  275. package/src/components/virtual-scroll/use-virtual-scroll.js +1 -1
  276. package/src/components/virtual-scroll/use-virtual-scroll.json +8 -19
  277. package/src/composables/private/use-field.js +1 -1
  278. package/src/composables/private/use-field.json +2 -3
  279. package/src/composables/private/use-file.json +4 -13
  280. package/src/composables/private/use-model-toggle.js +3 -3
  281. package/src/composables/private/use-panel.js +2 -2
  282. package/src/composables/private/use-panel.json +0 -2
  283. package/src/composables/private/use-portal.js +5 -1
  284. package/src/composables/private/use-portal.json +7 -1
  285. package/src/composables/private/use-transition.js +17 -11
  286. package/src/composables/private/use-transition.json +0 -1
  287. package/src/composables/private/use-validate.json +1 -3
  288. package/src/directives/Intersection.json +26 -53
  289. package/src/directives/Morph.json +4 -8
  290. package/src/directives/Mutation.json +6 -12
  291. package/src/directives/Scroll.json +2 -4
  292. package/src/directives/TouchHold.json +3 -6
  293. package/src/directives/TouchPan.json +7 -14
  294. package/src/directives/TouchRepeat.json +6 -12
  295. package/src/directives/TouchSwipe.json +3 -6
  296. package/src/plugins/BottomSheet.json +1 -2
  297. package/src/plugins/Cookies.json +2 -4
  298. package/src/plugins/Dialog.json +32 -72
  299. package/src/plugins/Loading.json +6 -11
  300. package/src/plugins/LoadingBar.json +3 -6
  301. package/src/plugins/Notify.json +4 -5
  302. package/src/plugins/Platform.json +3 -6
  303. package/src/plugins/Screen.json +9 -18
  304. package/src/utils/private/global-dialog.json +6 -12
  305. package/src/utils/private/portal.js +4 -4
  306. package/src/utils/private/web-storage.json +6 -10
@@ -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 }) {
@@ -1391,7 +1391,7 @@ export default createComponent({
1391
1391
  finalHash: initHash
1392
1392
  }
1393
1393
 
1394
- emit('range-start', getShortDate(day))
1394
+ emit('rangeStart', getShortDate(day))
1395
1395
  }
1396
1396
  else {
1397
1397
  const
@@ -1404,7 +1404,7 @@ export default createComponent({
1404
1404
  editRange.value = null
1405
1405
  addToModel(initHash === finalHash ? day : { target: day, ...payload })
1406
1406
 
1407
- emit('range-end', {
1407
+ emit('rangeEnd', {
1408
1408
  from: getShortDate(payload.from),
1409
1409
  to: getShortDate(payload.to)
1410
1410
  })
@@ -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
  })
@@ -260,13 +239,23 @@ export default createComponent({
260
239
  return
261
240
  }
262
241
 
263
- node = node.querySelector(selector || '[autofocus], [data-autofocus]') || node
242
+ node = (selector !== '' ? node.querySelector(selector) : null)
243
+ || node.querySelector('[autofocus][tabindex], [data-autofocus][tabindex]')
244
+ || node.querySelector('[autofocus] [tabindex], [data-autofocus] [tabindex]')
245
+ || node.querySelector('[autofocus], [data-autofocus]')
246
+ || node
264
247
  node.focus({ preventScroll: true })
265
248
  })
266
249
  }
267
250
 
268
- function shake () {
269
- focus()
251
+ function shake (refocusTarget) {
252
+ if (refocusTarget && typeof refocusTarget.focus === 'function') {
253
+ refocusTarget.focus({ preventScroll: true })
254
+ }
255
+ else {
256
+ focus()
257
+ }
258
+
270
259
  emit('shake')
271
260
 
272
261
  const node = innerRef.value
@@ -292,7 +281,7 @@ export default createComponent({
292
281
  props.maximized !== true && props.noShake !== true && shake()
293
282
  }
294
283
  else {
295
- emit('escape-key')
284
+ emit('escapeKey')
296
285
  hide()
297
286
  }
298
287
  }
@@ -347,7 +336,7 @@ export default createComponent({
347
336
  hide(e)
348
337
  }
349
338
  else if (props.noShake !== true) {
350
- shake()
339
+ shake(e.relatedTarget)
351
340
  }
352
341
  }
353
342
 
@@ -390,14 +379,15 @@ export default createComponent({
390
379
  class: 'q-dialog__backdrop fixed-full',
391
380
  style: transitionStyle.value,
392
381
  'aria-hidden': 'true',
393
- onMousedown: onBackdropClick
382
+ tabindex: -1,
383
+ onFocusin: onBackdropClick
394
384
  })
395
385
  : null
396
386
  )),
397
387
 
398
388
  h(
399
389
  Transition,
400
- { name: transition.value, appear: true },
390
+ transitionProps.value,
401
391
  () => (
402
392
  showing.value === true
403
393
  ? 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
 
@@ -151,8 +151,7 @@
151
151
  "type": "Boolean",
152
152
  "desc": "Highlight the toolbar button, when a child option has been selected."
153
153
  }
154
- },
155
- "__exemption": [ "examples" ]
154
+ }
156
155
  }
157
156
  },
158
157
  "category": "toolbar"
@@ -308,8 +307,7 @@
308
307
  "desc": "Retrieve the content of the Editor",
309
308
  "returns": {
310
309
  "type": "Element",
311
- "desc": "Provides the pure HTML within the editable area",
312
- "__exemption": [ "examples" ]
310
+ "desc": "Provides the pure HTML within the editable area"
313
311
  }
314
312
  }
315
313
  },
@@ -318,8 +316,7 @@
318
316
  "caret": {
319
317
  "type": "Object",
320
318
  "tsType": "QEditorCaret",
321
- "desc": "The current caret state",
322
- "__exemption": [ "examples" ]
319
+ "desc": "The current caret state"
323
320
  }
324
321
  }
325
322
  }
@@ -61,7 +61,7 @@ export default createComponent({
61
61
 
62
62
  emits: [
63
63
  ...useModelToggleEmits,
64
- 'click', 'after-show', 'after-hide'
64
+ 'click', 'afterShow', 'afterHide'
65
65
  ],
66
66
 
67
67
  setup (props, { slots, emit }) {
@@ -170,11 +170,11 @@ export default createComponent({
170
170
  }
171
171
 
172
172
  function onShow () {
173
- emit('after-show')
173
+ emit('afterShow')
174
174
  }
175
175
 
176
176
  function onHide () {
177
- emit('after-hide')
177
+ emit('afterHide')
178
178
  }
179
179
 
180
180
  function enterGroup () {